@prisflow/proactiveai-plugin-types 0.2.0 → 0.3.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/index.d.ts +8 -0
- package/package.json +5 -3
package/index.d.ts
CHANGED
|
@@ -125,6 +125,10 @@ export interface SilentToolDef {
|
|
|
125
125
|
run: (input: Record<string, unknown>, meta: ToolCallMeta) => ToolResult | Promise<ToolResult>
|
|
126
126
|
silent: true
|
|
127
127
|
transformPrompt?: undefined
|
|
128
|
+
/** 收轮引擎化:执行 + transformPrompt 完成后,引擎直接收轮(等同 host_yield),
|
|
129
|
+
* 不再以 instruction 回喂 LLM。剧情类工具专用——收轮由引擎保证,不依赖模型自觉。
|
|
130
|
+
* 需宿主 ≥ 0.6.3。 */
|
|
131
|
+
autoYield?: boolean
|
|
128
132
|
}
|
|
129
133
|
|
|
130
134
|
/** 非静默工具:执行后产生事件入总线,必须提供 transformPrompt。 */
|
|
@@ -135,6 +139,10 @@ export interface NonSilentToolDef {
|
|
|
135
139
|
run: (input: Record<string, unknown>, meta: ToolCallMeta) => ToolResult | Promise<ToolResult>
|
|
136
140
|
silent?: false
|
|
137
141
|
transformPrompt: (result: ToolResult) => ToolPromptResult
|
|
142
|
+
/** 收轮引擎化:执行 + transformPrompt 完成后,引擎直接收轮(等同 host_yield),
|
|
143
|
+
* 不再以 instruction 回喂 LLM。剧情类工具专用——收轮由引擎保证,不依赖模型自觉。
|
|
144
|
+
* 需宿主 ≥ 0.6.3。 */
|
|
145
|
+
autoYield?: boolean
|
|
138
146
|
}
|
|
139
147
|
|
|
140
148
|
/** 工具定义 —— 注册时需满足对应的 silent/transformPrompt 约束。 */
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
{
|
|
2
2
|
"name": "@prisflow/proactiveai-plugin-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "ProactiveAI 宿主插件 API 的类型契约(纯类型,无运行时代码)。插件开发者通过该包获得类型提示与编译检查。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
7
7
|
"types": "index.d.ts",
|
|
8
|
-
"files": [
|
|
8
|
+
"files": [
|
|
9
|
+
"index.d.ts"
|
|
10
|
+
],
|
|
9
11
|
"scripts": {
|
|
10
12
|
"check": "tsc --noEmit"
|
|
11
13
|
},
|