@litfamily/litclaude 1.0.45 → 1.0.47

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 (58) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +8 -8
  3. package/README_ko-KR.md +8 -8
  4. package/bin/litclaude-ai.js +10 -4
  5. package/docs/assets/readme/badge-version.svg +1 -1
  6. package/package.json +5 -2
  7. package/plugins/litclaude/.claude-plugin/plugin.json +1 -1
  8. package/plugins/litclaude/.lsp.json +5 -2
  9. package/plugins/litclaude/agents/korean-prose-editor.md +0 -1
  10. package/plugins/litclaude/agents/korean-style-analyzer.md +0 -1
  11. package/plugins/litclaude/agents/librarian-researcher.md +0 -1
  12. package/plugins/litclaude/agents/lit-executor.md +0 -1
  13. package/plugins/litclaude/agents/lit-planner.md +0 -1
  14. package/plugins/litclaude/agents/lit-verifier.md +0 -1
  15. package/plugins/litclaude/agents/meaning-preservation-auditor.md +0 -1
  16. package/plugins/litclaude/agents/native-flow-reviewer.md +0 -1
  17. package/plugins/litclaude/agents/polish-orchestrator.md +0 -1
  18. package/plugins/litclaude/agents/qa-runner.md +0 -1
  19. package/plugins/litclaude/agents/quality-reviewer.md +0 -1
  20. package/plugins/litclaude/bin/litclaude-lsp-doctor.js +2 -1
  21. package/plugins/litclaude/bin/litclaude-mcp.js +1 -1
  22. package/plugins/litclaude/lib/canonical-skill-resources.mjs +8 -8
  23. package/plugins/litclaude/lib/mod/state.mjs +12 -0
  24. package/plugins/litclaude/lib/mod/view.mjs +9 -3
  25. package/plugins/litclaude/lib/rewind/collect.mjs +6 -2
  26. package/plugins/litclaude/skills/lit-typographic-motion/SKILL.md +1 -1
  27. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/cover.mjs +1 -1
  28. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-gate.mjs +1 -0
  29. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-serve.mjs +126 -4
  30. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage.mjs +1 -0
  31. package/plugins/litclaude/skills/lit-typographic-motion/engine/stage/stage-kit.js +40 -1
  32. package/plugins/litclaude/skills/lit-typographic-motion/references/stage.md +43 -2
  33. package/plugins/litclaude/skills/lsp-setup/SKILL.md +8 -5
  34. package/plugins/litclaude/skills/lsp-setup/references/bash/README.md +2 -1
  35. package/plugins/litclaude/skills/lsp-setup/references/c-cpp/README.md +5 -4
  36. package/plugins/litclaude/skills/lsp-setup/references/csharp/README.md +3 -2
  37. package/plugins/litclaude/skills/lsp-setup/references/dart/README.md +2 -1
  38. package/plugins/litclaude/skills/lsp-setup/references/elixir/README.md +3 -3
  39. package/plugins/litclaude/skills/lsp-setup/references/go/README.md +1 -1
  40. package/plugins/litclaude/skills/lsp-setup/references/haskell/README.md +2 -1
  41. package/plugins/litclaude/skills/lsp-setup/references/java/README.md +1 -1
  42. package/plugins/litclaude/skills/lsp-setup/references/julia/README.md +2 -1
  43. package/plugins/litclaude/skills/lsp-setup/references/kotlin/README.md +1 -1
  44. package/plugins/litclaude/skills/lsp-setup/references/lua/README.md +1 -1
  45. package/plugins/litclaude/skills/lsp-setup/references/php/README.md +3 -2
  46. package/plugins/litclaude/skills/lsp-setup/references/python/README.md +9 -8
  47. package/plugins/litclaude/skills/lsp-setup/references/ruby/README.md +4 -3
  48. package/plugins/litclaude/skills/lsp-setup/references/rust/README.md +1 -1
  49. package/plugins/litclaude/skills/lsp-setup/references/swift/README.md +1 -1
  50. package/plugins/litclaude/skills/lsp-setup/references/terraform/README.md +2 -1
  51. package/plugins/litclaude/skills/lsp-setup/references/typescript/README.md +24 -21
  52. package/plugins/litclaude/skills/lsp-setup/references/yaml/README.md +2 -1
  53. package/plugins/litclaude/skills/lsp-setup/references/zig/README.md +1 -1
  54. package/plugins/litclaude/skills/lsp-setup/scripts/detect-lsp.ts +1 -1
  55. package/plugins/litclaude/skills/lsp-setup/scripts/lsp-server-table.ts +4 -3
  56. package/plugins/litclaude/skills/lsp-setup/scripts/verify-lsp.ts +3 -2
  57. package/scripts/prepublish-test-gate.mjs +22 -11
  58. package/tools/check-model-routing.mjs +15 -15
@@ -2,17 +2,18 @@
2
2
 
3
3
  - **Recommended server:** `typescript-language-server --stdio`
4
4
  - **Extensions:** `.ts .tsx .js .jsx .mjs .cjs .mts .cts`
5
- - **Install hint:** `npm install -g typescript-language-server typescript`
5
+ - **Install hint:** `npm install -g typescript-language-server typescript@6`
6
6
 
7
7
  ## Install
8
8
 
9
- - **macOS:** `npm install -g typescript-language-server typescript`
10
- - **Linux:** `npm install -g typescript-language-server typescript`
11
- - **Windows:** `npm install -g typescript-language-server typescript` (PowerShell or cmd)
9
+ - **macOS:** `npm install -g typescript-language-server typescript@6`
10
+ - **Linux:** `npm install -g typescript-language-server typescript@6`
11
+ - **Windows:** `npm install -g typescript-language-server typescript@6` (PowerShell or cmd)
12
12
 
13
13
  `typescript-language-server` is only a thin wrapper — it needs the `typescript`
14
14
  package (`tsserver`) present too, either globally or in the project's
15
- `node_modules`. Always install both.
15
+ `node_modules`. Always install both. Pin `typescript@6`: TypeScript 7 ships no
16
+ `lib/tsserver.js`, which `typescript-language-server` loads.
16
17
 
17
18
  Confirm it resolves:
18
19
 
@@ -23,47 +24,49 @@ command -v typescript-language-server
23
24
  ## Configure
24
25
 
25
26
  LitClaude declares language servers in `plugins/litclaude/.lsp.json`. Each entry
26
- is keyed by language name and holds a `command` array plus an
27
+ is keyed by language name and holds a `command` string, an `args` array and an
27
28
  `extensionToLanguage` map. TypeScript/JavaScript already ships in the default
28
29
  config:
29
30
 
30
31
  ```json
31
32
  {
32
33
  "typescript": {
33
- "command": ["typescript-language-server", "--stdio"],
34
+ "command": "typescript-language-server",
35
+ "args": ["--stdio"],
34
36
  "extensionToLanguage": {
35
37
  ".ts": "typescript",
36
38
  ".tsx": "typescriptreact",
37
39
  ".js": "javascript",
38
40
  ".jsx": "javascriptreact",
39
41
  ".mjs": "javascript",
40
- ".cjs": "javascript"
42
+ ".cjs": "javascript",
43
+ ".mts": "typescript",
44
+ ".cts": "typescript"
41
45
  }
42
46
  }
43
47
  }
44
48
  ```
45
49
 
46
- Add `.mts`/`.cts` to `extensionToLanguage` if your project uses them. Claude Code
47
- resolves the server for an edited file by matching its extension against these
48
- maps.
50
+ Claude Code resolves the server for an edited file by matching its extension
51
+ against these maps.
49
52
 
50
53
  ## Alternatives
51
54
 
52
- Swap the `command` for your toolchain. Keep the same `.lsp.json` shape and adjust
55
+ Swap `command` and `args` for your toolchain. Keep the same `.lsp.json` shape and adjust
53
56
  `extensionToLanguage` to cover the extensions that server should own:
54
57
 
55
- | command | when to choose |
58
+ | `command` + `args` | when to choose |
56
59
  | ----------------------------------------- | --------------------------------------- |
57
- | `["deno", "lsp"]` | Deno projects (handles `.ts/.tsx/.js`) |
58
- | `["biome", "lsp-proxy", "--stdio"]` | Biome lint/format as the LSP |
59
- | `["vscode-eslint-language-server", "--stdio"]` | ESLint diagnostics |
60
- | `["oxlint", "--lsp"]` | fast Oxc-based linting |
61
- | `["vue-language-server", "--stdio"]` | `.vue` single-file components |
62
- | `["svelteserver", "--stdio"]` | `.svelte` files |
63
- | `["astro-ls", "--stdio"]` | `.astro` files |
60
+ | `"deno"` + `["lsp"]` | Deno projects (handles `.ts/.tsx/.js`) |
61
+ | `"biome"` + `["lsp-proxy", "--stdio"]` | Biome lint/format as the LSP |
62
+ | `"vscode-eslint-language-server"` + `["--stdio"]` | ESLint diagnostics |
63
+ | `"oxlint"` + `["--lsp"]` | fast Oxc-based linting |
64
+ | `"vue-language-server"` + `["--stdio"]` | `.vue` single-file components |
65
+ | `"svelteserver"` + `["--stdio"]` | `.svelte` files |
66
+ | `"astro-ls"` + `["--stdio"]` | `.astro` files |
64
67
 
65
68
  `eslint` install: `npm i -g vscode-langservers-extracted`. To run Deno instead
66
- of the default, replace the `typescript` entry's `command` with `["deno", "lsp"]`.
69
+ of the default, set the `typescript` entry's `command` to `"deno"` and `args` to `["lsp"]`.
67
70
 
68
71
  ## Troubleshooting
69
72
  - **PATH:** `typescript-language-server` must be on PATH; reopen shell after `npm i -g`. Check your global bin with `npm bin -g`.
@@ -23,7 +23,8 @@ Add a `yaml` entry to `plugins/litclaude/.lsp.json`:
23
23
  ```json
24
24
  {
25
25
  "yaml": {
26
- "command": ["yaml-language-server", "--stdio"],
26
+ "command": "yaml-language-server",
27
+ "args": ["--stdio"],
27
28
  "extensionToLanguage": {
28
29
  ".yaml": "yaml",
29
30
  ".yml": "yaml"
@@ -26,7 +26,7 @@ Add a `zig` entry to `plugins/litclaude/.lsp.json`:
26
26
  ```json
27
27
  {
28
28
  "zig": {
29
- "command": ["zls"],
29
+ "command": "zls",
30
30
  "extensionToLanguage": {
31
31
  ".zig": "zig",
32
32
  ".zon": "zig"
@@ -118,7 +118,7 @@ function isRecord(value: unknown): value is Record<string, unknown> {
118
118
  }
119
119
 
120
120
  // LitClaude .lsp.json is keyed by language name:
121
- // { "typescript": { "command": [...], "extensionToLanguage": {...} } }
121
+ // { "typescript": { "command": "<bin>", "args": [...], "extensionToLanguage": {...} } }
122
122
  function parseConfiguredLanguages(path: string): readonly string[] {
123
123
  let parsed: unknown
124
124
  try {
@@ -1,8 +1,9 @@
1
1
  // Standalone snapshot of the primary language server per supported language,
2
2
  // embedded so detect-lsp.ts runs without any external dependency in any project.
3
3
  // Each entry mirrors the per-language references/<language>/README.md and the
4
- // LitClaude .lsp.json shape, which is keyed by language name:
5
- // { "<language>": { "command": [...], "extensionToLanguage": { ".ext": "<lang>" } } }
4
+ // LitClaude .lsp.json, which is keyed by language name:
5
+ // { "<language>": { "command": "<bin>", "args": [...], "extensionToLanguage": { ".ext": "<lang>" } } }
6
+ // Here `command` is the full argv: its first item is .lsp.json `command`, the rest are `args`.
6
7
  // Edit this table when a reference README changes.
7
8
 
8
9
  export interface LanguageServer {
@@ -17,7 +18,7 @@ export const LANGUAGES: readonly LanguageServer[] = [
17
18
  language: "typescript",
18
19
  command: ["typescript-language-server", "--stdio"],
19
20
  extensions: [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".mts", ".cts"],
20
- installHint: "npm install -g typescript-language-server typescript",
21
+ installHint: "npm install -g typescript-language-server typescript@6",
21
22
  },
22
23
  {
23
24
  language: "python",
@@ -86,8 +86,9 @@ function resolveServer(ext: string, configPath: string): ResolvedServer | null {
86
86
  if (!isRecord(entry)) continue
87
87
  const map = entry["extensionToLanguage"]
88
88
  const command = entry["command"]
89
- if (isRecord(map) && Object.keys(map).includes(ext) && isStringArray(command)) {
90
- return { language, command }
89
+ const args = entry["args"] ?? []
90
+ if (isRecord(map) && Object.keys(map).includes(ext) && typeof command === "string" && isStringArray(args)) {
91
+ return { language, command: [command, ...args] }
91
92
  }
92
93
  }
93
94
  }
@@ -2,9 +2,10 @@ import { spawnSync } from "node:child_process";
2
2
  import { resolve } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
 
5
- // publish.yml sets LITCLAUDE_PUBLISH_FROM_CI. There the suite has already run in ci.yml, so the gate
6
- // only proves that ci.yml passed on this exact, unmodified commit and refuses the publish otherwise.
7
- // Everywhere else (a local npm publish, ci.yml itself) the full suite runs as before.
5
+ // publish.yml sets LITCLAUDE_PUBLISH_FROM_CI. There the suites have already run in CI, so the gate
6
+ // only proves that ci.yml (fast tier) and ci-heavy.yml (render/installer tier) both passed on this
7
+ // exact, unmodified commit and refuses the publish otherwise. Everywhere else (a local npm publish,
8
+ // ci.yml itself) the full suite runs as before.
8
9
  export async function ciVerdict({ env, fetchImpl = fetch, git = runGit }) {
9
10
  const sha = env.GITHUB_SHA ?? "";
10
11
  const repository = env.GITHUB_REPOSITORY ?? "";
@@ -13,8 +14,16 @@ export async function ciVerdict({ env, fetchImpl = fetch, git = runGit }) {
13
14
  }
14
15
  if (git(["rev-parse", "HEAD"]) !== sha) return { ok: false, reason: `checkout is not ${sha}` };
15
16
  if (git(["status", "--porcelain"]) !== "") return { ok: false, reason: "checkout has local changes" };
16
- const url = `https://api.github.com/repos/${repository}/actions/workflows/ci.yml/runs`
17
- + `?head_sha=${sha}&status=success&event=push&per_page=1`;
17
+ const fast = await successfulRun({ env, fetchImpl, repository, sha, workflow: "ci.yml", events: ["push"] });
18
+ if (!fast.ok) return fast;
19
+ const heavy = await successfulRun({ env, fetchImpl, repository, sha, workflow: "ci-heavy.yml", events: ["push", "schedule", "workflow_dispatch"] });
20
+ if (!heavy.ok) return heavy;
21
+ return { ok: true, reason: `ci.yml run ${fast.run} and ci-heavy.yml run ${heavy.run} passed on ${sha}` };
22
+ }
23
+
24
+ async function successfulRun({ env, fetchImpl, repository, sha, workflow, events }) {
25
+ const url = `https://api.github.com/repos/${repository}/actions/workflows/${workflow}/runs`
26
+ + `?head_sha=${sha}&status=success&per_page=5`;
18
27
  const headers = { accept: "application/vnd.github+json" };
19
28
  if (env.GITHUB_TOKEN) headers.authorization = `Bearer ${env.GITHUB_TOKEN}`;
20
29
  let body;
@@ -25,11 +34,13 @@ export async function ciVerdict({ env, fetchImpl = fetch, git = runGit }) {
25
34
  } catch (error) {
26
35
  return { ok: false, reason: `GitHub API unreachable: ${error instanceof Error ? error.message : String(error)}` };
27
36
  }
28
- const run = Array.isArray(body?.workflow_runs) ? body.workflow_runs[0] : undefined;
29
- if (run?.head_sha !== sha || run?.conclusion !== "success") {
30
- return { ok: false, reason: `no successful ci.yml push run for ${sha}` };
37
+ const runs = Array.isArray(body?.workflow_runs) ? body.workflow_runs : [];
38
+ const run = runs.find((candidate) => candidate?.head_sha === sha && candidate?.conclusion === "success"
39
+ && events.includes(candidate?.event));
40
+ if (!run) {
41
+ return { ok: false, reason: `no successful ${workflow} run (${events.join("/")}) for ${sha}` };
31
42
  }
32
- return { ok: true, reason: `ci.yml run ${run.id} passed on ${sha}` };
43
+ return { ok: true, run: run.id };
33
44
  }
34
45
 
35
46
  function runGit(args) {
@@ -43,8 +54,8 @@ function runSuite() {
43
54
  );
44
55
  const npmExecPath = process.env.npm_execpath;
45
56
  const result = npmExecPath
46
- ? spawnSync(process.execPath, [npmExecPath, "test"], { env, stdio: "inherit" })
47
- : spawnSync(process.platform === "win32" ? "npm.cmd" : "npm", ["test"], {
57
+ ? spawnSync(process.execPath, [npmExecPath, "run", "test:all"], { env, stdio: "inherit" })
58
+ : spawnSync(process.platform === "win32" ? "npm.cmd" : "npm", ["run", "test:all"], {
48
59
  env,
49
60
  shell: process.platform === "win32",
50
61
  stdio: "inherit",
@@ -18,17 +18,17 @@ export const APPROVED_MODEL_ROUTES = Object.freeze({
18
18
  });
19
19
 
20
20
  export const EXPECTED_AGENT_PERMISSIONS = Object.freeze({
21
- 'lit-executor': Object.freeze({ tools: 'Read, Grep, Glob, Bash, Write, Edit, MultiEdit', permissionMode: 'acceptEdits' }),
22
- 'korean-prose-editor': Object.freeze({ tools: 'Read, Grep, Glob', permissionMode: 'default' }),
23
- 'korean-style-analyzer': Object.freeze({ tools: 'Read, Grep, Glob', permissionMode: 'plan' }),
24
- 'librarian-researcher': Object.freeze({ tools: 'Read, Grep, Glob, WebFetch, WebSearch', permissionMode: 'plan' }),
25
- 'meaning-preservation-auditor': Object.freeze({ tools: 'Read, Grep, Glob', permissionMode: 'default' }),
26
- 'native-flow-reviewer': Object.freeze({ tools: 'Read, Grep, Glob', permissionMode: 'default' }),
27
- 'lit-verifier': Object.freeze({ tools: 'Read, Grep, Glob', permissionMode: 'default' }),
28
- 'polish-orchestrator': Object.freeze({ tools: 'Read, Grep, Glob', permissionMode: 'default' }),
29
- 'lit-planner': Object.freeze({ tools: 'Read, Grep, Glob, WebFetch, WebSearch', permissionMode: 'plan' }),
30
- 'qa-runner': Object.freeze({ tools: 'Read, Grep, Glob, Bash', permissionMode: 'default' }),
31
- 'quality-reviewer': Object.freeze({ tools: 'Read, Grep, Glob', permissionMode: 'default' }),
21
+ 'lit-executor': Object.freeze({ tools: 'Read, Grep, Glob, Bash, Write, Edit, MultiEdit' }),
22
+ 'korean-prose-editor': Object.freeze({ tools: 'Read, Grep, Glob' }),
23
+ 'korean-style-analyzer': Object.freeze({ tools: 'Read, Grep, Glob' }),
24
+ 'librarian-researcher': Object.freeze({ tools: 'Read, Grep, Glob, WebFetch, WebSearch' }),
25
+ 'meaning-preservation-auditor': Object.freeze({ tools: 'Read, Grep, Glob' }),
26
+ 'native-flow-reviewer': Object.freeze({ tools: 'Read, Grep, Glob' }),
27
+ 'lit-verifier': Object.freeze({ tools: 'Read, Grep, Glob' }),
28
+ 'polish-orchestrator': Object.freeze({ tools: 'Read, Grep, Glob' }),
29
+ 'lit-planner': Object.freeze({ tools: 'Read, Grep, Glob, WebFetch, WebSearch' }),
30
+ 'qa-runner': Object.freeze({ tools: 'Read, Grep, Glob, Bash' }),
31
+ 'quality-reviewer': Object.freeze({ tools: 'Read, Grep, Glob' }),
32
32
  });
33
33
 
34
34
  const UNSUPPORTED_MESSAGE =
@@ -152,11 +152,11 @@ export function inspectClaudeNativeSurface(root = ROOT) {
152
152
  }
153
153
  const expected = EXPECTED_AGENT_PERMISSIONS[agentName];
154
154
  if (!expected) continue;
155
- const actual = { tools: fieldOf(frontmatter, 'tools'), permissionMode: fieldOf(frontmatter, 'permissionMode') };
155
+ const actual = { tools: fieldOf(frontmatter, 'tools') };
156
156
  permissions[agentName] = actual;
157
- if (actual.tools !== expected.tools || actual.permissionMode !== expected.permissionMode) {
158
- failures.push(`AGENT_PERMISSION_CHANGED:${agentName}`);
159
- }
157
+ if (actual.tools !== expected.tools) failures.push(`AGENT_PERMISSION_CHANGED:${agentName}`);
158
+ // Claude Code ignores permissionMode in plugin agents; the tools list is the boundary.
159
+ if (fieldOf(frontmatter, 'permissionMode') !== null) failures.push(`AGENT_PERMISSION_MODE_IGNORED:${agentName}`);
160
160
  }
161
161
 
162
162
  for (const agentName of Object.keys(EXPECTED_AGENT_PERMISSIONS)) {