docks-kit 0.21.0 → 0.22.0
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 +11 -9
- package/README.md +21 -20
- package/cli/docs/command-guards.md +13 -10
- package/cli/docs/flags.md +26 -6
- package/cli/docs/install.md +1 -1
- package/cli/docs/omp-models.md +96 -44
- 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/commands/omp.ts +93 -22
- package/cli/src/commands/scratch.ts +1 -1
- package/cli/src/engine-native/DESIGN.md +4 -3
- package/cli/src/engine-native/ompOverlay.ts +96 -26
- package/cli/src/engine-native/os/targets.ts +3 -11
- package/cli/src/engine-native/os/windows.ts +1 -1
- package/cli/src/engine-native/tidyLock.ts +30 -5
- package/cli/src/engine.ts +1 -1
- package/cli/src/generated/sotPayload.ts +6 -6
- package/cli/src/main.ts +3 -1
- package/cli/src/terminalCells.ts +191 -0
- package/docks-kit +3 -4
- package/docks-kit.ps1 +3 -4
- package/package.json +2 -2
package/cli/src/main.ts
CHANGED
|
@@ -43,7 +43,9 @@ const root = Command.make("docks-kit", {}, () =>
|
|
|
43
43
|
yield* Console.log(" docks-kit skills list universal skills");
|
|
44
44
|
yield* Console.log(" docks-kit docs [topic] self-documentation");
|
|
45
45
|
yield* Console.log(" docks-kit omp [--model|--pick] [...] free-model omp session");
|
|
46
|
-
yield* Console.log(
|
|
46
|
+
yield* Console.log(
|
|
47
|
+
" docks-kit scratch new|remove agent temporary files and directories",
|
|
48
|
+
);
|
|
47
49
|
yield* Console.log(" docks-kit tidy [--apply] [--repo <path>] remove safe agent leftovers");
|
|
48
50
|
yield* Console.log("");
|
|
49
51
|
yield* Console.log(
|
|
@@ -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
|
@@ -8,21 +8,20 @@ set -euo pipefail
|
|
|
8
8
|
REPO_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
9
9
|
|
|
10
10
|
# BEGIN GENERATED BUN PIN
|
|
11
|
-
BUN_PIN="1.4.
|
|
11
|
+
BUN_PIN="1.4.4"
|
|
12
12
|
# END GENERATED BUN PIN
|
|
13
13
|
|
|
14
14
|
# BEGIN GENERATED BUN FLOOR
|
|
15
|
-
BUN_FLOOR="1.4.
|
|
15
|
+
BUN_FLOOR="1.4.4"
|
|
16
16
|
# END GENERATED BUN FLOOR
|
|
17
17
|
|
|
18
18
|
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
|
@@ -8,11 +8,11 @@ $ErrorActionPreference = 'Stop'
|
|
|
8
8
|
$RepoDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
9
9
|
|
|
10
10
|
# BEGIN GENERATED BUN PIN
|
|
11
|
-
$BunPin = "1.4.
|
|
11
|
+
$BunPin = "1.4.4"
|
|
12
12
|
# END GENERATED BUN PIN
|
|
13
13
|
|
|
14
14
|
# BEGIN GENERATED BUN FLOOR
|
|
15
|
-
$BunFloor = "1.4.
|
|
15
|
+
$BunFloor = "1.4.4"
|
|
16
16
|
# END GENERATED BUN FLOOR
|
|
17
17
|
|
|
18
18
|
$ProcessorArchitecture = if (-not [string]::IsNullOrWhiteSpace($env:PROCESSOR_ARCHITEW6432)) {
|
|
@@ -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docks-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Portable AI coding agent config kit — SoT sync engine + typed CLI for Claude Code, Codex, and universal agent skills",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"README.md"
|
|
27
27
|
],
|
|
28
28
|
"scripts": {
|
|
29
|
-
"typecheck": "
|
|
29
|
+
"typecheck": "bun check --no-script -b -p cli",
|
|
30
30
|
"build:binaries": "bash cli/build-binaries.sh",
|
|
31
31
|
"smoke:native": "bun cli/scripts/native-smoke.ts",
|
|
32
32
|
"smoke:package": "bun cli/scripts/package-smoke.ts",
|