@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
@@ -944,39 +944,6 @@ async function requestStream(transport, path, options) {
944
944
  return response;
945
945
  }
946
946
 
947
- // matrx/run.ts
948
- async function streamCall(transport, path, body, options) {
949
- const response = await requestStream(transport, path, {
950
- method: "POST",
951
- // This client IS the streaming path — `stream: true` always, last so a
952
- // caller-supplied value can never flip the response off NDJSON.
953
- body: { ...body, stream: true },
954
- ...options.signal ? { signal: options.signal } : {}
955
- });
956
- return toRunHandle(response, options);
957
- }
958
- function startMandateRun(transport, mandateKey, request, options = {}) {
959
- return streamCall(
960
- transport,
961
- `/ai/mandates/${encodePathSegment(mandateKey)}`,
962
- request,
963
- options
964
- );
965
- }
966
- function cancelAgentRun(transport, requestId, options = {}) {
967
- const query = buildQuery(
968
- options.mode === "interrupt" ? { mode: "interrupt" } : {}
969
- );
970
- return requestJson(
971
- transport,
972
- `/ai/cancel/${encodePathSegment(requestId)}${query}`,
973
- {
974
- method: "POST",
975
- ...options.signal ? { signal: options.signal } : {}
976
- }
977
- );
978
- }
979
-
980
947
  // stream/sse.ts
981
948
  var FRAME_SEPARATOR = /\r\n\r\n|\n\n|\r\r/;
982
949
  var LINE_SEPARATOR = /\r\n|\n|\r/;
@@ -1175,6 +1142,39 @@ async function rejoinRuntimeOperation(transport, requestId, options = {}) {
1175
1142
  return toRunHandle(response, options);
1176
1143
  }
1177
1144
 
1145
+ // matrx/run.ts
1146
+ async function streamCall(transport, path, body, options) {
1147
+ const response = await requestStream(transport, path, {
1148
+ method: "POST",
1149
+ // This client IS the streaming path — `stream: true` always, last so a
1150
+ // caller-supplied value can never flip the response off NDJSON.
1151
+ body: { ...body, stream: true },
1152
+ ...options.signal ? { signal: options.signal } : {}
1153
+ });
1154
+ return toRunHandle(response, options);
1155
+ }
1156
+ function startMandateRun(transport, mandateKey, request, options = {}) {
1157
+ return streamCall(
1158
+ transport,
1159
+ `/ai/mandates/${encodePathSegment(mandateKey)}`,
1160
+ request,
1161
+ options
1162
+ );
1163
+ }
1164
+ function cancelAgentRun(transport, requestId, options = {}) {
1165
+ const query = buildQuery(
1166
+ options.mode === "interrupt" ? { mode: "interrupt" } : {}
1167
+ );
1168
+ return requestJson(
1169
+ transport,
1170
+ `/ai/cancel/${encodePathSegment(requestId)}${query}`,
1171
+ {
1172
+ method: "POST",
1173
+ ...options.signal ? { signal: options.signal } : {}
1174
+ }
1175
+ );
1176
+ }
1177
+
1178
1178
  // content-transfer/index.ts
1179
1179
  var SupersededRunError = class extends Error {
1180
1180
  constructor() {