@integrity-labs/agt-cli 0.10.3 → 0.10.5
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 +3 -3
- package/dist/{chunk-6YGOQRAR.js → chunk-R2DDHROT.js} +33 -7
- package/dist/chunk-R2DDHROT.js.map +1 -0
- package/dist/lib/manager-worker.js +42 -2
- package/dist/lib/manager-worker.js.map +1 -1
- package/mcp/slack-channel.js +72 -0
- package/package.json +1 -1
- package/dist/chunk-6YGOQRAR.js.map +0 -1
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
provisionStopHook,
|
|
11
11
|
requireHost,
|
|
12
12
|
resolveChannels
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-R2DDHROT.js";
|
|
14
14
|
import {
|
|
15
15
|
findTaskByTemplate,
|
|
16
16
|
getProjectDir,
|
|
@@ -1530,7 +1530,19 @@ async function processAgent(agent, agentStates) {
|
|
|
1530
1530
|
for (const artifact of artifacts) {
|
|
1531
1531
|
const filePath = join(agentDir, artifact.relativePath);
|
|
1532
1532
|
const newHash = sha256(artifact.content);
|
|
1533
|
-
|
|
1533
|
+
let existingHash;
|
|
1534
|
+
if (artifact.relativePath === "CLAUDE.md") {
|
|
1535
|
+
try {
|
|
1536
|
+
const projectClaudeMd = join(config.configDir, agent.code_name, "project", "CLAUDE.md");
|
|
1537
|
+
const existing = readFileSync(projectClaudeMd, "utf-8");
|
|
1538
|
+
const stripped = existing.replace(new RegExp(`${SKILLS_INDEX_START}[\\s\\S]*?${SKILLS_INDEX_END}`), "").trimEnd();
|
|
1539
|
+
existingHash = sha256(stripped);
|
|
1540
|
+
} catch {
|
|
1541
|
+
existingHash = null;
|
|
1542
|
+
}
|
|
1543
|
+
} else {
|
|
1544
|
+
existingHash = hashFile(filePath);
|
|
1545
|
+
}
|
|
1534
1546
|
if (newHash !== existingHash) {
|
|
1535
1547
|
changedFiles.push(artifact);
|
|
1536
1548
|
}
|
|
@@ -1680,6 +1692,34 @@ async function processAgent(agent, agentStates) {
|
|
|
1680
1692
|
}
|
|
1681
1693
|
}
|
|
1682
1694
|
}
|
|
1695
|
+
if (frameworkId === "claude-code") {
|
|
1696
|
+
const channelPluginMap = {
|
|
1697
|
+
telegram: "telegram",
|
|
1698
|
+
discord: "discord",
|
|
1699
|
+
slack: "slack"
|
|
1700
|
+
};
|
|
1701
|
+
for (const channelId of Object.keys(refreshData.channel_configs)) {
|
|
1702
|
+
const pluginName = channelPluginMap[channelId];
|
|
1703
|
+
if (!pluginName) continue;
|
|
1704
|
+
const entry = refreshData.channel_configs[channelId];
|
|
1705
|
+
if (!entry || entry.status !== "active" && entry.status !== "pending") continue;
|
|
1706
|
+
const pluginDir = join(homedir(), ".claude", "plugins", pluginName);
|
|
1707
|
+
if (existsSync(pluginDir)) continue;
|
|
1708
|
+
try {
|
|
1709
|
+
const { execFileSync: efs } = await import("child_process");
|
|
1710
|
+
const claudePath = efs("which", ["claude"], { timeout: 5e3 }).toString().trim();
|
|
1711
|
+
if (claudePath) {
|
|
1712
|
+
efs(claudePath, ["plugin", "add", pluginName], {
|
|
1713
|
+
timeout: 3e4,
|
|
1714
|
+
stdio: "pipe"
|
|
1715
|
+
});
|
|
1716
|
+
log(`Auto-installed '${pluginName}' Claude Code plugin for '${agent.code_name}'`);
|
|
1717
|
+
}
|
|
1718
|
+
} catch (err) {
|
|
1719
|
+
log(`Failed to auto-install '${pluginName}' plugin for '${agent.code_name}': ${err.message}`);
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1683
1723
|
} else if (agent.status === "paused") {
|
|
1684
1724
|
if (frameworkAdapter.setChannelEnabled) {
|
|
1685
1725
|
for (const channelId of Object.keys(refreshData.channel_configs)) {
|