@ironbee-ai/cli 0.28.0 → 0.30.0

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 (62) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/clients/claude/agents/ironbee-scenario.md +191 -0
  3. package/dist/clients/claude/agents/ironbee-verifier.md +22 -5
  4. package/dist/clients/claude/commands/ironbee-manage-scenario.md +36 -0
  5. package/dist/clients/claude/commands/ironbee-search-scenario.md +22 -0
  6. package/dist/clients/claude/commands/ironbee-sync-scenario.md +31 -0
  7. package/dist/clients/claude/commands/ironbee-verify.md +13 -12
  8. package/dist/clients/claude/hooks/require-verification.js +3 -3
  9. package/dist/clients/claude/hooks/track-action.js +1 -1
  10. package/dist/clients/claude/index.js +4 -4
  11. package/dist/clients/claude/platforms/scenario.android.md +31 -0
  12. package/dist/clients/claude/platforms/scenario.backend.md +26 -0
  13. package/dist/clients/claude/platforms/scenario.browser.md +41 -0
  14. package/dist/clients/claude/platforms/scenario.node.md +27 -0
  15. package/dist/clients/claude/trust.js +1 -0
  16. package/dist/clients/codex/agents/ironbee-scenario.md +179 -0
  17. package/dist/clients/codex/agents/ironbee-verifier.md +22 -5
  18. package/dist/clients/codex/commands/ironbee-manage-scenario/SKILL.main.md +102 -0
  19. package/dist/clients/codex/commands/ironbee-manage-scenario/SKILL.md +38 -0
  20. package/dist/clients/codex/commands/ironbee-search-scenario/SKILL.main.md +37 -0
  21. package/dist/clients/codex/commands/ironbee-search-scenario/SKILL.md +23 -0
  22. package/dist/clients/codex/commands/ironbee-sync-scenario/SKILL.main.md +55 -0
  23. package/dist/clients/codex/commands/ironbee-sync-scenario/SKILL.md +33 -0
  24. package/dist/clients/codex/commands/ironbee-verify/SKILL.main.md +12 -3
  25. package/dist/clients/codex/commands/ironbee-verify/SKILL.md +4 -3
  26. package/dist/clients/codex/hooks/require-verification.js +3 -3
  27. package/dist/clients/codex/hooks/track-action.js +1 -1
  28. package/dist/clients/codex/index.js +2 -2
  29. package/dist/clients/codex/platforms/scenario.android.md +31 -0
  30. package/dist/clients/codex/platforms/scenario.backend.md +26 -0
  31. package/dist/clients/codex/platforms/scenario.browser.md +40 -0
  32. package/dist/clients/codex/platforms/scenario.node.md +27 -0
  33. package/dist/clients/codex/util.js +32 -26
  34. package/dist/clients/cursor/commands/ironbee-manage-scenario/SKILL.md +100 -0
  35. package/dist/clients/cursor/commands/ironbee-search-scenario/SKILL.md +34 -0
  36. package/dist/clients/cursor/commands/ironbee-sync-scenario/SKILL.md +54 -0
  37. package/dist/clients/cursor/commands/ironbee-verify/SKILL.md +2 -1
  38. package/dist/clients/cursor/hooks/require-verification.js +3 -3
  39. package/dist/clients/cursor/hooks/track-action.js +1 -1
  40. package/dist/clients/cursor/index.js +1 -1
  41. package/dist/clients/cursor/platforms/scenario.android.md +31 -0
  42. package/dist/clients/cursor/platforms/scenario.backend.md +26 -0
  43. package/dist/clients/cursor/platforms/scenario.browser.md +40 -0
  44. package/dist/clients/cursor/platforms/scenario.node.md +27 -0
  45. package/dist/commands/install.js +1 -1
  46. package/dist/commands/mode-select.js +2 -2
  47. package/dist/commands/scenario.js +1 -0
  48. package/dist/hooks/core/actions.js +7 -7
  49. package/dist/hooks/core/nested-tools.js +1 -1
  50. package/dist/hooks/core/scenario-tools.js +1 -0
  51. package/dist/index.js +1 -1
  52. package/dist/lib/config.js +1 -1
  53. package/dist/lib/git.js +1 -1
  54. package/dist/lib/install-version.js +1 -1
  55. package/dist/lib/platform-section.js +3 -3
  56. package/dist/lib/prompt.js +5 -4
  57. package/dist/lib/scenario-staleness.js +1 -0
  58. package/dist/tui/config/schema.js +1 -1
  59. package/dist/tui/projects/area.js +4 -4
  60. package/dist/tui/scenarios/area.js +2 -0
  61. package/dist/tui/shell/registry.js +1 -1
  62. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- "use strict";var ye=Object.create;var S=Object.defineProperty;var pe=Object.getOwnPropertyDescriptor;var he=Object.getOwnPropertyNames;var be=Object.getPrototypeOf,me=Object.prototype.hasOwnProperty;var r=(n,o)=>S(n,"name",{value:o,configurable:!0});var ve=(n,o)=>{for(var p in o)S(n,p,{get:o[p],enumerable:!0})},q=(n,o,p,y)=>{if(o&&typeof o=="object"||typeof o=="function")for(let g of he(o))!me.call(n,g)&&g!==p&&S(n,g,{get:()=>o[g],enumerable:!(y=pe(o,g))||y.enumerable});return n};var we=(n,o,p)=>(p=n!=null?ye(be(n)):{},q(o||!n||!n.__esModule?S(p,"default",{value:n,enumerable:!0}):p,n)),je=n=>q(S({},"__esModule",{value:!0}),n);var Ee={};ve(Ee,{projectsArea:()=>Ce});module.exports=je(Ee);var V=we(require("blessed")),D=require("fs"),G=require("path"),b=require("../../clients/registry"),U=require("../../commands/install"),Y=require("../../commands/cycle-toggle"),w=require("../../commands/mode-select"),z=require("../../commands/uninstall"),v=require("../../lib/config"),m=require("../../lib/projects-registry"),f=require("../shell/util");const A=6;function u(n){const o=n.replace(/[/\\]+$/,"").split(/[/\\]/);return o[o.length-1]||n}r(u,"basename");function $e(n){const o=n.session.launchDir;function p(e){try{return(0,m.canonicalizePath)(e)}catch{return e}}r(p,"safeCanonical");const y=p(o);let g=(0,m.listProjects)(),$=Math.max(0,g.findIndex(e=>e.path===y)),T=p(n.session.projectDir),h="cwd";const P=V.box({parent:n.container,top:0,left:0,width:"100%",height:A,border:{type:"line"},label:" Current directory ",tags:!0,style:{border:{fg:"yellow"}},content:""}),d=V.list({parent:n.container,top:A,left:0,width:"52%",height:`100%-${A}`,border:{type:"line"},label:" Registered projects ",tags:!0,keys:!1,mouse:!1,invertSelected:!1,scrollbar:{ch:" "},style:{selected:{bg:"blue"},border:{fg:"cyan"}},items:[]}),L=V.box({parent:n.container,top:A,left:"52%",width:"48%",height:`100%-${A}`,border:{type:"line"},label:" Detail ",tags:!0,scrollable:!0,alwaysScroll:!0,scrollbar:{ch:" "},style:{border:{fg:"cyan"}},content:""});function I(){return g.length===0?void 0:g[(0,f.clamp)($,0,g.length-1)]}r(I,"selected");function E(e){return(0,b.detectClients)(e).map(i=>i.name).join(", ")}r(E,"detectedNames");function M(e){return e===T||p(e)===T}r(M,"isActive");function X(e){const s=(0,b.isProjectActive)(e)?"{green-fg}\u25CF{/green-fg}":"{red-fg}\u25CB{/red-fg}";return`${M(e.path)?"{yellow-fg}\u2605{/yellow-fg} ":" "}${s} ${(0,f.escapeTags)(u(e.path))} {gray-fg}${(0,f.escapeTags)(E(e.path))}{/gray-fg}`}r(X,"rowLabel");function B(){return{installed:E(o),registered:g.some(e=>e.path===y),active:M(y)}}r(B,"cwdState");function j(e,i){return i?`{bold}${e}{/bold}`:`{gray-fg}${e}{/gray-fg}`}r(j,"keyLabel");function J(){const{installed:e,registered:i,active:s}=B(),t=e.length>0,c=[];c.push(t?`{green-fg}\u25CF installed{/green-fg} {gray-fg}(${(0,f.escapeTags)(e)}){/gray-fg}`:"{gray-fg}\u25CB not installed{/gray-fg}"),c.push(i?"{green-fg}registered{/green-fg}":"{gray-fg}not registered{/gray-fg}"),c.push(s?"{yellow-fg}\u2605 active project{/yellow-fg}":"{gray-fg}not the active project{/gray-fg}");const a=`${j("i install",!t)} ${j("x uninstall",t)} {gray-fg}\xB7{/gray-fg} ${j("a register",!i)} ${j("d unregister",i)} {gray-fg}\xB7{/gray-fg} ${j("c make active",!s)}`,l=[];return l.push(`{bold}${(0,f.escapeTags)(o)}{/bold}`),l.push(c.join(" {gray-fg}\xB7{/gray-fg} ")),l.push(a),l.join(`
2
- `)}r(J,"buildCwdPanel");function K(){const e="{bold}Tab{/bold} switch section {bold}I/X{/bold} all {bold}r{/bold} refresh {bold}Esc/q{/bold}";let i;if(h==="cwd"){const{installed:s,registered:t}=B(),c=s.length>0;i=`{cyan-fg}cwd:{/cyan-fg} ${j("i install",!c)} ${j("x uninstall",c)} ${j("a register",!t)} ${j("d unregister",t)} {bold}c{/bold} make active`}else i="{bold}\u2191/\u2193{/bold} move {bold}Enter{/bold} switch {bold}i{/bold} install {bold}x{/bold} uninstall {bold}d{/bold} unregister";return` ${i} {gray-fg}\u2502{/gray-fg} ${e}`}r(K,"buildStatus");function Z(e){if(e===void 0){const c=E(o).length>0,a=[];return a.push("{gray-fg}No projects registered yet.{/gray-fg}"),a.push(""),a.push("{gray-fg}Use the {/gray-fg}{bold}Current directory{/bold}{gray-fg} panel above:{/gray-fg}"),a.push(c?"{bold}x{/bold} {gray-fg}\u2014 uninstall IronBee from here (removes hooks + guidance){/gray-fg}":"{bold}i{/bold} {gray-fg}\u2014 install IronBee here (writes hooks + guidance, registers it){/gray-fg}"),a.push("{bold}a{/bold} {gray-fg}\u2014 register here only (inventory, no artifact writes){/gray-fg}"),a.join(`
3
- `)}const i=(0,b.isProjectActive)(e),s=(0,v.getConfigLayerPaths)(e.path),t=[];return t.push(`{bold}${(0,f.escapeTags)(u(e.path))}{/bold}`),t.push("{gray-fg}"+"\u2500".repeat(46)+"{/gray-fg}"),t.push(`{gray-fg}path:{/gray-fg} ${(0,f.escapeTags)(e.path)}`),t.push(`{gray-fg}detected:{/gray-fg} ${(0,f.escapeTags)(E(e.path))||"(none on disk)"}`),t.push(`{gray-fg}added:{/gray-fg} ${(0,f.escapeTags)(e.installedAt)}`),t.push(`{gray-fg}on disk:{/gray-fg} ${i?"{green-fg}detected{/green-fg}":"{red-fg}stale (artifacts not detected){/red-fg}"}`),t.push(""),t.push("{bold}config layers{/bold}"),t.push(` {gray-fg}global {/gray-fg} ${(0,f.escapeTags)(s.global)}`),t.push(` {gray-fg}project{/gray-fg} ${(0,f.escapeTags)(s.project??"-")}`),t.push(` {gray-fg}local {/gray-fg} ${(0,f.escapeTags)(s.local??"-")}`),t.push(""),M(e.path)?(t.push("{yellow-fg}\u2605 active project{/yellow-fg} \u2014 Config / Sessions / Queue target this."),t.push("{gray-fg}c (in the cwd panel) = unselect \u2192 back to the current directory{/gray-fg}")):t.push("{gray-fg}Enter/s = make active (Config / Sessions / Queue switch to it){/gray-fg}"),t.push("{gray-fg}i = install \xB7 x = uninstall (pick a client when >1 registered; runs here, blocking){/gray-fg}"),t.join(`
4
- `)}r(Z,"buildDetail");function W(e,i){const s=e.style;s.border!==void 0&&(s.border.fg=i)}r(W,"setBorderFg");function x(){const e=h==="cwd";P.setLabel(e?" {yellow-fg}\u25B8 Current directory{/yellow-fg} ":" Current directory "),d.setLabel(e?" Registered projects ":" {yellow-fg}\u25B8 Registered projects{/yellow-fg} "),W(P,e?"yellow":"gray"),W(d,e?"gray":"yellow"),W(L,e?"gray":"cyan");const i=d.style.selected??{};i.bg=e?void 0:"blue",i.fg=void 0}r(x,"applyFocusStyles");function k(){T=p(n.session.projectDir),n.setStatus(K()),x(),P.setContent(J()),g.length===0?d.setItems(["{gray-fg}(no registered projects){/gray-fg}"]):(d.setItems(g.map(e=>X(e))),d.select((0,f.clamp)($,0,g.length-1))),L.setContent(Z(I())),L.setScroll(0),n.screen.render()}r(k,"render");function H(){h=h==="cwd"?"list":"cwd",k()}r(H,"toggleSection");function C(e){if(g=(0,m.listProjects)(),e!==void 0){const i=g.findIndex(s=>s.path===e);i>=0&&($=i)}$=(0,f.clamp)($,0,Math.max(0,g.length-1)),k()}r(C,"refresh");function _(e){g.length!==0&&($=(0,f.clamp)($+e,0,g.length-1),k())}r(_,"move");function ee(){try{(0,m.upsertProject)(o),C(y),n.session.message(`Registered ${u(o)} in the inventory. Use d to unregister, i to install.`)}catch(e){n.session.message(`Register failed: ${e instanceof Error?e.message:String(e)}`)}}r(ee,"registerCwd");function ne(){n.session.confirm(`Unregister ${u(o)}? (inventory only, no files touched)`,e=>{if(e)try{(0,m.removeProject)(o),C()}catch(i){n.session.message(`Unregister failed: ${i instanceof Error?i.message:String(i)}`)}})}r(ne,"unregisterCwd");function te(){if(g.some(e=>e.path===y)){n.session.message(`${u(o)} is already registered \u2014 press d to unregister.`);return}ee()}r(te,"cwdRegister");function ie(){if(!g.some(e=>e.path===y)){n.session.message(`${u(o)} is not registered \u2014 nothing to unregister.`);return}ne()}r(ie,"cwdUnregister");function O(){if(M(y)){n.session.message(`The current directory (${u(o)}) is already the active project.`);return}n.setActiveProject(y);const e=g.findIndex(i=>i.path===y);e>=0&&($=e),k(),n.session.message(`Active project \u2192 current directory (${u(o)}). Any switched project is unselected.`)}r(O,"setActiveToCwd");function re(e,i){const s=n.session.silently(()=>(0,w.resolveInstallDefaultMode)(e)),t=[s,...w.ALL_MODES.filter(a=>a!==s)],c=t.map(a=>`${w.MODE_LABELS[a]} \u2014 ${w.MODE_HINTS[a]}`);n.session.pick("Which verification mode?",c,a=>{if(a<0){i("cancel");return}i(t[a])})}r(re,"chooseMode");function oe(e,i,s){if(i==="monitor"){s(void 0);return}const t=n.session.silently(()=>(0,v.loadConfig)(e)),c=v.ALL_CYCLES.map(l=>`${l} \u2014 ${U.CYCLE_HINTS[l]}`),a=v.ALL_CYCLES.map((l,R)=>(0,v.isCyclePatternsActive)(t,l)?R:-1).filter(l=>l>=0);n.session.pickMulti("Which platforms should require verification?",c,a,l=>{if(l===null){s("cancel");return}s(l.map(R=>v.ALL_CYCLES[R]))})}r(oe,"choosePlatforms");function N(e,i,s){Q(i,t=>{re(e,c=>{c!=="cancel"&&oe(e,c,a=>{a!=="cancel"&&n.session.runWithOutput(`Install ${u(e)} (${t.map(l=>l.name).join(", ")})`,()=>{(0,w.applyModeToLayer)(e,"project",c),a!==void 0&&(0,Y.reconcileCyclesInLayer)(e,"project",a,!0);for(const l of t)l.install(e);(0,m.upsertProject)(e)}).then(()=>C(s))})})})}r(N,"doInstall");function F(e,i){Q("Uninstall which client?",s=>{n.session.confirm(`Uninstall ${s.map(t=>t.name).join(", ")} from ${u(e)}?`,t=>{t&&n.session.runWithOutput(`Uninstall ${u(e)} (${s.map(c=>c.name).join(", ")})`,()=>{const c=new Set(s.map(l=>l.name));for(const l of s)l.uninstall(e);if(!b.REGISTERED_CLIENTS.some(l=>!c.has(l.name)&&l.detect(e))){const l=(0,G.join)(e,".ironbee");(0,D.existsSync)(l)&&(0,D.rmSync)(l,{recursive:!0,force:!0}),(0,m.removeProject)(e)}}).then(()=>C(i))})})}r(F,"doUninstall");function se(){if(E(o).length>0){n.session.message(`${u(o)} is already installed \u2014 press x to uninstall.`);return}N(o,"Install into the current directory \u2014 which client?",y)}r(se,"cwdInstall");function le(){if(E(o).length===0){n.session.message(`${u(o)} is not installed \u2014 nothing to uninstall.`);return}F(o,y)}r(le,"cwdUninstall");function ae(){const e=I();e!==void 0&&(n.setActiveProject(e.path),k(),n.session.message(`Active project \u2192 ${u(e.path)}. Config / Sessions / Queue now target it.`))}r(ae,"switchTo");function ge(){const e=I();e!==void 0&&n.session.confirm(`Unregister ${u(e.path)}? (inventory only, no files touched)`,i=>{if(i)try{(0,m.removeProject)(e.path),C()}catch(s){n.session.message(`Unregister failed: ${s instanceof Error?s.message:String(s)}`)}})}r(ge,"unregisterSelected");function Q(e,i){if(b.REGISTERED_CLIENTS.length<=1){i(b.REGISTERED_CLIENTS);return}const s=b.REGISTERED_CLIENTS.map(t=>t.name);n.session.pick(e,["All clients",...s],t=>{t<0||i(t===0?b.REGISTERED_CLIENTS:[b.REGISTERED_CLIENTS[t-1]])})}r(Q,"pickClient");function de(){const e=I();e!==void 0&&N(e.path,"Install which client?")}r(de,"installSelected");function ce(){const e=I();e!==void 0&&F(e.path)}r(ce,"uninstallSelected");async function fe(){await n.session.runWithOutput("Install \u2014 all registered projects",async()=>{await(0,U.runInstallAll)({})}),C()}r(fe,"installAll");function ue(){n.session.confirm("Uninstall IronBee from ALL registered projects? (destructive)",e=>{e&&n.session.runWithOutput("Uninstall \u2014 all registered projects",async()=>{await(0,z.runUninstallAll)({yes:!0})}).then(()=>C())})}return r(ue,"uninstallAllFlow"),d.key(["tab"],()=>H()),d.key(["S-tab"],()=>H()),d.key(["up","k"],()=>{h==="list"&&_(-1)}),d.key(["down","j"],()=>{h==="list"&&_(1)}),d.key(["i"],()=>{h==="cwd"?se():de()}),d.key(["x"],()=>{h==="cwd"?le():ce()}),d.key(["d"],()=>{h==="cwd"?ie():ge()}),d.key(["a"],()=>{h==="cwd"&&te()}),d.key(["c"],()=>{h==="cwd"&&O()}),d.key(["enter","s"],()=>{h==="list"?ae():O()}),d.key(["S-i"],()=>{fe()}),d.key(["S-x"],()=>ue()),d.key(["r"],()=>C()),k(),d.focus(),n.screen.render(),{unmount(){P.destroy(),d.destroy(),L.destroy()}}}r($e,"mountProjectsView");const Ce={id:"projects",title:"Projects",summary:"Registry \u2014 switch active \xB7 register / unregister \xB7 install / uninstall (+ --all)",mount(n){return $e(n)}};0&&(module.exports={projectsArea});
1
+ "use strict";var me=Object.create;var P=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var je=Object.getPrototypeOf,$e=Object.prototype.hasOwnProperty;var r=(n,o)=>P(n,"name",{value:o,configurable:!0});var Ce=(n,o)=>{for(var b in o)P(n,b,{get:o[b],enumerable:!0})},X=(n,o,b,y)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of we(o))!$e.call(n,a)&&a!==b&&P(n,a,{get:()=>o[a],enumerable:!(y=ve(o,a))||y.enumerable});return n};var Ee=(n,o,b)=>(b=n!=null?me(je(n)):{},X(o||!n||!n.__esModule?P(b,"default",{value:n,enumerable:!0}):b,n)),Ie=n=>X(P({},"__esModule",{value:!0}),n);var Ae={};Ce(Ae,{projectsArea:()=>Se});module.exports=Ie(Ae);var H=Ee(require("blessed")),U=require("fs"),J=require("path"),m=require("../../clients/registry"),R=require("../../commands/install"),K=require("../../commands/cycle-toggle"),f=require("../../commands/mode-select"),Z=require("../../commands/uninstall"),j=require("../../lib/config"),v=require("../../lib/projects-registry"),c=require("../shell/util");const L=6;function u(n){const o=n.replace(/[/\\]+$/,"").split(/[/\\]/);return o[o.length-1]||n}r(u,"basename");function ke(n){const o=n.session.launchDir;function b(e){try{return(0,v.canonicalizePath)(e)}catch{return e}}r(b,"safeCanonical");const y=b(o);let a=(0,v.listProjects)(),E=Math.max(0,a.findIndex(e=>e.path===y)),W=b(n.session.projectDir),h="cwd";const M=H.box({parent:n.container,top:0,left:0,width:"100%",height:L,border:{type:"line"},label:" Current directory ",tags:!0,style:{border:{fg:"yellow"}},content:""}),g=H.list({parent:n.container,top:L,left:0,width:"52%",height:`100%-${L}`,border:{type:"line"},label:" Registered projects ",tags:!0,keys:!1,mouse:!1,invertSelected:!1,scrollbar:{ch:" "},style:{selected:{bg:"blue"},border:{fg:"cyan"}},items:[]}),T=H.box({parent:n.container,top:L,left:"52%",width:"48%",height:`100%-${L}`,border:{type:"line"},label:" Detail ",tags:!0,scrollable:!0,alwaysScroll:!0,scrollbar:{ch:" "},style:{border:{fg:"cyan"}},content:""});function A(){return a.length===0?void 0:a[(0,c.clamp)(E,0,a.length-1)]}r(A,"selected");function k(e){return(0,m.detectClients)(e).map(t=>t.name).join(", ")}r(k,"detectedNames");function D(e){return e===W||b(e)===W}r(D,"isActive");function x(e){const s=(0,m.isProjectActive)(e)?"{green-fg}\u25CF{/green-fg}":"{red-fg}\u25CB{/red-fg}";return`${D(e.path)?"{yellow-fg}\u2605{/yellow-fg} ":" "}${s} ${(0,c.escapeTags)(u(e.path))} {gray-fg}${(0,c.escapeTags)(k(e.path))}{/gray-fg}`}r(x,"rowLabel");function _(){return{installed:k(o),registered:a.some(e=>e.path===y),active:D(y)}}r(_,"cwdState");function $(e,t){return t?`{bold}${e}{/bold}`:`{gray-fg}${e}{/gray-fg}`}r($,"keyLabel");function ee(){const{installed:e,registered:t,active:s}=_(),i=e.length>0,d=[];d.push(i?`{green-fg}\u25CF installed{/green-fg} {gray-fg}(${(0,c.escapeTags)(e)}){/gray-fg}`:"{gray-fg}\u25CB not installed{/gray-fg}"),d.push(t?"{green-fg}registered{/green-fg}":"{gray-fg}not registered{/gray-fg}"),d.push(s?"{yellow-fg}\u2605 active project{/yellow-fg}":"{gray-fg}not the active project{/gray-fg}");const p=`${$("i install",!i)} ${$("x uninstall",i)} {gray-fg}\xB7{/gray-fg} ${$("a register",!t)} ${$("d unregister",t)} {gray-fg}\xB7{/gray-fg} ${$("c make active",!s)}`,l=[];return l.push(`{bold}${(0,c.escapeTags)(o)}{/bold}`),l.push(d.join(" {gray-fg}\xB7{/gray-fg} ")),l.push(p),l.join(`
2
+ `)}r(ee,"buildCwdPanel");function ne(){const e="{bold}Tab{/bold} switch section {bold}I/X{/bold} all {bold}r{/bold} refresh {bold}Esc/q{/bold}";let t;if(h==="cwd"){const{installed:s,registered:i}=_(),d=s.length>0;t=`{cyan-fg}cwd:{/cyan-fg} ${$("i install",!d)} ${$("x uninstall",d)} ${$("a register",!i)} ${$("d unregister",i)} {bold}c{/bold} make active`}else t="{bold}\u2191/\u2193{/bold} move {bold}Enter{/bold} switch {bold}i{/bold} install {bold}x{/bold} uninstall {bold}d{/bold} unregister";return` ${t} {gray-fg}\u2502{/gray-fg} ${e}`}r(ne,"buildStatus");function te(e){if(e===void 0){const d=k(o).length>0,p=[];return p.push("{gray-fg}No projects registered yet.{/gray-fg}"),p.push(""),p.push("{gray-fg}Use the {/gray-fg}{bold}Current directory{/bold}{gray-fg} panel above:{/gray-fg}"),p.push(d?"{bold}x{/bold} {gray-fg}\u2014 uninstall IronBee from here (removes hooks + guidance){/gray-fg}":"{bold}i{/bold} {gray-fg}\u2014 install IronBee here (writes hooks + guidance, registers it){/gray-fg}"),p.push("{bold}a{/bold} {gray-fg}\u2014 register here only (inventory, no artifact writes){/gray-fg}"),p.join(`
3
+ `)}const t=(0,m.isProjectActive)(e),s=(0,j.getConfigLayerPaths)(e.path),i=[];return i.push(`{bold}${(0,c.escapeTags)(u(e.path))}{/bold}`),i.push("{gray-fg}"+"\u2500".repeat(46)+"{/gray-fg}"),i.push(`{gray-fg}path:{/gray-fg} ${(0,c.escapeTags)(e.path)}`),i.push(`{gray-fg}detected:{/gray-fg} ${(0,c.escapeTags)(k(e.path))||"(none on disk)"}`),i.push(`{gray-fg}added:{/gray-fg} ${(0,c.escapeTags)(e.installedAt)}`),i.push(`{gray-fg}on disk:{/gray-fg} ${t?"{green-fg}detected{/green-fg}":"{red-fg}stale (artifacts not detected){/red-fg}"}`),i.push(""),i.push("{bold}config layers{/bold}"),i.push(` {gray-fg}global {/gray-fg} ${(0,c.escapeTags)(s.global)}`),i.push(` {gray-fg}project{/gray-fg} ${(0,c.escapeTags)(s.project??"-")}`),i.push(` {gray-fg}local {/gray-fg} ${(0,c.escapeTags)(s.local??"-")}`),i.push(""),D(e.path)?(i.push("{yellow-fg}\u2605 active project{/yellow-fg} \u2014 Config / Sessions / Queue target this."),i.push("{gray-fg}c (in the cwd panel) = unselect \u2192 back to the current directory{/gray-fg}")):i.push("{gray-fg}Enter/s = make active (Config / Sessions / Queue switch to it){/gray-fg}"),i.push("{gray-fg}i = install \xB7 x = uninstall (pick a client when >1 registered; runs here, blocking){/gray-fg}"),i.join(`
4
+ `)}r(te,"buildDetail");function V(e,t){const s=e.style;s.border!==void 0&&(s.border.fg=t)}r(V,"setBorderFg");function ie(){const e=h==="cwd";M.setLabel(e?" {yellow-fg}\u25B8 Current directory{/yellow-fg} ":" Current directory "),g.setLabel(e?" Registered projects ":" {yellow-fg}\u25B8 Registered projects{/yellow-fg} "),V(M,e?"yellow":"gray"),V(g,e?"gray":"yellow"),V(T,e?"gray":"cyan");const t=g.style.selected??{};t.bg=e?void 0:"blue",t.fg=void 0}r(ie,"applyFocusStyles");function S(){W=b(n.session.projectDir),n.setStatus(ne()),ie(),M.setContent(ee()),a.length===0?g.setItems(["{gray-fg}(no registered projects){/gray-fg}"]):(g.setItems(a.map(e=>x(e))),g.select((0,c.clamp)(E,0,a.length-1))),T.setContent(te(A())),T.setScroll(0),n.screen.render()}r(S,"render");function O(){h=h==="cwd"?"list":"cwd",S()}r(O,"toggleSection");function I(e){if(a=(0,v.listProjects)(),e!==void 0){const t=a.findIndex(s=>s.path===e);t>=0&&(E=t)}E=(0,c.clamp)(E,0,Math.max(0,a.length-1)),S()}r(I,"refresh");function N(e){a.length!==0&&(E=(0,c.clamp)(E+e,0,a.length-1),S())}r(N,"move");function re(){try{(0,v.upsertProject)(o),I(y),n.session.message(`Registered ${u(o)} in the inventory. Use d to unregister, i to install.`)}catch(e){n.session.message(`Register failed: ${e instanceof Error?e.message:String(e)}`)}}r(re,"registerCwd");function oe(){n.session.confirm(`Unregister ${u(o)}? (inventory only, no files touched)`,e=>{if(e)try{(0,v.removeProject)(o),I()}catch(t){n.session.message(`Unregister failed: ${t instanceof Error?t.message:String(t)}`)}})}r(oe,"unregisterCwd");function se(){if(a.some(e=>e.path===y)){n.session.message(`${u(o)} is already registered \u2014 press d to unregister.`);return}re()}r(se,"cwdRegister");function le(){if(!a.some(e=>e.path===y)){n.session.message(`${u(o)} is not registered \u2014 nothing to unregister.`);return}oe()}r(le,"cwdUnregister");function F(){if(D(y)){n.session.message(`The current directory (${u(o)}) is already the active project.`);return}n.setActiveProject(y);const e=a.findIndex(t=>t.path===y);e>=0&&(E=e),S(),n.session.message(`Active project \u2192 current directory (${u(o)}). Any switched project is unselected.`)}r(F,"setActiveToCwd");function ae(e,t){const s=n.session.silently(()=>(0,f.resolveInstallDefaultMode)(e)),i=[s,...f.ALL_MODES.filter(w=>w!==s)],d=i.map(w=>`${f.MODE_LABELS[w]} \u2014 ${f.MODE_HINTS[w]}`),l=n.session.silently(()=>(0,f.resolveInstallDefaultStrict)(e))?[!0,!1]:[!1,!0],C=l.map(w=>`${f.STRICT_LABELS[w?"true":"false"]} \u2014 ${f.STRICT_HINTS[w?"true":"false"]}`),Y=r(()=>{n.session.pick("Which verification mode?",d,w=>{if(w<0){t("cancel");return}const B=i[w];if(B!=="enforce"){t(B);return}n.session.pick("How strict should verification be? ({cyan-fg}Esc{/cyan-fg} = back)",C,z=>{if(z<0){Y();return}t(B,l[z])})})},"askMode");Y()}r(ae,"chooseMode");function ge(e,t,s){if(t==="monitor"){s(void 0);return}const i=n.session.silently(()=>(0,j.loadConfig)(e)),d=j.ALL_CYCLES.map(l=>`${l} \u2014 ${R.CYCLE_HINTS[l]}`),p=j.ALL_CYCLES.map((l,C)=>(0,j.isCyclePatternsActive)(i,l)?C:-1).filter(l=>l>=0);n.session.pickMulti("Which platforms should require verification?",d,p,l=>{if(l===null){s("cancel");return}s(l.map(C=>j.ALL_CYCLES[C]))})}r(ge,"choosePlatforms");function Q(e,t,s){G(t,i=>{ae(e,(d,p)=>{d!=="cancel"&&ge(e,d,l=>{l!=="cancel"&&n.session.runWithOutput(`Install ${u(e)} (${i.map(C=>C.name).join(", ")})`,()=>{(0,f.applyModeToLayer)(e,"project",d,p),l!==void 0&&(0,K.reconcileCyclesInLayer)(e,"project",l,!0);for(const C of i)C.install(e);(0,v.upsertProject)(e)}).then(()=>I(s))})})})}r(Q,"doInstall");function q(e,t){G("Uninstall which client?",s=>{n.session.confirm(`Uninstall ${s.map(i=>i.name).join(", ")} from ${u(e)}?`,i=>{i&&n.session.runWithOutput(`Uninstall ${u(e)} (${s.map(d=>d.name).join(", ")})`,()=>{const d=new Set(s.map(l=>l.name));for(const l of s)l.uninstall(e);if(!m.REGISTERED_CLIENTS.some(l=>!d.has(l.name)&&l.detect(e))){const l=(0,J.join)(e,".ironbee");(0,U.existsSync)(l)&&(0,U.rmSync)(l,{recursive:!0,force:!0}),(0,v.removeProject)(e)}}).then(()=>I(t))})})}r(q,"doUninstall");function de(){if(k(o).length>0){n.session.message(`${u(o)} is already installed \u2014 press x to uninstall.`);return}Q(o,"Install into the current directory \u2014 which client?",y)}r(de,"cwdInstall");function ce(){if(k(o).length===0){n.session.message(`${u(o)} is not installed \u2014 nothing to uninstall.`);return}q(o,y)}r(ce,"cwdUninstall");function fe(){const e=A();e!==void 0&&(n.setActiveProject(e.path),S(),n.session.message(`Active project \u2192 ${u(e.path)}. Config / Sessions / Queue now target it.`))}r(fe,"switchTo");function ue(){const e=A();e!==void 0&&n.session.confirm(`Unregister ${u(e.path)}? (inventory only, no files touched)`,t=>{if(t)try{(0,v.removeProject)(e.path),I()}catch(s){n.session.message(`Unregister failed: ${s instanceof Error?s.message:String(s)}`)}})}r(ue,"unregisterSelected");function G(e,t){if(m.REGISTERED_CLIENTS.length<=1){t(m.REGISTERED_CLIENTS);return}const s=m.REGISTERED_CLIENTS.map(i=>i.name);n.session.pick(e,["All clients",...s],i=>{i<0||t(i===0?m.REGISTERED_CLIENTS:[m.REGISTERED_CLIENTS[i-1]])})}r(G,"pickClient");function ye(){const e=A();e!==void 0&&Q(e.path,"Install which client?")}r(ye,"installSelected");function pe(){const e=A();e!==void 0&&q(e.path)}r(pe,"uninstallSelected");async function be(){await n.session.runWithOutput("Install \u2014 all registered projects",async()=>{await(0,R.runInstallAll)({})}),I()}r(be,"installAll");function he(){n.session.confirm("Uninstall IronBee from ALL registered projects? (destructive)",e=>{e&&n.session.runWithOutput("Uninstall \u2014 all registered projects",async()=>{await(0,Z.runUninstallAll)({yes:!0})}).then(()=>I())})}return r(he,"uninstallAllFlow"),g.key(["tab"],()=>O()),g.key(["S-tab"],()=>O()),g.key(["up","k"],()=>{h==="list"&&N(-1)}),g.key(["down","j"],()=>{h==="list"&&N(1)}),g.key(["i"],()=>{h==="cwd"?de():ye()}),g.key(["x"],()=>{h==="cwd"?ce():pe()}),g.key(["d"],()=>{h==="cwd"?le():ue()}),g.key(["a"],()=>{h==="cwd"&&se()}),g.key(["c"],()=>{h==="cwd"&&F()}),g.key(["enter","s"],()=>{h==="list"?fe():F()}),g.key(["S-i"],()=>{be()}),g.key(["S-x"],()=>he()),g.key(["r"],()=>I()),S(),g.focus(),n.screen.render(),{unmount(){M.destroy(),g.destroy(),T.destroy()}}}r(ke,"mountProjectsView");const Se={id:"projects",title:"Projects",summary:"Registry \u2014 switch active \xB7 register / unregister \xB7 install / uninstall (+ --all)",mount(n){return ke(n)}};0&&(module.exports={projectsArea});
@@ -0,0 +1,2 @@
1
+ "use strict";var S=Object.create;var g=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty;var i=(e,s)=>g(e,"name",{value:s,configurable:!0});var R=(e,s)=>{for(var n in s)g(e,n,{get:s[n],enumerable:!0})},y=(e,s,n,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of A(s))!F.call(e,o)&&o!==n&&g(e,o,{get:()=>s[o],enumerable:!(l=$(s,o))||l.enumerable});return e};var T=(e,s,n)=>(n=e!=null?S(k(e)):{},y(s||!e||!e.__esModule?g(n,"default",{value:e,enumerable:!0}):n,e)),j=e=>y(g({},"__esModule",{value:!0}),e);var x={};R(x,{scenariosArea:()=>E});module.exports=j(x);var b=T(require("blessed")),a=require("../shell/util"),u=require("../../lib/scenario-staleness");const C=" {bold}\u2191/\u2193{/bold} move {bold}r{/bold} refresh {bold}Esc{/bold} back {bold}q{/bold} quit";function p(e){return e==="fresh"?"{green-fg}fresh{/green-fg}":e==="stale"?"{yellow-fg}stale{/yellow-fg}":"{gray-fg}unknown{/gray-fg}"}i(p,"stateTag");function D(e){const s=e.session.projectDir;let n=(0,u.checkScenarioFreshness)(s),l=0;const o=b.list({parent:e.container,top:0,left:0,width:"55%",height:"100%",border:{type:"line"},label:" Scenarios ",tags:!0,keys:!1,mouse:!1,scrollbar:{ch:" "},style:{selected:{bg:"blue",fg:"white"},border:{fg:"cyan"}},items:[]}),d=b.box({parent:e.container,top:0,left:"55%",width:"45%",height:"100%",border:{type:"line"},label:" Detail ",tags:!0,scrollable:!0,alwaysScroll:!0,scrollbar:{ch:" "},style:{border:{fg:"cyan"}},content:""});function m(r){const t=r.name.length>24?r.name.slice(0,23)+"\u2026":r.name.padEnd(24," ");return`${p(r.state)} ${(0,a.escapeTags)(t)} {gray-fg}[${r.platform}]{/gray-fg}`}i(m,"rowLabel");function v(r){if(r===void 0)return"{gray-fg}No saved scenarios for this project (.ironbee/scenarios/).{/gray-fg}";const t=[];if(t.push(`{bold}${(0,a.escapeTags)(r.name)}{/bold} {gray-fg}[${r.platform}]{/gray-fg}`),t.push("{gray-fg}"+"\u2500".repeat(40)+"{/gray-fg}"),t.push(`{gray-fg}state:{/gray-fg} ${p(r.state)}`),t.push(`{gray-fg}why:{/gray-fg} ${(0,a.escapeTags)(r.reason)}`),t.push(`{gray-fg}commit:{/gray-fg} ${(0,a.escapeTags)(r.commit??"\u2014")}`),t.push(`{gray-fg}live:{/gray-fg} ${r.liveValidated===void 0?"\u2014":String(r.liveValidated)}`),t.push(""),t.push("{bold}covered paths{/bold}"),r.coveredPaths.length===0)t.push(" {gray-fg}(none recorded){/gray-fg}");else for(const c of r.coveredPaths){const w=r.changedCoveredPaths.includes(c);t.push(w?` {yellow-fg}\u2022{/yellow-fg} ${(0,a.escapeTags)(c)} {yellow-fg}(changed){/yellow-fg}`:` {gray-fg}\u2022{/gray-fg} ${(0,a.escapeTags)(c)}`)}return r.state==="stale"&&(t.push(""),t.push("{yellow-fg}Stale.{/yellow-fg} Repair with {bold}/ironbee-sync-scenario{/bold} in your agent,"),t.push("or re-validate via {bold}/ironbee-verify scenario:<name>{/bold}."),t.push("{gray-fg}(the TUI is read-only \u2014 repair needs the agent){/gray-fg}")),t.join(`
2
+ `)}i(v,"buildDetail");function f(){n.length===0?o.setItems(["{gray-fg}(no scenarios){/gray-fg}"]):(o.setItems(n.map(t=>m(t))),o.select((0,a.clamp)(l,0,n.length-1)));const r=n.length===0?void 0:n[(0,a.clamp)(l,0,n.length-1)];d.setContent(v(r)),d.setScroll(0),e.screen.render()}i(f,"render");function h(r){n.length!==0&&(l=(0,a.clamp)(l+r,0,n.length-1),f())}return i(h,"move"),o.key(["up","k"],()=>h(-1)),o.key(["down","j"],()=>h(1)),o.key(["r"],()=>{n=(0,u.checkScenarioFreshness)(s),l=(0,a.clamp)(l,0,Math.max(0,n.length-1)),f()}),e.setStatus(C),f(),o.focus(),e.screen.render(),{unmount(){o.destroy(),d.destroy()}}}i(D,"mountScenariosView");const E={id:"scenarios",title:"Scenarios",summary:"Browse saved scenarios + freshness (fresh / stale / unknown) vs current code",mount(e){return D(e)}};0&&(module.exports={scenariosArea});
@@ -1 +1 @@
1
- "use strict";var m=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var a=(o,r)=>m(o,"name",{value:r,configurable:!0});var l=(o,r)=>{for(var i in r)m(o,i,{get:r[i],enumerable:!0})},x=(o,r,i,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of T(r))!g.call(o,e)&&e!==i&&m(o,e,{get:()=>r[e],enumerable:!(t=c(r,e))||t.enumerable});return o};var b=o=>x(m({},"__esModule",{value:!0}),o);var q={};l(q,{AREAS:()=>d,findArea:()=>j});module.exports=b(q);var f=require("../config/area"),A=require("../import/area"),n=require("../platforms/area"),p=require("../projects/area"),u=require("../queue/area"),s=require("../sessions/area");const d=[f.configArea,n.platformsArea,p.projectsArea,s.sessionsArea,u.queueArea,A.importArea];function j(o){return d.find(r=>r.id===o)}a(j,"findArea");0&&(module.exports={AREAS,findArea});
1
+ "use strict";var m=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var a=(o,r)=>m(o,"name",{value:r,configurable:!0});var x=(o,r)=>{for(var i in r)m(o,i,{get:r[i],enumerable:!0})},b=(o,r,i,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of g(r))!l.call(o,e)&&e!==i&&m(o,e,{get:()=>r[e],enumerable:!(t=T(r,e))||t.enumerable});return o};var j=o=>b(m({},"__esModule",{value:!0}),o);var E={};x(E,{AREAS:()=>d,findArea:()=>q});module.exports=j(E);var f=require("../config/area"),A=require("../import/area"),n=require("../platforms/area"),p=require("../projects/area"),s=require("../queue/area"),u=require("../sessions/area"),c=require("../scenarios/area");const d=[f.configArea,n.platformsArea,p.projectsArea,u.sessionsArea,c.scenariosArea,s.queueArea,A.importArea];function q(o){return d.find(r=>r.id===o)}a(q,"findArea");0&&(module.exports={AREAS,findArea});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ironbee-ai/cli",
3
- "version": "0.28.0",
3
+ "version": "0.30.0",
4
4
  "description": "The CLI for IronBee — Verification and Intelligence Layer for Agentic Development",
5
5
  "main": "dist/index.js",
6
6
  "bin": {