@integrity-labs/agt-cli 0.28.579 → 0.28.580

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 CHANGED
@@ -40,7 +40,7 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-Y3ILQRLM.js";
43
+ } from "../chunk-YU2B3L6G.js";
44
44
  import {
45
45
  AnchorSessionClient,
46
46
  CHANNEL_REGISTRY,
@@ -4853,7 +4853,7 @@ import { execFileSync, execSync } from "child_process";
4853
4853
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4854
4854
  import chalk18 from "chalk";
4855
4855
  import ora16 from "ora";
4856
- var cliVersion = true ? "0.28.579" : "dev";
4856
+ var cliVersion = true ? "0.28.580" : "dev";
4857
4857
  async function fetchLatestVersion() {
4858
4858
  const host2 = getHost();
4859
4859
  if (!host2) return null;
@@ -6031,7 +6031,7 @@ function handleError(err) {
6031
6031
  }
6032
6032
 
6033
6033
  // src/bin/agt.ts
6034
- var cliVersion2 = true ? "0.28.579" : "dev";
6034
+ var cliVersion2 = true ? "0.28.580" : "dev";
6035
6035
  var program = new Command();
6036
6036
  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");
6037
6037
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -5971,7 +5971,7 @@ function exchangeFailureKind(err) {
5971
5971
  }
5972
5972
 
5973
5973
  // src/lib/api-client.ts
5974
- var agtCliVersion = true ? "0.28.579" : "dev";
5974
+ var agtCliVersion = true ? "0.28.580" : "dev";
5975
5975
  var lastConfigHash = null;
5976
5976
  function setConfigHash(hash) {
5977
5977
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -9347,4 +9347,4 @@ export {
9347
9347
  managerInstallSystemUnitCommand,
9348
9348
  managerUninstallSystemUnitCommand
9349
9349
  };
9350
- //# sourceMappingURL=chunk-Y3ILQRLM.js.map
9350
+ //# sourceMappingURL=chunk-YU2B3L6G.js.map
@@ -53,7 +53,7 @@ import {
53
53
  safeWriteJsonAtomic,
54
54
  setConfigHash,
55
55
  tripClass
56
- } from "../chunk-Y3ILQRLM.js";
56
+ } from "../chunk-YU2B3L6G.js";
57
57
  import {
58
58
  getProjectDir as getProjectDir2,
59
59
  getReadyTasks,
@@ -122,6 +122,7 @@ import {
122
122
  isAgentTimezoneOverrideExpired,
123
123
  isBareAck,
124
124
  isBucketQualified,
125
+ isControlPlaneOnlyConfigKey,
125
126
  isControlPlaneOnlyEnvVar,
126
127
  isConversationFailureCategory,
127
128
  isEmptyTotals,
@@ -332,9 +333,18 @@ function canonicalize(value) {
332
333
  }
333
334
  return value;
334
335
  }
336
+ function hashableConfig(config2) {
337
+ if (!config2) return {};
338
+ const out = {};
339
+ for (const [key, value] of Object.entries(config2)) {
340
+ if (isControlPlaneOnlyConfigKey(key)) continue;
341
+ out[key] = value;
342
+ }
343
+ return out;
344
+ }
335
345
  function computeIntegrationsHash(integrations) {
336
346
  const payload = integrations.map(
337
- (i) => `${i.definition_id}:${JSON.stringify(canonicalize(i.credentials ?? {}))}:${JSON.stringify(canonicalize(i.config ?? {}))}`
347
+ (i) => `${i.definition_id}:${JSON.stringify(canonicalize(i.credentials ?? {}))}:${JSON.stringify(canonicalize(hashableConfig(i.config)))}`
338
348
  ).sort();
339
349
  return createHash2("sha256").update(JSON.stringify(payload)).digest("hex").slice(0, 16);
340
350
  }
@@ -347,6 +357,16 @@ function computeCapabilitySurfaceHash(integrations) {
347
357
  }
348
358
 
349
359
  // src/lib/host-integration-mapping.ts
360
+ var RECOGNISED_CREDENTIAL_DELIVERY = /* @__PURE__ */ new Set(["env", "broker"]);
361
+ var MAX_SHOWN_VALUE_CHARS = 120;
362
+ function describeUnrecognisedCredentialDelivery(value) {
363
+ if (value === void 0 || value === null) return null;
364
+ if (typeof value === "string" && RECOGNISED_CREDENTIAL_DELIVERY.has(value)) return null;
365
+ const shown = typeof value === "string" ? JSON.stringify(
366
+ value.length > MAX_SHOWN_VALUE_CHARS ? `${value.slice(0, MAX_SHOWN_VALUE_CHARS)}\u2026` : value
367
+ ) : `<${typeof value}>`;
368
+ return `unrecognised credential_delivery ${shown} \u2014 treating as env delivery. If this row is a github_app under the github-broker-credentials flag, the API has stripped its token AND the broker helper will be removed, leaving the agent with no GitHub credential at all (ENG-8800 AC5)`;
369
+ }
350
370
  function withResolvedRemoteMcp(integration) {
351
371
  return {
352
372
  ...integration,
@@ -356,9 +376,17 @@ function withResolvedRemoteMcp(integration) {
356
376
  // row into use-time credential delivery — anything else (including a value
357
377
  // a newer API might add later) reads as today's env delivery, so an
358
378
  // unrecognised value can never strip an agent's `git`/`gh` credentials.
359
- credentialDelivery: integration.credential_delivery === "broker" ? "broker" : void 0
379
+ credentialDelivery: normalizeCredentialDelivery(integration.credential_delivery)
360
380
  };
361
381
  }
382
+ function normalizeCredentialDelivery(value) {
383
+ const anomaly = describeUnrecognisedCredentialDelivery(value);
384
+ if (anomaly) {
385
+ process.stderr.write(`[host-integrations] [credential-delivery] ${anomaly}
386
+ `);
387
+ }
388
+ return value === "broker" ? "broker" : void 0;
389
+ }
362
390
 
363
391
  // src/lib/anchor-session-lifecycle.ts
364
392
  var DEFAULT_ANCHOR_SESSION_MAX_DURATION_MINUTES = 60;
@@ -11596,7 +11624,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
11596
11624
  var lastVersionCheckAt = 0;
11597
11625
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
11598
11626
  var lastResponsivenessProbeAt = 0;
11599
- var agtCliVersion = true ? "0.28.579" : "dev";
11627
+ var agtCliVersion = true ? "0.28.580" : "dev";
11600
11628
  function resolveBrewPath(execFileSync2) {
11601
11629
  try {
11602
11630
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();