@integrity-labs/agt-cli 0.28.890 → 0.28.892

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 (26) hide show
  1. package/dist/bin/agt.js +5 -5
  2. package/dist/{chunk-FHJLOWU2.js → chunk-FZ6KIIYX.js} +86 -22
  3. package/dist/chunk-FZ6KIIYX.js.map +1 -0
  4. package/dist/{chunk-WGMIKXTX.js → chunk-SUVQ2KSP.js} +4 -4
  5. package/dist/{chunk-AQM4A5JF.js → chunk-WMJBXN6N.js} +2 -2
  6. package/dist/{claude-pair-runtime-XSOXRHGZ.js → claude-pair-runtime-RTD7ZCVS.js} +2 -2
  7. package/dist/lib/manager-worker.js +14 -39
  8. package/dist/lib/manager-worker.js.map +1 -1
  9. package/dist/mcp/direct-chat-channel.js +85 -21
  10. package/dist/mcp/index.js +1316 -1237
  11. package/dist/mcp/origami.js +85 -21
  12. package/dist/mcp/slack-channel.js +85 -21
  13. package/dist/mcp/telegram-channel.js +85 -21
  14. package/dist/{persistent-session-DVG5WKZZ.js → persistent-session-ARKZDYMX.js} +3 -3
  15. package/dist/{responsiveness-probe-PPI3AFQG.js → responsiveness-probe-X2WXPIUI.js} +3 -3
  16. package/dist/{session-auth-dead-L7TAICNC.js → session-auth-dead-BLEV4AUJ.js} +2 -2
  17. package/package.json +2 -2
  18. package/dist/assets/review/SKILL.md +0 -223
  19. package/dist/assets/review/SWEEP.md +0 -169
  20. package/dist/chunk-FHJLOWU2.js.map +0 -1
  21. /package/dist/{chunk-WGMIKXTX.js.map → chunk-SUVQ2KSP.js.map} +0 -0
  22. /package/dist/{chunk-AQM4A5JF.js.map → chunk-WMJBXN6N.js.map} +0 -0
  23. /package/dist/{claude-pair-runtime-XSOXRHGZ.js.map → claude-pair-runtime-RTD7ZCVS.js.map} +0 -0
  24. /package/dist/{persistent-session-DVG5WKZZ.js.map → persistent-session-ARKZDYMX.js.map} +0 -0
  25. /package/dist/{responsiveness-probe-PPI3AFQG.js.map → responsiveness-probe-X2WXPIUI.js.map} +0 -0
  26. /package/dist/{session-auth-dead-L7TAICNC.js.map → session-auth-dead-BLEV4AUJ.js.map} +0 -0
@@ -34867,6 +34867,12 @@ function clampDirectChatHistoryLimit(raw) {
34867
34867
  return floored;
34868
34868
  }
34869
34869
 
34870
+ // ../core/dist/direct-chat/agent-history-notices.js
34871
+ var AGENT_HISTORY_TURNS_ONLY_OR_FILTER = [
34872
+ "payload->>kind.is.null",
34873
+ `payload->>kind.in.("",${[...USER_FACING_NOTICE_KINDS].sort().join(",")})`
34874
+ ].join(",");
34875
+
34870
34876
  // ../core/dist/onboarding/state-machine.js
34871
34877
  var AREA_ORDER = [
34872
34878
  "framing",
@@ -37484,14 +37490,38 @@ var FLAG_REGISTRY = [
37484
37490
  },
37485
37491
  {
37486
37492
  key: "agent-unified-screen",
37487
- description: 'Unified agent screen redesign (ENG-8478 epic / ENG-8480). When ON, the webapp renders the new single-screen "viewing is editing" agent surface (stripped-back hero, working agent switcher, inline-editable profile, embedded operational panels + a live direct-chat drawer) in place of the separate agent view/edit pages; when OFF, the current view/edit pages are unchanged. Additive UI gate \u2014 no data-model change: each panel reads the same existing endpoints the current pages use. Composes independently with app-top-nav-shell (the two flags are reconciled in ENG-8488). Ships dark.',
37493
+ description: 'Unified agent screen redesign (ENG-8478 epic / ENG-8480). When ON, the webapp renders the new single-screen "viewing is editing" agent surface (stripped-back hero, working agent switcher, inline-editable profile, embedded operational panels + a live direct-chat drawer) in place of the separate agent view/edit pages; when OFF, the current view/edit pages are unchanged. Additive UI gate \u2014 no data-model change: each panel reads the same existing endpoints the current pages use. Composes independently with app-top-nav-shell (the two flags are reconciled in ENG-8488). NO LONGER DARK: ENG-9832 cutover step 1 flipped the default to true, so an org with no override now gets the unified screen. The key survives only until cutover step 2 deletes it \u2014 which is blocked on ENG-8547 and ENG-8559, because the flag-off branch is still the only home for the /edit tabs.',
37488
37494
  flagType: "boolean",
37489
- // Declared safe value is `false` = the current view/edit pages. A flag-DB read
37490
- // error must fall back to what ships today, never a half-built redesign.
37491
- defaultValue: false,
37492
- // Read CLIENT-SIDE by the agent screen ("use client") via usePublicBooleanFlag,
37493
- // so the key must be in the browser-exposed public map. Additive viewer gate,
37494
- // resolved within the active-org cookie's scope not sensitive.
37495
+ // ENG-9832 (cutover step 1): flipped `false` -> `true`. The comment this
37496
+ // replaces called `false` the safe direction "the current view/edit
37497
+ // pages", never "a half-built redesign". That was true while the redesign
37498
+ // was half built. It has been the shipped surface for the pilot orgs since
37499
+ // ENG-8481, so `false` now points at the pages being retired, not at safety.
37500
+ // The old rationale is recorded rather than deleted because it was correct
37501
+ // under a premise that has since expired.
37502
+ //
37503
+ // MIND THE SPLIT. This value is consulted by the API evaluator when it
37504
+ // builds the `GET /flags` map for an org with NO override. It is NOT the
37505
+ // fallback the webapp uses when that fetch fails: `getPublicBooleanFlagServer`
37506
+ // and `usePublicBooleanFlag` both return the argument passed at the CALL
37507
+ // SITE and never consult this registry. Three call sites carry `true` to
37508
+ // match — agents/[agentId]/page.tsx, agents/[agentId]/edit/page.tsx and
37509
+ // `useAgentUnifiedScreenEnabled` in lib/redesign-flags.ts. Flipping the
37510
+ // registry alone leaves the cutover half-applied with no error anywhere;
37511
+ // eng-9832-unified-fallback-parity.test.ts fails if any of the three drifts.
37512
+ defaultValue: true,
37513
+ // Read BOTH server-side (agents/[agentId]/page.tsx and its /edit sibling, via
37514
+ // getPublicBooleanFlagServer) and client-side (dashboard-sherlock-shell.tsx,
37515
+ // via usePublicBooleanFlag), so the key must be in the browser-exposed public
37516
+ // map. Additive viewer gate, resolved within the active-org cookie's scope
37517
+ // — not sensitive.
37518
+ //
37519
+ // `public` MUST STAY until step 2 deletes the key, and the reason reads
37520
+ // backwards: the server helper resolves against the very SAME public-filtered
37521
+ // `GET /flags` the browser uses (routes/flags.ts filters to
37522
+ // listPublicFlagKeys()). Drop `public` and the key is simply absent from the
37523
+ // map, so both server readers fall through to their call-site argument
37524
+ // forever — silently, with no error raised anywhere.
37495
37525
  public: true
37496
37526
  },
37497
37527
  {
@@ -37508,16 +37538,36 @@ var FLAG_REGISTRY = [
37508
37538
  },
37509
37539
  {
37510
37540
  key: "ninjafy-brand",
37511
- description: 'Present the product under the Ninjafy brand instead of Augmented Team (ENG-8250). This is the UMBRELLA brand gate, not a one-off nav toggle: every subsequent rebrand surface (page titles, email templates, marketing-facing copy) reads THIS key rather than adding its own flag, so the whole rebrand keeps a single kill switch. First surface is the left-hand nav wordmark \u2014 ON replaces the human+robot mark and the "augmented.team" text with italic lowercase "ninjafy"; OFF renders exactly what shipped before. Scope is the USER-FACING BRAND PRESENTATION \u2014 text AND VISUAL THEME. ENG-8858 widened this from text alone: the Ninjafy palette is gated here too, because a colour theme is not text. It stays ONE key rather than gaining a `ninjafy-theme` sibling, so a half-branded state \u2014 ninjafy wordmark over Augmented green \u2014 is unreachable and the rebrand keeps a single kill switch. It must never gate a code identifier, package name, env var or CLI name. EXISTING identifiers stay `Augmented`/`agt` per the CLAUDE.md naming contract, which protects them from premature renaming \u2014 the deep rename is workstream C of docs/runbooks/rebrand-ninjafy-migration.md and is out of scope here. That contract does NOT require NEW code to carry the old brand: artefacts created specifically for the rebrand take Ninjafy naming (ENG-8078 decision 9; see the CLAUDE.md rebrand carve-out). Either way it is a naming rule, not a flag concern \u2014 this key gates presentation, never an identifier. Set the stage-wide default to flip a whole environment, or add a feature_flag_overrides row to pilot a subset while everyone else still sees Augmented. Overrides resolve at FOUR grains, most specific first \u2014 agent, team, host, then org-wide (evaluate.ts:79-81); organization_id is always required, so there is no global override. Org and team are the useful pilot grains for THIS flag: there is now exactly ONE consumer \u2014 (dashboard)/layout.tsx via getPublicBooleanFlagServer \u2014 evaluating in the active-org cookie scope, so a host- or agent-scoped row is accepted by the table but never reached by the console. It resolves the key ONCE per request and passes the boolean down to sidebar.tsx and top-nav.tsx as a required prop. Resolution is SERVER-side deliberately: the client hook starts at its default and updates after an async GET /flags, so anything gated on it paints Augmented and then repaints. ENG-8858 moved the PALETTE for that reason (a full-page colour flash); ENG-9227 moved the WORDMARK, which had been the last surface still swapping after hydration. A consequence worth knowing: /login and the marketing routes stay on the Augmented palette whatever an org sets, because getPublicBooleanFlagServer returns the default without a verified session and a pre-auth page has neither a session nor an active org \u2014 a PER-ORG flag structurally cannot brand one. Those surfaces follow only when the stage-wide default flips. Ships dark.',
37541
+ description: 'Present the product under the Ninjafy brand instead of Augmented Team (ENG-8250). This is the UMBRELLA brand gate, not a one-off nav toggle: every subsequent rebrand surface (page titles, email templates, marketing-facing copy) reads THIS key rather than adding its own flag, so the whole rebrand keeps a single kill switch. First surface is the left-hand nav wordmark \u2014 ON replaces the human+robot mark and the "augmented.team" text with italic lowercase "ninjafy"; OFF renders exactly what shipped before. Scope is the USER-FACING BRAND PRESENTATION \u2014 text AND VISUAL THEME. ENG-8858 widened this from text alone: the Ninjafy palette is gated here too, because a colour theme is not text. It stays ONE key rather than gaining a `ninjafy-theme` sibling, so a half-branded state \u2014 ninjafy wordmark over Augmented green \u2014 is unreachable and the rebrand keeps a single kill switch. It must never gate a code identifier, package name, env var or CLI name. EXISTING identifiers stay `Augmented`/`agt` per the CLAUDE.md naming contract, which protects them from premature renaming \u2014 the deep rename is workstream C of docs/runbooks/rebrand-ninjafy-migration.md and is out of scope here. That contract does NOT require NEW code to carry the old brand: artefacts created specifically for the rebrand take Ninjafy naming (ENG-8078 decision 9; see the CLAUDE.md rebrand carve-out). Either way it is a naming rule, not a flag concern \u2014 this key gates presentation, never an identifier. Set the stage-wide default to flip a whole environment, or add a feature_flag_overrides row to pilot a subset while everyone else still sees Augmented. Overrides resolve at FOUR grains, most specific first \u2014 agent, team, host, then org-wide (evaluate.ts:79-81); organization_id is always required, so there is no global override. Org and team are the useful pilot grains for THIS flag: there is now exactly ONE consumer \u2014 (dashboard)/layout.tsx via getPublicBooleanFlagServer \u2014 evaluating in the active-org cookie scope, so a host- or agent-scoped row is accepted by the table but never reached by the console. It resolves the key ONCE per request and passes the boolean down to sidebar.tsx and top-nav.tsx as a required prop. Resolution is SERVER-side deliberately: the client hook starts at its default and updates after an async GET /flags, so anything gated on it paints Augmented and then repaints. ENG-8858 moved the PALETTE for that reason (a full-page colour flash); ENG-9227 moved the WORDMARK, which had been the last surface still swapping after hydration. A consequence worth knowing: /login and the marketing routes stay on the Augmented palette whatever an org sets, because fetchPublicFlags returns null without a verified session and a pre-auth page has neither a session nor an active org \u2014 a PER-ORG flag structurally cannot brand one. ENG-9830 CORRECTS what used to be written here ("those surfaces follow only when the stage-wide default flips"): they do not follow it at all. Two reasons. The value returned on a null fetch is the CALL SITE\u2019s passed argument, not this registry default; and six such pages (/login, /reset-password, /auth/confirm, the pre-redeem member-signin gate and the two public Slack-install terminal pages) do not mount <BrandStamp/> AT ALL \u2014 deliberately, enumerated with per-page reasons in eng-9266-brand-stamp-coverage.test.ts. They become branded when the flag is REMOVED at cutover step 2 and the palette moves into bare :root, with no read left to gate it. NO LONGER DARK: ENG-9830 cutover step 1 flipped the default to true, so an org with no override now sees Ninjafy. The key survives only until cutover step 2 deletes it.',
37512
37542
  flagType: "boolean",
37513
- // Declared safe value is `false`: the pre-rebrand brand. `false` is also the
37514
- // fail-closed direction if the flag DB is unreachable we must show the brand
37515
- // that is currently live and contractually correct, never leak an unannounced
37516
- // rebrand to every customer at once.
37517
- defaultValue: false,
37543
+ // ENG-9830 (cutover step 1): flipped `false` -> `true`. The comment this
37544
+ // replaces argued `false` was the fail-closed direction "never leak an
37545
+ // UNANNOUNCED rebrand to every customer at once". That was correct for as
37546
+ // long as the rebrand was unannounced. It is not any more: Ninjafy is the
37547
+ // live, announced brand (ENG-9613 reconciled the console onto the master
37548
+ // assets while the flag was already ON in production), so `false` now points
37549
+ // at the brand we no longer ship. A flags outage that reverted a customer to
37550
+ // Augmented would be the incident, not the safe harbour.
37551
+ //
37552
+ // The old rationale is recorded rather than deleted because it is a correct
37553
+ // argument whose PREMISE expired — reading the change without it looks like
37554
+ // someone overriding a deliberate fail-closed default.
37555
+ //
37556
+ // NOTE this value is only consulted by the API evaluator when building the
37557
+ // `GET /flags` map for an org with no override. It is NOT the fallback the
37558
+ // webapp uses on an outage: `getPublicBooleanFlagServer(key, defaultValue)`
37559
+ // returns its own PASSED argument when the fetch fails, so the call sites in
37560
+ // (dashboard)/layout.tsx and components/brand-stamp.tsx carry `true` too.
37561
+ // Flipping only one of the two leaves the cutover half-applied.
37562
+ defaultValue: true,
37518
37563
  // ENG-9227: there are NO client readers of this key left. (dashboard)/
37519
37564
  // layout.tsx resolves it ONCE server-side via getPublicBooleanFlagServer and
37520
37565
  // passes the boolean down to sidebar.tsx and top-nav.tsx as a required prop.
37566
+ // "ONCE" is about the chrome, not the key: components/brand-stamp.tsx is a
37567
+ // SECOND, independent server read of `ninjafy-brand` (CodeRabbit, #5385).
37568
+ // Both are listed in the note above because both carry an outage fallback
37569
+ // that has to move together — reading this paragraph alone would leave you
37570
+ // updating one of the two.
37521
37571
  // ENG-8858 did that for the THEME; ENG-9227 finished the job for the
37522
37572
  // WORDMARK, which had kept usePublicBooleanFlag and so kept swapping
37523
37573
  // "augmented.team" to "ninjafy" after hydration.
@@ -37539,24 +37589,38 @@ var FLAG_REGISTRY = [
37539
37589
  },
37540
37590
  {
37541
37591
  key: "ninjafy-logo",
37542
- description: "Which Ninjafy logo TREATMENT the console chrome renders (ENG-9365). This is a SUB-SELECTION under ninjafy-brand, not a second brand gate: it is consulted only once ninjafy-brand has already resolved ON, so with the brand off the value is inert and the half-branded state that flag's description calls unreachable stays unreachable. ninjafy-brand remains the single kill switch for the rebrand. It exists so candidate logo treatments can be put in front of a human and compared in the running console, rather than judged from a static export. lockup = mark and wordmark together, both in the brand blue \u2014 exactly what ENG-9298 shipped, so an unset flag is a no-op. two-tone = the mark in brand blue with the wordmark in the neutral text colour (the treatment of the blue-icon/black-wordmark artwork). wordmark = the word alone, no mark. Every treatment is composed from the ENG-9298 geometry \u2014 ENG-9312 pins that the lockup's blue path IS the mark subpath followed by the wordmark subpaths, byte for byte \u2014 so a new treatment is a composition, never a fresh trace, and the three drawings cannot drift apart. Surfaces are the dashboard sidebar and the top nav. The top nav shows the WORDMARK portion at every width whatever the treatment, because ENG-9342 decided that deliberately (a full lockup at the header's icon height crowds the team switcher on a phone) \u2014 so a treatment changes the word's colour there, never whether a mark appears. The admin sidebar (ENG-9323) is NOT wired to this key and always renders the mark; widening it is a separate decision. Resolved SERVER-SIDE in (dashboard)/layout.tsx via getPublicEnumFlagServer, beside ninjafy-brand and in the same single GET /flags round trip, then passed down as a required prop. That is not a style preference: the client hook starts at its default and updates after an async fetch, so a client read would paint one logo and swap it after hydration \u2014 the exact flash ENG-9227 removed from the wordmark and ENG-8858 removed from the palette. Org and team are the useful pilot grains, as for ninjafy-brand: the single consumer evaluates in the active-org cookie scope, so a host- or agent-scoped override row is accepted by the table but never reached by the console.",
37592
+ description: "Which Ninjafy logo TREATMENT the console chrome renders (ENG-9365). This is a SUB-SELECTION under ninjafy-brand, not a second brand gate: it is consulted only once ninjafy-brand has already resolved ON, so with the brand off the value is inert and the half-branded state that flag's description calls unreachable stays unreachable. ninjafy-brand remains the single kill switch for the rebrand. It existed so candidate logo treatments could be put in front of a human and compared in the running console, rather than judged from a static export. That comparison has happened: ENG-9830 cutover step 1 chose TWO-TONE, so that is now the default and an unset flag renders it. NOTE this reverses the property this description used to claim \u2014 an unset flag was a no-op while the default was lockup (what ENG-9298 shipped), and that is deliberately given up at cutover: the default MOVING is the change. The key survives only until cutover step 2 hardcodes the chosen treatment and deletes it. lockup = mark and wordmark together, both in the brand blue \u2014 what ENG-9298 shipped. two-tone = the mark in brand blue with the wordmark in the neutral text colour (the treatment of the blue-icon/black-wordmark artwork); the chosen one. wordmark = the word alone, no mark. Every treatment is composed from the ENG-9298 geometry \u2014 ENG-9312 pins that the lockup's blue path IS the mark subpath followed by the wordmark subpaths, byte for byte \u2014 so a new treatment is a composition, never a fresh trace, and the three drawings cannot drift apart. Surfaces are the dashboard sidebar and the top nav. The top nav shows the WORDMARK portion at every width whatever the treatment, because ENG-9342 decided that deliberately (a full lockup at the header's icon height crowds the team switcher on a phone) \u2014 so a treatment changes the word's colour there, never whether a mark appears. The admin sidebar (ENG-9323) is NOT wired to this key and always renders the mark; widening it is a separate decision. Resolved SERVER-SIDE in (dashboard)/layout.tsx via getPublicEnumFlagServer, beside ninjafy-brand and in the same single GET /flags round trip, then passed down as a required prop. That is not a style preference: the client hook starts at its default and updates after an async fetch, so a client read would paint one logo and swap it after hydration \u2014 the exact flash ENG-9227 removed from the wordmark and ENG-8858 removed from the palette. Org and team are the useful pilot grains, as for ninjafy-brand: the single consumer evaluates in the active-org cookie scope, so a host- or agent-scoped override row is accepted by the table but never reached by the console.",
37543
37593
  flagType: "enum",
37544
37594
  allowedValues: ["lockup", "two-tone", "wordmark"],
37545
- // Declared safe value is `lockup` what ENG-9298 shipped. This flag has no
37546
- // "off" direction: it selects among presentations that are all live-safe, so
37547
- // fail-safe here means "the treatment currently in production", not the
37595
+ // ENG-9830 (cutover step 1): `lockup` -> `two-tone`. The treatments existed
37596
+ // so they could be compared in the running console rather than judged from a
37597
+ // static export (ENG-9365); that comparison has now happened and `two-tone`
37598
+ // — the mark in brand blue with the wordmark in the neutral text colour — is
37599
+ // the chosen treatment. It becomes the hardcoded one when this key is
37600
+ // removed at cutover step 2.
37601
+ //
37602
+ // The rule this value obeys is unchanged: this flag has no "off" direction,
37603
+ // so fail-safe means "the treatment currently in production", not the
37548
37604
  // narrowest one. A flag-DB read error, an archived row, or a stored value
37549
37605
  // outside allowedValues all resolve here (evaluate.ts normalizeFlagValue),
37550
- // which is what makes an experimental value impossible to strand.
37551
- defaultValue: "lockup",
37606
+ // which is what makes an experimental value impossible to strand. Only which
37607
+ // treatment holds that position has moved.
37608
+ //
37609
+ // Same split as ninjafy-brand above: this governs the API evaluation path
37610
+ // only. The webapp's outage fallback is the argument passed at the
37611
+ // (dashboard)/layout.tsx call site, which carries 'two-tone' to match.
37612
+ defaultValue: "two-tone",
37552
37613
  // Same trap as ninjafy-brand, and it bites harder here because there are no
37553
37614
  // client readers of this key AT ALL — it is server-resolved by construction.
37554
37615
  // `public` does NOT mean "read by a browser"; it means "readable through the
37555
37616
  // public map". getPublicEnumFlagServer resolves against the same GET /flags
37556
37617
  // endpoint the browser uses, and that route filters to listPublicFlagKeys()
37557
37618
  // (routes/flags.ts). Drop `public` and the key is simply absent from the map,
37558
- // so the helper falls through to its default and returns `lockup` FOREVER
37559
- // the dropdown appearing to do nothing, with no error raised anywhere.
37619
+ // so the helper falls through to the fallback passed at that call site and
37620
+ // returns it FOREVER — the dropdown appearing to do nothing, with no error
37621
+ // raised anywhere. Named as the call site rather than as a literal on
37622
+ // purpose: this comment said `lockup` for exactly as long as `lockup` was
37623
+ // the answer, and ENG-9830 flipping the winner is what made it a lie.
37560
37624
  public: true
37561
37625
  },
37562
37626
  {