@astrosheep/square 0.3.103 → 0.3.105

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.
@@ -8,7 +8,9 @@ export declare function renderPendingAtBoundary(inbox: PendingMembership[]): str
8
8
  * `lookup` returns the session's memberships for this boundary. It may reuse an observation it has
9
9
  * verified against the current presence binding and artifact revision; the boundary still projects
10
10
  * presentation evidence live. Every item is claimed and revalidated before the batch sink;
11
- * after success, captured-seat commits record only its included items without an eligibility veto.
11
+ * after success, captured-seat commits record the winning batch, including budget omissions as
12
+ * clipped (no consumption receipt), without an eligibility veto. Coverage is conservative if a
13
+ * competing claim's removal lets a previously omitted body fit in the final preview.
12
14
  * A source that cannot verify its reuse must read the inbox again.
13
15
  */
14
16
  export declare function presentPendingAtBoundary<T>(identity: Owner, present: (context: string, delivered: PendingMembership[]) => T | Promise<T>, lookup?: (identity: Owner, env?: NodeJS.ProcessEnv, signal?: AbortSignal) => Promise<PendingMembership[]> | PendingMembership[], env?: NodeJS.ProcessEnv, signal?: AbortSignal): Promise<T | undefined>;
@@ -17,11 +17,14 @@ function renderBoundary(inbox) {
17
17
  const agoraBlocks = [];
18
18
  const deliveries = [];
19
19
  let remainingAgora = queued.filter(({ notification }) => notification.delivery?.mode !== 'direct').length;
20
- const complete = [];
20
+ const entries = [];
21
21
  let omitted = 0;
22
22
  const omission = (count) => `${count} more ${count === 1 ? 'activity' : 'activities'} not shown.`;
23
23
  for (const entry of queued) {
24
24
  const { membership, notification } = entry;
25
+ // The omission line represents the rest of this batch too, but never consumes its bodies.
26
+ const coverage = { membership, actIndex: notification.actIndex, markSeen: false };
27
+ entries.push(coverage);
25
28
  const block = renderAttentionPreview({
26
29
  squarePath: membership.location,
27
30
  actIndex: notification.actIndex,
@@ -43,15 +46,11 @@ function renderBoundary(inbox) {
43
46
  }
44
47
  blocks.push(block);
45
48
  deliveries.push(notification.delivery);
46
- complete.push({
47
- membership,
48
- actIndex: notification.actIndex,
49
- markSeen: !attentionBodyIsClipped(notification.body, notification.delivery),
50
- });
49
+ coverage.markSeen = !attentionBodyIsClipped(notification.body, notification.delivery);
51
50
  }
52
51
  return {
53
52
  context: renderSquareReminder([...blocks, ...(omitted > 0 ? [omission(omitted)] : [])], deliveries),
54
- complete,
53
+ entries,
55
54
  };
56
55
  }
57
56
  async function presentPendingAtBoundaryUnlocked(identity, present, lookup = sessionInbox, env = process.env, signal) {
@@ -66,7 +65,7 @@ async function presentPendingAtBoundaryUnlocked(identity, present, lookup = sess
66
65
  try {
67
66
  try {
68
67
  // Enumeration owns discovery/connections only; returned handles belong to the common runner.
69
- for (const entry of renderBoundary(pending).complete) {
68
+ for (const entry of renderBoundary(pending).entries) {
70
69
  const { location, seat } = entry.membership;
71
70
  let artifact = artifacts.get(location);
72
71
  if (artifact === undefined) {
@@ -90,10 +89,7 @@ async function presentPendingAtBoundaryUnlocked(identity, present, lookup = sess
90
89
  const delivered = pending.map(membership => ({ ...membership,
91
90
  notifications: membership.notifications.filter(note => eligible.has(pendingKey(membership, note.actIndex))),
92
91
  })).filter(membership => membership.notifications.length > 0);
93
- const fresh = renderBoundary(delivered);
94
- const included = new Set(fresh.complete.map(entry => pendingKey(entry.membership, entry.actIndex)));
95
- return { payload: { context: fresh.context, delivered },
96
- included: claims.filter(({ key }) => included.has(key)).map(({ claim }) => claim) };
92
+ return { payload: { context: renderBoundary(delivered).context, delivered }, included: eligibleClaims };
97
93
  }, payload => present(payload.context, payload.delivered), { signal });
98
94
  if (report.observation.kind === 'threw')
99
95
  throw report.observation.error;
@@ -112,7 +108,9 @@ async function presentPendingAtBoundaryUnlocked(identity, present, lookup = sess
112
108
  * `lookup` returns the session's memberships for this boundary. It may reuse an observation it has
113
109
  * verified against the current presence binding and artifact revision; the boundary still projects
114
110
  * presentation evidence live. Every item is claimed and revalidated before the batch sink;
115
- * after success, captured-seat commits record only its included items without an eligibility veto.
111
+ * after success, captured-seat commits record the winning batch, including budget omissions as
112
+ * clipped (no consumption receipt), without an eligibility veto. Coverage is conservative if a
113
+ * competing claim's removal lets a previously omitted body fit in the final preview.
116
114
  * A source that cannot verify its reuse must read the inbox again.
117
115
  */
118
116
  export async function presentPendingAtBoundary(identity, present, lookup = sessionInbox, env = process.env, signal) {
@@ -10,7 +10,10 @@ Pi injection and external wake injection acquire mutually exclusive artifact-own
10
10
  An accepted or uncertain Paseo wake suppresses native Pi reinjection without asserting presentation
11
11
  or consumption. Only proven failed/released attempts can return to the automatic queue. Missing
12
12
  landing events, thrown sinks and expired claims do not authorize replay. Renderer details describe
13
- only the batch that won custody, not the earlier observed inbox. See `delivery-primitives.md`.
13
+ only the batch that won custody, not the earlier observed inbox. Budget-omitted activities belong to
14
+ that same delivered batch: the omission line settles their presentation as `clipped`, without a
15
+ full-consumption receipt. They stay available to explicit catch, but never get paged into later
16
+ model completions or replayed on extension reload. See `delivery-primitives.md`.
14
17
 
15
18
  For independent existing-session delivery, opt into its local receiver:
16
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrosheep/square",
3
- "version": "0.3.103",
3
+ "version": "0.3.105",
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": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "square",
3
- "version": "0.3.103",
3
+ "version": "0.3.105",
4
4
  "description": "Native Claude Code inbox delivery for Square participants",
5
5
  "types": "./types.d.ts",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "square",
3
- "version": "0.3.103",
3
+ "version": "0.3.105",
4
4
  "description": "Shared Square activity with reliable participant attention at Codex boundaries.",
5
5
  "author": {
6
6
  "name": "Square"
@@ -1,10 +1,10 @@
1
1
  import type { PluginTheme } from "@getpaseo/plugin";
2
2
 
3
3
  /**
4
- * Square's message card is a square-edged matte paper slip next to the timeline's
5
- * frosted glass instruments: near-square corners, a square seal ■, a thin quote
4
+ * Square's message card is a matte slate slip in one family with the timeline's
5
+ * meantime rail and notesoup paper: the shared 4px corner, a square seal ■, a thin quote
6
6
  * guide under the header. No glass sheen, no stone texture, no bottom cut —
7
- * the card earns its identity from geometry, not decoration.
7
+ * the card earns its identity from colour and the seal, not decoration.
8
8
  */
9
9
  const DARK = {
10
10
  surface0: "#14161a", // inset / code
@@ -57,7 +57,7 @@ export function squarePalette(theme: PluginTheme): SquarePalette {
57
57
  statusWarning: theme.colors.statusWarning,
58
58
  statusDanger: theme.colors.statusDanger,
59
59
  } },
60
- card: { borderRadius: 2, borderWidth: 0.5, boxShadow: "none" },
60
+ card: { borderRadius: 4, borderWidth: 0.5, boxShadow: "none" },
61
61
  seal: { borderRadius: 0 },
62
62
  quote: { borderLeftWidth: 1, borderLeftColor: dark ? "#45535e" : "#c2cdd5", paddingLeft: 9 },
63
63
  };
@@ -7,8 +7,8 @@ import { MONO, SquareCue, SquareInline, SquareMarkdownBody } from "./markdown";
7
7
  import { squarePalette } from "./palette";
8
8
 
9
9
  /**
10
- * A square-edged matte slip next to the frosted glass instruments: near-square
11
- * corners, square seal ■, thin quote guide under the header.
10
+ * A matte slate slip in the timeline's shared 4px-corner family: square seal ■,
11
+ * thin quote guide under the header.
12
12
  * Header (both states): ■ square · who spoke … act ids · how many.
13
13
  * Collapsed: two preview lines. Expanded: the whole scene, at full width.
14
14
  * Each structured message keeps its own sender, activity id and body.