@caupulican/pi-adaptative 0.79.0 → 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 +11 -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 +12 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +16 -0
- 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 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +4 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +98 -3
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +12 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +330 -18
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/settings.md +30 -6
- 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 +12 -12
- package/package.json +4 -4
package/docs/settings.md
CHANGED
|
@@ -88,22 +88,43 @@ When disabled, the system prompt tells the agent not to edit Pi core, the instal
|
|
|
88
88
|
}
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
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
92
|
|
|
93
|
-
###
|
|
93
|
+
### Autonomy
|
|
94
94
|
|
|
95
95
|
| Setting | Type | Default | Description |
|
|
96
96
|
|---------|------|---------|-------------|
|
|
97
|
-
| `
|
|
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.
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"autonomy": {
|
|
106
|
+
"mode": "balanced"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Auto Learn Advanced
|
|
112
|
+
|
|
113
|
+
| Setting | Type | Default | Description |
|
|
114
|
+
|---------|------|---------|-------------|
|
|
115
|
+
| `autoLearn.enabled` | boolean | derived from `autonomy.mode` (`false` when off) | Autonomously trigger background history scavenging for long sessions |
|
|
98
116
|
| `autoLearn.model` | string | `"active"` | Model used by the background learner; `"active"` uses the current session model, otherwise use a `pi --model` pattern |
|
|
99
117
|
| `autoLearn.longSessionMessages` | number | `32` | Trigger after this many message entries in the active branch |
|
|
100
118
|
| `autoLearn.longSessionContextPercent` | number | `70` | Trigger when current context usage reaches this percent |
|
|
101
119
|
| `autoLearn.cooldownMinutes` | number | `120` | Per-session-tenant cooldown between learner launches |
|
|
102
120
|
| `autoLearn.leaseMinutes` | number | `90` | Shared-state lease duration for a running background learner |
|
|
103
121
|
| `autoLearn.maxConcurrentLearners` | number | `2` | Maximum running Auto Learn background learners across all session tenants |
|
|
104
|
-
| `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 |
|
|
105
126
|
|
|
106
|
-
Use `/settings` → **Auto Learn** to
|
|
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.
|
|
107
128
|
|
|
108
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.
|
|
109
130
|
|
|
@@ -117,7 +138,10 @@ When enabled, Auto Learn uses a shared state file under the learning extension d
|
|
|
117
138
|
"cooldownMinutes": 120,
|
|
118
139
|
"leaseMinutes": 90,
|
|
119
140
|
"maxConcurrentLearners": 2,
|
|
120
|
-
"applyHighConfidence": false
|
|
141
|
+
"applyHighConfidence": false,
|
|
142
|
+
"reflectionReview": true,
|
|
143
|
+
"reflectionMinToolCalls": 5,
|
|
144
|
+
"reflectionCooldownMinutes": 60
|
|
121
145
|
}
|
|
122
146
|
}
|
|
123
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,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/@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"
|
|
@@ -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/@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",
|
|
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/@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",
|
|
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.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",
|