wepscli 0.1.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.
- package/README.md +293 -0
- package/dist/WEPSCLI-shell/agent-runtime.js +824 -0
- package/dist/WEPSCLI-shell/agent-runtime.js.map +1 -0
- package/dist/WEPSCLI-shell/approval-overlay.js +275 -0
- package/dist/WEPSCLI-shell/approval-overlay.js.map +1 -0
- package/dist/WEPSCLI-shell/chat-components.js +760 -0
- package/dist/WEPSCLI-shell/chat-components.js.map +1 -0
- package/dist/WEPSCLI-shell/components.js +850 -0
- package/dist/WEPSCLI-shell/components.js.map +1 -0
- package/dist/WEPSCLI-shell/config-overlays.js +205 -0
- package/dist/WEPSCLI-shell/config-overlays.js.map +1 -0
- package/dist/WEPSCLI-shell/debug-log.js +16 -0
- package/dist/WEPSCLI-shell/debug-log.js.map +1 -0
- package/dist/WEPSCLI-shell/file-change-preview.js +261 -0
- package/dist/WEPSCLI-shell/file-change-preview.js.map +1 -0
- package/dist/WEPSCLI-shell/helpers.js +112 -0
- package/dist/WEPSCLI-shell/helpers.js.map +1 -0
- package/dist/WEPSCLI-shell/index.js +3 -0
- package/dist/WEPSCLI-shell/index.js.map +1 -0
- package/dist/WEPSCLI-shell/provider-add-flow.js +406 -0
- package/dist/WEPSCLI-shell/provider-add-flow.js.map +1 -0
- package/dist/WEPSCLI-shell/run-wepscli-shell.js +21 -0
- package/dist/WEPSCLI-shell/run-wepscli-shell.js.map +1 -0
- package/dist/WEPSCLI-shell/runtime-recovery.js +37 -0
- package/dist/WEPSCLI-shell/runtime-recovery.js.map +1 -0
- package/dist/WEPSCLI-shell/runtime-status.js +66 -0
- package/dist/WEPSCLI-shell/runtime-status.js.map +1 -0
- package/dist/WEPSCLI-shell/shell-app.js +1047 -0
- package/dist/WEPSCLI-shell/shell-app.js.map +1 -0
- package/dist/WEPSCLI-shell/shell-modes.js +77 -0
- package/dist/WEPSCLI-shell/shell-modes.js.map +1 -0
- package/dist/WEPSCLI-shell/slash-commands.js +135 -0
- package/dist/WEPSCLI-shell/slash-commands.js.map +1 -0
- package/dist/WEPSCLI-shell/theme.js +19 -0
- package/dist/WEPSCLI-shell/theme.js.map +1 -0
- package/dist/WEPSCLI-shell/tool-approval.js +85 -0
- package/dist/WEPSCLI-shell/tool-approval.js.map +1 -0
- package/dist/WEPSCLI-shell/tool-diff.js +76 -0
- package/dist/WEPSCLI-shell/tool-diff.js.map +1 -0
- package/dist/WEPSCLI-shell/tool-file-changes.js +268 -0
- package/dist/WEPSCLI-shell/tool-file-changes.js.map +1 -0
- package/dist/WEPSCLI-shell/tool-message-detail.js +138 -0
- package/dist/WEPSCLI-shell/tool-message-detail.js.map +1 -0
- package/dist/WEPSCLI-shell/tool-messages.js +145 -0
- package/dist/WEPSCLI-shell/tool-messages.js.map +1 -0
- package/dist/WEPSCLI-shell/transcript-panel.js +372 -0
- package/dist/WEPSCLI-shell/transcript-panel.js.map +1 -0
- package/dist/WEPSCLI-shell/transcript-state.js +62 -0
- package/dist/WEPSCLI-shell/transcript-state.js.map +1 -0
- package/dist/WEPSCLI-shell/types.js +1 -0
- package/dist/WEPSCLI-shell/types.js.map +1 -0
- package/dist/cli.js +11 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.js +40 -0
- package/dist/config.js.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/main.js +140 -0
- package/dist/main.js.map +1 -0
- package/dist/onboarding/action-screen.js +90 -0
- package/dist/onboarding/action-screen.js.map +1 -0
- package/dist/onboarding/framed-screen.js +35 -0
- package/dist/onboarding/framed-screen.js.map +1 -0
- package/dist/onboarding/onboarding-app.js +312 -0
- package/dist/onboarding/onboarding-app.js.map +1 -0
- package/dist/onboarding/run-onboarding.js +23 -0
- package/dist/onboarding/run-onboarding.js.map +1 -0
- package/dist/onboarding/select-screen.js +21 -0
- package/dist/onboarding/select-screen.js.map +1 -0
- package/dist/onboarding/summary-screen.js +23 -0
- package/dist/onboarding/summary-screen.js.map +1 -0
- package/dist/onboarding/text-input-screen.js +55 -0
- package/dist/onboarding/text-input-screen.js.map +1 -0
- package/dist/onboarding/theme.js +26 -0
- package/dist/onboarding/theme.js.map +1 -0
- package/dist/provider-profiles/api-key-store.js +51 -0
- package/dist/provider-profiles/api-key-store.js.map +1 -0
- package/dist/provider-profiles/defaults.js +18 -0
- package/dist/provider-profiles/defaults.js.map +1 -0
- package/dist/provider-profiles/fetch-models.js +53 -0
- package/dist/provider-profiles/fetch-models.js.map +1 -0
- package/dist/provider-profiles/index.js +6 -0
- package/dist/provider-profiles/index.js.map +1 -0
- package/dist/provider-profiles/provider-profile-service.js +223 -0
- package/dist/provider-profiles/provider-profile-service.js.map +1 -0
- package/dist/provider-profiles/providers-config-store.js +17 -0
- package/dist/provider-profiles/providers-config-store.js.map +1 -0
- package/dist/provider-profiles/types.js +1 -0
- package/dist/provider-profiles/types.js.map +1 -0
- package/dist/session-history/session-history-service.js +142 -0
- package/dist/session-history/session-history-service.js.map +1 -0
- package/dist/shell/animator.js +30 -0
- package/dist/shell/animator.js.map +1 -0
- package/dist/shell/clickables.js +101 -0
- package/dist/shell/clickables.js.map +1 -0
- package/dist/shell/dashboard-shell.js +292 -0
- package/dist/shell/dashboard-shell.js.map +1 -0
- package/dist/shell/index.js +5 -0
- package/dist/shell/index.js.map +1 -0
- package/dist/shell/keymap.js +14 -0
- package/dist/shell/keymap.js.map +1 -0
- package/dist/shell/mouse.js +39 -0
- package/dist/shell/mouse.js.map +1 -0
- package/dist/shell/render.js +122 -0
- package/dist/shell/render.js.map +1 -0
- package/dist/shell/run-shell.js +36 -0
- package/dist/shell/run-shell.js.map +1 -0
- package/dist/shell/theme.js +56 -0
- package/dist/shell/theme.js.map +1 -0
- package/dist/storage/locked-json-file.js +88 -0
- package/dist/storage/locked-json-file.js.map +1 -0
- package/dist/workbench/animator.js +30 -0
- package/dist/workbench/animator.js.map +1 -0
- package/dist/workbench/index.js +6 -0
- package/dist/workbench/index.js.map +1 -0
- package/dist/workbench/mouse.js +39 -0
- package/dist/workbench/mouse.js.map +1 -0
- package/dist/workbench/render.js +82 -0
- package/dist/workbench/render.js.map +1 -0
- package/dist/workbench/renderer.js +364 -0
- package/dist/workbench/renderer.js.map +1 -0
- package/dist/workbench/run-workbench.js +36 -0
- package/dist/workbench/run-workbench.js.map +1 -0
- package/dist/workbench/theme.js +63 -0
- package/dist/workbench/theme.js.map +1 -0
- package/dist/workbench/types.js +1 -0
- package/dist/workbench/types.js.map +1 -0
- package/dist/workbench/workbench-shell.js +649 -0
- package/dist/workbench/workbench-shell.js.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getKeybindings","Input","Key","matchesKey","getAgentDir","WorkbenchAnimator","computeWorkbenchLayout","renderWorkbench","workbenchTheme","WorkbenchShell","composer","timeline","sessions","id","title","summary","state","updatedLabel","profiles","view","focusRegion","railSelectionIndex","mainSelectionIndex","overlaySelectionIndex","toolbarRegions","railRegions","mainRegions","dockRegions","overlayRegions","_focused","constructor","ui","profileService","onExit","animator","reloadProfiles","seedTimeline","onSubmit","value","trimmed","trim","handleComposerCommand","setValue","requestRender","pushTimeline","ensureDraftSession","onEscape","getValue","overlay","closeOverlay","focused","dispose","invalidate","handleInput","data","kb","ctrl","handleOverlayInput","matches","cycleFocus","handleShortcut","handleRailInput","handleMainInput","handleMouseEvent","event","action","handleScroll","isPrimaryMouseActivation","overlayHit","findHit","col","row","activateAction","composerRegion","pointInRect","setFocusRegion","region","group","render","width","animation","getSnapshot","mainCards","getMainCards","overlayOptions","getOverlayOptions","length","Math","min","result","height","terminal","rows","frame","focusPulseActive","showBody","showInspector","showDock","activeProfile","getActiveProfile","activeSelection","getActiveSelection","railItems","getRailItems","sessionsCount","agentDir","renderComposer","innerWidth","styleButton","label","variant","truncateLabel","maxLength","getViewLabel","getFocusLabel","focus","lines","items","markFocusPulse","cards","options","toLowerCase","delta","button","some","actionId","startsWith","setView","slice","openOverlay","startNewSession","activateProvider","activateModel","activateSession","max","findIndex","item","undefined","profileId","profile","find","currentSelection","nextModel","modelId","models","setActiveSelection","sessionId","session","unshift","Date","now","layout","columns","order","showRail","push","currentIndex","indexOf","next","description","selection","map","family","lastValidationStatus","baseUrl","actionLabel","badge","disabled","model","name","message","timestamp","toLocaleTimeString","hour","minute","prompt","listProfiles","accentStrong","accent","muted","success","warning","regions","rect"],"sources":["workbench-shell.ts"],"sourcesContent":["import { type Component, type Focusable, getKeybindings, Input, Key, matchesKey, type TUI } from \"@mariozechner/pi-tui\";\r\nimport { getAgentDir } from \"../config.js\";\r\nimport { type ProviderProfile, ProviderProfileService } from \"../provider-profiles/index.js\";\r\nimport { WorkbenchAnimator } from \"./animator.js\";\r\nimport type { ParsedMouseEvent } from \"./mouse.js\";\r\nimport { computeWorkbenchLayout, type Rect } from \"./render.js\";\r\nimport { renderWorkbench } from \"./renderer.js\";\r\nimport { workbenchTheme } from \"./theme.js\";\r\nimport type { ButtonVariant, ClickRegion, OverlayKind, OverlayOption, RailItem, SessionRecord, WorkbenchCard, WorkbenchFocus, WorkbenchView } from \"./types.js\";\r\n\r\nexport class WorkbenchShell implements Component, Focusable {\r\n\tprivate readonly composer = new Input();\r\n\tprivate readonly animator: WorkbenchAnimator;\r\n\tprivate readonly timeline: string[] = [];\r\n\tprivate readonly sessions: SessionRecord[] = [\r\n\t\t{\r\n\t\t\tid: \"wepscli-shell-rebuild\",\r\n\t\t\ttitle: \"Continue WEPSCLI shell rebuild\",\r\n\t\t\tsummary: \"Track the OpenCode-first workbench rewrite and validate the new control surfaces.\",\r\n\t\t\tstate: \"active\",\r\n\t\t\tupdatedLabel: \"Active now\",\r\n\t\t},\r\n\t\t{\r\n\t\t\tid: \"provider-setup-pass\",\r\n\t\t\ttitle: \"Provider setup sanity pass\",\r\n\t\t\tsummary: \"Keep onboarding stable while the new shell grows around the existing provider runtime.\",\r\n\t\t\tstate: \"recent\",\r\n\t\t\tupdatedLabel: \"Earlier today\",\r\n\t\t},\r\n\t\t{\r\n\t\t\tid: \"visual-affordance-notes\",\r\n\t\t\ttitle: \"Clickable affordance notes\",\r\n\t\t\tsummary: \"Capture which controls still feel like hidden targets and move them to cards, chips, or dialogs.\",\r\n\t\t\tstate: \"ready\",\r\n\t\t\tupdatedLabel: \"Queued\",\r\n\t\t},\r\n\t];\r\n\r\n\tprivate profiles: ProviderProfile[] = [];\r\n\tprivate view: WorkbenchView = \"home\";\r\n\tprivate focusRegion: WorkbenchFocus = \"main\";\r\n\tprivate overlay?: OverlayKind;\r\n\tprivate railSelectionIndex = 0;\r\n\tprivate mainSelectionIndex = 0;\r\n\tprivate overlaySelectionIndex = 0;\r\n\tprivate toolbarRegions: ClickRegion[] = [];\r\n\tprivate railRegions: ClickRegion[] = [];\r\n\tprivate mainRegions: ClickRegion[] = [];\r\n\tprivate dockRegions: ClickRegion[] = [];\r\n\tprivate overlayRegions: ClickRegion[] = [];\r\n\tprivate composerRegion?: Rect;\r\n\tprivate _focused = false;\r\n\r\n\tconstructor(\r\n\t\tprivate readonly ui: TUI,\r\n\t\tprivate readonly profileService: ProviderProfileService,\r\n\t\tprivate readonly onExit: () => void,\r\n\t) {\r\n\t\tthis.animator = new WorkbenchAnimator(ui);\r\n\t\tthis.reloadProfiles();\r\n\t\tthis.seedTimeline();\r\n\r\n\t\tthis.composer.onSubmit = (value) => {\r\n\t\t\tconst trimmed = value.trim();\r\n\t\t\tif (!trimmed) return;\r\n\t\t\tif (this.handleComposerCommand(trimmed)) {\r\n\t\t\t\tthis.composer.setValue(\"\");\r\n\t\t\t\tthis.ui.requestRender();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis.pushTimeline(`Draft queued: ${trimmed}`);\r\n\t\t\tthis.ensureDraftSession(trimmed);\r\n\t\t\tthis.composer.setValue(\"\");\r\n\t\t\tthis.ui.requestRender();\r\n\t\t};\r\n\r\n\t\tthis.composer.onEscape = () => {\r\n\t\t\tif (this.composer.getValue().trim()) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (this.overlay) {\r\n\t\t\t\tthis.closeOverlay();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis.onExit();\r\n\t\t};\r\n\t}\r\n\r\n\tget focused(): boolean {\r\n\t\treturn this._focused;\r\n\t}\r\n\r\n\tset focused(value: boolean) {\r\n\t\tthis._focused = value;\r\n\t\tthis.composer.focused = value && this.focusRegion === \"composer\";\r\n\t}\r\n\r\n\tdispose(): void {\r\n\t\tthis.animator.dispose();\r\n\t}\r\n\r\n\tinvalidate(): void {\r\n\t\tthis.composer.invalidate();\r\n\t}\r\n\r\n\thandleInput(data: string): void {\r\n\t\tconst kb = getKeybindings();\r\n\t\tif (matchesKey(data, Key.ctrl(\"c\"))) {\r\n\t\t\tthis.onExit();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (this.overlay) {\r\n\t\t\tthis.handleOverlayInput(data);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (kb.matches(data, \"tui.input.tab\")) {\r\n\t\t\tthis.cycleFocus();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (this.focusRegion !== \"composer\" && this.handleShortcut(data)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tswitch (this.focusRegion) {\r\n\t\t\tcase \"rail\":\r\n\t\t\t\tthis.handleRailInput(data);\r\n\t\t\t\treturn;\r\n\t\t\tcase \"main\":\r\n\t\t\t\tthis.handleMainInput(data);\r\n\t\t\t\treturn;\r\n\t\t\tcase \"composer\":\r\n\t\t\t\tthis.composer.handleInput(data);\r\n\t\t\t\treturn;\r\n\t\t\tcase \"overlay\":\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\thandleMouseEvent(event: ParsedMouseEvent): boolean {\r\n\t\tif (event.action === \"scroll\") {\r\n\t\t\treturn this.handleScroll(event);\r\n\t\t}\r\n\r\n\t\tif (!this.isPrimaryMouseActivation(event)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this.overlay) {\r\n\t\t\tconst overlayHit = this.findHit(event.col, event.row, this.overlayRegions);\r\n\t\t\tif (!overlayHit) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tthis.focusRegion = \"overlay\";\r\n\t\t\tthis.activateAction(overlayHit.id);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif (this.composerRegion && this.pointInRect(event.col, event.row, this.composerRegion)) {\r\n\t\t\tthis.setFocusRegion(\"composer\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tconst region =\r\n\t\t\tthis.findHit(event.col, event.row, this.toolbarRegions) ??\r\n\t\t\tthis.findHit(event.col, event.row, this.railRegions) ??\r\n\t\t\tthis.findHit(event.col, event.row, this.mainRegions) ??\r\n\t\t\tthis.findHit(event.col, event.row, this.dockRegions);\r\n\r\n\t\tif (!region) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.setFocusRegion(region.group === \"rail\" ? \"rail\" : \"main\");\r\n\t\tthis.activateAction(region.id);\r\n\t\treturn true;\r\n\t}\r\n\r\n\trender(width: number): string[] {\r\n\t\tthis.reloadProfiles();\r\n\t\tconst animation = this.animator.getSnapshot();\r\n\t\tconst mainCards = this.getMainCards();\r\n\t\tconst overlayOptions = this.getOverlayOptions();\r\n\t\tthis.mainSelectionIndex = mainCards.length === 0 ? 0 : Math.min(this.mainSelectionIndex, mainCards.length - 1);\r\n\t\tthis.overlaySelectionIndex = overlayOptions.length === 0 ? 0 : Math.min(this.overlaySelectionIndex, overlayOptions.length - 1);\r\n\r\n\t\tconst result = renderWorkbench({\r\n\t\t\twidth,\r\n\t\t\theight: this.ui.terminal.rows,\r\n\t\t\tview: this.view,\r\n\t\t\tfocusRegion: this.focusRegion,\r\n\t\t\toverlay: this.overlay,\r\n\t\t\trailSelectionIndex: this.railSelectionIndex,\r\n\t\t\tmainSelectionIndex: this.mainSelectionIndex,\r\n\t\t\toverlaySelectionIndex: this.overlaySelectionIndex,\r\n\t\t\tframe: animation.frame,\r\n\t\t\tfocusPulseActive: animation.focusPulseActive,\r\n\t\t\tshowBody: animation.showBody,\r\n\t\t\tshowInspector: animation.showInspector,\r\n\t\t\tshowDock: animation.showDock,\r\n\t\t\tprofiles: this.profiles,\r\n\t\t\tactiveProfile: this.getActiveProfile(),\r\n\t\t\tactiveSelection: this.profileService.getActiveSelection(),\r\n\t\t\trailItems: this.getRailItems(),\r\n\t\t\tmainCards,\r\n\t\t\toverlayOptions,\r\n\t\t\ttimeline: this.timeline,\r\n\t\t\tsessionsCount: this.sessions.length,\r\n\t\t\tagentDir: getAgentDir(),\r\n\t\t\trenderComposer: (innerWidth) => this.composer.render(innerWidth),\r\n\t\t\tstyleButton: (label, variant) => this.styleButton(label, variant),\r\n\t\t\ttruncateLabel: (value, maxLength) => this.truncateLabel(value, maxLength),\r\n\t\t\tgetViewLabel: (view) => this.getViewLabel(view),\r\n\t\t\tgetFocusLabel: (focus) => this.getFocusLabel(focus),\r\n\t\t});\r\n\r\n\t\tthis.toolbarRegions = result.toolbarRegions;\r\n\t\tthis.railRegions = result.railRegions;\r\n\t\tthis.mainRegions = result.mainRegions;\r\n\t\tthis.dockRegions = result.dockRegions;\r\n\t\tthis.overlayRegions = result.overlayRegions;\r\n\t\tthis.composerRegion = result.composerRegion;\r\n\t\treturn result.lines;\r\n\t}\r\n\r\n\tprivate handleRailInput(data: string): void {\r\n\t\tconst kb = getKeybindings();\r\n\t\tconst items = this.getRailItems();\r\n\t\tif (kb.matches(data, \"tui.select.cancel\")) {\r\n\t\t\tthis.setFocusRegion(\"main\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (kb.matches(data, \"tui.select.up\")) {\r\n\t\t\tthis.railSelectionIndex = this.railSelectionIndex <= 0 ? items.length - 1 : this.railSelectionIndex - 1;\r\n\t\t\tthis.animator.markFocusPulse();\r\n\t\t\tthis.ui.requestRender();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (kb.matches(data, \"tui.select.down\")) {\r\n\t\t\tthis.railSelectionIndex = this.railSelectionIndex >= items.length - 1 ? 0 : this.railSelectionIndex + 1;\r\n\t\t\tthis.animator.markFocusPulse();\r\n\t\t\tthis.ui.requestRender();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (kb.matches(data, \"tui.select.confirm\")) {\r\n\t\t\tthis.activateAction(`nav:${items[this.railSelectionIndex]!.id}`);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate handleMainInput(data: string): void {\r\n\t\tconst kb = getKeybindings();\r\n\t\tconst cards = this.getMainCards();\r\n\t\tif (cards.length === 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (kb.matches(data, \"tui.select.cancel\")) {\r\n\t\t\tthis.onExit();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (kb.matches(data, \"tui.select.up\")) {\r\n\t\t\tthis.mainSelectionIndex = this.mainSelectionIndex <= 0 ? cards.length - 1 : this.mainSelectionIndex - 1;\r\n\t\t\tthis.animator.markFocusPulse();\r\n\t\t\tthis.ui.requestRender();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (kb.matches(data, \"tui.select.down\")) {\r\n\t\t\tthis.mainSelectionIndex = this.mainSelectionIndex >= cards.length - 1 ? 0 : this.mainSelectionIndex + 1;\r\n\t\t\tthis.animator.markFocusPulse();\r\n\t\t\tthis.ui.requestRender();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (kb.matches(data, \"tui.select.confirm\")) {\r\n\t\t\tthis.activateAction(cards[this.mainSelectionIndex]!.id);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate handleOverlayInput(data: string): void {\r\n\t\tconst kb = getKeybindings();\r\n\t\tconst options = this.getOverlayOptions();\r\n\t\tif (kb.matches(data, \"tui.select.cancel\")) {\r\n\t\t\tthis.closeOverlay();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (options.length === 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (kb.matches(data, \"tui.select.up\")) {\r\n\t\t\tthis.overlaySelectionIndex = this.overlaySelectionIndex <= 0 ? options.length - 1 : this.overlaySelectionIndex - 1;\r\n\t\t\tthis.animator.markFocusPulse();\r\n\t\t\tthis.ui.requestRender();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (kb.matches(data, \"tui.select.down\")) {\r\n\t\t\tthis.overlaySelectionIndex = this.overlaySelectionIndex >= options.length - 1 ? 0 : this.overlaySelectionIndex + 1;\r\n\t\t\tthis.animator.markFocusPulse();\r\n\t\t\tthis.ui.requestRender();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (kb.matches(data, \"tui.select.confirm\")) {\r\n\t\t\tthis.activateAction(options[this.overlaySelectionIndex]!.id);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate handleShortcut(data: string): boolean {\r\n\t\tif (data.length !== 1) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tswitch (data.toLowerCase()) {\r\n\t\t\tcase \"h\":\r\n\t\t\t\tthis.activateAction(\"nav:home\");\r\n\t\t\t\treturn true;\r\n\t\t\tcase \"p\":\r\n\t\t\t\tthis.activateAction(\"overlay:provider-switch\");\r\n\t\t\t\treturn true;\r\n\t\t\tcase \"m\":\r\n\t\t\t\tthis.activateAction(\"overlay:model-switch\");\r\n\t\t\t\treturn true;\r\n\t\t\tcase \"s\":\r\n\t\t\t\tthis.activateAction(\"overlay:session-list\");\r\n\t\t\t\treturn true;\r\n\t\t\tcase \"n\":\r\n\t\t\t\tthis.activateAction(\"session:new\");\r\n\t\t\t\treturn true;\r\n\t\t\tdefault:\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate handleScroll(event: ParsedMouseEvent): boolean {\r\n\t\tconst delta = event.button === \"wheel-up\" ? -1 : event.button === \"wheel-down\" ? 1 : 0;\r\n\t\tif (delta === 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this.overlay && this.overlayRegions.some((region) => this.pointInRect(event.col, event.row, region))) {\r\n\t\t\tconst options = this.getOverlayOptions();\r\n\t\t\tif (options.length === 0) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tthis.overlaySelectionIndex = (this.overlaySelectionIndex + delta + options.length) % options.length;\r\n\t\t\tthis.ui.requestRender();\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif (this.mainRegions.some((region) => this.pointInRect(event.col, event.row, region))) {\r\n\t\t\tconst cards = this.getMainCards();\r\n\t\t\tif (cards.length === 0) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tthis.mainSelectionIndex = (this.mainSelectionIndex + delta + cards.length) % cards.length;\r\n\t\t\tthis.setFocusRegion(\"main\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tprivate activateAction(actionId: string): void {\r\n\t\tif (actionId === \"focus:composer\") {\r\n\t\t\tthis.setFocusRegion(\"composer\");\r\n\t\t\tthis.pushTimeline(\"Composer focus selected from the dock.\");\r\n\t\t\tthis.ui.requestRender();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (actionId.startsWith(\"nav:\")) {\r\n\t\t\tthis.setView(actionId.slice(4) as WorkbenchView);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (actionId.startsWith(\"overlay:\")) {\r\n\t\t\tthis.openOverlay(actionId.slice(8) as OverlayKind);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (actionId === \"session:new\") {\r\n\t\t\tthis.startNewSession();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (actionId.startsWith(\"provider:\")) {\r\n\t\t\tthis.activateProvider(actionId.slice(9));\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (actionId.startsWith(\"model:\")) {\r\n\t\t\tthis.activateModel(actionId.slice(6));\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (actionId.startsWith(\"session:\")) {\r\n\t\t\tthis.activateSession(actionId.slice(8));\r\n\t\t}\r\n\t}\r\n\r\n\tprivate setView(view: WorkbenchView): void {\r\n\t\tthis.view = view;\r\n\t\tthis.railSelectionIndex = Math.max(0, this.getRailItems().findIndex((item) => item.id === view));\r\n\t\tthis.mainSelectionIndex = 0;\r\n\t\tthis.focusRegion = \"main\";\r\n\t\tthis.composer.focused = false;\r\n\t\tthis.animator.markFocusPulse();\r\n\t\tthis.pushTimeline(`View changed to ${this.getViewLabel(view)}.`);\r\n\t\tthis.ui.requestRender();\r\n\t}\r\n\r\n\tprivate openOverlay(overlay: OverlayKind): void {\r\n\t\tif (overlay === \"model-switch\" && !this.getActiveProfile()) {\r\n\t\t\tthis.pushTimeline(\"Model picker blocked because no provider is active.\");\r\n\t\t\tthis.ui.requestRender();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.overlay = overlay;\r\n\t\tthis.overlaySelectionIndex = 0;\r\n\t\tthis.focusRegion = \"overlay\";\r\n\t\tthis.composer.focused = false;\r\n\t\tthis.animator.markFocusPulse();\r\n\t\tthis.ui.requestRender();\r\n\t}\r\n\r\n\tprivate closeOverlay(): void {\r\n\t\tthis.overlay = undefined;\r\n\t\tthis.setFocusRegion(\"main\");\r\n\t}\r\n\r\n\tprivate activateProvider(profileId: string): void {\r\n\t\tconst profile = this.profiles.find((item) => item.id === profileId);\r\n\t\tif (!profile) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst currentSelection = this.profileService.getActiveSelection();\r\n\t\tconst nextModel = currentSelection.profileId === profile.id ? currentSelection.modelId ?? profile.models[0]?.id : profile.models[0]?.id;\r\n\t\tthis.profileService.setActiveSelection(profile.id, nextModel);\r\n\t\tthis.reloadProfiles();\r\n\t\tthis.pushTimeline(`Active provider switched to ${profile.label}${nextModel ? ` (${nextModel})` : \"\"}.`);\r\n\t\tthis.overlay = undefined;\r\n\t\tthis.view = \"providers\";\r\n\t\tthis.mainSelectionIndex = Math.max(0, this.profiles.findIndex((item) => item.id === profile.id));\r\n\t\tthis.setFocusRegion(\"main\");\r\n\t}\r\n\r\n\tprivate activateModel(modelId: string): void {\r\n\t\tconst profile = this.getActiveProfile();\r\n\t\tif (!profile) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.profileService.setActiveSelection(profile.id, modelId);\r\n\t\tthis.pushTimeline(`Default model switched to ${modelId}.`);\r\n\t\tthis.overlay = undefined;\r\n\t\tthis.setFocusRegion(\"main\");\r\n\t}\r\n\r\n\tprivate activateSession(sessionId: string): void {\r\n\t\tconst session = this.sessions.find((item) => item.id === sessionId);\r\n\t\tif (!session) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.pushTimeline(`Session selected: ${session.title}. Runtime session history wiring is still pending.`);\r\n\t\tthis.overlay = undefined;\r\n\t\tthis.view = \"history\";\r\n\t\tthis.mainSelectionIndex = Math.max(0, this.sessions.findIndex((item) => item.id === sessionId));\r\n\t\tthis.setFocusRegion(\"main\");\r\n\t}\r\n\r\n\tprivate startNewSession(): void {\r\n\t\tconst activeProfile = this.getActiveProfile();\r\n\t\tthis.sessions.unshift({\r\n\t\t\tid: `draft-${Date.now()}`,\r\n\t\t\ttitle: \"New dashboard session\",\r\n\t\t\tsummary: activeProfile ? `Prepared a fresh session surface for ${activeProfile.label}.` : \"Prepared a fresh session surface before provider selection.\",\r\n\t\t\tstate: \"ready\",\r\n\t\t\tupdatedLabel: \"Just now\",\r\n\t\t});\r\n\t\tthis.pushTimeline(\r\n\t\t\tactiveProfile\r\n\t\t\t\t? `New session staged with ${activeProfile.label}.`\r\n\t\t\t\t: \"New session staged. Configure a provider before real execution wiring lands.\",\r\n\t\t);\r\n\t\tthis.view = \"history\";\r\n\t\tthis.mainSelectionIndex = 0;\r\n\t\tthis.setFocusRegion(\"main\");\r\n\t}\r\n\r\n\tprivate cycleFocus(): void {\r\n\t\tif (this.overlay) {\r\n\t\t\tthis.setFocusRegion(\"overlay\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst layout = computeWorkbenchLayout(this.ui.terminal.columns, this.ui.terminal.rows);\r\n\t\tconst order: WorkbenchFocus[] = [];\r\n\t\tif (layout.showRail) {\r\n\t\t\torder.push(\"rail\");\r\n\t\t}\r\n\t\torder.push(\"main\", \"composer\");\r\n\t\tconst currentIndex = order.indexOf(this.focusRegion);\r\n\t\tconst next = order[(currentIndex + 1) % order.length] ?? \"main\";\r\n\t\tthis.setFocusRegion(next);\r\n\t}\r\n\r\n\tprivate setFocusRegion(region: WorkbenchFocus): void {\r\n\t\tthis.focusRegion = region;\r\n\t\tthis.composer.focused = this._focused && region === \"composer\";\r\n\t\tthis.animator.markFocusPulse();\r\n\t\tthis.ui.requestRender();\r\n\t}\r\n\r\n\tprivate getRailItems(): RailItem[] {\r\n\t\treturn [\r\n\t\t\t{ id: \"home\", label: \"Home\", description: \"Dashboard and quick launch cards\" },\r\n\t\t\t{ id: \"providers\", label: \"Providers\", description: \"Explicit provider cards and activation state\" },\r\n\t\t\t{ id: \"history\", label: \"History\", description: \"Recent session placeholders until runtime history is wired\" },\r\n\t\t];\r\n\t}\r\n\r\n\tprivate getMainCards(): WorkbenchCard[] {\r\n\t\tconst activeProfile = this.getActiveProfile();\r\n\t\tconst selection = this.profileService.getActiveSelection();\r\n\r\n\t\tif (this.view === \"providers\") {\r\n\t\t\treturn this.profiles.map((profile) => ({\r\n\t\t\t\tid: `provider:${profile.id}`,\r\n\t\t\t\ttitle: profile.label,\r\n\t\t\t\tdescription: [\r\n\t\t\t\t\t`${profile.family} | ${profile.models.length} cached model${profile.models.length === 1 ? \"\" : \"s\"} | ${profile.lastValidationStatus}`,\r\n\t\t\t\t\tprofile.baseUrl,\r\n\t\t\t\t],\r\n\t\t\t\tactionLabel: selection.profileId === profile.id ? \"Active\" : \"Activate\",\r\n\t\t\t\tvariant: selection.profileId === profile.id ? \"success\" : \"primary\",\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tif (this.view === \"history\") {\r\n\t\t\treturn this.sessions.map((session) => ({\r\n\t\t\t\tid: `session:${session.id}`,\r\n\t\t\t\ttitle: session.title,\r\n\t\t\t\tdescription: [`${session.summary}`, `${session.updatedLabel} | ${session.state}`],\r\n\t\t\t\tactionLabel: session.state === \"active\" ? \"Open\" : \"Resume\",\r\n\t\t\t\tvariant: session.state === \"active\" ? \"success\" : \"primary\",\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\treturn [\r\n\t\t\t{\r\n\t\t\t\tid: \"session:new\",\r\n\t\t\t\ttitle: \"New Session\",\r\n\t\t\t\tdescription: [\r\n\t\t\t\t\tactiveProfile ? `Start a fresh workbench task with ${activeProfile.label}.` : \"Stage a fresh workbench task before full runtime session wiring lands.\",\r\n\t\t\t\t\t\"Explicit cards replace hidden click zones in the main workspace.\",\r\n\t\t\t\t],\r\n\t\t\t\tactionLabel: \"Start\",\r\n\t\t\t\tvariant: \"success\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tid: \"overlay:provider-switch\",\r\n\t\t\t\ttitle: \"Provider Dialog\",\r\n\t\t\t\tdescription: [\r\n\t\t\t\t\tactiveProfile ? `Current provider: ${activeProfile.label}` : \"No active provider selected yet.\",\r\n\t\t\t\t\t\"Open a direct picker to swap endpoints and keep the decision visible.\",\r\n\t\t\t\t],\r\n\t\t\t\tactionLabel: \"Open\",\r\n\t\t\t\tvariant: \"primary\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tid: activeProfile ? \"overlay:model-switch\" : \"nav:providers\",\r\n\t\t\t\ttitle: activeProfile ? \"Model Dialog\" : \"Provider Center\",\r\n\t\t\t\tdescription: [\r\n\t\t\t\t\tactiveProfile ? `Current model: ${selection.modelId ?? activeProfile.models[0]?.id ?? \"none\"}` : \"Open provider cards first so the model picker has a real target.\",\r\n\t\t\t\t\tactiveProfile ? \"Switch the default model through a modal row picker.\" : \"The shell keeps provider setup separate from the main workbench cards.\",\r\n\t\t\t\t],\r\n\t\t\t\tactionLabel: activeProfile ? \"Switch\" : \"Open\",\r\n\t\t\t\tvariant: \"secondary\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tid: \"overlay:session-list\",\r\n\t\t\t\ttitle: \"Resume Session\",\r\n\t\t\t\tdescription: [\r\n\t\t\t\t\t`${this.sessions.length} staged sessions are available in the rebuilt shell.`,\r\n\t\t\t\t\t\"Use the dialog picker now; later this maps to persisted runtime history.\",\r\n\t\t\t\t],\r\n\t\t\t\tactionLabel: \"Browse\",\r\n\t\t\t\tvariant: \"primary\",\r\n\t\t\t},\r\n\t\t];\r\n\t}\r\n\r\n\tprivate getOverlayOptions(): OverlayOption[] {\r\n\t\tif (!this.overlay) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tif (this.overlay === \"provider-switch\") {\r\n\t\t\tconst selection = this.profileService.getActiveSelection();\r\n\t\t\treturn this.profiles.map((profile) => ({\r\n\t\t\t\tid: `provider:${profile.id}`,\r\n\t\t\t\tlabel: profile.label,\r\n\t\t\t\tdescription: `${profile.family} | ${profile.models.length} model${profile.models.length === 1 ? \"\" : \"s\"} | ${this.truncateLabel(profile.baseUrl, 32)}`,\r\n\t\t\t\tbadge: selection.profileId === profile.id ? \"ACTIVE\" : undefined,\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tif (this.overlay === \"model-switch\") {\r\n\t\t\tconst profile = this.getActiveProfile();\r\n\t\t\tconst selection = this.profileService.getActiveSelection();\r\n\t\t\tif (!profile || profile.models.length === 0) {\r\n\t\t\t\treturn [\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tid: \"overlay:model-switch\",\r\n\t\t\t\t\t\tlabel: \"No cached models\",\r\n\t\t\t\t\t\tdescription: \"The active provider has no cached models yet. Re-run onboarding or refresh models later.\",\r\n\t\t\t\t\t\tdisabled: true,\r\n\t\t\t\t\t},\r\n\t\t\t\t];\r\n\t\t\t}\r\n\r\n\t\t\treturn profile.models.map((model) => ({\r\n\t\t\t\tid: `model:${model.id}`,\r\n\t\t\t\tlabel: model.id,\r\n\t\t\t\tdescription: `${model.family} | ${model.name}`,\r\n\t\t\t\tbadge: selection.modelId === model.id ? \"CURRENT\" : undefined,\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\treturn this.sessions.map((session) => ({\r\n\t\t\tid: `session:${session.id}`,\r\n\t\t\tlabel: session.title,\r\n\t\t\tdescription: `${session.summary} | ${session.updatedLabel}`,\r\n\t\t\tbadge: session.state === \"active\" ? \"ACTIVE\" : undefined,\r\n\t\t}));\r\n\t}\r\n\r\n\tprivate getActiveProfile(): ProviderProfile | undefined {\r\n\t\tconst selection = this.profileService.getActiveSelection();\r\n\t\treturn selection.profileId ? this.profiles.find((item) => item.id === selection.profileId) : this.profiles[0];\r\n\t}\r\n\r\n\tprivate seedTimeline(): void {\r\n\t\tthis.timeline.push(\"Workbench rebuild active: explicit cards, chips, and dialogs replace hidden shell hit targets.\");\r\n\t\tthis.timeline.push(\"Onboarding, config, and provider profiles are kept intact from the earlier milestone.\");\r\n\t\tconst activeProfile = this.getActiveProfile();\r\n\t\tif (activeProfile) {\r\n\t\t\tthis.timeline.push(`Current provider foundation loaded from storage: ${activeProfile.label}.`);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate pushTimeline(message: string): void {\r\n\t\tconst timestamp = new Date().toLocaleTimeString(\"en-US\", { hour: \"2-digit\", minute: \"2-digit\" });\r\n\t\tthis.timeline.unshift(`${timestamp} ${message}`);\r\n\t\tif (this.timeline.length > 12) {\r\n\t\t\tthis.timeline.length = 12;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate ensureDraftSession(prompt: string): void {\r\n\t\tthis.sessions.unshift({\r\n\t\t\tid: `draft-${Date.now()}`,\r\n\t\t\ttitle: `Draft: ${this.truncateLabel(prompt, 22)}`,\r\n\t\t\tsummary: \"Composer input captured into the rebuilt workbench timeline while full agent execution wiring is pending.\",\r\n\t\t\tstate: \"ready\",\r\n\t\t\tupdatedLabel: \"Just now\",\r\n\t\t});\r\n\t\tif (this.sessions.length > 8) {\r\n\t\t\tthis.sessions.length = 8;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate handleComposerCommand(value: string): boolean {\r\n\t\tswitch (value) {\r\n\t\t\tcase \"/providers\":\r\n\t\t\t\tthis.openOverlay(\"provider-switch\");\r\n\t\t\t\treturn true;\r\n\t\t\tcase \"/models\":\r\n\t\t\t\tthis.openOverlay(\"model-switch\");\r\n\t\t\t\treturn true;\r\n\t\t\tcase \"/sessions\":\r\n\t\t\t\tthis.openOverlay(\"session-list\");\r\n\t\t\t\treturn true;\r\n\t\t\tcase \"/new\":\r\n\t\t\t\tthis.startNewSession();\r\n\t\t\t\treturn true;\r\n\t\t\tdefault:\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate reloadProfiles(): void {\r\n\t\tthis.profiles = this.profileService.listProfiles();\r\n\t\tconst items = this.getRailItems();\r\n\t\tif (this.railSelectionIndex < 0 || this.railSelectionIndex >= items.length) {\r\n\t\t\tthis.railSelectionIndex = Math.max(0, items.findIndex((item) => item.id === this.view));\r\n\t\t}\r\n\t}\r\n\r\n\tprivate styleButton(label: string, variant: ButtonVariant): string {\r\n\t\tconst button = `[ ${label} ]`;\r\n\t\tswitch (variant) {\r\n\t\t\tcase \"active\":\r\n\t\t\t\treturn workbenchTheme.accentStrong(button);\r\n\t\t\tcase \"primary\":\r\n\t\t\t\treturn workbenchTheme.accent(button);\r\n\t\t\tcase \"secondary\":\r\n\t\t\t\treturn workbenchTheme.muted(button);\r\n\t\t\tcase \"success\":\r\n\t\t\t\treturn workbenchTheme.success(button);\r\n\t\t\tcase \"warning\":\r\n\t\t\t\treturn workbenchTheme.warning(button);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate getViewLabel(view: WorkbenchView): string {\r\n\t\tswitch (view) {\r\n\t\t\tcase \"home\":\r\n\t\t\t\treturn \"Home\";\r\n\t\t\tcase \"providers\":\r\n\t\t\t\treturn \"Providers\";\r\n\t\t\tcase \"history\":\r\n\t\t\t\treturn \"History\";\r\n\t\t}\r\n\t}\r\n\r\n\tprivate getFocusLabel(region: WorkbenchFocus): string {\r\n\t\tswitch (region) {\r\n\t\t\tcase \"rail\":\r\n\t\t\t\treturn \"Left Rail\";\r\n\t\t\tcase \"main\":\r\n\t\t\t\treturn \"Main Workbench\";\r\n\t\t\tcase \"composer\":\r\n\t\t\t\treturn \"Composer\";\r\n\t\t\tcase \"overlay\":\r\n\t\t\t\treturn \"Dialog\";\r\n\t\t}\r\n\t}\r\n\r\n\tprivate truncateLabel(value: string, maxLength: number): string {\r\n\t\treturn value.length <= maxLength ? value : `${value.slice(0, Math.max(0, maxLength - 3))}...`;\r\n\t}\r\n\r\n\tprivate findHit(col: number, row: number, regions: ClickRegion[]): ClickRegion | undefined {\r\n\t\treturn regions.find((region) => this.pointInRect(col, row, region));\r\n\t}\r\n\r\n\tprivate pointInRect(col: number, row: number, rect: Rect | ClickRegion): boolean {\r\n\t\treturn col >= rect.col && col < rect.col + rect.width && row >= rect.row && row < rect.row + rect.height;\r\n\t}\r\n\r\n\tprivate isPrimaryMouseActivation(event: ParsedMouseEvent): boolean {\r\n\t\treturn event.button === \"left\" && (event.action === \"press\" || event.action === \"release\");\r\n\t}\r\n}\r\n"],"mappings":"AAAA,SAAyCA,cAAc,EAAEC,KAAK,EAAEC,GAAG,EAAEC,UAAU,QAAkB,sBAAsB;AACvH,SAASC,WAAW,QAAQ,cAAc;AAE1C,SAASC,iBAAiB,QAAQ,eAAe;AAEjD,SAASC,sBAAsB,QAAmB,aAAa;AAC/D,SAASC,eAAe,QAAQ,eAAe;AAC/C,SAASC,cAAc,QAAQ,YAAY;AAG3C,OAAO,MAAMC,cAAc,CAAiC;EAC1CC,QAAQ,GAAG,IAAIT,KAAK,CAAC,CAAC;EAEtBU,QAAQ,GAAa,EAAE;EACvBC,QAAQ,GAAoB,CAC5C;IACCC,EAAE,EAAE,uBAAuB;IAC3BC,KAAK,E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AgB;MACxB,KAAK,UAAU;QACd,OAAO,UAAU;MAClB,KAAK,SAAS;QACb,OAAO,QAAQ;IACjB;EACD;EAEQmC,aAAaA,CAACzE,KAAa,EAAE0E,SAAiB,EAAU;IAC/D,OAAO1E,KAAK,CAACgD,MAAM,IAAI0B,SAAS,GAAG1E,KAAK,GAAG,GAAGA,KAAK,CAAC0F,KAAK,CAAC,CAAC,EAAEzC,IAAI,CAAC+C,GAAG,CAAC,CAAC,EAAEtB,SAAS,GAAG,CAAC,CAAC,CAAC,KAAK;EAC9F;EAEQ3C,OAAOA,CAACC,GAAW,EAAEC,GAAW,EAAE+G,OAAsB,EAA2B;IAC1F,OAAOA,OAAO,CAAC1C,IAAI,CAAEhE,MAAM,IAAK,IAAI,CAACF,WAAW,CAACJ,GAAG,EAAEC,GAAG,EAAEK,MAAM,CAAC,CAAC;EACpE;EAEQF,WAAWA,CAACJ,GAAW,EAAEC,GAAW,EAAEgH,IAAwB,EAAW;IAChF,OAAOjH,GAAG,IAAIiH,IAAI,CAACjH,GAAG,IAAIA,GAAG,GAAGiH,IAAI,CAACjH,GAAG,GAAGiH,IAAI,CAACxG,KAAK,IAAIR,GAAG,IAAIgH,IAAI,CAAChH,GAAG,IAAIA,GAAG,GAAGgH,IAAI,CAAChH,GAAG,GAAGgH,IAAI,CAAC7F,MAAM;EACzG;EAEQvB,wBAAwBA,CAACH,KAAuB,EAAW;IAClE,OAAOA,KAAK,CAAC2D,MAAM,KAAK,MAAM,KAAK3D,KAAK,CAACC,MAAM,KAAK,OAAO,IAAID,KAAK,CAACC,MAAM,KAAK,SAAS,CAAC;EAC3F;AACD","ignoreList":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "wepscli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A TUI-first coding agent CLI built on top of agents-core",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"wepscli": "dist/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"clean": "shx rm -rf dist",
|
|
17
|
+
"build": "node ./scripts/ensure-runtime-deps.mjs && node ./scripts/build.mjs && shx chmod +x dist/cli.js",
|
|
18
|
+
"dev": "node ./scripts/build.mjs --watch",
|
|
19
|
+
"shell": "node ./dist/cli.js",
|
|
20
|
+
"shell:node": "node ./dist/cli.js",
|
|
21
|
+
"shell:bun": "bun --conditions=browser --preload @opentui/solid/preload ./dist/cli.js",
|
|
22
|
+
"smoke:hello": "bun --conditions=browser --preload @opentui/solid/preload ./smoke/hello.tsx",
|
|
23
|
+
"smoke:panel": "bun --conditions=browser --preload @opentui/solid/preload ./smoke/panel.tsx",
|
|
24
|
+
"smoke:shell-min": "bun --conditions=browser --preload @opentui/solid/preload ./smoke/shell-min.tsx",
|
|
25
|
+
"smoke:approval-flow": "bun ./smoke/approval-flow.ts",
|
|
26
|
+
"smoke:compact-command": "bun ./smoke/compact-command.ts",
|
|
27
|
+
"smoke:interrupt-status": "bun ./smoke/interrupt-status.ts",
|
|
28
|
+
"smoke:mode-layer": "bun ./smoke/mode-layer.ts",
|
|
29
|
+
"smoke:runtime-recovery": "bun ./smoke/runtime-recovery.ts",
|
|
30
|
+
"smoke:slash-common": "bun ./smoke/slash-common.ts",
|
|
31
|
+
"smoke:tool-file-changes": "bun ./smoke/tool-file-changes.ts",
|
|
32
|
+
"smoke:tool-events": "bun ./smoke/tool-events.ts",
|
|
33
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@mariozechner/pi-agent-core": "0.61.1",
|
|
37
|
+
"@mariozechner/pi-ai": "0.61.1",
|
|
38
|
+
"@mariozechner/pi-coding-agent": "0.61.1",
|
|
39
|
+
"@mariozechner/pi-tui": "0.61.1",
|
|
40
|
+
"@opentui/core": "^0.1.87",
|
|
41
|
+
"@opentui/solid": "^0.1.87",
|
|
42
|
+
"chalk": "^5.5.0",
|
|
43
|
+
"diff": "^8.0.2",
|
|
44
|
+
"proper-lockfile": "^4.1.2",
|
|
45
|
+
"solid-js": "^1.9.9",
|
|
46
|
+
"undici": "^7.19.1"
|
|
47
|
+
},
|
|
48
|
+
"keywords": [
|
|
49
|
+
"coding-agent",
|
|
50
|
+
"tui",
|
|
51
|
+
"cli",
|
|
52
|
+
"ai",
|
|
53
|
+
"wepscli"
|
|
54
|
+
],
|
|
55
|
+
"author": "WEPsCodingCLI",
|
|
56
|
+
"license": "MIT",
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">=20.0.0"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@types/node": "^24.3.0",
|
|
62
|
+
"shx": "^0.4.0",
|
|
63
|
+
"typescript": "^5.7.3"
|
|
64
|
+
}
|
|
65
|
+
}
|