@caupulican/pi-adaptative 0.80.96 → 0.80.98
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 +35 -0
- package/dist/core/agent-session.d.ts +19 -2
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +185 -6
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/autonomy/envelope-enforcement.d.ts +17 -0
- package/dist/core/autonomy/envelope-enforcement.d.ts.map +1 -0
- package/dist/core/autonomy/envelope-enforcement.js +80 -0
- package/dist/core/autonomy/envelope-enforcement.js.map +1 -0
- package/dist/core/context/brain-curator.d.ts +7 -0
- package/dist/core/context/brain-curator.d.ts.map +1 -1
- package/dist/core/context/brain-curator.js +6 -0
- package/dist/core/context/brain-curator.js.map +1 -1
- package/dist/core/context/context-composition.d.ts.map +1 -1
- package/dist/core/context/context-composition.js +1 -1
- package/dist/core/context/context-composition.js.map +1 -1
- package/dist/core/delegation/session-worker-result.d.ts +8 -2
- package/dist/core/delegation/session-worker-result.d.ts.map +1 -1
- package/dist/core/delegation/session-worker-result.js +18 -1
- package/dist/core/delegation/session-worker-result.js.map +1 -1
- package/dist/core/learning/observation-store.d.ts +20 -0
- package/dist/core/learning/observation-store.d.ts.map +1 -0
- package/dist/core/learning/observation-store.js +101 -0
- package/dist/core/learning/observation-store.js.map +1 -0
- package/dist/core/model-router/executor-route.d.ts +8 -0
- package/dist/core/model-router/executor-route.d.ts.map +1 -0
- package/dist/core/model-router/executor-route.js +33 -0
- package/dist/core/model-router/executor-route.js.map +1 -0
- package/dist/core/model-router/tool-escalation.d.ts +2 -0
- package/dist/core/model-router/tool-escalation.d.ts.map +1 -1
- package/dist/core/model-router/tool-escalation.js +6 -0
- package/dist/core/model-router/tool-escalation.js.map +1 -1
- package/dist/core/research/research-runner.d.ts +8 -1
- package/dist/core/research/research-runner.d.ts.map +1 -1
- package/dist/core/research/research-runner.js +13 -1
- package/dist/core/research/research-runner.js.map +1 -1
- package/dist/core/research/workspace-collector.d.ts +25 -0
- package/dist/core/research/workspace-collector.d.ts.map +1 -0
- package/dist/core/research/workspace-collector.js +286 -0
- package/dist/core/research/workspace-collector.js.map +1 -0
- package/dist/core/settings-manager.d.ts +2 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +3 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/modes/interactive/components/fitness-role-selector.d.ts +1 -1
- package/dist/modes/interactive/components/fitness-role-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/fitness-role-selector.js +5 -0
- package/dist/modes/interactive/components/fitness-role-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +7 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +147 -0
- 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 +21 -0
- package/dist/modes/interactive/interactive-mode.js.map +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/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,42 @@
|
|
|
1
|
+
## [0.80.98] - 2026-07-02
|
|
2
|
+
|
|
3
|
+
### Added
|
|
4
|
+
|
|
5
|
+
- Added the executor lane (G16): configure `modelRouter.executorModel` (or assign it in one step
|
|
6
|
+
from /fitness -> "Toolkit executor") and command-shaped prompts that score a deterministic
|
|
7
|
+
Level-0 EXACT hit on the toolkit registry route the whole turn to the local executor — with the
|
|
8
|
+
judge skipped (nothing to judge), the tool surface capability-filtered to the executor's own
|
|
9
|
+
class, and `run_toolkit_script` exempted from the cheap-tier mutation escalation ONLY on these
|
|
10
|
+
routes (its own danger gate still applies; any other mutating tool still escalates). Ambiguous
|
|
11
|
+
requests never route here — they stay with the main model and the reflex brain.
|
|
12
|
+
- Added workspace research sources (G1): the autonomous research lane now grounds itself in the
|
|
13
|
+
repo — a bounded ripgrep collector derives terms from the goal text and feeds pointer-first
|
|
14
|
+
sources (repo-relative path, line, <=200-char excerpt; never file bodies) into the research
|
|
15
|
+
prompt and the evidence bundle, with the synthesis anchors always preserved. Best-effort: no
|
|
16
|
+
ripgrep or no matches reproduces the previous behavior exactly.
|
|
17
|
+
- Added real evidence strength to the learning gate (G6): a bounded persistent observation store
|
|
18
|
+
counts how often the same lesson (layer + normalized summary) is re-observed across passes and
|
|
19
|
+
sessions, so `minObservations` now gates on truth — the first observation proposals, repeated
|
|
20
|
+
ones can auto-apply.
|
|
21
|
+
- Added autonomy telemetry emission (G3): route decisions, research/worker lane outcomes, and
|
|
22
|
+
learning decisions now emit redacted, bounded events (ids/codes/numbers only — never prompt or
|
|
23
|
+
memory text) as `autonomy-telemetry` session entries.
|
|
24
|
+
- Added execution-time capability-envelope path enforcement and worker request persistence (G2
|
|
25
|
+
prerequisites): a tool wrapped in an envelope scope structurally refuses out-of-scope paths at
|
|
26
|
+
the moment it runs (deny-wins, escape-proof), and every worker result persists its originating
|
|
27
|
+
request (instructions, route, envelope) for audit.
|
|
28
|
+
- Added digest-served telemetry: the /context curation line now reports how many brain digests
|
|
29
|
+
were actually rendered into GC stubs on real turns — the pays-for-itself number.
|
|
30
|
+
|
|
31
|
+
## [0.80.97] - 2026-07-02
|
|
32
|
+
|
|
1
33
|
## [0.80.96] - 2026-07-02
|
|
2
34
|
|
|
3
35
|
### Added
|
|
4
36
|
|
|
37
|
+
- Added Settings submenus for Learning Policy (enabled, auto-apply, confidence threshold, min
|
|
38
|
+
observations; layer allow-list stays JSON-only) and Model Capability (auto/off/forced class),
|
|
39
|
+
closing the last two settings surfaces that were configurable only by hand-editing JSON (G5).
|
|
5
40
|
- Added routed-turn capability tool filtering (G4): when the model router swaps a turn to a
|
|
6
41
|
cheaper model, the tool surface now follows the ROUTED model's capability class for that turn
|
|
7
42
|
(an 8k local model no longer inherits — and pays schema tokens for — background-autonomy tools
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Agent, AgentEvent, AgentMessage, AgentState, AgentTool, ThinkingLevel } from "@caupulican/pi-agent-core";
|
|
2
2
|
import type { CacheRetention, ImageContent, Message, Model, StopReason, TextContent, Usage } from "@caupulican/pi-ai";
|
|
3
|
-
import type { CapabilityEnvelope, EvidenceBundle, LearningDecision, WorkerResult } from "./autonomy/contracts.ts";
|
|
3
|
+
import type { CapabilityEnvelope, EvidenceBundle, LearningDecision, WorkerRequest, WorkerResult } from "./autonomy/contracts.ts";
|
|
4
4
|
import { type LaneRecord } from "./autonomy/lane-tracker.ts";
|
|
5
5
|
import type { AutonomyDiagnosticSnapshot, AutonomyStatusSnapshot } from "./autonomy/status.ts";
|
|
6
6
|
import { type BashResult } from "./bash-executor.ts";
|
|
@@ -32,6 +32,7 @@ import { type StoredFitnessReport } from "./models/fitness-store.ts";
|
|
|
32
32
|
import { type PromptTemplate } from "./prompt-templates.ts";
|
|
33
33
|
import { type ModelFitnessReport } from "./research/model-fitness.ts";
|
|
34
34
|
import { type ResearchRunResult } from "./research/research-runner.ts";
|
|
35
|
+
import { collectWorkspaceSources } from "./research/workspace-collector.ts";
|
|
35
36
|
import type { ResourceLoader } from "./resource-loader.ts";
|
|
36
37
|
import type { BranchSummaryEntry, SessionManager } from "./session-manager.ts";
|
|
37
38
|
import { type ResourceProfileFilterSettings, type SettingsManager } from "./settings-manager.ts";
|
|
@@ -141,6 +142,12 @@ export interface AgentSessionConfig {
|
|
|
141
142
|
};
|
|
142
143
|
/** Session start event metadata emitted when extensions bind to this runtime. */
|
|
143
144
|
sessionStartEvent?: SessionStartEvent;
|
|
145
|
+
/**
|
|
146
|
+
* Pointer-first workspace source collector for the autonomous research lane. Injected in unit
|
|
147
|
+
* tests so they don't spawn a real ripgrep child (which would escape fake timers); production
|
|
148
|
+
* defaults to the real, best-effort collector.
|
|
149
|
+
*/
|
|
150
|
+
collectWorkspaceSources?: typeof collectWorkspaceSources;
|
|
144
151
|
}
|
|
145
152
|
export interface ExtensionBindings {
|
|
146
153
|
uiContext?: ExtensionUIContext;
|
|
@@ -362,6 +369,7 @@ export declare class AgentSession {
|
|
|
362
369
|
private _baseToolDefinitions;
|
|
363
370
|
private _cwd;
|
|
364
371
|
private _agentDir;
|
|
372
|
+
private _collectWorkspaceSources;
|
|
365
373
|
private _extensionRunnerRef?;
|
|
366
374
|
private _initialActiveToolNames?;
|
|
367
375
|
private _allowedToolNames?;
|
|
@@ -781,6 +789,7 @@ export declare class AgentSession {
|
|
|
781
789
|
private _rebuildSystemPrompt;
|
|
782
790
|
private _runAgentPrompt;
|
|
783
791
|
private _isModelAvailableAndAuthed;
|
|
792
|
+
private _resolveExecutorRoute;
|
|
784
793
|
private _resolveModelRouterTurnRoute;
|
|
785
794
|
private _resolveModelRouterModelForIntent;
|
|
786
795
|
private _resolveConfiguredTierModel;
|
|
@@ -1182,7 +1191,15 @@ export declare class AgentSession {
|
|
|
1182
1191
|
getEvidenceBundleSnapshots(): EvidenceBundle[];
|
|
1183
1192
|
/** Live lane records tracked by this process (running and terminal). */
|
|
1184
1193
|
getLaneRecords(): LaneRecord[];
|
|
1185
|
-
|
|
1194
|
+
/**
|
|
1195
|
+
* G3: bounded autonomy-telemetry sink. Passes the whole event through {@link redactTelemetryValue}
|
|
1196
|
+
* (the taxonomy's redaction contract) before storing it, so a secret that leaked into a payload
|
|
1197
|
+
* field never lands in the session log. Observe-only: a failure here can never surface into the
|
|
1198
|
+
* turn it is measuring, so the whole body is swallowed. Payloads MUST stay small (ids, codes,
|
|
1199
|
+
* numbers) — never prompt/summary text; callers own that discipline.
|
|
1200
|
+
*/
|
|
1201
|
+
private _emitAutonomyTelemetry;
|
|
1202
|
+
saveWorkerResultSnapshot(result: WorkerResult, request?: WorkerRequest): string;
|
|
1186
1203
|
getWorkerResultSnapshots(): WorkerResult[];
|
|
1187
1204
|
saveLearningDecisionSnapshot(decision: LearningDecision): string;
|
|
1188
1205
|
getLearningDecisionSnapshots(): LearningDecision[];
|