@integrity-labs/agt-cli 0.28.806 → 0.28.808
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 +5 -5
- package/dist/{chunk-7TIQODEK.js → chunk-LLR42RME.js} +4 -4
- package/dist/{chunk-RMBASAMS.js → chunk-SWUBTUYM.js} +49 -3
- package/dist/chunk-SWUBTUYM.js.map +1 -0
- package/dist/{chunk-TWZFTSGP.js → chunk-TLPQULYH.js} +2 -2
- package/dist/{claude-pair-runtime-YEW7Y5N2.js → claude-pair-runtime-FUT7SLRJ.js} +2 -2
- package/dist/lib/manager-worker.js +13 -13
- package/dist/mcp/direct-chat-channel.js +21 -0
- package/dist/mcp/index.js +79 -1
- package/dist/mcp/origami.js +21 -0
- package/dist/mcp/slack-channel.js +21 -0
- package/dist/mcp/telegram-channel.js +21 -0
- package/dist/{persistent-session-GPVAPK4S.js → persistent-session-Q23JIYBR.js} +3 -3
- package/dist/{responsiveness-probe-7FEKDJZW.js → responsiveness-probe-T2I27SCG.js} +3 -3
- package/dist/{session-auth-dead-ZBMVGQYW.js → session-auth-dead-O7DBSJ3W.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-RMBASAMS.js.map +0 -1
- /package/dist/{chunk-7TIQODEK.js.map → chunk-LLR42RME.js.map} +0 -0
- /package/dist/{chunk-TWZFTSGP.js.map → chunk-TLPQULYH.js.map} +0 -0
- /package/dist/{claude-pair-runtime-YEW7Y5N2.js.map → claude-pair-runtime-FUT7SLRJ.js.map} +0 -0
- /package/dist/{persistent-session-GPVAPK4S.js.map → persistent-session-Q23JIYBR.js.map} +0 -0
- /package/dist/{responsiveness-probe-7FEKDJZW.js.map → responsiveness-probe-T2I27SCG.js.map} +0 -0
- /package/dist/{session-auth-dead-ZBMVGQYW.js.map → session-auth-dead-O7DBSJ3W.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -40,12 +40,12 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-LLR42RME.js";
|
|
44
44
|
import {
|
|
45
45
|
getProjectDir,
|
|
46
46
|
isSessionResumeDisabled,
|
|
47
47
|
readDirectChatSessionState
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-TLPQULYH.js";
|
|
49
49
|
import {
|
|
50
50
|
AnchorSessionClient,
|
|
51
51
|
CHANNEL_REGISTRY,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
serializeManifestForSlackCli,
|
|
80
80
|
sessionFileExists,
|
|
81
81
|
sessionTranscriptDir
|
|
82
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-SWUBTUYM.js";
|
|
83
83
|
import "../chunk-XWVM4KPK.js";
|
|
84
84
|
|
|
85
85
|
// src/bin/agt.ts
|
|
@@ -5467,7 +5467,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
5467
5467
|
import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
|
|
5468
5468
|
import chalk18 from "chalk";
|
|
5469
5469
|
import ora16 from "ora";
|
|
5470
|
-
var cliVersion = true ? "0.28.
|
|
5470
|
+
var cliVersion = true ? "0.28.808" : "dev";
|
|
5471
5471
|
async function fetchLatestVersion() {
|
|
5472
5472
|
const host2 = getHost();
|
|
5473
5473
|
if (!host2) return null;
|
|
@@ -6658,7 +6658,7 @@ function handleError(err) {
|
|
|
6658
6658
|
}
|
|
6659
6659
|
|
|
6660
6660
|
// src/bin/agt.ts
|
|
6661
|
-
var cliVersion2 = true ? "0.28.
|
|
6661
|
+
var cliVersion2 = true ? "0.28.808" : "dev";
|
|
6662
6662
|
var program = new Command();
|
|
6663
6663
|
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");
|
|
6664
6664
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
parseEnvIntegrations,
|
|
17
17
|
shellQuote,
|
|
18
18
|
summarizeUnanswerablePane
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-TLPQULYH.js";
|
|
20
20
|
import {
|
|
21
21
|
BIND_FAILURE_QUARANTINE_THRESHOLD,
|
|
22
22
|
INTEGRATIONS_SECTION_END,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
sessionTranscriptDir,
|
|
72
72
|
worseConnectivityOutcome,
|
|
73
73
|
wrapScheduledTaskPrompt
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-SWUBTUYM.js";
|
|
75
75
|
import {
|
|
76
76
|
parsePsRows
|
|
77
77
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -6523,7 +6523,7 @@ function exchangeFailureKind(err) {
|
|
|
6523
6523
|
}
|
|
6524
6524
|
|
|
6525
6525
|
// src/lib/api-client.ts
|
|
6526
|
-
var agtCliVersion = true ? "0.28.
|
|
6526
|
+
var agtCliVersion = true ? "0.28.808" : "dev";
|
|
6527
6527
|
var lastConfigHash = null;
|
|
6528
6528
|
function setConfigHash(hash) {
|
|
6529
6529
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -10818,4 +10818,4 @@ export {
|
|
|
10818
10818
|
managerInstallSystemUnitCommand,
|
|
10819
10819
|
managerUninstallSystemUnitCommand
|
|
10820
10820
|
};
|
|
10821
|
-
//# sourceMappingURL=chunk-
|
|
10821
|
+
//# sourceMappingURL=chunk-LLR42RME.js.map
|
|
@@ -357,6 +357,32 @@ function checkClaudeMdSize(md) {
|
|
|
357
357
|
overBy: Math.max(0, chars - CLAUDE_MD_CONTEXT_ALARM_CHARS)
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
|
+
var CLAUDE_MD_WARN_DELTA_CHARS = 1e3;
|
|
361
|
+
var CLAUDE_MD_WARN_INTERVAL_MS = 60 * 60 * 1e3;
|
|
362
|
+
var CLAUDE_MD_WARN_STATE_MAX = 256;
|
|
363
|
+
var claudeMdWarnState = /* @__PURE__ */ new Map();
|
|
364
|
+
function shouldWarnClaudeMdOverBudget(codeName, size, nowMs = Date.now()) {
|
|
365
|
+
const prev = claudeMdWarnState.get(codeName);
|
|
366
|
+
const changedSeverity = prev !== void 0 && prev.ok !== size.ok;
|
|
367
|
+
const movedMaterially = prev !== void 0 && Math.abs(size.chars - prev.chars) >= CLAUDE_MD_WARN_DELTA_CHARS;
|
|
368
|
+
const stale = prev !== void 0 && nowMs - prev.atMs >= CLAUDE_MD_WARN_INTERVAL_MS;
|
|
369
|
+
if (prev !== void 0 && !changedSeverity && !movedMaterially && !stale)
|
|
370
|
+
return false;
|
|
371
|
+
if (claudeMdWarnState.size >= CLAUDE_MD_WARN_STATE_MAX && !claudeMdWarnState.has(codeName)) {
|
|
372
|
+
let oldestKey;
|
|
373
|
+
let oldestAt = Infinity;
|
|
374
|
+
for (const [key, st] of claudeMdWarnState) {
|
|
375
|
+
if (st.atMs < oldestAt) {
|
|
376
|
+
oldestAt = st.atMs;
|
|
377
|
+
oldestKey = key;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
if (oldestKey !== void 0)
|
|
381
|
+
claudeMdWarnState.delete(oldestKey);
|
|
382
|
+
}
|
|
383
|
+
claudeMdWarnState.set(codeName, { chars: size.chars, ok: size.ok, atMs: nowMs });
|
|
384
|
+
return true;
|
|
385
|
+
}
|
|
360
386
|
function buildMemorySection() {
|
|
361
387
|
const recall = `### Recall
|
|
362
388
|
|
|
@@ -1485,9 +1511,9 @@ Reversible and internal actions stay liberal \u2014 draft, edit, open a PR.
|
|
|
1485
1511
|
- Before concluding that an agent or person doesn't exist, call \`directory_lookup\` first. Only report "not found" after the directory confirms no match. (ENG-7955)
|
|
1486
1512
|
${frontmatter.environment === "prod" ? "- Production environment: exercise extra caution with all operations.\n" : ""}`;
|
|
1487
1513
|
const size = checkClaudeMdSize(body);
|
|
1488
|
-
if (!size.withinBudget) {
|
|
1514
|
+
if (!size.withinBudget && shouldWarnClaudeMdOverBudget(frontmatter.code_name, size)) {
|
|
1489
1515
|
const share = (size.contextShare * 100).toFixed(1);
|
|
1490
|
-
console.warn(`[generateClaudeMd] CLAUDE.md for ${frontmatter.code_name} is ${size.chars} chars (~${size.tokens} tokens, ~${share}% of a ${CLAUDE_MD_CONTEXT_WINDOW_TOKENS}-token context window), over the ${CLAUDE_MD_BUDGET_CHARS}-char generator budget by ${size.chars - CLAUDE_MD_BUDGET_CHARS}${size.ok ? "" : ` \u2014 and past the ${CLAUDE_MD_CONTEXT_ALARM_CHARS}-char operational threshold`}. Nothing is truncated; this is context the agent pays for on every request. Trim the generated sections
|
|
1516
|
+
console.warn(`[generateClaudeMd] CLAUDE.md for ${frontmatter.code_name} is ${size.chars} chars (~${size.tokens} tokens, ~${share}% of a ${CLAUDE_MD_CONTEXT_WINDOW_TOKENS}-token context window), over the ${CLAUDE_MD_BUDGET_CHARS}-char generator budget by ${size.chars - CLAUDE_MD_BUDGET_CHARS}${size.ok ? "" : ` \u2014 and past the ${CLAUDE_MD_CONTEXT_ALARM_CHARS}-char operational threshold`}. Nothing is truncated; this is context the agent pays for on every request. Trim the generated sections \u2014 the largest movers are the per-agent role/charter prose, the Active-tasks block and the Integrations list. packages/core/src/__tests__/claudemd-size-budget.test.ts is the CI gate.`);
|
|
1491
1517
|
}
|
|
1492
1518
|
return body;
|
|
1493
1519
|
}
|
|
@@ -6041,6 +6067,26 @@ var FLAG_REGISTRY = [
|
|
|
6041
6067
|
// env var is retired.
|
|
6042
6068
|
envVar: "AUGMENTED_CONNECTIVITY_ESCALATION_ENABLED"
|
|
6043
6069
|
},
|
|
6070
|
+
{
|
|
6071
|
+
key: "slack-manifest-remediate",
|
|
6072
|
+
description: "Let the Slack manifest drift monitor PUSH, not just alert (ENG-9963). updateSlackManifest had exactly one caller \u2014 a console button \u2014 so nothing but a human click ever pushed a manifest; ENG-7762 changed the generator with no rollout mechanism and 26 agents went 53 days with no working per-agent slash commands. When on, the daily drift cron pushes the generated manifest for a drifted agent. When off it alerts exactly as before. NOTE what arming this authorises: a push REPLACES a customer-owned Slack app's entire manifest, so the cron only ever pushes drift whose diffs are purely additive (isSafelyRemediable) \u2014 an app with live-only entries a push would destroy is declined and left for a human. Boolean gate; ships dark.",
|
|
6073
|
+
flagType: "boolean",
|
|
6074
|
+
// Declared safe value is `false` (alert-only), matching the cron's compiled
|
|
6075
|
+
// default. The fail-safe direction is the opposite of a paging gate's and
|
|
6076
|
+
// matters more: a flag-DB read error must never authorise a WRITE to a
|
|
6077
|
+
// customer's Slack app.
|
|
6078
|
+
defaultValue: false,
|
|
6079
|
+
// Operator override, same precedence and vocabulary as the connectivity
|
|
6080
|
+
// escalation gate above, so an operator who knows one knows both.
|
|
6081
|
+
envVar: "AUGMENTED_SLACK_MANIFEST_REMEDIATE_ENABLED",
|
|
6082
|
+
// ADR-0022 §4. NOTE this is where it diverges from the connectivity gate it
|
|
6083
|
+
// otherwise mirrors, and the divergence is the point: arming THAT one only
|
|
6084
|
+
// causes alerts to open, while arming THIS one authorises a cron to REPLACE
|
|
6085
|
+
// manifests on customer-owned Slack apps. That is precisely the class the
|
|
6086
|
+
// sensitive marker exists for — a control whose relaxation should not be one
|
|
6087
|
+
// unguarded write away.
|
|
6088
|
+
sensitive: true
|
|
6089
|
+
},
|
|
6044
6090
|
{
|
|
6045
6091
|
key: "integration-reauth-reminders",
|
|
6046
6092
|
description: "Re-notify an integration that stays in needs_reauth (ENG-8370). Failure notification is at-most-once PER TRANSITION, so an integration nobody repairs is announced once and then silent forever - prod carried a row failing every 30-minute tick for ~21 days on a single day-one notification. When on, the IntegrationReauthReminder cron re-fires the existing reconnect notification on a backoff measured from failure ONSET (+1d, +3d, +7d, then weekly), skipping rows an operator has muted. When off the cron still scans and logs what it WOULD have sent, so the volume can be sized before anyone is messaged. Boolean gate; ships dark.",
|
|
@@ -13687,4 +13733,4 @@ export {
|
|
|
13687
13733
|
peekCurrentSession,
|
|
13688
13734
|
readDailySessionPin
|
|
13689
13735
|
};
|
|
13690
|
-
//# sourceMappingURL=chunk-
|
|
13736
|
+
//# sourceMappingURL=chunk-SWUBTUYM.js.map
|