pi-outpost 0.31.0 → 0.32.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.
@@ -12370,7 +12370,7 @@ function rulePatterns(profile, rules, sources) {
12370
12370
  }
12371
12371
 
12372
12372
  // shared/bin/validate-structured-exchange.mjs
12373
- var VERSION = `validate-structured-exchange ${false ? "development" : "0.31.0"}`;
12373
+ var VERSION = `validate-structured-exchange ${false ? "development" : "0.32.0"}`;
12374
12374
  var USAGE = `validate-structured-exchange [file]
12375
12375
  validate-structured-exchange --profile <profile.json> [file]
12376
12376
  validate-structured-exchange --check-profile <profile.json>
@@ -185968,7 +185968,7 @@ function childEnv(extra = {}) {
185968
185968
  }
185969
185969
  function agentDirEnv(executable, agentDir) {
185970
185970
  const env2 = { PI_CODING_AGENT_DIR: agentDir };
185971
- const base = (executable.split(/[\\/]/).pop() ?? "").replace(/\.(exe|cmd|bat|js|mjs)$/i, "");
185971
+ const base = (executable.split(/[\\/]/).pop() ?? "").replace(/\.(exe|cmd|bat|js|mjs|sh)$/i, "");
185972
185972
  const derived = base.toUpperCase().replace(/[^A-Z0-9]+/g, "_").replace(/^_+|_+$/g, "");
185973
185973
  if (derived !== "" && derived !== "PI" && /^[A-Z]/.test(derived)) env2[`${derived}_CODING_AGENT_DIR`] = agentDir;
185974
185974
  return env2;
@@ -186338,12 +186338,14 @@ var RpcRuntime = class {
186338
186338
  availableCommands = [];
186339
186339
  availableResources = [];
186340
186340
  usage;
186341
- /** Standard Pi names this operation `fork`; OMP's compatible dialect names it `branch`. */
186341
+ /** Standard Pi and Prime Agent name this operation `fork`; OMP's compatible dialect names it `branch`. */
186342
186342
  forkCommand = "fork";
186343
- /** Standard Pi settles after maintenance; OMP's dialect terminates directly at `agent_end`. */
186343
+ /** Standard Pi settles after maintenance; OMP's and Prime Agent's dialects terminate directly at `agent_end`. */
186344
186344
  completionEvent = "agent_settled";
186345
186345
  /** Assistant message being streamed, assembled from deltas so a mid-stream connect sees it. */
186346
186346
  partial;
186347
+ /** The child's last reported queue, re-sent when a retry reopens a turn. */
186348
+ pendingQueue = { steering: [], followUp: [] };
186347
186349
  /** Dialog requests Pi is blocked on, so a session replacement can release them. */
186348
186350
  openDialogs = /* @__PURE__ */ new Set();
186349
186351
  /** Serializes record handling: a refresh must not interleave with the next event. */
@@ -186485,14 +186487,21 @@ var RpcRuntime = class {
186485
186487
  this.completionEvent = "agent_settled";
186486
186488
  } catch (error) {
186487
186489
  if (!isUnknownCommand(error, "get_tree")) throw error;
186488
- const branch = await this.process.command("get_branch_messages");
186490
+ let branch;
186491
+ try {
186492
+ branch = await this.process.command("get_branch_messages");
186493
+ this.forkCommand = "branch";
186494
+ } catch (branchError) {
186495
+ if (!isUnknownCommand(branchError, "get_branch_messages")) throw branchError;
186496
+ branch = await this.process.command("get_fork_messages");
186497
+ this.forkCommand = "fork";
186498
+ }
186489
186499
  const projected = (branch?.messages ?? []).flatMap(
186490
186500
  (item) => typeof item.entryId === "string" && typeof item.text === "string" ? [{ type: "message", id: item.entryId, message: { role: "user", content: item.text } }] : []
186491
186501
  );
186492
186502
  this.sessionEntries = projected;
186493
186503
  this.treeRoots = linearTree(projected);
186494
186504
  this.leafId = projected.at(-1)?.id ?? null;
186495
- this.forkCommand = "branch";
186496
186505
  this.completionEvent = "agent_end";
186497
186506
  }
186498
186507
  const stats = await this.process.command("get_session_stats");
@@ -186519,6 +186528,7 @@ var RpcRuntime = class {
186519
186528
  rebootstrap() {
186520
186529
  return this.queued(async () => {
186521
186530
  this.releaseDialogs();
186531
+ this.pendingQueue = { steering: [], followUp: [] };
186522
186532
  this.applyState(await this.process.command("get_state"));
186523
186533
  await this.refreshCatalog();
186524
186534
  await this.refreshConversation();
@@ -186622,11 +186632,21 @@ var RpcRuntime = class {
186622
186632
  break;
186623
186633
  }
186624
186634
  case "queue_update":
186625
- this.emit({
186626
- type: "queue",
186627
- steering: toStringArray(record.steering),
186628
- followUp: toStringArray(record.followUp)
186629
- });
186635
+ this.emitQueue(toStringArray(record.steering), toStringArray(record.followUp));
186636
+ break;
186637
+ case "session_action_update": {
186638
+ const actions = record.actions;
186639
+ this.emitQueue(toStringArray(actions?.steering), toStringArray(actions?.followUps));
186640
+ break;
186641
+ }
186642
+ case "auto_retry_start":
186643
+ if (!this.streaming) {
186644
+ this.streaming = true;
186645
+ this.emit({ type: "agent_start" });
186646
+ if (this.pendingQueue.steering.length || this.pendingQueue.followUp.length) {
186647
+ this.emit({ type: "queue", ...this.pendingQueue });
186648
+ }
186649
+ }
186630
186650
  break;
186631
186651
  case "compaction_start":
186632
186652
  this.emit({ type: "compaction_start" });
@@ -186646,10 +186666,17 @@ var RpcRuntime = class {
186646
186666
  case "extension_ui_request":
186647
186667
  this.onExtensionUiRequest(record);
186648
186668
  break;
186669
+ case "auto_retry_end":
186670
+ if (record.success === false && this.streaming && this.completionEvent === "agent_end") await this.completeTurn();
186671
+ break;
186649
186672
  default:
186650
186673
  break;
186651
186674
  }
186652
186675
  }
186676
+ emitQueue(steering, followUp) {
186677
+ this.pendingQueue = { steering, followUp };
186678
+ this.emit({ type: "queue", steering, followUp });
186679
+ }
186653
186680
  async completeTurn() {
186654
186681
  this.streaming = false;
186655
186682
  try {
@@ -200567,7 +200594,7 @@ function cacheControlFor(url) {
200567
200594
  }
200568
200595
 
200569
200596
  // ../server/src/index.ts
200570
- var VERSION2 = true ? "0.31.0" : "dev";
200597
+ var VERSION2 = true ? "0.32.0" : "dev";
200571
200598
  var PI_SDK_VERSION = true ? "0.87.1" : readInstalledPiSdkVersion();
200572
200599
  var LAUNCH_DIR = process.env.INIT_CWD ?? process.cwd();
200573
200600
  function complain(error) {
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/pi-outpost.sea.mjs
3
- size: 34840549 bytes
4
- sha256: 5541405f05ee35d5199443c5adf098d4d87609e6307ee7bd7a58b198d638e8e8
3
+ size: 34841783 bytes
4
+ sha256: 6f2b54436650b228ef9cbca307edb250423962c03b4adec24013ff8a178d1767
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/sea-prep.blob
3
- size: 34839607 bytes
4
- sha256: 5e939e2d22a980a717e469969bc1c1d1b5b7349994a534329fe5da26f7354c53
3
+ size: 34840841 bytes
4
+ sha256: d13f89436c6460841fca234453e88f713ed0d3a4a643224cb7708d8922deb05b
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-outpost",
3
- "version": "0.31.0",
3
+ "version": "0.32.0",
4
4
  "type": "module",
5
5
  "description": "A web interface for the pi coding agent: a browser chat UI you run with npx — no clone, no build.",
6
6
  "license": "MIT",