@ai-matrx/agents 0.43.18 → 0.43.19
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 +6 -0
- package/dist/content-transfer/index.cjs +26 -10
- package/dist/content-transfer/index.cjs.map +1 -1
- package/dist/content-transfer/index.js +26 -10
- package/dist/content-transfer/index.js.map +1 -1
- package/dist/content-transfer/react/index.cjs +26 -10
- package/dist/content-transfer/react/index.cjs.map +1 -1
- package/dist/content-transfer/react/index.js +26 -10
- package/dist/content-transfer/react/index.js.map +1 -1
- package/dist/index.cjs +75 -74
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +75 -74
- package/dist/index.js.map +1 -1
- package/dist/{keys.generated-BzkXY1sO.d.cts → keys.generated-DX8nj5xZ.d.cts} +4 -4
- package/dist/{keys.generated-BzkXY1sO.d.ts → keys.generated-DX8nj5xZ.d.ts} +4 -4
- package/dist/mandates/index.cjs +2 -2
- package/dist/mandates/index.cjs.map +1 -1
- package/dist/mandates/index.d.cts +2 -2
- package/dist/mandates/index.d.ts +2 -2
- package/dist/mandates/index.js +2 -2
- package/dist/mandates/index.js.map +1 -1
- package/dist/matrx/index.cjs +75 -74
- package/dist/matrx/index.cjs.map +1 -1
- package/dist/matrx/index.d.cts +1 -1
- package/dist/matrx/index.d.ts +1 -1
- package/dist/matrx/index.js +75 -74
- package/dist/matrx/index.js.map +1 -1
- package/dist/portable/index.cjs +26 -10
- package/dist/portable/index.cjs.map +1 -1
- package/dist/portable/index.js +26 -10
- package/dist/portable/index.js.map +1 -1
- package/dist/portable/mcp.cjs +24 -10
- package/dist/portable/mcp.cjs.map +1 -1
- package/dist/portable/mcp.js +24 -10
- package/dist/portable/mcp.js.map +1 -1
- package/dist/react/index.cjs +60 -46
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +60 -46
- package/dist/react/index.js.map +1 -1
- package/mandates/snapshots/keys.0.43.19.json +653 -0
- package/package.json +4 -4
package/dist/matrx/index.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ import { ResilientFetchOptions } from '@ai-matrx/data/net';
|
|
|
5
5
|
import { MatrxStreamEnvelope, MatrxNdjsonIssue } from '../stream/ndjson.cjs';
|
|
6
6
|
import { v as MatrxRuntimeOperationEvent, a as FollowRuntimeOperationToEndOptions, u as MatrxRuntimeExecutionStatus, z as MatrxStreamCallOptions, t as MatrxRunHandle, l as MatrxJsonValue, k as MatrxJsonObject } from '../operations-C9QvBH_2.cjs';
|
|
7
7
|
export { F as FollowRuntimeOperationOptions, b as FollowRuntimeOperationToEndResult, M as MatrxAgentStartRequest, c as MatrxCancelResponse, d as MatrxChatMessage, e as MatrxCompletedRun, f as MatrxContextAnchor, g as MatrxConversationContinueRequest, h as MatrxConversationResumeRequest, i as MatrxConversationStart, j as MatrxEphemeralConversation, m as MatrxMandateStartRequest, n as MatrxOperationEventsPage, o as MatrxOperationFollowEvent, p as MatrxOperationStatusResponse, q as MatrxOperationsByLinkResponse, r as MatrxRequestScope, s as MatrxRunError, w as MatrxRuntimeOperationView, x as MatrxStoredConversationContinue, y as MatrxStoredConversationCreate, A as MatrxTurnFields, R as RunAgentToCompletionOptions, T as TERMINAL_MATRX_RUNTIME_STATUSES, B as cancelAgentRun, C as continueAgentConversation, D as continueEphemeralConversationStart, E as continueStoredConversationStart, G as followRuntimeOperationEvents, H as followRuntimeOperationToEnd, I as getRuntimeOperationStatus, J as getRuntimeOperationsByLink, K as listRuntimeOperationEvents, L as mintMatrxConversationId, N as newEphemeralConversationStart, O as newStoredConversationStart, P as rejoinRuntimeOperation, Q as resumeAgentConversation, S as runAgentToCompletion, U as startAgentRun, V as startMandateRun } from '../operations-C9QvBH_2.cjs';
|
|
8
|
-
import { M as MandateKey, D as DynamicMandateKey } from '../keys.generated-
|
|
8
|
+
import { M as MandateKey, D as DynamicMandateKey } from '../keys.generated-DX8nj5xZ.cjs';
|
|
9
9
|
import '../stream/sse.cjs';
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/matrx/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { ResilientFetchOptions } from '@ai-matrx/data/net';
|
|
|
5
5
|
import { MatrxStreamEnvelope, MatrxNdjsonIssue } from '../stream/ndjson.js';
|
|
6
6
|
import { v as MatrxRuntimeOperationEvent, a as FollowRuntimeOperationToEndOptions, u as MatrxRuntimeExecutionStatus, z as MatrxStreamCallOptions, t as MatrxRunHandle, l as MatrxJsonValue, k as MatrxJsonObject } from '../operations-C3iHFcnt.js';
|
|
7
7
|
export { F as FollowRuntimeOperationOptions, b as FollowRuntimeOperationToEndResult, M as MatrxAgentStartRequest, c as MatrxCancelResponse, d as MatrxChatMessage, e as MatrxCompletedRun, f as MatrxContextAnchor, g as MatrxConversationContinueRequest, h as MatrxConversationResumeRequest, i as MatrxConversationStart, j as MatrxEphemeralConversation, m as MatrxMandateStartRequest, n as MatrxOperationEventsPage, o as MatrxOperationFollowEvent, p as MatrxOperationStatusResponse, q as MatrxOperationsByLinkResponse, r as MatrxRequestScope, s as MatrxRunError, w as MatrxRuntimeOperationView, x as MatrxStoredConversationContinue, y as MatrxStoredConversationCreate, A as MatrxTurnFields, R as RunAgentToCompletionOptions, T as TERMINAL_MATRX_RUNTIME_STATUSES, B as cancelAgentRun, C as continueAgentConversation, D as continueEphemeralConversationStart, E as continueStoredConversationStart, G as followRuntimeOperationEvents, H as followRuntimeOperationToEnd, I as getRuntimeOperationStatus, J as getRuntimeOperationsByLink, K as listRuntimeOperationEvents, L as mintMatrxConversationId, N as newEphemeralConversationStart, O as newStoredConversationStart, P as rejoinRuntimeOperation, Q as resumeAgentConversation, S as runAgentToCompletion, U as startAgentRun, V as startMandateRun } from '../operations-C3iHFcnt.js';
|
|
8
|
-
import { M as MandateKey, D as DynamicMandateKey } from '../keys.generated-
|
|
8
|
+
import { M as MandateKey, D as DynamicMandateKey } from '../keys.generated-DX8nj5xZ.js';
|
|
9
9
|
import '../stream/sse.js';
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/matrx/index.js
CHANGED
|
@@ -1,77 +1,3 @@
|
|
|
1
|
-
// matrx/transport.ts
|
|
2
|
-
var MatrxApiError = class extends Error {
|
|
3
|
-
name = "MatrxApiError";
|
|
4
|
-
/** HTTP status of the failed response. */
|
|
5
|
-
status;
|
|
6
|
-
/** Machine code from the server body (`code`, or `detail.code`), when present. */
|
|
7
|
-
code;
|
|
8
|
-
/** The parsed server error body, verbatim (undefined when unparsable). */
|
|
9
|
-
serverDetail;
|
|
10
|
-
/** The request path the failure came from (server-relative). */
|
|
11
|
-
path;
|
|
12
|
-
constructor(args) {
|
|
13
|
-
super(
|
|
14
|
-
args.message ?? extractMatrxErrorMessage(args.serverDetail) ?? `HTTP ${args.status}`
|
|
15
|
-
);
|
|
16
|
-
this.status = args.status;
|
|
17
|
-
this.path = args.path;
|
|
18
|
-
this.serverDetail = args.serverDetail;
|
|
19
|
-
this.code = extractMatrxErrorCode(args.serverDetail);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
function isRecord(value) {
|
|
23
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
24
|
-
}
|
|
25
|
-
function nonBlankString(value) {
|
|
26
|
-
return typeof value === "string" && value.trim() ? value : void 0;
|
|
27
|
-
}
|
|
28
|
-
function extractMatrxErrorMessage(serverDetail) {
|
|
29
|
-
if (!isRecord(serverDetail)) return void 0;
|
|
30
|
-
const userMessage = nonBlankString(serverDetail.user_message);
|
|
31
|
-
if (userMessage) return userMessage;
|
|
32
|
-
const message = nonBlankString(serverDetail.message);
|
|
33
|
-
if (message) return message;
|
|
34
|
-
if (Array.isArray(serverDetail.details)) {
|
|
35
|
-
const messages = serverDetail.details.map((entry) => {
|
|
36
|
-
if (!isRecord(entry)) return void 0;
|
|
37
|
-
const detailMessage = nonBlankString(entry.message);
|
|
38
|
-
if (!detailMessage) return void 0;
|
|
39
|
-
const field = nonBlankString(entry.field);
|
|
40
|
-
return field ? `${field}: ${detailMessage}` : detailMessage;
|
|
41
|
-
}).filter((m) => typeof m === "string");
|
|
42
|
-
if (messages.length > 0) return messages.join("; ");
|
|
43
|
-
}
|
|
44
|
-
const detail = serverDetail.detail;
|
|
45
|
-
if (isRecord(detail)) {
|
|
46
|
-
const detailMessage = nonBlankString(detail.message) ?? nonBlankString(detail.user_message);
|
|
47
|
-
if (detailMessage) return detailMessage;
|
|
48
|
-
}
|
|
49
|
-
if (typeof detail === "string" && detail.trim()) return detail;
|
|
50
|
-
if (Array.isArray(detail)) {
|
|
51
|
-
const messages = detail.map(
|
|
52
|
-
(entry) => isRecord(entry) ? nonBlankString(entry.msg) : void 0
|
|
53
|
-
).filter((m) => typeof m === "string");
|
|
54
|
-
if (messages.length > 0) return messages.join("; ");
|
|
55
|
-
}
|
|
56
|
-
return void 0;
|
|
57
|
-
}
|
|
58
|
-
function extractMatrxErrorCode(serverDetail) {
|
|
59
|
-
if (!isRecord(serverDetail)) return null;
|
|
60
|
-
const topLevel = nonBlankString(serverDetail.code);
|
|
61
|
-
if (topLevel) return topLevel;
|
|
62
|
-
const detail = serverDetail.detail;
|
|
63
|
-
if (isRecord(detail)) {
|
|
64
|
-
const nested = nonBlankString(detail.code);
|
|
65
|
-
if (nested) return nested;
|
|
66
|
-
}
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// matrx/client.ts
|
|
71
|
-
import { isNetError as isNetError2 } from "@ai-matrx/data";
|
|
72
|
-
import { credentialToHeaders } from "@ai-matrx/data";
|
|
73
|
-
import { extractErrorMessage } from "@ai-matrx/data/net";
|
|
74
|
-
|
|
75
1
|
// matrx/backend-errors.ts
|
|
76
2
|
var BackendApiError = class extends Error {
|
|
77
3
|
/** Machine-readable error code */
|
|
@@ -377,6 +303,81 @@ function statusToCode(status) {
|
|
|
377
303
|
}
|
|
378
304
|
}
|
|
379
305
|
|
|
306
|
+
// matrx/transport.ts
|
|
307
|
+
var MatrxApiError = class extends Error {
|
|
308
|
+
name = "MatrxApiError";
|
|
309
|
+
/** HTTP status of the failed response. */
|
|
310
|
+
status;
|
|
311
|
+
/** Machine code from the server body (`code`, or `detail.code`), when present. */
|
|
312
|
+
code;
|
|
313
|
+
/** The parsed server error body, verbatim (undefined when unparsable). */
|
|
314
|
+
serverDetail;
|
|
315
|
+
/** The request path the failure came from (server-relative). */
|
|
316
|
+
path;
|
|
317
|
+
constructor(args) {
|
|
318
|
+
super(
|
|
319
|
+
args.message ?? extractMatrxErrorMessage(args.serverDetail) ?? `HTTP ${args.status}`
|
|
320
|
+
);
|
|
321
|
+
this.status = args.status;
|
|
322
|
+
this.path = args.path;
|
|
323
|
+
this.serverDetail = args.serverDetail;
|
|
324
|
+
this.code = extractMatrxErrorCode(args.serverDetail);
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
function isRecord(value) {
|
|
328
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
329
|
+
}
|
|
330
|
+
function nonBlankString(value) {
|
|
331
|
+
return typeof value === "string" && value.trim() ? value : void 0;
|
|
332
|
+
}
|
|
333
|
+
function extractMatrxErrorMessage(serverDetail) {
|
|
334
|
+
if (!isRecord(serverDetail)) return void 0;
|
|
335
|
+
const candidates = [];
|
|
336
|
+
const push = (value) => {
|
|
337
|
+
if (value) candidates.push(value);
|
|
338
|
+
};
|
|
339
|
+
push(nonBlankString(serverDetail.user_message));
|
|
340
|
+
push(nonBlankString(serverDetail.message));
|
|
341
|
+
if (Array.isArray(serverDetail.details)) {
|
|
342
|
+
const messages = serverDetail.details.map((entry) => {
|
|
343
|
+
if (!isRecord(entry)) return void 0;
|
|
344
|
+
const detailMessage = nonBlankString(entry.message);
|
|
345
|
+
if (!detailMessage) return void 0;
|
|
346
|
+
const field = nonBlankString(entry.field);
|
|
347
|
+
return field ? `${field}: ${detailMessage}` : detailMessage;
|
|
348
|
+
}).filter((m) => typeof m === "string");
|
|
349
|
+
if (messages.length > 0) push(messages.join("; "));
|
|
350
|
+
}
|
|
351
|
+
const detail = serverDetail.detail;
|
|
352
|
+
if (isRecord(detail)) {
|
|
353
|
+
push(nonBlankString(detail.message) ?? nonBlankString(detail.user_message));
|
|
354
|
+
}
|
|
355
|
+
if (typeof detail === "string" && detail.trim()) push(detail);
|
|
356
|
+
if (Array.isArray(detail)) {
|
|
357
|
+
const messages = detail.map(
|
|
358
|
+
(entry) => isRecord(entry) ? nonBlankString(entry.msg) : void 0
|
|
359
|
+
).filter((m) => typeof m === "string");
|
|
360
|
+
if (messages.length > 0) push(messages.join("; "));
|
|
361
|
+
}
|
|
362
|
+
return candidates.find((c) => !isGenericUserMessage(c)) ?? candidates[0];
|
|
363
|
+
}
|
|
364
|
+
function extractMatrxErrorCode(serverDetail) {
|
|
365
|
+
if (!isRecord(serverDetail)) return null;
|
|
366
|
+
const topLevel = nonBlankString(serverDetail.code);
|
|
367
|
+
if (topLevel) return topLevel;
|
|
368
|
+
const detail = serverDetail.detail;
|
|
369
|
+
if (isRecord(detail)) {
|
|
370
|
+
const nested = nonBlankString(detail.code);
|
|
371
|
+
if (nested) return nested;
|
|
372
|
+
}
|
|
373
|
+
return null;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// matrx/client.ts
|
|
377
|
+
import { isNetError as isNetError2 } from "@ai-matrx/data";
|
|
378
|
+
import { credentialToHeaders } from "@ai-matrx/data";
|
|
379
|
+
import { extractErrorMessage } from "@ai-matrx/data/net";
|
|
380
|
+
|
|
380
381
|
// stream/ndjson.ts
|
|
381
382
|
var DEFAULT_MATRX_NDJSON_READ_AHEAD = 64;
|
|
382
383
|
function isRecord2(value) {
|