@ai-matrx/api 0.1.7 → 0.1.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 +12 -0
- package/dist/account.d.cts +1 -1
- package/dist/account.d.ts +1 -1
- package/dist/agents.cjs +11 -11
- package/dist/agents.d.cts +1 -1
- package/dist/agents.d.ts +1 -1
- package/dist/agents.js +1 -1
- package/dist/ai.cjs +2 -2
- package/dist/ai.d.cts +1 -1
- package/dist/ai.d.ts +1 -1
- package/dist/ai.js +1 -1
- package/dist/apps.cjs +5 -5
- package/dist/apps.d.cts +1 -1
- package/dist/apps.d.ts +1 -1
- package/dist/apps.js +1 -1
- package/dist/architecture.cjs +10 -10
- package/dist/architecture.d.cts +1 -1
- package/dist/architecture.d.ts +1 -1
- package/dist/architecture.js +1 -1
- package/dist/audio.cjs +4 -4
- package/dist/audio.d.cts +1 -1
- package/dist/audio.d.ts +1 -1
- package/dist/audio.js +1 -1
- package/dist/chat.cjs +11 -11
- package/dist/chat.d.cts +1 -1
- package/dist/chat.d.ts +1 -1
- package/dist/chat.js +1 -1
- package/dist/{chunk-2FJPWNXG.js → chunk-PIVTHTVR.js} +22 -7
- package/dist/{chunk-UO3H55R3.cjs → chunk-PMGKZ4FT.cjs} +22 -7
- package/dist/code.cjs +6 -6
- package/dist/code.d.cts +1 -1
- package/dist/code.d.ts +1 -1
- package/dist/code.js +1 -1
- package/dist/commerce.d.cts +1 -1
- package/dist/commerce.d.ts +1 -1
- package/dist/communications.cjs +4 -4
- package/dist/communications.d.cts +1 -1
- package/dist/communications.d.ts +1 -1
- package/dist/communications.js +1 -1
- package/dist/computer.cjs +3 -3
- package/dist/computer.d.cts +1 -1
- package/dist/computer.d.ts +1 -1
- package/dist/computer.js +1 -1
- package/dist/content.cjs +4 -4
- package/dist/content.d.cts +1 -1
- package/dist/content.d.ts +1 -1
- package/dist/content.js +1 -1
- package/dist/crm.cjs +2 -2
- package/dist/crm.d.cts +1 -1
- package/dist/crm.d.ts +1 -1
- package/dist/crm.js +1 -1
- package/dist/data.d.cts +1 -1
- package/dist/data.d.ts +1 -1
- package/dist/education.cjs +4 -4
- package/dist/education.d.cts +1 -1
- package/dist/education.d.ts +1 -1
- package/dist/education.js +1 -1
- package/dist/files.cjs +20 -20
- package/dist/files.d.cts +1 -1
- package/dist/files.d.ts +1 -1
- package/dist/files.js +1 -1
- package/dist/human-resources.d.cts +1 -1
- package/dist/human-resources.d.ts +1 -1
- package/dist/{index-Xx6L_pWk.d.cts → index-C3ZlP3BI.d.cts} +13 -1
- package/dist/{index-Xx6L_pWk.d.ts → index-C3ZlP3BI.d.ts} +13 -1
- package/dist/index.cjs +697 -53
- package/dist/index.d.cts +792 -12
- package/dist/index.d.ts +792 -12
- package/dist/index.js +636 -3
- package/dist/integrations.cjs +3 -3
- package/dist/integrations.d.cts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.js +1 -1
- package/dist/intelligence.cjs +19 -8
- package/dist/intelligence.d.cts +3 -648
- package/dist/intelligence.d.ts +3 -648
- package/dist/intelligence.js +14 -3
- package/dist/keys.generated-CK_C5UXG.d.cts +658 -0
- package/dist/keys.generated-CK_C5UXG.d.ts +658 -0
- package/dist/knowledge.cjs +42 -42
- package/dist/knowledge.d.cts +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/legal.cjs +6 -6
- package/dist/legal.d.cts +1 -1
- package/dist/legal.d.ts +1 -1
- package/dist/legal.js +1 -1
- package/dist/marketing.cjs +76 -76
- package/dist/marketing.d.cts +1 -1
- package/dist/marketing.d.ts +1 -1
- package/dist/marketing.js +1 -1
- package/dist/masterwork.cjs +32 -32
- package/dist/masterwork.d.cts +1 -1
- package/dist/masterwork.d.ts +1 -1
- package/dist/masterwork.js +1 -1
- package/dist/media.cjs +11 -11
- package/dist/media.d.cts +1 -1
- package/dist/media.d.ts +1 -1
- package/dist/media.js +1 -1
- package/dist/net.d.cts +1 -1
- package/dist/net.d.ts +1 -1
- package/dist/platform.cjs +3 -3
- package/dist/platform.d.cts +1 -1
- package/dist/platform.d.ts +1 -1
- package/dist/platform.js +1 -1
- package/dist/publish.cjs +7 -7
- package/dist/publish.d.cts +1 -1
- package/dist/publish.d.ts +1 -1
- package/dist/publish.js +1 -1
- package/dist/stream.cjs +10 -10
- package/dist/stream.d.cts +1 -1
- package/dist/stream.d.ts +1 -1
- package/dist/stream.js +1 -1
- package/dist/web.cjs +26 -26
- package/dist/web.d.cts +1 -1
- package/dist/web.d.ts +1 -1
- package/dist/web.js +1 -1
- package/dist/workflows.cjs +13 -13
- package/dist/workflows.d.cts +1 -1
- package/dist/workflows.d.ts +1 -1
- package/dist/workflows.js +1 -1
- package/package.json +4 -4
|
@@ -16,6 +16,11 @@ interface MatrxStreamEnvelope<TData = unknown> {
|
|
|
16
16
|
data: TData;
|
|
17
17
|
/** Monotonic transport sequence from full envelopes, when supplied. */
|
|
18
18
|
stream_seq?: number;
|
|
19
|
+
/**
|
|
20
|
+
* The request's latency id, on the ONE frame the server wrote first after the AI
|
|
21
|
+
* provider responded. The client stamps its receipt (LEG 3 of the run's latency).
|
|
22
|
+
*/
|
|
23
|
+
latency_mark?: string;
|
|
19
24
|
}
|
|
20
25
|
interface MatrxNdjsonIssue {
|
|
21
26
|
line: string;
|
|
@@ -78,7 +83,7 @@ declare function createMatrxNdjsonFramer(options?: MatrxNdjsonFramerOptions): Ma
|
|
|
78
83
|
declare function readMatrxNdjsonStream(body: ReadableStream<Uint8Array>, options?: ReadMatrxNdjsonOptions): AsyncGenerator<MatrxStreamEnvelope, void, undefined>;
|
|
79
84
|
|
|
80
85
|
/**
|
|
81
|
-
* `@ai-matrx/
|
|
86
|
+
* `@ai-matrx/api/stream` — the Matrx SSE frame kernel.
|
|
82
87
|
*
|
|
83
88
|
* Two Matrx clients hand-rolled the identical `text/event-stream` framing —
|
|
84
89
|
* the same separator regex, the same field parsing, the same CRLF incident —
|
|
@@ -326,6 +331,13 @@ interface CreateApiOptions {
|
|
|
326
331
|
retryAttempts?: number;
|
|
327
332
|
/** Mints the `X-Request-Id`. Default `crypto.randomUUID()`. */
|
|
328
333
|
requestId?: () => string;
|
|
334
|
+
/**
|
|
335
|
+
* Called once when the server answers 401: refresh the credential (e.g. the
|
|
336
|
+
* host's session refresh) and resolve `true` to retry the call ONCE with the
|
|
337
|
+
* fresh credential, `false` to surface the 401. A second 401 is never
|
|
338
|
+
* retried. Omit to surface every 401 as-is.
|
|
339
|
+
*/
|
|
340
|
+
refreshCredentials?: () => Promise<boolean>;
|
|
329
341
|
/** Extra headers on every call (never overrides credentials or org). */
|
|
330
342
|
headers?: Record<string, string>;
|
|
331
343
|
/** Observability sink; the client works fully without it. */
|
|
@@ -16,6 +16,11 @@ interface MatrxStreamEnvelope<TData = unknown> {
|
|
|
16
16
|
data: TData;
|
|
17
17
|
/** Monotonic transport sequence from full envelopes, when supplied. */
|
|
18
18
|
stream_seq?: number;
|
|
19
|
+
/**
|
|
20
|
+
* The request's latency id, on the ONE frame the server wrote first after the AI
|
|
21
|
+
* provider responded. The client stamps its receipt (LEG 3 of the run's latency).
|
|
22
|
+
*/
|
|
23
|
+
latency_mark?: string;
|
|
19
24
|
}
|
|
20
25
|
interface MatrxNdjsonIssue {
|
|
21
26
|
line: string;
|
|
@@ -78,7 +83,7 @@ declare function createMatrxNdjsonFramer(options?: MatrxNdjsonFramerOptions): Ma
|
|
|
78
83
|
declare function readMatrxNdjsonStream(body: ReadableStream<Uint8Array>, options?: ReadMatrxNdjsonOptions): AsyncGenerator<MatrxStreamEnvelope, void, undefined>;
|
|
79
84
|
|
|
80
85
|
/**
|
|
81
|
-
* `@ai-matrx/
|
|
86
|
+
* `@ai-matrx/api/stream` — the Matrx SSE frame kernel.
|
|
82
87
|
*
|
|
83
88
|
* Two Matrx clients hand-rolled the identical `text/event-stream` framing —
|
|
84
89
|
* the same separator regex, the same field parsing, the same CRLF incident —
|
|
@@ -326,6 +331,13 @@ interface CreateApiOptions {
|
|
|
326
331
|
retryAttempts?: number;
|
|
327
332
|
/** Mints the `X-Request-Id`. Default `crypto.randomUUID()`. */
|
|
328
333
|
requestId?: () => string;
|
|
334
|
+
/**
|
|
335
|
+
* Called once when the server answers 401: refresh the credential (e.g. the
|
|
336
|
+
* host's session refresh) and resolve `true` to retry the call ONCE with the
|
|
337
|
+
* fresh credential, `false` to surface the 401. A second 401 is never
|
|
338
|
+
* retried. Omit to surface every 401 as-is.
|
|
339
|
+
*/
|
|
340
|
+
refreshCredentials?: () => Promise<boolean>;
|
|
329
341
|
/** Extra headers on every call (never overrides credentials or org). */
|
|
330
342
|
headers?: Record<string, string>;
|
|
331
343
|
/** Observability sink; the client works fully without it. */
|