pi-posthorse 0.10.19 → 0.10.21

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/README.md CHANGED
@@ -37,6 +37,8 @@ Recoverable history is not guaranteed model recall. See the [practical guarantee
37
37
 
38
38
  The [field study](https://github.com/fitchmultz/pi-posthorse/blob/main/docs/field-study.md) measures what agents did around 24,940 context boundaries in daily use: note and history use, repeated work, stops, wait time, and cost. It is observational, not a controlled comparison with stock compaction.
39
39
 
40
+ The [controlled comparison](https://github.com/fitchmultz/pi-posthorse/blob/main/docs/controlled-comparison.md) runs the same two-hour coding tasks with stock compaction and with Posthorse on two models. It reports how often the agent stopped with work left, the tests passing, the wait at boundaries, and the cost. It covers one benchmark family and two models of one provider.
41
+
40
42
  ## Tools
41
43
 
42
44
  These tools are available to the model:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-posthorse",
3
- "version": "0.10.19",
3
+ "version": "0.10.21",
4
4
  "type": "module",
5
5
  "description": "Posthorse: fresh context, same journey. No-summary context rollover for Pi, with sparse budget reminders, handoffs, notes, and history.",
6
6
  "keywords": [
package/src/guidance.ts CHANGED
@@ -24,7 +24,9 @@ export function registerGuidance(pi: ExtensionAPI, policy: SnapshotReader): void
24
24
  if (promptOptions?.forceSystemPrompt !== undefined) {
25
25
  // ponytail: Pi applies forced prompts after this hook; keep request-local guidance
26
26
  // until the host projects forced text before context_with_system.
27
- event.messages.splice(1, 0, {
27
+ // After a compaction a second system message (the tool update) can follow the first.
28
+ const conversation = event.messages.findIndex((message) => message.role !== "system");
29
+ event.messages.splice(conversation === -1 ? event.messages.length : conversation, 0, {
28
30
  role: "custom",
29
31
  customType: "posthorse-guidance",
30
32
  content: guidance,