@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.
Files changed (36) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/content-transfer/index.cjs +33 -33
  3. package/dist/content-transfer/index.cjs.map +1 -1
  4. package/dist/content-transfer/index.d.cts +1 -1
  5. package/dist/content-transfer/index.d.ts +1 -1
  6. package/dist/content-transfer/index.js +33 -33
  7. package/dist/content-transfer/index.js.map +1 -1
  8. package/dist/content-transfer/react/index.cjs +33 -33
  9. package/dist/content-transfer/react/index.cjs.map +1 -1
  10. package/dist/content-transfer/react/index.js +33 -33
  11. package/dist/content-transfer/react/index.js.map +1 -1
  12. package/dist/index.cjs +404 -131
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.d.cts +1 -1
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.js +404 -131
  17. package/dist/index.js.map +1 -1
  18. package/dist/mandates/index.cjs +2 -2
  19. package/dist/mandates/index.cjs.map +1 -1
  20. package/dist/mandates/index.d.cts +4 -4
  21. package/dist/mandates/index.d.ts +4 -4
  22. package/dist/mandates/index.js +2 -2
  23. package/dist/mandates/index.js.map +1 -1
  24. package/dist/matrx/index.cjs +404 -131
  25. package/dist/matrx/index.cjs.map +1 -1
  26. package/dist/matrx/index.d.cts +242 -4
  27. package/dist/matrx/index.d.ts +242 -4
  28. package/dist/matrx/index.js +404 -131
  29. package/dist/matrx/index.js.map +1 -1
  30. package/dist/react/index.cjs +41 -41
  31. package/dist/react/index.cjs.map +1 -1
  32. package/dist/react/index.js +41 -41
  33. package/dist/react/index.js.map +1 -1
  34. package/mandates/snapshots/keys.0.23.0.json +652 -0
  35. package/mandates/snapshots/keys.0.24.0.json +652 -0
  36. package/package.json +4 -4
@@ -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");