@ai-matrx/agents 0.22.0 → 0.24.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 +12 -0
- 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 +404 -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 +404 -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 +404 -131
- package/dist/matrx/index.cjs.map +1 -1
- package/dist/matrx/index.d.cts +242 -4
- package/dist/matrx/index.d.ts +242 -4
- package/dist/matrx/index.js +404 -131
- package/dist/matrx/index.js.map +1 -1
- 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.23.0.json +652 -0
- package/mandates/snapshots/keys.0.24.0.json +652 -0
- package/package.json +4 -4
package/dist/react/index.js
CHANGED
|
@@ -632,47 +632,6 @@ async function requestStream(transport, path, options) {
|
|
|
632
632
|
return response;
|
|
633
633
|
}
|
|
634
634
|
|
|
635
|
-
// matrx/run.ts
|
|
636
|
-
async function streamCall(transport, path, body, options) {
|
|
637
|
-
const response = await requestStream(transport, path, {
|
|
638
|
-
method: "POST",
|
|
639
|
-
// This client IS the streaming path — `stream: true` always, last so a
|
|
640
|
-
// caller-supplied value can never flip the response off NDJSON.
|
|
641
|
-
body: { ...body, stream: true },
|
|
642
|
-
...options.signal ? { signal: options.signal } : {}
|
|
643
|
-
});
|
|
644
|
-
return toRunHandle(response, options);
|
|
645
|
-
}
|
|
646
|
-
function startAgentRun(transport, agentId, request, options = {}) {
|
|
647
|
-
return streamCall(
|
|
648
|
-
transport,
|
|
649
|
-
`/ai/agents/${encodePathSegment(agentId)}`,
|
|
650
|
-
request,
|
|
651
|
-
options
|
|
652
|
-
);
|
|
653
|
-
}
|
|
654
|
-
function continueAgentConversation(transport, conversationId, request, options = {}) {
|
|
655
|
-
return streamCall(
|
|
656
|
-
transport,
|
|
657
|
-
`/ai/conversations/${encodePathSegment(conversationId)}`,
|
|
658
|
-
request,
|
|
659
|
-
options
|
|
660
|
-
);
|
|
661
|
-
}
|
|
662
|
-
function cancelAgentRun(transport, requestId, options = {}) {
|
|
663
|
-
const query = buildQuery(
|
|
664
|
-
options.mode === "interrupt" ? { mode: "interrupt" } : {}
|
|
665
|
-
);
|
|
666
|
-
return requestJson(
|
|
667
|
-
transport,
|
|
668
|
-
`/ai/cancel/${encodePathSegment(requestId)}${query}`,
|
|
669
|
-
{
|
|
670
|
-
method: "POST",
|
|
671
|
-
...options.signal ? { signal: options.signal } : {}
|
|
672
|
-
}
|
|
673
|
-
);
|
|
674
|
-
}
|
|
675
|
-
|
|
676
635
|
// stream/sse.ts
|
|
677
636
|
var FRAME_SEPARATOR = /\r\n\r\n|\n\n|\r\r/;
|
|
678
637
|
var LINE_SEPARATOR = /\r\n|\n|\r/;
|
|
@@ -845,6 +804,47 @@ async function followRuntimeOperationToEnd(transport, executionId, options) {
|
|
|
845
804
|
return { ended: false, status: null };
|
|
846
805
|
}
|
|
847
806
|
|
|
807
|
+
// matrx/run.ts
|
|
808
|
+
async function streamCall(transport, path, body, options) {
|
|
809
|
+
const response = await requestStream(transport, path, {
|
|
810
|
+
method: "POST",
|
|
811
|
+
// This client IS the streaming path — `stream: true` always, last so a
|
|
812
|
+
// caller-supplied value can never flip the response off NDJSON.
|
|
813
|
+
body: { ...body, stream: true },
|
|
814
|
+
...options.signal ? { signal: options.signal } : {}
|
|
815
|
+
});
|
|
816
|
+
return toRunHandle(response, options);
|
|
817
|
+
}
|
|
818
|
+
function startAgentRun(transport, agentId, request, options = {}) {
|
|
819
|
+
return streamCall(
|
|
820
|
+
transport,
|
|
821
|
+
`/ai/agents/${encodePathSegment(agentId)}`,
|
|
822
|
+
request,
|
|
823
|
+
options
|
|
824
|
+
);
|
|
825
|
+
}
|
|
826
|
+
function continueAgentConversation(transport, conversationId, request, options = {}) {
|
|
827
|
+
return streamCall(
|
|
828
|
+
transport,
|
|
829
|
+
`/ai/conversations/${encodePathSegment(conversationId)}`,
|
|
830
|
+
request,
|
|
831
|
+
options
|
|
832
|
+
);
|
|
833
|
+
}
|
|
834
|
+
function cancelAgentRun(transport, requestId, options = {}) {
|
|
835
|
+
const query = buildQuery(
|
|
836
|
+
options.mode === "interrupt" ? { mode: "interrupt" } : {}
|
|
837
|
+
);
|
|
838
|
+
return requestJson(
|
|
839
|
+
transport,
|
|
840
|
+
`/ai/cancel/${encodePathSegment(requestId)}${query}`,
|
|
841
|
+
{
|
|
842
|
+
method: "POST",
|
|
843
|
+
...options.signal ? { signal: options.signal } : {}
|
|
844
|
+
}
|
|
845
|
+
);
|
|
846
|
+
}
|
|
847
|
+
|
|
848
848
|
// react/use-agent-run.ts
|
|
849
849
|
function useAgentRun(options) {
|
|
850
850
|
const [phase, setPhase] = useState("idle");
|