@astrosheep/square 0.3.70 → 0.3.71
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/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/routes.d.ts +7 -14
- package/dist/routes.js +33 -62
- 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 -271
- package/dist/square-application.d.ts +31 -55
- package/dist/square-application.js +637 -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/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 +70 -52
- package/plugins/paseo/shared/message.ts +15 -0
- package/plugins/pi/square-pi.js +3 -0
- 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/square-actions.d.ts
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import { type SquareState } from './model.js';
|
|
2
1
|
import type { WakeTransportPort } from './ports.js';
|
|
3
|
-
import type { Activity, CatchOptions,
|
|
4
|
-
import { type
|
|
2
|
+
import type { Activity, CatchOptions, ExpressOptions, ExpressResult, ExpressionObservation, ListenerChangeResult, OperationControl, OwnershipFenceOptions } from './square-facade.js';
|
|
3
|
+
import { type CatchSelection } from './catch-decisions.js';
|
|
5
4
|
import { type HostContext } from './participant-host.js';
|
|
6
5
|
export interface OperationContext extends HostContext {
|
|
7
6
|
readonly wakeTransport?: WakeTransportPort;
|
|
8
7
|
}
|
|
9
8
|
export type { OwnershipFenceOptions };
|
|
10
|
-
export declare function catchUp(square: OperationContext, name: string, options?: CatchOptions,
|
|
9
|
+
export declare function catchUp(square: OperationContext, name: string, options?: CatchOptions, control?: OperationControl): Promise<CatchSelection>;
|
|
10
|
+
export declare function catchUp(square: OperationContext, name: string, options: CatchOptions, control: OperationControl | undefined, leaseId: string): Promise<CatchSelection | null>;
|
|
11
11
|
export declare function join(square: OperationContext, name: string, control?: OperationControl): Promise<{
|
|
12
12
|
readonly name: string;
|
|
13
13
|
readonly activity: Activity | null;
|
|
14
|
+
readonly participantCount: number;
|
|
15
|
+
readonly reconnected: boolean;
|
|
14
16
|
}>;
|
|
15
|
-
/**
|
|
17
|
+
/** Takeover holds the host CAS fence across the single done+join artifact transaction. */
|
|
16
18
|
export declare function takeover(square: OperationContext, name: string, _oldSessionIds?: readonly string[], control?: OperationControl): Promise<{
|
|
17
19
|
readonly name: string;
|
|
18
20
|
readonly activities: readonly Activity[];
|
|
21
|
+
readonly participantCount: number;
|
|
19
22
|
readonly epoch?: number;
|
|
20
23
|
}>;
|
|
21
24
|
export declare function implicitJoin(square: OperationContext, name: string, control?: OperationControl): Promise<{
|
|
@@ -23,28 +26,15 @@ export declare function implicitJoin(square: OperationContext, name: string, con
|
|
|
23
26
|
readonly state: 'joined' | 'active' | 'done';
|
|
24
27
|
readonly activity: Activity | null;
|
|
25
28
|
}>;
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
readonly activity: Activity | null;
|
|
29
|
+
export interface ExpressCommittedResult extends ExpressResult {
|
|
30
|
+
readonly observation: ExpressionObservation;
|
|
29
31
|
}
|
|
32
|
+
export declare function express(square: OperationContext, name: string, body: string, options?: ExpressOptions, control?: OperationControl): Promise<ExpressCommittedResult>;
|
|
30
33
|
export declare function listen(square: OperationContext, actor: string, target: string, control?: OperationControl): Promise<ListenerChangeResult>;
|
|
31
34
|
export declare function ignore(square: OperationContext, actor: string, target: string, control?: OperationControl): Promise<ListenerChangeResult>;
|
|
32
35
|
export declare function listening(square: OperationContext, actor: string, control?: OperationControl): Promise<readonly string[]>;
|
|
33
36
|
export declare function done(square: OperationContext, name: string, body?: string, fence?: OwnershipFenceOptions, control?: OperationControl): Promise<ExpressResult>;
|
|
34
|
-
/**
|
|
35
|
-
* End one session's ownership of a participant inside the ownership claim critical
|
|
36
|
-
* section. The artifact `done` (when this session is still the owner) and retirement of
|
|
37
|
-
* this session's routes share one transaction, and the exact captured presence row is
|
|
38
|
-
* removed only while the lock is still held. A rejoin or takeover therefore lands either
|
|
39
|
-
* before the whole cleanup — and is part of the state being ended — or after it, with
|
|
40
|
-
* fresh presence and route rows that this cleanup can never touch.
|
|
41
|
-
*/
|
|
42
37
|
export declare function endOwnedSession(square: OperationContext, name: string, sessionId: string, expectedEpoch?: number): Promise<ExpressResult | null>;
|
|
43
|
-
/**
|
|
44
|
-
* Retire an ended session's orphan routes when no participant name is known. The
|
|
45
|
-
* ownership claim lock is held across the ledger read and the artifact transaction, so a
|
|
46
|
-
* rejoin that claims first is seen as a live participant and its route survives.
|
|
47
|
-
*/
|
|
48
38
|
export declare function retireEndedSessionRoutes(square: OperationContext, sessionId: string): Promise<void>;
|
|
49
39
|
export declare function hold(square: OperationContext, name: string, reason?: string, control?: OperationControl): Promise<ExpressResult>;
|
|
50
40
|
export declare function resume(square: OperationContext, name: string, control?: OperationControl): Promise<ExpressResult>;
|