@aiworker/web 1.22.0 → 1.22.2
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 +4 -4
- package/bin/cli.js +7 -4
- package/bin/cli.test.js +165 -73
- package/bin/lib/cli-api-target.js +2 -2
- package/bin/lib/cli-args.js +119 -119
- package/bin/lib/cli-lifecycle.js +9 -9
- package/bin/lib/cli-network.js +3 -3
- package/bin/lib/cli-paths.js +3 -3
- package/bin/lib/cli-ports.js +2 -2
- package/bin/lib/cli-process.js +4 -4
- package/bin/lib/cli-startup.js +64 -15
- package/bin/lib/cli-tunnel-profiles.js +1 -1
- package/bin/lib/cli-tunnel-utils.js +2 -2
- package/bin/lib/commands-connect-url.js +19 -19
- package/bin/lib/commands-lifecycle.js +27 -27
- package/bin/lib/commands-logs.js +5 -5
- package/bin/lib/commands-models.js +1 -1
- package/bin/lib/commands-projects.js +1 -1
- package/bin/lib/commands-schedule.js +1 -1
- package/bin/lib/commands-serve.js +29 -29
- package/bin/lib/commands-session.js +1 -1
- package/bin/lib/commands-startup.js +45 -10
- package/bin/lib/commands-status.js +1 -1
- package/bin/lib/commands-tunnel.js +40 -40
- package/bin/lib/commands-update.js +1 -1
- package/bin/lib/commands-update.test.js +6 -6
- package/dist/assets/{CodeMirrorCommentWidgets-B3u7UIcE.js → CodeMirrorCommentWidgets-CSICpWQD.js} +1 -1
- package/dist/assets/{DiffView-DluiRSla.js → DiffView-hDBKesA_.js} +3 -3
- package/dist/assets/DirtyBranchSwitchDialog-C22HdWj4.js +1 -0
- package/dist/assets/FilesView-CdWzeOp9.js +17 -0
- package/dist/assets/GitView-VQQkYuUw.js +6 -0
- package/dist/assets/{JsonTreeView-B0BdZEHG.js → JsonTreeView-6lrhwD3q.js} +1 -1
- package/dist/assets/LinearIssuesView-Ba6Q9569.js +1 -0
- package/dist/assets/{MarkdownImageGallery-ClOvuZxC.js → MarkdownImageGallery-Czv_mhvS.js} +1 -1
- package/dist/assets/MarkdownRendererImpl-BrMcswiy.js +12 -0
- package/dist/assets/{OnboardingScreen-D2DG7K6b.js → OnboardingScreen-ChxQoAkx.js} +1 -1
- package/dist/assets/{PatchDiff-DvfqDql7.js → PatchDiff-BzcZPlOq.js} +1 -1
- package/dist/assets/{PierreDiffViewer-B7m3f0d7.js → PierreDiffViewer-BchBtZlp.js} +2 -2
- package/dist/assets/PlanView-DyDt_nZ_.js +5 -0
- package/dist/assets/SettingsView-BKf5xBsP.js +28 -0
- package/dist/assets/{SettingsWindow-i45U1Cy1.js → SettingsWindow-DDQYaKWQ.js} +1 -1
- package/dist/assets/{ToolOutputDialog-BTwyh5OF.js → ToolOutputDialog-iYF8Y2bz.js} +6 -6
- package/dist/assets/ToolPartDiffPreview-CdjbOVMM.js +8 -0
- package/dist/assets/{VirtualizedFileDiff-DD8lDVej.js → VirtualizedFileDiff-fFFm2QgH.js} +1 -1
- package/dist/assets/{WalkthroughView-egQgxel3.js → WalkthroughView-DOeCsMju.js} +2 -2
- package/dist/assets/{computeVirtualFileMetrics-BMIRgMHv.js → computeVirtualFileMetrics-CzgLum_K.js} +2 -2
- package/dist/assets/{contextPanelEmbeddedChat-C3fjDbdg.js → contextPanelEmbeddedChat-C0ZLAepL.js} +1 -1
- package/dist/assets/{de-C1P6X5Rs.js → de-B5JaA3SA.js} +6 -5
- package/dist/assets/{es-CDgaF1_t.js → es-EPIH88ii.js} +6 -5
- package/dist/assets/{fr-Bgxqvvz_.js → fr-CAMfxUdZ.js} +6 -5
- package/dist/assets/{index-CODwDsU_.js → index-Bl3LSbjn.js} +1 -1
- package/dist/assets/index-DF5kMP-i.js +39 -0
- package/dist/assets/index-Dl3xbAB_.css +1 -0
- package/dist/assets/{isDiffPlainText-BqayB8d3.js → isDiffPlainText-Dx-dB_8l.js} +1 -1
- package/dist/assets/{isFilePlainText-QfoiKJNY.js → isFilePlainText-CWFPwmnU.js} +1 -1
- package/dist/assets/{ja-BDRrEcNP.js → ja-CifOE1VN.js} +7 -6
- package/dist/assets/{ko-Ba8sQV79.js → ko-BBDyAyYQ.js} +7 -6
- package/dist/assets/{main-C5DVOxc6.js → main-DnBAoktx.js} +2 -2
- package/dist/assets/main-MhSaOZoB.js +930 -0
- package/dist/assets/{markdownCore-CZwzz5gw.js → markdownCore-BrBwOOMn.js} +2 -2
- package/dist/assets/{miniChat-DUJ4irZc.js → miniChat-BKyvLseN.js} +2 -2
- package/dist/assets/{mobile-CcaxB0n4.js → mobile-DKjeFgMN.js} +2 -2
- package/dist/assets/{patchFileDiff-yNfWXN4E.js → patchFileDiff-o8ms1me8.js} +1 -1
- package/dist/assets/pl-DgEHYfFM.js +16 -0
- package/dist/assets/{pt-BR-DIs6ElwV.js → pt-BR-DuWHojUw.js} +6 -5
- package/dist/assets/{renderElectronMiniChatApp-BcKLHXKe.js → renderElectronMiniChatApp-CDgBwwCS.js} +2 -2
- package/dist/assets/renderMobileApp-DJIKIK1r.js +25 -0
- package/dist/assets/runtimeEndpointReset-CYJ9O_xX.js +17 -0
- package/dist/assets/{scheduledTasksApi-DLW0mkQK.js → scheduledTasksApi-D8yamh1b.js} +1 -1
- package/dist/assets/{shikiHighlight-DYOWuY65.js → shikiHighlight-TEQCmzW8.js} +1 -1
- package/dist/assets/tr-D5m2yIWL.js +7 -0
- package/dist/assets/{uk-ZrCNjM7Y.js → uk-D_q60oog.js} +6 -5
- package/dist/assets/{useAppFontEffects-CjrntdL0.js → useAppFontEffects-D7sNpuL2.js} +161 -190
- package/dist/assets/useInlineCommentController-Brz_cLcQ.js +2 -0
- package/dist/assets/{useRootScrollLock-BHYPkrLv.js → useRootScrollLock-lXEnWlaU.js} +1 -1
- package/dist/assets/{vendor-codemirror-language-data-DFZik9R2.js → vendor-codemirror-language-data-Dp3KMRQG.js} +2 -2
- package/dist/assets/vendor-zod-CK21ihK-.js +39 -0
- package/dist/assets/{web-components-Bhg83tjf.js → web-components-_mNEMjFY.js} +1 -1
- package/dist/assets/{zh-CN-iv_AV4EC.js → zh-CN-D8QvsVeg.js} +6 -5
- package/dist/assets/{zh-TW-CzEUk38j.js → zh-TW-B9t7rQQO.js} +6 -5
- package/dist/index.html +22 -22
- package/dist/mini-chat.html +7 -7
- package/dist/mobile.html +5 -5
- package/package.json +3 -3
- package/server/index.js +118 -85
- package/server/lib/agent-memory/actions.js +2 -2
- package/server/lib/agent-memory/feature-flag.js +1 -1
- package/server/lib/agent-memory/feature-flag.test.js +8 -8
- package/server/lib/agent-memory/routes.js +2 -2
- package/server/lib/agent-tool/runtime.js +37 -54
- package/server/lib/agent-tool/runtime.test.js +59 -59
- package/server/lib/browser-control/broker.js +3 -3
- package/server/lib/browser-control/broker.test.js +1 -1
- package/server/lib/changelog/update-notes.js +82 -0
- package/server/lib/changelog/update-notes.test.js +59 -0
- package/server/lib/client-auth/remote-clients.test.js +5 -5
- package/server/lib/context-obligatory/runtime.js +7 -7
- package/server/lib/context-obligatory/runtime.test.js +5 -5
- package/server/lib/dev-servers/parse.js +2 -2
- package/server/lib/dev-servers/parse.test.js +2 -2
- package/server/lib/dev-servers/routes.js +1 -1
- package/server/lib/dev-tunnel/DOCUMENTATION.md +13 -4
- package/server/lib/dev-tunnel/client.js +1 -1
- package/server/lib/dev-tunnel/runtime.js +5 -5
- package/server/lib/dev-tunnel/tunnel.test.js +21 -1
- package/server/lib/dictation/local/model-catalog.js +1 -1
- package/server/lib/dictation/local/worker-process.js +2 -2
- package/server/lib/event-stream/directory-ws-bridge.js +1 -1
- package/server/lib/event-stream/global-ws-bridge.js +1 -1
- package/server/lib/event-stream/protocol.test.js +4 -4
- package/server/lib/event-stream/runtime.test.js +6 -6
- package/server/lib/fs/DOCUMENTATION.md +2 -0
- package/server/lib/fs/routes.js +37 -26
- package/server/lib/fs/routes.test.js +98 -21
- package/server/lib/git/DOCUMENTATION.md +3 -1
- package/server/lib/git/identity-storage.js +1 -1
- package/server/lib/git/issue-2746-longpaths.test.js +4 -4
- package/server/lib/git/routes.js +17 -1
- package/server/lib/git/service.js +116 -26
- package/server/lib/git/service.test.js +174 -3
- package/server/lib/github/auth.js +8 -8
- package/server/lib/github/pr-status.js +1 -1
- package/server/lib/github/routes.js +2 -2
- package/server/lib/inherited-env.js +1 -1
- package/server/lib/inherited-env.test.js +2 -2
- package/server/lib/linear/auth.js +8 -8
- package/server/lib/linear/auth.test.js +24 -24
- package/server/lib/linear/issues.test.js +6 -6
- package/server/lib/linear/mapping.test.js +4 -4
- package/server/lib/linear/oauth.js +2 -2
- package/server/lib/linear/oauth.test.js +14 -14
- package/server/lib/linear/routes.js +5 -5
- package/server/lib/linear/routes.test.js +16 -16
- package/server/lib/linear/status-runtime.test.js +9 -9
- package/server/lib/linear/status.js +1 -1
- package/server/lib/linear/status.test.js +15 -15
- package/server/lib/linear/teams.test.js +4 -4
- package/server/lib/magic-prompts/routes.js +2 -2
- package/server/lib/mcp-reconnect/DOCUMENTATION.md +55 -0
- package/server/lib/mcp-reconnect/runtime.js +122 -0
- package/server/lib/mcp-reconnect/runtime.test.js +140 -0
- package/server/lib/message-queue/DOCUMENTATION.md +158 -0
- package/server/lib/message-queue/runtime.js +870 -0
- package/server/lib/message-queue/runtime.test.js +482 -0
- package/server/lib/notifications/apns-runtime.js +17 -17
- package/server/lib/notifications/apns-runtime.test.js +11 -11
- package/server/lib/notifications/emitter-runtime.js +1 -1
- package/server/lib/notifications/emitter-runtime.test.js +1 -1
- package/server/lib/notifications/push-runtime.js +7 -7
- package/server/lib/notifications/routes.js +1 -1
- package/server/lib/notifications/runtime.js +1 -1
- package/server/lib/openchamber-control/action-resolution.test.js +10 -10
- package/server/lib/openchamber-control/actions.js +24 -24
- package/server/lib/openchamber-control/error.js +4 -4
- package/server/lib/openchamber-control/routes.js +2 -2
- package/server/lib/openchamber-control/routes.test.js +5 -5
- package/server/lib/openchamber-control/screenshots.js +1 -1
- package/server/lib/openchamber-control/screenshots.test.js +1 -1
- package/server/lib/openchamber-control/service.js +50 -50
- package/server/lib/openchamber-control/service.test.js +5 -5
- package/server/lib/openchamber-sessions/routes.js +124 -22
- package/server/lib/openchamber-sessions/routes.test.js +99 -11
- package/server/lib/opencode/DOCUMENTATION.md +13 -5
- package/server/lib/opencode/auth.js +1 -1
- package/server/lib/opencode/bootstrap-runtime.js +6 -6
- package/server/lib/opencode/cli-options.js +8 -8
- package/server/lib/opencode/config-paths.test.js +116 -0
- package/server/lib/opencode/core-routes.js +8 -7
- package/server/lib/opencode/core-routes.test.js +11 -11
- package/server/lib/opencode/env-config.js +5 -5
- package/server/lib/opencode/env-config.test.js +7 -7
- package/server/lib/opencode/env-runtime.js +10 -10
- package/server/lib/opencode/env-runtime.test.js +18 -18
- package/server/lib/opencode/feature-routes-runtime.js +17 -12
- package/server/lib/opencode/hmr-state-runtime.js +2 -2
- package/server/lib/opencode/hmr-state-runtime.test.js +1 -1
- package/server/lib/opencode/input-history-scope.js +14 -0
- package/server/lib/opencode/lifecycle.js +8 -8
- package/server/lib/opencode/lifecycle.test.js +4 -4
- package/server/lib/opencode/managed-plugin-config.js +35 -0
- package/server/lib/opencode/managed-process-registry.js +3 -3
- package/server/lib/opencode/mcp-oauth-callback.test.js +2 -2
- package/server/lib/opencode/openchamber-routes.js +15 -15
- package/server/lib/opencode/openchamber-routes.test.js +11 -11
- package/server/lib/opencode/plugins.js +2 -2
- package/server/lib/opencode/plugins.test.js +1 -1
- package/server/lib/opencode/project-icon-routes.js +2 -2
- package/server/lib/opencode/project-icon-routes.test.js +1 -1
- package/server/lib/opencode/providers.js +44 -2
- package/server/lib/opencode/providers.test.js +131 -4
- package/server/lib/opencode/proxy.js +2 -2
- package/server/lib/opencode/pwa-manifest-routes.js +1 -1
- package/server/lib/opencode/restart-session-recovery.test.js +1 -1
- package/server/lib/opencode/routes-upgrade.test.js +4 -4
- package/server/lib/opencode/routes.js +14 -14
- package/server/lib/opencode/server-startup-runtime.js +6 -6
- package/server/lib/opencode/session-runtime.js +3 -3
- package/server/lib/opencode/session-runtime.test.js +6 -6
- package/server/lib/opencode/settings-helpers.js +31 -3
- package/server/lib/opencode/settings-helpers.test.js +189 -12
- package/server/lib/opencode/settings-runtime.js +2 -2
- package/server/lib/opencode/settings-runtime.test.js +29 -0
- package/server/lib/opencode/shared.js +5 -2
- package/server/lib/opencode/shared.test.js +7 -7
- package/server/lib/opencode/shutdown-runtime.js +2 -0
- package/server/lib/opencode/skill-routes.js +2 -1
- package/server/lib/opencode/snippets.js +1 -2
- package/server/lib/opencode/startup-performance.js +1 -1
- package/server/lib/opencode/startup-performance.test.js +6 -6
- package/server/lib/opencode/static-routes-runtime.js +8 -8
- package/server/lib/opencode/static-routes-runtime.test.js +7 -7
- package/server/lib/opencode/upgrade-capability.js +2 -2
- package/server/lib/opencode/upgrade-capability.test.js +3 -3
- package/server/lib/package-manager.js +17 -42
- package/server/lib/package-manager.test.js +19 -19
- package/server/lib/permission-auto-accept/runtime.js +1 -1
- package/server/lib/project-context/routes.js +1 -1
- package/server/lib/projects/project-config.js +2 -2
- package/server/lib/quota/DOCUMENTATION.md +9 -1
- package/server/lib/quota/credentials/providers.js +4 -0
- package/server/lib/quota/credentials/store.js +4 -4
- package/server/lib/quota/credentials/store.test.js +8 -8
- package/server/lib/quota/index.js +1 -0
- package/server/lib/quota/providers/exe-dev.js +75 -0
- package/server/lib/quota/providers/exe-dev.test.js +47 -0
- package/server/lib/quota/providers/hyper.js +118 -0
- package/server/lib/quota/providers/hyper.test.js +126 -0
- package/server/lib/quota/providers/index.js +15 -0
- package/server/lib/quota/providers/ollama-cloud.js +1 -1
- package/server/lib/quota/providers/opencode-go.js +2 -1
- package/server/lib/quota/providers/opencode-go.test.js +9 -5
- package/server/lib/quota/providers/xai.js +1 -1
- package/server/lib/quota/routes.js +2 -0
- package/server/lib/quota/utils/auth.js +1 -1
- package/server/lib/relay/DOCUMENTATION.md +1 -1
- package/server/lib/relay/host-client.js +1 -1
- package/server/lib/relay/host-client.test.js +9 -1
- package/server/lib/relay/host-lock.js +1 -1
- package/server/lib/relay/service.js +5 -5
- package/server/lib/relay/tunnel-host.js +3 -1
- package/server/lib/relay/tunnel-host.test.js +9 -1
- package/server/lib/scheduled-tasks/issue-2710-double-execution.test.js +2 -2
- package/server/lib/scheduled-tasks/routes.js +5 -5
- package/server/lib/scheduled-tasks/service.js +25 -25
- package/server/lib/scheduled-tasks/service.test.js +1 -1
- package/server/lib/security/bind-host.js +4 -4
- package/server/lib/security/bind-host.test.js +1 -1
- package/server/lib/security/request-security.js +11 -5
- package/server/lib/security/request-security.test.js +14 -14
- package/server/lib/session-assist/runtime.js +10 -9
- package/server/lib/session-folders/routes.js +2 -2
- package/server/lib/session-folders/routes.test.js +8 -8
- package/server/lib/session-goal/DOCUMENTATION.md +20 -7
- package/server/lib/session-goal/create.js +4 -2
- package/server/lib/session-goal/create.test.js +1 -1
- package/server/lib/session-goal/objectives.js +4 -4
- package/server/lib/session-goal/routes.js +1 -1
- package/server/lib/session-goal/runtime.js +88 -22
- package/server/lib/session-goal/runtime.test.js +428 -2
- package/server/lib/session-knowledge/runtime.js +11 -11
- package/server/lib/session-knowledge/runtime.test.js +5 -5
- package/server/lib/skills-catalog/DOCUMENTATION.md +1 -1
- package/server/lib/skills-catalog/cache.test.js +2 -2
- package/server/lib/skills-catalog/disk-cache.js +5 -5
- package/server/lib/skills-catalog/github-meta.test.js +2 -2
- package/server/lib/skills-catalog/install.js +3 -2
- package/server/lib/small-model/DOCUMENTATION.md +4 -0
- package/server/lib/small-model/call.js +9 -3
- package/server/lib/small-model/call.test.js +29 -6
- package/server/lib/small-model/index.js +8 -7
- package/server/lib/small-model/index.test.js +1 -1
- package/server/lib/small-model/resolve.js +1 -1
- package/server/lib/small-model/resolve.test.js +1 -1
- package/server/lib/small-model/routes.js +2 -1
- package/server/lib/system-prompt/runtime.js +3 -22
- package/server/lib/system-prompt/runtime.test.js +3 -3
- package/server/lib/terminal/DOCUMENTATION.md +11 -7
- package/server/lib/terminal/runtime.js +180 -26
- package/server/lib/terminal/runtime.test.js +554 -27
- package/server/lib/terminal/shells.js +20 -3
- package/server/lib/terminal/shells.test.js +33 -2
- package/server/lib/tts/base-url.js +3 -3
- package/server/lib/tts/routes.test.js +20 -20
- package/server/lib/ui-auth/ui-auth.js +12 -9
- package/server/lib/ui-auth/ui-auth.test.js +19 -3
- package/server/lib/ui-auth/ui-passkeys.js +7 -7
- package/server/lib/walkthrough/index.js +1 -0
- package/server/lib/walkthrough/jobs.test.js +1 -1
- package/server/lib/walkthrough/language.test.js +1 -1
- package/server/lib/walkthrough/model-settings.js +3 -3
- package/server/lib/walkthrough/model-settings.test.js +1 -1
- package/server/lib/walkthrough/pull-request.test.js +5 -5
- package/server/lib/walkthrough/reproduce-2607.test.js +2 -2
- package/server/lib/walkthrough/routes.test.js +26 -5
- package/server/lib/walkthrough/store.js +3 -3
- package/server/lib/walkthrough/store.test.js +1 -1
- package/server/opencode-proxy.test.js +2 -2
- package/server/proxy-headers.js +1 -1
- package/server/sse-routes.test.js +4 -4
- package/README.md.bak +0 -250
- package/bin/lib/DOCUMENTATION.md.bak +0 -163
- package/dist/assets/CommitSection-SGBCAW0w.js +0 -1
- package/dist/assets/FilesView-Bdq8ppva.js +0 -17
- package/dist/assets/GitView-Znn7VJcP.js +0 -6
- package/dist/assets/LinearIssuesView-jP-hXyac.js +0 -1
- package/dist/assets/MarkdownRendererImpl-Dt9mjTRN.js +0 -12
- package/dist/assets/PlanView-B0F3BtPZ.js +0 -5
- package/dist/assets/SettingsView-BBW-S-gh.js +0 -28
- package/dist/assets/ToolPartDiffPreview-CUNe28U1.js +0 -8
- package/dist/assets/index-C57jT0Sa.css +0 -1
- package/dist/assets/index-DW_E3rnL.js +0 -7
- package/dist/assets/main-Bv5Pkngh.js +0 -928
- package/dist/assets/pl-Dioz29BI.js +0 -15
- package/dist/assets/renderMobileApp-D9yQJy0L.js +0 -25
- package/dist/assets/runtimeEndpointReset-CjhvxLH0.js +0 -16
- package/dist/assets/tr-DFnMlPxY.js +0 -6
- package/dist/assets/useInlineCommentController-CDEuSlPH.js +0 -2
- package/dist/assets/vendor-zod-BLfBSgBh.js +0 -39
- package/server/index.d.ts.bak +0 -39
- package/server/lib/agent-tool/DOCUMENTATION.md.bak +0 -119
- package/server/lib/browser-control/DOCUMENTATION.md.bak +0 -50
- package/server/lib/context-obligatory/DOCUMENTATION.md.bak +0 -19
- package/server/lib/dev-tunnel/DOCUMENTATION.md.bak +0 -57
- package/server/lib/dictation/DOCUMENTATION.md.bak +0 -100
- package/server/lib/event-stream/DOCUMENTATION.md.bak +0 -62
- package/server/lib/fs/DOCUMENTATION.md.bak +0 -47
- package/server/lib/git/DOCUMENTATION.md.bak +0 -193
- package/server/lib/github/DOCUMENTATION.md.bak +0 -183
- package/server/lib/linear/DOCUMENTATION.md.bak +0 -97
- package/server/lib/linear/OAUTH-BROKER-HANDOFF.md.bak +0 -91
- package/server/lib/markdown-image-grants/DOCUMENTATION.md.bak +0 -40
- package/server/lib/notifications/APNS.md.bak +0 -135
- package/server/lib/notifications/DOCUMENTATION.md.bak +0 -138
- package/server/lib/openchamber-control/DOCUMENTATION.md.bak +0 -64
- package/server/lib/opencode/DOCUMENTATION.md.bak +0 -431
- package/server/lib/opencode/managed-process-registry.d.ts.bak +0 -13
- package/server/lib/opencode/provider-env-aliases.d.ts.bak +0 -3
- package/server/lib/permission-auto-accept/DOCUMENTATION.md.bak +0 -34
- package/server/lib/project-context/DOCUMENTATION.md.bak +0 -160
- package/server/lib/quota/DOCUMENTATION.md.bak +0 -123
- package/server/lib/relay/DOCUMENTATION.md.bak +0 -100
- package/server/lib/scheduled-tasks/DOCUMENTATION.md.bak +0 -182
- package/server/lib/session-assist/DOCUMENTATION.md.bak +0 -66
- package/server/lib/session-goal/DOCUMENTATION.md.bak +0 -213
- package/server/lib/session-knowledge/DOCUMENTATION.md.bak +0 -89
- package/server/lib/skills-catalog/DOCUMENTATION.md.bak +0 -151
- package/server/lib/small-model/DOCUMENTATION.md.bak +0 -212
- package/server/lib/system-prompt/DOCUMENTATION.md.bak +0 -36
- package/server/lib/terminal/DOCUMENTATION.md.bak +0 -50
- package/server/lib/text/DOCUMENTATION.md.bak +0 -35
- package/server/lib/tts/DOCUMENTATION.md.bak +0 -147
- package/server/lib/tunnels/DOCUMENTATION.md.bak +0 -21
- package/server/lib/ui-auth/DOCUMENTATION.md.bak +0 -44
- package/server/lib/walkthrough/DOCUMENTATION.md.bak +0 -411
package/bin/lib/cli-args.js
CHANGED
|
@@ -58,7 +58,7 @@ function parseArgs(argv = process.argv.slice(2)) {
|
|
|
58
58
|
const options = {
|
|
59
59
|
port: DEFAULT_PORT,
|
|
60
60
|
host: undefined,
|
|
61
|
-
uiPassword: process.env.
|
|
61
|
+
uiPassword: process.env.AIWORKER_UI_PASSWORD || undefined,
|
|
62
62
|
json: false,
|
|
63
63
|
all: false,
|
|
64
64
|
follow: true,
|
|
@@ -506,10 +506,10 @@ function parseArgs(argv = process.argv.slice(2)) {
|
|
|
506
506
|
// may still pass this when starting a remote server.
|
|
507
507
|
break;
|
|
508
508
|
case 'try-cf-tunnel':
|
|
509
|
-
removedFlagErrors.push('`--try-cf-tunnel` was removed. Use:
|
|
509
|
+
removedFlagErrors.push('`--try-cf-tunnel` was removed. Use: aiworker tunnel start --provider cloudflare --mode quick');
|
|
510
510
|
break;
|
|
511
511
|
case 'tunnel-qr':
|
|
512
|
-
removedFlagErrors.push('`--tunnel-qr` was removed. Use:
|
|
512
|
+
removedFlagErrors.push('`--tunnel-qr` was removed. Use: aiworker tunnel start ... --qr');
|
|
513
513
|
break;
|
|
514
514
|
case 'tunnel-password-url':
|
|
515
515
|
removedFlagErrors.push('`--tunnel-password-url` was removed. Use UI password auth directly after tunnel start.');
|
|
@@ -520,7 +520,7 @@ function parseArgs(argv = process.argv.slice(2)) {
|
|
|
520
520
|
case 'tunnel-token':
|
|
521
521
|
case 'tunnel-hostname':
|
|
522
522
|
case 'tunnel':
|
|
523
|
-
removedFlagErrors.push(`\`--${name}\` was removed from top-level serve flow. Use:
|
|
523
|
+
removedFlagErrors.push(`\`--${name}\` was removed from top-level serve flow. Use: aiworker tunnel start ...`);
|
|
524
524
|
break;
|
|
525
525
|
default:
|
|
526
526
|
if (!long && name.length === 1) {
|
|
@@ -565,10 +565,10 @@ function parseArgs(argv = process.argv.slice(2)) {
|
|
|
565
565
|
|
|
566
566
|
function showHelp() {
|
|
567
567
|
console.log(`
|
|
568
|
-
|
|
568
|
+
AiWorker - Web interface for the OpenCode AI coding agent
|
|
569
569
|
|
|
570
570
|
USAGE:
|
|
571
|
-
|
|
571
|
+
aiworker [COMMAND] [OPTIONS]
|
|
572
572
|
|
|
573
573
|
COMMANDS:
|
|
574
574
|
serve Start the web server (daemon default)
|
|
@@ -576,13 +576,13 @@ COMMANDS:
|
|
|
576
576
|
restart Stop and start the server
|
|
577
577
|
status Show server status
|
|
578
578
|
schedule Manage scheduled tasks
|
|
579
|
-
session Create, inspect, and read
|
|
579
|
+
session Create, inspect, and read AiWorker sessions
|
|
580
580
|
models Show default and favorite models
|
|
581
581
|
projects Show configured projects and IDs
|
|
582
|
-
control Show
|
|
582
|
+
control Show AiWorker control-plane commands
|
|
583
583
|
tunnel Tunnel lifecycle commands
|
|
584
584
|
startup Manage launch at system startup
|
|
585
|
-
logs Tail
|
|
585
|
+
logs Tail AiWorker logs
|
|
586
586
|
connect-url Generate URL/QR for connecting another client
|
|
587
587
|
update Check for and install updates
|
|
588
588
|
|
|
@@ -601,38 +601,38 @@ OPTIONS:
|
|
|
601
601
|
-v, --version Show version
|
|
602
602
|
|
|
603
603
|
ENVIRONMENT:
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
604
|
+
AIWORKER_HOST Bind address (e.g. 0.0.0.0 for all interfaces)
|
|
605
|
+
AIWORKER_UI_PASSWORD Alternative to --ui-password flag
|
|
606
|
+
AIWORKER_API_ONLY Set to true/1 to start API routes only
|
|
607
|
+
AIWORKER_DATA_DIR Override AiWorker data directory
|
|
608
608
|
OPENCODE_HOST External OpenCode server base URL, e.g. http://hostname:4096
|
|
609
609
|
OPENCODE_PORT Port of external OpenCode server to connect to
|
|
610
610
|
OPENCODE_SKIP_START Skip starting OpenCode, use external server
|
|
611
|
-
|
|
611
|
+
AIWORKER_OPENCODE_HOSTNAME Bind hostname for managed OpenCode server (default: 127.0.0.1)
|
|
612
612
|
|
|
613
613
|
EXAMPLES:
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
614
|
+
aiworker # Start in daemon mode on default port 3000 (or free port)
|
|
615
|
+
aiworker --port 8080 # Start on port 8080 (daemon)
|
|
616
|
+
aiworker --lan --port 3002 # Start on LAN at 0.0.0.0:3002
|
|
617
|
+
aiworker serve --foreground # Start in foreground (for systemd Type=simple)
|
|
618
|
+
aiworker connect-url --port 3000 --qr
|
|
619
|
+
aiworker connect-url --server https://openchamber.example.com
|
|
620
|
+
aiworker control # Show control-plane commands for agents/scripts
|
|
621
|
+
aiworker startup enable # Start AiWorker at user login
|
|
622
|
+
aiworker tunnel help # Show tunnel lifecycle help
|
|
623
|
+
aiworker logs # Follow logs for latest running instance
|
|
624
624
|
`);
|
|
625
625
|
}
|
|
626
626
|
|
|
627
627
|
function showControlHelp() {
|
|
628
628
|
console.log(`
|
|
629
|
-
|
|
629
|
+
AiWorker Control Commands
|
|
630
630
|
|
|
631
631
|
USAGE:
|
|
632
|
-
|
|
632
|
+
aiworker <COMMAND> [OPTIONS]
|
|
633
633
|
|
|
634
634
|
COMMANDS:
|
|
635
|
-
status Show running
|
|
635
|
+
status Show running AiWorker runtimes
|
|
636
636
|
session Create, inspect, and read sessions
|
|
637
637
|
models Show default and favorite models
|
|
638
638
|
projects Show configured projects and IDs
|
|
@@ -641,34 +641,34 @@ COMMANDS:
|
|
|
641
641
|
logs Tail logs for CLI-managed runtimes
|
|
642
642
|
|
|
643
643
|
DETAILED HELP:
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
644
|
+
aiworker session --help Show session creation, status, and message options
|
|
645
|
+
aiworker models --help Show model defaults and favorites help
|
|
646
|
+
aiworker projects --help Show project list help
|
|
647
|
+
aiworker schedule --help Show scheduled task actions and schedule options
|
|
648
|
+
aiworker tunnel help Show tunnel lifecycle/status commands
|
|
649
|
+
aiworker status --help Show runtime status options
|
|
650
650
|
|
|
651
651
|
COMMON OPTIONS:
|
|
652
652
|
--json Output machine-readable JSON
|
|
653
653
|
-q, --quiet Print minimal output
|
|
654
|
-
-p, --port <port> Target a specific
|
|
654
|
+
-p, --port <port> Target a specific AiWorker runtime
|
|
655
655
|
--ui-password <password> Authenticate to a password-protected runtime
|
|
656
656
|
|
|
657
657
|
EXAMPLES:
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
658
|
+
aiworker status
|
|
659
|
+
aiworker models
|
|
660
|
+
aiworker projects
|
|
661
|
+
aiworker session --help
|
|
662
|
+
aiworker schedule --help
|
|
663
663
|
`);
|
|
664
664
|
}
|
|
665
665
|
|
|
666
666
|
function showStartupHelp() {
|
|
667
667
|
console.log(`
|
|
668
|
-
|
|
668
|
+
AiWorker Startup Commands
|
|
669
669
|
|
|
670
670
|
USAGE:
|
|
671
|
-
|
|
671
|
+
aiworker startup <SUBCOMMAND> [OPTIONS]
|
|
672
672
|
|
|
673
673
|
SUBCOMMANDS:
|
|
674
674
|
status Show startup integration status
|
|
@@ -685,23 +685,23 @@ OPTIONS:
|
|
|
685
685
|
-q, --quiet Suppress non-essential output
|
|
686
686
|
|
|
687
687
|
EXAMPLES:
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
688
|
+
aiworker startup enable
|
|
689
|
+
aiworker startup enable --port 3000
|
|
690
|
+
aiworker startup enable --port 3000 --api-only --host 0.0.0.0
|
|
691
|
+
aiworker startup status --json
|
|
692
692
|
`);
|
|
693
693
|
}
|
|
694
694
|
|
|
695
695
|
function showConnectUrlHelp() {
|
|
696
696
|
console.log(`
|
|
697
|
-
|
|
697
|
+
AiWorker Connect URL
|
|
698
698
|
|
|
699
699
|
USAGE:
|
|
700
|
-
|
|
700
|
+
aiworker connect-url [OPTIONS]
|
|
701
701
|
|
|
702
702
|
DESCRIPTION:
|
|
703
|
-
Generate an
|
|
704
|
-
|
|
703
|
+
Generate an aiworker:// connection link for adding this server to another
|
|
704
|
+
AiWorker app. If no server is running on the selected port, it starts one.
|
|
705
705
|
|
|
706
706
|
OPTIONS:
|
|
707
707
|
-p, --port <port> Server port to use or start (default: ${DEFAULT_PORT})
|
|
@@ -714,7 +714,7 @@ OPTIONS:
|
|
|
714
714
|
so the link works away from the local network. The
|
|
715
715
|
device prefers the direct connection when reachable;
|
|
716
716
|
the instance brings the relay up on its own. Set
|
|
717
|
-
|
|
717
|
+
AIWORKER_RELAY_URL to use a self-hosted relay.
|
|
718
718
|
--name <label> Label saved with the remote client token
|
|
719
719
|
--ui-password <value> Protect browser access when UI routes are enabled
|
|
720
720
|
--api-only Start in headless/API-only mode when starting
|
|
@@ -724,10 +724,10 @@ OPTIONS:
|
|
|
724
724
|
-h, --help Show this help
|
|
725
725
|
|
|
726
726
|
EXAMPLES:
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
727
|
+
aiworker connect-url --port 3000 --qr
|
|
728
|
+
aiworker connect-url --port 3000 --api-only --lan --server http://workstation.local:3000 --qr
|
|
729
|
+
aiworker connect-url --server https://openchamber.example.com --name Workstation
|
|
730
|
+
aiworker connect-url --relay --name "My laptop"
|
|
731
731
|
`);
|
|
732
732
|
}
|
|
733
733
|
|
|
@@ -736,7 +736,7 @@ function showTunnelHelp() {
|
|
|
736
736
|
Tunnel Lifecycle Commands
|
|
737
737
|
|
|
738
738
|
USAGE:
|
|
739
|
-
|
|
739
|
+
aiworker tunnel <SUBCOMMAND> [OPTIONS]
|
|
740
740
|
|
|
741
741
|
SUBCOMMANDS:
|
|
742
742
|
help Show this tunnel help
|
|
@@ -749,7 +749,7 @@ SUBCOMMANDS:
|
|
|
749
749
|
profile Manage saved managed-remote profiles
|
|
750
750
|
|
|
751
751
|
COMMON OPTIONS:
|
|
752
|
-
-p, --port Target
|
|
752
|
+
-p, --port Target AiWorker instance port
|
|
753
753
|
--host Bind address when auto-starting an instance
|
|
754
754
|
--lan Bind to 0.0.0.0 when auto-starting an instance
|
|
755
755
|
--ui-password [password] Protect browser UI when auto-starting an instance (generates one when omitted)
|
|
@@ -779,36 +779,36 @@ OUTPUT OPTIONS:
|
|
|
779
779
|
--json Output machine-readable JSON
|
|
780
780
|
|
|
781
781
|
BEHAVIOR NOTES:
|
|
782
|
-
- One active tunnel per
|
|
782
|
+
- One active tunnel per AiWorker instance.
|
|
783
783
|
- Starting a different mode/provider replaces the current tunnel and revokes old connect links/sessions.
|
|
784
784
|
- Connect links are one-time; generating a new link revokes the previous unused link.
|
|
785
785
|
|
|
786
786
|
PROFILE USAGE:
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
787
|
+
aiworker tunnel profile list [--provider <id>] [--json]
|
|
788
|
+
aiworker tunnel profile show --name <name> [--provider <id>] [--json]
|
|
789
|
+
aiworker tunnel profile add --provider <id> --mode managed-remote --name <name> --hostname <host> --token <token> [--force] [--json]
|
|
790
|
+
aiworker tunnel profile add --provider <id> --mode managed-remote --name <name> --hostname <host> --token-file <path> [--force] [--json]
|
|
791
|
+
aiworker tunnel profile remove --name <name> [--provider <id>] [--json]
|
|
792
792
|
|
|
793
793
|
SHELL COMPLETION:
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
794
|
+
aiworker tunnel completion bash Generate Bash completion script
|
|
795
|
+
aiworker tunnel completion zsh Generate Zsh completion script
|
|
796
|
+
aiworker tunnel completion fish Generate Fish completion script
|
|
797
797
|
|
|
798
798
|
EXAMPLES:
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
echo "$TOKEN" |
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
799
|
+
aiworker tunnel providers
|
|
800
|
+
aiworker tunnel ready --provider cloudflare
|
|
801
|
+
aiworker tunnel doctor --provider cloudflare
|
|
802
|
+
aiworker tunnel status
|
|
803
|
+
aiworker tunnel start --qr
|
|
804
|
+
aiworker tunnel start --profile prod-main
|
|
805
|
+
aiworker tunnel start --provider cloudflare --mode managed-remote --token-file ~/.secrets/cf-token --hostname app.example.com
|
|
806
|
+
aiworker tunnel start --provider cloudflare --mode managed-local --config ~/.cloudflared/config.yml
|
|
807
|
+
aiworker tunnel start --dry-run --provider cloudflare --mode managed-remote --token-file ~/.secrets/cf-token --hostname app.example.com
|
|
808
|
+
echo "$TOKEN" | aiworker tunnel profile add --provider cloudflare --mode managed-remote --name prod-main --hostname app.example.com --token-stdin
|
|
809
|
+
aiworker tunnel profile list --provider cloudflare
|
|
810
|
+
aiworker tunnel profile list --json --show-secrets
|
|
811
|
+
aiworker tunnel stop --port 3000
|
|
812
812
|
`);
|
|
813
813
|
}
|
|
814
814
|
|
|
@@ -816,9 +816,9 @@ function generateCompletionScript(shell) {
|
|
|
816
816
|
const normalized = typeof shell === 'string' ? shell.trim().toLowerCase() : '';
|
|
817
817
|
|
|
818
818
|
if (normalized === 'bash') {
|
|
819
|
-
return `# Bash completion for
|
|
820
|
-
# Add to ~/.bashrc: eval "$(
|
|
821
|
-
|
|
819
|
+
return `# Bash completion for aiworker tunnel
|
|
820
|
+
# Add to ~/.bashrc: eval "$(aiworker tunnel completion bash)"
|
|
821
|
+
_aiworker_tunnel() {
|
|
822
822
|
local cur prev commands tunnel_commands profile_commands common_flags start_flags
|
|
823
823
|
COMPREPLY=()
|
|
824
824
|
cur="\${COMP_WORDS[COMP_CWORD]}"
|
|
@@ -859,16 +859,16 @@ _openchamber_tunnel() {
|
|
|
859
859
|
COMPREPLY=( $(compgen -W "\${common_flags}" -- "\${cur}") )
|
|
860
860
|
return 0
|
|
861
861
|
}
|
|
862
|
-
complete -F
|
|
862
|
+
complete -F _aiworker_tunnel aiworker
|
|
863
863
|
`;
|
|
864
864
|
}
|
|
865
865
|
|
|
866
866
|
if (normalized === 'zsh') {
|
|
867
|
-
return `#compdef
|
|
868
|
-
# Zsh completion for
|
|
869
|
-
# Add to ~/.zshrc: eval "$(
|
|
867
|
+
return `#compdef aiworker
|
|
868
|
+
# Zsh completion for aiworker tunnel
|
|
869
|
+
# Add to ~/.zshrc: eval "$(aiworker tunnel completion zsh)"
|
|
870
870
|
|
|
871
|
-
|
|
871
|
+
_aiworker() {
|
|
872
872
|
local -a commands tunnel_commands profile_commands
|
|
873
873
|
|
|
874
874
|
commands=(
|
|
@@ -881,7 +881,7 @@ _openchamber() {
|
|
|
881
881
|
'models:Show default and favorite models'
|
|
882
882
|
'projects:Show configured projects and IDs'
|
|
883
883
|
'tunnel:Tunnel lifecycle commands'
|
|
884
|
-
'logs:Tail
|
|
884
|
+
'logs:Tail AiWorker logs'
|
|
885
885
|
'update:Check for and install updates'
|
|
886
886
|
)
|
|
887
887
|
|
|
@@ -928,44 +928,44 @@ _openchamber() {
|
|
|
928
928
|
esac
|
|
929
929
|
}
|
|
930
930
|
|
|
931
|
-
compdef
|
|
931
|
+
compdef _aiworker aiworker
|
|
932
932
|
`;
|
|
933
933
|
}
|
|
934
934
|
|
|
935
935
|
if (normalized === 'fish') {
|
|
936
|
-
return `# Fish completion for
|
|
936
|
+
return `# Fish completion for aiworker tunnel
|
|
937
937
|
# Save to ~/.config/fish/completions/openchamber.fish
|
|
938
938
|
|
|
939
|
-
complete -c
|
|
940
|
-
complete -c
|
|
941
|
-
complete -c
|
|
942
|
-
complete -c
|
|
943
|
-
complete -c
|
|
944
|
-
complete -c
|
|
945
|
-
complete -c
|
|
946
|
-
complete -c
|
|
947
|
-
complete -c
|
|
948
|
-
|
|
949
|
-
complete -c
|
|
950
|
-
complete -c
|
|
951
|
-
complete -c
|
|
952
|
-
complete -c
|
|
953
|
-
complete -c
|
|
954
|
-
complete -c
|
|
955
|
-
complete -c
|
|
956
|
-
complete -c
|
|
957
|
-
complete -c
|
|
958
|
-
|
|
959
|
-
complete -c
|
|
960
|
-
complete -c
|
|
961
|
-
complete -c
|
|
962
|
-
complete -c
|
|
963
|
-
complete -c
|
|
964
|
-
complete -c
|
|
965
|
-
complete -c
|
|
966
|
-
complete -c
|
|
967
|
-
complete -c
|
|
968
|
-
complete -c
|
|
939
|
+
complete -c aiworker -n '__fish_use_subcommand' -a 'serve' -d 'Start the web server'
|
|
940
|
+
complete -c aiworker -n '__fish_seen_subcommand_from serve' -l foreground -d 'Run in foreground (for systemd/process managers)'
|
|
941
|
+
complete -c aiworker -n '__fish_seen_subcommand_from serve' -l no-daemon -d 'Run in foreground (alias for --foreground)'
|
|
942
|
+
complete -c aiworker -n '__fish_use_subcommand' -a 'stop' -d 'Stop running instance(s)'
|
|
943
|
+
complete -c aiworker -n '__fish_use_subcommand' -a 'restart' -d 'Stop and start the server'
|
|
944
|
+
complete -c aiworker -n '__fish_use_subcommand' -a 'status' -d 'Show server status'
|
|
945
|
+
complete -c aiworker -n '__fish_use_subcommand' -a 'tunnel' -d 'Tunnel lifecycle commands'
|
|
946
|
+
complete -c aiworker -n '__fish_use_subcommand' -a 'logs' -d 'Tail logs'
|
|
947
|
+
complete -c aiworker -n '__fish_use_subcommand' -a 'update' -d 'Check for updates'
|
|
948
|
+
|
|
949
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and not __fish_seen_subcommand_from help providers ready doctor status start stop profile completion' -a 'help' -d 'Show tunnel help'
|
|
950
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and not __fish_seen_subcommand_from help providers ready doctor status start stop profile completion' -a 'providers' -d 'Show providers'
|
|
951
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and not __fish_seen_subcommand_from help providers ready doctor status start stop profile completion' -a 'ready' -d 'Check readiness'
|
|
952
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and not __fish_seen_subcommand_from help providers ready doctor status start stop profile completion' -a 'doctor' -d 'Run diagnostics'
|
|
953
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and not __fish_seen_subcommand_from help providers ready doctor status start stop profile completion' -a 'status' -d 'Show tunnel status'
|
|
954
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and not __fish_seen_subcommand_from help providers ready doctor status start stop profile completion' -a 'start' -d 'Start a tunnel'
|
|
955
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and not __fish_seen_subcommand_from help providers ready doctor status start stop profile completion' -a 'stop' -d 'Stop tunnel'
|
|
956
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and not __fish_seen_subcommand_from help providers ready doctor status start stop profile completion' -a 'profile' -d 'Manage profiles'
|
|
957
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and not __fish_seen_subcommand_from help providers ready doctor status start stop profile completion' -a 'completion' -d 'Generate completions'
|
|
958
|
+
|
|
959
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and __fish_seen_subcommand_from start' -l provider -d 'Provider id'
|
|
960
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and __fish_seen_subcommand_from start' -l mode -d 'Tunnel mode'
|
|
961
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and __fish_seen_subcommand_from start' -l profile -d 'Profile name'
|
|
962
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and __fish_seen_subcommand_from start' -l config -d 'Config path'
|
|
963
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and __fish_seen_subcommand_from start' -l token -d 'Token'
|
|
964
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and __fish_seen_subcommand_from start' -l token-file -d 'Token file path'
|
|
965
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and __fish_seen_subcommand_from start' -l token-stdin -d 'Read token from stdin'
|
|
966
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and __fish_seen_subcommand_from start' -l hostname -d 'Hostname'
|
|
967
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and __fish_seen_subcommand_from start' -l dry-run -d 'Validate without applying'
|
|
968
|
+
complete -c aiworker -n '__fish_seen_subcommand_from tunnel; and __fish_seen_subcommand_from start' -l qr -d 'Show QR code'
|
|
969
969
|
`;
|
|
970
970
|
}
|
|
971
971
|
|
package/bin/lib/cli-lifecycle.js
CHANGED
|
@@ -112,7 +112,7 @@ async function resolveDoctorPortStatuses(options = {}) {
|
|
|
112
112
|
available: false,
|
|
113
113
|
status: 'warning',
|
|
114
114
|
line: `port ${requestedPort} not available (desktop runtime)`,
|
|
115
|
-
detail: 'Use a CLI instance port from `
|
|
115
|
+
detail: 'Use a CLI instance port from `aiworker serve` for tunneling.',
|
|
116
116
|
});
|
|
117
117
|
return { statuses, availableEntries: [] };
|
|
118
118
|
}
|
|
@@ -122,7 +122,7 @@ async function resolveDoctorPortStatuses(options = {}) {
|
|
|
122
122
|
available: false,
|
|
123
123
|
status: 'error',
|
|
124
124
|
line: `port ${requestedPort} not available (no running instance)`,
|
|
125
|
-
detail: `Start one with \`
|
|
125
|
+
detail: `Start one with \`aiworker serve --port ${requestedPort}\`.`,
|
|
126
126
|
});
|
|
127
127
|
return { statuses, availableEntries: [] };
|
|
128
128
|
}
|
|
@@ -143,7 +143,7 @@ async function resolveDoctorPortStatuses(options = {}) {
|
|
|
143
143
|
available: false,
|
|
144
144
|
status: 'warning',
|
|
145
145
|
line: `port ${desktopEntry.port} not available (desktop runtime)`,
|
|
146
|
-
detail: 'Use a CLI instance port from `
|
|
146
|
+
detail: 'Use a CLI instance port from `aiworker serve` for tunneling.',
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
|
|
@@ -153,7 +153,7 @@ async function resolveDoctorPortStatuses(options = {}) {
|
|
|
153
153
|
available: false,
|
|
154
154
|
status: 'warning',
|
|
155
155
|
line: 'no CLI ports available for tunneling',
|
|
156
|
-
detail: 'Start one with `
|
|
156
|
+
detail: 'Start one with `aiworker serve`.',
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
|
|
@@ -191,8 +191,8 @@ async function discoverRunningInstances(options = {}) {
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
// A live PID-file is only the right instance if the recorded port also
|
|
194
|
-
// confirms
|
|
195
|
-
// from another
|
|
194
|
+
// confirms AiWorker. Cmdline identity alone can match a recycled PID
|
|
195
|
+
// from another AiWorker process on a different port. Try all plausible
|
|
196
196
|
// hosts first; if matched/unknown identity still can't be confirmed, keep
|
|
197
197
|
// the registry files but don't claim the instance is running.
|
|
198
198
|
const { info: liveInfo, host: confirmedHost } = await fetchSystemInfoFromPortCandidates(
|
|
@@ -247,7 +247,7 @@ async function discoverRunningInstances(options = {}) {
|
|
|
247
247
|
return instances;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
async function
|
|
250
|
+
async function discoverAiWorkerInstanceOnPort(port, options = {}) {
|
|
251
251
|
if (!Number.isFinite(port) || port <= 0) return null;
|
|
252
252
|
const runningInstances = Array.isArray(options.runningInstances)
|
|
253
253
|
? options.runningInstances
|
|
@@ -273,7 +273,7 @@ async function discoverLifecycleInstances(options = {}, deps = {}) {
|
|
|
273
273
|
}
|
|
274
274
|
const found = runningInstances.find((entry) => entry.port === options.port);
|
|
275
275
|
if (found) return [found];
|
|
276
|
-
const liveInstance = await
|
|
276
|
+
const liveInstance = await discoverAiWorkerInstanceOnPort(options.port, {
|
|
277
277
|
...deps,
|
|
278
278
|
host: options.host,
|
|
279
279
|
runningInstances,
|
|
@@ -410,7 +410,7 @@ async function resolveTunnelProviders(options = {}, deps = {}) {
|
|
|
410
410
|
export {
|
|
411
411
|
resolveDoctorPortStatuses,
|
|
412
412
|
discoverRunningInstances,
|
|
413
|
-
|
|
413
|
+
discoverAiWorkerInstanceOnPort,
|
|
414
414
|
discoverLifecycleInstances,
|
|
415
415
|
discoverUnconfirmedRegistryInstanceOnPort,
|
|
416
416
|
getLatestInstance,
|
package/bin/lib/cli-network.js
CHANGED
|
@@ -26,8 +26,8 @@ function isUnsafeBrowserPort(port) {
|
|
|
26
26
|
function resolveConfiguredBindHost(hostOverride) {
|
|
27
27
|
const configured = typeof hostOverride === 'string' && hostOverride.trim()
|
|
28
28
|
? hostOverride.trim()
|
|
29
|
-
: typeof process.env.
|
|
30
|
-
? process.env.
|
|
29
|
+
: typeof process.env.AIWORKER_HOST === 'string'
|
|
30
|
+
? process.env.AIWORKER_HOST.trim()
|
|
31
31
|
: '';
|
|
32
32
|
return configured || '127.0.0.1';
|
|
33
33
|
}
|
|
@@ -108,7 +108,7 @@ async function detectLanIPv4Address() {
|
|
|
108
108
|
|
|
109
109
|
|
|
110
110
|
function formatUnsafePortWarning(port) {
|
|
111
|
-
return `Port ${port} is browser-unsafe (ERR_UNSAFE_PORT) and is not supported for
|
|
111
|
+
return `Port ${port} is browser-unsafe (ERR_UNSAFE_PORT) and is not supported for AiWorker UI at ${buildLocalUrl(port, '/')}.`;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
function assertSafeBrowserPort(port, { context = 'This action' } = {}) {
|
package/bin/lib/cli-paths.js
CHANGED
|
@@ -7,10 +7,10 @@ const LEGACY_CLOUDFLARE_MANAGED_REMOTE_FILE_NAME = 'cloudflare-managed-remote-tu
|
|
|
7
7
|
const TUNNEL_CLI_STATE_FILE_NAME = 'tunnel-cli-state.json';
|
|
8
8
|
|
|
9
9
|
function getDataDir() {
|
|
10
|
-
if (typeof process.env.
|
|
11
|
-
return path.resolve(process.env.
|
|
10
|
+
if (typeof process.env.AIWORKER_DATA_DIR === 'string' && process.env.AIWORKER_DATA_DIR.trim().length > 0) {
|
|
11
|
+
return path.resolve(process.env.AIWORKER_DATA_DIR.trim());
|
|
12
12
|
}
|
|
13
|
-
return path.join(os.homedir(), '.config', '
|
|
13
|
+
return path.join(os.homedir(), '.config', 'aiworker');
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
function getLogsDir() {
|
package/bin/lib/cli-ports.js
CHANGED
|
@@ -29,9 +29,9 @@ async function resolveAvailablePort(desiredPort, explicitPort = false, onNotice)
|
|
|
29
29
|
const occupant = await fetchSystemInfoFromPort(startPort);
|
|
30
30
|
let message;
|
|
31
31
|
if (occupant?.runtime === 'desktop') {
|
|
32
|
-
message = `Port ${startPort} is used by
|
|
32
|
+
message = `Port ${startPort} is used by AiWorker Desktop; using a free port`;
|
|
33
33
|
} else if (occupant?.runtime) {
|
|
34
|
-
message = `Port ${startPort} is used by an existing
|
|
34
|
+
message = `Port ${startPort} is used by an existing AiWorker instance; using a free port`;
|
|
35
35
|
} else {
|
|
36
36
|
message = `Port ${startPort} in use; using a free port`;
|
|
37
37
|
}
|
package/bin/lib/cli-process.js
CHANGED
|
@@ -127,15 +127,15 @@ function isOpenchamberCmdline(cmdline) {
|
|
|
127
127
|
if (typeof cmdline !== 'string' || cmdline.length === 0) {
|
|
128
128
|
return false;
|
|
129
129
|
}
|
|
130
|
-
// Every install path contains the "
|
|
131
|
-
// (@
|
|
130
|
+
// Every install path contains the "aiworker" segment — the npm package
|
|
131
|
+
// (@aiworker/web) and the source checkout both do, for the foreground
|
|
132
132
|
// (bin/cli.js) and daemon (server/index.js) entrypoints alike. Matching the
|
|
133
133
|
// path segment (not a generic "cli.js") keeps a recycled stranger such as
|
|
134
134
|
// "npm-cli.js" or "agentmemory" from being mistaken for us.
|
|
135
|
-
return cmdline.toLowerCase().includes('
|
|
135
|
+
return cmdline.toLowerCase().includes('aiworker');
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
// Liveness + identity — "is the
|
|
138
|
+
// Liveness + identity — "is the AiWorker instance recorded in a pid file
|
|
139
139
|
// still the process running under this PID". Use this (not isProcessRunning)
|
|
140
140
|
// when validating a PID read from a pid file. After an ungraceful shutdown
|
|
141
141
|
// removePidFile never runs, so the stale PID can be recycled to an unrelated
|