docks-kit 0.15.2 → 0.15.4
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/AGENTS.md +21 -15
- package/README.md +33 -31
- package/cli/docs/flags.md +0 -1
- package/cli/docs/install.md +41 -30
- package/cli/docs/overview.md +2 -2
- package/cli/docs/platforms.md +5 -2
- package/cli/docs/sync-layers.md +3 -4
- package/cli/docs/toolchain.md +28 -34
- package/cli/src/commands/docs.ts +3 -3
- package/cli/src/commands/sync.ts +0 -5
- package/cli/src/commands/toolchain.ts +4 -7
- package/cli/src/commands/update.ts +77 -26
- package/cli/src/engine-native/DESIGN.md +31 -22
- package/cli/src/engine-native/bun.ts +10 -8
- package/cli/src/engine-native/claudeRuntime.ts +17 -9
- package/cli/src/engine-native/claudeSync.ts +52 -24
- package/cli/src/engine-native/codexSync.ts +10 -5
- package/cli/src/engine-native/deps.ts +27 -88
- package/cli/src/engine-native/exec.ts +41 -10
- package/cli/src/engine-native/index.ts +0 -2
- package/cli/src/engine-native/modes.ts +23 -14
- package/cli/src/engine-native/os/darwin.ts +62 -0
- package/cli/src/engine-native/os/index.ts +42 -0
- package/cli/src/engine-native/os/linux.ts +62 -0
- package/cli/src/engine-native/os/targets.ts +73 -0
- package/cli/src/engine-native/os/types.ts +75 -0
- package/cli/src/engine-native/os/windows.ts +176 -0
- package/cli/src/engine-native/parseArgs.ts +0 -4
- package/cli/src/engine-native/services.ts +0 -6
- package/cli/src/engine-native/skillsSync.ts +125 -77
- package/cli/src/engine-native/toolchain.ts +4 -150
- package/cli/src/engine.ts +8 -7
- package/cli/src/generated/sotPayload.ts +6 -6
- package/cli/src/manifests.ts +12 -2
- package/docks-kit +43 -2
- package/docks-kit.ps1 +153 -0
- package/package.json +11 -7
- package/cli/src/engine-native/os.ts +0 -16
package/AGENTS.md
CHANGED
|
@@ -4,29 +4,35 @@ Canonical instructions for coding agents working on this project. Compatible wit
|
|
|
4
4
|
|
|
5
5
|
## Repository purpose
|
|
6
6
|
|
|
7
|
-
Portable configuration kit for AI coding agents. Per-tool Single Source of Truth
|
|
7
|
+
Portable configuration kit for AI coding agents. Per-tool Single Source of Truth
|
|
8
|
+
(SoT) directories deploy to each tool's user-config location through
|
|
9
|
+
`./docks-kit sync`. Clone once to get a consistent AI-assisted environment on
|
|
10
|
+
supported Linux, macOS, and Windows hosts. The kit focuses on **token efficiency
|
|
11
|
+
without sacrificing quality**. Every setting and hook minimizes token use while
|
|
12
|
+
preserving rigorous output. When you add or edit anything, ask: *does this
|
|
13
|
+
change reduce tokens without weakening correctness?*
|
|
8
14
|
|
|
9
15
|
Tool-specific instructions live alongside this file:
|
|
10
16
|
- **`CLAUDE.md`** — Claude Code SoT (`SoT/.claude/`), env vars, hooks, plugins, status line, session management, permission mode, open concerns.
|
|
11
17
|
- Codex uses this `AGENTS.md` file plus the Codex SoT under `SoT/.codex/`; no separate root `CODEX.md` is needed.
|
|
12
18
|
|
|
13
19
|
|
|
14
|
-
docks-kit runtime and standalone binary support
|
|
15
|
-
|
|
16
|
-
Bun source.
|
|
20
|
+
docks-kit runtime and standalone binary support covers Linux x64/arm64, macOS
|
|
21
|
+
x64/arm64, and Windows x64/arm64. Hosts outside this matrix fail before either
|
|
22
|
+
launcher can fall back to Bun source.
|
|
17
23
|
|
|
18
24
|
## Repository layout (cross-cutting)
|
|
19
25
|
|
|
20
26
|
| Path | Purpose |
|
|
21
27
|
|------|---------|
|
|
22
|
-
| `docks-kit` | CLI
|
|
28
|
+
| `docks-kit` / `docks-kit.ps1` | POSIX and Windows CLI launchers. On supported hosts, each runs the matching binary in `cli/dist/` only when its `--version` matches `package.json`. Otherwise it runs Bun-from-source and auto-installs Bun plus `node_modules`. Hosts outside the support matrix fail before source fallback. The standalone platform release binary provides no-Bun recovery. |
|
|
23
29
|
| `cli/src/engine-native/` | EngineNative implementation for `sync`, `model`, and `toolchain`; idempotent, flag-gated for destructive reconciliation |
|
|
24
|
-
| `cli/` | Effect 4
|
|
30
|
+
| `cli/` | Effect 4 RC CLI + bundled docs topics |
|
|
25
31
|
| `SoT/models.json` | Kit-verified Claude and Codex model catalog |
|
|
26
32
|
| `SoT/toolchain.json` | Toolchain floors manifest (verified pins consumed by EngineNative) |
|
|
27
33
|
| `SoT/.claude/bin/` | Dependency-free Bun runtime programs for Claude's statusline, SessionStart, and Notification |
|
|
28
|
-
| `install.sh` |
|
|
29
|
-
| `.github/workflows/release-cli.yml` | `cli-v*` release:
|
|
34
|
+
| `install.sh` / `install.ps1` | POSIX and Windows global installers |
|
|
35
|
+
| `.github/workflows/release-cli.yml` | `cli-v*` release: six binaries for Linux, macOS, and Windows on x64 and arm64, plus `SHA256SUMS` and npm publish |
|
|
30
36
|
| `README.md` | Front door |
|
|
31
37
|
| `package.json` / `bun.lock` | npm package: `bin` = `cli/src/main.ts`; bundles `cli/` with the generated in-memory SoT payload |
|
|
32
38
|
| `SoT/.agents/skills.txt` | Universal-skill manifest, intentionally empty by default. Adding an [agentskills.io](https://agentskills.io/specification) slug opts it into EngineNative's shared `~/.agents/skills/` bootstrap and Claude symlink. |
|
|
@@ -37,7 +43,7 @@ Bun source.
|
|
|
37
43
|
|
|
38
44
|
Codex SoT notes:
|
|
39
45
|
- `SoT/.codex/AGENTS.md` deploys to `~/.codex/AGENTS.md` as global Codex instructions.
|
|
40
|
-
- `SoT/.codex/config.toml` pins Codex to `model = "gpt-5.6-sol"`, sets normal and plan reasoning to `high` with concise summaries, and sets `model_verbosity = "low"`, `personality`, live top-level `web_search`, workspace-write sandboxing with sandboxed command network access, cross-session `memories` (+ dedicated note tools), `[agents]` subagent limits (`max_threads = 12`, `max_depth = 2` — intentionally above Codex defaults for broad parallel kit work; deeper recursion increases cost and predictability risk), a 128 KiB `project_doc_max_bytes` budget for the repo-side AGENTS.md chain (the global `~/.codex/AGENTS.md` is uncapped and not counted), and enables the
|
|
46
|
+
- `SoT/.codex/config.toml` pins Codex to `model = "gpt-5.6-sol"`, sets normal and plan reasoning to `high` with concise summaries, and sets `model_verbosity = "low"`, `personality`, live top-level `web_search`, workspace-write sandboxing with sandboxed command network access, cross-session `memories` (+ dedicated note tools), `[agents]` subagent limits (`max_threads = 12`, `max_depth = 2` — intentionally above Codex defaults for broad parallel kit work; deeper recursion increases cost and predictability risk), a 128 KiB `project_doc_max_bytes` budget for the repo-side AGENTS.md chain (the global `~/.codex/AGENTS.md` is uncapped and not counted), and enables the two Docks plugins `docks@docks` and `plan-lifecycle@docks` (the shared plan lifecycle).
|
|
41
47
|
- `SoT/.codex/rules/*.rules` deploys to `~/.codex/rules/` as kit-managed Codex command policy. This is Codex's equivalent of permission allow/prompt/block rules; user-learned approvals in `~/.codex/rules/default.rules` are preserved.
|
|
42
48
|
- `SoT/.codex/plugins/marketplace.json` deploys to Codex's personal marketplace path at `~/.agents/plugins/marketplace.json`; when the `codex` CLI is available, sync reruns `codex plugin add <plugin@marketplace>` for enabled SoT plugins so stale cached installs are refreshed.
|
|
43
49
|
- The global prompt SoTs carry the owner's standing authorization for Docks cross-company plan review, which never overrides host or platform denial.
|
|
@@ -51,12 +57,12 @@ For per-tool SoT layouts (`SoT/.claude/`, `SoT/.codex/`), see the matching SoT d
|
|
|
51
57
|
|
|
52
58
|
- **Idempotent operations.** Every EngineNative sync step must be safe to re-run. Settings merges, plugin installs, and marketplace adds are all idempotent — re-running with no SoT changes is a no-op.
|
|
53
59
|
- **Removed bash engine.** The bash engine was removed after the `bash-engine-final` tag. `DOCKS_KIT_ENGINE=bash` must fail with the removed-engine message; engine bugs are fixed forward in EngineNative.
|
|
54
|
-
- **Effect 4 CLI stack.** The CLI pins `effect@4.0.0-
|
|
55
|
-
- **Effect skill routing.** Effect work in this checkout must
|
|
56
|
-
- **Targeted syncs.** `./docks-kit sync` accepts positional targets: `claude`, `codex`, and `agents`. Use the narrowest target that matches the SoT change (for example, `./docks-kit sync codex` for Codex-only config edits); targets can be combined with `--dry-run`, `--skip-bubblewrap` (skip optional bubblewrap bootstrap for the Codex Linux sandbox), `--skip-plugin-refresh` (install missing plugins without refreshing existing caches; used by `docks-kit update`), `--reconcile`, `--prune`,
|
|
60
|
+
- **Effect 4 CLI stack.** The CLI pins `effect@4.0.0-rc.109` (including `effect/unstable/cli`), `@effect/platform-bun@4.0.0-rc.109` (`BunServices.layer`, `BunRuntime.runMain`), `@effect/vitest@4.0.0-rc.109`, and `vitest@4.1.10` (required by the `@effect/vitest` peer range). `@effect/cli` and `@effect/platform` are removed and must not be reintroduced.
|
|
61
|
+
- **Effect skill routing.** Effect work in this checkout must verify migration and API call shapes against the installed declarations under `node_modules/effect/dist/unstable/cli/`, never from memory or a mutable dist-tag. The `effect-ts-setup`, `effect-ts-port`, and `effect-ts-specialist` skills target Effect 3.x and do not apply.
|
|
62
|
+
- **Targeted syncs.** `./docks-kit sync` accepts positional targets: `claude`, `codex`, and `agents`. Use the narrowest target that matches the SoT change (for example, `./docks-kit sync codex` for Codex-only config edits); targets can be combined with `--dry-run`, `--skip-bubblewrap` (skip optional bubblewrap bootstrap for the Codex Linux sandbox), `--skip-plugin-refresh` (install missing plugins without refreshing existing caches; used by `docks-kit update`), `--reconcile`, `--prune`, and the deploy-time modifiers `--claude-compact-window=<tokens>` / `--claude-permissive` / `--claude-model=<m>` / `--claude-effort=<level>` / `--claude-advisor=<on|off|default>` / `--codex-model=<m>` / `--codex-effort=<level>` (see `CLAUDE.md` § Deploy-time modifiers).
|
|
57
63
|
- **Additive by default.** Keys present in deployed config but absent from SoT are preserved on default sync. This protects user-only additions, but means drift accumulates — neither flag-less reset can clean it up. The one exception is the Claude `removed` manifest (`claude::_removed_manifest`), a curated list of unambiguous kit-owned artifacts that `claude::sync_removals` force-prunes on every sync, including the home-relative `~/.local/bin/session-relay` artifact installed outside `~/.claude`; see `CLAUDE.md` § Pruning stale artifacts.
|
|
58
64
|
- **`--reconcile` / `--prune` are the kit-owned reconcile flags.** Orthogonal — `--reconcile` reconciles the settings layer (SoT-declared keys/tables/arrays win; user-only keys and nested objects are preserved; permissions arrays are replaced wholesale by SoT). `--prune` uninstalls kit-managed installations not in the SoT (plugins, marketplaces, and `~/.agents/skills/*` entries tracked in `~/.agents/.kit-managed-skills`). Combine for a full reset to SoT's kit-managed scope. User-only additions outside the kit's scope (custom env vars, mcpServers, manually-installed skills, third-party plugins not declared in SoT) are always preserved. Each tool's per-tool file documents the specific paths and diff recipes.
|
|
59
|
-
- **SOLID-aligned modules.** `cli/src/engine-native/parseArgs.ts` owns flag parsing/validation. `toolchain.ts` owns
|
|
65
|
+
- **SOLID-aligned modules.** `cli/src/engine-native/parseArgs.ts` owns flag parsing/validation. `toolchain.ts` owns verified-version floor reporting over `SoT/toolchain.json`; `bun.ts` owns the shared, memoized Bun bootstrap; `claudeRuntime.ts` owns Claude settings materialization. `claudeSync.ts`, `codexSync.ts`, and `skillsSync.ts` own tool-specific sync logic. `index.ts` is the thin orchestrator. The public CLI seam is `cli/src/engine.ts`.
|
|
60
66
|
- **Small, reviewable changes.** Bundled multi-concern PRs are harder to review and revert. Split an engine/CLI change and a per-tool config change unless the change requires atomicity.
|
|
61
67
|
- **Dry-run before destructive flags.** Always preview with `./docks-kit sync --dry-run` (or the relevant `diff <(jq -S …)` recipe in the per-tool file) before invoking `--reconcile` or `--prune`. User-added permissions / env vars / plugins absent from SoT will be discarded.
|
|
62
68
|
- **SoT prompt files are rules, not explanation.** `SoT/.claude/CLAUDE.md` and `SoT/.codex/AGENTS.md` are loaded into every agent session's prompt context — every line costs prompt tokens on every turn for every user. Restrict their content to rules, heuristics, and `<constraint>` blocks the agent must *act on* during a turn. Do NOT add inline source citations (`Source: …`, attributed quotes), "why this rule exists" preface text, version-watermarking trivia (e.g. "Distilled from X v2.0, captured 2025-11-07"), per-bug workarounds, or installation instructions. Provenance, motivation, and historical context belong in `CLAUDE.md` / `AGENTS.md` at the repo root (humans read once) or in commit messages — never in the SoT. For every line, apply the official test: would removing it cause the agent to make mistakes? If not, cut it — over-instruction degrades adherence on current frontier models.
|
|
@@ -71,8 +77,8 @@ For per-tool SoT layouts (`SoT/.claude/`, `SoT/.codex/`), see the matching SoT d
|
|
|
71
77
|
|
|
72
78
|
- No secrets in SoT. The kit's SoT directories are committed; treat them as declarative config only.
|
|
73
79
|
- Treat external plugin marketplaces and installer downloads as untrusted input. Prefer download-then-run over `curl … | bash` so a truncated stream cannot execute a partial script.
|
|
74
|
-
- **Pin, never float.** Every kit-driven install is pinned to a `SoT/toolchain.json` `verified` version
|
|
75
|
-
|
|
80
|
+
- **Pin, never float.** Every kit-driven install of third-party software is pinned to a `SoT/toolchain.json` `verified` version — no `@latest` npm/bun installs (Shai-Hulud-class worm surface), no mutable action tags in workflows (commit SHAs only), installer scripts fetched from version tags where upstream supports it. New third-party install surface ⇒ manifest pin first. Details: the `toolchain-context` skill and `cli/docs/toolchain.md`.
|
|
81
|
+
- **One exemption: the kit's own package.** `install.sh` and `install.ps1` end with `bun add -g docks-kit@latest`, because a global installer that pinned itself would install a fixed old kit forever, and pinning it to `package.json` would request an unpublished version between the release-prep commit and the npm publish. The exemption covers `docks-kit` alone. Both installers still pin the Bun installer they download to the manifest's verified version, and `cli/test/unit/install.test.ts` asserts that pin in all four launcher and installer scripts.
|
|
76
82
|
## Testing
|
|
77
83
|
|
|
78
84
|
Automated coverage includes `bun run test:unit`, `bun run golden:dryrun`, and `bun run golden:mutation`; prove-red modes must exit non-zero after detecting planted mismatches. Also verify user-facing changes via `./docks-kit sync --dry-run`, per-tool sanity (`/doctor`, `/plugin`, etc.), and `diff <(jq -S . <SoT>) <(jq -S . <deployed>)` recipes from the per-tool file.
|
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# docks-kit
|
|
2
2
|
|
|
3
3
|
Portable configuration kit for AI coding agents. Per-tool **Single Source of
|
|
4
|
-
Truth (SoT)** directories
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
Truth (SoT)** directories deploy to each tool's user-config location. Clone
|
|
5
|
+
once to get a consistent AI-assisted environment on supported Linux, macOS,
|
|
6
|
+
and Windows machines. Tuned for **token efficiency without sacrificing quality**.
|
|
7
7
|
|
|
8
8
|
Supported tools: **Claude Code**, **Codex**, and any agent consuming
|
|
9
9
|
[agentskills.io](https://agentskills.io) universal skills.
|
|
@@ -17,15 +17,15 @@ cd ~/projects/public
|
|
|
17
17
|
./docks-kit status # doctor view: drift, toolchain, plugins, skills
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
code.
|
|
20
|
+
POSIX hosts use the `./docks-kit` launcher on x64 and arm64. Windows uses
|
|
21
|
+
`.\docks-kit.ps1` on x64 and arm64. Each launcher prefers the matching compiled
|
|
22
|
+
binary in `cli/dist/` only when its version matches the checkout. Otherwise it
|
|
23
|
+
runs from source via Bun and auto-installs Bun plus dependencies when needed.
|
|
24
|
+
Hosts outside this matrix fail immediately and never fall back to Bun source.
|
|
25
|
+
Stale ignored build artifacts cannot mask newer checkout code.
|
|
26
26
|
|
|
27
|
-
Other install paths
|
|
28
|
-
|
|
27
|
+
Other install paths include global `bun add -g docks-kit`, the POSIX curl
|
|
28
|
+
installer, and the Windows PowerShell installer. See `./docks-kit docs install`.
|
|
29
29
|
|
|
30
30
|
**No-Bun recovery path**:
|
|
31
31
|
|
|
@@ -33,9 +33,10 @@ Download the platform release binary from GitHub Releases and run it directly.
|
|
|
33
33
|
The executable carries the generated sync payload; no checkout or adjacent
|
|
34
34
|
`SoT/` directory is required.
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
`jq` is optional doctor/test tooling. `curl`
|
|
38
|
-
|
|
36
|
+
Source and global installs require Bun. npm-global tools require Node/npm.
|
|
37
|
+
`jq` is optional doctor/test tooling. `curl` downloads Bun only when a source
|
|
38
|
+
launcher needs it. POSIX runs `install.sh`; Windows runs `install.ps1` through
|
|
39
|
+
PowerShell.
|
|
39
40
|
|
|
40
41
|
## CLI
|
|
41
42
|
|
|
@@ -52,12 +53,12 @@ docks-kit docs [topic] self-documentation (9 topics)
|
|
|
52
53
|
--help --version --wizard --completions built-in
|
|
53
54
|
```
|
|
54
55
|
|
|
55
|
-
The CLI is a typed Effect 4
|
|
56
|
+
The CLI is a typed Effect 4 RC front-end on Bun; all mutation runs through
|
|
56
57
|
EngineNative in `cli/src/engine-native/`, with golden-regression coverage for
|
|
57
58
|
dry-run output, mutation snapshots, and argv logs. Its dependency graph is
|
|
58
|
-
`effect@4.0.0-
|
|
59
|
-
`@effect/platform-bun@4.0.0-
|
|
60
|
-
`BunRuntime.runMain`), `@effect/vitest@4.0.0-
|
|
59
|
+
`effect@4.0.0-rc.109` (including `effect/unstable/cli`),
|
|
60
|
+
`@effect/platform-bun@4.0.0-rc.109` (`BunServices.layer` and
|
|
61
|
+
`BunRuntime.runMain`), `@effect/vitest@4.0.0-rc.109`, and `vitest@4.1.10`
|
|
61
62
|
(required by the `@effect/vitest` peer range). `@effect/cli` and
|
|
62
63
|
`@effect/platform` are removed: neither has a 4.x release, the CLI API moved
|
|
63
64
|
into core, and the standalone platform package was unused here.
|
|
@@ -76,7 +77,6 @@ into core, and the standalone platform package was unused here.
|
|
|
76
77
|
| `--codex-model=<m>` | Deploy-time modifier: deployed Codex model |
|
|
77
78
|
| `--skip-bubblewrap` | Skip optional bubblewrap bootstrap (Codex Linux sandbox) |
|
|
78
79
|
| `--skip-plugin-refresh` | Install missing plugins but skip refresh-only updates (used automatically by `docks-kit update`) |
|
|
79
|
-
| `--yes` | Auto-accept toolchain prompts (CI/containers) |
|
|
80
80
|
|
|
81
81
|
**Deploy-time modifiers** change deployed config only — the SoT is untouched
|
|
82
82
|
and a later flag-less sync reverts them. Full reference: `docks-kit docs flags`
|
|
@@ -88,11 +88,10 @@ and a later flag-less sync reverts them. Full reference: `docks-kit docs flags`
|
|
|
88
88
|
survive a plain sync. Reconciliation toward the SoT is explicit
|
|
89
89
|
(`--reconcile` / `--prune`).
|
|
90
90
|
- **Idempotent** — every step is safe to re-run; no-change syncs are no-ops.
|
|
91
|
-
- **Toolchain floors** —
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
when possible). `docks-kit toolchain check` shows the full table.
|
|
91
|
+
- **Toolchain floors** — `SoT/toolchain.json` records the kit-verified version
|
|
92
|
+
floors for external tools (bun, bwrap, …). `docks-kit toolchain check` prints
|
|
93
|
+
the full doctor table. Bun is the one managed install and is pinned to its
|
|
94
|
+
verified version.
|
|
96
95
|
- **Model catalog** — `SoT/models.json` is the research-verified source for
|
|
97
96
|
model validation, listings, and pickers.
|
|
98
97
|
- **Claude runtime** — sync materializes three dependency-free Bun `.mjs`
|
|
@@ -112,9 +111,9 @@ and a later flag-less sync reverts them. Full reference: `docks-kit docs flags`
|
|
|
112
111
|
| `SoT/toolchain.json` | Verified-version floors |
|
|
113
112
|
| `cli/src/engine-native/` | EngineNative sync/model/toolchain implementation |
|
|
114
113
|
| `cli/src/generated/sotPayload.ts` | Generated in-memory payload used by standalone and npm installs |
|
|
115
|
-
| `cli/` | docks-kit CLI (Effect 4
|
|
116
|
-
| `docks-kit` |
|
|
117
|
-
| `install.sh`
|
|
114
|
+
| `cli/` | docks-kit CLI (Effect 4 RC on Bun) + bundled docs topics |
|
|
115
|
+
| `docks-kit` / `docks-kit.ps1` | POSIX and Windows launchers (binary → Bun-from-source) |
|
|
116
|
+
| `install.sh` / `install.ps1` | POSIX and Windows global installers |
|
|
118
117
|
| `docs/plans/` | Multi-commit work-item plans |
|
|
119
118
|
| `AGENTS.md` / `CLAUDE.md` | Agent-facing engineering rules / Claude Code specifics |
|
|
120
119
|
|
|
@@ -126,15 +125,18 @@ and a later flag-less sync reverts them. Full reference: `docks-kit docs flags`
|
|
|
126
125
|
| Linux | arm64 | ✅ | ✅ native |
|
|
127
126
|
| macOS | x64 | ✅ | ✅ native |
|
|
128
127
|
| macOS | arm64 | ✅ | ✅ native |
|
|
128
|
+
| Windows | x64 | ✅ | ✅ native |
|
|
129
|
+
| Windows | arm64 | ✅ | ✅ native |
|
|
129
130
|
|
|
130
131
|
Details: `docks-kit docs platforms`.
|
|
131
132
|
|
|
132
133
|
## Releases
|
|
133
134
|
|
|
134
|
-
Tagging `cli-v*` builds
|
|
135
|
-
x64
|
|
136
|
-
publishes the exact package tarball through trusted publishing
|
|
137
|
-
|
|
135
|
+
Tagging `cli-v*` builds six standalone binaries for Linux, macOS, and Windows
|
|
136
|
+
on x64 and arm64. The workflow attaches them plus `SHA256SUMS` to the GitHub
|
|
137
|
+
release. npm publishes the exact package tarball through trusted publishing
|
|
138
|
+
with OIDC provenance.
|
|
139
|
+
Package `docks-kit` 0.15.4 bundles the CLI + generated payload, so npm releases
|
|
138
140
|
are versioned config snapshots without shipping the authoring `SoT/` tree.
|
|
139
141
|
|
|
140
142
|
## Deeper docs
|
package/cli/docs/flags.md
CHANGED
|
@@ -20,7 +20,6 @@ docks-kit sync claude agents # two
|
|
|
20
20
|
| `--prune` | Uninstall kit-managed installs not in SoT: plugins, marketplaces, universal skills |
|
|
21
21
|
| `--skip-bubblewrap` | Skip optional bubblewrap bootstrap (Codex Linux sandbox) |
|
|
22
22
|
| `--skip-plugin-refresh` | Install missing Claude/Codex plugins but skip refresh-only updates; `docks-kit update` uses this automatically |
|
|
23
|
-
| `--yes` | Auto-accept toolchain above-verified prompts (containers/CI) |
|
|
24
23
|
| `--verbose` / `-v` | Also print no-op confirmations (already in sync, up to date, left as-is); accepted on `sync`, `model`, and `toolchain` |
|
|
25
24
|
|
|
26
25
|
## Environment overrides
|
package/cli/docs/install.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Installing docks-kit
|
|
2
2
|
|
|
3
|
-
Supported hosts are Linux x64/arm64 and
|
|
4
|
-
fail before
|
|
3
|
+
Supported hosts are Linux x64/arm64, macOS x64/arm64, and Windows x64/arm64.
|
|
4
|
+
Hosts outside this matrix fail before a launcher can fall back to Bun source.
|
|
5
5
|
|
|
6
6
|
## 1. Repo checkout (development / current users)
|
|
7
7
|
|
|
@@ -11,13 +11,13 @@ cd ~/projects/public
|
|
|
11
11
|
./docks-kit sync
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
`cli/dist/` only when its reported
|
|
16
|
-
back to Bun-from-source
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
POSIX hosts use `./docks-kit`. Windows uses `.\docks-kit.ps1`. Each
|
|
15
|
+
launcher prefers a compiled binary in `cli/dist/` only when its reported
|
|
16
|
+
version matches `package.json`. It then falls back to Bun-from-source and
|
|
17
|
+
auto-installs Bun plus `node_modules` when needed. Each launcher reports and
|
|
18
|
+
bypasses an ignored stale build.
|
|
19
19
|
|
|
20
|
-
## 2. Global via Bun
|
|
20
|
+
## 2. Global via Bun
|
|
21
21
|
|
|
22
22
|
```
|
|
23
23
|
bun add -g docks-kit@latest
|
|
@@ -31,31 +31,27 @@ are versioned config snapshots without publishing the authoring `SoT/` tree.
|
|
|
31
31
|
Kit-home resolution remains available for checkout/package update behavior and
|
|
32
32
|
display paths, but sync reads do not depend on it.
|
|
33
33
|
|
|
34
|
-
### Bun 1.
|
|
34
|
+
### Bun 1.4.0 install output
|
|
35
35
|
|
|
36
|
-
A supported global install
|
|
36
|
+
A supported global install completes with no blocked postinstall: `bun pm -g
|
|
37
|
+
untrusted` reports zero untrusted dependencies with scripts. Neither
|
|
38
|
+
`@parcel/watcher` nor `esbuild` is in the consumer graph. The graph does carry
|
|
39
|
+
one package with an `install` script, `msgpackr-extract` by way of
|
|
40
|
+
`effect > msgpackr`, and Bun raises no trust prompt for it.
|
|
37
41
|
|
|
38
|
-
|
|
39
|
-
Blocked 1 postinstall. Run `bun pm -g untrusted` for details.
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
For the pinned production dependency graph, the diagnostic names only:
|
|
42
|
+
The install does print one expected warning:
|
|
43
43
|
|
|
44
44
|
```
|
|
45
|
-
|
|
46
|
-
» [install]: node scripts/build-from-source.js
|
|
45
|
+
warn: incorrect peer dependency "effect@4.0.0-rc.109"
|
|
47
46
|
```
|
|
48
47
|
|
|
49
|
-
`@
|
|
50
|
-
installs
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
install; `docks-kit --version`, model catalogs, toolchain checks, and real sync
|
|
55
|
-
remain functional with the script blocked. CI pins the one-package/one-command
|
|
56
|
-
identity above and will fail if the script-bearing set changes.
|
|
48
|
+
`@effect/platform-bun` resolves `@effect/platform-node-shared` through a caret
|
|
49
|
+
range, which installs rc.111, and that release declares a peer requirement of
|
|
50
|
+
`effect@^4.0.0-rc.111`. The kit pins `effect@4.0.0-rc.109` deliberately, so this
|
|
51
|
+
newer transitive peer range cannot be satisfied. `docks-kit --version`, model
|
|
52
|
+
catalogs, toolchain checks, and real sync are unaffected.
|
|
57
53
|
|
|
58
|
-
## 3. curl installer (
|
|
54
|
+
## 3. curl installer (POSIX)
|
|
59
55
|
|
|
60
56
|
```
|
|
61
57
|
curl -fsSL https://raw.githubusercontent.com/DocksDocks/public/main/install.sh -o /tmp/docks-kit-install.sh
|
|
@@ -64,8 +60,22 @@ bash /tmp/docks-kit-install.sh && rm /tmp/docks-kit-install.sh
|
|
|
64
60
|
|
|
65
61
|
Download-then-run, never `curl | bash` — stream truncation has bitten this
|
|
66
62
|
kit before. The installer bootstraps Bun when absent, runs
|
|
67
|
-
`bun add -g docks-kit`, and links the binary into `~/.local/bin`.
|
|
68
|
-
This installer
|
|
63
|
+
`bun add -g docks-kit@latest`, and links the binary into `~/.local/bin`.
|
|
64
|
+
This installer serves the two POSIX platforms. Windows uses the PowerShell
|
|
65
|
+
installer below.
|
|
66
|
+
|
|
67
|
+
## 4. PowerShell installer (Windows)
|
|
68
|
+
|
|
69
|
+
```powershell
|
|
70
|
+
Invoke-WebRequest https://raw.githubusercontent.com/DocksDocks/public/main/install.ps1 -OutFile "$env:TEMP\docks-kit-install.ps1"
|
|
71
|
+
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$env:TEMP\docks-kit-install.ps1"
|
|
72
|
+
Remove-Item "$env:TEMP\docks-kit-install.ps1"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Download the script before execution. Never stream it into PowerShell. The
|
|
76
|
+
installer bootstraps Bun when absent. It then runs
|
|
77
|
+
`bun add -g docks-kit@latest` and copies the CLI plus Bun into
|
|
78
|
+
`%USERPROFILE%\.local\bin`.
|
|
69
79
|
|
|
70
80
|
## Keeping the kit up to date
|
|
71
81
|
|
|
@@ -114,6 +124,7 @@ sync/config reads.
|
|
|
114
124
|
- Bun for source/global installs; release binaries embed the runtime
|
|
115
125
|
- Node/npm for npm-global LSP servers
|
|
116
126
|
- jq is optional doctor/test tooling; sync has no jq runtime dependency
|
|
117
|
-
- curl is required only when a
|
|
118
|
-
|
|
127
|
+
- curl is required only when a source launcher must download Bun. The POSIX
|
|
128
|
+
launchers run `install.sh`; Windows runs `install.ps1` through PowerShell.
|
|
129
|
+
An already-present Bun does not require curl.
|
|
119
130
|
- See `docks-kit toolchain check` for the full picture on this machine
|
package/cli/docs/overview.md
CHANGED
|
@@ -16,8 +16,8 @@ AI-assisted dev environment on every machine.
|
|
|
16
16
|
| `SoT/toolchain.json` | Verified-version floors for external tools (see `docks-kit docs toolchain`) |
|
|
17
17
|
| `cli/src/generated/sotPayload.ts` | Deterministic generated payload embedded in standalone/npm execution |
|
|
18
18
|
| `cli/src/engine-native/` | EngineNative mutation logic for sync/model/toolchain |
|
|
19
|
-
| `cli/` | This CLI (Effect 4
|
|
20
|
-
| `docks-kit` |
|
|
19
|
+
| `cli/` | This CLI (Effect 4 RC on Bun) plus bundled docs |
|
|
20
|
+
| `docks-kit` / `docks-kit.ps1` | POSIX and Windows launchers: version-matching compiled binary → Bun-from-source, with Bun auto-install |
|
|
21
21
|
|
|
22
22
|
## Design rules
|
|
23
23
|
|
package/cli/docs/platforms.md
CHANGED
|
@@ -8,9 +8,12 @@ The supported host matrix is exact:
|
|
|
8
8
|
| Linux | arm64 | `docks-kit-linux-arm64` | EngineNative (TS) |
|
|
9
9
|
| macOS | x64 | `docks-kit-darwin-x64` | EngineNative (TS) |
|
|
10
10
|
| macOS | arm64 | `docks-kit-darwin-arm64` | EngineNative (TS) |
|
|
11
|
+
| Windows | x64 | `docks-kit-windows-x64.exe` | EngineNative (TS) |
|
|
12
|
+
| Windows | arm64 | `docks-kit-windows-arm64.exe` | EngineNative (TS) |
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
Bun
|
|
14
|
+
POSIX hosts use the `docks-kit` launcher. Windows uses `docks-kit.ps1`.
|
|
15
|
+
Hosts outside this table fail before either launcher can fall back to Bun
|
|
16
|
+
source.
|
|
14
17
|
|
|
15
18
|
EngineNative is the only supported engine on supported hosts.
|
|
16
19
|
`DOCKS_KIT_ENGINE=bash` exits with the removed-engine message and points at the
|
package/cli/docs/sync-layers.md
CHANGED
|
@@ -17,8 +17,8 @@ Order matters — runtime readiness and settings form one transaction:
|
|
|
17
17
|
unioned, user-only keys survive. `--reconcile` replaces permissions arrays
|
|
18
18
|
wholesale instead.
|
|
19
19
|
4. **Removed-artifact pruning** — prune old shell assets, the Stop hook, stale
|
|
20
|
-
kit-owned settings, retired kit-owned plugin enablement, and
|
|
21
|
-
`~/.local/bin
|
|
20
|
+
kit-owned settings, retired kit-owned plugin enablement, and every
|
|
21
|
+
manifest-listed kit-owned `~/.local/bin` command. A flag-less sync removes
|
|
22
22
|
`advisorModel`; an explicit advisor state excludes only that key so the
|
|
23
23
|
modifier owns it.
|
|
24
24
|
5. **Deploy-time modifiers** (`--claude-compact-window`, `--claude-permissive`,
|
|
@@ -43,8 +43,7 @@ and `codex plugin add` refresh.
|
|
|
43
43
|
|
|
44
44
|
## agents (→ ~/.agents/skills, ~/.claude/skills symlinks)
|
|
45
45
|
|
|
46
|
-
`npx skills add` per missing manifest slug, Claude symlink healing,
|
|
47
|
-
the effect-solutions CLI (toolchain-gated), and the
|
|
46
|
+
`npx skills add` per missing manifest slug, Claude symlink healing, and the
|
|
48
47
|
kit-managed snapshot that `--prune` reconciles against.
|
|
49
48
|
|
|
50
49
|
## Reconcile flags
|
package/cli/docs/toolchain.md
CHANGED
|
@@ -4,53 +4,47 @@
|
|
|
4
4
|
|
|
5
5
|
| Field | Meaning |
|
|
6
6
|
|-------|---------|
|
|
7
|
-
| `kind` | `check` (doctor visibility) / `managed` (kit
|
|
8
|
-
| `policy` |
|
|
9
|
-
| `floor` | Minimum acceptable version
|
|
10
|
-
| `verified` | Last kit-tested version
|
|
7
|
+
| `kind` | `check` (doctor visibility) / `managed` (kit-managed install) / `pin` (no binary — a version pin for npx-invoked tools, e.g. `skills-cli`) |
|
|
8
|
+
| `policy` | Installation policy; `present` installs when missing and never upgrades |
|
|
9
|
+
| `floor` | Minimum acceptable version shown in the doctor table |
|
|
10
|
+
| `verified` | Last kit-tested version and the exact pin for kit-driven installs |
|
|
11
11
|
| `pinnable` | Whether an exact version can be installed |
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- **TTY**: prompt — "X <latest> is not kit-verified (verified: <v>). Install anyway? [y/N]"
|
|
18
|
-
- **`--yes`**: proceed with a warning (containers/CI)
|
|
19
|
-
- **non-TTY, declined**:
|
|
20
|
-
- install mode (tool missing) + pinnable → install the pinned `verified` version
|
|
21
|
-
- upgrade mode → stay on the installed version, warn
|
|
22
|
-
|
|
23
|
-
At or below `verified`, installs/upgrades run silently. After testing a new
|
|
24
|
-
release, bump `verified` in SoT/toolchain.json — that is the "this version is
|
|
25
|
-
now kit-approved" act.
|
|
13
|
+
`docks-kit toolchain check` reports each installed version against the
|
|
14
|
+
manifest's `floor` and `verified` columns.
|
|
15
|
+
Before running `bun install --frozen-lockfile`, the checkout launchers reject Bun versions below the manifest's `floor` and direct the user to `bun upgrade`.
|
|
16
|
+
Their generated Bun floor is intentionally separate from the generated `verified` pin: the floor gates lockfile compatibility, while the verified pin selects the exact release for kit-driven installs.
|
|
26
17
|
|
|
27
18
|
## Managed tools
|
|
28
19
|
|
|
29
|
-
- **bun** — policy `present`:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
20
|
+
- **bun** — policy `present`: installed from the pinned `verified` release and
|
|
21
|
+
never auto-upgraded. `bun.ts` `bunBootstrap` owns one per-engine-run memo
|
|
22
|
+
shared by the Claude runtime and direct `toolchain ensure bun` on every
|
|
23
|
+
supported host. The POSIX modules download `install.sh` with curl and run it
|
|
24
|
+
with Bash. The Windows module downloads `install.ps1` with curl and runs it
|
|
25
|
+
through `powershell.exe`.
|
|
35
26
|
|
|
36
27
|
jq and curl are `check` rows, not global prerequisites. jq is not consumed by
|
|
37
|
-
normal sync. curl is checked only when a requested
|
|
38
|
-
|
|
28
|
+
normal sync. curl is checked only when a requested Bun bootstrap must download
|
|
29
|
+
an installer. An already-present Bun skips that download on every host.
|
|
39
30
|
|
|
40
31
|
## Supply-chain stance
|
|
41
32
|
|
|
42
|
-
Every kit-driven install is pinned to a
|
|
43
|
-
never floating `@latest` (the
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
33
|
+
Every kit-driven install of third-party software is pinned to a
|
|
34
|
+
`SoT/toolchain.json` `verified` version — never floating `@latest` (the
|
|
35
|
+
npm-worm / Shai-Hulud attack surface). That includes the
|
|
36
|
+
`npx skills@<verified>` invocations on agents sync and the release workflow
|
|
37
|
+
(actions pinned to commit SHAs, exact bun/npm versions).
|
|
38
|
+
|
|
39
|
+
The kit's own package is the single exemption. `install.sh` and `install.ps1`
|
|
40
|
+
end with `bun add -g docks-kit@latest` because a global installer that pinned
|
|
41
|
+
itself would install a fixed old kit forever. The exemption covers `docks-kit`
|
|
42
|
+
alone; both installers still pin the Bun installer they download to the
|
|
43
|
+
manifest's `verified` version.
|
|
48
44
|
|
|
49
45
|
## Commands
|
|
50
46
|
|
|
51
47
|
```text
|
|
52
48
|
docks-kit toolchain check # doctor table (also inside docks-kit status)
|
|
53
|
-
docks-kit toolchain ensure bun # ensure
|
|
54
|
-
docks-kit toolchain ensure effect-solutions # ensure the other supported managed tool
|
|
55
|
-
docks-kit sync --yes # unattended: auto-accept gates
|
|
49
|
+
docks-kit toolchain ensure bun # ensure the only managed tool
|
|
56
50
|
```
|
package/cli/src/commands/docs.ts
CHANGED
|
@@ -17,10 +17,10 @@ const TOPICS: Record<string, { summary: string; body: string }> = {
|
|
|
17
17
|
"flags": { summary: "Full flag reference incl. the old→new rename table", body: flags },
|
|
18
18
|
"modifiers": { summary: "Deploy-time modifiers and the flag-less-sync-reverts contract", body: modifiers },
|
|
19
19
|
"models": { summary: "Model catalog, validation rules, model get/set", body: models },
|
|
20
|
-
"toolchain": { summary: "Verified-version floors
|
|
20
|
+
"toolchain": { summary: "Verified-version floors and the doctor table", body: toolchain },
|
|
21
21
|
"plugins": { summary: "enabledPlugins tri-state + optional plugin opt-ins", body: plugins },
|
|
22
|
-
"install": { summary: "Install paths: repo checkout, bun add -g,
|
|
23
|
-
"platforms": { summary: "Platform support: Linux
|
|
22
|
+
"install": { summary: "Install paths: repo checkout, bun add -g, POSIX/Windows installers", body: install },
|
|
23
|
+
"platforms": { summary: "Platform support: Linux, macOS, and Windows on x64 and arm64", body: platforms }
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
const topic = Argument.string("topic").pipe(
|
package/cli/src/commands/sync.ts
CHANGED
|
@@ -52,9 +52,6 @@ const skipBubblewrap = Flag.boolean("skip-bubblewrap").pipe(
|
|
|
52
52
|
const skipPluginRefresh = Flag.boolean("skip-plugin-refresh").pipe(
|
|
53
53
|
Flag.withDescription("Install missing plugins but skip refresh-only updates for existing plugins")
|
|
54
54
|
)
|
|
55
|
-
const yes = Flag.boolean("yes").pipe(
|
|
56
|
-
Flag.withDescription("Auto-accept toolchain prompts (containers/CI)")
|
|
57
|
-
)
|
|
58
55
|
const verbose = Flag.boolean("verbose").pipe(
|
|
59
56
|
Flag.withAlias("v"),
|
|
60
57
|
Flag.withDescription("Also print no-op confirmations (already in sync, up to date, left as-is)")
|
|
@@ -102,7 +99,6 @@ export const syncCommand = Command.make(
|
|
|
102
99
|
prune,
|
|
103
100
|
skipBubblewrap,
|
|
104
101
|
skipPluginRefresh,
|
|
105
|
-
yes,
|
|
106
102
|
verbose,
|
|
107
103
|
claudeModel,
|
|
108
104
|
claudeEffort,
|
|
@@ -128,7 +124,6 @@ export const syncCommand = Command.make(
|
|
|
128
124
|
if (config.prune) args.push("--prune")
|
|
129
125
|
if (config.skipBubblewrap) args.push("--skip-bubblewrap")
|
|
130
126
|
if (config.skipPluginRefresh) args.push("--skip-plugin-refresh")
|
|
131
|
-
if (config.yes) args.push("--yes")
|
|
132
127
|
if (config.verbose) args.push("--verbose")
|
|
133
128
|
if (config.claudePermissive) args.push("--claude-permissive")
|
|
134
129
|
Option.map(config.claudeModel, (m) => args.push(`--claude-model=${m}`))
|
|
@@ -2,7 +2,7 @@ import { Argument, Command, Flag } from "effect/unstable/cli"
|
|
|
2
2
|
import { Effect, Option } from "effect"
|
|
3
3
|
import { bail, engine } from "../engine"
|
|
4
4
|
|
|
5
|
-
const MANAGED = ["bun"
|
|
5
|
+
const MANAGED = ["bun"]
|
|
6
6
|
|
|
7
7
|
const op = Argument.string("op").pipe(
|
|
8
8
|
Argument.withDescription("check (default) | ensure <tool>"),
|
|
@@ -12,18 +12,15 @@ const tool = Argument.string("tool").pipe(
|
|
|
12
12
|
Argument.withDescription(`Managed tool for ensure: ${MANAGED.join(", ")}`),
|
|
13
13
|
Argument.optional
|
|
14
14
|
)
|
|
15
|
-
const yes = Flag.boolean("yes").pipe(
|
|
16
|
-
Flag.withDescription("Auto-accept above-verified installs")
|
|
17
|
-
)
|
|
18
15
|
const verbose = Flag.boolean("verbose").pipe(
|
|
19
16
|
Flag.withAlias("v"),
|
|
20
17
|
Flag.withDescription("Also print no-op confirmations (present, up to date)")
|
|
21
18
|
)
|
|
22
19
|
|
|
23
|
-
export const toolchainCommand = Command.make("toolchain", { op, tool,
|
|
20
|
+
export const toolchainCommand = Command.make("toolchain", { op, tool, verbose }, (config) =>
|
|
24
21
|
Effect.gen(function* () {
|
|
25
22
|
const operation = Option.getOrElse(config.op, () => "check")
|
|
26
|
-
const flags =
|
|
23
|
+
const flags = config.verbose ? ["--verbose"] : []
|
|
27
24
|
|
|
28
25
|
switch (operation) {
|
|
29
26
|
case "check":
|
|
@@ -41,6 +38,6 @@ export const toolchainCommand = Command.make("toolchain", { op, tool, yes, verbo
|
|
|
41
38
|
})
|
|
42
39
|
).pipe(
|
|
43
40
|
Command.withDescription(
|
|
44
|
-
"Verified-version floors for external tools (SoT/toolchain.json): check prints the doctor table; ensure installs
|
|
41
|
+
"Verified-version floors for external tools (SoT/toolchain.json): check prints the doctor table; ensure installs one managed tool when it is missing."
|
|
45
42
|
)
|
|
46
43
|
)
|