@astrosheep/square 0.3.37 → 0.3.38
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/claude-plugin/.claude-plugin/plugin.json +1 -1
- package/codex-plugin/.codex-plugin/plugin.json +1 -1
- package/codex-plugin/hooks/hooks.json +1 -2
- package/dist/attention-presentation.d.ts +1 -1
- package/dist/attention-presentation.js +1 -2
- package/dist/boundary-presentation.js +3 -0
- package/dist/delivery-operations.js +1 -1
- package/dist/notifications.js +1 -1
- package/dist/ports.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { homedir } from 'node:os';
|
|
|
2
2
|
import { notificationMessageId } from './delivery.js';
|
|
3
3
|
import { participantIdentity } from './presentation.js';
|
|
4
4
|
import { formatActivityId } from './square-core.js';
|
|
5
|
-
export const ATTENTION_BODY_MAX =
|
|
5
|
+
export const ATTENTION_BODY_MAX = 100;
|
|
6
6
|
export function previewAttentionBody(body) {
|
|
7
7
|
const compact = body.replace(/\r\n/g, '\n');
|
|
8
8
|
if (compact.length <= ATTENTION_BODY_MAX)
|
|
@@ -23,6 +23,5 @@ export function renderAttentionPreview(attention) {
|
|
|
23
23
|
return [
|
|
24
24
|
`${id}: ${participantIdentity(attention.recipient)} from ${participantIdentity(attention.actor)} (${attentionKind})`,
|
|
25
25
|
previewAttentionBody(normalizedBody),
|
|
26
|
-
...(normalizedBody.length <= ATTENTION_BODY_MAX ? ['✓ shown in full'] : []),
|
|
27
26
|
].join('\n');
|
|
28
27
|
}
|
|
@@ -39,6 +39,7 @@ function renderBoundary(inbox) {
|
|
|
39
39
|
const blocks = [];
|
|
40
40
|
const complete = [];
|
|
41
41
|
let omitted = 0;
|
|
42
|
+
const duplicateHint = 'ignore if you have already seen this.';
|
|
42
43
|
for (const [index, entry] of queued.entries()) {
|
|
43
44
|
const { membership, notification } = entry;
|
|
44
45
|
const block = [
|
|
@@ -59,6 +60,7 @@ function renderBoundary(inbox) {
|
|
|
59
60
|
...(omittedAfter > 0
|
|
60
61
|
? [`… ${omittedAfter} unread ${omittedAfter === 1 ? 'notification' : 'notifications'} omitted.`]
|
|
61
62
|
: []),
|
|
63
|
+
duplicateHint,
|
|
62
64
|
...footer,
|
|
63
65
|
].join('\n');
|
|
64
66
|
if (prospective.length > CONTEXT_MAX) {
|
|
@@ -79,6 +81,7 @@ function renderBoundary(inbox) {
|
|
|
79
81
|
...(omitted > 0
|
|
80
82
|
? [`… ${omitted} unread ${omitted === 1 ? 'notification' : 'notifications'} omitted.`]
|
|
81
83
|
: []),
|
|
84
|
+
duplicateHint,
|
|
82
85
|
...footer,
|
|
83
86
|
].join('\n'),
|
|
84
87
|
complete,
|
|
@@ -125,7 +125,7 @@ export async function deliverPending(input) {
|
|
|
125
125
|
continue;
|
|
126
126
|
}
|
|
127
127
|
const attemptN = attempts.reduce((highest, record) => Math.max(highest, record.attemptN ?? 0), 0) + 1;
|
|
128
|
-
const request = { location: input.location, participant: membership.recipient, activity, route: requestRoute };
|
|
128
|
+
const request = { location: input.location, participant: membership.recipient, activity, actor: notification.item.actor, route: requestRoute };
|
|
129
129
|
let outcome;
|
|
130
130
|
const claim = await input.hostLedger.claimEvidence({ location: input.location, participant: membership.recipient, session: route.session, activity, kind: 'wake', leaseMs, now: input.now });
|
|
131
131
|
if (claim.status !== 'acquired') {
|
package/dist/notifications.js
CHANGED
|
@@ -33,7 +33,7 @@ function renderWakePayload(request) {
|
|
|
33
33
|
return [
|
|
34
34
|
`<system-reminder source="square" wake="${wakeLabel(request.route.kind)}">`,
|
|
35
35
|
`square: ${displayAttentionPath(request.location)}`,
|
|
36
|
-
`attention: ${request.activity} for ${request.participant}`,
|
|
36
|
+
`attention: ${request.activity} for ${request.participant} from ${request.actor}`,
|
|
37
37
|
'</system-reminder>',
|
|
38
38
|
].join('\n');
|
|
39
39
|
}
|
package/dist/ports.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export interface WakeRequest {
|
|
|
30
30
|
readonly location: string;
|
|
31
31
|
readonly participant: string;
|
|
32
32
|
readonly activity: string;
|
|
33
|
+
readonly actor: string;
|
|
33
34
|
readonly route: WakeRoute;
|
|
34
35
|
}
|
|
35
36
|
/** Executor-neutral presentation capability; intentionally separate from wake transport. */
|