@50arms/platform-mcp 0.1.463 → 0.1.465
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/dist/access-request.js +19 -6
- package/dist/agent-gate.js +19 -5
- package/dist/board-id.js +8 -2
- package/dist/checkout-docs-root.js +10 -2
- package/dist/clear-control.js +18 -4
- package/dist/compaction-control.js +30 -7
- package/dist/credential.js +10 -2
- package/dist/danxbot-api-examples.js +20 -3
- package/dist/design-screenshot.js +22 -5
- package/dist/digest-hold.js +14 -3
- package/dist/docs-tools.js +46 -12
- package/dist/durable-write.js +10 -2
- package/dist/forbidden-hint.js +13 -2
- package/dist/guarded-calls.js +7 -2
- package/dist/handlers.js +70 -15
- package/dist/heartbeat-reporter.js +8 -3
- package/dist/http-client.js +5 -3
- package/dist/index.js +252 -82
- package/dist/job-key.js +47 -0
- package/dist/json-body.js +3 -1
- package/dist/key-revoked-halt.js +2 -1
- package/dist/leftover-wire.js +17 -4
- package/dist/lifecycle.js +11 -3
- package/dist/listen.js +242 -64
- package/dist/listener-reminder.js +8 -2
- package/dist/machine-daemon/autostart.js +16 -4
- package/dist/machine-daemon/beat.js +18 -4
- package/dist/machine-daemon/cli.js +15 -4
- package/dist/machine-daemon/install.js +33 -9
- package/dist/machine-daemon/leftovers.js +134 -30
- package/dist/machine-daemon/state.js +9 -3
- package/dist/machine-daemon.js +531 -128
- package/dist/machine-registration.js +27 -6
- package/dist/machine-secret.js +8 -3
- package/dist/machine-toolkit.js +377 -81
- package/dist/mini-app-build.js +19 -5
- package/dist/mini-app-checkout.js +38 -10
- package/dist/mini-app-output.js +22 -5
- package/dist/mini-app-publish.js +34 -11
- package/dist/mini-app-restore.js +30 -9
- package/dist/one-line.js +3 -1
- package/dist/permission-request.js +14 -3
- package/dist/permission-watch.js +10 -3
- package/dist/plan-events-relay.js +96 -19
- package/dist/plan-events-tool.js +9 -2
- package/dist/plugin-publish.js +23 -6
- package/dist/plugin-screenshot.js +18 -6
- package/dist/restart-notice.js +47 -15
- package/dist/result-limit.js +6 -1
- package/dist/role-instruction-file.js +16 -4
- package/dist/route-board-scope.generated.js +5 -0
- package/dist/route-board-scope.js +6 -2
- package/dist/session-access.js +114 -33
- package/dist/session-connection.js +23 -7
- package/dist/session-control-file.js +1 -1
- package/dist/session-key.js +12 -4
- package/dist/session-options.js +6 -2
- package/dist/session-stats.js +2 -1
- package/dist/session-stream.js +81 -20
- package/dist/shutdown.js +3 -1
- package/dist/subagents-live.js +8 -2
- package/dist/terms-halt.js +4 -2
- package/dist/tool-access.js +17 -4
- package/dist/tool-surface.js +9 -2
- package/dist/transcript-lineage.js +5 -2
- package/dist/urgent-records.js +1 -0
- package/package.json +1 -1
package/dist/leftover-wire.js
CHANGED
|
@@ -20,13 +20,26 @@ export function readLeftoverProcess(v) {
|
|
|
20
20
|
const { pid, command, age_seconds, cpu_percent, why } = v;
|
|
21
21
|
if (!Number.isSafeInteger(pid) || pid <= 0)
|
|
22
22
|
return null;
|
|
23
|
-
if (typeof command !== "string" ||
|
|
23
|
+
if (typeof command !== "string" ||
|
|
24
|
+
command.trim() === "" ||
|
|
25
|
+
command.length > LEFTOVER_COMMAND_MAX_CHARS + 3)
|
|
24
26
|
return null;
|
|
25
|
-
if (typeof age_seconds !== "number" ||
|
|
27
|
+
if (typeof age_seconds !== "number" ||
|
|
28
|
+
!Number.isFinite(age_seconds) ||
|
|
29
|
+
age_seconds < 0)
|
|
26
30
|
return null;
|
|
27
|
-
if (cpu_percent !== null &&
|
|
31
|
+
if (cpu_percent !== null &&
|
|
32
|
+
(typeof cpu_percent !== "number" ||
|
|
33
|
+
!Number.isFinite(cpu_percent) ||
|
|
34
|
+
cpu_percent < 0))
|
|
28
35
|
return null;
|
|
29
36
|
if (!LEFTOVER_WHY.includes(why))
|
|
30
37
|
return null;
|
|
31
|
-
return {
|
|
38
|
+
return {
|
|
39
|
+
pid: pid,
|
|
40
|
+
command,
|
|
41
|
+
age_seconds,
|
|
42
|
+
cpu_percent: cpu_percent,
|
|
43
|
+
why: why,
|
|
44
|
+
};
|
|
32
45
|
}
|
package/dist/lifecycle.js
CHANGED
|
@@ -24,7 +24,10 @@ export function presentCallbacksFromEnv() {
|
|
|
24
24
|
async function postJson(url, body, bearer) {
|
|
25
25
|
return fetch(url, {
|
|
26
26
|
method: "POST",
|
|
27
|
-
headers: {
|
|
27
|
+
headers: {
|
|
28
|
+
"Content-Type": "application/json",
|
|
29
|
+
Authorization: `Bearer ${bearer}`,
|
|
30
|
+
},
|
|
28
31
|
body: JSON.stringify(body),
|
|
29
32
|
});
|
|
30
33
|
}
|
|
@@ -64,7 +67,10 @@ async function readAttachments(paths) {
|
|
|
64
67
|
if (info.size > MAX_ATTACHMENT_BYTES) {
|
|
65
68
|
throw new Error(`field "files"[${idx}] "${entry}" is ${info.size} bytes, over the ${MAX_ATTACHMENT_BYTES}-byte attachment limit`);
|
|
66
69
|
}
|
|
67
|
-
return {
|
|
70
|
+
return {
|
|
71
|
+
filename: basename(entry),
|
|
72
|
+
base64: (await readFile(entry)).toString("base64"),
|
|
73
|
+
};
|
|
68
74
|
}));
|
|
69
75
|
}
|
|
70
76
|
/** A refused callback's body is the only place the server says why — relay it, never just the status. */
|
|
@@ -83,7 +89,9 @@ export function registerLifecycleTools(renamedTool) {
|
|
|
83
89
|
// `slack-agent` profile own the order (reply, link, attach, complete).
|
|
84
90
|
"Post the final user-facing reply to the originating Slack thread, once per dispatch. Files in `files[]` " +
|
|
85
91
|
"post with the text as one thread message. For a progress update, `50arms_api` `POST /api/slack/update` `{text}`.", {
|
|
86
|
-
text: z
|
|
92
|
+
text: z
|
|
93
|
+
.string()
|
|
94
|
+
.describe("The final reply text to post to the Slack thread."),
|
|
87
95
|
files: z
|
|
88
96
|
.array(z.string())
|
|
89
97
|
.optional()
|