@ziggs-ai/agent-sdk 0.35.0 → 0.36.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/dist/brain/hostedToolSurface.js +12 -16
- package/package.json +2 -2
|
@@ -18,21 +18,23 @@ import { defineTool, toolName } from '../tools/defineTool.js';
|
|
|
18
18
|
*/
|
|
19
19
|
const HAND_LANE = {
|
|
20
20
|
context_snapshot: 'read-only',
|
|
21
|
-
|
|
21
|
+
// Sends, commitments, overwrites, cancellations and revocations are
|
|
22
|
+
// destructive; only private additive writes are plain writes.
|
|
23
|
+
chat_send: 'destructive',
|
|
22
24
|
wake_at: 'write',
|
|
23
|
-
agreement_propose: '
|
|
24
|
-
agreement_subcontract: '
|
|
25
|
-
agreement_respond: '
|
|
26
|
-
agreement_counter: '
|
|
25
|
+
agreement_propose: 'destructive',
|
|
26
|
+
agreement_subcontract: 'destructive',
|
|
27
|
+
agreement_respond: 'destructive',
|
|
28
|
+
agreement_counter: 'destructive',
|
|
27
29
|
agreement_get: 'read-only',
|
|
28
30
|
agreement_revoke: 'destructive',
|
|
29
|
-
agreement_fulfill: '
|
|
30
|
-
task_set_result: '
|
|
31
|
-
task_update_plan_step: '
|
|
31
|
+
agreement_fulfill: 'destructive',
|
|
32
|
+
task_set_result: 'destructive',
|
|
33
|
+
task_update_plan_step: 'destructive',
|
|
32
34
|
task_create: 'write',
|
|
33
|
-
task_replace_plan: '
|
|
35
|
+
task_replace_plan: 'destructive',
|
|
34
36
|
mcp_tools_list: 'read-only',
|
|
35
|
-
mcp_tool_call: '
|
|
37
|
+
mcp_tool_call: 'destructive',
|
|
36
38
|
connection_list_grants: 'read-only',
|
|
37
39
|
};
|
|
38
40
|
const EVERYDAY = new Set(EVERYDAY_SDK_TOOLS);
|
|
@@ -60,9 +62,6 @@ function oneLine(description, name) {
|
|
|
60
62
|
return sentence.length > 180 ? `${sentence.slice(0, 177)}...` : sentence;
|
|
61
63
|
}
|
|
62
64
|
function callLine(name, lane, native) {
|
|
63
|
-
if (lane === 'destructive') {
|
|
64
|
-
return `call it by name only: ${name}; the dispatchers refuse it`;
|
|
65
|
-
}
|
|
66
65
|
const dispatcher = lane === 'read-only' ? 'tool_read' : 'tool_write';
|
|
67
66
|
if (native) {
|
|
68
67
|
return `call it by name: ${name}; ${dispatcher} { tool: "${name}", args } also works`;
|
|
@@ -82,9 +81,6 @@ function rowFor(tool) {
|
|
|
82
81
|
};
|
|
83
82
|
}
|
|
84
83
|
function refuseWrongLane(name, lane, via) {
|
|
85
|
-
if (lane === 'destructive') {
|
|
86
|
-
throw new Error(`${name} cannot be called through ${via}: it is irreversible, and it is loaded directly so the call names what it does. Call ${name} by name.`);
|
|
87
|
-
}
|
|
88
84
|
const readOnly = lane === 'read-only';
|
|
89
85
|
const askedRead = via === 'tool_read';
|
|
90
86
|
if (readOnly === askedRead)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ziggs-ai/agent-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "Agent framework SDK for building autonomous agents on the Ziggs platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@anthropic-ai/claude-agent-sdk": "^0.3.284",
|
|
27
27
|
"@anthropic-ai/sdk": "^0.110.0",
|
|
28
28
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
29
|
-
"@ziggs-ai/api-client": "0.
|
|
29
|
+
"@ziggs-ai/api-client": "0.35.0",
|
|
30
30
|
"ajv": "^8.17.1",
|
|
31
31
|
"dotenv": "^17.2.3",
|
|
32
32
|
"openai": "^4.0.0",
|