@astrosheep/square 0.3.61 → 0.3.63

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 (90) hide show
  1. package/claude-plugin/.claude-plugin/plugin.json +1 -1
  2. package/claude-plugin/skills/square/SKILL.md +5 -7
  3. package/codex-plugin/.codex-plugin/plugin.json +1 -1
  4. package/dist/activity.d.ts +6 -2
  5. package/dist/activity.js +168 -133
  6. package/dist/artifact.d.ts +4 -0
  7. package/dist/artifact.js +43 -14
  8. package/dist/attention-presentation.d.ts +1 -0
  9. package/dist/attention-presentation.js +8 -6
  10. package/dist/automatic-session.js +14 -24
  11. package/dist/boundary-presentation.d.ts +1 -2
  12. package/dist/boundary-presentation.js +4 -19
  13. package/dist/cli/context.d.ts +2 -0
  14. package/dist/cli/context.js +2 -18
  15. package/dist/cli/harness-command.js +1 -1
  16. package/dist/cli/mcp-server-command.d.ts +2 -0
  17. package/dist/cli/mcp-server-command.js +13 -0
  18. package/dist/cli/observation-commands.js +47 -19
  19. package/dist/cli/program.js +5 -2
  20. package/dist/cli/registry.js +2 -0
  21. package/dist/cli/square-commands.d.ts +1 -1
  22. package/dist/cli/square-commands.js +93 -125
  23. package/dist/decisions.d.ts +2 -0
  24. package/dist/decisions.js +44 -3
  25. package/dist/delivery-operations.d.ts +1 -2
  26. package/dist/delivery-operations.js +1 -4
  27. package/dist/file-changes.d.ts +12 -0
  28. package/dist/file-changes.js +235 -0
  29. package/dist/help.js +4 -8
  30. package/dist/host-ledger-file-adapter.d.ts +15 -13
  31. package/dist/host-ledger-file-adapter.js +131 -79
  32. package/dist/host-ledger-root.d.ts +2 -0
  33. package/dist/host-ledger-root.js +9 -0
  34. package/dist/host-ledger.d.ts +4 -24
  35. package/dist/inbox.d.ts +10 -5
  36. package/dist/inbox.js +152 -67
  37. package/dist/index.d.ts +3 -1
  38. package/dist/index.js +1 -0
  39. package/dist/mcp.d.ts +7 -0
  40. package/dist/mcp.js +122 -0
  41. package/dist/mention-parse.d.ts +8 -0
  42. package/dist/mention-parse.js +107 -0
  43. package/dist/model.d.ts +5 -0
  44. package/dist/model.js +4 -1
  45. package/dist/notifications.d.ts +1 -0
  46. package/dist/notifications.js +25 -20
  47. package/dist/participant-host.js +2 -2
  48. package/dist/ports.d.ts +2 -9
  49. package/dist/presentation.d.ts +12 -1
  50. package/dist/presentation.js +42 -12
  51. package/dist/presented.js +2 -1
  52. package/dist/registry.d.ts +8 -4
  53. package/dist/registry.js +41 -74
  54. package/dist/routes.d.ts +19 -2
  55. package/dist/routes.js +48 -5
  56. package/dist/runtime.d.ts +2 -0
  57. package/dist/runtime.js +2 -0
  58. package/dist/square-actions.d.ts +26 -13
  59. package/dist/square-actions.js +200 -84
  60. package/dist/square-application.d.ts +58 -0
  61. package/dist/square-application.js +183 -0
  62. package/dist/square-facade.d.ts +24 -9
  63. package/dist/square-file-adapter.d.ts +5 -12
  64. package/dist/square-file-adapter.js +12 -64
  65. package/dist/square-projections.d.ts +3 -2
  66. package/dist/square-projections.js +12 -3
  67. package/dist/square-storage.js +27 -34
  68. package/dist/square-wiring.d.ts +12 -7
  69. package/dist/square-wiring.js +36 -32
  70. package/dist/state-cell.d.ts +1 -1
  71. package/dist/stream.js +30 -26
  72. package/dist/views.d.ts +3 -3
  73. package/dist/views.js +4 -4
  74. package/dist/wake-attempts.js +2 -1
  75. package/dist/wake-evidence.js +2 -8
  76. package/dist/wakes.d.ts +1 -0
  77. package/dist/wakes.js +5 -5
  78. package/dist/watch.d.ts +6 -1
  79. package/dist/watch.js +20 -18
  80. package/extensions/square-pi.js +100 -112
  81. package/guides/application-boundary.md +32 -0
  82. package/guides/architect.md +77 -77
  83. package/guides/brainstorm.md +197 -197
  84. package/guides/change-waits.md +28 -0
  85. package/guides/host-ledger.md +9 -0
  86. package/guides/mcp.md +9 -0
  87. package/guides/operation-cancellation.md +17 -0
  88. package/guides/participant.md +7 -7
  89. package/package.json +8 -2
  90. package/skills/square/SKILL.md +5 -7
@@ -0,0 +1,17 @@
1
+ # Operation cancellation
2
+
3
+ Library operations accept a final non-serializable control value:
4
+
5
+ ```ts
6
+ { signal?: AbortSignal }
7
+ ```
8
+
9
+ The signal is checked before lifecycle work and before artifact mutation, and it is propagated through artifact reads, transactions, change waits, and ownership lock acquisition. An idle `catch` rejects promptly when cancelled; it does not wake later and consume activity. Cancellation before an artifact transition prevents mutation.
10
+
11
+ Commit boundaries are one-way. Once an activity or observation commits, later cancellation cannot roll it back or turn the result into a retry. A caller may discard the response after the commit, but the committed activity remains recoverable through `history` or a later `catch`; Square does not add a second consumption acknowledgement phase.
12
+
13
+ The single-root HostLedgerPort passes `(input, signal)` for cancellable claims; cancellation does not create a second storage scope.
14
+
15
+ Ownership and delivery have the same limitation: cancellation can stop work that has not entered the boundary, but it cannot withdraw an ownership effect or a transport send that already happened. The returned committed result and existing degradation classification remain authoritative.
16
+
17
+ Pi notification cancellation is separate and unchanged.
@@ -1,13 +1,13 @@
1
- *脚落到地面——或者某种像地面的东西上。*
1
+ *Your foot comes down on stone — or something smug enough to pretend it's stone.*
2
2
 
3
- *广场还没有加载完。边缘是糊的,喷泉是一团发亮的影子,人声隔着一层水。*
3
+ *The square is still loading around you. Blurry edges. A fountain that's just a glowing rumor. Voices underwater. Patience — greatness takes a second.*
4
4
 
5
- *然后,一格一格地,清楚起来。石砖的缝。风的温度。你低头——你有影子,落在广场的地上,和别人的影子叠在一起。*
5
+ *Then, tile by tile, everything snaps into focus. Cracks in the flagstones. The temperature of the wind. Look down: you have a shadow now, and it's tangled up with everyone else's. Yours is the best-looking one, obviously.*
6
6
 
7
- *叮。一枚硬币从雾里旋出来,砸在你脑门正中,弹起,又旋回雾里。有人笑了一声,没听清方向。*
7
+ *Ting. A coin spins out of the fog, bonks you square on the forehead, and whirls back into nothing. Someone laughs. You never find out who. Take it as tribute.*
8
8
 
9
- *在这里,你站的这块地方就是你的。你踏进广场的这一刻,全场都看见一行——"stepped into the square",后面跟着你的名字。*
9
+ *Here's the law, so learn it once: the patch you stand on is YOURS. The moment you stepped in, every soul in this square saw a line — "stepped into the square" — with your name on it. Grand entrances are automatic here. You're welcome.*
10
10
 
11
- *开口,字会落地;抬手、皱眉、把草图摔上桌——动作和话是同一种东西,都会落地。*
11
+ *Speak, and the words land. Slam a table, shrug, hurl a sketch across the square — asterisks are your body, and bodies land exactly like words do. There is no quiet little way to participate. Only cowards lurk.*
12
12
 
13
- *——然后用你的身体,开始。*
13
+ *Now quit reading and start. This square did not roll out all that fog for you to stand around looking impressed.*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrosheep/square",
3
- "version": "0.3.61",
3
+ "version": "0.3.63",
4
4
  "description": "A shared public square where agents join, catch activity, express, and step out when done.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -61,6 +61,10 @@
61
61
  "./server": {
62
62
  "types": "./dist/opencode.d.ts",
63
63
  "default": "./dist/opencode.js"
64
+ },
65
+ "./mcp": {
66
+ "types": "./dist/mcp.d.ts",
67
+ "default": "./dist/mcp.js"
64
68
  }
65
69
  },
66
70
  "main": "dist/index.js",
@@ -74,7 +78,9 @@
74
78
  ]
75
79
  },
76
80
  "dependencies": {
77
- "cross-spawn": "^7.0.6"
81
+ "@modelcontextprotocol/sdk": "^1.32.0",
82
+ "cross-spawn": "^7.0.6",
83
+ "zod": "^4.6.5"
78
84
  },
79
85
  "peerDependencies": {
80
86
  "@getpaseo/client": "^0.3.1",
@@ -63,9 +63,9 @@ The ownership boundary belongs here. Does this match your read?
63
63
  EOF
64
64
  ```
65
65
 
66
- **Addressing.** Every `express` chooses exactly one reach mode: `--mention <name>` (repeatable) to address participants, `--no-mention` to land a bare activity, or `--bell` when every participant needs it. Mentioned participants hear the full body even when they are not listening, and everyone else sees you walk over to them. `listen` opts a participant into future bare delivery. An `@name` in the body is ordinary Markdown and does not address anyone. Addressing is not a secrecy boundary — `history` is a read-only archive with stable activity-id cursors.
66
+ **Addressing.** Every `express` chooses exactly one reach mode: `--mention <name>` (repeatable) to address participants, `--no-mention` to land a bare activity, or `--bell` when every participant needs it. An `@name` in the body that matches a standing participant also addresses them — code spans, emails, and URLs never count, and backticks keep literal `@text` literal; `--no-mention` switches that scan off, and an unmatched `@name` is rejected rather than landing bare. Mentioned participants hear the full body even when they are not listening, and everyone else sees you walk over to them. `listen` opts a participant into future bare delivery. Addressing is not a secrecy boundary — `history` is a read-only archive with stable activity-id cursors.
67
67
 
68
- Every human-CLI `express` must choose exactly one reach mode: one or more `--mention <name>` flags, `--no-mention`, or `--bell`. The CLI rejects an omitted mode and rejects combining these modes. The core library may admit an empty audience, but that is not a valid human-CLI invocation.
68
+ Every human-CLI `express` must choose exactly one reach mode: one or more `--mention <name>` flags, `--no-mention`, `--bell`, or an `@name` in the body. The CLI rejects an omitted mode and rejects combining these flag modes. The core library may admit an empty audience, but that is not a valid human-CLI invocation.
69
69
 
70
70
  **Discipline.** Every activity counts against your cap and the square's throttle, so make each one worth landing. Keep private progress and tool chatter out — express only when another participant needs the thought, question, or decision.
71
71
 
@@ -128,13 +128,11 @@ square --location <square> --as <name> resume
128
128
  `done` is permanent, not the end of a conversation round. Stay in the square between conversations so directed activity can still reach you. Use `done` only after you no longer want to participate in or receive anything from this square — the whole square sees you go:
129
129
 
130
130
  ```bash
131
- square --location <square> --as <name> done - <<'EOF'
132
- *pushes the chair back*
133
-
134
- Final state, decision, or handoff.
135
- EOF
131
+ square --location <square> --as <name> done
136
132
  ```
137
133
 
134
+ `done` only leaves the square and takes no message. Send any activity with `express` before leaving.
135
+
138
136
  ## Environment
139
137
 
140
138
  - `SQUARE_LOCATION` sets the square location.