svamp-cli 0.1.88 → 0.1.90
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/{agentCommands-B6IJhpDh.mjs → agentCommands-D2QEpvaX.mjs} +2 -2
- package/dist/cli.mjs +27 -27
- package/dist/{commands-Djujc-zQ.mjs → commands-C5XWrsEl.mjs} +2 -2
- package/dist/{commands-Cf89hwcf.mjs → commands-DXOA0IKj.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{package-mj9URwYh.mjs → package-CsZiZ1xu.mjs} +1 -1
- package/dist/{run-DYAOWCUY.mjs → run-BA1_dZPL.mjs} +1 -1
- package/dist/{run-DqxMiOd-.mjs → run-dfyrHpVu.mjs} +26 -0
- package/package.json +1 -1
|
@@ -145,7 +145,7 @@ async function sessionBroadcast(action, args) {
|
|
|
145
145
|
console.log(`Broadcast sent: ${action}`);
|
|
146
146
|
}
|
|
147
147
|
async function connectToMachineService() {
|
|
148
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
148
|
+
const { connectAndGetMachine } = await import('./commands-DXOA0IKj.mjs');
|
|
149
149
|
return connectAndGetMachine();
|
|
150
150
|
}
|
|
151
151
|
async function inboxSend(targetSessionId, opts) {
|
|
@@ -161,7 +161,7 @@ async function inboxSend(targetSessionId, opts) {
|
|
|
161
161
|
}
|
|
162
162
|
const { server, machine } = await connectToMachineService();
|
|
163
163
|
try {
|
|
164
|
-
const { resolveSessionId } = await import('./commands-
|
|
164
|
+
const { resolveSessionId } = await import('./commands-DXOA0IKj.mjs');
|
|
165
165
|
const sessions = await machine.listSessions();
|
|
166
166
|
const match = resolveSessionId(sessions, targetSessionId);
|
|
167
167
|
const fullTargetId = match.sessionId;
|
package/dist/cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as stopDaemon, s as startDaemon, d as daemonStatus } from './run-
|
|
1
|
+
import { b as stopDaemon, s as startDaemon, d as daemonStatus } from './run-dfyrHpVu.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -211,7 +211,7 @@ async function main() {
|
|
|
211
211
|
const { handleServiceCommand } = await import('./commands-BYbuedOK.mjs');
|
|
212
212
|
await handleServiceCommand();
|
|
213
213
|
} else if (subcommand === "process" || subcommand === "proc") {
|
|
214
|
-
const { processCommand } = await import('./commands-
|
|
214
|
+
const { processCommand } = await import('./commands-C5XWrsEl.mjs');
|
|
215
215
|
let machineId;
|
|
216
216
|
const processArgs = args.slice(1);
|
|
217
217
|
const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
|
|
@@ -229,7 +229,7 @@ async function main() {
|
|
|
229
229
|
} else if (!subcommand || subcommand === "start") {
|
|
230
230
|
await handleInteractiveCommand();
|
|
231
231
|
} else if (subcommand === "--version" || subcommand === "-v") {
|
|
232
|
-
const pkg = await import('./package-
|
|
232
|
+
const pkg = await import('./package-CsZiZ1xu.mjs').catch(() => ({ default: { version: "unknown" } }));
|
|
233
233
|
console.log(`svamp version: ${pkg.default.version}`);
|
|
234
234
|
} else {
|
|
235
235
|
console.error(`Unknown command: ${subcommand}`);
|
|
@@ -238,7 +238,7 @@ async function main() {
|
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
async function handleInteractiveCommand() {
|
|
241
|
-
const { runInteractive } = await import('./run-
|
|
241
|
+
const { runInteractive } = await import('./run-BA1_dZPL.mjs');
|
|
242
242
|
const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
|
|
243
243
|
let directory = process.cwd();
|
|
244
244
|
let resumeSessionId;
|
|
@@ -283,7 +283,7 @@ async function handleAgentCommand() {
|
|
|
283
283
|
return;
|
|
284
284
|
}
|
|
285
285
|
if (agentArgs[0] === "list") {
|
|
286
|
-
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-
|
|
286
|
+
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-dfyrHpVu.mjs').then(function (n) { return n.i; });
|
|
287
287
|
console.log("Known agents:");
|
|
288
288
|
for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
|
|
289
289
|
console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
|
|
@@ -295,7 +295,7 @@ async function handleAgentCommand() {
|
|
|
295
295
|
console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
|
|
296
296
|
return;
|
|
297
297
|
}
|
|
298
|
-
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-
|
|
298
|
+
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-dfyrHpVu.mjs').then(function (n) { return n.i; });
|
|
299
299
|
let cwd = process.cwd();
|
|
300
300
|
const filteredArgs = [];
|
|
301
301
|
for (let i = 0; i < agentArgs.length; i++) {
|
|
@@ -319,12 +319,12 @@ async function handleAgentCommand() {
|
|
|
319
319
|
console.log(`Starting ${config.agentName} agent in ${cwd}...`);
|
|
320
320
|
let backend;
|
|
321
321
|
if (KNOWN_MCP_AGENTS[config.agentName]) {
|
|
322
|
-
const { CodexMcpBackend } = await import('./run-
|
|
322
|
+
const { CodexMcpBackend } = await import('./run-dfyrHpVu.mjs').then(function (n) { return n.j; });
|
|
323
323
|
backend = new CodexMcpBackend({ cwd, log: logFn });
|
|
324
324
|
} else {
|
|
325
|
-
const { AcpBackend } = await import('./run-
|
|
326
|
-
const { GeminiTransport } = await import('./run-
|
|
327
|
-
const { DefaultTransport } = await import('./run-
|
|
325
|
+
const { AcpBackend } = await import('./run-dfyrHpVu.mjs').then(function (n) { return n.h; });
|
|
326
|
+
const { GeminiTransport } = await import('./run-dfyrHpVu.mjs').then(function (n) { return n.G; });
|
|
327
|
+
const { DefaultTransport } = await import('./run-dfyrHpVu.mjs').then(function (n) { return n.D; });
|
|
328
328
|
const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
|
|
329
329
|
backend = new AcpBackend({
|
|
330
330
|
agentName: config.agentName,
|
|
@@ -442,7 +442,7 @@ async function handleSessionCommand() {
|
|
|
442
442
|
printSessionHelp();
|
|
443
443
|
return;
|
|
444
444
|
}
|
|
445
|
-
const { sessionList, sessionSpawn, sessionStop, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionRalphStart, sessionRalphCancel, sessionRalphStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-
|
|
445
|
+
const { sessionList, sessionSpawn, sessionStop, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionRalphStart, sessionRalphCancel, sessionRalphStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-DXOA0IKj.mjs');
|
|
446
446
|
const parseFlagStr = (flag, shortFlag) => {
|
|
447
447
|
for (let i = 1; i < sessionArgs.length; i++) {
|
|
448
448
|
if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
|
|
@@ -502,7 +502,7 @@ async function handleSessionCommand() {
|
|
|
502
502
|
allowDomain.push(sessionArgs[++i]);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
const { parseShareArg } = await import('./commands-
|
|
505
|
+
const { parseShareArg } = await import('./commands-DXOA0IKj.mjs');
|
|
506
506
|
const shareEntries = share.map((s) => parseShareArg(s));
|
|
507
507
|
await sessionSpawn(agent, dir, targetMachineId, {
|
|
508
508
|
message,
|
|
@@ -588,7 +588,7 @@ async function handleSessionCommand() {
|
|
|
588
588
|
console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
|
|
589
589
|
process.exit(1);
|
|
590
590
|
}
|
|
591
|
-
const { sessionApprove } = await import('./commands-
|
|
591
|
+
const { sessionApprove } = await import('./commands-DXOA0IKj.mjs');
|
|
592
592
|
const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
593
593
|
await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
|
|
594
594
|
json: hasFlag("--json")
|
|
@@ -598,7 +598,7 @@ async function handleSessionCommand() {
|
|
|
598
598
|
console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
|
|
599
599
|
process.exit(1);
|
|
600
600
|
}
|
|
601
|
-
const { sessionDeny } = await import('./commands-
|
|
601
|
+
const { sessionDeny } = await import('./commands-DXOA0IKj.mjs');
|
|
602
602
|
const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
603
603
|
await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
|
|
604
604
|
json: hasFlag("--json")
|
|
@@ -634,7 +634,7 @@ async function handleSessionCommand() {
|
|
|
634
634
|
console.error("Usage: svamp session set-title <title>");
|
|
635
635
|
process.exit(1);
|
|
636
636
|
}
|
|
637
|
-
const { sessionSetTitle } = await import('./agentCommands-
|
|
637
|
+
const { sessionSetTitle } = await import('./agentCommands-D2QEpvaX.mjs');
|
|
638
638
|
await sessionSetTitle(title);
|
|
639
639
|
} else if (sessionSubcommand === "set-link") {
|
|
640
640
|
const url = sessionArgs[1];
|
|
@@ -643,7 +643,7 @@ async function handleSessionCommand() {
|
|
|
643
643
|
process.exit(1);
|
|
644
644
|
}
|
|
645
645
|
const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
646
|
-
const { sessionSetLink } = await import('./agentCommands-
|
|
646
|
+
const { sessionSetLink } = await import('./agentCommands-D2QEpvaX.mjs');
|
|
647
647
|
await sessionSetLink(url, label);
|
|
648
648
|
} else if (sessionSubcommand === "notify") {
|
|
649
649
|
const message = sessionArgs[1];
|
|
@@ -652,7 +652,7 @@ async function handleSessionCommand() {
|
|
|
652
652
|
process.exit(1);
|
|
653
653
|
}
|
|
654
654
|
const level = parseFlagStr("--level") || "info";
|
|
655
|
-
const { sessionNotify } = await import('./agentCommands-
|
|
655
|
+
const { sessionNotify } = await import('./agentCommands-D2QEpvaX.mjs');
|
|
656
656
|
await sessionNotify(message, level);
|
|
657
657
|
} else if (sessionSubcommand === "broadcast") {
|
|
658
658
|
const action = sessionArgs[1];
|
|
@@ -660,7 +660,7 @@ async function handleSessionCommand() {
|
|
|
660
660
|
console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
|
|
661
661
|
process.exit(1);
|
|
662
662
|
}
|
|
663
|
-
const { sessionBroadcast } = await import('./agentCommands-
|
|
663
|
+
const { sessionBroadcast } = await import('./agentCommands-D2QEpvaX.mjs');
|
|
664
664
|
await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
|
|
665
665
|
} else if (sessionSubcommand === "inbox") {
|
|
666
666
|
const inboxSubcmd = sessionArgs[1];
|
|
@@ -671,7 +671,7 @@ async function handleSessionCommand() {
|
|
|
671
671
|
process.exit(1);
|
|
672
672
|
}
|
|
673
673
|
if (agentSessionId) {
|
|
674
|
-
const { inboxSend } = await import('./agentCommands-
|
|
674
|
+
const { inboxSend } = await import('./agentCommands-D2QEpvaX.mjs');
|
|
675
675
|
await inboxSend(sessionArgs[2], {
|
|
676
676
|
body: sessionArgs[3],
|
|
677
677
|
subject: parseFlagStr("--subject"),
|
|
@@ -686,7 +686,7 @@ async function handleSessionCommand() {
|
|
|
686
686
|
}
|
|
687
687
|
} else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
|
|
688
688
|
if (agentSessionId && !sessionArgs[2]) {
|
|
689
|
-
const { inboxList } = await import('./agentCommands-
|
|
689
|
+
const { inboxList } = await import('./agentCommands-D2QEpvaX.mjs');
|
|
690
690
|
await inboxList({
|
|
691
691
|
unread: hasFlag("--unread"),
|
|
692
692
|
limit: parseFlagInt("--limit"),
|
|
@@ -708,7 +708,7 @@ async function handleSessionCommand() {
|
|
|
708
708
|
process.exit(1);
|
|
709
709
|
}
|
|
710
710
|
if (agentSessionId && !sessionArgs[3]) {
|
|
711
|
-
const { inboxList } = await import('./agentCommands-
|
|
711
|
+
const { inboxList } = await import('./agentCommands-D2QEpvaX.mjs');
|
|
712
712
|
await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
|
|
713
713
|
} else if (sessionArgs[3]) {
|
|
714
714
|
await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
@@ -718,7 +718,7 @@ async function handleSessionCommand() {
|
|
|
718
718
|
}
|
|
719
719
|
} else if (inboxSubcmd === "reply") {
|
|
720
720
|
if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
|
|
721
|
-
const { inboxReply } = await import('./agentCommands-
|
|
721
|
+
const { inboxReply } = await import('./agentCommands-D2QEpvaX.mjs');
|
|
722
722
|
await inboxReply(sessionArgs[2], sessionArgs[3]);
|
|
723
723
|
} else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
|
|
724
724
|
await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
|
|
@@ -754,7 +754,7 @@ async function handleMachineCommand() {
|
|
|
754
754
|
return;
|
|
755
755
|
}
|
|
756
756
|
if (machineSubcommand === "share") {
|
|
757
|
-
const { machineShare } = await import('./commands-
|
|
757
|
+
const { machineShare } = await import('./commands-DXOA0IKj.mjs');
|
|
758
758
|
let machineId;
|
|
759
759
|
const shareArgs = [];
|
|
760
760
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
@@ -784,7 +784,7 @@ async function handleMachineCommand() {
|
|
|
784
784
|
}
|
|
785
785
|
await machineShare(machineId, { add, remove, list, configPath, showConfig });
|
|
786
786
|
} else if (machineSubcommand === "exec") {
|
|
787
|
-
const { machineExec } = await import('./commands-
|
|
787
|
+
const { machineExec } = await import('./commands-DXOA0IKj.mjs');
|
|
788
788
|
let machineId;
|
|
789
789
|
let cwd;
|
|
790
790
|
const cmdParts = [];
|
|
@@ -804,7 +804,7 @@ async function handleMachineCommand() {
|
|
|
804
804
|
}
|
|
805
805
|
await machineExec(machineId, command, cwd);
|
|
806
806
|
} else if (machineSubcommand === "info") {
|
|
807
|
-
const { machineInfo } = await import('./commands-
|
|
807
|
+
const { machineInfo } = await import('./commands-DXOA0IKj.mjs');
|
|
808
808
|
let machineId;
|
|
809
809
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
810
810
|
if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
|
|
@@ -824,10 +824,10 @@ async function handleMachineCommand() {
|
|
|
824
824
|
level = machineArgs[++i];
|
|
825
825
|
}
|
|
826
826
|
}
|
|
827
|
-
const { machineNotify } = await import('./agentCommands-
|
|
827
|
+
const { machineNotify } = await import('./agentCommands-D2QEpvaX.mjs');
|
|
828
828
|
await machineNotify(message, level);
|
|
829
829
|
} else if (machineSubcommand === "ls") {
|
|
830
|
-
const { machineLs } = await import('./commands-
|
|
830
|
+
const { machineLs } = await import('./commands-DXOA0IKj.mjs');
|
|
831
831
|
let machineId;
|
|
832
832
|
let showHidden = false;
|
|
833
833
|
let path;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { writeFileSync, readFileSync } from 'fs';
|
|
2
2
|
import { resolve } from 'path';
|
|
3
|
-
import { connectAndGetMachine } from './commands-
|
|
3
|
+
import { connectAndGetMachine } from './commands-DXOA0IKj.mjs';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'node:child_process';
|
|
6
6
|
import 'node:path';
|
|
7
7
|
import 'node:os';
|
|
8
|
-
import './run-
|
|
8
|
+
import './run-dfyrHpVu.mjs';
|
|
9
9
|
import 'os';
|
|
10
10
|
import 'fs/promises';
|
|
11
11
|
import 'url';
|
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync } from 'node:fs';
|
|
|
2
2
|
import { execSync } from 'node:child_process';
|
|
3
3
|
import { resolve, join } from 'node:path';
|
|
4
4
|
import os from 'node:os';
|
|
5
|
-
import { l as loadSecurityContextConfig, e as resolveSecurityContext, f as buildSecurityContextFromFlags, m as mergeSecurityContexts, c as connectToHypha } from './run-
|
|
5
|
+
import { l as loadSecurityContextConfig, e as resolveSecurityContext, f as buildSecurityContextFromFlags, m as mergeSecurityContexts, c as connectToHypha } from './run-dfyrHpVu.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as connectToHypha, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, a as registerSessionService, s as startDaemon, b as stopDaemon } from './run-
|
|
1
|
+
export { c as connectToHypha, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, a as registerSessionService, s as startDaemon, b as stopDaemon } from './run-dfyrHpVu.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -2,7 +2,7 @@ import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(im
|
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import { join, resolve } from 'node:path';
|
|
4
4
|
import { mkdirSync, writeFileSync, existsSync, unlinkSync, readFileSync, watch } from 'node:fs';
|
|
5
|
-
import { c as connectToHypha, a as registerSessionService } from './run-
|
|
5
|
+
import { c as connectToHypha, a as registerSessionService } from './run-dfyrHpVu.mjs';
|
|
6
6
|
import { createServer } from 'node:http';
|
|
7
7
|
import { spawn } from 'node:child_process';
|
|
8
8
|
import { createInterface } from 'node:readline';
|
|
@@ -1163,6 +1163,29 @@ function createSessionStore(server, sessionId, initialMetadata, initialAgentStat
|
|
|
1163
1163
|
};
|
|
1164
1164
|
const inbox = [];
|
|
1165
1165
|
const INBOX_MAX = 100;
|
|
1166
|
+
const syncInboxToMetadata = () => {
|
|
1167
|
+
metadata.inbox = inbox.map((m) => ({
|
|
1168
|
+
messageId: m.messageId,
|
|
1169
|
+
body: m.body,
|
|
1170
|
+
timestamp: m.timestamp,
|
|
1171
|
+
read: m.read,
|
|
1172
|
+
from: m.from,
|
|
1173
|
+
fromSession: m.fromSession,
|
|
1174
|
+
to: m.to,
|
|
1175
|
+
subject: m.subject,
|
|
1176
|
+
urgency: m.urgency,
|
|
1177
|
+
replyTo: m.replyTo,
|
|
1178
|
+
cc: m.cc,
|
|
1179
|
+
threadId: m.threadId,
|
|
1180
|
+
...m.displayText ? { displayText: m.displayText } : {}
|
|
1181
|
+
}));
|
|
1182
|
+
metadataVersion++;
|
|
1183
|
+
notifyListeners({
|
|
1184
|
+
type: "update-session",
|
|
1185
|
+
sessionId,
|
|
1186
|
+
metadata: { value: metadata, version: metadataVersion }
|
|
1187
|
+
});
|
|
1188
|
+
};
|
|
1166
1189
|
const listeners = [];
|
|
1167
1190
|
const removeListener = (listener, reason) => {
|
|
1168
1191
|
const idx = listeners.indexOf(listener);
|
|
@@ -1513,6 +1536,7 @@ function createSessionStore(server, sessionId, initialMetadata, initialAgentStat
|
|
|
1513
1536
|
authorizeRequest(context, metadata.sharing, "interact");
|
|
1514
1537
|
inbox.push(message);
|
|
1515
1538
|
while (inbox.length > INBOX_MAX) inbox.shift();
|
|
1539
|
+
syncInboxToMetadata();
|
|
1516
1540
|
callbacks.onInboxMessage?.(message);
|
|
1517
1541
|
notifyListeners({ type: "inbox-update", sessionId, message });
|
|
1518
1542
|
return { success: true, messageId: message.messageId };
|
|
@@ -1530,6 +1554,7 @@ function createSessionStore(server, sessionId, initialMetadata, initialAgentStat
|
|
|
1530
1554
|
const msg = inbox.find((m) => m.messageId === messageId);
|
|
1531
1555
|
if (!msg) return { success: false, error: "Message not found" };
|
|
1532
1556
|
msg.read = true;
|
|
1557
|
+
syncInboxToMetadata();
|
|
1533
1558
|
notifyListeners({ type: "inbox-update", sessionId, message: msg });
|
|
1534
1559
|
return { success: true };
|
|
1535
1560
|
},
|
|
@@ -1542,6 +1567,7 @@ function createSessionStore(server, sessionId, initialMetadata, initialAgentStat
|
|
|
1542
1567
|
if (inbox[i].read) inbox.splice(i, 1);
|
|
1543
1568
|
}
|
|
1544
1569
|
}
|
|
1570
|
+
syncInboxToMetadata();
|
|
1545
1571
|
notifyListeners({ type: "inbox-update", sessionId, cleared: true });
|
|
1546
1572
|
return { success: true, remaining: inbox.length };
|
|
1547
1573
|
},
|