pi-incise 0.3.1 → 0.4.0

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/README.md CHANGED
@@ -41,6 +41,8 @@ Set `INCISE_PROFILE=safe-small` only to reproduce the earlier experimental small
41
41
 
42
42
  Set `INCISE_PROFILE=minicpm-list` only to reproduce the earlier MiniCPM-specific list-addition pipeline. It supports list additions only; the general MiniCPM recommendation is now `auto`.
43
43
 
44
+ The version-matched native binary also contains the confirmed `incise table-delete` CLI operation for automation and direct shell use. It is not an action in the Pi `table_edit` schema: three preregistered model-facing candidates missed the required confirmation-recovery gate, so the measured standard and fallback surfaces remain unchanged.
45
+
44
46
  ## Measured results
45
47
 
46
48
  The current MiniCPM5 2B `auto` profile completed **480/480 full-composition trials (100%) with zero harmful outcomes**. Tables were 60/60, lists 100/100, sections 150/150, frontmatter 110/110, and table reads 60/60. All **470/470 routed trials** passed exact tool-surface and host-resolved-argument audits; all 10 standard fallbacks exposed the unchanged eight-tool surface. The recorded configuration used the official Q8_0 checkpoint through llama.cpp with thinking off, a 65,536-token context, `maxTokens: 8192`, temperature 0.7, and top-p 0.95.
@@ -1,3 +1,4 @@
1
+ import { homedir } from "node:os";
1
2
  import { resolve } from "node:path";
2
3
 
3
4
  export type ToolArguments = Record<string, unknown>;
@@ -93,12 +94,18 @@ export function stripPiPathPrefix(path: string): string {
93
94
  return path.startsWith("@") ? path.slice(1) : path;
94
95
  }
95
96
 
97
+ export function expandHomePath(path: string, home: string = homedir()): string {
98
+ if (path === "~") return home;
99
+ if (path.startsWith("~/")) return resolve(home, path.slice(2));
100
+ return path;
101
+ }
102
+
96
103
  export function resolveToolPath(args: ToolArguments, cwd: string): { path: string; args: ToolArguments } {
97
104
  const raw = args.path ?? args.file;
98
105
  if (typeof raw !== "string" || !raw) {
99
106
  throw new Error("incise needs `path`: the markdown file to read or edit.");
100
107
  }
101
- const path = resolve(cwd, stripPiPathPrefix(raw));
108
+ const path = resolve(cwd, expandHomePath(stripPiPathPrefix(raw)));
102
109
  return { path, args: { ...args, path } };
103
110
  }
104
111
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-incise",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "Semantic, byte-preserving Markdown editing tools for Pi and AI agents",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -41,15 +41,15 @@
41
41
  "typebox": "*"
42
42
  },
43
43
  "devDependencies": {
44
- "@earendil-works/pi-coding-agent": "^0.85.1",
44
+ "@earendil-works/pi-coding-agent": "^0.99.1",
45
45
  "@types/node": "^22.19.19",
46
46
  "typescript": "^5.9.3"
47
47
  },
48
48
  "optionalDependencies": {
49
- "@pdalinis/pi-incise-darwin-arm64": "0.3.1",
50
- "@pdalinis/pi-incise-darwin-x64": "0.3.1",
51
- "@pdalinis/pi-incise-linux-arm64-gnu": "0.3.1",
52
- "@pdalinis/pi-incise-linux-x64-gnu": "0.3.1"
49
+ "@pdalinis/pi-incise-darwin-arm64": "0.4.0",
50
+ "@pdalinis/pi-incise-darwin-x64": "0.4.0",
51
+ "@pdalinis/pi-incise-linux-arm64-gnu": "0.4.0",
52
+ "@pdalinis/pi-incise-linux-x64-gnu": "0.4.0"
53
53
  },
54
54
  "scripts": {
55
55
  "test": "node --test --experimental-strip-types test/*.test.ts",