ceulen 0.23.0 → 0.26.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 CHANGED
@@ -1,5 +1,87 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.26.0 — 2026-11-03
4
+
5
+ Pi 1.5.0 support (peer range was `<1.5.0`, which semver-excluded the new
6
+ release).
7
+
8
+ - **Peer deps widened** to `>=0.99.1 <1.6.0` (both pi packages) — pi 1.5.0
9
+ + pi-tui 1.5.0 verified surface-by-surface: the pi-schema tool-argument
10
+ validation change is inert to ceulen (repair's `prepareArguments` hook
11
+ still runs before validation; repair reads only error paths, never
12
+ messages; hidden `__mt*` markers stay non-enumerable; no exotic TypeBox
13
+ features anywhere in the bundle).
14
+ - **`changelogPath` added** to the `pi` manifest — pi 1.5.0's new
15
+ "Extension Updates" notice now shows ceulen's changes after
16
+ `pi update --extensions`.
17
+ - Verified: tsc clean, 2951 tests pass / 0 fail, live rpc-mode smoke on
18
+ pi 1.5.0 (60 commands, `/ceulen` handled, zero stderr).
19
+
20
+ ## 0.25.0 — 2026-11-01
21
+
22
+ Goal module (`extensions/modules/goal/`): OMP/Codex-style **autonomous
23
+ self-continuation goal mode** — reverses the 2026-10-02 decision that
24
+ dropped pi-plan's `/goal` (all three peer harnesses ship the feature:
25
+ Codex v0.128+, Claude Code `/goal`, OMP core).
26
+
27
+ - **`/goal <objective> [--budget N]`** (+ `status|pause|resume|clear|
28
+ budget <N|off>`): sets a session goal and fires the objective as the
29
+ first work turn. After every settled turn (`agent_settled` — pi's
30
+ "no retry/compaction/queued continuation will run" contract) a hidden
31
+ continuation re-prompts (`triggerTurn:true, deliverAs:"followUp"` —
32
+ cron's fire mechanism) with OMP's 6-point completion-audit prompt.
33
+ - **`goal` tool (DIRECT, never deferred)**: `get` reports state;
34
+ `complete` ends the loop — accepted only from the agent, and only when
35
+ repo state proves every deliverable (budget exhaustion ≠ completion).
36
+ Plan mode blocks it via plan-tools.ts BLOCKED_TOOLS; goal mode never
37
+ bypasses plan gates or bash approvals.
38
+ - **Token budget** = OMP `goalTokenDelta` (input+cacheWrite+output;
39
+ cacheRead excluded) over rolling `message_end` snapshots: a goal set
40
+ mid-run bills only post-goal deltas; a fresh-session goal bills from
41
+ zero (live-test fix — the first turn of a fresh-session goal is goal
42
+ work). Flip to `budget-limited` sends ONE wrap-up turn
43
+ (`followUp+triggerTurn`, deliberately not OMP's mid-turn steer: at a
44
+ pi turn boundary nothing can consume a steer). One wrap-up per budget
45
+ episode; `/goal budget` set-below-usage re-limits immediately, raise
46
+ above usage revives.
47
+ - **Boundaries**: turn cap `goal.maxTurns` (default 50) stops the loop;
48
+ abort/plan-mode pauses; restart restores PAUSED — terminal tombstone
49
+ entries (`complete`/`stopped`) prevent cleared-goal resurrection.
50
+ - **Settings**: GLOBAL `goal` section (`maxTurns`, `defaultBudget`,
51
+ 0 = unbounded); /config → Tasks → Goal mode 🎯; status segment
52
+ `ceulen-goal`; registry position before rules/steering (append-only
53
+ `before_agent_start` composer). Live-verified in a herdr pane
54
+ (set/complete/continuation/budget/pause/resume + 16-entry jsonl trail).
55
+
56
+ ## 0.24.0 — 2026-10-23
57
+
58
+ pi 1.4.0 compatibility pass (verified by diffing the 1.3.0 and 1.4.0
59
+ managed releases surface by surface): **no breaking changes**. The 1.4.0
60
+ delta is additive for the extension API — types.d.ts zero-diff,
61
+ SettingsManager/settings-selector/theme-schema byte-identical, pi-tui
62
+ editor internals unchanged.
63
+
64
+ - **Peer deps widened** `>=0.99.1 <1.4.0` → `>=0.99.1 <1.5.0` for both
65
+ `@earendil-works/pi-coding-agent` and `@earendil-works/pi-tui` (the old
66
+ range semver-excluded pi 1.4.0). AGENTS.md inline range updated; lockfile
67
+ refreshed to pi 1.4.0 + pi-tui 1.4.0.
68
+ - **Deferred tier verified against the #11062 resume rework**: pi 1.4.0
69
+ activates never-mentioned extension tools on session resume, but only
70
+ ones declarable on registration (`direct`/`model-only`) — deferred tools
71
+ stay inactive, the session_start `tool_search` re-arm still composes.
72
+ - **Composer comment** updated to pi 1.4.0 compaction semantics
73
+ (`reserveTokens` only controls when compaction STARTS; summaries use the
74
+ model's full output limit).
75
+ - **Free wins from pi 1.4.0**: codemode worker queueing (parallel subagent
76
+ dispatches queue up to 60s instead of failing), truncated-tool-call
77
+ recovery (#11227), OpenAI Responses prompt-cache retention on deferred
78
+ tool loads (#10940), dialog stacking (#11166 — /config + a2a prompts no
79
+ longer orphan promises).
80
+
81
+ Verification: tsc clean against 1.4.0; 2931 tests / 0 fail (3 env skips);
82
+ rpc-mode live smoke on managed pi 1.4.0 — 29 modules, 59 commands (parity
83
+ with 1.3.0), 51 deferred tools, zero stderr.
84
+
3
85
  ## 0.23.0 — 2026-10-19
4
86
 
5
87
  Thinking-mode gaps closed — GLM-5.3 gets its real effort ladder on the router,
@@ -50,6 +50,8 @@ import attachmentsModule from "../modules/attachments/index.ts";
50
50
  import { attachmentsConfig } from "../modules/attachments/configPanel.ts";
51
51
  import cronModule from "../modules/cron/index.ts";
52
52
  import { cronConfig } from "../modules/cron/configPanel.ts";
53
+ import goalModule from "../modules/goal/index.ts";
54
+ import { goalConfig } from "../modules/goal/configPanel.ts";
53
55
  import permissionModule from "../modules/permission/index.ts";
54
56
  import shellsModule from "../modules/shells/index.ts";
55
57
  import sgModule from "../modules/sg/index.ts";
@@ -163,6 +165,12 @@ export const MODULES: ModuleEntry[] = [
163
165
  // Cron after todo: scheduled prompts into the live session (the clock-driven
164
166
  // sibling of the task board). No before_agent_start → no ordering constraint.
165
167
  { name: "cron", category: "Tasks", describe: "Scheduled jobs firing prompts into the live session: add/remove/list/run/enable/disable/test/logs/export, headless pinned runs, crontab export.", load: cronModule, config: cronConfig, deferredTools: ["cron"] },
168
+ // Goal after cron: the autonomy sibling (cron is clock-driven, goal is
169
+ // condition-driven). It IS a before_agent_start composer (append-only
170
+ // goal_context) — must precede rules/steering like every prompt composer.
171
+ // `goal` tool stays DIRECT (munin-loop lesson: a protocol's terminal action
172
+ // never rides the deferred tier); plan mode blocks it via plan-tools.ts.
173
+ { name: "goal", category: "Tasks", describe: "Autonomous goal mode: /goal sets an objective; the loop re-injects continuation after every settled turn until the agent verifies completion via the goal tool, hits the token budget or turn cap, or you pause.", load: goalModule, config: goalConfig },
166
174
  // ── Tools ─────────────────────────────────────────────────────────────
167
175
  // Repair first in the section: it wraps the built-in tools; serena/fff ride
168
176
  // on top (no load-order dependency — hooks resolve at call time).
@@ -358,7 +358,8 @@ function gaugeFill(w: number, data: BandData | undefined, theme: ShapeTheme): st
358
358
  const scale = windowStart >= 0 ? windowStart : w;
359
359
  const usedCount = Math.min(scale, Math.max(1, Math.round(((pct ?? 0) / 100) * scale)));
360
360
  const percentStart = percentLabel ? Math.min(Math.max(1, scale - percentLabel.length - 1), Math.max(1, usedCount)) : -1;
361
- // pi's compaction fires at contextWindow − reserveTokens (16384 default).
361
+ // pi's compaction STARTS at contextWindow − reserveTokens (16384 default);
362
+ // since pi 1.4.0 the summary itself uses the model's full output limit.
362
363
  const thresholdIdx =
363
364
  data?.autoCompact && w >= 8 && data.window ? Math.min(scale - 1, Math.max(0, Math.round(((data.window - 16384) / data.window) * scale))) : -1;
364
365
  let out = "";
@@ -0,0 +1,63 @@
1
+ /**
2
+ * goal's /config contribution — Tasks tab, Goal mode section 🎯.
3
+ *
4
+ * Rows write the GLOBAL agent-dir settings.json `goal` section (see
5
+ * lib/settings.ts); read per event, so a save applies without /reload.
6
+ */
7
+ import { row, toInt, type PanelGroup } from "../../lib/panel.js";
8
+ import type { ModuleConfig } from "../../lib/registry.js";
9
+ import { readGoalSettings, DEFAULT_GOAL_SETTINGS, type GoalSettings } from "./lib/settings.js";
10
+
11
+ /** Build the panel groups over a working copy (mutated by row setters). */
12
+ export function buildGoalGroups(cfg: GoalSettings): PanelGroup[] {
13
+ return [
14
+ {
15
+ key: "goal",
16
+ label: "Goal mode",
17
+ tab: "Tasks",
18
+ icon: "🎯",
19
+ rows: [
20
+ row("goal.maxTurns", "Max continuation turns", "number", cfg.maxTurns, (v) => {
21
+ const n = toInt(v, cfg.maxTurns);
22
+ if (n > 0) cfg.maxTurns = n;
23
+ }, {
24
+ description: "Hard cap on autonomous continuation turns before the loop stops itself.",
25
+ warning: "Uncapped autonomous loops burn tokens — the cap is the seatbelt.",
26
+ defaultValue: DEFAULT_GOAL_SETTINGS.maxTurns,
27
+ }),
28
+ row("goal.defaultBudget", "Default token budget", "number", cfg.defaultBudget ?? 0, (v) => {
29
+ const n = toInt(v, 0);
30
+ if (n >= 0) cfg.defaultBudget = n;
31
+ }, {
32
+ description: "Default token budget for /goal set without --budget. 0 = unbounded.",
33
+ defaultValue: DEFAULT_GOAL_SETTINGS.defaultBudget,
34
+ }),
35
+ ],
36
+ },
37
+ ];
38
+ }
39
+
40
+ const OWNED_PREFIX = "goal.";
41
+
42
+ /** goal's ModuleConfig for the central /config panel. */
43
+ export function goalConfig(): ModuleConfig {
44
+ const working: GoalSettings = readGoalSettings();
45
+ return {
46
+ groups: () => buildGoalGroups(working),
47
+ save: async (edited, ctx) => {
48
+ if (![...edited].some((k) => k.startsWith(OWNED_PREFIX))) return;
49
+ // Read-modify-write the two owned keys into the GLOBAL settings.json.
50
+ try {
51
+ const { writeGoalSection } = await import("./lib/settings.js");
52
+ const patch: Partial<GoalSettings> = {};
53
+ if (edited.has("goal.maxTurns")) patch.maxTurns = working.maxTurns;
54
+ if (edited.has("goal.defaultBudget")) patch.defaultBudget = working.defaultBudget;
55
+ if (!Object.keys(patch).length) return;
56
+ const file = writeGoalSection(patch);
57
+ ctx.ui.notify(`Goal settings saved to ${file} (applies without /reload).`);
58
+ } catch (e) {
59
+ ctx.ui.notify(`Goal save failed: ${e instanceof Error ? e.message : e}`, "error");
60
+ }
61
+ },
62
+ };
63
+ }