@caupulican/pi-adaptative 0.95.0 → 0.96.1
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 +33 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.d.ts.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.js +28 -0
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.js.map +1 -1
- package/dist/bundled-resources/extensions/tmux-agent-manager/index.ts +25 -0
- package/dist/bundled-resources/extensions/tps/index.d.ts +3 -0
- package/dist/bundled-resources/extensions/tps/index.d.ts.map +1 -0
- package/dist/bundled-resources/extensions/tps/index.js +44 -0
- package/dist/bundled-resources/extensions/tps/index.js.map +1 -0
- package/dist/bundled-resources/extensions/tps/index.ts +48 -0
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +12 -3
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +3 -3
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +16 -6
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction-controller.d.ts +3 -0
- package/dist/core/compaction-controller.d.ts.map +1 -1
- package/dist/core/compaction-controller.js +12 -1
- package/dist/core/compaction-controller.js.map +1 -1
- package/dist/core/extension-import-authority.d.ts +3 -1
- package/dist/core/extension-import-authority.d.ts.map +1 -1
- package/dist/core/extension-import-authority.js +15 -0
- package/dist/core/extension-import-authority.js.map +1 -1
- package/dist/core/goal-loop-controller.d.ts +2 -2
- package/dist/core/goal-loop-controller.js +2 -2
- package/dist/core/goal-loop-controller.js.map +1 -1
- package/dist/core/goals/compact-goal-context.d.ts.map +1 -1
- package/dist/core/goals/compact-goal-context.js +12 -8
- package/dist/core/goals/compact-goal-context.js.map +1 -1
- package/dist/core/goals/goal-continuation-controller.d.ts +3 -3
- package/dist/core/goals/goal-continuation-controller.js +14 -15
- package/dist/core/goals/goal-continuation-controller.js.map +1 -1
- package/dist/core/goals/goal-continuation-defaults.d.ts +3 -3
- package/dist/core/goals/goal-continuation-defaults.js +3 -3
- package/dist/core/goals/goal-continuation-defaults.js.map +1 -1
- package/dist/core/goals/goal-lifecycle.d.ts +2 -0
- package/dist/core/goals/goal-lifecycle.d.ts.map +1 -1
- package/dist/core/goals/goal-lifecycle.js +22 -0
- package/dist/core/goals/goal-lifecycle.js.map +1 -1
- package/dist/core/goals/goal-session-controller.d.ts +8 -2
- package/dist/core/goals/goal-session-controller.d.ts.map +1 -1
- package/dist/core/goals/goal-session-controller.js +22 -3
- package/dist/core/goals/goal-session-controller.js.map +1 -1
- package/dist/core/goals/goal-state.d.ts.map +1 -1
- package/dist/core/goals/goal-state.js +1 -7
- package/dist/core/goals/goal-state.js.map +1 -1
- package/dist/core/goals/goal-tool-core.js +1 -1
- package/dist/core/goals/goal-tool-core.js.map +1 -1
- package/dist/core/keybindings.d.ts +2 -2
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +2 -2
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/package-manager.d.ts +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +2 -21
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/profile-filter-controller.d.ts.map +1 -1
- package/dist/core/profile-filter-controller.js +5 -2
- package/dist/core/profile-filter-controller.js.map +1 -1
- package/dist/core/provider-prompt-contracts.d.ts +5 -1
- package/dist/core/provider-prompt-contracts.d.ts.map +1 -1
- package/dist/core/provider-prompt-contracts.js +5 -1
- package/dist/core/provider-prompt-contracts.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +6 -2
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/risk-classifier.d.ts.map +1 -1
- package/dist/core/risk-classifier.js +22 -2
- package/dist/core/risk-classifier.js.map +1 -1
- package/dist/core/settings-manager.d.ts +9 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +63 -9
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/system-prompt-builder.d.ts +1 -0
- package/dist/core/system-prompt-builder.d.ts.map +1 -1
- package/dist/core/system-prompt-builder.js +21 -1
- package/dist/core/system-prompt-builder.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +5 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/goal.d.ts.map +1 -1
- package/dist/core/tools/goal.js +8 -18
- package/dist/core/tools/goal.js.map +1 -1
- package/dist/core/tools/orchestration-panel.d.ts +7 -0
- package/dist/core/tools/orchestration-panel.d.ts.map +1 -1
- package/dist/core/tools/orchestration-panel.js +58 -9
- package/dist/core/tools/orchestration-panel.js.map +1 -1
- package/dist/core/tools/task-steps.d.ts.map +1 -1
- package/dist/core/tools/task-steps.js +1 -0
- package/dist/core/tools/task-steps.js.map +1 -1
- package/dist/modes/interactive/components/agents-overlay.d.ts +16 -4
- package/dist/modes/interactive/components/agents-overlay.d.ts.map +1 -1
- package/dist/modes/interactive/components/agents-overlay.js +108 -29
- package/dist/modes/interactive/components/agents-overlay.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +7 -2
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +2 -2
- 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 +5 -4
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/session-flow-commands.d.ts.map +1 -1
- package/dist/modes/interactive/session-flow-commands.js +9 -2
- package/dist/modes/interactive/session-flow-commands.js.map +1 -1
- package/docs/extensions.md +2 -0
- package/docs/index.md +1 -0
- package/docs/keybindings.md +2 -0
- package/docs/sessions.md +1 -1
- package/docs/task-steps.md +2 -0
- package/docs/tmux-agent-manager.md +1 -1
- package/docs/tool-repair.md +4 -3
- package/docs/work-lifecycle.md +137 -0
- 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,3 +1,36 @@
|
|
|
1
|
+
## [0.96.1] - 2026-08-22
|
|
2
|
+
|
|
3
|
+
### Changed
|
|
4
|
+
|
|
5
|
+
- Kept durable goals active across bounded runaway guards, stalled turns, repeated requirement blockers, and timed-out workers; each condition now injects recovery guidance and requires a different autonomous approach instead of silently waiting for manual continuation.
|
|
6
|
+
- Automatically reopened goals blocked by bounded runaway/provider-turn guards when restoring a session while preserving explicit owner pauses, cancellations, terminal failures, budgets, and approval boundaries.
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
|
|
10
|
+
- Prevented internal goal-continuation and recovery notices from impersonating new owner turns and repeatedly re-admitting an unchanged failed tool operation; real successful operations and new user turns still advance recovery.
|
|
11
|
+
- Honored the resource selector's exact negative extension filter when deciding whether to load default-on TPS.
|
|
12
|
+
- Made background completion summaries report succeeded, verification-needed, failed, and canceled counts as disjoint outcomes instead of describing failed work as both finished and failed.
|
|
13
|
+
- Kept every provider default resolvable after catalog refreshes and moved the retired Cerebras default to `gpt-oss-120b`.
|
|
14
|
+
|
|
15
|
+
## [0.96.0] - 2026-08-22
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- Added one canonical five-phase work lifecycle—Survey, Contract, Plan/Route, Execute, Prove/Deliver—wired through the existing goal, task, delegation, evidence, and approval owners, with project-relative POC/MVP versus complete-feature delivery contracts.
|
|
20
|
+
- Added a scrollable Ctrl+Q work inspector for full goal, requirement, evidence, task-plan, worker, and background-tool details.
|
|
21
|
+
- Bundled the passive TPS footer meter as a default-on extension for fresh installations.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- Made solo/team routing, independent review, and verification depth adaptive to delivery risk and evidence instead of treating long work as an automatic team trigger.
|
|
26
|
+
- Classified one plain local `git commit` as a reversible scoped checkpoint after green verification while keeping composed commands, history rewrites, push/tag/release/publish, and destructive operations approval-gated.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- Preserved active-branch ancestry when excluding lifecycle-ledger records from compaction input, preventing context accounting from collapsing to only the newest tool result.
|
|
31
|
+
- Reconciled already-notified terminal tmux jobs into freshly hydrated host lane state so absent workers cannot remain displayed as active.
|
|
32
|
+
- Kept the five-phase lifecycle contract within chat and minimal model prompt budgets across host checkout-path formats while retaining the full contract for larger profiles.
|
|
33
|
+
|
|
1
34
|
## [0.95.0] - 2026-08-22
|
|
2
35
|
|
|
3
36
|
### Breaking Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bundled-resources/extensions/tmux-agent-manager/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,KAAK,YAAY,EAOjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGhF,OAAO,EAMN,KAAK,QAAQ,EAEb,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,QAAQ;IAAK,KAAK;CAA0B,CAAC;AAyF1D,KAAK,WAAW,GAAG;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EA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IACnB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,iGAAiG;IACjG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qKAAqK;IACrK,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oGAAoG;IACpG,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AACF;;gFAEgF;AAChF,KAAK,kBAAkB,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,GAAG,aAAa,GAAG,iBAAiB,GAAG,QAAQ,CAAC,CAAC;AA6IlG,wBAAgB,2BAA2B,IAAI,MAAM,CAQpD;AAoaD,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAiHrE;AA6iCD,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAAE,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bundled-resources/extensions/tmux-agent-manager/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,KAAK,YAAY,EAOjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,2BAA2B,CAAC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OAAO,UAAU,yBAAyB,CAAC,EAAE,EAAE,YAAY,QAwWjE"}
|
|
@@ -1666,6 +1666,7 @@ export default function tmuxAgentManagerExtension(pi) {
|
|
|
1666
1666
|
let handoffContext;
|
|
1667
1667
|
let handoffTail = Promise.resolve();
|
|
1668
1668
|
const jobWatchers = new Map();
|
|
1669
|
+
const reconciledTerminalTurns = new Set();
|
|
1669
1670
|
const bridge = pi;
|
|
1670
1671
|
const closeJobWatchers = () => {
|
|
1671
1672
|
for (const watcher of jobWatchers.values())
|
|
@@ -1678,6 +1679,31 @@ export default function tmuxAgentManagerExtension(pi) {
|
|
|
1678
1679
|
for (const job of jobs) {
|
|
1679
1680
|
if (!isFireTaskTerminal(job))
|
|
1680
1681
|
continue;
|
|
1682
|
+
// A fresh host may rehydrate a legacy running lane after this external job already persisted
|
|
1683
|
+
// its terminal result. Reconcile that terminal truth once per process/turn even when the
|
|
1684
|
+
// completion handoff was delivered earlier; ManagedLaneController makes the replay inert
|
|
1685
|
+
// when its own lifecycle is already terminal.
|
|
1686
|
+
for (const agent of job.agents) {
|
|
1687
|
+
const turn = agent.currentTurn ?? 1;
|
|
1688
|
+
if ((agent.notifiedTurn ?? 0) < turn)
|
|
1689
|
+
continue;
|
|
1690
|
+
const reconciliationKey = `${job.id}:${agent.id}:${turn}:${agent.result?.status ?? "failed"}`;
|
|
1691
|
+
if (reconciledTerminalTurns.has(reconciliationKey))
|
|
1692
|
+
continue;
|
|
1693
|
+
bridge.reportManagedLane?.({
|
|
1694
|
+
laneId: agentLaneId(job.id, agent.id),
|
|
1695
|
+
phase: "terminal",
|
|
1696
|
+
status: agent.result?.status,
|
|
1697
|
+
reasonCode: "tmux_terminal_reconciled",
|
|
1698
|
+
});
|
|
1699
|
+
reconciledTerminalTurns.add(reconciliationKey);
|
|
1700
|
+
while (reconciledTerminalTurns.size > 1_024) {
|
|
1701
|
+
const oldest = reconciledTerminalTurns.values().next().value;
|
|
1702
|
+
if (oldest === undefined)
|
|
1703
|
+
break;
|
|
1704
|
+
reconciledTerminalTurns.delete(oldest);
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1681
1707
|
// Per-turn notify: a job is not permanently "closed" after its first terminal turn — a
|
|
1682
1708
|
// follow-up reopens it, so the gate is per-agent (notifiedTurn < currentTurn), not a
|
|
1683
1709
|
// single whole-job notifiedAt flag.
|
|
@@ -1685,6 +1711,8 @@ export default function tmuxAgentManagerExtension(pi) {
|
|
|
1685
1711
|
if (pendingAgents.length === 0)
|
|
1686
1712
|
continue;
|
|
1687
1713
|
for (const agent of pendingAgents) {
|
|
1714
|
+
const reconciliationKey = `${job.id}:${agent.id}:${agent.currentTurn ?? 1}:${agent.result?.status ?? "failed"}`;
|
|
1715
|
+
reconciledTerminalTurns.add(reconciliationKey);
|
|
1688
1716
|
// Advisory-only, and only ever reported when the worker itself chose to write the
|
|
1689
1717
|
// claim file — never fabricated, never a hard cross-process cap.
|
|
1690
1718
|
const usage = readWorkerUsageClaim(job, agent);
|