notesoup 0.51.1 → 0.51.3

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.
Files changed (35) hide show
  1. package/dist/plugins/pi/entries.d.ts +2 -0
  2. package/dist/plugins/pi/entries.js +2 -0
  3. package/dist/plugins/pi/reset/artifacts.d.ts +10 -2
  4. package/dist/plugins/pi/reset/artifacts.js +24 -5
  5. package/dist/plugins/pi/reset/lifecycle.d.ts +37 -21
  6. package/dist/plugins/pi/reset/lifecycle.js +132 -57
  7. package/dist/plugins/pi/runtime.js +9 -10
  8. package/dist/plugins/pi/text.d.ts +11 -14
  9. package/dist/plugins/pi/text.js +15 -16
  10. package/dist/test/agent-loop.test.js +316 -163
  11. package/dist/test/boot.integration.test.js +3 -3
  12. package/dist/test/claude-validation.test.js +4 -2
  13. package/dist/test/dsh-cli.test.js +7 -6
  14. package/dist/test/helpers/dsh-messages.js +3 -0
  15. package/dist/test/model-facing-text.test.js +10 -4
  16. package/dist/test/reset-lifecycle.test.js +272 -88
  17. package/docs/architecture.md +1 -1
  18. package/docs/reset-lifecycle.md +42 -57
  19. package/package.json +2 -2
  20. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  21. package/plugins/paseo/OVERVIEW.md +7 -0
  22. package/plugins/paseo/README.md +12 -0
  23. package/plugins/paseo/client/source-row.ts +14 -0
  24. package/plugins/paseo/client/sticky-card.tsx +21 -0
  25. package/plugins/paseo/index.client.tsx +10 -0
  26. package/plugins/paseo/package.json +19 -0
  27. package/plugins/paseo/paseo-plugin.json +4 -0
  28. package/plugins/paseo/shared/last-word.ts +6 -0
  29. package/plugins/paseo/test/source-row.test.ts +19 -0
  30. package/plugins/paseo/tsconfig.json +16 -0
  31. package/plugins/pi/entries.ts +2 -0
  32. package/plugins/pi/reset/artifacts.ts +26 -5
  33. package/plugins/pi/reset/lifecycle.ts +135 -70
  34. package/plugins/pi/runtime.ts +9 -10
  35. package/plugins/pi/text.ts +17 -17
@@ -5,26 +5,25 @@ import { COUNTDOWN_LINE, GUIDANCE_CLOSE_TAG, GUIDANCE_OPEN_TAG, WARNING_BODY, WA
5
5
  * view intact must not carry these — the claim would be false there. The bare `empty_brain` token
6
6
  * is interpolated by renderProtocolBlock; the prose itself stays plain English.
7
7
  */
8
- export const PI_PRE_RESET_HINTS = `Resetting clears the human's chat view too. Don't put a long explanation right before a reset and assume they'll still be able to read it. Save the handoff in notes; give the explanation after the reset.
8
+ export const PI_PRE_RESET_HINTS = `Anything you say here is erased with the reset — the human can't read it afterward either. Put the handoff in your notes; explanations belong after the reset.
9
9
  Unless the human explicitly directs otherwise, decide for yourself when to call empty_brain. Don't keep asking them whether to reset.`;
10
10
  /** Pi-only nudge: pi's empty_brain persists a parting line; the dsh tool has no such parameter. */
11
11
  export const LAST_WORD_HINT = "If you want, pass `empty_brain` a `last_word`: a tiny sticky note (at most 250 characters) slapped on your forehead after the wipe.";
12
- /**
13
- * With a prompt attached the close-out is an order rather than a nudge: the human already
14
- * said when to reset, and a task line for the next window just preceded it. Only Pi has a
15
- * reset command that takes a prompt, so this lives with the Pi text.
16
- */
17
- export const WARNING_CALL_PROMPTED = "Organize the notes first, then call `empty_brain` right away — do not wait to be cut off.";
18
- /**
19
- * The human typed `/empty <prompt>`: the raw command line leads the close-out so the
20
- * closing model sees what the next window was asked to do, verbatim. The tag names it as the
21
- * next window's prompt, so no prose has to explain that.
22
- */
12
+ /** The closing model sees deferred input as a bare next-window prompt block. */
23
13
  export function promptBlock(commandLine) {
24
14
  return `<notesoup:next_window_prompt>\n${commandLine}\n</notesoup:next_window_prompt>`;
25
15
  }
26
- /** The hidden checkpoint text for Pi's manual/budget-triggered requests (dsh reads warningPrompt() directly). */
27
- export function warningContent(commandLine) {
28
- const closeOut = commandLine ? `${promptBlock(commandLine)}\n${WARNING_CALL_PROMPTED}` : WARNING_CALL;
29
- return `${GUIDANCE_OPEN_TAG}\n${WARNING_BODY}\n${closeOut}\n${PI_PRE_RESET_HINTS}\n${LAST_WORD_HINT}\n${COUNTDOWN_LINE}\n${GUIDANCE_CLOSE_TAG}`;
16
+ /** Pi's hidden budget warning (dsh reads warningPrompt() directly). */
17
+ export function warningContent() {
18
+ return `${GUIDANCE_OPEN_TAG}\n${WARNING_BODY}\n${WARNING_CALL}\n${PI_PRE_RESET_HINTS}\n${LAST_WORD_HINT}\n${COUNTDOWN_LINE}\n${GUIDANCE_CLOSE_TAG}`;
19
+ }
20
+ /** Approved manual close-out notices; both variants live here. */
21
+ export const COMMAND_NOTICE = {
22
+ prompted: "The human ran /empty. Save your notes now and call `empty_brain` immediately. Anything you say here will be erased afterward — put the handoff in your notes. The prompt below, and anything the human sends from now on, should be handled after the reset.",
23
+ bare: "The human ran /empty. Save your notes now and call `empty_brain` immediately. Anything you say here will be erased afterward — put the handoff in your notes. Anything the human sends from now on should be handled after the reset.",
24
+ };
25
+ /** Manual orders omit budget timing hints; deferred work sits outside the notice. */
26
+ export function commandWarningContent(commandLine) {
27
+ const notice = commandLine ? COMMAND_NOTICE.prompted : COMMAND_NOTICE.bare;
28
+ return `${GUIDANCE_OPEN_TAG}\n${notice}\n${WARNING_BODY}\n${LAST_WORD_HINT}\n${COUNTDOWN_LINE}\n${GUIDANCE_CLOSE_TAG}${commandLine ? `\n${promptBlock(commandLine)}` : ""}`;
30
29
  }