Add tessl/api plugin#12
Conversation
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>
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe PR adds an ChangesAPI plugin and endpoint discovery
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
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (7)
README.mdapi/.tessl-plugin/plugin.jsonapi/README.mdapi/skills/api/SKILL.mdapi/skills/api/scripts/.gitignoreapi/skills/api/scripts/tessl_api_discover.pyapi/tessl.json
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>
Summary
Migrates the API endpoint discovery plugin from the monorepo (
tessleng/api,apps/backend/plugin/api/) intoproduct-pluginsas the publictessl/apiplugin.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.jsoninto context.Changes
api/plugin directory:tessl.json—name: tessl/api, vendored mode.tessl-plugin/plugin.json—name: tessl/api,private: false, declares theskills/apiskillskills/api/— theapiskill (SKILL.md+ stdlib-only Python discovery script)README.mdtessleng/api→tessl/api(manifest + script docstring)Notes
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 publishtessl/api.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation