@ziggs-ai/agent-sdk 0.43.8 → 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,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.43.9
6
+
5
7
  ## 0.43.8
6
8
 
7
9
  - Uses api-client 0.39.4: agents can ask for a send grant (`access_request` with `scopeKind: "contact"`).
@@ -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
- lines.push('Return ONE JSON object. ALWAYS include "thought" as the FIRST field — briefly explain your reasoning before choosing an action.');
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(`{"thought": "...", "action": "<action_bound_to_agreement_respond>", "args": {"agreementId": "<id>", "action": "approve|reject"}}\n`);
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: {"thought": "...", "action": "${name}", "args": {...}}`);
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: {"thought": "...", "action": "${name}"}`;
434
+ return `Response: {"action": "${name}"}`;
433
435
  }
434
436
  if (omitMessage) {
435
- return `Response: {"thought": "...", "action": "${name}"}`;
437
+ return `Response: {"action": "${name}"}`;
436
438
  }
437
- return `Response: {"thought": "...", "action": "${name}", "message": "..."}`;
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: "{\"thought\": \"...\", \"action\": \"wait\"}";
26
+ format: "{\"action\": \"wait\"}";
27
27
  }>;
28
28
  export declare function thinkingDefaults(opts: {
29
29
  initial: string;
@@ -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: '{"thought": "...", "action": "wait"}',
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.8",
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": {