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.
- package/AGENTS.md +37 -33
- package/README.md +1 -0
- package/cli/docs/omp-models.md +114 -58
- package/cli/src/argv.ts +38 -469
- package/cli/src/argvSurface.ts +371 -0
- package/cli/src/argvValidate.ts +122 -0
- package/cli/src/commands/docs.ts +57 -42
- package/cli/src/commands/harnesses.ts +38 -45
- package/cli/src/commands/model.ts +48 -53
- package/cli/src/commands/models.ts +24 -26
- package/cli/src/commands/omp.ts +178 -88
- package/cli/src/commands/plugins.ts +20 -20
- package/cli/src/commands/skills.ts +22 -20
- package/cli/src/commands/status.ts +87 -80
- package/cli/src/commands/sync.ts +113 -87
- package/cli/src/commands/toolchain.ts +21 -21
- package/cli/src/commands/update.ts +139 -117
- package/cli/src/efforts.ts +35 -34
- package/cli/src/engine-native/DESIGN.md +30 -30
- package/cli/src/engine-native/bun.ts +77 -55
- package/cli/src/engine-native/claudeLsp.ts +154 -0
- package/cli/src/engine-native/claudeOptionalPlugins.ts +113 -0
- package/cli/src/engine-native/claudePluginPasses.ts +348 -0
- package/cli/src/engine-native/claudeRemovals.ts +195 -0
- package/cli/src/engine-native/claudeRetired.ts +4 -4
- package/cli/src/engine-native/claudeRuntime.ts +94 -68
- package/cli/src/engine-native/claudeSettings.ts +174 -0
- package/cli/src/engine-native/claudeSettingsModifiers.ts +50 -54
- package/cli/src/engine-native/claudeSync.ts +176 -456
- package/cli/src/engine-native/codexConfig.ts +158 -0
- package/cli/src/engine-native/codexHooks.ts +91 -0
- package/cli/src/engine-native/codexPlugins.ts +290 -0
- package/cli/src/engine-native/codexStatus.ts +24 -0
- package/cli/src/engine-native/codexSync.ts +110 -568
- package/cli/src/engine-native/codexToml.ts +140 -138
- package/cli/src/engine-native/deps.ts +144 -107
- package/cli/src/engine-native/engineCtx.ts +126 -0
- package/cli/src/engine-native/exec.ts +98 -87
- package/cli/src/engine-native/failures.ts +3 -3
- package/cli/src/engine-native/harnesses.ts +62 -72
- package/cli/src/engine-native/index.ts +34 -315
- package/cli/src/engine-native/jq.ts +25 -24
- package/cli/src/engine-native/logger.ts +98 -100
- package/cli/src/engine-native/models.ts +50 -45
- package/cli/src/engine-native/modes.ts +83 -80
- package/cli/src/engine-native/ompFileDeploy.ts +111 -0
- package/cli/src/engine-native/ompMarketplace.ts +136 -0
- package/cli/src/engine-native/ompOverlay.ts +93 -53
- package/cli/src/engine-native/ompPaths.ts +49 -38
- package/cli/src/engine-native/ompPlugins.ts +170 -0
- package/cli/src/engine-native/ompSync.ts +64 -408
- package/cli/src/engine-native/ompYaml.ts +43 -41
- package/cli/src/engine-native/os/darwin.ts +5 -5
- package/cli/src/engine-native/os/index.ts +15 -15
- package/cli/src/engine-native/os/linux.ts +5 -5
- package/cli/src/engine-native/os/posix.ts +28 -24
- package/cli/src/engine-native/os/targets.ts +17 -17
- package/cli/src/engine-native/os/types.ts +31 -31
- package/cli/src/engine-native/os/windows.ts +61 -61
- package/cli/src/engine-native/parseArgs.ts +122 -372
- package/cli/src/engine-native/parseHelp.ts +66 -0
- package/cli/src/engine-native/parseModifiers.ts +222 -0
- package/cli/src/engine-native/services.ts +34 -34
- package/cli/src/engine-native/settings.ts +15 -15
- package/cli/src/engine-native/sharedTypes.d.ts +46 -0
- package/cli/src/engine-native/skillsInstall.ts +105 -0
- package/cli/src/engine-native/skillsLinks.ts +203 -0
- package/cli/src/engine-native/skillsManifest.ts +16 -0
- package/cli/src/engine-native/skillsPrune.ts +108 -0
- package/cli/src/engine-native/skillsSync.ts +28 -362
- package/cli/src/engine-native/syncConcurrency.ts +55 -0
- package/cli/src/engine-native/syncDispatch.ts +141 -0
- package/cli/src/engine-native/toolchain.ts +65 -62
- package/cli/src/engine.ts +65 -57
- package/cli/src/generated/sotPayload.ts +7 -7
- package/cli/src/kitHome.ts +44 -40
- package/cli/src/main.ts +63 -56
- package/cli/src/manifests.ts +53 -54
- package/cli/src/md.d.ts +2 -2
- package/cli/src/payload.ts +9 -9
- package/cli/src/services.ts +21 -13
- package/cli/tsconfig.json +4 -1
- package/package.json +9 -2
- 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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
36
|
+
if (!process.stdout.isTTY) return;
|
|
40
37
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
52
|
-
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
|
-
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
45
|
-
|
|
39
|
+
// No value: show current (engine prints deployed + SoT + catalog) …
|
|
40
|
+
yield* engine(["model", t, ...(config.verbose ? ["--verbose"] : [])]);
|
|
46
41
|
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
// … and offer an interactive picker when attached to a terminal.
|
|
43
|
+
if (!process.stdin.isTTY || !process.stdout.isTTY) return;
|
|
49
44
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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)."));
|