@ai-matrx/agents 0.37.1 → 0.38.2
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 +24 -0
- package/dist/content-transfer/index.cjs.map +1 -1
- package/dist/content-transfer/index.js.map +1 -1
- package/dist/content-transfer/react/index.cjs.map +1 -1
- package/dist/content-transfer/react/index.js.map +1 -1
- package/dist/generated/api-types.cjs.map +1 -1
- package/dist/generated/api-types.d.cts +4 -4
- package/dist/generated/api-types.d.ts +4 -4
- package/dist/index.cjs +49 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +49 -7
- package/dist/index.js.map +1 -1
- package/dist/{keys.generated-DL-5LCNz.d.cts → keys.generated-DxqNwOgr.d.cts} +4 -4
- package/dist/{keys.generated-DL-5LCNz.d.ts → keys.generated-DxqNwOgr.d.ts} +4 -4
- package/dist/mandates/index.cjs +2 -2
- package/dist/mandates/index.cjs.map +1 -1
- package/dist/mandates/index.d.cts +2 -2
- package/dist/mandates/index.d.ts +2 -2
- package/dist/mandates/index.js +2 -2
- package/dist/mandates/index.js.map +1 -1
- package/dist/matrx/index.cjs +49 -7
- package/dist/matrx/index.cjs.map +1 -1
- package/dist/matrx/index.d.cts +35 -3
- package/dist/matrx/index.d.ts +35 -3
- package/dist/matrx/index.js +49 -7
- package/dist/matrx/index.js.map +1 -1
- package/dist/portable/mcp.cjs.map +1 -1
- package/dist/portable/mcp.js.map +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js.map +1 -1
- package/generated/api-types.ts +4 -4
- package/mandates/snapshots/keys.0.37.2.json +653 -0
- package/mandates/snapshots/keys.0.38.0.json +653 -0
- package/mandates/snapshots/keys.0.38.1.json +653 -0
- package/mandates/snapshots/keys.0.38.2.json +653 -0
- package/package.json +2 -2
|
@@ -41223,7 +41223,7 @@ interface paths {
|
|
|
41223
41223
|
* challenge; this is the door for the challenge nobody could detect — a
|
|
41224
41224
|
* person or an agent that can SEE the block says so, and the session is
|
|
41225
41225
|
* checkpointed and reopened through their computer with the same run id.
|
|
41226
|
-
* Contract: ``common-docs/systems/
|
|
41226
|
+
* Contract: ``common-docs/systems/architecture/residential-egress/FEATURE.md``.
|
|
41227
41227
|
*/
|
|
41228
41228
|
post: operations["retry_through_home_computer_browser_manager_runs__run_id__retry_through_home_computer_post"];
|
|
41229
41229
|
delete?: never;
|
|
@@ -58558,7 +58558,7 @@ interface components {
|
|
|
58558
58558
|
*/
|
|
58559
58559
|
change_role: "apply" | "edit" | "revert";
|
|
58560
58560
|
/** Actor Tier */
|
|
58561
|
-
actor_tier?: ("
|
|
58561
|
+
actor_tier?: ("agent" | "system" | "user") | null;
|
|
58562
58562
|
/** Actor System */
|
|
58563
58563
|
actor_system?: string | null;
|
|
58564
58564
|
/** Actor Id */
|
|
@@ -62438,7 +62438,7 @@ interface components {
|
|
|
62438
62438
|
* sets it: only the Browser Manager knows that a blocked page was retried
|
|
62439
62439
|
* through the person's own computer. It rides the command reply because that
|
|
62440
62440
|
* is where the agent and the panel read the answer, and rule 5 of
|
|
62441
|
-
* ``common-docs/systems/
|
|
62441
|
+
* ``common-docs/systems/architecture/residential-egress/FEATURE.md`` says a page
|
|
62442
62442
|
* fetched through a person's computer always says so.
|
|
62443
62443
|
*/
|
|
62444
62444
|
CommandEgress: {
|
|
@@ -187733,7 +187733,7 @@ interface operations {
|
|
|
187733
187733
|
unit_token?: ("agent" | "tool" | "workflow") | null;
|
|
187734
187734
|
unit_id?: string | null;
|
|
187735
187735
|
change_role?: ("apply" | "edit" | "revert") | null;
|
|
187736
|
-
actor_tier?: ("ai" | "code" | "human") | null;
|
|
187736
|
+
actor_tier?: ("agent" | "ai" | "code" | "human" | "system" | "user") | null;
|
|
187737
187737
|
/** @description Only changes a Hindsight finding caused. */
|
|
187738
187738
|
with_findings_only?: boolean;
|
|
187739
187739
|
limit?: number;
|
|
@@ -41223,7 +41223,7 @@ interface paths {
|
|
|
41223
41223
|
* challenge; this is the door for the challenge nobody could detect — a
|
|
41224
41224
|
* person or an agent that can SEE the block says so, and the session is
|
|
41225
41225
|
* checkpointed and reopened through their computer with the same run id.
|
|
41226
|
-
* Contract: ``common-docs/systems/
|
|
41226
|
+
* Contract: ``common-docs/systems/architecture/residential-egress/FEATURE.md``.
|
|
41227
41227
|
*/
|
|
41228
41228
|
post: operations["retry_through_home_computer_browser_manager_runs__run_id__retry_through_home_computer_post"];
|
|
41229
41229
|
delete?: never;
|
|
@@ -58558,7 +58558,7 @@ interface components {
|
|
|
58558
58558
|
*/
|
|
58559
58559
|
change_role: "apply" | "edit" | "revert";
|
|
58560
58560
|
/** Actor Tier */
|
|
58561
|
-
actor_tier?: ("
|
|
58561
|
+
actor_tier?: ("agent" | "system" | "user") | null;
|
|
58562
58562
|
/** Actor System */
|
|
58563
58563
|
actor_system?: string | null;
|
|
58564
58564
|
/** Actor Id */
|
|
@@ -62438,7 +62438,7 @@ interface components {
|
|
|
62438
62438
|
* sets it: only the Browser Manager knows that a blocked page was retried
|
|
62439
62439
|
* through the person's own computer. It rides the command reply because that
|
|
62440
62440
|
* is where the agent and the panel read the answer, and rule 5 of
|
|
62441
|
-
* ``common-docs/systems/
|
|
62441
|
+
* ``common-docs/systems/architecture/residential-egress/FEATURE.md`` says a page
|
|
62442
62442
|
* fetched through a person's computer always says so.
|
|
62443
62443
|
*/
|
|
62444
62444
|
CommandEgress: {
|
|
@@ -187733,7 +187733,7 @@ interface operations {
|
|
|
187733
187733
|
unit_token?: ("agent" | "tool" | "workflow") | null;
|
|
187734
187734
|
unit_id?: string | null;
|
|
187735
187735
|
change_role?: ("apply" | "edit" | "revert") | null;
|
|
187736
|
-
actor_tier?: ("ai" | "code" | "human") | null;
|
|
187736
|
+
actor_tier?: ("agent" | "ai" | "code" | "human" | "system" | "user") | null;
|
|
187737
187737
|
/** @description Only changes a Hindsight finding caused. */
|
|
187738
187738
|
with_findings_only?: boolean;
|
|
187739
187739
|
limit?: number;
|
package/dist/index.cjs
CHANGED
|
@@ -122,6 +122,7 @@ __export(index_exports, {
|
|
|
122
122
|
readLiveStreamUnavailable: () => readLiveStreamUnavailable,
|
|
123
123
|
readMatrxErrorCode: () => readMatrxErrorCode,
|
|
124
124
|
readMatrxErrorCodeFromMessage: () => readMatrxErrorCodeFromMessage,
|
|
125
|
+
readMatrxJsonResponse: () => readMatrxJsonResponse,
|
|
125
126
|
readMatrxNdjsonStream: () => readMatrxNdjsonStream,
|
|
126
127
|
readMatrxSseStream: () => readMatrxSseStream,
|
|
127
128
|
redactUrlForRequestLog: () => redactUrlForRequestLog,
|
|
@@ -141,6 +142,7 @@ __export(index_exports, {
|
|
|
141
142
|
runWaitKnobKey: () => runWaitKnobKey,
|
|
142
143
|
runWaitTimeoutMessage: () => runWaitTimeoutMessage,
|
|
143
144
|
runtimeOperationRejoinPath: () => runtimeOperationRejoinPath,
|
|
145
|
+
sendMatrxRequest: () => sendMatrxRequest,
|
|
144
146
|
settleRunPickup: () => settleRunPickup,
|
|
145
147
|
shouldReportMatrxCallError: () => shouldReportMatrxCallError,
|
|
146
148
|
startAgentRun: () => startAgentRun,
|
|
@@ -1492,13 +1494,15 @@ function buildMatrxRequestUrl(baseUrl, pathTemplate, pathParams, queryParams) {
|
|
|
1492
1494
|
}
|
|
1493
1495
|
const fullPath = resolvedPath.startsWith("/api/") ? resolvedPath.slice(4) : resolvedPath;
|
|
1494
1496
|
const url = `${baseUrl}${fullPath}`;
|
|
1495
|
-
if (queryParams
|
|
1496
|
-
const
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
)
|
|
1500
|
-
|
|
1501
|
-
|
|
1497
|
+
if (queryParams) {
|
|
1498
|
+
const search = new URLSearchParams();
|
|
1499
|
+
for (const [key, value] of Object.entries(queryParams)) {
|
|
1500
|
+
if (value === null || value === void 0) continue;
|
|
1501
|
+
const values = Array.isArray(value) ? value : [value];
|
|
1502
|
+
for (const entry of values) search.append(key, String(entry));
|
|
1503
|
+
}
|
|
1504
|
+
const qs = search.toString();
|
|
1505
|
+
if (qs) return `${url}${url.includes("?") ? "&" : "?"}${qs}`;
|
|
1502
1506
|
}
|
|
1503
1507
|
return url;
|
|
1504
1508
|
}
|
|
@@ -1682,6 +1686,44 @@ async function executeMatrxCall(request, hooks = {}) {
|
|
|
1682
1686
|
...parsed.conversationId !== null ? { conversationId: parsed.conversationId } : {}
|
|
1683
1687
|
};
|
|
1684
1688
|
}
|
|
1689
|
+
async function sendMatrxRequest(url, init = {}, options = {}) {
|
|
1690
|
+
const callerSignal = options.signal ?? init.signal ?? void 0;
|
|
1691
|
+
if (options.timeoutMs === void 0) {
|
|
1692
|
+
return fetch(url, { ...init, ...callerSignal ? { signal: callerSignal } : {} });
|
|
1693
|
+
}
|
|
1694
|
+
const controller = new AbortController();
|
|
1695
|
+
const onCallerAbort = () => controller.abort(callerSignal?.reason);
|
|
1696
|
+
if (callerSignal) {
|
|
1697
|
+
if (callerSignal.aborted) controller.abort(callerSignal.reason);
|
|
1698
|
+
else callerSignal.addEventListener("abort", onCallerAbort, { once: true });
|
|
1699
|
+
}
|
|
1700
|
+
let timedOut = false;
|
|
1701
|
+
const timer = setTimeout(() => {
|
|
1702
|
+
timedOut = true;
|
|
1703
|
+
controller.abort();
|
|
1704
|
+
}, options.timeoutMs);
|
|
1705
|
+
try {
|
|
1706
|
+
return await fetch(url, { ...init, signal: controller.signal });
|
|
1707
|
+
} catch (error) {
|
|
1708
|
+
if (timedOut) {
|
|
1709
|
+
throw new BackendApiError({
|
|
1710
|
+
code: "request_timeout",
|
|
1711
|
+
detail: `${init.method ?? "GET"} ${url} exceeded ${options.timeoutMs}ms`,
|
|
1712
|
+
userMessage: "The request timed out \u2014 please retry.",
|
|
1713
|
+
status: 504
|
|
1714
|
+
});
|
|
1715
|
+
}
|
|
1716
|
+
throw error;
|
|
1717
|
+
} finally {
|
|
1718
|
+
clearTimeout(timer);
|
|
1719
|
+
callerSignal?.removeEventListener("abort", onCallerAbort);
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
async function readMatrxJsonResponse(response) {
|
|
1723
|
+
if (!response.ok) throw await parseHttpError(response);
|
|
1724
|
+
if (response.status === 204) return null;
|
|
1725
|
+
return await response.json();
|
|
1726
|
+
}
|
|
1685
1727
|
|
|
1686
1728
|
// matrx/client.ts
|
|
1687
1729
|
function classifyStatus(status) {
|