@caupulican/pi-adaptative 0.80.81 → 0.80.82
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 +8 -0
- package/dist/core/model-router/status.d.ts +1 -0
- package/dist/core/model-router/status.d.ts.map +1 -1
- package/dist/core/model-router/status.js +1 -0
- package/dist/core/model-router/status.js.map +1 -1
- package/dist/core/profile-registry.d.ts +2 -1
- package/dist/core/profile-registry.d.ts.map +1 -1
- package/dist/core/profile-registry.js +15 -0
- package/dist/core/profile-registry.js.map +1 -1
- package/dist/core/settings-manager.d.ts +5 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +68 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +2 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +90 -3
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +12 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/resources.md +7 -1
- package/docs/settings.md +24 -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/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/resources.md
CHANGED
|
@@ -45,7 +45,7 @@ A profile is an allow/block contract over six kinds: `extensions`, `skills`, `pr
|
|
|
45
45
|
|
|
46
46
|
Empty `allow` means "allow all of this kind." `block: ["*"]` means "none."
|
|
47
47
|
|
|
48
|
-
A profile may also bind a **model
|
|
48
|
+
A profile may also bind a **model**, **thinking level**, and **modelRouter** block that apply when the profile is active. Thinking is one of `off`, `minimal`, `low`, `medium`, `high`, `xhigh`. Explicit CLI flags still win over a profile's foreground model/thinking, which in turn win over the settings default. A profile's `modelRouter` block overrides the matching global/project router fields while that situation is active, including the background learning/reflection model.
|
|
49
49
|
|
|
50
50
|
Profiles are stored in settings under `resourceProfiles`, and the active one(s) in `activeResourceProfile`:
|
|
51
51
|
|
|
@@ -75,6 +75,12 @@ Besides inline settings, a profile can live as a standalone JSON file in `~/.pi/
|
|
|
75
75
|
"description": "Fast read-only scout: cheap model, read tools only.",
|
|
76
76
|
"model": "anthropic/claude-haiku-4-5",
|
|
77
77
|
"thinking": "low",
|
|
78
|
+
"modelRouter": {
|
|
79
|
+
"enabled": true,
|
|
80
|
+
"cheapModel": "anthropic/claude-haiku-4-5",
|
|
81
|
+
"expensiveModel": "anthropic/claude-sonnet-4-5",
|
|
82
|
+
"learningModel": "anthropic/claude-haiku-4-5"
|
|
83
|
+
},
|
|
78
84
|
"resources": {
|
|
79
85
|
"tools": { "allow": ["read", "grep", "find", "ls"] },
|
|
80
86
|
"extensions": { "block": ["*"] }
|
package/docs/settings.md
CHANGED
|
@@ -110,12 +110,34 @@ Hard stops still require explicit foreground approval even in `full`: publishing
|
|
|
110
110
|
}
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
+
### Model Router
|
|
114
|
+
|
|
115
|
+
| Setting | Type | Default | Description |
|
|
116
|
+
|---------|------|---------|-------------|
|
|
117
|
+
| `modelRouter.enabled` | boolean | `false` | Enable deterministic cheap/expensive model routing |
|
|
118
|
+
| `modelRouter.cheapModel` | string | - | Model pattern for read-only, research, explanation, and question turns |
|
|
119
|
+
| `modelRouter.expensiveModel` | string | - | Model pattern for modify, implementation, and escalated tool-heavy turns |
|
|
120
|
+
| `modelRouter.learningModel` | string | `"active"` | Model pattern for background reflection, learn, and skill-creator work; `"active"` uses the current session model |
|
|
121
|
+
|
|
122
|
+
Use `/settings` → **Model Router** to configure these fields globally or for the current project's `.pi/settings.json`. `/session` and `/usage` show the active router state and diagnostics. Profile files can also include a `modelRouter` block so a situation can carry its own cheap, expensive, and learning/reflection models together with its model, thinking level, soul, and resource filters.
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"modelRouter": {
|
|
127
|
+
"enabled": true,
|
|
128
|
+
"cheapModel": "openrouter/google/gemini-flash-latest",
|
|
129
|
+
"expensiveModel": "openai-codex/gpt-5.5",
|
|
130
|
+
"learningModel": "anthropic/claude-haiku-4-5"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
113
135
|
### Auto Learn Advanced
|
|
114
136
|
|
|
115
137
|
| Setting | Type | Default | Description |
|
|
116
138
|
|---------|------|---------|-------------|
|
|
117
139
|
| `autoLearn.enabled` | boolean | derived from `autonomy.mode` (`false` when off) | Autonomously trigger background history scavenging for long sessions |
|
|
118
|
-
| `autoLearn.model` | string | `"active"` |
|
|
140
|
+
| `autoLearn.model` | string | `modelRouter.learningModel`, otherwise `"active"` | Legacy/direct override for the background learner; `"active"` uses the current session model, otherwise use a `pi --model` pattern |
|
|
119
141
|
| `autoLearn.longSessionMessages` | number | `32` | Trigger after this many message entries in the active branch |
|
|
120
142
|
| `autoLearn.longSessionContextPercent` | number | `70` | Trigger when current context usage reaches this percent |
|
|
121
143
|
| `autoLearn.cooldownMinutes` | number | `120` | Per-session-tenant cooldown between learner launches |
|
|
@@ -126,7 +148,7 @@ Hard stops still require explicit foreground approval even in `full`: publishing
|
|
|
126
148
|
| `autoLearn.reflectionMinToolCalls` | number | `5` | Trigger reflection review after this many tool calls in one completed turn |
|
|
127
149
|
| `autoLearn.reflectionCooldownMinutes` | number | `60` | Per-session-tenant cooldown between reflection-review learners |
|
|
128
150
|
|
|
129
|
-
Use `/settings` → **
|
|
151
|
+
Use `/settings` → **Model Router** for the preferred place to choose the scavenger/reflection/skill-creator model. Use `/settings` → **Auto Learn Advanced** for trigger/cooldown/concurrency overrides and the legacy direct `autoLearn.model` override. 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.
|
|
130
152
|
|
|
131
153
|
When enabled, Auto Learn keeps a small shared state file for visibility/cooldowns, but prompt/log/session artifacts are isolated under per-session-tenant directories so one session's learner does not consume another session's concurrency budget. Learners must confront available user/project memory first, using existing rules, preferences, corrections, and project facts to decide whether each candidate is useful, unique versus merge/upgrade-worthy, and agent-improving. Candidate validation is chunked/vectorized instead of one memory query per candidate. Successful Auto Learn workers purge their internal prompt/log/session artifacts after exit; the 7-day retention pruner is a fallback for unfinished or failed artifacts, and active leases are skipped so running learners are not raced. Provider/user history pruning is delegated to the continuous-learning tool after it records a learning outcome: only files older than 7 days whose current fingerprint still matches a successfully extracted index entry are deleted, and active/current sessions are protected.
|
|
132
154
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "0.80.
|
|
3
|
+
"version": "0.80.79",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-custom-provider",
|
|
9
|
-
"version": "0.80.
|
|
9
|
+
"version": "0.80.79",
|
|
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.80.
|
|
3
|
+
"version": "0.80.79",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-sandbox",
|
|
9
|
-
"version": "0.80.
|
|
9
|
+
"version": "0.80.79",
|
|
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.80.
|
|
3
|
+
"version": "0.80.79",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-with-deps",
|
|
9
|
-
"version": "0.80.
|
|
9
|
+
"version": "0.80.79",
|
|
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.80.
|
|
3
|
+
"version": "0.80.82",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@caupulican/pi-adaptative",
|
|
9
|
-
"version": "0.80.
|
|
9
|
+
"version": "0.80.82",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@caupulican/pi-agent-core": "^0.80.
|
|
13
|
-
"@caupulican/pi-ai": "^0.80.
|
|
14
|
-
"@caupulican/pi-tui": "^0.80.
|
|
12
|
+
"@caupulican/pi-agent-core": "^0.80.82",
|
|
13
|
+
"@caupulican/pi-ai": "^0.80.82",
|
|
14
|
+
"@caupulican/pi-tui": "^0.80.82",
|
|
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/@caupulican/pi-agent-core": {
|
|
477
|
-
"version": "0.80.
|
|
478
|
-
"resolved": "https://registry.npmjs.org/@caupulican/pi-agent-core/-/pi-agent-core-0.80.
|
|
477
|
+
"version": "0.80.82",
|
|
478
|
+
"resolved": "https://registry.npmjs.org/@caupulican/pi-agent-core/-/pi-agent-core-0.80.82.tgz",
|
|
479
479
|
"license": "MIT",
|
|
480
480
|
"dependencies": {
|
|
481
|
-
"@caupulican/pi-ai": "^0.80.
|
|
481
|
+
"@caupulican/pi-ai": "^0.80.82",
|
|
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/@caupulican/pi-ai": {
|
|
491
|
-
"version": "0.80.
|
|
492
|
-
"resolved": "https://registry.npmjs.org/@caupulican/pi-ai/-/pi-ai-0.80.
|
|
491
|
+
"version": "0.80.82",
|
|
492
|
+
"resolved": "https://registry.npmjs.org/@caupulican/pi-ai/-/pi-ai-0.80.82.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/@caupulican/pi-tui": {
|
|
514
|
-
"version": "0.80.
|
|
515
|
-
"resolved": "https://registry.npmjs.org/@caupulican/pi-tui/-/pi-tui-0.80.
|
|
514
|
+
"version": "0.80.82",
|
|
515
|
+
"resolved": "https://registry.npmjs.org/@caupulican/pi-tui/-/pi-tui-0.80.82.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.80.
|
|
3
|
+
"version": "0.80.82",
|
|
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
|
-
"@caupulican/pi-agent-core": "^0.80.
|
|
45
|
-
"@caupulican/pi-ai": "^0.80.
|
|
46
|
-
"@caupulican/pi-tui": "^0.80.
|
|
44
|
+
"@caupulican/pi-agent-core": "^0.80.82",
|
|
45
|
+
"@caupulican/pi-ai": "^0.80.82",
|
|
46
|
+
"@caupulican/pi-tui": "^0.80.82",
|
|
47
47
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
48
48
|
"chalk": "5.6.2",
|
|
49
49
|
"cross-spawn": "7.0.6",
|