@steerable/pack-sdk 0.6.53 → 0.6.55
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/README.md +1 -2
- package/package.json +2 -2
- package/types/index.d.ts +7 -25
package/README.md
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
Scenario pack contract for `@steerable/agent-shell` — pure types, zero runtime.
|
|
4
4
|
|
|
5
5
|
A scenario pack declares every extension a vertical scenario needs (services,
|
|
6
|
-
tools, tables, skills, agent seeds,
|
|
7
|
-
slots, branding), and the host composes the selected packs at build time. This
|
|
6
|
+
tools, tables, skills, agent seeds, HTTP routes, renderer slots, branding), and the host composes the selected packs at build time. This
|
|
8
7
|
package ships only `types/`; there is no runtime code.
|
|
9
8
|
|
|
10
9
|
License: Apache-2.0.
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steerable/pack-sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.55",
|
|
4
4
|
"type": "module",
|
|
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,
|
|
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",
|
|
7
7
|
"homepage": "https://steerableframework.com/",
|
|
8
8
|
"repository": {
|
package/types/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @steerable/pack-sdk —— 场景智能体包契约(纯类型,零运行时)。
|
|
3
3
|
*
|
|
4
4
|
* 一个「场景包」把一个垂直场景(如某行业的专业工具链……)需要的全部
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* 扩展声明集中在一处:Node 宿主服务/工具/表/技能/智能体种子/HTTP 路由、
|
|
6
|
+
* 渲染层插槽、品牌与打包覆盖。宿主(Tauri 监督的 Node 宿主与 BS
|
|
7
|
+
* headless server)按产品组装时选中的包集合,逐个槽位消费这些声明。
|
|
8
8
|
*
|
|
9
9
|
* 设计约束:
|
|
10
10
|
* - 本包是零依赖纯类型:不允许 import 宿主内部模块(tool-router、
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* - 槽位只开有真实场景代码论证的(既有场景包 diff 的并集),
|
|
14
14
|
* 不凭空膨胀。新槽位 = 新场景的真实需求驱动。
|
|
15
15
|
* - 组合发生在构建期:产品的 composition root 静态 import 自己的包;
|
|
16
|
-
*
|
|
16
|
+
* 渲染层不做运行时动态加载。
|
|
17
17
|
*
|
|
18
18
|
* 渲染层贡献类型在 './web' 子路径(依赖 React 类型,主进程侧勿引)。
|
|
19
19
|
*
|
|
@@ -69,7 +69,7 @@ export interface ToolContribution {
|
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* 主进程长驻领域服务(如 DomainService / DocumentEditService)。
|
|
72
|
-
* 宿主在装配期调用 create
|
|
72
|
+
* 宿主在装配期调用 create,把返回值交给包内工具/路由使用;
|
|
73
73
|
* 宿主不感知服务类型——包内部通过闭包共享。
|
|
74
74
|
*/
|
|
75
75
|
export interface ServiceFactory {
|
|
@@ -81,7 +81,7 @@ export interface ServiceFactory {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
export interface ServiceCreateContext {
|
|
84
|
-
/** 向用户面广播事件(
|
|
84
|
+
/** 向用户面广播事件(SSE 总线)。 */
|
|
85
85
|
broadcast: (channel: string, payload: unknown) => void;
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -142,14 +142,7 @@ export interface AgentSeed {
|
|
|
142
142
|
readonly previousIdentities?: readonly AgentSeedIdentity[];
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
/**
|
|
146
|
-
export interface IpcContribution {
|
|
147
|
-
readonly channel: string;
|
|
148
|
-
/** 参数为 renderer 经 preload 透传的序列化载荷。 */
|
|
149
|
-
readonly handler: (payload: unknown) => Promise<unknown> | unknown;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/** BS 模式 HTTP 路由贡献(/host/<packId>/* 命名空间,见 host/http-routes.ts)。 */
|
|
145
|
+
/** HTTP 路由贡献(/host/<packId>/* 命名空间,见 host/http-routes.ts)。 */
|
|
153
146
|
export interface HttpRouteContribution {
|
|
154
147
|
readonly method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
155
148
|
/** 路径模式,如 '/api/v2/ppt-edits/:id'。必须带包前缀路径段。 */
|
|
@@ -170,19 +163,9 @@ export interface MainContribution {
|
|
|
170
163
|
readonly migrations?: readonly MigrationContribution[];
|
|
171
164
|
readonly skills?: readonly SkillContribution[];
|
|
172
165
|
readonly agentSeeds?: readonly AgentSeed[];
|
|
173
|
-
readonly ipc?: readonly IpcContribution[];
|
|
174
166
|
readonly httpRoutes?: readonly HttpRouteContribution[];
|
|
175
167
|
}
|
|
176
168
|
|
|
177
|
-
/**
|
|
178
|
-
* preload 桥白名单:包在 window.electron 下挂 '<packId>' 命名空间。
|
|
179
|
-
* 具体桥接函数由包的 preload 模块实现;这里只声明命名空间占用,
|
|
180
|
-
* 宿主据此做 CSP/白名单装配。
|
|
181
|
-
*/
|
|
182
|
-
export interface PreloadContribution {
|
|
183
|
-
readonly namespace: string;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
169
|
/**
|
|
187
170
|
* 渲染层组件引用。主进程侧不依赖 React,这里用结构化最小类型;
|
|
188
171
|
* 渲染层注册表(apps/web)消费时收窄到具体组件类型。
|
|
@@ -263,7 +246,6 @@ export interface ScenarioPack {
|
|
|
263
246
|
readonly id: ScenarioId;
|
|
264
247
|
readonly brand: BrandSpec;
|
|
265
248
|
readonly main?: MainContribution;
|
|
266
|
-
readonly preload?: PreloadContribution;
|
|
267
249
|
readonly renderer?: RendererContribution;
|
|
268
250
|
readonly packaging?: PackagingSpec;
|
|
269
251
|
}
|