@webskill/sdk 0.6.0 → 0.7.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.
@@ -1,5 +1,5 @@
1
- import { a as InteractionOrigin, b as UiBridge } from "./types-4pg-qp_I-Gq63X8Oa.js";
2
- import { O as ExternalToolSource } from "./index-C-KFAZoF.js";
1
+ import { a as InteractionOrigin, c as InteractionResponse, s as InteractionRequest, x as UiBridge } from "./types-CcxRLdJG-DCXyw1US.js";
2
+ import { k as ExternalToolSource } from "./index-DkbABR43.js";
3
3
  //#region ../agent/dist/index.d.ts
4
4
  //#region src/todo/types.d.ts
5
5
  /** 待办条目状态:未开始 / 进行中 / 已完成(FR-3.1) */
@@ -319,6 +319,12 @@ interface PerceivedNode {
319
319
  imageId?: string;
320
320
  /** 取像失败的降级说明(英文);不得静默丢弃(FR-12.1) */
321
321
  imageNote?: string;
322
+ /**
323
+ * 不透明元素句柄(S10)。**仅当该节点可被操作时出现**:
324
+ * 它落在宿主声明的操作范围内、且是可交互角色。
325
+ * 由 reader 生成,只在产生它的那次感知内有效;模型不得构造或推断。
326
+ */
327
+ ref?: string;
322
328
  children?: readonly PerceivedNode[];
323
329
  }
324
330
  /** 随感知一起下发的一张图像(FR-12.1) @experimental */
@@ -384,17 +390,23 @@ interface PerceptionRecord {
384
390
  imageFailures?: number;
385
391
  }
386
392
  /**
387
- * 审计落盘端口。刻意只声明 `append` 的结构化子集,`FsAuditLog` 直接满足——
393
+ * 页面侧留痕的统一出口(感知与操作共用)。
394
+ * 刻意只声明 `append` 的结构化子集,`FsAuditLog` 直接满足——
388
395
  * agent 包不能依赖 governance,但审计不能因此变成「记在内存里」。
389
396
  * @experimental
390
397
  */
391
- interface PerceptionAuditSink {
398
+ interface PageAuditSink {
392
399
  append(event: {
393
400
  type: string;
394
401
  target: string;
395
402
  data?: Record<string, unknown>;
396
403
  }): Promise<unknown>;
397
404
  }
405
+ /**
406
+ * @deprecated 改用 `PageAuditSink`。保留以兼容 0.5.0 的注入代码。
407
+ * @experimental
408
+ */
409
+ type PerceptionAuditSink = PageAuditSink;
398
410
  //#endregion
399
411
  //#region src/perception/policy.d.ts
400
412
  interface PagePerceptionPolicyOptions {
@@ -471,4 +483,143 @@ declare function createPagePerceptionToolSource(options: PagePerceptionToolSourc
471
483
  */
472
484
  declare const PERCEPTION_SYSTEM_PROMPT: string;
473
485
  //#endregion
474
- export { SkillGenerationPolicy as A, TodoListener as B, PerceptionCaptureOptions as C, SKILL_GENERATION_SYSTEM_PROMPT as D, PerceptionScope as E, SubAgentRunner as F, createPagePerceptionToolSource as G, TodoStore as H, TODO_SYSTEM_PROMPT as I, withDelegationOrigin as J, createSkillGenerationToolSource as K, TodoEvent as L, SkillGenerator as M, SkillGeneratorOptions as N, SkillCandidateSink as O, SubAgentRunInput as P, TodoItem as R, PerceptionAuditSink as S, PerceptionResult as T, TodoToolSourceOptions as U, TodoStatus as V, createDelegationToolSource as W, PagePerceptionReader as _, DelegationOrchestratorOptions as a, PerceivedImage as b, DelegationToolSourceOptions as c, ImageCaptureBudget as d, MANAGE_TODO_TOOL as f, PagePerceptionPolicyOptions as g, PagePerceptionPolicy as h, DelegationOrchestrator as i, SkillGenerationToolSourceOptions as j, SkillGenerationOutcome as k, GENERATE_SKILL_TOOL as l, PERCEPTION_SYSTEM_PROMPT as m, DELEGATION_SYSTEM_PROMPT as n, DelegationRequest as o, PERCEIVE_PAGE_TOOL as p, createTodoToolSource as q, DelegationBudget as r, DelegationResult as s, DELEGATE_TASK_TOOL as t, GeneratedSkillDraft as u, PagePerceptionToolSourceOptions as v, PerceptionRecord as w, PerceivedNode as x, ParentBudget as y, TodoList as z };
486
+ //#region src/pageAction/types.d.ts
487
+ /**
488
+ * 页面操作的策略层类型(需求 23)。
489
+ *
490
+ * 与感知层同一条规矩:这一层不含任何 DOM 概念——执行落在 `@webskill/browser`,
491
+ * 本包只定义「什么允许被操作」以及一次操作长什么样。
492
+ */
493
+ /**
494
+ * 可操作范围白名单(FR-23.1,硬约束)。
495
+ *
496
+ * **没有默认值,空 `include` 就是任何操作都不可执行。**
497
+ * 与 `PerceptionScope` 同构但**独立声明**:写成类型别名会让「感知与操作共用一份配置」
498
+ * 在类型层面合法,而 FR-23.1 写死了那是不可接受的——可读不等于可操作。
499
+ * @experimental
500
+ */
501
+ interface PageActionScope {
502
+ /** 可操作的根节点选择器;未声明即不可操作 */
503
+ include: readonly string[];
504
+ /** 从 include 子树中剪除的危险控件(支付、删除、权限变更等) */
505
+ exclude?: readonly string[];
506
+ }
507
+ /** 本版的最小操作集(FR-23.4)。导航、拖拽、滚动均不在内。 @experimental */
508
+ type PageActionKind = 'click' | 'fill' | 'submit';
509
+ /** @experimental */
510
+ interface PageActionRequest {
511
+ /** 感知产出的不透明句柄;不接受选择器(FR-23.4) */
512
+ ref: string;
513
+ action: PageActionKind;
514
+ /** `action === 'fill'` 时必填 */
515
+ value?: string;
516
+ }
517
+ /** @experimental */
518
+ interface PageActionOutcome {
519
+ ok: boolean;
520
+ /**
521
+ * 实际操作到的元素的角色与可访问名称。
522
+ * 由**执行器**回填而不是调用方从感知结果里查:执行的那一刻元素可能已经变了,
523
+ * 留痕必须记实际操作到的东西(FR-23.3)。
524
+ */
525
+ target: {
526
+ role: string;
527
+ name?: string;
528
+ };
529
+ /** 目标是密码类控件:确认卡与留痕据此隐去值(FR-23.3) */
530
+ secret?: boolean;
531
+ /** 失败原因(英文) */
532
+ reason?: string;
533
+ }
534
+ /**
535
+ * 页面操作执行器。与 `PagePerceptionReader` 对称,同样不含 DOM 概念。
536
+ * 实现方负责校验句柄有效性、元素可交互性,以及目标是否仍在操作范围内。
537
+ * @experimental
538
+ */
539
+ interface PageActionExecutor {
540
+ execute(request: PageActionRequest): Promise<PageActionOutcome> | PageActionOutcome;
541
+ /** 目标的角色与可访问名称,供确认卡在**执行前**说清将要做什么(FR-23.2) */
542
+ describe(ref: string): {
543
+ role: string;
544
+ name?: string;
545
+ secret?: boolean;
546
+ } | undefined;
547
+ }
548
+ /** 一次页面操作的留痕(FR-23.3 的五项字段) @experimental */
549
+ interface PageActionRecord {
550
+ /** ISO 8601 */
551
+ at: string;
552
+ action: PageActionKind;
553
+ role: string;
554
+ name?: string;
555
+ /** 是否经用户确认;宿主预授权的操作记 `'preauthorized'` */
556
+ approved: boolean | 'preauthorized';
557
+ ok: boolean;
558
+ /** 非密码类控件填入的值;密码类控件**整个字段不存在** */
559
+ value?: string;
560
+ reason?: string;
561
+ }
562
+ //#endregion
563
+ //#region src/pageAction/policy.d.ts
564
+ /** 授权卡的最小出口;`UiBridge` 直接满足(与技能生成用的是同一个端口) */
565
+ interface PageActionUi {
566
+ request(input: InteractionRequest): Promise<InteractionResponse>;
567
+ }
568
+ interface PageActionPolicyOptions {
569
+ /** 宿主声明的可操作范围;`include` 为空即整个能力不可用 */
570
+ scope: PageActionScope;
571
+ executor: PageActionExecutor;
572
+ ui: PageActionUi;
573
+ /** FR-23.3:每次操作写审计。不注入即不留痕,装配方要自己承担这个选择 */
574
+ audit?: PageAuditSink;
575
+ /** 审计事件的 target(缺省 `page`) */
576
+ auditTarget?: string;
577
+ /**
578
+ * 免确认的操作类型。**缺省即每一次操作都要确认**(AC-23.4)。
579
+ * 只有宿主显式配置才生效,SDK 不提供任何缺省放行项。
580
+ */
581
+ preauthorized?: readonly PageActionKind[];
582
+ now?(): string;
583
+ }
584
+ /**
585
+ * 页面操作策略(需求 23)。
586
+ *
587
+ * 三道闸门依次是:宿主有没有声明范围、用户认不认、执行器认不认。
588
+ * 模型能表达的只有「在哪个句柄上做哪个动作」——它没有任何影响范围的入口(AC-23.2)。
589
+ * @experimental
590
+ */
591
+ declare class PageActionPolicy {
592
+ #private;
593
+ constructor(options: PageActionPolicyOptions);
594
+ /** 白名单为空即不可用(FR-23.1):宿主没声明范围就没有这个能力 */
595
+ get enabled(): boolean;
596
+ get scope(): PageActionScope;
597
+ /** 最近的操作记录(只读展示用),新的在前 */
598
+ get records(): readonly PageActionRecord[];
599
+ act(request: PageActionRequest): Promise<PageActionOutcome>;
600
+ }
601
+ //#endregion
602
+ //#region src/pageAction/toolSource.d.ts
603
+ declare const PAGE_ACTION_TOOL = "act_on_page";
604
+ interface PageActionToolSourceOptions {
605
+ policy: PageActionPolicy;
606
+ }
607
+ /**
608
+ * 把页面操作接到既有工具协议上。
609
+ *
610
+ * 策略未注入或宿主没声明可操作区域时 `listToolSpecs()` 返回空数组——
611
+ * 模型连这个工具的存在都看不到,而不是看得到再被拒(FR-23.5 / AC-23.8)。
612
+ * @experimental
613
+ */
614
+ declare function createPageActionToolSource(options: PageActionToolSourceOptions): ExternalToolSource;
615
+ //#endregion
616
+ //#region src/prompts/pageAction.d.ts
617
+ /**
618
+ * 页面操作的系统提示词(需求 23)。
619
+ *
620
+ * 措辞刻意保守:提示词里的鼓励性表述会直接抬高模型尝试操作的频率,
621
+ * 而每一次尝试都要打断用户去点确认。
622
+ */
623
+ declare const PAGE_ACTION_SYSTEM_PROMPT: string;
624
+ //#endregion
625
+ export { TodoListener as $, PagePerceptionReader as A, SKILL_GENERATION_SYSTEM_PROMPT as B, PageActionRequest as C, PageAuditSink as D, PageActionUi as E, PerceptionAuditSink as F, SkillGenerator as G, SkillGenerationOutcome as H, PerceptionCaptureOptions as I, SubAgentRunner as J, SkillGeneratorOptions as K, PerceptionRecord as L, ParentBudget as M, PerceivedImage as N, PagePerceptionPolicy as O, PerceivedNode as P, TodoList as Q, PerceptionResult as R, PageActionRecord as S, PageActionToolSourceOptions as T, SkillGenerationPolicy as U, SkillCandidateSink as V, SkillGenerationToolSourceOptions as W, TodoEvent as X, TODO_SYSTEM_PROMPT as Y, TodoItem as Z, PageActionExecutor as _, DelegationOrchestratorOptions as a, createPagePerceptionToolSource as at, PageActionPolicy as b, DelegationToolSourceOptions as c, withDelegationOrigin as ct, ImageCaptureBudget as d, TodoStatus as et, MANAGE_TODO_TOOL as f, PERCEPTION_SYSTEM_PROMPT as g, PERCEIVE_PAGE_TOOL as h, DelegationOrchestrator as i, createPageActionToolSource as it, PagePerceptionToolSourceOptions as j, PagePerceptionPolicyOptions as k, GENERATE_SKILL_TOOL as l, PAGE_ACTION_TOOL as m, DELEGATION_SYSTEM_PROMPT as n, TodoToolSourceOptions as nt, DelegationRequest as o, createSkillGenerationToolSource as ot, PAGE_ACTION_SYSTEM_PROMPT as p, SubAgentRunInput as q, DelegationBudget as r, createDelegationToolSource as rt, DelegationResult as s, createTodoToolSource as st, DELEGATE_TASK_TOOL as t, TodoStore as tt, GeneratedSkillDraft as u, PageActionKind as v, PageActionScope as w, PageActionPolicyOptions as x, PageActionOutcome as y, PerceptionScope as z };
@@ -1,5 +1,5 @@
1
- import { I as JsonSchema, T as UiSpecSnapshot, b as UiBridge, c as InteractionResponse, mt as UiSpecNode, r as ChartSpec, s as InteractionRequest, v as RenderBlock, x as UiSpecActionCapability, y as RenderResultRequest } from "./types-4pg-qp_I-Gq63X8Oa.js";
2
- import { O as ExternalToolSource } from "./index-C-KFAZoF.js";
1
+ import { E as UiSpecSnapshot, R as JsonSchema, S as UiSpecActionCapability, c as InteractionResponse, gt as UiSpecNode, r as ChartSpec, s as InteractionRequest, v as RenderBlock, x as UiBridge, y as RenderResultRequest } from "./types-CcxRLdJG-DCXyw1US.js";
2
+ import { k as ExternalToolSource } from "./index-DkbABR43.js";
3
3
  import { z } from "zod";
4
4
  import { ComponentType, ReactNode } from "react";
5
5
  //#region ../ui/dist/index.d.ts
@@ -1,4 +1,4 @@
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-4pg-qp_I-Gq63X8Oa.js";
1
+ import { $ as SkillCatalog, C as UiSpecDrafts, D as UiSurfaceActionRequest, H as PageQuery, I as FileSystemProvider, P as DiscoveryResult, R as JsonSchema, V as Page, _ as MemoryStore, d as LlmContentPart, et as SkillCatalogEntry, f as LlmMessage, g as LlmToolSpec, gt as UiSpecNode, i as FormField, l as LlmClient, m as LlmStreamEvent, n as ArtifactStore, nt as SkillDocument, o as InteractionPolicy, p as LlmResponse, r as ChartSpec, rt as SkillInstallSource, s as InteractionRequest, st as SkillManifest, t as Artifact, tt as SkillDiscovery, u as LlmCompleteInput, v as RenderBlock, vt as ValidationReport, w as UiSpecEvent, x as UiBridge, xt as WebSkillErrorCode, y as RenderResultRequest } from "./types-CcxRLdJG-DCXyw1US.js";
2
2
  //#region ../runtime/dist/index.d.ts
3
3
  //#region src/llm/parts.d.ts
4
4
  /** 纯文本消息内容的构造快捷方式(引擎内部绝大多数消息仍是纯文本) */
@@ -472,6 +472,11 @@ interface SkillFailureReport {
472
472
  /** 英文失败说明;上报方须能据此向用户解释,不要传空串 */
473
473
  message: string;
474
474
  }
475
+ /** 技能脚本执行成功的上报负载 */
476
+ interface SkillSuccessReport {
477
+ skillName: string;
478
+ runId: string;
479
+ }
475
480
  /**
476
481
  * 技能执行结果上报 port(治理 `SkillStatePolicy.toSkillOutcomeReporter` 装配;**不注入即关闭**)。
477
482
  *
@@ -488,6 +493,11 @@ interface SkillFailureReport {
488
493
  */
489
494
  interface SkillOutcomeReporter {
490
495
  onSkillFailed?(report: SkillFailureReport): Promise<void>;
496
+ /**
497
+ * 成功上报(0.7.0 新增,可选;裁决 D-5)。没有它,失败计数只能单调递增,
498
+ * 「连续三次失败」实际退化成「累计三次」——一个长期正常的技能迟早会被隔离。
499
+ */
500
+ onSkillSucceeded?(report: SkillSuccessReport): Promise<void>;
491
501
  }
492
502
  interface RuntimeSession {
493
503
  id: string;
@@ -531,6 +541,7 @@ declare function extractChartSpec(data: unknown): ChartSpec | undefined;
531
541
  /**
532
542
  * 默认的结果渲染构造:run 内收集的 renderBlocks(chart 等)在前,
533
543
  * LLM 最终输出 → markdown block,run.artifacts → file blocks 在后;summary 取 terminationReason。
544
+ * 注入 output block 时一并记下它的下标(S7),供消费方按来源去重。
534
545
  */
535
546
  declare function buildRenderResult(run: RuntimeRun, output: string, renderBlocks?: RenderBlock[]): RenderResultRequest;
536
547
  //#endregion
@@ -1257,6 +1268,33 @@ declare class AgentLoop {
1257
1268
  resume(snapshot: RunSnapshot): Promise<RunResult>;
1258
1269
  }
1259
1270
  //#endregion
1271
+ //#region src/engine/limits.d.ts
1272
+ /**
1273
+ * Agent loop 的运行上限默认值。**全仓唯一来源**(S8)。
1274
+ *
1275
+ * 在 0.7.0 之前这三个数字在 `AgentLoop` 的构造与 ui-kit 的 `defaultRuntimeConfig()`
1276
+ * 里各写了一遍。两份值今天恰好相等,所以不出事;一旦其中一处被改,
1277
+ * 「恢复默认值」会恢复到 agent loop 根本不用的值——验收绿、行为错。
1278
+ * @stable
1279
+ */
1280
+ declare const DEFAULT_LOOP_LIMITS: {
1281
+ readonly maxTurns: 10;
1282
+ readonly totalTimeoutMs: 120000;
1283
+ readonly toolTimeoutMs: 30000;
1284
+ };
1285
+ /**
1286
+ * 触顶类失败(`RUN_TIMEOUT` / `RUN_MAX_TURNS_EXCEEDED`)记进 `run.failed`
1287
+ * 轨迹事件 `data` 的结构化细节:程序化消费方据此判断是哪个上限、当时的生效值,
1288
+ * 而不必去解析英文 message。
1289
+ * @stable
1290
+ */
1291
+ interface RunLimitErrorDetails {
1292
+ /** 触顶的上限字段名,与 `RuntimeLoopConfig` 的键一致 */
1293
+ limit: 'totalTimeoutMs' | 'toolTimeoutMs' | 'maxTurns';
1294
+ /** 触顶时该上限的生效值 */
1295
+ value: number;
1296
+ }
1297
+ //#endregion
1260
1298
  //#region src/engine/runtime.d.ts
1261
1299
  interface WebSkillRuntimeDeps {
1262
1300
  fs: FileSystemProvider;
@@ -1591,4 +1629,4 @@ declare class FsSessionStore<TMessage = unknown> implements SessionStore<TMessag
1591
1629
  delete(id: string): Promise<void>;
1592
1630
  }
1593
1631
  //#endregion
1594
- export { READ_SKILL_FILE_TOOL as $, UnsupportedRunSnapshot as $t, FsArtifactStore as A, normalizeToolContent as An, SkillFailureReport as At, InstalledSkillManifest as B, resolveToolName as Bn, ToolContent as Bt, DEFAULT_USER_PROFILE_LIMITS as C, isUnsupportedRunSnapshot as Cn, ScriptExecutionContext as Ct, ExternalSkillProvider as D, networkPolicyLibSource as Dn, SessionMeta as Dt, ExecuteLifecycleData as E, mergeProfileEntries as En, SessionListPage as Et, FullDisclosureRouter as F, readBehaviorRecords as Fn, SkillScriptSchemaSource as Ft, LifecycleHook as G, summarizeToolCalls as Gn, TraceEvent as Gt, InteractLifecycleData as H, schemaSourceLabel as Hn, ToolResolution as Ht, GoogleGenAiClient as I, readProfileEntries as In, SkillStateGuard as It, NetworkPolicy as J, toRecordDigests as Jn, USER_PROFILE_EXPORT_VERSION as Jt, LifecycleHookContext as K, textParts as Kn, TraceEventType as Kt, GoogleGenAiClientConfig as L, readUserProfile as Ln, TerminalLifecycleData as Lt, FsRunSnapshotStore as M, parseBridgeRequest as Mn, SkillOutcomeReporter as Mt, FsRunTraceStore as N, parseUserProfileExport as Nn, SkillRouter as Nt, ExternalToolSource as O, networkUrlHost as On, SessionRecord as Ot, FsSessionStore as P, partsToText as Pn, SkillScriptDescriptor as Pt, READ_SKILL_FILE_INPUT_SCHEMA as Q, USER_PROFILE_REFINE_PROMPT as Qt, HookRunner as R, refineUserProfile as Rn, TextualToolContent as Rt, CapabilityMode as S, isNetworkAllowed as Sn, SchemaInferer as St, EventBus as T, mergeCatalogEntries as Tn, SerializingMemoryStore as Tt, LifecycleEvent as U, schemaToForm as Un, ToolResult as Ut, IntegrityVerdict as V, sampleBehaviorRecords as Vn, ToolDefinition as Vt, LifecycleEventInit as W, scriptToolName as Wn, TraceClock as Wt, OpenAiCompatibleClientConfig as X, validateUiSpecEvent as Xn, USER_PROFILE_NO_INVENTION_RULE as Xt, OpenAiCompatibleClient as Y, toVercelToolSpecs as Yn, USER_PROFILE_KEY as Yt, ProgressiveRouter as Z, validateUiSpecNode as Zn, USER_PROFILE_PROMPT_HEADER as Zt, BridgeCapabilities as _, extractTodoTraceEvents as _n, RuntimePhase as _t, ActivateLifecycleData as a, WebSkillApi as an, RouteResult as at, BridgeResponse as b, fromVercelResult as bn, RuntimeSessionHandle as bt, AgentLoopDeps as c, appendBehaviorRecords as cn, RunSnapshotListEntry as ct, ApprovalDecision as d, buildRenderResult as dn, RunToolCall as dt, UserProfile as en, READ_SKILL_FILE_TOOL_NAME as et, ApprovalScope as f, createScriptContext as fn, RunTraceFile as ft, BehaviorScene as g, extractChartSpec as gn, RunTraceSummary as gt, BehaviorRecordKind as h, exportUserProfile as hn, RunTraceStore as ht, ASK_USER_TOOL_NAME as i, VercelToolSpec as in, RouteLifecycleData as it, FsMemoryStore as j, normalizeToolError as jn, SkillIntegrityGuard as jt, FS_SESSION_PAGE_SIZE as k, normalizeErrorCode as kn, SessionStore as kt, AnthropicClient as l, applyUserProfileImport as ln, RunSnapshotStore as lt, BehaviorRecord as m, diffUserProfile as mn, RunTraceMetrics as mt, ASK_USER_INPUT_SCHEMA as n, UserProfileExport as nn, RUN_TRACE_SCHEMA_VERSION as nt, AgentLoop as o, WebSkillRuntime as on, RunResult as ot, BEHAVIOR_RECORDS_KEY as p, createWebSkillApi as pn, RunTraceFilter as pt, LifecycleListener as q, toLlmToolSpec as qn, TraceRecorder as qt, ASK_USER_TOOL as r, UserProfileLimits as rn, RefineUserProfileInput as rt, AgentLoopConfig as s, WebSkillRuntimeDeps as sn, RunSnapshot as st, ALLOWED_TOOLS_EXCLUSION_REASON as t, UserProfileEntry as tn, RUN_SNAPSHOT_SCHEMA_VERSION as tt, AnthropicClientConfig as u, bridgeError as un, RunTerminationReason as ut, BridgeCapability as v, extractUiSpecEvents as vn, RuntimeRun as vt, EMPTY_USER_PROFILE as w, listSkillScripts as wn, ScriptExecutor as wt, CapabilityApproval as x, fromVercelStreamPart as xn, SESSION_SCHEMA_VERSION as xt, BridgeRequest as y, formatSkillScriptManifest as yn, RuntimeSession as yt, HookRunnerOptions as z, renderUserProfileContext as zn, TodoTraceEvent as zt };
1632
+ export { READ_SKILL_FILE_INPUT_SCHEMA as $, validateUiSpecEvent as $n, USER_PROFILE_NO_INVENTION_RULE as $t, FS_SESSION_PAGE_SIZE as A, networkPolicyLibSource as An, SessionRecord as At, HookRunnerOptions as B, readUserProfile as Bn, TerminalLifecycleData as Bt, DEFAULT_LOOP_LIMITS as C, fromVercelResult as Cn, SESSION_SCHEMA_VERSION as Ct, ExecuteLifecycleData as D, listSkillScripts as Dn, SerializingMemoryStore as Dt, EventBus as E, isUnsupportedRunSnapshot as En, ScriptExecutor as Et, FsSessionStore as F, parseBridgeRequest as Fn, SkillRouter as Ft, LifecycleEventInit as G, schemaSourceLabel as Gn, ToolResolution as Gt, IntegrityVerdict as H, renderUserProfileContext as Hn, TodoTraceEvent as Ht, FullDisclosureRouter as I, parseUserProfileExport as In, SkillScriptDescriptor as It, LifecycleListener as J, summarizeToolCalls as Jn, TraceEvent as Jt, LifecycleHook as K, schemaToForm as Kn, ToolResult as Kt, GoogleGenAiClient as L, partsToText as Ln, SkillScriptSchemaSource as Lt, FsMemoryStore as M, normalizeErrorCode as Mn, SkillFailureReport as Mt, FsRunSnapshotStore as N, normalizeToolContent as Nn, SkillIntegrityGuard as Nt, ExternalSkillProvider as O, mergeCatalogEntries as On, SessionListPage as Ot, FsRunTraceStore as P, normalizeToolError as Pn, SkillOutcomeReporter as Pt, ProgressiveRouter as Q, toVercelToolSpecs as Qn, USER_PROFILE_KEY as Qt, GoogleGenAiClientConfig as R, readBehaviorRecords as Rn, SkillStateGuard as Rt, CapabilityMode as S, formatSkillScriptManifest as Sn, RuntimeSessionHandle as St, EMPTY_USER_PROFILE as T, isNetworkAllowed as Tn, ScriptExecutionContext as Tt, InteractLifecycleData as U, resolveToolName as Un, ToolContent as Ut, InstalledSkillManifest as V, refineUserProfile as Vn, TextualToolContent as Vt, LifecycleEvent as W, sampleBehaviorRecords as Wn, ToolDefinition as Wt, OpenAiCompatibleClient as X, toLlmToolSpec as Xn, TraceRecorder as Xt, NetworkPolicy as Y, textParts as Yn, TraceEventType as Yt, OpenAiCompatibleClientConfig as Z, toRecordDigests as Zn, USER_PROFILE_EXPORT_VERSION as Zt, BridgeCapabilities as _, diffUserProfile as _n, RunTraceStore as _t, ActivateLifecycleData as a, UserProfileExport as an, RouteLifecycleData as at, BridgeResponse as b, extractTodoTraceEvents as bn, RuntimeRun as bt, AgentLoopDeps as c, WebSkillApi as cn, RunResult as ct, ApprovalDecision as d, appendBehaviorRecords as dn, RunSnapshotStore as dt, USER_PROFILE_PROMPT_HEADER as en, validateUiSpecNode as er, READ_SKILL_FILE_TOOL as et, ApprovalScope as f, applyUserProfileImport as fn, RunTerminationReason as ft, BehaviorScene as g, createWebSkillApi as gn, RunTraceMetrics as gt, BehaviorRecordKind as h, createScriptContext as hn, RunTraceFilter as ht, ASK_USER_TOOL_NAME as i, UserProfileEntry as in, RefineUserProfileInput as it, FsArtifactStore as j, networkUrlHost as jn, SessionStore as jt, ExternalToolSource as k, mergeProfileEntries as kn, SessionMeta as kt, AnthropicClient as l, WebSkillRuntime as ln, RunSnapshot as lt, BehaviorRecord as m, buildRenderResult as mn, RunTraceFile as mt, ASK_USER_INPUT_SCHEMA as n, UnsupportedRunSnapshot as nn, RUN_SNAPSHOT_SCHEMA_VERSION as nt, AgentLoop as o, UserProfileLimits as on, RouteResult as ot, BEHAVIOR_RECORDS_KEY as p, bridgeError as pn, RunToolCall as pt, LifecycleHookContext as q, scriptToolName as qn, TraceClock as qt, ASK_USER_TOOL as r, UserProfile as rn, RUN_TRACE_SCHEMA_VERSION as rt, AgentLoopConfig as s, VercelToolSpec as sn, RunLimitErrorDetails as st, ALLOWED_TOOLS_EXCLUSION_REASON as t, USER_PROFILE_REFINE_PROMPT as tn, READ_SKILL_FILE_TOOL_NAME as tt, AnthropicClientConfig as u, WebSkillRuntimeDeps as un, RunSnapshotListEntry as ut, BridgeCapability as v, exportUserProfile as vn, RunTraceSummary as vt, DEFAULT_USER_PROFILE_LIMITS as w, fromVercelStreamPart as wn, SchemaInferer as wt, CapabilityApproval as x, extractUiSpecEvents as xn, RuntimeSession as xt, BridgeRequest as y, extractChartSpec as yn, RuntimePhase as yt, HookRunner as z, readProfileEntries as zn, SkillSuccessReport as zt };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
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-4pg-qp_I-Gq63X8Oa.js";
2
- import { $ as READ_SKILL_FILE_TOOL, $t as UnsupportedRunSnapshot, A as FsArtifactStore, An as normalizeToolContent, At as SkillFailureReport, B as InstalledSkillManifest, Bn as resolveToolName, Bt as ToolContent, C as DEFAULT_USER_PROFILE_LIMITS, Cn as isUnsupportedRunSnapshot, Ct as ScriptExecutionContext, D as ExternalSkillProvider, Dn as networkPolicyLibSource, Dt as SessionMeta, E as ExecuteLifecycleData, En as mergeProfileEntries, Et as SessionListPage, F as FullDisclosureRouter, Fn as readBehaviorRecords, Ft as SkillScriptSchemaSource, G as LifecycleHook, Gn as summarizeToolCalls, Gt as TraceEvent, H as InteractLifecycleData, Hn as schemaSourceLabel, Ht as ToolResolution, I as GoogleGenAiClient, In as readProfileEntries, It as SkillStateGuard, J as NetworkPolicy, Jn as toRecordDigests, Jt as USER_PROFILE_EXPORT_VERSION, K as LifecycleHookContext, Kn as textParts, Kt as TraceEventType, L as GoogleGenAiClientConfig, Ln as readUserProfile, Lt as TerminalLifecycleData, M as FsRunSnapshotStore, Mn as parseBridgeRequest, Mt as SkillOutcomeReporter, N as FsRunTraceStore, Nn as parseUserProfileExport, Nt as SkillRouter, O as ExternalToolSource, On as networkUrlHost, Ot as SessionRecord, P as FsSessionStore, Pn as partsToText, Pt as SkillScriptDescriptor, Q as READ_SKILL_FILE_INPUT_SCHEMA, Qt as USER_PROFILE_REFINE_PROMPT, R as HookRunner, Rn as refineUserProfile, Rt as TextualToolContent, S as CapabilityMode, Sn as isNetworkAllowed, St as SchemaInferer, T as EventBus, Tn as mergeCatalogEntries, Tt as SerializingMemoryStore, U as LifecycleEvent, Un as schemaToForm, Ut as ToolResult, V as IntegrityVerdict, Vn as sampleBehaviorRecords, Vt as ToolDefinition, W as LifecycleEventInit, Wn as scriptToolName, Wt as TraceClock, X as OpenAiCompatibleClientConfig, Xn as validateUiSpecEvent, Xt as USER_PROFILE_NO_INVENTION_RULE, Y as OpenAiCompatibleClient, Yn as toVercelToolSpecs, Yt as USER_PROFILE_KEY, Z as ProgressiveRouter, Zn as validateUiSpecNode, Zt as USER_PROFILE_PROMPT_HEADER, _ as BridgeCapabilities, _n as extractTodoTraceEvents, _t as RuntimePhase, a as ActivateLifecycleData, an as WebSkillApi, at as RouteResult, b as BridgeResponse, bn as fromVercelResult, bt as RuntimeSessionHandle, c as AgentLoopDeps, cn as appendBehaviorRecords, ct as RunSnapshotListEntry, d as ApprovalDecision, dn as buildRenderResult, dt as RunToolCall, en as UserProfile, et as READ_SKILL_FILE_TOOL_NAME, f as ApprovalScope, fn as createScriptContext, ft as RunTraceFile, g as BehaviorScene, gn as extractChartSpec, gt as RunTraceSummary, h as BehaviorRecordKind, hn as exportUserProfile, ht as RunTraceStore, i as ASK_USER_TOOL_NAME, in as VercelToolSpec, it as RouteLifecycleData, j as FsMemoryStore, jn as normalizeToolError, jt as SkillIntegrityGuard, k as FS_SESSION_PAGE_SIZE, kn as normalizeErrorCode, kt as SessionStore, l as AnthropicClient, ln as applyUserProfileImport, lt as RunSnapshotStore, m as BehaviorRecord, mn as diffUserProfile, mt as RunTraceMetrics, n as ASK_USER_INPUT_SCHEMA, nn as UserProfileExport, nt as RUN_TRACE_SCHEMA_VERSION, o as AgentLoop, on as WebSkillRuntime, ot as RunResult, p as BEHAVIOR_RECORDS_KEY, pn as createWebSkillApi, pt as RunTraceFilter, q as LifecycleListener, qn as toLlmToolSpec, qt as TraceRecorder, r as ASK_USER_TOOL, rn as UserProfileLimits, rt as RefineUserProfileInput, s as AgentLoopConfig, sn as WebSkillRuntimeDeps, st as RunSnapshot, t as ALLOWED_TOOLS_EXCLUSION_REASON, tn as UserProfileEntry, tt as RUN_SNAPSHOT_SCHEMA_VERSION, u as AnthropicClientConfig, un as bridgeError, ut as RunTerminationReason, v as BridgeCapability, vn as extractUiSpecEvents, vt as RuntimeRun, w as EMPTY_USER_PROFILE, wn as listSkillScripts, wt as ScriptExecutor, x as CapabilityApproval, xn as fromVercelStreamPart, xt as SESSION_SCHEMA_VERSION, y as BridgeRequest, yn as formatSkillScriptManifest, yt as RuntimeSession, z as HookRunnerOptions, zn as renderUserProfileContext, zt as TodoTraceEvent } from "./index-C-KFAZoF.js";
3
- export { ALLOWED_TOOLS_EXCLUSION_REASON, 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, 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_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 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 SessionListPage, 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 SkillScriptDescriptor, type SkillScriptSchemaSource, type SkillSignature, type SkillSource, type SkillStateGuard, 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 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, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractTodoTraceEvents, extractUiSpecEvents, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, 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, signSkill, signaturePayloadBytes, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
1
+ import { $ as SkillCatalog, A as ArchiveLimits, At as escapeXml, B as MemoryFS, Bt as readSkillSignature, C as UiSpecDrafts, Ct as assertSafePathSegment, D as UiSurfaceActionRequest, Dt as checkDependencyCycles, E as UiSpecSnapshot, Et as buildManifest, F as FileStat, Ft as messageOf, G as SKILLS_LOCKFILE, Gt as signSkill, H as PageQuery, Ht as renderCatalogJson, I as FileSystemProvider, It as normalizePath, J as SKILL_NAME_PATTERN, Jt as validateSkills, K as SKILL_MANIFEST_FILE, Kt as signaturePayloadBytes, L as FsTrustedKeyStore, Lt as parseSkillMarkdown, M as CryptoKeyLike, Mt as isValidSkillName, N as DEFAULT_ARCHIVE_LIMITS, Nt as jsonRenderer, O as UiSurfaceActionResponse, Ot as checkSkillRules, P as DiscoveryResult, Pt as keyIdOf, Q as SignatureVerdict, R as JsonSchema, Rt as parseSkillPackManifest, S as UiSpecActionCapability, St as assertRemoteUrlAllowed, T as UiSpecPatch, Tt as buildCatalog, U as RemoteUrlPolicy, Ut as resolveArchiveLimits, V as Page, Vt as renderAvailableSkillsXml, W as SIGNATURE_SCHEMA_VERSION, Wt as resolveInsideRoot, X as SKILL_SIGNATURE_FILE, Xt as verifySkillSignature, Y as SKILL_PACK_FILE, Yt as verifyManifest, Z as SignatureAuditSink, Zt as xmlRenderer, _ as MemoryStore, _t as UnsignedPolicy, a as InteractionOrigin, at as SkillLocation, b as SkillCandidateMarker, bt as WebSkillError, c as InteractionResponse, ct as SkillMetadata, d as LlmContentPart, dt as SkillSignature, et as SkillCatalogEntry, f as LlmMessage, ft as SkillSource, g as LlmToolSpec, gt as UiSpecNode, h as LlmToolCall, ht as TrustedKeyStore, i as FormField, it as SkillIssue, j as CatalogRenderer, jt as exportSkills, k as extractSkillCandidate, kt as computeDigest, l as LlmClient, lt as SkillPackManifest, m as LlmStreamEvent, mt as TrustedKey, n as ArtifactStore, nt as SkillDocument, o as InteractionPolicy, ot as SkillManagerPort, p as LlmResponse, pt as SkillsLockfile, q as SKILL_NAME_MAX_LENGTH, qt as unzipWithLimits, r as ChartSpec, rt as SkillInstallSource, s as InteractionRequest, st as SkillManifest, t as Artifact, tt as SkillDiscovery, u as LlmCompleteInput, ut as SkillReader, v as RenderBlock, vt as ValidationReport, w as UiSpecEvent, wt as atomicWriteText, x as UiBridge, xt as WebSkillErrorCode, y as RenderResultRequest, yt as VerifyResult, z as MANIFEST_EXCLUDED_FILES, zt as readResponseWithLimit } from "./types-CcxRLdJG-DCXyw1US.js";
2
+ import { $ as READ_SKILL_FILE_INPUT_SCHEMA, $n as validateUiSpecEvent, $t as USER_PROFILE_NO_INVENTION_RULE, A as FS_SESSION_PAGE_SIZE, An as networkPolicyLibSource, At as SessionRecord, B as HookRunnerOptions, Bn as readUserProfile, Bt as TerminalLifecycleData, C as DEFAULT_LOOP_LIMITS, Cn as fromVercelResult, Ct as SESSION_SCHEMA_VERSION, D as ExecuteLifecycleData, Dn as listSkillScripts, Dt as SerializingMemoryStore, E as EventBus, En as isUnsupportedRunSnapshot, Et as ScriptExecutor, F as FsSessionStore, Fn as parseBridgeRequest, Ft as SkillRouter, G as LifecycleEventInit, Gn as schemaSourceLabel, Gt as ToolResolution, H as IntegrityVerdict, Hn as renderUserProfileContext, Ht as TodoTraceEvent, I as FullDisclosureRouter, In as parseUserProfileExport, It as SkillScriptDescriptor, J as LifecycleListener, Jn as summarizeToolCalls, Jt as TraceEvent, K as LifecycleHook, Kn as schemaToForm, Kt as ToolResult, L as GoogleGenAiClient, Ln as partsToText, Lt as SkillScriptSchemaSource, M as FsMemoryStore, Mn as normalizeErrorCode, Mt as SkillFailureReport, N as FsRunSnapshotStore, Nn as normalizeToolContent, Nt as SkillIntegrityGuard, O as ExternalSkillProvider, On as mergeCatalogEntries, Ot as SessionListPage, P as FsRunTraceStore, Pn as normalizeToolError, Pt as SkillOutcomeReporter, Q as ProgressiveRouter, Qn as toVercelToolSpecs, Qt as USER_PROFILE_KEY, R as GoogleGenAiClientConfig, Rn as readBehaviorRecords, Rt as SkillStateGuard, S as CapabilityMode, Sn as formatSkillScriptManifest, St as RuntimeSessionHandle, T as EMPTY_USER_PROFILE, Tn as isNetworkAllowed, Tt as ScriptExecutionContext, U as InteractLifecycleData, Un as resolveToolName, Ut as ToolContent, V as InstalledSkillManifest, Vn as refineUserProfile, Vt as TextualToolContent, W as LifecycleEvent, Wn as sampleBehaviorRecords, Wt as ToolDefinition, X as OpenAiCompatibleClient, Xn as toLlmToolSpec, Xt as TraceRecorder, Y as NetworkPolicy, Yn as textParts, Yt as TraceEventType, Z as OpenAiCompatibleClientConfig, Zn as toRecordDigests, Zt as USER_PROFILE_EXPORT_VERSION, _ as BridgeCapabilities, _n as diffUserProfile, _t as RunTraceStore, a as ActivateLifecycleData, an as UserProfileExport, at as RouteLifecycleData, b as BridgeResponse, bn as extractTodoTraceEvents, bt as RuntimeRun, c as AgentLoopDeps, cn as WebSkillApi, ct as RunResult, d as ApprovalDecision, dn as appendBehaviorRecords, dt as RunSnapshotStore, en as USER_PROFILE_PROMPT_HEADER, er as validateUiSpecNode, et as READ_SKILL_FILE_TOOL, f as ApprovalScope, fn as applyUserProfileImport, ft as RunTerminationReason, g as BehaviorScene, gn as createWebSkillApi, gt as RunTraceMetrics, h as BehaviorRecordKind, hn as createScriptContext, ht as RunTraceFilter, i as ASK_USER_TOOL_NAME, in as UserProfileEntry, it as RefineUserProfileInput, j as FsArtifactStore, jn as networkUrlHost, jt as SessionStore, k as ExternalToolSource, kn as mergeProfileEntries, kt as SessionMeta, l as AnthropicClient, ln as WebSkillRuntime, lt as RunSnapshot, m as BehaviorRecord, mn as buildRenderResult, mt as RunTraceFile, n as ASK_USER_INPUT_SCHEMA, nn as UnsupportedRunSnapshot, nt as RUN_SNAPSHOT_SCHEMA_VERSION, o as AgentLoop, on as UserProfileLimits, ot as RouteResult, p as BEHAVIOR_RECORDS_KEY, pn as bridgeError, pt as RunToolCall, q as LifecycleHookContext, qn as scriptToolName, qt as TraceClock, r as ASK_USER_TOOL, rn as UserProfile, rt as RUN_TRACE_SCHEMA_VERSION, s as AgentLoopConfig, sn as VercelToolSpec, st as RunLimitErrorDetails, t as ALLOWED_TOOLS_EXCLUSION_REASON, tn as USER_PROFILE_REFINE_PROMPT, tt as READ_SKILL_FILE_TOOL_NAME, u as AnthropicClientConfig, un as WebSkillRuntimeDeps, ut as RunSnapshotListEntry, v as BridgeCapability, vn as exportUserProfile, vt as RunTraceSummary, w as DEFAULT_USER_PROFILE_LIMITS, wn as fromVercelStreamPart, wt as SchemaInferer, x as CapabilityApproval, xn as extractUiSpecEvents, xt as RuntimeSession, y as BridgeRequest, yn as extractChartSpec, yt as RuntimePhase, z as HookRunner, zn as readProfileEntries, zt as SkillSuccessReport } from "./index-DkbABR43.js";
3
+ export { ALLOWED_TOOLS_EXCLUSION_REASON, 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, 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, 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 SessionListPage, type SessionMeta, type SessionRecord, type SessionStore, type SignatureAuditSink, type SignatureVerdict, 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 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, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, 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, signSkill, signaturePayloadBytes, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { A as parseSkillMarkdown, B as unzipWithLimits, C as escapeXml, D as keyIdOf, E as jsonRenderer, F as renderCatalogJson, H as verifyManifest, I as resolveArchiveLimits, L as resolveInsideRoot, M as readResponseWithLimit, N as readSkillSignature, O as messageOf, P as renderAvailableSkillsXml, R as signSkill, S as computeDigest, T as isValidSkillName, U as verifySkillSignature, V as validateSkills, W as xmlRenderer, _ as atomicWriteText, a as SIGNATURE_SCHEMA_VERSION, b as checkDependencyCycles, c as SKILL_NAME_MAX_LENGTH, d as SKILL_SIGNATURE_FILE, f as SkillDiscovery, g as assertSafePathSegment, h as assertRemoteUrlAllowed, i as MemoryFS, j as parseSkillPackManifest, k as normalizePath, l as SKILL_NAME_PATTERN, m as WebSkillError, n as FsTrustedKeyStore, o as SKILLS_LOCKFILE, p as SkillReader, r as MANIFEST_EXCLUDED_FILES, s as SKILL_MANIFEST_FILE, t as DEFAULT_ARCHIVE_LIMITS, u as SKILL_PACK_FILE, v as buildCatalog, w as exportSkills, x as checkSkillRules, y as buildManifest, z as signaturePayloadBytes } from "./dist-8oQRa8Xz.js";
2
2
  import { a as textParts, n as partsToText } from "./memoryArtifactStore-52Zn9npI-BMPYwvoy.js";
3
- import { $ as listSkillScripts, A as TraceRecorder, B as buildRenderResult, C as READ_SKILL_FILE_INPUT_SCHEMA, Ct as validateUiSpecEvent, D as RUN_TRACE_SCHEMA_VERSION, E as RUN_SNAPSHOT_SCHEMA_VERSION, F as USER_PROFILE_REFINE_PROMPT, G as extractChartSpec, H as createWebSkillApi, I as WebSkillRuntime, J as formatSkillScriptManifest, K as extractTodoTraceEvents, L as appendBehaviorRecords, M as USER_PROFILE_KEY, N as USER_PROFILE_NO_INVENTION_RULE, O as SESSION_SCHEMA_VERSION, P as USER_PROFILE_PROMPT_HEADER, Q as isUnsupportedRunSnapshot, R as applyUserProfileImport, S as ProgressiveRouter, St as toVercelToolSpecs, T as READ_SKILL_FILE_TOOL_NAME, U as diffUserProfile, V as createScriptContext, W as exportUserProfile, X as fromVercelStreamPart, Y as fromVercelResult, Z as isNetworkAllowed, _ as FsSessionStore, _t as schemaToForm, a as AgentLoop, at as normalizeToolContent, b as HookRunner, bt as toLlmToolSpec, c as CapabilityApproval, ct as parseUserProfileExport, d as EventBus, dt as readUserProfile, et as mergeCatalogEntries, f as FS_SESSION_PAGE_SIZE, ft as refineUserProfile, g as FsRunTraceStore, gt as schemaSourceLabel, h as FsRunSnapshotStore, ht as sampleBehaviorRecords, i as ASK_USER_TOOL_NAME, it as normalizeErrorCode, j as USER_PROFILE_EXPORT_VERSION, k as SerializingMemoryStore, l as DEFAULT_USER_PROFILE_LIMITS, lt as readBehaviorRecords, m as FsMemoryStore, mt as resolveToolName, n as ASK_USER_INPUT_SCHEMA, nt as networkPolicyLibSource, o as AnthropicClient, ot as normalizeToolError, p as FsArtifactStore, pt as renderUserProfileContext, q as extractUiSpecEvents, r as ASK_USER_TOOL, rt as networkUrlHost, s as BEHAVIOR_RECORDS_KEY, st as parseBridgeRequest, t as ALLOWED_TOOLS_EXCLUSION_REASON, tt as mergeProfileEntries, u as EMPTY_USER_PROFILE, ut as readProfileEntries, v as FullDisclosureRouter, vt as scriptToolName, w as READ_SKILL_FILE_TOOL, wt as validateUiSpecNode, x as OpenAiCompatibleClient, xt as toRecordDigests, y as GoogleGenAiClient, yt as summarizeToolCalls, z as bridgeError } from "./dist-DusANsrn.js";
3
+ import { $ as isNetworkAllowed, A as SerializingMemoryStore, B as bridgeError, C as ProgressiveRouter, Ct as toRecordDigests, D as RUN_SNAPSHOT_SCHEMA_VERSION, E as READ_SKILL_FILE_TOOL_NAME, Et as validateUiSpecNode, 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, P as USER_PROFILE_NO_INVENTION_RULE, Q as fromVercelStreamPart, R as appendBehaviorRecords, S as OpenAiCompatibleClient, St as toLlmToolSpec, T as READ_SKILL_FILE_TOOL, Tt as validateUiSpecEvent, U as createWebSkillApi, V as buildRenderResult, W as diffUserProfile, X as formatSkillScriptManifest, Y as extractUiSpecEvents, Z as fromVercelResult, _ as FsRunTraceStore, _t as sampleBehaviorRecords, a as AgentLoop, at as networkUrlHost, b as GoogleGenAiClient, bt as scriptToolName, c as CapabilityApproval, ct as normalizeToolError, d as EMPTY_USER_PROFILE, dt as readBehaviorRecords, et as isUnsupportedRunSnapshot, f as EventBus, ft as readProfileEntries, g as FsRunSnapshotStore, gt as resolveToolName, h as FsMemoryStore, ht as renderUserProfileContext, i as ASK_USER_TOOL_NAME, it as networkPolicyLibSource, j as TraceRecorder, k as SESSION_SCHEMA_VERSION, l as DEFAULT_LOOP_LIMITS, lt as parseBridgeRequest, m as FsArtifactStore, mt as refineUserProfile, n as ASK_USER_INPUT_SCHEMA, nt as mergeCatalogEntries, o as AnthropicClient, ot as normalizeErrorCode, p as FS_SESSION_PAGE_SIZE, pt as readUserProfile, q as extractSkillCandidate, r as ASK_USER_TOOL, rt as mergeProfileEntries, s as BEHAVIOR_RECORDS_KEY, st as normalizeToolContent, t as ALLOWED_TOOLS_EXCLUSION_REASON, tt as listSkillScripts, u as DEFAULT_USER_PROFILE_LIMITS, ut as parseUserProfileExport, v as FsSessionStore, vt as schemaSourceLabel, w as READ_SKILL_FILE_INPUT_SCHEMA, wt as toVercelToolSpecs, x as HookRunner, xt as summarizeToolCalls, y as FullDisclosureRouter, yt as schemaToForm, z as applyUserProfileImport } from "./dist-D0qW6e40.js";
4
4
 
5
- export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, AgentLoop, AnthropicClient, BEHAVIOR_RECORDS_KEY, CapabilityApproval, DEFAULT_ARCHIVE_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, 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, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractTodoTraceEvents, extractUiSpecEvents, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, 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, signSkill, signaturePayloadBytes, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
5
+ export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, 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, 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, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, 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, signSkill, signaturePayloadBytes, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
package/dist/mcp.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { I as JsonSchema, Q as SkillCatalogEntry, et as SkillDocument, g as LlmToolSpec } from "./types-4pg-qp_I-Gq63X8Oa.js";
2
- import { D as ExternalSkillProvider, O as ExternalToolSource, Tn as mergeCatalogEntries, Ut as ToolResult } from "./index-C-KFAZoF.js";
1
+ import { R as JsonSchema, et as SkillCatalogEntry, g as LlmToolSpec, nt as SkillDocument } from "./types-CcxRLdJG-DCXyw1US.js";
2
+ import { Kt as ToolResult, O as ExternalSkillProvider, On as mergeCatalogEntries, k as ExternalToolSource } from "./index-DkbABR43.js";
3
3
  import { Transport } from "@modelcontextprotocol/sdk/shared/transport.js";
4
4
  import { JSONRPCMessage } from "@modelcontextprotocol/sdk/types.js";
5
5
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -274,6 +274,108 @@ declare class McpRuntimePlugin implements ExternalToolSource {
274
274
  call(llmToolName: string, args: Record<string, unknown>): Promise<ToolResult>;
275
275
  }
276
276
  //#endregion
277
+ //#region src/remote/oauth.d.ts
278
+ /**
279
+ * S9 · MCP 授权注入协议(0.7.0 FR-22.1 ~ FR-22.3)。
280
+ *
281
+ * 本文件**不实现 OAuth**:发现、PKCE、`code` 交换、刷新全部由 `@modelcontextprotocol/sdk` 承担。
282
+ * 这里只提供 SDK 替我们决定不了的三样:宿主的 client 信息、令牌存储、把用户送到授权页。
283
+ */
284
+ /** 宿主预注册的 OAuth 客户端信息。不做动态注册(RFC 7591),因此此项必填。 @experimental */
285
+ interface McpOAuthClient {
286
+ clientId: string;
287
+ /** 机密客户端才有;浏览器端应留空 */
288
+ clientSecret?: string;
289
+ /** 授权服务器回跳地址,必须与预注册值一致 */
290
+ redirectUri: string;
291
+ scopes?: string[];
292
+ }
293
+ /** 令牌集合。access 与 refresh 分开传递,宿主可对二者采用不同存储策略。 @experimental */
294
+ interface McpOAuthTokens {
295
+ accessToken: string;
296
+ /** epoch ms;缺省表示不过期 */
297
+ expiresAt?: number;
298
+ refreshToken?: string;
299
+ tokenType?: string;
300
+ scope?: string;
301
+ }
302
+ /**
303
+ * 令牌存储。SDK 不提供默认实现(AC-22.7)——写不写盘、写到哪里由宿主决定。
304
+ * key 为端点名(`RemoteEndpointConfig.endpoint`),宿主据此隔离多端点。
305
+ * @experimental
306
+ */
307
+ interface McpOAuthTokenStore {
308
+ load(endpoint: string): Promise<McpOAuthTokens | undefined>;
309
+ save(endpoint: string, tokens: McpOAuthTokens): Promise<void>;
310
+ clear(endpoint: string): Promise<void>;
311
+ }
312
+ /** 一次授权握手的暂存内容:PKCE verifier 与 state 需要跨页面重定向存活。 @experimental */
313
+ interface McpOAuthHandshake {
314
+ codeVerifier: string;
315
+ state: string;
316
+ }
317
+ /** 握手暂存端口。与长期令牌的存储策略不同,因此独立成一个端口。 @experimental */
318
+ interface McpOAuthHandshakeStore {
319
+ save(endpoint: string, handshake: McpOAuthHandshake): Promise<void>;
320
+ load(endpoint: string): Promise<McpOAuthHandshake | undefined>;
321
+ clear(endpoint: string): Promise<void>;
322
+ }
323
+ /** 授权流程所处的阶段;进错误 `details`,不含任何凭据。 @experimental */
324
+ type McpOAuthStage = 'discover' | 'authorize' | 'exchange' | 'refresh';
325
+ /** @experimental */
326
+ interface McpOAuthConfig {
327
+ client: McpOAuthClient;
328
+ tokens: McpOAuthTokenStore;
329
+ handshake: McpOAuthHandshakeStore;
330
+ /**
331
+ * 把用户送到授权页。宿主决定形态(新窗口 / 系统浏览器)。
332
+ * 返回后流程挂起,等待宿主拿到 `code` 再调 `finishAuthorization`。
333
+ */
334
+ openAuthorization(url: URL): Promise<void> | void;
335
+ }
336
+ /** 显式的内存存储,供 examples 与测试使用。**不是缺省行为**——是宿主主动选的(AC-22.7)。 @experimental */
337
+ declare function createMemoryOAuthStores(): {
338
+ tokens: McpOAuthTokenStore;
339
+ handshake: McpOAuthHandshakeStore;
340
+ };
341
+ /** SDK 的 `OAuthTokens` 形状(结构化引用,避免在模块顶层 import 可选 peer 的类型) */
342
+ interface SdkTokens {
343
+ access_token: string;
344
+ token_type: string;
345
+ expires_in?: number;
346
+ refresh_token?: string;
347
+ scope?: string;
348
+ }
349
+ /**
350
+ * SDK `OAuthClientProvider` 的结构化对应物。
351
+ * 刻意不 implements SDK 接口:适配层只提供我们认可的成员,
352
+ * 尤其**不提供** `saveClientInformation`——那是动态客户端注册的入口(需求 §5)。
353
+ * @experimental
354
+ */
355
+ interface McpOAuthProvider {
356
+ readonly redirectUrl: string;
357
+ readonly clientMetadata: Record<string, unknown>;
358
+ state(): Promise<string>;
359
+ clientInformation(): Promise<{
360
+ client_id: string;
361
+ client_secret?: string;
362
+ }>;
363
+ tokens(): Promise<SdkTokens | undefined>;
364
+ saveTokens(tokens: SdkTokens): Promise<void>;
365
+ redirectToAuthorization(url: URL): Promise<void>;
366
+ saveCodeVerifier(codeVerifier: string): Promise<void>;
367
+ codeVerifier(): Promise<string>;
368
+ invalidateCredentials(scope: 'all' | 'client' | 'tokens' | 'verifier' | 'discovery'): Promise<void>;
369
+ }
370
+ /**
371
+ * `McpOAuthConfig` → SDK `OAuthClientProvider` 适配器。
372
+ *
373
+ * `state()` 与 `saveCodeVerifier()` 由 SDK 分两次调用(顺序上前者在先),
374
+ * 两者合成一条握手记录:谁先到都把当前已知部分写进去,回程时两项都在。
375
+ * @experimental
376
+ */
377
+ declare function createOAuthProvider(endpoint: string, config: McpOAuthConfig): McpOAuthProvider;
378
+ //#endregion
277
379
  //#region src/remote/connectRemoteEndpoint.d.ts
278
380
  interface RemoteEndpointConfig {
279
381
  /** registry 中的名字(endpoint:tool 引用) */
@@ -289,6 +391,23 @@ interface RemoteEndpointConfig {
289
391
  allowHttp?: boolean;
290
392
  /** 显式允许私有/环回/链路本地地址(SSRF 防护默认拒绝) */
291
393
  allowPrivateHosts?: boolean;
394
+ /**
395
+ * 使用 OAuth 2.1 授权码 + PKCE(0.7.0 FR-22.1)。
396
+ * 与 `headers` 可共存,但**不要**在 `headers` 里再手填 `Authorization`,会被覆盖。
397
+ * @experimental
398
+ */
399
+ oauth?: McpOAuthConfig;
400
+ }
401
+ /** 远程 endpoint 句柄 @experimental */
402
+ interface RemoteEndpointHandle {
403
+ close(): Promise<void>;
404
+ /**
405
+ * OAuth 回程:宿主拿到 authorization code 后调用,成功后 endpoint 才被注册。
406
+ * 未配置 `oauth` 时不挂载。
407
+ */
408
+ finishAuthorization?(code: string, state: string): Promise<void>;
409
+ /** 建连因需要用户授权而未完成:endpoint 未注册,等 `finishAuthorization` */
410
+ authorizationRequired?: true;
292
411
  }
293
412
  /**
294
413
  * 远程 MCP endpoint 装配:SDK 官方 StreamableHTTPClientTransport(默认)/
@@ -296,8 +415,6 @@ interface RemoteEndpointConfig {
296
415
  * endpoint:tool 解析、TTL+版本缓存、临时技能消费自动生效。
297
416
  * 返回 close 句柄:断开后 unregister(临时技能随既有生命周期自然消失)。
298
417
  */
299
- declare function connectRemoteEndpoint(registry: EndpointRegistry<McpClientLike>, config: RemoteEndpointConfig): Promise<{
300
- close(): Promise<void>;
301
- }>;
418
+ declare function connectRemoteEndpoint(registry: EndpointRegistry<McpClientLike>, config: RemoteEndpointConfig): Promise<RemoteEndpointHandle>;
302
419
  //#endregion
303
- export { type BrowserModelContextLike, EndpointRegistry, ExperimentalWebMcpAdapter, type McpClientLike, McpRuntimePlugin, McpToolResolver, MessageChannelTransport, type MessageChannelTransportOptions, type MessagePortLike, type RemoteEndpointConfig, type ServedSkill, TemporarySkillProvider, type TransportState, type WebMcpToolDescriptor, type WebMcpToolLike, catalogMerge, connectRemoteEndpoint, endpointToolLlmName, parseEndpointToolLlmName, parseWebMcpToolLlmName, serveSkillAsMcp, validateJsonRpcMessage, webMcpToolLlmName };
420
+ export { type BrowserModelContextLike, EndpointRegistry, ExperimentalWebMcpAdapter, type McpClientLike, type McpOAuthClient, type McpOAuthConfig, type McpOAuthHandshake, type McpOAuthHandshakeStore, type McpOAuthProvider, type McpOAuthStage, type McpOAuthTokenStore, type McpOAuthTokens, McpRuntimePlugin, McpToolResolver, MessageChannelTransport, type MessageChannelTransportOptions, type MessagePortLike, type RemoteEndpointConfig, type RemoteEndpointHandle, type ServedSkill, TemporarySkillProvider, type TransportState, type WebMcpToolDescriptor, type WebMcpToolLike, catalogMerge, connectRemoteEndpoint, createMemoryOAuthStores, createOAuthProvider, endpointToolLlmName, parseEndpointToolLlmName, parseWebMcpToolLlmName, serveSkillAsMcp, validateJsonRpcMessage, webMcpToolLlmName };