@astrosheep/square 0.3.70 → 0.3.72
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/activity-feed.d.ts +4 -5
- package/dist/activity-feed.js +14 -10
- package/dist/artifact.d.ts +26 -33
- package/dist/artifact.js +346 -317
- package/dist/attention-presentation.js +2 -9
- package/dist/automatic-session.js +6 -6
- package/dist/boundary-presentation.js +3 -3
- package/dist/catch-decisions.d.ts +19 -12
- package/dist/catch-decisions.js +32 -68
- package/dist/claude-delivery.js +7 -7
- package/dist/claude-mod.js +18 -7
- package/dist/cli/catch-presentation.d.ts +7 -0
- package/dist/cli/catch-presentation.js +55 -0
- package/dist/cli/context.d.ts +1 -1
- package/dist/cli/context.js +5 -23
- package/dist/cli/express-presentation.d.ts +10 -0
- package/dist/cli/express-presentation.js +196 -0
- package/dist/cli/maintenance-commands.d.ts +4 -0
- package/dist/cli/maintenance-commands.js +29 -6
- package/dist/cli/observation-commands.d.ts +7 -5
- package/dist/cli/observation-commands.js +275 -262
- package/dist/cli/program.d.ts +1 -1
- package/dist/cli/program.js +43 -56
- package/dist/cli/registry.js +2 -1
- package/dist/cli/square-commands.d.ts +3 -9
- package/dist/cli/square-commands.js +134 -255
- package/dist/codex-queue.js +4 -1
- package/dist/decisions.d.ts +26 -74
- package/dist/decisions.js +190 -335
- package/dist/delivery-health.js +13 -22
- package/dist/delivery-operations.d.ts +0 -11
- package/dist/delivery-operations.js +44 -33
- package/dist/delivery.d.ts +33 -32
- package/dist/delivery.js +70 -81
- package/dist/help.js +6 -1
- package/dist/inbox.d.ts +27 -0
- package/dist/inbox.js +55 -18
- package/dist/index.d.ts +2 -4
- package/dist/index.js +1 -1
- package/dist/list.d.ts +7 -1
- package/dist/list.js +49 -122
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +7 -37
- package/dist/model.d.ts +4 -44
- package/dist/model.js +1 -3
- package/dist/notifications.d.ts +1 -1
- package/dist/notifications.js +13 -7
- package/dist/open-square.d.ts +16 -2
- package/dist/open-square.js +40 -1
- package/dist/packages/agent-delivery/src/claude.d.ts +2 -11
- package/dist/packages/agent-delivery/src/index.d.ts +2 -42
- package/dist/packages/agent-delivery/src/opencode.d.ts +2 -11
- package/dist/packages/agent-delivery/src/paseo.d.ts +2 -13
- package/dist/packages/agent-delivery/src/pi-client.d.ts +2 -9
- package/dist/packages/agent-delivery/src/types.d.ts +42 -0
- package/dist/participant-host.d.ts +6 -3
- package/dist/participant-host.js +44 -38
- package/dist/perception-projection.d.ts +6 -15
- package/dist/perception-projection.js +6 -26
- package/dist/plugins/opencode/delivery.js +9 -9
- package/dist/plugins/opencode/index.js +3 -3
- package/dist/ports.d.ts +156 -11
- package/dist/presentation-operations.d.ts +1 -1
- package/dist/presentation-operations.js +35 -44
- package/dist/presentation.d.ts +12 -19
- package/dist/presentation.js +33 -54
- package/dist/registry.d.ts +2 -0
- package/dist/registry.js +1 -1
- package/dist/routes.d.ts +7 -14
- package/dist/routes.js +34 -72
- package/dist/runtime.d.ts +12 -39
- package/dist/runtime.js +33 -164
- package/dist/square-actions.d.ts +11 -21
- package/dist/square-actions.js +171 -275
- package/dist/square-application.d.ts +31 -55
- package/dist/square-application.js +625 -141
- package/dist/square-core.d.ts +3 -94
- package/dist/square-core.js +8 -353
- package/dist/square-domain.d.ts +24 -0
- package/dist/square-domain.js +77 -0
- package/dist/square-facade.d.ts +360 -9
- package/dist/square-migration.d.ts +24 -0
- package/dist/square-migration.js +211 -0
- package/dist/square-projections.d.ts +2 -42
- package/dist/square-projections.js +1 -37
- package/dist/square-sqlite.d.ts +59 -0
- package/dist/square-sqlite.js +702 -0
- package/dist/stream.d.ts +3 -10
- package/dist/stream.js +81 -52
- package/dist/views.d.ts +27 -95
- package/dist/views.js +217 -87
- package/dist/wake-eligibility.d.ts +15 -5
- package/dist/wake-eligibility.js +32 -16
- package/dist/wakes.d.ts +3 -3
- package/dist/wakes.js +31 -27
- package/guides/application-facade-delivery-evidence.md +200 -0
- package/guides/application-facade-design.md +95 -0
- package/guides/change-waits.md +4 -4
- package/guides/migration.md +77 -0
- package/guides/postcommit-simplification-performance.md +36 -0
- package/guides/primitive-catch-consolidation.md +85 -0
- package/guides/primitive-history-consolidation.md +76 -0
- package/guides/primitive-status-consolidation.md +87 -0
- package/guides/primitive-storage-consolidation.md +128 -0
- package/guides/row-runtime-delivery-evidence.md +160 -0
- package/guides/row-storage-design.md +567 -0
- package/package.json +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/codex/.codex-plugin/plugin.json +1 -1
- package/plugins/opencode/delivery.ts +11 -11
- package/plugins/opencode/index.ts +3 -3
- package/plugins/paseo/client/square-message.tsx +77 -64
- package/plugins/paseo/shared/message.ts +16 -0
- package/plugins/pi/square-pi.js +5 -1
- package/dist/activity.d.ts +0 -14
- package/dist/activity.js +0 -248
- package/dist/square-file-adapter.d.ts +0 -26
- package/dist/square-file-adapter.js +0 -85
- package/dist/square-state.d.ts +0 -6
- package/dist/square-state.js +0 -138
- package/dist/square-storage.d.ts +0 -14
- package/dist/square-storage.js +0 -188
- package/dist/square-wiring.d.ts +0 -33
- package/dist/square-wiring.js +0 -109
- package/dist/watch.d.ts +0 -8
- package/dist/watch.js +0 -252
package/dist/codex-queue.js
CHANGED
|
@@ -16,7 +16,10 @@ function classifyFailure(message) {
|
|
|
16
16
|
return 'unknown';
|
|
17
17
|
}
|
|
18
18
|
export function sendCodexQueue({ threadId, message }, opts = {}) {
|
|
19
|
-
|
|
19
|
+
// The explicit bin wins. Otherwise a supplied env decides the executable and the child
|
|
20
|
+
// environment; it never falls back to the ambient process env for a key it omits.
|
|
21
|
+
const env = opts.env ?? process.env;
|
|
22
|
+
const result = spawnSync(opts.bin ?? env.SQUARE_CODEX_BIN ?? 'codex', [...(opts.args ?? []), 'queue', '--thread', threadId, '--message', message], { encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'], timeout: opts.timeoutMs ?? 5000, env });
|
|
20
23
|
if (result.error) {
|
|
21
24
|
const messageText = result.error.message;
|
|
22
25
|
throw new CodexQueueSendError(messageText, classifyFailure(messageText));
|
package/dist/decisions.d.ts
CHANGED
|
@@ -1,41 +1,28 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
export
|
|
11
|
-
number: number;
|
|
12
|
-
act: Extract<StoredAct, {
|
|
13
|
-
kind: 'say';
|
|
14
|
-
}>;
|
|
15
|
-
perception: Perception;
|
|
16
|
-
}
|
|
17
|
-
export declare function resolveKnownName(squareState: SquareState, name: string): string;
|
|
1
|
+
import { type Act, type Reach } from './model.js';
|
|
2
|
+
import type { SquareRead } from './ports.js';
|
|
3
|
+
type TimedAct<K extends Act['kind'] = Act['kind']> = Extract<Act, {
|
|
4
|
+
kind: K;
|
|
5
|
+
}> & {
|
|
6
|
+
at: number;
|
|
7
|
+
};
|
|
8
|
+
import type { ParticipantSummary as ParticipantStatus, UnreadActivitySummary } from './square-facade.js';
|
|
9
|
+
export type { ParticipantSummary as ParticipantStatus, ParticipantPresence as CorePresenceState, UnreadActivitySummary, UnreadActivityPreview } from './square-facade.js';
|
|
10
|
+
export declare function resolveKnownName(facts: SquareRead, name: string): string;
|
|
18
11
|
export interface DecideJoinResult {
|
|
19
12
|
joinedName: string;
|
|
20
13
|
addParticipant: boolean;
|
|
21
|
-
joinAct?:
|
|
22
|
-
kind: 'join';
|
|
23
|
-
}>;
|
|
14
|
+
joinAct?: TimedAct<'join'>;
|
|
24
15
|
}
|
|
25
16
|
export interface DecideImplicitJoinResult {
|
|
26
17
|
joinedName: string;
|
|
27
18
|
state: 'joined' | 'active' | 'done';
|
|
28
|
-
joinAct?:
|
|
29
|
-
kind: 'join';
|
|
30
|
-
}>;
|
|
19
|
+
joinAct?: TimedAct<'join'>;
|
|
31
20
|
}
|
|
32
|
-
export declare function decideJoin(
|
|
33
|
-
|
|
34
|
-
export declare function decideImplicitJoin(squareState: SquareState, name: string, now: number): DecideImplicitJoinResult;
|
|
21
|
+
export declare function decideJoin(facts: SquareRead, name: string, now: number): DecideJoinResult;
|
|
22
|
+
export declare function decideImplicitJoin(facts: SquareRead, name: string, now: number): DecideImplicitJoinResult;
|
|
35
23
|
export type ActDecision = {
|
|
36
24
|
type: 'sent';
|
|
37
|
-
act:
|
|
38
|
-
/** The replied-to author was not standing, so the reply landed without reaching them. */
|
|
25
|
+
act: TimedAct;
|
|
39
26
|
replyAuthorNotHere?: string;
|
|
40
27
|
} | {
|
|
41
28
|
type: 'blocked';
|
|
@@ -54,9 +41,9 @@ export type ActDecision = {
|
|
|
54
41
|
type: 'bell_quota';
|
|
55
42
|
nextAt: number;
|
|
56
43
|
};
|
|
57
|
-
/**
|
|
58
|
-
export declare function unreadActivitySummaries(
|
|
59
|
-
export declare function decideAct(
|
|
44
|
+
/** Count the directed suffix, but hydrate only its last three previews per spelling. */
|
|
45
|
+
export declare function unreadActivitySummaries(facts: SquareRead, name: string, now: number): UnreadActivitySummary[];
|
|
46
|
+
export declare function decideAct(facts: SquareRead, input: {
|
|
60
47
|
name: string;
|
|
61
48
|
body: string;
|
|
62
49
|
force: boolean;
|
|
@@ -65,49 +52,14 @@ export declare function decideAct(squareState: SquareState, input: {
|
|
|
65
52
|
reach?: Reach;
|
|
66
53
|
reply?: number;
|
|
67
54
|
noMention?: boolean;
|
|
55
|
+
requireExplicitReach?: boolean;
|
|
68
56
|
}): ActDecision;
|
|
69
57
|
export declare function validateDoneBody(body: unknown): void;
|
|
70
|
-
export declare function coreDone(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
export declare function
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
export declare function coreIgnore(squareState: SquareState, actor: string, target: string, now: number): Extract<Act, {
|
|
77
|
-
kind: 'ignore';
|
|
78
|
-
}> | undefined;
|
|
79
|
-
export declare function coreListening(squareState: SquareState, actor: string): readonly string[];
|
|
80
|
-
export declare function coreHold(squareState: SquareState, actor: string, body: string, now: number): Extract<Act, {
|
|
81
|
-
kind: 'hold';
|
|
82
|
-
}>;
|
|
83
|
-
export declare function coreResume(squareState: SquareState, actor: string, now: number): Extract<Act, {
|
|
84
|
-
kind: 'resume';
|
|
85
|
-
}>;
|
|
86
|
-
export interface ParticipantStatus {
|
|
87
|
-
name: string;
|
|
88
|
-
state: 'active' | 'done' | 'not joined';
|
|
89
|
-
listening: readonly string[];
|
|
90
|
-
activityCount: number;
|
|
91
|
-
lastActiveAt: number | undefined;
|
|
92
|
-
presence: CorePresenceState;
|
|
93
|
-
unreadActivityCount: number;
|
|
94
|
-
pendingMentionCount: number;
|
|
95
|
-
}
|
|
96
|
-
export type CorePresenceState = 'never-joined' | 'active' | 'watching' | 'done';
|
|
58
|
+
export declare function coreDone(facts: SquareRead, name: string, body: string, now: number): TimedAct<'done'>;
|
|
59
|
+
export declare function coreListen(facts: SquareRead, actor: string, target: string, now: number): TimedAct<"listen" | "ignore"> | undefined;
|
|
60
|
+
export declare function coreIgnore(facts: SquareRead, actor: string, target: string, now: number): TimedAct<"listen" | "ignore"> | undefined;
|
|
61
|
+
export declare function coreListening(facts: SquareRead, actor: string): readonly string[];
|
|
62
|
+
export declare function coreHold(facts: SquareRead, actor: string, body: string, now: number): TimedAct<'hold'>;
|
|
63
|
+
export declare function coreResume(facts: SquareRead, actor: string, now: number): TimedAct<'resume'>;
|
|
97
64
|
export declare function compareParticipantActivity(a: Pick<ParticipantStatus, 'name' | 'lastActiveAt'>, b: Pick<ParticipantStatus, 'name' | 'lastActiveAt'>): number;
|
|
98
|
-
export
|
|
99
|
-
hardCap: HardCap;
|
|
100
|
-
throttlePerMinute: number | undefined;
|
|
101
|
-
activeCount: number;
|
|
102
|
-
doneCount: number;
|
|
103
|
-
holdActive: boolean;
|
|
104
|
-
holdReason: string | undefined;
|
|
105
|
-
holdActor: string | undefined;
|
|
106
|
-
holdAt: number | undefined;
|
|
107
|
-
participants: ParticipantStatus[];
|
|
108
|
-
latestAct: StoredAct | undefined;
|
|
109
|
-
now: number;
|
|
110
|
-
}
|
|
111
|
-
export declare function coreStatus(squareState: SquareState, now: number, delivery?: DeliveryModel): StatusResult;
|
|
112
|
-
export declare function coreParticipants(squareState: SquareState, now: number, delivery?: DeliveryModel): ParticipantStatus[];
|
|
113
|
-
export declare function coreActivities(squareState: SquareState, opts: ActivitiesOptions, suppliedDelivery?: DeliveryModel): StoredAct[];
|
|
65
|
+
export declare function coreParticipants(facts: SquareRead, now: number): ParticipantStatus[];
|