@xynogen/pix-skills 0.10.10 → 0.10.12

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xynogen/pix-skills",
3
- "version": "0.10.10",
3
+ "version": "0.10.12",
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.9",
51
- "@xynogen/pix-pretty": "^2.0.0",
52
- "@xynogen/pix-runtime": "^0.19.0"
49
+ "@xynogen/pix-gate": "^0.4.12",
50
+ "@xynogen/pix-pretty": "^3.0.0",
51
+ "@xynogen/pix-runtime": "^0.22.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 (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.
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 `lsp_diagnostics` for language-server diagnostics.
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 lsp_diagnostics. Use when LSP diagnostics or navigation are missing, unavailable, or need setup for a language.
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 `lsp_diagnostics` on one source file.
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** → `lsp_navigation` with `definition`, `references`, `implementation`, `callHierarchy`, or `hover`. LSP results are exact; prefer them over grep for symbols.
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,24 +11,32 @@
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
- import { type FadeTheme, fadeTextRow } from "@xynogen/pix-pretty/text";
15
+ import { frameToolResult, moreLines } from "@xynogen/pix-pretty/frame";
20
16
  import {
21
17
  dotJoin,
22
- frameToolResult,
23
- getErrorMessage,
24
- getTextContent,
25
18
  hideCollapsedToolCall,
26
- humanSize,
27
- moreLines,
28
19
  renderRow,
29
20
  renderTitle,
30
- } from "@xynogen/pix-pretty/utils";
21
+ } from "@xynogen/pix-pretty/render-row";
22
+ import { getTextContent } from "@xynogen/pix-pretty/result";
23
+ import { type FadeTheme, fadeTextRow, humanSize } from "@xynogen/pix-pretty/text";
24
+ import { Text } from "@xynogen/pix-pretty/tui";
31
25
  import { type CollapseState, tickCollapse } from "@xynogen/pix-runtime/collapse";
26
+ import { getErrorMessage } from "@xynogen/pix-runtime/errors";
27
+ import {
28
+ copyFile,
29
+ existsSync,
30
+ mkdir,
31
+ readdirSync,
32
+ readFile,
33
+ readFileSync,
34
+ realpath,
35
+ rename,
36
+ rm,
37
+ stat,
38
+ } from "@xynogen/pix-runtime/fs";
39
+ import { type ExtensionAPI, stripFrontmatter } from "@xynogen/pix-runtime/host";
32
40
  import { ioTimeoutMs } from "@xynogen/pix-runtime/io";
33
41
  import { once } from "@xynogen/pix-runtime/once";
34
42
  import { agentDir, moduleFile } from "@xynogen/pix-runtime/paths";
@@ -107,7 +115,7 @@ function scanSkillsDir(root: string): SkillEntry[] {
107
115
  * Scan sibling `@xynogen/*` packages that declare `pi.skills` in their manifest.
108
116
  * pix-skills lives in the same scope dir (node_modules/@xynogen in an install,
109
117
  * 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
118
+ * pix-graph ships `pix-graph`) and still be found by `read_skills`. Pi's host loads
111
119
  * these via the manifest too; this keeps the agent-facing loader in sync.
112
120
  */
113
121
  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
- import { getErrorMessage } from "@xynogen/pix-pretty/utils";
21
+ import { getErrorMessage } from "@xynogen/pix-runtime/errors";
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: theme as never,
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";
package/src/run.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /** Bounded, shell-free command execution for directive interpolation. */
2
- import { getErrorMessage } from "@xynogen/pix-pretty/utils";
3
- import { runTool } from "@xynogen/pix-runtime/exec";
2
+ import { getErrorMessage } from "@xynogen/pix-runtime/errors";
3
+ import { runBinary } from "@xynogen/pix-runtime/exec";
4
4
  import { truncateStringToBytes } from "@xynogen/pix-runtime/utf8";
5
5
 
6
6
  export interface RunOptions {
@@ -15,7 +15,7 @@ export async function runArgv(argv: string[], opts: RunOptions): Promise<string>
15
15
  if (!argv.length) return "(empty command)";
16
16
  const maxBytes = opts.maxBytes ?? 16_384;
17
17
  try {
18
- const result = await runTool(argv[0]!, argv.slice(1), {
18
+ const result = await runBinary(argv[0]!, argv.slice(1), {
19
19
  cwd: opts.cwd,
20
20
  signal: opts.signal,
21
21
  timeoutMs: opts.timeoutMs ?? 10_000,