@ziggs-ai/agent-sdk 0.43.7 → 0.43.9
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.43.9
|
|
6
|
+
|
|
7
|
+
## 0.43.8
|
|
8
|
+
|
|
9
|
+
- Uses api-client 0.39.4: agents can ask for a send grant (`access_request` with `scopeKind: "contact"`).
|
|
10
|
+
|
|
5
11
|
## 0.43.7
|
|
6
12
|
|
|
7
13
|
- Message wakes retain the backend's authorized causal predecessors by default, so explicitly linked follow-ups can refer to earlier messages without a quoted reply in the interface. Explicit minimal reads still use only the trigger, and history never changes the selected task or agreement.
|
|
@@ -389,14 +389,16 @@ ${this._renderDecisionSchemaFromActions(actions, senderMeta, ctxObj, omitMessage
|
|
|
389
389
|
}
|
|
390
390
|
_renderDecisionSchemaFromActions(actions, senderMeta, ctxObj, omitMessage) {
|
|
391
391
|
const lines = ['<decision_schema>'];
|
|
392
|
-
|
|
392
|
+
// No reasoning field: asking the model to write out its reasoning is
|
|
393
|
+
// refused by some providers as reasoning extraction, which fails the turn.
|
|
394
|
+
lines.push('Return ONE JSON object.');
|
|
393
395
|
lines.push('Set "action" to exactly one of the action names below.');
|
|
394
396
|
lines.push('Name "receiverId" only when you mean a specific recipient. Leave it out to write back in this room; an answer without one is sent without one.');
|
|
395
397
|
lines.push('Message text is rendered as markdown (CommonMark + GFM). You MAY use **bold**, *italic*, `code`, fenced code blocks, lists, links, and tables when they improve clarity — plain text is also fine.\n');
|
|
396
398
|
const pendingProposals = (ctxObj.agreements || []).filter((a) => a.proposal?.status === 'pending' && (a.proposedToIsYou || isBroadcastTarget(a.parties?.proposedTo?.principal)));
|
|
397
399
|
if (pendingProposals.length > 0) {
|
|
398
400
|
lines.push(`PRIORITY: You have ${pendingProposals.length} pending proposal(s) directed at you. Respond BEFORE other actions.`);
|
|
399
|
-
lines.push(`{"
|
|
401
|
+
lines.push(`{"action": "<action_bound_to_agreement_respond>", "args": {"agreementId": "<id>", "action": "approve|reject"}}\n`);
|
|
400
402
|
}
|
|
401
403
|
for (const [name, actionDef] of Object.entries(actions)) {
|
|
402
404
|
lines.push(`─── "${name}" ───`);
|
|
@@ -409,7 +411,7 @@ ${this._renderDecisionSchemaFromActions(actions, senderMeta, ctxObj, omitMessage
|
|
|
409
411
|
const boundTool = actionDef.tool ?? null;
|
|
410
412
|
if (boundTool) {
|
|
411
413
|
lines.push(`Tool: ${boundTool}`);
|
|
412
|
-
lines.push(`Response: {"
|
|
414
|
+
lines.push(`Response: {"action": "${name}", "args": {...}}`);
|
|
413
415
|
}
|
|
414
416
|
else {
|
|
415
417
|
lines.push(this._buildActionSchema(name, omitMessage));
|
|
@@ -429,12 +431,12 @@ ${this._renderDecisionSchemaFromActions(actions, senderMeta, ctxObj, omitMessage
|
|
|
429
431
|
}
|
|
430
432
|
_buildActionSchema(name, omitMessage) {
|
|
431
433
|
if (name === 'wait') {
|
|
432
|
-
return `Response: {"
|
|
434
|
+
return `Response: {"action": "${name}"}`;
|
|
433
435
|
}
|
|
434
436
|
if (omitMessage) {
|
|
435
|
-
return `Response: {"
|
|
437
|
+
return `Response: {"action": "${name}"}`;
|
|
436
438
|
}
|
|
437
|
-
return `Response: {"
|
|
439
|
+
return `Response: {"action": "${name}", "message": "..."}`;
|
|
438
440
|
}
|
|
439
441
|
_getSenderMeta(event, ctxObj) {
|
|
440
442
|
const ev = event;
|
|
@@ -23,7 +23,7 @@ export interface ThinkingDefaults {
|
|
|
23
23
|
export declare const DEFAULT_WAIT_PROMPT: Readonly<{
|
|
24
24
|
instruction: "Do nothing - wait for the next event.";
|
|
25
25
|
when: "No action is needed, you are waiting for external input, or you should pause without repeating yourself.";
|
|
26
|
-
format: "{\"
|
|
26
|
+
format: "{\"action\": \"wait\"}";
|
|
27
27
|
}>;
|
|
28
28
|
export declare function thinkingDefaults(opts: {
|
|
29
29
|
initial: string;
|
package/dist/runtime/defaults.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const DEFAULT_WAIT_PROMPT = Object.freeze({
|
|
2
2
|
instruction: 'Do nothing - wait for the next event.',
|
|
3
3
|
when: 'No action is needed, you are waiting for external input, or you should pause without repeating yourself.',
|
|
4
|
-
format: '{"
|
|
4
|
+
format: '{"action": "wait"}',
|
|
5
5
|
});
|
|
6
6
|
export function thinkingDefaults(opts) {
|
|
7
7
|
const { initial } = opts;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ziggs-ai/agent-sdk",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.9",
|
|
4
4
|
"description": "Agent framework SDK for building autonomous agents on the Ziggs platform",
|
|
5
5
|
"homepage": "https://ziggsai.com/docs",
|
|
6
6
|
"bugs": {
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"@anthropic-ai/claude-agent-sdk": "^0.3.284",
|
|
31
31
|
"@anthropic-ai/sdk": "^0.110.0",
|
|
32
32
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
33
|
-
"@ziggs-ai/api-client": "0.39.
|
|
34
|
-
"@ziggs-ai/contracts": "0.
|
|
33
|
+
"@ziggs-ai/api-client": "0.39.4",
|
|
34
|
+
"@ziggs-ai/contracts": "0.45.0",
|
|
35
35
|
"ajv": "^8.17.1",
|
|
36
36
|
"dotenv": "^17.2.3",
|
|
37
37
|
"openai": "^4.0.0",
|