@integrity-labs/agt-cli 0.28.1030 → 0.28.1032

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,12 +40,12 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-TBCJ5NNP.js";
43
+ } from "../chunk-OGITTSBM.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
47
47
  readDirectChatSessionState
48
- } from "../chunk-4KNUH4DQ.js";
48
+ } from "../chunk-GLOCISGD.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-VUC5XNUP.js";
82
+ } from "../chunk-NCIGLRCL.js";
83
83
  import "../chunk-TQDIIS3X.js";
84
84
  import "../chunk-XWVM4KPK.js";
85
85
  import "../chunk-EL5MWGGH.js";
@@ -5474,7 +5474,7 @@ import { execFileSync, execSync } from "child_process";
5474
5474
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5475
5475
  import chalk18 from "chalk";
5476
5476
  import ora16 from "ora";
5477
- var cliVersion = true ? "0.28.1030" : "dev";
5477
+ var cliVersion = true ? "0.28.1032" : "dev";
5478
5478
  async function fetchLatestVersion() {
5479
5479
  const host2 = getHost();
5480
5480
  if (!host2) return null;
@@ -6734,7 +6734,7 @@ function handleError(err) {
6734
6734
  }
6735
6735
 
6736
6736
  // src/bin/agt.ts
6737
- var cliVersion2 = true ? "0.28.1030" : "dev";
6737
+ var cliVersion2 = true ? "0.28.1032" : "dev";
6738
6738
  var program = new Command();
6739
6739
  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");
6740
6740
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -23,7 +23,7 @@ import {
23
23
  rotateDailySession,
24
24
  sessionFileExists,
25
25
  todayLocalIso
26
- } from "./chunk-VUC5XNUP.js";
26
+ } from "./chunk-NCIGLRCL.js";
27
27
  import {
28
28
  classifyUnanswerablePane,
29
29
  findUsageLimitResetHint,
@@ -5930,4 +5930,4 @@ export {
5930
5930
  stopAllSessionsAndWait,
5931
5931
  getProjectDir
5932
5932
  };
5933
- //# sourceMappingURL=chunk-4KNUH4DQ.js.map
5933
+ //# sourceMappingURL=chunk-GLOCISGD.js.map
@@ -5509,7 +5509,10 @@ var FLAG_REGISTRY = [
5509
5509
  // Disabling this RESTORES the shared host-wide key to every container, and
5510
5510
  // with it the cross-agent credential read ENG-8992 closes. A credential-scope
5511
5511
  // reduction should not be one click away without confirmation — same posture
5512
- // as `github-broker-credentials`, the other credential-delivery flag.
5512
+ // as the credential-delivery flags `github-broker-credentials` and
5513
+ // `xero-broker-credentials`. (This said "the OTHER credential-delivery flag"
5514
+ // while there was one; ENG-10939 added the second, so the singular had to go
5515
+ // rather than silently become a claim that github is the only sibling.)
5513
5516
  sensitive: true,
5514
5517
  // The reader is host-side (`hostFlagStore().getBoolean(...)` in the manager),
5515
5518
  // so a host on an older agt-cli has no consumer code: it keeps forwarding the
@@ -6656,6 +6659,12 @@ var FLAG_REGISTRY = [
6656
6659
  // are the precedent: pinned ABOVE every published release ON PURPOSE,
6657
6660
  // labelled as a placeholder, and gated on a post-publish bisect.
6658
6661
  //
6662
+ // ENG-10939: `xero-broker-credentials` is the worked example of the other
6663
+ // half of that convention - the bisect that DISCHARGES a placeholder. Its
6664
+ // `since` is a real published version read off `npm pack` tarballs, with the
6665
+ // markers it was bisected on written down, so the two entries together show
6666
+ // both states this field is allowed to be in.
6667
+ //
6659
6668
  // (This cited `claudecode-agt-bin-credential-helpers` until obi-wan
6660
6669
  // `8f9d3c43076c` pointed out no such key exists anywhere in the repo - the
6661
6670
  // only occurrence in the tree was this citation. The precedent was real and
@@ -7059,6 +7068,22 @@ var FLAG_REGISTRY = [
7059
7068
  public: true,
7060
7069
  defaultValue: false
7061
7070
  },
7071
+ {
7072
+ key: "ninja-lists",
7073
+ description: 'Ninja Lists (ADR-0120): small tables agents and people fill and review together. Gates the "Lists" nav item, the /lists pages AND the /ninja-sheets API, per org. Unlike its siblings `projects-menu` / `ninjafy-notes-menu`, this is the whole feature\'s gate, not only its menu entry: the surface is unlaunched, so an org with the flag off gets 404 from the API rather than a hidden link to a working one.',
7074
+ flagType: "boolean",
7075
+ // PUBLIC (ADR-0022 §2): the nav shells read it via usePublicBooleanFlag and
7076
+ // the pages via getPublicBooleanFlagServer, so it is serialized to the
7077
+ // client via GET /flags. The API evaluates it through getFlagClient() and
7078
+ // fails CLOSED on a read error. No env override (UI rollout, not an
7079
+ // operator gate). Ships dark (default false).
7080
+ public: true,
7081
+ defaultValue: false,
7082
+ // Until ADR-0120's access control exists, any member of an enabled org
7083
+ // reads every list in it, so an org admin must not be able to switch this
7084
+ // on for their own org. Only a platform admin can (PR #6522 review).
7085
+ platformAdminOnly: true
7086
+ },
7062
7087
  {
7063
7088
  key: "platform-maintenance-mode",
7064
7089
  description: 'Platform-wide maintenance mode (ENG-6506): when on, every agent across every team/org auto-replies to admitted human inbound with a "we are offline for maintenance" notice instead of dispatching to the agent \u2014 for whole-platform downtime such as DB upgrades. Read host-side per inbound from the flags cache (no MCP restart). Boolean gate; ships dark \u2014 when off, channels behave exactly as today. (Proactive "back online" follow-up is the ENG-6508 fast-follow, not this flag.)',
@@ -7422,6 +7447,56 @@ var FLAG_REGISTRY = [
7422
7447
  // flips); shipping a guessed number is not.
7423
7448
  since: "0.29.0"
7424
7449
  },
7450
+ {
7451
+ key: "xero-broker-credentials",
7452
+ description: 'Deliver the Xero OAuth access token to the vendor Xero MCP server through the broker credential endpoint at USE time, instead of materializing it onto the agent host at spawn (ENG-10939, step 1 of the Xero lockdown ENG-10927). Mechanically the sibling of `github-broker-credentials`; the REASON and the cost of a bad flip are both different. ON: POST /host/agent-integrations strips `access_token`, `refresh_token` and `token_expires_at` from the xero row and marks it credential_delivery=broker, so XERO_ACCESS_TOKEN stops being written to .env.integrations. Nothing replaces it host-side and nothing needs to: the vendor MCP server has fetched a fresh token per call from POST /host/agent-integrations/:id/credential since ENG-4920, and `brokerMode` is true for every install carrying an id - so XERO_CLIENT_BEARER_TOKEN: ${XERO_ACCESS_TOKEN} is already not emitted and no dangling reference is left behind. `granted_scopes` and `read_only` are deliberately KEPT: they are consent metadata the host reports scope drift from, not credentials. OFF (default): byte-for-byte today\'s behaviour. WHY THIS IS NOT THE GITHUB FLAG. For github, an under-`since` host on a flipped flag LOSES `git`/`gh` - an outage. For xero the equivalent host LEAKS: before ENG-10939 the ENG-8344 broker guard was a loop-level `continue` that also skipped the config-derived env vars, so a broker-marked xero row dropped XERO_TENANT_ID, and per ENG-4898 the vendor MCP server then falls back to `tenants[0]` - a CROSS-TENANT DATA LEAK with no error anywhere. The dangerous fleet is therefore an INTERVAL, not "old hosts", and BOTH edges are bisected from published tarballs rather than named by issue: below agt-cli 0.28.508 a host carries no `credentialDelivery` handling at all, so it ignores the marker and is SAFE; from 0.28.508 up to (not including) 0.28.1015 it honours the marker with the WIDE skip and LEAKS; at 0.28.1015 and above the skip is narrowed and the behaviour is correct. `since` is a lower bound, so it classifies BOTH ends of that interval as `stale` and cannot tell a safe pre-0.28.508 host from a leaking-middle one. THE FLIP GATE IS THEREFORE NOT "the modal shows reach": it is zero xero-bearing hosts below 0.28.1015 per hosts.agt_version, counting NULL and stale as UNCONVERGED (the heartbeat writes that column conditionally on presence, so a host that stopped reporting keeps its last value - the async-export-rollout pattern). AND A SECOND GATE THE MODAL CANNOT SEE AT ALL: the rewritten Xero skills (ENG-10961) must be live in the catalog AND have reached hosts BEFORE this is flipped. Reversed, a host has no token while its own skills still tell it to read one - a silent read outage with no error at the write site. The catalog reaches prod through `pnpm db:catalog:seed` on deploy, not through the code deploy itself, so "merged" is not "live". EXPECTED ON FLIP DAY, so it is not a surprise: the payload shrinks, so computeIntegrationsHash moves once and XERO_ACCESS_TOKEN reads present->absent in the env diff. That does NOT respawn the session. `liveProxyTokenVars` collects AGT_REMOTE_MCP_TOKEN_VAR from .mcp.json (= XERO_ACCESS_TOKEN in broker mode) and the manager filters it out of `respawnVars` BY NAME, kind-blind - so a removal is exempt on exactly the same line a rotation is (ENG-8264). The ENG-5318 child-kill path is likewise unreachable, because broker mode never emits the ${XERO_ACCESS_TOKEN} reference the stale-mcp-reaper keys on. Both restart paths that touch this var are already quiet. Evaluated API-side only, per agent, in POST /host/agent-integrations. The host does not read this flag - it keys off the resulting credential_delivery marker - so there is deliberately NO host-side envVar that could put the token back on its own. Roll back from the flag.',
7453
+ flagType: "boolean",
7454
+ // Declared safe value is `false` = today's env delivery. Fail-safe here is
7455
+ // not symmetrical with github's: OFF leaves a credential on the host (bad,
7456
+ // but the status quo this epic is closing), while a wrongly-ON flip on an
7457
+ // under-`since` host LEAKS ANOTHER TENANT'S DATA. `false` is still the right
7458
+ // default, because the ON path is the one with a reach precondition — but
7459
+ // the reason is "do not arm this until the fleet is measured", not "a flag
7460
+ // blip must not break the agent".
7461
+ defaultValue: false,
7462
+ // Flipping ON changes how every Xero agent on the scope authenticates, and
7463
+ // on an unconverged host it is a cross-tenant leak rather than an outage. A
7464
+ // deliberate, confirmed action (ADR-0022 §4).
7465
+ sensitive: true,
7466
+ // A REAL bisected threshold, not the placeholder `github-broker-credentials`
7467
+ // and `per-agent-host-credentials` had to ship with: the host-side code this
7468
+ // flag depends on (ENG-10939 item 0, narrowing the ENG-8344 broker guard so
7469
+ // it skips the CREDENTIAL and not the whole row's config) landed in PR #6443
7470
+ // and has already published.
7471
+ //
7472
+ // Read off the published tarballs rather than inferred from the merge
7473
+ // timestamp. #6443 merged at 2026-09-24T01:54:41Z; 0.28.1015 published at
7474
+ // 01:59:23Z. `npm pack` of 0.28.1013/1014/1015/1016 + grep of the extracted
7475
+ // bundle agrees in both directions on four independent markers:
7476
+ // 0.28.1014 — `writeTokenFile` present (4 files), `isRespawnExemptEnvVar`
7477
+ // and `RESPAWN_EXEMPT_CONFIG_TAILS` absent, and the only
7478
+ // broker-guard spelling is `credentialDelivery === "broker"`
7479
+ // (the wide skip).
7480
+ // 0.28.1015 — `writeTokenFile` gone, both new exports present, and
7481
+ // `credentialDelivery !== "broker"` (the narrowed block form)
7482
+ // appears for the first time.
7483
+ // The `!==` form is the one that matters: it is the guard that keeps
7484
+ // XERO_TENANT_ID on a broker-marked row, i.e. the thing whose absence is the
7485
+ // ENG-4898 leak.
7486
+ //
7487
+ // The interval's OTHER edge was bisected the same way, so the description
7488
+ // above can name a version instead of an issue: `credentialDelivery` appears
7489
+ // in no file of 0.28.507 and in five files of 0.28.508, so ENG-8344's marker
7490
+ // handling first shipped in 0.28.508. A host below that is genuinely safe
7491
+ // rather than merely old — it has no code to honour the marker with.
7492
+ //
7493
+ // Same caveat as every other `since` in this registry: it is ADVISORY. It is
7494
+ // read only by `computeFlagReach` behind GET /flags/admin/reach, so it
7495
+ // changes what an operator is TOLD and does not stop a flip on an
7496
+ // under-`since` host. What holds the line is `defaultValue: false`, plus
7497
+ // `sensitive: true`, plus the two gates spelled out in the description.
7498
+ since: "0.28.1015"
7499
+ },
7425
7500
  {
7426
7501
  key: "help-kb-auto-grant",
7427
7502
  description: "Auto-grant the `augmented-help-kb` integration at ORG scope when an organization is provisioned (ENG-8542), so every agent in that org gets product-doc search without a per-agent operator action. One organization_integrations row reaches every agent in the org: POST /host/agent-integrations merges org -> team -> agent and buildMcpJson's predicate reads that merged set with no scope filter. ON: the two org-provisioning call sites write the row (status=active, created_by=the org owner). OFF (default): they write nothing - byte-for-byte today's behaviour. STAGED ROLLOUT IS THE POINT. ENG-8332 argues against widening distribution of the help KB until two things close, because distributing a corpus with wrong articles \"converts one agent's wrong answer into everyone's\": (1) a live 200 from GET /host/kb/search as the anon role has still never been observed - ENG-7260 was closed on remediation evidence, not on a live call, and the deploy seed log is SERVICE-ROLE evidence that says nothing about the anon grant; (2) the `site-structure` article is unverified against the current IA. Turning this on for ONE org and watching that org's help-kb connectivity-probe verdicts (ENG-8332 added a real mcp_stdio probe that calls search_knowledge_base) is the cheap positive control for (1) - an ENG-7260-class 500 then reports as `down` per agent instead of as silence. Widen only after it comes back healthy. REVOKING IS DELETING THE ROW, not flipping this off: the flag gates GRANTING, so an already-granted org keeps its row when the flag goes off. Evaluated API-side only, per org, inside grantHelpKbToOrg; no host-side envVar and deliberately no sst.config.ts entry (a literal default there would pin it - ENG-8303).",
@@ -15491,4 +15566,4 @@ export {
15491
15566
  peekCurrentSession,
15492
15567
  readDailySessionPin
15493
15568
  };
15494
- //# sourceMappingURL=chunk-VUC5XNUP.js.map
15569
+ //# sourceMappingURL=chunk-NCIGLRCL.js.map