@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.
- package/CHANGELOG.md +26 -0
- package/README.md +8 -8
- package/README_ko-KR.md +8 -8
- package/bin/litclaude-ai.js +10 -4
- package/docs/assets/readme/badge-version.svg +1 -1
- package/package.json +5 -2
- package/plugins/litclaude/.claude-plugin/plugin.json +1 -1
- package/plugins/litclaude/.lsp.json +5 -2
- package/plugins/litclaude/agents/korean-prose-editor.md +0 -1
- package/plugins/litclaude/agents/korean-style-analyzer.md +0 -1
- package/plugins/litclaude/agents/librarian-researcher.md +0 -1
- package/plugins/litclaude/agents/lit-executor.md +0 -1
- package/plugins/litclaude/agents/lit-planner.md +0 -1
- package/plugins/litclaude/agents/lit-verifier.md +0 -1
- package/plugins/litclaude/agents/meaning-preservation-auditor.md +0 -1
- package/plugins/litclaude/agents/native-flow-reviewer.md +0 -1
- package/plugins/litclaude/agents/polish-orchestrator.md +0 -1
- package/plugins/litclaude/agents/qa-runner.md +0 -1
- package/plugins/litclaude/agents/quality-reviewer.md +0 -1
- package/plugins/litclaude/bin/litclaude-lsp-doctor.js +2 -1
- package/plugins/litclaude/bin/litclaude-mcp.js +1 -1
- package/plugins/litclaude/lib/canonical-skill-resources.mjs +8 -8
- package/plugins/litclaude/lib/mod/state.mjs +12 -0
- package/plugins/litclaude/lib/mod/view.mjs +9 -3
- package/plugins/litclaude/lib/rewind/collect.mjs +6 -2
- package/plugins/litclaude/skills/lit-typographic-motion/SKILL.md +1 -1
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/cover.mjs +1 -1
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-gate.mjs +1 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-serve.mjs +126 -4
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage.mjs +1 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/stage/stage-kit.js +40 -1
- package/plugins/litclaude/skills/lit-typographic-motion/references/stage.md +43 -2
- package/plugins/litclaude/skills/lsp-setup/SKILL.md +8 -5
- package/plugins/litclaude/skills/lsp-setup/references/bash/README.md +2 -1
- package/plugins/litclaude/skills/lsp-setup/references/c-cpp/README.md +5 -4
- package/plugins/litclaude/skills/lsp-setup/references/csharp/README.md +3 -2
- package/plugins/litclaude/skills/lsp-setup/references/dart/README.md +2 -1
- package/plugins/litclaude/skills/lsp-setup/references/elixir/README.md +3 -3
- package/plugins/litclaude/skills/lsp-setup/references/go/README.md +1 -1
- package/plugins/litclaude/skills/lsp-setup/references/haskell/README.md +2 -1
- package/plugins/litclaude/skills/lsp-setup/references/java/README.md +1 -1
- package/plugins/litclaude/skills/lsp-setup/references/julia/README.md +2 -1
- package/plugins/litclaude/skills/lsp-setup/references/kotlin/README.md +1 -1
- package/plugins/litclaude/skills/lsp-setup/references/lua/README.md +1 -1
- package/plugins/litclaude/skills/lsp-setup/references/php/README.md +3 -2
- package/plugins/litclaude/skills/lsp-setup/references/python/README.md +9 -8
- package/plugins/litclaude/skills/lsp-setup/references/ruby/README.md +4 -3
- package/plugins/litclaude/skills/lsp-setup/references/rust/README.md +1 -1
- package/plugins/litclaude/skills/lsp-setup/references/swift/README.md +1 -1
- package/plugins/litclaude/skills/lsp-setup/references/terraform/README.md +2 -1
- package/plugins/litclaude/skills/lsp-setup/references/typescript/README.md +24 -21
- package/plugins/litclaude/skills/lsp-setup/references/yaml/README.md +2 -1
- package/plugins/litclaude/skills/lsp-setup/references/zig/README.md +1 -1
- package/plugins/litclaude/skills/lsp-setup/scripts/detect-lsp.ts +1 -1
- package/plugins/litclaude/skills/lsp-setup/scripts/lsp-server-table.ts +4 -3
- package/plugins/litclaude/skills/lsp-setup/scripts/verify-lsp.ts +3 -2
- package/scripts/prepublish-test-gate.mjs +22 -11
- 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
|
|
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":
|
|
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
|
-
|
|
47
|
-
|
|
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
|
|
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
|
|
58
|
+
| `command` + `args` | when to choose |
|
|
56
59
|
| ----------------------------------------- | --------------------------------------- |
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
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,
|
|
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":
|
|
26
|
+
"command": "yaml-language-server",
|
|
27
|
+
"args": ["--stdio"],
|
|
27
28
|
"extensionToLanguage": {
|
|
28
29
|
".yaml": "yaml",
|
|
29
30
|
".yml": "yaml"
|
|
@@ -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
|
|
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
|
-
|
|
90
|
-
|
|
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
|
|
6
|
-
// only proves that ci.yml
|
|
7
|
-
//
|
|
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
|
|
17
|
-
|
|
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
|
|
29
|
-
|
|
30
|
-
|
|
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,
|
|
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'
|
|
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'
|
|
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')
|
|
155
|
+
const actual = { tools: fieldOf(frontmatter, 'tools') };
|
|
156
156
|
permissions[agentName] = actual;
|
|
157
|
-
if (actual.tools !== expected.tools
|
|
158
|
-
|
|
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)) {
|