@caupulican/pi-adaptative 0.78.4 → 0.80.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 +17 -0
- package/dist/core/agent-session.d.ts +1 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +34 -2
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/resource-loader.d.ts +1 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +26 -1
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/settings-manager.d.ts +14 -2
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +32 -2
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +2 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +16 -2
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +441 -1
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +36 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +731 -2
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/settings.md +33 -5
- package/docs/usage.md +1 -1
- 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/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 +15 -18
- package/package.json +4 -4
package/docs/settings.md
CHANGED
|
@@ -75,6 +75,8 @@ Set `PI_SKIP_VERSION_CHECK=1` to disable the Pi version update check. Use `--off
|
|
|
75
75
|
| `selfModification.enabled` | boolean | `false` | Allow the agent to modify Pi's own source/harness when explicitly tasked |
|
|
76
76
|
| `selfModification.sourcePath` | string | - | Path to the `pi-adaptative` source checkout the agent must use for self-modification |
|
|
77
77
|
|
|
78
|
+
Use `/settings` → **Self modification** to configure this interactively. The submenu lets you choose whether to save globally or to the current project's `.pi/settings.json`. Pi warns when the path does not look like a `pi-adaptative` checkout, and a new session or `/reload` is recommended after changing guardrail settings.
|
|
79
|
+
|
|
78
80
|
When disabled, the system prompt tells the agent not to edit Pi core, the installed runtime, or harness source for self-evolution. To permit self-modification, enable the setting and provide the source checkout path:
|
|
79
81
|
|
|
80
82
|
```json
|
|
@@ -86,20 +88,43 @@ When disabled, the system prompt tells the agent not to edit Pi core, the instal
|
|
|
86
88
|
}
|
|
87
89
|
```
|
|
88
90
|
|
|
89
|
-
The agent is instructed to edit only that source checkout, preserve unrelated changes, validate before reporting success
|
|
91
|
+
The agent is instructed to edit only that source checkout, preserve unrelated changes, and validate before reporting success. Settings changes remain explicit-approval gated unless `autonomy.mode` is `full` and the change is limited to autonomy/Auto Learn tuning; publishing, pushing, tagging, and releasing always require explicit foreground approval.
|
|
92
|
+
|
|
93
|
+
### Autonomy
|
|
94
|
+
|
|
95
|
+
| Setting | Type | Default | Description |
|
|
96
|
+
|---------|------|---------|-------------|
|
|
97
|
+
| `autonomy.mode` | string | `"off"` | Low-config autonomy preset: `"off"`, `"safe"`, `"balanced"`, or `"full"` |
|
|
98
|
+
|
|
99
|
+
Use `/settings` → **Autonomy** or `/autonomy off|safe|balanced|full` to choose one preset instead of tuning all Auto Learn knobs. `full` is the standing-autonomy mode: it schedules post-turn reflection whenever concurrency allows and grants autonomous authority for high-confidence memory writes, user/project skill creation or patching, small user/project extension/tool improvements, autonomy/Auto Learn setting tuning, and edits under the authorized `selfModification.sourcePath` when validation and rollback evidence are recorded.
|
|
100
|
+
|
|
101
|
+
Hard stops still require explicit foreground approval even in `full`: publishing, npm release, git push, tag creation, credential changes, destructive user-data deletion, network-exposed services, or authority expansion beyond this policy. `/autonomy status` shows the active grant and the Auto Learn audit/log directory.
|
|
90
102
|
|
|
91
|
-
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"autonomy": {
|
|
106
|
+
"mode": "balanced"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Auto Learn Advanced
|
|
92
112
|
|
|
93
113
|
| Setting | Type | Default | Description |
|
|
94
114
|
|---------|------|---------|-------------|
|
|
95
|
-
| `autoLearn.enabled` | boolean | `false` | Autonomously trigger background history scavenging for long sessions |
|
|
115
|
+
| `autoLearn.enabled` | boolean | derived from `autonomy.mode` (`false` when off) | Autonomously trigger background history scavenging for long sessions |
|
|
96
116
|
| `autoLearn.model` | string | `"active"` | Model used by the background learner; `"active"` uses the current session model, otherwise use a `pi --model` pattern |
|
|
97
117
|
| `autoLearn.longSessionMessages` | number | `32` | Trigger after this many message entries in the active branch |
|
|
98
118
|
| `autoLearn.longSessionContextPercent` | number | `70` | Trigger when current context usage reaches this percent |
|
|
99
119
|
| `autoLearn.cooldownMinutes` | number | `120` | Per-session-tenant cooldown between learner launches |
|
|
100
120
|
| `autoLearn.leaseMinutes` | number | `90` | Shared-state lease duration for a running background learner |
|
|
101
121
|
| `autoLearn.maxConcurrentLearners` | number | `2` | Maximum running Auto Learn background learners across all session tenants |
|
|
102
|
-
| `autoLearn.applyHighConfidence` | boolean | `false` | Allow the learner to apply high-confidence memory candidates;
|
|
122
|
+
| `autoLearn.applyHighConfidence` | boolean | `false` | Allow the learner to apply high-confidence memory candidates; broader write authority is controlled by `autonomy.mode` |
|
|
123
|
+
| `autoLearn.reflectionReview` | boolean | `true` | When Auto Learn is enabled, also run bounded post-turn reflection after corrective or complex turns |
|
|
124
|
+
| `autoLearn.reflectionMinToolCalls` | number | `5` | Trigger reflection review after this many tool calls in one completed turn |
|
|
125
|
+
| `autoLearn.reflectionCooldownMinutes` | number | `60` | Per-session-tenant cooldown between reflection-review learners |
|
|
126
|
+
|
|
127
|
+
Use `/settings` → **Auto Learn Advanced** to override the active autonomy preset, including the scavenger model and reflection review. The submenu lets you choose whether to save globally or to the current project's `.pi/settings.json`. The model picker prioritizes models from currently configured subscription/API accounts and still offers a manual custom-pattern entry. Use `/autonomy status` for the compact preset dashboard, `/auto-learn status` to inspect trigger state, reflection cooldown, and running leases, or `/auto-learn run` to start one learner immediately.
|
|
103
128
|
|
|
104
129
|
When enabled, Auto Learn uses a shared state file under the learning extension data directory to coordinate non-colliding background learners across sessions. Each long session gets its own tenant lease, and all learners read/renew the same state before scavenging stored histories for tooling capability and agent-behavior improvements. Learners also query available user/project memory first, using existing rules, preferences, corrections, and project facts to polish candidates, avoid duplicates, and improve accuracy.
|
|
105
130
|
|
|
@@ -113,7 +138,10 @@ When enabled, Auto Learn uses a shared state file under the learning extension d
|
|
|
113
138
|
"cooldownMinutes": 120,
|
|
114
139
|
"leaseMinutes": 90,
|
|
115
140
|
"maxConcurrentLearners": 2,
|
|
116
|
-
"applyHighConfidence": false
|
|
141
|
+
"applyHighConfidence": false,
|
|
142
|
+
"reflectionReview": true,
|
|
143
|
+
"reflectionMinToolCalls": 5,
|
|
144
|
+
"reflectionCooldownMinutes": 60
|
|
117
145
|
}
|
|
118
146
|
}
|
|
119
147
|
```
|
package/docs/usage.md
CHANGED
|
@@ -99,7 +99,7 @@ Pi discovers `AGENTS.md`, `CLAUDE.md`, or `GEMINI.md` context files at startup f
|
|
|
99
99
|
- parent directories, walking up from the current working directory
|
|
100
100
|
- the current directory
|
|
101
101
|
|
|
102
|
-
Use context files for project conventions, commands, safety rules, and preferences. Their contents are injected into the startup system prompt so every session begins with the active project context. Disable discovery with `--no-context-files` or `-nc`.
|
|
102
|
+
Use context files for project conventions, commands, safety rules, and preferences. Their contents are injected into the startup system prompt so every session begins with the active project context. Pi scans these files for direct prompt-injection/exfiltration phrases before injection and replaces suspicious content with a blocked notice. Disable discovery with `--no-context-files` or `-nc`.
|
|
103
103
|
|
|
104
104
|
### System Prompt Files
|
|
105
105
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.80.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.80.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.52.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-sandbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.80.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-sandbox",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.80.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.80.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.80.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.80.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.80.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@earendil-works/pi-agent-core": "npm:@caupulican/pi-agent-core@0.
|
|
13
|
-
"@earendil-works/pi-ai": "npm:@caupulican/pi-ai@0.
|
|
14
|
-
"@earendil-works/pi-tui": "npm:@caupulican/pi-tui@0.
|
|
12
|
+
"@earendil-works/pi-agent-core": "npm:@caupulican/pi-agent-core@0.80.0",
|
|
13
|
+
"@earendil-works/pi-ai": "npm:@caupulican/pi-ai@0.80.0",
|
|
14
|
+
"@earendil-works/pi-tui": "npm:@caupulican/pi-tui@0.80.0",
|
|
15
15
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
16
16
|
"chalk": "5.6.2",
|
|
17
17
|
"cross-spawn": "7.0.6",
|
|
@@ -474,23 +474,22 @@
|
|
|
474
474
|
}
|
|
475
475
|
},
|
|
476
476
|
"node_modules/@earendil-works/pi-agent-core": {
|
|
477
|
-
"version": "0.
|
|
478
|
-
"resolved": "https://registry.npmjs.org/@caupulican/pi-agent-core/-/pi-agent-core-0.
|
|
477
|
+
"version": "0.80.0",
|
|
478
|
+
"resolved": "https://registry.npmjs.org/@caupulican/pi-agent-core/-/pi-agent-core-0.80.0.tgz",
|
|
479
479
|
"license": "MIT",
|
|
480
480
|
"dependencies": {
|
|
481
|
-
"@earendil-works/pi-ai": "npm:@caupulican/pi-ai@0.
|
|
481
|
+
"@earendil-works/pi-ai": "npm:@caupulican/pi-ai@0.80.0",
|
|
482
482
|
"ignore": "7.0.5",
|
|
483
483
|
"typebox": "1.1.38",
|
|
484
484
|
"yaml": "2.9.0"
|
|
485
485
|
},
|
|
486
486
|
"engines": {
|
|
487
487
|
"node": ">=22.19.0"
|
|
488
|
-
}
|
|
489
|
-
"name": "@caupulican/pi-agent-core"
|
|
488
|
+
}
|
|
490
489
|
},
|
|
491
490
|
"node_modules/@earendil-works/pi-ai": {
|
|
492
|
-
"version": "0.
|
|
493
|
-
"resolved": "https://registry.npmjs.org/@caupulican/pi-ai/-/pi-ai-0.
|
|
491
|
+
"version": "0.80.0",
|
|
492
|
+
"resolved": "https://registry.npmjs.org/@caupulican/pi-ai/-/pi-ai-0.80.0.tgz",
|
|
494
493
|
"license": "MIT",
|
|
495
494
|
"dependencies": {
|
|
496
495
|
"@anthropic-ai/sdk": "0.91.1",
|
|
@@ -509,12 +508,11 @@
|
|
|
509
508
|
},
|
|
510
509
|
"engines": {
|
|
511
510
|
"node": ">=22.19.0"
|
|
512
|
-
}
|
|
513
|
-
"name": "@caupulican/pi-ai"
|
|
511
|
+
}
|
|
514
512
|
},
|
|
515
513
|
"node_modules/@earendil-works/pi-tui": {
|
|
516
|
-
"version": "0.
|
|
517
|
-
"resolved": "https://registry.npmjs.org/@caupulican/pi-tui/-/pi-tui-0.
|
|
514
|
+
"version": "0.80.0",
|
|
515
|
+
"resolved": "https://registry.npmjs.org/@caupulican/pi-tui/-/pi-tui-0.80.0.tgz",
|
|
518
516
|
"license": "MIT",
|
|
519
517
|
"dependencies": {
|
|
520
518
|
"get-east-asian-width": "1.6.0",
|
|
@@ -522,8 +520,7 @@
|
|
|
522
520
|
},
|
|
523
521
|
"engines": {
|
|
524
522
|
"node": ">=22.19.0"
|
|
525
|
-
}
|
|
526
|
-
"name": "@caupulican/pi-tui"
|
|
523
|
+
}
|
|
527
524
|
},
|
|
528
525
|
"node_modules/@google/genai": {
|
|
529
526
|
"version": "1.52.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caupulican/pi-adaptative",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.80.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": "npm:@caupulican/pi-agent-core@0.
|
|
45
|
-
"@earendil-works/pi-ai": "npm:@caupulican/pi-ai@0.
|
|
46
|
-
"@earendil-works/pi-tui": "npm:@caupulican/pi-tui@0.
|
|
44
|
+
"@earendil-works/pi-agent-core": "npm:@caupulican/pi-agent-core@0.80.0",
|
|
45
|
+
"@earendil-works/pi-ai": "npm:@caupulican/pi-ai@0.80.0",
|
|
46
|
+
"@earendil-works/pi-tui": "npm:@caupulican/pi-tui@0.80.0",
|
|
47
47
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
48
48
|
"chalk": "5.6.2",
|
|
49
49
|
"cross-spawn": "7.0.6",
|