@onco-foundry/agent-template 0.2.0 → 0.2.2

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.
@@ -45,6 +45,12 @@ export type PromptManifestAdapter = {
45
45
  promptVersion: string;
46
46
  };
47
47
  };
48
+ /**
49
+ * 业务工具槽位的工具定义类型:与 SDK defineAgent 的 tools 形参同口径
50
+ * (Array<ToolDefinition<any, any>>)。各工具入参形状不同,ToolDefinition<unknown>
51
+ * 在 strictFunctionTypes 下接不住具体入参的工具(handler 逆变),按 SDK 口径放宽。
52
+ */
53
+ export type TemplateToolDefinition = ToolDefinition<any, any>;
48
54
  export type AgentTemplateDeclaration<I, O, C = undefined> = {
49
55
  /** kebab-case:能力名片名;spec 名由它派生(kebab→snake,id.replaceAll('-', '_'))。 */
50
56
  id: string;
@@ -65,7 +71,7 @@ export type AgentTemplateDeclaration<I, O, C = undefined> = {
65
71
  * 业务工具槽位(可选):按 context 构建工具,依赖(上下文身份、存储端口、
66
72
  * logger 等)经 context 在创建时绑定。工具与 SDK 注入的 submit_output 并存。
67
73
  */
68
- tools?: (context: C) => ToolDefinition[];
74
+ tools?: (context: C) => TemplateToolDefinition[];
69
75
  /**
70
76
  * prompt 资源形状适配(可选):资源目录不是平台 prompt manifest 形状时注入。
71
77
  * 缺省 = 平台形状(versionedManifestBaseShape + promptVersion/provenance/systemPrompt 引用),现状不变。
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { clampThinkingBudgetTokens, defineAgentTemplate, promptManifestSchema, type AgentTemplate, type AgentTemplateCard, type AgentTemplateDeclaration, type CreateTemplateAgentOptions, type PromptManifestAdapter, } from './agent_template.ts';
1
+ export { clampThinkingBudgetTokens, defineAgentTemplate, promptManifestSchema, type AgentTemplate, type AgentTemplateCard, type AgentTemplateDeclaration, type CreateTemplateAgentOptions, type PromptManifestAdapter, type TemplateToolDefinition, } from './agent_template.ts';
2
2
  export type { CapabilityDelegation } from '@onco-foundry/agent-runtime';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onco-foundry/agent-template",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -15,9 +15,9 @@
15
15
  "agent-lattice": "0.24.0",
16
16
  "zod": "^4.4.3",
17
17
  "@onco-foundry/agent-runtime": "0.2.1",
18
- "@onco-foundry/capability-registry": "0.1.1",
19
18
  "@onco-foundry/errors": "0.1.1",
20
- "@onco-foundry/resource-versioning": "0.1.1",
19
+ "@onco-foundry/resource-versioning": "0.2.0",
20
+ "@onco-foundry/capability-registry": "0.1.1",
21
21
  "@onco-foundry/trace-port": "0.3.1"
22
22
  },
23
23
  "publishConfig": {