@caupulican/pi-adaptative 0.77.0 → 0.78.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/CHANGELOG.md +26 -3
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +7 -10
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +5 -7
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +6 -7
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +5 -2
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +17 -1
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +5 -6
- package/dist/core/tools/write.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +9 -1
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/settings.md +1 -1
- package/docs/terminal-setup.md +2 -0
- package/docs/tui.md +2 -2
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +53 -2
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +12 -12
- package/package.json +4 -4
package/docs/settings.md
CHANGED
|
@@ -46,7 +46,7 @@ Edit directly or use `/settings` for common options.
|
|
|
46
46
|
| `treeFilterMode` | string | `"default"` | Default filter for `/tree`: `"default"`, `"no-tools"`, `"user-only"`, `"labeled-only"`, `"all"` |
|
|
47
47
|
| `editorPaddingX` | number | `0` | Horizontal padding for input editor (0-3) |
|
|
48
48
|
| `autocompleteMaxVisible` | number | `5` | Max visible items in autocomplete dropdown (3-20) |
|
|
49
|
-
| `showHardwareCursor` | boolean | `false` | Show terminal cursor |
|
|
49
|
+
| `showHardwareCursor` | boolean | `false` | Show the terminal cursor while TUI positions it for IME support |
|
|
50
50
|
|
|
51
51
|
### Telemetry and update checks
|
|
52
52
|
|
package/docs/terminal-setup.md
CHANGED
|
@@ -49,6 +49,8 @@ config.enable_kitty_keyboard = true
|
|
|
49
49
|
return config
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
+
On WSL, WezTerm may require a visible hardware cursor for IME candidate window positioning. If CJK IME candidates do not follow the text cursor, set `PI_HARDWARE_CURSOR=1` before running pi or set `showHardwareCursor` to `true` in settings.
|
|
53
|
+
|
|
52
54
|
## VS Code (Integrated Terminal)
|
|
53
55
|
|
|
54
56
|
`keybindings.json` locations:
|
package/docs/tui.md
CHANGED
|
@@ -50,9 +50,9 @@ When a `Focusable` component has focus, TUI:
|
|
|
50
50
|
1. Sets `focused = true` on the component
|
|
51
51
|
2. Scans rendered output for `CURSOR_MARKER` (a zero-width APC escape sequence)
|
|
52
52
|
3. Positions the hardware terminal cursor at that location
|
|
53
|
-
4. Shows the hardware cursor
|
|
53
|
+
4. Shows the hardware cursor only when `showHardwareCursor` is enabled
|
|
54
54
|
|
|
55
|
-
This
|
|
55
|
+
The cursor remains hidden by default. This keeps the fake cursor rendering, while still positioning the hardware cursor for terminals that track IME candidate windows with hidden cursors. Some terminals require a visible hardware cursor for IME positioning; enable it with `showHardwareCursor`, `setShowHardwareCursor(true)`, or `PI_HARDWARE_CURSOR=1`. The `Editor` and `Input` built-in components already implement this interface.
|
|
56
56
|
|
|
57
57
|
### Container Components with Embedded Inputs
|
|
58
58
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-custom-provider",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.78.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.52.0"
|
|
12
12
|
}
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
type SimpleStreamOptions,
|
|
21
21
|
streamSimpleAnthropic,
|
|
22
22
|
streamSimpleOpenAIResponses,
|
|
23
|
+
type ThinkingLevelMap,
|
|
23
24
|
} from "@earendil-works/pi-ai";
|
|
24
25
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
25
26
|
|
|
@@ -49,6 +50,7 @@ interface GitLabModel {
|
|
|
49
50
|
backend: Backend;
|
|
50
51
|
baseUrl: string;
|
|
51
52
|
reasoning: boolean;
|
|
53
|
+
thinkingLevelMap?: ThinkingLevelMap;
|
|
52
54
|
input: ("text" | "image")[];
|
|
53
55
|
cost: { input: number; output: number; cacheRead: number; cacheWrite: number };
|
|
54
56
|
contextWindow: number;
|
|
@@ -57,12 +59,37 @@ interface GitLabModel {
|
|
|
57
59
|
|
|
58
60
|
export const MODELS: GitLabModel[] = [
|
|
59
61
|
// Anthropic
|
|
62
|
+
{
|
|
63
|
+
id: "claude-opus-4-8",
|
|
64
|
+
name: "Claude Opus 4.8",
|
|
65
|
+
backend: "anthropic",
|
|
66
|
+
baseUrl: ANTHROPIC_PROXY_URL,
|
|
67
|
+
reasoning: true,
|
|
68
|
+
thinkingLevelMap: { xhigh: "max" },
|
|
69
|
+
input: ["text", "image"],
|
|
70
|
+
cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 },
|
|
71
|
+
contextWindow: 1000000,
|
|
72
|
+
maxTokens: 128000,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "claude-sonnet-4-6",
|
|
76
|
+
name: "Claude Sonnet 4.6",
|
|
77
|
+
backend: "anthropic",
|
|
78
|
+
baseUrl: ANTHROPIC_PROXY_URL,
|
|
79
|
+
reasoning: true,
|
|
80
|
+
thinkingLevelMap: { xhigh: "max" },
|
|
81
|
+
input: ["text", "image"],
|
|
82
|
+
cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 },
|
|
83
|
+
contextWindow: 1000000,
|
|
84
|
+
maxTokens: 64000,
|
|
85
|
+
},
|
|
60
86
|
{
|
|
61
87
|
id: "claude-opus-4-5-20251101",
|
|
62
88
|
name: "Claude Opus 4.5",
|
|
63
89
|
backend: "anthropic",
|
|
64
90
|
baseUrl: ANTHROPIC_PROXY_URL,
|
|
65
91
|
reasoning: true,
|
|
92
|
+
thinkingLevelMap: { xhigh: "max" },
|
|
66
93
|
input: ["text", "image"],
|
|
67
94
|
cost: { input: 15, output: 75, cacheRead: 1.5, cacheWrite: 18.75 },
|
|
68
95
|
contextWindow: 200000,
|
|
@@ -74,6 +101,7 @@ export const MODELS: GitLabModel[] = [
|
|
|
74
101
|
backend: "anthropic",
|
|
75
102
|
baseUrl: ANTHROPIC_PROXY_URL,
|
|
76
103
|
reasoning: true,
|
|
104
|
+
thinkingLevelMap: { xhigh: "max" },
|
|
77
105
|
input: ["text", "image"],
|
|
78
106
|
cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 },
|
|
79
107
|
contextWindow: 200000,
|
|
@@ -85,12 +113,24 @@ export const MODELS: GitLabModel[] = [
|
|
|
85
113
|
backend: "anthropic",
|
|
86
114
|
baseUrl: ANTHROPIC_PROXY_URL,
|
|
87
115
|
reasoning: true,
|
|
116
|
+
thinkingLevelMap: { xhigh: "max" },
|
|
88
117
|
input: ["text", "image"],
|
|
89
118
|
cost: { input: 1, output: 5, cacheRead: 0.1, cacheWrite: 1.25 },
|
|
90
119
|
contextWindow: 200000,
|
|
91
120
|
maxTokens: 8192,
|
|
92
121
|
},
|
|
93
122
|
// OpenAI (all use Responses API)
|
|
123
|
+
{
|
|
124
|
+
id: "gpt-5.5-2026-04-23",
|
|
125
|
+
name: "GPT-5.5",
|
|
126
|
+
backend: "openai",
|
|
127
|
+
baseUrl: OPENAI_PROXY_URL,
|
|
128
|
+
reasoning: true,
|
|
129
|
+
input: ["text", "image"],
|
|
130
|
+
cost: { input: 5, output: 30, cacheRead: 0.5, cacheWrite: 0 },
|
|
131
|
+
contextWindow: 272000,
|
|
132
|
+
maxTokens: 128000,
|
|
133
|
+
},
|
|
94
134
|
{
|
|
95
135
|
id: "gpt-5.1-2025-11-13",
|
|
96
136
|
name: "GPT-5.1",
|
|
@@ -285,7 +325,17 @@ export function streamGitLabDuo(
|
|
|
285
325
|
|
|
286
326
|
const innerStream =
|
|
287
327
|
cfg.backend === "anthropic"
|
|
288
|
-
? streamSimpleAnthropic(
|
|
328
|
+
? streamSimpleAnthropic(
|
|
329
|
+
{
|
|
330
|
+
...(modelWithBaseUrl as Model<"anthropic-messages">),
|
|
331
|
+
compat: {
|
|
332
|
+
...(modelWithBaseUrl as Model<"anthropic-messages">).compat,
|
|
333
|
+
forceAdaptiveThinking: true,
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
context,
|
|
337
|
+
streamOptions,
|
|
338
|
+
)
|
|
289
339
|
: streamSimpleOpenAIResponses(modelWithBaseUrl as Model<"openai-responses">, context, streamOptions);
|
|
290
340
|
|
|
291
341
|
for await (const event of innerStream) stream.push(event);
|
|
@@ -329,10 +379,11 @@ export default function (pi: ExtensionAPI) {
|
|
|
329
379
|
baseUrl: AI_GATEWAY_URL,
|
|
330
380
|
apiKey: "$GITLAB_TOKEN",
|
|
331
381
|
api: "gitlab-duo-api",
|
|
332
|
-
models: MODELS.map(({ id, name, reasoning, input, cost, contextWindow, maxTokens }) => ({
|
|
382
|
+
models: MODELS.map(({ id, name, reasoning, thinkingLevelMap, input, cost, contextWindow, maxTokens }) => ({
|
|
333
383
|
id,
|
|
334
384
|
name,
|
|
335
385
|
reasoning,
|
|
386
|
+
thinkingLevelMap,
|
|
336
387
|
input,
|
|
337
388
|
cost,
|
|
338
389
|
contextWindow,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-sandbox",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-sandbox",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.8.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sandbox-runtime": "^0.0.26"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-with-deps",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-with-deps",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.78.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ms": "^2.1.3"
|
|
12
12
|
},
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caupulican/pi-adaptative",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@caupulican/pi-adaptative",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.78.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@earendil-works/pi-agent-core": "^0.
|
|
13
|
-
"@earendil-works/pi-ai": "^0.
|
|
14
|
-
"@earendil-works/pi-tui": "^0.
|
|
12
|
+
"@earendil-works/pi-agent-core": "^0.78.0",
|
|
13
|
+
"@earendil-works/pi-ai": "^0.78.0",
|
|
14
|
+
"@earendil-works/pi-tui": "^0.78.0",
|
|
15
15
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
16
16
|
"chalk": "5.6.2",
|
|
17
17
|
"cross-spawn": "7.0.6",
|
|
@@ -474,11 +474,11 @@
|
|
|
474
474
|
}
|
|
475
475
|
},
|
|
476
476
|
"node_modules/@earendil-works/pi-agent-core": {
|
|
477
|
-
"version": "0.
|
|
478
|
-
"resolved": "https://registry.npmjs.org/@earendil-works/pi-agent-core/-/pi-agent-core-0.
|
|
477
|
+
"version": "0.78.0",
|
|
478
|
+
"resolved": "https://registry.npmjs.org/@earendil-works/pi-agent-core/-/pi-agent-core-0.78.0.tgz",
|
|
479
479
|
"license": "MIT",
|
|
480
480
|
"dependencies": {
|
|
481
|
-
"@earendil-works/pi-ai": "^0.
|
|
481
|
+
"@earendil-works/pi-ai": "^0.78.0",
|
|
482
482
|
"ignore": "7.0.5",
|
|
483
483
|
"typebox": "1.1.38",
|
|
484
484
|
"yaml": "2.9.0"
|
|
@@ -488,8 +488,8 @@
|
|
|
488
488
|
}
|
|
489
489
|
},
|
|
490
490
|
"node_modules/@earendil-works/pi-ai": {
|
|
491
|
-
"version": "0.
|
|
492
|
-
"resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-0.
|
|
491
|
+
"version": "0.78.0",
|
|
492
|
+
"resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-0.78.0.tgz",
|
|
493
493
|
"license": "MIT",
|
|
494
494
|
"dependencies": {
|
|
495
495
|
"@anthropic-ai/sdk": "0.91.1",
|
|
@@ -511,8 +511,8 @@
|
|
|
511
511
|
}
|
|
512
512
|
},
|
|
513
513
|
"node_modules/@earendil-works/pi-tui": {
|
|
514
|
-
"version": "0.
|
|
515
|
-
"resolved": "https://registry.npmjs.org/@earendil-works/pi-tui/-/pi-tui-0.
|
|
514
|
+
"version": "0.78.0",
|
|
515
|
+
"resolved": "https://registry.npmjs.org/@earendil-works/pi-tui/-/pi-tui-0.78.0.tgz",
|
|
516
516
|
"license": "MIT",
|
|
517
517
|
"dependencies": {
|
|
518
518
|
"get-east-asian-width": "1.6.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caupulican/pi-adaptative",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.0",
|
|
4
4
|
"description": "Adaptive fork of Pi coding agent for self-evolving agent harness experiments",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"piConfig": {
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"prepublishOnly": "npm run clean && npm run build && npm run shrinkwrap"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@earendil-works/pi-agent-core": "^0.
|
|
45
|
-
"@earendil-works/pi-ai": "^0.
|
|
46
|
-
"@earendil-works/pi-tui": "^0.
|
|
44
|
+
"@earendil-works/pi-agent-core": "^0.78.0",
|
|
45
|
+
"@earendil-works/pi-ai": "^0.78.0",
|
|
46
|
+
"@earendil-works/pi-tui": "^0.78.0",
|
|
47
47
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
48
48
|
"chalk": "5.6.2",
|
|
49
49
|
"cross-spawn": "7.0.6",
|