@onco-foundry/agent-template 0.2.2 → 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.
@@ -104,6 +104,14 @@ export type CreateTemplateAgentOptions = {
104
104
  tracer?: Tracer;
105
105
  /** prompt 版本覆盖缝:指定版本目录名则跳过 current.json 指针,试跑/对照工具用。 */
106
106
  promptVersion?: string;
107
+ /**
108
+ * submit_output 提交后是否结束运行(agent-lattice 0.25.0 的 submitOutputEndTurn,仅 outputSchema 形态有意义)。
109
+ * 缺省不传 = SDK 默认 true:提交即收尾,委派链路与直接 run 的有界交付不变。
110
+ * 仅 human-facing 调试会话(playground)显式传 false:模型交付后继续用人话总结收尾。
111
+ * false 形态下 generic run 照样取 response.structuredResult(SDK 保证最后一次提交进 structuredResult);
112
+ * 委派链路不该传 false——委派要的是有界交付,不是继续闲聊。
113
+ */
114
+ readonly submitOutputEndTurn?: boolean;
107
115
  };
108
116
  export type AgentTemplate<I, O, C = undefined> = {
109
117
  /** 能力名片:{ name: id, kind: 'agent', summary, input, output },无 version(版本归场景,ADR-10)。 */
@@ -109,6 +109,10 @@ export const defineAgentTemplate = (declaration) => {
109
109
  // 无领域校验要过,交付契约直接交给 SDK:声明 outputSchema 后 SDK 注入
110
110
  // submit_output 工具,没提交就收尾会以 error_missing_output 失败。
111
111
  outputSchema: declaration.output,
112
+ // submit_output 提交后是否结束运行:没给就不设该字段,SDK 默认 true(提交即收尾)。
113
+ ...(options.submitOutputEndTurn === undefined
114
+ ? {}
115
+ : { submitOutputEndTurn: options.submitOutputEndTurn }),
112
116
  // 业务工具槽位:声明了才构建,依赖经 context 在创建时绑定;与 submit_output 并存。
113
117
  ...(declaration.tools === undefined ? {} : { tools: declaration.tools(context) }),
114
118
  tracer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onco-foundry/agent-template",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -12,13 +12,13 @@
12
12
  }
13
13
  },
14
14
  "dependencies": {
15
- "agent-lattice": "0.24.0",
15
+ "agent-lattice": "0.25.0",
16
16
  "zod": "^4.4.3",
17
- "@onco-foundry/agent-runtime": "0.2.1",
17
+ "@onco-foundry/agent-runtime": "0.2.2",
18
+ "@onco-foundry/capability-registry": "0.1.1",
18
19
  "@onco-foundry/errors": "0.1.1",
19
20
  "@onco-foundry/resource-versioning": "0.2.0",
20
- "@onco-foundry/capability-registry": "0.1.1",
21
- "@onco-foundry/trace-port": "0.3.1"
21
+ "@onco-foundry/trace-port": "0.3.2"
22
22
  },
23
23
  "publishConfig": {
24
24
  "access": "public"