@steerable/pack-sdk 0.6.73 → 0.7.1
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/package.json +1 -1
- package/types/index.d.ts +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steerable/pack-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Scenario pack contract for @steerable/agent-shell (pure types, zero runtime). A scenario pack declares every extension a vertical scenario needs — services, tools, tables, skills, agent seeds, HTTP routes, renderer slots, branding — and the host composes the selected packs at build time.",
|
|
6
6
|
"license": "Apache-2.0",
|
package/types/index.d.ts
CHANGED
|
@@ -39,6 +39,17 @@ export type ToolMode =
|
|
|
39
39
|
|
|
40
40
|
export type ToolExposure = 'direct' | 'deferred' | 'hidden';
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* 会话与本机审批记录的分组。同一 `category` 共享「本会话」「始终」决定。
|
|
44
|
+
* `category` 匹配 `^[a-z][a-z0-9_]{0,63}$`,且不得与内置类别
|
|
45
|
+
* `network_egress`、`sandbox_escalation` 同名;宿主在装配时校验。
|
|
46
|
+
*/
|
|
47
|
+
export interface ToolApprovalSpec {
|
|
48
|
+
readonly category: string;
|
|
49
|
+
/** 审批卡上的类别显示名,由包提供本地化文本。 */
|
|
50
|
+
readonly label: Readonly<Record<string, string>>;
|
|
51
|
+
}
|
|
52
|
+
|
|
42
53
|
/**
|
|
43
54
|
* 工具执行上下文(与宿主 ToolExecContext 结构对齐的最小声明)。
|
|
44
55
|
* 宿主在分发时注入;包不应假设字段以外的任何宿主状态。
|
|
@@ -64,6 +75,8 @@ export interface ToolContribution {
|
|
|
64
75
|
readonly mode: ToolMode;
|
|
65
76
|
/** 缺省 'direct'。 */
|
|
66
77
|
readonly exposure?: ToolExposure;
|
|
78
|
+
/** 缺省时审批类别等于工具名。 */
|
|
79
|
+
readonly approval?: ToolApprovalSpec;
|
|
67
80
|
readonly handler: PackToolHandler;
|
|
68
81
|
}
|
|
69
82
|
|