@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
@@ -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");