Skip to content

Add tessl/api plugin#12

Merged
jamesmoss merged 4 commits into
mainfrom
add-api-plugin
Jun 25, 2026
Merged

Add tessl/api plugin#12
jamesmoss merged 4 commits into
mainfrom
add-api-plugin

Conversation

@jamesmoss

@jamesmoss jamesmoss commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates the API endpoint discovery plugin from the monorepo (tessleng/api, apps/backend/plugin/api/) into product-plugins as the public tessl/api plugin.

The skill searches and renders single endpoints from the Tessl OpenAPI spec, so agents can discover and call the Tessl REST API without loading the whole openapi.json into context.

Changes

  • New api/ plugin directory:
    • tessl.jsonname: tessl/api, vendored mode
    • .tessl-plugin/plugin.jsonname: tessl/api, private: false, declares the skills/api skill
    • skills/api/ — the api skill (SKILL.md + stdlib-only Python discovery script)
    • README.md
  • Renamed tessleng/apitessl/api (manifest + script docstring)
  • Added the plugin to the root README plugins table

Notes

  • Version stays at 0.1.0. The version-check CI treats a newly added plugin (no manifest on the base ref) as passing, so this is fine for the first publish; on merge, the publish workflow will publish tessl/api.
  • The source plugin is removed from the monorepo in a separate commit/PR there.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added an API discovery helper for finding and calling Tessl REST endpoints more easily.
    • Introduced support for searching endpoints by keyword or schema property, plus a ready-to-run command for invoking a selected endpoint.
    • Added installation and usage guidance for the new API plugin.
  • Documentation

    • Updated the plugins list to include the new API plugin and its registry links.

Migrate the API endpoint discovery plugin from the monorepo
(tessleng/api) into product-plugins as the public tessl/api plugin.

The skill searches and renders single endpoints from the Tessl
OpenAPI spec so agents can find and call the Tessl REST API without
loading the whole openapi.json into context.

- Add api/ with tessl.json, .tessl-plugin/plugin.json (private: false),
  the api skill, and a README
- List the plugin in the product-plugins README table

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4799b877-677a-4294-981b-533f5771e515

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR adds an api plugin entry, plugin metadata, new plugin and skill documentation, and a Python CLI that caches the OpenAPI spec, searches endpoints, and renders tessl api invocations.

Changes

API plugin and endpoint discovery

Layer / File(s) Summary
Plugin registration and docs
README.md, api/.tessl-plugin/plugin.json, api/README.md, api/skills/api/SKILL.md, api/tessl.json, api/skills/api/scripts/.gitignore
Adds the api plugin row, manifest metadata, helper documentation, vendored manifest, and ignore rules.
Spec caching and search index
api/skills/api/scripts/tessl_api_discover.py
Adds OpenAPI spec loading with caching, operation traversal, endpoint indexing, and search ranking/output.
Endpoint resolution and schema rendering
api/skills/api/scripts/tessl_api_discover.py
Adds loose path resolution, schema rendering, request-body sampling, and tessl api invocation generation.
Show output and CLI dispatch
api/skills/api/scripts/tessl_api_discover.py
Formats show output, handles status filtering, prints the shared error-envelope reference, and routes subcommands from main.

Sequence Diagram(s)

sequenceDiagram
  participant main
  participant cmd_show
  participant resolve_endpoint
  participant render_schema
  participant invocation_line
  main->>cmd_show: run show
  cmd_show->>resolve_endpoint: match method and path
  cmd_show->>render_schema: render request and response schemas
  cmd_show->>invocation_line: build tessl api command
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Suggested reviewers

  • marc-tessl
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly names the main change: adding the tessl/api plugin.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@api/skills/api/scripts/tessl_api_discover.py`:
- Around line 160-184: Update request_schema() and response_schemas() to select
schemas by media type instead of taking the first content entry: prefer
application/json and any */*+json variants when scanning
op["requestBody"]["content"] and each response's content, and only fall back to
another available schema if no JSON media type is present. Keep the existing
return shapes from request_schema() and response_schemas(), but make the
media-type preference explicit so show and generated --input examples match the
JSON payloads exposed by the skill.
- Around line 597-602: The request-body sample handling in tessl_api_discover.py
is rewriting top-level array bodies to an object, which breaks array-body
examples. Update the logic around request_schema(op) and sample_for_schema(rs)
so only None falls back to {}, and preserve [] (and any other valid non-None
sample) when building body_json for non-GET methods.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 562064b9-a4ef-40b4-8294-733e74044f5e

📥 Commits

Reviewing files that changed from the base of the PR and between 0ae78b9 and a05eca8.

📒 Files selected for processing (7)
  • README.md
  • api/.tessl-plugin/plugin.json
  • api/README.md
  • api/skills/api/SKILL.md
  • api/skills/api/scripts/.gitignore
  • api/skills/api/scripts/tessl_api_discover.py
  • api/tessl.json

Comment thread api/skills/api/scripts/tessl_api_discover.py
Comment thread api/skills/api/scripts/tessl_api_discover.py
jamesmoss and others added 3 commits June 25, 2026 12:04
Generated with `tessl scenario generate` against the api plugin.
Two weighted-checklist scenarios covering the skill's documented
workflow:

- Expand union schema to document install source variants
  (search → show --expand --status)
- Paginated endpoint discovery script with refresh
  (search --page loop, --refresh, show, tessl api invocation)

Both verify the helper script is used instead of the raw openapi.json
and that no manual Authorization header is set.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
scenario-2 -> scenario-0, scenario-4 -> scenario-1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Select request/response schemas by media type, preferring
  application/json and */*+json so show output and the generated
  --input example match the JSON flow (new schema_from_content helper).
- Preserve top-level array request bodies: only fall back to {} when
  sampling returns None, so array-body endpoints get a valid [] example.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jamesmoss
jamesmoss merged commit b45b136 into main Jun 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant