@webskill/sdk 0.9.0 → 0.10.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 -2
- package/dist/agent.js +5 -1
- package/dist/browser.d.ts +5 -3
- package/dist/browser.js +15 -7
- package/dist/{catalogComponents-DfxxfUvn-T7Ic8QFV.js → catalogComponents-DTcYfpLQ-CcoOaz-Z.js} +1354 -415
- package/dist/{dist-BQe1uglQ.js → dist-1OFC-zax.js} +6 -4
- package/dist/{dist-CFmkV45C.js → dist-BViUeszk.js} +349 -32
- package/dist/{eventTypes-DbOpAECr-BjcjZVms.js → eventTypes-s2uwAcLG-Go3l_dUe.js} +5 -2
- package/dist/governance.d.ts +29 -6
- package/dist/governance.js +45 -7
- package/dist/{index-DXNTIa-6.d.ts → index-B0QPLWPZ.d.ts} +6 -2
- package/dist/{index-lLcCpHE-.d.ts → index-BF4E1a9j.d.ts} +10 -3
- package/dist/{index-znZjobkr.d.ts → index-DtFdMKBX.d.ts} +63 -6
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/mcp.d.ts +18 -3
- package/dist/mcp.js +62 -21
- package/dist/node.d.ts +3 -3
- package/dist/node.js +2 -2
- package/dist/{openUiLibrary-DURlAxjk-Do_yqg3u.js → openUiLibrary-CIrV--Ad-B8zG_91e.js} +3 -3
- package/dist/{skillVersionStore-Bl-ElD45-dMJ8Ybhb.d.ts → skillVersionStore-D-qHk9ZE-DBsYYCWn.d.ts} +13 -5
- package/dist/{testing-Csg5ljNm.js → testing-WPTyXQYt.js} +26 -3
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/dist/{types-B3n0cMZu-BDhheIhX.d.ts → types-CrRcT-LM-DZAp8sWv.d.ts} +36 -3
- package/dist/ui-react.d.ts +11 -2
- package/dist/ui-react.js +119 -38
- package/dist/ui-vue.d.ts +1 -1
- package/dist/ui-vue.js +1 -1
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +2 -2
- package/dist/{webskillLitCatalog-DwTwSBFt-BG7kL-Es.js → webskillLitCatalog-BJrphK0y-SGmRXaaO.js} +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../governance/dist/eventTypes-
|
|
1
|
+
//#region ../governance/dist/eventTypes-s2uwAcLG.js
|
|
2
2
|
/**
|
|
3
3
|
* 审计事件类型常量(FR-13.4)。
|
|
4
4
|
*
|
|
@@ -15,6 +15,7 @@ const AUDIT_EVENT_TYPES = {
|
|
|
15
15
|
skillRepairApplied: "skill.repair_applied",
|
|
16
16
|
skillQuarantined: "skill.quarantined",
|
|
17
17
|
skillPolicyDenied: "skill.policy_denied",
|
|
18
|
+
skillUserCaused: "skill.user_caused",
|
|
18
19
|
skillUninstalled: "skill.uninstalled",
|
|
19
20
|
skillInstalled: "skill.installed",
|
|
20
21
|
skillExported: "skill.exported",
|
|
@@ -36,7 +37,9 @@ const AUDIT_EVENT_TYPES = {
|
|
|
36
37
|
candidateGenerated: "candidate.generated",
|
|
37
38
|
candidateSubmitted: "candidate.submitted",
|
|
38
39
|
candidateApproved: "candidate.approved",
|
|
39
|
-
candidateRejected: "candidate.rejected"
|
|
40
|
+
candidateRejected: "candidate.rejected",
|
|
41
|
+
pagePerceived: "page.perceived",
|
|
42
|
+
pageAction: "page.action"
|
|
40
43
|
};
|
|
41
44
|
/** 稳定展示序:筛选下拉与文档表格都从这里取,不各自维护一份顺序 */
|
|
42
45
|
const AUDIT_EVENT_TYPE_LIST = Object.values(AUDIT_EVENT_TYPES);
|
package/dist/governance.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { H as IntegrityVerdict,
|
|
3
|
-
import { _ as
|
|
1
|
+
import { R as FileSystemProvider, S as UiBridge, U as Page, W as PageQuery, f as LlmMessage, it as SkillCatalogEntry, l as LlmClient, ot as SkillDocument, ut as SkillManagerPort } from "./types-CrRcT-LM-DZAp8sWv.js";
|
|
2
|
+
import { H as IntegrityVerdict, Ht as SkillStateGuard, Lt as SkillIntegrityGuard, Rt as SkillOutcomeReporter, mn as WebSkillRuntime, xt as RuntimeRun } from "./index-DtFdMKBX.js";
|
|
3
|
+
import { _ as SkillState, a as AuditLog, b as SkillVersionStore, c as CandidateFile, d as CandidateSkill, f as CandidateSource, g as SKILL_VERSION_PAGE_SIZE, h as CompositeApprovalPolicy, i as AuditEvent, l as CandidatePage, m as CandidateStore, n as ApprovalDecision, o as AuditQueryFilter, p as CandidateStatus, r as ApprovalPolicy, s as CANDIDATE_PAGE_SIZE, t as AlwaysHumanApprovalPolicy, u as CandidateRisk, v as SkillVersion, x as candidateToCatalogEntry, y as SkillVersionPage } from "./skillVersionStore-D-qHk9ZE-DBsYYCWn.js";
|
|
4
4
|
//#region ../governance/dist/index.d.ts
|
|
5
5
|
//#region src/candidate/candidateNormalizer.d.ts
|
|
6
6
|
/** 剥 markdown fence 与 <think> 块、截取首尾 {};非对象 → CANDIDATE_INVALID */
|
|
@@ -108,6 +108,8 @@ interface AuditChainVerification {
|
|
|
108
108
|
}
|
|
109
109
|
/** 带断链报告的分页结果(`tolerateBrokenChain` 打开时才可能带上后两个字段) */
|
|
110
110
|
interface AuditPage extends Page<AuditEvent> {
|
|
111
|
+
/** 筛选后的匹配总数(不分页截断):页码分页需要它算总页数 */
|
|
112
|
+
total: number;
|
|
111
113
|
chainBrokenAt?: number;
|
|
112
114
|
chainReason?: string;
|
|
113
115
|
/**
|
|
@@ -150,6 +152,13 @@ declare class FsAuditLog implements AuditLog {
|
|
|
150
152
|
* 本页范围内的 hash 链必须自洽:逐条重算 hash 并核对与前一行的 `prevHash` 链接,
|
|
151
153
|
* 任一处对不上以 `GOVERNANCE_FAILED` 报错。范围之外的断链不在本方法职责内——
|
|
152
154
|
* 那是 `verifyChain()` 的事(全量 O(N) 校验不该压在每次翻页上)。
|
|
155
|
+
*
|
|
156
|
+
* 边界语义(0.10.0 复核后固化):
|
|
157
|
+
* - `cursor` 是「匹配序列的结束下标」而非稳定指针:翻页间隔内有新事件追加时,
|
|
158
|
+
* 页间可能漂移一条,属追加型数据的固有边界,调用方不要按「稳定快照」实现导出;
|
|
159
|
+
* - `tolerateBrokenChain` 打开且本页检测到断链时,`total` 收缩到断点前
|
|
160
|
+
* (断点及其之后的记录不再可翻出,页码不会指向空页);断点在更后面的页时
|
|
161
|
+
* 本页的 `total` 仍按全量匹配数返回。
|
|
153
162
|
*/
|
|
154
163
|
query(filter?: AuditQueryFilter & PageQuery): Promise<AuditPage>;
|
|
155
164
|
/** hash 链完整性校验:逐行重算 hash 并核对 prevHash 链接。**只读**,绝不改写历史 */
|
|
@@ -173,6 +182,7 @@ declare const AUDIT_EVENT_TYPES: {
|
|
|
173
182
|
readonly skillRepairApplied: "skill.repair_applied";
|
|
174
183
|
readonly skillQuarantined: "skill.quarantined";
|
|
175
184
|
readonly skillPolicyDenied: "skill.policy_denied";
|
|
185
|
+
readonly skillUserCaused: "skill.user_caused";
|
|
176
186
|
readonly skillUninstalled: "skill.uninstalled";
|
|
177
187
|
readonly skillInstalled: "skill.installed";
|
|
178
188
|
readonly skillExported: "skill.exported";
|
|
@@ -195,6 +205,8 @@ declare const AUDIT_EVENT_TYPES: {
|
|
|
195
205
|
readonly candidateSubmitted: "candidate.submitted";
|
|
196
206
|
readonly candidateApproved: "candidate.approved";
|
|
197
207
|
readonly candidateRejected: "candidate.rejected";
|
|
208
|
+
readonly pagePerceived: "page.perceived";
|
|
209
|
+
readonly pageAction: "page.action";
|
|
198
210
|
};
|
|
199
211
|
type AuditEventType = (typeof AUDIT_EVENT_TYPES)[keyof typeof AUDIT_EVENT_TYPES];
|
|
200
212
|
/** 稳定展示序:筛选下拉与文档表格都从这里取,不各自维护一份顺序 */
|
|
@@ -245,9 +257,19 @@ declare class RepairPlanner {
|
|
|
245
257
|
/**
|
|
246
258
|
* 用户策略主动拒绝的错误码(FR-12.4):这是配置生效的证据,不是技能有问题,不计入隔离阈值。
|
|
247
259
|
*
|
|
248
|
-
*
|
|
260
|
+
* 集中在这一份常量里而不散在条件判断里,是为了让「哪些策略拒绝码不计数」只有一个事实源。
|
|
261
|
+
* (用户自身原因的豁免码见 `USER_CAUSED_CODES`,两类语义不同,不并在一起。)
|
|
249
262
|
*/
|
|
250
263
|
declare const POLICY_DENIAL_CODES: ReadonlySet<string>;
|
|
264
|
+
/**
|
|
265
|
+
* 用户自身原因的错误码(0.10.0 UI-UX5 #49-2):交互等待超时(用户没处理)与
|
|
266
|
+
* 用户自行取消(ask_user / 交互卡取消)都不是技能的错,不计入隔离阈值。
|
|
267
|
+
*
|
|
268
|
+
* loop 里这两类结局走 RunTerminated 旁路、本来到不了上报口;这里再挡一道,
|
|
269
|
+
* 是因为宿主执行器也可能把「等用户时被取消/超时」包成 ok:false 的失败结果交回来——
|
|
270
|
+
* 「算不算技能的错」的判定口径必须在上报侧只有这一处。
|
|
271
|
+
*/
|
|
272
|
+
declare const USER_CAUSED_CODES: ReadonlySet<string>;
|
|
251
273
|
/** 自动隔离的原因判别式(FR-12.6);人工隔离仍写自由文本 */
|
|
252
274
|
declare const QUARANTINE_REASONS: {
|
|
253
275
|
readonly integrity: "integrity";
|
|
@@ -274,7 +296,7 @@ declare class SkillStatePolicy {
|
|
|
274
296
|
detail?: string;
|
|
275
297
|
}): Promise<void>;
|
|
276
298
|
/**
|
|
277
|
-
* 失败计数;达阈值(默认
|
|
299
|
+
* 失败计数;达阈值(默认 5)→ quarantined + 审计。
|
|
278
300
|
*
|
|
279
301
|
* 计数是**连续**而非累计(0.7.0 FR-12.5):一次成功执行经 `clearFailures` 归零,
|
|
280
302
|
* `setState(name, 'active')` 同样清零。
|
|
@@ -320,6 +342,7 @@ declare class SkillStatePolicy {
|
|
|
320
342
|
toSkillOutcomeReporter(input?: {
|
|
321
343
|
actor?: string;
|
|
322
344
|
policyDenialCodes?: ReadonlySet<string>;
|
|
345
|
+
userCausedCodes?: ReadonlySet<string>;
|
|
323
346
|
}): SkillOutcomeReporter;
|
|
324
347
|
/** disabled → SKILL_DISABLED;quarantined → SKILL_QUARANTINED */
|
|
325
348
|
assertExecutable(skillName: string): Promise<void>;
|
|
@@ -493,4 +516,4 @@ declare function createMissHook(deps: {
|
|
|
493
516
|
*/
|
|
494
517
|
declare function completeText(llm: LlmClient, messages: LlmMessage[]): Promise<string>;
|
|
495
518
|
//#endregion
|
|
496
|
-
export { AUDIT_EVENT_TYPES, AUDIT_EVENT_TYPE_LIST, AUDIT_PAGE_SIZE, AlwaysHumanApprovalPolicy, type ApprovalDecision, type ApprovalPolicy, type AuditChainVerification, type AuditEvent, type AuditEventType, type AuditLog, type AuditPage, type AuditQueryFilter, CANDIDATE_PAGE_SIZE, type CandidateFile, type CandidateRisk, type CandidateSink, type CandidateSinkOptions, type CandidateSkill, type CandidateSource, type CandidateStatus, CandidateStore, CompositeApprovalPolicy, DependencyGraph, DocumentSkillExtractor, type EvaluationReport, type EvaluationResult, EvaluationRunner, type EvaluationTask, FailureAnalyzer, type FailureDiagnosis, FsAuditLog, type GeneratedSkillSubmission, LlmCandidateGenerator, POLICY_DENIAL_CODES, QUARANTINE_REASONS, type RepairOption, RepairPlanner, SCORING_WEIGHTS, SKILL_VERSION_PAGE_SIZE, type ScoreInput, SimilarityDetector, SkillScorer, type SkillState, SkillStatePolicy, type SkillVersion, SkillVersionStore, type SourceDocument, candidateToCatalogEntry, completeText, createCandidateSink, createMissHook, jaccardSimilarity, normalizeCandidate, normalizeCandidateFiles, normalizeRisk, parseJsonObject, readDocument, sanitizeCandidateName, suggestFromFailedRun, validateCandidate };
|
|
519
|
+
export { AUDIT_EVENT_TYPES, AUDIT_EVENT_TYPE_LIST, AUDIT_PAGE_SIZE, AlwaysHumanApprovalPolicy, type ApprovalDecision, type ApprovalPolicy, type AuditChainVerification, type AuditEvent, type AuditEventType, type AuditLog, type AuditPage, type AuditQueryFilter, CANDIDATE_PAGE_SIZE, type CandidateFile, type CandidatePage, type CandidateRisk, type CandidateSink, type CandidateSinkOptions, type CandidateSkill, type CandidateSource, type CandidateStatus, CandidateStore, CompositeApprovalPolicy, DependencyGraph, DocumentSkillExtractor, type EvaluationReport, type EvaluationResult, EvaluationRunner, type EvaluationTask, FailureAnalyzer, type FailureDiagnosis, FsAuditLog, type GeneratedSkillSubmission, LlmCandidateGenerator, POLICY_DENIAL_CODES, QUARANTINE_REASONS, type RepairOption, RepairPlanner, SCORING_WEIGHTS, SKILL_VERSION_PAGE_SIZE, type ScoreInput, SimilarityDetector, SkillScorer, type SkillState, SkillStatePolicy, type SkillVersion, type SkillVersionPage, SkillVersionStore, type SourceDocument, USER_CAUSED_CODES, candidateToCatalogEntry, completeText, createCandidateSink, createMissHook, jaccardSimilarity, normalizeCandidate, normalizeCandidateFiles, normalizeRisk, parseJsonObject, readDocument, sanitizeCandidateName, suggestFromFailedRun, validateCandidate };
|
package/dist/governance.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { M as messageOf, _ as assertSafePathSegment, h as WebSkillError, k as isValidSkillName, v as atomicWriteText } from "./dist-Bev6i6Ip.js";
|
|
2
2
|
import { a as textParts, n as partsToText } from "./memoryArtifactStore-52Zn9npI-LbCQaqyx.js";
|
|
3
|
-
import { n as AUDIT_EVENT_TYPE_LIST, t as AUDIT_EVENT_TYPES } from "./eventTypes-
|
|
3
|
+
import { n as AUDIT_EVENT_TYPE_LIST, t as AUDIT_EVENT_TYPES } from "./eventTypes-s2uwAcLG-Go3l_dUe.js";
|
|
4
4
|
|
|
5
5
|
//#region ../governance/dist/index.js
|
|
6
6
|
const invalid = (message, details) => {
|
|
@@ -105,6 +105,9 @@ function validateCandidate(candidate) {
|
|
|
105
105
|
* 治理侧各列表共用的游标切片,形状与会话消息(C1)完全一致:
|
|
106
106
|
* 无游标给**最新**一页,`nextCursor` 指向更早的历史,页内按时间升序。
|
|
107
107
|
*
|
|
108
|
+
* 返回值附带筛选后匹配总数 `total`(0.10.0 UI-UX5 #40.12):页码分页的总页数依据,
|
|
109
|
+
* 与 `AuditPage.total` 同一语义(`all` 是已过滤集合,length 即匹配总数)。
|
|
110
|
+
*
|
|
108
111
|
* 缺省页长由各 store 传入——缺省属于实现,不属于调用方。
|
|
109
112
|
*/
|
|
110
113
|
function takeTailPage(all, options, defaultLimit, what) {
|
|
@@ -118,6 +121,7 @@ function takeTailPage(all, options, defaultLimit, what) {
|
|
|
118
121
|
const start = Math.max(0, end - limit);
|
|
119
122
|
return {
|
|
120
123
|
items: all.slice(start, end),
|
|
124
|
+
total: all.length,
|
|
121
125
|
...start > 0 ? { nextCursor: String(start) } : {}
|
|
122
126
|
};
|
|
123
127
|
}
|
|
@@ -150,7 +154,10 @@ var CandidateStore = class {
|
|
|
150
154
|
*/
|
|
151
155
|
async list(options = {}) {
|
|
152
156
|
const dir = dirOf$1(this.#root);
|
|
153
|
-
if (!await this.#fs.exists(dir)) return {
|
|
157
|
+
if (!await this.#fs.exists(dir)) return {
|
|
158
|
+
items: [],
|
|
159
|
+
total: 0
|
|
160
|
+
};
|
|
154
161
|
const out = [];
|
|
155
162
|
for (const entry of await this.#fs.list(dir)) {
|
|
156
163
|
if (entry.type !== "file" || !entry.path.endsWith(".json")) continue;
|
|
@@ -435,10 +442,20 @@ var FsAuditLog = class {
|
|
|
435
442
|
* 本页范围内的 hash 链必须自洽:逐条重算 hash 并核对与前一行的 `prevHash` 链接,
|
|
436
443
|
* 任一处对不上以 `GOVERNANCE_FAILED` 报错。范围之外的断链不在本方法职责内——
|
|
437
444
|
* 那是 `verifyChain()` 的事(全量 O(N) 校验不该压在每次翻页上)。
|
|
445
|
+
*
|
|
446
|
+
* 边界语义(0.10.0 复核后固化):
|
|
447
|
+
* - `cursor` 是「匹配序列的结束下标」而非稳定指针:翻页间隔内有新事件追加时,
|
|
448
|
+
* 页间可能漂移一条,属追加型数据的固有边界,调用方不要按「稳定快照」实现导出;
|
|
449
|
+
* - `tolerateBrokenChain` 打开且本页检测到断链时,`total` 收缩到断点前
|
|
450
|
+
* (断点及其之后的记录不再可翻出,页码不会指向空页);断点在更后面的页时
|
|
451
|
+
* 本页的 `total` 仍按全量匹配数返回。
|
|
438
452
|
*/
|
|
439
453
|
async query(filter = {}) {
|
|
440
454
|
const path = fileOf$1(this.#root);
|
|
441
|
-
if (!await this.#fs.exists(path)) return {
|
|
455
|
+
if (!await this.#fs.exists(path)) return {
|
|
456
|
+
items: [],
|
|
457
|
+
total: 0
|
|
458
|
+
};
|
|
442
459
|
const raw = await this.#fs.readText(path);
|
|
443
460
|
/** 按文件行序保留(含解析失败的洞):链校验必须在文件行序上做,不能在筛选结果上做 */
|
|
444
461
|
const records = [];
|
|
@@ -495,6 +512,7 @@ var FsAuditLog = class {
|
|
|
495
512
|
}
|
|
496
513
|
return {
|
|
497
514
|
items,
|
|
515
|
+
total: broken !== void 0 ? start + items.length : matched.length,
|
|
498
516
|
...start > 0 ? { nextCursor: String(start) } : {},
|
|
499
517
|
...broken !== void 0 ? {
|
|
500
518
|
chainBrokenAt: broken.at,
|
|
@@ -734,13 +752,23 @@ const fileOf = (root) => `${root}/.webskill/states.json`;
|
|
|
734
752
|
/**
|
|
735
753
|
* 用户策略主动拒绝的错误码(FR-12.4):这是配置生效的证据,不是技能有问题,不计入隔离阈值。
|
|
736
754
|
*
|
|
737
|
-
*
|
|
755
|
+
* 集中在这一份常量里而不散在条件判断里,是为了让「哪些策略拒绝码不计数」只有一个事实源。
|
|
756
|
+
* (用户自身原因的豁免码见 `USER_CAUSED_CODES`,两类语义不同,不并在一起。)
|
|
738
757
|
*/
|
|
739
758
|
const POLICY_DENIAL_CODES = /* @__PURE__ */ new Set([
|
|
740
759
|
"NETWORK_BLOCKED",
|
|
741
760
|
"TOOL_NOT_ALLOWED",
|
|
742
761
|
"FS_PERMISSION_DENIED"
|
|
743
762
|
]);
|
|
763
|
+
/**
|
|
764
|
+
* 用户自身原因的错误码(0.10.0 UI-UX5 #49-2):交互等待超时(用户没处理)与
|
|
765
|
+
* 用户自行取消(ask_user / 交互卡取消)都不是技能的错,不计入隔离阈值。
|
|
766
|
+
*
|
|
767
|
+
* loop 里这两类结局走 RunTerminated 旁路、本来到不了上报口;这里再挡一道,
|
|
768
|
+
* 是因为宿主执行器也可能把「等用户时被取消/超时」包成 ok:false 的失败结果交回来——
|
|
769
|
+
* 「算不算技能的错」的判定口径必须在上报侧只有这一处。
|
|
770
|
+
*/
|
|
771
|
+
const USER_CAUSED_CODES = /* @__PURE__ */ new Set(["RUN_INTERACTION_TIMEOUT", "RUN_CANCELLED"]);
|
|
744
772
|
/** 自动隔离的原因判别式(FR-12.6);人工隔离仍写自由文本 */
|
|
745
773
|
const QUARANTINE_REASONS = {
|
|
746
774
|
integrity: "integrity",
|
|
@@ -763,7 +791,7 @@ var SkillStatePolicy = class {
|
|
|
763
791
|
this.#root = deps.root.replace(/\/+$/, "");
|
|
764
792
|
this.#fs = deps.fs;
|
|
765
793
|
this.#audit = deps.audit;
|
|
766
|
-
this.#failureThreshold = deps.failureThreshold ??
|
|
794
|
+
this.#failureThreshold = deps.failureThreshold ?? 5;
|
|
767
795
|
}
|
|
768
796
|
async #load() {
|
|
769
797
|
const path = fileOf(this.#root);
|
|
@@ -819,7 +847,7 @@ var SkillStatePolicy = class {
|
|
|
819
847
|
});
|
|
820
848
|
}
|
|
821
849
|
/**
|
|
822
|
-
* 失败计数;达阈值(默认
|
|
850
|
+
* 失败计数;达阈值(默认 5)→ quarantined + 审计。
|
|
823
851
|
*
|
|
824
852
|
* 计数是**连续**而非累计(0.7.0 FR-12.5):一次成功执行经 `clearFailures` 归零,
|
|
825
853
|
* `setState(name, 'active')` 同样清零。
|
|
@@ -921,9 +949,19 @@ var SkillStatePolicy = class {
|
|
|
921
949
|
*/
|
|
922
950
|
toSkillOutcomeReporter(input = {}) {
|
|
923
951
|
const denied = input.policyDenialCodes ?? POLICY_DENIAL_CODES;
|
|
952
|
+
const userCaused = input.userCausedCodes ?? USER_CAUSED_CODES;
|
|
924
953
|
const actor = input.actor !== void 0 ? { actor: input.actor } : {};
|
|
925
954
|
return {
|
|
926
955
|
onSkillFailed: async (report) => {
|
|
956
|
+
if (userCaused.has(report.code)) {
|
|
957
|
+
await this.#audit?.append({
|
|
958
|
+
type: AUDIT_EVENT_TYPES.skillUserCaused,
|
|
959
|
+
target: report.skillName,
|
|
960
|
+
...actor,
|
|
961
|
+
data: { code: report.code }
|
|
962
|
+
});
|
|
963
|
+
return;
|
|
964
|
+
}
|
|
927
965
|
if (denied.has(report.code)) {
|
|
928
966
|
await this.#audit?.append({
|
|
929
967
|
type: AUDIT_EVENT_TYPES.skillPolicyDenied,
|
|
@@ -1231,4 +1269,4 @@ function createMissHook(deps) {
|
|
|
1231
1269
|
}
|
|
1232
1270
|
|
|
1233
1271
|
//#endregion
|
|
1234
|
-
export { AUDIT_EVENT_TYPES, AUDIT_EVENT_TYPE_LIST, AUDIT_PAGE_SIZE, AlwaysHumanApprovalPolicy, CANDIDATE_PAGE_SIZE, CandidateStore, CompositeApprovalPolicy, DependencyGraph, DocumentSkillExtractor, EvaluationRunner, FailureAnalyzer, FsAuditLog, LlmCandidateGenerator, POLICY_DENIAL_CODES, QUARANTINE_REASONS, RepairPlanner, SCORING_WEIGHTS, SKILL_VERSION_PAGE_SIZE, SimilarityDetector, SkillScorer, SkillStatePolicy, SkillVersionStore, candidateToCatalogEntry, completeText, createCandidateSink, createMissHook, jaccardSimilarity, normalizeCandidate, normalizeCandidateFiles, normalizeRisk, parseJsonObject, readDocument, sanitizeCandidateName, suggestFromFailedRun, validateCandidate };
|
|
1272
|
+
export { AUDIT_EVENT_TYPES, AUDIT_EVENT_TYPE_LIST, AUDIT_PAGE_SIZE, AlwaysHumanApprovalPolicy, CANDIDATE_PAGE_SIZE, CandidateStore, CompositeApprovalPolicy, DependencyGraph, DocumentSkillExtractor, EvaluationRunner, FailureAnalyzer, FsAuditLog, LlmCandidateGenerator, POLICY_DENIAL_CODES, QUARANTINE_REASONS, RepairPlanner, SCORING_WEIGHTS, SKILL_VERSION_PAGE_SIZE, SimilarityDetector, SkillScorer, SkillStatePolicy, SkillVersionStore, USER_CAUSED_CODES, candidateToCatalogEntry, completeText, createCandidateSink, createMissHook, jaccardSimilarity, normalizeCandidate, normalizeCandidateFiles, normalizeRisk, parseJsonObject, readDocument, sanitizeCandidateName, suggestFromFailedRun, validateCandidate };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { k as ExternalToolSource } from "./index-
|
|
1
|
+
import { B as JsonSchema, C as UiSpecActionCapability, D as UiSpecSnapshot, S as UiBridge, b as RenderResultRequest, bt as UiSpecNode, c as InteractionResponse, r as ChartSpec, s as InteractionRequest, y as RenderBlock } from "./types-CrRcT-LM-DZAp8sWv.js";
|
|
2
|
+
import { k as ExternalToolSource } from "./index-DtFdMKBX.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { ComponentType, ReactNode } from "react";
|
|
5
5
|
//#region ../ui/dist/index.d.ts
|
|
@@ -76,6 +76,10 @@ interface SurfaceFormTexts {
|
|
|
76
76
|
arrayFirstItemOnly: string;
|
|
77
77
|
/** 历史快照(宿主未接 action)的一次性只读说明 */
|
|
78
78
|
readOnlySnapshot: string;
|
|
79
|
+
/** 建议值的前缀(0.10.0 #48.14:画像建议标签此前只有英文硬编码) */
|
|
80
|
+
suggested: string;
|
|
81
|
+
/** 采纳建议值的按钮 */
|
|
82
|
+
useSuggestion: string;
|
|
79
83
|
}
|
|
80
84
|
/** 可复用的部分取自 DEFAULT_INTERACTION_TEXTS,不另抄一份(AC-G10) */
|
|
81
85
|
declare const DEFAULT_SURFACE_FORM_TEXTS: SurfaceFormTexts;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as InteractionOrigin, c as InteractionResponse, s as InteractionRequest
|
|
2
|
-
import { k as ExternalToolSource } from "./index-
|
|
1
|
+
import { S as UiBridge, a as InteractionOrigin, c as InteractionResponse, s as InteractionRequest } from "./types-CrRcT-LM-DZAp8sWv.js";
|
|
2
|
+
import { k as ExternalToolSource } from "./index-DtFdMKBX.js";
|
|
3
3
|
//#region ../agent/dist/index.d.ts
|
|
4
4
|
//#region src/todo/types.d.ts
|
|
5
5
|
/** 待办条目状态:未开始 / 进行中 / 已完成(FR-3.1) */
|
|
@@ -134,6 +134,13 @@ interface SkillGeneratorOptions {
|
|
|
134
134
|
/** 生成所属会话,写入审计与候选 metadata */
|
|
135
135
|
sessionId?: () => string | undefined;
|
|
136
136
|
now?: () => Date;
|
|
137
|
+
/** 界面文案注入口:生成器与语言无关,字典在宿主手里(UI-UX5 #9) */
|
|
138
|
+
messages?: SkillGenerationMessages;
|
|
139
|
+
}
|
|
140
|
+
/** 生成器面向用户的文案;缺省全部为英文模板 */
|
|
141
|
+
interface SkillGenerationMessages {
|
|
142
|
+
/** 授权确认卡的正文(含技能名与描述插值由实现方完成) */
|
|
143
|
+
confirmSkill?(draft: GeneratedSkillDraft): string;
|
|
137
144
|
}
|
|
138
145
|
/**
|
|
139
146
|
* 技能自动生成策略。生成动作是策略而不是内核:它不进入 `AgentLoop`,
|
|
@@ -622,4 +629,4 @@ declare function createPageActionToolSource(options: PageActionToolSourceOptions
|
|
|
622
629
|
*/
|
|
623
630
|
declare const PAGE_ACTION_SYSTEM_PROMPT: string;
|
|
624
631
|
//#endregion
|
|
625
|
-
export {
|
|
632
|
+
export { TodoList as $, PagePerceptionReader as A, SKILL_GENERATION_SYSTEM_PROMPT as B, PageActionRequest as C, PageAuditSink as D, PageActionUi as E, PerceptionAuditSink as F, SkillGenerationToolSourceOptions as G, SkillGenerationMessages as H, PerceptionCaptureOptions as I, SubAgentRunInput as J, SkillGenerator as K, PerceptionRecord as L, ParentBudget as M, PerceivedImage as N, PagePerceptionPolicy as O, PerceivedNode as P, TodoItem as Q, PerceptionResult as R, PageActionRecord as S, PageActionToolSourceOptions as T, SkillGenerationOutcome as U, SkillCandidateSink as V, SkillGenerationPolicy as W, TODO_SYSTEM_PROMPT as X, SubAgentRunner as Y, TodoEvent as Z, PageActionExecutor as _, DelegationOrchestratorOptions as a, createPageActionToolSource as at, PageActionPolicy as b, DelegationToolSourceOptions as c, createTodoToolSource as ct, ImageCaptureBudget as d, TodoListener as et, MANAGE_TODO_TOOL as f, PERCEPTION_SYSTEM_PROMPT as g, PERCEIVE_PAGE_TOOL as h, DelegationOrchestrator as i, createDelegationToolSource as it, PagePerceptionToolSourceOptions as j, PagePerceptionPolicyOptions as k, GENERATE_SKILL_TOOL as l, withDelegationOrigin as lt, PAGE_ACTION_TOOL as m, DELEGATION_SYSTEM_PROMPT as n, TodoStore as nt, DelegationRequest as o, createPagePerceptionToolSource as ot, PAGE_ACTION_SYSTEM_PROMPT as p, SkillGeneratorOptions as q, DelegationBudget as r, TodoToolSourceOptions as rt, DelegationResult as s, createSkillGenerationToolSource as st, DELEGATE_TASK_TOOL as t, TodoStatus as tt, GeneratedSkillDraft as u, PageActionKind as v, PageActionScope as w, PageActionPolicyOptions as x, PageActionOutcome as y, PerceptionScope as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as JsonSchema, I as DiscoveryResult, O as UiSurfaceActionRequest, R as FileSystemProvider, S as UiBridge, St as ValidationReport, T as UiSpecEvent, Tt as WebSkillErrorCode, U as Page, W as PageQuery, _ as LlmToolSpec, at as SkillDiscovery, b as RenderResultRequest, bt as UiSpecNode, d as LlmContentPart, dt as SkillManifest, f as LlmMessage, g as LlmToolCall, h as LlmTokenUsage, i as FormField, it as SkillCatalogEntry, l as LlmClient, m as LlmStreamEvent, n as ArtifactStore, o as InteractionPolicy, ot as SkillDocument, p as LlmResponse, r as ChartSpec, rt as SkillCatalog, s as InteractionRequest, st as SkillInstallSource, t as Artifact, u as LlmCompleteInput, v as MemoryStore, w as UiSpecDrafts, y as RenderBlock } from "./types-CrRcT-LM-DZAp8sWv.js";
|
|
2
2
|
//#region ../runtime/dist/index.d.ts
|
|
3
3
|
//#region src/llm/parts.d.ts
|
|
4
4
|
/** 纯文本消息内容的构造快捷方式(引擎内部绝大多数消息仍是纯文本) */
|
|
@@ -148,6 +148,19 @@ interface AnthropicClientConfig {
|
|
|
148
148
|
requestTimeoutMs?: number;
|
|
149
149
|
/** max_tokens(Messages API 必填),默认 4096 */
|
|
150
150
|
maxTokens?: number;
|
|
151
|
+
/**
|
|
152
|
+
* Extended thinking 开关(预算 token 数)。语义(0.10.0 复核后固化的分层口径):
|
|
153
|
+
* - 不设置 ⇒ 完全不请求思考能力(**直连客户端的缺省**);
|
|
154
|
+
* - `> 0` 的正整数 ⇒ 启用并透传 `budget_tokens`;
|
|
155
|
+
* - `<= 0` / 非整数 / 非有限数 ⇒ 一律视为关闭(不发出 thinking 参数,避免供应商 400)。
|
|
156
|
+
* 经 `createLlmClient` 装配时由工厂层按 `?? 10_000` 默认开启(0.10.0 #40.4),
|
|
157
|
+
* 与直连客户端的「默认关闭」是同一字段的两层缺省,不互相冲突。
|
|
158
|
+
* 开启后响应里的 thinking block 解析进 `LlmResponse.thinking`,
|
|
159
|
+
* 流式路径的 thinking_delta 映射为 `thinking-delta` 事件。
|
|
160
|
+
* 注意:Anthropic 要求 thinking 开启时不传 temperature(只允许默认值 1),
|
|
161
|
+
* 本客户端在开启时自动省略 temperature。
|
|
162
|
+
*/
|
|
163
|
+
thinkingBudgetTokens?: number;
|
|
151
164
|
/**
|
|
152
165
|
* 浏览器直调 opt-in:true 时发送 anthropic-dangerous-direct-browser-access 头
|
|
153
166
|
* (默认 false 不发——仅在明确运行于浏览器且无服务端代理时开启)
|
|
@@ -375,6 +388,11 @@ type ExecuteLifecycleData = {
|
|
|
375
388
|
} | {
|
|
376
389
|
kind: 'llm-delta';
|
|
377
390
|
delta: string;
|
|
391
|
+
} |
|
|
392
|
+
/** 思考增量(0.10.0 UI-UX5 #32):流式思考逐段透出;非流式路径一次性补发整段 */
|
|
393
|
+
{
|
|
394
|
+
kind: 'thinking-delta';
|
|
395
|
+
delta: string;
|
|
378
396
|
} | {
|
|
379
397
|
kind: 'interaction-resumed';
|
|
380
398
|
interactionId: string;
|
|
@@ -444,7 +462,11 @@ type LifecycleHook = (ctx: LifecycleHookContext) => Promise<void | {
|
|
|
444
462
|
}>;
|
|
445
463
|
//#endregion
|
|
446
464
|
//#region src/trace/types.d.ts
|
|
447
|
-
type TraceEventType = 'skill.routed' | 'skill.activated' | 'skill.integrity-failed' | 'llm.request' | 'llm.response' |
|
|
465
|
+
type TraceEventType = 'skill.routed' | 'skill.activated' | 'skill.integrity-failed' | 'llm.request' | 'llm.response' |
|
|
466
|
+
/** 一轮模型调用产出的一段思考正文(data.text;每轮至多一条,UI-UX5 #32) */
|
|
467
|
+
'llm.thinking' |
|
|
468
|
+
/** 一轮模型调用的 token 用量(data.inputTokens/outputTokens;上游不回报则无此事件,UI-UX5 #47) */
|
|
469
|
+
'llm.usage' | 'tool.started' | 'tool.completed' | 'tool.failed' | 'tool.denied' | 'artifact.created' | 'ui.requested' | 'ui.resumed' | 'ui.surface-action.requested' | 'ui.surface-action.resolved' | 'ui.rendered' | 'ui.degraded' | 'todo.created' | 'todo.updated' | 'todo.cleared' | 'run.warning' | 'run.completed' | 'run.cancelled' | 'run.failed' | 'run.resumed';
|
|
448
470
|
interface TraceEvent {
|
|
449
471
|
id: string;
|
|
450
472
|
runId: string;
|
|
@@ -465,7 +487,7 @@ interface AgentLoopConfig {
|
|
|
465
487
|
temperature?: number;
|
|
466
488
|
/** 设为 'off' 时完成 run 不调用 uiBridge.renderResult */
|
|
467
489
|
renderResult?: 'off';
|
|
468
|
-
/** 工具结果回喂上限(字节,默认
|
|
490
|
+
/** 工具结果回喂上限(字节,默认 256_000;超长头尾保留 + 完整内容落 artifact) */
|
|
469
491
|
toolResultMaxBytes?: number;
|
|
470
492
|
/** session paramHistory 保留条数上限(默认 50,超出裁最旧) */
|
|
471
493
|
paramHistoryLimit?: number;
|
|
@@ -1336,8 +1358,8 @@ declare class AgentLoop {
|
|
|
1336
1358
|
*/
|
|
1337
1359
|
declare const DEFAULT_LOOP_LIMITS: {
|
|
1338
1360
|
readonly maxTurns: 10;
|
|
1339
|
-
readonly totalTimeoutMs:
|
|
1340
|
-
readonly toolTimeoutMs:
|
|
1361
|
+
readonly totalTimeoutMs: 3600000;
|
|
1362
|
+
readonly toolTimeoutMs: 600000;
|
|
1341
1363
|
};
|
|
1342
1364
|
/**
|
|
1343
1365
|
* 触顶类失败(`RUN_TIMEOUT` / `RUN_MAX_TURNS_EXCEEDED`)记进 `run.failed`
|
|
@@ -1493,6 +1515,12 @@ interface RunTraceSummary {
|
|
|
1493
1515
|
turnCount: number;
|
|
1494
1516
|
/** endedAt - startedAt,无 endedAt 或时间戳不可解析时缺省 */
|
|
1495
1517
|
durationMs?: number;
|
|
1518
|
+
/**
|
|
1519
|
+
* 本 run 各轮 `llm.usage` 事件的 token 聚合(0.10.0 UI-UX5 #47)。
|
|
1520
|
+
* 全 run 无 usage 上报(旧 trace、不支持统计的上游)时缺省——
|
|
1521
|
+
* 消费方据「有没有」决定要不要展示,不显示假数据。
|
|
1522
|
+
*/
|
|
1523
|
+
usage?: LlmTokenUsage;
|
|
1496
1524
|
}
|
|
1497
1525
|
/** @stable */
|
|
1498
1526
|
interface RunTraceFilter {
|
|
@@ -1566,6 +1594,11 @@ interface RunToolCall {
|
|
|
1566
1594
|
args?: string;
|
|
1567
1595
|
/** 执行耗时 ms */
|
|
1568
1596
|
durationMs?: number;
|
|
1597
|
+
/**
|
|
1598
|
+
* 开始时刻(trace `tool.started` 的 ts,ISO)。思考卡片与工具卡片按时间
|
|
1599
|
+
* 穿插(UI-UX5 #32)需要一个共同时钟;旧 trace 没有 started 事件时缺省。
|
|
1600
|
+
*/
|
|
1601
|
+
startedAt?: string;
|
|
1569
1602
|
/**
|
|
1570
1603
|
* failed 时的结构化错误码(如 `TOOL_NOT_ALLOWED`)。
|
|
1571
1604
|
* 消费方据此区分「被策略拒绝」与「执行出错」,不必解析 message 文案。
|
|
@@ -1585,6 +1618,30 @@ interface RunToolCall {
|
|
|
1585
1618
|
*/
|
|
1586
1619
|
declare function summarizeToolCalls(run: RuntimeRun): RunToolCall[];
|
|
1587
1620
|
//#endregion
|
|
1621
|
+
//#region src/engine/usage.d.ts
|
|
1622
|
+
/**
|
|
1623
|
+
* 一次 run 的大模型用量聚合(0.10.0 UI-UX5 #47)。
|
|
1624
|
+
* 从 trace 事件推导,不落第二份数据:llm.request 计请求次数,llm.usage 计 token。
|
|
1625
|
+
* @stable
|
|
1626
|
+
*/
|
|
1627
|
+
interface RunUsageSummary {
|
|
1628
|
+
/** llm.request 事件数:本 run 向大模型发送请求的次数(与 RunTraceSummary.turnCount 同源) */
|
|
1629
|
+
llmCalls: number;
|
|
1630
|
+
/**
|
|
1631
|
+
* 各轮 llm.usage 的输入 token 合计。全 run 没有任何 usage 上报时缺省——
|
|
1632
|
+
* 「上游不支持统计」与「恰好为零」必须可区分,消费方缺省时不显示假数据。
|
|
1633
|
+
*/
|
|
1634
|
+
inputTokens?: number;
|
|
1635
|
+
/** 各轮 llm.usage 的输出 token 合计;缺省语义同 inputTokens */
|
|
1636
|
+
outputTokens?: number;
|
|
1637
|
+
}
|
|
1638
|
+
/**
|
|
1639
|
+
* 从 run 的 trace 聚合大模型用量(请求次数 + 输入/输出 token)。
|
|
1640
|
+
* 与 `summarizeToolCalls` 同型:消费方不再各自遍历 trace。
|
|
1641
|
+
* @stable
|
|
1642
|
+
*/
|
|
1643
|
+
declare function summarizeRunUsage(trace: readonly TraceEvent[]): RunUsageSummary;
|
|
1644
|
+
//#endregion
|
|
1588
1645
|
//#region src/engine/session.d.ts
|
|
1589
1646
|
declare const SESSION_SCHEMA_VERSION = 1;
|
|
1590
1647
|
/** `FsSessionStore` 的缺省页长。缺省值属于实现,不属于调用方——否则「下推」只推了一半 */
|
|
@@ -1697,4 +1754,4 @@ declare class FsSessionStore<TMessage = unknown> implements SessionStore<TMessag
|
|
|
1697
1754
|
delete(id: string): Promise<void>;
|
|
1698
1755
|
}
|
|
1699
1756
|
//#endregion
|
|
1700
|
-
export { READ_SKILL_FILE_INPUT_SCHEMA as $,
|
|
1757
|
+
export { READ_SKILL_FILE_INPUT_SCHEMA as $, schemaToForm as $n, TraceEventType as $t, FS_SESSION_PAGE_SIZE as A, fromVercelStreamPart as An, SealResult as At, HookRunnerOptions as B, normalizeToolContent as Bn, SkillScriptDescriptor as Bt, DEFAULT_LOOP_LIMITS as C, exportUserProfile as Cn, RuntimeSessionHandle as Ct, ExecuteLifecycleData as D, findUnpairedToolCalls as Dn, ScriptExecutor as Dt, EventBus as E, extractUiSpecEvents as En, ScriptExecutionContext as Et, FsSessionStore as F, mergeCatalogEntries as Fn, SessionStore as Ft, LifecycleEventInit as G, readBehaviorRecords as Gn, TextualToolContent as Gt, IntegrityVerdict as H, parseBridgeRequest as Hn, SkillStateGuard as Ht, FullDisclosureRouter as I, mergeProfileEntries as In, SkillFailureReport as It, LifecycleListener as J, refineUserProfile as Jn, ToolDefinition as Jt, LifecycleHook as K, readProfileEntries as Kn, TodoTraceEvent as Kt, GoogleGenAiClient as L, networkPolicyLibSource as Ln, SkillIntegrityGuard as Lt, FsMemoryStore as M, isNetworkAllowed as Mn, SessionListPage as Mt, FsRunSnapshotStore as N, isUnsupportedRunSnapshot as Nn, SessionMeta as Nt, ExternalSkillProvider as O, formatSkillScriptManifest as On, SealOptions as Ot, FsRunTraceStore as P, listSkillScripts as Pn, SessionRecord as Pt, ProgressiveRouter as Q, schemaSourceLabel as Qn, TraceEvent as Qt, GoogleGenAiClientConfig as R, networkUrlHost as Rn, SkillOutcomeReporter as Rt, CapabilityMode as S, diffUserProfile as Sn, RuntimeSession as St, EMPTY_USER_PROFILE as T, extractTodoTraceEvents as Tn, SchemaInferer as Tt, InteractLifecycleData as U, parseUserProfileExport as Un, SkillSuccessReport as Ut, InstalledSkillManifest as V, normalizeToolError as Vn, SkillScriptSchemaSource as Vt, LifecycleEvent as W, partsToText as Wn, TerminalLifecycleData as Wt, OpenAiCompatibleClient as X, resolveToolName as Xn, ToolResult as Xt, NetworkPolicy as Y, renderUserProfileContext as Yn, ToolResolution as Yt, OpenAiCompatibleClientConfig as Z, sampleBehaviorRecords as Zn, TraceClock as Zt, BridgeCapabilities as _, applyUserProfileImport as _n, RunTraceStore as _t, ActivateLifecycleData as a, USER_PROFILE_REFINE_PROMPT as an, toLlmToolSpec as ar, RouteLifecycleData as at, BridgeResponse as b, createScriptContext as bn, RuntimePhase as bt, AgentLoopDeps as c, UserProfileEntry as cn, validateUiSpecEvent as cr, RunResult as ct, ApprovalDecision as d, UserProfileLimits as dn, RunSnapshotStore as dt, TraceRecorder as en, scriptToolName as er, READ_SKILL_FILE_TOOL as et, ApprovalScope as f, VercelToolSpec as fn, RunTerminationReason as ft, BehaviorScene as g, appendBehaviorRecords as gn, RunTraceMetrics as gt, BehaviorRecordKind as h, WebSkillRuntimeDeps as hn, RunTraceFilter as ht, ASK_USER_TOOL_NAME as i, USER_PROFILE_PROMPT_HEADER as in, textParts as ir, RefineUserProfileInput as it, FsArtifactStore as j, interruptedToolResult as jn, SerializingMemoryStore as jt, ExternalToolSource as k, fromVercelResult as kn, SealRecord as kt, AnthropicClient as l, UserProfileExport as ln, validateUiSpecNode as lr, RunSnapshot as lt, BehaviorRecord as m, WebSkillRuntime as mn, RunTraceFile as mt, ASK_USER_INPUT_SCHEMA as n, USER_PROFILE_KEY as nn, summarizeRunUsage as nr, RUN_SNAPSHOT_SCHEMA_VERSION as nt, AgentLoop as o, UnsupportedRunSnapshot as on, toRecordDigests as or, RouteResult as ot, BEHAVIOR_RECORDS_KEY as p, WebSkillApi as pn, RunToolCall as pt, LifecycleHookContext as q, readUserProfile as qn, ToolContent as qt, ASK_USER_TOOL as r, USER_PROFILE_NO_INVENTION_RULE as rn, summarizeToolCalls as rr, RUN_TRACE_SCHEMA_VERSION as rt, AgentLoopConfig as s, UserProfile as sn, toVercelToolSpecs as sr, RunLimitErrorDetails as st, ALLOWED_TOOLS_EXCLUSION_REASON as t, USER_PROFILE_EXPORT_VERSION as tn, sealToolCallPairs as tr, READ_SKILL_FILE_TOOL_NAME as tt, AnthropicClientConfig as u, UserProfileImportDiff as un, RunSnapshotListEntry as ut, BridgeCapability as v, bridgeError as vn, RunTraceSummary as vt, DEFAULT_USER_PROFILE_LIMITS as w, extractChartSpec as wn, SESSION_SCHEMA_VERSION as wt, CapabilityApproval as x, createWebSkillApi as xn, RuntimeRun as xt, BridgeRequest as y, buildRenderResult as yn, RunUsageSummary as yt, HookRunner as z, normalizeErrorCode as zn, SkillRouter as zt };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { $ as READ_SKILL_FILE_INPUT_SCHEMA, $n as
|
|
1
|
+
import { $ as SignatureAuditSink, $t as signaturePayloadBytes, A as extractSkillCandidate, At as buildManifest, B as JsonSchema, Bt as jsonRenderer, C as UiSpecActionCapability, Ct as VerifyResult, D as UiSpecSnapshot, Dt as assertSafePathSegment, E as UiSpecPatch, Et as assertRemoteUrlAllowed, F as DEFAULT_ARCHIVE_LIMITS, Ft as detectSkillArchiveShapeFromFs, G as RemoteUrlPolicy, Gt as parseSkillPackManifest, H as MemoryFS, Ht as messageOf, I as DiscoveryResult, It as escapeXml, J as SKILL_MANIFEST_FILE, Jt as renderAvailableSkillsXml, K as SIGNATURE_SCHEMA_VERSION, Kt as readResponseWithLimit, L as FileStat, Lt as exportSkills, M as ArchiveLimits, Mt as checkSkillRules, N as CatalogRenderer, Nt as computeDigest, O as UiSurfaceActionRequest, Ot as atomicWriteText, P as CryptoKeyLike, Pt as detectSkillArchiveShape, Q as SKILL_SIGNATURE_FILE, Qt as signSkill, R as FileSystemProvider, Rt as isAtomicTempPath, S as UiBridge, St as ValidationReport, T as UiSpecEvent, Tt as WebSkillErrorCode, U as Page, Ut as normalizePath, V as MANIFEST_EXCLUDED_FILES, Vt as keyIdOf, W as PageQuery, Wt as parseSkillMarkdown, X as SKILL_NAME_PATTERN, Xt as resolveArchiveLimits, Y as SKILL_NAME_MAX_LENGTH, Yt as renderCatalogJson, Z as SKILL_PACK_FILE, Zt as resolveInsideRoot, _ as LlmToolSpec, _t as SkillsLockfile, a as InteractionOrigin, an as xmlRenderer, at as SkillDiscovery, b as RenderResultRequest, bt as UiSpecNode, c as InteractionResponse, ct as SkillIssue, d as LlmContentPart, dt as SkillManifest, en as stripArchiveRoot, et as SignatureVerdict, f as LlmMessage, ft as SkillMetadata, g as LlmToolCall, gt as SkillSource, h as LlmTokenUsage, ht as SkillSignature, i as FormField, in as verifySkillSignature, it as SkillCatalogEntry, j as ATOMIC_TMP_SUFFIX_PATTERN, jt as checkDependencyCycles, k as UiSurfaceActionResponse, kt as buildCatalog, l as LlmClient, lt as SkillLocation, m as LlmStreamEvent, mt as SkillReader, n as ArtifactStore, nn as validateSkills, nt as SkillArchiveShape, o as InteractionPolicy, ot as SkillDocument, p as LlmResponse, pt as SkillPackManifest, q as SKILLS_LOCKFILE, qt as readSkillSignature, r as ChartSpec, rn as verifyManifest, rt as SkillCatalog, s as InteractionRequest, st as SkillInstallSource, t as Artifact, tn as unzipWithLimits, tt as SkillArchiveDetection, u as LlmCompleteInput, ut as SkillManagerPort, v as MemoryStore, vt as TrustedKey, w as UiSpecDrafts, wt as WebSkillError, x as SkillCandidateMarker, xt as UnsignedPolicy, y as RenderBlock, yt as TrustedKeyStore, z as FsTrustedKeyStore, zt as isValidSkillName } from "./types-CrRcT-LM-DZAp8sWv.js";
|
|
2
|
+
import { $ as READ_SKILL_FILE_INPUT_SCHEMA, $n as schemaToForm, $t as TraceEventType, A as FS_SESSION_PAGE_SIZE, An as fromVercelStreamPart, At as SealResult, B as HookRunnerOptions, Bn as normalizeToolContent, Bt as SkillScriptDescriptor, C as DEFAULT_LOOP_LIMITS, Cn as exportUserProfile, Ct as RuntimeSessionHandle, D as ExecuteLifecycleData, Dn as findUnpairedToolCalls, Dt as ScriptExecutor, E as EventBus, En as extractUiSpecEvents, Et as ScriptExecutionContext, F as FsSessionStore, Fn as mergeCatalogEntries, Ft as SessionStore, G as LifecycleEventInit, Gn as readBehaviorRecords, Gt as TextualToolContent, H as IntegrityVerdict, Hn as parseBridgeRequest, Ht as SkillStateGuard, I as FullDisclosureRouter, In as mergeProfileEntries, It as SkillFailureReport, J as LifecycleListener, Jn as refineUserProfile, Jt as ToolDefinition, K as LifecycleHook, Kn as readProfileEntries, Kt as TodoTraceEvent, L as GoogleGenAiClient, Ln as networkPolicyLibSource, Lt as SkillIntegrityGuard, M as FsMemoryStore, Mn as isNetworkAllowed, Mt as SessionListPage, N as FsRunSnapshotStore, Nn as isUnsupportedRunSnapshot, Nt as SessionMeta, O as ExternalSkillProvider, On as formatSkillScriptManifest, Ot as SealOptions, P as FsRunTraceStore, Pn as listSkillScripts, Pt as SessionRecord, Q as ProgressiveRouter, Qn as schemaSourceLabel, Qt as TraceEvent, R as GoogleGenAiClientConfig, Rn as networkUrlHost, Rt as SkillOutcomeReporter, S as CapabilityMode, Sn as diffUserProfile, St as RuntimeSession, T as EMPTY_USER_PROFILE, Tn as extractTodoTraceEvents, Tt as SchemaInferer, U as InteractLifecycleData, Un as parseUserProfileExport, Ut as SkillSuccessReport, V as InstalledSkillManifest, Vn as normalizeToolError, Vt as SkillScriptSchemaSource, W as LifecycleEvent, Wn as partsToText, Wt as TerminalLifecycleData, X as OpenAiCompatibleClient, Xn as resolveToolName, Xt as ToolResult, Y as NetworkPolicy, Yn as renderUserProfileContext, Yt as ToolResolution, Z as OpenAiCompatibleClientConfig, Zn as sampleBehaviorRecords, Zt as TraceClock, _ as BridgeCapabilities, _n as applyUserProfileImport, _t as RunTraceStore, a as ActivateLifecycleData, an as USER_PROFILE_REFINE_PROMPT, ar as toLlmToolSpec, at as RouteLifecycleData, b as BridgeResponse, bn as createScriptContext, bt as RuntimePhase, c as AgentLoopDeps, cn as UserProfileEntry, cr as validateUiSpecEvent, ct as RunResult, d as ApprovalDecision, dn as UserProfileLimits, dt as RunSnapshotStore, en as TraceRecorder, er as scriptToolName, et as READ_SKILL_FILE_TOOL, f as ApprovalScope, fn as VercelToolSpec, ft as RunTerminationReason, g as BehaviorScene, gn as appendBehaviorRecords, gt as RunTraceMetrics, h as BehaviorRecordKind, hn as WebSkillRuntimeDeps, ht as RunTraceFilter, i as ASK_USER_TOOL_NAME, in as USER_PROFILE_PROMPT_HEADER, ir as textParts, it as RefineUserProfileInput, j as FsArtifactStore, jn as interruptedToolResult, jt as SerializingMemoryStore, k as ExternalToolSource, kn as fromVercelResult, kt as SealRecord, l as AnthropicClient, ln as UserProfileExport, lr as validateUiSpecNode, lt as RunSnapshot, m as BehaviorRecord, mn as WebSkillRuntime, mt as RunTraceFile, n as ASK_USER_INPUT_SCHEMA, nn as USER_PROFILE_KEY, nr as summarizeRunUsage, nt as RUN_SNAPSHOT_SCHEMA_VERSION, o as AgentLoop, on as UnsupportedRunSnapshot, or as toRecordDigests, ot as RouteResult, p as BEHAVIOR_RECORDS_KEY, pn as WebSkillApi, pt as RunToolCall, q as LifecycleHookContext, qn as readUserProfile, qt as ToolContent, r as ASK_USER_TOOL, rn as USER_PROFILE_NO_INVENTION_RULE, rr as summarizeToolCalls, rt as RUN_TRACE_SCHEMA_VERSION, s as AgentLoopConfig, sn as UserProfile, sr as toVercelToolSpecs, st as RunLimitErrorDetails, t as ALLOWED_TOOLS_EXCLUSION_REASON, tn as USER_PROFILE_EXPORT_VERSION, tr as sealToolCallPairs, tt as READ_SKILL_FILE_TOOL_NAME, u as AnthropicClientConfig, un as UserProfileImportDiff, ut as RunSnapshotListEntry, v as BridgeCapability, vn as bridgeError, vt as RunTraceSummary, w as DEFAULT_USER_PROFILE_LIMITS, wn as extractChartSpec, wt as SESSION_SCHEMA_VERSION, x as CapabilityApproval, xn as createWebSkillApi, xt as RuntimeRun, y as BridgeRequest, yn as buildRenderResult, yt as RunUsageSummary, z as HookRunner, zn as normalizeErrorCode, zt as SkillRouter } from "./index-DtFdMKBX.js";
|
|
3
3
|
//#region src/version.d.ts
|
|
4
4
|
/** Generated by scripts/syncVersionConstant.mjs from packages/sdk/package.json. Do not edit by hand. */
|
|
5
5
|
/**
|
|
6
6
|
* Version of the published `@webskill/sdk` package, injected at build time.
|
|
7
7
|
* @stable
|
|
8
8
|
*/
|
|
9
|
-
declare const SDK_VERSION = "0.
|
|
9
|
+
declare const SDK_VERSION = "0.10.0";
|
|
10
10
|
//#endregion
|
|
11
|
-
export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, ATOMIC_TMP_SUFFIX_PATTERN, type ActivateLifecycleData, AgentLoop, type AgentLoopConfig, type AgentLoopDeps, AnthropicClient, type AnthropicClientConfig, type ApprovalDecision, type ApprovalScope, type ArchiveLimits, type Artifact, type ArtifactStore, BEHAVIOR_RECORDS_KEY, type BehaviorRecord, type BehaviorRecordKind, type BehaviorScene, type BridgeCapabilities, type BridgeCapability, type BridgeRequest, type BridgeResponse, CapabilityApproval, type CapabilityMode, type CatalogRenderer, type ChartSpec, type CryptoKeyLike, DEFAULT_ARCHIVE_LIMITS, DEFAULT_LOOP_LIMITS, DEFAULT_USER_PROFILE_LIMITS, type DiscoveryResult, EMPTY_USER_PROFILE, 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 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 RefineUserProfileInput, type RemoteUrlPolicy, type RenderBlock, type RenderResultRequest, type RouteLifecycleData, type RouteResult, type RunLimitErrorDetails, 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, SDK_VERSION, 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, type SealOptions, type SealRecord, type SealResult, SerializingMemoryStore, type SessionListPage, type SessionMeta, type SessionRecord, type SessionStore, type SignatureAuditSink, type SignatureVerdict, type SkillArchiveDetection, type SkillArchiveShape, type SkillCandidateMarker, 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 SkillScriptDescriptor, type SkillScriptSchemaSource, type SkillSignature, type SkillSource, type SkillStateGuard, type SkillSuccessReport, type SkillsLockfile, type TerminalLifecycleData, type TextualToolContent, type TodoTraceEvent, type ToolContent, type ToolDefinition, type ToolResolution, type ToolResult, type TraceClock, type TraceEvent, type TraceEventType, TraceRecorder, type TrustedKey, type TrustedKeyStore, USER_PROFILE_EXPORT_VERSION, USER_PROFILE_KEY, USER_PROFILE_NO_INVENTION_RULE, USER_PROFILE_PROMPT_HEADER, USER_PROFILE_REFINE_PROMPT, type UiBridge, type UiSpecActionCapability, type UiSpecDrafts, type UiSpecEvent, type UiSpecNode, type UiSpecPatch, type UiSpecSnapshot, type UiSurfaceActionRequest, type UiSurfaceActionResponse, type UnsignedPolicy, type UnsupportedRunSnapshot, type UserProfile, type UserProfileEntry, type UserProfileExport, type UserProfileImportDiff, type UserProfileLimits, type ValidationReport, type VercelToolSpec, type VerifyResult, type WebSkillApi, WebSkillError, type WebSkillErrorCode, WebSkillRuntime, type WebSkillRuntimeDeps, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, computeDigest, createScriptContext, createWebSkillApi, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, findUnpairedToolCalls, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, interruptedToolResult, isAtomicTempPath, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, listSkillScripts, mergeCatalogEntries, mergeProfileEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, parseUserProfileExport, partsToText, readBehaviorRecords, readProfileEntries, readResponseWithLimit, readSkillSignature, readUserProfile, refineUserProfile, renderAvailableSkillsXml, renderCatalogJson, renderUserProfileContext, resolveArchiveLimits, resolveInsideRoot, resolveToolName, sampleBehaviorRecords, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
|
|
11
|
+
export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, ATOMIC_TMP_SUFFIX_PATTERN, type ActivateLifecycleData, AgentLoop, type AgentLoopConfig, type AgentLoopDeps, AnthropicClient, type AnthropicClientConfig, type ApprovalDecision, type ApprovalScope, type ArchiveLimits, type Artifact, type ArtifactStore, BEHAVIOR_RECORDS_KEY, type BehaviorRecord, type BehaviorRecordKind, type BehaviorScene, type BridgeCapabilities, type BridgeCapability, type BridgeRequest, type BridgeResponse, CapabilityApproval, type CapabilityMode, type CatalogRenderer, type ChartSpec, type CryptoKeyLike, DEFAULT_ARCHIVE_LIMITS, DEFAULT_LOOP_LIMITS, DEFAULT_USER_PROFILE_LIMITS, type DiscoveryResult, EMPTY_USER_PROFILE, 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 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 LlmTokenUsage, 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 RefineUserProfileInput, type RemoteUrlPolicy, type RenderBlock, type RenderResultRequest, type RouteLifecycleData, type RouteResult, type RunLimitErrorDetails, type RunResult, type RunSnapshot, type RunSnapshotListEntry, type RunSnapshotStore, type RunTerminationReason, type RunToolCall, type RunTraceFile, type RunTraceFilter, type RunTraceMetrics, type RunTraceStore, type RunTraceSummary, type RunUsageSummary, type RuntimePhase, type RuntimeRun, type RuntimeSession, type RuntimeSessionHandle, SDK_VERSION, 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, type SealOptions, type SealRecord, type SealResult, SerializingMemoryStore, type SessionListPage, type SessionMeta, type SessionRecord, type SessionStore, type SignatureAuditSink, type SignatureVerdict, type SkillArchiveDetection, type SkillArchiveShape, type SkillCandidateMarker, 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 SkillScriptDescriptor, type SkillScriptSchemaSource, type SkillSignature, type SkillSource, type SkillStateGuard, type SkillSuccessReport, type SkillsLockfile, type TerminalLifecycleData, type TextualToolContent, type TodoTraceEvent, type ToolContent, type ToolDefinition, type ToolResolution, type ToolResult, type TraceClock, type TraceEvent, type TraceEventType, TraceRecorder, type TrustedKey, type TrustedKeyStore, USER_PROFILE_EXPORT_VERSION, USER_PROFILE_KEY, USER_PROFILE_NO_INVENTION_RULE, USER_PROFILE_PROMPT_HEADER, USER_PROFILE_REFINE_PROMPT, type UiBridge, type UiSpecActionCapability, type UiSpecDrafts, type UiSpecEvent, type UiSpecNode, type UiSpecPatch, type UiSpecSnapshot, type UiSurfaceActionRequest, type UiSurfaceActionResponse, type UnsignedPolicy, type UnsupportedRunSnapshot, type UserProfile, type UserProfileEntry, type UserProfileExport, type UserProfileImportDiff, type UserProfileLimits, type ValidationReport, type VercelToolSpec, type VerifyResult, type WebSkillApi, WebSkillError, type WebSkillErrorCode, WebSkillRuntime, type WebSkillRuntimeDeps, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, computeDigest, createScriptContext, createWebSkillApi, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, findUnpairedToolCalls, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, interruptedToolResult, isAtomicTempPath, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, listSkillScripts, mergeCatalogEntries, mergeProfileEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, parseUserProfileExport, partsToText, readBehaviorRecords, readProfileEntries, readResponseWithLimit, readSkillSignature, readUserProfile, refineUserProfile, renderAvailableSkillsXml, renderCatalogJson, renderUserProfileContext, resolveArchiveLimits, resolveInsideRoot, resolveToolName, sampleBehaviorRecords, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeRunUsage, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as jsonRenderer, B as resolveArchiveLimits, C as computeDigest, D as exportSkills, E as escapeXml, F as parseSkillPackManifest, G as unzipWithLimits, H as signSkill, I as readResponseWithLimit, J as verifySkillSignature, K as validateSkills, L as readSkillSignature, M as messageOf, N as normalizePath, O as isAtomicTempPath, P as parseSkillMarkdown, R as renderAvailableSkillsXml, S as checkSkillRules, T as detectSkillArchiveShapeFromFs, U as signaturePayloadBytes, V as resolveInsideRoot, W as stripArchiveRoot, Y as xmlRenderer, _ as assertSafePathSegment, a as MemoryFS, b as buildManifest, c as SKILL_MANIFEST_FILE, d as SKILL_PACK_FILE, f as SKILL_SIGNATURE_FILE, g as assertRemoteUrlAllowed, h as WebSkillError, i as MANIFEST_EXCLUDED_FILES, j as keyIdOf, k as isValidSkillName, l as SKILL_NAME_MAX_LENGTH, m as SkillReader, n as DEFAULT_ARCHIVE_LIMITS, o as SIGNATURE_SCHEMA_VERSION, p as SkillDiscovery, q as verifyManifest, r as FsTrustedKeyStore, s as SKILLS_LOCKFILE, t as ATOMIC_TMP_SUFFIX_PATTERN, u as SKILL_NAME_PATTERN, v as atomicWriteText, w as detectSkillArchiveShape, x as checkDependencyCycles, y as buildCatalog, z as renderCatalogJson } from "./dist-Bev6i6Ip.js";
|
|
2
2
|
import { a as textParts, n as partsToText } from "./memoryArtifactStore-52Zn9npI-LbCQaqyx.js";
|
|
3
|
-
import { $ as fromVercelStreamPart, A as SerializingMemoryStore, B as bridgeError, C as ProgressiveRouter, Ct as sealToolCallPairs, D as RUN_SNAPSHOT_SCHEMA_VERSION, Dt as
|
|
3
|
+
import { $ as fromVercelStreamPart, A as SerializingMemoryStore, At as validateUiSpecNode, B as bridgeError, C as ProgressiveRouter, Ct as sealToolCallPairs, D as RUN_SNAPSHOT_SCHEMA_VERSION, Dt as toRecordDigests, E as READ_SKILL_FILE_TOOL_NAME, Et as toLlmToolSpec, F as USER_PROFILE_PROMPT_HEADER, G as exportUserProfile, H as createScriptContext, I as USER_PROFILE_REFINE_PROMPT, J as extractTodoTraceEvents, K as extractChartSpec, L as WebSkillRuntime, M as USER_PROFILE_EXPORT_VERSION, N as USER_PROFILE_KEY, O as RUN_TRACE_SCHEMA_VERSION, Ot as toVercelToolSpecs, P as USER_PROFILE_NO_INVENTION_RULE, Q as fromVercelResult, R as appendBehaviorRecords, S as OpenAiCompatibleClient, St as scriptToolName, T as READ_SKILL_FILE_TOOL, Tt as summarizeToolCalls, U as createWebSkillApi, V as buildRenderResult, W as diffUserProfile, X as findUnpairedToolCalls, Y as extractUiSpecEvents, Z as formatSkillScriptManifest, _ as FsRunTraceStore, _t as renderUserProfileContext, a as AgentLoop, at as mergeProfileEntries, b as GoogleGenAiClient, bt as schemaSourceLabel, c as CapabilityApproval, ct as normalizeErrorCode, d as EMPTY_USER_PROFILE, dt as parseBridgeRequest, et as interruptedToolResult, f as EventBus, ft as parseUserProfileExport, g as FsRunSnapshotStore, gt as refineUserProfile, h as FsMemoryStore, ht as readUserProfile, i as ASK_USER_TOOL_NAME, it as mergeCatalogEntries, j as TraceRecorder, k as SESSION_SCHEMA_VERSION, kt as validateUiSpecEvent, l as DEFAULT_LOOP_LIMITS, lt as normalizeToolContent, m as FsArtifactStore, mt as readProfileEntries, n as ASK_USER_INPUT_SCHEMA, nt as isUnsupportedRunSnapshot, o as AnthropicClient, ot as networkPolicyLibSource, p as FS_SESSION_PAGE_SIZE, pt as readBehaviorRecords, q as extractSkillCandidate, r as ASK_USER_TOOL, rt as listSkillScripts, s as BEHAVIOR_RECORDS_KEY, st as networkUrlHost, t as ALLOWED_TOOLS_EXCLUSION_REASON, tt as isNetworkAllowed, u as DEFAULT_USER_PROFILE_LIMITS, ut as normalizeToolError, v as FsSessionStore, vt as resolveToolName, w as READ_SKILL_FILE_INPUT_SCHEMA, wt as summarizeRunUsage, x as HookRunner, xt as schemaToForm, y as FullDisclosureRouter, yt as sampleBehaviorRecords, z as applyUserProfileImport } from "./dist-BViUeszk.js";
|
|
4
4
|
|
|
5
5
|
//#region src/version.ts
|
|
6
6
|
/** Generated by scripts/syncVersionConstant.mjs from packages/sdk/package.json. Do not edit by hand. */
|
|
@@ -8,7 +8,7 @@ import { $ as fromVercelStreamPart, A as SerializingMemoryStore, B as bridgeErro
|
|
|
8
8
|
* Version of the published `@webskill/sdk` package, injected at build time.
|
|
9
9
|
* @stable
|
|
10
10
|
*/
|
|
11
|
-
const SDK_VERSION = "0.
|
|
11
|
+
const SDK_VERSION = "0.10.0";
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
14
|
-
export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, ATOMIC_TMP_SUFFIX_PATTERN, AgentLoop, AnthropicClient, BEHAVIOR_RECORDS_KEY, CapabilityApproval, DEFAULT_ARCHIVE_LIMITS, DEFAULT_LOOP_LIMITS, DEFAULT_USER_PROFILE_LIMITS, EMPTY_USER_PROFILE, EventBus, FS_SESSION_PAGE_SIZE, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, HookRunner, MANIFEST_EXCLUDED_FILES, MemoryFS, OpenAiCompatibleClient, ProgressiveRouter, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, SDK_VERSION, SESSION_SCHEMA_VERSION, SIGNATURE_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SKILL_SIGNATURE_FILE, SerializingMemoryStore, SkillDiscovery, SkillReader, TraceRecorder, USER_PROFILE_EXPORT_VERSION, USER_PROFILE_KEY, USER_PROFILE_NO_INVENTION_RULE, USER_PROFILE_PROMPT_HEADER, USER_PROFILE_REFINE_PROMPT, WebSkillError, WebSkillRuntime, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, computeDigest, createScriptContext, createWebSkillApi, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, findUnpairedToolCalls, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, interruptedToolResult, isAtomicTempPath, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, listSkillScripts, mergeCatalogEntries, mergeProfileEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, parseUserProfileExport, partsToText, readBehaviorRecords, readProfileEntries, readResponseWithLimit, readSkillSignature, readUserProfile, refineUserProfile, renderAvailableSkillsXml, renderCatalogJson, renderUserProfileContext, resolveArchiveLimits, resolveInsideRoot, resolveToolName, sampleBehaviorRecords, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
|
|
14
|
+
export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, ATOMIC_TMP_SUFFIX_PATTERN, AgentLoop, AnthropicClient, BEHAVIOR_RECORDS_KEY, CapabilityApproval, DEFAULT_ARCHIVE_LIMITS, DEFAULT_LOOP_LIMITS, DEFAULT_USER_PROFILE_LIMITS, EMPTY_USER_PROFILE, EventBus, FS_SESSION_PAGE_SIZE, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, HookRunner, MANIFEST_EXCLUDED_FILES, MemoryFS, OpenAiCompatibleClient, ProgressiveRouter, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, SDK_VERSION, SESSION_SCHEMA_VERSION, SIGNATURE_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SKILL_SIGNATURE_FILE, SerializingMemoryStore, SkillDiscovery, SkillReader, TraceRecorder, USER_PROFILE_EXPORT_VERSION, USER_PROFILE_KEY, USER_PROFILE_NO_INVENTION_RULE, USER_PROFILE_PROMPT_HEADER, USER_PROFILE_REFINE_PROMPT, WebSkillError, WebSkillRuntime, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, computeDigest, createScriptContext, createWebSkillApi, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, findUnpairedToolCalls, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, interruptedToolResult, isAtomicTempPath, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, listSkillScripts, mergeCatalogEntries, mergeProfileEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, parseUserProfileExport, partsToText, readBehaviorRecords, readProfileEntries, readResponseWithLimit, readSkillSignature, readUserProfile, refineUserProfile, renderAvailableSkillsXml, renderCatalogJson, renderUserProfileContext, resolveArchiveLimits, resolveInsideRoot, resolveToolName, sampleBehaviorRecords, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeRunUsage, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
|