@yanlinglabs/winter-agent-runtime 0.0.40 → 0.0.43

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 (58) hide show
  1. package/dist/commands/resolver.d.ts +8 -13
  2. package/dist/context/agent-listing.d.ts +7 -11
  3. package/dist/context/attachments.d.ts +14 -23
  4. package/dist/context/dynamic-sections.d.ts +5 -5
  5. package/dist/context/git-branch-fixture.d.ts +22 -0
  6. package/dist/context/git-status.d.ts +2 -2
  7. package/dist/context/memory.d.ts +1 -1
  8. package/dist/context/output-styles.d.ts +2 -2
  9. package/dist/context/request-layout.d.ts +16 -17
  10. package/dist/context/seam.d.ts +7 -6
  11. package/dist/embedded-worker.js +3 -3
  12. package/dist/embedded.js +3 -3
  13. package/dist/engine.d.ts +3 -3
  14. package/dist/{index-r7yjcppm.js → index-14xkt4jp.js} +2 -2
  15. package/dist/{index-rhxkckyn.js → index-bh1ve8ws.js} +238 -154
  16. package/dist/{index-a8j104mg.js → index-kqc3tdph.js} +980 -828
  17. package/dist/index.js +1 -1
  18. package/dist/mcp/lifecycle.d.ts +2 -1
  19. package/dist/permissions/edit-recognition.d.ts +1 -1
  20. package/dist/permissions/evaluator.d.ts +19 -30
  21. package/dist/permissions/file-rules.d.ts +177 -277
  22. package/dist/permissions/grammar.d.ts +58 -0
  23. package/dist/permissions/policy-state.d.ts +1 -1
  24. package/dist/permissions/ruleset.d.ts +1 -1
  25. package/dist/permissions/shell-structure.d.ts +1 -1
  26. package/dist/plugins/bundle.d.ts +4 -6
  27. package/dist/plugins/loader.corpus-fixture.d.ts +26 -0
  28. package/dist/plugins/loader.d.ts +3 -4
  29. package/dist/plugins/manifest.d.ts +23 -46
  30. package/dist/production-wiring.d.ts +1 -1
  31. package/dist/provider/lean-prompt.d.ts +1 -6
  32. package/dist/sandbox/profile.d.ts +39 -79
  33. package/dist/sandbox/spawn.d.ts +5 -6
  34. package/dist/skills/listing.d.ts +8 -26
  35. package/dist/skills/store.d.ts +2 -3
  36. package/dist/store/dialect.d.ts +1 -1
  37. package/dist/subagents/availability.d.ts +10 -8
  38. package/dist/subagents/child-handle.d.ts +5 -5
  39. package/dist/subagents/definitions.d.ts +7 -6
  40. package/dist/subagents/fork.d.ts +4 -8
  41. package/dist/subagents/notification-queue.d.ts +30 -38
  42. package/dist/testing.js +2 -2
  43. package/dist/tools/descriptors/web-fetch.d.ts +1 -1
  44. package/dist/tools/descriptors/web-search.d.ts +1 -1
  45. package/dist/tools/impl/_search-budget.d.ts +1 -1
  46. package/dist/tools/impl/_web-fetch-net.d.ts +6 -6
  47. package/dist/tools/impl/_web-search-assembler.d.ts +7 -20
  48. package/dist/tools/impl/background-task-runtime.d.ts +13 -13
  49. package/dist/tools/impl/bash.d.ts +3 -3
  50. package/dist/tools/impl/monitor.d.ts +2 -2
  51. package/dist/tools/registry.d.ts +12 -0
  52. package/dist/toolsearch/exposure.d.ts +3 -3
  53. package/dist/version.d.ts +1 -1
  54. package/dist/version.js +1 -1
  55. package/dist/web/fetchable-url.d.ts +1 -1
  56. package/dist/web/preapproved-hosts.d.ts +9 -31
  57. package/dist/workflows/store.d.ts +23 -31
  58. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -55,7 +55,7 @@ import {
55
55
  DEFAULT_CLASSIFIER_TIMEOUT_MS2,
56
56
  createModelClassifier2,
57
57
  selectClassifierRoute2
58
- } from "./index-a8j104mg.js";
58
+ } from "./index-kqc3tdph.js";
59
59
  import"./index-1hef2gff.js";
60
60
  import"./index-mwew595z.js";
61
61
  import"./index-2wgfv0pa.js";
@@ -79,7 +79,7 @@ export { validateServerConfig };
79
79
  * server that under their brand is called `acme`.
80
80
  *
81
81
  * The parameter defaults to `WINTER_SERVER_NAME`, so every existing caller and fixture keeps today's
82
- * behaviour byte for byte.
82
+ * behaviour unchanged.
83
83
  */
84
84
  export declare function resolveMcpServerSources(sources: readonly McpServerSource[], opts: {
85
85
  strictMcpConfig?: boolean;
@@ -95,6 +95,7 @@ export interface McpDiscoveryCache {
95
95
  }
96
96
  export declare function createInMemoryDiscoveryCache(): McpDiscoveryCache;
97
97
  export declare const FIRST_TURN_MCP_WAIT_DEFAULT_MS = 2000;
98
+ /** The first-turn MCP wait's deadline: 2000 ms, or MCP_TIMEOUT when the explicit MCP config asks for the long wait (spec: first-turn-mcp-wait.md). */
98
99
  export declare function firstTurnMcpWaitDeadlineMs(opts: {
99
100
  strictMcpConfig?: boolean;
100
101
  explicitServers?: Readonly<Record<string, unknown>>;
@@ -25,6 +25,6 @@ export declare function recognizeEditOperation(call: {
25
25
  * Why a shell command's WRITES cannot be auto-approved, or `undefined`: a process substitution, a
26
26
  * command that cannot be parsed, a write target that is a variable/command expansion, a `~user` form
27
27
  * or a glob, and `cp`/`mv` with ANY flag (`--target-directory=PATH` hides the destination). The
28
- * working-directory and `cd` checks that follow claude's are evaluator.ts's (they need the session).
28
+ * working-directory and `cd` checks that follow these are evaluator.ts's (they need the session).
29
29
  */
30
30
  export declare function shellWriteConstraint(command: string): string | undefined;
@@ -82,8 +82,8 @@ export interface EvaluationContext {
82
82
  cwd: string;
83
83
  /**
84
84
  * Does this Bash call's `dangerouslyDisableSandbox` actually take it OUT of a sandbox it would
85
- * otherwise run in? (dist-session fixes, lane C C3 -- claude's `!shouldUseSandbox(input) &&
86
- * shouldUseSandbox({...input, dangerouslyDisableSandbox: false})`.) False when the session's sandbox
85
+ * otherwise run in? (dist-session fixes, lane C C3 -- the call would be sandboxed without the flag
86
+ * and is not sandboxed with it.) False when the session's sandbox
87
87
  * is off, when the policy forbids unsandboxed commands (the flag is then ignored), or when the
88
88
  * command is an allowed `excludedCommands` entry. Only such a call is an ESCAPE, handled by
89
89
  * `resolveSandboxEscape`. Injected because the evaluator cannot see the session's sandbox settings;
@@ -133,8 +133,8 @@ export interface EvaluationContext {
133
133
  /**
134
134
  * The session's outputs directory (`RuntimeConfig.outputsDir`, exported to the shell as `$OUTDIR`).
135
135
  * Two effects, both mirroring what the Bash tool already does with it (a sandbox-writable root):
136
- * a shell write there is inside the session's writable directories (claude's sandbox-write-allowlist
137
- * step), and, when it sits inside the winter home, the protected floor's winter-home part does not
136
+ * a shell write there is inside the session's writable directories (sandbox-writable locations count
137
+ * as allowed write locations, as in Claude Code), and, when it sits inside the winter home, the protected floor's winter-home part does not
138
138
  * cover it (protected.ts's outputs carve-out). It is NOT a working directory: acceptEdits and the
139
139
  * mode allows are unchanged. Absent = no outputs directory.
140
140
  */
@@ -220,32 +220,21 @@ export declare const NO_SPECIAL_CHECKS: SpecialChecks;
220
220
  export declare function boundedRoots(ctx: EvaluationContext): string[];
221
221
  export declare function extractCandidateWritePaths(call: PermissionCall, ctx: EvaluationContext): string[];
222
222
  /**
223
- * Port of claude's `mL` (dump byte 14442494, pinned 2.1.250) -- the safety check `$K` (same byte
224
- * region) runs on every candidate write path BEFORE any other approval logic, unconditionally
225
- * forcing an ask (`classifierApprovable:!1` in claude's own source -- never classifier/auto-
226
- * approvable, unlike `$K`'s OTHER checks) when it fires. Ported here as a pure predicate; the
227
- * evaluator wires it in as a new stage-3 mandatory-ask reason, below.
228
- *
229
- * Two of claude's own branches are Windows/WSL-only BY CLAUDE'S OWN GATE and are DELIBERATELY
230
- * omitted, disclosed rather than silently dropped (this codebase targets macOS only, CLAUDE.md's own
231
- * latest-OS-floors rule):
232
- * - the `U()==="windows"||U()==="wsl"`-gated colon-position check (a second `:` after index 2,
233
- * Windows alternate-data-stream syntax) is genuinely inert off Windows/WSL in claude's OWN
234
- * source -- there is nothing to port.
235
- * - the trailing `Dg(e,!0)&&!Ha(e)&&!Fe(e,t)` clause is STRUCTURALLY DEAD on macOS in claude's own
236
- * source too: `Dg`'s (dump byte 14418249) own first line is `if(U()!=="windows")return!1`, which
237
- * short-circuits the whole `&&` chain to `false` on every non-Windows host claude itself runs
238
- * on. Porting an intentional no-op would just be dead code; omitted, disclosed rather than
239
- * silently dropped.
240
- *
241
- * `FU` (dump byte 11268201: `function FU(t){return lt.test(t)||t.includes("??")&&lt.test(pt(t))}`,
242
- * `pt` win32-normalizes only on Windows, else identity) IS ported below, in its macOS-reduced form
243
- * (`pt` is the identity function here, so `FU` reduces to the single regex test) -- claude calls it
244
- * unconditionally, not gated to Windows, so this is a straight port, not a judgment call. `lt`'s own
245
- * literal bytes (re-verified with a fresh byte-slice extraction after an advisor review caught a
246
- * narrower first draft: the dump's raw bytes are `[` `\` `\` `/` `]`, i.e. a JS source character
247
- * class holding an ESCAPED backslash plus a forward slash) is `/^[\\/]\?\?[\\/]/` -- EITHER separator
248
- * at both ends (`\??\`, `\??/`, `/??\`, `/??/`), not `/` alone.
223
+ * Whether a write target's path has a shape that Windows (or a Windows filesystem mounted elsewhere)
224
+ * could resolve to a DIFFERENT file than the text suggests. Such a write always asks, before any
225
+ * other approval logic, and is never classifier- or auto-approvable (stage 3's mandatory-ask
226
+ * reasons). Applied on every OS, as Claude Code does. True when ANY of these holds:
227
+ * - the path starts with a separator (`/` or `\`), then `??`, then a separator (an NT object path:
228
+ * `\??\`, `/??/`, `\??/`, `/??\`);
229
+ * - `~` followed by an ASCII digit appears anywhere (an 8.3 short name such as `PROGRA~1`);
230
+ * - the path starts with `\\?\`, `\\.\`, `//?/` or `//./` (a device or long-path prefix);
231
+ * - a path component -- splitting on both `/` and `\`, and skipping empty components, `.` and `..`
232
+ * -- ends in a `.` or a whitespace character (`\s`): Windows strips those, so `.bashrc.` and
233
+ * `.bashrc ` name `.bashrc` there (this covers a component of three or more dots too);
234
+ * - the WHOLE path ends in `.` plus a reserved device name -- `CON`, `PRN`, `AUX`, `NUL`, `COM1`-`COM9`
235
+ * or `LPT1`-`LPT9`, in any letter case (`notes.CON`). A bare device name (`/w/CON`) is not flagged.
236
+ * Windows-only checks that depend on running on Windows (alternate data streams, drive-relative
237
+ * paths) do not apply on macOS and are not made.
249
238
  */
250
239
  export declare function isSuspiciousPath(path: string): boolean;
251
240
  export declare const REAL_SPECIAL_CHECKS: SpecialChecks;