Skip to main content
← Back to list
01Issue
FeatureOpenSwamp CLIPublic
AssigneesNone

Relationships

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

Opened by mtaylor · 10/27/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

Open

10/27/2026, 1:45:18 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.