indusagi-coding-agent 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/LICENSE +661 -0
  3. package/README.md +95 -1
  4. package/dist/entry.js +3205 -1585
  5. package/dist/guardrails.js +47 -515
  6. package/dist/index.js +3232 -1671
  7. package/package.json +8 -7
  8. package/dist/types/addons/addons.test.d.ts +0 -21
  9. package/dist/types/addons/contract.d.ts +0 -640
  10. package/dist/types/addons/dispatch/event-dispatcher.d.ts +0 -140
  11. package/dist/types/addons/dispatch/index.d.ts +0 -23
  12. package/dist/types/addons/dispatch/tool-interceptor.d.ts +0 -128
  13. package/dist/types/addons/host.d.ts +0 -246
  14. package/dist/types/addons/index.d.ts +0 -51
  15. package/dist/types/addons/manifest.d.ts +0 -56
  16. package/dist/types/addons/sandbox.d.ts +0 -103
  17. package/dist/types/addons/surface.d.ts +0 -42
  18. package/dist/types/boot/auth-vault.d.ts +0 -29
  19. package/dist/types/boot/boot.d.ts +0 -26
  20. package/dist/types/boot/boot.test.d.ts +0 -15
  21. package/dist/types/boot/contract.d.ts +0 -236
  22. package/dist/types/boot/index.d.ts +0 -20
  23. package/dist/types/boot/invocation.d.ts +0 -40
  24. package/dist/types/boot/invocation.test.d.ts +0 -8
  25. package/dist/types/boot/runners/addon-wiring.d.ts +0 -103
  26. package/dist/types/boot/runners/addon-wiring.test.d.ts +0 -19
  27. package/dist/types/boot/runners/checkpoint.d.ts +0 -133
  28. package/dist/types/boot/runners/checkpoint.test.d.ts +0 -12
  29. package/dist/types/boot/runners/delegate-runner.d.ts +0 -89
  30. package/dist/types/boot/runners/delegate-runner.test.d.ts +0 -13
  31. package/dist/types/boot/runners/index.d.ts +0 -13
  32. package/dist/types/boot/runners/link-runner.d.ts +0 -20
  33. package/dist/types/boot/runners/memdir.d.ts +0 -103
  34. package/dist/types/boot/runners/memdir.test.d.ts +0 -12
  35. package/dist/types/boot/runners/oneshot-runner.d.ts +0 -19
  36. package/dist/types/boot/runners/read-state.d.ts +0 -82
  37. package/dist/types/boot/runners/read-state.test.d.ts +0 -10
  38. package/dist/types/boot/runners/registry.d.ts +0 -30
  39. package/dist/types/boot/runners/repl-runner.d.ts +0 -19
  40. package/dist/types/boot/runners/session-persist.test.d.ts +0 -10
  41. package/dist/types/boot/runners/session.d.ts +0 -65
  42. package/dist/types/boot/runners/session.test.d.ts +0 -10
  43. package/dist/types/boot/stages.d.ts +0 -92
  44. package/dist/types/boot/upgrade/apply.d.ts +0 -45
  45. package/dist/types/boot/upgrade/index.d.ts +0 -13
  46. package/dist/types/boot/upgrade/upgrades.d.ts +0 -126
  47. package/dist/types/briefing/briefing.test.d.ts +0 -15
  48. package/dist/types/briefing/compose.d.ts +0 -37
  49. package/dist/types/briefing/context-docs.d.ts +0 -38
  50. package/dist/types/briefing/context-docs.test.d.ts +0 -18
  51. package/dist/types/briefing/contract.d.ts +0 -686
  52. package/dist/types/briefing/index.d.ts +0 -29
  53. package/dist/types/briefing/macros.d.ts +0 -206
  54. package/dist/types/briefing/skills.d.ts +0 -67
  55. package/dist/types/capability-deck/bridge-ledger/index.d.ts +0 -25
  56. package/dist/types/capability-deck/bridge-ledger/key.d.ts +0 -65
  57. package/dist/types/capability-deck/bridge-ledger/ledger.d.ts +0 -129
  58. package/dist/types/capability-deck/bridge-ledger/network.d.ts +0 -115
  59. package/dist/types/capability-deck/builtin-bridge.d.ts +0 -114
  60. package/dist/types/capability-deck/capability-deck.test.d.ts +0 -18
  61. package/dist/types/capability-deck/cards/bg-process-card.d.ts +0 -99
  62. package/dist/types/capability-deck/cards/index.d.ts +0 -37
  63. package/dist/types/capability-deck/cards/memory-card.d.ts +0 -68
  64. package/dist/types/capability-deck/cards/plan-file.d.ts +0 -56
  65. package/dist/types/capability-deck/cards/plan-tools.d.ts +0 -97
  66. package/dist/types/capability-deck/cards/plan-tools.test.d.ts +0 -9
  67. package/dist/types/capability-deck/cards/saas-card.d.ts +0 -78
  68. package/dist/types/capability-deck/cards/task-card.d.ts +0 -106
  69. package/dist/types/capability-deck/cards/todo-card.d.ts +0 -78
  70. package/dist/types/capability-deck/cards/workflow-card.d.ts +0 -55
  71. package/dist/types/capability-deck/cards/workflow-card.test.d.ts +0 -12
  72. package/dist/types/capability-deck/checkpoint.int.test.d.ts +0 -25
  73. package/dist/types/capability-deck/contract.d.ts +0 -317
  74. package/dist/types/capability-deck/index.d.ts +0 -46
  75. package/dist/types/capability-deck/manifest.d.ts +0 -60
  76. package/dist/types/capability-deck/provision.d.ts +0 -76
  77. package/dist/types/capability-deck/read-edit-gate.int.test.d.ts +0 -21
  78. package/dist/types/channels/channels.test.d.ts +0 -15
  79. package/dist/types/channels/contract.d.ts +0 -489
  80. package/dist/types/channels/framer.d.ts +0 -49
  81. package/dist/types/channels/index.d.ts +0 -24
  82. package/dist/types/channels/link/dialog.d.ts +0 -138
  83. package/dist/types/channels/link/driver.d.ts +0 -81
  84. package/dist/types/channels/link/index.d.ts +0 -13
  85. package/dist/types/channels/link/server.d.ts +0 -70
  86. package/dist/types/channels/oneshot.d.ts +0 -37
  87. package/dist/types/channels/ops.d.ts +0 -89
  88. package/dist/types/channels/session-ops.d.ts +0 -80
  89. package/dist/types/conductor/bash-guard.d.ts +0 -106
  90. package/dist/types/conductor/bash-guard.test.d.ts +0 -17
  91. package/dist/types/conductor/catalog/catalog.d.ts +0 -87
  92. package/dist/types/conductor/catalog/index.d.ts +0 -14
  93. package/dist/types/conductor/catalog/matcher.d.ts +0 -47
  94. package/dist/types/conductor/conductor.d.ts +0 -189
  95. package/dist/types/conductor/conductor.test.d.ts +0 -10
  96. package/dist/types/conductor/contract.d.ts +0 -774
  97. package/dist/types/conductor/diagnostics.d.ts +0 -183
  98. package/dist/types/conductor/diagnostics.test.d.ts +0 -10
  99. package/dist/types/conductor/index.d.ts +0 -26
  100. package/dist/types/conductor/permission-gate.integration.test.d.ts +0 -22
  101. package/dist/types/conductor/permission-wiring.test.d.ts +0 -14
  102. package/dist/types/conductor/permissions.d.ts +0 -217
  103. package/dist/types/conductor/permissions.test.d.ts +0 -12
  104. package/dist/types/conductor/plan-mode.integration.test.d.ts +0 -23
  105. package/dist/types/conductor/post-edit-diagnostics.test.d.ts +0 -13
  106. package/dist/types/conductor/signal-hub/hub.d.ts +0 -83
  107. package/dist/types/conductor/signal-hub/index.d.ts +0 -19
  108. package/dist/types/conductor/signal-hub/translate.d.ts +0 -77
  109. package/dist/types/conductor/skill-parse/index.d.ts +0 -10
  110. package/dist/types/conductor/skill-parse/parse.d.ts +0 -67
  111. package/dist/types/conductor/submit.test.d.ts +0 -28
  112. package/dist/types/conductor/transcript-store/index.d.ts +0 -16
  113. package/dist/types/conductor/transcript-store/serialize.d.ts +0 -106
  114. package/dist/types/conductor/transcript-store/serialize.test.d.ts +0 -10
  115. package/dist/types/conductor/transcript-store/store.d.ts +0 -188
  116. package/dist/types/console/components/AgentsView.d.ts +0 -41
  117. package/dist/types/console/components/BackgroundAgents.d.ts +0 -63
  118. package/dist/types/console/components/BackgroundAgents.test.d.ts +0 -8
  119. package/dist/types/console/components/Banner.d.ts +0 -110
  120. package/dist/types/console/components/Composer.d.ts +0 -37
  121. package/dist/types/console/components/StatusBar.d.ts +0 -42
  122. package/dist/types/console/components/TerminalConsole.d.ts +0 -32
  123. package/dist/types/console/components/WorkingIndicator.d.ts +0 -44
  124. package/dist/types/console/components/WorkingIndicator.test.d.ts +0 -9
  125. package/dist/types/console/components/banner-sweep.d.ts +0 -55
  126. package/dist/types/console/components/banner.test.d.ts +0 -9
  127. package/dist/types/console/components/welcome.d.ts +0 -115
  128. package/dist/types/console/components/welcome.test.d.ts +0 -9
  129. package/dist/types/console/console.test.d.ts +0 -19
  130. package/dist/types/console/contract.d.ts +0 -598
  131. package/dist/types/console/index.d.ts +0 -34
  132. package/dist/types/console/input/complete.d.ts +0 -120
  133. package/dist/types/console/input/dir-reader.d.ts +0 -28
  134. package/dist/types/console/input/index.d.ts +0 -24
  135. package/dist/types/console/input/input.test.d.ts +0 -14
  136. package/dist/types/console/input/keymap.d.ts +0 -193
  137. package/dist/types/console/input/paste.d.ts +0 -131
  138. package/dist/types/console/mount.d.ts +0 -53
  139. package/dist/types/console/overlays/approval-queue.d.ts +0 -71
  140. package/dist/types/console/overlays/approval.d.ts +0 -104
  141. package/dist/types/console/overlays/approval.test.d.ts +0 -17
  142. package/dist/types/console/overlays/auth.d.ts +0 -31
  143. package/dist/types/console/overlays/boards.d.ts +0 -55
  144. package/dist/types/console/overlays/host.d.ts +0 -45
  145. package/dist/types/console/overlays/index.d.ts +0 -15
  146. package/dist/types/console/overlays/pickers.d.ts +0 -37
  147. package/dist/types/console/overlays/sessions.d.ts +0 -29
  148. package/dist/types/console/reducer.d.ts +0 -51
  149. package/dist/types/console/slash/builtins.d.ts +0 -33
  150. package/dist/types/console/slash/commands/dynamic.d.ts +0 -57
  151. package/dist/types/console/slash/commands/dynamic.test.d.ts +0 -9
  152. package/dist/types/console/slash/commands/integrations.d.ts +0 -28
  153. package/dist/types/console/slash/commands/integrations.test.d.ts +0 -18
  154. package/dist/types/console/slash/commands/shared.d.ts +0 -72
  155. package/dist/types/console/slash/commands/transcript.d.ts +0 -24
  156. package/dist/types/console/slash/commands/transcript.test.d.ts +0 -10
  157. package/dist/types/console/slash/commands/workbench.d.ts +0 -21
  158. package/dist/types/console/slash/commands/workbench.test.d.ts +0 -10
  159. package/dist/types/console/slash/index.d.ts +0 -34
  160. package/dist/types/console/slash/registry.d.ts +0 -90
  161. package/dist/types/console/slash/resolve.d.ts +0 -109
  162. package/dist/types/console/slash/slash.test.d.ts +0 -18
  163. package/dist/types/console/startup.d.ts +0 -119
  164. package/dist/types/console/theme/adapter.d.ts +0 -79
  165. package/dist/types/console/theme/index.d.ts +0 -18
  166. package/dist/types/console/theme/palette.d.ts +0 -77
  167. package/dist/types/console/theme/resolve.d.ts +0 -45
  168. package/dist/types/console/theme/theme.test.d.ts +0 -16
  169. package/dist/types/console/theme/tokens.d.ts +0 -62
  170. package/dist/types/entry.d.ts +0 -17
  171. package/dist/types/guardrails.d.ts +0 -33
  172. package/dist/types/index.d.ts +0 -24
  173. package/dist/types/insight/channel.d.ts +0 -45
  174. package/dist/types/insight/contract.d.ts +0 -411
  175. package/dist/types/insight/index.d.ts +0 -26
  176. package/dist/types/insight/insight.test.d.ts +0 -17
  177. package/dist/types/insight/recorder.d.ts +0 -63
  178. package/dist/types/insight/redaction.d.ts +0 -44
  179. package/dist/types/insight/replay.d.ts +0 -77
  180. package/dist/types/insight/sampling.d.ts +0 -84
  181. package/dist/types/insight/serialize.d.ts +0 -54
  182. package/dist/types/insight/sinks/console.d.ts +0 -36
  183. package/dist/types/insight/sinks/file.d.ts +0 -37
  184. package/dist/types/insight/sinks/index.d.ts +0 -16
  185. package/dist/types/insight/sinks/stream.d.ts +0 -53
  186. package/dist/types/kit/clipboard-image.d.ts +0 -40
  187. package/dist/types/kit/external-editor.d.ts +0 -35
  188. package/dist/types/kit/image.d.ts +0 -102
  189. package/dist/types/kit/index.d.ts +0 -29
  190. package/dist/types/kit/kit.test.d.ts +0 -13
  191. package/dist/types/kit/shell.d.ts +0 -50
  192. package/dist/types/kit/tool-fetch.d.ts +0 -165
  193. package/dist/types/launch/catalog.d.ts +0 -51
  194. package/dist/types/launch/contract.d.ts +0 -387
  195. package/dist/types/launch/credentials.d.ts +0 -112
  196. package/dist/types/launch/index.d.ts +0 -28
  197. package/dist/types/launch/invocation/attachments.d.ts +0 -72
  198. package/dist/types/launch/invocation/flags.d.ts +0 -59
  199. package/dist/types/launch/invocation/index.d.ts +0 -23
  200. package/dist/types/launch/invocation/read.d.ts +0 -52
  201. package/dist/types/launch/invocation/usage.d.ts +0 -25
  202. package/dist/types/launch/launch.test.d.ts +0 -20
  203. package/dist/types/launch/oauth.d.ts +0 -101
  204. package/dist/types/launch/packages.d.ts +0 -75
  205. package/dist/types/launch/packages.test.d.ts +0 -15
  206. package/dist/types/launch/pickers.d.ts +0 -97
  207. package/dist/types/runtime-bridge/bridges/_drive.d.ts +0 -74
  208. package/dist/types/runtime-bridge/bridges/builtins.d.ts +0 -77
  209. package/dist/types/runtime-bridge/bridges/claude-cli.d.ts +0 -37
  210. package/dist/types/runtime-bridge/bridges/codex-cli.d.ts +0 -27
  211. package/dist/types/runtime-bridge/bridges/index.d.ts +0 -15
  212. package/dist/types/runtime-bridge/bridges/indusagi-cli.d.ts +0 -36
  213. package/dist/types/runtime-bridge/broker.d.ts +0 -182
  214. package/dist/types/runtime-bridge/contract.d.ts +0 -436
  215. package/dist/types/runtime-bridge/index.d.ts +0 -21
  216. package/dist/types/runtime-bridge/runtime-bridge.test.d.ts +0 -17
  217. package/dist/types/runtime-bridge/sink.d.ts +0 -59
  218. package/dist/types/sessions/contract.d.ts +0 -79
  219. package/dist/types/sessions/index.d.ts +0 -11
  220. package/dist/types/sessions/library.d.ts +0 -95
  221. package/dist/types/sessions/sessions.test.d.ts +0 -11
  222. package/dist/types/settings/contract.d.ts +0 -175
  223. package/dist/types/settings/index.d.ts +0 -13
  224. package/dist/types/settings/manager.d.ts +0 -109
  225. package/dist/types/settings/settings.test.d.ts +0 -16
  226. package/dist/types/transcript-export/index.d.ts +0 -20
  227. package/dist/types/transcript-export/publish.d.ts +0 -81
  228. package/dist/types/transcript-export/sgr.d.ts +0 -90
  229. package/dist/types/transcript-export/template.d.ts +0 -64
  230. package/dist/types/transcript-export/theme-bridge.d.ts +0 -99
  231. package/dist/types/transcript-export/transcript-export.test.d.ts +0 -16
  232. package/dist/types/window-budget/budget/estimate.d.ts +0 -47
  233. package/dist/types/window-budget/budget/gate.d.ts +0 -37
  234. package/dist/types/window-budget/budget/index.d.ts +0 -14
  235. package/dist/types/window-budget/budget/slice.d.ts +0 -38
  236. package/dist/types/window-budget/condenser.d.ts +0 -73
  237. package/dist/types/window-budget/contract.d.ts +0 -182
  238. package/dist/types/window-budget/index.d.ts +0 -17
  239. package/dist/types/window-budget/microcompact.d.ts +0 -68
  240. package/dist/types/window-budget/microcompact.test.d.ts +0 -16
  241. package/dist/types/window-budget/rehydrate.d.ts +0 -56
  242. package/dist/types/window-budget/summarize/condense.d.ts +0 -70
  243. package/dist/types/window-budget/summarize/index.d.ts +0 -12
  244. package/dist/types/window-budget/summarize/prompt.d.ts +0 -56
  245. package/dist/types/window-budget/window-budget.test.d.ts +0 -18
  246. package/dist/types/workflow-engine/agent-runner.d.ts +0 -105
  247. package/dist/types/workflow-engine/agent-runner.test.d.ts +0 -8
  248. package/dist/types/workflow-engine/display.d.ts +0 -148
  249. package/dist/types/workflow-engine/display.test.d.ts +0 -1
  250. package/dist/types/workflow-engine/engine.d.ts +0 -183
  251. package/dist/types/workflow-engine/engine.test.d.ts +0 -1
  252. package/dist/types/workflow-engine/index.d.ts +0 -21
  253. package/dist/types/workflow-engine/parse.d.ts +0 -64
  254. package/dist/types/workflow-engine/parse.test.d.ts +0 -1
  255. package/dist/types/workflow-engine/structured-output.d.ts +0 -51
  256. package/dist/types/workflow-engine/structured-output.test.d.ts +0 -1
  257. package/dist/types/workspace/brand.d.ts +0 -26
  258. package/dist/types/workspace/index.d.ts +0 -11
  259. package/dist/types/workspace/locator.d.ts +0 -50
  260. package/dist/types/workspace/runtime-detect.d.ts +0 -56
@@ -1,114 +0,0 @@
1
- /**
2
- * Built-in capability bridge — ONE seam to the framework's native tools.
3
- *
4
- * The framework (`indusagi/agent`, the `actions` surface) already authors its
5
- * file, search, shell, web, process, and checklist tools as fully-formed
6
- * `AgentTool` objects and ships a `create<Name>Tool(cwd, options)` factory for
7
- * each. This module is the single place the deck reaches across that seam: it
8
- * pairs every native factory with a deck {@link CapabilityCard.build} closure so
9
- * the whole framework tool set is re-exposed as {@link Capability} rows in one
10
- * file rather than in a dozen one-line re-export stubs.
11
- *
12
- * What this buys the rest of the deck:
13
- * - {@link BUILTIN_BRIDGE} — a single record keyed by the wire-facing tool
14
- * name, each value a {@link BridgeBuilder} that mints the live capability for
15
- * a {@link DeckContext}. The manifest derives its catalog rows from this
16
- * record; nothing else hand-maintains a parallel list of built-ins.
17
- * - {@link buildBuiltin} — resolve-and-build one built-in by id, surfacing a
18
- * typed {@link DeckFault} on an unknown id or a builder throw.
19
- * - {@link BUILTIN_PROFILES} — the per-built-in profile membership the
20
- * data-driven provisioner intersects with a requested {@link DeckProfile},
21
- * so the survey (observe-only) set falls out of one table instead of a
22
- * second hand-written tool list.
23
- *
24
- * Design notes:
25
- * - The builders thread `ctx.cwd` (and, where a factory takes them, the
26
- * framework option bags) into the native factory. They never reimplement the
27
- * tool — the framework owns the read/edit/grep/bash/etc. behavior; the bridge
28
- * only *binds* it to a working context and re-labels it for the catalog.
29
- * - The process and checklist tools are stateful framework singletons exposed
30
- * through their factories; the bridge keeps them framework-backed (wrapping
31
- * the framework, not any third-party package) while presenting them as plain
32
- * capabilities to the deck.
33
- * - All model-facing tool `name` strings are the framework's own wire contract
34
- * (`read`, `bash`, `grep`, …) and are kept verbatim — the model's prompt and
35
- * the conductor key off them. Only the deck-side titles/summaries are the
36
- * deck's own prose.
37
- */
38
- import { type AnyCapability, type Capability, type CapabilityId, type CardProfiles, type DeckContext } from "./contract";
39
- /**
40
- * A closure that mints one framework built-in {@link Capability} for a working
41
- * context. The deck's view of a native factory after the bridge has bound the
42
- * `cwd` (and any option bag) the factory needs.
43
- *
44
- * Returns `AnyCapability` because the heterogeneous built-ins carry different
45
- * parameter schemas; a typed `AgentTool<TSchema>` widens to this element type,
46
- * which is exactly what the deck and the conductor consume.
47
- */
48
- export type BridgeBuilder = (ctx: DeckContext) => AnyCapability;
49
- /**
50
- * One descriptor in the built-in catalog: the wire-facing id, the deck-side
51
- * title/summary prose, the profiles the tool participates in, and the
52
- * {@link BridgeBuilder} that binds the framework factory to a context.
53
- *
54
- * The manifest turns each of these into a {@link CapabilityCard}; consumers that
55
- * want the raw built-in set read {@link BUILTIN_BRIDGE} directly.
56
- */
57
- export interface BuiltinDescriptor {
58
- /** Wire-facing tool name the model invokes (framework contract, verbatim). */
59
- readonly id: CapabilityId;
60
- /** Short human-facing title for catalogs and help text. */
61
- readonly title: string;
62
- /** One-line description in the deck's own voice. */
63
- readonly summary: string;
64
- /** Which deck profiles this built-in belongs to. */
65
- readonly profiles: CardProfiles;
66
- /** Bind the framework factory to a working context. */
67
- readonly build: BridgeBuilder;
68
- }
69
- /**
70
- * The framework built-ins keyed by their wire-facing {@link CapabilityId} — the
71
- * single record the manifest and provisioner read from.
72
- *
73
- * Derived from {@link BUILTIN_DESCRIPTORS}, so the keyed view and the ordered
74
- * list never drift: there is exactly one place a built-in is declared.
75
- */
76
- export declare const BUILTIN_BRIDGE: Readonly<Record<string, BuiltinDescriptor>>;
77
- /**
78
- * The wire-facing ids of every framework built-in, in catalog order. Convenient
79
- * for `--tools` style selection and for the manifest's projection.
80
- */
81
- export declare const BUILTIN_IDS: readonly CapabilityId[];
82
- /**
83
- * The profile membership of every built-in, keyed by id — the slice of the
84
- * profile table the data-driven provisioner reads to decide which built-ins a
85
- * requested {@link DeckProfile} includes.
86
- */
87
- export declare const BUILTIN_PROFILES: Readonly<Record<string, CardProfiles>>;
88
- /**
89
- * The ordered list of built-in descriptors — the manifest projects its catalog
90
- * rows from this, preserving order.
91
- */
92
- export declare function builtinDescriptors(): readonly BuiltinDescriptor[];
93
- /**
94
- * Resolve a built-in by id and build its live capability for a context.
95
- *
96
- * Throws a typed {@link DeckFault}: `unknown_capability` when the id is not a
97
- * framework built-in, or `build_failed` when the framework factory throws. This
98
- * is the sanctioned entry point so failure shaping stays uniform across the deck.
99
- *
100
- * @param id the wire-facing built-in name to build
101
- * @param ctx the working context to bind the factory to
102
- */
103
- export declare function buildBuiltin(id: CapabilityId, ctx: DeckContext): Capability;
104
- /**
105
- * Build every framework built-in eligible for a profile, bound to a context.
106
- *
107
- * Walks the bridge table once, keeps each built-in whose profile membership
108
- * admits the requested profile (`all` admits everything), and binds it. A single
109
- * data-driven pass replaces a trio of per-profile build functions.
110
- *
111
- * @param profile the requested deck profile
112
- * @param ctx the working context to bind each factory to
113
- */
114
- export declare function buildBuiltinsForProfile(profile: "authoring" | "survey" | "all", ctx: DeckContext): AnyCapability[];
@@ -1,18 +0,0 @@
1
- /**
2
- * Capability-deck — Phase 4 behavioral tests (no network, no real MCP server).
3
- *
4
- * Three concerns, exercised purely:
5
- * 1. {@link provisionDeck} — the data-driven profile assembler: `authoring`
6
- * yields the read-only built-in subset, `all` additionally pulls in the
7
- * app-novel cards, and `box()` hands back an `AgentTool[]` shaped exactly
8
- * the way the conductor's `options.tools` expects.
9
- * 2. The {@link BridgeLedger} — event-sourced MCP enrollment: enroll is an
10
- * idempotent upsert, retire is a splice, and every transition yields a new
11
- * immutable snapshot rather than mutating the prior ledger.
12
- * 3. The novel cards — the checklist round-trips set/read, and the
13
- * background-process card starts/polls/stops a real short-lived sleeper.
14
- *
15
- * Everything here binds to a temp/echo context; nothing reaches the network and
16
- * no real MCP server is mounted (the ledger is fed synthetic capabilities).
17
- */
18
- export {};
@@ -1,99 +0,0 @@
1
- /**
2
- * Background-process capability — start, poll, and stop long-lived child
3
- * processes that outlive a single tool call.
4
- *
5
- * App-novel and framework-agnostic: it wraps Node's `child_process.spawn`
6
- * directly rather than delegating to any framework process controller, so the
7
- * lifecycle is owned entirely by this card. A long-running command (a dev
8
- * server, a watcher, a build in `--watch` mode) is launched detached from the
9
- * tool turn; the agent later polls its captured output or signals it to stop.
10
- *
11
- * One tool folds the lifecycle into an `action` discriminant:
12
- * - `start` — spawn `command` in a shell, return the assigned handle id.
13
- * - `poll` — return the buffered stdout/stderr (and live/exited status) for a
14
- * handle, optionally only the lines appended since the last poll.
15
- * - `stop` — send SIGTERM (escalating to SIGKILL after a grace window) to a
16
- * handle's process tree.
17
- * - `list` — enumerate every handle this capability is tracking.
18
- *
19
- * Output is captured into bounded ring buffers so a chatty process cannot grow
20
- * memory without limit; only the most recent lines are retained. The card
21
- * produces a {@link Capability} (framework `AgentTool`) the conductor consumes.
22
- */
23
- import { type ChildProcess } from "node:child_process";
24
- import { type Static } from "@sinclair/typebox";
25
- import type { Capability, CapabilityCard, DeckContext } from "../contract";
26
- /** Coarse lifecycle state of a tracked background process. */
27
- export type DaemonState = "running" | "exited" | "signalled";
28
- /** A bounded buffer of recent output lines for one stream. */
29
- interface RingBuffer {
30
- lines: string[];
31
- /** Index of the next unread line for incremental polling. */
32
- cursor: number;
33
- }
34
- /** One tracked background process and its captured state. */
35
- interface DaemonHandle {
36
- readonly id: string;
37
- readonly command: string;
38
- readonly child: ChildProcess;
39
- state: DaemonState;
40
- exitCode: number | null;
41
- signal: NodeJS.Signals | null;
42
- readonly startedAt: number;
43
- readonly stdout: RingBuffer;
44
- readonly stderr: RingBuffer;
45
- }
46
- /**
47
- * An in-process table of background children, owned by one built capability.
48
- *
49
- * Each `start` spawns a shell-wrapped child, wires its stdout/stderr into
50
- * bounded buffers, and records terminal state on `exit`. `stop` escalates from
51
- * SIGTERM to SIGKILL if the process does not exit within a grace window. The
52
- * table is per-capability, so one session's daemons are isolated from another's.
53
- */
54
- export declare class DaemonTable {
55
- private readonly handles;
56
- private nextSeq;
57
- private readonly cwd;
58
- constructor(cwd: string);
59
- start(command: string): DaemonHandle;
60
- get(id: string): DaemonHandle | undefined;
61
- list(): DaemonHandle[];
62
- /**
63
- * Signal a handle's process to terminate. Sends SIGTERM immediately and a
64
- * SIGKILL after `graceMs` if the child is still alive. Resolves once the
65
- * child has exited or the kill has been sent.
66
- */
67
- stop(handle: DaemonHandle, graceMs?: number): Promise<void>;
68
- }
69
- declare const DaemonParams: import("@sinclair/typebox").TObject<{
70
- action: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"start">, import("@sinclair/typebox").TLiteral<"poll">, import("@sinclair/typebox").TLiteral<"stop">, import("@sinclair/typebox").TLiteral<"list">]>;
71
- command: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
72
- id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
73
- sinceLast: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
74
- }>;
75
- /** Statically-inferred parameter type the capability's `execute` receives. */
76
- export type DaemonParamsType = Static<typeof DaemonParams>;
77
- /** Structured detail returned alongside the model-facing content. */
78
- export interface DaemonDetails {
79
- readonly action: "start" | "poll" | "stop" | "list";
80
- readonly ok: boolean;
81
- readonly id?: string;
82
- readonly state?: DaemonState;
83
- readonly exitCode?: number | null;
84
- readonly processes?: ReadonlyArray<{
85
- readonly id: string;
86
- readonly command: string;
87
- readonly state: DaemonState;
88
- }>;
89
- }
90
- /**
91
- * Build the background-process capability, binding it to a fresh per-session
92
- * {@link DaemonTable} scoped to the context's working directory.
93
- *
94
- * @param ctx the deck context — its `cwd` is where launched processes run.
95
- */
96
- export declare function buildDaemonCapability(ctx: DeckContext): Capability<typeof DaemonParams, DaemonDetails>;
97
- /** Catalog row for the background-process capability. */
98
- export declare const daemonCard: CapabilityCard;
99
- export {};
@@ -1,37 +0,0 @@
1
- /**
2
- * Capability cards — the app-novel capabilities the deck builds in-house.
3
- *
4
- * Each card is a {@link CapabilityCard}: metadata plus a `build(ctx)` factory
5
- * that mints a live {@link Capability} (the framework `AgentTool` shape) for a
6
- * working context. These are written fresh against the framework contract — not
7
- * derived from any prior tooling layer — and stay framework-agnostic where the
8
- * behavior is original (todo and bg-process wrap only Node + the deck contract).
9
- *
10
- * The connector and memory cards expose a thin, clearly-typed adapter seam over
11
- * a framework handle injected through {@link DeckContext.framework}; when no
12
- * handle is wired they degrade to a typed stub so every card builds and runs in
13
- * any environment, including tests.
14
- *
15
- * {@link APP_NOVEL_CARDS} is the contribution this module makes to the catalog;
16
- * the manifest module composes it with the builtin-bridge cards (the framework's
17
- * file/shell/search/web tools) to form the single `CAPABILITY_CARDS` source of
18
- * truth from which the deck's index and profiles are derived.
19
- */
20
- import type { CapabilityCard } from "../contract";
21
- export { todoCard, buildTodoCapability, TodoLedger, type TodoItem, type TodoState, type TodoWeight, type TodoParamsType, type TodoDetails, } from "./todo-card";
22
- export { daemonCard, buildDaemonCapability, DaemonTable, type DaemonState, type DaemonParamsType, type DaemonDetails, } from "./bg-process-card";
23
- export { taskCard, buildTaskCapability, DELEGATE_HANDLE_KEY, type DelegateRunner, type DelegateRequest, type DelegateResult, type TaskParamsType, type TaskDetails, } from "./task-card";
24
- export { workflowCard, buildWorkflowCapability, WORKFLOW_HANDLE_KEY, type WorkflowParamsType, type WorkflowDetails, } from "./workflow-card";
25
- export { saasCard, buildSaasCapability, SAAS_GATEWAY_KEY, type SaasGatewayPort, type RemoteToolSummary, type RemoteExecution, type SaasParamsType, type SaasDetails, } from "./saas-card";
26
- export { memoryCard, buildMemoryCapability, InMemoryStore, MEMORY_HANDLE_KEY, type MemoryStore, type MemoryParamsType, type MemoryDetails, } from "./memory-card";
27
- export { enterPlanModeCard, exitPlanModeCard, buildEnterPlanModeCapability, buildExitPlanModeCapability, PLAN_HANDLE_KEY, type PlanController, type EnterPlanParamsType, type EnterPlanDetails, type ExitPlanParamsType, type ExitPlanDetails, } from "./plan-tools";
28
- export { planSlug, planFilePath, writePlan, readPlan, PLANS_DIRNAME } from "./plan-file";
29
- /**
30
- * The app-novel cards, in catalog order. The manifest module concatenates these
31
- * with the builtin-bridge cards to build the full `CAPABILITY_CARDS` array.
32
- *
33
- * The plan-mode tools live here (the broadest `all` profile only): plan mode is a
34
- * gate over mutating work, so the tools are only meaningful in a full-access deck —
35
- * never the read-only `authoring` subset.
36
- */
37
- export declare const APP_NOVEL_CARDS: readonly CapabilityCard[];
@@ -1,68 +0,0 @@
1
- /**
2
- * Working-memory capability — read and update a persistent scratch note the
3
- * agent carries across turns.
4
- *
5
- * Status: minimal in-memory implementation + clearly-typed seam for the
6
- * framework memory subsystem.
7
- *
8
- * This card ships a self-contained, framework-agnostic default: a single mutable
9
- * text buffer the agent overwrites or appends to, scoped to one built capability
10
- * (one session). A host that wants persistence injects a durable store under
11
- * {@link MEMORY_HANDLE_KEY} via {@link DeckContext.framework} — the boot layer's
12
- * `DiskMemoryStore` (`boot/runners/memdir.ts`) does exactly this, persisting the
13
- * note to a per-cwd `MEMORY.md` so it survives across sessions. The
14
- * {@link Capability} surface and the tool's wire contract do not change either
15
- * way; {@link readStore} validates the injected store's three methods and falls
16
- * back to {@link InMemoryStore} when none is wired.
17
- *
18
- * The single tool keys behavior on an `action` discriminant:
19
- * - `read` — return the current working-memory note.
20
- * - `replace` — overwrite the note with the supplied `content`.
21
- * - `append` — add a line to the end of the note.
22
- */
23
- import { type Static } from "@sinclair/typebox";
24
- import type { Capability, CapabilityCard, DeckContext } from "../contract";
25
- /** Key under which a host may wire a framework-backed memory store in later. */
26
- export declare const MEMORY_HANDLE_KEY: "memoryStore";
27
- /**
28
- * The narrow port the memory capability binds to.
29
- *
30
- * The in-memory default below satisfies it; a future framework-backed store can
31
- * be adapted to the same three methods and injected through the context.
32
- */
33
- export interface MemoryStore {
34
- read(): string;
35
- replace(content: string): void;
36
- append(line: string): void;
37
- }
38
- /** A trivial in-process working-memory buffer, one per built capability. */
39
- export declare class InMemoryStore implements MemoryStore {
40
- private buffer;
41
- read(): string;
42
- replace(content: string): void;
43
- append(line: string): void;
44
- }
45
- declare const MemoryParams: import("@sinclair/typebox").TObject<{
46
- action: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"read">, import("@sinclair/typebox").TLiteral<"replace">, import("@sinclair/typebox").TLiteral<"append">]>;
47
- content: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
48
- }>;
49
- /** Statically-inferred parameter type the capability's `execute` receives. */
50
- export type MemoryParamsType = Static<typeof MemoryParams>;
51
- /** Structured detail returned alongside the model-facing content. */
52
- export interface MemoryDetails {
53
- readonly action: "read" | "replace" | "append";
54
- readonly ok: boolean;
55
- /** Length of the note after the call, for quick status. */
56
- readonly length: number;
57
- }
58
- /**
59
- * Build the working-memory capability, binding it to an injected store when one
60
- * is wired into the context, or a fresh in-memory store otherwise.
61
- *
62
- * @param ctx the deck context; an optional store is read from
63
- * `ctx.framework[MEMORY_HANDLE_KEY]`.
64
- */
65
- export declare function buildMemoryCapability(ctx: DeckContext): Capability<typeof MemoryParams, MemoryDetails>;
66
- /** Catalog row for the working-memory capability. */
67
- export declare const memoryCard: CapabilityCard;
68
- export {};
@@ -1,56 +0,0 @@
1
- /**
2
- * Plan-file persistence — write and read the approved plan a plan-mode session
3
- * produces, as a slug-named markdown file under a per-session plans directory.
4
- *
5
- * Plan mode is a read-only "research first, act second" stance: the agent
6
- * explores under {@link EnterPlanMode}, drafts a plan, and proposes leaving plan
7
- * mode with {@link ExitPlanMode}. When the user approves the exit, the plan text
8
- * the model authored is durable — saved here so it survives the session and can
9
- * be reviewed, diffed, or fed back later. The conductor owns the approval
10
- * handshake; this module owns only the bytes-on-disk concern.
11
- *
12
- * The filename is derived from a stable slug of the plan's first line (its de
13
- * facto title), prefixed with a short timestamp so successive plans in one
14
- * session never collide. Writing is best-effort from the caller's perspective —
15
- * a write failure surfaces as a thrown error the conductor swallows into a
16
- * non-fatal note rather than faulting the turn.
17
- */
18
- /** The directory plans are written under (relative to the session scope dir). */
19
- export declare const PLANS_DIRNAME: "plans";
20
- /**
21
- * Derive a filesystem-safe slug from a plan's text — its first non-empty line,
22
- * lower-cased, with every run of non-alphanumeric characters collapsed to a
23
- * single dash and the result trimmed and length-capped. Falls back to `"plan"`
24
- * when the text yields nothing usable (empty, or punctuation-only).
25
- *
26
- * @param plan the plan body whose first line seeds the slug
27
- */
28
- export declare function planSlug(plan: string): string;
29
- /**
30
- * Resolve the absolute path a plan with `slug` is written to under `sessionDir`.
31
- * The `plans/` sub-directory is implied; callers pass the session scope dir and
32
- * get back `<sessionDir>/plans/<slug>.md`.
33
- *
34
- * @param sessionDir the per-session directory plans live beneath
35
- * @param slug the derived slug (see {@link planSlug})
36
- */
37
- export declare function planFilePath(sessionDir: string, slug: string): string;
38
- /**
39
- * Write the plan body to a slug-named markdown file under `sessionDir/plans`,
40
- * creating the directory as needed, and return the absolute path written. The
41
- * filename is `<short-timestamp>-<slug>.md` so repeated plans in one session do
42
- * not overwrite each other.
43
- *
44
- * Throws on an I/O failure (the conductor swallows it into a non-fatal note).
45
- *
46
- * @param sessionDir the per-session directory plans live beneath
47
- * @param plan the plan body to persist
48
- */
49
- export declare function writePlan(sessionDir: string, plan: string): string;
50
- /**
51
- * Read a previously-written plan file back, or `undefined` when it is missing or
52
- * unreadable. Used by tests and by any review surface that wants the saved plan.
53
- *
54
- * @param path the absolute plan-file path (see {@link planFilePath} / {@link writePlan})
55
- */
56
- export declare function readPlan(path: string): string | undefined;
@@ -1,97 +0,0 @@
1
- /**
2
- * Plan-mode capabilities — the two tools that bracket a read-only planning phase.
3
- *
4
- * - {@link enterPlanModeTool} (`enter_plan_mode`) is a **read-only** tool: when
5
- * invoked it returns a structured detail `{ enterPlanMode: true }` plus
6
- * explore-only prose. It carries no side effect of its own — the **conductor**
7
- * watches the tool-result seam for `enterPlanMode` and switches the session
8
- * into the `plan` permission mode (research-only — every mutating tool is
9
- * blocked at the permission gate), capturing the pre-plan mode so it can be
10
- * restored on exit. It is marked `readOnly: true` so it is itself always
11
- * permitted, even inside plan mode.
12
- *
13
- * - {@link exitPlanModeTool} (`exit_plan_mode`) likewise does NOT flip the mode
14
- * itself — a tool cannot drive the interactive approval dialog. It returns a
15
- * structured detail `{ exitPlan: true, plan }` that the conductor intercepts:
16
- * the conductor raises the user-approval prompt, and on approval restores the
17
- * pre-plan mode + injects the approved plan as context for the next turn,
18
- * persisting it to a plan file. On reject the session stays in plan mode.
19
- *
20
- * Keeping every side effect (mode flip, approval, persistence) in the conductor
21
- * rather than the tool keeps the tools pure, side-effect-light, and assemblable in
22
- * any environment, including tests — and lets the conductor own the single
23
- * permission-mode source of truth.
24
- */
25
- import { type Static } from "@sinclair/typebox";
26
- import type { Capability, CapabilityCard, DeckContext } from "../contract";
27
- /**
28
- * Reserved key under which a host MAY wire a plan-mode controller into the deck
29
- * context. The conductor-driven design intercepts the plan tools' result details
30
- * directly (no handle required), so this is exported only for forward-compat /
31
- * an alternate host that wants the tool to drive the flip itself.
32
- */
33
- export declare const PLAN_HANDLE_KEY: "planController";
34
- /**
35
- * The narrow port a host may wire to flip the live session into plan mode. Unused
36
- * by the default (conductor-intercept) wiring; kept for hosts that prefer the tool
37
- * to signal directly rather than via the tool-result seam.
38
- */
39
- export interface PlanController {
40
- /** Switch the session into read-only plan mode for subsequent tool calls. */
41
- enterPlanMode(): void;
42
- }
43
- declare const EnterPlanParams: import("@sinclair/typebox").TObject<{}>;
44
- /** Statically-inferred parameter type EnterPlanMode's `execute` receives. */
45
- export type EnterPlanParamsType = Static<typeof EnterPlanParams>;
46
- /** Structured detail returned by EnterPlanMode. */
47
- export interface EnterPlanDetails {
48
- /**
49
- * The marker the conductor intercepts on the tool-result seam to switch the
50
- * session into plan mode (and capture the pre-plan mode for a later restore).
51
- */
52
- readonly enterPlanMode: true;
53
- /** Whether an optional in-context controller also applied the switch directly. */
54
- readonly applied: boolean;
55
- }
56
- /**
57
- * Build the EnterPlanMode capability. On invoke it asks the wired
58
- * {@link PlanController} to switch the session into plan mode, then returns
59
- * explore-only prose. It is `readOnly: true`, so the permission gate always
60
- * permits it (including inside plan mode itself).
61
- *
62
- * @param ctx the deck context; an optional controller is read from
63
- * `ctx.framework[PLAN_HANDLE_KEY]`.
64
- */
65
- export declare function buildEnterPlanModeCapability(ctx: DeckContext): Capability<typeof EnterPlanParams, EnterPlanDetails>;
66
- declare const ExitPlanParams: import("@sinclair/typebox").TObject<{
67
- plan: import("@sinclair/typebox").TString;
68
- }>;
69
- /** Statically-inferred parameter type ExitPlanMode's `execute` receives. */
70
- export type ExitPlanParamsType = Static<typeof ExitPlanParams>;
71
- /**
72
- * Structured detail returned by ExitPlanMode. The conductor watches the
73
- * tool-result seam for `exitPlan === true`, captures the {@link plan}, and runs
74
- * the approval handshake (the tool itself does not flip the mode or prompt).
75
- */
76
- export interface ExitPlanDetails {
77
- /** The marker the conductor intercepts to start the exit-plan handshake. */
78
- readonly exitPlan: true;
79
- /** The plan text the model authored, surfaced to the user for approval. */
80
- readonly plan: string;
81
- }
82
- /**
83
- * Build the ExitPlanMode capability. It performs no mode flip and no prompt of
84
- * its own — it returns the `{ exitPlan: true, plan }` detail the conductor
85
- * intercepts. The model-facing content echoes the proposed plan so a transcript
86
- * reader sees what was put up for approval.
87
- *
88
- * Not marked read-only: it represents the request to RESUME mutating work, so in
89
- * plan mode it must still be permitted explicitly (the gate special-cases the
90
- * plan tools alongside read-only tools — see the conductor wiring).
91
- */
92
- export declare function buildExitPlanModeCapability(_ctx: DeckContext): Capability<typeof ExitPlanParams, ExitPlanDetails>;
93
- /** Catalog row for the EnterPlanMode capability. */
94
- export declare const enterPlanModeCard: CapabilityCard;
95
- /** Catalog row for the ExitPlanMode capability. */
96
- export declare const exitPlanModeCard: CapabilityCard;
97
- export {};
@@ -1,9 +0,0 @@
1
- /**
2
- * Plan-mode cards + plan-file helpers — focused unit tests.
3
- *
4
- * The cards are pure capability builders: EnterPlanMode is read-only and returns
5
- * the `{ enterPlanMode: true }` marker the conductor intercepts; ExitPlanMode
6
- * returns the `{ exitPlan: true, plan }` detail the conductor's handshake reads.
7
- * The plan-file helpers slug a title and round-trip the bytes on disk.
8
- */
9
- export {};
@@ -1,78 +0,0 @@
1
- /**
2
- * SaaS-action capability — a thin wrapper over the framework's connector gateway
3
- * (Composio-style remote tool execution).
4
- *
5
- * The heavy lifting (authenticating to a vendor, resolving toolkit scopes,
6
- * executing a remote tool slug) lives in the framework's `connectors-saas`
7
- * layer. This card does NOT re-implement any of it; it adapts an injected
8
- * gateway handle to the deck's {@link Capability} shape so the agent can invoke
9
- * remote SaaS actions by slug. When no gateway is wired into the context the card
10
- * still builds and returns a typed stub, so the deck assembles in every
11
- * environment.
12
- *
13
- * The single tool keys behavior on an `action` discriminant:
14
- * - `discover` — list executable remote tool slugs (optionally filtered).
15
- * - `execute` — run one remote tool slug with arguments.
16
- *
17
- * Vendor-defined identifiers (uppercase tool slugs like `GITHUB_CREATE_ISSUE`)
18
- * are passed through verbatim — they are part of the connector's wire contract.
19
- */
20
- import { type Static } from "@sinclair/typebox";
21
- import type { Capability, CapabilityCard, DeckContext } from "../contract";
22
- /** Key under which a host wires a live SaaS gateway into the deck context. */
23
- export declare const SAAS_GATEWAY_KEY: "saasGateway";
24
- /** One executable remote tool advertised by the connector. */
25
- export interface RemoteToolSummary {
26
- /** Vendor-defined slug, passed through verbatim (e.g. `GITHUB_CREATE_ISSUE`). */
27
- readonly slug: string;
28
- /** Human-readable description from the connector, if any. */
29
- readonly description?: string;
30
- }
31
- /** The outcome of executing one remote tool slug. */
32
- export interface RemoteExecution {
33
- readonly ok: boolean;
34
- /** Connector payload, surfaced to the model as serialized text. */
35
- readonly data: unknown;
36
- }
37
- /**
38
- * The slice of a framework SaaS gateway this card adapts.
39
- *
40
- * Deliberately narrow — the deck only needs to list and execute remote tools.
41
- * The framework's full gateway (connection lifecycle, scope planning, status
42
- * reporting) is a superset; a host adapts it to this shape when wiring it in.
43
- */
44
- export interface SaasGatewayPort {
45
- /** List executable remote tools, optionally filtered by toolkit or query. */
46
- discover(filter?: {
47
- toolkits?: string[];
48
- query?: string;
49
- }): Promise<RemoteToolSummary[]>;
50
- /** Execute one remote tool slug with arguments. */
51
- execute(slug: string, args: Record<string, unknown>): Promise<RemoteExecution>;
52
- }
53
- declare const SaasParams: import("@sinclair/typebox").TObject<{
54
- action: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"discover">, import("@sinclair/typebox").TLiteral<"execute">]>;
55
- slug: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
56
- arguments: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
57
- toolkits: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
58
- query: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
59
- }>;
60
- /** Statically-inferred parameter type the capability's `execute` receives. */
61
- export type SaasParamsType = Static<typeof SaasParams>;
62
- /** Structured detail returned alongside the model-facing content. */
63
- export interface SaasDetails {
64
- readonly action: "discover" | "execute";
65
- readonly ok: boolean;
66
- readonly slug?: string;
67
- readonly count?: number;
68
- }
69
- /**
70
- * Build the SaaS-action capability, adapting an injected gateway when present.
71
- *
72
- * @param ctx the deck context; an optional gateway is read from
73
- * `ctx.framework[SAAS_GATEWAY_KEY]`.
74
- */
75
- export declare function buildSaasCapability(ctx: DeckContext): Capability<typeof SaasParams, SaasDetails>;
76
- /** Catalog row for the SaaS-action capability. */
77
- export declare const saasCard: CapabilityCard;
78
- export {};