@integrity-labs/agt-cli 0.28.1182 → 0.28.1184
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 +6 -6
- package/dist/{chunk-B4Y5MJHG.js → chunk-2DWMFJEV.js} +3 -3
- package/dist/{chunk-UAGBLWU2.js → chunk-5L2UZW22.js} +2 -2
- package/dist/{chunk-475LAYAZ.js → chunk-B57YZ2QD.js} +9 -3
- package/dist/chunk-B57YZ2QD.js.map +1 -0
- package/dist/{chunk-OHGGDZVQ.js → chunk-CIZ2UI77.js} +5 -5
- package/dist/{chunk-AR72EF4W.js → chunk-TGHAQABK.js} +7 -2
- package/dist/{chunk-AR72EF4W.js.map → chunk-TGHAQABK.js.map} +1 -1
- package/dist/{claude-code-updater-ZKXTHHWL.js → claude-code-updater-JYVD3MJJ.js} +3 -3
- package/dist/{claude-pair-runtime-YL5FVVDV.js → claude-pair-runtime-IJAQHR2V.js} +3 -3
- package/dist/lib/manager-worker.js +179 -100
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +5 -1
- package/dist/mcp/index.js +88 -1
- package/dist/mcp/origami.js +4 -1
- package/dist/mcp/slack-channel.js +5 -1
- package/dist/mcp/telegram-channel.js +5 -1
- package/dist/{persistent-session-KCVIJ5R7.js → persistent-session-C7632TPG.js} +4 -4
- package/dist/{responsiveness-probe-GLNAS7ZG.js → responsiveness-probe-NFT3GSDL.js} +4 -4
- package/dist/{session-auth-dead-5KYOFOTM.js → session-auth-dead-BTGGL4MA.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-475LAYAZ.js.map +0 -1
- /package/dist/{chunk-B4Y5MJHG.js.map → chunk-2DWMFJEV.js.map} +0 -0
- /package/dist/{chunk-UAGBLWU2.js.map → chunk-5L2UZW22.js.map} +0 -0
- /package/dist/{chunk-OHGGDZVQ.js.map → chunk-CIZ2UI77.js.map} +0 -0
- /package/dist/{claude-code-updater-ZKXTHHWL.js.map → claude-code-updater-JYVD3MJJ.js.map} +0 -0
- /package/dist/{claude-pair-runtime-YL5FVVDV.js.map → claude-pair-runtime-IJAQHR2V.js.map} +0 -0
- /package/dist/{persistent-session-KCVIJ5R7.js.map → persistent-session-C7632TPG.js.map} +0 -0
- /package/dist/{responsiveness-probe-GLNAS7ZG.js.map → responsiveness-probe-NFT3GSDL.js.map} +0 -0
- /package/dist/{session-auth-dead-5KYOFOTM.js.map → session-auth-dead-BTGGL4MA.js.map} +0 -0
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
tripClass,
|
|
83
83
|
writeEtcEnvironment,
|
|
84
84
|
writeProfileDScript
|
|
85
|
-
} from "../chunk-
|
|
85
|
+
} from "../chunk-CIZ2UI77.js";
|
|
86
86
|
import {
|
|
87
87
|
CLAUDE_CODE_SECURITY_FLOOR,
|
|
88
88
|
SELF_UPDATE_TIMEOUTS,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
runSafeCleanup,
|
|
97
97
|
tightestDiskStat,
|
|
98
98
|
withPackageCacheLock
|
|
99
|
-
} from "../chunk-
|
|
99
|
+
} from "../chunk-5L2UZW22.js";
|
|
100
100
|
import {
|
|
101
101
|
rewriteSupervisorApiKey,
|
|
102
102
|
supervisorChannelsRefusing
|
|
@@ -188,16 +188,17 @@ import {
|
|
|
188
188
|
webFetchBaselineValue,
|
|
189
189
|
webFetchRestartNeeded,
|
|
190
190
|
writeEgressAllowlist
|
|
191
|
-
} from "../chunk-
|
|
191
|
+
} from "../chunk-2DWMFJEV.js";
|
|
192
192
|
import {
|
|
193
193
|
isAgentIdle,
|
|
194
194
|
isStaleForToday,
|
|
195
195
|
minutesSinceLocalMidnight,
|
|
196
196
|
peekCurrentSession,
|
|
197
|
+
peekPreviousSession,
|
|
197
198
|
sessionTranscriptDir,
|
|
198
199
|
subagentActivityAgeSeconds,
|
|
199
200
|
transcriptActivityAgeSeconds
|
|
200
|
-
} from "../chunk-
|
|
201
|
+
} from "../chunk-TGHAQABK.js";
|
|
201
202
|
import {
|
|
202
203
|
classifyUnanswerablePane,
|
|
203
204
|
focusedConfirmDialogBlock,
|
|
@@ -320,7 +321,7 @@ import {
|
|
|
320
321
|
stabiliseResetInstant,
|
|
321
322
|
sumTranscriptUsageInWindow,
|
|
322
323
|
summarizeTranscriptActivity
|
|
323
|
-
} from "../chunk-
|
|
324
|
+
} from "../chunk-B57YZ2QD.js";
|
|
324
325
|
import {
|
|
325
326
|
CLAUDE_CONFIG_DIR_ENV,
|
|
326
327
|
claudeConfigDirFor,
|
|
@@ -332,7 +333,7 @@ import "../chunk-DGUM43GV.js";
|
|
|
332
333
|
|
|
333
334
|
// src/lib/manager-worker.ts
|
|
334
335
|
import { createHash as createHash20 } from "crypto";
|
|
335
|
-
import { readFileSync as
|
|
336
|
+
import { readFileSync as readFileSync35, writeFileSync as writeFileSync18, mkdirSync as mkdirSync16, existsSync as existsSync19, rmSync as rmSync8, readdirSync as readdirSync14, statSync as statSync15, unlinkSync as unlinkSync6, renameSync as renameSync11, utimesSync as utimesSync4, readlinkSync as readlinkSync2 } from "fs";
|
|
336
337
|
|
|
337
338
|
// src/lib/atomic-file-replace.ts
|
|
338
339
|
import { copyFileSync, renameSync, unlinkSync } from "fs";
|
|
@@ -3021,11 +3022,11 @@ function isPathInsideDir(candidate, dir) {
|
|
|
3021
3022
|
}
|
|
3022
3023
|
function findMissingMcpBundles(mcpConfigPath, deps = {}) {
|
|
3023
3024
|
const existsSync20 = deps.existsSync ?? nodeExistsSync;
|
|
3024
|
-
const
|
|
3025
|
+
const readFileSync36 = deps.readFileSync ?? nodeReadFileSync;
|
|
3025
3026
|
const mcpDir = deps.mcpDir ?? getSharedMcpDir();
|
|
3026
3027
|
let parsed;
|
|
3027
3028
|
try {
|
|
3028
|
-
parsed = JSON.parse(
|
|
3029
|
+
parsed = JSON.parse(readFileSync36(mcpConfigPath, "utf-8"));
|
|
3029
3030
|
} catch {
|
|
3030
3031
|
return [];
|
|
3031
3032
|
}
|
|
@@ -4826,7 +4827,7 @@ function failingTurnLoops(now = Date.now(), threshold = failingTurnThreshold(),
|
|
|
4826
4827
|
}
|
|
4827
4828
|
|
|
4828
4829
|
// src/lib/session-activity.ts
|
|
4829
|
-
import { readdirSync as readdirSync3, statSync as statSync3 } from "fs";
|
|
4830
|
+
import { readFileSync as readFileSync12, readdirSync as readdirSync3, statSync as statSync3 } from "fs";
|
|
4830
4831
|
import { join as join18 } from "path";
|
|
4831
4832
|
var RULE = /^[─━]{10,}/;
|
|
4832
4833
|
var CARET_LINE = /^\s*❯(\s|$)/;
|
|
@@ -4858,6 +4859,25 @@ function classifyPane(screen, tmuxAlive) {
|
|
|
4858
4859
|
return { state: "idle_at_prompt", promptKind: null };
|
|
4859
4860
|
}
|
|
4860
4861
|
var cache = /* @__PURE__ */ new Map();
|
|
4862
|
+
var liveSessions = /* @__PURE__ */ new Map();
|
|
4863
|
+
function noteLiveSession(codeName, liveId) {
|
|
4864
|
+
let seen = liveSessions.get(codeName);
|
|
4865
|
+
if (!seen) {
|
|
4866
|
+
seen = { current: liveId, currentHasTurn: false, previous: null };
|
|
4867
|
+
liveSessions.set(codeName, seen);
|
|
4868
|
+
} else if (seen.current !== liveId) {
|
|
4869
|
+
if (seen.currentHasTurn) seen.previous = seen.current;
|
|
4870
|
+
seen.current = liveId;
|
|
4871
|
+
seen.currentHasTurn = false;
|
|
4872
|
+
}
|
|
4873
|
+
const entry = seen;
|
|
4874
|
+
return {
|
|
4875
|
+
previous: entry.previous,
|
|
4876
|
+
record: (hasTurn) => {
|
|
4877
|
+
if (hasTurn) entry.currentHasTurn = true;
|
|
4878
|
+
}
|
|
4879
|
+
};
|
|
4880
|
+
}
|
|
4861
4881
|
function newestTranscript(dir) {
|
|
4862
4882
|
let names;
|
|
4863
4883
|
try {
|
|
@@ -4890,14 +4910,14 @@ function sessionTranscript(dir, sessionId) {
|
|
|
4890
4910
|
return null;
|
|
4891
4911
|
}
|
|
4892
4912
|
}
|
|
4893
|
-
function readTranscript(
|
|
4913
|
+
function readTranscript(cacheKey, dir, sessionId, nowMs) {
|
|
4894
4914
|
const session = sessionId ?? null;
|
|
4895
|
-
const prev = cache.get(
|
|
4915
|
+
const prev = cache.get(cacheKey)?.sessionId === session ? cache.get(cacheKey) : void 0;
|
|
4896
4916
|
if (prev && nowMs - prev.checkedAt < MIN_TRANSCRIPT_CHECK_MS) return prev;
|
|
4897
4917
|
const file = sessionTranscript(dir, sessionId);
|
|
4898
4918
|
if (!file) {
|
|
4899
4919
|
const none = { checkedAt: nowMs, sessionId: session, path: null, mtimeMs: null, size: 0, activity: NO_TRANSCRIPT_ACTIVITY };
|
|
4900
|
-
cache.set(
|
|
4920
|
+
cache.set(cacheKey, none);
|
|
4901
4921
|
return none;
|
|
4902
4922
|
}
|
|
4903
4923
|
if (prev && prev.path === file.path && prev.mtimeMs === file.mtimeMs && prev.size === file.size) {
|
|
@@ -4912,9 +4932,32 @@ function readTranscript(codeName, dir, sessionId, nowMs) {
|
|
|
4912
4932
|
size: file.size,
|
|
4913
4933
|
activity: summarizeTranscriptActivity(readTail(file.path, file.size))
|
|
4914
4934
|
};
|
|
4915
|
-
cache.set(
|
|
4935
|
+
cache.set(cacheKey, next);
|
|
4916
4936
|
return next;
|
|
4917
4937
|
}
|
|
4938
|
+
function readRecordedSession(agentDir) {
|
|
4939
|
+
try {
|
|
4940
|
+
const parsed = JSON.parse(readFileSync12(join18(agentDir, "session-state.json"), "utf-8"));
|
|
4941
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return null;
|
|
4942
|
+
const { session_id: sessionId, recorded_at: recordedAtMs } = parsed;
|
|
4943
|
+
if (typeof sessionId !== "string" || typeof recordedAtMs !== "number" || !Number.isFinite(recordedAtMs)) return null;
|
|
4944
|
+
return { sessionId, recordedAtMs };
|
|
4945
|
+
} catch {
|
|
4946
|
+
return null;
|
|
4947
|
+
}
|
|
4948
|
+
}
|
|
4949
|
+
function resolveLiveSessionId(args) {
|
|
4950
|
+
const spawn = args.spawnSessionId ?? null;
|
|
4951
|
+
const { recorded, spawnedAtMs } = args;
|
|
4952
|
+
if (!spawn || !recorded || typeof spawnedAtMs !== "number") return spawn;
|
|
4953
|
+
if (!SESSION_ID.test(recorded.sessionId) || recorded.sessionId === spawn) return spawn;
|
|
4954
|
+
return recorded.recordedAtMs >= spawnedAtMs ? recorded.sessionId : spawn;
|
|
4955
|
+
}
|
|
4956
|
+
var SESSION_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
4957
|
+
var PREVIOUS_SESSION_WINDOW_MS = 10 * 60 * 1e3;
|
|
4958
|
+
function hasTurnActivity(activity) {
|
|
4959
|
+
return activity.hasTurn;
|
|
4960
|
+
}
|
|
4918
4961
|
function iso(ms) {
|
|
4919
4962
|
return ms === null ? null : new Date(ms).toISOString();
|
|
4920
4963
|
}
|
|
@@ -4923,7 +4966,32 @@ function buildSessionActivityReport(args) {
|
|
|
4923
4966
|
try {
|
|
4924
4967
|
const pane = classifyPane(args.screenCapture, args.tmuxAlive);
|
|
4925
4968
|
if (!pane) return null;
|
|
4926
|
-
const
|
|
4969
|
+
const spawnId = args.sessionId ?? null;
|
|
4970
|
+
const liveId = resolveLiveSessionId({
|
|
4971
|
+
spawnSessionId: spawnId,
|
|
4972
|
+
spawnedAtMs: args.spawnedAtMs,
|
|
4973
|
+
recorded: args.recordedSession
|
|
4974
|
+
});
|
|
4975
|
+
let transcript = readTranscript(args.codeName, args.transcriptDir, liveId, nowMs);
|
|
4976
|
+
const seen = noteLiveSession(args.codeName, liveId);
|
|
4977
|
+
seen.record(transcript.activity.hasTurn);
|
|
4978
|
+
const switchedAtMs = liveId !== spawnId ? args.recordedSession?.recordedAtMs ?? null : args.spawnedAtMs ?? null;
|
|
4979
|
+
const seenPrevious = seen.previous !== null && SESSION_ID.test(seen.previous) ? seen.previous : null;
|
|
4980
|
+
const managerPrevious = liveId !== spawnId ? spawnId : args.previousSessionId ?? null;
|
|
4981
|
+
const candidates = [.../* @__PURE__ */ new Set([seenPrevious, managerPrevious])].filter(
|
|
4982
|
+
(id) => id !== null && SESSION_ID.test(id) && id !== liveId
|
|
4983
|
+
);
|
|
4984
|
+
if (candidates.length > 0 && switchedAtMs !== null && !hasTurnActivity(transcript.activity)) {
|
|
4985
|
+
let previous = null;
|
|
4986
|
+
for (const [i, id] of candidates.entries()) {
|
|
4987
|
+
const read = readTranscript(`${args.codeName}\0previous${i}`, args.transcriptDir, id, nowMs);
|
|
4988
|
+
if (!read.activity.hasTurn || read.mtimeMs === null) continue;
|
|
4989
|
+
if (previous === null || (previous.mtimeMs ?? 0) < read.mtimeMs) previous = read;
|
|
4990
|
+
}
|
|
4991
|
+
if (previous !== null && previous.activity.newestTurnOpen && previous.mtimeMs !== null && previous.mtimeMs >= switchedAtMs - PREVIOUS_SESSION_WINDOW_MS) {
|
|
4992
|
+
transcript = previous;
|
|
4993
|
+
}
|
|
4994
|
+
}
|
|
4927
4995
|
const state10 = resolveSessionActivityState({
|
|
4928
4996
|
pane,
|
|
4929
4997
|
transcript: transcript.activity,
|
|
@@ -4947,7 +5015,7 @@ function buildSessionActivityReport(args) {
|
|
|
4947
5015
|
}
|
|
4948
5016
|
|
|
4949
5017
|
// src/lib/workflow-run-reconciler.ts
|
|
4950
|
-
import { readdirSync as readdirSync4, readFileSync as
|
|
5018
|
+
import { readdirSync as readdirSync4, readFileSync as readFileSync13, statSync as statSync4 } from "fs";
|
|
4951
5019
|
import { join as join19 } from "path";
|
|
4952
5020
|
var MIN_CHECK_INTERVAL_MS4 = 5 * 6e4;
|
|
4953
5021
|
var SETTLE_MS = 3e4;
|
|
@@ -5066,7 +5134,7 @@ async function maybeReconcileWorkflowRunTokens(args) {
|
|
|
5066
5134
|
const contents = [];
|
|
5067
5135
|
for (const path of files) {
|
|
5068
5136
|
try {
|
|
5069
|
-
contents.push(
|
|
5137
|
+
contents.push(readFileSync13(path, "utf-8"));
|
|
5070
5138
|
} catch {
|
|
5071
5139
|
}
|
|
5072
5140
|
}
|
|
@@ -5111,7 +5179,7 @@ async function maybeReconcileWorkflowRunTokens(args) {
|
|
|
5111
5179
|
}
|
|
5112
5180
|
|
|
5113
5181
|
// src/lib/conversation-evaluator.ts
|
|
5114
|
-
import { readdirSync as readdirSync5, readFileSync as
|
|
5182
|
+
import { readdirSync as readdirSync5, readFileSync as readFileSync14, statSync as statSync5 } from "fs";
|
|
5115
5183
|
import { join as join20 } from "path";
|
|
5116
5184
|
|
|
5117
5185
|
// src/lib/detect-meta-egress.ts
|
|
@@ -5612,7 +5680,7 @@ function readRecentTurns(dir, nowMs) {
|
|
|
5612
5680
|
if (nowMs - mtimeMs > TRANSCRIPT_MTIME_WINDOW_MS3) continue;
|
|
5613
5681
|
let content;
|
|
5614
5682
|
try {
|
|
5615
|
-
content =
|
|
5683
|
+
content = readFileSync14(full, "utf8");
|
|
5616
5684
|
} catch {
|
|
5617
5685
|
continue;
|
|
5618
5686
|
}
|
|
@@ -5988,7 +6056,7 @@ import { homedir as homedir11 } from "os";
|
|
|
5988
6056
|
import { join as join25 } from "path";
|
|
5989
6057
|
|
|
5990
6058
|
// src/lib/agent-logging-mode.ts
|
|
5991
|
-
import { readFileSync as
|
|
6059
|
+
import { readFileSync as readFileSync15 } from "fs";
|
|
5992
6060
|
import { homedir as homedir8 } from "os";
|
|
5993
6061
|
import { join as join21 } from "path";
|
|
5994
6062
|
var LOGGING_MODES = ["hash-only", "redacted", "full-local"];
|
|
@@ -6000,7 +6068,7 @@ function charterPath(codeName, homeDir) {
|
|
|
6000
6068
|
function readAgentLoggingMode(codeName, homeDir) {
|
|
6001
6069
|
let raw;
|
|
6002
6070
|
try {
|
|
6003
|
-
raw =
|
|
6071
|
+
raw = readFileSync15(charterPath(codeName, homeDir), "utf-8");
|
|
6004
6072
|
} catch {
|
|
6005
6073
|
return { mode: null, reason: "no-charter" };
|
|
6006
6074
|
}
|
|
@@ -6024,7 +6092,7 @@ function loggingModeWithholdsTargets(reading) {
|
|
|
6024
6092
|
|
|
6025
6093
|
// src/lib/tool-call-path-salt.ts
|
|
6026
6094
|
import { randomBytes } from "crypto";
|
|
6027
|
-
import { existsSync as existsSync4, mkdirSync as mkdirSync6, readFileSync as
|
|
6095
|
+
import { existsSync as existsSync4, mkdirSync as mkdirSync6, readFileSync as readFileSync16, renameSync as renameSync4, unlinkSync as unlinkSync2, writeFileSync as writeFileSync7 } from "fs";
|
|
6028
6096
|
import { homedir as homedir9 } from "os";
|
|
6029
6097
|
import { dirname as dirname7, join as join22 } from "path";
|
|
6030
6098
|
var SALT_BYTES = 32;
|
|
@@ -6043,7 +6111,7 @@ function readToolCallPathSalt(codeName, homeDir) {
|
|
|
6043
6111
|
}
|
|
6044
6112
|
try {
|
|
6045
6113
|
if (existsSync4(file)) {
|
|
6046
|
-
const existing =
|
|
6114
|
+
const existing = readFileSync16(file, "utf-8").trim();
|
|
6047
6115
|
if (SALT_RE.test(existing)) return existing;
|
|
6048
6116
|
}
|
|
6049
6117
|
} catch {
|
|
@@ -6069,7 +6137,7 @@ function readToolCallPathSalt(codeName, homeDir) {
|
|
|
6069
6137
|
import { statSync as statSync6 } from "fs";
|
|
6070
6138
|
|
|
6071
6139
|
// src/lib/tool-call-extractor.ts
|
|
6072
|
-
import { closeSync as closeSync2, fstatSync, openSync as openSync2, readFileSync as
|
|
6140
|
+
import { closeSync as closeSync2, fstatSync, openSync as openSync2, readFileSync as readFileSync17, readSync as readSync2, readdirSync as readdirSync6 } from "fs";
|
|
6073
6141
|
import { basename as basename2, join as join23, relative } from "path";
|
|
6074
6142
|
import { StringDecoder } from "string_decoder";
|
|
6075
6143
|
|
|
@@ -6414,7 +6482,7 @@ function extractTranscriptWindow(file, opts, from) {
|
|
|
6414
6482
|
}
|
|
6415
6483
|
|
|
6416
6484
|
// src/lib/tool-call-cursor.ts
|
|
6417
|
-
import { existsSync as existsSync5, readFileSync as
|
|
6485
|
+
import { existsSync as existsSync5, readFileSync as readFileSync18 } from "fs";
|
|
6418
6486
|
import { homedir as homedir10 } from "os";
|
|
6419
6487
|
import { join as join24 } from "path";
|
|
6420
6488
|
var COVERAGE_DISPOSITIONS = [
|
|
@@ -6477,7 +6545,7 @@ function loadCursors(path) {
|
|
|
6477
6545
|
const out = /* @__PURE__ */ new Map();
|
|
6478
6546
|
if (!existsSync5(path)) return out;
|
|
6479
6547
|
try {
|
|
6480
|
-
const parsed = JSON.parse(
|
|
6548
|
+
const parsed = JSON.parse(readFileSync18(path, "utf-8"));
|
|
6481
6549
|
if (!parsed || parsed.version !== 1 || typeof parsed.files !== "object") return out;
|
|
6482
6550
|
for (const [k, v] of Object.entries(parsed.files)) {
|
|
6483
6551
|
if (!v || typeof v !== "object") continue;
|
|
@@ -6913,7 +6981,7 @@ async function maybeScanToolCalls(args) {
|
|
|
6913
6981
|
}
|
|
6914
6982
|
|
|
6915
6983
|
// src/lib/activity-cache-monitor.ts
|
|
6916
|
-
import { existsSync as existsSync6, readFileSync as
|
|
6984
|
+
import { existsSync as existsSync6, readFileSync as readFileSync19 } from "fs";
|
|
6917
6985
|
import { homedir as homedir12 } from "os";
|
|
6918
6986
|
import { join as join26 } from "path";
|
|
6919
6987
|
var MIN_CHECK_INTERVAL_MS8 = 6e4;
|
|
@@ -6965,7 +7033,7 @@ async function maybeReportActivityCache(args) {
|
|
|
6965
7033
|
}
|
|
6966
7034
|
let raw;
|
|
6967
7035
|
try {
|
|
6968
|
-
raw =
|
|
7036
|
+
raw = readFileSync19(STATS_CACHE_PATH, "utf-8");
|
|
6969
7037
|
} catch (err) {
|
|
6970
7038
|
log2(`[activity-cache] readFileSync failed: ${err.message}`);
|
|
6971
7039
|
return;
|
|
@@ -7287,7 +7355,7 @@ import { createHash as createHash9 } from "crypto";
|
|
|
7287
7355
|
import {
|
|
7288
7356
|
existsSync as existsSync7,
|
|
7289
7357
|
mkdirSync as mkdirSync7,
|
|
7290
|
-
readFileSync as
|
|
7358
|
+
readFileSync as readFileSync20,
|
|
7291
7359
|
readdirSync as readdirSync7,
|
|
7292
7360
|
renameSync as renameSync5,
|
|
7293
7361
|
rmSync as rmSync3,
|
|
@@ -7309,7 +7377,7 @@ function cachePath(cacheDir, hash) {
|
|
|
7309
7377
|
function readCachedKnowledge(cacheDir, hash) {
|
|
7310
7378
|
const path = cachePath(cacheDir, hash);
|
|
7311
7379
|
try {
|
|
7312
|
-
const content =
|
|
7380
|
+
const content = readFileSync20(path, "utf-8");
|
|
7313
7381
|
try {
|
|
7314
7382
|
const now = /* @__PURE__ */ new Date();
|
|
7315
7383
|
utimesSync(path, now, now);
|
|
@@ -7390,7 +7458,7 @@ import { createHash as createHash10 } from "crypto";
|
|
|
7390
7458
|
import {
|
|
7391
7459
|
existsSync as existsSync8,
|
|
7392
7460
|
mkdirSync as mkdirSync8,
|
|
7393
|
-
readFileSync as
|
|
7461
|
+
readFileSync as readFileSync21,
|
|
7394
7462
|
readdirSync as readdirSync8,
|
|
7395
7463
|
renameSync as renameSync6,
|
|
7396
7464
|
rmSync as rmSync4,
|
|
@@ -7412,7 +7480,7 @@ function cachePath2(cacheDir, hash) {
|
|
|
7412
7480
|
function readCachedMemory(cacheDir, hash) {
|
|
7413
7481
|
const path = cachePath2(cacheDir, hash);
|
|
7414
7482
|
try {
|
|
7415
|
-
const content =
|
|
7483
|
+
const content = readFileSync21(path, "utf-8");
|
|
7416
7484
|
try {
|
|
7417
7485
|
const now = /* @__PURE__ */ new Date();
|
|
7418
7486
|
utimesSync2(path, now, now);
|
|
@@ -7499,7 +7567,7 @@ import { createHash as createHash11 } from "crypto";
|
|
|
7499
7567
|
import {
|
|
7500
7568
|
existsSync as existsSync9,
|
|
7501
7569
|
mkdirSync as mkdirSync9,
|
|
7502
|
-
readFileSync as
|
|
7570
|
+
readFileSync as readFileSync22,
|
|
7503
7571
|
readdirSync as readdirSync9,
|
|
7504
7572
|
renameSync as renameSync7,
|
|
7505
7573
|
rmSync as rmSync5,
|
|
@@ -7521,7 +7589,7 @@ function cachePath3(cacheDir, hash) {
|
|
|
7521
7589
|
function readCachedSkill(cacheDir, hash) {
|
|
7522
7590
|
const path = cachePath3(cacheDir, hash);
|
|
7523
7591
|
try {
|
|
7524
|
-
const content =
|
|
7592
|
+
const content = readFileSync22(path, "utf-8");
|
|
7525
7593
|
try {
|
|
7526
7594
|
const now = /* @__PURE__ */ new Date();
|
|
7527
7595
|
utimesSync3(path, now, now);
|
|
@@ -7879,7 +7947,7 @@ function resolveConditionalResponse(wire, hasCachedBody) {
|
|
|
7879
7947
|
}
|
|
7880
7948
|
|
|
7881
7949
|
// src/lib/channel-hash-cache.ts
|
|
7882
|
-
import { existsSync as existsSync10, readFileSync as
|
|
7950
|
+
import { existsSync as existsSync10, readFileSync as readFileSync23, writeFileSync as writeFileSync11 } from "fs";
|
|
7883
7951
|
import { join as join30 } from "path";
|
|
7884
7952
|
var CACHE_FILENAME = "channel-hash-cache.json";
|
|
7885
7953
|
function getChannelHashCacheFile(configDir) {
|
|
@@ -7890,7 +7958,7 @@ function loadChannelHashCache(target, configDir) {
|
|
|
7890
7958
|
if (!existsSync10(path)) return;
|
|
7891
7959
|
let parsed;
|
|
7892
7960
|
try {
|
|
7893
|
-
parsed = JSON.parse(
|
|
7961
|
+
parsed = JSON.parse(readFileSync23(path, "utf-8"));
|
|
7894
7962
|
} catch {
|
|
7895
7963
|
return;
|
|
7896
7964
|
}
|
|
@@ -7910,7 +7978,7 @@ function saveChannelHashCache(source, configDir) {
|
|
|
7910
7978
|
}
|
|
7911
7979
|
|
|
7912
7980
|
// src/lib/sender-policy-baseline.ts
|
|
7913
|
-
import { existsSync as existsSync11, readFileSync as
|
|
7981
|
+
import { existsSync as existsSync11, readFileSync as readFileSync24 } from "fs";
|
|
7914
7982
|
import { join as join31 } from "path";
|
|
7915
7983
|
var BASELINE_FILENAME = "sender-policy-baseline.json";
|
|
7916
7984
|
var SENDER_POLICY_BASELINE_VERSION = 1;
|
|
@@ -7965,7 +8033,7 @@ function loadSenderPolicyBaseline(target, configDir, log2) {
|
|
|
7965
8033
|
if (!existsSync11(path)) return;
|
|
7966
8034
|
let parsed;
|
|
7967
8035
|
try {
|
|
7968
|
-
parsed = JSON.parse(
|
|
8036
|
+
parsed = JSON.parse(readFileSync24(path, "utf-8"));
|
|
7969
8037
|
} catch (err) {
|
|
7970
8038
|
log2?.(
|
|
7971
8039
|
`[sender-policy] discarding corrupt ${BASELINE_FILENAME} (${err.message}) - restrictive-policy agents will take one fail-closed restart`
|
|
@@ -8014,7 +8082,7 @@ function saveSenderPolicyBaseline(source, configDir, log2) {
|
|
|
8014
8082
|
}
|
|
8015
8083
|
|
|
8016
8084
|
// src/lib/stuck-streak-store.ts
|
|
8017
|
-
import { existsSync as existsSync12, readFileSync as
|
|
8085
|
+
import { existsSync as existsSync12, readFileSync as readFileSync25 } from "fs";
|
|
8018
8086
|
import { join as join32 } from "path";
|
|
8019
8087
|
var STORE_FILENAME = "stuck-streaks.json";
|
|
8020
8088
|
var STUCK_STREAK_STORE_VERSION = 1;
|
|
@@ -8065,7 +8133,7 @@ function loadStuckStreaks(target, configDir, log2) {
|
|
|
8065
8133
|
if (!existsSync12(path)) return;
|
|
8066
8134
|
let parsed;
|
|
8067
8135
|
try {
|
|
8068
|
-
parsed = JSON.parse(
|
|
8136
|
+
parsed = JSON.parse(readFileSync25(path, "utf-8"));
|
|
8069
8137
|
} catch (err) {
|
|
8070
8138
|
log2?.(
|
|
8071
8139
|
`[stuck-streaks] discarding corrupt ${STORE_FILENAME} (${err.message}) \u2014 stuck-streak ages restart from zero and one spurious "recovered" close may follow`
|
|
@@ -8108,7 +8176,7 @@ function pruneStuckStreaksToAgents(maps, activeAgentIds) {
|
|
|
8108
8176
|
}
|
|
8109
8177
|
|
|
8110
8178
|
// src/lib/claude-device-state.ts
|
|
8111
|
-
import { readFileSync as
|
|
8179
|
+
import { readFileSync as readFileSync26, statSync as statSync11 } from "fs";
|
|
8112
8180
|
function claudeDeviceStatePath(env = process.env) {
|
|
8113
8181
|
return effectiveClaudeJsonPath(void 0, env);
|
|
8114
8182
|
}
|
|
@@ -8133,7 +8201,7 @@ function checkClaudeDeviceState(path = claudeDeviceStatePath()) {
|
|
|
8133
8201
|
}
|
|
8134
8202
|
let raw;
|
|
8135
8203
|
try {
|
|
8136
|
-
raw =
|
|
8204
|
+
raw = readFileSync26(path, "utf-8");
|
|
8137
8205
|
} catch {
|
|
8138
8206
|
return { usable: false, reason: "unreadable" };
|
|
8139
8207
|
}
|
|
@@ -8832,7 +8900,7 @@ function removeIntegrationSkillFolder(opts) {
|
|
|
8832
8900
|
}
|
|
8833
8901
|
|
|
8834
8902
|
// src/lib/manager/managed-skill-manifest.ts
|
|
8835
|
-
import { existsSync as existsSync13, mkdirSync as mkdirSync10, readFileSync as
|
|
8903
|
+
import { existsSync as existsSync13, mkdirSync as mkdirSync10, readFileSync as readFileSync27, writeFileSync as writeFileSync12 } from "fs";
|
|
8836
8904
|
import { dirname as dirname8, join as join34 } from "path";
|
|
8837
8905
|
var MANIFEST_VERSION = 1;
|
|
8838
8906
|
function managedSkillManifestPath(agentRootDir) {
|
|
@@ -8841,7 +8909,7 @@ function managedSkillManifestPath(agentRootDir) {
|
|
|
8841
8909
|
function readManagedSkillManifest(path) {
|
|
8842
8910
|
try {
|
|
8843
8911
|
if (!existsSync13(path)) return /* @__PURE__ */ new Set();
|
|
8844
|
-
const parsed = JSON.parse(
|
|
8912
|
+
const parsed = JSON.parse(readFileSync27(path, "utf-8"));
|
|
8845
8913
|
const ids = Array.isArray(parsed?.globalSkillIds) ? parsed.globalSkillIds : [];
|
|
8846
8914
|
return new Set(ids.filter((id) => typeof id === "string" && id.length > 0));
|
|
8847
8915
|
} catch {
|
|
@@ -9366,7 +9434,7 @@ function formatBoardForPrompt(items, template) {
|
|
|
9366
9434
|
}
|
|
9367
9435
|
|
|
9368
9436
|
// src/lib/manager/kanban/nudge-state-cache.ts
|
|
9369
|
-
import { existsSync as existsSync15, readFileSync as
|
|
9437
|
+
import { existsSync as existsSync15, readFileSync as readFileSync28, writeFileSync as writeFileSync13 } from "fs";
|
|
9370
9438
|
import { join as join36 } from "path";
|
|
9371
9439
|
var CACHE_FILENAME2 = "kanban-nudge-state.json";
|
|
9372
9440
|
var KANBAN_NUDGE_STATE_VERSION = 1;
|
|
@@ -9378,7 +9446,7 @@ function loadKanbanNudgeState(target, configDir) {
|
|
|
9378
9446
|
if (!existsSync15(path)) return;
|
|
9379
9447
|
let parsed;
|
|
9380
9448
|
try {
|
|
9381
|
-
parsed = JSON.parse(
|
|
9449
|
+
parsed = JSON.parse(readFileSync28(path, "utf-8"));
|
|
9382
9450
|
} catch {
|
|
9383
9451
|
return;
|
|
9384
9452
|
}
|
|
@@ -9741,6 +9809,11 @@ ${isFailed ? "Reason" : "Result"}: ${resultBody.slice(0, NOTIFY_RESULT_MAX_CHARS
|
|
|
9741
9809
|
return `${emoji} ${isFailed ? "Task Failed" : "Task Complete"} \u2014 ${displayName}
|
|
9742
9810
|
${item.title}${resultLine}`;
|
|
9743
9811
|
}
|
|
9812
|
+
function isManagerActionWait(item) {
|
|
9813
|
+
const record = item.metadata?.manager_action;
|
|
9814
|
+
const leftByManager = record?.action === "escalate" || record?.action === "reassign" || record?.action === "reopen";
|
|
9815
|
+
return leftByManager && !!item.waiting_on && record?.applied?.waiting_on === item.waiting_on;
|
|
9816
|
+
}
|
|
9744
9817
|
function resolveRequesterDmTarget(requester) {
|
|
9745
9818
|
if (requester.channel === "slack" && requester.sender_id) {
|
|
9746
9819
|
return { channel: "slack", to: requester.sender_id };
|
|
@@ -9996,7 +10069,7 @@ function closeSessionRunForCode(codeName, outcome, reason) {
|
|
|
9996
10069
|
|
|
9997
10070
|
// src/lib/manager/scheduler/kanban-route.ts
|
|
9998
10071
|
import { createHash as createHash15 } from "crypto";
|
|
9999
|
-
import { writeFileSync as writeFileSync14, renameSync as renameSync8, mkdirSync as mkdirSync12, readFileSync as
|
|
10072
|
+
import { writeFileSync as writeFileSync14, renameSync as renameSync8, mkdirSync as mkdirSync12, readFileSync as readFileSync29, unlinkSync as unlinkSync3 } from "fs";
|
|
10000
10073
|
import { homedir as homedir14 } from "os";
|
|
10001
10074
|
import { join as join37, dirname as dirname9 } from "path";
|
|
10002
10075
|
|
|
@@ -10369,7 +10442,7 @@ function stampScheduledTurnMarker(codeName, taskId, target) {
|
|
|
10369
10442
|
function clearScheduledTurnMarkerForTask(codeName, taskId) {
|
|
10370
10443
|
const file = join37(homedir14(), ".augmented", codeName, SCHEDULED_TURN_MARKER_FILENAME);
|
|
10371
10444
|
try {
|
|
10372
|
-
const raw = JSON.parse(
|
|
10445
|
+
const raw = JSON.parse(readFileSync29(file, "utf8"));
|
|
10373
10446
|
if (typeof raw?.task_id !== "string" || raw.task_id !== taskId) return;
|
|
10374
10447
|
unlinkSync3(file);
|
|
10375
10448
|
log(`[scheduled-kanban] scheduled-turn marker cleared for '${codeName}' (task ${taskId} complete)`);
|
|
@@ -10592,7 +10665,7 @@ import { homedir as homedir15 } from "os";
|
|
|
10592
10665
|
import { join as join39 } from "path";
|
|
10593
10666
|
|
|
10594
10667
|
// src/lib/agent-serving-probe.ts
|
|
10595
|
-
import { readFileSync as
|
|
10668
|
+
import { readFileSync as readFileSync30, readdirSync as readdirSync10, statSync as statSync12 } from "fs";
|
|
10596
10669
|
import { join as join38 } from "path";
|
|
10597
10670
|
var RATE_LIMIT_WINDOW_MS = 6 * 60 * 60 * 1e3;
|
|
10598
10671
|
function probeRateLimit(args) {
|
|
@@ -10618,7 +10691,7 @@ function probeRateLimit(args) {
|
|
|
10618
10691
|
}
|
|
10619
10692
|
let content;
|
|
10620
10693
|
try {
|
|
10621
|
-
content =
|
|
10694
|
+
content = readFileSync30(path, "utf-8");
|
|
10622
10695
|
} catch {
|
|
10623
10696
|
continue;
|
|
10624
10697
|
}
|
|
@@ -11251,7 +11324,7 @@ function stopPaneOccupancySampler() {
|
|
|
11251
11324
|
}
|
|
11252
11325
|
|
|
11253
11326
|
// src/lib/pid-pressure-sampler.ts
|
|
11254
|
-
import { existsSync as existsSync16, readFileSync as
|
|
11327
|
+
import { existsSync as existsSync16, readFileSync as readFileSync31 } from "fs";
|
|
11255
11328
|
var SAMPLE_INTERVAL_MS2 = 3e4;
|
|
11256
11329
|
function warnFraction() {
|
|
11257
11330
|
const raw = Number(process.env.AGT_PID_PRESSURE_WARN_FRACTION);
|
|
@@ -11279,7 +11352,7 @@ function parseMemoryEvents(text) {
|
|
|
11279
11352
|
}
|
|
11280
11353
|
function readTextReal(path) {
|
|
11281
11354
|
try {
|
|
11282
|
-
return
|
|
11355
|
+
return readFileSync31(path, "utf-8");
|
|
11283
11356
|
} catch {
|
|
11284
11357
|
return null;
|
|
11285
11358
|
}
|
|
@@ -12661,7 +12734,7 @@ async function fireOpencodeScheduledTask(agent, task) {
|
|
|
12661
12734
|
|
|
12662
12735
|
// src/lib/opencode-telegram-ingest.ts
|
|
12663
12736
|
import { createHash as createHash19 } from "crypto";
|
|
12664
|
-
import { existsSync as existsSync17, mkdirSync as mkdirSync13, readFileSync as
|
|
12737
|
+
import { existsSync as existsSync17, mkdirSync as mkdirSync13, readFileSync as readFileSync32, renameSync as renameSync9, unlinkSync as unlinkSync4, writeFileSync as writeFileSync15 } from "fs";
|
|
12665
12738
|
import { randomUUID } from "crypto";
|
|
12666
12739
|
import { join as join41 } from "path";
|
|
12667
12740
|
|
|
@@ -13325,7 +13398,7 @@ function createFileOffsetStore(codeName, log2, currentBotId) {
|
|
|
13325
13398
|
load() {
|
|
13326
13399
|
if (!filePath) return 0;
|
|
13327
13400
|
try {
|
|
13328
|
-
const parsed = JSON.parse(
|
|
13401
|
+
const parsed = JSON.parse(readFileSync32(filePath, "utf-8"));
|
|
13329
13402
|
if (currentBotId != null && typeof parsed?.bot_id === "number" && parsed.bot_id !== currentBotId) {
|
|
13330
13403
|
log2(`[telegram-ingest:${codeName}] offset cursor belongs to a different bot; ignoring (bot swap)`);
|
|
13331
13404
|
return 0;
|
|
@@ -13600,7 +13673,7 @@ function partitionActionableByPoison(actionable, states, config2) {
|
|
|
13600
13673
|
}
|
|
13601
13674
|
|
|
13602
13675
|
// src/lib/restart-flags.ts
|
|
13603
|
-
import { existsSync as existsSync18, mkdirSync as mkdirSync14, readdirSync as readdirSync12, readFileSync as
|
|
13676
|
+
import { existsSync as existsSync18, mkdirSync as mkdirSync14, readdirSync as readdirSync12, readFileSync as readFileSync33, renameSync as renameSync10, rmSync as rmSync7, writeFileSync as writeFileSync16 } from "fs";
|
|
13604
13677
|
import { homedir as homedir16 } from "os";
|
|
13605
13678
|
import { join as join42 } from "path";
|
|
13606
13679
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
@@ -13617,7 +13690,7 @@ function readRestartFlags() {
|
|
|
13617
13690
|
for (const entry of readdirSync12(dir)) {
|
|
13618
13691
|
if (!entry.endsWith(".flag")) continue;
|
|
13619
13692
|
try {
|
|
13620
|
-
const raw =
|
|
13693
|
+
const raw = readFileSync33(join42(dir, entry), "utf8");
|
|
13621
13694
|
const parsed = JSON.parse(raw);
|
|
13622
13695
|
if (typeof parsed.codeName !== "string" || parsed.codeName.length === 0) {
|
|
13623
13696
|
parsed.codeName = entry.replace(/\.flag$/, "");
|
|
@@ -13735,7 +13808,7 @@ async function sendError(flag, opts, text) {
|
|
|
13735
13808
|
}
|
|
13736
13809
|
|
|
13737
13810
|
// src/lib/restart-context.ts
|
|
13738
|
-
import { readdirSync as readdirSync13, readFileSync as
|
|
13811
|
+
import { readdirSync as readdirSync13, readFileSync as readFileSync34, writeFileSync as writeFileSync17, mkdirSync as mkdirSync15, unlinkSync as unlinkSync5 } from "fs";
|
|
13739
13812
|
import { dirname as dirname10, join as join43 } from "path";
|
|
13740
13813
|
var SLACK_PENDING_INBOUND_DIRNAME = "slack-pending-inbound";
|
|
13741
13814
|
var SLACK_RESTART_CONTEXT_DIRNAME = "slack-restart-context";
|
|
@@ -13793,7 +13866,7 @@ function safeReaddir(dir) {
|
|
|
13793
13866
|
}
|
|
13794
13867
|
function readStrandedMarker(path) {
|
|
13795
13868
|
try {
|
|
13796
|
-
const parsed = JSON.parse(
|
|
13869
|
+
const parsed = JSON.parse(readFileSync34(path, "utf-8"));
|
|
13797
13870
|
if (typeof parsed.channel === "string" && typeof parsed.thread_ts === "string") {
|
|
13798
13871
|
return { channel: parsed.channel, thread_ts: parsed.thread_ts };
|
|
13799
13872
|
}
|
|
@@ -14640,7 +14713,7 @@ async function runDangerousRmBackstop(agentId, codeName, pane) {
|
|
|
14640
14713
|
return;
|
|
14641
14714
|
}
|
|
14642
14715
|
const policy = readRmPolicyText(
|
|
14643
|
-
() =>
|
|
14716
|
+
() => readFileSync35(join44(getFramework("claude-code").getAgentDir(codeName), RM_POLICY_RELATIVE_PATH), "utf-8")
|
|
14644
14717
|
);
|
|
14645
14718
|
const decision = decideDangerousRm(action.prompt, policy, {
|
|
14646
14719
|
isolated: isolationMode(codeName) === "docker"
|
|
@@ -15361,7 +15434,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
15361
15434
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
15362
15435
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
15363
15436
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
15364
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
15437
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-NFT3GSDL.js");
|
|
15365
15438
|
const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
|
|
15366
15439
|
if (newest === null) return null;
|
|
15367
15440
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -15730,7 +15803,7 @@ var runningChannelSecretHashes = /* @__PURE__ */ new Map();
|
|
|
15730
15803
|
var sessionLaunchManagedStructure = /* @__PURE__ */ new Map();
|
|
15731
15804
|
function projectMcpHash(_codeName, projectDir) {
|
|
15732
15805
|
try {
|
|
15733
|
-
const raw =
|
|
15806
|
+
const raw = readFileSync35(join44(projectDir, ".mcp.json"), "utf-8");
|
|
15734
15807
|
return createHash20("sha256").update(canonicalJson(JSON.parse(raw))).digest("hex");
|
|
15735
15808
|
} catch {
|
|
15736
15809
|
return null;
|
|
@@ -15738,7 +15811,7 @@ function projectMcpHash(_codeName, projectDir) {
|
|
|
15738
15811
|
}
|
|
15739
15812
|
function projectMcpKeys(_codeName, projectDir) {
|
|
15740
15813
|
try {
|
|
15741
|
-
const raw =
|
|
15814
|
+
const raw = readFileSync35(join44(projectDir, ".mcp.json"), "utf-8");
|
|
15742
15815
|
const parsed = JSON.parse(raw);
|
|
15743
15816
|
const servers = parsed.mcpServers;
|
|
15744
15817
|
if (!servers || typeof servers !== "object") return /* @__PURE__ */ new Set();
|
|
@@ -15756,7 +15829,7 @@ function seedSessionLaunchBaselines(codeName, projectDir) {
|
|
|
15756
15829
|
else runningMcpServerKeys.delete(codeName);
|
|
15757
15830
|
let launchStructure = null;
|
|
15758
15831
|
try {
|
|
15759
|
-
const raw =
|
|
15832
|
+
const raw = readFileSync35(join44(projectDir, ".mcp.json"), "utf-8");
|
|
15760
15833
|
launchStructure = managedMcpStructureHashFromFile(
|
|
15761
15834
|
JSON.parse(raw),
|
|
15762
15835
|
isManagedMcpServerKey
|
|
@@ -15893,7 +15966,7 @@ async function runAgentSessionToolBindProbes(agent, integrations, projectDir, op
|
|
|
15893
15966
|
if (result && result.rebindCandidates.length > 0 && hostFlagStore().getBoolean("session-tool-rebind")) {
|
|
15894
15967
|
let mcpJsonForRebind = null;
|
|
15895
15968
|
try {
|
|
15896
|
-
mcpJsonForRebind = JSON.parse(
|
|
15969
|
+
mcpJsonForRebind = JSON.parse(readFileSync35(join44(projectDir, ".mcp.json"), "utf-8"));
|
|
15897
15970
|
} catch {
|
|
15898
15971
|
mcpJsonForRebind = null;
|
|
15899
15972
|
}
|
|
@@ -16042,7 +16115,7 @@ function shouldInjectChannelSecrets(agentId) {
|
|
|
16042
16115
|
function projectChannelSecretHash(projectDir) {
|
|
16043
16116
|
try {
|
|
16044
16117
|
const entries = parseEnvIntegrations(
|
|
16045
|
-
|
|
16118
|
+
readFileSync35(join44(projectDir, ".env.integrations"), "utf-8")
|
|
16046
16119
|
);
|
|
16047
16120
|
return channelSecretValueHash(entries, CHANNEL_SECRET_ENV_KEYS);
|
|
16048
16121
|
} catch {
|
|
@@ -16158,7 +16231,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
16158
16231
|
var lastVersionCheckAt = 0;
|
|
16159
16232
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
16160
16233
|
var lastResponsivenessProbeAt = 0;
|
|
16161
|
-
var agtCliVersion = true ? "0.28.
|
|
16234
|
+
var agtCliVersion = true ? "0.28.1184" : "dev";
|
|
16162
16235
|
function resolveBrewPath(execFileSync3) {
|
|
16163
16236
|
try {
|
|
16164
16237
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -16726,7 +16799,7 @@ function ensureClaudeManagedSettings(path = claudeManagedSettingsPath()) {
|
|
|
16726
16799
|
try {
|
|
16727
16800
|
let settings = {};
|
|
16728
16801
|
if (existsSync19(path)) {
|
|
16729
|
-
const raw =
|
|
16802
|
+
const raw = readFileSync35(path, "utf-8").trim();
|
|
16730
16803
|
if (raw) {
|
|
16731
16804
|
let parsed;
|
|
16732
16805
|
try {
|
|
@@ -17837,10 +17910,16 @@ function claudeMdSizeFor(codeName) {
|
|
|
17837
17910
|
return report;
|
|
17838
17911
|
}
|
|
17839
17912
|
function sessionActivityFor(codeName, pane) {
|
|
17913
|
+
const session = getSessionState(codeName);
|
|
17914
|
+
const projectDir = getProjectDir(codeName);
|
|
17840
17915
|
return buildSessionActivityReport({
|
|
17841
17916
|
codeName,
|
|
17842
|
-
transcriptDir: sessionTranscriptDir(
|
|
17843
|
-
sessionId:
|
|
17917
|
+
transcriptDir: sessionTranscriptDir(projectDir),
|
|
17918
|
+
sessionId: session?.currentSessionId ?? null,
|
|
17919
|
+
// ENG-11817: `/clear` and rotations change the session under the same pane.
|
|
17920
|
+
spawnedAtMs: session?.startedAt ?? null,
|
|
17921
|
+
recordedSession: readRecordedSession(dirname11(projectDir)),
|
|
17922
|
+
previousSessionId: peekPreviousSession(codeName)?.sessionId ?? null,
|
|
17844
17923
|
tmuxAlive: pane.tmuxAlive,
|
|
17845
17924
|
screenCapture: pane.screenCapture,
|
|
17846
17925
|
log: (msg) => console.error(msg)
|
|
@@ -18056,7 +18135,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
18056
18135
|
if (codeNames.length === 0) return;
|
|
18057
18136
|
void (async () => {
|
|
18058
18137
|
try {
|
|
18059
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
18138
|
+
const { collectDiagnostics } = await import("../persistent-session-C7632TPG.js");
|
|
18060
18139
|
await api.post("/host/heartbeat", {
|
|
18061
18140
|
host_id: hostId,
|
|
18062
18141
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
|
|
@@ -18199,7 +18278,7 @@ async function pollCycleInner() {
|
|
|
18199
18278
|
}
|
|
18200
18279
|
try {
|
|
18201
18280
|
const { detectHostSecurity } = await import("../host-security-KQYYZZVW.js");
|
|
18202
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
18281
|
+
const { collectDiagnostics } = await import("../persistent-session-C7632TPG.js");
|
|
18203
18282
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
18204
18283
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor) : void 0;
|
|
18205
18284
|
let tailscaleHostname;
|
|
@@ -18454,7 +18533,7 @@ async function pollCycleInner() {
|
|
|
18454
18533
|
}
|
|
18455
18534
|
try {
|
|
18456
18535
|
const desiredClaudeCodeVersion = hbResp?.desired_claude_code_version?.trim();
|
|
18457
|
-
const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-
|
|
18536
|
+
const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-JYVD3MJJ.js");
|
|
18458
18537
|
const securityFloor = currentSecurityFloor();
|
|
18459
18538
|
claudeUpdaterInFlight = true;
|
|
18460
18539
|
if (desiredClaudeCodeVersion && (claudePairLoop.busy || claudePairingInProgress())) {
|
|
@@ -18489,7 +18568,7 @@ async function pollCycleInner() {
|
|
|
18489
18568
|
collectPanelessActivityProbes,
|
|
18490
18569
|
getResponsivenessIntervalMs,
|
|
18491
18570
|
occupancyQualificationClassifications
|
|
18492
|
-
} = await import("../responsiveness-probe-
|
|
18571
|
+
} = await import("../responsiveness-probe-NFT3GSDL.js");
|
|
18493
18572
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
18494
18573
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
18495
18574
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -18606,7 +18685,7 @@ async function pollCycleInner() {
|
|
|
18606
18685
|
collectResponsivenessProbes,
|
|
18607
18686
|
livePendingInboundOldestAgeSeconds,
|
|
18608
18687
|
parkPendingInbound
|
|
18609
|
-
} = await import("../responsiveness-probe-
|
|
18688
|
+
} = await import("../responsiveness-probe-NFT3GSDL.js");
|
|
18610
18689
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-M6AFZWNU.js");
|
|
18611
18690
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
18612
18691
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -18695,7 +18774,7 @@ async function pollCycleInner() {
|
|
|
18695
18774
|
);
|
|
18696
18775
|
if (hostFlagStore().getBoolean("wedge-transient-notice")) {
|
|
18697
18776
|
try {
|
|
18698
|
-
const paneTail =
|
|
18777
|
+
const paneTail = readFileSync35(paneLogPath(codeName), "utf8").slice(-65536);
|
|
18699
18778
|
const transient = detectTransientApiErrorInLog(paneTail);
|
|
18700
18779
|
if (transient) {
|
|
18701
18780
|
const wedgeHome = join44(homedir17(), ".augmented", codeName);
|
|
@@ -18892,7 +18971,7 @@ async function pollCycleInner() {
|
|
|
18892
18971
|
}
|
|
18893
18972
|
}
|
|
18894
18973
|
);
|
|
18895
|
-
const { parkPendingInbound } = await import("../responsiveness-probe-
|
|
18974
|
+
const { parkPendingInbound } = await import("../responsiveness-probe-NFT3GSDL.js");
|
|
18896
18975
|
const { parked, deadLettered } = parkPendingInbound(codeName, new Date(fatalNowMs));
|
|
18897
18976
|
paneFatalStreak.delete(codeName);
|
|
18898
18977
|
paneFatalRestarts.set(codeName, [...history, fatalNowMs]);
|
|
@@ -18923,7 +19002,7 @@ async function pollCycleInner() {
|
|
|
18923
19002
|
TRANSCRIPT_MOUNT_ESCALATION_REFRESH_MS,
|
|
18924
19003
|
bindSourceEscalations
|
|
18925
19004
|
} = await import("../transcript-mount-health-OHE6IVJV.js");
|
|
18926
|
-
const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-
|
|
19005
|
+
const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-C7632TPG.js");
|
|
18927
19006
|
const mountConfig = resolveTranscriptMountConfig();
|
|
18928
19007
|
const liveAgents = agentState.persistentSessionAgents;
|
|
18929
19008
|
for (const tracked of [
|
|
@@ -19088,7 +19167,7 @@ async function pollCycleInner() {
|
|
|
19088
19167
|
}
|
|
19089
19168
|
try {
|
|
19090
19169
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-VR5QGP3J.js");
|
|
19091
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
19170
|
+
const { probeSessionAuth } = await import("../session-auth-dead-BTGGL4MA.js");
|
|
19092
19171
|
const observations = [];
|
|
19093
19172
|
const pendingCacheCommits = [];
|
|
19094
19173
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -19716,7 +19795,7 @@ async function pollCycleInner() {
|
|
|
19716
19795
|
const file = join44(dir, "watchdog-give-up.json");
|
|
19717
19796
|
if (!existsSync19(file)) return;
|
|
19718
19797
|
try {
|
|
19719
|
-
const raw = JSON.parse(
|
|
19798
|
+
const raw = JSON.parse(readFileSync35(file, "utf8"));
|
|
19720
19799
|
if (raw["reason"] !== "usage_limit") return;
|
|
19721
19800
|
raw["usage_limit_last_seen_at"] = (/* @__PURE__ */ new Date()).toISOString();
|
|
19722
19801
|
atomicWriteFileSync(file, JSON.stringify(raw));
|
|
@@ -20326,7 +20405,7 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
20326
20405
|
newHash = sha256(stripDynamicSections(artifact.content));
|
|
20327
20406
|
try {
|
|
20328
20407
|
const projectClaudeMd = join44(config.configDir, agent.code_name, "project", "CLAUDE.md");
|
|
20329
|
-
const existing =
|
|
20408
|
+
const existing = readFileSync35(projectClaudeMd, "utf-8");
|
|
20330
20409
|
existingHash = sha256(stripDynamicSections(existing));
|
|
20331
20410
|
} catch {
|
|
20332
20411
|
existingHash = null;
|
|
@@ -20344,7 +20423,7 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
20344
20423
|
const generatorKeys = Object.keys(generatorServers);
|
|
20345
20424
|
let existingRaw = "";
|
|
20346
20425
|
try {
|
|
20347
|
-
existingRaw =
|
|
20426
|
+
existingRaw = readFileSync35(filePath, "utf-8");
|
|
20348
20427
|
} catch {
|
|
20349
20428
|
}
|
|
20350
20429
|
const existingServers = parseMcp(existingRaw);
|
|
@@ -20360,7 +20439,7 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
20360
20439
|
} else if (artifact.relativePath === "opencode.json") {
|
|
20361
20440
|
let existingRaw = null;
|
|
20362
20441
|
try {
|
|
20363
|
-
existingRaw =
|
|
20442
|
+
existingRaw = readFileSync35(filePath, "utf-8");
|
|
20364
20443
|
} catch {
|
|
20365
20444
|
}
|
|
20366
20445
|
const mergeResult = mergeOpencodeConfigArtifact(artifact.content, existingRaw);
|
|
@@ -21125,7 +21204,7 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
21125
21204
|
const projectMcpPath = join44(projectDir, ".mcp.json");
|
|
21126
21205
|
let mcpConfig = { mcpServers: {} };
|
|
21127
21206
|
try {
|
|
21128
|
-
mcpConfig = JSON.parse(
|
|
21207
|
+
mcpConfig = JSON.parse(readFileSync35(provisionMcpPath, "utf-8"));
|
|
21129
21208
|
if (!mcpConfig.mcpServers) mcpConfig.mcpServers = {};
|
|
21130
21209
|
} catch {
|
|
21131
21210
|
}
|
|
@@ -21427,7 +21506,7 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
21427
21506
|
const envIntPath = join44(projectDir, ".env.integrations");
|
|
21428
21507
|
let preWriteEnv;
|
|
21429
21508
|
try {
|
|
21430
|
-
preWriteEnv =
|
|
21509
|
+
preWriteEnv = readFileSync35(envIntPath, "utf-8");
|
|
21431
21510
|
} catch {
|
|
21432
21511
|
preWriteEnv = void 0;
|
|
21433
21512
|
}
|
|
@@ -21448,8 +21527,8 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
21448
21527
|
if (fw === "claude-code" && isSessionHealthy(agent.code_name)) {
|
|
21449
21528
|
try {
|
|
21450
21529
|
const projectMcpPath = join44(projectDir, ".mcp.json");
|
|
21451
|
-
const postWriteEnv =
|
|
21452
|
-
const mcpContent =
|
|
21530
|
+
const postWriteEnv = readFileSync35(envIntPath, "utf-8");
|
|
21531
|
+
const mcpContent = readFileSync35(projectMcpPath, "utf-8");
|
|
21453
21532
|
const changedVars = diffEnvIntegrations(preWriteEnv, postWriteEnv);
|
|
21454
21533
|
const mcpJsonForReap = JSON.parse(mcpContent);
|
|
21455
21534
|
const affectedServerKeys = findMcpServersUsingVars(mcpJsonForReap, changedVars);
|
|
@@ -22103,7 +22182,7 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
22103
22182
|
let mcpJsonParsed = null;
|
|
22104
22183
|
try {
|
|
22105
22184
|
const mcpPath = join44(getProjectDir(agent.code_name), ".mcp.json");
|
|
22106
|
-
mcpJsonParsed = JSON.parse(
|
|
22185
|
+
mcpJsonParsed = JSON.parse(readFileSync35(mcpPath, "utf-8"));
|
|
22107
22186
|
} catch {
|
|
22108
22187
|
}
|
|
22109
22188
|
const computerUseIsolated = isolationMode(agent.code_name) === "docker";
|
|
@@ -22495,7 +22574,7 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
22495
22574
|
notifiedWaitingHumanIds.set(agent.code_name, freshWaitingHumanIds);
|
|
22496
22575
|
if (prevWaitingHumanIds) {
|
|
22497
22576
|
const newlyWaiting = freshBoard.filter(
|
|
22498
|
-
(b) => b.status === "waiting" && b.waiting_kind === "human" && !prevWaitingHumanIds.has(b.id) && b.metadata?.requester && // ENG-7643 (P5b-2): the API posts inline Slack buttons for a Slack
|
|
22577
|
+
(b) => b.status === "waiting" && b.waiting_kind === "human" && !prevWaitingHumanIds.has(b.id) && b.metadata?.requester && !isManagerActionWait(b) && // ENG-7643 (P5b-2): the API posts inline Slack buttons for a Slack
|
|
22499
22578
|
// requester WITH choices; suppress the text DM for that exact case
|
|
22500
22579
|
// so the requester isn't pinged twice. Non-Slack or no-choices
|
|
22501
22580
|
// still gets the manager text DM.
|
|
@@ -23777,7 +23856,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
23777
23856
|
try {
|
|
23778
23857
|
const freshId = rotateSessionForWedge(codeName);
|
|
23779
23858
|
consecutiveWedgeCycles.delete(codeName);
|
|
23780
|
-
const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-
|
|
23859
|
+
const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-NFT3GSDL.js");
|
|
23781
23860
|
const { parked, deadLettered } = parkForRestart(codeName, /* @__PURE__ */ new Date());
|
|
23782
23861
|
const parkNote = parked > 0 ? `, ${parked} inbound parked` : "";
|
|
23783
23862
|
const deadNote = deadLettered > 0 ? `, ${deadLettered} undeliverable dead-lettered` : "";
|
|
@@ -23820,7 +23899,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
23820
23899
|
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}`));
|
|
23821
23900
|
void (async () => {
|
|
23822
23901
|
try {
|
|
23823
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
23902
|
+
const { collectDiagnostics } = await import("../persistent-session-C7632TPG.js");
|
|
23824
23903
|
await api.post("/host/heartbeat", {
|
|
23825
23904
|
host_id: hostId,
|
|
23826
23905
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
|
|
@@ -23871,7 +23950,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
23871
23950
|
}
|
|
23872
23951
|
try {
|
|
23873
23952
|
const hostId = await getHostId();
|
|
23874
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
23953
|
+
const { collectDiagnostics } = await import("../persistent-session-C7632TPG.js");
|
|
23875
23954
|
await api.post("/host/heartbeat", {
|
|
23876
23955
|
host_id: hostId,
|
|
23877
23956
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
|
|
@@ -24573,7 +24652,7 @@ async function processClaudePairSessions(agents) {
|
|
|
24573
24652
|
snapshotPairConfig,
|
|
24574
24653
|
// ENG-11659: result -> report body + the manager.log line that records it.
|
|
24575
24654
|
planPairStartReport
|
|
24576
|
-
} = await import("../claude-pair-runtime-
|
|
24655
|
+
} = await import("../claude-pair-runtime-IJAQHR2V.js");
|
|
24577
24656
|
const { resetClaudeSignin, describeSigninResetForLog, describeSigninResetFailure } = await import("../claude-signin-reset-6IJMMVYG.js");
|
|
24578
24657
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
24579
24658
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
@@ -24874,7 +24953,7 @@ function loadMemoryManifest(agentId, configDir, codeName) {
|
|
|
24874
24953
|
if (cached) return cached;
|
|
24875
24954
|
let manifest = {};
|
|
24876
24955
|
try {
|
|
24877
|
-
const raw =
|
|
24956
|
+
const raw = readFileSync35(memoryManifestPath(configDir, codeName), "utf-8");
|
|
24878
24957
|
const parsed = JSON.parse(raw);
|
|
24879
24958
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
24880
24959
|
for (const [name, entry] of Object.entries(parsed)) {
|
|
@@ -24989,7 +25068,7 @@ function applyMemoryTombstones(opts) {
|
|
|
24989
25068
|
continue;
|
|
24990
25069
|
}
|
|
24991
25070
|
try {
|
|
24992
|
-
const actual = createHash20("sha256").update(
|
|
25071
|
+
const actual = createHash20("sha256").update(readFileSync35(filePath)).digest("hex");
|
|
24993
25072
|
if (actual !== entry.sha) {
|
|
24994
25073
|
outcomes.kept_modified++;
|
|
24995
25074
|
outcomes.unapplied.push({ name: tomb.name, reason: "kept_modified" });
|
|
@@ -25089,7 +25168,7 @@ async function syncMemories(agent, configDir, log2) {
|
|
|
25089
25168
|
for (const file of readdirSync14(memoryDir)) {
|
|
25090
25169
|
if (!file.endsWith(".md")) continue;
|
|
25091
25170
|
try {
|
|
25092
|
-
const raw =
|
|
25171
|
+
const raw = readFileSync35(join44(memoryDir, file), "utf-8");
|
|
25093
25172
|
const fileHash = createHash20("sha256").update(raw).digest("hex").slice(0, 16);
|
|
25094
25173
|
currentHashes.set(file, fileHash);
|
|
25095
25174
|
if (prevHashes.get(file) === fileHash) continue;
|
|
@@ -25114,7 +25193,7 @@ async function syncMemories(agent, configDir, log2) {
|
|
|
25114
25193
|
} catch (err) {
|
|
25115
25194
|
for (const mem of changedMemories) {
|
|
25116
25195
|
for (const [file] of currentHashes) {
|
|
25117
|
-
const parsed = parseMemoryFile(
|
|
25196
|
+
const parsed = parseMemoryFile(readFileSync35(join44(memoryDir, file), "utf-8"), file.replace(/\.md$/, ""));
|
|
25118
25197
|
if (parsed?.name === mem.name) currentHashes.delete(file);
|
|
25119
25198
|
}
|
|
25120
25199
|
}
|
|
@@ -25253,7 +25332,7 @@ ${mem.content}
|
|
|
25253
25332
|
if (existsSync19(filePath)) {
|
|
25254
25333
|
let existing = "";
|
|
25255
25334
|
try {
|
|
25256
|
-
existing =
|
|
25335
|
+
existing = readFileSync35(filePath, "utf-8");
|
|
25257
25336
|
} catch {
|
|
25258
25337
|
}
|
|
25259
25338
|
if (existing === desired) {
|
|
@@ -25649,7 +25728,7 @@ function startManager(opts) {
|
|
|
25649
25728
|
try {
|
|
25650
25729
|
const stateFile = getStateFile();
|
|
25651
25730
|
if (existsSync19(stateFile)) {
|
|
25652
|
-
const raw =
|
|
25731
|
+
const raw = readFileSync35(stateFile, "utf-8");
|
|
25653
25732
|
const parsed = JSON.parse(raw);
|
|
25654
25733
|
if (Array.isArray(parsed.agents)) {
|
|
25655
25734
|
state9.agents = parsed.agents;
|
|
@@ -25712,7 +25791,7 @@ async function reapOrphanedClaudePids() {
|
|
|
25712
25791
|
const looksLikeClaude = (pid) => {
|
|
25713
25792
|
if (process.platform !== "linux") return true;
|
|
25714
25793
|
try {
|
|
25715
|
-
const comm =
|
|
25794
|
+
const comm = readFileSync35(`/proc/${pid}/comm`, "utf-8").trim().toLowerCase();
|
|
25716
25795
|
return comm.includes("claude");
|
|
25717
25796
|
} catch {
|
|
25718
25797
|
return false;
|
|
@@ -25834,7 +25913,7 @@ function deployMcpAssets() {
|
|
|
25834
25913
|
const fileHash = (p) => {
|
|
25835
25914
|
try {
|
|
25836
25915
|
if (!existsSync19(p)) return null;
|
|
25837
|
-
return createHash20("sha256").update(
|
|
25916
|
+
return createHash20("sha256").update(readFileSync35(p)).digest("hex");
|
|
25838
25917
|
} catch {
|
|
25839
25918
|
return null;
|
|
25840
25919
|
}
|
|
@@ -25952,7 +26031,7 @@ function deployMcpAssets() {
|
|
|
25952
26031
|
for (const subdir of ["provision", "project"]) {
|
|
25953
26032
|
const mcpJsonPath = join44(agentsDir, entry.name, subdir, ".mcp.json");
|
|
25954
26033
|
try {
|
|
25955
|
-
const raw =
|
|
26034
|
+
const raw = readFileSync35(mcpJsonPath, "utf-8");
|
|
25956
26035
|
if (!raw.includes("@integrity-labs/augmented-mcp")) continue;
|
|
25957
26036
|
const mcpConfig = JSON.parse(raw);
|
|
25958
26037
|
const augServer = mcpConfig.mcpServers?.["augmented"];
|