aicodeman 1.49.0 → 1.50.1
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 +30 -4
- package/dist/cli-install-runner.d.ts +112 -0
- package/dist/cli-install-runner.d.ts.map +1 -0
- package/dist/cli-install-runner.js +289 -0
- package/dist/cli-install-runner.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/config/attachment-guard.d.ts +11 -0
- package/dist/config/attachment-guard.d.ts.map +1 -1
- package/dist/config/attachment-guard.js +21 -1
- package/dist/config/attachment-guard.js.map +1 -1
- package/dist/config/local-model-catalog.d.ts +188 -0
- package/dist/config/local-model-catalog.d.ts.map +1 -0
- package/dist/config/local-model-catalog.js +556 -0
- package/dist/config/local-model-catalog.js.map +1 -0
- package/dist/config-backup.js +1 -1
- package/dist/config-backup.js.map +1 -1
- package/dist/custom-model-hosts-writer.d.ts +50 -0
- package/dist/custom-model-hosts-writer.d.ts.map +1 -0
- package/dist/custom-model-hosts-writer.js +110 -0
- package/dist/custom-model-hosts-writer.js.map +1 -0
- package/dist/git-clone.d.ts.map +1 -1
- package/dist/git-clone.js +21 -1
- package/dist/git-clone.js.map +1 -1
- package/dist/git-fetch.d.ts.map +1 -1
- package/dist/git-fetch.js +6 -0
- package/dist/git-fetch.js.map +1 -1
- package/dist/git-workspace-status.d.ts.map +1 -1
- package/dist/git-workspace-status.js +4 -0
- package/dist/git-workspace-status.js.map +1 -1
- package/dist/git-worktrees.d.ts.map +1 -1
- package/dist/git-worktrees.js +6 -0
- package/dist/git-worktrees.js.map +1 -1
- package/dist/hooks-config.d.ts +15 -3
- package/dist/hooks-config.d.ts.map +1 -1
- package/dist/hooks-config.js +108 -4
- package/dist/hooks-config.js.map +1 -1
- package/dist/live-worktree.d.ts +73 -15
- package/dist/live-worktree.d.ts.map +1 -1
- package/dist/live-worktree.js +200 -32
- package/dist/live-worktree.js.map +1 -1
- package/dist/local-model/connect.d.ts +155 -0
- package/dist/local-model/connect.d.ts.map +1 -0
- package/dist/local-model/connect.js +243 -0
- package/dist/local-model/connect.js.map +1 -0
- package/dist/local-model/developer-tools.d.ts +45 -0
- package/dist/local-model/developer-tools.d.ts.map +1 -0
- package/dist/local-model/developer-tools.js +105 -0
- package/dist/local-model/developer-tools.js.map +1 -0
- package/dist/local-model/format.d.ts +39 -0
- package/dist/local-model/format.d.ts.map +1 -0
- package/dist/local-model/format.js +48 -0
- package/dist/local-model/format.js.map +1 -0
- package/dist/local-model/hardware.d.ts +125 -0
- package/dist/local-model/hardware.d.ts.map +1 -0
- package/dist/local-model/hardware.js +336 -0
- package/dist/local-model/hardware.js.map +1 -0
- package/dist/local-model/harness-facts.d.ts +77 -0
- package/dist/local-model/harness-facts.d.ts.map +1 -0
- package/dist/local-model/harness-facts.js +145 -0
- package/dist/local-model/harness-facts.js.map +1 -0
- package/dist/local-model/install-job.d.ts +431 -0
- package/dist/local-model/install-job.d.ts.map +1 -0
- package/dist/local-model/install-job.js +1822 -0
- package/dist/local-model/install-job.js.map +1 -0
- package/dist/local-model/ollama-client.d.ts +216 -0
- package/dist/local-model/ollama-client.d.ts.map +1 -0
- package/dist/local-model/ollama-client.js +636 -0
- package/dist/local-model/ollama-client.js.map +1 -0
- package/dist/local-model/paths.d.ts +64 -0
- package/dist/local-model/paths.d.ts.map +1 -0
- package/dist/local-model/paths.js +75 -0
- package/dist/local-model/paths.js.map +1 -0
- package/dist/local-model/recommend.d.ts +118 -0
- package/dist/local-model/recommend.d.ts.map +1 -0
- package/dist/local-model/recommend.js +430 -0
- package/dist/local-model/recommend.js.map +1 -0
- package/dist/local-model/runtime.d.ts +339 -0
- package/dist/local-model/runtime.d.ts.map +1 -0
- package/dist/local-model/runtime.js +1240 -0
- package/dist/local-model/runtime.js.map +1 -0
- package/dist/local-model/state-store.d.ts +45 -0
- package/dist/local-model/state-store.d.ts.map +1 -0
- package/dist/local-model/state-store.js +261 -0
- package/dist/local-model/state-store.js.map +1 -0
- package/dist/readmymind-collectors.d.ts.map +1 -1
- package/dist/readmymind-collectors.js +4 -0
- package/dist/readmymind-collectors.js.map +1 -1
- package/dist/reboot-restore.d.ts +3 -1
- package/dist/reboot-restore.d.ts.map +1 -1
- package/dist/reboot-restore.js.map +1 -1
- package/dist/session.d.ts +29 -7
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +63 -10
- package/dist/session.js.map +1 -1
- package/dist/types/common.d.ts +5 -0
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +4 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/local-model-install.d.ts +533 -0
- package/dist/types/local-model-install.d.ts.map +1 -0
- package/dist/types/local-model-install.js +169 -0
- package/dist/types/local-model-install.js.map +1 -0
- package/dist/types/local-model.d.ts +551 -0
- package/dist/types/local-model.d.ts.map +1 -0
- package/dist/types/local-model.js +115 -0
- package/dist/types/local-model.js.map +1 -0
- package/dist/types/session.d.ts +17 -6
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/session.js.map +1 -1
- package/dist/utils/cli-executable-resolver.d.ts +18 -0
- package/dist/utils/cli-executable-resolver.d.ts.map +1 -1
- package/dist/utils/cli-executable-resolver.js +34 -2
- package/dist/utils/cli-executable-resolver.js.map +1 -1
- package/dist/utils/git-availability.d.ts +65 -0
- package/dist/utils/git-availability.d.ts.map +1 -0
- package/dist/utils/git-availability.js +134 -0
- package/dist/utils/git-availability.js.map +1 -0
- package/dist/web/agent-skill-default-migration.d.ts +60 -0
- package/dist/web/agent-skill-default-migration.d.ts.map +1 -0
- package/dist/web/agent-skill-default-migration.js +97 -0
- package/dist/web/agent-skill-default-migration.js.map +1 -0
- package/dist/web/approval-inbox.d.ts +10 -0
- package/dist/web/approval-inbox.d.ts.map +1 -1
- package/dist/web/approval-inbox.js +15 -0
- package/dist/web/approval-inbox.js.map +1 -1
- package/dist/web/case-state-sync.d.ts +28 -0
- package/dist/web/case-state-sync.d.ts.map +1 -0
- package/dist/web/case-state-sync.js +41 -0
- package/dist/web/case-state-sync.js.map +1 -0
- package/dist/web/ports/config-port.d.ts +1 -1
- package/dist/web/ports/config-port.d.ts.map +1 -1
- package/dist/web/public/admin-ui.js.gz +0 -0
- package/dist/web/public/api-client.c9b1cddc.js.gz +0 -0
- package/dist/web/public/{app.9ea37070.js → app.07398d90.js} +1 -1
- package/dist/web/public/app.07398d90.js.br +0 -0
- package/dist/web/public/app.07398d90.js.gz +0 -0
- package/dist/web/public/approvals-ui.js.gz +0 -0
- package/dist/web/public/constants.782170e1.js.gz +0 -0
- package/dist/web/public/cron-ui.js.gz +0 -0
- package/dist/web/public/edit-history-ui.js.gz +0 -0
- package/dist/web/public/entrance-animations.js.gz +0 -0
- package/dist/web/public/foreign-sessions.js.gz +0 -0
- package/dist/web/public/git-status-ui.js.gz +0 -0
- package/dist/web/public/header-divider.eb2d2463.js.gz +0 -0
- package/dist/web/public/home-sessions.js +38 -18
- package/dist/web/public/home-sessions.js.br +0 -0
- package/dist/web/public/home-sessions.js.gz +0 -0
- package/dist/web/public/host-wake-ui.js.gz +0 -0
- package/dist/web/public/{i18n.a5e82c95.js → i18n.519d025e.js} +2 -2
- package/dist/web/public/i18n.519d025e.js.br +0 -0
- package/dist/web/public/i18n.519d025e.js.gz +0 -0
- package/dist/web/public/image-input.a5d0f8f3.js.gz +0 -0
- package/dist/web/public/index.html +88 -13
- package/dist/web/public/index.html.br +0 -0
- package/dist/web/public/index.html.gz +0 -0
- package/dist/web/public/input-cjk.8bc46081.js.gz +0 -0
- package/dist/web/public/{keyboard-accessory.b941676c.js → keyboard-accessory.0800fc44.js} +160 -2
- package/dist/web/public/keyboard-accessory.0800fc44.js.br +0 -0
- package/dist/web/public/keyboard-accessory.0800fc44.js.gz +0 -0
- package/dist/web/public/local-model-ui.js +1735 -0
- package/dist/web/public/local-model-ui.js.br +0 -0
- package/dist/web/public/local-model-ui.js.gz +0 -0
- package/dist/web/public/mobile-handlers.f7c3f692.js.gz +0 -0
- package/dist/web/public/mobile-ime-preview.2dbaf262.js.gz +0 -0
- package/dist/web/public/mobile-overview.js +30 -14
- package/dist/web/public/mobile-overview.js.br +0 -0
- package/dist/web/public/mobile-overview.js.gz +0 -0
- package/dist/web/public/mobile.4dfd5c55.css +1 -0
- package/dist/web/public/mobile.4dfd5c55.css.br +0 -0
- package/dist/web/public/mobile.4dfd5c55.css.gz +0 -0
- package/dist/web/public/notification-manager.feb82c04.js.gz +0 -0
- package/dist/web/public/orchestrator-panel.js.gz +0 -0
- package/dist/web/public/{panels-ui.8bcd4473.js → panels-ui.9ba2683e.js} +100 -98
- package/dist/web/public/panels-ui.9ba2683e.js.br +0 -0
- package/dist/web/public/panels-ui.9ba2683e.js.gz +0 -0
- package/dist/web/public/ralph-panel.b350e2ef.js.gz +0 -0
- package/dist/web/public/ralph-wizard.b6c0dd19.js.gz +0 -0
- package/dist/web/public/readmymind-ui.js.gz +0 -0
- package/dist/web/public/reboot-restore-ui.js +2 -0
- package/dist/web/public/reboot-restore-ui.js.br +0 -0
- package/dist/web/public/reboot-restore-ui.js.gz +0 -0
- package/dist/web/public/respawn-ui.304ba0d4.js.gz +0 -0
- package/dist/web/public/sanitize-html.e7147e76.js.gz +0 -0
- package/dist/web/public/session-lineage.js.gz +0 -0
- package/dist/web/public/{session-ui.a7c8c095.js → session-ui.8f300b14.js} +21 -21
- package/dist/web/public/session-ui.8f300b14.js.br +0 -0
- package/dist/web/public/session-ui.8f300b14.js.gz +0 -0
- package/dist/web/public/{settings-ui.18f92052.js → settings-ui.8b37cf07.js} +14 -14
- package/dist/web/public/settings-ui.8b37cf07.js.br +0 -0
- package/dist/web/public/settings-ui.8b37cf07.js.gz +0 -0
- package/dist/web/public/spreadsheet-preview-worker.js.gz +0 -0
- package/dist/web/public/spreadsheet-preview.75c751de.js.gz +0 -0
- package/dist/web/public/spreadsheet-xlsx-core.js.gz +0 -0
- package/dist/web/public/styles.21b93520.css +1 -0
- package/dist/web/public/styles.21b93520.css.br +0 -0
- package/dist/web/public/styles.21b93520.css.gz +0 -0
- package/dist/web/public/subagent-windows.07277a58.js.gz +0 -0
- package/dist/web/public/sw.js +2 -2
- package/dist/web/public/sw.js.br +0 -0
- package/dist/web/public/sw.js.gz +0 -0
- package/dist/web/public/tab-layout-browser.2d6189f7.js.gz +0 -0
- package/dist/web/public/tab-rail-resize.b5cdceaf.js.gz +0 -0
- package/dist/web/public/terminal-keycode229-recovery.98843069.js.gz +0 -0
- package/dist/web/public/terminal-split.js.gz +0 -0
- package/dist/web/public/terminal-tile.js.gz +0 -0
- package/dist/web/public/{terminal-ui.a7883640.js → terminal-ui.f92eae28.js} +2 -2
- package/dist/web/public/terminal-ui.f92eae28.js.br +0 -0
- package/dist/web/public/terminal-ui.f92eae28.js.gz +0 -0
- package/dist/web/public/tile-grid.js.gz +0 -0
- package/dist/web/public/ultracode-panel.js.gz +0 -0
- package/dist/web/public/ultracode-windows.js.gz +0 -0
- package/dist/web/public/vendor/dompurify.min.js.gz +0 -0
- package/dist/web/public/vendor/exceljs.min.js.gz +0 -0
- package/dist/web/public/vendor/fflate.min.js.gz +0 -0
- package/dist/web/public/vendor/marked.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-fit.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-serialize.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-unicode11.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-webgl.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-predictive-echo.276b11d9.js.gz +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.1be42307.js.gz +0 -0
- package/dist/web/public/vendor/xterm.css.gz +0 -0
- package/dist/web/public/vendor/xterm.min.js.gz +0 -0
- package/dist/web/public/{voice-input.2342c37b.js → voice-input.d0580528.js} +232 -137
- package/dist/web/public/voice-input.d0580528.js.br +0 -0
- package/dist/web/public/voice-input.d0580528.js.gz +0 -0
- package/dist/web/public/voice-pcm-worklet.js.gz +0 -0
- package/dist/web/public/webview-tabs.js.gz +0 -0
- package/dist/web/public/whats-new.json +9 -9
- package/dist/web/repo-status.d.ts.map +1 -1
- package/dist/web/repo-status.js +4 -0
- package/dist/web/repo-status.js.map +1 -1
- package/dist/web/route-helpers.d.ts +29 -0
- package/dist/web/route-helpers.d.ts.map +1 -1
- package/dist/web/route-helpers.js +37 -0
- package/dist/web/route-helpers.js.map +1 -1
- package/dist/web/routes/approval-routes.d.ts.map +1 -1
- package/dist/web/routes/approval-routes.js +3 -2
- package/dist/web/routes/approval-routes.js.map +1 -1
- package/dist/web/routes/case-routes.d.ts.map +1 -1
- package/dist/web/routes/case-routes.js +31 -5
- package/dist/web/routes/case-routes.js.map +1 -1
- package/dist/web/routes/cli-registry-routes.d.ts +1 -27
- package/dist/web/routes/cli-registry-routes.d.ts.map +1 -1
- package/dist/web/routes/cli-registry-routes.js +11 -202
- package/dist/web/routes/cli-registry-routes.js.map +1 -1
- package/dist/web/routes/custom-model-routes.d.ts +15 -0
- package/dist/web/routes/custom-model-routes.d.ts.map +1 -1
- package/dist/web/routes/custom-model-routes.js +114 -33
- package/dist/web/routes/custom-model-routes.js.map +1 -1
- package/dist/web/routes/file-routes.d.ts +4 -2
- package/dist/web/routes/file-routes.d.ts.map +1 -1
- package/dist/web/routes/file-routes.js +160 -24
- package/dist/web/routes/file-routes.js.map +1 -1
- package/dist/web/routes/html-view-routes.d.ts.map +1 -1
- package/dist/web/routes/html-view-routes.js +12 -3
- package/dist/web/routes/html-view-routes.js.map +1 -1
- package/dist/web/routes/index.d.ts +1 -0
- package/dist/web/routes/index.d.ts.map +1 -1
- package/dist/web/routes/index.js +1 -0
- package/dist/web/routes/index.js.map +1 -1
- package/dist/web/routes/local-model-routes.d.ts +103 -0
- package/dist/web/routes/local-model-routes.d.ts.map +1 -0
- package/dist/web/routes/local-model-routes.js +210 -0
- package/dist/web/routes/local-model-routes.js.map +1 -0
- package/dist/web/routes/reboot-restore-routes.d.ts.map +1 -1
- package/dist/web/routes/reboot-restore-routes.js +16 -0
- package/dist/web/routes/reboot-restore-routes.js.map +1 -1
- package/dist/web/routes/session-routes.d.ts.map +1 -1
- package/dist/web/routes/session-routes.js +22 -27
- package/dist/web/routes/session-routes.js.map +1 -1
- package/dist/web/routes/system-routes.d.ts +2 -2
- package/dist/web/routes/system-routes.d.ts.map +1 -1
- package/dist/web/routes/system-routes.js +23 -4
- package/dist/web/routes/system-routes.js.map +1 -1
- package/dist/web/schemas.d.ts +30 -0
- package/dist/web/schemas.d.ts.map +1 -1
- package/dist/web/schemas.js +52 -5
- package/dist/web/schemas.js.map +1 -1
- package/dist/web/self-update.d.ts.map +1 -1
- package/dist/web/self-update.js +4 -0
- package/dist/web/self-update.js.map +1 -1
- package/dist/web/sensitive-path.d.ts.map +1 -1
- package/dist/web/sensitive-path.js +5 -0
- package/dist/web/sensitive-path.js.map +1 -1
- package/dist/web/server.d.ts +20 -0
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +83 -7
- package/dist/web/server.js.map +1 -1
- package/dist/web/voice-stream.d.ts +4 -3
- package/dist/web/voice-stream.d.ts.map +1 -1
- package/dist/web/voice-stream.js +5 -4
- package/dist/web/voice-stream.js.map +1 -1
- package/package.json +2 -1
- package/skills/codeman/SKILL.md +318 -24
- package/skills/codeman/preamble.sh +242 -16
- package/skills/codeman/reference/recipes.md +1 -1
- package/skills/codeman/reference/verbs.md +101 -1
- package/dist/web/public/app.9ea37070.js.br +0 -0
- package/dist/web/public/app.9ea37070.js.gz +0 -0
- package/dist/web/public/i18n.a5e82c95.js.br +0 -0
- package/dist/web/public/i18n.a5e82c95.js.gz +0 -0
- package/dist/web/public/keyboard-accessory.b941676c.js.br +0 -0
- package/dist/web/public/keyboard-accessory.b941676c.js.gz +0 -0
- package/dist/web/public/mobile.67c8eb5b.css +0 -1
- package/dist/web/public/mobile.67c8eb5b.css.br +0 -0
- package/dist/web/public/mobile.67c8eb5b.css.gz +0 -0
- package/dist/web/public/panels-ui.8bcd4473.js.br +0 -0
- package/dist/web/public/panels-ui.8bcd4473.js.gz +0 -0
- package/dist/web/public/session-ui.a7c8c095.js.br +0 -0
- package/dist/web/public/session-ui.a7c8c095.js.gz +0 -0
- package/dist/web/public/settings-ui.18f92052.js.br +0 -0
- package/dist/web/public/settings-ui.18f92052.js.gz +0 -0
- package/dist/web/public/styles.6a718331.css +0 -1
- package/dist/web/public/styles.6a718331.css.br +0 -0
- package/dist/web/public/styles.6a718331.css.gz +0 -0
- package/dist/web/public/terminal-ui.a7883640.js.br +0 -0
- package/dist/web/public/terminal-ui.a7883640.js.gz +0 -0
- package/dist/web/public/voice-input.2342c37b.js.br +0 -0
- package/dist/web/public/voice-input.2342c37b.js.gz +0 -0
package/dist/web/server.js
CHANGED
|
@@ -66,7 +66,8 @@ import { subagentWatcher, } from '../subagent-watcher.js';
|
|
|
66
66
|
import { imageWatcher } from '../image-watcher.js';
|
|
67
67
|
import { workflowRunWatcher, summarizeRun } from '../workflow-run-watcher.js';
|
|
68
68
|
import { attachmentRegistry, buildFileThumbnailRoute, registerExternalAttachment } from '../attachment-registry.js';
|
|
69
|
-
import { folderGrants } from '../folder-listing.js';
|
|
69
|
+
import { folderAllowedForUser, folderGrants } from '../folder-listing.js';
|
|
70
|
+
import { isOutsideWorktreeRootRefused, loadAttachmentGuardConfig } from '../config/attachment-guard.js';
|
|
70
71
|
import { getCli, enabledClis, listClis } from '../config/cli-registry/registry.js';
|
|
71
72
|
import { isCliEntryInstalled, probeStockCliAvailability } from '../utils/cli-installed-probes.js';
|
|
72
73
|
import { readCustomModelHosts, resolveCustomModelContextLength } from '../custom-model-hosts.js';
|
|
@@ -110,6 +111,7 @@ import { probeLocalPaths, readClaudeEditSources, resolveClaudeTranscript } from
|
|
|
110
111
|
import { remoteLocateClaudeTranscript, remoteProbePaths, remoteReadClaudeEditSources } from '../remote-files.js';
|
|
111
112
|
import { remoteTmuxLocation } from '../tmux-manager.js';
|
|
112
113
|
import { stopDeepSeekWeb } from '../deepseek-web-server.js';
|
|
114
|
+
import { getLocalModelService } from '../local-model/install-job.js';
|
|
113
115
|
import { wireRespawnListeners, setupTimedRespawn, restoreRespawnController, saveRespawnConfig, } from './respawn-event-wiring.js';
|
|
114
116
|
import { reconcileUpdateOnBoot } from './self-update.js';
|
|
115
117
|
// Load version from package.json
|
|
@@ -135,6 +137,7 @@ import { resolveTerminalHistoryConfig } from '../config/terminal-history.js';
|
|
|
135
137
|
import { SseEvent } from './sse-events.js';
|
|
136
138
|
import { MAX_ROUTE_PARAM_LENGTH } from './route-helpers.js';
|
|
137
139
|
import { mutateSettingsFile } from './settings-writer.js';
|
|
140
|
+
import { migrateAgentSkillDefault } from './agent-skill-default-migration.js';
|
|
138
141
|
import { getLatestPlanUsage, setLatestCodexPlanUsage, setLatestCopilotPlanUsage } from './plan-usage-latest.js';
|
|
139
142
|
import { telemetrySignature } from '../usage-telemetry.js';
|
|
140
143
|
import { readCodexPlanUsage, resolveCodexBinaryPath } from '../utils/codex-cli-resolver.js';
|
|
@@ -142,11 +145,11 @@ import { isCopilotAvailable } from '../utils/copilot-cli-resolver.js';
|
|
|
142
145
|
import { readCopilotPlanUsage, readCopilotPlanUsageIfEnabled, resolveCopilotToken, } from '../utils/copilot-plan-usage.js';
|
|
143
146
|
import { registerAuthMiddleware, registerSecurityHeaders, registerHostGuard, isLostWebviewRootFrame, sendLostWebviewFramePage, } from './middleware/auth.js';
|
|
144
147
|
import { isMultiUserMode } from '../config/multiuser.js';
|
|
145
|
-
import { bootstrapInitialAdmin, hasUsers, resolveClaudeModeForUsername } from '../user-store.js';
|
|
148
|
+
import { bootstrapInitialAdmin, findUser, hasUsers, resolveClaudeModeForUsername } from '../user-store.js';
|
|
146
149
|
import { installRouteErrorHandler } from './route-error-handler.js';
|
|
147
150
|
import { installEmptyApiPostParser } from './request-body-parser.js';
|
|
148
151
|
import { isExplicitlyEnabled, isLoopbackBindHost, buildHostPolicy } from './network-auth-policy.js';
|
|
149
|
-
import { registerPushRoutes, registerTeamRoutes, registerMuxRoutes, registerFileRoutes, registerHtmlViewRoutes, registerScheduledRoutes, registerHookEventRoutes, registerApprovalRoutes, registerInboxRoutes, registerRebootRestoreRoutes, registerReadMyMindRoutes, registerGitStatusRoutes, registerEditHistoryRoutes, registerStatusTelemetryRoutes, registerSystemRoutes, registerCaseRoutes, registerWorktreeRoutes, registerSessionRoutes, registerAgentSessionRoutes, registerRespawnRoutes, registerRalphRoutes, registerPlanRoutes, registerClipboardRoutes, registerSearchRoutes, registerOrchestratorRoutes, registerCronRoutes, registerMeRoutes, registerAdminRoutes, registerWsRoutes, registerVoiceRoutes, registerWebviewRoutes, registerTabLayoutRoutes, registerMcpSyncRoutes, registerConfigBackupRoutes, runConfigBackup, registerWebhookRoutes, registerDiscordRoutes, registerDoctorRoutes, registerCustomModelRoutes, refreshAllCustomModelHosts, readCustomModelEndpointsEnabled, closeAllLlamaSwapLogTails, detectCustomModelSwapDisplacements, pruneIdleLlamaSwapLogTails, tryWebviewRefererFallback, registerCliRegistryRoutes, } from './routes/index.js';
|
|
152
|
+
import { registerPushRoutes, registerTeamRoutes, registerMuxRoutes, registerFileRoutes, registerHtmlViewRoutes, registerScheduledRoutes, registerHookEventRoutes, registerApprovalRoutes, registerInboxRoutes, registerRebootRestoreRoutes, registerReadMyMindRoutes, registerGitStatusRoutes, registerEditHistoryRoutes, registerStatusTelemetryRoutes, registerSystemRoutes, registerCaseRoutes, registerWorktreeRoutes, registerSessionRoutes, registerAgentSessionRoutes, registerRespawnRoutes, registerRalphRoutes, registerPlanRoutes, registerClipboardRoutes, registerSearchRoutes, registerOrchestratorRoutes, registerCronRoutes, registerMeRoutes, registerAdminRoutes, registerWsRoutes, registerVoiceRoutes, registerWebviewRoutes, registerTabLayoutRoutes, registerMcpSyncRoutes, registerConfigBackupRoutes, runConfigBackup, registerWebhookRoutes, registerDiscordRoutes, registerDoctorRoutes, registerCustomModelRoutes, refreshAllCustomModelHosts, readCustomModelEndpointsEnabled, closeAllLlamaSwapLogTails, detectCustomModelSwapDisplacements, pruneIdleLlamaSwapLogTails, tryWebviewRefererFallback, registerCliRegistryRoutes, registerLocalModelRoutes, } from './routes/index.js';
|
|
150
153
|
import { isLostWebviewFrameNavigation } from './webview-proxy.js';
|
|
151
154
|
import { CronService } from '../cron/cron-service.js';
|
|
152
155
|
import { caseSessionSettled } from '../case-rename.js';
|
|
@@ -1194,6 +1197,7 @@ export class WebServer extends EventEmitter {
|
|
|
1194
1197
|
registerDoctorRoutes(this.app);
|
|
1195
1198
|
registerCustomModelRoutes(this.app);
|
|
1196
1199
|
registerCliRegistryRoutes(this.app);
|
|
1200
|
+
registerLocalModelRoutes(this.app, ctx);
|
|
1197
1201
|
// Cron: build the service from the same context, recompute
|
|
1198
1202
|
// due times for any persisted jobs, then expose it to its routes.
|
|
1199
1203
|
this.cronService = new CronService(ctx);
|
|
@@ -1884,6 +1888,18 @@ export class WebServer extends EventEmitter {
|
|
|
1884
1888
|
// First keep-warm evaluation: publishes the effective opt-in for the Session Options
|
|
1885
1889
|
// readout even before any cache report arrives.
|
|
1886
1890
|
void this.keepWarmService.schedule(session.id);
|
|
1891
|
+
// Before every start of a NEW agent process the session asks this (a fresh pane, the
|
|
1892
|
+
// respawn of a dead one, a restart in place; never an attach to an agent that runs).
|
|
1893
|
+
// The model Codeman runs on this Mac is the one endpoint with something to say: no agent
|
|
1894
|
+
// is started on it while its runtime is down or its model is not the one that was
|
|
1895
|
+
// installed. Every other session, and every other endpoint, is answered `undefined`.
|
|
1896
|
+
// Set on every call, above the idempotency return: it holds no state of its own.
|
|
1897
|
+
session.setLaunchGuard(async () => {
|
|
1898
|
+
const selection = session.customModel;
|
|
1899
|
+
if (!selection)
|
|
1900
|
+
return undefined;
|
|
1901
|
+
return getLocalModelService().launchRefusalMessage(selection.endpointId, selection.modelId);
|
|
1902
|
+
});
|
|
1887
1903
|
// Idempotent: the wiring exit handler detaches ALL listeners on every PTY exit
|
|
1888
1904
|
// (removeSessionListenerRefs), so the re-attach routes (/interactive,
|
|
1889
1905
|
// /interactive-respawn, /shell) call this again to restore observability
|
|
@@ -2122,11 +2138,15 @@ export class WebServer extends EventEmitter {
|
|
|
2122
2138
|
const settings = await this.readSettings();
|
|
2123
2139
|
return resolveTerminalHistoryConfig(settings);
|
|
2124
2140
|
}
|
|
2125
|
-
// Whether the Codeman agent skill is injected into
|
|
2126
|
-
// (synced `agentSkillEnabled` setting
|
|
2141
|
+
// Whether the Codeman agent skill is injected into a session's workspace on create
|
|
2142
|
+
// (synced `agentSkillEnabled` setting; docs/agent-control-plan.md §2). Default ON
|
|
2143
|
+
// since 1.50.0, like `workspaceHooksEnabled` below: an absent key means a user who
|
|
2144
|
+
// has never touched the switch, and only an explicit false turns it off. The copy
|
|
2145
|
+
// ignores itself in git (`.gitignore` of `*`, see installAgentSkillInto), so the
|
|
2146
|
+
// default leaves a user's `git status` clean.
|
|
2127
2147
|
async getAgentSkillEnabled() {
|
|
2128
2148
|
const settings = await this.readSettings();
|
|
2129
|
-
return settings.agentSkillEnabled
|
|
2149
|
+
return settings.agentSkillEnabled !== false;
|
|
2130
2150
|
}
|
|
2131
2151
|
// Whether pending agent-inbox mail is snapshotted to disk (synced
|
|
2132
2152
|
// `agentInboxPersistEnabled` setting). Default OFF: an absent key writes nothing.
|
|
@@ -2636,12 +2656,48 @@ export class WebServer extends EventEmitter {
|
|
|
2636
2656
|
*/
|
|
2637
2657
|
async refreshLiveWorktree(session) {
|
|
2638
2658
|
const cwd = session.paneCwd;
|
|
2639
|
-
const worktree = await findLiveWorktree(session.workingDir, cwd);
|
|
2659
|
+
const worktree = await findLiveWorktree(session.workingDir, cwd, this.outsideWorktreeOptions(session));
|
|
2640
2660
|
if (session.paneCwd !== cwd)
|
|
2641
2661
|
return;
|
|
2642
2662
|
if (session.setLiveWorktree(worktree))
|
|
2643
2663
|
this.broadcastSessionStateDebounced(session.id);
|
|
2644
2664
|
}
|
|
2665
|
+
/**
|
|
2666
|
+
* The rules a worktree OUTSIDE the session's folder must pass to be followed (#765 follow-up):
|
|
2667
|
+
*
|
|
2668
|
+
* - none in a Docker case workspace (the list is read only when a candidate needs it, and an
|
|
2669
|
+
* unreadable list follows nothing);
|
|
2670
|
+
* - none while attachment workspace confinement is on (`attachmentConfineToWorkspace` /
|
|
2671
|
+
* `CODEMAN_ATTACHMENT_CONFINE`), since an outside worktree is a second served root;
|
|
2672
|
+
* - none at, inside or around an attachment blocked tree (`attachmentBlockedPaths` /
|
|
2673
|
+
* `CODEMAN_ATTACHMENT_BLOCKED_PATHS`, plus the defaults), or at a sensitive path;
|
|
2674
|
+
* - in multi-user mode, only inside the owner's space or `workingDir`.
|
|
2675
|
+
*
|
|
2676
|
+
* Codeman judges these rules when the pane moves. The file routes judge the two guard rules
|
|
2677
|
+
* again on every request (`isOutsideWorktreeRootRefused()`), so a setting changed later applies
|
|
2678
|
+
* at once. The Docker and multi-user rules are judged only when the pane moves. Undefined for a remote, Docker or
|
|
2679
|
+
* adopted session, whose pane directory is not a path the agent works in on this host (an
|
|
2680
|
+
* adopted session's pane runs our tmux attach client). None of the three gets a `paneCwd`
|
|
2681
|
+
* either (`paneExitApplies`), so this is belt and braces; an adopted session needs its own
|
|
2682
|
+
* test because `session.remote` and `session.docker` are undefined on one.
|
|
2683
|
+
*/
|
|
2684
|
+
outsideWorktreeOptions(session) {
|
|
2685
|
+
if (session.remote || session.docker || session.isAdopted)
|
|
2686
|
+
return undefined;
|
|
2687
|
+
return {
|
|
2688
|
+
dockerWorkspaces: defaultDockerWorkspaces,
|
|
2689
|
+
allowRoot: async (root) => {
|
|
2690
|
+
if (isOutsideWorktreeRootRefused(root, await loadAttachmentGuardConfig()))
|
|
2691
|
+
return false;
|
|
2692
|
+
if (!isMultiUserMode())
|
|
2693
|
+
return true;
|
|
2694
|
+
const owner = session.owner ? await findUser(session.owner) : undefined;
|
|
2695
|
+
return folderAllowedForUser(root, owner ? { username: owner.username, role: owner.role } : undefined, {
|
|
2696
|
+
workingDir: session.workingDir,
|
|
2697
|
+
});
|
|
2698
|
+
},
|
|
2699
|
+
};
|
|
2700
|
+
}
|
|
2645
2701
|
/**
|
|
2646
2702
|
* Close every session whose agent exited cleanly, through the same
|
|
2647
2703
|
* `cleanupSession()` the X button uses (Ark0N/Codeman#446). A pinned session
|
|
@@ -2997,6 +3053,13 @@ export class WebServer extends EventEmitter {
|
|
|
2997
3053
|
if (!this.testMode) {
|
|
2998
3054
|
reconcileUpdateOnBoot();
|
|
2999
3055
|
}
|
|
3056
|
+
// One-time, once per data dir: a stored `agentSkillEnabled: false` written by the switch's
|
|
3057
|
+
// old default (up to 1.49.0) becomes true, so the 1.50.0 default reaches installs that ever
|
|
3058
|
+
// saved App Settings (agent-skill-default-migration.ts). Before the restore below reads
|
|
3059
|
+
// settings (2 s cache) and before listen, so no session create can see the old value.
|
|
3060
|
+
if (!this.testMode && (await migrateAgentSkillDefault()) === 'switched-on') {
|
|
3061
|
+
this._settingsCache = null;
|
|
3062
|
+
}
|
|
3000
3063
|
// Restore mux sessions BEFORE accepting connections
|
|
3001
3064
|
// This prevents race conditions where clients connect before state is ready
|
|
3002
3065
|
// CRITICAL: Skip in test mode to prevent tests from picking up user sessions
|
|
@@ -3039,6 +3102,13 @@ export class WebServer extends EventEmitter {
|
|
|
3039
3102
|
});
|
|
3040
3103
|
}
|
|
3041
3104
|
}
|
|
3105
|
+
// The model Codeman runs on this Mac (src/local-model/): a job a restart interrupted comes
|
|
3106
|
+
// back paused and waits for a click, and an installed runtime that was not stopped is
|
|
3107
|
+
// started again (an own orphan on its port is adopted or replaced). Off the startup path:
|
|
3108
|
+
// boot() never throws, and nothing waits for a runtime to answer. Not in tests.
|
|
3109
|
+
if (!this.testMode) {
|
|
3110
|
+
void getLocalModelService().boot();
|
|
3111
|
+
}
|
|
3042
3112
|
// Sweep agent preamble caches whose sessions are gone (see
|
|
3043
3113
|
// pruneAgentSessionPreambles). Once per boot, after restore, so every session this
|
|
3044
3114
|
// instance owns is in the keep set. Best-effort and off the startup critical path.
|
|
@@ -4078,6 +4148,12 @@ export class WebServer extends EventEmitter {
|
|
|
4078
4148
|
// port against the next start — the exact EADDRINUSE this feature already
|
|
4079
4149
|
// got wrong once.
|
|
4080
4150
|
void stopDeepSeekWeb();
|
|
4151
|
+
// The local model runtime is a non-detached child, but a child is not ended by its
|
|
4152
|
+
// parent's exit: it gets SIGTERM here, and an install job in flight is interrupted (the
|
|
4153
|
+
// next start reads it as paused). An orphan a hard kill leaves is adopted at the next boot.
|
|
4154
|
+
if (!this.testMode) {
|
|
4155
|
+
void getLocalModelService().shutdown();
|
|
4156
|
+
}
|
|
4081
4157
|
// The header's GPU / CPU clock sampler is a Windows child process under WSL, and its idle sweep a timer.
|
|
4082
4158
|
stopHostSensors();
|
|
4083
4159
|
// Same teardown rule: the per-endpoint llama-swap log tails are otherwise closed
|