@integrity-labs/agt-cli 0.28.1 → 0.28.3
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-PPCOPZTK.js → chunk-CPJ4TFUO.js} +40 -2
- package/dist/chunk-CPJ4TFUO.js.map +1 -0
- package/dist/{chunk-K2HIV5DB.js → chunk-LIB6VTH3.js} +2 -2
- package/dist/{chunk-I6QV3IE7.js → chunk-NS4G4HHD.js} +15 -1
- package/dist/{chunk-I6QV3IE7.js.map → chunk-NS4G4HHD.js.map} +1 -1
- package/dist/{claude-pair-runtime-H73LQ5AR.js → claude-pair-runtime-OACH27NE.js} +2 -2
- package/dist/lib/manager-worker.js +103 -10
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-QXLGGGO2.js → persistent-session-DSG4HI4R.js} +3 -3
- package/dist/{responsiveness-probe-3BUUOZZO.js → responsiveness-probe-GX5W4ZMI.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-PPCOPZTK.js.map +0 -1
- /package/dist/{chunk-K2HIV5DB.js.map → chunk-LIB6VTH3.js.map} +0 -0
- /package/dist/{claude-pair-runtime-H73LQ5AR.js.map → claude-pair-runtime-OACH27NE.js.map} +0 -0
- /package/dist/{persistent-session-QXLGGGO2.js.map → persistent-session-DSG4HI4R.js.map} +0 -0
- /package/dist/{responsiveness-probe-3BUUOZZO.js.map → responsiveness-probe-GX5W4ZMI.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-DSG4HI4R.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-OACH27NE.js.map
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
provisionStopHook,
|
|
23
23
|
requireHost,
|
|
24
24
|
safeWriteJsonAtomic
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-CPJ4TFUO.js";
|
|
26
26
|
import {
|
|
27
27
|
getProjectDir as getProjectDir2,
|
|
28
28
|
getReadyTasks,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
takeWatchdogGiveUpCount,
|
|
65
65
|
takeZombieDetection,
|
|
66
66
|
transcriptActivityAgeSeconds
|
|
67
|
-
} from "../chunk-
|
|
67
|
+
} from "../chunk-LIB6VTH3.js";
|
|
68
68
|
import {
|
|
69
69
|
FLAGS_SCHEMA_VERSION,
|
|
70
70
|
KANBAN_CHECK_COMMAND,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
sumTranscriptUsageInWindow,
|
|
97
97
|
worseConnectivityOutcome,
|
|
98
98
|
wrapScheduledTaskPrompt
|
|
99
|
-
} from "../chunk-
|
|
99
|
+
} from "../chunk-NS4G4HHD.js";
|
|
100
100
|
import {
|
|
101
101
|
parsePsRows,
|
|
102
102
|
reapOrphanChannelMcps
|
|
@@ -3599,7 +3599,22 @@ var agentState = {
|
|
|
3599
3599
|
// compound-keyed (`agentId:<suffix>`)
|
|
3600
3600
|
// ---------------------------------------------------------------------------
|
|
3601
3601
|
knownChannelConfigHashes: /* @__PURE__ */ new Map(),
|
|
3602
|
-
knownSkillHashes: /* @__PURE__ */ new Map()
|
|
3602
|
+
knownSkillHashes: /* @__PURE__ */ new Map(),
|
|
3603
|
+
// ---------------------------------------------------------------------------
|
|
3604
|
+
// agentId-keyed (global skills, ENG-6349)
|
|
3605
|
+
// ---------------------------------------------------------------------------
|
|
3606
|
+
/**
|
|
3607
|
+
* ENG-6349 (ADR-0023): per-agent set of global-skill ids (bare code_names)
|
|
3608
|
+
* this worker installed on the previous refresh. Global skills have no folder
|
|
3609
|
+
* prefix (they're written as `.claude/skills/<code_name>/` so `/<code_name>`
|
|
3610
|
+
* resolves), so the integration orphan sweep — which scans for `integration-`/
|
|
3611
|
+
* `plugin-` prefixes — can't see them. We track the delivered set here instead
|
|
3612
|
+
* and remove only the ids that drop out (an unpublished global), never the
|
|
3613
|
+
* agent's own or integration skills. In-memory only: a manager restart resets
|
|
3614
|
+
* it, so an unpublish during a restart window leaves the folder until the next
|
|
3615
|
+
* unpublish — acceptable for a platform-staff-rare action.
|
|
3616
|
+
*/
|
|
3617
|
+
knownGlobalSkillIds: /* @__PURE__ */ new Map()
|
|
3603
3618
|
};
|
|
3604
3619
|
function clearAgentState(agentId, codeName) {
|
|
3605
3620
|
agentState.knownVersions.delete(agentId);
|
|
@@ -3615,6 +3630,7 @@ function clearAgentState(agentId, codeName) {
|
|
|
3615
3630
|
agentState.knownSenderPolicyHashes.delete(agentId);
|
|
3616
3631
|
agentState.knownMsTeamsBehaviourHashes.delete(agentId);
|
|
3617
3632
|
agentState.knownSlackBehaviourHashes.delete(agentId);
|
|
3633
|
+
agentState.knownGlobalSkillIds.delete(agentId);
|
|
3618
3634
|
agentState.agentDisplayNames.delete(codeName);
|
|
3619
3635
|
agentState.codeNameToAgentId.delete(codeName);
|
|
3620
3636
|
let channelCacheMutated = false;
|
|
@@ -3632,6 +3648,28 @@ function clearAgentState(agentId, codeName) {
|
|
|
3632
3648
|
return channelCacheMutated;
|
|
3633
3649
|
}
|
|
3634
3650
|
|
|
3651
|
+
// src/lib/manager/global-skills.ts
|
|
3652
|
+
function sanitizeGlobalSkillId(codeName) {
|
|
3653
|
+
return codeName.trim().replace(/[^a-z0-9-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
3654
|
+
}
|
|
3655
|
+
function planGlobalSkillSync(globalSkills, prevIds, hashOf, knownHash) {
|
|
3656
|
+
const currentIds = /* @__PURE__ */ new Set();
|
|
3657
|
+
const installs = [];
|
|
3658
|
+
for (const gs of globalSkills ?? []) {
|
|
3659
|
+
const codeName = (gs?.code_name ?? "").trim();
|
|
3660
|
+
const content = gs?.content ?? "";
|
|
3661
|
+
if (!codeName || !content.trim()) continue;
|
|
3662
|
+
const skillId = sanitizeGlobalSkillId(codeName);
|
|
3663
|
+
if (!skillId) continue;
|
|
3664
|
+
currentIds.add(skillId);
|
|
3665
|
+
const hash = hashOf(content);
|
|
3666
|
+
if (knownHash(skillId) === hash) continue;
|
|
3667
|
+
installs.push({ skillId, content, hash });
|
|
3668
|
+
}
|
|
3669
|
+
const removes = [...prevIds].filter((id) => !currentIds.has(id));
|
|
3670
|
+
return { installs, removes, currentIds };
|
|
3671
|
+
}
|
|
3672
|
+
|
|
3635
3673
|
// src/lib/wedge-detection.ts
|
|
3636
3674
|
var DEFAULTS = {
|
|
3637
3675
|
inboundWaitSeconds: 120,
|
|
@@ -5041,7 +5079,7 @@ var cachedMaintenanceWindow = null;
|
|
|
5041
5079
|
var lastVersionCheckAt = 0;
|
|
5042
5080
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
5043
5081
|
var lastResponsivenessProbeAt = 0;
|
|
5044
|
-
var agtCliVersion = true ? "0.28.
|
|
5082
|
+
var agtCliVersion = true ? "0.28.3" : "dev";
|
|
5045
5083
|
function resolveBrewPath(execFileSync4) {
|
|
5046
5084
|
try {
|
|
5047
5085
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -6244,7 +6282,7 @@ async function pollCycle() {
|
|
|
6244
6282
|
}
|
|
6245
6283
|
try {
|
|
6246
6284
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
6247
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
6285
|
+
const { collectDiagnostics } = await import("../persistent-session-DSG4HI4R.js");
|
|
6248
6286
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
6249
6287
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
|
|
6250
6288
|
let tailscaleHostname;
|
|
@@ -6338,7 +6376,7 @@ async function pollCycle() {
|
|
|
6338
6376
|
const {
|
|
6339
6377
|
collectResponsivenessProbes,
|
|
6340
6378
|
getResponsivenessIntervalMs
|
|
6341
|
-
} = await import("../responsiveness-probe-
|
|
6379
|
+
} = await import("../responsiveness-probe-GX5W4ZMI.js");
|
|
6342
6380
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
6343
6381
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
6344
6382
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -6370,7 +6408,7 @@ async function pollCycle() {
|
|
|
6370
6408
|
collectResponsivenessProbes,
|
|
6371
6409
|
livePendingInboundOldestAgeSeconds,
|
|
6372
6410
|
parkPendingInbound
|
|
6373
|
-
} = await import("../responsiveness-probe-
|
|
6411
|
+
} = await import("../responsiveness-probe-GX5W4ZMI.js");
|
|
6374
6412
|
const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
|
|
6375
6413
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
6376
6414
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -7198,6 +7236,23 @@ async function processAgent(agent, agentStates) {
|
|
|
7198
7236
|
}
|
|
7199
7237
|
send({ type: "provisioned", agentId: agent.agent_id, codeName: agent.code_name });
|
|
7200
7238
|
}
|
|
7239
|
+
if (Array.isArray(refreshData.workflows)) {
|
|
7240
|
+
try {
|
|
7241
|
+
const provWorkflowsDir = join10(agentDir, ".claude", "workflows");
|
|
7242
|
+
if (existsSync5(provWorkflowsDir)) {
|
|
7243
|
+
const expected = new Set(refreshData.workflows.map((w) => `${w.name}.js`));
|
|
7244
|
+
for (const file of readdirSync5(provWorkflowsDir)) {
|
|
7245
|
+
if (!file.endsWith(".js")) continue;
|
|
7246
|
+
if (expected.has(file)) continue;
|
|
7247
|
+
try {
|
|
7248
|
+
rmSync2(join10(provWorkflowsDir, file));
|
|
7249
|
+
} catch {
|
|
7250
|
+
}
|
|
7251
|
+
}
|
|
7252
|
+
}
|
|
7253
|
+
} catch {
|
|
7254
|
+
}
|
|
7255
|
+
}
|
|
7201
7256
|
if (frameworkAdapter.deployArtifactsToProject) {
|
|
7202
7257
|
frameworkAdapter.deployArtifactsToProject(agent.code_name, agentDir);
|
|
7203
7258
|
}
|
|
@@ -8018,6 +8073,40 @@ async function processAgent(agent, agentStates) {
|
|
|
8018
8073
|
} catch (err) {
|
|
8019
8074
|
log(`Integration skill cleanup failed for '${agent.code_name}': ${err.message}`);
|
|
8020
8075
|
}
|
|
8076
|
+
try {
|
|
8077
|
+
const plan = planGlobalSkillSync(
|
|
8078
|
+
refreshAny.global_skills ?? [],
|
|
8079
|
+
agentState.knownGlobalSkillIds.get(agent.agent_id) ?? /* @__PURE__ */ new Set(),
|
|
8080
|
+
(content) => createHash4("sha256").update(content).digest("hex").slice(0, 12),
|
|
8081
|
+
(skillId) => agentState.knownSkillHashes.get(`global-skill:${agent.agent_id}:${skillId}`)
|
|
8082
|
+
);
|
|
8083
|
+
for (const { skillId, content, hash } of plan.installs) {
|
|
8084
|
+
frameworkAdapter.installSkillFiles(agent.code_name, skillId, [{ relativePath: "SKILL.md", content }]);
|
|
8085
|
+
agentState.knownSkillHashes.set(`global-skill:${agent.agent_id}:${skillId}`, hash);
|
|
8086
|
+
log(`Installed global skill '${skillId}' for '${agent.code_name}'`);
|
|
8087
|
+
}
|
|
8088
|
+
if (plan.removes.length) {
|
|
8089
|
+
const { rmSync: rmSync3 } = await import("fs");
|
|
8090
|
+
const { homedir: homedir6 } = await import("os");
|
|
8091
|
+
const globalSkillDirs = [
|
|
8092
|
+
join10(homedir6(), ".augmented", agent.code_name, "skills"),
|
|
8093
|
+
join10(homedir6(), ".augmented", agent.code_name, "project", ".claude", "skills"),
|
|
8094
|
+
join10(homedir6(), `.openclaw-${agent.code_name}`, "skills"),
|
|
8095
|
+
join10(agentDir, ".claude", "skills")
|
|
8096
|
+
];
|
|
8097
|
+
for (const id of plan.removes) {
|
|
8098
|
+
for (const dir of globalSkillDirs) {
|
|
8099
|
+
const p = join10(dir, id);
|
|
8100
|
+
if (existsSync5(p)) rmSync3(p, { recursive: true, force: true });
|
|
8101
|
+
}
|
|
8102
|
+
agentState.knownSkillHashes.delete(`global-skill:${agent.agent_id}:${id}`);
|
|
8103
|
+
log(`Removed unpublished global skill '${id}' for '${agent.code_name}'`);
|
|
8104
|
+
}
|
|
8105
|
+
}
|
|
8106
|
+
agentState.knownGlobalSkillIds.set(agent.agent_id, plan.currentIds);
|
|
8107
|
+
} catch (err) {
|
|
8108
|
+
log(`Global skill install failed for '${agent.code_name}': ${err.message}`);
|
|
8109
|
+
}
|
|
8021
8110
|
try {
|
|
8022
8111
|
const agentFwForIndex = agentFrameworkCache.get(agent.code_name) ?? "openclaw";
|
|
8023
8112
|
if (agentFwForIndex === "claude-code") {
|
|
@@ -10966,7 +11055,7 @@ async function processClaudePairSessions(agents) {
|
|
|
10966
11055
|
killPairSession,
|
|
10967
11056
|
pairTmuxSession,
|
|
10968
11057
|
finalizeClaudePairOnboarding
|
|
10969
|
-
} = await import("../claude-pair-runtime-
|
|
11058
|
+
} = await import("../claude-pair-runtime-OACH27NE.js");
|
|
10970
11059
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
10971
11060
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
10972
11061
|
const killed = await killPairSession(pairTmuxSession(pairId));
|
|
@@ -11237,7 +11326,11 @@ function generateArtifacts(agent, refreshData, adapter) {
|
|
|
11237
11326
|
knowledgeDelivery: refreshData.agent.knowledge_delivery ?? "both",
|
|
11238
11327
|
teamMembers: refreshData.team_members ?? void 0,
|
|
11239
11328
|
people: refreshData.people ?? void 0,
|
|
11240
|
-
guardrails: refreshData.guardrails
|
|
11329
|
+
guardrails: refreshData.guardrails,
|
|
11330
|
+
// ADR-0012 / ENG-6352: down-synced dynamic workflows (flag-gated, resolved
|
|
11331
|
+
// server-side). The claude-code adapter renders each as
|
|
11332
|
+
// `.claude/workflows/<name>.js`; undefined/empty no-ops.
|
|
11333
|
+
workflows: refreshData.workflows
|
|
11241
11334
|
};
|
|
11242
11335
|
const provisionOutput = provision(provisionInput, adapter.id);
|
|
11243
11336
|
return provisionOutput.artifacts;
|