@yanlinglabs/winter-agent-runtime 0.0.27

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 (311) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +41 -0
  3. package/README.md +64 -0
  4. package/dist/checkpoint/file-history.d.ts +81 -0
  5. package/dist/checkpoint/rewind.d.ts +55 -0
  6. package/dist/checkpoint/seam.d.ts +47 -0
  7. package/dist/checkpoint/sink.d.ts +66 -0
  8. package/dist/commands/builtins-listing.d.ts +40 -0
  9. package/dist/commands/resolver.d.ts +103 -0
  10. package/dist/commands/seam.d.ts +53 -0
  11. package/dist/compaction/controller.d.ts +23 -0
  12. package/dist/compaction/retention.d.ts +35 -0
  13. package/dist/compaction/seam.d.ts +115 -0
  14. package/dist/compaction/summarizer.d.ts +79 -0
  15. package/dist/context/agent-listing.d.ts +39 -0
  16. package/dist/context/assembler.d.ts +46 -0
  17. package/dist/context/attachments.d.ts +104 -0
  18. package/dist/context/dynamic-sections.d.ts +31 -0
  19. package/dist/context/git-fixture.d.ts +18 -0
  20. package/dist/context/git-status.d.ts +16 -0
  21. package/dist/context/imports.d.ts +22 -0
  22. package/dist/context/injection.d.ts +53 -0
  23. package/dist/context/memory-key.d.ts +46 -0
  24. package/dist/context/memory.d.ts +28 -0
  25. package/dist/context/minimal-prompt.d.ts +5 -0
  26. package/dist/context/output-styles.d.ts +68 -0
  27. package/dist/context/plan-mode.d.ts +29 -0
  28. package/dist/context/request-layout.d.ts +138 -0
  29. package/dist/context/rules.d.ts +63 -0
  30. package/dist/context/seam.d.ts +136 -0
  31. package/dist/context/tool-epoch.d.ts +118 -0
  32. package/dist/context/winter-code-preset.d.ts +39 -0
  33. package/dist/context/winter-md.d.ts +81 -0
  34. package/dist/embedded-host.d.ts +48 -0
  35. package/dist/embedded-host.js +155 -0
  36. package/dist/embedded-protocol.d.ts +44 -0
  37. package/dist/embedded-worker.d.ts +1 -0
  38. package/dist/embedded-worker.js +74 -0
  39. package/dist/embedded.d.ts +34 -0
  40. package/dist/embedded.js +9 -0
  41. package/dist/engine.d.ts +1298 -0
  42. package/dist/hooks/additional-context.d.ts +21 -0
  43. package/dist/hooks/bounds.d.ts +6 -0
  44. package/dist/hooks/bridge-invoker.d.ts +3 -0
  45. package/dist/hooks/command-invoker.d.ts +52 -0
  46. package/dist/hooks/from-config.d.ts +31 -0
  47. package/dist/hooks/hook-stage.d.ts +25 -0
  48. package/dist/hooks/input-validator.d.ts +6 -0
  49. package/dist/hooks/reducer.d.ts +74 -0
  50. package/dist/hooks/registry.d.ts +33 -0
  51. package/dist/hooks/runner.d.ts +105 -0
  52. package/dist/index-584yahed.js +6037 -0
  53. package/dist/index-97t2rmtf.js +42 -0
  54. package/dist/index-9qgkpv56.js +27183 -0
  55. package/dist/index-bef62z3r.js +437 -0
  56. package/dist/index-rkhh0457.js +187 -0
  57. package/dist/index.d.ts +37 -0
  58. package/dist/index.js +353 -0
  59. package/dist/main.d.ts +1 -0
  60. package/dist/mcp/client.d.ts +105 -0
  61. package/dist/mcp/control-seam.d.ts +25 -0
  62. package/dist/mcp/control.d.ts +5 -0
  63. package/dist/mcp/elicitation.d.ts +35 -0
  64. package/dist/mcp/env.d.ts +12 -0
  65. package/dist/mcp/lifecycle.d.ts +142 -0
  66. package/dist/mcp/output-cap.d.ts +15 -0
  67. package/dist/mcp/state.d.ts +24 -0
  68. package/dist/mcp/test-fixtures.d.ts +88 -0
  69. package/dist/mcp/transports/__fixtures__/stdio-server.d.ts +1 -0
  70. package/dist/mcp/transports/http.d.ts +5 -0
  71. package/dist/mcp/transports/sdk.d.ts +5 -0
  72. package/dist/mcp/transports/sse.d.ts +3 -0
  73. package/dist/mcp/transports/stdio.d.ts +35 -0
  74. package/dist/mcp/winter-server.d.ts +2 -0
  75. package/dist/messaging/reference-adapter.d.ts +88 -0
  76. package/dist/messaging/router.d.ts +8 -0
  77. package/dist/paths/project-dir-name.d.ts +2 -0
  78. package/dist/paths/temp.d.ts +25 -0
  79. package/dist/permissions/approvals.d.ts +107 -0
  80. package/dist/permissions/auto/caches.d.ts +53 -0
  81. package/dist/permissions/auto/config.d.ts +37 -0
  82. package/dist/permissions/auto/engine.d.ts +74 -0
  83. package/dist/permissions/auto/envelope.d.ts +45 -0
  84. package/dist/permissions/auto/inheritance.d.ts +27 -0
  85. package/dist/permissions/edit-recognition.d.ts +30 -0
  86. package/dist/permissions/evaluator.d.ts +284 -0
  87. package/dist/permissions/file-rules.d.ts +384 -0
  88. package/dist/permissions/grammar.d.ts +113 -0
  89. package/dist/permissions/paths.d.ts +32 -0
  90. package/dist/permissions/policy-state.d.ts +64 -0
  91. package/dist/permissions/prompt-stage.d.ts +3 -0
  92. package/dist/permissions/protected.d.ts +54 -0
  93. package/dist/permissions/ruleset.d.ts +134 -0
  94. package/dist/permissions/shell-structure.d.ts +41 -0
  95. package/dist/plugins/bundle.d.ts +100 -0
  96. package/dist/plugins/installed.d.ts +30 -0
  97. package/dist/plugins/loader.d.ts +56 -0
  98. package/dist/plugins/manifest.d.ts +115 -0
  99. package/dist/production-wiring.d.ts +340 -0
  100. package/dist/protocol/channel.d.ts +22 -0
  101. package/dist/provider/advisor-route.d.ts +47 -0
  102. package/dist/provider/bridge.d.ts +124 -0
  103. package/dist/provider/classifier/model-classifier.d.ts +82 -0
  104. package/dist/provider/classifier/prompt.d.ts +62 -0
  105. package/dist/provider/classifier/verdict-schema.d.ts +83 -0
  106. package/dist/provider/credential-api.d.ts +160 -0
  107. package/dist/provider/family-listing.d.ts +27 -0
  108. package/dist/provider/first-party.d.ts +4 -0
  109. package/dist/provider/keychain-store.d.ts +59 -0
  110. package/dist/provider/lean-prompt.d.ts +7 -0
  111. package/dist/provider/mock.d.ts +55 -0
  112. package/dist/provider/scenario-fake.d.ts +96 -0
  113. package/dist/provider/selection.d.ts +115 -0
  114. package/dist/provider/session-provider.d.ts +426 -0
  115. package/dist/provider/slots.d.ts +120 -0
  116. package/dist/provider/stream-frames.d.ts +25 -0
  117. package/dist/provider/tool-secret.d.ts +57 -0
  118. package/dist/rpc/bridge.d.ts +14 -0
  119. package/dist/rpc/mcp-control.d.ts +26 -0
  120. package/dist/runtime.d.ts +14 -0
  121. package/dist/sandbox/profile.d.ts +249 -0
  122. package/dist/sandbox/spawn.d.ts +139 -0
  123. package/dist/settings/env-filter.d.ts +52 -0
  124. package/dist/settings/loaders/hooks.d.ts +44 -0
  125. package/dist/settings/loaders/mcp-config.d.ts +83 -0
  126. package/dist/settings/loaders/plugin-mcp.d.ts +3 -0
  127. package/dist/settings/loaders/strict-plugin-only.d.ts +13 -0
  128. package/dist/settings/resolve.d.ts +2 -0
  129. package/dist/settings/sources.d.ts +2 -0
  130. package/dist/settings/trust.d.ts +36 -0
  131. package/dist/skills/attachment.d.ts +25 -0
  132. package/dist/skills/frontmatter.d.ts +64 -0
  133. package/dist/skills/index.d.ts +16 -0
  134. package/dist/skills/listing.d.ts +89 -0
  135. package/dist/skills/loader.d.ts +104 -0
  136. package/dist/skills/option.d.ts +68 -0
  137. package/dist/skills/permission-rules.d.ts +21 -0
  138. package/dist/skills/runtime.d.ts +21 -0
  139. package/dist/skills/store.d.ts +163 -0
  140. package/dist/store/continuation-attach.d.ts +44 -0
  141. package/dist/store/dialect.d.ts +526 -0
  142. package/dist/store/provider-state.d.ts +188 -0
  143. package/dist/store/resume.d.ts +92 -0
  144. package/dist/structured/ajv-seam.d.ts +7 -0
  145. package/dist/structured/descriptor.d.ts +9 -0
  146. package/dist/structured/seam.d.ts +51 -0
  147. package/dist/structured/validator.d.ts +22 -0
  148. package/dist/subagents/activity.d.ts +13 -0
  149. package/dist/subagents/availability.d.ts +30 -0
  150. package/dist/subagents/builtin-agents.d.ts +37 -0
  151. package/dist/subagents/child-engine.d.ts +198 -0
  152. package/dist/subagents/child-handle.d.ts +344 -0
  153. package/dist/subagents/definitions.d.ts +189 -0
  154. package/dist/subagents/fork.d.ts +55 -0
  155. package/dist/subagents/git-root.d.ts +1 -0
  156. package/dist/subagents/limits.d.ts +28 -0
  157. package/dist/subagents/notification-queue.d.ts +233 -0
  158. package/dist/subagents/plugin-agents.d.ts +5 -0
  159. package/dist/subagents/policy.d.ts +46 -0
  160. package/dist/subagents/register-default-factory.d.ts +66 -0
  161. package/dist/subagents/resolution.d.ts +56 -0
  162. package/dist/subagents/restore.d.ts +9 -0
  163. package/dist/subagents/roster.d.ts +17 -0
  164. package/dist/subagents/test-fakes.d.ts +12 -0
  165. package/dist/subagents/tool-pools.d.ts +69 -0
  166. package/dist/subagents/watchdog.d.ts +13 -0
  167. package/dist/subagents/workspace.d.ts +27 -0
  168. package/dist/testing.d.ts +5 -0
  169. package/dist/testing.js +194 -0
  170. package/dist/tools/background-tasks.d.ts +10 -0
  171. package/dist/tools/descriptors/_shared.d.ts +34 -0
  172. package/dist/tools/descriptors/advisor.d.ts +1 -0
  173. package/dist/tools/descriptors/agent.d.ts +47 -0
  174. package/dist/tools/descriptors/artifact.d.ts +1 -0
  175. package/dist/tools/descriptors/ask-user-question.d.ts +1 -0
  176. package/dist/tools/descriptors/bash.d.ts +20 -0
  177. package/dist/tools/descriptors/claude-design.d.ts +1 -0
  178. package/dist/tools/descriptors/cron-create.d.ts +1 -0
  179. package/dist/tools/descriptors/cron-delete.d.ts +1 -0
  180. package/dist/tools/descriptors/cron-list.d.ts +1 -0
  181. package/dist/tools/descriptors/edit.d.ts +1 -0
  182. package/dist/tools/descriptors/end-conversation.d.ts +1 -0
  183. package/dist/tools/descriptors/enter-plan-mode.d.ts +1 -0
  184. package/dist/tools/descriptors/enter-worktree.d.ts +1 -0
  185. package/dist/tools/descriptors/exit-plan-mode.d.ts +1 -0
  186. package/dist/tools/descriptors/exit-worktree.d.ts +1 -0
  187. package/dist/tools/descriptors/glob.d.ts +1 -0
  188. package/dist/tools/descriptors/grep.d.ts +1 -0
  189. package/dist/tools/descriptors/index.d.ts +59 -0
  190. package/dist/tools/descriptors/list-agents.d.ts +1 -0
  191. package/dist/tools/descriptors/list-mcp-resources-tool.d.ts +1 -0
  192. package/dist/tools/descriptors/lsp.d.ts +1 -0
  193. package/dist/tools/descriptors/monitor.d.ts +1 -0
  194. package/dist/tools/descriptors/notebook-edit.d.ts +1 -0
  195. package/dist/tools/descriptors/powershell.d.ts +1 -0
  196. package/dist/tools/descriptors/projects.d.ts +1 -0
  197. package/dist/tools/descriptors/propose-goal.d.ts +1 -0
  198. package/dist/tools/descriptors/propose-skills.d.ts +1 -0
  199. package/dist/tools/descriptors/push-notification.d.ts +1 -0
  200. package/dist/tools/descriptors/read-mcp-resource-dir-tool.d.ts +1 -0
  201. package/dist/tools/descriptors/read-mcp-resource-tool.d.ts +1 -0
  202. package/dist/tools/descriptors/read-notifications.d.ts +1 -0
  203. package/dist/tools/descriptors/read.d.ts +1 -0
  204. package/dist/tools/descriptors/refresh-mcp-tools.d.ts +1 -0
  205. package/dist/tools/descriptors/remote-trigger.d.ts +1 -0
  206. package/dist/tools/descriptors/repl.d.ts +1 -0
  207. package/dist/tools/descriptors/report-findings.d.ts +1 -0
  208. package/dist/tools/descriptors/schedule-wakeup.d.ts +1 -0
  209. package/dist/tools/descriptors/send-feedback.d.ts +1 -0
  210. package/dist/tools/descriptors/send-message.d.ts +1 -0
  211. package/dist/tools/descriptors/send-user-file.d.ts +1 -0
  212. package/dist/tools/descriptors/share-onboarding-guide.d.ts +1 -0
  213. package/dist/tools/descriptors/show-onboarding-role-picker.d.ts +1 -0
  214. package/dist/tools/descriptors/skill.d.ts +1 -0
  215. package/dist/tools/descriptors/structured-output.d.ts +1 -0
  216. package/dist/tools/descriptors/task-create.d.ts +1 -0
  217. package/dist/tools/descriptors/task-get.d.ts +1 -0
  218. package/dist/tools/descriptors/task-list.d.ts +1 -0
  219. package/dist/tools/descriptors/task-output.d.ts +1 -0
  220. package/dist/tools/descriptors/task-stop.d.ts +1 -0
  221. package/dist/tools/descriptors/task-update.d.ts +1 -0
  222. package/dist/tools/descriptors/todo-write.d.ts +1 -0
  223. package/dist/tools/descriptors/tool-search.d.ts +1 -0
  224. package/dist/tools/descriptors/wait-for-mcp-servers.d.ts +1 -0
  225. package/dist/tools/descriptors/web-fetch.d.ts +8 -0
  226. package/dist/tools/descriptors/web-search.d.ts +15 -0
  227. package/dist/tools/descriptors/winter-list-agents.d.ts +1 -0
  228. package/dist/tools/descriptors/winter-send-message.d.ts +1 -0
  229. package/dist/tools/descriptors/workflow.d.ts +1 -0
  230. package/dist/tools/descriptors/write.d.ts +1 -0
  231. package/dist/tools/impl/_caller.d.ts +14 -0
  232. package/dist/tools/impl/_domains.d.ts +25 -0
  233. package/dist/tools/impl/_exa-client.d.ts +122 -0
  234. package/dist/tools/impl/_exa-session-client.d.ts +23 -0
  235. package/dist/tools/impl/_inner-model.d.ts +135 -0
  236. package/dist/tools/impl/_search-budget.d.ts +36 -0
  237. package/dist/tools/impl/_web-fetch-cache.d.ts +37 -0
  238. package/dist/tools/impl/_web-fetch-html.d.ts +26 -0
  239. package/dist/tools/impl/_web-fetch-net.d.ts +99 -0
  240. package/dist/tools/impl/_web-search-assembler.d.ts +57 -0
  241. package/dist/tools/impl/advisor.d.ts +37 -0
  242. package/dist/tools/impl/agent.d.ts +10 -0
  243. package/dist/tools/impl/ask-user-question.d.ts +5 -0
  244. package/dist/tools/impl/background-task-runtime.d.ts +272 -0
  245. package/dist/tools/impl/bash.d.ts +78 -0
  246. package/dist/tools/impl/cron.d.ts +11 -0
  247. package/dist/tools/impl/edit.d.ts +1 -0
  248. package/dist/tools/impl/enter-plan-mode.d.ts +4 -0
  249. package/dist/tools/impl/enter-worktree.d.ts +25 -0
  250. package/dist/tools/impl/exit-plan-mode.d.ts +4 -0
  251. package/dist/tools/impl/exit-worktree.d.ts +4 -0
  252. package/dist/tools/impl/glob.d.ts +1 -0
  253. package/dist/tools/impl/grep.d.ts +19 -0
  254. package/dist/tools/impl/index.d.ts +37 -0
  255. package/dist/tools/impl/list-agents.d.ts +7 -0
  256. package/dist/tools/impl/list-mcp-resources-tool.d.ts +9 -0
  257. package/dist/tools/impl/monitor.d.ts +66 -0
  258. package/dist/tools/impl/notebook-edit.d.ts +1 -0
  259. package/dist/tools/impl/push-notification.d.ts +4 -0
  260. package/dist/tools/impl/read-ladder.d.ts +25 -0
  261. package/dist/tools/impl/read-mcp-resource-dir-tool.d.ts +9 -0
  262. package/dist/tools/impl/read-mcp-resource-tool.d.ts +9 -0
  263. package/dist/tools/impl/read-notifications.d.ts +5 -0
  264. package/dist/tools/impl/read.d.ts +44 -0
  265. package/dist/tools/impl/refresh-mcp-tools.d.ts +8 -0
  266. package/dist/tools/impl/report-findings.d.ts +1 -0
  267. package/dist/tools/impl/schedule-wakeup.d.ts +2 -0
  268. package/dist/tools/impl/send-message.d.ts +7 -0
  269. package/dist/tools/impl/skill.d.ts +5 -0
  270. package/dist/tools/impl/task-graph.d.ts +1 -0
  271. package/dist/tools/impl/task-output.d.ts +16 -0
  272. package/dist/tools/impl/task-stop.d.ts +11 -0
  273. package/dist/tools/impl/todo-write.d.ts +8 -0
  274. package/dist/tools/impl/tool-search.d.ts +4 -0
  275. package/dist/tools/impl/wait-for-mcp-servers.d.ts +29 -0
  276. package/dist/tools/impl/web-fetch.d.ts +36 -0
  277. package/dist/tools/impl/web-search.d.ts +30 -0
  278. package/dist/tools/impl/workflow.d.ts +5 -0
  279. package/dist/tools/impl/write.d.ts +8 -0
  280. package/dist/tools/paths-seam.d.ts +6 -0
  281. package/dist/tools/read-state.d.ts +12 -0
  282. package/dist/tools/registry.d.ts +423 -0
  283. package/dist/tools/task-graph-store.d.ts +61 -0
  284. package/dist/toolsearch/aliases.d.ts +26 -0
  285. package/dist/toolsearch/exposure.d.ts +30 -0
  286. package/dist/toolsearch/ranking.d.ts +6 -0
  287. package/dist/toolsearch/search.d.ts +45 -0
  288. package/dist/version.d.ts +1 -0
  289. package/dist/version.js +5 -0
  290. package/dist/web/fetchable-url.d.ts +28 -0
  291. package/dist/web/preapproved-hosts.d.ts +52 -0
  292. package/dist/web/private-address.d.ts +55 -0
  293. package/dist/web/session-runtime.d.ts +86 -0
  294. package/dist/workflows/bridge.d.ts +87 -0
  295. package/dist/workflows/budget.d.ts +24 -0
  296. package/dist/workflows/host-registry.d.ts +142 -0
  297. package/dist/workflows/journal.d.ts +29 -0
  298. package/dist/workflows/meta.d.ts +45 -0
  299. package/dist/workflows/registry.d.ts +24 -0
  300. package/dist/workflows/runtime.d.ts +254 -0
  301. package/dist/workflows/sandbox.d.ts +49 -0
  302. package/dist/workflows/script-api.d.ts +58 -0
  303. package/dist/workflows/seam.d.ts +92 -0
  304. package/dist/workflows/semaphore.d.ts +16 -0
  305. package/dist/workflows/store.d.ts +177 -0
  306. package/dist/workflows/subprocess-entry.d.ts +38 -0
  307. package/dist/workflows/subprocess-entry.js +14 -0
  308. package/dist/workflows/transcript.d.ts +56 -0
  309. package/dist/workflows/types.d.ts +84 -0
  310. package/dist/workflows/worker-harness.d.ts +45 -0
  311. package/package.json +76 -0
@@ -0,0 +1,37 @@
1
+ import "./advisor.ts";
2
+ import "./agent.ts";
3
+ import "./ask-user-question.ts";
4
+ import "./bash.ts";
5
+ import "./cron.ts";
6
+ import "./edit.ts";
7
+ import "./enter-plan-mode.ts";
8
+ import "./enter-worktree.ts";
9
+ import "./exit-plan-mode.ts";
10
+ import "./exit-worktree.ts";
11
+ import "./glob.ts";
12
+ import "./grep.ts";
13
+ import "./monitor.ts";
14
+ import "./notebook-edit.ts";
15
+ import "./push-notification.ts";
16
+ import "./read.ts";
17
+ import "./report-findings.ts";
18
+ import "./schedule-wakeup.ts";
19
+ import "./task-graph.ts";
20
+ import "./task-output.ts";
21
+ import "./task-stop.ts";
22
+ import "./todo-write.ts";
23
+ import "./write.ts";
24
+ import "./list-mcp-resources-tool.ts";
25
+ import "./read-mcp-resource-tool.ts";
26
+ import "./read-mcp-resource-dir-tool.ts";
27
+ import "./refresh-mcp-tools.ts";
28
+ import "./tool-search.ts";
29
+ import "./wait-for-mcp-servers.ts";
30
+ import "./send-message.ts";
31
+ import "./list-agents.ts";
32
+ import "./read-notifications.ts";
33
+ import "./skill.ts";
34
+ import "./workflow.ts";
35
+ import "./web-fetch.ts";
36
+ import "./web-search.ts";
37
+ export declare const EXECUTORS_WIRED = true;
@@ -0,0 +1,7 @@
1
+ import "../descriptors/list-agents.ts";
2
+ import "../descriptors/winter-list-agents.ts";
3
+ import { type ToolExecutor } from "../registry.js";
4
+ /** Read off the one definition, so the registered name and the descriptor's can never disagree. */
5
+ export declare const LIST_AGENTS_TOOL_NAME: string;
6
+ export declare const listAgentsExecutor: ToolExecutor;
7
+ export declare const WINTER_CANONICAL_LIST_AGENTS_TOOL_NAME: string;
@@ -0,0 +1,9 @@
1
+ import "../descriptors/list-mcp-resources-tool.ts";
2
+ import { type ToolExecutionContext, type ToolExecutor } from "../registry.js";
3
+ import type { McpLifecycle } from "../../mcp/lifecycle.js";
4
+ export declare const LIST_MCP_RESOURCES_TOOL_NAME = "ListMcpResourcesTool";
5
+ export type McpLifecycleResolver = (ctx: ToolExecutionContext) => McpLifecycle | undefined;
6
+ export interface ListMcpResourcesDeps {
7
+ resolveLifecycle: McpLifecycleResolver;
8
+ }
9
+ export declare function createListMcpResourcesExecutor(deps: ListMcpResourcesDeps): ToolExecutor;
@@ -0,0 +1,66 @@
1
+ import { isDisallowedAddress } from "@yanlinglabs/winter-provider-runtime";
2
+ import "../descriptors/monitor.ts";
3
+ import { type ToolExecutor, type ToolExecutionContext, type ToolResultPayload } from "../registry.js";
4
+ import { type SandboxBrand } from "../../sandbox/profile.js";
5
+ import { type GlobDenyEntry } from "../../permissions/file-rules.js";
6
+ interface MonitorInput {
7
+ description: string;
8
+ timeout_ms: number;
9
+ persistent: boolean;
10
+ command?: string;
11
+ ws?: {
12
+ url: string;
13
+ protocols?: string[];
14
+ };
15
+ }
16
+ declare function parseMonitorInput(input: unknown): MonitorInput | {
17
+ error: string;
18
+ };
19
+ declare function buildMonitorRunCommandOptions(ctx: ToolExecutionContext): {
20
+ cwd: string;
21
+ env: NodeJS.ProcessEnv;
22
+ settings: typeof ctx.sandboxSettings;
23
+ writableRoots: string[];
24
+ denyWritePaths?: string[];
25
+ denyReadPaths?: string[];
26
+ /** Fix round 11: glob-shaped denyWrite/denyRead entries, pre-converted to SBPL regex source -- see `splitDenyPathsByGlobShape`'s own header. */
27
+ denyWriteRegexes?: string[];
28
+ denyReadRegexes?: string[];
29
+ /** Fix round 12: each glob-shaped denyWrite/denyRead entry's own canonicalized fixed-prefix directory -- feeds the ancestor-rename-bypass fix. */
30
+ denyWriteGlobFixedPrefixes?: string[];
31
+ denyReadGlobFixedPrefixes?: string[];
32
+ /** Fix round 13: each glob-shaped denyRead entry, its regex PAIRED with its own fixed prefix -- feeds the read-deny-keep-in-place fix. */
33
+ denyReadGlobEntries?: GlobDenyEntry[];
34
+ home: string;
35
+ /** Phase 5 fix wave, I1: the resolved winter root, distinct from the OS home above. */
36
+ winterHome?: string;
37
+ /** P7a (D19): the session's brand -- the dot-dir names the seatbelt fences. */
38
+ brand?: SandboxBrand;
39
+ /** Fix round 16, item 2: `sandbox.filesystem.allowGitConfig` -- see `SandboxFilesystemSettings.allowGitConfig`'s own header. */
40
+ allowGitConfigWrites?: boolean;
41
+ /**
42
+ * Phase 6 Task 3 (R6-6, P4 carry): the engine's per-turn abort, threaded to `runCommand`'s
43
+ * already-existing process-group kill. Monitor's command half shares Bash's spawn mechanism, so it
44
+ * shares this obligation -- "a stopped child starts nothing new AND its in-flight command is
45
+ * killed" is not satisfied by covering only one of the two tools that spawn one.
46
+ *
47
+ * NOT PASSED TO `runCommand` (review r1 finding 2, controller ruling): a Monitor is a background
48
+ * task, and the pin's backgrounded shell drops its abort listeners -- a turn interrupt must not end
49
+ * it. `runMonitorCommand` strips this field; the session teardown (`stopSessionShellTasks`) and
50
+ * TaskStop are its kill doors. Kept on the options shape so the one builder stays comparable with
51
+ * bash.ts's own.
52
+ */
53
+ signal?: AbortSignal;
54
+ };
55
+ type WsValidation = {
56
+ ok: true;
57
+ connectUrl: URL;
58
+ hostHeader: string;
59
+ } | {
60
+ ok: false;
61
+ reason: string;
62
+ };
63
+ declare function validateWsEndpoint(rawUrl: string): Promise<WsValidation>;
64
+ export declare function connectMonitorWs(url: string, protocols: string[] | undefined, description: string, timeoutMs: number, persistent: boolean, ctx: ToolExecutionContext, hostHeader?: string): Promise<ToolResultPayload>;
65
+ export declare const monitorExecutor: ToolExecutor;
66
+ export { parseMonitorInput, isDisallowedAddress, validateWsEndpoint, buildMonitorRunCommandOptions };
@@ -0,0 +1 @@
1
+ import "../descriptors/index.ts";
@@ -0,0 +1,4 @@
1
+ import "../descriptors/index.ts";
2
+ export type PushNotifier = (message: string) => void;
3
+ export declare function configurePushNotifier(notifier: PushNotifier): void;
4
+ export declare function resetPushNotifierForTest(): void;
@@ -0,0 +1,25 @@
1
+ import type { SessionReadState } from "../read-state.js";
2
+ import type { ReadAccessProbe } from "../../permissions/evaluator.js";
3
+ export type ReadLadderProfile = "strict" | "relaxed";
4
+ export declare const DEFAULT_READ_LADDER_PROFILE: ReadLadderProfile;
5
+ export type ReadLadderOperation = "edit" | "overwrite";
6
+ export interface ReadLadderInput {
7
+ filePath: string;
8
+ currentMtimeMs: number;
9
+ operation: ReadLadderOperation;
10
+ hasUnambiguousCurrentMatch?: boolean;
11
+ profile?: ReadLadderProfile;
12
+ }
13
+ export interface ReadLadderDeps {
14
+ readState: SessionReadState;
15
+ probeReadAccess: (filePath: string) => ReadAccessProbe;
16
+ }
17
+ export type ReadLadderDecision = {
18
+ eligible: true;
19
+ } | {
20
+ eligible: false;
21
+ reason: string;
22
+ };
23
+ export declare function evaluateReadLadder(input: ReadLadderInput, deps: ReadLadderDeps): ReadLadderDecision;
24
+ export type PostOperationReadKind = "full" | "carryForward";
25
+ export declare function recordPostOperationRead(deps: ReadLadderDeps, filePath: string, kind: PostOperationReadKind, mtimeMs: number): void;
@@ -0,0 +1,9 @@
1
+ import "../descriptors/read-mcp-resource-dir-tool.ts";
2
+ import { type ToolExecutor } from "../registry.js";
3
+ import type { McpLifecycleResolver } from "./list-mcp-resources-tool.js";
4
+ export declare const READ_MCP_RESOURCE_DIR_TOOL_NAME = "ReadMcpResourceDirTool";
5
+ export interface ReadMcpResourceDirDeps {
6
+ resolveLifecycle: McpLifecycleResolver;
7
+ }
8
+ export declare function isDirectChildUri(parent: string, candidate: string): boolean;
9
+ export declare function createReadMcpResourceDirExecutor(deps: ReadMcpResourceDirDeps): ToolExecutor;
@@ -0,0 +1,9 @@
1
+ import "../descriptors/read-mcp-resource-tool.ts";
2
+ import { type ToolExecutor } from "../registry.js";
3
+ import type { McpLifecycleResolver } from "./list-mcp-resources-tool.js";
4
+ export declare const READ_MCP_RESOURCE_TOOL_NAME = "ReadMcpResourceTool";
5
+ export interface ReadMcpResourceDeps {
6
+ resolveLifecycle: McpLifecycleResolver;
7
+ }
8
+ export declare function saveBlobToTempDir(tempDir: string, blobBase64: string, mimeType: string | undefined): string;
9
+ export declare function createReadMcpResourceExecutor(deps: ReadMcpResourceDeps): ToolExecutor;
@@ -0,0 +1,5 @@
1
+ import "../descriptors/read-notifications.ts";
2
+ import { type ToolExecutor } from "../registry.js";
3
+ /** Read off the one definition, so the registered name and the descriptor's can never disagree. */
4
+ export declare const READ_NOTIFICATIONS_TOOL_NAME: string;
5
+ export declare const readNotificationsExecutor: ToolExecutor;
@@ -0,0 +1,44 @@
1
+ import "../descriptors/index.ts";
2
+ export type ReadBlock = {
3
+ type: "text";
4
+ text: string;
5
+ } | {
6
+ type: "image";
7
+ media_type: string;
8
+ bytes: number;
9
+ width?: number;
10
+ height?: number;
11
+ data?: string;
12
+ note?: string;
13
+ } | {
14
+ type: "pdf";
15
+ media_type: "application/pdf";
16
+ bytes: number;
17
+ totalPages?: number;
18
+ requestedPages?: {
19
+ start: number;
20
+ end: number;
21
+ };
22
+ data?: string;
23
+ note: string;
24
+ };
25
+ export interface ReadBlocksEnvelope {
26
+ winterReadBlocks: ReadBlock[];
27
+ }
28
+ export declare function parsePngDimensions(buf: Uint8Array): {
29
+ width: number;
30
+ height: number;
31
+ } | undefined;
32
+ export declare function parseGifDimensions(buf: Uint8Array): {
33
+ width: number;
34
+ height: number;
35
+ } | undefined;
36
+ export declare function parseBmpDimensions(buf: Uint8Array): {
37
+ width: number;
38
+ height: number;
39
+ } | undefined;
40
+ export declare function parseJpegDimensions(buf: Uint8Array): {
41
+ width: number;
42
+ height: number;
43
+ } | undefined;
44
+ export declare function countPdfPages(bytes: Buffer): number | undefined;
@@ -0,0 +1,8 @@
1
+ import "../descriptors/refresh-mcp-tools.ts";
2
+ import { type ToolExecutor } from "../registry.js";
3
+ import type { McpLifecycleResolver } from "./list-mcp-resources-tool.js";
4
+ export declare const REFRESH_MCP_TOOLS_NAME = "RefreshMcpTools";
5
+ export interface RefreshMcpToolsDeps {
6
+ resolveLifecycle: McpLifecycleResolver;
7
+ }
8
+ export declare function createRefreshMcpToolsExecutor(deps: RefreshMcpToolsDeps): ToolExecutor;
@@ -0,0 +1 @@
1
+ import "../descriptors/index.ts";
@@ -0,0 +1,2 @@
1
+ import "../descriptors/index.ts";
2
+ export declare function resetScheduleWakeupStoreForTest(sessionId?: string): void;
@@ -0,0 +1,7 @@
1
+ import "../descriptors/send-message.ts";
2
+ import "../descriptors/winter-send-message.ts";
3
+ import { type ToolExecutor } from "../registry.js";
4
+ /** Read off the one definition, so the registered name and the descriptor's can never disagree. */
5
+ export declare const SEND_MESSAGE_TOOL_NAME: string;
6
+ export declare const sendMessageExecutor: ToolExecutor;
7
+ export declare const WINTER_CANONICAL_SEND_MESSAGE_TOOL_NAME: string;
@@ -0,0 +1,5 @@
1
+ import "../descriptors/skill.ts";
2
+ import { type ToolExecutor } from "../registry.js";
3
+ import { SKILL_TOOL_NAME } from "../../skills/option.js";
4
+ export { SKILL_TOOL_NAME };
5
+ export declare const skillExecutor: ToolExecutor;
@@ -0,0 +1 @@
1
+ import "../descriptors/index.ts";
@@ -0,0 +1,16 @@
1
+ import "../descriptors/task-output.ts";
2
+ import { type ToolExecutor } from "../registry.js";
3
+ interface TaskOutputInput {
4
+ task_id: string;
5
+ block: boolean;
6
+ timeout: number;
7
+ }
8
+ declare function parseTaskOutputInput(input: unknown): TaskOutputInput | {
9
+ error: string;
10
+ };
11
+ declare function resolveClampedTimeout(requested: number): {
12
+ effective: number;
13
+ wasClamped: boolean;
14
+ };
15
+ declare const taskOutputExecutor: ToolExecutor;
16
+ export { parseTaskOutputInput, taskOutputExecutor, resolveClampedTimeout };
@@ -0,0 +1,11 @@
1
+ import "../descriptors/task-stop.ts";
2
+ import { type ToolExecutor } from "../registry.js";
3
+ interface TaskStopInput {
4
+ task_id?: string;
5
+ shell_id?: string;
6
+ }
7
+ declare function parseTaskStopInput(input: unknown): TaskStopInput | {
8
+ error: string;
9
+ };
10
+ declare const taskStopExecutor: ToolExecutor;
11
+ export { parseTaskStopInput, taskStopExecutor };
@@ -0,0 +1,8 @@
1
+ import "../descriptors/index.ts";
2
+ export type TodoStatus = "pending" | "in_progress" | "completed";
3
+ export interface Todo {
4
+ content: string;
5
+ status: TodoStatus;
6
+ activeForm: string;
7
+ }
8
+ export declare function resetTodoStoreForTest(sessionId?: string): void;
@@ -0,0 +1,4 @@
1
+ import "../descriptors/tool-search.ts";
2
+ import { type ToolExecutor } from "../registry.js";
3
+ export declare const TOOL_SEARCH_TOOL_NAME = "ToolSearch";
4
+ export declare const toolSearchExecutor: ToolExecutor;
@@ -0,0 +1,29 @@
1
+ import "../descriptors/wait-for-mcp-servers.ts";
2
+ import { type ToolExecutor } from "../registry.js";
3
+ import type { McpServerStateSource } from "../../mcp/state.js";
4
+ export declare const WAIT_FOR_MCP_SERVERS_TOOL_NAME = "WaitForMcpServers";
5
+ export interface WaitForMcpServersResult {
6
+ ready: boolean;
7
+ connected: string[];
8
+ cached?: string[];
9
+ failed: string[];
10
+ stillPending: string[];
11
+ needsAuth: string[];
12
+ disabled: string[];
13
+ unconfigured?: string[];
14
+ replRouted?: boolean;
15
+ unknown: string[];
16
+ }
17
+ export type WaitForMcpServersOutcome = {
18
+ ok: true;
19
+ result: WaitForMcpServersResult;
20
+ } | {
21
+ ok: false;
22
+ message: string;
23
+ };
24
+ export interface WaitForMcpServersDeps {
25
+ stateSource?: McpServerStateSource;
26
+ pendingWaitMs?: number;
27
+ }
28
+ export declare function executeWaitForMcpServers(input: unknown, deps: WaitForMcpServersDeps): Promise<WaitForMcpServersOutcome>;
29
+ export declare const waitForMcpServersExecutor: ToolExecutor;
@@ -0,0 +1,36 @@
1
+ import "../descriptors/web-fetch.ts";
2
+ import { type ToolExecutionContext, type ToolExecutor } from "../registry.js";
3
+ import { WebFetchCache } from "./_web-fetch-cache.js";
4
+ import { type WebFetchNetDeps } from "./_web-fetch-net.js";
5
+ declare const PERMISSIVE_GUIDELINES = "Provide a concise response based on the content above. Include relevant details, code examples, and documentation excerpts as needed.";
6
+ declare const STRICT_GUIDELINES = "Provide a concise response based only on the content above. In your response:\n - Enforce a strict 125-character maximum for quotes from any source document. Open Source Software is ok as long as we respect the license.\n - Use quotation marks for exact language from articles; any language outside of the quotation should never be word-for-word the same.\n - You are not a lawyer and never comment on the legality of your own prompts and responses.\n - Never produce or reproduce exact song lyrics.";
7
+ declare const BINARY_SAVE_BUDGET_BYTES: number;
8
+ /**
9
+ * Forgets `sessionId`'s spend (whole-branch review MINOR 4). Called from the ROOT run's own teardown in
10
+ * `engine.ts`, beside the search client's close and the fetch cache's own `forgetSession`: nothing used
11
+ * to remove a row, so on the in-process `query()` path the map grew forever AND an in-process
12
+ * `--resume` of the same id inherited the previous run's spend. A resumed run starts fresh, which is
13
+ * what a resumed session gets in claude (a new process).
14
+ */
15
+ export declare function forgetWebFetchBinarySaveBudgetForSession(sessionId: string): void;
16
+ /**
17
+ * `saveBinaryToTemp`'s "the session's saved-binary allowance is used up" answer. RENAMED away from the
18
+ * bare `"budget-exceeded"` it used to be (whole-branch review, NIT): that string is also the VALUE of
19
+ * `INNER_MODEL_BUDGET_EXCEEDED_DETAIL`, an unrelated fact (the session's spend ceiling stopping an
20
+ * inner model pass) that this same file matches on. Nothing conflated them today; two identical
21
+ * literals a few hundred lines apart is how something eventually would.
22
+ */
23
+ export declare const BINARY_SAVE_BUDGET_EXCEEDED = "binary-save-budget-exceeded";
24
+ declare function saveBinaryToTemp(ctx: ToolExecutionContext, url: URL, bytes: Uint8Array): Promise<string | undefined | typeof BINARY_SAVE_BUDGET_EXCEEDED>;
25
+ /** The digest pass was stopped because the session reached its spending limit -- NOT an interruption, and retrying cannot help. */
26
+ export declare const WEB_FETCH_BUDGET_STOP_MESSAGE = "WebFetch fetched the page but could not digest it: this session has reached its spending limit, so no further model calls can be made. Retrying will not help -- continue with the information already gathered, or ask the user to raise the session's budget.";
27
+ export interface WebFetchExecutorDeps {
28
+ net?: WebFetchNetDeps;
29
+ cache?: WebFetchCache;
30
+ resolveHost?: (hostname: string) => Promise<readonly string[]>;
31
+ now?: () => number;
32
+ }
33
+ export declare function createWebFetchExecutor(deps?: WebFetchExecutorDeps): ToolExecutor;
34
+ export { PERMISSIVE_GUIDELINES, STRICT_GUIDELINES };
35
+ export declare const WEB_FETCH_DEFAULT_TIMEOUT_MS = 60000;
36
+ export { saveBinaryToTemp, BINARY_SAVE_BUDGET_BYTES };
@@ -0,0 +1,30 @@
1
+ import { type BrandProfile } from "@yanlinglabs/winter-agent-sdk";
2
+ import { type ToolExecutor } from "../registry.js";
3
+ import { type ExaBackendState, type ExaSearchClientOptions } from "./_exa-client.js";
4
+ type EnvBrand = Pick<BrandProfile, "envPrefix">;
5
+ /** claude's own cap (research file, "maxResultSizeChars: 100000"). No per-tool cap seam exists on this registry (verified: no `maxResultChars`/`maxResultSizeChars` anywhere in it), so the executor enforces it itself. */
6
+ export declare const WEB_SEARCH_RESULT_CAP = 100000;
7
+ export interface WebSearchInput {
8
+ query: string;
9
+ allowed_domains?: string[];
10
+ blocked_domains?: string[];
11
+ }
12
+ /**
13
+ * The most entries either domain list may carry. claude has no analogue -- its schema-validated
14
+ * `string[]` is forwarded whole, and the extraction notes record no bound -- but a list is a MODEL-
15
+ * supplied array that this runtime hands to a third-party backend, and a 100,000-element one was
16
+ * forwarded verbatim (whole-branch review MINOR 10). A thousand is far past any real filter and small
17
+ * enough that no request built from it is absurd.
18
+ */
19
+ export declare const MAX_DOMAIN_LIST_ENTRIES = 1000;
20
+ export interface WebSearchExecutorDeps {
21
+ /** Forwarded into `createExaSearchClient` for the session's first call. Tests set `endpoint`/`state`/`sleep`/`connect`. */
22
+ exaClientOptions?: Pick<ExaSearchClientOptions, "endpoint" | "state" | "sleep" | "connect" | "callTimeoutMs" | "connectTimeoutMs" | "maxResultChars">;
23
+ /** The SAME breaker state object passed above (defaults to the process-wide one, matching `_exa-client.ts`'s own default) -- read here too, to decide the per-call cap BEFORE the loop starts. */
24
+ backendState?: ExaBackendState;
25
+ now?: () => number;
26
+ brand?: EnvBrand;
27
+ resultCap?: number;
28
+ }
29
+ export declare function createWebSearchExecutor(deps?: WebSearchExecutorDeps): ToolExecutor;
30
+ export {};
@@ -0,0 +1,5 @@
1
+ import "../descriptors/workflow.ts";
2
+ import { type WorkflowRuntimeDeps } from "../../workflows/runtime.js";
3
+ export declare const WORKFLOW_TOOL_NAME = "Workflow";
4
+ /** Test-only, mirroring every sibling singleton's own escape hatch (bun shares one module instance across a `bun test` run). */
5
+ export declare function resetWorkflowToolForTest(overrides?: Partial<WorkflowRuntimeDeps>): void;
@@ -0,0 +1,8 @@
1
+ import "../descriptors/index.ts";
2
+ export interface DiffLine {
3
+ type: "context" | "add" | "remove";
4
+ oldLineNumber?: number;
5
+ newLineNumber?: number;
6
+ content: string;
7
+ }
8
+ export declare function computeLineDiff(oldText: string, newText: string): DiffLine[];
@@ -0,0 +1,6 @@
1
+ import type { RegisteredTool } from "./registry.js";
2
+ export type ExtractPaths = NonNullable<RegisteredTool["extractPaths"]>;
3
+ export type ExtractedPaths = ReturnType<ExtractPaths>;
4
+ export declare function resolveCandidatePaths(candidates: readonly string[], baseDir: string): string[];
5
+ export declare function mergePathSets(a: ExtractedPaths, b: ExtractedPaths): ExtractedPaths;
6
+ export declare function emptyPathSet(): ExtractedPaths;
@@ -0,0 +1,12 @@
1
+ export interface ReadRecord {
2
+ complete: boolean;
3
+ mtimeMs: number;
4
+ }
5
+ export interface SessionReadState {
6
+ recordRead(p: string, o: ReadRecord): void;
7
+ lookup(p: string): ReadRecord | undefined;
8
+ }
9
+ export interface SessionReadStateOptions {
10
+ cwd: string;
11
+ }
12
+ export declare function createSessionReadState(opts: SessionReadStateOptions): SessionReadState;