@groeponline/pi-wishcraft 1.4.9 → 1.4.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
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [1.4.11] - 2026-08-30
6
+
7
+ ## [1.4.10] - 2026-08-30
8
+
5
9
  ## [1.4.9] - 2026-08-29
6
10
 
7
11
  ## [1.4.8] - 2026-08-29
package/README.md CHANGED
@@ -21,8 +21,7 @@ Guides live in [`docs/`](docs/index.md). This is the Pi extension contract: what
21
21
  ## Quick start tutorial
22
22
 
23
23
  Install, restart Pi (or run `/reload`), then press `alt+p` for the Deck. Try `/signal menu`, `/skills`, `/ideas`, and `ctrl+shift+b`. Full setup: [docs/configuration.md](docs/configuration.md).
24
-
25
- ## v2 Platform (in this release)
24
+ **Portfolio boundary:** Wishcraft owns the operator cockpit and lightweight idea capture. Promote durable work to [`pi-missions`](https://github.com/GroepOnline/pi-missions), then use [`pi-agent-orchestrator`](https://github.com/GroepOnline/pi-agent-orchestrator) when parallel/isolated execution adds value: `idea -> mission -> orchestration run`.
26
25
 
27
26
  ## Install
28
27
 
@@ -222,11 +221,12 @@ No shell commands — pure in-process regex. Evaluated before command hooks. `wi
222
221
  ```
223
222
 
224
223
 
224
+ Privacy/network boundary: ideas, settings, usage ledgers, and normal cockpit state stay local; there is no package-owned telemetry backend. Optional exchange-rate/DeepWiki features and operator-defined hooks cross the network/process boundary only when used.
225
225
  ## Limits
226
226
 
227
227
  - No mouse on the live footer. Pi core owns that surface.
228
228
  - No second `alt+i` product. Ports stay on `alt+i`; other detail is `→` in the navigator.
229
- - ChefGroep status keys (`powerline.preset`, `powerline.tps`, `powerline.ports`) exist for other extensions. They are not the public pitch.
229
+ - Compatibility status keys (`powerline.preset`, `powerline.tps`, `powerline.ports`) are available to peer extensions; normal Wishcraft use does not require them.
230
230
  - The legacy `@groeponline/pi-powerline-footer` package is deprecated in favor of `@groeponline/pi-wishcraft`.
231
231
  - Tags are not rewritten. 0.19.x through current stay on the timeline.
232
232
 
@@ -119,6 +119,8 @@ interface RunningCommand {
119
119
  buffer: string;
120
120
  /** Trailing partial escape sequence carried across chunks. */
121
121
  escapeTail: string;
122
+ /** Wrapper result observed on stdout; publication waits for child close. */
123
+ pendingResult: PtyRunResult | null;
122
124
  resolve: (result: PtyRunResult) => void;
123
125
  settled: boolean;
124
126
  }
@@ -179,6 +181,7 @@ export class PtyShellSession {
179
181
  done,
180
182
  buffer: "",
181
183
  escapeTail: "",
184
+ pendingResult: null,
182
185
  resolve: (result) => {
183
186
  if (running.settled) return;
184
187
  running.settled = true;
@@ -224,9 +227,8 @@ export class PtyShellSession {
224
227
  child.stderr.on("data", (chunk: string) => this.handleChunk(String(chunk)));
225
228
  child.on("error", (error) => {
226
229
  // spawn itself failed (script removed between probe and spawn, dead
227
- // SHELL path): surface the reason, then settle as a normal failure.
228
- // The first script-path failure also flips the probe cache so the
229
- // next command degrades to pipes instead of silently failing again.
230
+ // SHELL path): surface the reason, but do not publish completion until
231
+ // the matching child emits close. That preserves strict child ownership.
230
232
  console.warn(
231
233
  "[wishcraft] spawn failed:",
232
234
  error instanceof Error ? error.message : String(error),
@@ -234,20 +236,24 @@ export class PtyShellSession {
234
236
  if (usePty) {
235
237
  _resetScriptAvailableForTests();
236
238
  }
237
- running.resolve({ exitCode: 1, cwd: this.state.cwd });
239
+ running.pendingResult = { exitCode: 1, cwd: this.state.cwd };
238
240
  });
239
241
  child.on("close", (code, signal) => {
240
- this.child = null;
241
- // No sentinel observed. An operator interrupt never lets the command
242
- // complete, so it maps to 130 regardless of how `script` exits.
242
+ if (this.child === child) {
243
+ this.child = null;
244
+ }
245
+ // Completion is published only after this exact child closes, so a
246
+ // later run cannot have its child reference cleared by this callback.
243
247
  if (this.interrupted) {
244
248
  running.resolve({ exitCode: 130, cwd: this.state.cwd });
245
249
  return;
246
250
  }
247
- running.resolve({
248
- exitCode: getCloseExitCode(code, signal),
249
- cwd: this.state.cwd,
250
- });
251
+ running.resolve(
252
+ running.pendingResult ?? {
253
+ exitCode: getCloseExitCode(code, signal),
254
+ cwd: this.state.cwd,
255
+ },
256
+ );
251
257
  });
252
258
  });
253
259
  }
@@ -322,10 +328,10 @@ export class PtyShellSession {
322
328
  if (firstColon !== -1) {
323
329
  const exitCode = Number.parseInt(rest.slice(0, firstColon), 10);
324
330
  const cwd = rest.slice(firstColon + 1);
325
- running.resolve({
331
+ running.pendingResult = {
326
332
  exitCode: Number.isFinite(exitCode) ? exitCode : 1,
327
333
  cwd: cwd || this.state.cwd,
328
- });
334
+ };
329
335
  return;
330
336
  }
331
337
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groeponline/pi-wishcraft",
3
- "version": "1.4.9",
3
+ "version": "1.4.11",
4
4
  "description": "Operator cockpit for Pi: live powerline status, searchable skills, idea queue, sticky Bash, hooks, policy controls, and session UX.",
5
5
  "type": "module",
6
6
  "files": [