indusagi-coding-agent 0.2.4 → 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 (266) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +95 -1
  3. package/dist/entry.js +1559 -1100
  4. package/dist/guardrails.js +26 -509
  5. package/dist/index.js +1581 -1155
  6. package/package.json +8 -7
  7. package/dist/types/addons/addons.test.d.ts +0 -21
  8. package/dist/types/addons/contract.d.ts +0 -640
  9. package/dist/types/addons/dispatch/event-dispatcher.d.ts +0 -140
  10. package/dist/types/addons/dispatch/index.d.ts +0 -23
  11. package/dist/types/addons/dispatch/tool-interceptor.d.ts +0 -128
  12. package/dist/types/addons/host.d.ts +0 -246
  13. package/dist/types/addons/index.d.ts +0 -51
  14. package/dist/types/addons/manifest.d.ts +0 -56
  15. package/dist/types/addons/sandbox.d.ts +0 -103
  16. package/dist/types/addons/surface.d.ts +0 -42
  17. package/dist/types/boot/auth-vault.d.ts +0 -29
  18. package/dist/types/boot/boot.d.ts +0 -26
  19. package/dist/types/boot/boot.test.d.ts +0 -15
  20. package/dist/types/boot/contract.d.ts +0 -236
  21. package/dist/types/boot/heap.d.ts +0 -31
  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 -109
  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/server-mode.d.ts +0 -71
  41. package/dist/types/boot/runners/session-persist.test.d.ts +0 -10
  42. package/dist/types/boot/runners/session.d.ts +0 -88
  43. package/dist/types/boot/runners/session.test.d.ts +0 -15
  44. package/dist/types/boot/server-token.d.ts +0 -97
  45. package/dist/types/boot/stages.d.ts +0 -92
  46. package/dist/types/boot/upgrade/apply.d.ts +0 -45
  47. package/dist/types/boot/upgrade/index.d.ts +0 -13
  48. package/dist/types/boot/upgrade/upgrades.d.ts +0 -126
  49. package/dist/types/briefing/briefing.test.d.ts +0 -15
  50. package/dist/types/briefing/compose.d.ts +0 -37
  51. package/dist/types/briefing/context-docs.d.ts +0 -38
  52. package/dist/types/briefing/context-docs.test.d.ts +0 -18
  53. package/dist/types/briefing/contract.d.ts +0 -686
  54. package/dist/types/briefing/index.d.ts +0 -29
  55. package/dist/types/briefing/macros.d.ts +0 -206
  56. package/dist/types/briefing/skills.d.ts +0 -67
  57. package/dist/types/capability-deck/bridge-ledger/index.d.ts +0 -25
  58. package/dist/types/capability-deck/bridge-ledger/key.d.ts +0 -65
  59. package/dist/types/capability-deck/bridge-ledger/ledger.d.ts +0 -129
  60. package/dist/types/capability-deck/bridge-ledger/network.d.ts +0 -115
  61. package/dist/types/capability-deck/builtin-bridge.d.ts +0 -114
  62. package/dist/types/capability-deck/capability-deck.test.d.ts +0 -18
  63. package/dist/types/capability-deck/cards/bg-process-card.d.ts +0 -99
  64. package/dist/types/capability-deck/cards/index.d.ts +0 -37
  65. package/dist/types/capability-deck/cards/memory-card.d.ts +0 -68
  66. package/dist/types/capability-deck/cards/plan-file.d.ts +0 -56
  67. package/dist/types/capability-deck/cards/plan-tools.d.ts +0 -97
  68. package/dist/types/capability-deck/cards/plan-tools.test.d.ts +0 -9
  69. package/dist/types/capability-deck/cards/saas-card.d.ts +0 -78
  70. package/dist/types/capability-deck/cards/task-card.d.ts +0 -106
  71. package/dist/types/capability-deck/cards/todo-card.d.ts +0 -78
  72. package/dist/types/capability-deck/cards/workflow-card.d.ts +0 -55
  73. package/dist/types/capability-deck/cards/workflow-card.test.d.ts +0 -12
  74. package/dist/types/capability-deck/checkpoint.int.test.d.ts +0 -25
  75. package/dist/types/capability-deck/contract.d.ts +0 -318
  76. package/dist/types/capability-deck/index.d.ts +0 -46
  77. package/dist/types/capability-deck/manifest.d.ts +0 -60
  78. package/dist/types/capability-deck/provision.d.ts +0 -76
  79. package/dist/types/capability-deck/read-edit-gate.int.test.d.ts +0 -21
  80. package/dist/types/channels/channels.test.d.ts +0 -15
  81. package/dist/types/channels/contract.d.ts +0 -489
  82. package/dist/types/channels/framer.d.ts +0 -49
  83. package/dist/types/channels/index.d.ts +0 -24
  84. package/dist/types/channels/link/dialog.d.ts +0 -138
  85. package/dist/types/channels/link/driver.d.ts +0 -81
  86. package/dist/types/channels/link/index.d.ts +0 -13
  87. package/dist/types/channels/link/server.d.ts +0 -70
  88. package/dist/types/channels/oneshot.d.ts +0 -37
  89. package/dist/types/channels/ops.d.ts +0 -89
  90. package/dist/types/channels/session-ops.d.ts +0 -80
  91. package/dist/types/conductor/bash-guard.d.ts +0 -106
  92. package/dist/types/conductor/bash-guard.test.d.ts +0 -17
  93. package/dist/types/conductor/catalog/catalog.d.ts +0 -87
  94. package/dist/types/conductor/catalog/index.d.ts +0 -14
  95. package/dist/types/conductor/catalog/matcher.d.ts +0 -47
  96. package/dist/types/conductor/conductor.d.ts +0 -213
  97. package/dist/types/conductor/conductor.test.d.ts +0 -10
  98. package/dist/types/conductor/contract.d.ts +0 -838
  99. package/dist/types/conductor/diagnostics.d.ts +0 -183
  100. package/dist/types/conductor/diagnostics.test.d.ts +0 -10
  101. package/dist/types/conductor/index.d.ts +0 -26
  102. package/dist/types/conductor/permission-gate.integration.test.d.ts +0 -22
  103. package/dist/types/conductor/permission-wiring.test.d.ts +0 -14
  104. package/dist/types/conductor/permissions.d.ts +0 -287
  105. package/dist/types/conductor/permissions.test.d.ts +0 -12
  106. package/dist/types/conductor/plan-mode.integration.test.d.ts +0 -23
  107. package/dist/types/conductor/post-edit-diagnostics.test.d.ts +0 -18
  108. package/dist/types/conductor/quota-error.d.ts +0 -35
  109. package/dist/types/conductor/signal-hub/hub.d.ts +0 -83
  110. package/dist/types/conductor/signal-hub/index.d.ts +0 -19
  111. package/dist/types/conductor/signal-hub/translate.d.ts +0 -77
  112. package/dist/types/conductor/skill-parse/index.d.ts +0 -10
  113. package/dist/types/conductor/skill-parse/parse.d.ts +0 -67
  114. package/dist/types/conductor/submit.test.d.ts +0 -28
  115. package/dist/types/conductor/transcript-store/index.d.ts +0 -16
  116. package/dist/types/conductor/transcript-store/serialize.d.ts +0 -106
  117. package/dist/types/conductor/transcript-store/serialize.test.d.ts +0 -10
  118. package/dist/types/conductor/transcript-store/store.d.ts +0 -188
  119. package/dist/types/console/auth-status.d.ts +0 -28
  120. package/dist/types/console/components/AgentsView.d.ts +0 -41
  121. package/dist/types/console/components/BackgroundAgents.d.ts +0 -63
  122. package/dist/types/console/components/BackgroundAgents.test.d.ts +0 -8
  123. package/dist/types/console/components/Banner.d.ts +0 -110
  124. package/dist/types/console/components/Composer.d.ts +0 -37
  125. package/dist/types/console/components/StatusBar.d.ts +0 -42
  126. package/dist/types/console/components/TerminalConsole.d.ts +0 -27
  127. package/dist/types/console/components/WorkingIndicator.d.ts +0 -44
  128. package/dist/types/console/components/WorkingIndicator.test.d.ts +0 -9
  129. package/dist/types/console/components/banner-sweep.d.ts +0 -55
  130. package/dist/types/console/components/banner.test.d.ts +0 -9
  131. package/dist/types/console/components/welcome.d.ts +0 -115
  132. package/dist/types/console/components/welcome.test.d.ts +0 -9
  133. package/dist/types/console/console.test.d.ts +0 -19
  134. package/dist/types/console/contract.d.ts +0 -611
  135. package/dist/types/console/index.d.ts +0 -34
  136. package/dist/types/console/input/complete.d.ts +0 -120
  137. package/dist/types/console/input/dir-reader.d.ts +0 -28
  138. package/dist/types/console/input/index.d.ts +0 -24
  139. package/dist/types/console/input/input.test.d.ts +0 -14
  140. package/dist/types/console/input/keymap.d.ts +0 -193
  141. package/dist/types/console/input/paste.d.ts +0 -183
  142. package/dist/types/console/mount.d.ts +0 -53
  143. package/dist/types/console/overlays/approval-queue.d.ts +0 -88
  144. package/dist/types/console/overlays/approval.d.ts +0 -104
  145. package/dist/types/console/overlays/approval.test.d.ts +0 -17
  146. package/dist/types/console/overlays/auth.d.ts +0 -31
  147. package/dist/types/console/overlays/boards.d.ts +0 -55
  148. package/dist/types/console/overlays/host.d.ts +0 -45
  149. package/dist/types/console/overlays/index.d.ts +0 -15
  150. package/dist/types/console/overlays/pickers.d.ts +0 -37
  151. package/dist/types/console/overlays/sessions.d.ts +0 -29
  152. package/dist/types/console/reducer.d.ts +0 -51
  153. package/dist/types/console/slash/builtins.d.ts +0 -33
  154. package/dist/types/console/slash/commands/dynamic.d.ts +0 -57
  155. package/dist/types/console/slash/commands/dynamic.test.d.ts +0 -9
  156. package/dist/types/console/slash/commands/integrations.d.ts +0 -28
  157. package/dist/types/console/slash/commands/integrations.test.d.ts +0 -18
  158. package/dist/types/console/slash/commands/shared.d.ts +0 -72
  159. package/dist/types/console/slash/commands/transcript.d.ts +0 -24
  160. package/dist/types/console/slash/commands/transcript.test.d.ts +0 -10
  161. package/dist/types/console/slash/commands/workbench.d.ts +0 -21
  162. package/dist/types/console/slash/commands/workbench.test.d.ts +0 -10
  163. package/dist/types/console/slash/index.d.ts +0 -34
  164. package/dist/types/console/slash/registry.d.ts +0 -90
  165. package/dist/types/console/slash/resolve.d.ts +0 -109
  166. package/dist/types/console/slash/slash.test.d.ts +0 -18
  167. package/dist/types/console/startup.d.ts +0 -119
  168. package/dist/types/console/theme/adapter.d.ts +0 -79
  169. package/dist/types/console/theme/index.d.ts +0 -18
  170. package/dist/types/console/theme/palette.d.ts +0 -77
  171. package/dist/types/console/theme/resolve.d.ts +0 -45
  172. package/dist/types/console/theme/theme.test.d.ts +0 -16
  173. package/dist/types/console/theme/tokens.d.ts +0 -62
  174. package/dist/types/entry.d.ts +0 -17
  175. package/dist/types/guardrails.d.ts +0 -33
  176. package/dist/types/index.d.ts +0 -24
  177. package/dist/types/insight/channel.d.ts +0 -45
  178. package/dist/types/insight/contract.d.ts +0 -411
  179. package/dist/types/insight/index.d.ts +0 -26
  180. package/dist/types/insight/insight.test.d.ts +0 -17
  181. package/dist/types/insight/recorder.d.ts +0 -63
  182. package/dist/types/insight/redaction.d.ts +0 -44
  183. package/dist/types/insight/replay.d.ts +0 -77
  184. package/dist/types/insight/sampling.d.ts +0 -84
  185. package/dist/types/insight/serialize.d.ts +0 -54
  186. package/dist/types/insight/sinks/console.d.ts +0 -36
  187. package/dist/types/insight/sinks/file.d.ts +0 -37
  188. package/dist/types/insight/sinks/index.d.ts +0 -16
  189. package/dist/types/insight/sinks/stream.d.ts +0 -53
  190. package/dist/types/kit/clipboard-image.d.ts +0 -40
  191. package/dist/types/kit/external-editor.d.ts +0 -35
  192. package/dist/types/kit/image.d.ts +0 -102
  193. package/dist/types/kit/index.d.ts +0 -29
  194. package/dist/types/kit/kit.test.d.ts +0 -13
  195. package/dist/types/kit/shell.d.ts +0 -50
  196. package/dist/types/kit/tool-fetch.d.ts +0 -165
  197. package/dist/types/launch/catalog.d.ts +0 -51
  198. package/dist/types/launch/contract.d.ts +0 -387
  199. package/dist/types/launch/credentials.d.ts +0 -112
  200. package/dist/types/launch/index.d.ts +0 -28
  201. package/dist/types/launch/invocation/attachments.d.ts +0 -72
  202. package/dist/types/launch/invocation/flags.d.ts +0 -59
  203. package/dist/types/launch/invocation/index.d.ts +0 -23
  204. package/dist/types/launch/invocation/read.d.ts +0 -52
  205. package/dist/types/launch/invocation/usage.d.ts +0 -25
  206. package/dist/types/launch/launch.test.d.ts +0 -20
  207. package/dist/types/launch/login.d.ts +0 -68
  208. package/dist/types/launch/oauth.d.ts +0 -101
  209. package/dist/types/launch/oauth.test.d.ts +0 -20
  210. package/dist/types/launch/packages.d.ts +0 -75
  211. package/dist/types/launch/packages.test.d.ts +0 -15
  212. package/dist/types/launch/pickers.d.ts +0 -97
  213. package/dist/types/runtime-bridge/bridges/_drive.d.ts +0 -74
  214. package/dist/types/runtime-bridge/bridges/builtins.d.ts +0 -77
  215. package/dist/types/runtime-bridge/bridges/claude-cli.d.ts +0 -37
  216. package/dist/types/runtime-bridge/bridges/codex-cli.d.ts +0 -27
  217. package/dist/types/runtime-bridge/bridges/index.d.ts +0 -15
  218. package/dist/types/runtime-bridge/bridges/indusagi-cli.d.ts +0 -36
  219. package/dist/types/runtime-bridge/broker.d.ts +0 -182
  220. package/dist/types/runtime-bridge/contract.d.ts +0 -436
  221. package/dist/types/runtime-bridge/index.d.ts +0 -21
  222. package/dist/types/runtime-bridge/runtime-bridge.test.d.ts +0 -17
  223. package/dist/types/runtime-bridge/sink.d.ts +0 -59
  224. package/dist/types/sessions/contract.d.ts +0 -79
  225. package/dist/types/sessions/index.d.ts +0 -11
  226. package/dist/types/sessions/library.d.ts +0 -95
  227. package/dist/types/sessions/sessions.test.d.ts +0 -11
  228. package/dist/types/settings/contract.d.ts +0 -175
  229. package/dist/types/settings/index.d.ts +0 -13
  230. package/dist/types/settings/manager.d.ts +0 -109
  231. package/dist/types/settings/settings.test.d.ts +0 -16
  232. package/dist/types/transcript-export/index.d.ts +0 -20
  233. package/dist/types/transcript-export/publish.d.ts +0 -81
  234. package/dist/types/transcript-export/sgr.d.ts +0 -90
  235. package/dist/types/transcript-export/template.d.ts +0 -64
  236. package/dist/types/transcript-export/theme-bridge.d.ts +0 -99
  237. package/dist/types/transcript-export/transcript-export.test.d.ts +0 -16
  238. package/dist/types/window-budget/budget/estimate.d.ts +0 -47
  239. package/dist/types/window-budget/budget/gate.d.ts +0 -37
  240. package/dist/types/window-budget/budget/index.d.ts +0 -14
  241. package/dist/types/window-budget/budget/slice.d.ts +0 -38
  242. package/dist/types/window-budget/condenser.d.ts +0 -73
  243. package/dist/types/window-budget/contract.d.ts +0 -182
  244. package/dist/types/window-budget/index.d.ts +0 -17
  245. package/dist/types/window-budget/microcompact.d.ts +0 -68
  246. package/dist/types/window-budget/microcompact.test.d.ts +0 -16
  247. package/dist/types/window-budget/rehydrate.d.ts +0 -56
  248. package/dist/types/window-budget/summarize/condense.d.ts +0 -76
  249. package/dist/types/window-budget/summarize/index.d.ts +0 -12
  250. package/dist/types/window-budget/summarize/prompt.d.ts +0 -56
  251. package/dist/types/window-budget/window-budget.test.d.ts +0 -18
  252. package/dist/types/workflow-engine/agent-runner.d.ts +0 -124
  253. package/dist/types/workflow-engine/agent-runner.test.d.ts +0 -8
  254. package/dist/types/workflow-engine/display.d.ts +0 -148
  255. package/dist/types/workflow-engine/display.test.d.ts +0 -1
  256. package/dist/types/workflow-engine/engine.d.ts +0 -183
  257. package/dist/types/workflow-engine/engine.test.d.ts +0 -1
  258. package/dist/types/workflow-engine/index.d.ts +0 -21
  259. package/dist/types/workflow-engine/parse.d.ts +0 -64
  260. package/dist/types/workflow-engine/parse.test.d.ts +0 -1
  261. package/dist/types/workflow-engine/structured-output.d.ts +0 -51
  262. package/dist/types/workflow-engine/structured-output.test.d.ts +0 -1
  263. package/dist/types/workspace/brand.d.ts +0 -26
  264. package/dist/types/workspace/index.d.ts +0 -11
  265. package/dist/types/workspace/locator.d.ts +0 -50
  266. package/dist/types/workspace/runtime-detect.d.ts +0 -56
@@ -1,68 +0,0 @@
1
- /**
2
- * Window-budget / microcompact — clear stale tool-result bodies in place.
3
- *
4
- * The cheapest token to reclaim is one that is already dead weight: the verbatim
5
- * body of a tool result the model has long since acted on. Once an agent has
6
- * read a file, run a search, or executed a command and moved several turns past
7
- * it, the full body of that result rarely needs to stay in the window — the
8
- * model's subsequent reasoning already captured what mattered. Yet those bodies
9
- * (a 2,000-line `read`, a noisy `bash` log, a wide `grep`) dominate the token
10
- * budget.
11
- *
12
- * **Microcompaction** runs *before* a full {@link condense}: it walks the
13
- * transcript, keeps the last few tool results verbatim (the model may still be
14
- * working with them), and replaces the body of every older compactable tool
15
- * result with a short sentinel. This reclaims tokens for free — no model call,
16
- * no summary round-trip — and often defers (or shrinks the input to) the real
17
- * condense.
18
- *
19
- * Shape note (this rebuild): a tool result is its OWN top-level
20
- * {@link ToolResultMessage} (`role: 'toolResult'`), not a block nested inside a
21
- * user message. Clearing one therefore means replacing *that message's*
22
- * `content` array with a single sentinel text block — never editing a sub-block
23
- * of some other message. We only clear results whose owning assistant `toolCall`
24
- * named a compactable tool, so structural/control results stay intact.
25
- *
26
- * Behavior-preserving by construction: when there is nothing to clear (no
27
- * compactable results, or every one is within the keep window) the *same input
28
- * reference* is returned, so a caller can cheaply detect a no-op.
29
- */
30
- import type { AgentMessage } from "./contract.js";
31
- /**
32
- * The placeholder spliced in where a stale tool-result body used to be. Kept
33
- * short on purpose — the whole point is to reclaim the tokens the original body
34
- * occupied — while still signalling to the model (and to a human reading the
35
- * transcript) that real content was elided rather than lost.
36
- */
37
- export declare const CLEARED_TOOL_RESULT = "[Old tool result content cleared]";
38
- /**
39
- * The wire names of tools whose results are safe to clear once stale.
40
- *
41
- * These are the read-mostly / output-heavy tools whose bodies are reconstructable
42
- * (re-read the file, re-run the search) and whose stale content the model has
43
- * already digested. Control/state tools (todo, memory, task) are deliberately
44
- * absent — their results can carry standing instructions the model still needs.
45
- */
46
- export declare const COMPACTABLE_TOOL_NAMES: ReadonlySet<string>;
47
- /**
48
- * Clear the bodies of stale compactable tool results, keeping the most recent
49
- * `keepRecent` of them verbatim.
50
- *
51
- * Walks the transcript, identifies every `role:'toolResult'` message that
52
- * belongs to a compactable tool call, keeps the last `keepRecent` (floored at 1
53
- * — `slice(-0)` would keep everything), and replaces each older one's `content`
54
- * with a single `{ type:'text', text: CLEARED_TOOL_RESULT }` block. Non-tool
55
- * messages, control-tool results, and already-cleared results are left exactly
56
- * as they were.
57
- *
58
- * Returns the **same input array reference** when nothing was cleared, so the
59
- * caller can detect a no-op by identity. Otherwise returns a new array; cleared
60
- * messages are fresh objects (the originals are not mutated).
61
- *
62
- * @param messages the active transcript, oldest-first
63
- * @param opts.keepRecent how many most-recent compactable results to keep
64
- * verbatim (default {@link DEFAULT_KEEP_RECENT}, floored at 1)
65
- */
66
- export declare function clearStaleToolResults(messages: AgentMessage[], opts?: {
67
- keepRecent?: number;
68
- }): AgentMessage[];
@@ -1,16 +0,0 @@
1
- /**
2
- * Window-budget / microcompact + rehydrate — unit tests for item #18.
3
- *
4
- * Three layers ride the condense path:
5
- * 1. microcompact ({@link clearStaleToolResults}) — blank older completed
6
- * tool-result bodies to a sentinel, keeping the last N verbatim; no-op
7
- * (same reference) otherwise.
8
- * 2. rehydration ({@link rehydrateRecentReads}) — re-attach the most-recently
9
- * dropped file reads as synthetic user messages, deduped against the kept
10
- * tail, honoring maxFiles / tokenBudget.
11
- * 3. circuit breaker — covered in the conductor suite (3 throwing condense
12
- * calls stop further attempts, a success resets).
13
- *
14
- * Pure + network-free: no model is bound anywhere here.
15
- */
16
- export {};
@@ -1,56 +0,0 @@
1
- /**
2
- * Window-budget / rehydrate — re-attach recently-read files after a condense.
3
- *
4
- * A full {@link condense} folds the dropped head of the transcript into one
5
- * summary message. That digest captures *what happened*, but it necessarily
6
- * loses the verbatim bodies of files the agent had just read — and those bodies
7
- * are often exactly the working context the next turn needs (the file it was
8
- * mid-edit on, the config it was reasoning about). Re-reading them costs a tool
9
- * round-trip and, worse, the model may not realize it needs to.
10
- *
11
- * **Post-compact rehydration** softens that cliff: after the slice is dropped,
12
- * it scans the *dropped* messages for `read` results, takes the most-recent
13
- * handful that aren't already visible in the kept tail, and re-attaches their
14
- * bodies as synthetic user messages ("[Restored file after compaction] …") under
15
- * a token budget. The model keeps its working files without a re-read, while the
16
- * older surrounding chatter still gets compressed away.
17
- *
18
- * Shape note (this rebuild): a read's *body* lives in its own top-level
19
- * {@link ToolResultMessage} (`role:'toolResult'`), and the read's *path* lives in
20
- * the owning assistant `toolCall.arguments.path` (the read tool's arg is `path`,
21
- * not `file_path`). We pair each dropped `read` call with its result by
22
- * `toolCallId`, dedup against paths still visible in the kept tail, and emit the
23
- * most-recent survivors under a token cap.
24
- *
25
- * Behavior-preserving by construction: returns an empty array whenever there is
26
- * nothing to restore (no dropped reads, all already visible, or the budget is
27
- * exhausted), so the caller can splice the result unconditionally.
28
- */
29
- import type { AgentMessage } from "./contract.js";
30
- /** Prefix marking a synthetic message that restores a file body post-compaction. */
31
- export declare const RESTORED_FILE_PREFIX = "[Restored file after compaction]";
32
- /**
33
- * Build the synthetic user messages that re-attach the most-recently-read files
34
- * dropped by a condense.
35
- *
36
- * Scans `dropped` for `read` calls + result bodies, drops any path still visible
37
- * in `kept`, sorts the survivors most-recent-first, takes up to `maxFiles`, and
38
- * emits each as a `user` message of the form
39
- * `"[Restored file after compaction] <path>\n<body>"` — stopping once the running
40
- * token estimate would exceed `tokenBudget`. The returned messages are ordered
41
- * oldest-restored-first so they read naturally when spliced after the summary.
42
- *
43
- * Returns an **empty array** when nothing is restorable, so the caller can splice
44
- * the result unconditionally (`[summary, ...restored, ...kept]`).
45
- *
46
- * @param dropped the condensed-away head slice (original bodies, pre-summary)
47
- * @param kept the verbatim tail that survives the condense
48
- * @param opts.maxFiles cap on restored files (default {@link DEFAULT_MAX_FILES})
49
- * @param opts.tokenBudget token ceiling for the restored block (default {@link DEFAULT_TOKEN_BUDGET})
50
- * @param opts.readToolName wire name of the read tool (default `"read"`)
51
- */
52
- export declare function rehydrateRecentReads(dropped: AgentMessage[], kept: AgentMessage[], opts?: {
53
- maxFiles?: number;
54
- tokenBudget?: number;
55
- readToolName?: string;
56
- }): AgentMessage[];
@@ -1,76 +0,0 @@
1
- /**
2
- * Window-budget — model-driven summarization.
3
- *
4
- * {@link summarize} is the single condensing primitive: given the dropped prefix
5
- * of a transcript and a {@link SummarizeDeps} bundle, it flattens those messages,
6
- * asks the injectable model completer to write a structured digest, and returns a
7
- * synthetic {@link Summary} message that stands in for the slice it covers.
8
- *
9
- * Both condensing scopes flow through this one function:
10
- * - `"session"` — the active-session checkpoint (head condensed, tail kept by
11
- * the caller).
12
- * - `"branch"` — an abandoned branch archived into one message.
13
- * The only difference is the scope flag forwarded into {@link buildSummaryPrompt}
14
- * (which selects the framing line). {@link condenseScope} is the thin
15
- * branch-archival entrypoint that pins `scope: "branch"`.
16
- *
17
- * The completer is injectable ({@link SummarizeDeps.complete}, default the
18
- * framework's `completeSimple`) so tests run with no network — pass a stub that
19
- * returns a canned {@link AssistantMessage}. When no `model` is supplied there is
20
- * nothing to call, so {@link summarize} degrades to a deterministic local digest
21
- * rather than guessing a model — keeping it usable in a bare/offline build.
22
- */
23
- import type { AgentMessage, CompleteFn, CondenseScope, Model, Summary } from "../contract.js";
24
- import { flattenTranscript } from "./prompt.js";
25
- /**
26
- * What {@link summarize} needs. Every field is optional so the function is
27
- * network-free-testable: omit `model` for a local fallback digest, or inject a
28
- * `complete` stub for a scripted model response.
29
- */
30
- export interface SummarizeDeps {
31
- /** Injectable completer (default: framework `completeSimple`). */
32
- readonly complete?: CompleteFn;
33
- /** The summarization model. When omitted, a deterministic local digest is used. */
34
- readonly model?: Model<Model<string>["api"]>;
35
- /** Which kind of condense this is; defaults to `"session"`. */
36
- readonly scope?: CondenseScope;
37
- /** An earlier digest to refresh/extend (iterative-refresh / branch carry-in). */
38
- readonly priorDigest?: string;
39
- /** Cancellation signal forwarded to the completer. */
40
- readonly signal?: AbortSignal;
41
- /**
42
- * Credential for the summarization model's provider, forwarded to the
43
- * completer. Required in practice for sessions whose key is resolved
44
- * per-call (server tier) rather than from an environment variable.
45
- */
46
- readonly apiKey?: string;
47
- /**
48
- * Optional cap on the digest size, in tokens, forwarded to the completer's
49
- * `maxTokens`. A modest ceiling keeps the summary itself from eating the
50
- * window. When omitted the model's own default applies.
51
- */
52
- readonly maxTokens?: number;
53
- }
54
- /**
55
- * Summarize a slice of dropped messages into a single synthetic {@link Summary}.
56
- *
57
- * One code path for both scopes — `deps.scope` (default `"session"`) only changes
58
- * the prompt framing. With a `model` bound it calls `deps.complete`
59
- * (default `completeSimple`) once with {@link CONDENSER_BRIEF} as the system
60
- * prompt and {@link buildSummaryPrompt} as the user turn; otherwise it returns a
61
- * deterministic local digest. Never throws on an empty model reply — it falls
62
- * back to the local digest so a {@link Summary} is always produced.
63
- *
64
- * @returns a {@link Summary} whose `message` replaces the `coveredCount` source
65
- * messages it summarizes.
66
- */
67
- export declare function summarize(messages: AgentMessage[], deps?: SummarizeDeps): Promise<Summary>;
68
- /**
69
- * Branch-archival entrypoint: condense an abandoned branch into one summary
70
- * message. A thin wrapper that pins `scope: "branch"` and delegates to
71
- * {@link summarize} — the branch case is the same machinery, not a separate
72
- * engine.
73
- */
74
- export declare function condenseScope(messages: AgentMessage[], deps?: Omit<SummarizeDeps, "scope">): Promise<Summary>;
75
- /** Re-export the flattener so callers can preview what the model will receive. */
76
- export { flattenTranscript };
@@ -1,12 +0,0 @@
1
- /**
2
- * Window-budget — summarization subsystem barrel.
3
- *
4
- * Model-driven condensing of the dropped transcript prefix into one synthetic
5
- * summary message, with re-authored prompts (new section names + a new tag
6
- * vocabulary). Branch-archival folds in behind the scope flag — `condenseScope`
7
- * is the branch entrypoint over the same `summarize` core.
8
- */
9
- export { buildSummaryPrompt, CONDENSER_BRIEF, flattenTranscript, } from "./prompt.js";
10
- export { condenseScope, summarize } from "./condense.js";
11
- export type { SummarizeDeps } from "./condense.js";
12
- export type { AgentMessage, CompleteFn, CondenseScope, Model, Summary, } from "../contract.js";
@@ -1,56 +0,0 @@
1
- /**
2
- * Window-budget — summarization prompt assembly (re-authored).
3
- *
4
- * When the transcript crosses budget, the older head is *condensed* into one
5
- * synthetic message. This module turns the dropped slice of {@link AgentMessage}s
6
- * into the single text payload handed to the model completer. Two pieces ship
7
- * here:
8
- *
9
- * 1. {@link CONDENSER_BRIEF} — the system-prompt brief that frames the model as
10
- * a *recorder*, not a continuation of the chat: read the transcript as data
11
- * and emit only the structured digest.
12
- * 2. {@link buildSummaryPrompt} — flattens the dropped messages into a tagged
13
- * block and appends the section template the model fills in.
14
- *
15
- * OWN VOCABULARY (an original prompt design):
16
- * - Section headings are `# Objective / # Guardrails /
17
- * # Status (Shipped / Active / Stuck) / # Rationale / # Plan / # Carryover`.
18
- * - The transcript is wrapped in `<scrollback>…</scrollback>` and a prior digest
19
- * (the branch-archival / iterative-refresh path) in
20
- * `<carried-digest>…</carried-digest>`.
21
- * - Per-message lines use `» role:` markers (`» you`, `» agent`,
22
- * `» agent.plan`, `» agent.call`, `» tool`).
23
- *
24
- * No token math, no model calls, no I/O here — only string assembly. The scope
25
- * flag selects the framing line (active-session checkpoint vs abandoned-branch
26
- * archive); everything else is one code path.
27
- */
28
- import type { AgentMessage, CondenseScope } from "../contract.js";
29
- /**
30
- * The system-prompt brief for the condenser model. Frames the request as a
31
- * record-keeping task — the model must NOT answer, continue, or act on the
32
- * conversation; it only transcribes it into the fixed section layout. Re-authored
33
- * wording; shares no sentences with the legacy `SUMMARIZATION_SYSTEM_PROMPT`.
34
- */
35
- export declare const CONDENSER_BRIEF: string;
36
- /**
37
- * Flatten a list of messages into a single `\n`-joined block of `» role:` lines.
38
- * Exported so the condenser can reuse it for diagnostics/tests.
39
- */
40
- export declare function flattenTranscript(messages: AgentMessage[]): string;
41
- /**
42
- * Build the full summarization prompt for a slice of dropped messages.
43
- *
44
- * The result is one string: the scope framing, the flattened transcript wrapped
45
- * in `<scrollback>`, an optional carried digest wrapped in `<carried-digest>`
46
- * (the iterative-refresh / branch-archival input), and the section template the
47
- * model fills in. Pass this as the user turn to the injectable completer; pair it
48
- * with {@link CONDENSER_BRIEF} as the system prompt.
49
- *
50
- * @param messages the dropped prefix to summarize
51
- * @param scope `"session"` (active checkpoint) or `"branch"` (archive)
52
- * @param priorDigest an optional earlier digest to refresh/extend, threaded in
53
- * under `<carried-digest>` so the model merges rather than
54
- * re-derives. Omit for a first-pass condense.
55
- */
56
- export declare function buildSummaryPrompt(messages: AgentMessage[], scope: CondenseScope, priorDigest?: string): string;
@@ -1,18 +0,0 @@
1
- /**
2
- * Window-budget — Phase 3 / subsystem 05 unit tests.
3
- *
4
- * Pure, network-free coverage of the context-window budgeting subsystem:
5
- * 1. estimateTokens grows with content.
6
- * 2. isOverBudget is false under the threshold, true over it.
7
- * 3. planSlice keeps the recent tail and never splits a toolCall/toolResult
8
- * pair — even when the ideal cut lands mid tool-group it snaps to a safe
9
- * boundary.
10
- * 4. createCondenser (with a scripted, no-network completer) condenses an
11
- * over-budget transcript to a smaller [summary, ...recent] list, and leaves
12
- * an under-budget transcript unchanged.
13
- * 5. condenseScope("branch") produces a branch-flavored digest.
14
- *
15
- * No network: the only model call path is exercised through an injected
16
- * {@link CompleteFn} stub that returns a canned {@link AssistantMessage}.
17
- */
18
- export {};
@@ -1,124 +0,0 @@
1
- /**
2
- * createWorkflowAgentRunner — the live {@link WorkflowAgentRunner} that makes the
3
- * `workflow` tool's `agent()` global spawn real subagents.
4
- *
5
- * The pure {@link "./engine"} engine delegates every `agent(prompt, opts)` call
6
- * to an injected {@link WorkflowAgentRunner}; this module supplies the production
7
- * implementation. Each subagent run spins a *fresh, isolated* framework
8
- * {@link Agent} — the same `facade/bot` Agent the conductor and the `task`
9
- * delegate-runner drive — bound to the parent's model id and credential
10
- * resolver, given the `'authoring'` capability deck.
11
- *
12
- * Two properties matter:
13
- *
14
- * 1. **Recursion guard.** The deck is built via `provisionDeck("authoring", …)`,
15
- * whose profile EXCLUDES the app-novel cards — including the new `workflow`
16
- * card (registered all-profile-only in {@link "../capability-deck"}). A
17
- * workflow subagent therefore cannot itself call `workflow` (nor `task`).
18
- *
19
- * 2. **Structured output.** When the script passes `opts.schema`, the runner
20
- * adds the {@link createStructuredOutputTool} `structured_output` tool to the
21
- * deck and appends the pi "final action MUST be structured_output" contract
22
- * to the prompt. Because the framework `AgentToolResult` has no `terminate`
23
- * flag, the tool does NOT end the loop early — the runner instead runs the
24
- * subagent to completion, then returns `capture.value` (throwing if the
25
- * subagent never called it). With no schema it returns the final assistant
26
- * text (the {@link finalAssistantText} pattern, identical to delegate-runner).
27
- *
28
- * Cancellation is forwarded: an already-aborted signal short-circuits and an
29
- * abort raised mid-run calls `agent.abort()`.
30
- *
31
- * The model catalog/matcher is built ONCE at create time (the conductor pattern);
32
- * each `run()` resolves the per-call `opts.model` (falling back to the runner's
33
- * default `modelId`) against that single matcher. The `spawn` option is a pure
34
- * test seam — a unit test drives the runner with an in-memory fake instead of a
35
- * real network round-trip.
36
- */
37
- import { type AgentMessage, type SessionPermissionPolicy } from "../conductor";
38
- import { type AgentTool } from "../capability-deck";
39
- import { type AgentEvent } from "indusagi/agent";
40
- import type { WorkflowAgentRunner } from "./engine";
41
- /**
42
- * The minimal subagent surface the runner drives.
43
- *
44
- * A real framework {@link Agent} satisfies this structurally; a test passes a
45
- * lightweight fake via {@link WorkflowAgentRunnerOptions.spawn}. Only the pieces
46
- * the runner touches are named.
47
- */
48
- export interface WorkflowSubAgent {
49
- prompt(input: string): Promise<void>;
50
- abort(): void;
51
- /**
52
- * Subscribe to the framework `Agent` event stream; returns an unsubscribe
53
- * thunk. Optional on the structural fake — when absent the runner simply skips
54
- * live activity reporting (the run still completes and returns its result).
55
- */
56
- subscribe?(fn: (event: AgentEvent) => void): () => void;
57
- readonly state: {
58
- messages: readonly AgentMessage[];
59
- error?: string;
60
- usage?: unknown;
61
- };
62
- }
63
- /** The deck of tools handed to a spawned subagent. */
64
- export interface WorkflowSpawnContext {
65
- /** The base tools for this run (the `'authoring'` deck, recursion-guarded). */
66
- readonly tools: AgentTool[];
67
- /** The resolved system prompt for this subagent. */
68
- readonly systemPrompt: string;
69
- }
70
- /** Configuration for {@link createWorkflowAgentRunner}. */
71
- export interface WorkflowAgentRunnerOptions {
72
- /** The default model id a subagent runs under when the script names none. */
73
- readonly modelId: string;
74
- /** The working directory the subagent's deck is scoped to. */
75
- readonly cwd: string;
76
- /**
77
- * Per-call credential resolver, forwarded to the framework `Agent` unchanged.
78
- * Omitted from the agent options entirely when undefined so the framework
79
- * env-var lookup still wins.
80
- */
81
- readonly getApiKey?: (provider: string) => Promise<string | undefined> | string | undefined;
82
- /**
83
- * The base system prompt prepended to every subagent. A sensible default is
84
- * used when omitted.
85
- */
86
- readonly system?: string;
87
- /**
88
- * Test seam: build the subagent instead of constructing a real framework
89
- * `Agent`. When omitted the runner uses `new Agent`.
90
- */
91
- readonly spawn?: (prompt: string, context: WorkflowSpawnContext) => WorkflowSubAgent;
92
- /**
93
- * Resolve the current server-tier gateway routing map (provider -> gateway
94
- * base url). Called FRESH on every `run()` — never cached — so a mid-session
95
- * `/login` (to "Indus Server") is always picked up on the very next subagent
96
- * call. Mirrors {@link getApiKey}, which is likewise invoked per-request
97
- * rather than resolved once at construction.
98
- */
99
- readonly getGatewayBaseUrls?: () => Promise<Record<string, string>>;
100
- /**
101
- * The parent session's live permission policy: the SAME mutable rule list the
102
- * parent gate reads plus a live getter onto the conductor's current mode. When
103
- * present, every spawned workflow subagent runs under a RESOLVER-LESS gate
104
- * built from it — deny/ask rules, plan-mode enforcement, and the
105
- * catastrophic-bash blocklist apply per inner tool call, and a mid-run mode
106
- * switch (Shift+Tab) retargets the very next subagent tool call. A subagent
107
- * cannot prompt, so an `ask` decision deterministically denies. Absent (a bare
108
- * test construction), the subagent runs ungated as before.
109
- */
110
- readonly permissionPolicy?: SessionPermissionPolicy;
111
- }
112
- /**
113
- * Build a live {@link WorkflowAgentRunner} the host wires into the deck context.
114
- *
115
- * The model catalog/matcher is built once up front (the conductor pattern); each
116
- * `run()` resolves `opts.model ?? modelId` against it. A schema request wires the
117
- * `structured_output` capture tool and the structured contract; a model that does
118
- * not resolve throws out of `run()` so the engine maps it to an `agent ... failed`
119
- * log + a `null` branch (the engine's per-branch failure-to-null semantics).
120
- *
121
- * @param opts the model id, cwd, credential/system, and optional test seam
122
- * @returns a runner satisfying the engine's {@link WorkflowAgentRunner} contract
123
- */
124
- export declare function createWorkflowAgentRunner(opts: WorkflowAgentRunnerOptions): WorkflowAgentRunner;
@@ -1,8 +0,0 @@
1
- /**
2
- * createWorkflowAgentRunner — focused unit tests driven through the `spawn` seam.
3
- *
4
- * No model is resolved and no network is touched: each test passes an in-memory
5
- * fake subagent via `opts.spawn`, so the test exercises the runner's prompt
6
- * assembly, structured-output capture, final-text extraction, and abort wiring.
7
- */
8
- export {};
@@ -1,148 +0,0 @@
1
- /**
2
- * Workflow progress snapshot model + text renderer.
3
- *
4
- * The engine emits lifecycle callbacks (phase started, agent started/ended,
5
- * log) which a host folds into a {@link WorkflowSnapshot}. This module owns the
6
- * snapshot's pure data shape, the two pure recompute helpers, and the
7
- * `renderWorkflowText` / `renderWorkflowLines` renderers that turn a snapshot
8
- * into the `◆ Workflow:` progress tree shown live in the tool result.
9
- *
10
- * The renderer is a verbatim behavioral port of pi-dynamic-workflows'
11
- * `src/display.ts` — same `◆ Workflow: name (x/y done)` header, same per-phase
12
- * `▶/✓` markers with `done/total · running · errors · skipped` counts, same
13
- * ` #id <glyph> label` subagent rows, same status glyphs
14
- * (`○ queued`, `● running`, `✓ done`, `✗ error`, `- skipped`), same "Unphased"
15
- * group, same trailing `log:` lines.
16
- *
17
- * Unlike pi, this file carries NO framework-UI bindings (no `ExtensionContext`,
18
- * no widget display). The card/console wiring that consumes these renderers
19
- * lands in stage 2; here we expose only the pure snapshot + string surface.
20
- */
21
- import type { WorkflowMeta } from "./parse";
22
- /** Lifecycle status of a single workflow subagent row. */
23
- export type WorkflowAgentStatus = "queued" | "running" | "done" | "error" | "skipped";
24
- /** One subagent's row in the live progress tree. */
25
- export interface WorkflowAgentSnapshot {
26
- /** 1-based id, the order the agent started in. */
27
- id: number;
28
- /** Short human label for the agent (defaulted from phase + index if absent). */
29
- label: string;
30
- /** The phase the agent belongs to, if any. */
31
- phase?: string;
32
- /** The task prompt the agent was given. */
33
- prompt: string;
34
- /** Current lifecycle status. */
35
- status: WorkflowAgentStatus;
36
- /** Optional short preview of the agent's result. */
37
- resultPreview?: string;
38
- /** Optional error summary when the agent failed or was skipped. */
39
- error?: string;
40
- /** Wall-clock ms when the subagent started (for the live elapsed counter). */
41
- startedAt?: number;
42
- /** Wall-clock ms when the subagent settled (caps the elapsed counter). */
43
- endedAt?: number;
44
- /** Cumulative input tokens the subagent has spent. */
45
- tokensIn?: number;
46
- /** Cumulative output tokens the subagent has spent. */
47
- tokensOut?: number;
48
- /** How many tool calls the subagent has started. */
49
- toolCount?: number;
50
- /** The tool the subagent is running right now, if any. */
51
- currentTool?: string;
52
- /** The last tool the subagent finished (when nothing is running). */
53
- lastTool?: string;
54
- }
55
- /** The full live progress model for one workflow run. */
56
- export interface WorkflowSnapshot {
57
- /** Workflow name (from `meta.name`). */
58
- name: string;
59
- /** Workflow description (from `meta.description`). */
60
- description?: string;
61
- /** Declared/observed phase titles, in order. */
62
- phases: string[];
63
- /** The phase currently active (last `phase()` call). */
64
- currentPhase?: string;
65
- /** Log lines emitted via `log()`. */
66
- logs: string[];
67
- /** Every subagent row, in start order. */
68
- agents: WorkflowAgentSnapshot[];
69
- /** Total agents seen. */
70
- agentCount: number;
71
- /** Agents currently running. */
72
- runningCount: number;
73
- /** Agents finished successfully. */
74
- doneCount: number;
75
- /** Agents that errored. */
76
- errorCount: number;
77
- /** Total run duration once complete. */
78
- durationMs?: number;
79
- /** The workflow's final returned value once complete. */
80
- result?: unknown;
81
- }
82
- /** Tunables for the text renderer (how much of the tree to show). */
83
- export interface WorkflowDisplayOptions {
84
- /** Max subagent rows shown per phase (most recent kept). Default 8. */
85
- maxAgents?: number;
86
- /** Max trailing log lines shown. Default 2. */
87
- maxLogs?: number;
88
- /** Append a short result preview to each agent row. Default false. */
89
- showResultPreviews?: boolean;
90
- /**
91
- * Soft cap on total tree lines for the LIVE render. Default 9 — headroom under
92
- * the framework `TaskPanel` 10-line clamp so a running agent is never cut off
93
- * by a trailing `…`. Completed phases collapse to one line each, and if the
94
- * tree is still over budget the OLDEST completed phases collapse into a single
95
- * `… N earlier phases done` line (running/current phases are never collapsed).
96
- * Pass a large value (e.g. the settled/final render, or Ctrl+O expand) to show
97
- * everything in full.
98
- */
99
- maxLines?: number;
100
- }
101
- /**
102
- * Build an empty snapshot for a freshly parsed workflow `meta`.
103
- *
104
- * @param meta the workflow header
105
- */
106
- export declare function createWorkflowSnapshot(meta: WorkflowMeta): WorkflowSnapshot;
107
- /**
108
- * Recompute the derived counts (`agentCount`/`runningCount`/`doneCount`/
109
- * `errorCount`) from the `agents` array. Pure — returns a new snapshot.
110
- *
111
- * @param snapshot the snapshot whose counts to refresh
112
- */
113
- export declare function recomputeWorkflowSnapshot(snapshot: WorkflowSnapshot): WorkflowSnapshot;
114
- /**
115
- * Render the snapshot as the `◆ Workflow:` progress tree (array of lines).
116
- *
117
- * The per-agent metrics segment (elapsed seconds, token spend, tool activity) is
118
- * computed at render time from `now` so the seconds tick on every render even
119
- * during a long silent tool call. Keep `now` an explicit param so the renderer
120
- * stays pure and testable.
121
- *
122
- * @param snapshot the progress model
123
- * @param options render tunables
124
- * @param now the current wall-clock ms used to compute live elapsed seconds
125
- */
126
- export declare function renderWorkflowLines(snapshot: WorkflowSnapshot, options?: WorkflowDisplayOptions, now?: number): string[];
127
- /**
128
- * Render the snapshot as a single string for the tool result.
129
- *
130
- * For the LIVE (not-completed) render the `◆ Workflow:` header already says the
131
- * run is in progress, so no extra header line is added — this saves a line under
132
- * the framework `TaskPanel` 10-line clamp. The final (completed) render keeps the
133
- * explicit `Workflow completed` header.
134
- *
135
- * @param snapshot the progress model
136
- * @param completed whether the run has finished
137
- * @param options render tunables
138
- * @param now the current wall-clock ms used to compute live elapsed seconds
139
- */
140
- export declare function renderWorkflowText(snapshot: WorkflowSnapshot, completed?: boolean, options?: WorkflowDisplayOptions, now?: number): string;
141
- /**
142
- * One-line preview of an arbitrary result value (string passthrough, else
143
- * JSON), truncated to `max` chars. Used to fill `resultPreview`.
144
- *
145
- * @param value the result to preview
146
- * @param max max preview length
147
- */
148
- export declare function preview(value: unknown, max?: number): string;
@@ -1 +0,0 @@
1
- export {};