@integrity-labs/agt-cli 0.28.507 → 0.28.509

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-75NQ7UBH.js";
43
+ } from "../chunk-S5X4XFAC.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-4PRR22KH.js";
74
+ } from "../chunk-7U63M5R6.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.507" : "dev";
4833
+ var cliVersion = true ? "0.28.509" : "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.507" : "dev";
6005
+ var cliVersion2 = true ? "0.28.509" : "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) => {
@@ -6693,29 +6693,44 @@ var INTEGRATION_REGISTRY = [
6693
6693
  id: "vercel",
6694
6694
  name: "Vercel",
6695
6695
  category: "infrastructure",
6696
- description: "Check on Vercel app deployments \u2014 status, build/runtime logs \u2014 and search Vercel documentation. Remote streamable-HTTP MCP at https://mcp.vercel.com.",
6697
- // Same OAuth pattern as Granola/Higgsfield: Claude Code brokers the
6698
- // browser sign-in at runtime; nothing for the manager API to provision.
6699
- supported_auth_types: ["none"],
6696
+ description: "Check on Vercel app deployments \u2014 what's live, deployment status, and build logs \u2014 through Vercel's REST API with your own API token.",
6697
+ // ENG-8421: api_key, NOT the host-brokered MCP this used to be.
6698
+ //
6699
+ // Vercel MCP (`https://mcp.vercel.com`) is not completable from the
6700
+ // console, and that is a vendor constraint rather than a gap in our
6701
+ // plumbing. Established empirically 2026-08-03: Dynamic Client
6702
+ // Registration REJECTS an https redirect (`invalid_redirect_uri` — "not
6703
+ // approved for use by this authorization server") and ACCEPTS only
6704
+ // localhost; the device-code grant, the one flow needing no redirect, is
6705
+ // refused to DCR clients (`unauthorized_client`). So the only client
6706
+ // Vercel permits is a local one redirecting to its own ephemeral port —
6707
+ // i.e. Claude Code on the agent's host, driven by an operator running
6708
+ // `/mcp` in tmux. No console work can remove that step.
6709
+ //
6710
+ // The REST API has none of those constraints: plain bearer auth
6711
+ // (unauthenticated → `{"code":"forbidden","missingToken":true}`, bogus
6712
+ // bearer → `{"invalidToken":true}`), so a token the customer creates in
6713
+ // their own Vercel dashboard works directly. That makes this an ordinary
6714
+ // paste-a-key integration, and it means WE hold the credential — so it can
6715
+ // be stored, rotated, revoked and audited, none of which was true when the
6716
+ // grant lived in Claude Code's `~/.claude.json` on the host.
6717
+ //
6718
+ // Tools are declared as data on `integration_definitions.metadata.tools`
6719
+ // and dispatch through the existing Direct HTTP broker (the v0 pattern) —
6720
+ // there is deliberately no bespoke Vercel client and no bespoke broker.
6721
+ supported_auth_types: ["api_key"],
6700
6722
  capabilities: [
6701
- { id: "vercel:read-deployments", name: "Read Deployments", description: "List teams/projects, check deployment status, and read build/runtime logs.", access: "read" },
6702
- { id: "vercel:search-docs", name: "Search Documentation", description: "Search Vercel platform documentation.", access: "read" }
6723
+ { id: "vercel:read-deployments", name: "Read Deployments", description: "List teams/projects, check deployment status, and read build logs.", access: "read" }
6703
6724
  ],
6704
- docs_url: "https://vercel.com/docs/agent-resources/vercel-mcp",
6705
- // Beta until the headless OAuth flow (and Vercel's OAuth-client allowlist,
6706
- // which is vendor-side and outside our control) is verified end-to-end.
6707
- beta: true,
6708
- // No `auth`/`headers` — host-brokered OAuth (Claude Code authenticates
6709
- // directly with Vercel; nothing for us to inject). Declaring this here
6710
- // (rather than a hardcoded buildMcpJson/writeIntegrations branch, the
6711
- // pre-ENG-8035 Higgsfield-era pattern) lets the generic remote-MCP loop
6712
- // render the `.mcp.json` entry AND enrolls 'vercel' in the
6713
- // `registryRemoteMcpKeys` prune universe automatically, so an uninstall
6714
- // actually removes the entry instead of leaving it stale.
6715
- remoteMcp: {
6716
- type: "http",
6717
- url: "https://mcp.vercel.com"
6718
- }
6725
+ docs_url: "https://vercel.com/docs/rest-api",
6726
+ // Beta until the REST tool surface has been exercised against a real
6727
+ // customer token. (The previous reason "until the headless OAuth flow is
6728
+ // verified end-to-end" — is void: there is no OAuth flow any more.)
6729
+ beta: true
6730
+ // NO `remoteMcp`. See the tombstone in the claudecode adapter's prune
6731
+ // universe: dropping this field also drops `vercel` from
6732
+ // `registryRemoteMcpKeys`, which would strand the `.mcp.json` entry on
6733
+ // every host that installed the MCP variant.
6719
6734
  },
6720
6735
  {
6721
6736
  id: "qmd",
@@ -10371,6 +10386,54 @@ var FLAG_REGISTRY = [
10371
10386
  // Turning this on lets agents originate proposals that create customer
10372
10387
  // infrastructure once approved — same posture as augmented-support-writes.
10373
10388
  sensitive: true
10389
+ },
10390
+ {
10391
+ key: "github-broker-credentials",
10392
+ description: "Deliver GitHub App installation tokens to `git` and the `gh` CLI through the broker credential endpoint at USE time, instead of materializing them into the agent process environment at spawn (ENG-8344). A GitHub App installation token has a ~1h TTL, so the spawn-frozen GITHUB_ACCESS_TOKEN / GITHUB_TOKEN pair rotates hourly; the wrapper sources `.env.integrations` exactly once, so the only way a running agent sees the new value is a full session respawn (measured: 6 agents, ~144 kills/day). ENG-8343 stopped those kills landing mid-turn; this removes them. ON: `POST /host/agent-integrations` stops minting the installation token into the payload for auth_type=github_app rows (so computeIntegrationsHash stops seeing a rotating value) and marks the row credential_delivery=broker; the claudecode adapter then writes a git credential helper + a `gh` shim that fetch a fresh token per use from POST /host/agent-integrations/github/credential (ENG-8264 name addressing). OFF (default): byte-for-byte today's behaviour - the token is minted into the payload and materialized as GITHUB_ACCESS_TOKEN / GITHUB_TOKEN, no helper, no shim. NOTE the scope of the security claim: this removes the token from the agent's ENVIRONMENT, which is what stops the respawns. It does NOT make the token unreachable by a determined agent - the agent can invoke the helper itself. Strictly better than today, not a sandbox. Evaluated API-side only, per agent, in POST /host/agent-integrations; no host-side envVar. The host does not read this flag - it keys off the resulting credential_delivery marker on the row - so there is deliberately no host override that could put the token back on its own. Roll back from the flag.",
10393
+ flagType: "boolean",
10394
+ // Declared safe value is `false` = today's env delivery. Fail-safe direction:
10395
+ // a flag-DB read error must never strip `git`/`gh` credentials off a live
10396
+ // agent, which is what the ON path does when its host has no helper writer.
10397
+ defaultValue: false,
10398
+ // Flipping ON changes how every GitHub App agent on the scope authenticates
10399
+ // `git push` / `gh`. A bad flip takes those away, so it is a deliberate,
10400
+ // confirmed action (ADR-0022 §4).
10401
+ sensitive: true,
10402
+ // Set even though the flag is evaluated centrally, because `since` is a
10403
+ // REACH threshold ("a host this old has no consumer code for the flag") and
10404
+ // that is exactly the hazard here: the host does not read the flag, but it
10405
+ // does need the claudecode adapter's helper/shim writer and the wrapper PATH
10406
+ // prepend. On a host too old for those, the API would stop shipping the
10407
+ // token and NOTHING would replace it. Without `since` the flip-reach modal
10408
+ // reports FULL reach and hides that.
10409
+ //
10410
+ // DELIBERATE UNREACHABLE PLACEHOLDER - NOT A REAL THRESHOLD YET.
10411
+ // The sibling entries in this registry (`slack-hot-thread-guard` 0.28.339,
10412
+ // `slack-scheduled-channel-guard` 0.28.421) are BISECTED from published npm
10413
+ // artifacts, which is only possible AFTER this merges and publishes. A
10414
+ // pre-merge guess cannot be right, and the two directions are not
10415
+ // symmetric:
10416
+ // - too HIGH -> hosts classify `stale`, the modal over-warns. Annoying.
10417
+ // - too LOW -> hosts classify `honors` while carrying NO helper writer,
10418
+ // the modal promises full reach, and a flip strips `git`/
10419
+ // `gh` credentials with nothing replacing them. Outage.
10420
+ // So this is pinned ABOVE every published release on purpose: it classifies
10421
+ // EVERY host as `stale`, so the modal reports no reach rather than reach it
10422
+ // has no basis for. That is the intended pre-bisect state.
10423
+ //
10424
+ // BUT `since` IS ADVISORY, NOT A GUARD. It is read in exactly one place -
10425
+ // `computeFlagReach` behind GET /admin/reach, which renders the flip-reach
10426
+ // modal. `evaluate.ts` never reads it and neither does the override write
10427
+ // path. The placeholder therefore changes what an operator is TOLD; it does
10428
+ // not stop a flip on an under-`since` host. What actually holds the line
10429
+ // here is `defaultValue: false` plus `sensitive: true` plus the runbook.
10430
+ //
10431
+ // BEFORE THIS FLAG IS FLIPPED ANYWHERE: bisect the published dist for the
10432
+ // first agt-cli whose claudecode adapter writes agt-bin/ and whose wrapper
10433
+ // prepends it, then replace this with that exact version. The rollout
10434
+ // runbook gates on it. Leaving the placeholder in place is safe (nothing
10435
+ // flips); shipping a guessed number is not.
10436
+ since: "0.29.0"
10374
10437
  }
10375
10438
  ];
10376
10439
  var REGISTRY_BY_KEY = new Map(FLAG_REGISTRY.map((definition) => [definition.key, definition]));
@@ -13705,6 +13768,10 @@ function writePersistentClaudeWrapper(args) {
13705
13768
  "set +a"
13706
13769
  );
13707
13770
  }
13771
+ const brokerBinDir = join6(projectDir, ".claude", "agt-bin");
13772
+ if (existsSync6(brokerBinDir)) {
13773
+ wrapperLines.push(`export PATH=${JSON.stringify(brokerBinDir)}:"$PATH"`);
13774
+ }
13708
13775
  const initPromptArg = initPrompt ? `${JSON.stringify(initPrompt)} ` : "";
13709
13776
  wrapperLines.push(
13710
13777
  `exec ${JSON.stringify(claudeBin)} ${initPromptArg}${claudeArgsJoined}`
@@ -14856,4 +14923,4 @@ export {
14856
14923
  stopAllSessionsAndWait,
14857
14924
  getProjectDir
14858
14925
  };
14859
- //# sourceMappingURL=chunk-4PRR22KH.js.map
14926
+ //# sourceMappingURL=chunk-7U63M5R6.js.map