@xynogen/pix-skills 0.10.10 → 0.10.11
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/package.json +4 -5
- package/skills/lint.md +2 -2
- package/skills/lsp.md +2 -2
- package/skills/search.md +2 -2
- package/src/index.ts +15 -5
- package/src/picker.ts +9 -3
- package/src/remote.ts +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xynogen/pix-skills",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.11",
|
|
4
4
|
"description": "Pi extension — agent skill loader (skill tool + skills bundle)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"src",
|
|
12
|
-
"!src/**/*.test.*",
|
|
13
12
|
"skills",
|
|
14
13
|
"README.md",
|
|
15
14
|
"LICENSE"
|
|
@@ -47,8 +46,8 @@
|
|
|
47
46
|
"@earendil-works/pi-tui": "*"
|
|
48
47
|
},
|
|
49
48
|
"dependencies": {
|
|
50
|
-
"@xynogen/pix-gate": "^0.4.
|
|
51
|
-
"@xynogen/pix-pretty": "^2.
|
|
52
|
-
"@xynogen/pix-runtime": "^0.
|
|
49
|
+
"@xynogen/pix-gate": "^0.4.11",
|
|
50
|
+
"@xynogen/pix-pretty": "^2.1.0",
|
|
51
|
+
"@xynogen/pix-runtime": "^0.20.0"
|
|
53
52
|
}
|
|
54
53
|
}
|
package/skills/lint.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lint
|
|
3
|
-
description: Selects and runs the project's linter (
|
|
3
|
+
description: Selects and runs the project's linter (lsp diagnostics, then the project script, config, or a language default) and fixes findings. Use when asked to lint, fix lint errors, or check code quality.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
# Project Lint
|
|
@@ -9,7 +9,7 @@ Pix does not bundle linters. Use the project toolchain.
|
|
|
9
9
|
|
|
10
10
|
## Selection order
|
|
11
11
|
|
|
12
|
-
1. Run `
|
|
12
|
+
1. Run `lsp` with `action: "diagnostics"` for language-server diagnostics.
|
|
13
13
|
2. Prefer the project's `lint` or `check` script.
|
|
14
14
|
3. Use the tool named by a project config file.
|
|
15
15
|
4. Use the language default below only when the project has no choice.
|
package/skills/lsp.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lsp
|
|
3
|
-
description: Selects, installs with consent, and configures a project language server in .pi/lsp.json for pix-diagnostics, then confirms it with
|
|
3
|
+
description: Selects, installs with consent, and configures a project language server in .pi/lsp.json for pix-diagnostics, then confirms it with lsp diagnostics. Use when LSP diagnostics or navigation are missing, unavailable, or need setup for a language.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
# Project LSP Setup
|
|
@@ -14,7 +14,7 @@ installation. Configure it in `<project>/.pi/lsp.json`.
|
|
|
14
14
|
2. Prefer an existing server in project dependencies or on `PATH`.
|
|
15
15
|
3. Ask before installing a missing server. Prefer a project-local install (dev dependency, `uv` group). For servers with no local form (`gopls`, `rust-analyzer`, `clangd`, `terraform-ls`, `lua-language-server`), ask how the user wants it installed.
|
|
16
16
|
4. Add only the selected language to `.pi/lsp.json`. Never add every language.
|
|
17
|
-
5. Run `
|
|
17
|
+
5. Run `lsp` with `action: "diagnostics"`, `source: "lsp"` on one source file.
|
|
18
18
|
6. Report: language, server, config path, and the result. If the server fails to start or returns an error, report it and stop. Do not try another server without asking.
|
|
19
19
|
|
|
20
20
|
## Common choices
|
package/skills/search.md
CHANGED
|
@@ -10,8 +10,8 @@ Goal: the full map, not the first match.
|
|
|
10
10
|
## Tools
|
|
11
11
|
|
|
12
12
|
- **Unknown location, text, config, comments** → the `grep` and `find` tools, then `read` the hits.
|
|
13
|
-
- **Known symbol** → `
|
|
14
|
-
- **Code graph available** (`.pi/graph/graph.json`) → `graph` query first.
|
|
13
|
+
- **Known symbol** → `lsp` with `action: "navigate"` and `operation` `definition`, `references`, `implementation`, `callHierarchy`, or `hover`. LSP results are exact; prefer them over grep for symbols.
|
|
14
|
+
- **Code graph available** (`.pi/pix-graph/graph.json`) → `graph` query first.
|
|
15
15
|
|
|
16
16
|
Start broad with grep, then switch to LSP for exact navigation.
|
|
17
17
|
|
package/src/index.ts
CHANGED
|
@@ -11,12 +11,9 @@
|
|
|
11
11
|
* body on demand. This keeps baseline context flat as the skill set grows.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
15
|
-
import { copyFile, mkdir, readFile, realpath, rename, rm, stat } from "node:fs/promises";
|
|
16
14
|
import { dirname, isAbsolute, join, relative, resolve, win32 } from "node:path";
|
|
17
|
-
import { type ExtensionAPI, stripFrontmatter } from "@earendil-works/pi-coding-agent";
|
|
18
|
-
import { Text } from "@earendil-works/pi-tui";
|
|
19
15
|
import { type FadeTheme, fadeTextRow } from "@xynogen/pix-pretty/text";
|
|
16
|
+
import { Text } from "@xynogen/pix-pretty/tui";
|
|
20
17
|
import {
|
|
21
18
|
dotJoin,
|
|
22
19
|
frameToolResult,
|
|
@@ -29,6 +26,19 @@ import {
|
|
|
29
26
|
renderTitle,
|
|
30
27
|
} from "@xynogen/pix-pretty/utils";
|
|
31
28
|
import { type CollapseState, tickCollapse } from "@xynogen/pix-runtime/collapse";
|
|
29
|
+
import {
|
|
30
|
+
copyFile,
|
|
31
|
+
existsSync,
|
|
32
|
+
mkdir,
|
|
33
|
+
readdirSync,
|
|
34
|
+
readFile,
|
|
35
|
+
readFileSync,
|
|
36
|
+
realpath,
|
|
37
|
+
rename,
|
|
38
|
+
rm,
|
|
39
|
+
stat,
|
|
40
|
+
} from "@xynogen/pix-runtime/fs";
|
|
41
|
+
import { type ExtensionAPI, stripFrontmatter } from "@xynogen/pix-runtime/host";
|
|
32
42
|
import { ioTimeoutMs } from "@xynogen/pix-runtime/io";
|
|
33
43
|
import { once } from "@xynogen/pix-runtime/once";
|
|
34
44
|
import { agentDir, moduleFile } from "@xynogen/pix-runtime/paths";
|
|
@@ -107,7 +117,7 @@ function scanSkillsDir(root: string): SkillEntry[] {
|
|
|
107
117
|
* Scan sibling `@xynogen/*` packages that declare `pi.skills` in their manifest.
|
|
108
118
|
* pix-skills lives in the same scope dir (node_modules/@xynogen in an install,
|
|
109
119
|
* packages/ in dev), so other pix packages can own their own skills (e.g.
|
|
110
|
-
* pix-graph ships `graph`) and still be found by `read_skills`. Pi's host loads
|
|
120
|
+
* pix-graph ships `pix-graph`) and still be found by `read_skills`. Pi's host loads
|
|
111
121
|
* these via the manifest too; this keeps the agent-facing loader in sync.
|
|
112
122
|
*/
|
|
113
123
|
export function scanSiblingPackageSkills(scope?: string): SkillEntry[] {
|
package/src/picker.ts
CHANGED
|
@@ -6,14 +6,20 @@
|
|
|
6
6
|
* shows the loaded skill as a collapsible card, the same as `/skill:name`.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { CustomEditor, type ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
10
|
-
import { fuzzyFilter, matchesKey, mixColors, type TUI } from "@earendil-works/pi-tui";
|
|
11
9
|
import { chipTag, SKILL_TAG } from "@xynogen/pix-pretty/chips";
|
|
12
10
|
import { frameLines, modalWidth } from "@xynogen/pix-pretty/modal-frame";
|
|
13
11
|
import { fadeLine } from "@xynogen/pix-pretty/text";
|
|
14
12
|
import { showTransientMessage } from "@xynogen/pix-pretty/transient-error";
|
|
13
|
+
import {
|
|
14
|
+
CustomEditor,
|
|
15
|
+
fuzzyFilter,
|
|
16
|
+
matchesKey,
|
|
17
|
+
mixColors,
|
|
18
|
+
type TUI,
|
|
19
|
+
} from "@xynogen/pix-pretty/tui";
|
|
15
20
|
import type { ThemeLike } from "@xynogen/pix-pretty/types";
|
|
16
21
|
import { getErrorMessage } from "@xynogen/pix-pretty/utils";
|
|
22
|
+
import type { ExtensionAPI } from "@xynogen/pix-runtime/host";
|
|
17
23
|
|
|
18
24
|
const MAX_VISIBLE = 10;
|
|
19
25
|
const SEARCH_DELAY_MS = 300;
|
|
@@ -269,7 +275,7 @@ export function registerSkillPicker(
|
|
|
269
275
|
(tui, theme, _kb, done) => {
|
|
270
276
|
const picker = new SkillPicker({
|
|
271
277
|
local: listLocal(),
|
|
272
|
-
theme
|
|
278
|
+
theme,
|
|
273
279
|
search,
|
|
274
280
|
done,
|
|
275
281
|
onChange: () => tui.requestRender(),
|
package/src/remote.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
|
|
3
1
|
import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
2
|
+
import { existsSync, mkdir, readFile, rename, rm, writeFile } from "@xynogen/pix-runtime/fs";
|
|
4
3
|
import { cacheDir } from "@xynogen/pix-runtime/paths";
|
|
5
4
|
|
|
6
5
|
const SKILLS_SH = "https://skills.sh";
|