@link-assistant/agent 0.8.7 → 0.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/agent",
3
- "version": "0.8.7",
3
+ "version": "0.8.9",
4
4
  "description": "A minimal, public domain AI CLI agent compatible with OpenCode's JSON interface. Bun-only runtime.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -547,6 +547,18 @@ export namespace Session {
547
547
  return obj.reason;
548
548
  }
549
549
 
550
+ // Handle AI SDK unified/raw format: {unified: "tool-calls", raw: "tool_calls"}
551
+ // See: https://github.com/link-assistant/agent/issues/129
552
+ if (typeof obj.unified === 'string') {
553
+ if (Flag.OPENCODE_VERBOSE) {
554
+ log.debug(() => ({
555
+ message: 'toFinishReason extracted unified from object',
556
+ result: obj.unified,
557
+ }));
558
+ }
559
+ return obj.unified;
560
+ }
561
+
550
562
  // If we can't extract a specific field, return JSON representation
551
563
  if (Flag.OPENCODE_VERBOSE) {
552
564
  log.debug(() => ({