@integrity-labs/agt-cli 0.28.480 → 0.28.482
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-JBDLGPQU.js → chunk-B6AXXPYQ.js} +32 -26
- package/dist/chunk-B6AXXPYQ.js.map +1 -0
- package/dist/{chunk-EOH75U22.js → chunk-DNC5JGOV.js} +30 -13
- package/dist/chunk-DNC5JGOV.js.map +1 -0
- package/dist/{claude-pair-runtime-RU7ZJDDB.js → claude-pair-runtime-2XPTEGQR.js} +2 -2
- package/dist/lib/manager-worker.js +11 -11
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +18 -10
- package/dist/mcp/index.js +141 -2
- package/dist/mcp/origami.js +18 -10
- package/dist/mcp/slack-channel.js +18 -10
- package/dist/mcp/telegram-channel.js +18 -10
- package/dist/{persistent-session-USTI74Q5.js → persistent-session-IBMUPQZ2.js} +2 -2
- package/dist/{responsiveness-probe-3PRCIAML.js → responsiveness-probe-QBLQIMZR.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-EOH75U22.js.map +0 -1
- package/dist/chunk-JBDLGPQU.js.map +0 -1
- /package/dist/{claude-pair-runtime-RU7ZJDDB.js.map → claude-pair-runtime-2XPTEGQR.js.map} +0 -0
- /package/dist/{persistent-session-USTI74Q5.js.map → persistent-session-IBMUPQZ2.js.map} +0 -0
- /package/dist/{responsiveness-probe-3PRCIAML.js.map → responsiveness-probe-QBLQIMZR.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-B6AXXPYQ.js";
|
|
44
44
|
import {
|
|
45
45
|
AnchorSessionClient,
|
|
46
46
|
CHANNEL_REGISTRY,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
requiredMcpWildcard,
|
|
72
72
|
resolveChannels,
|
|
73
73
|
serializeManifestForSlackCli
|
|
74
|
-
} from "../chunk-
|
|
74
|
+
} from "../chunk-DNC5JGOV.js";
|
|
75
75
|
import "../chunk-XWVM4KPK.js";
|
|
76
76
|
|
|
77
77
|
// src/bin/agt.ts
|
|
@@ -4830,7 +4830,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4830
4830
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4831
4831
|
import chalk18 from "chalk";
|
|
4832
4832
|
import ora16 from "ora";
|
|
4833
|
-
var cliVersion = true ? "0.28.
|
|
4833
|
+
var cliVersion = true ? "0.28.482" : "dev";
|
|
4834
4834
|
async function fetchLatestVersion() {
|
|
4835
4835
|
const host2 = getHost();
|
|
4836
4836
|
if (!host2) return null;
|
|
@@ -6002,7 +6002,7 @@ function handleError(err) {
|
|
|
6002
6002
|
}
|
|
6003
6003
|
|
|
6004
6004
|
// src/bin/agt.ts
|
|
6005
|
-
var cliVersion2 = true ? "0.28.
|
|
6005
|
+
var cliVersion2 = true ? "0.28.482" : "dev";
|
|
6006
6006
|
var program = new Command();
|
|
6007
6007
|
program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
|
|
6008
6008
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
resolveConnectivityProbe,
|
|
31
31
|
worseConnectivityOutcome,
|
|
32
32
|
wrapScheduledTaskPrompt
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-DNC5JGOV.js";
|
|
34
34
|
import {
|
|
35
35
|
parsePsRows
|
|
36
36
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -2024,14 +2024,18 @@ function provisionStopHook(codeName) {
|
|
|
2024
2024
|
settings["hooks"] = hooks;
|
|
2025
2025
|
writeFileSync3(settingsPath, JSON.stringify(settings, null, 2));
|
|
2026
2026
|
}
|
|
2027
|
-
function provisionIsolationHook(codeName) {
|
|
2027
|
+
function provisionIsolationHook(codeName, agentId) {
|
|
2028
2028
|
const projectDir = getProjectDir(codeName);
|
|
2029
2029
|
const claudeDir = join2(projectDir, ".claude");
|
|
2030
2030
|
mkdirSync2(claudeDir, { recursive: true });
|
|
2031
|
+
const hasAgentId = agentId !== void 0;
|
|
2032
|
+
if (hasAgentId)
|
|
2033
|
+
assertValidAgentId(agentId);
|
|
2031
2034
|
const homeDir = getHomeDir();
|
|
2032
2035
|
const augmentedBase = join2(homeDir, ".augmented");
|
|
2033
|
-
const ownAgentDir =
|
|
2036
|
+
const ownAgentDir = getAgentDir(codeName);
|
|
2034
2037
|
const logFile = join2(ownAgentDir, "isolation.log");
|
|
2038
|
+
const idAllowClause = hasAgentId ? ` && [ "$AGENT_DIR" != "${agentId}" ]` : "";
|
|
2035
2039
|
const hookScriptPath = join2(claudeDir, "agt-isolation-hook.sh");
|
|
2036
2040
|
const hookScript = [
|
|
2037
2041
|
"#!/bin/bash",
|
|
@@ -2051,7 +2055,7 @@ function provisionIsolationHook(codeName) {
|
|
|
2051
2055
|
` if echo "$CMD" | grep -qE '${augmentedBase}/[^/]+/' 2>/dev/null; then`,
|
|
2052
2056
|
` MATCH=$(echo "$CMD" | grep -oE '${augmentedBase}/[^/]+' | head -1)`,
|
|
2053
2057
|
` AGENT_DIR=$(basename "$MATCH")`,
|
|
2054
|
-
` if [ "$AGENT_DIR" != "${codeName}" ] && [ "$AGENT_DIR" != "_mcp" ]; then`,
|
|
2058
|
+
` if [ "$AGENT_DIR" != "${codeName}" ]${idAllowClause} && [ "$AGENT_DIR" != "_mcp" ]; then`,
|
|
2055
2059
|
` echo "$(date -u +%Y-%m-%dT%H:%M:%SZ) BLOCKED bash targeting $MATCH" >> "${logFile}"`,
|
|
2056
2060
|
` echo "Access denied: you cannot access other agents' directories." >&2`,
|
|
2057
2061
|
" exit 2",
|
|
@@ -2076,7 +2080,7 @@ function provisionIsolationHook(codeName) {
|
|
|
2076
2080
|
'case "$FILE_PATH" in',
|
|
2077
2081
|
' "$AUGMENTED_BASE"/*/*) ',
|
|
2078
2082
|
' AGENT_DIR=$(echo "$FILE_PATH" | sed "s|$AUGMENTED_BASE/||" | cut -d/ -f1)',
|
|
2079
|
-
` if [ "$AGENT_DIR" != "${codeName}" ] && [ "$AGENT_DIR" != "_mcp" ]; then`,
|
|
2083
|
+
` if [ "$AGENT_DIR" != "${codeName}" ]${idAllowClause} && [ "$AGENT_DIR" != "_mcp" ]; then`,
|
|
2080
2084
|
` echo "$(date -u +%Y-%m-%dT%H:%M:%SZ) BLOCKED $TOOL on $FILE_PATH" >> "${logFile}"`,
|
|
2081
2085
|
` echo "Access denied: you cannot access other agents' directories." >&2`,
|
|
2082
2086
|
" exit 2",
|
|
@@ -2333,8 +2337,7 @@ function provisionOrientHook(codeName) {
|
|
|
2333
2337
|
const projectDir = getProjectDir(codeName);
|
|
2334
2338
|
const claudeDir = join2(projectDir, ".claude");
|
|
2335
2339
|
mkdirSync2(claudeDir, { recursive: true });
|
|
2336
|
-
const
|
|
2337
|
-
const agentDir = join2(homeDir, ".augmented", codeName);
|
|
2340
|
+
const agentDir = getAgentDir(codeName);
|
|
2338
2341
|
const hookScriptPath = join2(claudeDir, "agt-orient-hook.sh");
|
|
2339
2342
|
const hookScript = [
|
|
2340
2343
|
"#!/bin/bash",
|
|
@@ -2515,8 +2518,7 @@ function provisionPreCompactHook(codeName) {
|
|
|
2515
2518
|
const projectDir = getProjectDir(codeName);
|
|
2516
2519
|
const claudeDir = join2(projectDir, ".claude");
|
|
2517
2520
|
mkdirSync2(claudeDir, { recursive: true });
|
|
2518
|
-
const
|
|
2519
|
-
const agentDir = join2(homeDir, ".augmented", codeName);
|
|
2521
|
+
const agentDir = getAgentDir(codeName);
|
|
2520
2522
|
const jqNormalizeContent = '(.message.content // .content // []) | if type == "string" then [{type: "text", text: .}] elif type == "array" then . else [] end';
|
|
2521
2523
|
const hookScriptPath = join2(claudeDir, "agt-pre-compact-hook.sh");
|
|
2522
2524
|
const hookScript = [
|
|
@@ -2653,8 +2655,7 @@ function provisionSessionStateHook(codeName) {
|
|
|
2653
2655
|
const projectDir = getProjectDir(codeName);
|
|
2654
2656
|
const claudeDir = join2(projectDir, ".claude");
|
|
2655
2657
|
mkdirSync2(claudeDir, { recursive: true });
|
|
2656
|
-
const
|
|
2657
|
-
const agentDir = join2(homeDir, ".augmented", codeName);
|
|
2658
|
+
const agentDir = getAgentDir(codeName);
|
|
2658
2659
|
const hookScriptPath = join2(claudeDir, "agt-session-state-hook.sh");
|
|
2659
2660
|
const hookScript = `#!/usr/bin/env bash
|
|
2660
2661
|
# Auto-generated by Augmented (ENG-6233 / ENG-6268) \u2014 SessionStart session-state
|
|
@@ -2867,15 +2868,20 @@ function buildSettingsJson(input) {
|
|
|
2867
2868
|
const projectDir = getProjectDir(agent.code_name);
|
|
2868
2869
|
const agentDir = getAgentDir(agent.code_name);
|
|
2869
2870
|
const homeDir = getHomeDir();
|
|
2871
|
+
const codenameAliasDir = join2(homeDir, ".augmented", agent.code_name);
|
|
2870
2872
|
settings["allowedDirectories"] = [
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2873
|
+
.../* @__PURE__ */ new Set([
|
|
2874
|
+
projectDir,
|
|
2875
|
+
// Agent's project dir (CLAUDE.md, settings.json, etc.)
|
|
2876
|
+
agentDir,
|
|
2877
|
+
// Agent's config dir (.env, schedules, registration)
|
|
2878
|
+
codenameAliasDir,
|
|
2879
|
+
// Codename symlink alias (== agentDir for legacy agents)
|
|
2880
|
+
join2(homeDir, ".augmented", "_mcp"),
|
|
2881
|
+
// Shared MCP binaries
|
|
2882
|
+
"/tmp"
|
|
2883
|
+
// Temp files
|
|
2884
|
+
])
|
|
2879
2885
|
];
|
|
2880
2886
|
settings["permissions"] = { deny: SECRETS_DENY_PERMISSIONS };
|
|
2881
2887
|
return settings;
|
|
@@ -4007,11 +4013,11 @@ ${sections}`
|
|
|
4007
4013
|
if (!appId || !clientSecret)
|
|
4008
4014
|
return;
|
|
4009
4015
|
const localTeamsChannel = join2(getHomeDir(), ".augmented", "_mcp", "teams-channel.js");
|
|
4010
|
-
const
|
|
4016
|
+
const agentDirMs = getAgentDir(codeName);
|
|
4011
4017
|
try {
|
|
4012
|
-
mkdirSync2(join2(
|
|
4013
|
-
mkdirSync2(join2(
|
|
4014
|
-
mkdirSync2(join2(
|
|
4018
|
+
mkdirSync2(join2(agentDirMs, "msteams-pending-inbound", ".markers"), { recursive: true });
|
|
4019
|
+
mkdirSync2(join2(agentDirMs, "msteams-pending-interactions"), { recursive: true });
|
|
4020
|
+
mkdirSync2(join2(agentDirMs, "msteams-recovery-outbox"), { recursive: true });
|
|
4015
4021
|
} catch {
|
|
4016
4022
|
}
|
|
4017
4023
|
const tenantId = config["tenant_id"] ?? "common";
|
|
@@ -4108,7 +4114,7 @@ ${sections}`
|
|
|
4108
4114
|
const phoneNumberId = config["phone_number_id"];
|
|
4109
4115
|
if (projectApiKey && phoneNumberId) {
|
|
4110
4116
|
try {
|
|
4111
|
-
mkdirSync2(join2(
|
|
4117
|
+
mkdirSync2(join2(getAgentDir(codeName), "whatsapp-pending-inbound"), { recursive: true });
|
|
4112
4118
|
} catch {
|
|
4113
4119
|
}
|
|
4114
4120
|
writeEnvIntegrationsForAgent(codeName, {
|
|
@@ -4932,7 +4938,7 @@ function exchangeFailureKind(err) {
|
|
|
4932
4938
|
}
|
|
4933
4939
|
|
|
4934
4940
|
// src/lib/api-client.ts
|
|
4935
|
-
var agtCliVersion = true ? "0.28.
|
|
4941
|
+
var agtCliVersion = true ? "0.28.482" : "dev";
|
|
4936
4942
|
var lastConfigHash = null;
|
|
4937
4943
|
function setConfigHash(hash) {
|
|
4938
4944
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -7661,4 +7667,4 @@ export {
|
|
|
7661
7667
|
managerInstallSystemUnitCommand,
|
|
7662
7668
|
managerUninstallSystemUnitCommand
|
|
7663
7669
|
};
|
|
7664
|
-
//# sourceMappingURL=chunk-
|
|
7670
|
+
//# sourceMappingURL=chunk-B6AXXPYQ.js.map
|