@yanlinglabs/winter-agent-runtime 0.0.41 → 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.
- package/dist/commands/resolver.d.ts +8 -13
- package/dist/context/agent-listing.d.ts +7 -11
- package/dist/context/attachments.d.ts +14 -23
- package/dist/context/dynamic-sections.d.ts +5 -5
- package/dist/context/git-branch-fixture.d.ts +22 -0
- package/dist/context/git-status.d.ts +2 -2
- package/dist/context/memory.d.ts +1 -1
- package/dist/context/output-styles.d.ts +2 -2
- package/dist/context/request-layout.d.ts +16 -17
- package/dist/context/seam.d.ts +7 -6
- package/dist/embedded-worker.js +3 -3
- package/dist/embedded.js +3 -3
- package/dist/engine.d.ts +3 -3
- package/dist/{index-ey5c52j3.js → index-14xkt4jp.js} +2 -2
- package/dist/{index-hdvvezf8.js → index-bh1ve8ws.js} +238 -154
- package/dist/{index-z9yngxj4.js → index-kqc3tdph.js} +964 -826
- package/dist/index.js +1 -1
- package/dist/mcp/lifecycle.d.ts +2 -1
- package/dist/permissions/edit-recognition.d.ts +1 -1
- package/dist/permissions/evaluator.d.ts +19 -30
- package/dist/permissions/file-rules.d.ts +177 -277
- package/dist/permissions/grammar.d.ts +58 -0
- package/dist/permissions/policy-state.d.ts +1 -1
- package/dist/permissions/ruleset.d.ts +1 -1
- package/dist/permissions/shell-structure.d.ts +1 -1
- package/dist/plugins/bundle.d.ts +4 -6
- package/dist/plugins/loader.corpus-fixture.d.ts +26 -0
- package/dist/plugins/loader.d.ts +3 -4
- package/dist/plugins/manifest.d.ts +23 -46
- package/dist/production-wiring.d.ts +1 -1
- package/dist/provider/lean-prompt.d.ts +1 -6
- package/dist/sandbox/profile.d.ts +39 -79
- package/dist/sandbox/spawn.d.ts +5 -6
- package/dist/skills/listing.d.ts +8 -26
- package/dist/skills/store.d.ts +2 -3
- package/dist/store/dialect.d.ts +1 -1
- package/dist/subagents/availability.d.ts +10 -8
- package/dist/subagents/child-handle.d.ts +5 -5
- package/dist/subagents/definitions.d.ts +7 -6
- package/dist/subagents/fork.d.ts +4 -8
- package/dist/subagents/notification-queue.d.ts +30 -38
- package/dist/testing.js +2 -2
- package/dist/tools/descriptors/web-fetch.d.ts +1 -1
- package/dist/tools/descriptors/web-search.d.ts +1 -1
- package/dist/tools/impl/_search-budget.d.ts +1 -1
- package/dist/tools/impl/_web-fetch-net.d.ts +6 -6
- package/dist/tools/impl/_web-search-assembler.d.ts +7 -20
- package/dist/tools/impl/background-task-runtime.d.ts +13 -13
- package/dist/tools/impl/bash.d.ts +3 -3
- package/dist/tools/impl/monitor.d.ts +2 -2
- package/dist/toolsearch/exposure.d.ts +3 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/web/fetchable-url.d.ts +1 -1
- package/dist/web/preapproved-hosts.d.ts +9 -31
- package/dist/workflows/store.d.ts +23 -31
- package/package.json +4 -4
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The 92 literals exactly as they appear in `c7t`'s source order (duplicate `learn.microsoft.com`
|
|
3
|
-
* included) -- kept verbatim so a future re-extraction diffs cleanly against this array.
|
|
4
|
-
*/
|
|
1
|
+
/** The 92 entries, duplicate `learn.microsoft.com` included. */
|
|
5
2
|
export declare const PREAPPROVED_HOST_ENTRIES: readonly string[];
|
|
6
|
-
/**
|
|
7
|
-
* `wX(hostname, pathname)`, verbatim: an EXACT hostname match (no subdomains) against the
|
|
8
|
-
* hostname-only half, OR a hostname with a registered path prefix whose pathname is that prefix or a
|
|
9
|
-
* `/`-bounded child of it -- rejected outright when the raw pathname contains an encoded slash,
|
|
10
|
-
* backslash or dot (`%2f`, `%5c`, `%2e`, doubly-encoded or not), which is exactly the traversal class
|
|
11
|
-
* that would otherwise let `/docs%2f..%2fadmin` read as a legitimate child of `/docs`.
|
|
12
|
-
*/
|
|
3
|
+
/** Whether `hostname` + `pathname` (raw strings) fall under a preapproved entry. */
|
|
13
4
|
export declare function isPreapprovedHost(hostname: string, pathname: string): boolean;
|
|
14
5
|
/** `isPreapprovedHost`, taking the URL directly. A URL that fails to parse is never preapproved. */
|
|
15
6
|
export declare function isPreapprovedUrl(url: URL): boolean;
|
|
@@ -24,29 +15,16 @@ export interface PreapprovedMatch {
|
|
|
24
15
|
pathPrefix?: string;
|
|
25
16
|
}
|
|
26
17
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* the SECOND hop, on hostname `www.claude.com` -- which `PATH_PREFIXES` only ever keys by
|
|
32
|
-
* `claude.com`, so the old exact match returned `undefined` for it. An `undefined` scope makes
|
|
33
|
-
* `isEligibleAutoFollow`'s own `scope !== undefined && ...` check SHORT-CIRCUIT to "no restriction
|
|
34
|
-
* at all," so the THIRD hop (genuinely outside `/docs`) was auto-followed, not refused -- and because
|
|
35
|
-
* `claude.com/docs/a` (the ORIGINAL input URL) is still preapproved, that off-scope content got
|
|
36
|
-
* permissive guidelines and was eligible for the verbatim markdown passthrough. Matching hosts the
|
|
37
|
-
* same three-way way `staysWithinScope` does closes it: hop 2 now still resolves a scope (matched via
|
|
38
|
-
* the `claude.com` entry), and `staysWithinScope` correctly refuses hop 3's `/other` path.
|
|
18
|
+
* The preapproved scope `url` falls under, matching its host, that host without a leading `www.`,
|
|
19
|
+
* and that stripped form with `www.` re-added (security review round 2: an exact-host-only match let
|
|
20
|
+
* a redirect chain `claude.com/docs/a` -> `www.claude.com/docs/a` -> `www.claude.com/other` lose its
|
|
21
|
+
* scope at the second hop, so the third, off-scope hop was auto-followed).
|
|
39
22
|
*/
|
|
40
23
|
export declare function preapprovedScopeOf(url: URL): PreapprovedMatch | undefined;
|
|
41
24
|
/**
|
|
42
25
|
* Whether `url` still falls under the SAME preapproved scope `from` matched -- used by the redirect
|
|
43
|
-
* walk's "not leaving a preapproved path scope" gate.
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* §4.8, measured): `[host, stripped, "www."+stripped]`, i.e. the scope's own host, that host with a
|
|
47
|
-
* leading `www.` stripped, and that stripped form with `www.` re-added -- so a scope matched on
|
|
48
|
-
* `claude.com/docs` still covers a redirect to `www.claude.com/docs/x`, and one matched on
|
|
49
|
-
* `www.example.com/docs` still covers a redirect to `example.com/docs/x`. An EXACT match only (this
|
|
50
|
-
* lane's earlier version) refused a same-site www-variant redirect claude itself follows.
|
|
26
|
+
* walk's "not leaving a preapproved path scope" gate. The host may be the scope's own host, that host
|
|
27
|
+
* without a leading `www.`, or that with `www.` re-added (claude follows a same-site www-variant
|
|
28
|
+
* redirect -- security review corrections §4.8).
|
|
51
29
|
*/
|
|
52
30
|
export declare function staysWithinScope(from: PreapprovedMatch, url: URL): boolean;
|
|
@@ -86,42 +86,37 @@ export interface WorkflowListingEntry {
|
|
|
86
86
|
source: "project" | "user" | "plugin";
|
|
87
87
|
/** The script's real filesystem path -- carried through so a caller building a `SkillMeta`-shaped synthetic entry (production-wiring.ts) never has to invent one. */
|
|
88
88
|
path: string;
|
|
89
|
-
/** Fix round 4 (I-E): carried through for a synthetic skill/command prompt's own structure -- claude's
|
|
89
|
+
/** Fix round 4 (I-E): carried through for a synthetic skill/command prompt's own structure -- claude's workflow command carries both alongside name/description. */
|
|
90
90
|
whenToUse?: string;
|
|
91
91
|
phases?: WorkflowMetaPhase[];
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
|
-
* SV-5 (batch-2, second round, extended in fix round 3) -- the router same-view test:
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* `
|
|
100
|
-
* result through a `{type:"prompt", name: o.name, description: o.description, ...}` projection,
|
|
101
|
-
* `o.name` already being the qualified/bare identity discovery assigned. `production-wiring.ts` is
|
|
102
|
-
* the one caller, folding this into all three listing surfaces.
|
|
94
|
+
* SV-5 (batch-2, second round, extended in fix round 3) -- the router same-view test: claude lists
|
|
95
|
+
* EVERY discovered workflow (user + project + plugin; built-ins are handled separately, and Winter
|
|
96
|
+
* ships none -- see `BUILTIN_WORKFLOWS`) in the init `skills`/`slash_commands` fields and the
|
|
97
|
+
* model-facing Skill listing, as a prompt-type command named `<plugin>:<meta.name>` for a plugin
|
|
98
|
+
* workflow or bare `<meta.name>` for a user/project one, with the workflow's description.
|
|
99
|
+
* `production-wiring.ts` is the one caller, folding this into all three listing surfaces.
|
|
103
100
|
*
|
|
104
|
-
* ORDER matches claude's
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
101
|
+
* ORDER matches claude's listing: plugin entries first (builtins would lead, but Winter has none to
|
|
102
|
+
* list), then user+project merged and name-sorted -- a project entry overriding a user entry of the
|
|
103
|
+
* same name the same way resolution above does, so listing and resolution can never disagree about
|
|
104
|
+
* which tier's copy is "the" workflow of that name.
|
|
108
105
|
*/
|
|
109
106
|
export declare function listWorkflowsForListing(opts: WorkflowDiscoveryOptions): WorkflowListingEntry[];
|
|
110
107
|
/**
|
|
111
|
-
* Fix round 4 (I-E, the router same-view test): claude
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* invoke the Workflow tool by name. `SkillMeta` has no dedicated "workflow" shape, so this builds the
|
|
108
|
+
* Fix round 4 (I-E, the router same-view test): claude offers every discovered workflow as a
|
|
109
|
+
* prompt-type command whose PROMPT runs the named workflow and carries the description, `whenToUse`
|
|
110
|
+
* and phases, ending with an instruction to invoke the Workflow tool by name. `SkillMeta` has no dedicated "workflow" shape, so this builds the
|
|
115
111
|
* BODY TEXT `SkillIndex`'s own synthetic-entry seam (`SkillIndexOptions.syntheticSkills`) stores for
|
|
116
112
|
* `Skill("<name>")` to return -- the WS-11 §2.3 contract ("invocation inserts the resolved skill
|
|
117
113
|
* instructions into the main conversation") applied to a workflow instead of a SKILL.md body.
|
|
118
114
|
*
|
|
119
115
|
* THE PROMPT TEXT IS WINTER-AUTHORED, per the user's own ruling that prompts stay Winter's own
|
|
120
116
|
* wording while INTERFACE strings (a field name, a listing label, an error message) may ship
|
|
121
|
-
* verbatim
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* instruction) is preserved; the wording is not claude's.
|
|
117
|
+
* verbatim -- this is prompt content the model reads and acts on, not an interface string, so it is
|
|
118
|
+
* worded fresh here. The prompt carries name, description, `whenToUse`, phases, then the invoke
|
|
119
|
+
* instruction; the wording is Winter's own.
|
|
125
120
|
*
|
|
126
121
|
* Fix round 5 (promoted minor, the re-review of 57e7fef..20b623e): `/plugin:name some args` must
|
|
127
122
|
* carry `some args` into the invoke line as `Workflow({ name, args })`, matching claude. This
|
|
@@ -136,15 +131,12 @@ export declare function listWorkflowsForListing(opts: WorkflowDiscoveryOptions):
|
|
|
136
131
|
* a bare `/name` with nothing after it, where the tokens substitute to `""`/`'""'`) recognises it
|
|
137
132
|
* does not apply and falls back to the first, unconditional line instead.
|
|
138
133
|
*
|
|
139
|
-
* Fix round 6 (a promoted minor
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* out of the quoted literal. `$ARGUMENTS_JSON` (`commands/resolver.ts`'s new second token) substitutes
|
|
146
|
-
* with `JSON.stringify(args)` instead -- already quoted and escaped -- so this line writes NO quotes
|
|
147
|
-
* of its own around it.
|
|
134
|
+
* Fix round 6 (a promoted minor): the args value must arrive as a JSON string literal (quoted,
|
|
135
|
+
* with `"` and `\` escaped), as claude passes a workflow command's args. Using the RAW `$ARGUMENTS`
|
|
136
|
+
* token inside hand-written quotes (round 5's own shape) would let a literal `"` or `\` in the typed
|
|
137
|
+
* args break out of the quoted literal. `$ARGUMENTS_JSON` (`commands/resolver.ts`'s new second
|
|
138
|
+
* token) substitutes with `JSON.stringify(args)` instead -- already quoted and escaped -- so this
|
|
139
|
+
* line writes NO quotes of its own around it.
|
|
148
140
|
*/
|
|
149
141
|
export declare function buildWorkflowSkillPrompt(entry: WorkflowListingEntry): string;
|
|
150
142
|
export interface SessionScriptLocation {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yanlinglabs/winter-agent-runtime",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
"@modelcontextprotocol/client": "^2.1.0",
|
|
74
74
|
"ajv": "^8.20.0",
|
|
75
75
|
"ignore": "7.0.5",
|
|
76
|
-
"@yanlinglabs/winter-agent-sdk": "0.0.
|
|
77
|
-
"@yanlinglabs/winter-provider-
|
|
78
|
-
"@yanlinglabs/winter-provider-
|
|
76
|
+
"@yanlinglabs/winter-agent-sdk": "0.0.43",
|
|
77
|
+
"@yanlinglabs/winter-provider-runtime": "0.0.43",
|
|
78
|
+
"@yanlinglabs/winter-provider-catalog": "0.0.43"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@modelcontextprotocol/server": "^2.1.0"
|