@myagentroam/agent 0.10.9 → 0.10.10

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.
@@ -586,7 +586,9 @@ export class OpenAiResponsesAdapter {
586
586
  }, modelStreamEventObservedAt(raw));
587
587
  completed = true;
588
588
  }
589
- else if (type === 'error' || type === 'response.failed') {
589
+ else if (type === 'error' ||
590
+ type === 'response.failed' ||
591
+ (event.type === undefined && event.error !== undefined)) {
590
592
  const topLevel = record(event.error);
591
593
  const nested = record(record(event.response).error);
592
594
  const code = boundedError(text(event.code) ??
@@ -594,7 +596,10 @@ export class OpenAiResponsesAdapter {
594
596
  text(topLevel.type) ??
595
597
  text(nested.code) ??
596
598
  text(nested.type), 80);
597
- const message = boundedError(text(event.message) ?? text(topLevel.message) ?? text(nested.message), 1_000);
599
+ const message = boundedError(text(event.message) ??
600
+ text(topLevel.message) ??
601
+ text(nested.message) ??
602
+ text(event.error), 1_000);
598
603
  const status = upstreamHttpStatus(event.status, topLevel.status, record(event.response).status, nested.status);
599
604
  const connectionLimit = this.configuration.responsesTransport?.transport === 'WEBSOCKET' &&
600
605
  isWebSocketConnectionLimitCode(code);
@@ -34,6 +34,6 @@ export class ModelGenerationTiming {
34
34
  this.completed = true;
35
35
  }
36
36
  get durationMs() {
37
- return this.completed && this.valid && this.duration >= 1 ? this.duration : undefined;
37
+ return this.completed && this.valid && this.duration >= 1_000 ? this.duration : undefined;
38
38
  }
39
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/agent",
3
- "version": "0.10.9",
3
+ "version": "0.10.10",
4
4
  "description": "Embeddable MAR coding agent SDK and CLI.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",