stitchkit 0.120.0 → 0.122.0

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 (163) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/dist/agent-runtime/browser-control-contract.d.ts +12 -0
  3. package/dist/agent-runtime/browser-control-contract.d.ts.map +1 -1
  4. package/dist/agent-runtime/coding-discovery.d.ts +25 -0
  5. package/dist/agent-runtime/coding-discovery.d.ts.map +1 -0
  6. package/dist/agent-runtime/coding-search-automaton.d.ts +37 -0
  7. package/dist/agent-runtime/coding-search-automaton.d.ts.map +1 -0
  8. package/dist/agent-runtime/coding-search-case-fold.d.ts +4 -0
  9. package/dist/agent-runtime/coding-search-case-fold.d.ts.map +1 -0
  10. package/dist/agent-runtime/coding-search-class-ranges.d.ts +10 -0
  11. package/dist/agent-runtime/coding-search-class-ranges.d.ts.map +1 -0
  12. package/dist/agent-runtime/coding-search-contract.d.ts +86 -0
  13. package/dist/agent-runtime/coding-search-contract.d.ts.map +1 -0
  14. package/dist/agent-runtime/coding-search-limits.d.ts +13 -0
  15. package/dist/agent-runtime/coding-search-limits.d.ts.map +1 -0
  16. package/dist/agent-runtime/coding-search-matcher.d.ts +33 -0
  17. package/dist/agent-runtime/coding-search-matcher.d.ts.map +1 -0
  18. package/dist/agent-runtime/coding-search-output.d.ts +5 -0
  19. package/dist/agent-runtime/coding-search-output.d.ts.map +1 -0
  20. package/dist/agent-runtime/coding-search-regex-syntax.d.ts +39 -0
  21. package/dist/agent-runtime/coding-search-regex-syntax.d.ts.map +1 -0
  22. package/dist/agent-runtime/coding-search-unit-classes.d.ts +31 -0
  23. package/dist/agent-runtime/coding-search-unit-classes.d.ts.map +1 -0
  24. package/dist/agent-runtime/coding-shell-process.d.ts +1 -0
  25. package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -1
  26. package/dist/agent-runtime/coding-tool-contract.d.ts +8 -3
  27. package/dist/agent-runtime/coding-tool-contract.d.ts.map +1 -1
  28. package/dist/agent-runtime/coding-tool-files.d.ts.map +1 -1
  29. package/dist/agent-runtime/coding-tool-listing.d.ts +1 -11
  30. package/dist/agent-runtime/coding-tool-listing.d.ts.map +1 -1
  31. package/dist/agent-runtime/coding-tool-paths.d.ts +6 -2
  32. package/dist/agent-runtime/coding-tool-paths.d.ts.map +1 -1
  33. package/dist/agent-runtime/coding-tool-refusals.d.ts +6 -0
  34. package/dist/agent-runtime/coding-tool-refusals.d.ts.map +1 -1
  35. package/dist/agent-runtime/coding-tool-search-patch.d.ts.map +1 -1
  36. package/dist/agent-runtime/coding-tool-search.d.ts +113 -0
  37. package/dist/agent-runtime/coding-tool-search.d.ts.map +1 -0
  38. package/dist/agent-runtime/coding-tool-shell.d.ts.map +1 -1
  39. package/dist/agent-runtime/contained-scan-budget.d.ts +32 -0
  40. package/dist/agent-runtime/contained-scan-budget.d.ts.map +1 -0
  41. package/dist/agent-runtime/contained-scan-contract.d.ts +52 -0
  42. package/dist/agent-runtime/contained-scan-contract.d.ts.map +1 -0
  43. package/dist/agent-runtime/contained-scan.d.ts +48 -13
  44. package/dist/agent-runtime/contained-scan.d.ts.map +1 -1
  45. package/dist/agent-runtime/control-schema.d.ts +27 -4
  46. package/dist/agent-runtime/control-schema.d.ts.map +1 -1
  47. package/dist/agent-runtime/event-schema.d.ts +33 -0
  48. package/dist/agent-runtime/event-schema.d.ts.map +1 -1
  49. package/dist/agent-runtime/run-acquisition.d.ts.map +1 -1
  50. package/dist/agent-runtime/run-execution-state.d.ts +6 -0
  51. package/dist/agent-runtime/run-execution-state.d.ts.map +1 -1
  52. package/dist/agent-runtime/run-model-attempts.d.ts.map +1 -1
  53. package/dist/agent-runtime/run-stream-parts.d.ts +11 -0
  54. package/dist/agent-runtime/run-stream-parts.d.ts.map +1 -1
  55. package/dist/agent-runtime/sandbox.d.ts +5 -1
  56. package/dist/agent-runtime/sandbox.d.ts.map +1 -1
  57. package/dist/agent-runtime/tool-progress.d.ts +21 -0
  58. package/dist/agent-runtime/tool-progress.d.ts.map +1 -0
  59. package/dist/agent-runtime/workspace-glob.d.ts +6 -0
  60. package/dist/agent-runtime/workspace-glob.d.ts.map +1 -0
  61. package/dist/entrypoints/agent-runtime/browser.js +7 -3
  62. package/dist/entrypoints/agent-runtime/coding-tools.js +7 -7
  63. package/dist/entrypoints/agent-runtime/harness.js +8 -8
  64. package/dist/entrypoints/agent-runtime/realtime.js +5 -5
  65. package/dist/entrypoints/agent-runtime/sandbox.js +7 -7
  66. package/dist/entrypoints/agent-runtime/sqlite/bun.js +9 -9
  67. package/dist/entrypoints/agent-runtime/sqlite/node.js +9 -9
  68. package/dist/entrypoints/agent-runtime/testing.js +9 -9
  69. package/dist/entrypoints/agent-runtime.d.ts +1 -1
  70. package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
  71. package/dist/entrypoints/agent-runtime.js +15 -13
  72. package/dist/entrypoints/application/diagnostic-journal.js +3 -3
  73. package/dist/entrypoints/application/directory-inbox.js +5 -5
  74. package/dist/entrypoints/cli/publish.js +4 -4
  75. package/dist/entrypoints/cli.js +4 -4
  76. package/dist/entrypoints/files.js +4 -4
  77. package/dist/entrypoints/process/owner-loss.js +2 -1
  78. package/dist/entrypoints/process.js +4 -4
  79. package/dist/entrypoints/server.d.ts +1 -0
  80. package/dist/entrypoints/server.d.ts.map +1 -1
  81. package/dist/entrypoints/server.js +112 -47
  82. package/dist/entrypoints/telegram.js +3 -3
  83. package/dist/entrypoints/tools/agent.js +1 -1
  84. package/dist/entrypoints/tools/toolkit.js +5 -5
  85. package/dist/{index-yb9n4pgj.js → index-10rg78vf.js} +1 -1
  86. package/dist/{index-7zwtbak8.js → index-1fyea34p.js} +9 -4
  87. package/dist/{index-3yb5kft5.js → index-4tyt1qya.js} +1 -1
  88. package/dist/{index-8xyf8h2k.js → index-6j15ktag.js} +1 -1
  89. package/dist/{index-zrdcmg6j.js → index-72xtvcvr.js} +40 -6
  90. package/dist/{index-4qnzda76.js → index-7qyv50r4.js} +1 -1
  91. package/dist/{index-qctbzmg9.js → index-am1h8c9v.js} +69 -27
  92. package/dist/{index-e452syyh.js → index-aqmadanx.js} +2 -2
  93. package/dist/{index-yt7gyg5x.js → index-b51tzcgh.js} +1 -1
  94. package/dist/{index-aw6zahv1.js → index-dqpesdck.js} +2 -2
  95. package/dist/{index-1jwsfkfz.js → index-eeahxwvg.js} +60 -76
  96. package/dist/{index-sb9dr3tq.js → index-eh71zr32.js} +4 -4
  97. package/dist/{index-nyyam9ce.js → index-f6pw75e1.js} +1 -1
  98. package/dist/{index-qevqn3d3.js → index-gq3fnq3f.js} +1 -1
  99. package/dist/{index-bz479f0x.js → index-gtx3eknx.js} +1 -1
  100. package/dist/{index-mnkk1ffz.js → index-hs76yzt7.js} +13 -1
  101. package/dist/{index-nn9qvkww.js → index-j95jp7ee.js} +45 -9
  102. package/dist/{index-2kbysk9s.js → index-m5m9rmvt.js} +2 -0
  103. package/dist/{index-r3db01kh.js → index-nwm3ww60.js} +1 -1
  104. package/dist/index-qaqxdbxf.js +2857 -0
  105. package/dist/index-s9a0fjh3.js +305 -0
  106. package/dist/{index-b0w7rbpt.js → index-t05a2ry4.js} +39 -3
  107. package/dist/{index-pq2m7t46.js → index-v8yqk4w7.js} +22 -8
  108. package/dist/internal/contained-directory.d.ts +1 -1
  109. package/dist/internal/contained-directory.d.ts.map +1 -1
  110. package/dist/internal/contained-files.d.ts +18 -51
  111. package/dist/internal/contained-files.d.ts.map +1 -1
  112. package/dist/internal/contained-read.d.ts +17 -0
  113. package/dist/internal/contained-read.d.ts.map +1 -0
  114. package/dist/internal/darwin-binding.d.ts +3 -1
  115. package/dist/internal/darwin-binding.d.ts.map +1 -1
  116. package/dist/process/bun-child.d.ts.map +1 -1
  117. package/dist/process/command-owner.d.ts.map +1 -1
  118. package/dist/process/group.d.ts +2 -0
  119. package/dist/process/group.d.ts.map +1 -1
  120. package/dist/process/launch.d.ts +1 -0
  121. package/dist/process/launch.d.ts.map +1 -1
  122. package/dist/process/owned-child.d.ts.map +1 -1
  123. package/dist/process/owner-loss-guard.d.ts.map +1 -1
  124. package/dist/process/owner-loss-protocol.d.ts +1 -0
  125. package/dist/process/owner-loss-protocol.d.ts.map +1 -1
  126. package/dist/server/openapi-security.d.ts +73 -0
  127. package/dist/server/openapi-security.d.ts.map +1 -0
  128. package/dist/server/openapi.d.ts +12 -0
  129. package/dist/server/openapi.d.ts.map +1 -1
  130. package/dist/tools/agent.d.ts.map +1 -1
  131. package/dist/tools/cli/format.d.ts +11 -2
  132. package/dist/tools/cli/format.d.ts.map +1 -1
  133. package/dist/tools/cli/repeatable-read.d.ts +9 -0
  134. package/dist/tools/cli/repeatable-read.d.ts.map +1 -0
  135. package/dist/tools/cli/run-managed.d.ts.map +1 -1
  136. package/dist/tools/cli/run-native.d.ts.map +1 -1
  137. package/dist/tools/runtime-call-context.d.ts +15 -0
  138. package/dist/tools/runtime-call-context.d.ts.map +1 -0
  139. package/llms/agent-runtime-browser.txt +4 -1
  140. package/llms/agent-runtime-coding-tools.txt +9 -9
  141. package/llms/agent-runtime.2.txt +30 -108
  142. package/llms/agent-runtime.3.txt +111 -1
  143. package/llms/agent-runtime.txt +59 -24
  144. package/llms/application.3.txt +5 -2
  145. package/llms/cli.txt +21 -9
  146. package/llms/contract.txt +1 -1
  147. package/llms/process.txt +3 -1
  148. package/llms/server.2.txt +48 -0
  149. package/llms/server.5.txt +4 -0
  150. package/llms/stitchkit.txt +3 -3
  151. package/llms/tools.txt +4 -1
  152. package/llms/{upgrading-0.106.0-0.120.0.txt → upgrading-0.106.0-0.122.0.txt} +81 -3
  153. package/llms/upgrading.txt +1 -1
  154. package/llms-full.txt +255 -35
  155. package/llms.txt +7 -7
  156. package/native/darwin-arm64.node +0 -0
  157. package/native/darwin-x64.node +0 -0
  158. package/native-assets.json +4 -4
  159. package/package.json +2 -1
  160. package/dist/index-0qyrcjfs.js +0 -1478
  161. package/dist/index-aa50qwv4.js +0 -107
  162. package/dist/tools/durability-context.d.ts +0 -7
  163. package/dist/tools/durability-context.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -15,6 +15,89 @@ additive**; the first breaking change landed in 0.10.0. Grep the file for
15
15
 
16
16
  ## [Unreleased]
17
17
 
18
+ ## [0.122.0] - 2026-11-10
19
+
20
+ ### ⚠️ Breaking changes
21
+
22
+ **Who must act:** scripts and agents that read stdout after a managed CLI command exits with `CLI_PRESENTATION_FAILED` when the command is a `GET` endpoint or a tool declaring `annotations.readOnlyHint: true`. Commands with an effect and native `defineCliCommand` presenters change nothing. See the [migration](docs/guide/upgrading.md#read-view-refusal).
23
+
24
+ - `stitchkit/cli` — **a read withholds its result when the requested view is refused.**
25
+ A misspelled `--table`, `--count-by`, `--sum` or `--sort` field on a command that only reads
26
+ prints nothing to stdout: the diagnostic names the field and the fields that are there, and the
27
+ answer is one corrected call away. A command only reads when its tool declares
28
+ `annotations.readOnlyHint: true`, or declares no `readOnlyHint` and its method is `GET`. A command
29
+ with an effect still prints its complete result, because repeating it would repeat the effect.
30
+ `details.resultOnStdout` states which case occurred.
31
+ Before: `app user_list --table id,nosuchcolumn` → exit `8`, every record on stdout.
32
+ After: exit `8`, stdout empty; `app user_list --table id,name` returns the table.
33
+ [migration](docs/guide/upgrading.md#read-view-refusal). → ADR 0286
34
+ **Affects:** `stitchkit/cli` behaviour
35
+
36
+ ### Added
37
+
38
+ - `stitchkit/server` — `generateOpenApiDocument({ security })` describes how a caller presents its
39
+ credential: named HTTP bearer, basic or API key (header, query, cookie) schemes become
40
+ `components.securitySchemes`, and each protected operation gets a standard `security`
41
+ requirement, keyed by the scopes the contracts already declare. Generation refuses a protected
42
+ scope with no scheme, naming the operation, instead of advertising it as open. Without
43
+ `security` the document is unchanged. Two new type exports, `OpenApiSecurity` and
44
+ `OpenApiSecurityScheme`, raise the `stitchkit/server` surface ceiling from 220 to 222 so a host
45
+ can type its scheme table. [guide](docs/guide/server.md#security-schemes--security)
46
+ - `stitchkit/agent-runtime` — a long tool tells the agent's screen what it is doing. What a
47
+ handler reports through `ctx.reportProgress` under the agent runtime becomes a transient
48
+ `tool-progress` event of the run (`AgentToolProgressEventSchema`) with the call's `callId`; it
49
+ was a no-op there, so the run showed `started` and nothing else until the result. The model
50
+ still reads only the tool's result. Messages are cut to `AGENT_TOOL_PROGRESS_MESSAGE_MAX`,
51
+ reports of one call closer than 250 ms are dropped, and nothing is published after the call
52
+ settles. In `stitchkit/agent-runtime/browser`, `reduceAgentControlEvent` keeps each running
53
+ call's last report in `transientByRun[runId].tools` (`AgentRunTransient`,
54
+ `AgentToolActivity`) and drops it on the call's terminal status. A reducer or `switch` written
55
+ by hand over `AgentRuntimeEvent` sees one more `type`. The surface ceilings move from 373 to 374
56
+ (`stitchkit/agent-runtime`) and from 92 to 96 (`stitchkit/agent-runtime/browser`) for these
57
+ names. [guide](docs/guide/agent-runtime.md)
58
+
59
+ ## [0.121.0] - 2026-11-09
60
+
61
+ ### ⚠️ Breaking changes
62
+
63
+ **Who must act:** hosts that build a complete `AgentCodingToolLimits` value, read exact `list_directory`, `glob` or `search_files` outputs, rely on a symlink `run_command` cwd or on `glob` returning no paths for a missing `path`, or send search regexes with named backreferences or counted repetition above 1,000. A host mounting the coding tools with partial limits and ordinary queries changes nothing. See the [migration](docs/guide/upgrading.md#bounded-coding-search).
64
+
65
+ - `stitchkit/agent-runtime/coding-tools` — **search reports its coverage and bounds traversal before reading.**
66
+ `search_files` prunes incompatible glob branches before authorization/open, streams matches,
67
+ honors cancellation and bounds directory opens, entries, total content bytes, elapsed time and
68
+ the entire serialized result. `coverage` distinguishes a complete empty result from denied,
69
+ unreadable, cancelled or limited work. Directory errors carry a relative path, operation and code.
70
+ Regex searches keep JavaScript syntax, modifiers and Annex B forms. A line whose backtracking
71
+ work, with repetition capped at the line's length, stays within 2^24 steps runs natively; any
72
+ other line runs on a cached linear automaton that observes the deadline inside the line (ten to
73
+ forty times slower than native matching, with no catastrophic case). Named backreferences,
74
+ counted repetition above 1,000 and, for patterns that need the automaton, more than 16,384 automaton states,
75
+ 65,536 construction steps or 4,194,304 overlapping character-set memberships now refuse beside numbered backreferences and
76
+ lookaround; an invalid pattern's refusal carries the engine's reason.
77
+ Before: `{ query: '(?<w>a)\\k<w>', regex: true }` → after: `{ query: '(a)a', regex: true }`.
78
+ A `glob` path or `run_command` cwd that is missing, a file or a symlink refuses with
79
+ `NOT_FOUND`/`BAD_REQUEST` and a hint, as `list_directory` does; a missing `glob` path used to
80
+ return no paths.
81
+ Hosts constructing a full
82
+ `AgentCodingToolLimits` value add the five search ceilings; partial `limits` use finite defaults.
83
+ [ADR 0285](docs/decisions/0285-search-bounds-the-work-before-reading.md),
84
+ [migration](docs/guide/upgrading.md#bounded-coding-search).
85
+ List and glob use the same budgets and coverage, including bounded canonical spelling checks;
86
+ list raw enumeration respects maxListEntries and glob patterns have a 4,096-unit ceiling.
87
+ Every filesystem tool pins root before either policy; an ordinary command enters its pinned
88
+ cwd through the descriptor's `/proc` link on Linux and through an isolated fchdir guard on
89
+ macOS. Symlink cwd descendants refuse; custom sandbox launchers own cwd capture.
90
+ **Affects:** `stitchkit/agent-runtime/coding-tools` createAgentCodingTools, AgentCodingToolLimitsSchema, AgentCodingToolLimits, behaviour
91
+
92
+ ### Fixed
93
+
94
+ - `stitchkit/process` — **`timeoutMs` counts from the moment the command started.** A guarded
95
+ command (`ownerLoss: 'terminate'`) starts its guard first; that start, tens of milliseconds, used
96
+ the command's own budget, so a short budget timed out a command that never got to run. The
97
+ guard's start is now bounded by `timeoutMs` or 5 seconds, whichever is longer.
98
+ **Affects:** `stitchkit/process` behaviour
99
+ - API reference export tables are checked against each actual entrypoint in both directions.
100
+
18
101
  ## [0.120.0] - 2026-11-05
19
102
 
20
103
  ### ⚠️ Breaking changes
@@ -656,6 +656,18 @@ export declare const agentControlRealtimeContract: import("../realtime/index.js"
656
656
  }>;
657
657
  input: z.ZodOptional<z.ZodJSONSchema>;
658
658
  output: z.ZodOptional<z.ZodJSONSchema>;
659
+ }, z.core.$strip>, z.ZodObject<{
660
+ conversationId: z.ZodString;
661
+ runId: z.ZodString;
662
+ emittedAt: z.ZodISODateTime;
663
+ type: z.ZodLiteral<"tool-progress">;
664
+ runtimeEpoch: z.ZodString;
665
+ sequence: z.ZodInt;
666
+ callId: z.ZodString;
667
+ toolName: z.ZodString;
668
+ message: z.ZodOptional<z.ZodString>;
669
+ progress: z.ZodOptional<z.ZodNumber>;
670
+ total: z.ZodOptional<z.ZodNumber>;
659
671
  }, z.core.$strip>, z.ZodObject<{
660
672
  conversationId: z.ZodString;
661
673
  runId: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"browser-control-contract.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/browser-control-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAWpC,CAAC;AACH;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;GAIG;AACH,eAAO,MAAM,4BAA4B;;QAEjB,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGP,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { ContainedFileHandle } from '../internal/contained-handle.js';
2
+ import type { AgentCodingToolConfig, AgentCodingToolLimits } from './coding-tool-contract.js';
3
+ import { ContainedScanBudget } from './contained-scan-budget.js';
4
+ export declare function discoveryRun(config: AgentCodingToolConfig, limits: AgentCodingToolLimits, path: string, include: string, symlinks: 'skip' | 'list'): {
5
+ budget: ContainedScanBudget;
6
+ coverage: {
7
+ complete: boolean;
8
+ reasons: ("cancelled" | "denied" | "max-bytes" | "max-depth" | "max-directories" | "max-entries" | "max-file-bytes" | "max-files" | "max-line-bytes" | "max-output-bytes" | "max-results" | "timeout" | "unreadable")[];
9
+ scope: {
10
+ path: string;
11
+ include: string;
12
+ excludedDirectories: "configured" | "default";
13
+ symlinks: "list" | "skip";
14
+ };
15
+ visitedDirectories: number;
16
+ visitedEntries: number;
17
+ readBytes: number;
18
+ elapsedMs: number;
19
+ };
20
+ run(caller: AbortSignal | undefined, work: (root: ContainedFileHandle) => Promise<void>): Promise<void>;
21
+ refresh(): void;
22
+ };
23
+ /** Admission precedes retention; names cannot multiply the serialized output limit. */
24
+ export declare function discoveryCollector(output: unknown, budget: ContainedScanBudget, maximum: number): (item: unknown) => void;
25
+ //# sourceMappingURL=coding-discovery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coding-discovery.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-discovery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE3F,OAAO,EAAE,mBAAmB,EAAe,MAAM,yBAAyB,CAAC;AAG3E,wBAAgB,YAAY,CAC1B,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,qBAAqB,EAC7B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GAAG,MAAM;;;;;;;;;;;;;;;;gBA2Bb,WAAW,GAAG,SAAS,QACzB,CAAC,IAAI,EAAE,mBAAmB,KAAK,OAAO,CAAC,IAAI,CAAC;;EAyCvD;AAED,uFAAuF;AACvF,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,MAAM,UAQD,OAAO,UAMtB"}
@@ -0,0 +1,37 @@
1
+ import { type RegexAssertion, type RegexNode, type UnitAtom } from './coding-search-regex-syntax.js';
2
+ /** Unrolled counted repetition and alternation stay below this many automaton states. */
3
+ export declare const MAX_REGEX_STATES = 16384;
4
+ type State = {
5
+ kind: 'unit';
6
+ atom: UnitAtom;
7
+ next: number;
8
+ } | {
9
+ kind: 'split';
10
+ next: number[];
11
+ } | {
12
+ kind: 'assert';
13
+ at: RegexAssertion;
14
+ next: number;
15
+ } | {
16
+ kind: 'accept';
17
+ };
18
+ export declare function buildAutomaton(tree: RegexNode, check: () => void): {
19
+ states: State[];
20
+ start: number;
21
+ };
22
+ /**
23
+ * A compiled search expression. Matching walks the line once; each step is a cached
24
+ * transition of the lazily built deterministic automaton, keyed by the unit's class. A cache
25
+ * miss costs the state's own units plus the start atoms matching that class, so a line costs at
26
+ * most states × UTF-16 units, the cache stays within its state and transition ceilings, and
27
+ * every step can observe the caller's deadline.
28
+ */
29
+ export interface SearchRegex {
30
+ test(text: string): boolean;
31
+ }
32
+ export declare function lazyMatcher({ states, start }: {
33
+ states: State[];
34
+ start: number;
35
+ }, check: () => void): SearchRegex;
36
+ export {};
37
+ //# sourceMappingURL=coding-search-automaton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coding-search-automaton.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-search-automaton.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,QAAQ,EAEd,MAAM,8BAA8B,CAAC;AAGtC,yFAAyF;AACzF,eAAO,MAAM,gBAAgB,QAAS,CAAC;AAOvC,KAAK,KAAK,GACN;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,EAAE,EAAE,cAAc,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEvB,wBAAgB,cAAc,CAC5B,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,MAAM,IAAI,GAChB;IAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CA6CpC;AAuBD;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B;AAwBD,wBAAgB,WAAW,CACzB,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE;IAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EACrD,KAAK,EAAE,MAAM,IAAI,GAChB,WAAW,CAiLb"}
@@ -0,0 +1,4 @@
1
+ /** Units equal to `code` under the `i` flag without `u`; the inverse table is built once. */
2
+ export declare function caseVariants(code: number): number[];
3
+ export declare function casedUnits(): readonly number[];
4
+ //# sourceMappingURL=coding-search-case-fold.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coding-search-case-fold.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-search-case-fold.ts"],"names":[],"mappings":"AAiCA,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAGnD;AAKD,wBAAgB,UAAU,IAAI,SAAS,MAAM,EAAE,CAG9C"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Exact unit ranges of a bracket class without the `u` flag, including escapes inside it, so
3
+ * the automaton partitions the alphabet instead of asking the engine per unit. Every result is
4
+ * checked against the engine at each range boundary and midpoint; any doubt leaves the class to
5
+ * the engine.
6
+ */
7
+ export type UnitRanges = [number, number][];
8
+ /** The exact ranges of a bracket class, or undefined when only the engine can answer. */
9
+ export declare function classRanges(source: string, ignoreCase?: boolean): UnitRanges | undefined;
10
+ //# sourceMappingURL=coding-search-class-ranges.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coding-search-class-ranges.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-search-class-ranges.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;AA4I5C,yFAAyF;AACzF,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,UAAQ,GAAG,UAAU,GAAG,SAAS,CAiBtF"}
@@ -0,0 +1,86 @@
1
+ import { z } from 'zod';
2
+ export declare const SearchInputSchema: z.ZodObject<{
3
+ query: z.ZodString;
4
+ mode: z.ZodDefault<z.ZodEnum<{
5
+ content: "content";
6
+ path: "path";
7
+ }>>;
8
+ regex: z.ZodDefault<z.ZodBoolean>;
9
+ context: z.ZodDefault<z.ZodInt>;
10
+ include: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strict>;
12
+ export type SearchInput = z.infer<typeof SearchInputSchema>;
13
+ export declare const SearchMatchSchema: z.ZodObject<{
14
+ path: z.ZodString;
15
+ line: z.ZodOptional<z.ZodInt>;
16
+ text: z.ZodOptional<z.ZodString>;
17
+ before: z.ZodOptional<z.ZodArray<z.ZodString>>;
18
+ after: z.ZodOptional<z.ZodArray<z.ZodString>>;
19
+ }, z.core.$strict>;
20
+ export type SearchMatch = z.infer<typeof SearchMatchSchema>;
21
+ export declare const SearchOutputSchema: z.ZodObject<{
22
+ matches: z.ZodArray<z.ZodObject<{
23
+ path: z.ZodString;
24
+ line: z.ZodOptional<z.ZodInt>;
25
+ text: z.ZodOptional<z.ZodString>;
26
+ before: z.ZodOptional<z.ZodArray<z.ZodString>>;
27
+ after: z.ZodOptional<z.ZodArray<z.ZodString>>;
28
+ }, z.core.$strict>>;
29
+ truncated: z.ZodBoolean;
30
+ scannedFiles: z.ZodInt;
31
+ skippedDirectories: z.ZodInt;
32
+ skippedSymlinks: z.ZodInt;
33
+ denied: z.ZodOptional<z.ZodArray<z.ZodObject<{
34
+ path: z.ZodString;
35
+ kind: z.ZodEnum<{
36
+ directory: "directory";
37
+ file: "file";
38
+ other: "other";
39
+ symlink: "symlink";
40
+ }>;
41
+ }, z.core.$strict>>>;
42
+ deniedTruncated: z.ZodOptional<z.ZodBoolean>;
43
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
44
+ path: z.ZodString;
45
+ operation: z.ZodString;
46
+ code: z.ZodString;
47
+ }, z.core.$strict>>>;
48
+ errorsTruncated: z.ZodOptional<z.ZodBoolean>;
49
+ hint: z.ZodOptional<z.ZodString>;
50
+ coverage: z.ZodObject<{
51
+ complete: z.ZodBoolean;
52
+ reasons: z.ZodArray<z.ZodEnum<{
53
+ cancelled: "cancelled";
54
+ denied: "denied";
55
+ "max-bytes": "max-bytes";
56
+ "max-depth": "max-depth";
57
+ "max-directories": "max-directories";
58
+ "max-entries": "max-entries";
59
+ "max-file-bytes": "max-file-bytes";
60
+ "max-files": "max-files";
61
+ "max-line-bytes": "max-line-bytes";
62
+ "max-output-bytes": "max-output-bytes";
63
+ "max-results": "max-results";
64
+ timeout: "timeout";
65
+ unreadable: "unreadable";
66
+ }>>;
67
+ scope: z.ZodObject<{
68
+ path: z.ZodString;
69
+ include: z.ZodString;
70
+ excludedDirectories: z.ZodEnum<{
71
+ configured: "configured";
72
+ default: "default";
73
+ }>;
74
+ symlinks: z.ZodEnum<{
75
+ list: "list";
76
+ skip: "skip";
77
+ }>;
78
+ }, z.core.$strict>;
79
+ visitedDirectories: z.ZodInt;
80
+ visitedEntries: z.ZodInt;
81
+ readBytes: z.ZodInt;
82
+ elapsedMs: z.ZodNumber;
83
+ }, z.core.$strict>;
84
+ }, z.core.$strict>;
85
+ export type SearchOutput = z.infer<typeof SearchOutputSchema>;
86
+ //# sourceMappingURL=coding-search-contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coding-search-contract.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-search-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,iBAAiB;;;;;;;;;kBAoBnB,CAAC;AACZ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,iBAAiB;;;;;;kBAQnB,CAAC;AACZ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAqBpB,CAAC;AACZ,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ export declare const AgentCodingSearchLimitsSchema: z.ZodObject<{
3
+ maxSearchResults: z.ZodInt;
4
+ maxSearchFiles: z.ZodInt;
5
+ maxSearchDepth: z.ZodInt;
6
+ maxSearchDirectories: z.ZodInt;
7
+ maxSearchEntries: z.ZodInt;
8
+ maxSearchBytes: z.ZodInt;
9
+ maxSearchOutputBytes: z.ZodInt;
10
+ searchTimeoutMs: z.ZodInt;
11
+ }, z.core.$strict>;
12
+ export type AgentCodingSearchLimits = z.infer<typeof AgentCodingSearchLimitsSchema>;
13
+ //# sourceMappingURL=coding-search-limits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coding-search-limits.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-search-limits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,6BAA6B;;;;;;;;;kBAW/B,CAAC;AACZ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { type SearchRegex } from './coding-search-automaton.js';
2
+ import { type RegexNode } from './coding-search-regex-syntax.js';
3
+ /**
4
+ * Backtracking steps one native match of one line may spend. The engine itself stops after
5
+ * 100,000,000 counted operations per call and then answers no match, and one step of this model
6
+ * costs it about two; 2^24 keeps a threefold margin below that limit, so a native line never ends
7
+ * in a silent false. Native matching cannot be interrupted, so this also bounds the deadline's
8
+ * overshoot to one such line.
9
+ */
10
+ export declare const MAX_NATIVE_LINE_WORK: number;
11
+ /**
12
+ * The backtracking work per start position of a line of at most `units` units: each start
13
+ * walks each path through the alternatives once, so paths × the longest path bounds it. On such
14
+ * a line no repetition iterates more than `units` times beyond the iterations it requires (and
15
+ * a body that cannot match empty cannot even reach those), so `x{m,M}`, `x*` and `x+` are their
16
+ * unrolled forms with the bounds capped there: p^m × (1 + p + … + p^(M−m)) paths and M × the
17
+ * body's length.
18
+ */
19
+ export declare function backtrackingWork(node: RegexNode, units: number): {
20
+ paths: number;
21
+ length: number;
22
+ };
23
+ /** The linear automaton alone, for any accepted pattern. */
24
+ export declare function compileLinearSearchRegex(pattern: string, check: () => void): SearchRegex;
25
+ /**
26
+ * JavaScript `RegExp` syntax without flags with bounded cost per line. A line whose bounded
27
+ * backtracking work — per start position × its length, repetition capped at its length — stays
28
+ * within `MAX_NATIVE_LINE_WORK` runs on the native engine itself; the deadline is observed
29
+ * between lines. Any other line runs on the linear automaton, because a deadline cannot
30
+ * interrupt one native match. The work is measured per power-of-two line length, once.
31
+ */
32
+ export declare function compileSearchRegex(pattern: string, check: () => void): SearchRegex;
33
+ //# sourceMappingURL=coding-search-matcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coding-search-matcher.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-search-matcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,EAEL,KAAK,SAAS,EAEf,MAAM,8BAA8B,CAAC;AAGtC;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,QAAU,CAAC;AAkC5C;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,MAAM,GACZ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAmDnC;AAyCD,4DAA4D;AAC5D,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,GAAG,WAAW,CAOxF;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,GAAG,WAAW,CAqClF"}
@@ -0,0 +1,5 @@
1
+ import type { SearchOutput } from './coding-search-contract.js';
2
+ import { type ContainedScanBudget } from './contained-scan-budget.js';
3
+ /** Matches are admitted while streaming; diagnostics get the remaining serialized byte budget. */
4
+ export declare function boundSearchDiagnostics(output: Pick<SearchOutput, 'denied' | 'errors' | 'deniedTruncated' | 'errorsTruncated'>, budget: ContainedScanBudget, maxBytes: number): void;
5
+ //# sourceMappingURL=coding-search-output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coding-search-output.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-search-output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,KAAK,mBAAmB,EAAe,MAAM,yBAAyB,CAAC;AAEhF,kGAAkG;AAClG,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,QAAQ,GAAG,iBAAiB,GAAG,iBAAiB,CAAC,EACvF,MAAM,EAAE,mBAAmB,EAC3B,QAAQ,EAAE,MAAM,GACf,IAAI,CA4CN"}
@@ -0,0 +1,39 @@
1
+ export type RegexAssertion = 'start' | 'end' | 'line-start' | 'line-end' | 'word' | 'not-word';
2
+ /**
3
+ * One single-unit atom. `ranges` is the exact inclusive set when the atom is a literal or a
4
+ * bracket class of plain characters and ranges; every other atom answers through `matches`, a
5
+ * native one-character expression. Equal atoms are one object, so `key` identifies it.
6
+ */
7
+ export interface UnitAtom {
8
+ key: string;
9
+ ranges?: readonly (readonly [number, number])[];
10
+ matches(unit: number): boolean;
11
+ }
12
+ export type RegexNode = {
13
+ kind: 'empty';
14
+ } | {
15
+ kind: 'unit';
16
+ atom: UnitAtom;
17
+ } | {
18
+ kind: 'assert';
19
+ at: RegexAssertion;
20
+ } | {
21
+ kind: 'sequence';
22
+ items: RegexNode[];
23
+ } | {
24
+ kind: 'alternation';
25
+ options: RegexNode[];
26
+ } | {
27
+ kind: 'repeat';
28
+ body: RegexNode;
29
+ min: number;
30
+ max: number;
31
+ };
32
+ /** Thrown with the construct a host-facing refusal names. */
33
+ export declare class UnsupportedRegexSyntax extends Error {
34
+ }
35
+ /** Counted repetition is unrolled; a larger bound is refused before it can allocate. */
36
+ export declare const MAX_REGEX_REPEAT = 1000;
37
+ /** Parses a pattern the native engine has already accepted without flags. */
38
+ export declare function parseSearchRegex(pattern: string, check: () => void): RegexNode;
39
+ //# sourceMappingURL=coding-search-regex-syntax.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coding-search-regex-syntax.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-search-regex-syntax.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,KAAK,GAAG,YAAY,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC;AAE/F;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;IAChD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CAChC;AAED,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,EAAE,EAAE,cAAc,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,SAAS,EAAE,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,OAAO,EAAE,SAAS,EAAE,CAAA;CAAE,GAC7C;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAElE,6DAA6D;AAC7D,qBAAa,sBAAuB,SAAQ,KAAK;CAAG;AAEpD,wFAAwF;AACxF,eAAO,MAAM,gBAAgB,OAAQ,CAAC;AA4BtC,6EAA6E;AAC7E,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,GAAG,SAAS,CAqL9E"}
@@ -0,0 +1,31 @@
1
+ import { type UnitAtom } from './coding-search-regex-syntax.js';
2
+ /** What a position's assertions can observe about a neighbouring unit. */
3
+ export declare const Ahead: {
4
+ End: number;
5
+ Word: number;
6
+ LineTerminator: number;
7
+ Other: number;
8
+ };
9
+ export type Ahead = (typeof Ahead)[keyof typeof Ahead];
10
+ export declare const classify: (unit: number) => Ahead;
11
+ /** Atom memberships the range partition may hold, summed over its segments. */
12
+ export declare const MAX_RANGE_MEMBERSHIPS: number;
13
+ /**
14
+ * Atoms the engine must answer per unit: only classes whose ranges the engine check sent back,
15
+ * since literals, escapes, classes and dot all carry ranges. Their work is this × 65,536 units.
16
+ */
17
+ export declare const MAX_NATIVE_ATOMS = 64;
18
+ /**
19
+ * UTF-16 units the automaton cannot tell apart share one class: the same range segment, the
20
+ * same answers from every native atom and the same kind for word and line assertions.
21
+ * Transitions are keyed by class, so a text over a large alphabet caches as few transitions as
22
+ * the pattern distinguishes. Classes are at most the 65,536 units, each with a fixed-size bit
23
+ * set over the native atoms, so the table needs no eviction.
24
+ */
25
+ export declare function unitClasses(atoms: UnitAtom[], check: () => void): {
26
+ classOf: (unit: number) => number;
27
+ kindOf: (unitClass: number) => Ahead;
28
+ atomsOf: (unitClass: number) => readonly UnitAtom[];
29
+ matches: (atom: UnitAtom, unitClass: number) => boolean;
30
+ };
31
+ //# sourceMappingURL=coding-search-unit-classes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coding-search-unit-classes.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-search-unit-classes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAA0B,MAAM,8BAA8B,CAAC;AAErF,0EAA0E;AAC1E,eAAO,MAAM,KAAK;;;;;CAGjB,CAAC;AACF,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,OAAO,KAAK,CAAC,CAAC;AASvD,eAAO,MAAM,QAAQ,SAAU,MAAM,KAAG,KACiD,CAAC;AAE1F,+EAA+E;AAC/E,eAAO,MAAM,qBAAqB,QAAU,CAAC;AAC7C;;;GAGG;AACH,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAwEnC;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,IAAI;oBAoBvC,MAAM,KAAG,MAAM;wBAwBhB,MAAM,KAAG,KAAK;yBACb,MAAM,KAAG,SAAS,QAAQ,EAAE;oBASjC,QAAQ,aAAa,MAAM,KAAG,OAAO;EASxD"}
@@ -5,6 +5,7 @@ export declare function runCodingShell(input: {
5
5
  executable: string;
6
6
  args: readonly string[];
7
7
  cwd: string;
8
+ cwdDescriptor?: number;
8
9
  environment: Readonly<Record<string, string>>;
9
10
  signal?: AbortSignal;
10
11
  timeoutMs: number;
@@ -1 +1 @@
1
- {"version":3,"file":"coding-shell-process.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-shell-process.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,qBAAqB,EAAqB,MAAM,wBAAwB,CAAC;AAEvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAuCrD,wBAAsB,cAAc,CAAC,KAAK,EAAE;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9C,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAC/C,aAAa,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/E,KAAK,CAAC,EAAE,MAAM,UAAU,CAAC,WAAW,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CACrE;;;;;;;;;;;;;;;GA2JA"}
1
+ {"version":3,"file":"coding-shell-process.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-shell-process.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,qBAAqB,EAAqB,MAAM,wBAAwB,CAAC;AAEvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAuCrD,wBAAsB,cAAc,CAAC,KAAK,EAAE;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9C,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAC/C,aAAa,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/E,KAAK,CAAC,EAAE,MAAM,UAAU,CAAC,WAAW,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CACrE;;;;;;;;;;;;;;;GA4JA"}
@@ -2,6 +2,14 @@ import { z } from 'zod';
2
2
  import type { ToolTransport } from '../contract/define.js';
3
3
  import type { AgentProcessSandbox, AgentSandboxRestriction } from './sandbox.js';
4
4
  export declare const AgentCodingToolLimitsSchema: z.ZodObject<{
5
+ maxSearchResults: z.ZodInt;
6
+ maxSearchFiles: z.ZodInt;
7
+ maxSearchDepth: z.ZodInt;
8
+ maxSearchDirectories: z.ZodInt;
9
+ maxSearchEntries: z.ZodInt;
10
+ maxSearchBytes: z.ZodInt;
11
+ maxSearchOutputBytes: z.ZodInt;
12
+ searchTimeoutMs: z.ZodInt;
5
13
  maxPathBytes: z.ZodInt;
6
14
  maxReadBytes: z.ZodInt;
7
15
  maxWriteBytes: z.ZodInt;
@@ -10,9 +18,6 @@ export declare const AgentCodingToolLimitsSchema: z.ZodObject<{
10
18
  maxShellOutputBytes: z.ZodInt;
11
19
  maxArtifactBytes: z.ZodInt;
12
20
  maxListEntries: z.ZodInt;
13
- maxSearchResults: z.ZodInt;
14
- maxSearchFiles: z.ZodInt;
15
- maxSearchDepth: z.ZodInt;
16
21
  shellTimeoutMs: z.ZodInt;
17
22
  shellTerminationGraceMs: z.ZodInt;
18
23
  }, z.core.$strict>;
@@ -1 +1 @@
1
- {"version":3,"file":"coding-tool-contract.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAE9E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;kBAgB7B,CAAC;AAEZ,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA8D7C,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAA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B,EAC7B,MAAM,EAAE,qBAAqB,GAC5B,SAAS,yBAAyB,EAAE,CAyKtC"}
1
+ {"version":3,"file":"coding-tool-files.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-files.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAK3B,MAAM,wBAAwB,CAAC;AAoDhC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,qBAAqB,GAC5B,SAAS,yBAAyB,EAAE,CAyKtC"}
@@ -1,15 +1,5 @@
1
1
  import type { AgentCodingToolConfig, AgentCodingToolDefinition, AgentCodingToolLimits } from './coding-tool-contract.js';
2
- /** The same set `search_files` skips, so one workspace has one idea of noise. */
2
+ /** The same set search_files skips. List shows these directories explicitly. */
3
3
  export declare const DEFAULT_EXCLUDED_DIRECTORIES: string[];
4
- /**
5
- * Compile one workspace glob into a regular expression.
6
- *
7
- * A deliberate subset — `**`, `*`, `?`, and nothing else — written here rather
8
- * than taken as a dependency: the whole surface has one runtime dependency, and
9
- * a matcher this size does not earn a second. Everything outside the subset is
10
- * escaped, so a pattern containing regex punctuation matches it literally
11
- * instead of meaning something the caller did not write.
12
- */
13
- export declare function compileWorkspaceGlob(pattern: string): RegExp;
14
4
  export declare function createListingCodingTools(config: AgentCodingToolConfig, limits: AgentCodingToolLimits): readonly AgentCodingToolDefinition[];
15
5
  //# sourceMappingURL=coding-tool-listing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"coding-tool-listing.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-listing.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAehC,iFAAiF;AACjF,eAAO,MAAM,4BAA4B,UAQxC,CAAC;AA6CF;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA2B5D;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,qBAAqB,GAC5B,SAAS,yBAAyB,EAAE,CA6HtC"}
1
+ {"version":3,"file":"coding-tool-listing.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-listing.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAahC,gFAAgF;AAChF,eAAO,MAAM,4BAA4B,UAQxC,CAAC;AA0CF,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,qBAAqB,GAC5B,SAAS,yBAAyB,EAAE,CAgMtC"}
@@ -1,4 +1,6 @@
1
+ import type { ContainedFileHandle } from '../internal/contained-handle.js';
1
2
  import { type AgentCodingToolAuthorization, type AgentCodingToolConfig } from './coding-tool-contract.js';
3
+ import type { ContainedScanBudget } from './contained-scan-budget.js';
2
4
  export declare function boundedCodingRelativePath(root: string, requested: string, maxPathBytes: number): string;
3
5
  export declare function existingCodingPath(root: string, requested: string, maxPathBytes: number): Promise<{
4
6
  absolute: string;
@@ -42,8 +44,10 @@ export declare function authorizeCodingPath(config: AgentCodingToolConfig, path:
42
44
  * and a policy that keeps an audit no longer sees the leaf once an ancestor has
43
45
  * refused.
44
46
  */
45
- export declare function authorizeCodingPathChain(config: AgentCodingToolConfig, relative: string): Promise<void>;
47
+ export declare function authorizeCodingPathChain(config: AgentCodingToolConfig, relative: string, root: ContainedFileHandle, budget?: ContainedScanBudget): Promise<void>;
46
48
  /** Serialize framework-owned compare-and-replace transactions for one canonical target. */
47
- export declare function withCodingPathLock<T>(target: string, work: () => Promise<T>): Promise<T>;
49
+ export declare function withCodingPathLock<T>(root: ContainedFileHandle, relative: string, work: () => Promise<T>): Promise<T>;
48
50
  export declare function textOccurrences(source: string, search: string): number;
51
+ /** Select the workspace capability before any asynchronous host policy runs. */
52
+ export declare function withCodingRoot<T>(configured: string, work: (root: ContainedFileHandle, canonicalPath: string) => Promise<T>): Promise<T>;
49
53
  //# sourceMappingURL=coding-tool-paths.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"coding-tool-paths.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-paths.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,4BAA4B,EAEjC,KAAK,qBAAqB,EAE3B,MAAM,wBAAwB,CAAC;AAwChC,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,MAAM,CA6CR;AAED,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM;;;GAKrB;AAED,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM;;;GAarB;AAED,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM;;;GAQrB;AAED,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,qBAAqB,EAC7B,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,IAAI,CAAC,CAGf;AAED,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,qBAAqB,EAC7B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,OAAO,CAAC,CAIlB;AAED,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,qBAAqB,EAC7B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAWf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,qBAAqB,EAC7B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IA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AAM,EAAE,qBAAqB,EAC7B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAWf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,qBAAqB,EAC7B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,mBAAmB,EACzB,MAAM,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAgCf;AAID,2FAA2F;AAC3F,wBAAsB,kBAAkB,CAAC,CAAC,EACxC,IAAI,EAAE,mBAAmB,EACzB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACrB,OAAO,CAAC,CAAC,CAAC,CAiBZ;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAUtE;AAED,gFAAgF;AAChF,wBAAsB,cAAc,CAAC,CAAC,EACpC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,CAAC,IAAI,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GACrE,OAAO,CAAC,CAAC,CAAC,CAQZ"}
@@ -61,6 +61,12 @@ export declare function codingPathRefusal(code: CodingRefusalCode, message: stri
61
61
  * model can do about it, and keeps being scrubbed. Default-deny by omission.
62
62
  */
63
63
  export declare function refuseMissingCodingPath(error: unknown, relative: string): never;
64
+ /**
65
+ * A directory argument (`list_directory` and `glob` paths, `run_command` cwd) that cannot be
66
+ * opened as a directory. Directory capabilities never follow a symlink, so a symlink alias is
67
+ * refused the same way as a file, and the model is told to name the real directory.
68
+ */
69
+ export declare function refuseUnopenableCodingDirectory(error: unknown, relative: string): never;
64
70
  /**
65
71
  * The write failures a caller can act on: something else occupies the path. A
66
72
  * lost race and a stale check end here too, so each has one answer however it
@@ -1 +1 @@
1
- {"version":3,"file":"coding-tool-refusals.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-refusals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH;;;;;;;;;;GAUG;AACH,QAAA,MAAM,aAAa,0IAQ4B,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAClF,KAAK,CAUP;AAED,iEAAiE;AACjE,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GACjE,KAAK,CAKP;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,KAAK,CAmC/E;AAgBD;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACpC,KAAK,CAkCP;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK,CASpE"}
1
+ {"version":3,"file":"coding-tool-refusals.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-refusals.ts"],"names":[],"mappings":"AAAA;;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sources":["../../src/agent-runtime/coding-tool-search-patch.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAyWhC,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,qBAAqB,GAC5B,SAAS,yBAAyB,EAAE,CAsBtC"}
1
+ {"version":3,"file":"coding-tool-search-patch.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-search-patch.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AA8KhC,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,qBAAqB,GAC5B,SAAS,yBAAyB,EAAE,CAWtC"}