@ai-matrx/agents 0.21.45 → 0.23.0
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 +20 -0
- package/dist/catalog/index.cjs +7 -0
- package/dist/catalog/index.cjs.map +1 -1
- package/dist/catalog/index.d.cts +2 -2
- package/dist/catalog/index.d.ts +2 -2
- package/dist/catalog/index.js +7 -0
- package/dist/catalog/index.js.map +1 -1
- package/dist/catalog/native/index.cjs +1 -1
- package/dist/catalog/native/index.cjs.map +1 -1
- package/dist/catalog/native/index.d.cts +2 -2
- package/dist/catalog/native/index.d.ts +2 -2
- package/dist/catalog/native/index.js +1 -1
- package/dist/catalog/native/index.js.map +1 -1
- package/dist/catalog/react/index.cjs +1 -1
- package/dist/catalog/react/index.cjs.map +1 -1
- package/dist/catalog/react/index.d.cts +2 -0
- package/dist/catalog/react/index.d.ts +2 -0
- package/dist/catalog/react/index.js +1 -1
- package/dist/catalog/react/index.js.map +1 -1
- package/dist/content-transfer/index.cjs +33 -33
- package/dist/content-transfer/index.cjs.map +1 -1
- package/dist/content-transfer/index.d.cts +1 -1
- package/dist/content-transfer/index.d.ts +1 -1
- package/dist/content-transfer/index.js +33 -33
- package/dist/content-transfer/index.js.map +1 -1
- package/dist/content-transfer/react/index.cjs +33 -33
- package/dist/content-transfer/react/index.cjs.map +1 -1
- package/dist/content-transfer/react/index.js +33 -33
- package/dist/content-transfer/react/index.js.map +1 -1
- package/dist/index.cjs +326 -131
- 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 +326 -131
- package/dist/index.js.map +1 -1
- package/dist/mandates/index.cjs +2 -2
- package/dist/mandates/index.cjs.map +1 -1
- package/dist/mandates/index.d.cts +4 -4
- package/dist/mandates/index.d.ts +4 -4
- package/dist/mandates/index.js +2 -2
- package/dist/mandates/index.js.map +1 -1
- package/dist/matrx/index.cjs +326 -131
- package/dist/matrx/index.cjs.map +1 -1
- package/dist/matrx/index.d.cts +185 -4
- package/dist/matrx/index.d.ts +185 -4
- package/dist/matrx/index.js +326 -131
- package/dist/matrx/index.js.map +1 -1
- package/dist/{orchestra-PbGGooqJ.d.cts → orchestra-zpGHwOag.d.cts} +9 -0
- package/dist/{orchestra-PbGGooqJ.d.ts → orchestra-zpGHwOag.d.ts} +9 -0
- package/dist/react/index.cjs +41 -41
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +41 -41
- package/dist/react/index.js.map +1 -1
- package/mandates/snapshots/keys.0.21.46.json +652 -0
- package/mandates/snapshots/keys.0.22.0.json +652 -0
- package/mandates/snapshots/keys.0.23.0.json +652 -0
- package/package.json +3 -3
|
@@ -348,6 +348,13 @@ interface AgentCatalogFavorites {
|
|
|
348
348
|
*/
|
|
349
349
|
interface AgentCatalogIdentity {
|
|
350
350
|
requireUserId(): string;
|
|
351
|
+
/**
|
|
352
|
+
* OPTIONAL non-throwing twin: the signed-in user id, or `null` for a
|
|
353
|
+
* signed-out visitor. When bound, `null` is a legitimate STATE (a guest
|
|
354
|
+
* page), not a failure — nothing is reported. Bind it whenever the host can
|
|
355
|
+
* tell "no session" apart from "identity is broken".
|
|
356
|
+
*/
|
|
357
|
+
getUserId?(): string | null;
|
|
351
358
|
}
|
|
352
359
|
/**
|
|
353
360
|
* Every degraded path, every failed read, every drift detection reports here.
|
|
@@ -427,6 +434,8 @@ interface AgentCatalogLabels {
|
|
|
427
434
|
emptyDefault: string;
|
|
428
435
|
emptyShared: string;
|
|
429
436
|
emptySystem: string;
|
|
437
|
+
/** Empty state for a signed-out visitor — there is no catalogue to read. */
|
|
438
|
+
emptySignedOut: string;
|
|
430
439
|
loading: string;
|
|
431
440
|
triggerFallback: string;
|
|
432
441
|
triggerResolving: string;
|
|
@@ -348,6 +348,13 @@ interface AgentCatalogFavorites {
|
|
|
348
348
|
*/
|
|
349
349
|
interface AgentCatalogIdentity {
|
|
350
350
|
requireUserId(): string;
|
|
351
|
+
/**
|
|
352
|
+
* OPTIONAL non-throwing twin: the signed-in user id, or `null` for a
|
|
353
|
+
* signed-out visitor. When bound, `null` is a legitimate STATE (a guest
|
|
354
|
+
* page), not a failure — nothing is reported. Bind it whenever the host can
|
|
355
|
+
* tell "no session" apart from "identity is broken".
|
|
356
|
+
*/
|
|
357
|
+
getUserId?(): string | null;
|
|
351
358
|
}
|
|
352
359
|
/**
|
|
353
360
|
* Every degraded path, every failed read, every drift detection reports here.
|
|
@@ -427,6 +434,8 @@ interface AgentCatalogLabels {
|
|
|
427
434
|
emptyDefault: string;
|
|
428
435
|
emptyShared: string;
|
|
429
436
|
emptySystem: string;
|
|
437
|
+
/** Empty state for a signed-out visitor — there is no catalogue to read. */
|
|
438
|
+
emptySignedOut: string;
|
|
430
439
|
loading: string;
|
|
431
440
|
triggerFallback: string;
|
|
432
441
|
triggerResolving: string;
|
package/dist/react/index.cjs
CHANGED
|
@@ -658,47 +658,6 @@ async function requestStream(transport, path, options) {
|
|
|
658
658
|
return response;
|
|
659
659
|
}
|
|
660
660
|
|
|
661
|
-
// matrx/run.ts
|
|
662
|
-
async function streamCall(transport, path, body, options) {
|
|
663
|
-
const response = await requestStream(transport, path, {
|
|
664
|
-
method: "POST",
|
|
665
|
-
// This client IS the streaming path — `stream: true` always, last so a
|
|
666
|
-
// caller-supplied value can never flip the response off NDJSON.
|
|
667
|
-
body: { ...body, stream: true },
|
|
668
|
-
...options.signal ? { signal: options.signal } : {}
|
|
669
|
-
});
|
|
670
|
-
return toRunHandle(response, options);
|
|
671
|
-
}
|
|
672
|
-
function startAgentRun(transport, agentId, request, options = {}) {
|
|
673
|
-
return streamCall(
|
|
674
|
-
transport,
|
|
675
|
-
`/ai/agents/${encodePathSegment(agentId)}`,
|
|
676
|
-
request,
|
|
677
|
-
options
|
|
678
|
-
);
|
|
679
|
-
}
|
|
680
|
-
function continueAgentConversation(transport, conversationId, request, options = {}) {
|
|
681
|
-
return streamCall(
|
|
682
|
-
transport,
|
|
683
|
-
`/ai/conversations/${encodePathSegment(conversationId)}`,
|
|
684
|
-
request,
|
|
685
|
-
options
|
|
686
|
-
);
|
|
687
|
-
}
|
|
688
|
-
function cancelAgentRun(transport, requestId, options = {}) {
|
|
689
|
-
const query = buildQuery(
|
|
690
|
-
options.mode === "interrupt" ? { mode: "interrupt" } : {}
|
|
691
|
-
);
|
|
692
|
-
return requestJson(
|
|
693
|
-
transport,
|
|
694
|
-
`/ai/cancel/${encodePathSegment(requestId)}${query}`,
|
|
695
|
-
{
|
|
696
|
-
method: "POST",
|
|
697
|
-
...options.signal ? { signal: options.signal } : {}
|
|
698
|
-
}
|
|
699
|
-
);
|
|
700
|
-
}
|
|
701
|
-
|
|
702
661
|
// stream/sse.ts
|
|
703
662
|
var FRAME_SEPARATOR = /\r\n\r\n|\n\n|\r\r/;
|
|
704
663
|
var LINE_SEPARATOR = /\r\n|\n|\r/;
|
|
@@ -871,6 +830,47 @@ async function followRuntimeOperationToEnd(transport, executionId, options) {
|
|
|
871
830
|
return { ended: false, status: null };
|
|
872
831
|
}
|
|
873
832
|
|
|
833
|
+
// matrx/run.ts
|
|
834
|
+
async function streamCall(transport, path, body, options) {
|
|
835
|
+
const response = await requestStream(transport, path, {
|
|
836
|
+
method: "POST",
|
|
837
|
+
// This client IS the streaming path — `stream: true` always, last so a
|
|
838
|
+
// caller-supplied value can never flip the response off NDJSON.
|
|
839
|
+
body: { ...body, stream: true },
|
|
840
|
+
...options.signal ? { signal: options.signal } : {}
|
|
841
|
+
});
|
|
842
|
+
return toRunHandle(response, options);
|
|
843
|
+
}
|
|
844
|
+
function startAgentRun(transport, agentId, request, options = {}) {
|
|
845
|
+
return streamCall(
|
|
846
|
+
transport,
|
|
847
|
+
`/ai/agents/${encodePathSegment(agentId)}`,
|
|
848
|
+
request,
|
|
849
|
+
options
|
|
850
|
+
);
|
|
851
|
+
}
|
|
852
|
+
function continueAgentConversation(transport, conversationId, request, options = {}) {
|
|
853
|
+
return streamCall(
|
|
854
|
+
transport,
|
|
855
|
+
`/ai/conversations/${encodePathSegment(conversationId)}`,
|
|
856
|
+
request,
|
|
857
|
+
options
|
|
858
|
+
);
|
|
859
|
+
}
|
|
860
|
+
function cancelAgentRun(transport, requestId, options = {}) {
|
|
861
|
+
const query = buildQuery(
|
|
862
|
+
options.mode === "interrupt" ? { mode: "interrupt" } : {}
|
|
863
|
+
);
|
|
864
|
+
return requestJson(
|
|
865
|
+
transport,
|
|
866
|
+
`/ai/cancel/${encodePathSegment(requestId)}${query}`,
|
|
867
|
+
{
|
|
868
|
+
method: "POST",
|
|
869
|
+
...options.signal ? { signal: options.signal } : {}
|
|
870
|
+
}
|
|
871
|
+
);
|
|
872
|
+
}
|
|
873
|
+
|
|
874
874
|
// react/use-agent-run.ts
|
|
875
875
|
function useAgentRun(options) {
|
|
876
876
|
const [phase, setPhase] = (0, import_react.useState)("idle");
|