docks-kit 0.17.0 → 0.17.2

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.
Files changed (84) hide show
  1. package/AGENTS.md +37 -33
  2. package/README.md +1 -0
  3. package/cli/docs/omp-models.md +114 -58
  4. package/cli/src/argv.ts +38 -469
  5. package/cli/src/argvSurface.ts +371 -0
  6. package/cli/src/argvValidate.ts +122 -0
  7. package/cli/src/commands/docs.ts +57 -42
  8. package/cli/src/commands/harnesses.ts +38 -45
  9. package/cli/src/commands/model.ts +48 -53
  10. package/cli/src/commands/models.ts +24 -26
  11. package/cli/src/commands/omp.ts +178 -88
  12. package/cli/src/commands/plugins.ts +20 -20
  13. package/cli/src/commands/skills.ts +22 -20
  14. package/cli/src/commands/status.ts +87 -80
  15. package/cli/src/commands/sync.ts +113 -87
  16. package/cli/src/commands/toolchain.ts +21 -21
  17. package/cli/src/commands/update.ts +139 -117
  18. package/cli/src/efforts.ts +35 -34
  19. package/cli/src/engine-native/DESIGN.md +30 -30
  20. package/cli/src/engine-native/bun.ts +77 -55
  21. package/cli/src/engine-native/claudeLsp.ts +154 -0
  22. package/cli/src/engine-native/claudeOptionalPlugins.ts +113 -0
  23. package/cli/src/engine-native/claudePluginPasses.ts +348 -0
  24. package/cli/src/engine-native/claudeRemovals.ts +195 -0
  25. package/cli/src/engine-native/claudeRetired.ts +4 -4
  26. package/cli/src/engine-native/claudeRuntime.ts +94 -68
  27. package/cli/src/engine-native/claudeSettings.ts +174 -0
  28. package/cli/src/engine-native/claudeSettingsModifiers.ts +50 -54
  29. package/cli/src/engine-native/claudeSync.ts +176 -456
  30. package/cli/src/engine-native/codexConfig.ts +158 -0
  31. package/cli/src/engine-native/codexHooks.ts +91 -0
  32. package/cli/src/engine-native/codexPlugins.ts +290 -0
  33. package/cli/src/engine-native/codexStatus.ts +24 -0
  34. package/cli/src/engine-native/codexSync.ts +110 -568
  35. package/cli/src/engine-native/codexToml.ts +140 -138
  36. package/cli/src/engine-native/deps.ts +144 -107
  37. package/cli/src/engine-native/engineCtx.ts +126 -0
  38. package/cli/src/engine-native/exec.ts +98 -87
  39. package/cli/src/engine-native/failures.ts +3 -3
  40. package/cli/src/engine-native/harnesses.ts +62 -72
  41. package/cli/src/engine-native/index.ts +34 -315
  42. package/cli/src/engine-native/jq.ts +25 -24
  43. package/cli/src/engine-native/logger.ts +98 -100
  44. package/cli/src/engine-native/models.ts +50 -45
  45. package/cli/src/engine-native/modes.ts +83 -80
  46. package/cli/src/engine-native/ompFileDeploy.ts +111 -0
  47. package/cli/src/engine-native/ompMarketplace.ts +136 -0
  48. package/cli/src/engine-native/ompOverlay.ts +93 -53
  49. package/cli/src/engine-native/ompPaths.ts +49 -38
  50. package/cli/src/engine-native/ompPlugins.ts +170 -0
  51. package/cli/src/engine-native/ompSync.ts +64 -408
  52. package/cli/src/engine-native/ompYaml.ts +43 -41
  53. package/cli/src/engine-native/os/darwin.ts +5 -5
  54. package/cli/src/engine-native/os/index.ts +15 -15
  55. package/cli/src/engine-native/os/linux.ts +5 -5
  56. package/cli/src/engine-native/os/posix.ts +28 -24
  57. package/cli/src/engine-native/os/targets.ts +17 -17
  58. package/cli/src/engine-native/os/types.ts +31 -31
  59. package/cli/src/engine-native/os/windows.ts +61 -61
  60. package/cli/src/engine-native/parseArgs.ts +122 -372
  61. package/cli/src/engine-native/parseHelp.ts +66 -0
  62. package/cli/src/engine-native/parseModifiers.ts +222 -0
  63. package/cli/src/engine-native/services.ts +34 -34
  64. package/cli/src/engine-native/settings.ts +15 -15
  65. package/cli/src/engine-native/sharedTypes.d.ts +46 -0
  66. package/cli/src/engine-native/skillsInstall.ts +105 -0
  67. package/cli/src/engine-native/skillsLinks.ts +203 -0
  68. package/cli/src/engine-native/skillsManifest.ts +16 -0
  69. package/cli/src/engine-native/skillsPrune.ts +108 -0
  70. package/cli/src/engine-native/skillsSync.ts +28 -362
  71. package/cli/src/engine-native/syncConcurrency.ts +55 -0
  72. package/cli/src/engine-native/syncDispatch.ts +141 -0
  73. package/cli/src/engine-native/toolchain.ts +65 -62
  74. package/cli/src/engine.ts +65 -57
  75. package/cli/src/generated/sotPayload.ts +7 -7
  76. package/cli/src/kitHome.ts +44 -40
  77. package/cli/src/main.ts +63 -56
  78. package/cli/src/manifests.ts +53 -54
  79. package/cli/src/md.d.ts +2 -2
  80. package/cli/src/payload.ts +9 -9
  81. package/cli/src/services.ts +21 -13
  82. package/cli/tsconfig.json +4 -1
  83. package/package.json +9 -2
  84. package/cli/src/engine-native/claudePlugins.ts +0 -510
@@ -1,6 +1,6 @@
1
- import { Command, Prompt } from "effect/unstable/cli"
2
- import { Console, Effect } from "effect"
3
- import { bail } from "../engine"
1
+ import { Command, Prompt } from "effect/unstable/cli";
2
+ import { Console, Effect } from "effect";
3
+ import { bail } from "../engine";
4
4
  import {
5
5
  engineHome,
6
6
  HARNESSES,
@@ -8,57 +8,50 @@ import {
8
8
  LEGACY_SELECTION,
9
9
  readHarnessSelection,
10
10
  writeHarnessSelection,
11
- type Harness
12
- } from "../engine-native/harnesses"
11
+ type Harness,
12
+ } from "../engine-native/harnesses";
13
13
 
14
14
  const DESCRIPTIONS: Record<Harness, string> = {
15
15
  claude: "Claude Code user configuration",
16
16
  codex: "Codex user configuration",
17
17
  agents: "universal agent skills",
18
- omp: "Oh My Pi user configuration"
19
- }
18
+ omp: "Oh My Pi user configuration",
19
+ };
20
20
 
21
- export const harnessesCommand = Command.make(
22
- "harnesses",
23
- {},
24
- () =>
25
- Effect.gen(function* () {
26
- const home = engineHome(process.env)
27
- const stored = yield* Effect.sync(() => readHarnessSelection(home))
28
- const selection = stored ?? LEGACY_SELECTION
29
- const names = selection.join(", ")
21
+ export const harnessesCommand = Command.make("harnesses", {}, () =>
22
+ Effect.gen(function* () {
23
+ const home = engineHome(process.env);
24
+ const stored = yield* Effect.sync(() => readHarnessSelection(home));
25
+ const selection = stored ?? LEGACY_SELECTION;
26
+ const names = selection.join(", ");
30
27
 
31
- if (stored === undefined) {
32
- yield* Console.log(
33
- `Harness selection: ${names} (no selection is stored yet; the legacy default applies)`
34
- )
35
- } else {
36
- yield* Console.log(`Harness selection: ${names}`)
37
- }
28
+ if (stored === undefined) {
29
+ yield* Console.log(
30
+ `Harness selection: ${names} (no selection is stored yet; the legacy default applies)`,
31
+ );
32
+ } else {
33
+ yield* Console.log(`Harness selection: ${names}`);
34
+ }
38
35
 
39
- if (!process.stdout.isTTY) return
36
+ if (!process.stdout.isTTY) return;
40
37
 
41
- const answer = yield* Prompt.MultiSelect({
42
- message: "Choose the harnesses for a flag-less docks-kit sync",
43
- choices: HARNESSES.map((harness) => ({
44
- title: harness,
45
- value: harness,
46
- description: DESCRIPTIONS[harness],
47
- selected: selection.includes(harness)
48
- }))
49
- })
38
+ const answer = yield* Prompt.MultiSelect({
39
+ message: "Choose the harnesses for a flag-less docks-kit sync",
40
+ choices: HARNESSES.map((harness) => ({
41
+ title: harness,
42
+ value: harness,
43
+ description: DESCRIPTIONS[harness],
44
+ selected: selection.includes(harness),
45
+ })),
46
+ });
50
47
 
51
- if (answer.length === 0) {
52
- return yield* bail("Select at least one harness. The stored selection was not changed.")
53
- }
48
+ if (answer.length === 0) {
49
+ return yield* bail("Select at least one harness. The stored selection was not changed.");
50
+ }
54
51
 
55
- yield* Effect.sync(() => writeHarnessSelection(home, answer))
56
- yield* Console.log(
57
- `Saved harness selection: ${answer.join(", ")} (${harnessStateFile(home)})`
58
- )
59
- })
52
+ yield* Effect.sync(() => writeHarnessSelection(home, answer));
53
+ yield* Console.log(`Saved harness selection: ${answer.join(", ")} (${harnessStateFile(home)})`);
54
+ }),
60
55
  ).pipe(
61
- Command.withDescription(
62
- "Choose the harness selection that drives a flag-less docks-kit sync."
63
- )
64
- )
56
+ Command.withDescription("Choose the harness selection that drives a flag-less docks-kit sync."),
57
+ );
@@ -1,70 +1,65 @@
1
- import { Argument, Command, Flag, Prompt } from "effect/unstable/cli"
2
- import { Effect, Option } from "effect"
3
- import { bail, engine } from "../engine"
4
- import { modelCatalog } from "../engine-native/models"
5
- import type { Tool } from "../manifests"
1
+ import { Argument, Command, Flag, Prompt } from "effect/unstable/cli";
2
+ import { Effect, Option } from "effect";
3
+ import { bail, engine } from "../engine";
4
+ import { modelCatalog } from "../engine-native/models";
5
+ import type { Tool } from "../manifests";
6
6
 
7
- const tool = Argument.String("tool").pipe(
8
- Argument.withDescription("Which tool: claude | codex")
9
- )
7
+ const tool = Argument.String("tool").pipe(Argument.withDescription("Which tool: claude | codex"));
10
8
  const value = Argument.String("value").pipe(
11
9
  Argument.withDescription("Model to set (omit to view current + pick interactively on a TTY)"),
12
- Argument.optional
13
- )
10
+ Argument.optional,
11
+ );
14
12
  const dryRun = Flag.Boolean("dry-run").pipe(
15
13
  Flag.withDescription("Preview without applying"),
16
- Flag.withDefault(false)
17
- )
14
+ Flag.withDefault(false),
15
+ );
18
16
  const verbose = Flag.Boolean("verbose").pipe(
19
17
  Flag.withAlias("v"),
20
18
  Flag.withDescription("Also print no-op confirmations (already in sync, up to date)"),
21
- Flag.withDefault(false)
22
- )
19
+ Flag.withDefault(false),
20
+ );
23
21
 
24
- const KEEP = "__keep__"
22
+ const KEEP = "__keep__";
25
23
 
26
- export const modelCommand = Command.make(
27
- "model",
28
- { tool, value, dryRun, verbose },
29
- (config) =>
30
- Effect.gen(function* () {
31
- if (config.tool !== "claude" && config.tool !== "codex") {
32
- return yield* bail(`Unknown tool '${config.tool}' (valid: claude, codex)`)
33
- }
34
- const t = config.tool as Tool
35
- const dry = [...(config.dryRun ? ["--dry-run"] : []), ...(config.verbose ? ["--verbose"] : [])]
24
+ export const modelCommand = Command.make("model", { tool, value, dryRun, verbose }, (config) =>
25
+ Effect.gen(function* () {
26
+ if (config.tool !== "claude" && config.tool !== "codex") {
27
+ return yield* bail(`Unknown tool '${config.tool}' (valid: claude, codex)`);
28
+ }
29
+ const t = config.tool as Tool;
30
+ const dry = [...(config.dryRun ? ["--dry-run"] : []), ...(config.verbose ? ["--verbose"] : [])];
36
31
 
37
- if (Option.isSome(config.value)) {
38
- if (config.value.value.trim() === "") {
39
- return yield* bail("Model value must not be empty or blank")
40
- }
41
- return yield* engine(["model", t, config.value.value, ...dry])
32
+ if (Option.isSome(config.value)) {
33
+ if (config.value.value.trim() === "") {
34
+ return yield* bail("Model value must not be empty or blank");
42
35
  }
36
+ return yield* engine(["model", t, config.value.value, ...dry]);
37
+ }
43
38
 
44
- // No value: show current (engine prints deployed + SoT + catalog) …
45
- yield* engine(["model", t, ...(config.verbose ? ["--verbose"] : [])])
39
+ // No value: show current (engine prints deployed + SoT + catalog) …
40
+ yield* engine(["model", t, ...(config.verbose ? ["--verbose"] : [])]);
46
41
 
47
- // … and offer an interactive picker when attached to a terminal.
48
- if (!process.stdin.isTTY || !process.stdout.isTTY) return
42
+ // … and offer an interactive picker when attached to a terminal.
43
+ if (!process.stdin.isTTY || !process.stdout.isTTY) return;
49
44
 
50
- const catalog = modelCatalog(t)
51
- const chosen = yield* Prompt.Select({
52
- message: `Set the deployed ${t} model (deployed config only; a flag-less sync reverts to SoT)`,
53
- choices: [
54
- { title: "(keep current)", value: KEEP },
55
- ...catalog.models.map((m) => ({
56
- title: m.id,
57
- value: m.id,
58
- description: m.note ?? ""
59
- }))
60
- ]
61
- })
62
- if (chosen !== KEEP) {
63
- yield* engine(["model", t, chosen, ...dry])
64
- }
65
- })
45
+ const catalog = modelCatalog(t);
46
+ const chosen = yield* Prompt.Select({
47
+ message: `Set the deployed ${t} model (deployed config only; a flag-less sync reverts to SoT)`,
48
+ choices: [
49
+ { title: "(keep current)", value: KEEP },
50
+ ...catalog.models.map((m) => ({
51
+ title: m.id,
52
+ value: m.id,
53
+ description: m.note ?? "",
54
+ })),
55
+ ],
56
+ });
57
+ if (chosen !== KEEP) {
58
+ yield* engine(["model", t, chosen, ...dry]);
59
+ }
60
+ }),
66
61
  ).pipe(
67
62
  Command.withDescription(
68
- "Get or set the DEPLOYED model for one tool without a full sync (deploy-time modifier semantics: SoT untouched; flag-less sync reverts)."
69
- )
70
- )
63
+ "Get or set the DEPLOYED model for one tool without a full sync (deploy-time modifier semantics: SoT untouched; flag-less sync reverts).",
64
+ ),
65
+ );
@@ -1,50 +1,48 @@
1
- import { Argument, Command, Flag } from "effect/unstable/cli"
2
- import { Console, Effect, Option } from "effect"
3
- import { bail } from "../engine"
4
- import { modelCatalog } from "../engine-native/models"
5
- import type { Tool } from "../manifests"
1
+ import { Argument, Command, Flag } from "effect/unstable/cli";
2
+ import { Console, Effect, Option } from "effect";
3
+ import { bail } from "../engine";
4
+ import { modelCatalog } from "../engine-native/models";
5
+ import type { Tool } from "../manifests";
6
6
 
7
7
  const tool = Argument.String("tool").pipe(
8
8
  Argument.withDescription("claude | codex (omit for both tool catalogs)"),
9
- Argument.optional
10
- )
9
+ Argument.optional,
10
+ );
11
11
  const json = Flag.Boolean("json").pipe(
12
12
  Flag.withDescription("Machine-readable output"),
13
- Flag.withDefault(false)
14
- )
13
+ Flag.withDefault(false),
14
+ );
15
15
 
16
16
  const renderTool = (t: Tool) =>
17
17
  Effect.gen(function* () {
18
- const catalog = modelCatalog(t)
19
- yield* Console.log(`${t} models (kit-verified ${catalog.verified}):`)
18
+ const catalog = modelCatalog(t);
19
+ yield* Console.log(`${t} models (kit-verified ${catalog.verified}):`);
20
20
  for (const m of catalog.models) {
21
- yield* Console.log(` ${m.id.padEnd(28)} ${m.kind.padEnd(6)} ${m.note ?? ""}`)
21
+ yield* Console.log(` ${m.id.padEnd(28)} ${m.kind.padEnd(6)} ${m.note ?? ""}`);
22
22
  }
23
23
  yield* Console.log(
24
24
  t === "claude"
25
25
  ? " (full claude-* model IDs outside the catalog are accepted with a warning)"
26
- : " (well-formed IDs outside the catalog are accepted with a warning)"
27
- )
28
- yield* Console.log("")
29
- })
26
+ : " (well-formed IDs outside the catalog are accepted with a warning)",
27
+ );
28
+ yield* Console.log("");
29
+ });
30
30
 
31
31
  export const modelsCommand = Command.make("models", { tool, json }, (config) =>
32
32
  Effect.gen(function* () {
33
- const requested = Option.getOrUndefined(config.tool)
33
+ const requested = Option.getOrUndefined(config.tool);
34
34
  if (requested !== undefined && requested !== "claude" && requested !== "codex") {
35
- return yield* bail(`Unknown tool '${requested}' (valid: claude, codex)`)
35
+ return yield* bail(`Unknown tool '${requested}' (valid: claude, codex)`);
36
36
  }
37
- const tools: Array<Tool> = requested !== undefined ? [requested as Tool] : ["claude", "codex"]
37
+ const tools: Array<Tool> = requested !== undefined ? [requested as Tool] : ["claude", "codex"];
38
38
 
39
39
  if (config.json) {
40
- const out = Object.fromEntries(tools.map((t) => [t, modelCatalog(t)]))
41
- return yield* Console.log(JSON.stringify(out, null, 2))
40
+ const out = Object.fromEntries(tools.map((t) => [t, modelCatalog(t)]));
41
+ return yield* Console.log(JSON.stringify(out, null, 2));
42
42
  }
43
43
 
44
44
  for (const t of tools) {
45
- yield* renderTool(t)
45
+ yield* renderTool(t);
46
46
  }
47
- })
48
- ).pipe(
49
- Command.withDescription("List kit-verified Claude and Codex models (SoT/models.json).")
50
- )
47
+ }),
48
+ ).pipe(Command.withDescription("List kit-verified Claude and Codex models (SoT/models.json)."));