@yanlinglabs/winter-agent-runtime 0.0.36 → 0.0.38
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/context/attachments.d.ts +32 -0
- package/dist/embedded-worker.js +3 -3
- package/dist/embedded.js +3 -3
- package/dist/engine.d.ts +11 -1
- package/dist/{index-c8j57y8v.js → index-5xe59vkt.js} +561 -53
- package/dist/{index-1nhzy5e2.js → index-8x4yjdg7.js} +2 -2
- package/dist/{index-83p1g9ap.js → index-z3970wsj.js} +24 -9
- package/dist/index.js +1 -1
- package/dist/mcp/control.d.ts +1 -0
- package/dist/mcp/lifecycle.d.ts +3 -0
- package/dist/provider/mock.d.ts +1 -1
- package/dist/store/dialect.d.ts +1 -1
- package/dist/subagents/child-engine.d.ts +26 -0
- package/dist/testing.js +2 -2
- package/dist/tools/descriptors/index.d.ts +1 -0
- package/dist/tools/descriptors/search.d.ts +4 -0
- package/dist/tools/impl/_exa-client.d.ts +2 -0
- package/dist/tools/impl/_site-icons.d.ts +17 -0
- package/dist/tools/impl/_web-fetch-cache.d.ts +2 -0
- package/dist/tools/impl/index.d.ts +1 -0
- package/dist/tools/impl/search.d.ts +25 -0
- package/dist/tools/registry.d.ts +58 -0
- package/dist/toolsearch/exposure.d.ts +2 -0
- package/dist/toolsearch/search.d.ts +5 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/web/session-runtime.d.ts +8 -0
- package/package.json +4 -4
|
@@ -53,6 +53,24 @@ export interface PlanModeAttachment extends AttachmentPayload {
|
|
|
53
53
|
plansDirectoryFallback?: string;
|
|
54
54
|
hostPlanBody?: string;
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* claude's `deferred_tools_delta`: the DEFERRED tools (loaded through `ToolSearch` on first use) the
|
|
58
|
+
* history has not yet announced, and the ones it announced that are gone. Without it a model cannot know
|
|
59
|
+
* a deferred tool exists -- its schema is not in `tools` (or rides `defer_loading`, which the model does
|
|
60
|
+
* not see) -- so it could only find one by guessing a keyword. Persisted like every attachment, so the
|
|
61
|
+
* announcement is a stable, cacheable part of the history and a pool change costs one appended entry,
|
|
62
|
+
* never a moved prefix (claude's reason for the delta form over its older per-request
|
|
63
|
+
* `<available-deferred-tools>` prepend).
|
|
64
|
+
*/
|
|
65
|
+
export interface DeferredToolsDeltaAttachment extends AttachmentPayload {
|
|
66
|
+
type: "deferred_tools_delta";
|
|
67
|
+
addedNames: string[];
|
|
68
|
+
addedLines: string[];
|
|
69
|
+
removedNames: string[];
|
|
70
|
+
}
|
|
71
|
+
/** claude's own two headers for `deferred_tools_delta` (`utils/messages.ts`), verbatim. */
|
|
72
|
+
export declare const DEFERRED_TOOLS_ADDED_HEADER = "The following deferred tools are now available via ToolSearch:";
|
|
73
|
+
export declare const DEFERRED_TOOLS_REMOVED_HEADER = "The following deferred tools are no longer available (their MCP server disconnected). Do not search for them \u2014 ToolSearch will return no match:";
|
|
56
74
|
export declare const AGENT_LISTING_INITIAL_HEADER = "Available agent types for the Agent tool:";
|
|
57
75
|
export declare const AGENT_LISTING_ADDED_HEADER = "New agent types are now available for the Agent tool:";
|
|
58
76
|
export declare const AGENT_LISTING_REMOVED_HEADER = "The following agent types are no longer available:";
|
|
@@ -103,6 +121,20 @@ export interface AttachmentRendererOptions {
|
|
|
103
121
|
export declare function registerAttachmentRenderer(type: string, renderer: AttachmentRenderer, options?: AttachmentRendererOptions): void;
|
|
104
122
|
/** WS-23: whether this attachment's renderer opted into the mid-conversation `system` role. */
|
|
105
123
|
export declare function isSystemRoleAttachment(attachment: AttachmentPayload): boolean;
|
|
124
|
+
/**
|
|
125
|
+
* claude's fold for `deferred_tools_delta`: the deferred tool names the history has announced and not
|
|
126
|
+
* since withdrawn. A delta's `addedNames` count only when it carries `addedLines` (as the agent fold).
|
|
127
|
+
*/
|
|
128
|
+
export declare function announcedDeferredTools(messages: readonly ProviderMessage[]): Set<string>;
|
|
129
|
+
/**
|
|
130
|
+
* The `deferred_tools_delta` this history needs now, or `undefined` when nothing changed. `deferred` = the
|
|
131
|
+
* session's deferred tool names, as the model would call them; `offered` = EVERY name it is offered now,
|
|
132
|
+
* eager ones included. An announced name is withdrawn only when it is not offered AT ALL: a tool that went
|
|
133
|
+
* from deferred to eager (a switch to a provider that cannot search, which injects everything) is still
|
|
134
|
+
* there, and telling the model "do not search for it" would be false. It stays announced, so it is not
|
|
135
|
+
* re-announced if it defers again.
|
|
136
|
+
*/
|
|
137
|
+
export declare function computeDeferredToolsDelta(deferred: readonly string[], offered: readonly string[], history: readonly ProviderMessage[]): DeferredToolsDeltaAttachment | undefined;
|
|
106
138
|
/** The wrapped model-facing text for an attachment, or `undefined` when there is none (an unknown type included). */
|
|
107
139
|
export declare function renderAttachment(attachment: AttachmentPayload): string | undefined;
|
|
108
140
|
/** The history message for an attachment, or `undefined` when it renders to nothing (it is then not appended at all). */
|
package/dist/embedded-worker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./index-
|
|
1
|
+
import"./index-5xe59vkt.js";
|
|
2
2
|
import {
|
|
3
3
|
liveProcessGroups,
|
|
4
4
|
onProcessGroupChange
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
import"./index-mwew595z.js";
|
|
7
7
|
import"./index-2wgfv0pa.js";
|
|
8
8
|
import"./index-bef62z3r.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-z3970wsj.js";
|
|
10
10
|
import {
|
|
11
11
|
runEmbeddedSession2
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-8x4yjdg7.js";
|
|
13
13
|
import {
|
|
14
14
|
Queue
|
|
15
15
|
} from "./index-97t2rmtf.js";
|
package/dist/embedded.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runEmbeddedSession2
|
|
3
|
-
} from "./index-
|
|
4
|
-
import"./index-
|
|
5
|
-
import"./index-
|
|
3
|
+
} from "./index-8x4yjdg7.js";
|
|
4
|
+
import"./index-z3970wsj.js";
|
|
5
|
+
import"./index-5xe59vkt.js";
|
|
6
6
|
import"./index-2wgfv0pa.js";
|
|
7
7
|
import"./index-bef62z3r.js";
|
|
8
8
|
import"./index-1hef2gff.js";
|
package/dist/engine.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ import { type HookAuditRecord } from "./hooks/runner.js";
|
|
|
25
25
|
import { type DurableApprovalStore } from "./permissions/approvals.js";
|
|
26
26
|
import "./tools/descriptors/index.ts";
|
|
27
27
|
import "./tools/impl/index.ts";
|
|
28
|
-
import { type ToolResultBlock } from "./tools/registry.js";
|
|
28
|
+
import { type ToolResultBlock, type ToolResultSiteIcon } from "./tools/registry.js";
|
|
29
29
|
import { type ResolvedReviewer } from "./tools/impl/advisor.js";
|
|
30
30
|
import type { AuxiliaryModelResolution } from "./provider/session-provider.js";
|
|
31
31
|
import type { ToolSecretResolver } from "./provider/tool-secret.js";
|
|
@@ -547,6 +547,15 @@ export declare function contentForHost(content: ContentBlock[]): ContentBlock[];
|
|
|
547
547
|
* Everything else is returned by identity.
|
|
548
548
|
*/
|
|
549
549
|
export declare function toolResultsForHost(content: ContentBlock[]): ContentBlock[];
|
|
550
|
+
/**
|
|
551
|
+
* The host's copy of a tool round's results, each `tool_result` whose call reported site icons
|
|
552
|
+
* (`ToolResultPayload.siteIcons` -- WebFetch's page icon, WebSearch's Exa favicons) carrying them as
|
|
553
|
+
* `winter_site_icons: [{url, icon_url}]`. Host-only by construction: it is applied to the frame copy at
|
|
554
|
+
* the one tool-round write, and copies every block it touches -- `toolResultsForHost` can hand back the
|
|
555
|
+
* very block objects `resultBlocks` holds, which also feed the history, the transcript and every
|
|
556
|
+
* provider request, so mutating one would put the field in front of the model.
|
|
557
|
+
*/
|
|
558
|
+
export declare function withHostSiteIcons(content: ContentBlock[], icons: ReadonlyMap<string, readonly ToolResultSiteIcon[]>): ContentBlock[];
|
|
550
559
|
/**
|
|
551
560
|
* Phase 6 (R6-9), widened by the fix wave: the session's RESOLVED provider identity as the engine
|
|
552
561
|
* carries it -- the `MessageOrigin` half every `origin` record and `providerAnnotations` read, plus
|
|
@@ -684,6 +693,7 @@ export interface ToolExecutor {
|
|
|
684
693
|
output: string;
|
|
685
694
|
blocks?: ToolResultBlock[];
|
|
686
695
|
isError?: boolean;
|
|
696
|
+
siteIcons?: ToolResultSiteIcon[];
|
|
687
697
|
}>;
|
|
688
698
|
}
|
|
689
699
|
/**
|