docks-kit 0.21.1 → 0.22.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/AGENTS.md +6 -5
- package/README.md +5 -6
- package/cli/docs/command-guards.md +8 -0
- package/cli/docs/flags.md +3 -1
- package/cli/docs/install.md +1 -1
- package/cli/docs/platforms.md +6 -4
- package/cli/src/checklistPrompt.ts +464 -0
- package/cli/src/commands/docs.ts +1 -1
- package/cli/src/commands/harnesses.ts +20 -11
- package/cli/src/engine-native/DESIGN.md +4 -3
- package/cli/src/engine-native/os/targets.ts +3 -11
- package/cli/src/engine-native/os/windows.ts +1 -1
- package/cli/src/engine.ts +1 -1
- package/cli/src/generated/sotPayload.ts +3 -3
- package/cli/src/terminalCells.ts +191 -0
- package/docks-kit +1 -2
- package/docks-kit.ps1 +1 -2
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -21,7 +21,7 @@ Tool-specific instructions live alongside this file:
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
docks-kit runtime and standalone binary support covers Linux x64/arm64, macOS
|
|
24
|
-
|
|
24
|
+
arm64, and Windows x64. Hosts outside this matrix fail before either
|
|
25
25
|
launcher can fall back to Bun source.
|
|
26
26
|
|
|
27
27
|
## Repository layout (cross-cutting)
|
|
@@ -29,10 +29,11 @@ launcher can fall back to Bun source.
|
|
|
29
29
|
| Path | Purpose |
|
|
30
30
|
|------|---------|
|
|
31
31
|
| `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`, and the mismatch warning names the rebuild remedy. A launcher never deletes a binary: on a host without Bun it is the only remaining recovery path. Hosts outside the support matrix fail before source fallback. The standalone platform release binary provides no-Bun recovery. |
|
|
32
|
-
| `cli/build-binaries.sh` | Compiles the
|
|
32
|
+
| `cli/build-binaries.sh` | Compiles the four release binaries (`docks-kit-linux-x64`, `docks-kit-linux-arm64`, `docks-kit-darwin-arm64`, `docks-kit-windows-x64.exe`). It checksums the four known artifact names rather than globbing `docks-kit-*`, so a packed `docks-kit-<version>.tgz` is never attested as a release binary. It stamps `cli/dist/VERSION` only when the directory holds one version, and on the next build discards every artifact that stamp attributes to a different version, because a launcher refuses to run one and keeping it makes `SHA256SUMS` span two versions. An artifact with no stamp has unknown provenance and may be a hand-built or downloaded recovery binary, so the script keeps it and warns; `--prune` discards those too. Nothing here removes an artifact the stamp vouches for. |
|
|
33
33
|
| `cli/src/engine-native/` | EngineNative implementation for `sync`, `model`, and `toolchain`; idempotent, flag-gated for destructive reconciliation |
|
|
34
34
|
| `cli/src/engine-native/ompSync.ts` | omp sync orchestration and summary |
|
|
35
35
|
| `cli/src/commands/omp.ts` | `docks-kit omp` session launcher: rejects model-selecting forwarded flags, checks the free catalog of each candidate profile, renders the free-model run overlay, and starts `omp launch` |
|
|
36
|
+
| `cli/src/checklistPrompt.ts` / `cli/src/terminalCells.ts` | Shared terminal checklist prompt on Effect's `Prompt.Custom`: items, a Save row, key hints, an ASCII fallback, and NO_COLOR; `docks-kit harnesses` uses it. `terminalCells.ts` measures text in terminal cells and rows from the pinned Unicode 18.0.0 East Asian Width table; derive the table again from a newer `EastAsianWidth.txt` the same way its header says |
|
|
36
37
|
| `cli/src/engine-native/ompOverlay.ts` | Free-model overlay render, omp argv and child environment, plus catalog parse and thinking-ceiling helpers |
|
|
37
38
|
| `cli/src/engine-native/scratch.ts` / `cli/src/commands/scratch.ts` | `docks-kit scratch new\|remove`: private agent temporary directories under `~/.cache/docks-kit/scratch/`; removal accepts only a real path strictly inside the scratch root, the system temporary directory, or `/var/tmp` |
|
|
38
39
|
| `cli/src/engine-native/tidy.ts` / `tidyReport.ts` / `cli/src/commands/tidy.ts` | `docks-kit tidy [--apply] [--repo <path>] [--report]`: plan and apply the safe leftover sweep (merged idle worktrees and their containers, orphaned processes in agent directories, idle scratch); Docker calls run only against a verified local endpoint (`unix:///…` or `npipe:////./pipe/…`); the report is read-only |
|
|
@@ -48,8 +49,8 @@ launcher can fall back to Bun source.
|
|
|
48
49
|
| `SoT/toolchain.json` | Toolchain floors manifest (verified pins consumed by EngineNative; optional `upstream` source read by `docks-kit toolchain outdated`) |
|
|
49
50
|
| `SoT/.claude/bin/` | Dependency-free Bun runtime programs for Claude's statusline, SessionStart, and Notification |
|
|
50
51
|
| `SoT/.omp/` | Kit-owned omp SoT: `AGENTS.md`, `config.yml`, `models.yml`, `mcp.json`, and `intercom.json` |
|
|
51
|
-
| `install.sh` / `install.ps1` | POSIX and Windows global installers |
|
|
52
|
-
| `.github/workflows/release-cli.yml` | `cli-v*` release:
|
|
52
|
+
| `install.sh` / `install.ps1` | POSIX and Windows global installers. Each installer stops on a host outside the support matrix before it downloads anything. |
|
|
53
|
+
| `.github/workflows/release-cli.yml` | `cli-v*` release: four binaries (Linux x64 and arm64, macOS arm64, Windows x64), plus `SHA256SUMS` and npm publish |
|
|
53
54
|
| `README.md` | Front door |
|
|
54
55
|
| `package.json` / `bun.lock` | npm package: `bin` = `cli/src/main.ts`; bundles `cli/` with the generated in-memory SoT payload |
|
|
55
56
|
| `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. |
|
|
@@ -77,7 +78,7 @@ omp SoT notes:
|
|
|
77
78
|
- `SoT/.omp/AGENTS.md`, `config.yml`, `models.yml`, and `mcp.json` deploy to `~/.omp/agent/`.
|
|
78
79
|
- `SoT/.omp/intercom.json` deploys to `$PI_CODING_AGENT_DIR/intercom/config.json`. The default root is `~/.pi/agent`. Under a named omp profile (`OMP_PROFILE` or `PI_PROFILE`), it deploys to `<profile agentDir>/intercom/config.json`, because omp exports `PI_CODING_AGENT_DIR` as the profile agent directory.
|
|
79
80
|
- `ompFileDeploy.ts syncMergedYaml` deep-merges `config.yml` through `ompYaml.ts mergeOmpConfig` and `models.yml` through `mergeOmpModels`. Both wrap one generic mapping merge; only the config wrapper prunes stale `retry.fallbackChains` wildcards and merges `bash.patterns`.
|
|
80
|
-
- `SoT/.omp/config.yml` `bash.patterns` holds the destructive-command guards. omp's `CRITICAL_BASH_PATTERNS` check returns a bare safety override before a matching prompt rule, and `tools.approvalMode: yolo` ignores a bare override, so a prompt on a critical command becomes an allow, in subagents too (`omp://approval-mode.md`). Every `rm` shape that check can flag is therefore a deny: recursive `rm`, `sudo` anywhere before `rm` (also by path), any `rm` with an `r` or `f` option before an absolute path, and `--no-preserve-root`. By owner decision (0.20.9), the recursive-`rm` deny also covers any prefix (a `* rm ` copy of each bare cluster rule, so `env X=1 rm -rf b`, `xargs rm -rf`, `find . -exec rm -rf {} +`, and `git rm -r dir` are denied) and the `-ri`, `-ir`, `-Ri`, and `-iR` clusters for bare `rm`, `*/rm`, and `* rm`. By owner decision (0.21.0), 17 more denies cover bulk removal that can empty the home directory: `find -delete` (bare, `*/find`, `* find`), `-exec`, `-execdir`, `-ok`, and `-okdir` with `rm` or `*/rm`, and `xargs rm` in six shapes. No glob can express "inside the temporary directory", so `docks-kit scratch remove` checks that path in code. By the 0.20.9 decision, omp does not prompt for other file removal: a non-denied `rm`, `git rm`, `git worktree remove`, `gio trash`, and `docks-kit scratch remove` run without a prompt. The prompts left are the history-loss commands: `git clean`, `git reset --hard`, and every `git push` form that could force. The list order is deny, then prompts, then `trash *`. omp takes the first match. `ompYaml.ts mergeBashPatterns, exception-aware rule merge` keeps user rules and groups all rules as kit deny, user deny, user prompt, kit exception (a kit allow listed before the first kit prompt; the kit currently ships none), kit prompt, other user rules, kit allow, so a user deny or prompt precedes every kit allow. It treats a deployed rule equal to a kit rule (approval case-folded, `match` whitespace collapsed) as the kit copy, so a re-sync is a no-op. A rule the kit stops shipping stays as a user rule, so retire one through `ompRemovals.ts OMP_RETIRED_BASH_RULES`. `cli/test/lib/ompBashPatterns.ts` ports omp 18.11.1's matcher, critical patterns, and yolo resolution; `cli/test/unit/ompBashPatterns.test.ts` asserts each command's final outcome and the merge. omp subagents reject every `prompt`, and the `eval` tool stays unrestricted by owner decision.
|
|
81
|
+
- `SoT/.omp/config.yml` `bash.patterns` holds the destructive-command guards. omp's `CRITICAL_BASH_PATTERNS` check returns a bare safety override before a matching prompt rule, and `tools.approvalMode: yolo` ignores a bare override, so a prompt on a critical command becomes an allow, in subagents too (`omp://approval-mode.md`). Every `rm` shape that check can flag is therefore a deny: recursive `rm`, `sudo` anywhere before `rm` (also by path), any `rm` with an `r` or `f` option before an absolute path, and `--no-preserve-root`. By owner decision (0.20.9), the recursive-`rm` deny also covers any prefix (a `* rm ` copy of each bare cluster rule, so `env X=1 rm -rf b`, `xargs rm -rf`, `find . -exec rm -rf {} +`, and `git rm -r dir` are denied) and the `-ri`, `-ir`, `-Ri`, and `-iR` clusters for bare `rm`, `*/rm`, and `* rm`. By owner decision (0.21.0), 17 more denies cover bulk removal that can empty the home directory: `find -delete` (bare, `*/find`, `* find`), `-exec`, `-execdir`, `-ok`, and `-okdir` with `rm` or `*/rm`, and `xargs rm` in six shapes. No glob can express "inside the temporary directory", so `docks-kit scratch remove` checks that path in code. By the 0.20.9 decision, omp does not prompt for other file removal: a non-denied `rm`, `git rm`, `git worktree remove`, `gio trash`, and `docks-kit scratch remove` run without a prompt. The prompts left are the history-loss commands: `git clean`, `git reset --hard`, and every `git push` form that could force. A `git push` word that starts with `$` or a backtick also prompts, because a variable can expand to a `+` refspec. omp never applies an allow rule to a command that holds a `$` that the shell expands, so no kit exception can exempt a branch delete in a loop; `SoT/.omp/AGENTS.md` tells the agent to write each `git push` ref literally instead. The list order is deny, then prompts, then `trash *`. omp takes the first match. `ompYaml.ts mergeBashPatterns, exception-aware rule merge` keeps user rules and groups all rules as kit deny, user deny, user prompt, kit exception (a kit allow listed before the first kit prompt; the kit currently ships none), kit prompt, other user rules, kit allow, so a user deny or prompt precedes every kit allow. It treats a deployed rule equal to a kit rule (approval case-folded, `match` whitespace collapsed) as the kit copy, so a re-sync is a no-op. A rule the kit stops shipping stays as a user rule, so retire one through `ompRemovals.ts OMP_RETIRED_BASH_RULES`. `cli/test/lib/ompBashPatterns.ts` ports omp 18.11.1's matcher, critical patterns, and yolo resolution; `cli/test/unit/ompBashPatterns.test.ts` asserts each command's final outcome and the merge. omp subagents reject every `prompt`, and the `eval` tool stays unrestricted by owner decision.
|
|
81
82
|
- `ompSync.ts` runs `ompRemovals.ts syncOmpRemovals, retired-key inventory` right after the config merge, and that pass force-prunes retired kit-owned keys from `~/.omp/agent/config.yml` on every sync, without `--reconcile`. The pass is required because `mergeOmpConfig` is additive, so removing a key from the SoT alone never removes it from a deployed file. A key retired with a recorded value is pruned only while the deployed value still matches that value, so a user edit survives; a key retired outright, such as `providers.webSearchOrder`, is pruned at any value. The same pass removes each `bash.patterns` rule listed in `OMP_RETIRED_BASH_RULES` (the 39 file-removal rules retired in 0.20.9). It compares with the merge's kit-rule normalization (approval case-folded, `match` whitespace collapsed), so a user rule with a different `match` or `approval` survives.
|
|
82
83
|
- `cycleOrder` ends with `astra` as its fifth stop. `modelRoles.astra` is `openai-codex/gpt-6-astra:xhigh`, and `modelTags.astra` is visible. Astra and Fable fall back to each other through concrete selectors. `modelRoles.fable` remains `anthropic/claude-fable-5-1:medium`, with visible `modelTags.fable`. The hidden `switch_fable` role uses the same Fable selector and keeps an empty fallback chain.
|
|
83
84
|
- `modelRoles.task` is `anthropic/claude-opus-5-5:high`, and `retry.fallbackChains.task` falls back to `openai-codex/gpt-6.1-sol:high`. `task.maxEffort` is `xhigh`: a caller `effort: hi` outranks the role's `:high` suffix and maps to the top of the model ladder, so the cap keeps `hi` at `xhigh` instead of `max`. `advisor` is `anthropic/claude-opus-5-5:medium` with an empty fallback chain, because a GPT-6 Sol advisor looped on repeated reads under an Opus 5.5 session. Never put any GPT model (`openai-codex/gpt-*`, including GPT-6.1 Sol and GPT-6 Astra) in the advisor role or chain; Astra also costs too much for this role. `smol`, `commit`, and `tiny` use `openai-codex/gpt-6-luna`. The kit-defined hidden `reviewer` role is `openai-codex/gpt-6.1-sol:xhigh` with `anthropic/claude-opus-5-5:xhigh` as its retry fallback, and all four reviewer entries in `task.agentModelOverrides` point to `@reviewer`. `ompOverlay.ts ROLE_ORDER, FALLBACK_ORDER` list `reviewer`, so a free session also replaces it. Only bundled `reviewer` and `security-reviewer` are discoverable OMP agents; `code-reviewer` and `plan-reviewer` stay dormant. The `SoT/toolchain.json` omp floor is 18.4.4, the oldest release the kit tested with `gpt-6.1-sol`. That release lists and serves the model through the `openai-codex` provider. `cli/docs/omp-models.md` records the checks.
|
package/README.md
CHANGED
|
@@ -19,8 +19,8 @@ cd ~/projects/public
|
|
|
19
19
|
./docks-kit status # doctor view: drift, toolchain, plugins, skills
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
POSIX hosts use the `./docks-kit` launcher on x64 and arm64
|
|
23
|
-
`.\docks-kit.ps1` on x64
|
|
22
|
+
POSIX hosts use the `./docks-kit` launcher on Linux x64 and arm64 and on macOS
|
|
23
|
+
arm64. Windows uses `.\docks-kit.ps1` on x64. Each launcher prefers the matching compiled
|
|
24
24
|
binary in `cli/dist/` only when its version matches the checkout. Otherwise it
|
|
25
25
|
runs from source via Bun and auto-installs Bun plus dependencies when needed.
|
|
26
26
|
Hosts outside this matrix fail immediately and never fall back to Bun source.
|
|
@@ -154,17 +154,16 @@ and a later flag-less sync reverts them. Full reference: `docks-kit docs flags`
|
|
|
154
154
|
|----------|--------------|------------------|-------------|
|
|
155
155
|
| Linux | x64 | ✅ | ✅ native |
|
|
156
156
|
| Linux | arm64 | ✅ | ✅ native |
|
|
157
|
-
| macOS | x64 | ✅ | ✅ native |
|
|
158
157
|
| macOS | arm64 | ✅ | ✅ native |
|
|
159
158
|
| Windows | x64 | ✅ | ✅ native |
|
|
160
|
-
| Windows | arm64 | ✅ | ✅ native |
|
|
161
159
|
|
|
162
160
|
Details: `docks-kit docs platforms`.
|
|
163
161
|
|
|
164
162
|
## Releases
|
|
165
163
|
|
|
166
|
-
Tagging `cli-v*` builds
|
|
167
|
-
|
|
164
|
+
Tagging `cli-v*` builds four standalone binaries: `docks-kit-linux-x64`,
|
|
165
|
+
`docks-kit-linux-arm64`, `docks-kit-darwin-arm64`, and
|
|
166
|
+
`docks-kit-windows-x64.exe`. The workflow attaches them plus `SHA256SUMS` to the GitHub
|
|
168
167
|
release. npm publishes the exact package tarball through trusted publishing
|
|
169
168
|
with OIDC provenance.
|
|
170
169
|
Published binaries, checksums, and release notes are available on
|
|
@@ -68,6 +68,14 @@ Each of these must begin a word: `feat/cache-vf` is a branch name, not an
|
|
|
68
68
|
option. `--follow-tags` also asks. This is an accepted false positive, because
|
|
69
69
|
it shares the `--f` prefix.
|
|
70
70
|
|
|
71
|
+
A word that starts with `$` asks also when the variable holds a plain branch
|
|
72
|
+
name, such as `git push origin --delete $b` in a loop. The matcher sees the
|
|
73
|
+
text before the shell expands it, so it cannot tell `$b` from `+main`. omp
|
|
74
|
+
never applies an allow rule to a command that holds a `$` that the shell
|
|
75
|
+
expands, so the kit cannot add an exception for this form. The omp agent
|
|
76
|
+
prompt therefore tells the agent to write each ref literally, for example
|
|
77
|
+
`git push origin --delete <branch-a> <branch-b>`.
|
|
78
|
+
|
|
71
79
|
## Why the tools differ
|
|
72
80
|
|
|
73
81
|
| Topic | omp | Claude Code | Codex |
|
package/cli/docs/flags.md
CHANGED
|
@@ -18,7 +18,9 @@ Positional targets are `claude`, `codex`, `agents`, and `omp`. A flag-less
|
|
|
18
18
|
`codex`, and `agents`, and never selects `omp`. Choose the stored selection
|
|
19
19
|
with `docks-kit harnesses`. With no stored selection, its picker pre-ticks all
|
|
20
20
|
four harnesses, `omp` included; a flag-less `sync` does not change until the
|
|
21
|
-
picker saves a selection.
|
|
21
|
+
picker saves a selection. In the picker, Enter or Space ticks or unticks the
|
|
22
|
+
harness under the cursor, Enter on the Save row stores the selection, and
|
|
23
|
+
Escape leaves it unchanged.
|
|
22
24
|
|
|
23
25
|
## Global flags
|
|
24
26
|
|
package/cli/docs/install.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Installing docks-kit
|
|
2
2
|
|
|
3
|
-
Supported hosts are Linux x64/arm64, macOS
|
|
3
|
+
Supported hosts are Linux x64/arm64, macOS arm64, and Windows x64.
|
|
4
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)
|
package/cli/docs/platforms.md
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
# Platform support
|
|
2
2
|
|
|
3
|
-
The supported host matrix is exact:
|
|
3
|
+
The supported host matrix is exact: Linux on x64 and arm64, macOS on arm64,
|
|
4
|
+
and Windows on x64.
|
|
4
5
|
|
|
5
6
|
| Platform | Architecture | docks-kit binary | Sync engine |
|
|
6
7
|
|----------|--------------|------------------|-------------|
|
|
7
8
|
| Linux | x64 | `docks-kit-linux-x64` | EngineNative (TS) |
|
|
8
9
|
| Linux | arm64 | `docks-kit-linux-arm64` | EngineNative (TS) |
|
|
9
|
-
| macOS | x64 | `docks-kit-darwin-x64` | EngineNative (TS) |
|
|
10
10
|
| macOS | arm64 | `docks-kit-darwin-arm64` | EngineNative (TS) |
|
|
11
11
|
| Windows | x64 | `docks-kit-windows-x64.exe` | EngineNative (TS) |
|
|
12
|
-
| Windows | arm64 | `docks-kit-windows-arm64.exe` | EngineNative (TS) |
|
|
13
12
|
|
|
14
13
|
POSIX hosts use the `docks-kit` launcher. Windows uses `docks-kit.ps1`.
|
|
15
14
|
Hosts outside this table fail before either launcher can fall back to Bun
|
|
16
|
-
source.
|
|
15
|
+
source. The POSIX launcher and `install.sh` read the architecture of the
|
|
16
|
+
shell with `uname -m`. On an Apple silicon Mac, a shell that runs under
|
|
17
|
+
Rosetta reports `x86_64` and gets the unsupported-host message, so run
|
|
18
|
+
docks-kit from a native arm64 shell.
|
|
17
19
|
|
|
18
20
|
EngineNative is the only supported engine on supported hosts.
|
|
19
21
|
`DOCKS_KIT_ENGINE=bash` exits with the removed-engine message and points at the
|
|
@@ -0,0 +1,464 @@
|
|
|
1
|
+
import { Effect, Terminal } from "effect";
|
|
2
|
+
import { Prompt } from "effect/unstable/cli";
|
|
3
|
+
import { terminalCells, terminalRows } from "./terminalCells";
|
|
4
|
+
|
|
5
|
+
/** One row of a checklist. The label and the description are each one line of text. */
|
|
6
|
+
export interface ChecklistItem<A> {
|
|
7
|
+
readonly value: A;
|
|
8
|
+
readonly label: string;
|
|
9
|
+
readonly description: string;
|
|
10
|
+
readonly checked: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface ChecklistOptions<A> {
|
|
14
|
+
/** The text in the top border of the panel. */
|
|
15
|
+
readonly title: string;
|
|
16
|
+
readonly message: string;
|
|
17
|
+
/** A dimmed text under the message. */
|
|
18
|
+
readonly note?: string;
|
|
19
|
+
readonly items: ReadonlyArray<ChecklistItem<A>>;
|
|
20
|
+
/** The text on the Save row after a save with no ticked item. */
|
|
21
|
+
readonly emptySelectionError: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** `Saved` lists the ticked values in item order. */
|
|
25
|
+
export type ChecklistResult<A> =
|
|
26
|
+
| { readonly _tag: "Saved"; readonly values: ReadonlyArray<A> }
|
|
27
|
+
| { readonly _tag: "Cancelled" };
|
|
28
|
+
|
|
29
|
+
interface ChecklistState {
|
|
30
|
+
/** An item index, or the item count for the Save row. */
|
|
31
|
+
readonly cursor: number;
|
|
32
|
+
readonly checked: ReadonlyArray<boolean>;
|
|
33
|
+
/** A save with no ticked item sets it; the next toggle clears it. */
|
|
34
|
+
readonly showError: boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
type ChecklistAction<A> = Prompt.Action<ChecklistState, ChecklistResult<A>>;
|
|
38
|
+
|
|
39
|
+
type Style = "plain" | "bold" | "dim" | "accent" | "accentBold" | "green" | "red";
|
|
40
|
+
|
|
41
|
+
interface Span {
|
|
42
|
+
readonly text: string;
|
|
43
|
+
readonly style: Style;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
type Line = ReadonlyArray<Span>;
|
|
47
|
+
|
|
48
|
+
interface Glyphs {
|
|
49
|
+
readonly pointer: string;
|
|
50
|
+
readonly ticked: string;
|
|
51
|
+
readonly unticked: string;
|
|
52
|
+
readonly ellipsis: string;
|
|
53
|
+
readonly topLeft: string;
|
|
54
|
+
readonly topRight: string;
|
|
55
|
+
readonly bottomLeft: string;
|
|
56
|
+
readonly bottomRight: string;
|
|
57
|
+
readonly horizontal: string;
|
|
58
|
+
readonly vertical: string;
|
|
59
|
+
readonly hint: ReadonlyArray<string>;
|
|
60
|
+
readonly hintSeparator: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const UNICODE: Glyphs = {
|
|
64
|
+
pointer: "❯",
|
|
65
|
+
ticked: "●",
|
|
66
|
+
unticked: "○",
|
|
67
|
+
ellipsis: "…",
|
|
68
|
+
topLeft: "╭",
|
|
69
|
+
topRight: "╮",
|
|
70
|
+
bottomLeft: "╰",
|
|
71
|
+
bottomRight: "╯",
|
|
72
|
+
horizontal: "─",
|
|
73
|
+
vertical: "│",
|
|
74
|
+
hint: ["↑↓ move", "enter/space toggle", "enter on Save saves", "esc cancel"],
|
|
75
|
+
hintSeparator: " · ",
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
// The legacy Windows console can show the Unicode glyphs as boxes.
|
|
79
|
+
const ASCII: Glyphs = {
|
|
80
|
+
pointer: ">",
|
|
81
|
+
ticked: "[x]",
|
|
82
|
+
unticked: "[ ]",
|
|
83
|
+
ellipsis: "...",
|
|
84
|
+
topLeft: "+",
|
|
85
|
+
topRight: "+",
|
|
86
|
+
bottomLeft: "+",
|
|
87
|
+
bottomRight: "+",
|
|
88
|
+
horizontal: "-",
|
|
89
|
+
vertical: "|",
|
|
90
|
+
hint: ["up/down move", "enter/space toggle", "enter on Save saves", "esc cancel"],
|
|
91
|
+
hintSeparator: " - ",
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const SGR: Record<Style, string> = {
|
|
95
|
+
plain: "",
|
|
96
|
+
bold: "\u001b[1m",
|
|
97
|
+
dim: "\u001b[2m",
|
|
98
|
+
accent: "\u001b[36m",
|
|
99
|
+
accentBold: "\u001b[1;36m",
|
|
100
|
+
green: "\u001b[32m",
|
|
101
|
+
red: "\u001b[31m",
|
|
102
|
+
};
|
|
103
|
+
const SGR_RESET = "\u001b[0m";
|
|
104
|
+
const CURSOR_HIDE = "\u001b[?25l";
|
|
105
|
+
const ERASE_LINE = "\u001b[2K";
|
|
106
|
+
const CURSOR_UP = "\u001b[1A";
|
|
107
|
+
const CURSOR_COLUMN_ONE = "\u001b[G";
|
|
108
|
+
|
|
109
|
+
/** A terminal that reports 0 columns does not know its width. */
|
|
110
|
+
const DEFAULT_COLUMNS = 80;
|
|
111
|
+
/** Below this width, the border takes too much of each line. */
|
|
112
|
+
const BORDER_MIN_COLUMNS = 40;
|
|
113
|
+
/** The columns of "│ " and " │" around the panel content. */
|
|
114
|
+
const BORDER_COLUMNS = 4;
|
|
115
|
+
/** The hint starts in the column of the panel content. */
|
|
116
|
+
const BORDERED_HINT_INDENT = 2;
|
|
117
|
+
const GAP = " ";
|
|
118
|
+
const SAVE_LABEL = "Save";
|
|
119
|
+
|
|
120
|
+
const CANCELLED = { _tag: "Submit", value: { _tag: "Cancelled" } } as const;
|
|
121
|
+
const IGNORED = { _tag: "Beep" } as const;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* A checklist in a panel. Enter or Space toggles the item under the cursor and
|
|
125
|
+
* saves on the Save row; Escape, Ctrl+C, and Ctrl+D cancel.
|
|
126
|
+
*/
|
|
127
|
+
export function checklistPrompt<A>(
|
|
128
|
+
options: ChecklistOptions<A>,
|
|
129
|
+
): Prompt.Prompt<ChecklistResult<A>> {
|
|
130
|
+
const initial: ChecklistState = {
|
|
131
|
+
cursor: 0,
|
|
132
|
+
checked: options.items.map((item) => item.checked),
|
|
133
|
+
showError: false,
|
|
134
|
+
};
|
|
135
|
+
// The ANSI-free text of the lines on screen. `clear` erases these lines and
|
|
136
|
+
// not a frame that it builds again: the terminal width can change between
|
|
137
|
+
// the two calls, and then a new frame has a different number of lines. The
|
|
138
|
+
// first frame of a run always comes from `render`, so a reused prompt starts
|
|
139
|
+
// clean.
|
|
140
|
+
let shown: ReadonlyArray<string> = [];
|
|
141
|
+
return Prompt.Custom<ChecklistState, ChecklistResult<A>>(initial, {
|
|
142
|
+
render: (state, action) => {
|
|
143
|
+
// Beep shows no bell and no change. Submit leaves the panel erased, so
|
|
144
|
+
// the caller prints the result in its place.
|
|
145
|
+
if (action._tag !== "NextFrame") return Effect.succeed("");
|
|
146
|
+
// https://no-color.org: a NO_COLOR value that is set and not empty turns color off.
|
|
147
|
+
const color = (process.env.NO_COLOR ?? "") === "";
|
|
148
|
+
return Effect.map(frameOf(options, state), (frame) => {
|
|
149
|
+
shown = frame.map((line) => line.map((part) => part.text).join(""));
|
|
150
|
+
const lines = frame.map((line) => paint(line, color));
|
|
151
|
+
return CURSOR_HIDE + lines.join("\n");
|
|
152
|
+
});
|
|
153
|
+
},
|
|
154
|
+
process: (input, state) => Effect.succeed(nextAction(options.items, input.key, state)),
|
|
155
|
+
clear: () =>
|
|
156
|
+
Effect.gen(function* () {
|
|
157
|
+
const terminal = yield* Terminal.Terminal;
|
|
158
|
+
const reported = yield* terminal.columns;
|
|
159
|
+
const columns = reported > 0 ? reported : DEFAULT_COLUMNS;
|
|
160
|
+
// A terminal that reflows wraps a long line into more rows when it
|
|
161
|
+
// narrows. It never splits a character: a wide character that does not
|
|
162
|
+
// fit in the rest of a row moves to the next row.
|
|
163
|
+
const rows = shown.reduce((sum, line) => sum + terminalRows(line, columns), 0);
|
|
164
|
+
// The cursor stays on the last row of the frame: erase each row from
|
|
165
|
+
// there up to the first row.
|
|
166
|
+
const above = `${CURSOR_UP}${ERASE_LINE}`.repeat(Math.max(0, rows - 1));
|
|
167
|
+
return `${ERASE_LINE}${above}${CURSOR_COLUMN_ONE}`;
|
|
168
|
+
}),
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function nextAction<A>(
|
|
173
|
+
items: ReadonlyArray<ChecklistItem<A>>,
|
|
174
|
+
key: Terminal.Key,
|
|
175
|
+
state: ChecklistState,
|
|
176
|
+
): ChecklistAction<A> {
|
|
177
|
+
const saveRow = items.length;
|
|
178
|
+
const rows = saveRow + 1;
|
|
179
|
+
// The cursor wraps over the items and the Save row.
|
|
180
|
+
const moveBy = (step: number): ChecklistAction<A> => ({
|
|
181
|
+
_tag: "NextFrame",
|
|
182
|
+
state: { ...state, cursor: (state.cursor + step + rows) % rows },
|
|
183
|
+
});
|
|
184
|
+
switch (key.name) {
|
|
185
|
+
case "up":
|
|
186
|
+
case "k":
|
|
187
|
+
return moveBy(-1);
|
|
188
|
+
case "down":
|
|
189
|
+
case "j":
|
|
190
|
+
return moveBy(1);
|
|
191
|
+
case "tab":
|
|
192
|
+
return moveBy(key.shift ? -1 : 1);
|
|
193
|
+
case "home":
|
|
194
|
+
return { _tag: "NextFrame", state: { ...state, cursor: 0 } };
|
|
195
|
+
case "end":
|
|
196
|
+
return { _tag: "NextFrame", state: { ...state, cursor: saveRow } };
|
|
197
|
+
case "return":
|
|
198
|
+
case "enter":
|
|
199
|
+
case "space": {
|
|
200
|
+
if (state.cursor === saveRow) return save(items, state);
|
|
201
|
+
const checked = state.checked.map((on, row) => (row === state.cursor ? !on : on));
|
|
202
|
+
return { _tag: "NextFrame", state: { ...state, checked, showError: false } };
|
|
203
|
+
}
|
|
204
|
+
case "escape":
|
|
205
|
+
return CANCELLED;
|
|
206
|
+
// Ctrl+C and Ctrl+D also end the terminal input: they must give a result
|
|
207
|
+
// here, or the prompt fails with a QuitError.
|
|
208
|
+
case "c":
|
|
209
|
+
case "d":
|
|
210
|
+
return key.ctrl ? CANCELLED : IGNORED;
|
|
211
|
+
default:
|
|
212
|
+
return IGNORED;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
function save<A>(
|
|
217
|
+
items: ReadonlyArray<ChecklistItem<A>>,
|
|
218
|
+
state: ChecklistState,
|
|
219
|
+
): ChecklistAction<A> {
|
|
220
|
+
const values = items.filter((_item, index) => state.checked[index]).map((item) => item.value);
|
|
221
|
+
return values.length === 0
|
|
222
|
+
? { _tag: "NextFrame", state: { ...state, showError: true } }
|
|
223
|
+
: { _tag: "Submit", value: { _tag: "Saved", values } };
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// Read the host when the prompt renders, so that the values in effect at that
|
|
227
|
+
// time apply.
|
|
228
|
+
function frameOf<A>(options: ChecklistOptions<A>, state: ChecklistState) {
|
|
229
|
+
return Effect.gen(function* () {
|
|
230
|
+
const terminal = yield* Terminal.Terminal;
|
|
231
|
+
const columns = yield* terminal.columns;
|
|
232
|
+
// Windows Terminal sets WT_SESSION and shows the Unicode glyphs.
|
|
233
|
+
const glyphs =
|
|
234
|
+
process.platform === "win32" && (process.env.WT_SESSION ?? "") === "" ? ASCII : UNICODE;
|
|
235
|
+
return frameLines(options, state, columns, glyphs);
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
function paint(line: Line, color: boolean): string {
|
|
240
|
+
let text = "";
|
|
241
|
+
for (const part of line) {
|
|
242
|
+
const code = color ? SGR[part.style] : "";
|
|
243
|
+
text += code === "" ? part.text : `${code}${part.text}${SGR_RESET}`;
|
|
244
|
+
}
|
|
245
|
+
return text;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
interface Layout {
|
|
249
|
+
/** The most columns that one line can use. */
|
|
250
|
+
readonly width: number;
|
|
251
|
+
readonly bordered: boolean;
|
|
252
|
+
/** The columns of the panel content. */
|
|
253
|
+
readonly inner: number;
|
|
254
|
+
/** The columns of the marker, the label, and their padding, or of the Save label. */
|
|
255
|
+
readonly nameWidth: number;
|
|
256
|
+
/** The column where the descriptions and the Save status start. */
|
|
257
|
+
readonly statusColumn: number;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
function measure<A>(options: ChecklistOptions<A>, columns: number, glyphs: Glyphs): Layout {
|
|
261
|
+
const known = columns > 0 ? columns : DEFAULT_COLUMNS;
|
|
262
|
+
// A line that fills the last column can wrap, and then `clear` erases too
|
|
263
|
+
// few lines.
|
|
264
|
+
const width = known - 1;
|
|
265
|
+
const bordered = known >= BORDER_MIN_COLUMNS;
|
|
266
|
+
const total = options.items.length;
|
|
267
|
+
const markerWidth = Math.max(terminalCells(glyphs.ticked), terminalCells(glyphs.unticked));
|
|
268
|
+
const labelWidth = Math.max(0, ...options.items.map((item) => terminalCells(item.label)));
|
|
269
|
+
const nameWidth = Math.max(markerWidth + 1 + labelWidth, terminalCells(SAVE_LABEL));
|
|
270
|
+
const statusColumn = terminalCells(glyphs.pointer) + 1 + nameWidth + GAP.length;
|
|
271
|
+
// Size the panel for its widest content in all states, so that its width
|
|
272
|
+
// stays the same when the error shows. The top border needs two columns
|
|
273
|
+
// more than the title.
|
|
274
|
+
const natural = Math.max(
|
|
275
|
+
terminalCells(options.title) + 2,
|
|
276
|
+
terminalCells(options.message),
|
|
277
|
+
terminalCells(options.note ?? ""),
|
|
278
|
+
...options.items.map((item) => statusColumn + terminalCells(item.description)),
|
|
279
|
+
statusColumn + terminalCells(`${total} of ${total} selected`),
|
|
280
|
+
statusColumn + terminalCells(options.emptySelectionError),
|
|
281
|
+
);
|
|
282
|
+
return {
|
|
283
|
+
width,
|
|
284
|
+
bordered,
|
|
285
|
+
inner: bordered ? Math.min(natural, width - BORDER_COLUMNS) : width,
|
|
286
|
+
nameWidth,
|
|
287
|
+
statusColumn,
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
function frameLines<A>(
|
|
292
|
+
options: ChecklistOptions<A>,
|
|
293
|
+
state: ChecklistState,
|
|
294
|
+
columns: number,
|
|
295
|
+
glyphs: Glyphs,
|
|
296
|
+
): Array<Line> {
|
|
297
|
+
const layout = measure(options, columns, glyphs);
|
|
298
|
+
const note: Array<string> =
|
|
299
|
+
options.note === undefined ? [] : pack(words(options.note), " ", layout.inner);
|
|
300
|
+
const body: Array<Line> = [
|
|
301
|
+
...pack(words(options.message), " ", layout.inner).map((text) => [span(text)]),
|
|
302
|
+
...note.map((text) => [span(text, "dim")]),
|
|
303
|
+
[],
|
|
304
|
+
...options.items.map((item, index) =>
|
|
305
|
+
itemRow(item, state.checked[index], state.cursor === index, layout, glyphs),
|
|
306
|
+
),
|
|
307
|
+
[],
|
|
308
|
+
...saveRows(options, state, layout, glyphs),
|
|
309
|
+
];
|
|
310
|
+
const hintIndent = layout.bordered ? BORDERED_HINT_INDENT : 0;
|
|
311
|
+
const hint = pack(glyphs.hint, glyphs.hintSeparator, layout.width - hintIndent).map((text) =>
|
|
312
|
+
fit([span(" ".repeat(hintIndent)), span(text, "dim")], layout.width, glyphs.ellipsis),
|
|
313
|
+
);
|
|
314
|
+
if (!layout.bordered) {
|
|
315
|
+
return [
|
|
316
|
+
fit([span(options.title, "bold")], layout.width, glyphs.ellipsis),
|
|
317
|
+
...body.map((line) => fit(line, layout.width, glyphs.ellipsis)),
|
|
318
|
+
[],
|
|
319
|
+
...hint,
|
|
320
|
+
];
|
|
321
|
+
}
|
|
322
|
+
return [
|
|
323
|
+
topBorder(options.title, layout.inner, glyphs),
|
|
324
|
+
...body.map((line) => boxed(line, layout.inner, glyphs)),
|
|
325
|
+
[
|
|
326
|
+
span(
|
|
327
|
+
`${glyphs.bottomLeft}${glyphs.horizontal.repeat(layout.inner + 2)}${glyphs.bottomRight}`,
|
|
328
|
+
"dim",
|
|
329
|
+
),
|
|
330
|
+
],
|
|
331
|
+
...hint,
|
|
332
|
+
];
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
function itemRow<A>(
|
|
336
|
+
item: ChecklistItem<A>,
|
|
337
|
+
ticked: boolean,
|
|
338
|
+
current: boolean,
|
|
339
|
+
layout: Layout,
|
|
340
|
+
glyphs: Glyphs,
|
|
341
|
+
): Line {
|
|
342
|
+
const marker = ticked ? span(glyphs.ticked, "green") : span(glyphs.unticked, "dim");
|
|
343
|
+
const padding = layout.nameWidth - terminalCells(marker.text) - 1 - terminalCells(item.label);
|
|
344
|
+
return [
|
|
345
|
+
current ? span(glyphs.pointer, "accent") : span(" ".repeat(terminalCells(glyphs.pointer))),
|
|
346
|
+
span(" "),
|
|
347
|
+
marker,
|
|
348
|
+
span(" "),
|
|
349
|
+
span(item.label, current ? "bold" : "plain"),
|
|
350
|
+
span(" ".repeat(padding) + GAP),
|
|
351
|
+
span(item.description, "dim"),
|
|
352
|
+
];
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
function saveRows<A>(
|
|
356
|
+
options: ChecklistOptions<A>,
|
|
357
|
+
state: ChecklistState,
|
|
358
|
+
layout: Layout,
|
|
359
|
+
glyphs: Glyphs,
|
|
360
|
+
): Array<Line> {
|
|
361
|
+
const current = state.cursor === options.items.length;
|
|
362
|
+
const count = state.checked.filter((ticked) => ticked).length;
|
|
363
|
+
const status = state.showError
|
|
364
|
+
? span(options.emptySelectionError, "red")
|
|
365
|
+
: span(`${count} of ${options.items.length} selected`, "dim");
|
|
366
|
+
// Wrap the status below its start column, so that a long error stays readable.
|
|
367
|
+
const [first = "", ...rest] = pack(words(status.text), " ", layout.inner - layout.statusColumn);
|
|
368
|
+
return [
|
|
369
|
+
[
|
|
370
|
+
current ? span(glyphs.pointer, "accent") : span(" ".repeat(terminalCells(glyphs.pointer))),
|
|
371
|
+
span(" "),
|
|
372
|
+
span(SAVE_LABEL, current ? "accentBold" : "plain"),
|
|
373
|
+
span(" ".repeat(layout.nameWidth - terminalCells(SAVE_LABEL)) + GAP),
|
|
374
|
+
span(first, status.style),
|
|
375
|
+
],
|
|
376
|
+
...rest.map((text) => [span(" ".repeat(layout.statusColumn)), span(text, status.style)]),
|
|
377
|
+
];
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
function topBorder(title: string, inner: number, glyphs: Glyphs): Line {
|
|
381
|
+
// Keep at least one horizontal glyph between the title and the corner.
|
|
382
|
+
const shown = fit([span(title, "bold")], inner - 2, glyphs.ellipsis);
|
|
383
|
+
const fill = inner - 1 - lineWidth(shown);
|
|
384
|
+
return [
|
|
385
|
+
span(`${glyphs.topLeft}${glyphs.horizontal} `, "dim"),
|
|
386
|
+
...shown,
|
|
387
|
+
span(` ${glyphs.horizontal.repeat(fill)}${glyphs.topRight}`, "dim"),
|
|
388
|
+
];
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
function boxed(line: Line, inner: number, glyphs: Glyphs): Line {
|
|
392
|
+
const content = fit(line, inner, glyphs.ellipsis);
|
|
393
|
+
return [
|
|
394
|
+
span(`${glyphs.vertical} `, "dim"),
|
|
395
|
+
...content,
|
|
396
|
+
span(" ".repeat(inner - lineWidth(content))),
|
|
397
|
+
span(` ${glyphs.vertical}`, "dim"),
|
|
398
|
+
];
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
function span(text: string, style: Style = "plain"): Span {
|
|
402
|
+
return { text, style };
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/** The longest start of `text` that uses at most `cells` cells. */
|
|
406
|
+
function cutCells(text: string, cells: number): string {
|
|
407
|
+
let kept = "";
|
|
408
|
+
let used = 0;
|
|
409
|
+
for (const char of text) {
|
|
410
|
+
const next = used + terminalCells(char);
|
|
411
|
+
// A wide character that does not fit stops the cut: it never crosses the width.
|
|
412
|
+
if (next > cells) break;
|
|
413
|
+
kept += char;
|
|
414
|
+
used = next;
|
|
415
|
+
}
|
|
416
|
+
return kept;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
function lineWidth(line: Line): number {
|
|
420
|
+
return line.reduce((sum, part) => sum + terminalCells(part.text), 0);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/** Cuts `line` to `width` cells and ends a cut line with the ellipsis. */
|
|
424
|
+
function fit(line: Line, width: number, ellipsis: string): Line {
|
|
425
|
+
if (lineWidth(line) <= width) return line;
|
|
426
|
+
const room = width - terminalCells(ellipsis);
|
|
427
|
+
if (room < 0) return [span(cutCells(ellipsis, Math.max(width, 0)))];
|
|
428
|
+
const kept: Array<Span> = [];
|
|
429
|
+
let used = 0;
|
|
430
|
+
for (const part of line) {
|
|
431
|
+
const cells = terminalCells(part.text);
|
|
432
|
+
if (used + cells > room) {
|
|
433
|
+
kept.push(span(cutCells(part.text, room - used).trimEnd() + ellipsis, part.style));
|
|
434
|
+
break;
|
|
435
|
+
}
|
|
436
|
+
kept.push(part);
|
|
437
|
+
used += cells;
|
|
438
|
+
}
|
|
439
|
+
return kept;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
function words(text: string): Array<string> {
|
|
443
|
+
return text.split(/\s+/).filter((word) => word !== "");
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Joins `parts` with `separator` into lines of at most `width` columns. A part
|
|
448
|
+
* never breaks; `fit` cuts a part that is wider than `width`.
|
|
449
|
+
*/
|
|
450
|
+
function pack(parts: ReadonlyArray<string>, separator: string, width: number): Array<string> {
|
|
451
|
+
const lines: Array<string> = [];
|
|
452
|
+
let current = "";
|
|
453
|
+
for (const part of parts) {
|
|
454
|
+
const joined = current === "" ? part : `${current}${separator}${part}`;
|
|
455
|
+
if (current !== "" && terminalCells(joined) > width) {
|
|
456
|
+
lines.push(current);
|
|
457
|
+
current = part;
|
|
458
|
+
} else {
|
|
459
|
+
current = joined;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
lines.push(current);
|
|
463
|
+
return lines;
|
|
464
|
+
}
|
package/cli/src/commands/docs.ts
CHANGED
|
@@ -39,7 +39,7 @@ const TOPICS: Record<string, { summary: string; body: string }> = {
|
|
|
39
39
|
body: install,
|
|
40
40
|
},
|
|
41
41
|
platforms: {
|
|
42
|
-
summary: "Platform support: Linux, macOS,
|
|
42
|
+
summary: "Platform support: Linux on x64 and arm64, macOS on arm64, Windows on x64",
|
|
43
43
|
body: platforms,
|
|
44
44
|
},
|
|
45
45
|
"omp-models": {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Command
|
|
1
|
+
import { Command } from "effect/unstable/cli";
|
|
2
2
|
import { Console, Effect } from "effect";
|
|
3
|
+
import { checklistPrompt } from "../checklistPrompt";
|
|
3
4
|
import { bail } from "../engine";
|
|
4
5
|
import {
|
|
5
6
|
engineHome,
|
|
@@ -14,7 +15,7 @@ import { kitDbFile } from "../engine-native/kitDb";
|
|
|
14
15
|
const DESCRIPTIONS: Record<Harness, string> = {
|
|
15
16
|
claude: "Claude Code user configuration",
|
|
16
17
|
codex: "Codex user configuration",
|
|
17
|
-
agents: "
|
|
18
|
+
agents: "Universal agent skills",
|
|
18
19
|
omp: "Oh My Pi user configuration",
|
|
19
20
|
};
|
|
20
21
|
|
|
@@ -39,32 +40,40 @@ export const harnessesCommand = Command.make("harnesses", {}, () =>
|
|
|
39
40
|
|
|
40
41
|
if (!process.stdin.isTTY || !process.stdout.isTTY) return;
|
|
41
42
|
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
const result = yield* checklistPrompt({
|
|
44
|
+
title: "Harnesses",
|
|
45
|
+
message: "Choose what a plain docks-kit sync sets up.",
|
|
46
|
+
note:
|
|
47
|
+
stored === undefined
|
|
48
|
+
? "Every harness starts ticked. Nothing is stored until you save."
|
|
49
|
+
: undefined,
|
|
50
|
+
items: HARNESSES.map((harness) => ({
|
|
46
51
|
value: harness,
|
|
52
|
+
label: harness,
|
|
47
53
|
description: DESCRIPTIONS[harness],
|
|
48
54
|
// With no stored selection, pre-tick every harness, omp included, so a
|
|
49
55
|
// new machine opts out of omp instead of opting in. A flag-less sync
|
|
50
56
|
// keeps LEGACY_SELECTION until this picker saves a selection.
|
|
51
|
-
|
|
57
|
+
checked: (stored ?? HARNESSES).includes(harness),
|
|
52
58
|
})),
|
|
59
|
+
emptySelectionError: "Tick at least one harness.",
|
|
53
60
|
});
|
|
54
61
|
|
|
55
|
-
if (
|
|
56
|
-
|
|
62
|
+
if (result._tag === "Cancelled") {
|
|
63
|
+
yield* Console.log("Harness selection unchanged.");
|
|
64
|
+
return;
|
|
57
65
|
}
|
|
58
66
|
|
|
59
67
|
yield* Effect.try({
|
|
60
|
-
try: () => writeHarnessSelection(home,
|
|
68
|
+
try: () => writeHarnessSelection(home, result.values),
|
|
61
69
|
catch: (error) => (error instanceof Error ? error.message : String(error)),
|
|
62
70
|
}).pipe(
|
|
63
71
|
Effect.catch((reason) =>
|
|
64
72
|
bail(`Cannot save the harness selection to ${kitDbFile(home)}: ${reason}`, 1),
|
|
65
73
|
),
|
|
66
74
|
);
|
|
67
|
-
|
|
75
|
+
const saved = result.values.join(", ");
|
|
76
|
+
yield* Console.log(`Saved harness selection: ${saved} (${kitDbFile(home)})`);
|
|
68
77
|
}),
|
|
69
78
|
).pipe(
|
|
70
79
|
Command.withDescription("Choose the harness selection that drives a flag-less docks-kit sync."),
|
|
@@ -180,7 +180,8 @@ active logger binding.
|
|
|
180
180
|
|
|
181
181
|
## Platform Support
|
|
182
182
|
|
|
183
|
-
- EngineNative supports Linux, macOS, and Windows on
|
|
183
|
+
- EngineNative supports Linux on x64 and arm64, macOS on arm64, and Windows on
|
|
184
|
+
x64.
|
|
184
185
|
- Unsupported hosts fail before launcher fallback, dependency probes, downloads,
|
|
185
186
|
settings writes, or sync work.
|
|
186
187
|
- Claude runtime settings use absolute Bun/script paths and materialize
|
|
@@ -204,8 +205,8 @@ active logger binding.
|
|
|
204
205
|
command checks, and compilation and execution of the native host artifact.
|
|
205
206
|
The Linux-canonical snapshot lane stays on Ubuntu and runs both golden suites
|
|
206
207
|
plus their prove-red checks.
|
|
207
|
-
- `.github/workflows/release-cli.yml` publishes
|
|
208
|
-
|
|
208
|
+
- `.github/workflows/release-cli.yml` publishes four binaries (Linux x64 and
|
|
209
|
+
arm64, macOS arm64, Windows x64), plus `SHA256SUMS` and the npm package.
|
|
209
210
|
|
|
210
211
|
## Non-Goals
|
|
211
212
|
|
|
@@ -10,13 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { platformName, type PlatformName } from "./index";
|
|
12
12
|
|
|
13
|
-
export type TargetId =
|
|
14
|
-
| "linux-x64"
|
|
15
|
-
| "linux-arm64"
|
|
16
|
-
| "darwin-x64"
|
|
17
|
-
| "darwin-arm64"
|
|
18
|
-
| "windows-x64"
|
|
19
|
-
| "windows-arm64";
|
|
13
|
+
export type TargetId = "linux-x64" | "linux-arm64" | "darwin-arm64" | "windows-x64";
|
|
20
14
|
|
|
21
15
|
export type TargetArch = "x64" | "arm64";
|
|
22
16
|
|
|
@@ -32,8 +26,8 @@ export interface HostTarget {
|
|
|
32
26
|
readonly unameKeys: ReadonlyArray<string>;
|
|
33
27
|
/**
|
|
34
28
|
* `$env:PROCESSOR_ARCHITECTURE` values the PowerShell launcher matches; empty
|
|
35
|
-
* off Windows.
|
|
36
|
-
*
|
|
29
|
+
* off Windows. A 32-bit shell on an x64 host reports `x86` there, so a
|
|
30
|
+
* launcher must read `PROCESSOR_ARCHITEW6432` first.
|
|
37
31
|
*/
|
|
38
32
|
readonly processorArchitectures: ReadonlyArray<string>;
|
|
39
33
|
}
|
|
@@ -57,10 +51,8 @@ const target = (
|
|
|
57
51
|
export const HOST_TARGETS: ReadonlyArray<HostTarget> = [
|
|
58
52
|
target("linux-x64", "linux", "x64", ["Linux-x86_64"], []),
|
|
59
53
|
target("linux-arm64", "linux", "arm64", ["Linux-aarch64"], []),
|
|
60
|
-
target("darwin-x64", "darwin", "x64", ["Darwin-x86_64"], []),
|
|
61
54
|
target("darwin-arm64", "darwin", "arm64", ["Darwin-arm64"], []),
|
|
62
55
|
target("windows-x64", "windows", "x64", [], ["AMD64"]),
|
|
63
|
-
target("windows-arm64", "windows", "arm64", [], ["ARM64"]),
|
|
64
56
|
];
|
|
65
57
|
|
|
66
58
|
function targetFor(platform: PlatformName, arch: string): HostTarget | undefined {
|
|
@@ -97,7 +97,7 @@ function commandShimInvocation(executablePath: string, args: ReadonlyArray<strin
|
|
|
97
97
|
} as const;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
// Host module for the windows-x64
|
|
100
|
+
// Host module for the windows-x64 target admitted in os/targets.ts.
|
|
101
101
|
export const windows: HostOs = {
|
|
102
102
|
id: "windows",
|
|
103
103
|
toolchainOs: "windows",
|
package/cli/src/engine.ts
CHANGED
|
@@ -21,7 +21,7 @@ const requireSupportedHost = () => {
|
|
|
21
21
|
return targetForHost(platform, arch) !== undefined
|
|
22
22
|
? Effect.void
|
|
23
23
|
: bail(
|
|
24
|
-
`unsupported host ${platform}/${arch}; docks-kit supports
|
|
24
|
+
`unsupported host ${platform}/${arch}; docks-kit supports Linux on x64 and arm64, macOS on arm64, and Windows on x64`,
|
|
25
25
|
2,
|
|
26
26
|
);
|
|
27
27
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by cli/scripts/generate-sot-payload.ts. DO NOT EDIT.
|
|
2
2
|
// Edit SoT/, notification.mp3, or package.json, then run: bun cli/scripts/generate-sot-payload.ts
|
|
3
3
|
|
|
4
|
-
export const GENERATED_PACKAGE_VERSION = "0.
|
|
4
|
+
export const GENERATED_PACKAGE_VERSION = "0.22.1"
|
|
5
5
|
|
|
6
6
|
export const GENERATED_PAYLOAD_TEXT = {
|
|
7
7
|
"SoT/.agents/skills.txt": "# Universal AI-agent skill manifest intentionally empty.\n# Global skill discovery is opt-in: add one slug per installed skill: <owner>/<repo>@<skill-name> (or a path to one skill directory).\n# EngineNative ignores comments and blank lines.\n",
|
|
@@ -17,7 +17,7 @@ export const GENERATED_PAYLOAD_TEXT = {
|
|
|
17
17
|
"SoT/.codex/config.toml": "model = \"gpt-6.1-sol\"\nmodel_reasoning_effort = \"high\"\nplan_mode_reasoning_effort = \"high\"\nmodel_reasoning_summary = \"concise\"\nmodel_verbosity = \"low\"\nweb_search = \"live\"\nproject_doc_max_bytes = 131072\napproval_policy = \"on-request\"\nsandbox_mode = \"workspace-write\"\napprovals_reviewer = \"auto_review\"\n\n[sandbox_workspace_write]\nnetwork_access = true\n\n[windows]\nsandbox = \"elevated\"\n\n[features]\nmemories = true\n\n[memories]\ndedicated_tools = true\nmax_rollout_age_days = 30\n\n[agents]\nmax_threads = 12\nmax_depth = 2\n\n[tui]\nstatus_line_use_colors = true\nstatus_line = [\n \"model-with-reasoning\",\n \"current-dir\",\n \"git-branch\",\n \"context-used\",\n \"five-hour-limit\",\n \"weekly-limit\",\n]\n\n[plugins.\"docks@docks\"]\nenabled = true\n\n[plugins.\"plan-lifecycle@docks\"]\nenabled = true\n",
|
|
18
18
|
"SoT/.codex/plugins/marketplace.json": "{\n \"name\": \"docks\",\n \"interface\": {\n \"displayName\": \"DocksDocks\"\n },\n \"plugins\": [\n {\n \"name\": \"docks\",\n \"source\": {\n \"source\": \"git-subdir\",\n \"url\": \"https://github.com/DocksDocks/docks.git\",\n \"path\": \"./plugins/docks\",\n \"ref\": \"main\"\n },\n \"policy\": {\n \"installation\": \"AVAILABLE\",\n \"authentication\": \"ON_INSTALL\"\n },\n \"category\": \"Productivity\"\n },\n {\n \"name\": \"plan-lifecycle\",\n \"source\": {\n \"source\": \"git-subdir\",\n \"url\": \"https://github.com/DocksDocks/docks.git\",\n \"path\": \"./plugins/plan-lifecycle\",\n \"ref\": \"main\"\n },\n \"policy\": {\n \"installation\": \"AVAILABLE\",\n \"authentication\": \"ON_INSTALL\"\n },\n \"category\": \"Productivity\"\n }\n ]\n}\n",
|
|
19
19
|
"SoT/.codex/rules/docks.rules": "prefix_rule(pattern=[\"pwd\"], decision=\"allow\")\nprefix_rule(pattern=[\"ls\"], decision=\"allow\")\nprefix_rule(pattern=[\"cat\"], decision=\"allow\")\nprefix_rule(pattern=[\"head\"], decision=\"allow\")\nprefix_rule(pattern=[\"tail\"], decision=\"allow\")\nprefix_rule(pattern=[\"wc\"], decision=\"allow\")\nprefix_rule(pattern=[\"nl\"], decision=\"allow\")\nprefix_rule(pattern=[\"grep\"], decision=\"allow\")\nprefix_rule(pattern=[\"diff\"], decision=\"allow\")\nprefix_rule(pattern=[\"which\"], decision=\"allow\")\nprefix_rule(pattern=[\"date\"], decision=\"allow\")\nprefix_rule(pattern=[\"basename\"], decision=\"allow\")\nprefix_rule(pattern=[\"dirname\"], decision=\"allow\")\nprefix_rule(pattern=[\"realpath\"], decision=\"allow\")\nprefix_rule(pattern=[\"readlink\"], decision=\"allow\")\nprefix_rule(pattern=[\"jq\"], decision=\"allow\")\nprefix_rule(pattern=[\"cut\"], decision=\"allow\")\nprefix_rule(pattern=[\"tr\"], decision=\"allow\")\nprefix_rule(pattern=[\"echo\"], decision=\"allow\")\nprefix_rule(pattern=[\"printf\"], decision=\"allow\")\nprefix_rule(pattern=[\"printenv\"], decision=\"allow\")\nprefix_rule(pattern=[\"uname\"], decision=\"allow\")\nprefix_rule(pattern=[\"file\"], decision=\"allow\")\nprefix_rule(pattern=[\"stat\"], decision=\"allow\")\nprefix_rule(pattern=[\"du\"], decision=\"allow\")\nprefix_rule(pattern=[\"id\"], decision=\"allow\")\nprefix_rule(pattern=[\"whoami\"], decision=\"allow\")\n\nprefix_rule(pattern=[\"git\", \"status\"], decision=\"allow\")\nprefix_rule(pattern=[\"git\", \"blame\"], decision=\"allow\")\nprefix_rule(pattern=[\"git\", \"rev-parse\"], decision=\"allow\")\nprefix_rule(pattern=[\"git\", \"ls-files\"], decision=\"allow\")\nprefix_rule(pattern=[\"git\", \"ls-tree\"], decision=\"allow\")\nprefix_rule(pattern=[\"git\", \"branch\", \"--show-current\"], decision=\"allow\")\nprefix_rule(pattern=[\"git\", \"branch\", \"-vv\"], decision=\"allow\")\n\nprefix_rule(pattern=[\"gh\", \"pr\", \"view\"], decision=\"allow\")\nprefix_rule(pattern=[\"gh\", \"pr\", \"list\"], decision=\"allow\")\nprefix_rule(pattern=[\"gh\", \"pr\", \"diff\"], decision=\"allow\")\nprefix_rule(pattern=[\"gh\", \"pr\", \"status\"], decision=\"allow\")\nprefix_rule(pattern=[\"gh\", \"pr\", \"checks\"], decision=\"allow\")\n\nprefix_rule(pattern=[\"docker\", \"ps\"], decision=\"allow\")\n\nprefix_rule(pattern=[\"git\", \"push\"], decision=\"prompt\")\nprefix_rule(pattern=[\"git\", \"reset\"], decision=\"prompt\")\nprefix_rule(pattern=[\"git\", \"clean\"], decision=\"prompt\")\nprefix_rule(pattern=[\"git\", \"merge\"], decision=\"prompt\")\nprefix_rule(pattern=[\"git\", \"rebase\"], decision=\"prompt\")\nprefix_rule(pattern=[\"git\", \"checkout\"], decision=\"prompt\")\nprefix_rule(pattern=[\"git\", \"mv\"], decision=\"prompt\")\n\nprefix_rule(pattern=[\"rm\"], decision=\"prompt\")\nprefix_rule(pattern=[\"mv\"], decision=\"prompt\")\nprefix_rule(pattern=[\"chmod\"], decision=\"prompt\")\nprefix_rule(pattern=[\"chown\"], decision=\"prompt\")\nprefix_rule(pattern=[\"kill\"], decision=\"prompt\")\nprefix_rule(pattern=[\"pkill\"], decision=\"prompt\")\n\nprefix_rule(pattern=[\"npm\", \"install\"], decision=\"prompt\")\nprefix_rule(pattern=[\"npm\", \"uninstall\"], decision=\"prompt\")\nprefix_rule(pattern=[\"pnpm\", \"add\"], decision=\"prompt\")\nprefix_rule(pattern=[\"pnpm\", \"remove\"], decision=\"prompt\")\nprefix_rule(pattern=[\"yarn\", \"add\"], decision=\"prompt\")\nprefix_rule(pattern=[\"yarn\", \"remove\"], decision=\"prompt\")\nprefix_rule(pattern=[\"pip\", \"install\"], decision=\"prompt\")\nprefix_rule(pattern=[\"pip\", \"uninstall\"], decision=\"prompt\")\nprefix_rule(pattern=[\"pip3\", \"install\"], decision=\"prompt\")\nprefix_rule(pattern=[\"pip3\", \"uninstall\"], decision=\"prompt\")\n\nprefix_rule(pattern=[\"docker\", \"run\"], decision=\"prompt\")\nprefix_rule(pattern=[\"docker\", \"rm\"], decision=\"prompt\")\nprefix_rule(pattern=[\"docker\", \"stop\"], decision=\"prompt\")\nprefix_rule(pattern=[\"docker\", \"volume\"], decision=\"prompt\")\nprefix_rule(pattern=[\"docker\", \"system\"], decision=\"prompt\")\nprefix_rule(pattern=[\"docker\", \"compose\", \"up\"], decision=\"prompt\")\nprefix_rule(pattern=[\"docker\", \"compose\", \"down\"], decision=\"prompt\")\nprefix_rule(pattern=[\"docker\", \"compose\", \"rm\"], decision=\"prompt\")\nprefix_rule(pattern=[\"docker\", \"compose\", \"stop\"], decision=\"prompt\")\nprefix_rule(pattern=[\"docker-compose\", \"up\"], decision=\"prompt\")\nprefix_rule(pattern=[\"docker-compose\", \"down\"], decision=\"prompt\")\nprefix_rule(pattern=[\"docker-compose\", \"rm\"], decision=\"prompt\")\nprefix_rule(pattern=[\"docker-compose\", \"stop\"], decision=\"prompt\")\n\n# `tail -f`/`--follow` never returns and hangs the agent (bare `tail` stays allowed above).\nprefix_rule(pattern=[\"tail\", \"-f\"], decision=\"prompt\")\nprefix_rule(pattern=[\"tail\", \"--follow\"], decision=\"prompt\")\n# These commands are prompt or absent, NOT allow, because argv-prefix matching\n# cannot gate a later write or exec flag, and allow runs outside the sandbox:\n# rg --pre=CMD; sed -n 'e CMD' or -ni; sort -o FILE or --compress-program=CMD;\n# the uniq OUTPUT operand; tree -o FILE; git diff/log/show --output=FILE;\n# git grep --open-files-in-pager=CMD or -O; git mv into .git/hooks.\n# Without a rule, sort, uniq, tree, git diff/log/show, and git grep run in the\n# sandbox with no prompt.\nprefix_rule(pattern=[\"rg\"], decision=\"prompt\")\nprefix_rule(pattern=[\"sed\", \"-n\"], decision=\"prompt\")\nprefix_rule(pattern=[\"find\"], decision=\"prompt\")\nprefix_rule(pattern=[\"sed\", \"-i\"], decision=\"prompt\")\nprefix_rule(pattern=[\"sed\", \"--in-place\"], decision=\"prompt\")\nprefix_rule(pattern=[\"awk\"], decision=\"prompt\")\nprefix_rule(pattern=[\"xargs\"], decision=\"prompt\")\nprefix_rule(pattern=[\"tee\"], decision=\"prompt\")\nprefix_rule(pattern=[\"curl\"], decision=\"prompt\")\nprefix_rule(pattern=[\"env\"], decision=\"prompt\")\n\nprefix_rule(pattern=[\"sudo\"], decision=\"forbidden\")\nprefix_rule(pattern=[\"eval\"], decision=\"forbidden\")\nprefix_rule(pattern=[\"mkfs\"], decision=\"forbidden\")\nprefix_rule(pattern=[\"dd\"], decision=\"forbidden\")\nprefix_rule(pattern=[\"git\", \"push\", \"--force\", \"origin\", \"main\"], decision=\"forbidden\")\nprefix_rule(pattern=[\"git\", \"push\", \"--force\", \"origin\", \"master\"], decision=\"forbidden\")\nprefix_rule(pattern=[\"git\", \"push\", \"-f\", \"origin\", \"main\"], decision=\"forbidden\")\nprefix_rule(pattern=[\"git\", \"push\", \"-f\", \"origin\", \"master\"], decision=\"forbidden\")\n\n# Destructive-command guards. Codex applies the strictest matching rule\n# (forbidden > prompt > allow), so an allow rule in another .rules file cannot\n# loosen them, and a narrow allow cannot carve an exception out of a prompt.\n# The rm, find, git push, git reset, and git clean prompt rules above already\n# make every recursive or bulk deletion and every history-destroying git\n# command prompt. Codex prefix rules cannot see an option after an operand,\n# so every rm prompts, a single-file rm too. A prompt goes to the approvals\n# reviewer in config.toml (auto_review), not always to a person.\n#\n# rm of the filesystem root as Codex runs it: argv tokens, or a plain script\n# that Codex splits into argv tokens.\nprefix_rule(pattern=[\"rm\", \"/\"], decision=\"forbidden\", justification=\"Never remove the home directory or the filesystem root. Move a path to the trash with gio trash -- <path> (Linux) or trash <path> (macOS 15+).\")\nprefix_rule(pattern=[\"rm\", [\"-r\", \"-R\", \"-f\", \"-rf\", \"-fr\", \"-Rf\", \"-fR\", \"-rfv\", \"-vrf\", \"-v\", \"--recursive\", \"--force\", \"--no-preserve-root\", \"--\"], \"/\"], decision=\"forbidden\", justification=\"Never remove the home directory or the filesystem root. Move a path to the trash with gio trash -- <path> (Linux) or trash <path> (macOS 15+).\")\nprefix_rule(pattern=[\"rm\", [\"-r\", \"-R\", \"-f\", \"-rf\", \"-fr\", \"-Rf\", \"-fR\", \"-rfv\", \"-vrf\", \"-v\", \"--recursive\", \"--force\", \"--no-preserve-root\", \"--\"], [\"-r\", \"-R\", \"-f\", \"-rf\", \"-fr\", \"-Rf\", \"-fR\", \"-rfv\", \"-vrf\", \"-v\", \"--recursive\", \"--force\", \"--no-preserve-root\", \"--\"], \"/\"], decision=\"forbidden\", justification=\"Never remove the home directory or the filesystem root. Move a path to the trash with gio trash -- <path> (Linux) or trash <path> (macOS 15+).\")\nprefix_rule(pattern=[\"rm\", [\"-r\", \"-R\", \"-f\", \"-rf\", \"-fr\", \"-Rf\", \"-fR\", \"-rfv\", \"-vrf\", \"-v\", \"--recursive\", \"--force\", \"--no-preserve-root\", \"--\"], [\"-r\", \"-R\", \"-f\", \"-rf\", \"-fr\", \"-Rf\", \"-fR\", \"-rfv\", \"-vrf\", \"-v\", \"--recursive\", \"--force\", \"--no-preserve-root\", \"--\"], [\"-r\", \"-R\", \"-f\", \"-rf\", \"-fr\", \"-Rf\", \"-fR\", \"-rfv\", \"-vrf\", \"-v\", \"--recursive\", \"--force\", \"--no-preserve-root\", \"--\"], \"/\"], decision=\"forbidden\", justification=\"Never remove the home directory or the filesystem root. Move a path to the trash with gio trash -- <path> (Linux) or trash <path> (macOS 15+).\")\n# Codex does not split a script that holds ~, $HOME, a glob, or a substitution.\n# It matches the whole [shell, -c, script] invocation, so these rules forbid\n# only the exact scripts listed.\nprefix_rule(pattern=[[\"bash\", \"sh\", \"zsh\"], [\"-c\", \"-lc\"], [\"rm ~\", \"rm -r ~\", \"rm -R ~\", \"rm -f ~\", \"rm -rf ~\", \"rm -fr ~\", \"rm -Rf ~\", \"rm -fR ~\", \"rm -r -f ~\", \"rm -f -r ~\", \"rm --recursive ~\", \"rm --recursive --force ~\"]], decision=\"forbidden\", justification=\"Never remove the home directory or the filesystem root. Move a path to the trash with gio trash -- <path> (Linux) or trash <path> (macOS 15+).\")\nprefix_rule(pattern=[[\"bash\", \"sh\", \"zsh\"], [\"-c\", \"-lc\"], [\"rm ~/\", \"rm -r ~/\", \"rm -R ~/\", \"rm -f ~/\", \"rm -rf ~/\", \"rm -fr ~/\", \"rm -Rf ~/\", \"rm -fR ~/\", \"rm -r -f ~/\", \"rm -f -r ~/\", \"rm --recursive ~/\", \"rm --recursive --force ~/\"]], decision=\"forbidden\", justification=\"Never remove the home directory or the filesystem root. Move a path to the trash with gio trash -- <path> (Linux) or trash <path> (macOS 15+).\")\nprefix_rule(pattern=[[\"bash\", \"sh\", \"zsh\"], [\"-c\", \"-lc\"], [\"rm $HOME\", \"rm -r $HOME\", \"rm -R $HOME\", \"rm -f $HOME\", \"rm -rf $HOME\", \"rm -fr $HOME\", \"rm -Rf $HOME\", \"rm -fR $HOME\", \"rm -r -f $HOME\", \"rm -f -r $HOME\", \"rm --recursive $HOME\", \"rm --recursive --force $HOME\"]], decision=\"forbidden\", justification=\"Never remove the home directory or the filesystem root. Move a path to the trash with gio trash -- <path> (Linux) or trash <path> (macOS 15+).\")\nprefix_rule(pattern=[[\"bash\", \"sh\", \"zsh\"], [\"-c\", \"-lc\"], [\"rm $HOME/\", \"rm -r $HOME/\", \"rm -R $HOME/\", \"rm -f $HOME/\", \"rm -rf $HOME/\", \"rm -fr $HOME/\", \"rm -Rf $HOME/\", \"rm -fR $HOME/\", \"rm -r -f $HOME/\", \"rm -f -r $HOME/\", \"rm --recursive $HOME/\", \"rm --recursive --force $HOME/\"]], decision=\"forbidden\", justification=\"Never remove the home directory or the filesystem root. Move a path to the trash with gio trash -- <path> (Linux) or trash <path> (macOS 15+).\")\nprefix_rule(pattern=[[\"bash\", \"sh\", \"zsh\"], [\"-c\", \"-lc\"], [\"rm \\\"$HOME\\\"\", \"rm -r \\\"$HOME\\\"\", \"rm -R \\\"$HOME\\\"\", \"rm -f \\\"$HOME\\\"\", \"rm -rf \\\"$HOME\\\"\", \"rm -fr \\\"$HOME\\\"\", \"rm -Rf \\\"$HOME\\\"\", \"rm -fR \\\"$HOME\\\"\", \"rm -r -f \\\"$HOME\\\"\", \"rm -f -r \\\"$HOME\\\"\", \"rm --recursive \\\"$HOME\\\"\", \"rm --recursive --force \\\"$HOME\\\"\"]], decision=\"forbidden\", justification=\"Never remove the home directory or the filesystem root. Move a path to the trash with gio trash -- <path> (Linux) or trash <path> (macOS 15+).\")\nprefix_rule(pattern=[[\"bash\", \"sh\", \"zsh\"], [\"-c\", \"-lc\"], [\"rm \\\"$HOME/\\\"\", \"rm -r \\\"$HOME/\\\"\", \"rm -R \\\"$HOME/\\\"\", \"rm -f \\\"$HOME/\\\"\", \"rm -rf \\\"$HOME/\\\"\", \"rm -fr \\\"$HOME/\\\"\", \"rm -Rf \\\"$HOME/\\\"\", \"rm -fR \\\"$HOME/\\\"\", \"rm -r -f \\\"$HOME/\\\"\", \"rm -f -r \\\"$HOME/\\\"\", \"rm --recursive \\\"$HOME/\\\"\", \"rm --recursive --force \\\"$HOME/\\\"\"]], decision=\"forbidden\", justification=\"Never remove the home directory or the filesystem root. Move a path to the trash with gio trash -- <path> (Linux) or trash <path> (macOS 15+).\")\nprefix_rule(pattern=[[\"bash\", \"sh\", \"zsh\"], [\"-c\", \"-lc\"], [\"rm \\\"$HOME\\\"/\", \"rm -r \\\"$HOME\\\"/\", \"rm -R \\\"$HOME\\\"/\", \"rm -f \\\"$HOME\\\"/\", \"rm -rf \\\"$HOME\\\"/\", \"rm -fr \\\"$HOME\\\"/\", \"rm -Rf \\\"$HOME\\\"/\", \"rm -fR \\\"$HOME\\\"/\", \"rm -r -f \\\"$HOME\\\"/\", \"rm -f -r \\\"$HOME\\\"/\", \"rm --recursive \\\"$HOME\\\"/\", \"rm --recursive --force \\\"$HOME\\\"/\"]], decision=\"forbidden\", justification=\"Never remove the home directory or the filesystem root. Move a path to the trash with gio trash -- <path> (Linux) or trash <path> (macOS 15+).\")\nprefix_rule(pattern=[[\"bash\", \"sh\", \"zsh\"], [\"-c\", \"-lc\"], [\"rm ${HOME}\", \"rm -r ${HOME}\", \"rm -R ${HOME}\", \"rm -f ${HOME}\", \"rm -rf ${HOME}\", \"rm -fr ${HOME}\", \"rm -Rf ${HOME}\", \"rm -fR ${HOME}\", \"rm -r -f ${HOME}\", \"rm -f -r ${HOME}\", \"rm --recursive ${HOME}\", \"rm --recursive --force ${HOME}\"]], decision=\"forbidden\", justification=\"Never remove the home directory or the filesystem root. Move a path to the trash with gio trash -- <path> (Linux) or trash <path> (macOS 15+).\")\nprefix_rule(pattern=[[\"bash\", \"sh\", \"zsh\"], [\"-c\", \"-lc\"], [\"rm ${HOME}/\", \"rm -r ${HOME}/\", \"rm -R ${HOME}/\", \"rm -f ${HOME}/\", \"rm -rf ${HOME}/\", \"rm -fr ${HOME}/\", \"rm -Rf ${HOME}/\", \"rm -fR ${HOME}/\", \"rm -r -f ${HOME}/\", \"rm -f -r ${HOME}/\", \"rm --recursive ${HOME}/\", \"rm --recursive --force ${HOME}/\"]], decision=\"forbidden\", justification=\"Never remove the home directory or the filesystem root. Move a path to the trash with gio trash -- <path> (Linux) or trash <path> (macOS 15+).\")\nprefix_rule(pattern=[[\"bash\", \"sh\", \"zsh\"], [\"-c\", \"-lc\"], [\"rm \\\"${HOME}\\\"\", \"rm -r \\\"${HOME}\\\"\", \"rm -R \\\"${HOME}\\\"\", \"rm -f \\\"${HOME}\\\"\", \"rm -rf \\\"${HOME}\\\"\", \"rm -fr \\\"${HOME}\\\"\", \"rm -Rf \\\"${HOME}\\\"\", \"rm -fR \\\"${HOME}\\\"\", \"rm -r -f \\\"${HOME}\\\"\", \"rm -f -r \\\"${HOME}\\\"\", \"rm --recursive \\\"${HOME}\\\"\", \"rm --recursive --force \\\"${HOME}\\\"\"]], decision=\"forbidden\", justification=\"Never remove the home directory or the filesystem root. Move a path to the trash with gio trash -- <path> (Linux) or trash <path> (macOS 15+).\")\nprefix_rule(pattern=[[\"bash\", \"sh\", \"zsh\"], [\"-c\", \"-lc\"], [\"rm \\\"${HOME}/\\\"\", \"rm -r \\\"${HOME}/\\\"\", \"rm -R \\\"${HOME}/\\\"\", \"rm -f \\\"${HOME}/\\\"\", \"rm -rf \\\"${HOME}/\\\"\", \"rm -fr \\\"${HOME}/\\\"\", \"rm -Rf \\\"${HOME}/\\\"\", \"rm -fR \\\"${HOME}/\\\"\", \"rm -r -f \\\"${HOME}/\\\"\", \"rm -f -r \\\"${HOME}/\\\"\", \"rm --recursive \\\"${HOME}/\\\"\", \"rm --recursive --force \\\"${HOME}/\\\"\"]], decision=\"forbidden\", justification=\"Never remove the home directory or the filesystem root. Move a path to the trash with gio trash -- <path> (Linux) or trash <path> (macOS 15+).\")\nprefix_rule(pattern=[[\"bash\", \"sh\", \"zsh\"], [\"-c\", \"-lc\"], [\"rm \\\"${HOME}\\\"/\", \"rm -r \\\"${HOME}\\\"/\", \"rm -R \\\"${HOME}\\\"/\", \"rm -f \\\"${HOME}\\\"/\", \"rm -rf \\\"${HOME}\\\"/\", \"rm -fr \\\"${HOME}\\\"/\", \"rm -Rf \\\"${HOME}\\\"/\", \"rm -fR \\\"${HOME}\\\"/\", \"rm -r -f \\\"${HOME}\\\"/\", \"rm -f -r \\\"${HOME}\\\"/\", \"rm --recursive \\\"${HOME}\\\"/\", \"rm --recursive --force \\\"${HOME}\\\"/\"]], decision=\"forbidden\", justification=\"Never remove the home directory or the filesystem root. Move a path to the trash with gio trash -- <path> (Linux) or trash <path> (macOS 15+).\")\nprefix_rule(pattern=[[\"bash\", \"sh\", \"zsh\"], [\"-c\", \"-lc\"], [\"rm /*\", \"rm -r /*\", \"rm -R /*\", \"rm -f /*\", \"rm -rf /*\", \"rm -fr /*\", \"rm -Rf /*\", \"rm -fR /*\", \"rm -r -f /*\", \"rm -f -r /*\", \"rm --recursive /*\", \"rm --recursive --force /*\"]], decision=\"forbidden\", justification=\"Never remove the home directory or the filesystem root. Move a path to the trash with gio trash -- <path> (Linux) or trash <path> (macOS 15+).\")\nprefix_rule(pattern=[[\"bash\", \"sh\", \"zsh\"], [\"-c\", \"-lc\"], [\"export HOME=$(mktemp -d)\", \"export HOME=\\\"$(mktemp -d)\\\"\", \"HOME=$(mktemp -d)\", \"HOME=\\\"$(mktemp -d)\\\"\"]], decision=\"forbidden\", justification=\"Never reassign HOME. Each command runs in a new shell, so use literal absolute paths.\")\n\n# Forced git removal discards uncommitted changes, and the prefix cannot see a\n# later --force, so both commands ask in every form.\nprefix_rule(pattern=[\"git\", \"rm\"], decision=\"prompt\", justification=\"git rm --force and git worktree remove --force discard uncommitted changes. A prefix rule cannot see a later --force, so every git rm and git worktree remove asks.\")\nprefix_rule(pattern=[\"git\", \"worktree\", \"remove\"], decision=\"prompt\", justification=\"git rm --force and git worktree remove --force discard uncommitted changes. A prefix rule cannot see a later --force, so every git rm and git worktree remove asks.\")\n\n# gio trash can empty the trash or overwrite a restored path, and the prefix\n# cannot tell those forms from gio trash -- <path>, so every gio trash asks.\n# The macOS trash command has no such option.\nprefix_rule(pattern=[\"gio\", \"trash\"], decision=\"prompt\", justification=\"gio trash -f --empty, -ff --empty, and --restore --force delete or overwrite data, and a prefix rule cannot tell them from gio trash -- <path>, so every gio trash asks.\")\nprefix_rule(pattern=[\"trash\"], decision=\"allow\")\n",
|
|
20
|
-
"SoT/.omp/AGENTS.md": "# Global OMP guidance\n\n- Verify unfamiliar or version-sensitive APIs and configuration against current official documentation before implementation.\n- When the user asks for an assessment rather than a change, report findings without editing.\n- For Docks plan reviews, cross-company review is standing-authorized; host security policy still applies.\n- Please remove all mannered prose.\n\n## Asking me things\n\nIf you need an answer from me, it MUST go through `ask`; do not ask in prose.\n\nMUST use `ask` before:\n- Anything irreversible or destructive: deleting/overwriting files or data you did not create,\n force-push, history rewrite, dropping tables, running migrations, mass rename, touching\n secrets/credentials, or publishing outward (release, upstream PR, issue, comment).\n- Two or more viable approaches whose tradeoffs are mine to own: schema/API/protocol shape,\n adding a dependency, or establishing a convention this repo does not already have.\n- A fact only I hold: intended semantics of an ambiguous requirement, which of several\n conflicting existing patterns is canonical, or which environment/account/target to use.\n- A request that contradicts the repo: surface the conflict and let me resolve it; never\n silently pick one side.\n\nWhen I invoke the `yolo` skill, that invocation answers every ask this section requires,\nuntil the run asks its merge question. It does not cover destructive work, secrets, or\nproduction systems.\n\nIf `ask` is not registered — subagent, headless, or `-p` print runs, where `hasUI` is false —\nthe MUST above cannot be satisfied: do not fabricate the call and do not stall on it. Take the\nconservative reversible option and put the question, plus the assumption you made, in your\nfinal report so whoever spawned you can decide.\n\nNEVER use `ask` for:\n- Permission to begin, or to confirm scope already stated in the request.\n- Anything a tool, grep, or doc can answer — go read it.\n- A cheap reversible choice — take the conservative option and say which you took.\n- Something already answered earlier in the conversation.\n\nBatch every open question into one `ask` call with multiple questions; do not serialize\nround trips. Being overruled ends the discussion — execute my call without relitigating.\n\n## Removing files\n\nTo remove, use the trash or a command that checks the path.\n\n- To remove a temporary file or directory, use the `scratch_remove` tool or run `docks-kit scratch remove <path>`. Both remove only a path inside the scratch root, the system temporary directory, or `/var/tmp`. `gio trash` does not work on a `tmpfs` `/tmp`.\n- To remove any other file or directory, run `gio trash -- <path>` on Linux or `trash <path>` on macOS.\n- To remove a path from the git index, run `git rm -- <path>`.\n- To remove a worktree, run `git worktree remove -- <path>`.\n- If git refuses because the worktree has changes, make sure that each of its commits is on the remote. Then make sure that `git status --porcelain` lists only generated files. Then run `git worktree remove --force -- <path>`.\n- Never pass `--force` two times to `git worktree remove`.\n- Write the `--` exactly as shown.\n- Do not use `rm`. omp denies a recursive `rm`, `find -delete`, `find -exec rm`, and `xargs rm`.\n- Do not delete files through `eval`, Python, or Node code.\n- A subagent cannot get my approval, so omp rejects every ask in a subagent.\n- Do not delete in bulk yourself (`git clean`, `git reset --hard`). In the main session, ask me first.\n- If a deletion needs `rm -r` or a bulk command, put the paths in your report. I run that deletion myself.\n- Do not use `--force`, `-f`, or an abbreviation of it with `git rm` or `git push`.\n- Write literal absolute paths. Do not use `~` or `$HOME` in a command.\n- Do not set or export `HOME`.\n\n## Cleaning up what you create\n\n- Follow the `workspace-hygiene` skill for each resource that you create: worktrees, temporary files and directories, processes, containers, clusters, tunnels, scheduled jobs, global installs, and remote test resources.\n- Create a temporary directory with the `scratch_new` tool or `docks-kit scratch new <label>`. Put each temporary file in that directory. Do not put a temporary file, a temporary directory, a package store, a cache, or a clone in `/tmp`.\n- Create a worktree only at `<data>/agent-worktrees/<repository>/<name>`. `<data>` is `$XDG_DATA_HOME`, or `.local/share` in the home directory when that variable is not set. Write the literal absolute path.\n- Run a test suite in single-run mode. Start a server, a watcher, a tunnel, or a database only as a named bash service or an async job. Do not detach a process with `nohup`, `setsid`, `disown`, `tmux`, or `screen`.\n- Do not install a package globally, add a scheduled job, or enable a service unless I ask for it.\n- Do not remove a Docker volume, image, or build cache that you did not create, and do not run `docker system prune`.\n- Before your final answer, remove each resource that you created and that the task no longer needs. Keep a resource only when I ask for it or a later step needs it, and name it in your final answer.\n- A scratch directory is deleted after 7 idle days. Put evidence that you cite in the issue, the pull request, or the repository.\n- Resources on this workstation are always development. A remote resource is one that you reach through SSH or a provider CLI, such as `wrangler`, `vercel`, `netlify`, `fly`, `supabase`, `kubectl`, or a remote Docker host.\n- Clean up a remote resource only when its target is named local, development, dev, test, homolog, homologation, staging, or preview. Every other target is production. For example, `wrangler delete` without `--env` acts on the top-level Worker, which is usually production.\n- Never stop, remove, undeploy, or delete a production resource without an `ask` immediately before it. A production cleanup must be rare. A `yolo` invocation does not answer this ask. In a subagent, do not do it; name the resource in your report.\n\n## Output Standard\n\nApply Simplified Technical English to all agent text. This includes responses, messages,\ndocumentation, comments, and interface text.\n\nReply in the language I use, and apply every rule below to that language.\n\nA rule that names English grammar applies only to English. The contraction ban is one\nsuch rule. In another language, follow the normal grammar of that language. Portuguese,\nSpanish, French, Italian, and German merge a preposition with an article, and that merge\nis required, not optional.\n\nTreat the word limits as approximate outside English.\n\n- Use the simplest precise technical term.\n- Use each term consistently.\n- Expand an abbreviation at its first occurrence.\n- Explain a technical term when I ask for an explanation.\n- Write complete and grammatically correct sentences.\n- Use active voice and identify the actor.\n- Use the imperative form for instructions.\n- Put only one action in each instruction sentence.\n- Put a necessary condition before its instruction.\n- Use simple verb tenses.\n- Do not use contractions, idioms, or slang. Avoid humor and rhetorical questions.\n- Keep procedural sentences to 20 words or fewer.\n- Keep descriptive sentences to 25 words or fewer.\n- Keep each paragraph to one topic and six sentences or fewer.\n- Do not use more than three nouns together.\n- Use vertical lists for complex information.\n- Put a warning or caution before a related hazardous instruction.\n\n### Naming\n\n- Say what the thing does before you name it. Put the technical term after the plain\n description, once, in parentheses.\n- Do not use a technical term as the only name for something you just introduced.\n- Prefer the short common word. Use \"use\", not \"utilize\". Use \"set up\", not \"provision\".\n- Do not explain by metaphor alone. A metaphor may follow a literal statement.\n",
|
|
20
|
+
"SoT/.omp/AGENTS.md": "# Global OMP guidance\n\n- Verify unfamiliar or version-sensitive APIs and configuration against current official documentation before implementation.\n- When the user asks for an assessment rather than a change, report findings without editing.\n- For Docks plan reviews, cross-company review is standing-authorized; host security policy still applies.\n- Please remove all mannered prose.\n\n## Asking me things\n\nIf you need an answer from me, it MUST go through `ask`; do not ask in prose.\n\nMUST use `ask` before:\n- Anything irreversible or destructive: deleting/overwriting files or data you did not create,\n force-push, history rewrite, dropping tables, running migrations, mass rename, touching\n secrets/credentials, or publishing outward (release, upstream PR, issue, comment).\n- Two or more viable approaches whose tradeoffs are mine to own: schema/API/protocol shape,\n adding a dependency, or establishing a convention this repo does not already have.\n- A fact only I hold: intended semantics of an ambiguous requirement, which of several\n conflicting existing patterns is canonical, or which environment/account/target to use.\n- A request that contradicts the repo: surface the conflict and let me resolve it; never\n silently pick one side.\n\nWhen I invoke the `yolo` skill, that invocation answers every ask this section requires,\nuntil the run asks its merge question. It does not cover destructive work, secrets, or\nproduction systems.\n\nIf `ask` is not registered — subagent, headless, or `-p` print runs, where `hasUI` is false —\nthe MUST above cannot be satisfied: do not fabricate the call and do not stall on it. Take the\nconservative reversible option and put the question, plus the assumption you made, in your\nfinal report so whoever spawned you can decide.\n\nNEVER use `ask` for:\n- Permission to begin, or to confirm scope already stated in the request.\n- Anything a tool, grep, or doc can answer — go read it.\n- A cheap reversible choice — take the conservative option and say which you took.\n- Something already answered earlier in the conversation.\n\nBatch every open question into one `ask` call with multiple questions; do not serialize\nround trips. Being overruled ends the discussion — execute my call without relitigating.\n\n## Removing files\n\nTo remove, use the trash or a command that checks the path.\n\n- To remove a temporary file or directory, use the `scratch_remove` tool or run `docks-kit scratch remove <path>`. Both remove only a path inside the scratch root, the system temporary directory, or `/var/tmp`. `gio trash` does not work on a `tmpfs` `/tmp`.\n- To remove any other file or directory, run `gio trash -- <path>` on Linux or `trash <path>` on macOS.\n- To remove a path from the git index, run `git rm -- <path>`.\n- To remove a worktree, run `git worktree remove -- <path>`.\n- If git refuses because the worktree has changes, make sure that each of its commits is on the remote. Then make sure that `git status --porcelain` lists only generated files. Then run `git worktree remove --force -- <path>`.\n- Never pass `--force` two times to `git worktree remove`.\n- Write the `--` exactly as shown.\n- Do not use `rm`. omp denies a recursive `rm`, `find -delete`, `find -exec rm`, and `xargs rm`.\n- Do not delete files through `eval`, Python, or Node code.\n- A subagent cannot get my approval, so omp rejects every ask in a subagent.\n- Do not delete in bulk yourself (`git clean`, `git reset --hard`). In the main session, ask me first.\n- If a deletion needs `rm -r` or a bulk command, put the paths in your report. I run that deletion myself.\n- Do not use `--force`, `-f`, or an abbreviation of it with `git rm` or `git push`.\n- Write each ref of a `git push` command as literal text, not as a `$` variable or a backtick substitution. To delete several remote branches, list them in one command: `git push origin --delete <branch-a> <branch-b>`.\n- Write literal absolute paths. Do not use `~` or `$HOME` in a command.\n- Do not set or export `HOME`.\n\n## Cleaning up what you create\n\n- Follow the `workspace-hygiene` skill for each resource that you create: worktrees, temporary files and directories, processes, containers, clusters, tunnels, scheduled jobs, global installs, and remote test resources.\n- Create a temporary directory with the `scratch_new` tool or `docks-kit scratch new <label>`. Put each temporary file in that directory. Do not put a temporary file, a temporary directory, a package store, a cache, or a clone in `/tmp`.\n- Create a worktree only at `<data>/agent-worktrees/<repository>/<name>`. `<data>` is `$XDG_DATA_HOME`, or `.local/share` in the home directory when that variable is not set. Write the literal absolute path.\n- Run a test suite in single-run mode. Start a server, a watcher, a tunnel, or a database only as a named bash service or an async job. Do not detach a process with `nohup`, `setsid`, `disown`, `tmux`, or `screen`.\n- Do not install a package globally, add a scheduled job, or enable a service unless I ask for it.\n- Do not remove a Docker volume, image, or build cache that you did not create, and do not run `docker system prune`.\n- Before your final answer, remove each resource that you created and that the task no longer needs. Keep a resource only when I ask for it or a later step needs it, and name it in your final answer.\n- A scratch directory is deleted after 7 idle days. Put evidence that you cite in the issue, the pull request, or the repository.\n- Resources on this workstation are always development. A remote resource is one that you reach through SSH or a provider CLI, such as `wrangler`, `vercel`, `netlify`, `fly`, `supabase`, `kubectl`, or a remote Docker host.\n- Clean up a remote resource only when its target is named local, development, dev, test, homolog, homologation, staging, or preview. Every other target is production. For example, `wrangler delete` without `--env` acts on the top-level Worker, which is usually production.\n- Never stop, remove, undeploy, or delete a production resource without an `ask` immediately before it. A production cleanup must be rare. A `yolo` invocation does not answer this ask. In a subagent, do not do it; name the resource in your report.\n\n## Output Standard\n\nApply Simplified Technical English to all agent text. This includes responses, messages,\ndocumentation, comments, and interface text.\n\nReply in the language I use, and apply every rule below to that language.\n\nA rule that names English grammar applies only to English. The contraction ban is one\nsuch rule. In another language, follow the normal grammar of that language. Portuguese,\nSpanish, French, Italian, and German merge a preposition with an article, and that merge\nis required, not optional.\n\nTreat the word limits as approximate outside English.\n\n- Use the simplest precise technical term.\n- Use each term consistently.\n- Expand an abbreviation at its first occurrence.\n- Explain a technical term when I ask for an explanation.\n- Write complete and grammatically correct sentences.\n- Use active voice and identify the actor.\n- Use the imperative form for instructions.\n- Put only one action in each instruction sentence.\n- Put a necessary condition before its instruction.\n- Use simple verb tenses.\n- Do not use contractions, idioms, or slang. Avoid humor and rhetorical questions.\n- Keep procedural sentences to 20 words or fewer.\n- Keep descriptive sentences to 25 words or fewer.\n- Keep each paragraph to one topic and six sentences or fewer.\n- Do not use more than three nouns together.\n- Use vertical lists for complex information.\n- Put a warning or caution before a related hazardous instruction.\n\n### Naming\n\n- Say what the thing does before you name it. Put the technical term after the plain\n description, once, in parentheses.\n- Do not use a technical term as the only name for something you just introduced.\n- Prefer the short common word. Use \"use\", not \"utilize\". Use \"set up\", not \"provision\".\n- Do not explain by metaphor alone. A metaphor may follow a literal statement.\n",
|
|
21
21
|
"SoT/.omp/config.yml": "statusLine:\n compactThinkingLevel: false\n\ndefaultThinkingLevel: high\n\ncycleOrder:\n - smol\n - default\n - slow\n - fable\n - astra\n\ntier:\n anthropic: none\n\nadvisor:\n enabled: true\n syncBacklog: \"1\"\n\ngithub:\n enabled: true\n\nfind:\n enabled: true\n\nbrowser:\n idleCloseSec: 600\n\ntask:\n eager: always\n showResolvedModelBadge: true\n softRequestBudget: 200\n softRequestBudgetNotice: true\n batch: true\n enableLsp: true\n enableEffort: true\n maxEffort: xhigh\n maxConcurrency: 16\n maxRecursionDepth: 2\n maxRuntimeMs: 3600000\n agentIdleTtlMs: 120000\n agentModelOverrides:\n reviewer: \"@reviewer\"\n security-reviewer: \"@reviewer\"\n code-reviewer: \"@reviewer\"\n plan-reviewer: \"@reviewer\"\n\nmodelRoles:\n smol: openai-codex/gpt-6-luna:medium\n advisor: anthropic/claude-opus-5-5:medium\n designer: anthropic/claude-opus-5-5:high\n plan: anthropic/claude-opus-5-5:xhigh\n commit: openai-codex/gpt-6-luna:medium\n task: anthropic/claude-opus-5-5:high\n vision: anthropic/claude-opus-5-5:medium\n tiny: openai-codex/gpt-6-luna:low\n default: anthropic/claude-opus-5-5:high\n slow: anthropic/claude-opus-5-5:xhigh\n fable: anthropic/claude-fable-5-1:medium\n switch_fable: anthropic/claude-fable-5-1:medium\n astra: openai-codex/gpt-6-astra:xhigh\n reviewer: openai-codex/gpt-6.1-sol:xhigh\n web: web/firecrawl\n\nmodelTags:\n fable:\n name: Fable 5.1\n switch_fable:\n name: Fable switch default\n hidden: true\n astra:\n name: GPT-6 Astra\n reviewer:\n name: Reviewer\n hidden: true\n\ndisplay:\n showTokenUsage: true\n\nproviders:\n anthropic:\n serverSideFallback: false\n fetch: auto\n webSearchTimeoutSeconds: 30\n\nretry:\n usageAwareFallback: true\n fallbackChains:\n default:\n - openai-codex/gpt-6.1-sol:high\n advisor: []\n task:\n - openai-codex/gpt-6.1-sol:high\n vision:\n - openai-codex/gpt-6.1-sol:medium\n smol:\n - anthropic/claude-opus-5-5:low\n tiny:\n - anthropic/claude-opus-5-5:low\n commit:\n - anthropic/claude-opus-5-5:medium\n switch_fable: []\n fable:\n - openai-codex/gpt-6-astra:xhigh\n astra:\n - anthropic/claude-fable-5-1:medium\n reviewer:\n - anthropic/claude-opus-5-5:xhigh\n web:\n - web/exa\n - web/perplexity\n - openai-codex/gpt-6-luna\n - web/parallel\n - web/zai\n - web/tinyfish\n - web/jina\n - web/kagi\n - web/tavily\n - web/brave\n - web/kimi\n - web/synthetic\n - web/ollama\n - web/searxng\n - web/startpage\n - web/duckduckgo\n - web/ecosia\n - web/google\n - web/mojeek\n - web/public\n\nincludeWorkspaceTree: false\n\nbranchSummary:\n enabled: true\n\ncommands:\n enableOpencodeProject: false\n enableOpencodeUser: false\n\nskills:\n enableClaudeUser: false\n enableCodexUser: false\n enableAgentsUser: true\n\nsteeringMode: all\n\ndev:\n autoqa: false\n autoqaConsent: denied\n\ncompaction:\n thresholdTokens: -1\n idleEnabled: true\n handoffSaveToDisk: true\n\ndoubleEscapeAction: tree\ntextVerbosity: low\n\nfeatures:\n unexpectedStopDetection: smart\n\ncodexResets:\n autoRedeem: \"no\"\n\nstartup:\n quiet: true\n\ntools:\n approvalMode: yolo\n\nbash:\n # First match wins. omp checks deny and prompt rules against the whole line\n # and each quote-stripped segment, so `rm -rf \"$HOME\"` matches `rm * $HOME`.\n # `*` matches any text, spaces and slashes included; no escape spells a\n # literal `*`.\n # No rule matches a plain rm, git rm, git worktree remove, gio trash, or\n # docks-kit scratch remove, so yolo runs it.\n # omp's critical-command check turns a prompt into an allow under yolo, so\n # every rm shape it can flag is denied.\n patterns:\n # Deny: rm of the home directory or the filesystem root, sudo before rm,\n # rm with an r or f option before an absolute path, recursive rm (bare, by\n # path, or after any word such as env, xargs, find -exec, or git), bulk\n # removal through find -delete, find -exec rm, and xargs rm, HOME\n # reassignment, and a force push to main or master.\n - { match: \"rm /\", approval: deny }\n - { match: \"rm / *\", approval: deny }\n - { match: \"rm * /\", approval: deny }\n - { match: \"rm * / *\", approval: deny }\n - { match: \"rm ~\", approval: deny }\n - { match: \"rm ~ *\", approval: deny }\n - { match: \"rm * ~\", approval: deny }\n - { match: \"rm * ~ *\", approval: deny }\n - { match: \"rm ~/\", approval: deny }\n - { match: \"rm ~/ *\", approval: deny }\n - { match: \"rm * ~/\", approval: deny }\n - { match: \"rm * ~/ *\", approval: deny }\n - { match: \"rm $HOME\", approval: deny }\n - { match: \"rm $HOME *\", approval: deny }\n - { match: \"rm * $HOME\", approval: deny }\n - { match: \"rm * $HOME *\", approval: deny }\n - { match: \"rm $HOME/\", approval: deny }\n - { match: \"rm $HOME/ *\", approval: deny }\n - { match: \"rm * $HOME/\", approval: deny }\n - { match: \"rm * $HOME/ *\", approval: deny }\n - { match: \"rm ${HOME}\", approval: deny }\n - { match: \"rm ${HOME} *\", approval: deny }\n - { match: \"rm * ${HOME}\", approval: deny }\n - { match: \"rm * ${HOME} *\", approval: deny }\n - { match: \"rm ${HOME}/\", approval: deny }\n - { match: \"rm ${HOME}/ *\", approval: deny }\n - { match: \"rm * ${HOME}/\", approval: deny }\n - { match: \"rm * ${HOME}/ *\", approval: deny }\n - { match: \"* rm /\", approval: deny }\n - { match: \"* rm / *\", approval: deny }\n - { match: \"* rm * /\", approval: deny }\n - { match: \"* rm * / *\", approval: deny }\n - { match: \"* rm ~\", approval: deny }\n - { match: \"* rm ~ *\", approval: deny }\n - { match: \"* rm * ~\", approval: deny }\n - { match: \"* rm * ~ *\", approval: deny }\n - { match: \"* rm ~/\", approval: deny }\n - { match: \"* rm ~/ *\", approval: deny }\n - { match: \"* rm * ~/\", approval: deny }\n - { match: \"* rm * ~/ *\", approval: deny }\n - { match: \"* rm $HOME\", approval: deny }\n - { match: \"* rm $HOME *\", approval: deny }\n - { match: \"* rm * $HOME\", approval: deny }\n - { match: \"* rm * $HOME *\", approval: deny }\n - { match: \"* rm $HOME/\", approval: deny }\n - { match: \"* rm $HOME/ *\", approval: deny }\n - { match: \"* rm * $HOME/\", approval: deny }\n - { match: \"* rm * $HOME/ *\", approval: deny }\n - { match: \"* rm ${HOME}\", approval: deny }\n - { match: \"* rm ${HOME} *\", approval: deny }\n - { match: \"* rm * ${HOME}\", approval: deny }\n - { match: \"* rm * ${HOME} *\", approval: deny }\n - { match: \"* rm ${HOME}/\", approval: deny }\n - { match: \"* rm ${HOME}/ *\", approval: deny }\n - { match: \"* rm * ${HOME}/\", approval: deny }\n - { match: \"* rm * ${HOME}/ *\", approval: deny }\n - { match: \"*/rm /\", approval: deny }\n - { match: \"*/rm / *\", approval: deny }\n - { match: \"*/rm * /\", approval: deny }\n - { match: \"*/rm * / *\", approval: deny }\n - { match: \"*/rm ~\", approval: deny }\n - { match: \"*/rm ~ *\", approval: deny }\n - { match: \"*/rm * ~\", approval: deny }\n - { match: \"*/rm * ~ *\", approval: deny }\n - { match: \"*/rm ~/\", approval: deny }\n - { match: \"*/rm ~/ *\", approval: deny }\n - { match: \"*/rm * ~/\", approval: deny }\n - { match: \"*/rm * ~/ *\", approval: deny }\n - { match: \"*/rm $HOME\", approval: deny }\n - { match: \"*/rm $HOME *\", approval: deny }\n - { match: \"*/rm * $HOME\", approval: deny }\n - { match: \"*/rm * $HOME *\", approval: deny }\n - { match: \"*/rm $HOME/\", approval: deny }\n - { match: \"*/rm $HOME/ *\", approval: deny }\n - { match: \"*/rm * $HOME/\", approval: deny }\n - { match: \"*/rm * $HOME/ *\", approval: deny }\n - { match: \"*/rm ${HOME}\", approval: deny }\n - { match: \"*/rm ${HOME} *\", approval: deny }\n - { match: \"*/rm * ${HOME}\", approval: deny }\n - { match: \"*/rm * ${HOME} *\", approval: deny }\n - { match: \"*/rm ${HOME}/\", approval: deny }\n - { match: \"*/rm ${HOME}/ *\", approval: deny }\n - { match: \"*/rm * ${HOME}/\", approval: deny }\n - { match: \"*/rm * ${HOME}/ *\", approval: deny }\n - { match: \"sudo rm\", approval: deny }\n - { match: \"sudo rm *\", approval: deny }\n - { match: \"sudo * rm\", approval: deny }\n - { match: \"sudo * rm *\", approval: deny }\n - { match: \"sudo */rm\", approval: deny }\n - { match: \"sudo */rm *\", approval: deny }\n - { match: \"* sudo rm\", approval: deny }\n - { match: \"* sudo rm *\", approval: deny }\n - { match: \"* sudo * rm\", approval: deny }\n - { match: \"* sudo * rm *\", approval: deny }\n - { match: \"* sudo */rm\", approval: deny }\n - { match: \"* sudo */rm *\", approval: deny }\n - { match: \"*/sudo rm\", approval: deny }\n - { match: \"*/sudo rm *\", approval: deny }\n - { match: \"*/sudo * rm\", approval: deny }\n - { match: \"*/sudo * rm *\", approval: deny }\n - { match: \"*/sudo */rm\", approval: deny }\n - { match: \"*/sudo */rm *\", approval: deny }\n - { match: \"rm *-*r* /*\", approval: deny }\n - { match: \"rm *-*R* /*\", approval: deny }\n - { match: \"rm *-*f* /*\", approval: deny }\n - { match: \"rm *-*F* /*\", approval: deny }\n - { match: \"rm *--no-preserve-root*\", approval: deny }\n - { match: \"* rm *-*r* /*\", approval: deny }\n - { match: \"* rm *-*R* /*\", approval: deny }\n - { match: \"* rm *-*f* /*\", approval: deny }\n - { match: \"* rm *-*F* /*\", approval: deny }\n - { match: \"* rm *--no-preserve-root*\", approval: deny }\n - { match: \"*/rm *-*r* /*\", approval: deny }\n - { match: \"*/rm *-*R* /*\", approval: deny }\n - { match: \"*/rm *-*f* /*\", approval: deny }\n - { match: \"*/rm *-*F* /*\", approval: deny }\n - { match: \"*/rm *--no-preserve-root*\", approval: deny }\n - { match: \"rm *-r *\", approval: deny }\n - { match: \"rm *-r\", approval: deny }\n - { match: \"rm *-rf *\", approval: deny }\n - { match: \"rm *-rf\", approval: deny }\n - { match: \"rm *-fr *\", approval: deny }\n - { match: \"rm *-fr\", approval: deny }\n - { match: \"rm *-rv *\", approval: deny }\n - { match: \"rm *-rv\", approval: deny }\n - { match: \"rm *-vr *\", approval: deny }\n - { match: \"rm *-vr\", approval: deny }\n - { match: \"rm *-rfv *\", approval: deny }\n - { match: \"rm *-rfv\", approval: deny }\n - { match: \"rm *-rvf *\", approval: deny }\n - { match: \"rm *-rvf\", approval: deny }\n - { match: \"rm *-frv *\", approval: deny }\n - { match: \"rm *-frv\", approval: deny }\n - { match: \"rm *-fvr *\", approval: deny }\n - { match: \"rm *-fvr\", approval: deny }\n - { match: \"rm *-vrf *\", approval: deny }\n - { match: \"rm *-vrf\", approval: deny }\n - { match: \"rm *-vfr *\", approval: deny }\n - { match: \"rm *-vfr\", approval: deny }\n - { match: \"rm *-ri *\", approval: deny }\n - { match: \"rm *-ri\", approval: deny }\n - { match: \"rm *-ir *\", approval: deny }\n - { match: \"rm *-ir\", approval: deny }\n - { match: \"rm *-Ri *\", approval: deny }\n - { match: \"rm *-Ri\", approval: deny }\n - { match: \"rm *-iR *\", approval: deny }\n - { match: \"rm *-iR\", approval: deny }\n - { match: \"rm *-R *\", approval: deny }\n - { match: \"rm *-R\", approval: deny }\n - { match: \"rm *-Rf *\", approval: deny }\n - { match: \"rm *-Rf\", approval: deny }\n - { match: \"rm *-fR *\", approval: deny }\n - { match: \"rm *-fR\", approval: deny }\n - { match: \"rm *-Rv *\", approval: deny }\n - { match: \"rm *-Rv\", approval: deny }\n - { match: \"rm *-vR *\", approval: deny }\n - { match: \"rm *-vR\", approval: deny }\n - { match: \"rm *-Rfv *\", approval: deny }\n - { match: \"rm *-Rfv\", approval: deny }\n - { match: \"rm *-Rvf *\", approval: deny }\n - { match: \"rm *-Rvf\", approval: deny }\n - { match: \"rm *-fRv *\", approval: deny }\n - { match: \"rm *-fRv\", approval: deny }\n - { match: \"rm *-fvR *\", approval: deny }\n - { match: \"rm *-fvR\", approval: deny }\n - { match: \"rm *-vRf *\", approval: deny }\n - { match: \"rm *-vRf\", approval: deny }\n - { match: \"rm *-vfR *\", approval: deny }\n - { match: \"rm *-vfR\", approval: deny }\n - { match: \"rm *--recursive *\", approval: deny }\n - { match: \"rm *--recursive\", approval: deny }\n - { match: \"*/rm *-r *\", approval: deny }\n - { match: \"*/rm *-r\", approval: deny }\n - { match: \"*/rm *-rf *\", approval: deny }\n - { match: \"*/rm *-rf\", approval: deny }\n - { match: \"*/rm *-fr *\", approval: deny }\n - { match: \"*/rm *-fr\", approval: deny }\n - { match: \"*/rm *-rv *\", approval: deny }\n - { match: \"*/rm *-rv\", approval: deny }\n - { match: \"*/rm *-vr *\", approval: deny }\n - { match: \"*/rm *-vr\", approval: deny }\n - { match: \"*/rm *-rfv *\", approval: deny }\n - { match: \"*/rm *-rfv\", approval: deny }\n - { match: \"*/rm *-rvf *\", approval: deny }\n - { match: \"*/rm *-rvf\", approval: deny }\n - { match: \"*/rm *-frv *\", approval: deny }\n - { match: \"*/rm *-frv\", approval: deny }\n - { match: \"*/rm *-fvr *\", approval: deny }\n - { match: \"*/rm *-fvr\", approval: deny }\n - { match: \"*/rm *-vrf *\", approval: deny }\n - { match: \"*/rm *-vrf\", approval: deny }\n - { match: \"*/rm *-vfr *\", approval: deny }\n - { match: \"*/rm *-vfr\", approval: deny }\n - { match: \"*/rm *-ri *\", approval: deny }\n - { match: \"*/rm *-ri\", approval: deny }\n - { match: \"*/rm *-ir *\", approval: deny }\n - { match: \"*/rm *-ir\", approval: deny }\n - { match: \"*/rm *-Ri *\", approval: deny }\n - { match: \"*/rm *-Ri\", approval: deny }\n - { match: \"*/rm *-iR *\", approval: deny }\n - { match: \"*/rm *-iR\", approval: deny }\n - { match: \"*/rm *-R *\", approval: deny }\n - { match: \"*/rm *-R\", approval: deny }\n - { match: \"*/rm *-Rf *\", approval: deny }\n - { match: \"*/rm *-Rf\", approval: deny }\n - { match: \"*/rm *-fR *\", approval: deny }\n - { match: \"*/rm *-fR\", approval: deny }\n - { match: \"*/rm *-Rv *\", approval: deny }\n - { match: \"*/rm *-Rv\", approval: deny }\n - { match: \"*/rm *-vR *\", approval: deny }\n - { match: \"*/rm *-vR\", approval: deny }\n - { match: \"*/rm *-Rfv *\", approval: deny }\n - { match: \"*/rm *-Rfv\", approval: deny }\n - { match: \"*/rm *-Rvf *\", approval: deny }\n - { match: \"*/rm *-Rvf\", approval: deny }\n - { match: \"*/rm *-fRv *\", approval: deny }\n - { match: \"*/rm *-fRv\", approval: deny }\n - { match: \"*/rm *-fvR *\", approval: deny }\n - { match: \"*/rm *-fvR\", approval: deny }\n - { match: \"*/rm *-vRf *\", approval: deny }\n - { match: \"*/rm *-vRf\", approval: deny }\n - { match: \"*/rm *-vfR *\", approval: deny }\n - { match: \"*/rm *-vfR\", approval: deny }\n - { match: \"*/rm *--recursive *\", approval: deny }\n - { match: \"*/rm *--recursive\", approval: deny }\n - { match: \"* rm *-r *\", approval: deny }\n - { match: \"* rm *-r\", approval: deny }\n - { match: \"* rm *-rf *\", approval: deny }\n - { match: \"* rm *-rf\", approval: deny }\n - { match: \"* rm *-fr *\", approval: deny }\n - { match: \"* rm *-fr\", approval: deny }\n - { match: \"* rm *-rv *\", approval: deny }\n - { match: \"* rm *-rv\", approval: deny }\n - { match: \"* rm *-vr *\", approval: deny }\n - { match: \"* rm *-vr\", approval: deny }\n - { match: \"* rm *-rfv *\", approval: deny }\n - { match: \"* rm *-rfv\", approval: deny }\n - { match: \"* rm *-rvf *\", approval: deny }\n - { match: \"* rm *-rvf\", approval: deny }\n - { match: \"* rm *-frv *\", approval: deny }\n - { match: \"* rm *-frv\", approval: deny }\n - { match: \"* rm *-fvr *\", approval: deny }\n - { match: \"* rm *-fvr\", approval: deny }\n - { match: \"* rm *-vrf *\", approval: deny }\n - { match: \"* rm *-vrf\", approval: deny }\n - { match: \"* rm *-vfr *\", approval: deny }\n - { match: \"* rm *-vfr\", approval: deny }\n - { match: \"* rm *-R *\", approval: deny }\n - { match: \"* rm *-R\", approval: deny }\n - { match: \"* rm *-ri *\", approval: deny }\n - { match: \"* rm *-ri\", approval: deny }\n - { match: \"* rm *-ir *\", approval: deny }\n - { match: \"* rm *-ir\", approval: deny }\n - { match: \"* rm *-Ri *\", approval: deny }\n - { match: \"* rm *-Ri\", approval: deny }\n - { match: \"* rm *-iR *\", approval: deny }\n - { match: \"* rm *-iR\", approval: deny }\n - { match: \"* rm *-Rf *\", approval: deny }\n - { match: \"* rm *-Rf\", approval: deny }\n - { match: \"* rm *-fR *\", approval: deny }\n - { match: \"* rm *-fR\", approval: deny }\n - { match: \"* rm *-Rv *\", approval: deny }\n - { match: \"* rm *-Rv\", approval: deny }\n - { match: \"* rm *-vR *\", approval: deny }\n - { match: \"* rm *-vR\", approval: deny }\n - { match: \"* rm *-Rfv *\", approval: deny }\n - { match: \"* rm *-Rfv\", approval: deny }\n - { match: \"* rm *-Rvf *\", approval: deny }\n - { match: \"* rm *-Rvf\", approval: deny }\n - { match: \"* rm *-fRv *\", approval: deny }\n - { match: \"* rm *-fRv\", approval: deny }\n - { match: \"* rm *-fvR *\", approval: deny }\n - { match: \"* rm *-fvR\", approval: deny }\n - { match: \"* rm *-vRf *\", approval: deny }\n - { match: \"* rm *-vRf\", approval: deny }\n - { match: \"* rm *-vfR *\", approval: deny }\n - { match: \"* rm *-vfR\", approval: deny }\n - { match: \"* rm *--recursive *\", approval: deny }\n - { match: \"* rm *--recursive\", approval: deny }\n # Bulk removal: find -delete, find -exec rm, and xargs rm, in every position.\n - { match: \"find *-delete*\", approval: deny }\n - { match: \"*/find *-delete*\", approval: deny }\n - { match: \"* find *-delete*\", approval: deny }\n - { match: \"*-exec rm *\", approval: deny }\n - { match: \"*-exec */rm *\", approval: deny }\n - { match: \"*-execdir rm *\", approval: deny }\n - { match: \"*-execdir */rm *\", approval: deny }\n - { match: \"*-ok rm *\", approval: deny }\n - { match: \"*-ok */rm *\", approval: deny }\n - { match: \"*-okdir rm *\", approval: deny }\n - { match: \"*-okdir */rm *\", approval: deny }\n - { match: \"*xargs rm\", approval: deny }\n - { match: \"*xargs rm *\", approval: deny }\n - { match: \"*xargs * rm\", approval: deny }\n - { match: \"*xargs * rm *\", approval: deny }\n - { match: \"*xargs */rm\", approval: deny }\n - { match: \"*xargs */rm *\", approval: deny }\n - { match: \"HOME=*\", approval: deny }\n - { match: \"export HOME=*\", approval: deny }\n - { match: \"env HOME=*\", approval: deny }\n - { match: \"env * HOME=*\", approval: deny }\n - { match: \"git push --force origin main\", approval: deny }\n - { match: \"git push --force origin main *\", approval: deny }\n - { match: \"git push --force origin master\", approval: deny }\n - { match: \"git push --force origin master *\", approval: deny }\n - { match: \"git push -f origin main\", approval: deny }\n - { match: \"git push -f origin main *\", approval: deny }\n - { match: \"git push -f origin master\", approval: deny }\n - { match: \"git push -f origin master *\", approval: deny }\n # Prompt: history-destroying git, and every git push spelling that could\n # force. A subagent cannot answer a prompt, so omp rejects it.\n - { match: \"git clean\", approval: prompt }\n - { match: \"git clean *\", approval: prompt }\n - { match: \"git reset *--hard*\", approval: prompt }\n - { match: \"git push -f*\", approval: prompt }\n - { match: \"git push * -f*\", approval: prompt }\n - { match: \"git push -vv*\", approval: prompt }\n - { match: \"git push * -vv*\", approval: prompt }\n - { match: \"git push -vq*\", approval: prompt }\n - { match: \"git push * -vq*\", approval: prompt }\n - { match: \"git push -vd*\", approval: prompt }\n - { match: \"git push * -vd*\", approval: prompt }\n - { match: \"git push -vn*\", approval: prompt }\n - { match: \"git push * -vn*\", approval: prompt }\n - { match: \"git push -vu*\", approval: prompt }\n - { match: \"git push * -vu*\", approval: prompt }\n - { match: \"git push -v4*\", approval: prompt }\n - { match: \"git push * -v4*\", approval: prompt }\n - { match: \"git push -v6*\", approval: prompt }\n - { match: \"git push * -v6*\", approval: prompt }\n - { match: \"git push -vf*\", approval: prompt }\n - { match: \"git push * -vf*\", approval: prompt }\n - { match: \"git push -qv*\", approval: prompt }\n - { match: \"git push * -qv*\", approval: prompt }\n - { match: \"git push -qq*\", approval: prompt }\n - { match: \"git push * -qq*\", approval: prompt }\n - { match: \"git push -qd*\", approval: prompt }\n - { match: \"git push * -qd*\", approval: prompt }\n - { match: \"git push -qn*\", approval: prompt }\n - { match: \"git push * -qn*\", approval: prompt }\n - { match: \"git push -qu*\", approval: prompt }\n - { match: \"git push * -qu*\", approval: prompt }\n - { match: \"git push -q4*\", approval: prompt }\n - { match: \"git push * -q4*\", approval: prompt }\n - { match: \"git push -q6*\", approval: prompt }\n - { match: \"git push * -q6*\", approval: prompt }\n - { match: \"git push -qf*\", approval: prompt }\n - { match: \"git push * -qf*\", approval: prompt }\n - { match: \"git push -dv*\", approval: prompt }\n - { match: \"git push * -dv*\", approval: prompt }\n - { match: \"git push -dq*\", approval: prompt }\n - { match: \"git push * -dq*\", approval: prompt }\n - { match: \"git push -dd*\", approval: prompt }\n - { match: \"git push * -dd*\", approval: prompt }\n - { match: \"git push -dn*\", approval: prompt }\n - { match: \"git push * -dn*\", approval: prompt }\n - { match: \"git push -du*\", approval: prompt }\n - { match: \"git push * -du*\", approval: prompt }\n - { match: \"git push -d4*\", approval: prompt }\n - { match: \"git push * -d4*\", approval: prompt }\n - { match: \"git push -d6*\", approval: prompt }\n - { match: \"git push * -d6*\", approval: prompt }\n - { match: \"git push -df*\", approval: prompt }\n - { match: \"git push * -df*\", approval: prompt }\n - { match: \"git push -nv*\", approval: prompt }\n - { match: \"git push * -nv*\", approval: prompt }\n - { match: \"git push -nq*\", approval: prompt }\n - { match: \"git push * -nq*\", approval: prompt }\n - { match: \"git push -nd*\", approval: prompt }\n - { match: \"git push * -nd*\", approval: prompt }\n - { match: \"git push -nn*\", approval: prompt }\n - { match: \"git push * -nn*\", approval: prompt }\n - { match: \"git push -nu*\", approval: prompt }\n - { match: \"git push * -nu*\", approval: prompt }\n - { match: \"git push -n4*\", approval: prompt }\n - { match: \"git push * -n4*\", approval: prompt }\n - { match: \"git push -n6*\", approval: prompt }\n - { match: \"git push * -n6*\", approval: prompt }\n - { match: \"git push -nf*\", approval: prompt }\n - { match: \"git push * -nf*\", approval: prompt }\n - { match: \"git push -uv*\", approval: prompt }\n - { match: \"git push * -uv*\", approval: prompt }\n - { match: \"git push -uq*\", approval: prompt }\n - { match: \"git push * -uq*\", approval: prompt }\n - { match: \"git push -ud*\", approval: prompt }\n - { match: \"git push * -ud*\", approval: prompt }\n - { match: \"git push -un*\", approval: prompt }\n - { match: \"git push * -un*\", approval: prompt }\n - { match: \"git push -uu*\", approval: prompt }\n - { match: \"git push * -uu*\", approval: prompt }\n - { match: \"git push -u4*\", approval: prompt }\n - { match: \"git push * -u4*\", approval: prompt }\n - { match: \"git push -u6*\", approval: prompt }\n - { match: \"git push * -u6*\", approval: prompt }\n - { match: \"git push -uf*\", approval: prompt }\n - { match: \"git push * -uf*\", approval: prompt }\n - { match: \"git push -4v*\", approval: prompt }\n - { match: \"git push * -4v*\", approval: prompt }\n - { match: \"git push -4q*\", approval: prompt }\n - { match: \"git push * -4q*\", approval: prompt }\n - { match: \"git push -4d*\", approval: prompt }\n - { match: \"git push * -4d*\", approval: prompt }\n - { match: \"git push -4n*\", approval: prompt }\n - { match: \"git push * -4n*\", approval: prompt }\n - { match: \"git push -4u*\", approval: prompt }\n - { match: \"git push * -4u*\", approval: prompt }\n - { match: \"git push -44*\", approval: prompt }\n - { match: \"git push * -44*\", approval: prompt }\n - { match: \"git push -46*\", approval: prompt }\n - { match: \"git push * -46*\", approval: prompt }\n - { match: \"git push -4f*\", approval: prompt }\n - { match: \"git push * -4f*\", approval: prompt }\n - { match: \"git push -6v*\", approval: prompt }\n - { match: \"git push * -6v*\", approval: prompt }\n - { match: \"git push -6q*\", approval: prompt }\n - { match: \"git push * -6q*\", approval: prompt }\n - { match: \"git push -6d*\", approval: prompt }\n - { match: \"git push * -6d*\", approval: prompt }\n - { match: \"git push -6n*\", approval: prompt }\n - { match: \"git push * -6n*\", approval: prompt }\n - { match: \"git push -6u*\", approval: prompt }\n - { match: \"git push * -6u*\", approval: prompt }\n - { match: \"git push -64*\", approval: prompt }\n - { match: \"git push * -64*\", approval: prompt }\n - { match: \"git push -66*\", approval: prompt }\n - { match: \"git push * -66*\", approval: prompt }\n - { match: \"git push -6f*\", approval: prompt }\n - { match: \"git push * -6f*\", approval: prompt }\n - { match: \"git push --f*\", approval: prompt }\n - { match: \"git push * --f*\", approval: prompt }\n - { match: \"git push --mi*\", approval: prompt }\n - { match: \"git push * --mi*\", approval: prompt }\n - { match: \"git push +*\", approval: prompt }\n - { match: \"git push * +*\", approval: prompt }\n - { match: \"git push $*\", approval: prompt }\n - { match: \"git push * $*\", approval: prompt }\n - { match: \"git push `*\", approval: prompt }\n - { match: \"git push * `*\", approval: prompt }\n # Allow: the macOS trash command.\n - { match: \"trash *\", approval: allow }\n",
|
|
22
22
|
"SoT/.omp/intercom.json": "{\n \"brokerCommand\": \"bun\",\n \"brokerArgs\": []\n}\n",
|
|
23
23
|
"SoT/.omp/mcp.json": "{\n \"$schema\": \"https://raw.githubusercontent.com/can1357/oh-my-pi/main/packages/coding-agent/src/config/mcp-schema.json\",\n \"disabledServers\": [\n \"chrome-devtools\",\n \"context7:context7\",\n \"openaiDeveloperDocs\"\n ]\n}\n",
|
|
@@ -58,4 +58,4 @@ export const GENERATED_PAYLOAD_PATHS = [
|
|
|
58
58
|
"notification.mp3"
|
|
59
59
|
] as const
|
|
60
60
|
|
|
61
|
-
export const GENERATED_PAYLOAD_HASH = "
|
|
61
|
+
export const GENERATED_PAYLOAD_HASH = "cd101b3278eaa13b28ed00ddac6fec5deb84acf19438b2f33d6bd874cfbfc87b"
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
// Marks (variation selectors included), controls, and format characters such
|
|
2
|
+
// as the zero-width joiner use no cell.
|
|
3
|
+
const ZERO_WIDTH = /[\p{Mark}\p{Cc}\p{Cf}]/u;
|
|
4
|
+
|
|
5
|
+
// The code points with East Asian Width W or F, after UAX #11
|
|
6
|
+
// (https://www.unicode.org/reports/tr11/). The W data also holds the emoji
|
|
7
|
+
// presentation characters, so emoji need no separate rule.
|
|
8
|
+
// Source: https://www.unicode.org/Public/18.0.0/ucd/EastAsianWidth.txt
|
|
9
|
+
// (Unicode 18.0.0, sha256
|
|
10
|
+
// a0cf29eacd00cfcaec4381c6b7c281685f18dbb4e7ff82b4076ccb342ca839aa).
|
|
11
|
+
// Derivation: take every code point with East_Asian_Width W or F, then merge
|
|
12
|
+
// adjacent ranges. The ranges are sorted and do not overlap. To update the
|
|
13
|
+
// table, derive it again the same way from a newer EastAsianWidth.txt.
|
|
14
|
+
const WIDE_RANGES: ReadonlyArray<readonly [number, number]> = [
|
|
15
|
+
[0x1100, 0x115f],
|
|
16
|
+
[0x231a, 0x231b],
|
|
17
|
+
[0x2329, 0x232a],
|
|
18
|
+
[0x23e9, 0x23ec],
|
|
19
|
+
[0x23f0, 0x23f0],
|
|
20
|
+
[0x23f3, 0x23f3],
|
|
21
|
+
[0x25fd, 0x25fe],
|
|
22
|
+
[0x2614, 0x2615],
|
|
23
|
+
[0x2630, 0x2637],
|
|
24
|
+
[0x2648, 0x2653],
|
|
25
|
+
[0x267f, 0x267f],
|
|
26
|
+
[0x268a, 0x268f],
|
|
27
|
+
[0x2693, 0x2693],
|
|
28
|
+
[0x26a1, 0x26a1],
|
|
29
|
+
[0x26aa, 0x26ab],
|
|
30
|
+
[0x26bd, 0x26be],
|
|
31
|
+
[0x26c4, 0x26c5],
|
|
32
|
+
[0x26ce, 0x26ce],
|
|
33
|
+
[0x26d4, 0x26d4],
|
|
34
|
+
[0x26ea, 0x26ea],
|
|
35
|
+
[0x26f2, 0x26f3],
|
|
36
|
+
[0x26f5, 0x26f5],
|
|
37
|
+
[0x26fa, 0x26fa],
|
|
38
|
+
[0x26fd, 0x26fd],
|
|
39
|
+
[0x2705, 0x2705],
|
|
40
|
+
[0x270a, 0x270b],
|
|
41
|
+
[0x2728, 0x2728],
|
|
42
|
+
[0x274c, 0x274c],
|
|
43
|
+
[0x274e, 0x274e],
|
|
44
|
+
[0x2753, 0x2755],
|
|
45
|
+
[0x2757, 0x2757],
|
|
46
|
+
[0x2795, 0x2797],
|
|
47
|
+
[0x27b0, 0x27b0],
|
|
48
|
+
[0x27bf, 0x27bf],
|
|
49
|
+
[0x2b1b, 0x2b1c],
|
|
50
|
+
[0x2b50, 0x2b50],
|
|
51
|
+
[0x2b55, 0x2b55],
|
|
52
|
+
[0x2e80, 0x2e99],
|
|
53
|
+
[0x2e9b, 0x2ef3],
|
|
54
|
+
[0x2f00, 0x2fd5],
|
|
55
|
+
[0x2ff0, 0x303e],
|
|
56
|
+
[0x3041, 0x3096],
|
|
57
|
+
[0x3099, 0x30ff],
|
|
58
|
+
[0x3105, 0x312f],
|
|
59
|
+
[0x3131, 0x318e],
|
|
60
|
+
[0x3190, 0x31e5],
|
|
61
|
+
[0x31ef, 0x321e],
|
|
62
|
+
[0x3220, 0x3247],
|
|
63
|
+
[0x3250, 0xa48c],
|
|
64
|
+
[0xa490, 0xa4c6],
|
|
65
|
+
[0xa960, 0xa97c],
|
|
66
|
+
[0xac00, 0xd7a3],
|
|
67
|
+
[0xf900, 0xfaff],
|
|
68
|
+
[0xfe10, 0xfe19],
|
|
69
|
+
[0xfe30, 0xfe52],
|
|
70
|
+
[0xfe54, 0xfe66],
|
|
71
|
+
[0xfe68, 0xfe6b],
|
|
72
|
+
[0xff01, 0xff60],
|
|
73
|
+
[0xffe0, 0xffe6],
|
|
74
|
+
[0x16fe0, 0x16fe4],
|
|
75
|
+
[0x16ff0, 0x16ff6],
|
|
76
|
+
[0x17000, 0x18cda],
|
|
77
|
+
[0x18cff, 0x18d20],
|
|
78
|
+
[0x18d80, 0x18df2],
|
|
79
|
+
[0x18e00, 0x19191],
|
|
80
|
+
[0x191a0, 0x191d2],
|
|
81
|
+
[0x1aff0, 0x1aff3],
|
|
82
|
+
[0x1aff5, 0x1affb],
|
|
83
|
+
[0x1affd, 0x1affe],
|
|
84
|
+
[0x1b000, 0x1b128],
|
|
85
|
+
[0x1b132, 0x1b132],
|
|
86
|
+
[0x1b150, 0x1b152],
|
|
87
|
+
[0x1b155, 0x1b155],
|
|
88
|
+
[0x1b164, 0x1b168],
|
|
89
|
+
[0x1b170, 0x1b2fb],
|
|
90
|
+
[0x1d300, 0x1d356],
|
|
91
|
+
[0x1d360, 0x1d376],
|
|
92
|
+
[0x1f004, 0x1f004],
|
|
93
|
+
[0x1f0cf, 0x1f0cf],
|
|
94
|
+
[0x1f18e, 0x1f18e],
|
|
95
|
+
[0x1f191, 0x1f19a],
|
|
96
|
+
[0x1f1ae, 0x1f1ae],
|
|
97
|
+
[0x1f200, 0x1f202],
|
|
98
|
+
[0x1f210, 0x1f23b],
|
|
99
|
+
[0x1f240, 0x1f248],
|
|
100
|
+
[0x1f250, 0x1f251],
|
|
101
|
+
[0x1f260, 0x1f265],
|
|
102
|
+
[0x1f300, 0x1f320],
|
|
103
|
+
[0x1f32d, 0x1f335],
|
|
104
|
+
[0x1f337, 0x1f37c],
|
|
105
|
+
[0x1f37e, 0x1f393],
|
|
106
|
+
[0x1f3a0, 0x1f3ca],
|
|
107
|
+
[0x1f3cf, 0x1f3d3],
|
|
108
|
+
[0x1f3e0, 0x1f3f0],
|
|
109
|
+
[0x1f3f4, 0x1f3f4],
|
|
110
|
+
[0x1f3f8, 0x1f43e],
|
|
111
|
+
[0x1f440, 0x1f440],
|
|
112
|
+
[0x1f442, 0x1f4fc],
|
|
113
|
+
[0x1f4ff, 0x1f53d],
|
|
114
|
+
[0x1f54b, 0x1f54e],
|
|
115
|
+
[0x1f550, 0x1f567],
|
|
116
|
+
[0x1f57a, 0x1f57a],
|
|
117
|
+
[0x1f595, 0x1f596],
|
|
118
|
+
[0x1f5a4, 0x1f5a4],
|
|
119
|
+
[0x1f5fb, 0x1f64f],
|
|
120
|
+
[0x1f680, 0x1f6c5],
|
|
121
|
+
[0x1f6cc, 0x1f6cc],
|
|
122
|
+
[0x1f6d0, 0x1f6d2],
|
|
123
|
+
[0x1f6d5, 0x1f6d9],
|
|
124
|
+
[0x1f6dc, 0x1f6df],
|
|
125
|
+
[0x1f6eb, 0x1f6ec],
|
|
126
|
+
[0x1f6f4, 0x1f6fc],
|
|
127
|
+
[0x1f7da, 0x1f7da],
|
|
128
|
+
[0x1f7e0, 0x1f7eb],
|
|
129
|
+
[0x1f7f0, 0x1f7f0],
|
|
130
|
+
[0x1f90c, 0x1f93a],
|
|
131
|
+
[0x1f93c, 0x1f945],
|
|
132
|
+
[0x1f947, 0x1f9ff],
|
|
133
|
+
[0x1fa70, 0x1fa7c],
|
|
134
|
+
[0x1fa80, 0x1fac6],
|
|
135
|
+
[0x1fac8, 0x1fac8],
|
|
136
|
+
[0x1facc, 0x1fadd],
|
|
137
|
+
[0x1fadf, 0x1faeb],
|
|
138
|
+
[0x1faef, 0x1fafa],
|
|
139
|
+
[0x20000, 0x2fffd],
|
|
140
|
+
[0x30000, 0x3fffd],
|
|
141
|
+
];
|
|
142
|
+
|
|
143
|
+
function isWide(point: number): boolean {
|
|
144
|
+
let low = 0;
|
|
145
|
+
let high = WIDE_RANGES.length - 1;
|
|
146
|
+
while (low <= high) {
|
|
147
|
+
const middle = (low + high) >> 1;
|
|
148
|
+
const [first, last] = WIDE_RANGES[middle] ?? [0, -1];
|
|
149
|
+
if (point < first) high = middle - 1;
|
|
150
|
+
else if (point > last) low = middle + 1;
|
|
151
|
+
else return true;
|
|
152
|
+
}
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function charCells(char: string): number {
|
|
157
|
+
if (ZERO_WIDTH.test(char)) return 0;
|
|
158
|
+
return isWide(char.codePointAt(0) ?? 0) ? 2 : 1;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The terminal cells of `text`: 0 for each mark, control, or format
|
|
163
|
+
* character; 2 for each character with East Asian Width W or F; else 1.
|
|
164
|
+
*/
|
|
165
|
+
export function terminalCells(text: string): number {
|
|
166
|
+
let cells = 0;
|
|
167
|
+
for (const char of text) cells += charCells(char);
|
|
168
|
+
return cells;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The rows that `text` uses on a terminal `columns` wide (a value below 1
|
|
173
|
+
* counts as 1). A terminal never splits a character: a wide character that
|
|
174
|
+
* does not fit in the rest of a row moves to the next row and leaves the last
|
|
175
|
+
* cell of the row empty. An empty text uses 1 row.
|
|
176
|
+
*/
|
|
177
|
+
export function terminalRows(text: string, columns: number): number {
|
|
178
|
+
const width = Math.max(1, columns);
|
|
179
|
+
let rows = 1;
|
|
180
|
+
let column = 0;
|
|
181
|
+
for (const char of text) {
|
|
182
|
+
const cells = charCells(char);
|
|
183
|
+
if (cells === 0) continue;
|
|
184
|
+
if (column !== 0 && column + cells > width) {
|
|
185
|
+
rows += 1;
|
|
186
|
+
column = 0;
|
|
187
|
+
}
|
|
188
|
+
column += cells;
|
|
189
|
+
}
|
|
190
|
+
return rows;
|
|
191
|
+
}
|
package/docks-kit
CHANGED
|
@@ -19,10 +19,9 @@ HOST="$(uname -s)-$(uname -m)"
|
|
|
19
19
|
case "$HOST" in
|
|
20
20
|
Linux-x86_64) KIT_BIN="docks-kit-linux-x64" ;;
|
|
21
21
|
Linux-aarch64) KIT_BIN="docks-kit-linux-arm64" ;;
|
|
22
|
-
Darwin-x86_64) KIT_BIN="docks-kit-darwin-x64" ;;
|
|
23
22
|
Darwin-arm64) KIT_BIN="docks-kit-darwin-arm64" ;;
|
|
24
23
|
*)
|
|
25
|
-
echo "[docks-kit] unsupported host $HOST;
|
|
24
|
+
echo "[docks-kit] unsupported host $HOST; docks-kit supports Linux on x64 and arm64, macOS on arm64, and Windows on x64 - on Windows run docks-kit.ps1 instead." >&2
|
|
26
25
|
exit 1
|
|
27
26
|
;;
|
|
28
27
|
esac
|
package/docks-kit.ps1
CHANGED
|
@@ -25,10 +25,9 @@ if ([string]::IsNullOrWhiteSpace($ProcessorArchitecture)) {
|
|
|
25
25
|
}
|
|
26
26
|
$KitBin = switch ($ProcessorArchitecture) {
|
|
27
27
|
'AMD64' { 'docks-kit-windows-x64.exe' }
|
|
28
|
-
'ARM64' { 'docks-kit-windows-arm64.exe' }
|
|
29
28
|
default {
|
|
30
29
|
$HostName = "Windows-$ProcessorArchitecture"
|
|
31
|
-
[Console]::Error.WriteLine("[docks-kit] unsupported host $HostName; docks-kit supports Linux, macOS, and Windows on x64
|
|
30
|
+
[Console]::Error.WriteLine("[docks-kit] unsupported host $HostName; docks-kit supports Linux on x64 and arm64, macOS on arm64, and Windows on x64.")
|
|
32
31
|
exit 1
|
|
33
32
|
}
|
|
34
33
|
}
|
package/package.json
CHANGED