@integrity-labs/agt-cli 0.28.159 → 0.28.161
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 +8 -7
- package/dist/bin/agt.js.map +1 -1
- package/dist/{chunk-TNKKZHEQ.js → chunk-2D5COEAS.js} +2 -2
- package/dist/{chunk-SAAK2IP4.js → chunk-CQZDKD2U.js} +30 -1
- package/dist/chunk-CQZDKD2U.js.map +1 -0
- package/dist/{chunk-PGW3CTYR.js → chunk-TNTG4DNQ.js} +7 -3
- package/dist/chunk-TNTG4DNQ.js.map +1 -0
- package/dist/{claude-pair-runtime-E2E2FJHS.js → claude-pair-runtime-VHRJFJDJ.js} +2 -2
- package/dist/lib/manager-worker.js +36 -35
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/index.js +14 -4
- package/dist/{persistent-session-K5CFAUY7.js → persistent-session-3AC6FSX6.js} +3 -3
- package/dist/{responsiveness-probe-5BQI3RNU.js → responsiveness-probe-ZXB5REIY.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-PGW3CTYR.js.map +0 -1
- package/dist/chunk-SAAK2IP4.js.map +0 -1
- /package/dist/{chunk-TNKKZHEQ.js.map → chunk-2D5COEAS.js.map} +0 -0
- /package/dist/{claude-pair-runtime-E2E2FJHS.js.map → claude-pair-runtime-VHRJFJDJ.js.map} +0 -0
- /package/dist/{persistent-session-K5CFAUY7.js.map → persistent-session-3AC6FSX6.js.map} +0 -0
- /package/dist/{responsiveness-probe-5BQI3RNU.js.map → responsiveness-probe-ZXB5REIY.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-3AC6FSX6.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-VHRJFJDJ.js.map
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
requireHost,
|
|
29
29
|
safeWriteJsonAtomic,
|
|
30
30
|
setConfigHash
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-TNTG4DNQ.js";
|
|
32
32
|
import {
|
|
33
33
|
getProjectDir as getProjectDir2,
|
|
34
34
|
getReadyTasks,
|
|
@@ -70,9 +70,10 @@ import {
|
|
|
70
70
|
takeZombieDetection,
|
|
71
71
|
transcriptActivityAgeSeconds,
|
|
72
72
|
writeEgressAllowlist
|
|
73
|
-
} from "../chunk-
|
|
73
|
+
} from "../chunk-2D5COEAS.js";
|
|
74
74
|
import {
|
|
75
75
|
CONVERSATION_FAILURE_CATEGORIES,
|
|
76
|
+
DEFAULT_FRAMEWORK,
|
|
76
77
|
FLAGS_SCHEMA_VERSION,
|
|
77
78
|
FLAG_REGISTRY,
|
|
78
79
|
KANBAN_CHECK_COMMAND,
|
|
@@ -110,7 +111,7 @@ import {
|
|
|
110
111
|
resolveChannels,
|
|
111
112
|
resolveDmTarget,
|
|
112
113
|
sumTranscriptUsageInWindow
|
|
113
|
-
} from "../chunk-
|
|
114
|
+
} from "../chunk-CQZDKD2U.js";
|
|
114
115
|
import {
|
|
115
116
|
parsePsRows,
|
|
116
117
|
reapOrphanChannelMcps
|
|
@@ -4535,7 +4536,7 @@ function cacheAgentDeliveryMetadata(codeName, refreshData) {
|
|
|
4535
4536
|
const agentRow = refreshData["agent"] ?? {};
|
|
4536
4537
|
const displayName = agentRow["display_name"] ?? codeName;
|
|
4537
4538
|
const ownerTeamName = agentRow["owner_team_name"] ?? null;
|
|
4538
|
-
const framework = agentRow["framework"] ??
|
|
4539
|
+
const framework = agentRow["framework"] ?? DEFAULT_FRAMEWORK;
|
|
4539
4540
|
const reportsToPersonId = agentRow["reports_to"] ?? null;
|
|
4540
4541
|
const reportsToType = agentRow["reports_to_type"] ?? null;
|
|
4541
4542
|
const channelConfigs = refreshData["channel_configs"] ?? {};
|
|
@@ -6848,7 +6849,7 @@ var frameworkBinaryChecked = /* @__PURE__ */ new Set();
|
|
|
6848
6849
|
var agentRuntimeAuthenticated = false;
|
|
6849
6850
|
var lastManagedSettingsStatus = null;
|
|
6850
6851
|
function resolveAgentFramework(codeName) {
|
|
6851
|
-
const frameworkId = agentFrameworkCache.get(codeName) ??
|
|
6852
|
+
const frameworkId = agentFrameworkCache.get(codeName) ?? DEFAULT_FRAMEWORK;
|
|
6852
6853
|
return getFramework(frameworkId);
|
|
6853
6854
|
}
|
|
6854
6855
|
var gatewayPool = null;
|
|
@@ -6877,7 +6878,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
6877
6878
|
var lastVersionCheckAt = 0;
|
|
6878
6879
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
6879
6880
|
var lastResponsivenessProbeAt = 0;
|
|
6880
|
-
var agtCliVersion = true ? "0.28.
|
|
6881
|
+
var agtCliVersion = true ? "0.28.161" : "dev";
|
|
6881
6882
|
function resolveBrewPath(execFileSync4) {
|
|
6882
6883
|
try {
|
|
6883
6884
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -7724,7 +7725,7 @@ async function migrateToProfiles() {
|
|
|
7724
7725
|
const agents = sharedConfig["agents"];
|
|
7725
7726
|
const agentList = agents?.["list"] ?? [];
|
|
7726
7727
|
if (agentList.length === 0) return;
|
|
7727
|
-
const adapter = getFramework(
|
|
7728
|
+
const adapter = getFramework(DEFAULT_FRAMEWORK);
|
|
7728
7729
|
let migrated = 0;
|
|
7729
7730
|
for (const agentEntry of agentList) {
|
|
7730
7731
|
const codeName = agentEntry["id"];
|
|
@@ -8000,7 +8001,7 @@ async function pollCycle() {
|
|
|
8000
8001
|
if (now - lastVersionCheckAt > VERSION_CHECK_INTERVAL_MS) {
|
|
8001
8002
|
try {
|
|
8002
8003
|
const firstAgent = state6.agents[0];
|
|
8003
|
-
const versionAdapter = firstAgent ? resolveAgentFramework(firstAgent.codeName) : getFramework(
|
|
8004
|
+
const versionAdapter = firstAgent ? resolveAgentFramework(firstAgent.codeName) : getFramework(DEFAULT_FRAMEWORK);
|
|
8004
8005
|
if (versionAdapter.getVersion) {
|
|
8005
8006
|
cachedFrameworkVersion = await versionAdapter.getVersion();
|
|
8006
8007
|
}
|
|
@@ -8010,7 +8011,7 @@ async function pollCycle() {
|
|
|
8010
8011
|
}
|
|
8011
8012
|
try {
|
|
8012
8013
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
8013
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
8014
|
+
const { collectDiagnostics } = await import("../persistent-session-3AC6FSX6.js");
|
|
8014
8015
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
8015
8016
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
|
|
8016
8017
|
let tailscaleHostname;
|
|
@@ -8158,7 +8159,7 @@ async function pollCycle() {
|
|
|
8158
8159
|
const {
|
|
8159
8160
|
collectResponsivenessProbes,
|
|
8160
8161
|
getResponsivenessIntervalMs
|
|
8161
|
-
} = await import("../responsiveness-probe-
|
|
8162
|
+
} = await import("../responsiveness-probe-ZXB5REIY.js");
|
|
8162
8163
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
8163
8164
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
8164
8165
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -8190,7 +8191,7 @@ async function pollCycle() {
|
|
|
8190
8191
|
collectResponsivenessProbes,
|
|
8191
8192
|
livePendingInboundOldestAgeSeconds,
|
|
8192
8193
|
parkPendingInbound
|
|
8193
|
-
} = await import("../responsiveness-probe-
|
|
8194
|
+
} = await import("../responsiveness-probe-ZXB5REIY.js");
|
|
8194
8195
|
const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
|
|
8195
8196
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
8196
8197
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -8475,7 +8476,7 @@ async function pollCycle() {
|
|
|
8475
8476
|
});
|
|
8476
8477
|
}
|
|
8477
8478
|
{
|
|
8478
|
-
const claudeCodeAgents = agentStates.filter((a) => a.status === "active").filter((a) => (agentFrameworkCache.get(a.codeName) ??
|
|
8479
|
+
const claudeCodeAgents = agentStates.filter((a) => a.status === "active").filter((a) => (agentFrameworkCache.get(a.codeName) ?? DEFAULT_FRAMEWORK) === "claude-code").map((a) => a.codeName);
|
|
8479
8480
|
checkChannelInputs(claudeCodeAgents, {
|
|
8480
8481
|
capturePane: (codeName) => {
|
|
8481
8482
|
try {
|
|
@@ -8866,7 +8867,7 @@ async function processAgent(agent, agentStates) {
|
|
|
8866
8867
|
});
|
|
8867
8868
|
return;
|
|
8868
8869
|
}
|
|
8869
|
-
const frameworkId = refreshData.agent.framework ??
|
|
8870
|
+
const frameworkId = refreshData.agent.framework ?? DEFAULT_FRAMEWORK;
|
|
8870
8871
|
agentFrameworkCache.set(agent.code_name, frameworkId);
|
|
8871
8872
|
const frameworkAdapter = getFramework(frameworkId);
|
|
8872
8873
|
agentDir = join16(frameworkAdapter.getAgentDir(agent.code_name), "provision");
|
|
@@ -9262,7 +9263,7 @@ async function processAgent(agent, agentStates) {
|
|
|
9262
9263
|
previousChannelIds,
|
|
9263
9264
|
currentChannelIds,
|
|
9264
9265
|
sessionMode: refreshData.agent.session_mode,
|
|
9265
|
-
framework: agentFrameworkCache.get(agent.code_name) ??
|
|
9266
|
+
framework: agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK,
|
|
9266
9267
|
sessionHealthy: isSessionHealthy(agent.code_name)
|
|
9267
9268
|
}) : { restart: false, added: [], removed: [] };
|
|
9268
9269
|
const quarantineOnlyRemoval = restartDecision.restart && restartDecision.added.length === 0 && restartDecision.removed.length > 0 && restartDecision.removed.every((c) => quarantinedChannels.has(c));
|
|
@@ -9319,7 +9320,7 @@ async function processAgent(agent, agentStates) {
|
|
|
9319
9320
|
previousHash: prevSenderPolicyHash,
|
|
9320
9321
|
currentHash: senderPolicyHash,
|
|
9321
9322
|
sessionMode: refreshData.agent.session_mode,
|
|
9322
|
-
framework: agentFrameworkCache.get(agent.code_name) ??
|
|
9323
|
+
framework: agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK,
|
|
9323
9324
|
sessionHealthy: isSessionHealthy(agent.code_name),
|
|
9324
9325
|
channelSetRestartAlreadyScheduled: channelSetRestartScheduled
|
|
9325
9326
|
}) : { restart: false, firstPoll: prevSenderPolicyHash === void 0, changed: false };
|
|
@@ -9361,7 +9362,7 @@ async function processAgent(agent, agentStates) {
|
|
|
9361
9362
|
previousHash: prevBehaviourHash,
|
|
9362
9363
|
currentHash: behaviourHash,
|
|
9363
9364
|
sessionMode: refreshData.agent.session_mode,
|
|
9364
|
-
framework: agentFrameworkCache.get(agent.code_name) ??
|
|
9365
|
+
framework: agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK,
|
|
9365
9366
|
sessionHealthy: isSessionHealthy(agent.code_name),
|
|
9366
9367
|
// A channel-set or sender-policy restart scheduled this tick will
|
|
9367
9368
|
// respawn the MCP children with the freshly-written env for free.
|
|
@@ -9408,7 +9409,7 @@ async function processAgent(agent, agentStates) {
|
|
|
9408
9409
|
previousHash: prevSlackBehaviourHash,
|
|
9409
9410
|
currentHash: slackBehaviourHash,
|
|
9410
9411
|
sessionMode: refreshData.agent.session_mode,
|
|
9411
|
-
framework: agentFrameworkCache.get(agent.code_name) ??
|
|
9412
|
+
framework: agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK,
|
|
9412
9413
|
sessionHealthy: isSessionHealthy(agent.code_name),
|
|
9413
9414
|
// A channel-set, sender-policy, or msteams-behaviour restart
|
|
9414
9415
|
// scheduled this tick respawns the MCP children with the
|
|
@@ -9446,7 +9447,7 @@ async function processAgent(agent, agentStates) {
|
|
|
9446
9447
|
}
|
|
9447
9448
|
}
|
|
9448
9449
|
const agentSessionMode = refreshData.agent.session_mode;
|
|
9449
|
-
if (agentSessionMode === "persistent" && (agentFrameworkCache.get(agent.code_name) ??
|
|
9450
|
+
if (agentSessionMode === "persistent" && (agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK) === "claude-code") {
|
|
9450
9451
|
try {
|
|
9451
9452
|
const agentProvisionDir = agentDir;
|
|
9452
9453
|
const projectDir = join16(homedir9(), ".augmented", agent.code_name, "project");
|
|
@@ -9488,7 +9489,7 @@ async function processAgent(agent, agentStates) {
|
|
|
9488
9489
|
if (directChatTz) directChatEnv["TZ"] = directChatTz;
|
|
9489
9490
|
if (!frameworkAdapter.writeMcpServer) {
|
|
9490
9491
|
throw new Error(
|
|
9491
|
-
`[direct-chat] Framework '${frameworkAdapter.id}' must implement writeMcpServer for direct-chat provisioning (agent=${agent.code_name}, cachedFramework=${agentFrameworkCache.get(agent.code_name) ??
|
|
9492
|
+
`[direct-chat] Framework '${frameworkAdapter.id}' must implement writeMcpServer for direct-chat provisioning (agent=${agent.code_name}, cachedFramework=${agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK})`
|
|
9492
9493
|
);
|
|
9493
9494
|
}
|
|
9494
9495
|
frameworkAdapter.writeMcpServer(agent.code_name, "direct-chat", {
|
|
@@ -9595,7 +9596,7 @@ async function processAgent(agent, agentStates) {
|
|
|
9595
9596
|
frameworkAdapter.writeIntegrations(agent.code_name, integrations, agent.agent_id);
|
|
9596
9597
|
}
|
|
9597
9598
|
log(`Integrations provisioned for '${agent.code_name}' (${integrations.length} integration(s))`);
|
|
9598
|
-
const fw = agentFrameworkCache.get(agent.code_name) ??
|
|
9599
|
+
const fw = agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK;
|
|
9599
9600
|
let rotationHandled = true;
|
|
9600
9601
|
if (fw === "claude-code" && isSessionHealthy(agent.code_name)) {
|
|
9601
9602
|
try {
|
|
@@ -9639,7 +9640,7 @@ async function processAgent(agent, agentStates) {
|
|
|
9639
9640
|
needsGatewayRestart = true;
|
|
9640
9641
|
}
|
|
9641
9642
|
}
|
|
9642
|
-
const fwForMcp = agentFrameworkCache.get(agent.code_name) ??
|
|
9643
|
+
const fwForMcp = agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK;
|
|
9643
9644
|
if (frameworkAdapter.writeMcpServer) {
|
|
9644
9645
|
try {
|
|
9645
9646
|
const toolkitData = await api.post("/host/managed-toolkits", { agent_ids: [agent.agent_id] });
|
|
@@ -9756,7 +9757,7 @@ async function processAgent(agent, agentStates) {
|
|
|
9756
9757
|
}
|
|
9757
9758
|
let tasks = refreshData.scheduled_tasks ?? [];
|
|
9758
9759
|
const existingTemplateIds = new Set(tasks.map((t) => t.template_id));
|
|
9759
|
-
const kanbanWorkRetired = (agentFrameworkCache.get(agent.code_name) ??
|
|
9760
|
+
const kanbanWorkRetired = (agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK) === "claude-code" && agentSessionMode === "persistent";
|
|
9760
9761
|
try {
|
|
9761
9762
|
const defaultsData = await api.post("/host/resolve-default-schedules", { agent_id: agent.agent_id });
|
|
9762
9763
|
const allSchedules = (defaultsData.schedules ?? []).filter(
|
|
@@ -9931,7 +9932,7 @@ async function processAgent(agent, agentStates) {
|
|
|
9931
9932
|
log(`Global skill install failed for '${agent.code_name}': ${err.message}`);
|
|
9932
9933
|
}
|
|
9933
9934
|
try {
|
|
9934
|
-
const agentFwForIndex = agentFrameworkCache.get(agent.code_name) ??
|
|
9935
|
+
const agentFwForIndex = agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK;
|
|
9935
9936
|
if (agentFwForIndex === "claude-code") {
|
|
9936
9937
|
await refreshSkillsIndexInClaudeMd(config.configDir, agent.code_name, log);
|
|
9937
9938
|
}
|
|
@@ -9971,7 +9972,7 @@ async function processAgent(agent, agentStates) {
|
|
|
9971
9972
|
}
|
|
9972
9973
|
}
|
|
9973
9974
|
}
|
|
9974
|
-
const agentFwForToolkits = agentFrameworkCache.get(agent.code_name) ??
|
|
9975
|
+
const agentFwForToolkits = agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK;
|
|
9975
9976
|
const toolkitsList = refreshAny.integration_toolkits ?? refreshAny.plugin_toolkits ?? [];
|
|
9976
9977
|
if (agentFwForToolkits === "claude-code" && toolkitsList.length) {
|
|
9977
9978
|
const toolkitUnion = /* @__PURE__ */ new Set();
|
|
@@ -9982,7 +9983,7 @@ async function processAgent(agent, agentStates) {
|
|
|
9982
9983
|
await ensureToolkitCli(toolkitSlug);
|
|
9983
9984
|
}
|
|
9984
9985
|
}
|
|
9985
|
-
const agentFw2 = agentFrameworkCache.get(agent.code_name) ??
|
|
9986
|
+
const agentFw2 = agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK;
|
|
9986
9987
|
if (agentFw2 === "claude-code" && installedIntegrationSkills.length > 0 && isSessionHealthy(agent.code_name)) {
|
|
9987
9988
|
const names = installedIntegrationSkills.join(", ");
|
|
9988
9989
|
injectMessage(
|
|
@@ -10008,7 +10009,7 @@ async function processAgent(agent, agentStates) {
|
|
|
10008
10009
|
boardItems = kanbanBoardCache.get(agent.code_name) ?? [];
|
|
10009
10010
|
}
|
|
10010
10011
|
}
|
|
10011
|
-
const agentFw = agentFrameworkCache.get(agent.code_name) ??
|
|
10012
|
+
const agentFw = agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK;
|
|
10012
10013
|
const sessionMode = refreshData.agent.session_mode ?? "oneshot";
|
|
10013
10014
|
const wantsHybridInject = isKanbanHybridEnabled();
|
|
10014
10015
|
if (agentFw === "claude-code" && sessionMode === "persistent") {
|
|
@@ -10322,7 +10323,7 @@ async function processAgent(agent, agentStates) {
|
|
|
10322
10323
|
(j) => typeof j.name === "string" && j.name.includes("kanban-work")
|
|
10323
10324
|
);
|
|
10324
10325
|
if (kanbanJob?.id) {
|
|
10325
|
-
const cliBin = resolveAgentFramework(agent.code_name).cliBinary ?? "
|
|
10326
|
+
const cliBin = resolveAgentFramework(agent.code_name).cliBinary ?? "claude";
|
|
10326
10327
|
log(`Work trigger: firing kanban-work for '${agent.code_name}'`);
|
|
10327
10328
|
execFilePromise(cliBin, ["--profile", agent.code_name, "cron", "run", kanbanJob.id]).then(() => log(`Work trigger succeeded for '${agent.code_name}'`)).catch((err) => log(`Work trigger failed for '${agent.code_name}': ${err.message}`));
|
|
10328
10329
|
}
|
|
@@ -10462,7 +10463,7 @@ In progress for ${age} minutes \u2014 auto-failed`).catch(() => {
|
|
|
10462
10463
|
agentState.writtenHashes.delete(agent.agent_id);
|
|
10463
10464
|
}
|
|
10464
10465
|
try {
|
|
10465
|
-
const obFramework = agentFrameworkCache.get(agent.code_name) ??
|
|
10466
|
+
const obFramework = agentFrameworkCache.get(agent.code_name) ?? DEFAULT_FRAMEWORK;
|
|
10466
10467
|
const obSessionMode = refreshData.agent.session_mode;
|
|
10467
10468
|
if (obFramework === "claude-code" && obSessionMode === "persistent") {
|
|
10468
10469
|
const obState = coerceOnboardingState(
|
|
@@ -11152,7 +11153,7 @@ function ensureRealtimeKanbanStarted(agentStates) {
|
|
|
11152
11153
|
if (item.source_type === "scheduled_task") return;
|
|
11153
11154
|
const agent = agentStates.find((a) => a.agentId === item.agent_id);
|
|
11154
11155
|
if (!agent) return;
|
|
11155
|
-
const agentFw = agentFrameworkCache.get(agent.codeName) ??
|
|
11156
|
+
const agentFw = agentFrameworkCache.get(agent.codeName) ?? DEFAULT_FRAMEWORK;
|
|
11156
11157
|
if (agentFw === "claude-code") {
|
|
11157
11158
|
if (isSessionHealthy(agent.codeName)) {
|
|
11158
11159
|
injectMessage(agent.codeName, "task", `New task added to your board: id=${item.id} title=${JSON.stringify(item.title)} priority=${item.priority}. Call kanban_move("${item.id}", "in_progress") and start working.`, {
|
|
@@ -11262,7 +11263,7 @@ var directChatInFlight = /* @__PURE__ */ new Set();
|
|
|
11262
11263
|
async function pollDirectChatMessages(agentStates) {
|
|
11263
11264
|
for (const agent of agentStates) {
|
|
11264
11265
|
if (agent.status !== "active") continue;
|
|
11265
|
-
const fw = agentFrameworkCache.get(agent.codeName) ??
|
|
11266
|
+
const fw = agentFrameworkCache.get(agent.codeName) ?? DEFAULT_FRAMEWORK;
|
|
11266
11267
|
if (fw === "openclaw" && (!agent.gatewayRunning || !agent.gatewayPort)) continue;
|
|
11267
11268
|
try {
|
|
11268
11269
|
const data = await api.post("/host/direct-chat/poll", { agent_id: agent.agentId });
|
|
@@ -11280,7 +11281,7 @@ async function pollDirectChatMessages(agentStates) {
|
|
|
11280
11281
|
}
|
|
11281
11282
|
async function processDirectChatMessage(agent, msg) {
|
|
11282
11283
|
noteInbound(agent.codeName);
|
|
11283
|
-
const fw = agentFrameworkCache.get(agent.codeName) ??
|
|
11284
|
+
const fw = agentFrameworkCache.get(agent.codeName) ?? DEFAULT_FRAMEWORK;
|
|
11284
11285
|
log(`[direct-chat] Processing message for '${agent.codeName}' (fw=${fw}): id=${msg.id} len=${msg.content.length}`);
|
|
11285
11286
|
if (isDirectChatMessageExpired(msg.created_at, Date.now(), directChatMaxAgeMs())) {
|
|
11286
11287
|
log(`[direct-chat] Expired backlog message for '${agent.codeName}' (msg=${msg.id}, created_at=${msg.created_at}) \u2014 draining without delivery`);
|
|
@@ -11481,7 +11482,7 @@ async function harvestCronResults(codeName, tasks, gatewayPort) {
|
|
|
11481
11482
|
const gwArgs = ["--url", `ws://127.0.0.1:${gatewayPort}`, ...token ? ["--token", token] : []];
|
|
11482
11483
|
let gatewayJobs = [];
|
|
11483
11484
|
try {
|
|
11484
|
-
const cliBin = resolveAgentFramework(codeName).cliBinary ?? "
|
|
11485
|
+
const cliBin = resolveAgentFramework(codeName).cliBinary ?? "claude";
|
|
11485
11486
|
const { stdout } = await execFilePromise(cliBin, ["--profile", codeName, "cron", "list", "--json", ...gwArgs]);
|
|
11486
11487
|
const parsed = JSON.parse(stdout);
|
|
11487
11488
|
gatewayJobs = parsed.jobs ?? [];
|
|
@@ -11500,7 +11501,7 @@ async function harvestCronResults(codeName, tasks, gatewayPort) {
|
|
|
11500
11501
|
if (!STANDUP_TEMPLATES.has(templateId) && !TASK_UPDATE_TEMPLATES.has(templateId) && !PLAN_TEMPLATES.has(templateId) && !KANBAN_WORK_TEMPLATES.has(templateId)) continue;
|
|
11501
11502
|
let runs = [];
|
|
11502
11503
|
try {
|
|
11503
|
-
const cliBin2 = resolveAgentFramework(codeName).cliBinary ?? "
|
|
11504
|
+
const cliBin2 = resolveAgentFramework(codeName).cliBinary ?? "claude";
|
|
11504
11505
|
const { stdout } = await execFilePromise(cliBin2, ["--profile", codeName, "cron", "runs", "--id", jobId, ...gwArgs]);
|
|
11505
11506
|
const parsed = JSON.parse(stdout);
|
|
11506
11507
|
runs = parsed.entries ?? [];
|
|
@@ -11600,7 +11601,7 @@ async function monitorCronHealth(agentStates) {
|
|
|
11600
11601
|
const gwArgs = ["--url", `ws://127.0.0.1:${agent.gatewayPort}`, ...token ? ["--token", token] : []];
|
|
11601
11602
|
let jobs = [];
|
|
11602
11603
|
try {
|
|
11603
|
-
const cliBin = resolveAgentFramework(agent.codeName).cliBinary ?? "
|
|
11604
|
+
const cliBin = resolveAgentFramework(agent.codeName).cliBinary ?? "claude";
|
|
11604
11605
|
const { stdout } = await execFilePromise(cliBin, ["--profile", agent.codeName, "cron", "list", "--json", ...gwArgs]);
|
|
11605
11606
|
const parsed = JSON.parse(stdout);
|
|
11606
11607
|
jobs = parsed.jobs ?? [];
|
|
@@ -11691,7 +11692,7 @@ async function processClaudePairSessions(agents) {
|
|
|
11691
11692
|
killPairSession,
|
|
11692
11693
|
pairTmuxSession,
|
|
11693
11694
|
finalizeClaudePairOnboarding
|
|
11694
|
-
} = await import("../claude-pair-runtime-
|
|
11695
|
+
} = await import("../claude-pair-runtime-VHRJFJDJ.js");
|
|
11695
11696
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
11696
11697
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
11697
11698
|
const killed = await killPairSession(pairTmuxSession(pairId));
|