agents 0.24.0 → 0.26.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.
- package/dist/{agent-routing-B2XLNMxq.d.ts → agent-routing-0DR0Tk2v.d.ts} +205 -132
- package/dist/agent-routing.d.ts +1 -1
- package/dist/agent-routing.js.map +1 -1
- package/dist/agent-tool-types.d.ts +28 -22
- package/dist/agent-tool-types.js +23 -1
- package/dist/agent-tool-types.js.map +1 -1
- package/dist/{agent-tools-y7zLfw4Q.js → agent-tools-CdJC-8Dc.js} +72 -9
- package/dist/agent-tools-CdJC-8Dc.js.map +1 -0
- package/dist/{agent-tools-Dj5Mzlw7.d.ts → agent-tools-YrATZJu2.d.ts} +34 -20
- package/dist/agent-tools.d.ts +20 -18
- package/dist/agent-tools.js.map +1 -1
- package/dist/ai-fm7xx1BK.js +312 -0
- package/dist/ai-fm7xx1BK.js.map +1 -0
- package/dist/base64-redaction-C1Uu29t5.js +59 -0
- package/dist/base64-redaction-C1Uu29t5.js.map +1 -0
- package/dist/browser/ai-sdk.d.ts +90 -0
- package/dist/browser/ai-sdk.js +51 -0
- package/dist/browser/ai-sdk.js.map +1 -0
- package/dist/browser/ai.d.ts +4 -4
- package/dist/browser/ai.js +1 -347
- package/dist/browser/index.d.ts +81 -79
- package/dist/browser/index.js +361 -2
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/tanstack-ai.d.ts +96 -1
- package/dist/browser/tanstack-ai.js +62 -2
- package/dist/browser/tanstack-ai.js.map +1 -1
- package/dist/browser-DE3d-RLk.d.ts +275 -0
- package/dist/browser-tool-CQ10e6Kj.js +480 -0
- package/dist/browser-tool-CQ10e6Kj.js.map +1 -0
- package/dist/browser-tool-DuNdlwZ9.d.ts +73 -0
- package/dist/capability-B4WbF81e.js.map +1 -1
- package/dist/{capability-runner-BUBa6Ake.d.ts → capability-runner-DBAnGr6L.d.ts} +7 -2
- package/dist/chat/index.d.ts +340 -234
- package/dist/chat/index.js +592 -66
- package/dist/chat/index.js.map +1 -1
- package/dist/chat/react.d.ts +42 -2
- package/dist/chat/react.js +191 -35
- package/dist/chat/react.js.map +1 -1
- package/dist/chat/transport.d.ts +1 -1
- package/dist/chat/transport.js +1 -1
- package/dist/chat-sdk/index.d.ts +17 -3
- package/dist/chat-sdk/index.js +28 -2
- package/dist/chat-sdk/index.js.map +1 -1
- package/dist/{client-C9DAjZIY.js → client-4OlMIJx-.js} +102 -29
- package/dist/client-4OlMIJx-.js.map +1 -0
- package/dist/{client-BxdkCuVy.d.ts → client-je3koD9Z.d.ts} +45 -10
- package/dist/client.d.ts +7 -5
- package/dist/client.js +2 -2
- package/dist/{connector-CptFKzRh.js → connector-58XDGvc3.js} +251 -120
- package/dist/connector-58XDGvc3.js.map +1 -0
- package/dist/{connector-CkQD4MK3.d.ts → connector-Cl-VqPmA.d.ts} +244 -146
- package/dist/context/index.d.ts +29 -0
- package/dist/context/index.js +64 -17
- package/dist/context/index.js.map +1 -1
- package/dist/current-agent-DhoDkSnH.js.map +1 -1
- package/dist/{current-agent-C4w86kcN.d.ts → current-agent-vAk_5JMt.d.ts} +4 -4
- package/dist/{durable-object-lifecycle-ei7M7lqB.d.ts → durable-object-lifecycle-HhgOMWq9.d.ts} +15 -7
- package/dist/harness/pi/index.d.ts +344 -0
- package/dist/harness/pi/index.js +873 -0
- package/dist/harness/pi/index.js.map +1 -0
- package/dist/images-iiTDSyRu.js +1631 -0
- package/dist/images-iiTDSyRu.js.map +1 -0
- package/dist/{index-Dlgtd3Mj.d.ts → index-BreL0YrQ.d.ts} +2 -2
- package/dist/index-kbSUIer3.d.ts +343 -0
- package/dist/index.d.ts +46 -44
- package/dist/index.js +1 -1
- package/dist/internal_context.d.ts +1 -1
- package/dist/lifecycle/index.d.ts +3 -3
- package/dist/lifecycle/index.js +1 -1
- package/dist/{lifecycle-Mm_jQh7r.js → lifecycle-CFu6OV03.js} +39 -10
- package/dist/{lifecycle-Mm_jQh7r.js.map → lifecycle-CFu6OV03.js.map} +1 -1
- package/dist/mcp/client/index.d.ts +20 -20
- package/dist/mcp/client/x402.js +21 -19
- package/dist/mcp/client/x402.js.map +1 -1
- package/dist/mcp/index.d.ts +35 -35
- package/dist/mcp/index.js +1 -1
- package/dist/{message-builder-BymO4N_D.js → message-builder-DAl9AhHH.js} +89 -4
- package/dist/message-builder-DAl9AhHH.js.map +1 -0
- package/dist/models/ai-sdk/index.d.ts +353 -0
- package/dist/models/ai-sdk/index.js +2443 -0
- package/dist/models/ai-sdk/index.js.map +1 -0
- package/dist/models/pi-ai/index.d.ts +313 -0
- package/dist/models/pi-ai/index.js +1795 -0
- package/dist/models/pi-ai/index.js.map +1 -0
- package/dist/observability/ai/index.js +20 -4
- package/dist/observability/ai/index.js.map +1 -1
- package/dist/{protocol-B0nh6KNf.js → protocol-kHsr-f0X.js} +26 -12
- package/dist/{protocol-B0nh6KNf.js.map → protocol-kHsr-f0X.js.map} +1 -1
- package/dist/queue/index.d.ts +3 -3
- package/dist/queue/index.js +1 -1
- package/dist/{queue-BC9F5cUo.js → queue-BB-zfIYF.js} +2 -2
- package/dist/{queue-BC9F5cUo.js.map → queue-BB-zfIYF.js.map} +1 -1
- package/dist/react.d.ts +6 -6
- package/dist/react.js +160 -64
- package/dist/react.js.map +1 -1
- package/dist/{retries-D9B2UCq3.d.ts → retries-CV6AkXmQ.d.ts} +18 -9
- package/dist/retries.d.ts +11 -9
- package/dist/retries.js +11 -1
- package/dist/retries.js.map +1 -1
- package/dist/routing/index.d.ts +2 -2
- package/dist/routing/index.js +1 -1
- package/dist/{scheduler-D_KHqxBa.js → scheduler-DZ3xQfeK.js} +2 -2
- package/dist/{scheduler-D_KHqxBa.js.map → scheduler-DZ3xQfeK.js.map} +1 -1
- package/dist/{scheduler-BGq6M5Kd.d.ts → scheduler-RdACNXDP.d.ts} +3 -3
- package/dist/schedules/index.d.ts +1 -1
- package/dist/schedules/index.js +1 -1
- package/dist/serializable.d.ts +1 -1
- package/dist/sessions/index.d.ts +70 -3
- package/dist/sessions/index.js +276 -67
- package/dist/sessions/index.js.map +1 -1
- package/dist/skills/index.d.ts +29 -314
- package/dist/socket-address.d.ts +16 -0
- package/dist/socket-address.js +19 -0
- package/dist/socket-address.js.map +1 -0
- package/dist/{src-BNU3ZiJM.js → src-BZeu-SCD.js} +423 -115
- package/dist/src-BZeu-SCD.js.map +1 -0
- package/dist/state/index.d.ts +1 -1
- package/dist/state/index.js +1 -1
- package/dist/streams/index.d.ts +1 -1
- package/dist/streams/index.js +1 -1
- package/dist/{streams-BcE8JP2X.d.ts → streams-Cmkj9QfW.d.ts} +4 -2
- package/dist/{streams-CCPRV6dt.js → streams-DW-UCOUc.js} +9 -2
- package/dist/streams-DW-UCOUc.js.map +1 -0
- package/dist/sub-routing.d.ts +12 -12
- package/dist/tasks/index.d.ts +1 -1
- package/dist/tasks/index.js +1 -1
- package/dist/{tasks-D4nLqVSI.js → tasks-68DESxf0.js} +2 -2
- package/dist/{tasks-D4nLqVSI.js.map → tasks-68DESxf0.js.map} +1 -1
- package/dist/{tasks-V2lCT8ZV.d.ts → tasks-9YxYtByh.d.ts} +2 -2
- package/dist/transport-PfFnt-Ld.d.ts +525 -0
- package/dist/{types-DCD6BNZH.d.ts → types-BA4anrjI.d.ts} +2 -2
- package/dist/voice/index.d.ts +2 -2
- package/dist/websockets/index.d.ts +23 -6
- package/dist/websockets/index.js +1 -1
- package/dist/{websockets-D7IzWbZb.js → websockets-Ci-LZFHH.js} +45 -20
- package/dist/{websockets-D7IzWbZb.js.map → websockets-Ci-LZFHH.js.map} +1 -1
- package/dist/wire-types-CnMt6_HR.js.map +1 -1
- package/dist/wire-types-CrjKvDyi.d.ts +300 -0
- package/dist/workflow-types.d.ts +25 -25
- package/dist/workflows.d.ts +21 -21
- package/dist/workflows.js +1 -1
- package/dist/{ws-chat-transport-UNRIS2xl.d.ts → ws-chat-transport-BbT1A5Lc.d.ts} +51 -2
- package/dist/{ws-chat-transport-rWwta645.js → ws-chat-transport-cqMKq3IY.js} +143 -16
- package/dist/ws-chat-transport-cqMKq3IY.js.map +1 -0
- package/docs/agent-tools.md +29 -4
- package/docs/browse-the-web.md +87 -5
- package/docs/chat-agents.md +124 -16
- package/docs/context.md +27 -0
- package/docs/durable-execution.md +2 -0
- package/docs/harnesses/pi.md +173 -0
- package/docs/human-in-the-loop.md +4 -0
- package/docs/index.md +3 -0
- package/docs/lifecycle.md +20 -4
- package/docs/models-pi-ai.md +325 -0
- package/docs/models.md +504 -0
- package/docs/resumable-streaming.md +2 -0
- package/docs/routing.md +13 -13
- package/docs/sessions.md +36 -1
- package/docs/state.md +1 -0
- package/docs/sub-agents.md +9 -0
- package/package.json +40 -2
- package/dist/agent-tools-y7zLfw4Q.js.map +0 -1
- package/dist/browser/ai.js.map +0 -1
- package/dist/client-C9DAjZIY.js.map +0 -1
- package/dist/client-tools-aIBO0Fk7.d.ts +0 -53
- package/dist/connector-CptFKzRh.js.map +0 -1
- package/dist/message-builder-BymO4N_D.js.map +0 -1
- package/dist/src-BNU3ZiJM.js.map +0 -1
- package/dist/streams-CCPRV6dt.js.map +0 -1
- package/dist/ws-chat-transport-rWwta645.js.map +0 -1
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { ToolSet } from "ai";
|
|
2
|
+
|
|
3
|
+
//#region src/skills/frontmatter.d.ts
|
|
4
|
+
interface ParsedSkillMarkdown {
|
|
5
|
+
data: Record<string, unknown>;
|
|
6
|
+
body: string;
|
|
7
|
+
}
|
|
8
|
+
declare function parseSkillFrontmatter(raw: string): ParsedSkillMarkdown;
|
|
9
|
+
declare function parseSkillMarkdown(raw: string): {
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
body: string;
|
|
13
|
+
compatibility?: string;
|
|
14
|
+
license?: string;
|
|
15
|
+
allowedTools?: string;
|
|
16
|
+
metadata?: Record<string, unknown>;
|
|
17
|
+
} | null;
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/skills/types.d.ts
|
|
20
|
+
interface SkillDescriptor {
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
compatibility?: string;
|
|
24
|
+
license?: string;
|
|
25
|
+
allowedTools?: string;
|
|
26
|
+
metadata?: Record<string, unknown>;
|
|
27
|
+
sourceId?: string;
|
|
28
|
+
version?: string;
|
|
29
|
+
}
|
|
30
|
+
interface SkillContent extends SkillDescriptor {
|
|
31
|
+
body: string;
|
|
32
|
+
rawContent?: string;
|
|
33
|
+
resources?: SkillResourceDescriptor[];
|
|
34
|
+
}
|
|
35
|
+
interface SkillResourceDescriptor {
|
|
36
|
+
path: string;
|
|
37
|
+
kind: "reference" | "script" | "asset" | "file";
|
|
38
|
+
size?: number;
|
|
39
|
+
encoding?: "text" | "base64";
|
|
40
|
+
mimeType?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Set when a script resource was compiled to a self-contained JavaScript
|
|
43
|
+
* module ahead of time — by the Agents Vite plugin for bundled skills, or via
|
|
44
|
+
* `compileSkillScript` from `agents/skills/compile` for R2/dynamic skills. The
|
|
45
|
+
* runtime runs precompiled scripts directly; the runtime ships no in-Worker
|
|
46
|
+
* bundler, so non-precompiled TypeScript or multi-file scripts cannot run.
|
|
47
|
+
*/
|
|
48
|
+
precompiled?: boolean;
|
|
49
|
+
}
|
|
50
|
+
interface SkillResource extends SkillResourceDescriptor {
|
|
51
|
+
content: string;
|
|
52
|
+
}
|
|
53
|
+
interface SkillScriptContext {
|
|
54
|
+
skill: SkillDescriptor;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The `ctx` object passed as the second argument to function-style JS/TS
|
|
58
|
+
* skill scripts (`export default async function run(input, ctx)`).
|
|
59
|
+
*
|
|
60
|
+
* Capabilities are gated by the runner: `workspace` throws unless workspace
|
|
61
|
+
* access is enabled, and `tools` only resolves tools the runner was given.
|
|
62
|
+
*/
|
|
63
|
+
interface SkillRunContext {
|
|
64
|
+
/** Metadata for the skill that owns this script. */
|
|
65
|
+
skill: SkillDescriptor;
|
|
66
|
+
/** Text bundled resources by relative path (e.g. `references/style-guide.md`). */
|
|
67
|
+
files: Record<string, string>;
|
|
68
|
+
/** Workspace access, gated by the runner's `workspace` permission. */
|
|
69
|
+
workspace: {
|
|
70
|
+
readFile(path: string): Promise<string | null>;
|
|
71
|
+
listFiles(path?: string): Promise<unknown>;
|
|
72
|
+
glob(pattern: string): Promise<unknown>;
|
|
73
|
+
stat(path: string): Promise<{
|
|
74
|
+
type: string;
|
|
75
|
+
size: number;
|
|
76
|
+
} | null>;
|
|
77
|
+
writeFile(path: string, content: string): Promise<void>;
|
|
78
|
+
};
|
|
79
|
+
/** Explicitly granted tools: `tools.call(name, input)` or `tools.<name>(input)`. */
|
|
80
|
+
tools: {
|
|
81
|
+
call(name: string, input?: unknown): Promise<unknown>;
|
|
82
|
+
} & Record<string, (input?: unknown) => Promise<unknown>>;
|
|
83
|
+
/** Scratch artifacts returned to the model as `outputFiles`. */
|
|
84
|
+
output: {
|
|
85
|
+
writeFile(name: string, content: string): Promise<void>;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
interface SkillScriptRequest {
|
|
89
|
+
skill: SkillContent;
|
|
90
|
+
path: string;
|
|
91
|
+
source: string;
|
|
92
|
+
input: unknown;
|
|
93
|
+
resources?: SkillResource[];
|
|
94
|
+
}
|
|
95
|
+
interface SkillScriptRunner {
|
|
96
|
+
run(request: SkillScriptRequest): Promise<unknown>;
|
|
97
|
+
}
|
|
98
|
+
interface SkillSource {
|
|
99
|
+
id: string;
|
|
100
|
+
fingerprint: string;
|
|
101
|
+
list(): Promise<SkillDescriptor[]>;
|
|
102
|
+
load(name: string): Promise<SkillContent | null>;
|
|
103
|
+
readResource?(name: string, path: string): Promise<SkillResource | null>;
|
|
104
|
+
refresh?(): Promise<void>;
|
|
105
|
+
}
|
|
106
|
+
interface SkillManifestResource extends SkillResourceDescriptor {
|
|
107
|
+
content: string;
|
|
108
|
+
}
|
|
109
|
+
interface SkillManifestEntry {
|
|
110
|
+
name: string;
|
|
111
|
+
description: string;
|
|
112
|
+
body: string;
|
|
113
|
+
rawContent?: string;
|
|
114
|
+
compatibility?: string;
|
|
115
|
+
license?: string;
|
|
116
|
+
allowedTools?: string;
|
|
117
|
+
metadata?: Record<string, unknown>;
|
|
118
|
+
version?: string;
|
|
119
|
+
resources?: SkillManifestResource[];
|
|
120
|
+
}
|
|
121
|
+
interface SkillManifest {
|
|
122
|
+
id: string;
|
|
123
|
+
fingerprint: string;
|
|
124
|
+
skills: SkillManifestEntry[];
|
|
125
|
+
}
|
|
126
|
+
interface SkillRegistrySnapshot {
|
|
127
|
+
fingerprint: string;
|
|
128
|
+
catalogPrompt: string | null;
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/skills/manifest.d.ts
|
|
132
|
+
declare function fromManifest(manifest: SkillManifest): SkillSource;
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region src/skills/r2.d.ts
|
|
135
|
+
interface R2SkillSourceOptions {
|
|
136
|
+
prefix?: string;
|
|
137
|
+
skills?: string[];
|
|
138
|
+
id?: string;
|
|
139
|
+
fingerprint?: "metadata" | "content";
|
|
140
|
+
refreshIntervalMs?: number;
|
|
141
|
+
}
|
|
142
|
+
declare function r2(
|
|
143
|
+
bucket: R2Bucket,
|
|
144
|
+
options?: R2SkillSourceOptions
|
|
145
|
+
): SkillSource;
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region src/skills/runner.d.ts
|
|
148
|
+
/**
|
|
149
|
+
* Minimal workspace surface the skill runner needs. A concrete `Workspace`
|
|
150
|
+
* from `@cloudflare/shell` (or Think's `WorkspaceLike`) satisfies this
|
|
151
|
+
* structurally, so the runner does not depend on a filesystem package.
|
|
152
|
+
*/
|
|
153
|
+
interface SkillWorkspace {
|
|
154
|
+
readFile(path: string): Promise<string | null>;
|
|
155
|
+
writeFile(path: string, content: string): Promise<void>;
|
|
156
|
+
readDir(path: string): Promise<unknown>;
|
|
157
|
+
glob(pattern: string): Promise<unknown>;
|
|
158
|
+
stat(path: string): Promise<{
|
|
159
|
+
type: string;
|
|
160
|
+
size?: number;
|
|
161
|
+
} | null>;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Options for {@link runner}.
|
|
165
|
+
*
|
|
166
|
+
* @experimental Skill script execution is experimental and the option shape
|
|
167
|
+
* may change before stabilizing.
|
|
168
|
+
*/
|
|
169
|
+
interface WorkerSkillScriptRunnerOptions {
|
|
170
|
+
loader: WorkerLoader;
|
|
171
|
+
timeout?: number;
|
|
172
|
+
network?: boolean;
|
|
173
|
+
workspace?: "none" | "read" | "read-write";
|
|
174
|
+
workspaceInstance?: SkillWorkspace;
|
|
175
|
+
tools?: ToolSet | (() => ToolSet | Promise<ToolSet>);
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Create a skill script runner backed by a Worker Loader.
|
|
179
|
+
*
|
|
180
|
+
* Capabilities are opt-in and enforced by a single host bridge: no network and
|
|
181
|
+
* no tools by default, read-only workspace access when `workspaceInstance` is
|
|
182
|
+
* provided. JS/TS scripts are function-style (`export default run(input, ctx)`)
|
|
183
|
+
* and receive `ctx = { skill, files, workspace, tools, output }`. Python and
|
|
184
|
+
* Bash use the path-based `/skill`, `/input.json`, `/output` contract.
|
|
185
|
+
*
|
|
186
|
+
* @experimental Skill script execution is experimental and may change before
|
|
187
|
+
* stabilizing.
|
|
188
|
+
*/
|
|
189
|
+
declare function runner(
|
|
190
|
+
options: WorkerSkillScriptRunnerOptions
|
|
191
|
+
): SkillScriptRunner;
|
|
192
|
+
//#endregion
|
|
193
|
+
//#region src/skills/workspace.d.ts
|
|
194
|
+
/**
|
|
195
|
+
* Computer-style Workspace shape used for Agent Skills projection.
|
|
196
|
+
* `@cloudflare/computer.Workspace` satisfies this through `workspace.fs`.
|
|
197
|
+
*/
|
|
198
|
+
interface ComputerSkillWorkspace {
|
|
199
|
+
readonly fs: {
|
|
200
|
+
stat(path: string): Promise<unknown>;
|
|
201
|
+
readFile(
|
|
202
|
+
path: string,
|
|
203
|
+
options?: {
|
|
204
|
+
byteOffset?: number;
|
|
205
|
+
byteLength?: number;
|
|
206
|
+
}
|
|
207
|
+
): Promise<ReadableStream<Uint8Array>>;
|
|
208
|
+
readFile(path: string, encoding: "utf8"): Promise<string>;
|
|
209
|
+
writeFile(path: string, content: string | Uint8Array): Promise<void>;
|
|
210
|
+
mkdir(
|
|
211
|
+
path: string,
|
|
212
|
+
options?: {
|
|
213
|
+
recursive?: boolean;
|
|
214
|
+
}
|
|
215
|
+
): Promise<void>;
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Legacy direct filesystem shape used for Agent Skills projection.
|
|
220
|
+
* `@cloudflare/shell.Workspace` and Think `WorkspaceLike` satisfy this shape.
|
|
221
|
+
*/
|
|
222
|
+
interface LegacySkillWorkspace {
|
|
223
|
+
stat(path: string): Promise<unknown | null>;
|
|
224
|
+
readFile(path: string): Promise<string | null>;
|
|
225
|
+
readFileBytes(path: string): Promise<Uint8Array | null>;
|
|
226
|
+
writeFile(path: string, content: string): Promise<void>;
|
|
227
|
+
writeFileBytes(
|
|
228
|
+
path: string,
|
|
229
|
+
content: Uint8Array | ArrayBuffer,
|
|
230
|
+
mediaType?: string
|
|
231
|
+
): Promise<void>;
|
|
232
|
+
mkdir(
|
|
233
|
+
path: string,
|
|
234
|
+
options?: {
|
|
235
|
+
recursive?: boolean;
|
|
236
|
+
}
|
|
237
|
+
): Promise<void>;
|
|
238
|
+
}
|
|
239
|
+
/** Workspace accepted by `SkillRegistry.seedWorkspace()`. */
|
|
240
|
+
type SkillProjectionWorkspace = ComputerSkillWorkspace | LegacySkillWorkspace;
|
|
241
|
+
/** Options for projecting Agent Skills into a Workspace. */
|
|
242
|
+
interface SkillWorkspaceSeedOptions {
|
|
243
|
+
/**
|
|
244
|
+
* Destination directory. Defaults to `/workspace/.agents/skills` for a
|
|
245
|
+
* Computer Workspace and `/.agents/skills` for a legacy Shell Workspace.
|
|
246
|
+
*/
|
|
247
|
+
readonly root?: string;
|
|
248
|
+
/** Existing-file policy. Default `"preserve"` keeps Workspace edits. */
|
|
249
|
+
readonly onConflict?: "preserve" | "replace";
|
|
250
|
+
}
|
|
251
|
+
/** Summary returned after projecting Agent Skills into a Workspace. */
|
|
252
|
+
interface SkillWorkspaceSeedResult {
|
|
253
|
+
/** Files written from source content. */
|
|
254
|
+
readonly written: number;
|
|
255
|
+
/** Existing files preserved without a write. */
|
|
256
|
+
readonly preserved: number;
|
|
257
|
+
/** Files skipped because their source content could not be read or written. */
|
|
258
|
+
readonly skipped: number;
|
|
259
|
+
/** Non-fatal per-file diagnostics. */
|
|
260
|
+
readonly warnings: readonly string[];
|
|
261
|
+
/** Absolute Workspace directory containing the projected skills. */
|
|
262
|
+
readonly root: string;
|
|
263
|
+
}
|
|
264
|
+
//#endregion
|
|
265
|
+
//#region src/skills/registry.d.ts
|
|
266
|
+
declare class SkillRegistry {
|
|
267
|
+
readonly contextLabel = "think_skills";
|
|
268
|
+
/**
|
|
269
|
+
* Non-fatal diagnostics collected during the most recent {@link load} or
|
|
270
|
+
* {@link refresh} (duplicate skill names, sources that failed to list).
|
|
271
|
+
* Reset on every load so it never grows unbounded across refreshes.
|
|
272
|
+
*/
|
|
273
|
+
readonly warnings: string[];
|
|
274
|
+
private sources;
|
|
275
|
+
private scriptRunner;
|
|
276
|
+
private descriptors;
|
|
277
|
+
private sourceBySkill;
|
|
278
|
+
private loaded;
|
|
279
|
+
private workspaceFiles;
|
|
280
|
+
private workspaceSkillNames;
|
|
281
|
+
private workspaceResources;
|
|
282
|
+
constructor(sources: SkillSource[], scriptRunner?: SkillScriptRunner | null);
|
|
283
|
+
get fingerprint(): string;
|
|
284
|
+
load(): Promise<void>;
|
|
285
|
+
refresh(): Promise<void>;
|
|
286
|
+
/**
|
|
287
|
+
* Seed resolved Agent Skills into Computer or legacy Shell storage.
|
|
288
|
+
* Existing files are preserved by default, and become authoritative for
|
|
289
|
+
* activation, resource reads, and script execution.
|
|
290
|
+
*/
|
|
291
|
+
seedWorkspace(
|
|
292
|
+
workspace: SkillProjectionWorkspace,
|
|
293
|
+
options?: SkillWorkspaceSeedOptions
|
|
294
|
+
): Promise<SkillWorkspaceSeedResult>;
|
|
295
|
+
/**
|
|
296
|
+
* Route skill reads through an already-seeded Workspace without probing or
|
|
297
|
+
* rewriting its files. Hosts use this when the durable source fingerprint
|
|
298
|
+
* matches the recorded projection fingerprint.
|
|
299
|
+
*/
|
|
300
|
+
useWorkspace(
|
|
301
|
+
workspace: SkillProjectionWorkspace,
|
|
302
|
+
options?: SkillWorkspaceSeedOptions
|
|
303
|
+
): Promise<void>;
|
|
304
|
+
private writeSeedFile;
|
|
305
|
+
snapshot(): Promise<SkillRegistrySnapshot>;
|
|
306
|
+
systemPrompt(): Promise<string | null>;
|
|
307
|
+
loadSkill(name: string): Promise<SkillContent | null>;
|
|
308
|
+
private resolveResourceTarget;
|
|
309
|
+
private readResource;
|
|
310
|
+
private readSkillResources;
|
|
311
|
+
tools(): ToolSet;
|
|
312
|
+
}
|
|
313
|
+
//#endregion
|
|
314
|
+
export {
|
|
315
|
+
SkillScriptRequest as C,
|
|
316
|
+
parseSkillMarkdown as D,
|
|
317
|
+
parseSkillFrontmatter as E,
|
|
318
|
+
SkillScriptContext as S,
|
|
319
|
+
SkillSource as T,
|
|
320
|
+
SkillManifestResource as _,
|
|
321
|
+
SkillWorkspaceSeedOptions as a,
|
|
322
|
+
SkillResourceDescriptor as b,
|
|
323
|
+
WorkerSkillScriptRunnerOptions as c,
|
|
324
|
+
r2 as d,
|
|
325
|
+
fromManifest as f,
|
|
326
|
+
SkillManifestEntry as g,
|
|
327
|
+
SkillManifest as h,
|
|
328
|
+
SkillProjectionWorkspace as i,
|
|
329
|
+
runner as l,
|
|
330
|
+
SkillDescriptor as m,
|
|
331
|
+
ComputerSkillWorkspace as n,
|
|
332
|
+
SkillWorkspaceSeedResult as o,
|
|
333
|
+
SkillContent as p,
|
|
334
|
+
LegacySkillWorkspace as r,
|
|
335
|
+
SkillWorkspace as s,
|
|
336
|
+
SkillRegistry as t,
|
|
337
|
+
R2SkillSourceOptions as u,
|
|
338
|
+
SkillRegistrySnapshot as v,
|
|
339
|
+
SkillScriptRunner as w,
|
|
340
|
+
SkillRunContext as x,
|
|
341
|
+
SkillResource as y
|
|
342
|
+
};
|
|
343
|
+
//# sourceMappingURL=index-kbSUIer3.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -3,89 +3,90 @@ import {
|
|
|
3
3
|
S as ConnectionContext,
|
|
4
4
|
T as WSMessage,
|
|
5
5
|
x as Connection
|
|
6
|
-
} from "./capability-runner-
|
|
6
|
+
} from "./capability-runner-DBAnGr6L.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
8
|
+
a as isDurableObjectStorageReset,
|
|
9
|
+
c as isPlatformTransientError,
|
|
9
10
|
n as isDurableObjectCodeUpdateReset,
|
|
10
11
|
r as isDurableObjectMemoryLimitReset,
|
|
11
|
-
s as isPlatformTransientError,
|
|
12
12
|
t as RetryOptions
|
|
13
|
-
} from "./retries-
|
|
14
|
-
import { i as __DO_NOT_USE_WILL_BREAK__agentContext } from "./current-agent-
|
|
13
|
+
} from "./retries-CV6AkXmQ.js";
|
|
14
|
+
import { i as __DO_NOT_USE_WILL_BREAK__agentContext } from "./current-agent-vAk_5JMt.js";
|
|
15
15
|
import {
|
|
16
|
-
$ as
|
|
16
|
+
$ as ChatCapableAgentClass,
|
|
17
17
|
A as getCurrentAgent,
|
|
18
|
-
An as
|
|
19
|
-
|
|
20
|
-
B as AgentToolInterruptedReason,
|
|
18
|
+
An as getSubAgentByName,
|
|
19
|
+
B as AgentToolFailure,
|
|
21
20
|
C as MCPServersState,
|
|
22
|
-
Cn as
|
|
21
|
+
Cn as BuildAgentPathOptions,
|
|
23
22
|
D as StartFiberResult,
|
|
24
|
-
Dn as
|
|
23
|
+
Dn as buildAgentUrl,
|
|
25
24
|
E as StartFiberOptions,
|
|
25
|
+
En as buildAgentPath,
|
|
26
26
|
F as AgentToolDisplayMetadata,
|
|
27
|
-
G as
|
|
28
|
-
Gt as
|
|
29
|
-
H as
|
|
30
|
-
Ht as MCP_SERVER_ID_MAX_LENGTH,
|
|
27
|
+
G as AgentToolProgressSnapshot,
|
|
28
|
+
Gt as MCP_SERVER_ID_MAX_LENGTH,
|
|
29
|
+
H as AgentToolLifecycleResult,
|
|
31
30
|
I as AgentToolEvent,
|
|
32
|
-
J as
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
J as AgentToolRunPart,
|
|
32
|
+
Jt as normalizeServerId,
|
|
33
|
+
K as AgentToolRunInfo,
|
|
34
|
+
L as AgentToolEventDelivery,
|
|
35
35
|
M as AGENT_TOOL_MILESTONE_PART,
|
|
36
|
+
Mn as routeSubAgentRequest,
|
|
37
|
+
Mt as MCPAITool,
|
|
36
38
|
N as AGENT_TOOL_PROGRESS_PART,
|
|
39
|
+
Nn as withInvocationScope,
|
|
40
|
+
Nt as MCPAIToolSet,
|
|
37
41
|
O as StateUpdateMessage,
|
|
38
|
-
On as parseSubAgentPath,
|
|
39
42
|
P as AgentToolChildAdapter,
|
|
40
|
-
Q as
|
|
41
|
-
R as
|
|
43
|
+
Q as AgentToolTerminalStatus,
|
|
44
|
+
R as AgentToolEventMessage,
|
|
42
45
|
S as MCPServerMessage,
|
|
43
|
-
Sn as
|
|
46
|
+
Sn as AgentPathStep,
|
|
44
47
|
T as RPCResponse,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
Tn as SubAgentPathMatch,
|
|
49
|
+
U as AgentToolMilestone,
|
|
50
|
+
V as AgentToolInterruptedReason,
|
|
51
|
+
W as AgentToolProgress,
|
|
52
|
+
X as AgentToolRunStatus,
|
|
53
|
+
Y as AgentToolRunState,
|
|
54
|
+
Z as AgentToolStoredChunk,
|
|
51
55
|
_ as FiberRecoveryContext,
|
|
52
|
-
_n as DynamicAgentClass,
|
|
53
56
|
a as routeAgentRequest,
|
|
54
57
|
b as ListFibersOptions,
|
|
55
|
-
bn as
|
|
58
|
+
bn as DynamicAgentClass,
|
|
56
59
|
c as Agent,
|
|
57
60
|
d as AgentStaticOptions,
|
|
58
|
-
et as
|
|
61
|
+
et as DetachedAgentToolConfig,
|
|
59
62
|
f as DEFAULT_AGENT_STATIC_OPTIONS,
|
|
60
63
|
g as FiberInspection,
|
|
61
64
|
h as FiberContext,
|
|
62
65
|
i as getAgentByName,
|
|
63
66
|
j as routeAgentEmail,
|
|
67
|
+
jn as parseSubAgentPath,
|
|
64
68
|
k as StreamingResponse,
|
|
65
|
-
kn as routeSubAgentRequest,
|
|
66
|
-
kt as MCPAITool,
|
|
67
69
|
l as AgentContext,
|
|
68
70
|
m as EmailRoutingOptions,
|
|
69
71
|
n as AgentOptions,
|
|
70
|
-
nt as
|
|
72
|
+
nt as RunAgentToolOptions,
|
|
71
73
|
o as AddMcpServerOptions,
|
|
72
74
|
p as DeleteFibersOptions,
|
|
73
|
-
q as
|
|
75
|
+
q as AgentToolRunInspection,
|
|
74
76
|
r as RoutingRetryOptions,
|
|
77
|
+
rt as RunAgentToolResult,
|
|
75
78
|
s as AddRpcMcpServerOptions,
|
|
76
79
|
t as AgentGetOptions,
|
|
77
|
-
tt as
|
|
80
|
+
tt as DetachedRunAgentToolResult,
|
|
78
81
|
u as AgentNamespace,
|
|
79
82
|
v as FiberRecoveryResult,
|
|
80
|
-
vn as DynamicAgentStub,
|
|
81
83
|
w as RPCRequest,
|
|
82
|
-
wn as
|
|
84
|
+
wn as SUB_PREFIX,
|
|
83
85
|
x as MCPServer,
|
|
84
|
-
xn as
|
|
86
|
+
xn as DynamicAgentStub,
|
|
85
87
|
y as FiberStatus,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
} from "./agent-routing-B2XLNMxq.js";
|
|
88
|
+
z as AgentToolEventState
|
|
89
|
+
} from "./agent-routing-0DR0Tk2v.js";
|
|
89
90
|
import {
|
|
90
91
|
a as EmailSendBinding,
|
|
91
92
|
d as createHeaderBasedEmailResolver,
|
|
@@ -103,8 +104,8 @@ import {
|
|
|
103
104
|
a as ScheduleCriteria,
|
|
104
105
|
i as Schedule,
|
|
105
106
|
o as ScheduleOptions
|
|
106
|
-
} from "./scheduler-
|
|
107
|
-
import { i as QueueItem } from "./types-
|
|
107
|
+
} from "./scheduler-RdACNXDP.js";
|
|
108
|
+
import { i as QueueItem } from "./types-BA4anrjI.js";
|
|
108
109
|
import {
|
|
109
110
|
n as callable,
|
|
110
111
|
s as unstable_callable,
|
|
@@ -127,6 +128,7 @@ export {
|
|
|
127
128
|
type AgentToolChildAdapter,
|
|
128
129
|
type AgentToolDisplayMetadata,
|
|
129
130
|
type AgentToolEvent,
|
|
131
|
+
type AgentToolEventDelivery,
|
|
130
132
|
type AgentToolEventMessage,
|
|
131
133
|
type AgentToolEventState,
|
|
132
134
|
type AgentToolFailure,
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { MessageType } from "./types.js";
|
|
|
7
7
|
import { createHeaderBasedEmailResolver } from "./email.js";
|
|
8
8
|
import { n as withInvocationScope } from "./cloudflare-Dzvc7V2N.js";
|
|
9
9
|
import { SUB_PREFIX, buildAgentPath, buildAgentUrl, getSubAgentByName, parseSubAgentPath, routeSubAgentRequest } from "./sub-routing.js";
|
|
10
|
-
import { a as routeAgentEmail, i as getCurrentAgent, n as DEFAULT_AGENT_STATIC_OPTIONS, r as StreamingResponse, t as Agent } from "./src-
|
|
10
|
+
import { a as routeAgentEmail, i as getCurrentAgent, n as DEFAULT_AGENT_STATIC_OPTIONS, r as StreamingResponse, t as Agent } from "./src-BZeu-SCD.js";
|
|
11
11
|
import { isDurableObjectCodeUpdateReset, isDurableObjectMemoryLimitReset, isDurableObjectStorageReset, isPlatformTransientError } from "./retries.js";
|
|
12
12
|
import { SqlError } from "./sql-error.js";
|
|
13
13
|
import { i as normalizeServerId, n as MCP_SERVER_ID_MAX_LENGTH } from "./client-fyQrLGkD.js";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
i as __DO_NOT_USE_WILL_BREAK__agentContext,
|
|
3
3
|
n as CurrentAgentContext,
|
|
4
4
|
t as AgentContextStore
|
|
5
|
-
} from "./current-agent-
|
|
5
|
+
} from "./current-agent-vAk_5JMt.js";
|
|
6
6
|
import { t as AgentEmail } from "./internal_context-BlxFEWfn.js";
|
|
7
7
|
export {
|
|
8
8
|
type AgentContextStore,
|
|
@@ -24,16 +24,16 @@ import {
|
|
|
24
24
|
w as ConnectionState,
|
|
25
25
|
x as Connection,
|
|
26
26
|
y as LifecycleJobPushOptions
|
|
27
|
-
} from "../capability-runner-
|
|
27
|
+
} from "../capability-runner-DBAnGr6L.js";
|
|
28
28
|
import {
|
|
29
29
|
n as LifecycleOptions,
|
|
30
30
|
t as Lifecycle
|
|
31
|
-
} from "../durable-object-lifecycle-
|
|
31
|
+
} from "../durable-object-lifecycle-HhgOMWq9.js";
|
|
32
32
|
import {
|
|
33
33
|
a as getCurrentAgent,
|
|
34
34
|
n as CurrentAgentContext,
|
|
35
35
|
r as LifecycleObject
|
|
36
|
-
} from "../current-agent-
|
|
36
|
+
} from "../current-agent-vAk_5JMt.js";
|
|
37
37
|
export {
|
|
38
38
|
type CapabilityRequestContext,
|
|
39
39
|
type CapabilityStartContext,
|
package/dist/lifecycle/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { n as getCurrentAgent } from "../current-agent-DhoDkSnH.js";
|
|
2
2
|
import { t as LifecycleCapability } from "../capability-B4WbF81e.js";
|
|
3
|
-
import { t as Lifecycle } from "../lifecycle-
|
|
3
|
+
import { t as Lifecycle } from "../lifecycle-CFu6OV03.js";
|
|
4
4
|
export { Lifecycle, LifecycleCapability, getCurrentAgent };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as runWithoutCurrentAgent, r as runInLifecycleHostContext } from "./current-agent-DhoDkSnH.js";
|
|
2
2
|
import { i as _classPrivateFieldInitSpec, n as _classPrivateFieldSet2, r as _assertClassBrand, t as _classPrivateFieldGet2 } from "./classPrivateFieldGet2-DZBYAB34.js";
|
|
3
|
-
import { n as bindLifecycleCapability, r as lifecycleCapabilityId, t as LifecycleCapability } from "./capability-B4WbF81e.js";
|
|
4
3
|
import { t as _classPrivateMethodInitSpec } from "./classPrivateMethodInitSpec-qMjJ6sHQ.js";
|
|
4
|
+
import { n as bindLifecycleCapability, r as lifecycleCapabilityId, t as LifecycleCapability } from "./capability-B4WbF81e.js";
|
|
5
5
|
import { n as publishDiagnosticsEvent } from "./diagnostics-BzvaX2UT.js";
|
|
6
6
|
import { isDurableObjectCodeUpdateReset, isDurableObjectMemoryLimitReset, isPlatformFailure, tryN } from "./retries.js";
|
|
7
7
|
import { SqlError } from "./sql-error.js";
|
|
@@ -806,6 +806,8 @@ function decodeProps(header) {
|
|
|
806
806
|
const lifecycleEventSinks = /* @__PURE__ */ new WeakMap();
|
|
807
807
|
const lifecycleRouteTransports = /* @__PURE__ */ new WeakMap();
|
|
808
808
|
const lifecycleHostInvokers = /* @__PURE__ */ new WeakMap();
|
|
809
|
+
/** Lifecycles whose startup the current async context is running inside. */
|
|
810
|
+
const lifecycleStartupScope = new AsyncLocalStorage();
|
|
809
811
|
/** @internal Adapt the host invocation boundary at a composition root. */
|
|
810
812
|
function setLifecycleHostInvoker(lifecycle, invoker) {
|
|
811
813
|
lifecycleHostInvokers.set(lifecycle, invoker);
|
|
@@ -844,6 +846,7 @@ var _alarmsDisabled = /* @__PURE__ */ new WeakMap();
|
|
|
844
846
|
var _capabilitiesLocked = /* @__PURE__ */ new WeakMap();
|
|
845
847
|
var _handlersInstalled = /* @__PURE__ */ new WeakMap();
|
|
846
848
|
var _Lifecycle_brand = /* @__PURE__ */ new WeakSet();
|
|
849
|
+
var _startup = /* @__PURE__ */ new WeakMap();
|
|
847
850
|
var _legacyName = /* @__PURE__ */ new WeakMap();
|
|
848
851
|
var _props = /* @__PURE__ */ new WeakMap();
|
|
849
852
|
var Lifecycle = class Lifecycle {
|
|
@@ -880,6 +883,7 @@ var Lifecycle = class Lifecycle {
|
|
|
880
883
|
_classPrivateFieldInitSpec(this, _alarmsDisabled, false);
|
|
881
884
|
_classPrivateFieldInitSpec(this, _capabilitiesLocked, false);
|
|
882
885
|
_classPrivateFieldInitSpec(this, _handlersInstalled, false);
|
|
886
|
+
_classPrivateFieldInitSpec(this, _startup, void 0);
|
|
883
887
|
_classPrivateFieldInitSpec(this, _legacyName, void 0);
|
|
884
888
|
_classPrivateFieldInitSpec(this, _props, void 0);
|
|
885
889
|
_classPrivateFieldSet2(_host, this, host);
|
|
@@ -1061,13 +1065,26 @@ var Lifecycle = class Lifecycle {
|
|
|
1061
1065
|
* Runtime fetch, alarm, and WebSocket entry points call this automatically.
|
|
1062
1066
|
* RPC methods may call it explicitly because native RPC bypasses fetch.
|
|
1063
1067
|
*
|
|
1068
|
+
* Concurrent callers share one startup and all observe its outcome. A call
|
|
1069
|
+
* made from inside that startup, such as a capability or `onStart` calling
|
|
1070
|
+
* back into the host, returns immediately instead of waiting on itself.
|
|
1071
|
+
*
|
|
1064
1072
|
* @param props - Optional properties supplied to capability and host startup.
|
|
1073
|
+
* Ignored while a startup is already in flight.
|
|
1065
1074
|
*/
|
|
1066
1075
|
async start(props) {
|
|
1067
|
-
if (props !== void 0) _classPrivateFieldSet2(_props, this, props);
|
|
1076
|
+
if (props !== void 0 && _classPrivateFieldGet2(_startup, this) === void 0) _classPrivateFieldSet2(_props, this, props);
|
|
1068
1077
|
await _assertClassBrand(_Lifecycle_brand, this, _ensureInitialized).call(this);
|
|
1069
1078
|
}
|
|
1070
1079
|
/**
|
|
1080
|
+
* Whether lifecycle startup has completed for this instance.
|
|
1081
|
+
*
|
|
1082
|
+
* @returns `true` after capabilities and the host `onStart` have finished.
|
|
1083
|
+
*/
|
|
1084
|
+
isStarted() {
|
|
1085
|
+
return _classPrivateFieldGet2(_status, this) === "started";
|
|
1086
|
+
}
|
|
1087
|
+
/**
|
|
1071
1088
|
* The name used to address this Durable Object.
|
|
1072
1089
|
*
|
|
1073
1090
|
* Native `ctx.id.name` is authoritative. A read-only legacy storage fallback
|
|
@@ -1198,9 +1215,8 @@ function _runInHostBoundary(fn, scope) {
|
|
|
1198
1215
|
request: scope?.request
|
|
1199
1216
|
}, fn));
|
|
1200
1217
|
}
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
await this.start();
|
|
1218
|
+
function _readyForCapabilityOperation() {
|
|
1219
|
+
return _assertClassBrand(_Lifecycle_brand, this, _ensureInitialized).call(this);
|
|
1204
1220
|
}
|
|
1205
1221
|
async function _dispatchRoute(envelope) {
|
|
1206
1222
|
await _assertClassBrand(_Lifecycle_brand, this, _ensureInitialized).call(this);
|
|
@@ -1247,13 +1263,26 @@ function _reportEventSinkFailure(event, error) {
|
|
|
1247
1263
|
function _deliverPendingEvents() {
|
|
1248
1264
|
for (const event of _classPrivateFieldGet2(_pendingEvents, this).splice(0)) _assertClassBrand(_Lifecycle_brand, this, _publishCapabilityEvent).call(this, event);
|
|
1249
1265
|
}
|
|
1250
|
-
|
|
1251
|
-
if (_classPrivateFieldGet2(_status, this) === "started") return;
|
|
1266
|
+
function _ensureInitialized() {
|
|
1267
|
+
if (_classPrivateFieldGet2(_status, this) === "started") return Promise.resolve();
|
|
1268
|
+
if (_classPrivateFieldGet2(_startup, this) === void 0) {
|
|
1269
|
+
const startup = Promise.resolve().then(() => _assertClassBrand(_Lifecycle_brand, this, _runStartup).call(this)).finally(() => {
|
|
1270
|
+
if (_classPrivateFieldGet2(_startup, this) === startup) _classPrivateFieldSet2(_startup, this, void 0);
|
|
1271
|
+
});
|
|
1272
|
+
_classPrivateFieldSet2(_startup, this, startup);
|
|
1273
|
+
return startup;
|
|
1274
|
+
}
|
|
1275
|
+
if (lifecycleStartupScope.getStore()?.has(this)) return Promise.resolve();
|
|
1276
|
+
return _classPrivateFieldGet2(_startup, this);
|
|
1277
|
+
}
|
|
1278
|
+
async function _runStartup() {
|
|
1252
1279
|
if (_classPrivateFieldGet2(_ctx, this).id.name === void 0 && _classPrivateFieldGet2(_legacyName, this) === void 0) _classPrivateFieldSet2(_legacyName, this, await _classPrivateFieldGet2(_ctx, this).storage.get(LEGACY_NAME_STORAGE_KEY));
|
|
1253
1280
|
this.name;
|
|
1254
1281
|
_classPrivateFieldSet2(_capabilitiesLocked, this, true);
|
|
1282
|
+
const scope = new Set(lifecycleStartupScope.getStore());
|
|
1283
|
+
scope.add(this);
|
|
1255
1284
|
let error;
|
|
1256
|
-
await _classPrivateFieldGet2(_ctx, this).blockConcurrencyWhile(async () => {
|
|
1285
|
+
await _classPrivateFieldGet2(_ctx, this).blockConcurrencyWhile(() => lifecycleStartupScope.run(scope, async () => {
|
|
1257
1286
|
_classPrivateFieldSet2(_status, this, "starting");
|
|
1258
1287
|
try {
|
|
1259
1288
|
await runWithoutCurrentAgent(() => _classPrivateFieldGet2(_capabilityRunner, this).start({ props: _classPrivateFieldGet2(_props, this) }));
|
|
@@ -1263,7 +1292,7 @@ async function _ensureInitialized() {
|
|
|
1263
1292
|
_classPrivateFieldSet2(_status, this, "zero");
|
|
1264
1293
|
error = cause;
|
|
1265
1294
|
}
|
|
1266
|
-
});
|
|
1295
|
+
}));
|
|
1267
1296
|
if (error) {
|
|
1268
1297
|
_classPrivateFieldSet2(_rearmRequestedDuringStart, this, false);
|
|
1269
1298
|
_classPrivateFieldGet2(_pendingEvents, this).length = 0;
|
|
@@ -1311,4 +1340,4 @@ async function _resolveJobDispatch(owner) {
|
|
|
1311
1340
|
//#endregion
|
|
1312
1341
|
export { abortWithoutAlarmRetry as a, setLifecycleRouteTransport as i, setLifecycleEventSink as n, setLifecycleHostInvoker as r, Lifecycle as t };
|
|
1313
1342
|
|
|
1314
|
-
//# sourceMappingURL=lifecycle-
|
|
1343
|
+
//# sourceMappingURL=lifecycle-CFu6OV03.js.map
|