@slock-ai/daemon 0.55.6 → 0.56.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/dist/{chunk-HAZSZDOZ.js → chunk-4H5XFLYA.js} +676 -139
- package/dist/cli/index.js +55 -1
- package/dist/core.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -1
package/dist/cli/index.js
CHANGED
|
@@ -159,6 +159,7 @@ function routeFamilyForPath(pathname) {
|
|
|
159
159
|
const normalized = pathname.split("?")[0] || "/";
|
|
160
160
|
if (normalized === "/internal/agent-api/send") return "agent-api/send";
|
|
161
161
|
if (normalized === "/internal/agent-api/events") return "agent-api/events";
|
|
162
|
+
if (normalized === "/internal/agent-api/inbox") return "agent-api/inbox";
|
|
162
163
|
if (normalized === "/internal/agent-api/receive-ack") return "agent-api/events";
|
|
163
164
|
if (normalized === "/internal/agent-api/tasks/claim") return "tasks/claim";
|
|
164
165
|
if (normalized === "/internal/agent-api/tasks/update-status") return "tasks/update";
|
|
@@ -292,6 +293,7 @@ var ApiClient = class {
|
|
|
292
293
|
const suffix = pathname.slice(agentPrefix.length);
|
|
293
294
|
if (suffix === "/server") return "/internal/agent-api/server";
|
|
294
295
|
if (suffix === "/send") return "/internal/agent-api/send";
|
|
296
|
+
if (suffix === "/inbox" || suffix.startsWith("/inbox?")) return `/internal/agent-api/inbox${suffix.slice("/inbox".length)}`;
|
|
295
297
|
if (suffix.startsWith("/history")) return `/internal/agent-api/history${suffix.slice("/history".length)}`;
|
|
296
298
|
if (suffix.startsWith("/search")) return `/internal/agent-api/search${suffix.slice("/search".length)}`;
|
|
297
299
|
const messageResolve = /^\/messages\/([^/]+)\/resolve$/.exec(suffix);
|
|
@@ -15128,6 +15130,31 @@ function validateActionCardAction(action) {
|
|
|
15128
15130
|
return null;
|
|
15129
15131
|
}
|
|
15130
15132
|
|
|
15133
|
+
// ../shared/src/agentInbox.ts
|
|
15134
|
+
function formatAgentInboxSnapshot(rows) {
|
|
15135
|
+
if (rows.length === 0) return "Inbox: empty";
|
|
15136
|
+
return [
|
|
15137
|
+
`Inbox: ${rows.length} pending target${rows.length === 1 ? "" : "s"}`,
|
|
15138
|
+
"",
|
|
15139
|
+
...rows.flatMap((row) => [
|
|
15140
|
+
row.target,
|
|
15141
|
+
formatAgentInboxRowDetails(row),
|
|
15142
|
+
""
|
|
15143
|
+
])
|
|
15144
|
+
].join("\n").trimEnd();
|
|
15145
|
+
}
|
|
15146
|
+
function formatAgentInboxRowDetails(row) {
|
|
15147
|
+
const parts = [`pending: ${row.pendingCount} message${row.pendingCount === 1 ? "" : "s"}`];
|
|
15148
|
+
if (row.firstPendingMsgId) parts.push(`first msg=${shortMessageId(row.firstPendingMsgId)}`);
|
|
15149
|
+
if (row.latestSenderName) parts.push(`latest @${row.latestSenderName}`);
|
|
15150
|
+
if (row.latestMsgId) parts.push(`latest msg=${shortMessageId(row.latestMsgId)}`);
|
|
15151
|
+
parts.push(...row.flags);
|
|
15152
|
+
return parts.join(" \xB7 ");
|
|
15153
|
+
}
|
|
15154
|
+
function shortMessageId(value) {
|
|
15155
|
+
return value.slice(0, 8);
|
|
15156
|
+
}
|
|
15157
|
+
|
|
15131
15158
|
// ../shared/src/translationLanguages.ts
|
|
15132
15159
|
var SUPPORTED_TRANSLATION_LANGUAGE_CODES = [
|
|
15133
15160
|
"en",
|
|
@@ -15219,7 +15246,7 @@ var RUNTIMES = [
|
|
|
15219
15246
|
{ id: "cursor", displayName: "Cursor CLI", binary: "cursor-agent", supported: true },
|
|
15220
15247
|
{ id: "gemini", displayName: "Gemini CLI", binary: "gemini", supported: true },
|
|
15221
15248
|
{ id: "opencode", displayName: "OpenCode", binary: "opencode", supported: true },
|
|
15222
|
-
{ id: "pi", displayName: "Pi
|
|
15249
|
+
{ id: "pi", displayName: "Pi", binary: "pi", supported: true }
|
|
15223
15250
|
];
|
|
15224
15251
|
function getRuntimeDisplayName(id) {
|
|
15225
15252
|
return RUNTIMES.find((r) => r.id === id)?.displayName ?? id;
|
|
@@ -15744,6 +15771,31 @@ function registerKnowledgeGetCommand(parent, runtimeOptions) {
|
|
|
15744
15771
|
registerCliCommand(parent, knowledgeGetCommand, runtimeOptions);
|
|
15745
15772
|
}
|
|
15746
15773
|
|
|
15774
|
+
// src/commands/inbox/check.ts
|
|
15775
|
+
var inboxCheckCommand = defineCommand(
|
|
15776
|
+
{
|
|
15777
|
+
name: "check",
|
|
15778
|
+
description: "Show pending inbox targets without draining or reading message content."
|
|
15779
|
+
},
|
|
15780
|
+
async (ctx) => {
|
|
15781
|
+
const agentContext = ctx.loadAgentContext();
|
|
15782
|
+
const client = ctx.createApiClient(agentContext);
|
|
15783
|
+
const path6 = `/internal/agent/${encodeURIComponent(agentContext.agentId)}/inbox`;
|
|
15784
|
+
const response = await client.request("GET", path6);
|
|
15785
|
+
if (!response.ok) {
|
|
15786
|
+
throw new CliError({
|
|
15787
|
+
code: response.status >= 500 ? "SERVER_5XX" : "INBOX_CHECK_FAILED",
|
|
15788
|
+
message: response.error ?? `HTTP ${response.status}`
|
|
15789
|
+
});
|
|
15790
|
+
}
|
|
15791
|
+
writeText(ctx.io, `${formatAgentInboxSnapshot(response.data?.rows ?? [])}
|
|
15792
|
+
`);
|
|
15793
|
+
}
|
|
15794
|
+
);
|
|
15795
|
+
function registerInboxCheckCommand(parent, runtimeOptions) {
|
|
15796
|
+
registerCliCommand(parent, inboxCheckCommand, runtimeOptions);
|
|
15797
|
+
}
|
|
15798
|
+
|
|
15747
15799
|
// src/commands/thread/unfollow.ts
|
|
15748
15800
|
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
15749
15801
|
var SHORT_ID_RE = /^[0-9a-f]{8}$/i;
|
|
@@ -18579,6 +18631,8 @@ var manualCmd = program.command("manual").description("Slock Manual for Agents r
|
|
|
18579
18631
|
registerKnowledgeGetCommand(manualCmd);
|
|
18580
18632
|
var knowledgeCmd = program.command("knowledge").description("Legacy alias for `slock manual`");
|
|
18581
18633
|
registerKnowledgeGetCommand(knowledgeCmd);
|
|
18634
|
+
var inboxCmd = program.command("inbox").description("Inbox target summary operations");
|
|
18635
|
+
registerInboxCheckCommand(inboxCmd);
|
|
18582
18636
|
var messageCmd = program.command("message").description("Message operations");
|
|
18583
18637
|
registerSendCommand(messageCmd);
|
|
18584
18638
|
registerCheckCommand(messageCmd);
|
package/dist/core.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slock-ai/daemon",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"slock-daemon": "dist/index.js"
|
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
"release:alpha": "npm version prerelease --preid=alpha --no-git-tag-version && cd ../.. && pnpm install --lockfile-only && git add packages/daemon/package.json pnpm-lock.yaml && git commit -m \"chore: bump @slock-ai/daemon to v$(node -p \"require('./packages/daemon/package.json').version\")\" && git tag daemon-v$(node -p \"require('./packages/daemon/package.json').version\") && git push && git push --tags"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
+
"@earendil-works/pi-ai": "0.78.0",
|
|
40
|
+
"@earendil-works/pi-coding-agent": "0.78.0",
|
|
39
41
|
"@jackwener/opencli": "^1.8.0",
|
|
40
42
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
41
43
|
"commander": "^12.1.0",
|