@tomflow/proflow-task-store-sqlite 0.1.2 → 0.1.4
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/DOCS.md +27 -0
- package/SETUP.md +7 -0
- package/dist/deployment/adapter.d.ts +56 -195
- package/dist/deployment/adapter.js +73 -92
- package/dist/deployment/descriptor.d.ts +6 -23
- package/dist/deployment/descriptor.js +13 -27
- package/package.json +6 -13
- package/proflow.module.json +6 -29
- package/CHANGELOG.md +0 -13
- package/self-install.mjs +0 -34
package/DOCS.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# @tomflow/proflow-task-store-sqlite — Module Docs
|
|
2
|
+
|
|
3
|
+
Module ref: `task-store-sqlite`
|
|
4
|
+
Domain: `task-orchestration`
|
|
5
|
+
Kind: `library`
|
|
6
|
+
|
|
7
|
+
Provides the node:sqlite store and repository adapters for Task-owned structured facts.
|
|
8
|
+
|
|
9
|
+
## Standard management surface
|
|
10
|
+
|
|
11
|
+
`install / uninstall / status / setup / docs / start / stop`
|
|
12
|
+
|
|
13
|
+
## Provides
|
|
14
|
+
|
|
15
|
+
- None.
|
|
16
|
+
|
|
17
|
+
## Requires
|
|
18
|
+
|
|
19
|
+
- `task-orchestration` `>=1.0.0 <2.0.0`
|
|
20
|
+
|
|
21
|
+
## Public setup inputs
|
|
22
|
+
|
|
23
|
+
- None. Deterministic/private values and cross-Module shared facts are not public configuration.
|
|
24
|
+
|
|
25
|
+
## Ownership boundary
|
|
26
|
+
|
|
27
|
+
Module business APIs and any module-specific extra commands remain package-owned. Platform does not proxy or interpret them. Current human/external preparation is documented in `SETUP.md`.
|
package/SETUP.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @tomflow/proflow-task-store-sqlite — Module Setup
|
|
2
|
+
|
|
3
|
+
No user or external setup is required by the current frozen Module contract. `Module.install` completes deterministic preparation; `Module.setup` only re-observes current reality and must not ask the user to supply private paths, loopback endpoints, tokens or cross-Module facts.
|
|
4
|
+
|
|
5
|
+
## Completion
|
|
6
|
+
|
|
7
|
+
Setup is complete only when the Module's own `status` reports `setupStatus=READY`. Re-running setup must re-observe reality; it must not resume from a blind historical step index.
|
|
@@ -1,235 +1,96 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { ModuleCommandContext } from "@tomflow/proflow-module-contract";
|
|
2
|
+
export declare const taskDatabasePath: (context: ModuleCommandContext) => string;
|
|
3
|
+
export declare const behaviorAdapter: {
|
|
4
|
+
readonly install: (context: ModuleCommandContext) => Promise<{
|
|
3
5
|
result: {
|
|
4
6
|
contract: "deployment.result.v1";
|
|
5
|
-
ok:
|
|
7
|
+
ok: true;
|
|
6
8
|
status: "SUCCEEDED";
|
|
7
9
|
moduleRef: "task-store-sqlite";
|
|
8
|
-
moduleVersion: "0.1.
|
|
9
|
-
|
|
10
|
+
moduleVersion: "0.1.4";
|
|
11
|
+
data: {
|
|
12
|
+
databasePath: string;
|
|
13
|
+
};
|
|
10
14
|
};
|
|
11
15
|
observedEffects: never[];
|
|
12
|
-
}
|
|
13
|
-
|
|
16
|
+
}>;
|
|
17
|
+
readonly uninstall: (_context: ModuleCommandContext) => Promise<{
|
|
14
18
|
result: {
|
|
15
|
-
contract: "deployment.result.v1";
|
|
16
|
-
ok:
|
|
17
|
-
status: "SUCCEEDED";
|
|
18
|
-
moduleRef: "task-store-sqlite";
|
|
19
|
-
moduleVersion: "0.1.
|
|
20
|
-
checks?: unknown[];
|
|
21
|
-
} | {
|
|
22
|
-
contract: "deployment.result.v1";
|
|
23
|
-
ok: boolean;
|
|
24
|
-
status: "ACTION_REQUIRED";
|
|
25
|
-
moduleRef: "task-store-sqlite";
|
|
26
|
-
moduleVersion: "0.1.2";
|
|
27
|
-
actionRequired: {
|
|
28
|
-
action: string;
|
|
29
|
-
description: string;
|
|
30
|
-
};
|
|
31
|
-
checks?: unknown[];
|
|
32
|
-
} | {
|
|
33
|
-
contract: "deployment.result.v1";
|
|
34
|
-
ok: boolean;
|
|
35
|
-
status: "BLOCKED";
|
|
36
|
-
moduleRef: "task-store-sqlite";
|
|
37
|
-
moduleVersion: "0.1.2";
|
|
38
|
-
error: {
|
|
39
|
-
code: "VERIFY_FAILED";
|
|
40
|
-
message: string;
|
|
41
|
-
retryable: boolean;
|
|
42
|
-
};
|
|
43
|
-
checks?: unknown[];
|
|
19
|
+
readonly contract: "deployment.result.v1";
|
|
20
|
+
readonly ok: true;
|
|
21
|
+
readonly status: "SUCCEEDED";
|
|
22
|
+
readonly moduleRef: "task-store-sqlite";
|
|
23
|
+
readonly moduleVersion: "0.1.4";
|
|
44
24
|
};
|
|
45
25
|
observedEffects: never[];
|
|
46
|
-
}
|
|
47
|
-
|
|
26
|
+
}>;
|
|
27
|
+
readonly status: (context: ModuleCommandContext) => Promise<{
|
|
48
28
|
result: {
|
|
49
29
|
contract: "deployment.result.v1";
|
|
50
|
-
ok:
|
|
30
|
+
ok: true;
|
|
51
31
|
status: "SUCCEEDED";
|
|
52
32
|
moduleRef: "task-store-sqlite";
|
|
53
|
-
moduleVersion: "0.1.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
ok: boolean;
|
|
58
|
-
status: "ACTION_REQUIRED";
|
|
59
|
-
moduleRef: "task-store-sqlite";
|
|
60
|
-
moduleVersion: "0.1.2";
|
|
61
|
-
actionRequired: {
|
|
62
|
-
action: string;
|
|
63
|
-
description: string;
|
|
64
|
-
};
|
|
65
|
-
checks?: unknown[];
|
|
66
|
-
} | {
|
|
67
|
-
contract: "deployment.result.v1";
|
|
68
|
-
ok: boolean;
|
|
69
|
-
status: "BLOCKED";
|
|
70
|
-
moduleRef: "task-store-sqlite";
|
|
71
|
-
moduleVersion: "0.1.2";
|
|
72
|
-
error: {
|
|
73
|
-
code: "VERIFY_FAILED";
|
|
74
|
-
message: string;
|
|
75
|
-
retryable: boolean;
|
|
33
|
+
moduleVersion: "0.1.4";
|
|
34
|
+
data: {
|
|
35
|
+
setupStatus: "FAILED" | "READY";
|
|
36
|
+
runtimeStatus: "NOT_APPLICABLE";
|
|
76
37
|
};
|
|
77
|
-
checks?: unknown[];
|
|
78
38
|
};
|
|
79
39
|
observedEffects: never[];
|
|
80
|
-
}
|
|
81
|
-
|
|
40
|
+
}>;
|
|
41
|
+
readonly setup: (context: ModuleCommandContext) => Promise<{
|
|
82
42
|
result: {
|
|
83
|
-
contract: "deployment.result.v1";
|
|
84
|
-
ok:
|
|
85
|
-
status: "SUCCEEDED";
|
|
86
|
-
moduleRef: "task-store-sqlite";
|
|
87
|
-
moduleVersion: "0.1.
|
|
88
|
-
checks?: unknown[];
|
|
89
|
-
} | {
|
|
90
|
-
contract: "deployment.result.v1";
|
|
91
|
-
ok: boolean;
|
|
92
|
-
status: "ACTION_REQUIRED";
|
|
93
|
-
moduleRef: "task-store-sqlite";
|
|
94
|
-
moduleVersion: "0.1.2";
|
|
95
|
-
actionRequired: {
|
|
96
|
-
action: string;
|
|
97
|
-
description: string;
|
|
98
|
-
};
|
|
99
|
-
checks?: unknown[];
|
|
43
|
+
readonly contract: "deployment.result.v1";
|
|
44
|
+
readonly ok: true;
|
|
45
|
+
readonly status: "SUCCEEDED";
|
|
46
|
+
readonly moduleRef: "task-store-sqlite";
|
|
47
|
+
readonly moduleVersion: "0.1.4";
|
|
100
48
|
} | {
|
|
101
49
|
contract: "deployment.result.v1";
|
|
102
|
-
ok: boolean;
|
|
103
|
-
status: "BLOCKED";
|
|
104
50
|
moduleRef: "task-store-sqlite";
|
|
105
|
-
moduleVersion: "0.1.
|
|
51
|
+
moduleVersion: "0.1.4";
|
|
52
|
+
ok: false;
|
|
53
|
+
status: "FAILED";
|
|
106
54
|
error: {
|
|
107
|
-
code: "
|
|
55
|
+
code: "SETUP_FAILED";
|
|
108
56
|
message: string;
|
|
109
57
|
retryable: boolean;
|
|
110
58
|
};
|
|
111
|
-
checks?: unknown[];
|
|
112
|
-
};
|
|
113
|
-
observedEffects: never[];
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
export declare const behaviorAdapter: {
|
|
117
|
-
describe: () => {
|
|
118
|
-
result: {
|
|
119
|
-
contract: "deployment.result.v1";
|
|
120
|
-
ok: boolean;
|
|
121
|
-
status: "SUCCEEDED";
|
|
122
|
-
moduleRef: "task-store-sqlite";
|
|
123
|
-
moduleVersion: "0.1.2";
|
|
124
|
-
checks?: unknown[];
|
|
125
59
|
};
|
|
126
60
|
observedEffects: never[];
|
|
127
|
-
}
|
|
128
|
-
|
|
61
|
+
}>;
|
|
62
|
+
readonly docs: (_context: ModuleCommandContext) => Promise<{
|
|
129
63
|
result: {
|
|
130
64
|
contract: "deployment.result.v1";
|
|
131
|
-
ok:
|
|
65
|
+
ok: true;
|
|
132
66
|
status: "SUCCEEDED";
|
|
133
67
|
moduleRef: "task-store-sqlite";
|
|
134
|
-
moduleVersion: "0.1.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
ok: boolean;
|
|
139
|
-
status: "ACTION_REQUIRED";
|
|
140
|
-
moduleRef: "task-store-sqlite";
|
|
141
|
-
moduleVersion: "0.1.2";
|
|
142
|
-
actionRequired: {
|
|
143
|
-
action: string;
|
|
144
|
-
description: string;
|
|
145
|
-
};
|
|
146
|
-
checks?: unknown[];
|
|
147
|
-
} | {
|
|
148
|
-
contract: "deployment.result.v1";
|
|
149
|
-
ok: boolean;
|
|
150
|
-
status: "BLOCKED";
|
|
151
|
-
moduleRef: "task-store-sqlite";
|
|
152
|
-
moduleVersion: "0.1.2";
|
|
153
|
-
error: {
|
|
154
|
-
code: "VERIFY_FAILED";
|
|
155
|
-
message: string;
|
|
156
|
-
retryable: boolean;
|
|
68
|
+
moduleVersion: "0.1.4";
|
|
69
|
+
data: {
|
|
70
|
+
docs: string;
|
|
71
|
+
setup: string;
|
|
157
72
|
};
|
|
158
|
-
checks?: unknown[];
|
|
159
73
|
};
|
|
160
74
|
observedEffects: never[];
|
|
161
|
-
}
|
|
162
|
-
|
|
75
|
+
}>;
|
|
76
|
+
readonly start: (_context: ModuleCommandContext) => Promise<{
|
|
163
77
|
result: {
|
|
164
|
-
contract: "deployment.result.v1";
|
|
165
|
-
ok:
|
|
166
|
-
status: "SUCCEEDED";
|
|
167
|
-
moduleRef: "task-store-sqlite";
|
|
168
|
-
moduleVersion: "0.1.
|
|
169
|
-
checks?: unknown[];
|
|
170
|
-
} | {
|
|
171
|
-
contract: "deployment.result.v1";
|
|
172
|
-
ok: boolean;
|
|
173
|
-
status: "ACTION_REQUIRED";
|
|
174
|
-
moduleRef: "task-store-sqlite";
|
|
175
|
-
moduleVersion: "0.1.2";
|
|
176
|
-
actionRequired: {
|
|
177
|
-
action: string;
|
|
178
|
-
description: string;
|
|
179
|
-
};
|
|
180
|
-
checks?: unknown[];
|
|
181
|
-
} | {
|
|
182
|
-
contract: "deployment.result.v1";
|
|
183
|
-
ok: boolean;
|
|
184
|
-
status: "BLOCKED";
|
|
185
|
-
moduleRef: "task-store-sqlite";
|
|
186
|
-
moduleVersion: "0.1.2";
|
|
187
|
-
error: {
|
|
188
|
-
code: "VERIFY_FAILED";
|
|
189
|
-
message: string;
|
|
190
|
-
retryable: boolean;
|
|
191
|
-
};
|
|
192
|
-
checks?: unknown[];
|
|
78
|
+
readonly contract: "deployment.result.v1";
|
|
79
|
+
readonly ok: true;
|
|
80
|
+
readonly status: "SUCCEEDED";
|
|
81
|
+
readonly moduleRef: "task-store-sqlite";
|
|
82
|
+
readonly moduleVersion: "0.1.4";
|
|
193
83
|
};
|
|
194
84
|
observedEffects: never[];
|
|
195
|
-
}
|
|
196
|
-
|
|
85
|
+
}>;
|
|
86
|
+
readonly stop: (_context: ModuleCommandContext) => Promise<{
|
|
197
87
|
result: {
|
|
198
|
-
contract: "deployment.result.v1";
|
|
199
|
-
ok:
|
|
200
|
-
status: "SUCCEEDED";
|
|
201
|
-
moduleRef: "task-store-sqlite";
|
|
202
|
-
moduleVersion: "0.1.
|
|
203
|
-
checks?: unknown[];
|
|
204
|
-
} | {
|
|
205
|
-
contract: "deployment.result.v1";
|
|
206
|
-
ok: boolean;
|
|
207
|
-
status: "ACTION_REQUIRED";
|
|
208
|
-
moduleRef: "task-store-sqlite";
|
|
209
|
-
moduleVersion: "0.1.2";
|
|
210
|
-
actionRequired: {
|
|
211
|
-
action: string;
|
|
212
|
-
description: string;
|
|
213
|
-
};
|
|
214
|
-
checks?: unknown[];
|
|
215
|
-
} | {
|
|
216
|
-
contract: "deployment.result.v1";
|
|
217
|
-
ok: boolean;
|
|
218
|
-
status: "BLOCKED";
|
|
219
|
-
moduleRef: "task-store-sqlite";
|
|
220
|
-
moduleVersion: "0.1.2";
|
|
221
|
-
error: {
|
|
222
|
-
code: "VERIFY_FAILED";
|
|
223
|
-
message: string;
|
|
224
|
-
retryable: boolean;
|
|
225
|
-
};
|
|
226
|
-
checks?: unknown[];
|
|
88
|
+
readonly contract: "deployment.result.v1";
|
|
89
|
+
readonly ok: true;
|
|
90
|
+
readonly status: "SUCCEEDED";
|
|
91
|
+
readonly moduleRef: "task-store-sqlite";
|
|
92
|
+
readonly moduleVersion: "0.1.4";
|
|
227
93
|
};
|
|
228
94
|
observedEffects: never[];
|
|
229
|
-
}
|
|
230
|
-
};
|
|
231
|
-
export declare function createProductionBinding(input: {
|
|
232
|
-
config: Record<string, string>;
|
|
233
|
-
}): {
|
|
234
|
-
behaviorAdapter: Record<string, unknown>;
|
|
95
|
+
}>;
|
|
235
96
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
|
+
import { mkdir } from "node:fs/promises";
|
|
3
|
+
import { join, resolve } from "node:path";
|
|
2
4
|
import { DatabaseSync } from "node:sqlite";
|
|
3
5
|
import { descriptor } from "./descriptor.js";
|
|
4
6
|
const REQUIRED_TABLES = [
|
|
@@ -13,109 +15,88 @@ const REQUIRED_TABLES = [
|
|
|
13
15
|
"task_events",
|
|
14
16
|
"idempotency_records",
|
|
15
17
|
];
|
|
16
|
-
const
|
|
18
|
+
const base = {
|
|
17
19
|
contract: "deployment.result.v1",
|
|
18
20
|
ok: true,
|
|
19
21
|
status: "SUCCEEDED",
|
|
20
22
|
moduleRef: descriptor.moduleRef,
|
|
21
23
|
moduleVersion: descriptor.moduleVersion,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
moduleRef: descriptor.moduleRef,
|
|
29
|
-
moduleVersion: descriptor.moduleVersion,
|
|
30
|
-
actionRequired: { action: "configure-task-store", description },
|
|
31
|
-
...(checks === undefined ? {} : { checks }),
|
|
32
|
-
});
|
|
33
|
-
const blocked = (message, checks) => ({
|
|
34
|
-
contract: "deployment.result.v1",
|
|
35
|
-
ok: false,
|
|
36
|
-
status: "BLOCKED",
|
|
37
|
-
moduleRef: descriptor.moduleRef,
|
|
38
|
-
moduleVersion: descriptor.moduleVersion,
|
|
39
|
-
error: { code: "VERIFY_FAILED", message, retryable: true },
|
|
40
|
-
...(checks === undefined ? {} : { checks }),
|
|
41
|
-
});
|
|
42
|
-
function inspect(databasePath) {
|
|
43
|
-
if (!databasePath)
|
|
44
|
-
return { ok: false, message: "databasePath is required" };
|
|
45
|
-
if (!existsSync(databasePath)) {
|
|
46
|
-
return {
|
|
47
|
-
ok: false,
|
|
48
|
-
message: `Task SQLite database does not exist at ${databasePath}`,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
let database;
|
|
24
|
+
};
|
|
25
|
+
export const taskDatabasePath = (context) => join(resolve(context.workspaceRoot), ".proflow", "state", "task.sqlite");
|
|
26
|
+
function inspect(path) {
|
|
27
|
+
if (!existsSync(path))
|
|
28
|
+
return false;
|
|
29
|
+
let db;
|
|
52
30
|
try {
|
|
53
|
-
|
|
54
|
-
const integrity =
|
|
55
|
-
const tables = new Set(
|
|
31
|
+
db = new DatabaseSync(path, { readOnly: true });
|
|
32
|
+
const integrity = db.prepare("PRAGMA integrity_check").get();
|
|
33
|
+
const tables = new Set(db
|
|
56
34
|
.prepare("SELECT name FROM sqlite_master WHERE type='table'")
|
|
57
35
|
.all().map((row) => row.name));
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return {
|
|
61
|
-
ok: false,
|
|
62
|
-
message: `SQLite integrity_check returned ${integrity?.integrity_check ?? "unknown"}`,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
if (missing.length > 0) {
|
|
66
|
-
return {
|
|
67
|
-
ok: false,
|
|
68
|
-
message: `Task SQLite schema is missing tables: ${missing.join(", ")}`,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
return {
|
|
72
|
-
ok: true,
|
|
73
|
-
message: "Task SQLite schema is present and integrity_check is ok",
|
|
74
|
-
};
|
|
36
|
+
return (integrity?.integrity_check === "ok" &&
|
|
37
|
+
REQUIRED_TABLES.every((table) => tables.has(table)));
|
|
75
38
|
}
|
|
76
|
-
catch
|
|
77
|
-
return
|
|
78
|
-
ok: false,
|
|
79
|
-
message: error instanceof Error
|
|
80
|
-
? error.message
|
|
81
|
-
: "Task SQLite reality could not be read",
|
|
82
|
-
};
|
|
39
|
+
catch {
|
|
40
|
+
return false;
|
|
83
41
|
}
|
|
84
42
|
finally {
|
|
85
|
-
|
|
43
|
+
db?.close();
|
|
86
44
|
}
|
|
87
45
|
}
|
|
88
|
-
export
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
return { result: resultForReality(reality), observedEffects: [] };
|
|
46
|
+
export const behaviorAdapter = {
|
|
47
|
+
install: async (context) => {
|
|
48
|
+
const path = taskDatabasePath(context);
|
|
49
|
+
await mkdir(resolve(path, ".."), { recursive: true, mode: 0o700 });
|
|
50
|
+
if (!existsSync(path)) {
|
|
51
|
+
const db = new DatabaseSync(path);
|
|
52
|
+
db.close();
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
result: { ...base, data: { databasePath: path } },
|
|
56
|
+
observedEffects: [],
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
uninstall: async (_context) => ({
|
|
60
|
+
result: base,
|
|
61
|
+
observedEffects: [],
|
|
62
|
+
}),
|
|
63
|
+
status: async (context) => ({
|
|
64
|
+
result: {
|
|
65
|
+
...base,
|
|
66
|
+
data: {
|
|
67
|
+
setupStatus: inspect(taskDatabasePath(context))
|
|
68
|
+
? "READY"
|
|
69
|
+
: "FAILED",
|
|
70
|
+
runtimeStatus: "NOT_APPLICABLE",
|
|
71
|
+
},
|
|
115
72
|
},
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
73
|
+
observedEffects: [],
|
|
74
|
+
}),
|
|
75
|
+
setup: async (context) => ({
|
|
76
|
+
result: inspect(taskDatabasePath(context))
|
|
77
|
+
? base
|
|
78
|
+
: {
|
|
79
|
+
...base,
|
|
80
|
+
ok: false,
|
|
81
|
+
status: "FAILED",
|
|
82
|
+
error: {
|
|
83
|
+
code: "SETUP_FAILED",
|
|
84
|
+
message: "Task SQLite schema is not materialized; task-migration-runner must complete deterministic install",
|
|
85
|
+
retryable: true,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
observedEffects: [],
|
|
89
|
+
}),
|
|
90
|
+
docs: async (_context) => ({
|
|
91
|
+
result: { ...base, data: { docs: "DOCS.md", setup: "SETUP.md" } },
|
|
92
|
+
observedEffects: [],
|
|
93
|
+
}),
|
|
94
|
+
start: async (_context) => ({
|
|
95
|
+
result: base,
|
|
96
|
+
observedEffects: [],
|
|
97
|
+
}),
|
|
98
|
+
stop: async (_context) => ({
|
|
99
|
+
result: base,
|
|
100
|
+
observedEffects: [],
|
|
101
|
+
}),
|
|
102
|
+
};
|
|
@@ -3,11 +3,10 @@ export declare const descriptor: {
|
|
|
3
3
|
readonly contractVersion: "1.0.0";
|
|
4
4
|
readonly moduleRef: "task-store-sqlite";
|
|
5
5
|
readonly packageName: "@tomflow/proflow-task-store-sqlite";
|
|
6
|
-
readonly moduleVersion: "0.1.
|
|
6
|
+
readonly moduleVersion: "0.1.4";
|
|
7
7
|
readonly kind: "library";
|
|
8
8
|
readonly templateVersion: "1.0.0";
|
|
9
9
|
readonly platformCompatibility: ">=1.0.0 <2.0.0";
|
|
10
|
-
readonly installClass: "core";
|
|
11
10
|
readonly identity: {
|
|
12
11
|
readonly domain: "task-orchestration";
|
|
13
12
|
readonly summary: "Provides the node:sqlite store and repository adapters for Task-owned structured facts.";
|
|
@@ -22,30 +21,14 @@ export declare const descriptor: {
|
|
|
22
21
|
readonly runtime: "node";
|
|
23
22
|
readonly versionRange: ">=24.19.0";
|
|
24
23
|
}];
|
|
25
|
-
readonly configSlots: readonly [
|
|
26
|
-
readonly key: "databasePath";
|
|
27
|
-
readonly type: "path";
|
|
28
|
-
readonly required: true;
|
|
29
|
-
readonly description: "Task SQLite database path";
|
|
30
|
-
}];
|
|
31
|
-
readonly lifecycle: {
|
|
32
|
-
readonly supported: readonly ["describe", "preflight", "verify", "doctor"];
|
|
33
|
-
};
|
|
34
|
-
readonly verification: {
|
|
35
|
-
readonly checks: readonly [{
|
|
36
|
-
readonly id: "sqlite-integrity-pass";
|
|
37
|
-
readonly description: "SQLite schema and integrity checks pass";
|
|
38
|
-
readonly lifecycle: "verify";
|
|
39
|
-
}];
|
|
40
|
-
};
|
|
24
|
+
readonly configSlots: readonly [];
|
|
41
25
|
readonly effects: readonly [{
|
|
42
26
|
readonly kind: "filesystem";
|
|
43
27
|
readonly description: "Persists Task-owned structured facts in SQLite";
|
|
44
28
|
readonly retention: "preserve";
|
|
45
29
|
}];
|
|
46
|
-
readonly documentation:
|
|
47
|
-
readonly
|
|
48
|
-
readonly
|
|
49
|
-
|
|
50
|
-
}];
|
|
30
|
+
readonly documentation: {
|
|
31
|
+
readonly docs: "DOCS.md";
|
|
32
|
+
readonly setup: "SETUP.md";
|
|
33
|
+
};
|
|
51
34
|
};
|
|
@@ -3,40 +3,29 @@ export const descriptor = {
|
|
|
3
3
|
contractVersion: "1.0.0",
|
|
4
4
|
moduleRef: "task-store-sqlite",
|
|
5
5
|
packageName: "@tomflow/proflow-task-store-sqlite",
|
|
6
|
-
moduleVersion: "0.1.
|
|
6
|
+
moduleVersion: "0.1.4",
|
|
7
7
|
kind: "library",
|
|
8
8
|
templateVersion: "1.0.0",
|
|
9
9
|
platformCompatibility: ">=1.0.0 <2.0.0",
|
|
10
|
-
installClass: "core",
|
|
11
10
|
identity: {
|
|
12
11
|
domain: "task-orchestration",
|
|
13
12
|
summary: "Provides the node:sqlite store and repository adapters for Task-owned structured facts.",
|
|
14
13
|
},
|
|
15
14
|
provides: [],
|
|
16
15
|
requires: [
|
|
17
|
-
{
|
|
16
|
+
{
|
|
17
|
+
contractRef: "task-orchestration",
|
|
18
|
+
versionRange: ">=1.0.0 <2.0.0",
|
|
19
|
+
},
|
|
18
20
|
],
|
|
19
21
|
requirements: [
|
|
20
|
-
{ kind: "runtime", runtime: "node", versionRange: ">=24.19.0" },
|
|
21
|
-
],
|
|
22
|
-
configSlots: [
|
|
23
22
|
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
description: "Task SQLite database path",
|
|
23
|
+
kind: "runtime",
|
|
24
|
+
runtime: "node",
|
|
25
|
+
versionRange: ">=24.19.0",
|
|
28
26
|
},
|
|
29
27
|
],
|
|
30
|
-
|
|
31
|
-
verification: {
|
|
32
|
-
checks: [
|
|
33
|
-
{
|
|
34
|
-
id: "sqlite-integrity-pass",
|
|
35
|
-
description: "SQLite schema and integrity checks pass",
|
|
36
|
-
lifecycle: "verify",
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
},
|
|
28
|
+
configSlots: [],
|
|
40
29
|
effects: [
|
|
41
30
|
{
|
|
42
31
|
kind: "filesystem",
|
|
@@ -44,11 +33,8 @@ export const descriptor = {
|
|
|
44
33
|
retention: "preserve",
|
|
45
34
|
},
|
|
46
35
|
],
|
|
47
|
-
documentation:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
description: "Package-owned module overview",
|
|
52
|
-
},
|
|
53
|
-
],
|
|
36
|
+
documentation: {
|
|
37
|
+
docs: "DOCS.md",
|
|
38
|
+
setup: "SETUP.md",
|
|
39
|
+
},
|
|
54
40
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomflow/proflow-task-store-sqlite",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -16,14 +16,15 @@
|
|
|
16
16
|
"proflow.module.json",
|
|
17
17
|
"conformance.json",
|
|
18
18
|
"README.md",
|
|
19
|
-
"
|
|
19
|
+
"DOCS.md",
|
|
20
|
+
"SETUP.md"
|
|
20
21
|
],
|
|
21
22
|
"dependencies": {
|
|
22
|
-
"@tomflow/proflow-module-contract": "^0.1.
|
|
23
|
-
"@tomflow/proflow-task-orchestration": "^0.1.
|
|
23
|
+
"@tomflow/proflow-module-contract": "^0.1.4",
|
|
24
|
+
"@tomflow/proflow-task-orchestration": "^0.1.3"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
|
-
"@tomflow/proflow-task-migration-runner": "^0.1.
|
|
27
|
+
"@tomflow/proflow-task-migration-runner": "^0.1.4"
|
|
27
28
|
},
|
|
28
29
|
"description": "Provides the node:sqlite store and repository adapters for Task-owned structured facts.",
|
|
29
30
|
"keywords": [
|
|
@@ -33,17 +34,9 @@
|
|
|
33
34
|
],
|
|
34
35
|
"proflow": {
|
|
35
36
|
"module": true,
|
|
36
|
-
"installClass": "core",
|
|
37
|
-
"installRequires": [
|
|
38
|
-
"@tomflow/proflow-module-contract",
|
|
39
|
-
"@tomflow/proflow-task-orchestration"
|
|
40
|
-
],
|
|
41
37
|
"descriptor": "./dist/deployment/descriptor.js",
|
|
42
38
|
"manifest": "./proflow.module.json"
|
|
43
39
|
},
|
|
44
|
-
"bin": {
|
|
45
|
-
"proflow-task-store-sqlite": "./self-install.mjs"
|
|
46
|
-
},
|
|
47
40
|
"scripts": {
|
|
48
41
|
"test": "node --test tests/**/*.test.ts",
|
|
49
42
|
"typecheck": "tsc --noEmit"
|
package/proflow.module.json
CHANGED
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
"contractVersion": "1.0.0",
|
|
4
4
|
"moduleRef": "task-store-sqlite",
|
|
5
5
|
"packageName": "@tomflow/proflow-task-store-sqlite",
|
|
6
|
-
"moduleVersion": "0.1.
|
|
6
|
+
"moduleVersion": "0.1.4",
|
|
7
7
|
"kind": "library",
|
|
8
8
|
"templateVersion": "1.0.0",
|
|
9
9
|
"platformCompatibility": ">=1.0.0 <2.0.0",
|
|
10
|
-
"installClass": "core",
|
|
11
10
|
"identity": {
|
|
12
11
|
"domain": "task-orchestration",
|
|
13
12
|
"summary": "Provides the node:sqlite store and repository adapters for Task-owned structured facts."
|
|
@@ -26,26 +25,7 @@
|
|
|
26
25
|
"versionRange": ">=24.19.0"
|
|
27
26
|
}
|
|
28
27
|
],
|
|
29
|
-
"configSlots": [
|
|
30
|
-
{
|
|
31
|
-
"key": "databasePath",
|
|
32
|
-
"type": "path",
|
|
33
|
-
"required": true,
|
|
34
|
-
"description": "Task SQLite database path"
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
"lifecycle": {
|
|
38
|
-
"supported": ["describe", "preflight", "verify", "doctor"]
|
|
39
|
-
},
|
|
40
|
-
"verification": {
|
|
41
|
-
"checks": [
|
|
42
|
-
{
|
|
43
|
-
"id": "sqlite-integrity-pass",
|
|
44
|
-
"description": "SQLite schema and integrity checks pass",
|
|
45
|
-
"lifecycle": "verify"
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
},
|
|
28
|
+
"configSlots": [],
|
|
49
29
|
"effects": [
|
|
50
30
|
{
|
|
51
31
|
"kind": "filesystem",
|
|
@@ -53,11 +33,8 @@
|
|
|
53
33
|
"retention": "preserve"
|
|
54
34
|
}
|
|
55
35
|
],
|
|
56
|
-
"documentation":
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"description": "Package-owned module overview"
|
|
61
|
-
}
|
|
62
|
-
]
|
|
36
|
+
"documentation": {
|
|
37
|
+
"docs": "DOCS.md",
|
|
38
|
+
"setup": "SETUP.md"
|
|
39
|
+
}
|
|
63
40
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# @tomflow/proflow-task-store-sqlite
|
|
2
|
-
|
|
3
|
-
## 0.1.2
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Real-1 final remediation and black-box release closure
|
|
8
|
-
|
|
9
|
-
## 0.1.1
|
|
10
|
-
|
|
11
|
-
### Patch Changes
|
|
12
|
-
|
|
13
|
-
- Close the Real-1 global Platform control-plane contract across every published ProFlow package. Platform CLI now owns one durable global Workspace binding with canonical identity, cross-process operation locking, cwd/`--workspace` install targeting, cross-directory instance commands, whole-instance uninstall/rebind, and deterministic npm/yarn/pnpm Workspace package-manager selection. Every package-owned install entry, including newly generated Module Template packages, delegates to the Shell-global `platform` command and fails closed when that global CLI is unavailable; Deployment Conformance and the formal test plans mechanically enforce the same rule across all 24 packages.
|
package/self-install.mjs
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { spawnSync } from "node:child_process";
|
|
3
|
-
|
|
4
|
-
const [command, ...rest] = process.argv.slice(2);
|
|
5
|
-
const usage = "Usage: npx @tomflow/proflow-task-store-sqlite install\n";
|
|
6
|
-
if (command === "--help" || command === "-h") {
|
|
7
|
-
process.stdout.write(usage);
|
|
8
|
-
process.exit(0);
|
|
9
|
-
}
|
|
10
|
-
if (command !== "install" || rest.length > 0) {
|
|
11
|
-
process.stderr.write(usage);
|
|
12
|
-
process.exit(2);
|
|
13
|
-
}
|
|
14
|
-
const executable = process.platform === "win32" ? "platform.cmd" : "platform";
|
|
15
|
-
const result = spawnSync(
|
|
16
|
-
executable,
|
|
17
|
-
[
|
|
18
|
-
"install",
|
|
19
|
-
"@tomflow/proflow-task-store-sqlite",
|
|
20
|
-
"--workspace",
|
|
21
|
-
process.cwd(),
|
|
22
|
-
],
|
|
23
|
-
{ cwd: process.cwd(), env: process.env, stdio: "inherit" },
|
|
24
|
-
);
|
|
25
|
-
if (result.error) {
|
|
26
|
-
if (result.error.code === "ENOENT") {
|
|
27
|
-
process.stderr.write(
|
|
28
|
-
"GLOBAL_PLATFORM_CLI_REQUIRED: install @tomflow/proflow-platform-cli globally before package-owned install\n",
|
|
29
|
-
);
|
|
30
|
-
process.exit(127);
|
|
31
|
-
}
|
|
32
|
-
throw result.error;
|
|
33
|
-
}
|
|
34
|
-
process.exit(result.status ?? 1);
|