@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
|
@@ -972,39 +972,6 @@ async function requestStream(transport, path, options) {
|
|
|
972
972
|
return response;
|
|
973
973
|
}
|
|
974
974
|
|
|
975
|
-
// matrx/run.ts
|
|
976
|
-
async function streamCall(transport, path, body, options) {
|
|
977
|
-
const response = await requestStream(transport, path, {
|
|
978
|
-
method: "POST",
|
|
979
|
-
// This client IS the streaming path — `stream: true` always, last so a
|
|
980
|
-
// caller-supplied value can never flip the response off NDJSON.
|
|
981
|
-
body: { ...body, stream: true },
|
|
982
|
-
...options.signal ? { signal: options.signal } : {}
|
|
983
|
-
});
|
|
984
|
-
return toRunHandle(response, options);
|
|
985
|
-
}
|
|
986
|
-
function startMandateRun(transport, mandateKey, request, options = {}) {
|
|
987
|
-
return streamCall(
|
|
988
|
-
transport,
|
|
989
|
-
`/ai/mandates/${encodePathSegment(mandateKey)}`,
|
|
990
|
-
request,
|
|
991
|
-
options
|
|
992
|
-
);
|
|
993
|
-
}
|
|
994
|
-
function cancelAgentRun(transport, requestId, options = {}) {
|
|
995
|
-
const query = buildQuery(
|
|
996
|
-
options.mode === "interrupt" ? { mode: "interrupt" } : {}
|
|
997
|
-
);
|
|
998
|
-
return requestJson(
|
|
999
|
-
transport,
|
|
1000
|
-
`/ai/cancel/${encodePathSegment(requestId)}${query}`,
|
|
1001
|
-
{
|
|
1002
|
-
method: "POST",
|
|
1003
|
-
...options.signal ? { signal: options.signal } : {}
|
|
1004
|
-
}
|
|
1005
|
-
);
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
975
|
// stream/sse.ts
|
|
1009
976
|
var FRAME_SEPARATOR = /\r\n\r\n|\n\n|\r\r/;
|
|
1010
977
|
var LINE_SEPARATOR = /\r\n|\n|\r/;
|
|
@@ -1203,6 +1170,39 @@ async function rejoinRuntimeOperation(transport, requestId, options = {}) {
|
|
|
1203
1170
|
return toRunHandle(response, options);
|
|
1204
1171
|
}
|
|
1205
1172
|
|
|
1173
|
+
// matrx/run.ts
|
|
1174
|
+
async function streamCall(transport, path, body, options) {
|
|
1175
|
+
const response = await requestStream(transport, path, {
|
|
1176
|
+
method: "POST",
|
|
1177
|
+
// This client IS the streaming path — `stream: true` always, last so a
|
|
1178
|
+
// caller-supplied value can never flip the response off NDJSON.
|
|
1179
|
+
body: { ...body, stream: true },
|
|
1180
|
+
...options.signal ? { signal: options.signal } : {}
|
|
1181
|
+
});
|
|
1182
|
+
return toRunHandle(response, options);
|
|
1183
|
+
}
|
|
1184
|
+
function startMandateRun(transport, mandateKey, request, options = {}) {
|
|
1185
|
+
return streamCall(
|
|
1186
|
+
transport,
|
|
1187
|
+
`/ai/mandates/${encodePathSegment(mandateKey)}`,
|
|
1188
|
+
request,
|
|
1189
|
+
options
|
|
1190
|
+
);
|
|
1191
|
+
}
|
|
1192
|
+
function cancelAgentRun(transport, requestId, options = {}) {
|
|
1193
|
+
const query = buildQuery(
|
|
1194
|
+
options.mode === "interrupt" ? { mode: "interrupt" } : {}
|
|
1195
|
+
);
|
|
1196
|
+
return requestJson(
|
|
1197
|
+
transport,
|
|
1198
|
+
`/ai/cancel/${encodePathSegment(requestId)}${query}`,
|
|
1199
|
+
{
|
|
1200
|
+
method: "POST",
|
|
1201
|
+
...options.signal ? { signal: options.signal } : {}
|
|
1202
|
+
}
|
|
1203
|
+
);
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
1206
|
// content-transfer/index.ts
|
|
1207
1207
|
var SupersededRunError = class extends Error {
|
|
1208
1208
|
constructor() {
|