@groeponline/pi-missions 0.3.9 → 0.3.11

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
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.11] - 2026-09-05
11
+
12
+ ### Fixed
13
+ - persist history onto fresh mission state (#18)
14
+
15
+ ### Documentation
16
+ - disambiguate schema_version from SCHEMA_VERSION (#12)
17
+ ## [0.3.10] - 2026-08-30
18
+
19
+ ### Maintenance
20
+ - prove durable mission fallback path (#17)
10
21
  ## [0.3.9] - 2026-08-30
11
22
 
12
23
  ### Documentation
package/README.md CHANGED
@@ -20,6 +20,18 @@ Pi Missions gives a job a durable identity with a plan, ordered features, accept
20
20
 
21
21
  Use it when a task is too large for one prompt, one context window or one uninterrupted coding session.
22
22
 
23
+ ## Where it fits
24
+
25
+ Pi Missions owns **durable work state**: plans, features, evidence, history, recovery, and handoff context that must survive session boundaries. It does not replace Wishcraft's lightweight idea inbox and it does not execute multi-agent swarms itself.
26
+
27
+ `pi-wishcraft idea -> pi-missions mission -> pi-agent-orchestrator run` is the intended promotion path when a thought becomes durable work and then needs parallel or isolated execution.
28
+
29
+ - [`pi-wishcraft`](https://github.com/GroepOnline/pi-wishcraft): operator cockpit and fast idea capture.
30
+ - **pi-missions**: durable plan/task/evidence state.
31
+ - [`pi-agent-orchestrator`](https://github.com/GroepOnline/pi-agent-orchestrator): execution fabric for agents, worktrees, swarms, schedules, and handoffs.
32
+
33
+ GitHub, Slack and webhook integration classes remain lightweight scaffolding; production-readiness is tracked in [#13](https://github.com/GroepOnline/pi-missions/issues/13).
34
+
23
35
  ## 30-second start
24
36
 
25
37
  ```bash
@@ -181,6 +193,10 @@ Run the built extension locally:
181
193
  pi -e ./dist/index.js
182
194
  ```
183
195
 
196
+ ### Recovery behavior
197
+
198
+ Safe mission saves keep the previous valid `plan.json` as `plan.json.bak`. When the primary plan is unreadable or invalid, loading automatically tries the backup before giving up. Schema migrations create a separate timestamped `plan.json.pre-migration-*.bak` before rewriting state. Recovery is automatic for a corrupt primary plan; operators can inspect the backup files directly when diagnosing a failed migration or filesystem problem.
199
+
184
200
  CLI diagnostics:
185
201
 
186
202
  ```bash
package/dist/index.js CHANGED
@@ -2158,24 +2158,25 @@ function spawnWorker(mission, config) {
2158
2158
  }
2159
2159
  try {
2160
2160
  const missionId = mission.id;
2161
- appendHistory(mission, {
2162
- event: "worker_finished",
2163
- featureId: config.featureId,
2164
- note: `Exit ${code}${signal ? ` (${signal})` : ""} in ${Math.round(durationMs / 1e3)}s`,
2165
- details: {
2166
- exitCode: code,
2167
- signal: signal ?? void 0,
2168
- durationMs,
2169
- killed,
2170
- missionId,
2171
- stdoutLen: stdout.length,
2172
- stderrLen: stderr.length,
2173
- model,
2174
- orchestraCorrelation: config.orchestraCorrelation
2175
- }
2176
- });
2177
- saveMissionSafe(mission).catch(() => {
2178
- });
2161
+ const freshMission = loadMissionFromDisk(missionId);
2162
+ if (freshMission?.id === missionId) {
2163
+ appendHistory(freshMission, {
2164
+ event: "worker_finished",
2165
+ featureId: config.featureId,
2166
+ note: `Exit ${code}${signal ? ` (${signal})` : ""} in ${Math.round(durationMs / 1e3)}s`,
2167
+ details: {
2168
+ exitCode: code,
2169
+ signal: signal ?? void 0,
2170
+ durationMs,
2171
+ killed,
2172
+ missionId,
2173
+ stdoutLen: stdout.length,
2174
+ stderrLen: stderr.length,
2175
+ model,
2176
+ orchestraCorrelation: config.orchestraCorrelation
2177
+ }
2178
+ });
2179
+ }
2179
2180
  } catch {
2180
2181
  }
2181
2182
  resolve3(result);