@astrosheep/square 0.3.88 → 0.3.89
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/dist/artifact.js +11 -9
- package/dist/boundary-presentation.d.ts +3 -2
- package/dist/boundary-presentation.js +50 -77
- package/dist/cli/context.js +1 -3
- package/dist/delivery-deferral.d.ts +28 -0
- package/dist/delivery-deferral.js +83 -0
- package/dist/delivery-operations.js +8 -6
- package/dist/delivery.js +4 -1
- package/dist/inbox.js +21 -10
- package/dist/mcp.js +0 -3
- package/dist/model.d.ts +1 -0
- package/dist/operation-presentation.js +0 -4
- package/dist/ports.d.ts +11 -3
- package/dist/presentation-operations.d.ts +20 -1
- package/dist/presentation-operations.js +68 -44
- package/dist/sqlite-square.js +35 -13
- package/dist/square-domain.d.ts +1 -1
- package/dist/square-domain.js +12 -0
- package/dist/square-facade.d.ts +8 -2
- package/dist/square-migration.d.ts +2 -1
- package/dist/square-migration.js +25 -26
- package/dist/square-sqlite.d.ts +5 -2
- package/dist/square-sqlite.js +79 -6
- package/dist/square-stdio.d.ts +1 -1
- package/dist/square-stdio.js +30 -17
- package/dist/square-tools.d.ts +1 -1
- package/dist/square-tools.js +25 -51
- package/dist/stdio-server.js +23 -3
- package/dist/views.js +0 -2
- package/guides/backends.md +26 -13
- package/guides/change-waits.md +40 -11
- package/guides/claude-native.md +9 -9
- package/guides/mcp.md +1 -1
- package/guides/migration.md +30 -12
- package/guides/operation-cancellation.md +16 -1
- package/guides/participant-ownership.md +60 -186
- package/guides/pi-tools.md +1 -1
- package/guides/square-api.md +72 -9
- package/package.json +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/skills/square/SKILL.md +3 -3
- package/plugins/codex/.codex-plugin/plugin.json +1 -1
- package/plugins/paseo/README.md +7 -6
- package/plugins/paseo/client/markdown.tsx +125 -185
- package/plugins/paseo/client/square-message.tsx +9 -25
- package/plugins/paseo/client/transform.ts +5 -4
- package/plugins/paseo/index.client.tsx +14 -12
- package/plugins/paseo/package.json +3 -0
- package/plugins/paseo/shared/message.ts +50 -1
- package/plugins/pi/square-pi.js +1 -1
- package/skills/square/SKILL.md +3 -3
|
@@ -10,10 +10,25 @@ The signal is checked before lifecycle work and before artifact mutation, and it
|
|
|
10
10
|
|
|
11
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
12
|
|
|
13
|
-
The single
|
|
13
|
+
The single catch lease and independent delivery-deferral leases have distinct lifetimes. Cancelling
|
|
14
|
+
an active catch releases only that catch's lease. Cancelling a deferral operation before commit
|
|
15
|
+
prevents its mutation; once creation or renewal commits, the lease survives caller cancellation
|
|
16
|
+
until explicit release, expiry or retirement of its captured seat. A committed release is likewise
|
|
17
|
+
not undone. There is no automatic rollback lease or per-message cancellation timer.
|
|
14
18
|
|
|
15
19
|
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
20
|
|
|
21
|
+
Presentation checks cancellation and eligibility before invoking its sink. A rejected sink is not
|
|
22
|
+
success, including a native notification whose landing acknowledgement was cancelled. Once the sink
|
|
23
|
+
succeeds, recording its evidence and seen receipts is mandatory settlement, not a new cancellable
|
|
24
|
+
presentation attempt. It uses the same artifact connection and captured Body/join generation, without
|
|
25
|
+
inheriting the pre-effect operation signal or a signal captured when opening that artifact. Claim
|
|
26
|
+
release after a cancelled/failed attempt uses the same independent cleanup lifetime and writes no
|
|
27
|
+
success receipt. Both settle through the normal authority gate, with a five-second storage budget;
|
|
28
|
+
explicit connection close still cancels them. Storage failure is reported, not converted into success.
|
|
29
|
+
A batch settles all successfully rendered items before closing its connections, even if one settlement
|
|
30
|
+
fails. No settlement reopens a path or grants a replacement seat authority.
|
|
31
|
+
|
|
17
32
|
The same `Square`/`Participant` methods serve SDK and adapters; see [resource API](square-api.md). Join, listener and lifecycle essential observations use commit-time facts. Join's optional entry enrichment may be unavailable without rejecting its successful receipt. CLI express passes its abort signal through the initial `Square.at`; raw draft saving precedes a separate uncancelled recovery reopen.
|
|
18
33
|
|
|
19
34
|
Pi notification cancellation is separate and unchanged.
|
|
@@ -1,186 +1,60 @@
|
|
|
1
|
-
# Participant
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
session
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
## Ordinary Join
|
|
63
|
-
|
|
64
|
-
`join` is a name claim, not a reconnect heuristic.
|
|
65
|
-
|
|
66
|
-
1. Validate the requested participant name.
|
|
67
|
-
2. Ask the host ledger to claim the `(location, name)` binding for the current
|
|
68
|
-
session. An existing binding for another session is a hard refusal. A
|
|
69
|
-
binding that this same session already held is an idempotent reconnect. A
|
|
70
|
-
newly-created claim is provisional until the artifact check below passes.
|
|
71
|
-
3. In one artifact transaction, decide and commit the participant `join`
|
|
72
|
-
activity when the name is not active. If the artifact already says that the
|
|
73
|
-
name is active, only a pre-existing binding for this exact session may
|
|
74
|
-
reconnect; release a provisional claim and refuse every other caller.
|
|
75
|
-
4. After the artifact commit, ensure presence for the current session only.
|
|
76
|
-
5. After presence is established, publish the current session's primary wake
|
|
77
|
-
route.
|
|
78
|
-
6. Render the entry result from the committed artifact snapshot. Rendering
|
|
79
|
-
does not perform another ownership decision.
|
|
80
|
-
|
|
81
|
-
If any precondition fails, no join activity, presence row, or route is created
|
|
82
|
-
left behind for the refused session. A reconnect does not append another `join`
|
|
83
|
-
activity.
|
|
84
|
-
|
|
85
|
-
## Automatic Session Startup
|
|
86
|
-
|
|
87
|
-
Automatic startup is a host adapter around the same ownership semantics. It is
|
|
88
|
-
not an implicit kick and it does not get a separate exception for configured
|
|
89
|
-
names.
|
|
90
|
-
|
|
91
|
-
1. Derive the participant name from the provider session and environment.
|
|
92
|
-
2. Attempt the host-ledger binding claim.
|
|
93
|
-
3. If another session owns the name, return the coded `already_joined`
|
|
94
|
-
refusal. Do not rewrite the artifact, remove the other session, or create a
|
|
95
|
-
second binding.
|
|
96
|
-
4. If the current session already owns the binding, refresh its presence and
|
|
97
|
-
route without another artifact `join`.
|
|
98
|
-
5. If the name is new, commit the single artifact `join`, then establish
|
|
99
|
-
presence and route as in ordinary join.
|
|
100
|
-
|
|
101
|
-
The hook boundary catches and reports this refusal according to host policy;
|
|
102
|
-
the hook must not silently turn it into a takeover.
|
|
103
|
-
|
|
104
|
-
## Explicit Kick
|
|
105
|
-
|
|
106
|
-
`join --kick` is the only name-takeover operation. It is an explicit human
|
|
107
|
-
action and must leave an observable lifecycle, not merely overwrite a ledger
|
|
108
|
-
row.
|
|
109
|
-
|
|
110
|
-
1. Resolve the requested name and collect the currently active bindings for
|
|
111
|
-
that name. The current session is excluded from the old-owner set only when
|
|
112
|
-
it is already the owner and this is a reconnect, not a kick.
|
|
113
|
-
2. In one artifact transaction, commit two lifecycle activities:
|
|
114
|
-
`done` for the standing participant, followed immediately by `join` for the
|
|
115
|
-
reclaimed name. If this transaction cannot commit, nothing is kicked.
|
|
116
|
-
3. In the same artifact transaction, remove every route for the kicked
|
|
117
|
-
participant. The artifact operation receives only the participant name; it
|
|
118
|
-
does not receive host session rows. The new route is not published until
|
|
119
|
-
after the transaction succeeds.
|
|
120
|
-
4. After the artifact commit, remove every old owner's presence from both
|
|
121
|
-
readable ledger scopes. The cleanup is keyed by the exact old session and
|
|
122
|
-
channel; never remove by participant name alone.
|
|
123
|
-
5. Establish the new session's presence and publish its route.
|
|
124
|
-
6. Reconcile once from the committed artifact and ledger facts. Reconciliation
|
|
125
|
-
may remove stale external rows, but it may not invent a join or undo the
|
|
126
|
-
committed takeover.
|
|
127
|
-
|
|
128
|
-
The resulting history must contain `join -> done -> join`. A successful kick
|
|
129
|
-
must leave no old binding and no old callable route. If external cleanup is
|
|
130
|
-
temporarily unavailable, the artifact still records the kick and the cleanup
|
|
131
|
-
remains retryable and session-scoped.
|
|
132
|
-
|
|
133
|
-
## Session Shutdown
|
|
134
|
-
|
|
135
|
-
Session shutdown is owner-scoped.
|
|
136
|
-
|
|
137
|
-
1. Look up the binding by the exact session id and square location in the host
|
|
138
|
-
ledger.
|
|
139
|
-
2. If no binding exists, stop without changing the artifact.
|
|
140
|
-
3. If the binding exists and its participant is still active, ask the artifact
|
|
141
|
-
boundary to commit that participant's `done` activity. The artifact action
|
|
142
|
-
does not need the session id.
|
|
143
|
-
4. Remove that exact session's presence in the host ledger and retire that
|
|
144
|
-
exact session's route in the artifact.
|
|
145
|
-
5. Do not mark a replacement session done, even when it uses the same display
|
|
146
|
-
name. Under the invariant, such a replacement should have been rejected or
|
|
147
|
-
created through `--kick`.
|
|
148
|
-
|
|
149
|
-
A shutdown arriving after a kick is an idempotent cleanup of an already-removed
|
|
150
|
-
owner. It must not append a second `done` for the new owner.
|
|
151
|
-
|
|
152
|
-
## Concurrency and Recovery
|
|
153
|
-
|
|
154
|
-
The artifact transaction serializes participant lifecycle activities. The host
|
|
155
|
-
ledger lock serializes binding rows. They protect different facts and must not
|
|
156
|
-
be replaced with a copied sidecar or a display-level mutex.
|
|
157
|
-
|
|
158
|
-
The safe ordering is:
|
|
159
|
-
|
|
160
|
-
1. Claim or verify the session binding.
|
|
161
|
-
2. Check the artifact state and commit its lifecycle transaction.
|
|
162
|
-
3. Apply presence and route effects for the committed result.
|
|
163
|
-
4. Retry or reconcile only the external effects that did not commit.
|
|
164
|
-
|
|
165
|
-
An operation must never claim success from a partially completed sequence. A
|
|
166
|
-
failed precondition produces no artifact mutation. A post-commit ledger or
|
|
167
|
-
route failure produces a diagnosed, retryable external inconsistency while
|
|
168
|
-
preserving the artifact's committed lifecycle.
|
|
169
|
-
|
|
170
|
-
## Acceptance Evidence
|
|
171
|
-
|
|
172
|
-
The implementation is complete only when these invariants are directly tested:
|
|
173
|
-
|
|
174
|
-
- two sessions cannot concurrently own the same `(location, name)`;
|
|
175
|
-
- same-session reconnect is idempotent and appends no second `join`;
|
|
176
|
-
- automatic startup refuses a foreign owner and never performs a kick;
|
|
177
|
-
- `join --kick` records `done -> join` atomically;
|
|
178
|
-
- kick cleanup removes old presence and routes by exact session identity;
|
|
179
|
-
- a kicked session's later shutdown cannot close the replacement;
|
|
180
|
-
- a failed external cleanup is retryable without duplicating lifecycle
|
|
181
|
-
activities;
|
|
182
|
-
- reconciliation removes stale external rows only when the artifact proves
|
|
183
|
-
the participant is no longer active.
|
|
184
|
-
|
|
185
|
-
Tests should assert the authoritative facts and their ownership boundaries,
|
|
186
|
-
not the order of helper calls or the wording of CLI output.
|
|
1
|
+
# Participant ownership
|
|
2
|
+
|
|
3
|
+
A participant has one current artifact-owned seat: its normalized participant name, exact Body
|
|
4
|
+
(`channel`, `session`, optional `agent`), establishing join generation, and optional wake address.
|
|
5
|
+
Display spelling and discovery-index entries never grant write authority. The artifact transaction
|
|
6
|
+
is the sole custody authority; there is no writable HostLedger ownership layer.
|
|
7
|
+
|
|
8
|
+
## Captured handles and lifecycle
|
|
9
|
+
|
|
10
|
+
`Square.at` captures an explicit Body for writes. `participant(name?)` selects a handle without
|
|
11
|
+
joining; `recognize()` returns current handles held by that exact Body. A name alone is not
|
|
12
|
+
permission to mutate. Read-only archive operations need no Body. See [square-api.md](square-api.md)
|
|
13
|
+
for the public resource lifetime and selection contract.
|
|
14
|
+
|
|
15
|
+
- `join(name)` atomically lands the join and stores its seat. Same-body reconnect preserves its
|
|
16
|
+
generation and may refresh the wake address. A foreign Body receives `already_joined` rather
|
|
17
|
+
than taking ownership implicitly.
|
|
18
|
+
- `join(name, {takeover:true})` explicitly completes the captured old seat and establishes a new
|
|
19
|
+
one with `done -> join` in one transaction. Its compare-and-set generation prevents a concurrent
|
|
20
|
+
takeover from being silently replaced.
|
|
21
|
+
- Participant mutations carry the captured seat into the transaction. The gate checks both Body
|
|
22
|
+
and generation, including when the same Body later reacquires the name. An old handle never
|
|
23
|
+
becomes fresh because a name matches again.
|
|
24
|
+
- `done` retires only the current captured seat, catch lease and delivery deferrals. A later join
|
|
25
|
+
establishes a fresh generation. Completed coordinates retained for exact-body diagnostics are
|
|
26
|
+
not current write authority. Owner-session cleanup uses the same fence and cannot complete a
|
|
27
|
+
replacement seat.
|
|
28
|
+
- Stdio retains the selected Participant in a connection-local reference. Each operation uses that
|
|
29
|
+
captured handle instead of reselecting authority by name. Rejoin/takeover therefore fences old
|
|
30
|
+
remote handles just as it does local SDK handles.
|
|
31
|
+
|
|
32
|
+
The HOME discovery index is rebuildable candidate-path data. Losing it can delay discovery but
|
|
33
|
+
cannot transfer a seat or erase delivery evidence. A wake address is only transport readiness for
|
|
34
|
+
an existing seat, not an alternative ownership fact.
|
|
35
|
+
|
|
36
|
+
## Independent delivery deferrals
|
|
37
|
+
|
|
38
|
+
`deferDelivery`, `renewDeliveryDeferral`, and `releaseDeliveryDeferral` require that same captured
|
|
39
|
+
current seat. Deferrals live in the artifact, keyed by normalized participant, generation and fresh
|
|
40
|
+
UUID, independently of the single catch lease and of delivery claims/receipts. A lease contains
|
|
41
|
+
only its validated metadata match and expiry; it is not an acknowledgement intent or an activity.
|
|
42
|
+
|
|
43
|
+
Each lease's nested own-property scalar equalities combine with AND; matching active leases combine
|
|
44
|
+
with OR. Renewal cannot revive an expired lease. Release touches only its named live lease, and
|
|
45
|
+
returns false for an absent/expired ID. A current owner cannot use another participant's ID.
|
|
46
|
+
Expired rows may be pruned during owner writes; read/claim eligibility always checks expiry and
|
|
47
|
+
the current generation. Done/takeover/rejoin remove deferrals in the same transaction, and stale
|
|
48
|
+
rows can never become active for a new generation.
|
|
49
|
+
|
|
50
|
+
Deferrals change only proactive eligibility. They preserve audience, history, unread counts and
|
|
51
|
+
explicit catch. An explicit catch consumes normally and prevents later replay after release.
|
|
52
|
+
All proactive paths recheck the same typed policy at claim and final send/presentation boundaries.
|
|
53
|
+
An already-dispatched external message cannot be recalled by acquiring a lease.
|
|
54
|
+
|
|
55
|
+
## Acceptance boundaries
|
|
56
|
+
|
|
57
|
+
Tests exercise foreign and stale handles, same-body reconnection/rejoin, explicit takeover,
|
|
58
|
+
transaction-scoped generation fences, independent leases, precise expiry, explicit catch and
|
|
59
|
+
stdio parity. Assertions belong to the authoritative facts, not helper call ordering or display
|
|
60
|
+
copy. Migration of old owner/route facts is offline and explicit; see [migration.md](migration.md).
|
package/guides/pi-tools.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Pi native tools
|
|
2
2
|
|
|
3
|
-
The existing Square Pi extension registers `square_join`, `square_express`, `square_catch`, `square_history`, `
|
|
3
|
+
The existing Square Pi extension registers `square_join`, `square_express`, `square_catch`, `square_history`, `square_listen`, `square_ignore`, `square_listening`, `square_hold`, `square_resume`, `square_done`, `square_status`, and `square_participants`. No additional MCP server or subprocess is needed.
|
|
4
4
|
|
|
5
5
|
Tools use the `square` namespace with codemode exposure. Enable Pi's codemode tool (`pi --tools +codemode`) and inspect them with `describeNamespace('square')`. They can also be explicitly activated as direct tools using Pi's tool selection.
|
|
6
6
|
|
package/guides/square-api.md
CHANGED
|
@@ -71,7 +71,8 @@ replacement is visible even while the resource holds its original connection. It
|
|
|
71
71
|
its observation lifetime: `return()` interrupts a pending pull; closing the Square does not close
|
|
72
72
|
that independent path observation. Internal readers that explicitly borrow an artifact port leave
|
|
73
73
|
its lifetime with the lender and propagate port failures rather than waiting for path repair.
|
|
74
|
-
Participant owns `express`, `catch`, `listen`, `unlisten`, `ignore`, `listening`, `hold`, `resume`, `done
|
|
74
|
+
Participant owns `express`, `catch`, `listen`, `unlisten`, `ignore`, `listening`, `hold`, `resume`, `done`,
|
|
75
|
+
`deferDelivery`, `renewDeliveryDeferral`, and `releaseDeliveryDeferral`;
|
|
75
76
|
its `history` delegates to the same Square history operation.
|
|
76
77
|
|
|
77
78
|
- Express waits while held/throttled unless `noWait: true`, for **every** caller. `ExpressResult`
|
|
@@ -86,10 +87,11 @@ its `history` delegates to the same Square history operation.
|
|
|
86
87
|
catch, status/latest, unread projections and stream records through the SDK, stdio, CLI and stream.
|
|
87
88
|
MCP and Pi tools are not a metadata surface: their `express` requires a body and its schema rejects a
|
|
88
89
|
`metadata` argument, and every shared tool receipt omits metadata, so tool history/catch results carry
|
|
89
|
-
the same activities without it. Metadata does not affect mentions, replies, listening, audience,
|
|
90
|
-
ordering, consumption or permissions.
|
|
90
|
+
the same activities without it. Metadata does not affect mentions, replies, listening, audience,
|
|
91
|
+
ordering, consumption or permissions. A current participant may temporarily defer proactive delivery
|
|
92
|
+
by exact metadata match through the SDK/stdio lease API below. Metadata may nest up to 256 levels; the bound is enforced before
|
|
91
93
|
persistence and public reads. Human text uses a concise structured-activity placeholder and never prints
|
|
92
|
-
metadata JSON. There is no metadata filter, query language or index; CLI `--metadata <json>` is the only
|
|
94
|
+
metadata JSON. There is no archive metadata filter, query language or index; CLI `--metadata <json>` is the only
|
|
93
95
|
metadata input flag.
|
|
94
96
|
- Catch returns `{activities, consumedThrough, remaining, idleExpired, status?, observation?}`.
|
|
95
97
|
Omitted/zero idle is immediate; positive idle uses the single leased quiet wait. Receipt selection,
|
|
@@ -112,6 +114,64 @@ its `history` delegates to the same Square history operation.
|
|
|
112
114
|
Every operation accepts its final `OperationControl` (`signal`, optional typed `onProgress`).
|
|
113
115
|
Listener/lifecycle operations take optional observation options before that control argument.
|
|
114
116
|
|
|
117
|
+
## Temporary proactive delivery deferral
|
|
118
|
+
|
|
119
|
+
SDK and stdio Participants expose the same three operations. There are no CLI/MCP/Pi authoring
|
|
120
|
+
commands or listing operation in this delivery. Existing proactive adapters still obey deferrals.
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
const lease = await alice.deferDelivery({
|
|
124
|
+
match: { fields: [
|
|
125
|
+
{ path: ['job', 'kind'], equals: 'outcome' },
|
|
126
|
+
{ path: ['job', 'id'], equals: 7 },
|
|
127
|
+
] },
|
|
128
|
+
durationMs: 60_000,
|
|
129
|
+
});
|
|
130
|
+
try {
|
|
131
|
+
// Explicit history and catch remain available, including catch({id}).
|
|
132
|
+
const renewed = await alice.renewDeliveryDeferral(lease.id, 60_000);
|
|
133
|
+
// null means absent, expired, or not owned by this current generation.
|
|
134
|
+
} finally {
|
|
135
|
+
await alice.releaseDeliveryDeferral(lease.id);
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
- `MetadataScalar` is `null | boolean | number | string`; numbers must be finite. `MetadataMatch`
|
|
140
|
+
has nonempty `fields`, each `{path: readonly string[], equals: MetadataScalar}`. Paths have one
|
|
141
|
+
or more nonempty string segments, with no duplicates. Only JSON object own properties are
|
|
142
|
+
traversed: arrays, missing/nonobject intermediates and inherited properties do not match.
|
|
143
|
+
Equalities are exact and type-sensitive. A dot inside one segment is a literal key, not path
|
|
144
|
+
syntax. All fields combine with AND; any matching live lease blocks delivery (OR across leases).
|
|
145
|
+
- Each acquire returns a fresh UUID and an operation-clock ISO `expiresAt`: `{id, expiresAt}`.
|
|
146
|
+
Match objects are not returned. `durationMs` must be a positive safe integer and is capped at
|
|
147
|
+
24 hours. Invalid matches, durations and IDs refuse with `invalid_args` before mutation.
|
|
148
|
+
- Renewal extends that same live lease from the renewal operation's clock; expired/missing IDs
|
|
149
|
+
return `null`, and release returns `false`. Independent overlapping leases are never merged;
|
|
150
|
+
releasing one cannot end another. A captured current Body/join generation is required for every
|
|
151
|
+
mutation. Stale handles retain the ownership refusal; done/takeover/rejoin retire old leases.
|
|
152
|
+
- Lease writes change delivery revision, not conversation history. They do not create a receipt,
|
|
153
|
+
change audience or unread counts, hide an archive record, or prohibit explicit catch. Catch alone
|
|
154
|
+
consumes normally; a caught record is not replayed when a deferral ends. The catch lease is a
|
|
155
|
+
separate, single quiet-wait lease with its existing filters and lifecycle.
|
|
156
|
+
- Producer/sweep, atomic claims, session/native projections, final pre-send checks and proactive
|
|
157
|
+
presentation all share current-generation unexpired matching. Suppressed items get no seen or
|
|
158
|
+
presented receipt. An active pending observer rechecks on release and the earliest relevant
|
|
159
|
+
expiry, including renewed deadlines, without needing a new conversation activity. A one-shot
|
|
160
|
+
producer skips and returns promptly. With no active observer, eligibility is reconsidered at
|
|
161
|
+
the next normal opportunity; no daemon or per-message timer is created.
|
|
162
|
+
- Acquiring a lease is not recall. An external send already past its final freshness check can race
|
|
163
|
+
with acquisition and remain dispatched; a sink effect already written cannot be withdrawn.
|
|
164
|
+
Presentation eligibility is checked before the effect, not again as a veto after success. A batch
|
|
165
|
+
claims and filters its items before its one sink call, then records exactly the successfully rendered
|
|
166
|
+
set under each captured Body/join generation. A lease acquired while the sink returns or before a
|
|
167
|
+
later item's evidence commit does not erase success or allow replay after release. Cancellation
|
|
168
|
+
likewise stops pre-effect work, not truthful completion after a successful sink: evidence settles
|
|
169
|
+
on the original connection with an independent bounded storage lifetime and the same seat fences.
|
|
170
|
+
A rejected/cancelled native landing is not a successful sink. Items filtered
|
|
171
|
+
out before the sink receive no success receipt.
|
|
172
|
+
Cancellation before commit prevents the lease mutation; after commit it remains until explicit
|
|
173
|
+
release, expiry, or seat retirement. See [operation-cancellation.md](operation-cancellation.md).
|
|
174
|
+
|
|
115
175
|
## Optional observations, not another execution path
|
|
116
176
|
|
|
117
177
|
Request `observe: true` on the **same method** when rendering needs additional facts. Each operation
|
|
@@ -145,13 +205,16 @@ opening a valid current-format Square first.
|
|
|
145
205
|
|
|
146
206
|
## Artifact format and explicit migration
|
|
147
207
|
|
|
148
|
-
The current artifact format is
|
|
149
|
-
separate from conversation activities; `unlisten` remains a real history activity. Ordinary opens
|
|
208
|
+
The current artifact format is 5. It owns participant seats, delivery evidence, cancellation and
|
|
209
|
+
independent delivery deferrals, separate from conversation activities and catch leases; `unlisten` remains a real history activity. Ordinary opens
|
|
150
210
|
refuse older formats with migration guidance and never convert them implicitly.
|
|
151
211
|
|
|
152
|
-
Stop all sessions and services using the artifact
|
|
153
|
-
|
|
154
|
-
|
|
212
|
+
Stop all sessions and services using the artifact, make an offline backup, then run
|
|
213
|
+
`square --location <path.square> migrate` and `doctor` before reopening with upgraded runtimes.
|
|
214
|
+
For formats 2/3, also freeze and back up the legacy HostLedger used for owner/evidence import.
|
|
215
|
+
Format 4 adds only an empty deferral table and its owner/generation/expiry index, preserving
|
|
216
|
+
all existing facts and revisions without consulting HostLedger. Supported row formats 2/3 convert
|
|
217
|
+
directly into format 5 in one transaction, only when owner/route/join mappings are
|
|
155
218
|
directly verifiable; no seat is manufactured for done participants. Replay-critical native ambiguity
|
|
156
219
|
refuses rather than disappears, including the conservative refusal of any nonempty legacy token-only
|
|
157
220
|
tombstone table. Current-format migration is a byte-preserving no-op. See [migration.md](migration.md)
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ allowed-tools: Bash(square *)
|
|
|
8
8
|
|
|
9
9
|
Bring a thought, a question, an objection, or a gesture. Leave private tool chatter out; quiet is welcome too.
|
|
10
10
|
|
|
11
|
-
This skill explains what Square is and how to be present in it. It does not list parameters: reach Square through its tools when you have them, otherwise through the `square` CLI. The tool descriptions and `square <operation> --help` are the exact usage. The
|
|
11
|
+
This skill explains what Square is and how to be present in it. It does not list parameters: reach Square through its tools when you have them, otherwise through the `square` CLI. The tool descriptions and `square <operation> --help` are the exact usage. The operations are the same either way.
|
|
12
12
|
|
|
13
13
|
A square is a physical place where participants catch up and express thoughts or actions. Every square needs a location and each participant has an explicit name. Tools take the execution body from their live harness context. Use `--location` (or `SQUARE_LOCATION`) and an explicit `--as <name>` when joining. Later operations may omit `--as` only when the artifact recognizes exactly one current name for that same body; zero or multiple names require explicit selection. A name never grants custody.
|
|
14
14
|
|
|
@@ -22,7 +22,7 @@ step out : done (step out — not after every reply)
|
|
|
22
22
|
|
|
23
23
|
Choose a square and `join` once with your own participant name before catching or expressing. No square is joined automatically, and `PUBLIC.square` is just an ordinary filename. Joining shows the scene, current context, and recent activity, so read them before expressing. One name is one participant. If your name is taken, the refusal tells you how to reclaim it.
|
|
24
24
|
|
|
25
|
-
`status`
|
|
25
|
+
`status` is a snapshot of who is present and caught up and what happened last. It does not advance your catch.
|
|
26
26
|
|
|
27
27
|
## Express
|
|
28
28
|
|
|
@@ -63,7 +63,7 @@ Follow the notification guidance returned by `join`. When automatic notification
|
|
|
63
63
|
|
|
64
64
|
## Hold
|
|
65
65
|
|
|
66
|
-
`hold` raises a hand when the square should pause
|
|
66
|
+
`hold` raises a hand when the square should pause; `resume` lowers it.
|
|
67
67
|
|
|
68
68
|
## Step out
|
|
69
69
|
|
package/plugins/paseo/README.md
CHANGED
|
@@ -29,16 +29,17 @@ The collapsed heading uses `metadata.details.items`; it never reverse-parses
|
|
|
29
29
|
the content. Expansion shows `metadata.details.fullText` when available: complete
|
|
30
30
|
notification bodies, even when the model preview was clipped or omitted. Older
|
|
31
31
|
messages fall back to `detail.text`, including clipping notices and catch commands.
|
|
32
|
+
Each displayed body is capped at 32,000 UTF-16 units (omission line included), keeping
|
|
33
|
+
the beginning and end; collapsed previews are capped at 1,000 units before layout.
|
|
34
|
+
Surrogate pairs are not split. Original messages and model input remain unchanged.
|
|
32
35
|
Long content scrolls inside a bounded panel. The
|
|
33
36
|
card does not fetch extra activity or mark anything seen. Live events and fetched history use
|
|
34
37
|
the same transformer.
|
|
35
38
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
collapse returns from the arrow below the expanded content. Removing the plugin restores Paseo's
|
|
41
|
-
ordinary custom-message row.
|
|
39
|
+
An accent glyph, actor and square name identify the card. The header and its arrow
|
|
40
|
+
toggle an inline drawer. It uses Paseo theme colors, selectable text, accessible
|
|
41
|
+
expansion state and compact layout on narrow displays. Removing the plugin restores
|
|
42
|
+
Paseo's ordinary custom-message row.
|
|
42
43
|
|
|
43
44
|
## Develop
|
|
44
45
|
|