@ai-matrx/agents 0.22.0 → 0.23.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 +7 -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 +326 -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 +326 -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 +326 -131
- package/dist/matrx/index.cjs.map +1 -1
- package/dist/matrx/index.d.cts +185 -4
- package/dist/matrx/index.d.ts +185 -4
- package/dist/matrx/index.js +326 -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/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { B as MatrxTransport, w as MatrxRuntimeOperationEvent, v as MatrxRuntimeExecutionStatus, d as MatrxCancelResponse } from '../operations--f5ko9Su.cjs';
|
|
2
|
-
import { PageAction, Payload, Snapshot, Draft, TransferOutcome, TransferTarget } from '@ai-matrx/kit/content-transfer';
|
|
3
2
|
import { MatrxStreamEnvelope } from '../stream/ndjson.cjs';
|
|
3
|
+
import { PageAction, Payload, Snapshot, Draft, TransferOutcome, TransferTarget } from '@ai-matrx/kit/content-transfer';
|
|
4
4
|
import '../stream/sse.cjs';
|
|
5
5
|
|
|
6
6
|
/** Bind once in a host; every menu and declared surface inherits these actions. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { B as MatrxTransport, w as MatrxRuntimeOperationEvent, v as MatrxRuntimeExecutionStatus, d as MatrxCancelResponse } from '../operations-Dp4ut-ac.js';
|
|
2
|
-
import { PageAction, Payload, Snapshot, Draft, TransferOutcome, TransferTarget } from '@ai-matrx/kit/content-transfer';
|
|
3
2
|
import { MatrxStreamEnvelope } from '../stream/ndjson.js';
|
|
3
|
+
import { PageAction, Payload, Snapshot, Draft, TransferOutcome, TransferTarget } from '@ai-matrx/kit/content-transfer';
|
|
4
4
|
import '../stream/sse.js';
|
|
5
5
|
|
|
6
6
|
/** Bind once in a host; every menu and declared surface inherits these actions. */
|
|
@@ -996,39 +996,6 @@ async function requestStream(transport, path, options) {
|
|
|
996
996
|
return response;
|
|
997
997
|
}
|
|
998
998
|
|
|
999
|
-
// matrx/run.ts
|
|
1000
|
-
async function streamCall(transport, path, body, options) {
|
|
1001
|
-
const response = await requestStream(transport, path, {
|
|
1002
|
-
method: "POST",
|
|
1003
|
-
// This client IS the streaming path — `stream: true` always, last so a
|
|
1004
|
-
// caller-supplied value can never flip the response off NDJSON.
|
|
1005
|
-
body: { ...body, stream: true },
|
|
1006
|
-
...options.signal ? { signal: options.signal } : {}
|
|
1007
|
-
});
|
|
1008
|
-
return toRunHandle(response, options);
|
|
1009
|
-
}
|
|
1010
|
-
function startMandateRun(transport, mandateKey, request, options = {}) {
|
|
1011
|
-
return streamCall(
|
|
1012
|
-
transport,
|
|
1013
|
-
`/ai/mandates/${encodePathSegment(mandateKey)}`,
|
|
1014
|
-
request,
|
|
1015
|
-
options
|
|
1016
|
-
);
|
|
1017
|
-
}
|
|
1018
|
-
function cancelAgentRun(transport, requestId, options = {}) {
|
|
1019
|
-
const query = buildQuery(
|
|
1020
|
-
options.mode === "interrupt" ? { mode: "interrupt" } : {}
|
|
1021
|
-
);
|
|
1022
|
-
return requestJson(
|
|
1023
|
-
transport,
|
|
1024
|
-
`/ai/cancel/${encodePathSegment(requestId)}${query}`,
|
|
1025
|
-
{
|
|
1026
|
-
method: "POST",
|
|
1027
|
-
...options.signal ? { signal: options.signal } : {}
|
|
1028
|
-
}
|
|
1029
|
-
);
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
999
|
// stream/sse.ts
|
|
1033
1000
|
var FRAME_SEPARATOR = /\r\n\r\n|\n\n|\r\r/;
|
|
1034
1001
|
var LINE_SEPARATOR = /\r\n|\n|\r/;
|
|
@@ -1227,6 +1194,39 @@ async function rejoinRuntimeOperation(transport, requestId, options = {}) {
|
|
|
1227
1194
|
return toRunHandle(response, options);
|
|
1228
1195
|
}
|
|
1229
1196
|
|
|
1197
|
+
// matrx/run.ts
|
|
1198
|
+
async function streamCall(transport, path, body, options) {
|
|
1199
|
+
const response = await requestStream(transport, path, {
|
|
1200
|
+
method: "POST",
|
|
1201
|
+
// This client IS the streaming path — `stream: true` always, last so a
|
|
1202
|
+
// caller-supplied value can never flip the response off NDJSON.
|
|
1203
|
+
body: { ...body, stream: true },
|
|
1204
|
+
...options.signal ? { signal: options.signal } : {}
|
|
1205
|
+
});
|
|
1206
|
+
return toRunHandle(response, options);
|
|
1207
|
+
}
|
|
1208
|
+
function startMandateRun(transport, mandateKey, request, options = {}) {
|
|
1209
|
+
return streamCall(
|
|
1210
|
+
transport,
|
|
1211
|
+
`/ai/mandates/${encodePathSegment(mandateKey)}`,
|
|
1212
|
+
request,
|
|
1213
|
+
options
|
|
1214
|
+
);
|
|
1215
|
+
}
|
|
1216
|
+
function cancelAgentRun(transport, requestId, options = {}) {
|
|
1217
|
+
const query = buildQuery(
|
|
1218
|
+
options.mode === "interrupt" ? { mode: "interrupt" } : {}
|
|
1219
|
+
);
|
|
1220
|
+
return requestJson(
|
|
1221
|
+
transport,
|
|
1222
|
+
`/ai/cancel/${encodePathSegment(requestId)}${query}`,
|
|
1223
|
+
{
|
|
1224
|
+
method: "POST",
|
|
1225
|
+
...options.signal ? { signal: options.signal } : {}
|
|
1226
|
+
}
|
|
1227
|
+
);
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
1230
|
// content-transfer/destination-ports.ts
|
|
1231
1231
|
var success = (message, target) => ({ status: "success", delivered: "action", mimeTypes: [], message, ...target ? { target } : {} });
|
|
1232
1232
|
var active = (bindings, content, expected) => {
|