@inkeep/agents-cli 0.0.0-dev-20260212021905 → 0.0.0-dev-20260212035036

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.
@@ -114,11 +114,29 @@ function generateSubAgentDefinition(agentId, agentData, style = DEFAULT_STYLE, r
114
114
  if (!toolVarName) throw new Error(`Failed to resolve variable name for tool: ${toolId} (tried both 'tools' and 'functionTools' types)`);
115
115
  const hasToolSelection = toolRelation.toolSelection && toolRelation.toolSelection.length > 0;
116
116
  const hasHeaders = toolRelation.headers && Object.keys(toolRelation.headers).length > 0;
117
- if (hasToolSelection || hasHeaders) {
117
+ const hasToolPolicies = toolRelation.toolPolicies && Object.keys(toolRelation.toolPolicies).length > 0;
118
+ if (hasToolSelection || hasHeaders || hasToolPolicies) {
118
119
  const configLines = [];
119
- if (hasToolSelection) {
120
- const selectedToolsStr = JSON.stringify(toolRelation.toolSelection);
121
- configLines.push(`selectedTools: ${selectedToolsStr}`);
120
+ if (hasToolSelection || hasToolPolicies) {
121
+ const toolNames = toolRelation.toolSelection || [];
122
+ const policies = toolRelation.toolPolicies || {};
123
+ const selections = [];
124
+ for (const name of toolNames) {
125
+ const policy = policies[name];
126
+ if (policy?.needsApproval !== void 0) selections.push({
127
+ name,
128
+ needsApproval: policy.needsApproval
129
+ });
130
+ else selections.push(name);
131
+ }
132
+ for (const [name, policy] of Object.entries(policies)) if (!toolNames.includes(name) && policy?.needsApproval !== void 0) selections.push({
133
+ name,
134
+ needsApproval: policy.needsApproval
135
+ });
136
+ if (selections.length > 0) {
137
+ const selectedToolsStr = JSON.stringify(selections);
138
+ configLines.push(`selectedTools: ${selectedToolsStr}`);
139
+ }
122
140
  }
123
141
  if (hasHeaders) {
124
142
  const headersStr = JSON.stringify(toolRelation.headers);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-cli",
3
- "version": "0.0.0-dev-20260212021905",
3
+ "version": "0.0.0-dev-20260212035036",
4
4
  "description": "Inkeep CLI tool",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -40,8 +40,8 @@
40
40
  "tsx": "^4.20.5",
41
41
  "yaml": "^2.7.0",
42
42
  "zod": "^4.3.6",
43
- "@inkeep/agents-core": "^0.0.0-dev-20260212021905",
44
- "@inkeep/agents-sdk": "^0.0.0-dev-20260212021905"
43
+ "@inkeep/agents-core": "^0.0.0-dev-20260212035036",
44
+ "@inkeep/agents-sdk": "^0.0.0-dev-20260212035036"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/degit": "^2.8.6",
@@ -52,7 +52,7 @@
52
52
  "vitest": "^3.2.4"
53
53
  },
54
54
  "peerDependencies": {
55
- "@inkeep/agents-manage-ui": "0.0.0-dev-20260212021905"
55
+ "@inkeep/agents-manage-ui": "0.0.0-dev-20260212035036"
56
56
  },
57
57
  "publishConfig": {
58
58
  "access": "public",