pi-ghost-autocomplete 0.5.1 → 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.de.md +164 -0
- package/README.es.md +66 -0
- package/README.fr.md +79 -0
- package/README.it.md +66 -0
- package/README.ja.md +65 -0
- package/README.md +53 -8
- package/README.pt-BR.md +66 -0
- package/README.ru.md +66 -0
- package/README.zh-CN.md +66 -0
- package/dist/bench-cli.js +1 -1
- package/dist/bench.d.ts +37 -0
- package/dist/bench.js +1 -1
- package/dist/command-registry.d.ts +45 -0
- package/dist/config.d.ts +1 -1
- package/dist/eval-dataset.d.ts +8 -0
- package/dist/ghost-editor.d.ts +63 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.js +1 -1
- package/dist/intent.d.ts +58 -3
- package/dist/metrics.d.ts +38 -1
- package/dist/profile-store.d.ts +8 -2
- package/dist/profile.d.ts +9 -1
- package/dist/providers/openai-compat-chat-provider.d.ts +6 -1
- package/dist/providers/openai-compat-provider.d.ts +13 -3
- package/dist/providers/router.d.ts +48 -15
- package/dist/providers/types.d.ts +37 -1
- package/dist/replay-cli.js +1 -1
- package/dist/session-harvest.d.ts +35 -0
- package/package.json +14 -14
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPDX-License-Identifier: SSPL-1.0
|
|
3
|
+
* SPDX-FileCopyrightText: 2025 Alessandro Pungitore <alessandro@pungitore.ch>
|
|
4
|
+
*/
|
|
5
|
+
import { type SessionEntry } from "@earendil-works/pi-coding-agent";
|
|
6
|
+
import { type EvalExample } from "./eval-dataset.js";
|
|
7
|
+
export declare const HARVEST_PROVIDER_NAME = "session-harvest";
|
|
8
|
+
export declare const HARVEST_PROVIDER_FINGERPRINT = "harvest:rpc-get-entries";
|
|
9
|
+
/** Messages of preceding conversation rendered into each example's context. */
|
|
10
|
+
export declare const HARVEST_CONTEXT_MESSAGES = 4;
|
|
11
|
+
/** Context tail cap — bounds per-example JSONL size for long sessions. */
|
|
12
|
+
export declare const HARVEST_CONTEXT_MAX_CHARS = 4000;
|
|
13
|
+
export interface HarvestOptions {
|
|
14
|
+
maxContextMessages?: number;
|
|
15
|
+
maxContextChars?: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Extract eval examples from a session branch. Walks message entries in
|
|
19
|
+
* order; each non-empty line of every *user* message becomes a committed
|
|
20
|
+
* sample, contextualized by up to `maxContextMessages` preceding
|
|
21
|
+
* user/assistant messages ("role: text", newline-joined, tail-capped at
|
|
22
|
+
* `maxContextChars`). Example timestamps come from the entry itself, so
|
|
23
|
+
* harvested data keeps the session's real chronology.
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildExamplesFromSessionEntries(entries: readonly SessionEntry[], opts?: HarvestOptions): EvalExample[];
|
|
26
|
+
/**
|
|
27
|
+
* Read a session's branch entries through pi's RPC mode. Spawns a pi
|
|
28
|
+
* process (requires `@earendil-works/pi-coding-agent` resolvable — same
|
|
29
|
+
* peer requirement as the rest of the CLI tooling), switches to the
|
|
30
|
+
* session file, and returns the `get_entries` result. The spawned agent
|
|
31
|
+
* never receives a prompt; it only serves inspection commands.
|
|
32
|
+
*/
|
|
33
|
+
export declare function fetchSessionEntriesViaRpc(sessionPath: string, opts?: {
|
|
34
|
+
cwd?: string;
|
|
35
|
+
}): Promise<SessionEntry[]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-ghost-autocomplete",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Inline ghost-text autocomplete extension for the Pi coding agent (pi.dev). Cloud and local LLM providers, zero-flicker rendering, no popup interference.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"prepublishOnly": "node -e \"if(!process.env.CI)throw new Error('publish via release.yml CI only (manual npm publish skips native binaries & optionalDependencies)')\""
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
|
-
"node": ">=
|
|
38
|
+
"node": ">=22.19.0"
|
|
39
39
|
},
|
|
40
40
|
"pi": {
|
|
41
41
|
"extensions": [
|
|
@@ -62,16 +62,16 @@
|
|
|
62
62
|
"groq"
|
|
63
63
|
],
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@earendil-works/pi-agent-core": "^0.
|
|
66
|
-
"@earendil-works/pi-ai": "^0.
|
|
67
|
-
"@earendil-works/pi-coding-agent": "^0.
|
|
68
|
-
"@earendil-works/pi-tui": "^0.
|
|
65
|
+
"@earendil-works/pi-agent-core": "^0.80.0",
|
|
66
|
+
"@earendil-works/pi-ai": "^0.80.0",
|
|
67
|
+
"@earendil-works/pi-coding-agent": "^0.80.0",
|
|
68
|
+
"@earendil-works/pi-tui": "^0.80.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@earendil-works/pi-agent-core": "^0.
|
|
72
|
-
"@earendil-works/pi-ai": "^0.
|
|
73
|
-
"@earendil-works/pi-coding-agent": "^0.
|
|
74
|
-
"@earendil-works/pi-tui": "^0.
|
|
71
|
+
"@earendil-works/pi-agent-core": "^0.80.3",
|
|
72
|
+
"@earendil-works/pi-ai": "^0.80.3",
|
|
73
|
+
"@earendil-works/pi-coding-agent": "^0.80.3",
|
|
74
|
+
"@earendil-works/pi-tui": "^0.80.3",
|
|
75
75
|
"@types/node": "^20.11.0",
|
|
76
76
|
"esbuild": "^0.28.1",
|
|
77
77
|
"javascript-obfuscator": "^5.4.3",
|
|
@@ -83,9 +83,9 @@
|
|
|
83
83
|
"strip-ansi": "^7.2.0"
|
|
84
84
|
},
|
|
85
85
|
"optionalDependencies": {
|
|
86
|
-
"pi-ghost-autocomplete-darwin-arm64": "0.
|
|
87
|
-
"pi-ghost-autocomplete-linux-arm64-gnu": "0.
|
|
88
|
-
"pi-ghost-autocomplete-linux-x64-gnu": "0.
|
|
89
|
-
"pi-ghost-autocomplete-win32-x64-msvc": "0.
|
|
86
|
+
"pi-ghost-autocomplete-darwin-arm64": "0.7.0",
|
|
87
|
+
"pi-ghost-autocomplete-linux-arm64-gnu": "0.7.0",
|
|
88
|
+
"pi-ghost-autocomplete-linux-x64-gnu": "0.7.0",
|
|
89
|
+
"pi-ghost-autocomplete-win32-x64-msvc": "0.7.0"
|
|
90
90
|
}
|
|
91
91
|
}
|