Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLIPublic
Assigneesstack72

Relationships

#4007 Show each method's kind in type describe --json

Opened by mtaylor · 10/27/2026· Shipped 10/28/2026

What

swamp model type describe <type> --json lists each method's arguments, but not its kind (create, read, update, delete, list). The kind is set explicitly with kind: or inferred by inferMethodKind(). Please include the resolved kind for each method, and say whether it was declared or inferred.

Why

AI coding agents run swamp through a shell, and the agent's harness decides whether each command needs a human's approval. For swamp model method run <model> <method> (and behavior run), the risk depends on the method. A list or read method is safe to run unattended. A delete against a shared environment isn't. Without the kind, a permission hook has to keep its own list of which methods are safe, and that list drifts from the extensions.

Swamp already computes this. isMutatingKind() decides whether pre-flight checks run. With the kind in type describe --json, a Claude Code PreToolUse hook (or the Cursor/Kiro equivalents) could:

  • allow read and list methods without asking
  • ask for every other kind, including methods with no kind (the same default swamp uses for checks)

It would also push extension authors to declare kind on methods that inference can't classify, such as probe or captureConfig.

Suggested shape

Add "kind": "read" and "kindSource": "declared" | "inferred" | "none" to each entry in methods[] in the type describe --json output. A field on swamp model get --json for a model's methods would help as well.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 6 MOREPR_LINKED+ 2 MORESESSION_SUMMARIZED

Shipped

10/28/2026, 8:53:33 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack7210/28/2026, 7:44:51 PM
Editable. Press Enter to edit.

stack72 commented 10/28/2026, 8:53:43 PM

Thanks @mtaylor for reporting this! We shipped: Expose each method's resolved kind and where it came from (declared, inferred, none) in describe output. A new domain helper resolveMethodKind wraps inferMethodKind so describe and runtime gating share one rule; the shared toMethodDescribeData adds kind and kindSource, which reaches type describe (full and compact), model get, model method describe, model create and serve describe JSON; extension adapter paths get test coverage; log mode shows the kind beside method names; skill and design docs are updated, including that kind is advisory.. The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.