@astrosheep/square 0.3.44 → 0.3.46
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/dist/artifact.d.ts +28 -7
- package/dist/artifact.js +293 -253
- package/dist/harness-links.js +1 -1
- package/dist/help.js +1 -1
- package/dist/ports.d.ts +1 -4
- package/dist/square-file-adapter.js +9 -8
- package/dist/square-state.d.ts +6 -0
- package/dist/square-state.js +141 -0
- package/dist/square-storage.d.ts +7 -10
- package/dist/square-storage.js +83 -114
- package/dist/state-cell.d.ts +1 -4
- package/guides/participant-ownership.md +3 -3
- package/package.json +2 -3
- package/skills/brainstorm/SKILL.md +0 -131
package/dist/artifact.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type SquareState } from './model.js';
|
|
2
|
+
export { createSquareState, emptyRuntimeState } from './square-state.js';
|
|
2
3
|
export interface DoctorProblem {
|
|
3
4
|
kind: string;
|
|
4
5
|
message: string;
|
|
@@ -8,12 +9,32 @@ export interface DiagnoseResult {
|
|
|
8
9
|
problems: DoctorProblem[];
|
|
9
10
|
state?: SquareState;
|
|
10
11
|
}
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export declare function
|
|
12
|
+
export interface SquareSnapshot {
|
|
13
|
+
readonly state: SquareState;
|
|
14
|
+
readonly revision: number;
|
|
15
|
+
}
|
|
16
|
+
/** Creates a new SQLite artifact only when its pathname did not already exist. */
|
|
17
|
+
export declare function createSquareFile(squarePath: string, state: SquareState): Promise<boolean>;
|
|
18
|
+
/**
|
|
19
|
+
* Reads a complete validated snapshot, yielding between transient SQLite lock
|
|
20
|
+
* conflicts. The URI remains create-disabled throughout the retry loop.
|
|
21
|
+
*/
|
|
22
|
+
export declare function readSquareSnapshot(squarePath: string, signal?: AbortSignal): Promise<SquareSnapshot>;
|
|
23
|
+
export type SquareTransition<R> = (state: SquareState, revision: number) => {
|
|
24
|
+
state?: SquareState;
|
|
25
|
+
result: R;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Executes one synchronous SquareState transition under SQLite's write lock.
|
|
29
|
+
* A busy COMMIT retries on this same transaction, so fn is never replayed.
|
|
30
|
+
*/
|
|
31
|
+
export declare function transactSquareSnapshot<R>(squarePath: string, fn: SquareTransition<R>, signal?: AbortSignal, forceCommit?: boolean): Promise<{
|
|
32
|
+
result: R;
|
|
33
|
+
revision: number;
|
|
34
|
+
changed: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
/** Replaces an existing validated snapshot in place and always advances its revision. */
|
|
37
|
+
export declare function replaceSquareSnapshot(squarePath: string, state: SquareState): Promise<SquareSnapshot>;
|
|
17
38
|
export declare function writeSquareFile(squarePath: string, squareState: SquareState): Promise<void>;
|
|
18
39
|
export declare function loadSquare(squarePath: string): Promise<SquareState>;
|
|
19
40
|
export declare function probeSquare(squarePath: string): Promise<SquareState | undefined>;
|