@integrity-labs/agt-cli 0.28.1252 → 0.28.1254

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 (35) hide show
  1. package/dist/{api-client-6A36YH3M.js → api-client-EW7NBMWI.js} +3 -3
  2. package/dist/bin/agt.js +7 -7
  3. package/dist/{chunk-XTFVVZIR.js → chunk-AZOT5URF.js} +2 -2
  4. package/dist/{chunk-RUKGOBVA.js → chunk-EWD3K6YD.js} +61 -9
  5. package/dist/{chunk-RUKGOBVA.js.map → chunk-EWD3K6YD.js.map} +1 -1
  6. package/dist/{chunk-5ZNYCNMI.js → chunk-FD3GWWVL.js} +3 -3
  7. package/dist/{chunk-S3DUSCWR.js → chunk-SEXB6LTM.js} +194 -9
  8. package/dist/chunk-SEXB6LTM.js.map +1 -0
  9. package/dist/{chunk-4VOQ6D7X.js → chunk-ZDON4IXL.js} +2 -2
  10. package/dist/{chunk-3HRBU4H6.js → chunk-ZKLOPCWS.js} +20 -9
  11. package/dist/{chunk-3HRBU4H6.js.map → chunk-ZKLOPCWS.js.map} +1 -1
  12. package/dist/{claude-code-updater-WSQTK6TQ.js → claude-code-updater-CHEL6LOF.js} +3 -3
  13. package/dist/{claude-pair-runtime-WWF5BCK3.js → claude-pair-runtime-AGJH54AR.js} +3 -3
  14. package/dist/lib/manager-worker.js +50 -33
  15. package/dist/lib/manager-worker.js.map +1 -1
  16. package/dist/mcp/direct-chat-channel.js +54 -8
  17. package/dist/mcp/index.js +55 -9
  18. package/dist/mcp/origami.js +54 -8
  19. package/dist/mcp/remote-oauth-proxy.js +142 -5
  20. package/dist/mcp/slack-channel.js +54 -8
  21. package/dist/mcp/telegram-channel.js +54 -8
  22. package/dist/{persistent-session-HS33PGZZ.js → persistent-session-HQPQPNPK.js} +4 -4
  23. package/dist/{responsiveness-probe-32AWSVSL.js → responsiveness-probe-6GNSPLD2.js} +4 -4
  24. package/dist/{session-auth-dead-2L2NLMMB.js → session-auth-dead-4Z24MU6C.js} +3 -3
  25. package/package.json +1 -1
  26. package/dist/chunk-S3DUSCWR.js.map +0 -1
  27. /package/dist/{api-client-6A36YH3M.js.map → api-client-EW7NBMWI.js.map} +0 -0
  28. /package/dist/{chunk-XTFVVZIR.js.map → chunk-AZOT5URF.js.map} +0 -0
  29. /package/dist/{chunk-5ZNYCNMI.js.map → chunk-FD3GWWVL.js.map} +0 -0
  30. /package/dist/{chunk-4VOQ6D7X.js.map → chunk-ZDON4IXL.js.map} +0 -0
  31. /package/dist/{claude-code-updater-WSQTK6TQ.js.map → claude-code-updater-CHEL6LOF.js.map} +0 -0
  32. /package/dist/{claude-pair-runtime-WWF5BCK3.js.map → claude-pair-runtime-AGJH54AR.js.map} +0 -0
  33. /package/dist/{persistent-session-HS33PGZZ.js.map → persistent-session-HQPQPNPK.js.map} +0 -0
  34. /package/dist/{responsiveness-probe-32AWSVSL.js.map → responsiveness-probe-6GNSPLD2.js.map} +0 -0
  35. /package/dist/{session-auth-dead-2L2NLMMB.js.map → session-auth-dead-4Z24MU6C.js.map} +0 -0
@@ -37257,7 +37257,12 @@ var REMOTE_MCP_PROXY_ENV = {
37257
37257
  // Deliberately NOT in REMOTE_MCP_AUTH_ENV_KEYS, for the same reason as
37258
37258
  // `argRejects`: it shapes WHICH calls we forward, not what an outbound request
37259
37259
  // looks like, so the connectivity probe has nothing to reconstruct from it.
37260
- toolTiers: "AGT_REMOTE_MCP_TOOL_TIERS"
37260
+ toolTiers: "AGT_REMOTE_MCP_TOOL_TIERS",
37261
+ // ENG-12046: when set, the proxy fetches its bearer from the broker at use
37262
+ // time for THIS integration row (uuid) instead of reading TOKEN_FILE/TOKEN_VAR,
37263
+ // and the token is no longer written to `.env.integrations`. Hygiene, not a
37264
+ // boundary: see core/integrations/remote-mcp-broker-token.ts.
37265
+ integrationId: "AGT_REMOTE_MCP_INTEGRATION_ID"
37261
37266
  };
37262
37267
  var REMOTE_MCP_AUTH_ENV_KEYS = [
37263
37268
  REMOTE_MCP_PROXY_ENV.tokenVar,
@@ -40848,12 +40853,15 @@ var FLAG_REGISTRY = [
40848
40853
  // direct-chat MCP to render them: an older agt-cli shows a notice as
40849
40854
  // "download failed; ask the user to re-send", which sends users in circles
40850
40855
  // (Sherlock, 13 Nov). So the flip-reach modal must count hosts by the CLI
40851
- // that renders notices. DELIBERATE UNREACHABLE PLACEHOLDER until this PR
40852
- // merges and "Publish CLI on adapter changes (main)" publishes the first
40853
- // agt-cli carrying the MCP change: replace it with that exact version in a
40854
- // one-line follow-up, and arm only when the modal shows 0 stale and 0
40855
- // unknown hosts. A placeholder over-reports stale hosts; it never hides one.
40856
- since: "0.29.0"
40856
+ // that renders notices. 0.28.1252 is the first published agt-cli carrying
40857
+ // #7579's MCP change (tag agt-cli-0.28.1252, published from caf64c0b5; the
40858
+ // publish run on #7579's own merge commit 38465ce5f failed). Arm only when
40859
+ // the modal shows 0 stale and 0 unknown hosts. The reach count covers only
40860
+ // active hosts seen in the last 24h (routes/flags.ts), so also confirm no
40861
+ // active host older than 0.28.1252 is offline before arming the stage-wide
40862
+ // flip: one that reconnects later receives the armed flag on its first
40863
+ // heartbeat (CodeRabbit on #7588).
40864
+ since: "0.28.1252"
40857
40865
  },
40858
40866
  {
40859
40867
  key: "platform-held-key-central-probe",
@@ -41126,7 +41134,7 @@ var FLAG_REGISTRY = [
41126
41134
  },
41127
41135
  {
41128
41136
  key: "scheduled-task-nudge-durable",
41129
- description: 'Deliver the scheduled-task "work this card" nudge over the durable direct-chat notice rail instead of unverified tmux send-keys (ENG-8068, re-landing ENG-7971). When ON, routeScheduledTaskViaKanban enqueues the nudge via POST /host/scheduled-task/notify (kind:notice, push-and-consumed by the in-session MCP with a per-card consume-time revalidation) and closes the card + run on an enqueue failure, retiring the ENG-6351 orphaned-card gap where an unsubmitted keystroke left a scheduled task silently unrun. When OFF (default) the manager keeps the current tmux send-keys delivery, byte-for-byte as today. This is the kill switch: ENG-7971 was reverted once because the durable rail 500d on a session_id bug (fixed in ENG-8061); flip OFF to fall back to send-keys instantly without a code rollback if the durable path misbehaves. Resolved host-side by the manager via hostFlagStore().getBoolean (the manager evaluates the decision itself, so no spawn-env materialization is needed). Ships dark.',
41137
+ description: 'Deliver the scheduled-task "work this card" nudge over the durable direct-chat notice rail instead of unverified tmux send-keys (ENG-8068, re-landing ENG-7971). When ON, routeScheduledTaskViaKanban enqueues the nudge via POST /host/scheduled-task/notify (kind:notice, push-and-consumed by the in-session MCP with a per-card consume-time revalidation) and closes the card + run on an enqueue failure, retiring the ENG-6351 orphaned-card gap where an unsubmitted keystroke left a scheduled task silently unrun. When OFF (default) the manager delivers the nudge by tmux send-keys. ONE EXCEPTION, whatever this flag says (ENG-8006): when send-keys reaches nothing because the session is down or restarting, the nudge is still queued on the durable rail for the next session, and if that enqueue fails the card is closed as failed. So OFF is a partial kill switch: it takes live sessions off the rail, but not firings whose session is down. ENG-7971 was reverted once because the durable rail 500d on a session_id bug (fixed in ENG-8061). During a rail incident, OFF limits the blast radius to down-session firings, and those show up as cards closed failed with "scheduled-task nudge undeliverable". Resolved host-side by the manager via hostFlagStore().getBoolean (the manager evaluates the decision itself, so no spawn-env materialization is needed). Ships dark.',
41130
41138
  flagType: "boolean",
41131
41139
  // Declared safe value is `false`: the current, reverted-to send-keys delivery. Turning
41132
41140
  // it ON activates the durable rail per org/host once operators are confident. `false`
@@ -41444,6 +41452,32 @@ var FLAG_REGISTRY = [
41444
41452
  // `sensitive: true`, plus the two gates spelled out in the description.
41445
41453
  since: "0.28.1015"
41446
41454
  },
41455
+ {
41456
+ key: "remote-mcp-oauth-broker-credentials",
41457
+ description: "Deliver the bearer of every OAuth remote MCP served through remote-oauth-proxy (OAUTH_PROVIDERS entries with an mcpUrl: granola, brand-ninja, kajabi, otter, plaud, datadog-ap1/ap2 today) through the broker credential endpoint at USE time, instead of materializing it into `.env.integrations` (ENG-12046). Mechanically the sibling of `xero-broker-credentials`. ON: POST /host/agent-integrations strips `access_token`, `refresh_token` and `token_expires_at` from those rows and marks them credential_delivery=broker, so `<DEF>_ACCESS_TOKEN` is no longer written to `.env.integrations` and so is no longer in the agent process env (the session wrapper `source`s that file with `set -a`). The claudecode adapter then emits AGT_REMOTE_MCP_INTEGRATION_ID instead of a token file/var, and the proxy fetches the bearer per use from POST /host/agent-integrations/<uuid>/credential with the agent's own host credentials (memory only, fail closed, no fallback). OFF (default): byte-for-byte today's behaviour. THIS IS HYGIENE, NOT A BOUNDARY: an agent that calls the same fetch can still obtain the token. The binding control for broad-scope providers (Datadog mcp_all) remains a read-only provider user; the real boundary is ENG-12047 (host-side proxy). SINCE IS A PLACEHOLDER: `since` (0.29.0) is an unreachable placeholder, not a verified threshold. Before enabling, replace it with the first published agt-cli whose remote-oauth-proxy carries broker mode (bisected from the tarballs), or the reach estimate means nothing. FLIP GATE: an under-`since` host honours the marker (it skips the token write, ENG-8344) but still emits a token-file proxy entry, so its remote OAuth MCPs answer \"no current access token\" for every call: an outage of those integrations, not a leak. Zero hosts carrying these integrations below `since` per hosts.agt_version before flipping, counting NULL as unconverged. agt_version names the bundle on disk, not the running proxy: a session started before the update keeps its pre-broker proxy until it restarts, so also confirm every affected session has respawned. HARD GATE: Do not enable, for any provider, until ENG-12053 is merged AND deployed to every API instance serving the credential route (a merge alone is not enough: an older route ignores on_missing_expiry: 'serve'), and a fetch with it on a no-expiry row is verified not to refresh. Reason: a provider whose refresh response omits expires_in makes oauth-refresh drop token_expires_at, the credential route treats that as \"refresh now\", and the row then refreshes about every 60s; the next poll returns the row to env delivery, but that does NOT respawn the running session, so its proxy keeps refreshing about every 60s until some unrelated restart (provider rate limits, token churn, possible lockouts). None of the in-scope providers (granola, brand-ninja, kajabi, otter, plaud, datadog-ap1, datadog-ap2) is verified on expires_in, and the flag covers all of them at once, so no per-provider exception exists. claude-code agents only: opencode has no broker path and keeps env delivery. See docs/runbooks/remote-mcp-oauth-broker-credentials-rollout.md.",
41458
+ flagType: "boolean",
41459
+ // `false` = today's env delivery. A wrongly-ON flip on an unconverged host is
41460
+ // an outage of the remote OAuth MCPs (see the description), so the ON path is
41461
+ // the one with a reach precondition.
41462
+ defaultValue: false,
41463
+ // Changes how every remote-OAuth MCP on the scope authenticates. A
41464
+ // deliberate, confirmed action (ADR-0022 §4).
41465
+ sensitive: true,
41466
+ // ADR-0120: an org owner/admin must not be able to switch this on for their
41467
+ // own org before its prerequisites (ENG-12053 deployed, hosts and sessions
41468
+ // converged) are met. Nothing in code enforces those gates, and an early
41469
+ // enable is an outage of that org's remote OAuth MCPs (CodeRabbit on #7568).
41470
+ platformAdminOnly: true,
41471
+ // PLACEHOLDER, like `github-broker-credentials` shipped with. Replace with the
41472
+ // first published agt-cli whose remote-oauth-proxy carries broker mode
41473
+ // (grep the bundle for AGT_REMOTE_MCP_INTEGRATION_ID), bisected from the
41474
+ // tarballs as `xero-broker-credentials` did. This version names the bundle on
41475
+ // disk. remote-oauth-proxy.js is not in RESTARTABLE_CHANNEL_FILES, so a
41476
+ // session started before the update keeps its older proxy until it restarts:
41477
+ // a host at this version can still run a pre-broker proxy. Advisory only: it
41478
+ // feeds computeFlagReach, it does not block a flip.
41479
+ since: "0.29.0"
41480
+ },
41447
41481
  {
41448
41482
  key: "help-kb-auto-grant",
41449
41483
  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).",
@@ -41713,6 +41747,18 @@ var FLAG_REGISTRY = [
41713
41747
  // honours the filter is unproven, so an org must not switch it on for itself.
41714
41748
  platformAdminOnly: true
41715
41749
  },
41750
+ {
41751
+ key: "agent-email-inbox",
41752
+ description: "ENG-12021 - lets an owner/admin give one agent its own email address on the platform's agent mail domain, provisioned as a Resend Inbox, which the agent can list, search and read. OFF (default) = the provisioning route refuses and no inbox can be created. This flag is ROLLOUT CONTROL, NOT the revocation: it decides whether an org may provision, and turning it off does NOT take the tools away from an agent that already has an address - `agent_email_inboxes.status` does that, and is what to reach for in an incident. Nor is it the only gate, and the two secrets do NOT gate the same things: AGENT_INBOX_RESEND_API_KEY gates EVERYTHING (unset = provisioning refuses AND every tool call on an existing inbox answers not_configured), while AGENT_INBOX_DOMAIN is read only when MINTING an address - so clearing the domain stops new inboxes and leaves an agent that already has one still reading its mail (NOT replying - this slice ships no send or reply tool at all; that is PR B). Do not reach for either as a kill switch; the status column is the one. A per-org cap refuses provisioning past its limit regardless of this flag. BEFORE ARMING THIS FOR AN ORG, verify cross-inbox thread isolation against a real key: the inbox segment of every Resend path is server-derived from the agent's own row, but thread_id is an AGENT-SUPPLIED argument, and Resend documents no error for a thread that belongs to a different inbox. Their thread response carries no inbox field either, so this cannot be re-checked on our side after the fact - it is a vendor behaviour that has to be measured once (request one inbox's thread id under another inbox and confirm a 404), not an invariant this code can enforce. Platform-admin-only AND sensitive because each inbox is a RECURRING monthly cost with no per-unit billing primitive behind it (ENG-8720) - an org must not be able to switch on a subscription for itself, and the cap is the only thing metering it.",
41753
+ flagType: "boolean",
41754
+ defaultValue: false,
41755
+ sensitive: true,
41756
+ platformAdminOnly: true
41757
+ // Deliberately NO envVar. The reader is the API, server-side, which can call the
41758
+ // flag evaluator directly - so there is no host-side bash hook needing a
41759
+ // materialised value, and declaring one would only create a literal for the
41760
+ // ENG-8303 sst-pin guard to catch.
41761
+ },
41716
41762
  {
41717
41763
  key: "premium-gateway-inference",
41718
41764
  description: "ENG-10865 / ADR-0117 - RESERVED, and INERT until the runtime wiring lands. Turning it ON today mints nothing and delivers nothing: no caller invokes the mint client yet, resolveBindingCredential is unchanged, and a gateway binding still resolves `blocked-gateway` either way. The flag is registered ahead of that wiring on purpose - see below - so an operator must not read it as a working switch. ONCE WIRED, ON will mean the API mints a budgeted key per agent and the host spawns against the gateway, so that a policy whose ACTIVE binding is transport=gateway with credential_owner=platform resolves `applied`; OFF will remain exactly the fleet behaviour before this flag existed. Registered early and kept deliberately SEPARATE from holding AI_GATEWAY_MINT_TOKEN, because possessing the minting credential is not clearance to spend platform money on a customer agent - the ENG-8247 shape. The secret is set in prod BEFORE ADR-0117 is accepted, before metering exists (ENG-10867) and before the premium opt-in is registered (ENG-10868), so presence of the credential must not be the gate. Boolean.",
@@ -37709,7 +37709,12 @@ var REMOTE_MCP_PROXY_ENV = {
37709
37709
  // Deliberately NOT in REMOTE_MCP_AUTH_ENV_KEYS, for the same reason as
37710
37710
  // `argRejects`: it shapes WHICH calls we forward, not what an outbound request
37711
37711
  // looks like, so the connectivity probe has nothing to reconstruct from it.
37712
- toolTiers: "AGT_REMOTE_MCP_TOOL_TIERS"
37712
+ toolTiers: "AGT_REMOTE_MCP_TOOL_TIERS",
37713
+ // ENG-12046: when set, the proxy fetches its bearer from the broker at use
37714
+ // time for THIS integration row (uuid) instead of reading TOKEN_FILE/TOKEN_VAR,
37715
+ // and the token is no longer written to `.env.integrations`. Hygiene, not a
37716
+ // boundary: see core/integrations/remote-mcp-broker-token.ts.
37717
+ integrationId: "AGT_REMOTE_MCP_INTEGRATION_ID"
37713
37718
  };
37714
37719
  var REMOTE_MCP_AUTH_ENV_KEYS = [
37715
37720
  REMOTE_MCP_PROXY_ENV.tokenVar,
@@ -41294,12 +41299,15 @@ var FLAG_REGISTRY = [
41294
41299
  // direct-chat MCP to render them: an older agt-cli shows a notice as
41295
41300
  // "download failed; ask the user to re-send", which sends users in circles
41296
41301
  // (Sherlock, 13 Nov). So the flip-reach modal must count hosts by the CLI
41297
- // that renders notices. DELIBERATE UNREACHABLE PLACEHOLDER until this PR
41298
- // merges and "Publish CLI on adapter changes (main)" publishes the first
41299
- // agt-cli carrying the MCP change: replace it with that exact version in a
41300
- // one-line follow-up, and arm only when the modal shows 0 stale and 0
41301
- // unknown hosts. A placeholder over-reports stale hosts; it never hides one.
41302
- since: "0.29.0"
41302
+ // that renders notices. 0.28.1252 is the first published agt-cli carrying
41303
+ // #7579's MCP change (tag agt-cli-0.28.1252, published from caf64c0b5; the
41304
+ // publish run on #7579's own merge commit 38465ce5f failed). Arm only when
41305
+ // the modal shows 0 stale and 0 unknown hosts. The reach count covers only
41306
+ // active hosts seen in the last 24h (routes/flags.ts), so also confirm no
41307
+ // active host older than 0.28.1252 is offline before arming the stage-wide
41308
+ // flip: one that reconnects later receives the armed flag on its first
41309
+ // heartbeat (CodeRabbit on #7588).
41310
+ since: "0.28.1252"
41303
41311
  },
41304
41312
  {
41305
41313
  key: "platform-held-key-central-probe",
@@ -41572,7 +41580,7 @@ var FLAG_REGISTRY = [
41572
41580
  },
41573
41581
  {
41574
41582
  key: "scheduled-task-nudge-durable",
41575
- description: 'Deliver the scheduled-task "work this card" nudge over the durable direct-chat notice rail instead of unverified tmux send-keys (ENG-8068, re-landing ENG-7971). When ON, routeScheduledTaskViaKanban enqueues the nudge via POST /host/scheduled-task/notify (kind:notice, push-and-consumed by the in-session MCP with a per-card consume-time revalidation) and closes the card + run on an enqueue failure, retiring the ENG-6351 orphaned-card gap where an unsubmitted keystroke left a scheduled task silently unrun. When OFF (default) the manager keeps the current tmux send-keys delivery, byte-for-byte as today. This is the kill switch: ENG-7971 was reverted once because the durable rail 500d on a session_id bug (fixed in ENG-8061); flip OFF to fall back to send-keys instantly without a code rollback if the durable path misbehaves. Resolved host-side by the manager via hostFlagStore().getBoolean (the manager evaluates the decision itself, so no spawn-env materialization is needed). Ships dark.',
41583
+ description: 'Deliver the scheduled-task "work this card" nudge over the durable direct-chat notice rail instead of unverified tmux send-keys (ENG-8068, re-landing ENG-7971). When ON, routeScheduledTaskViaKanban enqueues the nudge via POST /host/scheduled-task/notify (kind:notice, push-and-consumed by the in-session MCP with a per-card consume-time revalidation) and closes the card + run on an enqueue failure, retiring the ENG-6351 orphaned-card gap where an unsubmitted keystroke left a scheduled task silently unrun. When OFF (default) the manager delivers the nudge by tmux send-keys. ONE EXCEPTION, whatever this flag says (ENG-8006): when send-keys reaches nothing because the session is down or restarting, the nudge is still queued on the durable rail for the next session, and if that enqueue fails the card is closed as failed. So OFF is a partial kill switch: it takes live sessions off the rail, but not firings whose session is down. ENG-7971 was reverted once because the durable rail 500d on a session_id bug (fixed in ENG-8061). During a rail incident, OFF limits the blast radius to down-session firings, and those show up as cards closed failed with "scheduled-task nudge undeliverable". Resolved host-side by the manager via hostFlagStore().getBoolean (the manager evaluates the decision itself, so no spawn-env materialization is needed). Ships dark.',
41576
41584
  flagType: "boolean",
41577
41585
  // Declared safe value is `false`: the current, reverted-to send-keys delivery. Turning
41578
41586
  // it ON activates the durable rail per org/host once operators are confident. `false`
@@ -41890,6 +41898,32 @@ var FLAG_REGISTRY = [
41890
41898
  // `sensitive: true`, plus the two gates spelled out in the description.
41891
41899
  since: "0.28.1015"
41892
41900
  },
41901
+ {
41902
+ key: "remote-mcp-oauth-broker-credentials",
41903
+ description: "Deliver the bearer of every OAuth remote MCP served through remote-oauth-proxy (OAUTH_PROVIDERS entries with an mcpUrl: granola, brand-ninja, kajabi, otter, plaud, datadog-ap1/ap2 today) through the broker credential endpoint at USE time, instead of materializing it into `.env.integrations` (ENG-12046). Mechanically the sibling of `xero-broker-credentials`. ON: POST /host/agent-integrations strips `access_token`, `refresh_token` and `token_expires_at` from those rows and marks them credential_delivery=broker, so `<DEF>_ACCESS_TOKEN` is no longer written to `.env.integrations` and so is no longer in the agent process env (the session wrapper `source`s that file with `set -a`). The claudecode adapter then emits AGT_REMOTE_MCP_INTEGRATION_ID instead of a token file/var, and the proxy fetches the bearer per use from POST /host/agent-integrations/<uuid>/credential with the agent's own host credentials (memory only, fail closed, no fallback). OFF (default): byte-for-byte today's behaviour. THIS IS HYGIENE, NOT A BOUNDARY: an agent that calls the same fetch can still obtain the token. The binding control for broad-scope providers (Datadog mcp_all) remains a read-only provider user; the real boundary is ENG-12047 (host-side proxy). SINCE IS A PLACEHOLDER: `since` (0.29.0) is an unreachable placeholder, not a verified threshold. Before enabling, replace it with the first published agt-cli whose remote-oauth-proxy carries broker mode (bisected from the tarballs), or the reach estimate means nothing. FLIP GATE: an under-`since` host honours the marker (it skips the token write, ENG-8344) but still emits a token-file proxy entry, so its remote OAuth MCPs answer \"no current access token\" for every call: an outage of those integrations, not a leak. Zero hosts carrying these integrations below `since` per hosts.agt_version before flipping, counting NULL as unconverged. agt_version names the bundle on disk, not the running proxy: a session started before the update keeps its pre-broker proxy until it restarts, so also confirm every affected session has respawned. HARD GATE: Do not enable, for any provider, until ENG-12053 is merged AND deployed to every API instance serving the credential route (a merge alone is not enough: an older route ignores on_missing_expiry: 'serve'), and a fetch with it on a no-expiry row is verified not to refresh. Reason: a provider whose refresh response omits expires_in makes oauth-refresh drop token_expires_at, the credential route treats that as \"refresh now\", and the row then refreshes about every 60s; the next poll returns the row to env delivery, but that does NOT respawn the running session, so its proxy keeps refreshing about every 60s until some unrelated restart (provider rate limits, token churn, possible lockouts). None of the in-scope providers (granola, brand-ninja, kajabi, otter, plaud, datadog-ap1, datadog-ap2) is verified on expires_in, and the flag covers all of them at once, so no per-provider exception exists. claude-code agents only: opencode has no broker path and keeps env delivery. See docs/runbooks/remote-mcp-oauth-broker-credentials-rollout.md.",
41904
+ flagType: "boolean",
41905
+ // `false` = today's env delivery. A wrongly-ON flip on an unconverged host is
41906
+ // an outage of the remote OAuth MCPs (see the description), so the ON path is
41907
+ // the one with a reach precondition.
41908
+ defaultValue: false,
41909
+ // Changes how every remote-OAuth MCP on the scope authenticates. A
41910
+ // deliberate, confirmed action (ADR-0022 §4).
41911
+ sensitive: true,
41912
+ // ADR-0120: an org owner/admin must not be able to switch this on for their
41913
+ // own org before its prerequisites (ENG-12053 deployed, hosts and sessions
41914
+ // converged) are met. Nothing in code enforces those gates, and an early
41915
+ // enable is an outage of that org's remote OAuth MCPs (CodeRabbit on #7568).
41916
+ platformAdminOnly: true,
41917
+ // PLACEHOLDER, like `github-broker-credentials` shipped with. Replace with the
41918
+ // first published agt-cli whose remote-oauth-proxy carries broker mode
41919
+ // (grep the bundle for AGT_REMOTE_MCP_INTEGRATION_ID), bisected from the
41920
+ // tarballs as `xero-broker-credentials` did. This version names the bundle on
41921
+ // disk. remote-oauth-proxy.js is not in RESTARTABLE_CHANNEL_FILES, so a
41922
+ // session started before the update keeps its older proxy until it restarts:
41923
+ // a host at this version can still run a pre-broker proxy. Advisory only: it
41924
+ // feeds computeFlagReach, it does not block a flip.
41925
+ since: "0.29.0"
41926
+ },
41893
41927
  {
41894
41928
  key: "help-kb-auto-grant",
41895
41929
  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).",
@@ -42159,6 +42193,18 @@ var FLAG_REGISTRY = [
42159
42193
  // honours the filter is unproven, so an org must not switch it on for itself.
42160
42194
  platformAdminOnly: true
42161
42195
  },
42196
+ {
42197
+ key: "agent-email-inbox",
42198
+ description: "ENG-12021 - lets an owner/admin give one agent its own email address on the platform's agent mail domain, provisioned as a Resend Inbox, which the agent can list, search and read. OFF (default) = the provisioning route refuses and no inbox can be created. This flag is ROLLOUT CONTROL, NOT the revocation: it decides whether an org may provision, and turning it off does NOT take the tools away from an agent that already has an address - `agent_email_inboxes.status` does that, and is what to reach for in an incident. Nor is it the only gate, and the two secrets do NOT gate the same things: AGENT_INBOX_RESEND_API_KEY gates EVERYTHING (unset = provisioning refuses AND every tool call on an existing inbox answers not_configured), while AGENT_INBOX_DOMAIN is read only when MINTING an address - so clearing the domain stops new inboxes and leaves an agent that already has one still reading its mail (NOT replying - this slice ships no send or reply tool at all; that is PR B). Do not reach for either as a kill switch; the status column is the one. A per-org cap refuses provisioning past its limit regardless of this flag. BEFORE ARMING THIS FOR AN ORG, verify cross-inbox thread isolation against a real key: the inbox segment of every Resend path is server-derived from the agent's own row, but thread_id is an AGENT-SUPPLIED argument, and Resend documents no error for a thread that belongs to a different inbox. Their thread response carries no inbox field either, so this cannot be re-checked on our side after the fact - it is a vendor behaviour that has to be measured once (request one inbox's thread id under another inbox and confirm a 404), not an invariant this code can enforce. Platform-admin-only AND sensitive because each inbox is a RECURRING monthly cost with no per-unit billing primitive behind it (ENG-8720) - an org must not be able to switch on a subscription for itself, and the cap is the only thing metering it.",
42199
+ flagType: "boolean",
42200
+ defaultValue: false,
42201
+ sensitive: true,
42202
+ platformAdminOnly: true
42203
+ // Deliberately NO envVar. The reader is the API, server-side, which can call the
42204
+ // flag evaluator directly - so there is no host-side bash hook needing a
42205
+ // materialised value, and declaring one would only create a literal for the
42206
+ // ENG-8303 sst-pin guard to catch.
42207
+ },
42162
42208
  {
42163
42209
  key: "premium-gateway-inference",
42164
42210
  description: "ENG-10865 / ADR-0117 - RESERVED, and INERT until the runtime wiring lands. Turning it ON today mints nothing and delivers nothing: no caller invokes the mint client yet, resolveBindingCredential is unchanged, and a gateway binding still resolves `blocked-gateway` either way. The flag is registered ahead of that wiring on purpose - see below - so an operator must not read it as a working switch. ONCE WIRED, ON will mean the API mints a budgeted key per agent and the host spawns against the gateway, so that a policy whose ACTIVE binding is transport=gateway with credential_owner=platform resolves `applied`; OFF will remain exactly the fleet behaviour before this flag existed. Registered early and kept deliberately SEPARATE from holding AI_GATEWAY_MINT_TOKEN, because possessing the minting credential is not clearance to spend platform money on a customer agent - the ENG-8247 shape. The secret is set in prod BEFORE ADR-0117 is accepted, before metering exists (ENG-10867) and before the premium opt-in is registered (ENG-10868), so presence of the credential must not be the gate. Boolean.",
@@ -68,12 +68,12 @@ import {
68
68
  writeDirectChatSessionState,
69
69
  writeEgressAllowlist,
70
70
  writePersistentClaudeWrapper
71
- } from "./chunk-3HRBU4H6.js";
72
- import "./chunk-4VOQ6D7X.js";
71
+ } from "./chunk-ZKLOPCWS.js";
72
+ import "./chunk-ZDON4IXL.js";
73
73
  import "./chunk-HYQ7VOC3.js";
74
74
  import "./chunk-6HBXEJHO.js";
75
75
  import "./chunk-XWVM4KPK.js";
76
- import "./chunk-RUKGOBVA.js";
76
+ import "./chunk-EWD3K6YD.js";
77
77
  import "./chunk-AIUIMEUS.js";
78
78
  import "./chunk-DGUM43GV.js";
79
79
  export {
@@ -147,4 +147,4 @@ export {
147
147
  writeEgressAllowlist,
148
148
  writePersistentClaudeWrapper
149
149
  };
150
- //# sourceMappingURL=persistent-session-HS33PGZZ.js.map
150
+ //# sourceMappingURL=persistent-session-HQPQPNPK.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-3HRBU4H6.js";
4
- import "./chunk-4VOQ6D7X.js";
3
+ } from "./chunk-ZKLOPCWS.js";
4
+ import "./chunk-ZDON4IXL.js";
5
5
  import "./chunk-HYQ7VOC3.js";
6
6
  import "./chunk-6HBXEJHO.js";
7
7
  import "./chunk-XWVM4KPK.js";
8
- import "./chunk-RUKGOBVA.js";
8
+ import "./chunk-EWD3K6YD.js";
9
9
  import "./chunk-AIUIMEUS.js";
10
10
  import "./chunk-DGUM43GV.js";
11
11
 
@@ -804,4 +804,4 @@ export {
804
804
  readAndResetSlackReplyBindingClassifications,
805
805
  readAndResetSlackReplyTargetClassifications
806
806
  };
807
- //# sourceMappingURL=responsiveness-probe-32AWSVSL.js.map
807
+ //# sourceMappingURL=responsiveness-probe-6GNSPLD2.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  sessionTranscriptDir
3
- } from "./chunk-4VOQ6D7X.js";
4
- import "./chunk-RUKGOBVA.js";
3
+ } from "./chunk-ZDON4IXL.js";
4
+ import "./chunk-EWD3K6YD.js";
5
5
  import "./chunk-DGUM43GV.js";
6
6
 
7
7
  // src/lib/session-auth-dead.ts
@@ -205,4 +205,4 @@ export {
205
205
  decideSessionAuthState,
206
206
  probeSessionAuth
207
207
  };
208
- //# sourceMappingURL=session-auth-dead-2L2NLMMB.js.map
208
+ //# sourceMappingURL=session-auth-dead-4Z24MU6C.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.1252",
3
+ "version": "0.28.1254",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {