@integrity-labs/agt-cli 0.28.1275 → 0.28.1276

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.
Files changed (33) hide show
  1. package/dist/{api-client-5S4JHNCY.js → api-client-LXSFEHBG.js} +3 -3
  2. package/dist/bin/agt.js +7 -7
  3. package/dist/{chunk-7PIMV2ID.js → chunk-2JILRR4Y.js} +51 -8
  4. package/dist/{chunk-7PIMV2ID.js.map → chunk-2JILRR4Y.js.map} +1 -1
  5. package/dist/{chunk-4UXZAUEY.js → chunk-C3NM6OTP.js} +2 -2
  6. package/dist/{chunk-BSVQWPBC.js → chunk-HISRTLZ3.js} +3 -3
  7. package/dist/{chunk-7D6EMIHG.js → chunk-IDLNB6GR.js} +3 -3
  8. package/dist/{chunk-GRWU34ID.js → chunk-IEXBHI4X.js} +2 -2
  9. package/dist/{chunk-V2BS3IN3.js → chunk-ZQVYTNLA.js} +52 -1
  10. package/dist/{chunk-V2BS3IN3.js.map → chunk-ZQVYTNLA.js.map} +1 -1
  11. package/dist/{claude-code-updater-EC3JMSNJ.js → claude-code-updater-GADHFGSY.js} +3 -3
  12. package/dist/{claude-pair-runtime-NPBFKJSQ.js → claude-pair-runtime-TUWLJ7TS.js} +3 -3
  13. package/dist/lib/manager-worker.js +22 -21
  14. package/dist/lib/manager-worker.js.map +1 -1
  15. package/dist/mcp/direct-chat-channel.js +51 -0
  16. package/dist/mcp/index.js +282 -10
  17. package/dist/mcp/origami.js +51 -0
  18. package/dist/mcp/slack-channel.js +51 -0
  19. package/dist/mcp/telegram-channel.js +51 -0
  20. package/dist/{persistent-session-EJUOBWXJ.js → persistent-session-VII4LBJ2.js} +4 -4
  21. package/dist/{responsiveness-probe-GBYZCGXX.js → responsiveness-probe-GX3TEW2E.js} +4 -4
  22. package/dist/{session-auth-dead-4U6NDCWN.js → session-auth-dead-7NXTFGDV.js} +3 -3
  23. package/package.json +1 -1
  24. /package/dist/{api-client-5S4JHNCY.js.map → api-client-LXSFEHBG.js.map} +0 -0
  25. /package/dist/{chunk-4UXZAUEY.js.map → chunk-C3NM6OTP.js.map} +0 -0
  26. /package/dist/{chunk-BSVQWPBC.js.map → chunk-HISRTLZ3.js.map} +0 -0
  27. /package/dist/{chunk-7D6EMIHG.js.map → chunk-IDLNB6GR.js.map} +0 -0
  28. /package/dist/{chunk-GRWU34ID.js.map → chunk-IEXBHI4X.js.map} +0 -0
  29. /package/dist/{claude-code-updater-EC3JMSNJ.js.map → claude-code-updater-GADHFGSY.js.map} +0 -0
  30. /package/dist/{claude-pair-runtime-NPBFKJSQ.js.map → claude-pair-runtime-TUWLJ7TS.js.map} +0 -0
  31. /package/dist/{persistent-session-EJUOBWXJ.js.map → persistent-session-VII4LBJ2.js.map} +0 -0
  32. /package/dist/{responsiveness-probe-GBYZCGXX.js.map → responsiveness-probe-GX3TEW2E.js.map} +0 -0
  33. /package/dist/{session-auth-dead-4U6NDCWN.js.map → session-auth-dead-7NXTFGDV.js.map} +0 -0
@@ -15,8 +15,8 @@ import {
15
15
  mintRotatedHostKey,
16
16
  probeHostKey,
17
17
  setConfigHash
18
- } from "./chunk-BSVQWPBC.js";
19
- import "./chunk-V2BS3IN3.js";
18
+ } from "./chunk-HISRTLZ3.js";
19
+ import "./chunk-ZQVYTNLA.js";
20
20
  import "./chunk-DGUM43GV.js";
21
21
  export {
22
22
  ApiError,
@@ -36,4 +36,4 @@ export {
36
36
  probeHostKey,
37
37
  setConfigHash
38
38
  };
39
- //# sourceMappingURL=api-client-5S4JHNCY.js.map
39
+ //# sourceMappingURL=api-client-LXSFEHBG.js.map
package/dist/bin/agt.js CHANGED
@@ -31,7 +31,7 @@ import {
31
31
  success,
32
32
  table,
33
33
  warn
34
- } from "../chunk-7PIMV2ID.js";
34
+ } from "../chunk-2JILRR4Y.js";
35
35
  import {
36
36
  ApiError,
37
37
  PROD_AGT_HOST,
@@ -42,17 +42,17 @@ import {
42
42
  getHost,
43
43
  getHostId,
44
44
  setActiveTeam
45
- } from "../chunk-BSVQWPBC.js";
45
+ } from "../chunk-HISRTLZ3.js";
46
46
  import {
47
47
  getProjectDir,
48
48
  isSessionResumeDisabled,
49
49
  readDirectChatSessionState
50
- } from "../chunk-7D6EMIHG.js";
50
+ } from "../chunk-IDLNB6GR.js";
51
51
  import {
52
52
  markDailySessionSpawn,
53
53
  sessionFileExists,
54
54
  sessionTranscriptDir
55
- } from "../chunk-GRWU34ID.js";
55
+ } from "../chunk-IEXBHI4X.js";
56
56
  import "../chunk-XL2HPM67.js";
57
57
  import "../chunk-6HBXEJHO.js";
58
58
  import "../chunk-XWVM4KPK.js";
@@ -85,7 +85,7 @@ import {
85
85
  requiredMcpWildcard,
86
86
  resolveChannels,
87
87
  serializeManifestForSlackCli
88
- } from "../chunk-V2BS3IN3.js";
88
+ } from "../chunk-ZQVYTNLA.js";
89
89
  import "../chunk-AIUIMEUS.js";
90
90
  import "../chunk-DGUM43GV.js";
91
91
 
@@ -5207,7 +5207,7 @@ import { execFileSync, execSync } from "child_process";
5207
5207
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
5208
5208
  import chalk17 from "chalk";
5209
5209
  import ora15 from "ora";
5210
- var cliVersion = true ? "0.28.1275" : "dev";
5210
+ var cliVersion = true ? "0.28.1276" : "dev";
5211
5211
  async function fetchLatestVersion() {
5212
5212
  const host2 = getHost();
5213
5213
  if (!host2) return null;
@@ -6467,7 +6467,7 @@ function handleError(err) {
6467
6467
  }
6468
6468
 
6469
6469
  // src/bin/agt.ts
6470
- var cliVersion2 = true ? "0.28.1275" : "dev";
6470
+ var cliVersion2 = true ? "0.28.1276" : "dev";
6471
6471
  var program = new Command();
6472
6472
  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");
6473
6473
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -2,7 +2,7 @@ import {
2
2
  exchangeApiKey,
3
3
  getApiKey,
4
4
  getHost
5
- } from "./chunk-BSVQWPBC.js";
5
+ } from "./chunk-HISRTLZ3.js";
6
6
  import {
7
7
  LATE_BOUND_VARS,
8
8
  PLATFORM_DENY_PERMISSIONS,
@@ -26,11 +26,11 @@ import {
26
26
  warnIgnoredIsolationAllowlist,
27
27
  withheldRemoteMcpMessage,
28
28
  withheldRemoteMcpReasonFor
29
- } from "./chunk-7D6EMIHG.js";
29
+ } from "./chunk-IDLNB6GR.js";
30
30
  import {
31
31
  readDailySessionPin,
32
32
  sessionTranscriptDir
33
- } from "./chunk-GRWU34ID.js";
33
+ } from "./chunk-IEXBHI4X.js";
34
34
  import {
35
35
  classifyUnanswerablePane,
36
36
  isConsumerTermsDialogVisible,
@@ -102,7 +102,7 @@ import {
102
102
  scanConfigForLiteralSecrets,
103
103
  worseConnectivityOutcome,
104
104
  wrapScheduledTaskPrompt
105
- } from "./chunk-V2BS3IN3.js";
105
+ } from "./chunk-ZQVYTNLA.js";
106
106
  import {
107
107
  claudeJsonPathFor,
108
108
  effectiveClaudeJsonPath,
@@ -8398,11 +8398,13 @@ function readFlagsCache(path) {
8398
8398
  const flags = obj["flags"];
8399
8399
  if (!flags || typeof flags !== "object") return null;
8400
8400
  const perAgent = obj["notify_dispatch_by_agent"];
8401
+ const catalogVersion = obj["tool_catalog_version"];
8401
8402
  return {
8402
8403
  schema_version: typeof obj["schema_version"] === "string" ? obj["schema_version"] : "",
8403
8404
  updated_at: typeof obj["updated_at"] === "string" ? obj["updated_at"] : "",
8404
8405
  flags: { ...flags },
8405
- notify_dispatch_by_agent: perAgent && typeof perAgent === "object" ? { ...perAgent } : {}
8406
+ notify_dispatch_by_agent: perAgent && typeof perAgent === "object" ? { ...perAgent } : {},
8407
+ ...typeof catalogVersion === "string" && catalogVersion.length > 0 ? { tool_catalog_version: catalogVersion } : {}
8406
8408
  };
8407
8409
  } catch {
8408
8410
  return null;
@@ -8503,6 +8505,12 @@ var HostFlagStore = class {
8503
8505
  * restamps a stale map as current.
8504
8506
  */
8505
8507
  lastFlagsUpdatedAt = "";
8508
+ /**
8509
+ * ENG-12180: the last `tool_catalog_version` a heartbeat carried, hydrated
8510
+ * from the cache on init so a restart neither drops it from the file nor
8511
+ * rewrites an unchanged value. Undefined until an API that sends it answers.
8512
+ */
8513
+ toolCatalogVersion;
8506
8514
  cachePath;
8507
8515
  /**
8508
8516
  * ENG-11436: agent ids to MIRROR the resolved flag map to, as
@@ -8571,6 +8579,7 @@ var HostFlagStore = class {
8571
8579
  this.notifyDispatchByAgent = { ...cached.notify_dispatch_by_agent ?? {} };
8572
8580
  this.lastSchemaVersion = cached.schema_version || "";
8573
8581
  this.lastFlagsUpdatedAt = cached.updated_at || "";
8582
+ this.toolCatalogVersion = cached.tool_catalog_version;
8574
8583
  const ageSeconds = flagsCacheAgeSeconds(cached, this.cachePath, now);
8575
8584
  const age = ageSeconds === null ? "unknown" : `${Math.round(ageSeconds)}s`;
8576
8585
  const schema = cached.schema_version || "unknown";
@@ -8648,7 +8657,8 @@ var HostFlagStore = class {
8648
8657
  schema_version: this.lastSchemaVersion,
8649
8658
  updated_at: updatedAt,
8650
8659
  flags: this.heartbeatFlags,
8651
- notify_dispatch_by_agent: this.notifyDispatchByAgent
8660
+ notify_dispatch_by_agent: this.notifyDispatchByAgent,
8661
+ ...this.toolCatalogVersionField()
8652
8662
  });
8653
8663
  } catch (err) {
8654
8664
  this.log(`[flags] cache write failed: ${err.message}`);
@@ -8680,7 +8690,10 @@ var HostFlagStore = class {
8680
8690
  // put other agents' values inside this agent's container — the exact
8681
8691
  // boundary that stops the host-wide cache being mounted. This agent's
8682
8692
  // own notify-dispatch value is already folded into `flags` below.
8683
- notify_dispatch_by_agent: {}
8693
+ notify_dispatch_by_agent: {},
8694
+ // ENG-12180: global, identical for every agent, so it crosses no
8695
+ // boundary. The mirror is the only copy an isolated agent can see.
8696
+ ...this.toolCatalogVersionField()
8684
8697
  });
8685
8698
  } catch (err) {
8686
8699
  let removed = "left in place";
@@ -8714,6 +8727,36 @@ var HostFlagStore = class {
8714
8727
  if (notify !== void 0) flags["notify-dispatch"] = notify;
8715
8728
  return flags;
8716
8729
  }
8730
+ toolCatalogVersionField() {
8731
+ return this.toolCatalogVersion ? { tool_catalog_version: this.toolCatalogVersion } : {};
8732
+ }
8733
+ /**
8734
+ * ENG-12180 / CS-2597: record the heartbeat's `tool_catalog_version` and
8735
+ * persist it, to the host-wide cache and every mirror, ONLY when it changes.
8736
+ *
8737
+ * An absent or non-string value (an older API, a partial response) is a
8738
+ * no-op: the cached value stays, so a rolling deploy cannot make the agents'
8739
+ * sessions see a version vanish and reappear. Does not advance the flag-data
8740
+ * stamp (`lastFlagsUpdatedAt`): a catalog change is not a flag change, and the
8741
+ * MCP reader compares those stamps to pick between the mirror and the
8742
+ * host-wide file, which this writes together.
8743
+ *
8744
+ * Returns true when it wrote, for the caller's log line and the tests.
8745
+ */
8746
+ applyToolCatalogVersion(version) {
8747
+ if (typeof version !== "string") return false;
8748
+ const next = version.trim();
8749
+ if (next.length === 0 || next === this.toolCatalogVersion) return false;
8750
+ const previous = this.toolCatalogVersion;
8751
+ this.toolCatalogVersion = next;
8752
+ this.log(`[flags] tool_catalog_version: ${previous ?? "(none)"} -> ${next}`);
8753
+ this.persistCache();
8754
+ return true;
8755
+ }
8756
+ /** ENG-12180: the cached `tool_catalog_version`, for diagnostics and tests. */
8757
+ getToolCatalogVersion() {
8758
+ return this.toolCatalogVersion;
8759
+ }
8717
8760
  /**
8718
8761
  * Declare which agents this host runs, so their mirrors are written and kept
8719
8762
  * current. Called from the manager's poll cycle with the roster the control
@@ -13810,4 +13853,4 @@ export {
13810
13853
  managerInstallSystemUnitCommand,
13811
13854
  managerUninstallSystemUnitCommand
13812
13855
  };
13813
- //# sourceMappingURL=chunk-7PIMV2ID.js.map
13856
+ //# sourceMappingURL=chunk-2JILRR4Y.js.map