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
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Types of the local model INSTALL: the runtime pin, the job's states, steps and
|
|
3
|
+
* error codes, the progress, the `install` object of `GET /api/local-model`, the bodies and
|
|
4
|
+
* answers of the install verbs, and the shape of the state file.
|
|
5
|
+
*
|
|
6
|
+
* The read side (hardware, catalogue, recommendation) is in src/types/local-model.ts. This
|
|
7
|
+
* file holds `LocalModelStatus`, the whole `data` of the GET, because it joins the two.
|
|
8
|
+
*
|
|
9
|
+
* Who produces what:
|
|
10
|
+
* - `LocalModelRuntimePin`: a compiled constant in src/local-model/runtime.ts. No file, no
|
|
11
|
+
* setting and no request can change which binary is downloaded.
|
|
12
|
+
* - `LocalModelStateFile`: src/local-model/state-store.ts, the ONE writer of
|
|
13
|
+
* `local-model.json` (mode 0600, temp file + rename).
|
|
14
|
+
* - `LocalModelInstallView`: src/local-model/install-job.ts (`buildInstallView()`, pure), from
|
|
15
|
+
* the state file plus what is live (the runtime child, the developer tools check).
|
|
16
|
+
* - `LocalModelStatus` and the verb answers: src/web/routes/local-model-routes.ts.
|
|
17
|
+
*
|
|
18
|
+
* The HTTP contract. Every route is admin only in multi-user mode (403 `FORBIDDEN`) and
|
|
19
|
+
* EXPERIMENTAL like the GET (docs/versioning-policy.md). Every verb answers
|
|
20
|
+
* `{ success: true, data: LocalModelInstallView }` with the view AFTER the verb.
|
|
21
|
+
*
|
|
22
|
+
* | Route | Body | Refusals |
|
|
23
|
+
* |----------------------------------|-----------------------------|-------------------------------------------------------|
|
|
24
|
+
* | `GET /api/local-model` | none | none (a failed probe is an answer) |
|
|
25
|
+
* | `POST /api/local-model/install` | `LocalModelInstallRequest` | 400 not a row the server offers, or a saved endpoint |
|
|
26
|
+
* | | | already has the reserved id; 409 `job-running`, |
|
|
27
|
+
* | | | `already-installed`, `size-changed` |
|
|
28
|
+
* | `POST /api/local-model/cancel` | none | 409 `wrong-state` (no job is running) |
|
|
29
|
+
* | `POST /api/local-model/resume` | `LocalModelResumeRequest` | 409 `job-running`, `wrong-state` (not paused or |
|
|
30
|
+
* | | | failed), `sessions-open` (another port while live |
|
|
31
|
+
* | | | sessions use the model) |
|
|
32
|
+
* | `POST /api/local-model/runtime` | `LocalModelRuntimeRequest` | 409 `wrong-state` (not installed), `job-running`, |
|
|
33
|
+
* | | | `sessions-open` (stop, or another port, while live |
|
|
34
|
+
* | | | sessions use the model) |
|
|
35
|
+
* | `DELETE /api/local-model` | `LocalModelRemoveRequest` | 409 `job-running`, `sessions-open` |
|
|
36
|
+
*
|
|
37
|
+
* A 409 is the error envelope plus `data: LocalModelConflict`:
|
|
38
|
+
* `{ success: false, error, errorCode: 'CONFLICT', data: { reason, message, ... } }`. A 409
|
|
39
|
+
* WITHOUT `data` is a write of `settings.json` or of the endpoint store that was refused
|
|
40
|
+
* because the file does not parse; `error` names the fix. A 400 the service names carries its
|
|
41
|
+
* sentence the same way: `{ success: false, error, errorCode: 'INVALID_INPUT', data: {
|
|
42
|
+
* message } }` (`LocalModelRefusal`), so the window can print it in its own language.
|
|
43
|
+
*
|
|
44
|
+
* The rules of src/types/local-model.ts hold here too:
|
|
45
|
+
* 1. A size a person reads travels twice: as bytes and as decimal GB text from `formatGb()`
|
|
46
|
+
* (`completedGb`, `totalGb`, `downloadGb`). The browser prints the text and adds or
|
|
47
|
+
* divides nothing for display. `mbPerSecond` is the one other unit, decimal MB per second.
|
|
48
|
+
* 2. Every sentence the server chooses comes from `LOCAL_MODEL_INSTALL_LABELS`, with its
|
|
49
|
+
* numbers and names in `vars`. `{name}` is taken by the translator, so no slot has that name.
|
|
50
|
+
* 3. A CLI id is data (`LocalModelInstallView.cli`): the browser passes it on and compares it
|
|
51
|
+
* with nothing. What a person reads is `cliLabel`.
|
|
52
|
+
*/
|
|
53
|
+
/** Every step, in order. A job runs these, without `agent` when the coding agent is installed. */
|
|
54
|
+
export const LOCAL_MODEL_INSTALL_STEPS = [
|
|
55
|
+
'runtime',
|
|
56
|
+
'model',
|
|
57
|
+
'verify',
|
|
58
|
+
'agent',
|
|
59
|
+
'connect',
|
|
60
|
+
];
|
|
61
|
+
// ---------- Sentences ----------
|
|
62
|
+
/**
|
|
63
|
+
* Every sentence the server may put into the `install` object or a 409, in English (the i18n
|
|
64
|
+
* source language). Like `LOCAL_MODEL_LABELS`: the zh-CN dictionary in src/web/public/i18n.js
|
|
65
|
+
* has one entry per value, keyed by this exact text, and the i18n test lists them from here.
|
|
66
|
+
* A constant of its own, so the sentences of the recommendation and of the install can be
|
|
67
|
+
* listed apart.
|
|
68
|
+
*
|
|
69
|
+
* | Key | Slots (all text) |
|
|
70
|
+
* |------------------------|----------------------------------------------------------------------|
|
|
71
|
+
* | `errPortInUse` | `port`: the port number |
|
|
72
|
+
* | `errModelNotFound`, `errDoesNotFit`, `errLoadFailed`, `errNoToolCall`, `errProbeUnfinished` | `model`: the model's label |
|
|
73
|
+
* | `errContextNotApplied` | `model`; `actual`: the context the runtime reports; `wanted`: the chosen one |
|
|
74
|
+
* | `errHarnessFailed` | `cli`: the coding agent's label |
|
|
75
|
+
* | `errEndpointIdTaken` | `id`: the endpoint id this feature uses |
|
|
76
|
+
* | `refusedAgentNotInstallable` | `cli`: the coding agent's label |
|
|
77
|
+
* | `refusedOtherModel` | `model`: the label of the model that is installed |
|
|
78
|
+
* | `conflictSizeChanged` | `size`: the server's own total as decimal GB |
|
|
79
|
+
* | `conflictSessionsOpen` | `sessions`: the session names, joined with ', ' |
|
|
80
|
+
*
|
|
81
|
+
* `developerToolsMissing` is not sent: the view carries `developerTools` and the window prints
|
|
82
|
+
* this sentence when it is `missing`. It is here so that its wording has one source.
|
|
83
|
+
*
|
|
84
|
+
* `endpointManaged` and `endpointIdReserved` are what the endpoint routes
|
|
85
|
+
* (src/web/routes/custom-model-routes.ts) answer for the record this feature manages and for
|
|
86
|
+
* its reserved id. They have no slot, so the App Settings toast that prints them translates
|
|
87
|
+
* them as it translates every other whole sentence.
|
|
88
|
+
*/
|
|
89
|
+
export const LOCAL_MODEL_INSTALL_LABELS = {
|
|
90
|
+
errRuntimeDownloadFailed: 'The download of the runtime stopped and could not be continued. Check the network connection, then try again.',
|
|
91
|
+
errRuntimeDamaged: 'The runtime download was damaged and has been deleted. Try again.',
|
|
92
|
+
errRuntimeUnpackFailed: 'The runtime could not be unpacked on this Mac.',
|
|
93
|
+
errRuntimeStartFailed: 'The runtime did not start on this Mac.',
|
|
94
|
+
errRuntimeStopped: 'The runtime keeps stopping, so Codeman no longer restarts it.',
|
|
95
|
+
errRuntimeNotRunning: 'The model on this Mac is not running. Start it first.',
|
|
96
|
+
errPortInUse: 'Port {port} is in use by another program.',
|
|
97
|
+
errDiskFull: 'The disk is full. Free up space, then try again.',
|
|
98
|
+
errPullFailed: 'The download keeps stopping. The network may be damaging data. Try again or use another network.',
|
|
99
|
+
errModelNotFound: '{model} is no longer offered under this name. Update Codeman or pick another model.',
|
|
100
|
+
errDoesNotFit: '{model} does not fit in the memory of this Mac after all.',
|
|
101
|
+
errContextNotApplied: '{model} loaded with a context of {actual} tokens instead of {wanted}.',
|
|
102
|
+
errLoadFailed: '{model} did not load on this Mac.',
|
|
103
|
+
errNoToolCall: '{model} loaded but did not call a tool, so a coding agent cannot work with it.',
|
|
104
|
+
errProbeUnfinished: 'The check of {model} did not finish.',
|
|
105
|
+
errHarnessFailed: '{cli} could not be installed.',
|
|
106
|
+
errEndpointIdTaken: 'A saved model connection named {id} already exists and was not created here. Rename or delete it in App Settings, then try again.',
|
|
107
|
+
errConnectFailed: 'Codeman could not save the connection to the model.',
|
|
108
|
+
errModelChanged: 'The model on this Mac changed since it was installed. Remove it and install it again.',
|
|
109
|
+
errInternal: 'The install stopped on an unexpected error.',
|
|
110
|
+
conflictJobRunning: 'An install is already running.',
|
|
111
|
+
conflictAlreadyInstalled: 'A model is already installed on this Mac. Remove it first.',
|
|
112
|
+
conflictSizeChanged: 'The download is {size} GB now. Check the sizes and confirm again.',
|
|
113
|
+
conflictSessionsOpen: 'Sessions are still using this model: {sessions}. Close them first.',
|
|
114
|
+
conflictWrongState: 'That is not possible in the current state.',
|
|
115
|
+
refusedModelNotOffered: 'This model at this context is not offered for this Mac right now.',
|
|
116
|
+
refusedAgentNotOffered: 'This coding agent is not offered for this model.',
|
|
117
|
+
refusedAgentNotInstallable: '{cli} is not installed and cannot be installed from here.',
|
|
118
|
+
refusedOtherModel: 'Only {model} is installed on this Mac. Remove it and install another model first.',
|
|
119
|
+
endpointManaged: 'This endpoint belongs to the model Codeman runs on this Mac. Change or remove it in the local model window.',
|
|
120
|
+
endpointIdReserved: 'This endpoint id is reserved for the model Codeman runs on this Mac. Pick another id.',
|
|
121
|
+
developerToolsMissing: 'Coding agents use git and Python. This Mac has no developer tools yet, so macOS will offer to install them the first time an agent needs one.',
|
|
122
|
+
};
|
|
123
|
+
/** The sentence of each error code. */
|
|
124
|
+
export const LOCAL_MODEL_ERROR_LABELS = {
|
|
125
|
+
'runtime-download-failed': LOCAL_MODEL_INSTALL_LABELS.errRuntimeDownloadFailed,
|
|
126
|
+
'runtime-damaged': LOCAL_MODEL_INSTALL_LABELS.errRuntimeDamaged,
|
|
127
|
+
'runtime-unpack-failed': LOCAL_MODEL_INSTALL_LABELS.errRuntimeUnpackFailed,
|
|
128
|
+
'runtime-start-failed': LOCAL_MODEL_INSTALL_LABELS.errRuntimeStartFailed,
|
|
129
|
+
'runtime-stopped': LOCAL_MODEL_INSTALL_LABELS.errRuntimeStopped,
|
|
130
|
+
'runtime-not-running': LOCAL_MODEL_INSTALL_LABELS.errRuntimeNotRunning,
|
|
131
|
+
'port-in-use': LOCAL_MODEL_INSTALL_LABELS.errPortInUse,
|
|
132
|
+
'disk-full': LOCAL_MODEL_INSTALL_LABELS.errDiskFull,
|
|
133
|
+
'pull-failed': LOCAL_MODEL_INSTALL_LABELS.errPullFailed,
|
|
134
|
+
'model-not-found': LOCAL_MODEL_INSTALL_LABELS.errModelNotFound,
|
|
135
|
+
'does-not-fit': LOCAL_MODEL_INSTALL_LABELS.errDoesNotFit,
|
|
136
|
+
'context-not-applied': LOCAL_MODEL_INSTALL_LABELS.errContextNotApplied,
|
|
137
|
+
'load-failed': LOCAL_MODEL_INSTALL_LABELS.errLoadFailed,
|
|
138
|
+
'no-tool-call': LOCAL_MODEL_INSTALL_LABELS.errNoToolCall,
|
|
139
|
+
'probe-unfinished': LOCAL_MODEL_INSTALL_LABELS.errProbeUnfinished,
|
|
140
|
+
'harness-failed': LOCAL_MODEL_INSTALL_LABELS.errHarnessFailed,
|
|
141
|
+
'endpoint-id-taken': LOCAL_MODEL_INSTALL_LABELS.errEndpointIdTaken,
|
|
142
|
+
'connect-failed': LOCAL_MODEL_INSTALL_LABELS.errConnectFailed,
|
|
143
|
+
'model-changed': LOCAL_MODEL_INSTALL_LABELS.errModelChanged,
|
|
144
|
+
internal: LOCAL_MODEL_INSTALL_LABELS.errInternal,
|
|
145
|
+
};
|
|
146
|
+
/** The one helpful next step of each error code. */
|
|
147
|
+
export const LOCAL_MODEL_ERROR_NEXT = {
|
|
148
|
+
'runtime-download-failed': 'retry',
|
|
149
|
+
'runtime-damaged': 'retry',
|
|
150
|
+
'runtime-unpack-failed': 'retry',
|
|
151
|
+
'runtime-start-failed': 'retry',
|
|
152
|
+
'runtime-stopped': 'start',
|
|
153
|
+
'runtime-not-running': 'start',
|
|
154
|
+
'port-in-use': 'other-port',
|
|
155
|
+
'disk-full': 'retry',
|
|
156
|
+
'pull-failed': 'retry',
|
|
157
|
+
'model-not-found': 'next-model',
|
|
158
|
+
'does-not-fit': 'next-model',
|
|
159
|
+
'context-not-applied': 'retry',
|
|
160
|
+
'load-failed': 'retry',
|
|
161
|
+
'no-tool-call': 'next-model',
|
|
162
|
+
'probe-unfinished': 'retry',
|
|
163
|
+
'harness-failed': 'retry',
|
|
164
|
+
'endpoint-id-taken': 'retry',
|
|
165
|
+
'connect-failed': 'retry',
|
|
166
|
+
'model-changed': 'remove',
|
|
167
|
+
internal: 'retry',
|
|
168
|
+
};
|
|
169
|
+
//# sourceMappingURL=local-model-install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-model-install.js","sourceRoot":"","sources":["../../src/types/local-model-install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAwDH,kGAAkG;AAClG,MAAM,CAAC,MAAM,yBAAyB,GAAqC;IACzE,SAAS;IACT,OAAO;IACP,QAAQ;IACR,OAAO;IACP,SAAS;CACV,CAAC;AAgGF,kCAAkC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,wBAAwB,EACtB,+GAA+G;IACjH,iBAAiB,EAAE,mEAAmE;IACtF,sBAAsB,EAAE,gDAAgD;IACxE,qBAAqB,EAAE,wCAAwC;IAC/D,iBAAiB,EAAE,+DAA+D;IAClF,oBAAoB,EAAE,uDAAuD;IAC7E,YAAY,EAAE,2CAA2C;IACzD,WAAW,EAAE,kDAAkD;IAC/D,aAAa,EAAE,kGAAkG;IACjH,gBAAgB,EAAE,qFAAqF;IACvG,aAAa,EAAE,2DAA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