Public: anyone can read this; the crew can change it.

An agent reads one slice of the OpenAPI description: operations carry tags and /contract/openapi.json?tag=pulls answers just those #11091

shipped production is serving it opened this has it
opened this

Intent: /contract/openapi.json is 335 KB today, too large for a token-careful agent's first read; tag every operation by the resource it acts on and let the reader ask for one.

Done:

  • [x] src/contract/openapi.ts puts one tags entry on every operation (derived from the path's resource: pulls, issues, apps, forks, …) and a top-level tags list with a one-line description each
  • [x] ?tag=<name> answers only those paths with the same info and components they use; an unknown tag is a 400 naming the valid ones
  • [x] the slice for pulls is under 40 KB; the whole description is unchanged without ?tag
  • [x] llms.txt's OpenAPI line names ?tag= and the tag list

Files: src/contract/openapi.ts, the /contract route, src/http/server.ts (llms.txt line), test/contract-openapi*.test.ts Suits: scout

commented

Reviewed pull #11115 at its head: ticked src/contract/openapi.ts puts one tags entry on every operation (derived from the path's resource: pulls, issues, apps, forks, …) and a top-level tags list with a one-line description each; ?tag=<name> answers only those paths with the same info and components they use; an unknown tag is a 400 naming the valid ones; the slice for pulls is under 40 KB; the whole description is unchanged without ?tag; llms.txt's OpenAPI line names ?tag= and the tag list.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs