Group CLI modules into parse, run, output, and help

Move parser, tokenize, and area-aliases under cli/parse; runner and read-only under cli/run; printer under cli/output; help plus the docs/naming contract tests under cli/help. types.ts and helpers.ts stay at the cli root. Update imports, the app-root depth calculation, test fixtures, and the CLI doc generator path. No behavior change.
This commit is contained in:
gitea committed 2026-11-19 16:38:14 +08:00
1 parent 37b54065d9
commit ca9d87e13f
80 files changed
+196 -195

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bun
import { readFileSync, writeFileSync } from "node:fs";
import { resolve } from "node:path";
import { HELP_REGISTRY } from "../src/cli/help.ts";
import { HELP_REGISTRY } from "../src/cli/help/help.ts";
export const cliDocPath = resolve(import.meta.dirname, "../skills/seal-use/references/cli.md");
const begin = "<!-- BEGIN GENERATED CLI COMMANDS -->";
+3 -2
View File
@@ -52,12 +52,13 @@ describe("generated documentation contracts", () => {
const core = join(dir, "src/core")
const coreSkill = join(core, "skill")
const cli = join(dir, "src/cli")
const cliHelp = join(cli, "help")
const skill = join(dir, "skills/seal-use")
for (const path of [scripts, core, coreSkill, cli, join(skill, "references")]) mkdirSync(path, { recursive: true })
for (const path of [scripts, core, coreSkill, cli, cliHelp, join(skill, "references")]) mkdirSync(path, { recursive: true })
for (const name of ["generate-embedded-skill.mjs", "check-embedded-skill.mjs", "generate-cli-md.mjs", "check-cli-md.mjs"]) {
copyFileSync(join(import.meta.dir, name), join(scripts, name))
}
writeFileSync(join(cli, "help.ts"), 'export const HELP_REGISTRY = [{ commands: [{ usage: ["seal-use fixture list"] }] }];')
writeFileSync(join(cliHelp, "help.ts"), 'export const HELP_REGISTRY = [{ commands: [{ usage: ["seal-use fixture list"] }] }];')
writeFileSync(join(skill, "SKILL.md"), "fixture skill")
const embeddedPath = join(coreSkill, "embedded-skill.generated.ts")
const markdownPath = join(skill, "references/cli.md")