pi-incise 0.6.0 → 0.7.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 +20 -0
- package/extension/index.ts +9 -1
- package/extension/safe-routed.ts +38 -2
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -34,6 +34,26 @@ LFM3-specific support was abandoned on 25 November 2026 after the evaluation fai
|
|
|
34
34
|
|
|
35
35
|
For Inkling 2 Mini, the measured local UD-Q3_K_XL setup used Pi SDK 1.0.4, a 32,768-token context, `maxTokens: 2048`, temperature 0.6, top-p 0.95, top-k 0, min-p 0, repeat penalty 1, and presence penalty 0. Send native `reasoning_effort: "none"`; the model still emitted reasoning in this runtime. Select the local model separately; the plugin does not change decoding settings. Inkling uses Pi’s structured prompt options to keep the prompt’s tool list aligned with the active route, and receives the existing hash-bound inspection for checkbox edits.
|
|
36
36
|
|
|
37
|
+
## Experimental SenseNova Loop 9B Q8
|
|
38
|
+
|
|
39
|
+
Incise 0.7.0 adds an experimental Pi 1.7.0 path for the exact local model ID `sensenova-loop-9b-q8`. The broader qualification did not pass: eight of ten attempted tasks completed correctly, then the run stopped after two read loops left their files unchanged; 38 of the planned 48 tasks remain untested. Explicitly select `INCISE_PROFILE=safe-routed` to use structured framing and completed-operation context. The `auto` profile retains standard tools for this unqualified identity; other model identities retain their existing prompt paths.
|
|
40
|
+
|
|
41
|
+
Install with `pi install npm:pi-incise@0.7.0`. Merge the [provider example](../../bench/sensenova_loop_9b_q8_pi_models.example.json) into Pi's `models.json` without replacing other providers. It targets `http://127.0.0.1:8081/v1` and records context, output and sampling settings. This recipe explicitly sends `chat_template_kwargs.enable_thinking=false`; the recorded server template does not support native `reasoning_effort`.
|
|
42
|
+
|
|
43
|
+
For an isolated experiment after installation and provider setup:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
INCISE_PROFILE=safe-routed pi -e npm:pi-incise@0.7.0 \
|
|
47
|
+
--provider sensenova-local --model sensenova-loop-9b-q8 \
|
|
48
|
+
--tools 'read,table_*,list_*,section_*,frontmatter_*,md_*' \
|
|
49
|
+
--no-extensions --no-mcp --no-skills --no-context-files \
|
|
50
|
+
--no-prompt-templates --no-session --thinking off
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Keep the real built-in reader available and all writes through Incise. The actual CLI allowlist was checked against a fake provider with a byte-correct edit and real post-edit read; this is packaging evidence, not model accuracy. Live SDK tests additionally restrict reads to the current fixture and allow six assistant turns. The command above uses Pi's ordinary reader; it does not install the benchmark-only read restriction or turn cap. Unrestricted interactive use remains unqualified.
|
|
54
|
+
|
|
55
|
+
The selected feasibility screen completed four cases, one per editing family, with correct documents, resolved replies and no tool errors. Median latency was 99.43 seconds, range 38.94–192.32. Its list reply finished on turn six with the worker cap flag retained. Earlier configurations produced correct edits followed by unexecuted tool markup. The [experiment report](../../bench/SENSENOVA_LOOP_9B_Q8_20261130.md) retains these failures and records the separate full-population release gate at fresh seed 3. Automatic-family, multi-seed and Hermes support remain unqualified. Run `/incise-doctor` to inspect the effective profile and binary.
|
|
56
|
+
|
|
37
57
|
## Tools
|
|
38
58
|
|
|
39
59
|
The default `standard` profile registers `table_edit`, `list_edit`, `section_edit`, `frontmatter_edit`, `table_get`, `md_tables`, `md_lists`, and `md_outline`. Inspect document structure with the relevant read tool before editing, and follow the remedy in any Incise refusal. The former `measured` profile name remains an alias for `standard`.
|
package/extension/index.ts
CHANGED
|
@@ -209,7 +209,15 @@ export default async function inciseExtension(pi: ExtensionAPI): Promise<void> {
|
|
|
209
209
|
installSafeRoutedProfile(pi, binary, {
|
|
210
210
|
standardTools: schemas.map((schema) => schema.name),
|
|
211
211
|
useStructuredPrompt(ctx) {
|
|
212
|
-
return modelFamily(ctx.model, familyOverride) === "inkling"
|
|
212
|
+
return modelFamily(ctx.model, familyOverride) === "inkling" ||
|
|
213
|
+
ctx.model?.id === "sensenova-loop-9b-q8";
|
|
214
|
+
},
|
|
215
|
+
completionPrompt(ctx) {
|
|
216
|
+
if (ctx.model?.id !== "sensenova-loop-9b-q8") return undefined;
|
|
217
|
+
return "The bound Incise operation has completed successfully. " +
|
|
218
|
+
"Report the completed change or requested read result. " +
|
|
219
|
+
"Do not repeat the completed operation or invent additional work. " +
|
|
220
|
+
"Follow any remaining user-requested steps using only tools that are currently available.";
|
|
213
221
|
},
|
|
214
222
|
isEnabled(ctx) {
|
|
215
223
|
if (!decision && ctx.model) {
|
package/extension/safe-routed.ts
CHANGED
|
@@ -153,6 +153,7 @@ interface RouteSpec {
|
|
|
153
153
|
interface RoutedState {
|
|
154
154
|
spec: RouteSpec;
|
|
155
155
|
completed: boolean;
|
|
156
|
+
completion?: { active: string; finished: string };
|
|
156
157
|
}
|
|
157
158
|
|
|
158
159
|
export function sectionIntent(prompt: string): { kind: "section-rename"; target: string; heading: string } |
|
|
@@ -1497,6 +1498,7 @@ export interface SafeRoutedOptions {
|
|
|
1497
1498
|
standardTools: string[];
|
|
1498
1499
|
isEnabled(ctx: { model?: { id?: string; name?: string; provider?: string } }): boolean;
|
|
1499
1500
|
useStructuredPrompt?(ctx: { model?: { id?: string; name?: string; provider?: string } }): boolean;
|
|
1501
|
+
completionPrompt?(ctx: { model?: { id?: string; name?: string; provider?: string } }): string | undefined;
|
|
1500
1502
|
onRoute?(kind: SafeRouteKind | "standard"): void;
|
|
1501
1503
|
}
|
|
1502
1504
|
|
|
@@ -1517,6 +1519,34 @@ export function installSafeRoutedProfile(
|
|
|
1517
1519
|
]);
|
|
1518
1520
|
const ownedNames = new Set([...options.standardTools, ...routedNames]);
|
|
1519
1521
|
let state: RoutedState | undefined;
|
|
1522
|
+
let completionHookInstalled = false;
|
|
1523
|
+
|
|
1524
|
+
const installCompletionHook = (): void => {
|
|
1525
|
+
if (completionHookInstalled) return;
|
|
1526
|
+
completionHookInstalled = true;
|
|
1527
|
+
pi.on("context_with_system", (event) => {
|
|
1528
|
+
const completion = state?.completed ? state.completion : undefined;
|
|
1529
|
+
if (!completion) return;
|
|
1530
|
+
let changed = false;
|
|
1531
|
+
const messages = event.messages.map((message) => {
|
|
1532
|
+
if (message.role !== "system") return message;
|
|
1533
|
+
const section = message.sections?.incise_route;
|
|
1534
|
+
if (typeof section !== "string") return message;
|
|
1535
|
+
const index = section.lastIndexOf(completion.active);
|
|
1536
|
+
if (index < 0) return message;
|
|
1537
|
+
changed = true;
|
|
1538
|
+
return {
|
|
1539
|
+
...message,
|
|
1540
|
+
sections: {
|
|
1541
|
+
...message.sections,
|
|
1542
|
+
incise_route: section.slice(0, index) + completion.finished +
|
|
1543
|
+
section.slice(index + completion.active.length),
|
|
1544
|
+
},
|
|
1545
|
+
};
|
|
1546
|
+
});
|
|
1547
|
+
return changed ? { messages } : undefined;
|
|
1548
|
+
});
|
|
1549
|
+
};
|
|
1520
1550
|
|
|
1521
1551
|
const activate = (names: string[]): void => {
|
|
1522
1552
|
const foreign = pi.getActiveTools().filter((name) => !ownedNames.has(name));
|
|
@@ -1532,6 +1562,7 @@ export function installSafeRoutedProfile(
|
|
|
1532
1562
|
async execute(_toolCallId, params, signal) {
|
|
1533
1563
|
if (!state || state.spec !== spec) throw new Error("No matching routed Incise request is active.");
|
|
1534
1564
|
if (state.completed) throw new Error("The requested Incise operation already succeeded.");
|
|
1565
|
+
const binding = state;
|
|
1535
1566
|
const args = spec.arguments(params as Record<string, unknown>);
|
|
1536
1567
|
const followups = spec.followups?.(params as Record<string, unknown>) ?? [];
|
|
1537
1568
|
const operations = [{ operation: spec.operation, arguments: args }, ...followups];
|
|
@@ -1561,8 +1592,8 @@ export function installSafeRoutedProfile(
|
|
|
1561
1592
|
? await withFileMutationQueue(spec.path, invoke)
|
|
1562
1593
|
: await invoke();
|
|
1563
1594
|
if (result.code !== 0 || result.payload.ok === false) throw processError(result);
|
|
1564
|
-
|
|
1565
|
-
activate([]);
|
|
1595
|
+
binding.completed = true;
|
|
1596
|
+
if (state === binding) activate([]);
|
|
1566
1597
|
return toolResult(
|
|
1567
1598
|
spec.write ? String(result.payload.description ?? "") : String(result.payload.text ?? ""),
|
|
1568
1599
|
{
|
|
@@ -1616,6 +1647,11 @@ export function installSafeRoutedProfile(
|
|
|
1616
1647
|
const previous = event.systemPromptOptions.sections.incise_route;
|
|
1617
1648
|
event.systemPromptOptions.sections.incise_route = previous
|
|
1618
1649
|
? `${previous}\n\n${routePrompt}` : routePrompt;
|
|
1650
|
+
const completion = options.completionPrompt?.(ctx);
|
|
1651
|
+
if (completion) {
|
|
1652
|
+
state.completion = { active: routePrompt, finished: completion };
|
|
1653
|
+
installCompletionHook();
|
|
1654
|
+
}
|
|
1619
1655
|
return;
|
|
1620
1656
|
}
|
|
1621
1657
|
return { systemPrompt: `${event.systemPrompt}\n\n${routePrompt}` };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-incise",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Structured Markdown editing for Pi, with
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"description": "Structured Markdown editing for Pi, with qualified local-model profiles and experimental SenseNova Loop 9B integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Peter Dalinis",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"obsidian",
|
|
23
23
|
"knowledge-base",
|
|
24
24
|
"inkling",
|
|
25
|
-
"local-llm"
|
|
25
|
+
"local-llm",
|
|
26
|
+
"sensenova"
|
|
26
27
|
],
|
|
27
28
|
"engines": {
|
|
28
29
|
"node": ">=22.19.0"
|
|
@@ -52,10 +53,10 @@
|
|
|
52
53
|
"typescript": "^5.9.3"
|
|
53
54
|
},
|
|
54
55
|
"optionalDependencies": {
|
|
55
|
-
"@pdalinis/pi-incise-darwin-arm64": "0.
|
|
56
|
-
"@pdalinis/pi-incise-darwin-x64": "0.
|
|
57
|
-
"@pdalinis/pi-incise-linux-arm64-gnu": "0.
|
|
58
|
-
"@pdalinis/pi-incise-linux-x64-gnu": "0.
|
|
56
|
+
"@pdalinis/pi-incise-darwin-arm64": "0.7.0",
|
|
57
|
+
"@pdalinis/pi-incise-darwin-x64": "0.7.0",
|
|
58
|
+
"@pdalinis/pi-incise-linux-arm64-gnu": "0.7.0",
|
|
59
|
+
"@pdalinis/pi-incise-linux-x64-gnu": "0.7.0"
|
|
59
60
|
},
|
|
60
61
|
"scripts": {
|
|
61
62
|
"test": "node --test --experimental-strip-types test/*.test.ts",
|