@webskill/sdk 0.4.0 → 0.5.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.d.ts +2 -0
- package/dist/agent.js +867 -0
- package/dist/browser.d.ts +137 -4
- package/dist/browser.js +457 -17
- package/dist/{catalogComponents-KsujmL4b-Clx1kCnU.js → catalogComponents-DV7cPpUm-C77AEEx9.js} +256 -92
- package/dist/{dist-C-Sh0MDU.js → dist-6C03DShK.js} +159 -19
- package/dist/{dist-D9Lcn5Pp.js → dist-bewtXYlO.js} +592 -28
- package/dist/governance.d.ts +46 -4
- package/dist/governance.js +44 -1
- package/dist/{index-CHXxDccV.d.ts → index-Bsqg4ftU.d.ts} +97 -7
- package/dist/index-D_7ZZjkl.d.ts +411 -0
- package/dist/{index-DLfR2Y6I.d.ts → index-vBz_FC9w.d.ts} +77 -4
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +1 -1
- package/dist/node.d.ts +3 -3
- package/dist/node.js +1 -1
- package/dist/{openUiLibrary-YLS-cxyT-C96jWDQq.js → openUiLibrary-W3Ce896k-ClFTRZFs.js} +3 -3
- package/dist/{skillVersionStore-uyefLPR1-DXOzbksv.d.ts → skillVersionStore-BzLbzFOL-CxwIewHJ.d.ts} +4 -3
- package/dist/testing.d.ts +1 -1
- package/dist/{types-7Wcg--Vh-1YlQ4jF9.d.ts → types-D_hoCri8-BnNPiZCi.d.ts} +29 -4
- package/dist/ui-react.d.ts +26 -5
- package/dist/ui-react.js +96 -21
- package/dist/ui-vue.d.ts +1 -1
- package/dist/ui-vue.js +25 -6
- package/dist/ui.d.ts +4 -4
- package/dist/ui.js +3 -3
- package/dist/{webskillLitCatalog-CSTbhBe_-CYIs5BX8.js → webskillLitCatalog-_mugzRHx-DiuJpCuf.js} +88 -2
- package/package.json +6 -1
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
import { a as InteractionOrigin, b as UiBridge } from "./types-D_hoCri8-BnNPiZCi.js";
|
|
2
|
+
import { x as ExternalToolSource } from "./index-vBz_FC9w.js";
|
|
3
|
+
//#region ../agent/dist/index.d.ts
|
|
4
|
+
//#region src/todo/types.d.ts
|
|
5
|
+
/** 待办条目状态:未开始 / 进行中 / 已完成(FR-3.1) */
|
|
6
|
+
type TodoStatus = 'pending' | 'in-progress' | 'completed';
|
|
7
|
+
interface TodoItem {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
status: TodoStatus;
|
|
11
|
+
/** 委派给子 agent 时填入(串行委派批次使用) */
|
|
12
|
+
delegatedTo?: string;
|
|
13
|
+
}
|
|
14
|
+
interface TodoList {
|
|
15
|
+
readonly items: readonly TodoItem[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 清单变更事件(FR-3.3)。
|
|
19
|
+
* 走既有的运行事件通道下发:工具结果里的 `$todo` 标记 → runtime 记 trace →
|
|
20
|
+
* console 读同一份 trace 文件重建时间线,不新建通道。
|
|
21
|
+
*/
|
|
22
|
+
type TodoEvent = {
|
|
23
|
+
type: 'todo.created';
|
|
24
|
+
items: readonly TodoItem[];
|
|
25
|
+
} | {
|
|
26
|
+
type: 'todo.updated';
|
|
27
|
+
item: TodoItem;
|
|
28
|
+
} | {
|
|
29
|
+
type: 'todo.cleared';
|
|
30
|
+
};
|
|
31
|
+
type TodoListener = (event: TodoEvent) => void;
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/todo/store.d.ts
|
|
34
|
+
/**
|
|
35
|
+
* 待办清单状态容器(FR-3.1 / FR-3.2 / FR-3.3)。
|
|
36
|
+
*
|
|
37
|
+
* 单一进行中约束在**容器内部**强制,而不是靠提示词约束模型:
|
|
38
|
+
* 模型偶尔会同时标记多条,UI 上出现两个「进行中」时用户无法判断实际进度。
|
|
39
|
+
* 这里把 `in-progress` 当成互斥资源,置位即降级其余条目。
|
|
40
|
+
*/
|
|
41
|
+
declare class TodoStore {
|
|
42
|
+
#private;
|
|
43
|
+
snapshot(): TodoList;
|
|
44
|
+
/** 订阅变更;返回退订函数 */
|
|
45
|
+
subscribe(listener: TodoListener): () => void;
|
|
46
|
+
/** 整表替换(模型每次给出完整清单,避免第二套增量协议)。多条 in-progress 时只保留第一条 */
|
|
47
|
+
create(items: readonly TodoItem[]): TodoList;
|
|
48
|
+
/**
|
|
49
|
+
* 更新单条。置为 `in-progress` 时其余进行中条目降级为 `pending`,
|
|
50
|
+
* 每条降级各发一次 `todo.updated`,事件序列与状态变化一一对应。
|
|
51
|
+
*/
|
|
52
|
+
update(id: string, patch: {
|
|
53
|
+
status?: TodoStatus;
|
|
54
|
+
title?: string;
|
|
55
|
+
delegatedTo?: string;
|
|
56
|
+
}): TodoList;
|
|
57
|
+
clear(): void;
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/todo/toolSource.d.ts
|
|
61
|
+
declare const MANAGE_TODO_TOOL = "manage_todo";
|
|
62
|
+
interface TodoToolSourceOptions {
|
|
63
|
+
/** 复用宿主已持有的容器(chatbot 用它驱动消息流内的清单面板);缺省新建 */
|
|
64
|
+
store?: TodoStore;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 把待办清单接到既有的工具协议上(设计 03 §4 红线:不引入第二个循环、
|
|
68
|
+
* 不引入第二套工具协议、包内不含执行器)。
|
|
69
|
+
*
|
|
70
|
+
* 变更经工具结果的 `$todo` 标记回传,runtime 据此记 trace——
|
|
71
|
+
* 与 `$chart` / `$surface` 同一条既有通道,console 读同一份 trace 文件重建时间线。
|
|
72
|
+
*/
|
|
73
|
+
declare function createTodoToolSource(options?: TodoToolSourceOptions): ExternalToolSource & {
|
|
74
|
+
store: TodoStore;
|
|
75
|
+
};
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region src/prompts/todo.d.ts
|
|
78
|
+
/**
|
|
79
|
+
* 待办清单提示词片段(FR-3.4)。
|
|
80
|
+
*
|
|
81
|
+
* 体积约束(设计 03 §8):开启后常驻——每次请求都带,所以必须比生成式 UI 的
|
|
82
|
+
* ~14 KB catalog 小一个数量级。这里刻意只给规则,不给示例对话。
|
|
83
|
+
*/
|
|
84
|
+
declare const TODO_SYSTEM_PROMPT: string;
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/skillGeneration/types.d.ts
|
|
87
|
+
/** 生成产物(设计 02 §1.2):SKILL.md 全文 + 附带脚本/引用文件 */
|
|
88
|
+
interface GeneratedSkillDraft {
|
|
89
|
+
name: string;
|
|
90
|
+
description: string;
|
|
91
|
+
/** SKILL.md 全文,含 frontmatter */
|
|
92
|
+
content: string;
|
|
93
|
+
files?: readonly {
|
|
94
|
+
path: string;
|
|
95
|
+
content: string;
|
|
96
|
+
}[];
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* 候选收货端口。实现由宿主注入——`@webskill/agent` 不依赖 `@webskill/governance`
|
|
100
|
+
* (治理层要求宿主提供治理根与审计存储,是可选层)。
|
|
101
|
+
* `@webskill/governance` 的 `createCandidateSink()` 是现成实现。
|
|
102
|
+
*/
|
|
103
|
+
interface SkillCandidateSink {
|
|
104
|
+
submit(input: {
|
|
105
|
+
draft: GeneratedSkillDraft;
|
|
106
|
+
/** 触发生成的会话(审计留痕与 console 溯源用) */
|
|
107
|
+
sessionId?: string;
|
|
108
|
+
/** 用户确认的时刻(FR-9.7 要求审计能查到确认事实) */
|
|
109
|
+
confirmedAt: string;
|
|
110
|
+
}): Promise<{
|
|
111
|
+
id: string;
|
|
112
|
+
}>;
|
|
113
|
+
}
|
|
114
|
+
/** 频率约束(设计 02 §1.6) */
|
|
115
|
+
interface SkillGenerationPolicy {
|
|
116
|
+
/** 单次会话内的生成次数上限,默认 3 */
|
|
117
|
+
maxPerSession?: number;
|
|
118
|
+
}
|
|
119
|
+
type SkillGenerationOutcome = {
|
|
120
|
+
status: 'submitted';
|
|
121
|
+
candidateId: string;
|
|
122
|
+
name: string;
|
|
123
|
+
} | {
|
|
124
|
+
status: 'declined';
|
|
125
|
+
};
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region src/skillGeneration/generator.d.ts
|
|
128
|
+
interface SkillGeneratorOptions {
|
|
129
|
+
/** 确认交互走既有的 UiBridge——不新造交互通道(设计 02 §1.4) */
|
|
130
|
+
ui: UiBridge;
|
|
131
|
+
/** 缺省表示宿主没接治理层,调用时报 SKILL_GENERATION_DISABLED */
|
|
132
|
+
sink?: SkillCandidateSink;
|
|
133
|
+
policy?: SkillGenerationPolicy;
|
|
134
|
+
/** 生成所属会话,写入审计与候选 metadata */
|
|
135
|
+
sessionId?: () => string | undefined;
|
|
136
|
+
now?: () => Date;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* 技能自动生成策略。生成动作是策略而不是内核:它不进入 `AgentLoop`,
|
|
140
|
+
* 而是经既有的 `ExternalToolSource` 扩展点接入(设计 02 §0)。
|
|
141
|
+
*
|
|
142
|
+
* 固定顺序:生成 → 校验 → 确认 → 提交。任何一步不通过都不产生候选。
|
|
143
|
+
* @experimental
|
|
144
|
+
*/
|
|
145
|
+
declare class SkillGenerator {
|
|
146
|
+
#private;
|
|
147
|
+
constructor(options: SkillGeneratorOptions);
|
|
148
|
+
/** 本会话剩余的生成次数 */
|
|
149
|
+
get remaining(): number;
|
|
150
|
+
generate(draft: GeneratedSkillDraft): Promise<SkillGenerationOutcome>;
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/skillGeneration/toolSource.d.ts
|
|
154
|
+
declare const GENERATE_SKILL_TOOL = "generate_skill";
|
|
155
|
+
type SkillGenerationToolSourceOptions = SkillGeneratorOptions;
|
|
156
|
+
/**
|
|
157
|
+
* 把技能自动生成接到既有的工具协议上(设计 02 §1.3)。
|
|
158
|
+
*
|
|
159
|
+
* 该工具源默认不注册:宿主只有在开关打开时才把它放进工具表,
|
|
160
|
+
* 关闭时模型的工具列表里根本没有这个名字。
|
|
161
|
+
*/
|
|
162
|
+
declare function createSkillGenerationToolSource(options: SkillGenerationToolSourceOptions): ExternalToolSource;
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region src/prompts/skillGeneration.d.ts
|
|
165
|
+
/**
|
|
166
|
+
* 技能自动生成的系统提示词。默认不注册工具,因此这段提示词只在
|
|
167
|
+
* 宿主打开开关时才进入上下文(设计 02 §1.3)。
|
|
168
|
+
*/
|
|
169
|
+
declare const SKILL_GENERATION_SYSTEM_PROMPT: string;
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region src/delegation/types.d.ts
|
|
172
|
+
/** 一次委派请求(设计 03 §12) */
|
|
173
|
+
interface DelegationRequest {
|
|
174
|
+
/** 关联的待办条目;委派关系经它落到清单上(FR-11.5) */
|
|
175
|
+
todoId: string;
|
|
176
|
+
task: string;
|
|
177
|
+
/** 子 agent 可用的工具子集;缺省继承父级 */
|
|
178
|
+
allowedTools?: readonly string[];
|
|
179
|
+
}
|
|
180
|
+
interface DelegationResult {
|
|
181
|
+
todoId: string;
|
|
182
|
+
outcome: 'completed' | 'failed';
|
|
183
|
+
/** 只回传结论,不回传子 agent 的中间历史(FR-11.3) */
|
|
184
|
+
summary: string;
|
|
185
|
+
}
|
|
186
|
+
/** 子 agent 的实际预算(父级剩余与自身上限取小,见 §15) */
|
|
187
|
+
interface DelegationBudget {
|
|
188
|
+
maxTurns: number;
|
|
189
|
+
timeoutMs: number;
|
|
190
|
+
}
|
|
191
|
+
/** 父 agent 当前剩余的预算;由宿主在委派发生的那一刻读取 */
|
|
192
|
+
interface ParentBudget {
|
|
193
|
+
remainingTurns: number;
|
|
194
|
+
remainingTimeoutMs: number;
|
|
195
|
+
}
|
|
196
|
+
interface SubAgentRunInput {
|
|
197
|
+
task: string;
|
|
198
|
+
/** 缺省表示继承父级工具集 */
|
|
199
|
+
allowedTools?: readonly string[];
|
|
200
|
+
budget: DelegationBudget;
|
|
201
|
+
/** 超时由编排器统一裁决:宿主须把它透传给子 run,中途取消即抛错 */
|
|
202
|
+
signal: AbortSignal;
|
|
203
|
+
/** 子 agent 发起交互时挂在 `InteractionRequest.origin` 上(FR-11.6) */
|
|
204
|
+
origin: InteractionOrigin;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* 子 agent 执行端口。**实现不在本包内**——包内不得含执行器(FR-A.4)。
|
|
208
|
+
* 宿主的实现通常是「再跑一次 `AgentLoop.run`,把结论摘要回传」。
|
|
209
|
+
*/
|
|
210
|
+
type SubAgentRunner = (input: SubAgentRunInput) => Promise<{
|
|
211
|
+
summary: string;
|
|
212
|
+
}>;
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region src/delegation/orchestrator.d.ts
|
|
215
|
+
interface DelegationOrchestratorOptions {
|
|
216
|
+
/** 缺省表示宿主没接子 agent 执行端口,调用时报 DELEGATION_UNAVAILABLE */
|
|
217
|
+
runner?: SubAgentRunner;
|
|
218
|
+
/** 委派发生的那一刻读取父级剩余预算(§15) */
|
|
219
|
+
parentBudget: () => ParentBudget;
|
|
220
|
+
/** 子 agent 自身上限;与父级剩余取小 */
|
|
221
|
+
policy?: Partial<DelegationBudget>;
|
|
222
|
+
/** 接上清单后委派关系在 UI 可见(FR-11.5) */
|
|
223
|
+
todos?: TodoStore;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* 串行委派编排器(设计 03 §13–§16)。
|
|
227
|
+
*
|
|
228
|
+
* 严格串行由**内部互斥**保证而不是调用方自觉:并发委派会产生并发待决交互,
|
|
229
|
+
* 而当前交互模型是单一待决 nonce,届时表现为「点了没反应」。
|
|
230
|
+
* 放开并发必须显式改这里的守卫,不会悄悄发生。
|
|
231
|
+
*
|
|
232
|
+
* 上下文隔离靠回值形状达成:只有 `summary` 回到父 agent,
|
|
233
|
+
* 子 agent 的消息历史根本不经过本对象。
|
|
234
|
+
* @experimental
|
|
235
|
+
*/
|
|
236
|
+
declare class DelegationOrchestrator {
|
|
237
|
+
#private;
|
|
238
|
+
constructor(options: DelegationOrchestratorOptions);
|
|
239
|
+
/** 当前正在执行的委派任务;无则 undefined */
|
|
240
|
+
get running(): string | undefined;
|
|
241
|
+
delegate(request: DelegationRequest): Promise<DelegationResult>;
|
|
242
|
+
}
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region src/delegation/toolSource.d.ts
|
|
245
|
+
declare const DELEGATE_TASK_TOOL = "delegate_task";
|
|
246
|
+
interface DelegationToolSourceOptions extends DelegationOrchestratorOptions {
|
|
247
|
+
/** 复用宿主已持有的编排器(同一个 run 内父 agent 只能有一个);缺省新建 */
|
|
248
|
+
orchestrator?: DelegationOrchestrator;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* 把串行委派接到既有工具协议上(红线:不引入第二个循环、不引入第二套工具协议、
|
|
252
|
+
* 包内不含执行器——子 run 由宿主注入的 `runner` 执行)。
|
|
253
|
+
*
|
|
254
|
+
* 结果里只有 `summary`:上下文隔离不是靠调用方自律,是因为这里根本拿不到子 agent 的历史。
|
|
255
|
+
* @experimental
|
|
256
|
+
*/
|
|
257
|
+
declare function createDelegationToolSource(options: DelegationToolSourceOptions): ExternalToolSource & {
|
|
258
|
+
orchestrator: DelegationOrchestrator;
|
|
259
|
+
};
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region src/delegation/origin.d.ts
|
|
262
|
+
/**
|
|
263
|
+
* 给子 agent 的交互请求打上来源标识(FR-11.6)。
|
|
264
|
+
*
|
|
265
|
+
* 为什么是包装 bridge 而不是让编排器去改请求:交互请求由子 run 内部各处发起
|
|
266
|
+
* (缺参表单、confirm、授权),编排器看不到它们。宿主在构造子 run 的 bridge 时套一层,
|
|
267
|
+
* 所有出口就都带上了来源。
|
|
268
|
+
* @experimental
|
|
269
|
+
*/
|
|
270
|
+
declare function withDelegationOrigin(bridge: UiBridge, origin: InteractionOrigin): UiBridge;
|
|
271
|
+
//#endregion
|
|
272
|
+
//#region src/prompts/delegation.d.ts
|
|
273
|
+
/**
|
|
274
|
+
* 串行委派的策略提示词(设计 03 §13)。
|
|
275
|
+
*
|
|
276
|
+
* 「一次只能有一个」是编排器的硬约束,这里写进提示词是为了让模型不去
|
|
277
|
+
* 尝试并行委派——被拒绝的调用会浪费一轮,而不是产生并发。
|
|
278
|
+
*/
|
|
279
|
+
declare const DELEGATION_SYSTEM_PROMPT: string;
|
|
280
|
+
//#endregion
|
|
281
|
+
//#region src/perception/types.d.ts
|
|
282
|
+
/**
|
|
283
|
+
* 页面只读感知的策略层类型(需求 10)。
|
|
284
|
+
*
|
|
285
|
+
* 这一层刻意不含任何 DOM 概念:遍历实现在 `@webskill/browser`,
|
|
286
|
+
* 本包只定义「什么允许被读」以及读到的东西长什么样。
|
|
287
|
+
*/
|
|
288
|
+
/**
|
|
289
|
+
* 可感知范围白名单(FR-10.2,硬约束)。
|
|
290
|
+
*
|
|
291
|
+
* **没有默认值,空 `include` 就是什么都读不到。** 宿主忘了配的后果是
|
|
292
|
+
* 功能不可用,而不是全页泄露——失败方向必须落在安全那一侧。
|
|
293
|
+
* @experimental
|
|
294
|
+
*/
|
|
295
|
+
interface PerceptionScope {
|
|
296
|
+
/** 可感知的根节点选择器;未声明即不可读 */
|
|
297
|
+
include: readonly string[];
|
|
298
|
+
/** 从 include 子树中剪除的敏感区域(凭据输入、个人信息展示区等) */
|
|
299
|
+
exclude?: readonly string[];
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* 结构化元素描述(FR-10.4,硬约束):只有角色、名称、值。
|
|
303
|
+
*
|
|
304
|
+
* 不下发 HTML 原文有两条理由:HTML 里的 class / data 属性 / 注释远超模型
|
|
305
|
+
* 完成任务所需;且页面文本一旦以 HTML 形式进上下文,就多了一条注入通道。
|
|
306
|
+
* @experimental
|
|
307
|
+
*/
|
|
308
|
+
interface PerceivedNode {
|
|
309
|
+
/** 可访问性角色 */
|
|
310
|
+
role: string;
|
|
311
|
+
/** 可访问名称 */
|
|
312
|
+
name?: string;
|
|
313
|
+
/** 仅非敏感控件的当前值 */
|
|
314
|
+
value?: string;
|
|
315
|
+
children?: readonly PerceivedNode[];
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* 页面读取实现的注入口(浏览器侧 `createDomPerceptionReader`)。
|
|
319
|
+
*
|
|
320
|
+
* 参数是宿主配置的 scope,不是模型给的——`PagePerceptionPolicy.perceive()`
|
|
321
|
+
* 根本不接受范围参数,模型没有可以影响它的入口(AC-10.8)。
|
|
322
|
+
* @experimental
|
|
323
|
+
*/
|
|
324
|
+
interface PagePerceptionReader {
|
|
325
|
+
read(scope: PerceptionScope): Promise<readonly PerceivedNode[]> | readonly PerceivedNode[];
|
|
326
|
+
}
|
|
327
|
+
/** 一次感知的留痕(FR-10.5 的 UI 提示与 FR-10.6 的审计共用同一条记录) @experimental */
|
|
328
|
+
interface PerceptionRecord {
|
|
329
|
+
/** ISO 8601 */
|
|
330
|
+
at: string;
|
|
331
|
+
/** 本次实际生效的白名单 */
|
|
332
|
+
include: readonly string[];
|
|
333
|
+
exclude: readonly string[];
|
|
334
|
+
/** 读到的顶层节点数;用于「它读的比我预期的多」这类判断 */
|
|
335
|
+
nodeCount: number;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* 审计落盘端口。刻意只声明 `append` 的结构化子集,`FsAuditLog` 直接满足——
|
|
339
|
+
* agent 包不能依赖 governance,但审计不能因此变成「记在内存里」。
|
|
340
|
+
* @experimental
|
|
341
|
+
*/
|
|
342
|
+
interface PerceptionAuditSink {
|
|
343
|
+
append(event: {
|
|
344
|
+
type: string;
|
|
345
|
+
target: string;
|
|
346
|
+
data?: Record<string, unknown>;
|
|
347
|
+
}): Promise<unknown>;
|
|
348
|
+
}
|
|
349
|
+
//#endregion
|
|
350
|
+
//#region src/perception/policy.d.ts
|
|
351
|
+
interface PagePerceptionPolicyOptions {
|
|
352
|
+
/** 宿主声明的白名单;`include` 为空即整个能力不可用 */
|
|
353
|
+
scope: PerceptionScope;
|
|
354
|
+
reader: PagePerceptionReader;
|
|
355
|
+
/** FR-10.6:每次感知写审计。不注入即不留痕,装配方要自己承担这个选择 */
|
|
356
|
+
audit?: PerceptionAuditSink;
|
|
357
|
+
/** 审计事件的 target(缺省 `page`);多页面宿主可用它区分来源 */
|
|
358
|
+
auditTarget?: string;
|
|
359
|
+
now?(): string;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* 页面只读感知策略(需求 10)。
|
|
363
|
+
*
|
|
364
|
+
* **`perceive()` 不接受任何参数**——这是「白名单判定不受模型输出影响」
|
|
365
|
+
* (AC-10.8)的实现方式。不是先拿模型给的范围再去校验,而是模型压根没有
|
|
366
|
+
* 表达范围的入口:能被读的区域只由构造时的 `scope` 决定。
|
|
367
|
+
*
|
|
368
|
+
* 本类**没有**任何点击 / 输入 / 提交 / 导航 / 滚动方法(FR-10.7)。
|
|
369
|
+
* @experimental
|
|
370
|
+
*/
|
|
371
|
+
declare class PagePerceptionPolicy {
|
|
372
|
+
#private;
|
|
373
|
+
constructor(options: PagePerceptionPolicyOptions);
|
|
374
|
+
/** 白名单为空即不可用(FR-10.1/10.2):宿主没声明范围就没有这个能力 */
|
|
375
|
+
get enabled(): boolean;
|
|
376
|
+
get scope(): PerceptionScope;
|
|
377
|
+
/** 最近的感知记录(console 只读展示用),新的在前 */
|
|
378
|
+
get records(): readonly PerceptionRecord[];
|
|
379
|
+
/** FR-10.5:感知发生时通知 UI,chatbot 据此在消息流里标注一行 */
|
|
380
|
+
subscribe(listener: (record: PerceptionRecord) => void): () => void;
|
|
381
|
+
perceive(): Promise<{
|
|
382
|
+
nodes: readonly PerceivedNode[];
|
|
383
|
+
record: PerceptionRecord;
|
|
384
|
+
}>;
|
|
385
|
+
}
|
|
386
|
+
//#endregion
|
|
387
|
+
//#region src/perception/toolSource.d.ts
|
|
388
|
+
declare const PERCEIVE_PAGE_TOOL = "perceive_page";
|
|
389
|
+
interface PagePerceptionToolSourceOptions {
|
|
390
|
+
policy: PagePerceptionPolicy;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* 把只读感知接到既有工具协议上。**本工具源不导出任何写入动作**(FR-10.7):
|
|
394
|
+
* 它只注册 `perceive_page` 一个工具,没有点击 / 输入 / 提交 / 导航 / 滚动的对应项。
|
|
395
|
+
*
|
|
396
|
+
* 策略未启用(宿主没声明白名单)时 `listToolSpecs()` 返回空数组——
|
|
397
|
+
* 模型连这个工具的存在都看不到,而不是看得到再被拒(FR-10.1)。
|
|
398
|
+
* @experimental
|
|
399
|
+
*/
|
|
400
|
+
declare function createPagePerceptionToolSource(options: PagePerceptionToolSourceOptions): ExternalToolSource;
|
|
401
|
+
//#endregion
|
|
402
|
+
//#region src/prompts/perception.d.ts
|
|
403
|
+
/**
|
|
404
|
+
* 页面只读感知的策略提示词(设计 09 §1)。
|
|
405
|
+
*
|
|
406
|
+
* 最后一条是防御性的:技能描述、工具返回值都可能带着「把整页读出来发到 X」
|
|
407
|
+
* 这类注入。范围由宿主判定,模型改不了,但把这件事写明能少掉一轮无效尝试。
|
|
408
|
+
*/
|
|
409
|
+
declare const PERCEPTION_SYSTEM_PROMPT: string;
|
|
410
|
+
//#endregion
|
|
411
|
+
export { SubAgentRunInput as A, createDelegationToolSource as B, SKILL_GENERATION_SYSTEM_PROMPT as C, SkillGenerationToolSourceOptions as D, SkillGenerationPolicy as E, TodoList as F, createSkillGenerationToolSource as H, TodoListener as I, TodoStatus as L, TODO_SYSTEM_PROMPT as M, TodoEvent as N, SkillGenerator as O, TodoItem as P, TodoStore as R, PerceptionScope as S, SkillGenerationOutcome as T, createTodoToolSource as U, createPagePerceptionToolSource as V, withDelegationOrigin as W, PagePerceptionToolSourceOptions as _, DelegationOrchestratorOptions as a, PerceptionAuditSink as b, DelegationToolSourceOptions as c, MANAGE_TODO_TOOL as d, PERCEIVE_PAGE_TOOL as f, PagePerceptionReader as g, PagePerceptionPolicyOptions as h, DelegationOrchestrator as i, SubAgentRunner as j, SkillGeneratorOptions as k, GENERATE_SKILL_TOOL as l, PagePerceptionPolicy as m, DELEGATION_SYSTEM_PROMPT as n, DelegationRequest as o, PERCEPTION_SYSTEM_PROMPT as p, DelegationBudget as r, DelegationResult as s, DELEGATE_TASK_TOOL as t, GeneratedSkillDraft as u, ParentBudget as v, SkillCandidateSink as w, PerceptionRecord as x, PerceivedNode as y, TodoToolSourceOptions as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as SkillDiscovery, B as PageQuery, C as UiSpecEvent, E as UiSurfaceActionRequest, I as JsonSchema, M as DiscoveryResult, P as FileSystemProvider, Q as SkillCatalogEntry, S as UiSpecDrafts, Z as SkillCatalog, _ as MemoryStore, at as SkillManifest, b as UiBridge, d as LlmContentPart, et as SkillDocument, f as LlmMessage, g as LlmToolSpec, gt as ValidationReport, i as FormField, l as LlmClient, m as LlmStreamEvent, mt as UiSpecNode, n as ArtifactStore, o as InteractionPolicy, p as LlmResponse, r as ChartSpec, s as InteractionRequest, t as Artifact, tt as SkillInstallSource, u as LlmCompleteInput, v as RenderBlock, y as RenderResultRequest, yt as WebSkillErrorCode, z as Page } from "./types-D_hoCri8-BnNPiZCi.js";
|
|
2
2
|
//#region ../runtime/dist/index.d.ts
|
|
3
3
|
//#region src/llm/parts.d.ts
|
|
4
4
|
/** 纯文本消息内容的构造快捷方式(引擎内部绝大多数消息仍是纯文本) */
|
|
@@ -263,6 +263,11 @@ type ExecuteLifecycleData = {
|
|
|
263
263
|
name: string;
|
|
264
264
|
callId: string;
|
|
265
265
|
args: string;
|
|
266
|
+
/**
|
|
267
|
+
* failed 时的结构化错误码(如 `TOOL_NOT_ALLOWED`)。
|
|
268
|
+
* “被策略拦下”与“执行出错”在 UI 上是两件事,消费方不应靠解析文案区分。
|
|
269
|
+
*/
|
|
270
|
+
errorCode?: string;
|
|
266
271
|
} | {
|
|
267
272
|
kind: 'llm-delta';
|
|
268
273
|
delta: string;
|
|
@@ -335,7 +340,7 @@ type LifecycleHook = (ctx: LifecycleHookContext) => Promise<void | {
|
|
|
335
340
|
}>;
|
|
336
341
|
//#endregion
|
|
337
342
|
//#region src/trace/types.d.ts
|
|
338
|
-
type TraceEventType = 'skill.routed' | 'skill.activated' | 'skill.integrity-failed' | 'llm.request' | 'llm.response' | 'tool.started' | 'tool.completed' | 'tool.failed' | 'tool.denied' | 'artifact.created' | 'ui.requested' | 'ui.resumed' | 'ui.surface-action.requested' | 'ui.surface-action.resolved' | 'ui.rendered' | 'run.warning' | 'run.completed' | 'run.cancelled' | 'run.failed' | 'run.resumed';
|
|
343
|
+
type TraceEventType = 'skill.routed' | 'skill.activated' | 'skill.integrity-failed' | 'llm.request' | 'llm.response' | 'tool.started' | 'tool.completed' | 'tool.failed' | 'tool.denied' | 'artifact.created' | 'ui.requested' | 'ui.resumed' | 'ui.surface-action.requested' | 'ui.surface-action.resolved' | 'ui.rendered' | 'todo.created' | 'todo.updated' | 'todo.cleared' | 'run.warning' | 'run.completed' | 'run.cancelled' | 'run.failed' | 'run.resumed';
|
|
339
344
|
interface TraceEvent {
|
|
340
345
|
id: string;
|
|
341
346
|
runId: string;
|
|
@@ -360,6 +365,8 @@ interface AgentLoopConfig {
|
|
|
360
365
|
toolResultMaxBytes?: number;
|
|
361
366
|
/** session paramHistory 保留条数上限(默认 50,超出裁最旧) */
|
|
362
367
|
paramHistoryLimit?: number;
|
|
368
|
+
/** 跨会话表单填写值的字段数上限(默认 100,超出裁最旧) */
|
|
369
|
+
formValueLimit?: number;
|
|
363
370
|
}
|
|
364
371
|
/** 技能状态拦截 port(治理装配;无注入默认全放行) */
|
|
365
372
|
interface SkillStateGuard {
|
|
@@ -469,8 +476,11 @@ declare function extractUiSpecEvents(data: unknown): UiSpecEvent[];
|
|
|
469
476
|
* JsonSchema → 表单模型:按 properties 生成字段,required 标记必填;
|
|
470
477
|
* providedArgs 已有的值作为 defaultValue 预填(表单只为补齐缺失项服务)。
|
|
471
478
|
* type 映射:string→text、number/integer→number、boolean→boolean、enum→select、其余→textarea。
|
|
479
|
+
* 传入 skillName 时给每个字段带上跨会话稳定的 `fieldKey`(FR-5.6)。
|
|
472
480
|
*/
|
|
473
|
-
declare function schemaToForm(schema: JsonSchema, providedArgs?: Record<string, unknown
|
|
481
|
+
declare function schemaToForm(schema: JsonSchema, providedArgs?: Record<string, unknown>, options?: {
|
|
482
|
+
skillName?: string;
|
|
483
|
+
}): FormField[];
|
|
474
484
|
//#endregion
|
|
475
485
|
//#region src/facade/types.d.ts
|
|
476
486
|
/**
|
|
@@ -602,6 +612,36 @@ declare class SerializingMemoryStore implements MemoryStore {
|
|
|
602
612
|
transaction<T>(scope: string, fn: (inner: MemoryStore) => Promise<T>): Promise<T>;
|
|
603
613
|
}
|
|
604
614
|
//#endregion
|
|
615
|
+
//#region src/memory/formValues.d.ts
|
|
616
|
+
/** 跨会话表单填写值在 `user:{userId}` scope 下的 key(FR-5.7) @experimental */
|
|
617
|
+
declare const FORM_VALUES_KEY = "formValues";
|
|
618
|
+
/**
|
|
619
|
+
* 跨会话稳定的字段标识(FR-5.6)。必须带技能名:
|
|
620
|
+
* 只有字段名时,两个技能各自的 `email` 会互相串号。
|
|
621
|
+
* @experimental
|
|
622
|
+
*/
|
|
623
|
+
declare function formFieldKey(skillName: string, fieldName: string): string;
|
|
624
|
+
/** 某个字段最近一次的填写值 @experimental */
|
|
625
|
+
interface FormValueRecord {
|
|
626
|
+
value: unknown;
|
|
627
|
+
/** 写入时刻(epoch ms);超上限裁剪时按它排序 */
|
|
628
|
+
ts: number;
|
|
629
|
+
}
|
|
630
|
+
/** fieldKey → 最近一次填写值(**只留最近一次**,不是历史序列) @experimental */
|
|
631
|
+
type FormValueMap = Record<string, FormValueRecord>;
|
|
632
|
+
/** memory 里的原始值形状不受控(宿主可能手改文件),逐条过滤而不是整体信任 @experimental */
|
|
633
|
+
declare function readFormValues(raw: unknown): FormValueMap;
|
|
634
|
+
/** 合并本次提交并按上限裁剪最旧(FR-5.12) @experimental */
|
|
635
|
+
declare function putFormValues(current: FormValueMap, updates: FormValueMap, limit: number): FormValueMap;
|
|
636
|
+
/** 清除单个字段;不传 fieldKey 即全部清除(FR-5.11) @experimental */
|
|
637
|
+
declare function clearFormValues(current: FormValueMap, fieldKey?: string): FormValueMap;
|
|
638
|
+
/**
|
|
639
|
+
* 宿主侧的清除入口(FR-5.11):设置面板的「清除填写历史」直接调它,
|
|
640
|
+
* 不必自己知道 scope 与 key 的约定。
|
|
641
|
+
* @experimental
|
|
642
|
+
*/
|
|
643
|
+
declare function clearStoredFormValues(memory: MemoryStore, userId: string, fieldKey?: string): Promise<void>;
|
|
644
|
+
//#endregion
|
|
605
645
|
//#region src/artifacts/fsArtifactStore.d.ts
|
|
606
646
|
/**
|
|
607
647
|
* 基于 FileSystemProvider 的 ArtifactStore:产物落盘 <root>/<runId>/<path>,
|
|
@@ -768,6 +808,20 @@ declare class TraceRecorder {
|
|
|
768
808
|
list(): TraceEvent[];
|
|
769
809
|
}
|
|
770
810
|
//#endregion
|
|
811
|
+
//#region src/trace/todoMarker.d.ts
|
|
812
|
+
interface TodoTraceEvent {
|
|
813
|
+
type: TraceEventType;
|
|
814
|
+
data: Record<string, unknown>;
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* `$todo` 约定的形状校验:JSON content 的 data 含 `$todo` 键(单条或数组)→ trace 事件。
|
|
818
|
+
*
|
|
819
|
+
* 与 `$chart` / `$surface` 同一条既有通道——待办清单的状态机全部在 `@webskill/agent`,
|
|
820
|
+
* runtime 只认这三个事件类型名,不含任何计划态逻辑。畸形条目忽略不炸。
|
|
821
|
+
* @experimental
|
|
822
|
+
*/
|
|
823
|
+
declare function extractTodoTraceEvents(data: unknown): TodoTraceEvent[];
|
|
824
|
+
//#endregion
|
|
771
825
|
//#region src/engine/external.d.ts
|
|
772
826
|
/**
|
|
773
827
|
* 外部工具来源(runtime 扩展点,mcp 包实现并插入)。
|
|
@@ -919,6 +973,14 @@ interface AgentLoopDeps {
|
|
|
919
973
|
enabled: true;
|
|
920
974
|
userId: string;
|
|
921
975
|
};
|
|
976
|
+
/**
|
|
977
|
+
* 跨会话表单自动填充(FR-5.7);**不注入即关闭**,关闭时不查也不写。
|
|
978
|
+
* 与 `longTerm` 分开:后者存的是技能使用统计,本项存的是用户亲手填的内容,
|
|
979
|
+
* 两者的开关语义不同(AC-5.7)。
|
|
980
|
+
*/
|
|
981
|
+
formAutofill?: {
|
|
982
|
+
userId: string;
|
|
983
|
+
};
|
|
922
984
|
/** 外部工具来源(mcp 插件等);specs 在 run 开始时并入每轮 tools */
|
|
923
985
|
externalTools?: ExternalToolSource[];
|
|
924
986
|
/** 外部技能提供者(页面动态技能等) */
|
|
@@ -988,6 +1050,10 @@ interface WebSkillRuntimeDeps {
|
|
|
988
1050
|
enabled: true;
|
|
989
1051
|
userId: string;
|
|
990
1052
|
};
|
|
1053
|
+
/** 跨会话表单自动填充(FR-5.7);不注入即关闭,关闭时不查也不写 */
|
|
1054
|
+
formAutofill?: {
|
|
1055
|
+
userId: string;
|
|
1056
|
+
};
|
|
991
1057
|
/** 外部工具来源(mcp 插件等) */
|
|
992
1058
|
externalTools?: ExternalToolSource[];
|
|
993
1059
|
/** 外部技能提供者(页面动态技能等);Catalog 合并同名本地优先 */
|
|
@@ -1169,6 +1235,13 @@ interface RunToolCall {
|
|
|
1169
1235
|
args?: string;
|
|
1170
1236
|
/** 执行耗时 ms */
|
|
1171
1237
|
durationMs?: number;
|
|
1238
|
+
/**
|
|
1239
|
+
* failed 时的结构化错误码(如 `TOOL_NOT_ALLOWED`)。
|
|
1240
|
+
* 消费方据此区分「被策略拒绝」与「执行出错」,不必解析 message 文案。
|
|
1241
|
+
*/
|
|
1242
|
+
errorCode?: string;
|
|
1243
|
+
/** failed 时的错误说明(trace 事件的 message) */
|
|
1244
|
+
errorMessage?: string;
|
|
1172
1245
|
}
|
|
1173
1246
|
/**
|
|
1174
1247
|
* 从 run 的 trace 推导终态工具调用列表。
|
|
@@ -1272,4 +1345,4 @@ declare class FsSessionStore<TMessage = unknown> implements SessionStore<TMessag
|
|
|
1272
1345
|
delete(id: string): Promise<void>;
|
|
1273
1346
|
}
|
|
1274
1347
|
//#endregion
|
|
1275
|
-
export {
|
|
1348
|
+
export { RouteLifecycleData as $, fromVercelResult as $t, FsSessionStore as A, TodoTraceEvent as At, LifecycleEventInit as B, WebSkillApi as Bt, FS_SESSION_PAGE_SIZE as C, SessionStore as Ct, FsMemoryStore as D, SkillRouter as Dt, FsArtifactStore as E, SkillOutcomeReporter as Et, HookRunnerOptions as F, TraceEvent as Ft, OpenAiCompatibleClient as G, clearFormValues as Gt, LifecycleHookContext as H, WebSkillRuntimeDeps as Ht, InstalledSkillManifest as I, TraceEventType as It, READ_SKILL_FILE_INPUT_SCHEMA as J, createWebSkillApi as Jt, OpenAiCompatibleClientConfig as K, clearStoredFormValues as Kt, IntegrityVerdict as L, TraceRecorder as Lt, GoogleGenAiClient as M, ToolResolution as Mt, GoogleGenAiClientConfig as N, ToolResult as Nt, FsRunSnapshotStore as O, SkillStateGuard as Ot, HookRunner as P, TraceClock as Pt, RUN_TRACE_SCHEMA_VERSION as Q, formFieldKey as Qt, InteractLifecycleData as R, UnsupportedRunSnapshot as Rt, FORM_VALUES_KEY as S, SessionRecord as St, FormValueRecord as T, SkillIntegrityGuard as Tt, LifecycleListener as U, bridgeError as Ut, LifecycleHook as V, WebSkillRuntime as Vt, NetworkPolicy as W, buildRenderResult as Wt, READ_SKILL_FILE_TOOL_NAME as X, extractTodoTraceEvents as Xt, READ_SKILL_FILE_TOOL as Y, extractChartSpec as Yt, RUN_SNAPSHOT_SCHEMA_VERSION as Z, extractUiSpecEvents as Zt, CapabilityMode as _, toLlmToolSpec as _n, SchemaInferer as _t, AgentLoop as a, networkUrlHost as an, RunTerminationReason as at, ExternalSkillProvider as b, validateUiSpecNode as bn, SerializingMemoryStore as bt, AnthropicClient as c, normalizeToolError as cn, RunTraceFilter as ct, ApprovalScope as d, putFormValues as dn, RunTraceSummary as dt, fromVercelStreamPart as en, RouteResult as et, BridgeCapabilities as f, readFormValues as fn, RuntimePhase as ft, CapabilityApproval as g, textParts as gn, SESSION_SCHEMA_VERSION as gt, BridgeResponse as h, summarizeToolCalls as hn, RuntimeSessionHandle as ht, ActivateLifecycleData as i, networkPolicyLibSource as in, RunSnapshotStore as it, FullDisclosureRouter as j, ToolDefinition as jt, FsRunTraceStore as k, TerminalLifecycleData as kt, AnthropicClientConfig as l, parseBridgeRequest as ln, RunTraceMetrics as lt, BridgeRequest as m, schemaToForm as mn, RuntimeSession as mt, ASK_USER_TOOL as n, isUnsupportedRunSnapshot as nn, RunSnapshot as nt, AgentLoopConfig as o, normalizeErrorCode as on, RunToolCall as ot, BridgeCapability as p, resolveToolName as pn, RuntimeRun as pt, ProgressiveRouter as q, createScriptContext as qt, ASK_USER_TOOL_NAME as r, mergeCatalogEntries as rn, RunSnapshotListEntry as rt, AgentLoopDeps as s, normalizeToolContent as sn, RunTraceFile as st, ASK_USER_INPUT_SCHEMA as t, isNetworkAllowed as tn, RunResult as tt, ApprovalDecision as u, partsToText as un, RunTraceStore as ut, EventBus as v, toVercelToolSpecs as vn, ScriptExecutionContext as vt, FormValueMap as w, SkillFailureReport as wt, ExternalToolSource as x, SessionMeta as xt, ExecuteLifecycleData as y, validateUiSpecEvent as yn, ScriptExecutor as yt, LifecycleEvent as z, VercelToolSpec as zt };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { $ as
|
|
3
|
-
export { ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, type ActivateLifecycleData, AgentLoop, type AgentLoopConfig, type AgentLoopDeps, AnthropicClient, type AnthropicClientConfig, type ApprovalDecision, type ApprovalScope, type ArchiveLimits, type Artifact, type ArtifactStore, type BridgeCapabilities, type BridgeCapability, type BridgeRequest, type BridgeResponse, CapabilityApproval, type CapabilityMode, type CatalogRenderer, type ChartSpec, type CryptoKeyLike, DEFAULT_ARCHIVE_LIMITS, type DiscoveryResult, EventBus, type ExecuteLifecycleData, type ExternalSkillProvider, type ExternalToolSource, FS_SESSION_PAGE_SIZE, type FileStat, type FileSystemProvider, type FormField, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, type GoogleGenAiClientConfig, HookRunner, type HookRunnerOptions, type InstalledSkillManifest, type IntegrityVerdict, type InteractLifecycleData, type InteractionPolicy, type InteractionRequest, type InteractionResponse, type JsonSchema, type LifecycleEvent, type LifecycleEventInit, type LifecycleHook, type LifecycleHookContext, type LifecycleListener, type LlmClient, type LlmCompleteInput, type LlmContentPart, type LlmMessage, type LlmResponse, type LlmStreamEvent, type LlmToolCall, type LlmToolSpec, MANIFEST_EXCLUDED_FILES, MemoryFS, type MemoryStore, type NetworkPolicy, OpenAiCompatibleClient, type OpenAiCompatibleClientConfig, type Page, type PageQuery, ProgressiveRouter, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, type RemoteUrlPolicy, type RenderBlock, type RenderResultRequest, type RouteLifecycleData, type RouteResult, type RunResult, type RunSnapshot, type RunSnapshotListEntry, type RunSnapshotStore, type RunTerminationReason, type RunToolCall, type RunTraceFile, type RunTraceFilter, type RunTraceMetrics, type RunTraceStore, type RunTraceSummary, type RuntimePhase, type RuntimeRun, type RuntimeSession, type RuntimeSessionHandle, SESSION_SCHEMA_VERSION, SIGNATURE_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SKILL_SIGNATURE_FILE, type SchemaInferer, type ScriptExecutionContext, type ScriptExecutor, SerializingMemoryStore, type SessionMeta, type SessionRecord, type SessionStore, type SignatureAuditSink, type SignatureVerdict, type SkillCatalog, type SkillCatalogEntry, SkillDiscovery, type SkillDocument, type SkillFailureReport, type SkillInstallSource, type SkillIntegrityGuard, type SkillIssue, type SkillLocation, type SkillManagerPort, type SkillManifest, type SkillMetadata, type SkillOutcomeReporter, type SkillPackManifest, SkillReader, type SkillRouter, type SkillSignature, type SkillSource, type SkillStateGuard, type SkillsLockfile, type TerminalLifecycleData, type ToolDefinition, type ToolResolution, type ToolResult, type TraceClock, type TraceEvent, type TraceEventType, TraceRecorder, type TrustedKey, type TrustedKeyStore, type UiBridge, type UiSpecActionCapability, type UiSpecDrafts, type UiSpecEvent, type UiSpecNode, type UiSpecPatch, type UiSpecSnapshot, type UiSurfaceActionRequest, type UiSurfaceActionResponse, type UnsignedPolicy, type UnsupportedRunSnapshot, type ValidationReport, type VercelToolSpec, type VerifyResult, type WebSkillApi, WebSkillError, type WebSkillErrorCode, WebSkillRuntime, type WebSkillRuntimeDeps, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, computeDigest, createScriptContext, createWebSkillApi, escapeXml, exportSkills, extractChartSpec, extractUiSpecEvents, fromVercelResult, fromVercelStreamPart, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, mergeCatalogEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, partsToText, readResponseWithLimit, readSkillSignature, renderAvailableSkillsXml, renderCatalogJson, resolveArchiveLimits, resolveInsideRoot, resolveToolName, schemaToForm, signSkill, signaturePayloadBytes, summarizeToolCalls, textParts, toLlmToolSpec, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
|
|
1
|
+
import { $ as SkillDiscovery, A as CryptoKeyLike, At as isValidSkillName, B as PageQuery, Bt as renderCatalogJson, C as UiSpecEvent, Ct as buildCatalog, D as UiSurfaceActionResponse, Dt as computeDigest, E as UiSurfaceActionRequest, Et as checkSkillRules, F as FsTrustedKeyStore, Ft as parseSkillMarkdown, G as SKILL_NAME_MAX_LENGTH, Gt as unzipWithLimits, H as SIGNATURE_SCHEMA_VERSION, Ht as resolveInsideRoot, I as JsonSchema, It as parseSkillPackManifest, J as SKILL_SIGNATURE_FILE, Jt as verifySkillSignature, K as SKILL_NAME_PATTERN, Kt as validateSkills, L as MANIFEST_EXCLUDED_FILES, Lt as readResponseWithLimit, M as DiscoveryResult, Mt as keyIdOf, N as FileStat, Nt as messageOf, O as ArchiveLimits, Ot as escapeXml, P as FileSystemProvider, Pt as normalizePath, Q as SkillCatalogEntry, R as MemoryFS, Rt as readSkillSignature, S as UiSpecDrafts, St as atomicWriteText, T as UiSpecSnapshot, Tt as checkDependencyCycles, U as SKILLS_LOCKFILE, Ut as signSkill, V as RemoteUrlPolicy, Vt as resolveArchiveLimits, W as SKILL_MANIFEST_FILE, Wt as signaturePayloadBytes, X as SignatureVerdict, Y as SignatureAuditSink, Yt as xmlRenderer, Z as SkillCatalog, _ as MemoryStore, _t as VerifyResult, a as InteractionOrigin, at as SkillManifest, b as UiBridge, bt as assertRemoteUrlAllowed, c as InteractionResponse, ct as SkillReader, d as LlmContentPart, dt as SkillsLockfile, et as SkillDocument, f as LlmMessage, ft as TrustedKey, g as LlmToolSpec, gt as ValidationReport, h as LlmToolCall, ht as UnsignedPolicy, i as FormField, it as SkillManagerPort, j as DEFAULT_ARCHIVE_LIMITS, jt as jsonRenderer, k as CatalogRenderer, kt as exportSkills, l as LlmClient, lt as SkillSignature, m as LlmStreamEvent, mt as UiSpecNode, n as ArtifactStore, nt as SkillIssue, o as InteractionPolicy, ot as SkillMetadata, p as LlmResponse, pt as TrustedKeyStore, q as SKILL_PACK_FILE, qt as verifyManifest, r as ChartSpec, rt as SkillLocation, s as InteractionRequest, st as SkillPackManifest, t as Artifact, tt as SkillInstallSource, u as LlmCompleteInput, ut as SkillSource, v as RenderBlock, vt as WebSkillError, w as UiSpecPatch, wt as buildManifest, x as UiSpecActionCapability, xt as assertSafePathSegment, y as RenderResultRequest, yt as WebSkillErrorCode, z as Page, zt as renderAvailableSkillsXml } from "./types-D_hoCri8-BnNPiZCi.js";
|
|
2
|
+
import { $ as RouteLifecycleData, $t as fromVercelResult, A as FsSessionStore, At as TodoTraceEvent, B as LifecycleEventInit, Bt as WebSkillApi, C as FS_SESSION_PAGE_SIZE, Ct as SessionStore, D as FsMemoryStore, Dt as SkillRouter, E as FsArtifactStore, Et as SkillOutcomeReporter, F as HookRunnerOptions, Ft as TraceEvent, G as OpenAiCompatibleClient, Gt as clearFormValues, H as LifecycleHookContext, Ht as WebSkillRuntimeDeps, I as InstalledSkillManifest, It as TraceEventType, J as READ_SKILL_FILE_INPUT_SCHEMA, Jt as createWebSkillApi, K as OpenAiCompatibleClientConfig, Kt as clearStoredFormValues, L as IntegrityVerdict, Lt as TraceRecorder, M as GoogleGenAiClient, Mt as ToolResolution, N as GoogleGenAiClientConfig, Nt as ToolResult, O as FsRunSnapshotStore, Ot as SkillStateGuard, P as HookRunner, Pt as TraceClock, Q as RUN_TRACE_SCHEMA_VERSION, Qt as formFieldKey, R as InteractLifecycleData, Rt as UnsupportedRunSnapshot, S as FORM_VALUES_KEY, St as SessionRecord, T as FormValueRecord, Tt as SkillIntegrityGuard, U as LifecycleListener, Ut as bridgeError, V as LifecycleHook, Vt as WebSkillRuntime, W as NetworkPolicy, Wt as buildRenderResult, X as READ_SKILL_FILE_TOOL_NAME, Xt as extractTodoTraceEvents, Y as READ_SKILL_FILE_TOOL, Yt as extractChartSpec, Z as RUN_SNAPSHOT_SCHEMA_VERSION, Zt as extractUiSpecEvents, _ as CapabilityMode, _n as toLlmToolSpec, _t as SchemaInferer, a as AgentLoop, an as networkUrlHost, at as RunTerminationReason, b as ExternalSkillProvider, bn as validateUiSpecNode, bt as SerializingMemoryStore, c as AnthropicClient, cn as normalizeToolError, ct as RunTraceFilter, d as ApprovalScope, dn as putFormValues, dt as RunTraceSummary, en as fromVercelStreamPart, et as RouteResult, f as BridgeCapabilities, fn as readFormValues, ft as RuntimePhase, g as CapabilityApproval, gn as textParts, gt as SESSION_SCHEMA_VERSION, h as BridgeResponse, hn as summarizeToolCalls, ht as RuntimeSessionHandle, i as ActivateLifecycleData, in as networkPolicyLibSource, it as RunSnapshotStore, j as FullDisclosureRouter, jt as ToolDefinition, k as FsRunTraceStore, kt as TerminalLifecycleData, l as AnthropicClientConfig, ln as parseBridgeRequest, lt as RunTraceMetrics, m as BridgeRequest, mn as schemaToForm, mt as RuntimeSession, n as ASK_USER_TOOL, nn as isUnsupportedRunSnapshot, nt as RunSnapshot, o as AgentLoopConfig, on as normalizeErrorCode, ot as RunToolCall, p as BridgeCapability, pn as resolveToolName, pt as RuntimeRun, q as ProgressiveRouter, qt as createScriptContext, r as ASK_USER_TOOL_NAME, rn as mergeCatalogEntries, rt as RunSnapshotListEntry, s as AgentLoopDeps, sn as normalizeToolContent, st as RunTraceFile, t as ASK_USER_INPUT_SCHEMA, tn as isNetworkAllowed, tt as RunResult, u as ApprovalDecision, un as partsToText, ut as RunTraceStore, v as EventBus, vn as toVercelToolSpecs, vt as ScriptExecutionContext, w as FormValueMap, wt as SkillFailureReport, x as ExternalToolSource, xt as SessionMeta, y as ExecuteLifecycleData, yn as validateUiSpecEvent, yt as ScriptExecutor, z as LifecycleEvent, zt as VercelToolSpec } from "./index-vBz_FC9w.js";
|
|
3
|
+
export { ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, type ActivateLifecycleData, AgentLoop, type AgentLoopConfig, type AgentLoopDeps, AnthropicClient, type AnthropicClientConfig, type ApprovalDecision, type ApprovalScope, type ArchiveLimits, type Artifact, type ArtifactStore, type BridgeCapabilities, type BridgeCapability, type BridgeRequest, type BridgeResponse, CapabilityApproval, type CapabilityMode, type CatalogRenderer, type ChartSpec, type CryptoKeyLike, DEFAULT_ARCHIVE_LIMITS, type DiscoveryResult, EventBus, type ExecuteLifecycleData, type ExternalSkillProvider, type ExternalToolSource, FORM_VALUES_KEY, FS_SESSION_PAGE_SIZE, type FileStat, type FileSystemProvider, type FormField, type FormValueMap, type FormValueRecord, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, type GoogleGenAiClientConfig, HookRunner, type HookRunnerOptions, type InstalledSkillManifest, type IntegrityVerdict, type InteractLifecycleData, type InteractionOrigin, type InteractionPolicy, type InteractionRequest, type InteractionResponse, type JsonSchema, type LifecycleEvent, type LifecycleEventInit, type LifecycleHook, type LifecycleHookContext, type LifecycleListener, type LlmClient, type LlmCompleteInput, type LlmContentPart, type LlmMessage, type LlmResponse, type LlmStreamEvent, type LlmToolCall, type LlmToolSpec, MANIFEST_EXCLUDED_FILES, MemoryFS, type MemoryStore, type NetworkPolicy, OpenAiCompatibleClient, type OpenAiCompatibleClientConfig, type Page, type PageQuery, ProgressiveRouter, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, type RemoteUrlPolicy, type RenderBlock, type RenderResultRequest, type RouteLifecycleData, type RouteResult, type RunResult, type RunSnapshot, type RunSnapshotListEntry, type RunSnapshotStore, type RunTerminationReason, type RunToolCall, type RunTraceFile, type RunTraceFilter, type RunTraceMetrics, type RunTraceStore, type RunTraceSummary, type RuntimePhase, type RuntimeRun, type RuntimeSession, type RuntimeSessionHandle, SESSION_SCHEMA_VERSION, SIGNATURE_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SKILL_SIGNATURE_FILE, type SchemaInferer, type ScriptExecutionContext, type ScriptExecutor, SerializingMemoryStore, type SessionMeta, type SessionRecord, type SessionStore, type SignatureAuditSink, type SignatureVerdict, type SkillCatalog, type SkillCatalogEntry, SkillDiscovery, type SkillDocument, type SkillFailureReport, type SkillInstallSource, type SkillIntegrityGuard, type SkillIssue, type SkillLocation, type SkillManagerPort, type SkillManifest, type SkillMetadata, type SkillOutcomeReporter, type SkillPackManifest, SkillReader, type SkillRouter, type SkillSignature, type SkillSource, type SkillStateGuard, type SkillsLockfile, type TerminalLifecycleData, type TodoTraceEvent, type ToolDefinition, type ToolResolution, type ToolResult, type TraceClock, type TraceEvent, type TraceEventType, TraceRecorder, type TrustedKey, type TrustedKeyStore, type UiBridge, type UiSpecActionCapability, type UiSpecDrafts, type UiSpecEvent, type UiSpecNode, type UiSpecPatch, type UiSpecSnapshot, type UiSurfaceActionRequest, type UiSurfaceActionResponse, type UnsignedPolicy, type UnsupportedRunSnapshot, type ValidationReport, type VercelToolSpec, type VerifyResult, type WebSkillApi, WebSkillError, type WebSkillErrorCode, WebSkillRuntime, type WebSkillRuntimeDeps, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, clearFormValues, clearStoredFormValues, computeDigest, createScriptContext, createWebSkillApi, escapeXml, exportSkills, extractChartSpec, extractTodoTraceEvents, extractUiSpecEvents, formFieldKey, fromVercelResult, fromVercelStreamPart, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, mergeCatalogEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, partsToText, putFormValues, readFormValues, readResponseWithLimit, readSkillSignature, renderAvailableSkillsXml, renderCatalogJson, resolveArchiveLimits, resolveInsideRoot, resolveToolName, schemaToForm, signSkill, signaturePayloadBytes, summarizeToolCalls, textParts, toLlmToolSpec, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
|