@integrity-labs/agt-cli 0.28.353 → 0.28.355
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/bin/agt.js +4 -4
- package/dist/{chunk-ZALWFOHO.js → chunk-LDIKBFDR.js} +10 -1
- package/dist/{chunk-ZALWFOHO.js.map → chunk-LDIKBFDR.js.map} +1 -1
- package/dist/{chunk-5MZMXKVD.js → chunk-R2D4AQGX.js} +41 -5
- package/dist/{chunk-5MZMXKVD.js.map → chunk-R2D4AQGX.js.map} +1 -1
- package/dist/{claude-pair-runtime-KO2HWC7E.js → claude-pair-runtime-LLUV4KX6.js} +2 -2
- package/dist/lib/manager-worker.js +87 -38
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +9 -0
- package/dist/mcp/origami.js +9 -0
- package/dist/mcp/slack-channel.js +9 -0
- package/dist/mcp/telegram-channel.js +9 -0
- package/dist/{persistent-session-WMQO3QKU.js → persistent-session-SZ5VHS4C.js} +2 -2
- package/dist/{responsiveness-probe-TCTSHDH3.js → responsiveness-probe-2D64EQAU.js} +2 -2
- package/package.json +1 -1
- /package/dist/{claude-pair-runtime-KO2HWC7E.js.map → claude-pair-runtime-LLUV4KX6.js.map} +0 -0
- /package/dist/{persistent-session-WMQO3QKU.js.map → persistent-session-SZ5VHS4C.js.map} +0 -0
- /package/dist/{responsiveness-probe-TCTSHDH3.js.map → responsiveness-probe-2D64EQAU.js.map} +0 -0
|
@@ -100,7 +100,7 @@ async function spawnPairSession(session) {
|
|
|
100
100
|
return { ok: true };
|
|
101
101
|
} catch {
|
|
102
102
|
}
|
|
103
|
-
const { resolveClaudeBinary } = await import("./persistent-session-
|
|
103
|
+
const { resolveClaudeBinary } = await import("./persistent-session-SZ5VHS4C.js");
|
|
104
104
|
const claudeBin = resolveClaudeBinary();
|
|
105
105
|
const pairEnv = {
|
|
106
106
|
...process.env,
|
|
@@ -373,4 +373,4 @@ export {
|
|
|
373
373
|
startClaudePair,
|
|
374
374
|
submitClaudePairCode
|
|
375
375
|
};
|
|
376
|
-
//# sourceMappingURL=claude-pair-runtime-
|
|
376
|
+
//# sourceMappingURL=claude-pair-runtime-LLUV4KX6.js.map
|
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
getHostId,
|
|
31
31
|
givenUpMcpServerKeys,
|
|
32
32
|
liveProxyExtraHeaderVars,
|
|
33
|
+
parseOpencodeModelRef,
|
|
33
34
|
pinAllowsUrgent,
|
|
34
35
|
provision,
|
|
35
36
|
provisionAutoKanbanProgressHook,
|
|
@@ -47,7 +48,7 @@ import {
|
|
|
47
48
|
safeWriteJsonAtomic,
|
|
48
49
|
setConfigHash,
|
|
49
50
|
toOpencodeModel
|
|
50
|
-
} from "../chunk-
|
|
51
|
+
} from "../chunk-R2D4AQGX.js";
|
|
51
52
|
import {
|
|
52
53
|
getProjectDir as getProjectDir2,
|
|
53
54
|
getReadyTasks,
|
|
@@ -138,14 +139,14 @@ import {
|
|
|
138
139
|
takeZombieDetection,
|
|
139
140
|
transcriptActivityAgeSeconds,
|
|
140
141
|
writeEgressAllowlist
|
|
141
|
-
} from "../chunk-
|
|
142
|
+
} from "../chunk-LDIKBFDR.js";
|
|
142
143
|
import {
|
|
143
144
|
reapOrphanChannelMcps
|
|
144
145
|
} from "../chunk-XWVM4KPK.js";
|
|
145
146
|
|
|
146
147
|
// src/lib/manager-worker.ts
|
|
147
148
|
import { createHash as createHash14 } from "crypto";
|
|
148
|
-
import { readFileSync as readFileSync19, writeFileSync as
|
|
149
|
+
import { readFileSync as readFileSync19, writeFileSync as writeFileSync12, mkdirSync as mkdirSync10, existsSync as existsSync13, rmSync as rmSync6, readdirSync as readdirSync5, statSync as statSync4, copyFileSync } from "fs";
|
|
149
150
|
import { execFileSync as syncExecFile } from "child_process";
|
|
150
151
|
import { join as join23, dirname as dirname6, delimiter as pathDelimiter } from "path";
|
|
151
152
|
import { homedir as homedir12 } from "os";
|
|
@@ -5636,7 +5637,7 @@ async function syncAndCheckClaudeScheduler(agent, tasks, boardItems, refreshData
|
|
|
5636
5637
|
import { spawn, execSync } from "child_process";
|
|
5637
5638
|
import { createServer } from "net";
|
|
5638
5639
|
import { randomBytes } from "crypto";
|
|
5639
|
-
import { existsSync as existsSync10, mkdirSync as mkdirSync7, readFileSync as readFileSync16 } from "fs";
|
|
5640
|
+
import { existsSync as existsSync10, mkdirSync as mkdirSync7, readFileSync as readFileSync16, writeFileSync as writeFileSync9, rmSync as rmSync4, chmodSync as chmodSync2 } from "fs";
|
|
5640
5641
|
import { homedir as homedir10, userInfo } from "os";
|
|
5641
5642
|
import { join as join20 } from "path";
|
|
5642
5643
|
var OPENCODE_BIN = process.env["AGT_OPENCODE_BIN"]?.trim() || "opencode";
|
|
@@ -5649,14 +5650,50 @@ function opencodePaneLogPath(codeName) {
|
|
|
5649
5650
|
return join20(homedir10(), ".augmented", codeName, "opencode-serve.log");
|
|
5650
5651
|
}
|
|
5651
5652
|
function readProvisionedOpencodeModel(agentDir) {
|
|
5653
|
+
return readOpencodeModelString(join20(agentDir, "provision", "opencode.json"));
|
|
5654
|
+
}
|
|
5655
|
+
function readOpencodeModelString(configPath) {
|
|
5652
5656
|
try {
|
|
5653
|
-
const
|
|
5654
|
-
const parsed = JSON.parse(raw);
|
|
5657
|
+
const parsed = JSON.parse(readFileSync16(configPath, "utf-8"));
|
|
5655
5658
|
return typeof parsed.model === "string" ? parsed.model : null;
|
|
5656
5659
|
} catch {
|
|
5657
5660
|
return null;
|
|
5658
5661
|
}
|
|
5659
5662
|
}
|
|
5663
|
+
function readOpencodeModelFromConfigDir(configDir) {
|
|
5664
|
+
return parseOpencodeModelRef(readOpencodeModelString(join20(configDir, "opencode.json")));
|
|
5665
|
+
}
|
|
5666
|
+
function materializeEnvPlaceholders(raw, env) {
|
|
5667
|
+
return raw.replace(/\{env:([A-Za-z_][A-Za-z0-9_]*)\}/g, (whole, name) => {
|
|
5668
|
+
const v = env[name];
|
|
5669
|
+
return typeof v === "string" && v.length > 0 ? v : whole;
|
|
5670
|
+
});
|
|
5671
|
+
}
|
|
5672
|
+
var MATERIALIZED_CONFIG_BASENAME = "opencode.jsonc";
|
|
5673
|
+
function writeMaterializedOpencodeConfig(codeName, projectDir, serveEnv, log2) {
|
|
5674
|
+
const target = join20(projectDir, MATERIALIZED_CONFIG_BASENAME);
|
|
5675
|
+
let raw;
|
|
5676
|
+
try {
|
|
5677
|
+
raw = readFileSync16(join20(projectDir, "opencode.json"), "utf-8");
|
|
5678
|
+
} catch {
|
|
5679
|
+
try {
|
|
5680
|
+
if (existsSync10(target)) rmSync4(target);
|
|
5681
|
+
} catch {
|
|
5682
|
+
}
|
|
5683
|
+
return true;
|
|
5684
|
+
}
|
|
5685
|
+
try {
|
|
5686
|
+
writeFileSync9(target, materializeEnvPlaceholders(raw, serveEnv), { mode: 384 });
|
|
5687
|
+
} catch (err) {
|
|
5688
|
+
log2(`[opencode-session] failed to write materialized opencode.jsonc for '${codeName}': ${err.message}`);
|
|
5689
|
+
return false;
|
|
5690
|
+
}
|
|
5691
|
+
try {
|
|
5692
|
+
chmodSync2(target, 384);
|
|
5693
|
+
} catch {
|
|
5694
|
+
}
|
|
5695
|
+
return true;
|
|
5696
|
+
}
|
|
5660
5697
|
function baseUrlFor(port) {
|
|
5661
5698
|
return `http://127.0.0.1:${port}`;
|
|
5662
5699
|
}
|
|
@@ -5695,7 +5732,8 @@ async function startOpencodeSession(config2) {
|
|
|
5695
5732
|
status: "crashed",
|
|
5696
5733
|
port: null,
|
|
5697
5734
|
password: null,
|
|
5698
|
-
lastFailureTail: "opencode isolation not implemented (ADR-0047)"
|
|
5735
|
+
lastFailureTail: "opencode isolation not implemented (ADR-0047)",
|
|
5736
|
+
model: null
|
|
5699
5737
|
};
|
|
5700
5738
|
sessions.set(codeName, blocked);
|
|
5701
5739
|
return blocked;
|
|
@@ -5707,7 +5745,11 @@ async function startOpencodeSession(config2) {
|
|
|
5707
5745
|
status: "starting",
|
|
5708
5746
|
port: null,
|
|
5709
5747
|
password: null,
|
|
5710
|
-
lastFailureTail: existing?.lastFailureTail ?? null
|
|
5748
|
+
lastFailureTail: existing?.lastFailureTail ?? null,
|
|
5749
|
+
// ENG-7931: parse the resolved model from the provisioned opencode.json
|
|
5750
|
+
// (config.projectDir IS the provision dir the serve reads) so the bridge can
|
|
5751
|
+
// pass it explicitly on session-create + prompt.
|
|
5752
|
+
model: readOpencodeModelFromConfigDir(config2.projectDir)
|
|
5711
5753
|
};
|
|
5712
5754
|
sessions.set(codeName, session);
|
|
5713
5755
|
try {
|
|
@@ -5743,6 +5785,9 @@ async function spawnServe(config2, session) {
|
|
|
5743
5785
|
};
|
|
5744
5786
|
if (config2.runId) serveEnv["AGT_RUN_ID"] = config2.runId;
|
|
5745
5787
|
if (config2.agentTimezone) serveEnv["TZ"] = config2.agentTimezone;
|
|
5788
|
+
if (!writeMaterializedOpencodeConfig(codeName, projectDir, serveEnv, log2)) {
|
|
5789
|
+
throw new Error("failed to write materialized opencode.jsonc (serve would 401 on the {env:\u2026} template)");
|
|
5790
|
+
}
|
|
5746
5791
|
const serveCmd = `${OPENCODE_BIN} serve --hostname 127.0.0.1 --port ${port} --print-logs`;
|
|
5747
5792
|
log2(`[opencode-session] starting '${tmuxSession}' for '${codeName}' on 127.0.0.1:${port}`);
|
|
5748
5793
|
const child = spawn(
|
|
@@ -5813,7 +5858,11 @@ function getBridge(codeName, port, password) {
|
|
|
5813
5858
|
const cached = bridges.get(codeName);
|
|
5814
5859
|
if (cached && cached.port === port && cached.password === password) return cached.bridge;
|
|
5815
5860
|
const client2 = new HttpOpencodeClient({ baseUrl: baseUrlFor(port), password });
|
|
5816
|
-
const
|
|
5861
|
+
const model = sessions.get(codeName)?.model ?? null;
|
|
5862
|
+
const bridge = new OpencodeInboundBridge({
|
|
5863
|
+
client: client2,
|
|
5864
|
+
sessionDefaults: model ? { model } : void 0
|
|
5865
|
+
});
|
|
5817
5866
|
bridges.set(codeName, { port, password, bridge });
|
|
5818
5867
|
return bridge;
|
|
5819
5868
|
}
|
|
@@ -6972,7 +7021,7 @@ async function fireOpencodeScheduledTask(agent, task) {
|
|
|
6972
7021
|
|
|
6973
7022
|
// src/lib/opencode-telegram-ingest.ts
|
|
6974
7023
|
import { createHash as createHash13 } from "crypto";
|
|
6975
|
-
import { existsSync as existsSync11, mkdirSync as mkdirSync8, readFileSync as readFileSync17, renameSync as renameSync2, unlinkSync, writeFileSync as
|
|
7024
|
+
import { existsSync as existsSync11, mkdirSync as mkdirSync8, readFileSync as readFileSync17, renameSync as renameSync2, unlinkSync, writeFileSync as writeFileSync10 } from "fs";
|
|
6976
7025
|
import { randomUUID } from "crypto";
|
|
6977
7026
|
import { join as join21 } from "path";
|
|
6978
7027
|
|
|
@@ -7550,7 +7599,7 @@ function createFileOffsetStore(codeName, log2, currentBotId) {
|
|
|
7550
7599
|
const tmpPath = `${filePath}.${process.pid}.${randomUUID()}.tmp`;
|
|
7551
7600
|
try {
|
|
7552
7601
|
mkdirSync8(dir, { recursive: true, mode: 448 });
|
|
7553
|
-
|
|
7602
|
+
writeFileSync10(
|
|
7554
7603
|
tmpPath,
|
|
7555
7604
|
JSON.stringify({
|
|
7556
7605
|
offset,
|
|
@@ -7781,7 +7830,7 @@ function partitionActionableByPoison(actionable, states, config2) {
|
|
|
7781
7830
|
}
|
|
7782
7831
|
|
|
7783
7832
|
// src/lib/restart-flags.ts
|
|
7784
|
-
import { existsSync as existsSync12, mkdirSync as mkdirSync9, readdirSync as readdirSync4, readFileSync as readFileSync18, renameSync as renameSync3, rmSync as
|
|
7833
|
+
import { existsSync as existsSync12, mkdirSync as mkdirSync9, readdirSync as readdirSync4, readFileSync as readFileSync18, renameSync as renameSync3, rmSync as rmSync5, writeFileSync as writeFileSync11 } from "fs";
|
|
7785
7834
|
import { homedir as homedir11 } from "os";
|
|
7786
7835
|
import { join as join22 } from "path";
|
|
7787
7836
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
@@ -7817,7 +7866,7 @@ function readRestartFlags() {
|
|
|
7817
7866
|
function deleteRestartFlag(codeName) {
|
|
7818
7867
|
const path = flagPath(codeName);
|
|
7819
7868
|
if (existsSync12(path)) {
|
|
7820
|
-
|
|
7869
|
+
rmSync5(path, { force: true });
|
|
7821
7870
|
}
|
|
7822
7871
|
}
|
|
7823
7872
|
|
|
@@ -9411,7 +9460,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
9411
9460
|
var lastVersionCheckAt = 0;
|
|
9412
9461
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
9413
9462
|
var lastResponsivenessProbeAt = 0;
|
|
9414
|
-
var agtCliVersion = true ? "0.28.
|
|
9463
|
+
var agtCliVersion = true ? "0.28.355" : "dev";
|
|
9415
9464
|
function resolveBrewPath(execFileSync2) {
|
|
9416
9465
|
try {
|
|
9417
9466
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -9607,7 +9656,7 @@ function ensureClaudeManagedSettings(path = claudeManagedSettingsPath()) {
|
|
|
9607
9656
|
if (settings.channelsEnabled === true) return "ok";
|
|
9608
9657
|
settings.channelsEnabled = true;
|
|
9609
9658
|
mkdirSync10(dirname6(path), { recursive: true });
|
|
9610
|
-
|
|
9659
|
+
writeFileSync12(path, `${JSON.stringify(settings, null, 2)}
|
|
9611
9660
|
`);
|
|
9612
9661
|
log(`[managed-settings] set channelsEnabled:true in ${path} (ENG-5786 \u2014 unblocks Claude Code channels)`);
|
|
9613
9662
|
return "ok";
|
|
@@ -10140,7 +10189,7 @@ function ensureEvalEmptyMcpConfig() {
|
|
|
10140
10189
|
} catch {
|
|
10141
10190
|
}
|
|
10142
10191
|
const p = join23(dir, ".eval-empty-mcp.json");
|
|
10143
|
-
|
|
10192
|
+
writeFileSync12(p, JSON.stringify({ mcpServers: {} }));
|
|
10144
10193
|
evalEmptyMcpConfigPath = p;
|
|
10145
10194
|
return p;
|
|
10146
10195
|
}
|
|
@@ -10361,7 +10410,7 @@ function parseSkillFrontmatter(content) {
|
|
|
10361
10410
|
return out;
|
|
10362
10411
|
}
|
|
10363
10412
|
async function refreshSkillsIndexInClaudeMd(configDir, codeName, log2) {
|
|
10364
|
-
const { readdirSync: readdirSync6, readFileSync: rfs, existsSync: ex, writeFileSync:
|
|
10413
|
+
const { readdirSync: readdirSync6, readFileSync: rfs, existsSync: ex, writeFileSync: writeFileSync13 } = await import("fs");
|
|
10365
10414
|
const skillsDir = join23(configDir, codeName, "project", ".claude", "skills");
|
|
10366
10415
|
const claudeMdPath = join23(configDir, codeName, "project", "CLAUDE.md");
|
|
10367
10416
|
if (!ex(skillsDir) || !ex(claudeMdPath)) return;
|
|
@@ -10409,7 +10458,7 @@ ${SKILLS_INDEX_END}`;
|
|
|
10409
10458
|
next = current.trimEnd() + "\n\n" + section + "\n";
|
|
10410
10459
|
}
|
|
10411
10460
|
if (next !== current) {
|
|
10412
|
-
|
|
10461
|
+
writeFileSync13(claudeMdPath, next, "utf-8");
|
|
10413
10462
|
log2(`Refreshed skills index in CLAUDE.md for '${codeName}' (${entries.length} skills)`);
|
|
10414
10463
|
}
|
|
10415
10464
|
}
|
|
@@ -10430,7 +10479,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
10430
10479
|
if (codeNames.length === 0) return;
|
|
10431
10480
|
void (async () => {
|
|
10432
10481
|
try {
|
|
10433
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
10482
|
+
const { collectDiagnostics } = await import("../persistent-session-SZ5VHS4C.js");
|
|
10434
10483
|
await api.post("/host/heartbeat", {
|
|
10435
10484
|
host_id: hostId,
|
|
10436
10485
|
agent_diagnostics: collectDiagnostics(codeNames)
|
|
@@ -10529,7 +10578,7 @@ async function pollCycle() {
|
|
|
10529
10578
|
}
|
|
10530
10579
|
try {
|
|
10531
10580
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
10532
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
10581
|
+
const { collectDiagnostics } = await import("../persistent-session-SZ5VHS4C.js");
|
|
10533
10582
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
10534
10583
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
|
|
10535
10584
|
let tailscaleHostname;
|
|
@@ -10684,7 +10733,7 @@ async function pollCycle() {
|
|
|
10684
10733
|
const {
|
|
10685
10734
|
collectResponsivenessProbes,
|
|
10686
10735
|
getResponsivenessIntervalMs
|
|
10687
|
-
} = await import("../responsiveness-probe-
|
|
10736
|
+
} = await import("../responsiveness-probe-2D64EQAU.js");
|
|
10688
10737
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
10689
10738
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
10690
10739
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -10716,7 +10765,7 @@ async function pollCycle() {
|
|
|
10716
10765
|
collectResponsivenessProbes,
|
|
10717
10766
|
livePendingInboundOldestAgeSeconds,
|
|
10718
10767
|
parkPendingInbound
|
|
10719
|
-
} = await import("../responsiveness-probe-
|
|
10768
|
+
} = await import("../responsiveness-probe-2D64EQAU.js");
|
|
10720
10769
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-HYOOQV4A.js");
|
|
10721
10770
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
10722
10771
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -11590,7 +11639,7 @@ async function processAgent(agent, agentStates) {
|
|
|
11590
11639
|
if (file.relativePath === ".mcp.json") {
|
|
11591
11640
|
safeWriteJsonAtomic(filePath, file.content, { mode: 384 });
|
|
11592
11641
|
} else {
|
|
11593
|
-
|
|
11642
|
+
writeFileSync12(filePath, file.content);
|
|
11594
11643
|
}
|
|
11595
11644
|
}
|
|
11596
11645
|
try {
|
|
@@ -11599,7 +11648,7 @@ async function processAgent(agent, agentStates) {
|
|
|
11599
11648
|
for (const folder of readdirSync5(provSkillsDir)) {
|
|
11600
11649
|
if (folder.startsWith("knowledge-")) {
|
|
11601
11650
|
try {
|
|
11602
|
-
|
|
11651
|
+
rmSync6(join23(provSkillsDir, folder), { recursive: true });
|
|
11603
11652
|
} catch {
|
|
11604
11653
|
}
|
|
11605
11654
|
}
|
|
@@ -11637,7 +11686,7 @@ async function processAgent(agent, agentStates) {
|
|
|
11637
11686
|
if (!file.endsWith(".js")) continue;
|
|
11638
11687
|
if (expected.has(file)) continue;
|
|
11639
11688
|
try {
|
|
11640
|
-
|
|
11689
|
+
rmSync6(join23(provWorkflowsDir, file));
|
|
11641
11690
|
} catch {
|
|
11642
11691
|
}
|
|
11643
11692
|
}
|
|
@@ -12174,7 +12223,7 @@ async function processAgent(agent, agentStates) {
|
|
|
12174
12223
|
const staleChannelsPath = join23(projectDir, ".mcp-channels.json");
|
|
12175
12224
|
if (existsSync13(staleChannelsPath)) {
|
|
12176
12225
|
try {
|
|
12177
|
-
|
|
12226
|
+
rmSync6(staleChannelsPath, { force: true });
|
|
12178
12227
|
} catch {
|
|
12179
12228
|
}
|
|
12180
12229
|
}
|
|
@@ -12594,7 +12643,7 @@ async function processAgent(agent, agentStates) {
|
|
|
12594
12643
|
}
|
|
12595
12644
|
}
|
|
12596
12645
|
try {
|
|
12597
|
-
const { readdirSync: readdirSync6, rmSync:
|
|
12646
|
+
const { readdirSync: readdirSync6, rmSync: rmSync7 } = await import("fs");
|
|
12598
12647
|
const { homedir: homedir13 } = await import("os");
|
|
12599
12648
|
const frameworkId2 = frameworkAdapter.id;
|
|
12600
12649
|
const candidateSkillDirs = [
|
|
@@ -12622,7 +12671,7 @@ async function processAgent(agent, agentStates) {
|
|
|
12622
12671
|
for (const dir of existingDirs) {
|
|
12623
12672
|
const p = join23(dir, entry);
|
|
12624
12673
|
if (existsSync13(p)) {
|
|
12625
|
-
|
|
12674
|
+
rmSync7(p, { recursive: true, force: true });
|
|
12626
12675
|
}
|
|
12627
12676
|
}
|
|
12628
12677
|
log(`Removed ${reason} '${entry}' for '${agent.code_name}' (framework=${frameworkId2})`);
|
|
@@ -12669,7 +12718,7 @@ async function processAgent(agent, agentStates) {
|
|
|
12669
12718
|
for (const dir of globalSkillDirs) {
|
|
12670
12719
|
const p = join23(dir, id);
|
|
12671
12720
|
if (existsSync13(p) && existsSync13(join23(p, "SKILL.md"))) {
|
|
12672
|
-
|
|
12721
|
+
rmSync6(p, { recursive: true, force: true });
|
|
12673
12722
|
prunedAny = true;
|
|
12674
12723
|
}
|
|
12675
12724
|
}
|
|
@@ -13871,7 +13920,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
13871
13920
|
void api.post("/host/restart-ack", { host_id: hostId, agent_id: agentId, restart_requested_at: requestedAt }).catch((err) => log(`[restart-lane] ack failed for '${codeName}': ${err.message}`));
|
|
13872
13921
|
void (async () => {
|
|
13873
13922
|
try {
|
|
13874
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
13923
|
+
const { collectDiagnostics } = await import("../persistent-session-SZ5VHS4C.js");
|
|
13875
13924
|
await api.post("/host/heartbeat", {
|
|
13876
13925
|
host_id: hostId,
|
|
13877
13926
|
agent_diagnostics: collectDiagnostics([codeName])
|
|
@@ -13921,7 +13970,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
13921
13970
|
}
|
|
13922
13971
|
try {
|
|
13923
13972
|
const hostId = await getHostId();
|
|
13924
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
13973
|
+
const { collectDiagnostics } = await import("../persistent-session-SZ5VHS4C.js");
|
|
13925
13974
|
await api.post("/host/heartbeat", {
|
|
13926
13975
|
host_id: hostId,
|
|
13927
13976
|
agent_diagnostics: collectDiagnostics([codeName])
|
|
@@ -14208,7 +14257,7 @@ async function processDirectChatMessage(agent, msg) {
|
|
|
14208
14257
|
try {
|
|
14209
14258
|
const doorbell = directChatDoorbellPath(agent.agentId, homedir12());
|
|
14210
14259
|
mkdirSync10(dirname6(doorbell), { recursive: true });
|
|
14211
|
-
|
|
14260
|
+
writeFileSync12(doorbell, String(Date.now()));
|
|
14212
14261
|
log(`[direct-chat] Doorbell rung for '${agent.codeName}' (msg=${msg.id}) \u2014 in-session MCP will pull via the cursor`);
|
|
14213
14262
|
return;
|
|
14214
14263
|
} catch (err) {
|
|
@@ -14318,7 +14367,7 @@ ${formatRunMarker(run_id)}` : KANBAN_CHECK_COMMAND;
|
|
|
14318
14367
|
try {
|
|
14319
14368
|
const doorbell = directChatDoorbellPath(agentId, homedir12());
|
|
14320
14369
|
mkdirSync10(dirname6(doorbell), { recursive: true });
|
|
14321
|
-
|
|
14370
|
+
writeFileSync12(doorbell, String(Date.now()));
|
|
14322
14371
|
} catch (err) {
|
|
14323
14372
|
log(`[kanban] doorbell ring failed for '${codeName}': ${err.message} (notice still queued)`);
|
|
14324
14373
|
}
|
|
@@ -14419,7 +14468,7 @@ async function processClaudePairSessions(agents) {
|
|
|
14419
14468
|
killPairSession,
|
|
14420
14469
|
pairTmuxSession,
|
|
14421
14470
|
finalizeClaudePairOnboarding
|
|
14422
|
-
} = await import("../claude-pair-runtime-
|
|
14471
|
+
} = await import("../claude-pair-runtime-LLUV4KX6.js");
|
|
14423
14472
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
14424
14473
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
14425
14474
|
const killed = await killPairSession(pairTmuxSession(pairId));
|
|
@@ -14764,10 +14813,10 @@ ${mem.content}
|
|
|
14764
14813
|
} catch {
|
|
14765
14814
|
}
|
|
14766
14815
|
if (existing === desired) continue;
|
|
14767
|
-
|
|
14816
|
+
writeFileSync12(filePath, desired);
|
|
14768
14817
|
overwritten++;
|
|
14769
14818
|
} else {
|
|
14770
|
-
|
|
14819
|
+
writeFileSync12(filePath, desired);
|
|
14771
14820
|
written++;
|
|
14772
14821
|
}
|
|
14773
14822
|
}
|
|
@@ -14786,7 +14835,7 @@ ${mem.content}
|
|
|
14786
14835
|
async function cleanupAgentFiles(codeName, agentDir) {
|
|
14787
14836
|
if (existsSync13(agentDir)) {
|
|
14788
14837
|
try {
|
|
14789
|
-
|
|
14838
|
+
rmSync6(agentDir, { recursive: true, force: true });
|
|
14790
14839
|
log(`Removed provision directory for '${codeName}'`);
|
|
14791
14840
|
} catch (err) {
|
|
14792
14841
|
log(`Failed to remove provision dir for '${codeName}': ${err.message}`);
|
|
@@ -15289,7 +15338,7 @@ function deployMcpAssets() {
|
|
|
15289
15338
|
if (!augServer) continue;
|
|
15290
15339
|
augServer.command = "node";
|
|
15291
15340
|
augServer.args = [localMcpPath];
|
|
15292
|
-
|
|
15341
|
+
writeFileSync12(mcpJsonPath, JSON.stringify(mcpConfig, null, 2));
|
|
15293
15342
|
log(`[manager] Patched ${entry.name}/${subdir}/.mcp.json: npx \u2192 node`);
|
|
15294
15343
|
} catch {
|
|
15295
15344
|
}
|