@substrat-run/adapter-sqlite 0.114.0 → 0.117.0
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/actor.d.ts +10 -0
- package/dist/actor.d.ts.map +1 -1
- package/dist/actor.js +25 -1
- package/dist/actor.js.map +1 -1
- package/dist/checker.d.ts.map +1 -1
- package/dist/checker.js +5 -1
- package/dist/checker.js.map +1 -1
- package/dist/index.d.ts +170 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1199 -335
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/actor.d.ts
CHANGED
|
@@ -7,5 +7,15 @@
|
|
|
7
7
|
export declare class ScopeActor {
|
|
8
8
|
private tail;
|
|
9
9
|
enqueue<T>(op: () => Promise<T> | T): Promise<T>;
|
|
10
|
+
/** True when the caller is itself running inside one of this actor's tasks. */
|
|
11
|
+
holds(): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* A turn of this actor, re-entrant (#1666 review): from outside, an ordinary
|
|
14
|
+
* `enqueue`; from INSIDE one of this actor's tasks, the op runs in that task
|
|
15
|
+
* rather than queueing behind it — which would wait on itself and never return.
|
|
16
|
+
* The re-entrant op is part of the enclosing task, so it shares whatever
|
|
17
|
+
* transaction that task holds open: the caller's own unit, not a stranger's.
|
|
18
|
+
*/
|
|
19
|
+
turn<T>(op: () => Promise<T> | T): Promise<T>;
|
|
10
20
|
}
|
|
11
21
|
//# sourceMappingURL=actor.d.ts.map
|
package/dist/actor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actor.d.ts","sourceRoot":"","sources":["../src/actor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"actor.d.ts","sourceRoot":"","sources":["../src/actor.ts"],"names":[],"mappings":"AAUA;;;;;GAKG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,IAAI,CAAuC;IAEnD,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAY/C;IAED,+EAA+E;IAC/E,KAAK,IAAI,OAAO,CAEf;IAED;;;;;;OAMG;IACH,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAE5C;CACF"}
|
package/dist/actor.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
|
+
const held = new AsyncLocalStorage();
|
|
1
3
|
/**
|
|
2
4
|
* Per-scope actor: strict serialization (K-6). One operation runs to
|
|
3
5
|
* completion before the next starts — the conservative semantics both
|
|
@@ -7,10 +9,32 @@
|
|
|
7
9
|
export class ScopeActor {
|
|
8
10
|
tail = Promise.resolve();
|
|
9
11
|
enqueue(op) {
|
|
10
|
-
const result = this.tail.then(
|
|
12
|
+
const result = this.tail.then(async () => {
|
|
13
|
+
const task = { actor: this, live: true };
|
|
14
|
+
try {
|
|
15
|
+
return await held.run([...(held.getStore() ?? []), task], op);
|
|
16
|
+
}
|
|
17
|
+
finally {
|
|
18
|
+
task.live = false;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
11
21
|
// The chain must survive failures; callers still see the rejection.
|
|
12
22
|
this.tail = result.catch(() => undefined);
|
|
13
23
|
return result;
|
|
14
24
|
}
|
|
25
|
+
/** True when the caller is itself running inside one of this actor's tasks. */
|
|
26
|
+
holds() {
|
|
27
|
+
return (held.getStore() ?? []).some((t) => t.actor === this && t.live);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A turn of this actor, re-entrant (#1666 review): from outside, an ordinary
|
|
31
|
+
* `enqueue`; from INSIDE one of this actor's tasks, the op runs in that task
|
|
32
|
+
* rather than queueing behind it — which would wait on itself and never return.
|
|
33
|
+
* The re-entrant op is part of the enclosing task, so it shares whatever
|
|
34
|
+
* transaction that task holds open: the caller's own unit, not a stranger's.
|
|
35
|
+
*/
|
|
36
|
+
turn(op) {
|
|
37
|
+
return this.holds() ? Promise.resolve().then(op) : this.enqueue(op);
|
|
38
|
+
}
|
|
15
39
|
}
|
|
16
40
|
//# sourceMappingURL=actor.js.map
|
package/dist/actor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actor.js","sourceRoot":"","sources":["../src/actor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,OAAO,UAAU;IACb,IAAI,GAAqB,OAAO,CAAC,OAAO,EAAE,CAAC;IAEnD,OAAO,CAAI,EAAwB;QACjC,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"actor.js","sourceRoot":"","sources":["../src/actor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAQrD,MAAM,IAAI,GAAG,IAAI,iBAAiB,EAAuB,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,OAAO,UAAU;IACb,IAAI,GAAqB,OAAO,CAAC,OAAO,EAAE,CAAC;IAEnD,OAAO,CAAI,EAAwB;QACjC,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;YACvC,MAAM,IAAI,GAAa,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YACnD,IAAI,CAAC;gBACH,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;YAChE,CAAC;oBAAS,CAAC;gBACT,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;YACpB,CAAC;QACH,CAAC,CAAC,CAAC;QACH,oEAAoE;QACpE,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QAC1C,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,+EAA+E;IAC/E,KAAK;QACH,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CAAI,EAAwB;QAC9B,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACtE,CAAC;CACF"}
|
package/dist/checker.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checker.d.ts","sourceRoot":"","sources":["../src/checker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAQ,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,
|
|
1
|
+
{"version":3,"file":"checker.d.ts","sourceRoot":"","sources":["../src/checker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAQ,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAIL,KAAK,KAAK,EACV,KAAK,iBAAiB,EAIvB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC7B,kFAAkF;IAClF,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAC,QAAQ,GAAG,SAAS,CAAC;IACxD,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAAC;IACnE;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAyCD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,GAAG,iBAAiB,CAsBvE"}
|
package/dist/checker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createTupleEvaluator, } from '@substrat-run/kernel';
|
|
1
|
+
import { capabilityByIdQuery, createTupleEvaluator, } from '@substrat-run/kernel';
|
|
2
2
|
const TUPLE_COLUMNS = 'subject, relation, object, expires_at, revoked_at';
|
|
3
3
|
/**
|
|
4
4
|
* The scope-local reads. Each statement is compiled at most once per decision and only if
|
|
@@ -11,6 +11,7 @@ const scopeReader = (db) => {
|
|
|
11
11
|
let tuplesStmt;
|
|
12
12
|
let grantStmt;
|
|
13
13
|
let parentsStmt;
|
|
14
|
+
let capabilityStmt;
|
|
14
15
|
return {
|
|
15
16
|
tuples: (subject, relationPrefix) => (tuplesStmt ??= db.prepare(`SELECT ${TUPLE_COLUMNS} FROM _substrat_tuples
|
|
16
17
|
WHERE subject = ? AND relation LIKE ?`)).all(subject, `${relationPrefix}%`),
|
|
@@ -18,6 +19,9 @@ const scopeReader = (db) => {
|
|
|
18
19
|
WHERE subject = ? AND relation = ? AND object = ?`)).get(subject, relation, object),
|
|
19
20
|
parents: (object) => (parentsStmt ??= db.prepare(`SELECT ${TUPLE_COLUMNS} FROM _substrat_tuples
|
|
20
21
|
WHERE subject = ? AND relation = 'parent'`)).all(object),
|
|
22
|
+
// #1672: a capability subject is resolved against its own directory row, which lives
|
|
23
|
+
// in this scope's spine beside the entities it reaches.
|
|
24
|
+
capability: (id) => (capabilityStmt ??= db.prepare(capabilityByIdQuery(id).sql)).get(...capabilityByIdQuery(id).params),
|
|
21
25
|
};
|
|
22
26
|
};
|
|
23
27
|
/**
|
package/dist/checker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checker.js","sourceRoot":"","sources":["../src/checker.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,oBAAoB,
|
|
1
|
+
{"version":3,"file":"checker.js","sourceRoot":"","sources":["../src/checker.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,mBAAmB,EACnB,oBAAoB,GAOrB,MAAM,sBAAsB,CAAC;AAiC9B,MAAM,aAAa,GAAG,mDAAmD,CAAC;AAE1E;;;;;;GAMG;AACH,MAAM,WAAW,GAAG,CAAC,EAAqB,EAAoB,EAAE;IAC9D,IAAI,UAA0C,CAAC;IAC/C,IAAI,SAAyC,CAAC;IAC9C,IAAI,WAA2C,CAAC;IAChD,IAAI,cAA8C,CAAC;IACnD,OAAO;QACL,MAAM,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,CAClC,CAAC,UAAU,KAAK,EAAE,CAAC,OAAO,CACxB,UAAU,aAAa;+CACgB,CACxC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,cAAc,GAAG,CAAyB;QAC/D,KAAK,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CACnC,CAAC,SAAS,KAAK,EAAE,CAAC,OAAO,CACvB,UAAU,aAAa;2DAC4B,CACpD,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAmC;QACrE,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAClB,CAAC,WAAW,KAAK,EAAE,CAAC,OAAO,CACzB,UAAU,aAAa;mDACoB,CAC5C,CAAC,CAAC,GAAG,CAAC,MAAM,CAAyB;QACxC,qFAAqF;QACrF,wDAAwD;QACxD,UAAU,EAAE,CAAC,EAAE,EAAE,EAAE,CACjB,CAAC,cAAc,KAAK,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAC9D,GAAG,mBAAmB,CAAC,EAAE,CAAC,CAAC,MAAM,CACL;KACjC,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAiB;IAClD,MAAM,OAAO,GAAiB,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;IAE7E,MAAM,MAAM,GAA0B;QACpC,GAAG,EAAE,OAAO;QACZ,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,CAClD,IAAI,CAAC,SAAS;aACX,OAAO,CACN,UAAU,aAAa;mEACkC,CAC1D;aACA,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,cAAc,GAAG,CAAyB;QACzE,OAAO,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;QACvD,oFAAoF;QACpF,4EAA4E;QAC5E,QAAQ,EAAE,CAAC,IAAU,EAAE,EAAE;YACvB,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACjE,OAAO,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC1C,CAAC;KACF,CAAC;IAEF,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type BlobStoreHandle, type ConnectionId, type ModuleId, type DomainEvent, type PlatformRequestId, type PlatformRequest, type PlatformRequestFilter, type PlatformRequestStatus, type PlatformRequestFailure, type ProjectedConnectionGrant, type PlatformActorId, type PrincipalId, type ScopeDump, type ScopeId, type ImpersonationSessionId, type TenantId, type TenantStoreHandle } from '@substrat-run/contracts';
|
|
2
|
-
import { type FreshnessReport, type FreshnessRegistration, type BlobStoreProvisionInput, type ScopeAttachments, type ExecutorDeadLetter, type ExecutorDrainReport, type MigrateScopeOutcome, type MigrationFrontier, type ExecutorHandler, type ExecutorRetryPolicy, type ConnectorHandler, type ConnectorOptions, type Clock, type FetchLike, type SecretBox, type HostAdmin, type ModuleRegistration, type OperationHandler, type PermissionChecker, type ProvisionScopeInput, type ScheduleRegistration, type ScheduleRunReport, type ScopeHost, type ScopeStub, type ScopeStubOptions, type TenantRelationalStore, type TenantStoreProvisionInput } from '@substrat-run/kernel';
|
|
1
|
+
import { type BlobStoreHandle, type CapabilityExchange, type ConnectionId, type ModuleId, type DomainEvent, type PlatformRequestId, type PlatformRequest, type PlatformRequestFilter, type PlatformRequestStatus, type PlatformRequestFailure, type ProjectedConnectionGrant, type PlatformActorId, type PrincipalId, type ScopeDump, type ScopeId, type ImpersonationSessionId, type TenantId, type TenantStoreHandle } from '@substrat-run/contracts';
|
|
2
|
+
import { type FreshnessReport, type FreshnessRegistration, type BlobStoreProvisionInput, type ScopeAttachments, type ExecutorDeadLetter, type ExecutorDrainReport, type MigrateScopeOutcome, type MigrationFrontier, type ExecutorHandler, type ExecutorRetryPolicy, type ConnectorHandler, type ConnectorOptions, type Clock, type FetchLike, type SecretBox, type HostAdmin, type ModuleRegistration, type OperationHandler, type PermissionChecker, type ProvisionScopeInput, type ScheduleRegistration, type ScheduleRunReport, type ScopeHost, type ScopeStub, type ScopeStubOptions, type TenantRelationalStore, type TenantStoreProvisionInput, type JobDriveReport, type JobHandler, type JobRun, type JobRunFilter, type StartJobRunInput } from '@substrat-run/kernel';
|
|
3
3
|
export interface SqliteScopeHostOptions {
|
|
4
4
|
/** Directory holding one SQLite file per scope plus the directory database. */
|
|
5
5
|
dir: string;
|
|
@@ -49,11 +49,39 @@ export interface SqliteScopeHostOptions {
|
|
|
49
49
|
}
|
|
50
50
|
export declare class SqliteScopeHost implements ScopeHost {
|
|
51
51
|
readonly admin: HostAdmin;
|
|
52
|
+
/**
|
|
53
|
+
* Live reads are not available on this host (#938) — `never`, not `undefined`.
|
|
54
|
+
*
|
|
55
|
+
* This is the `clock?: never` seam (`CloudflareScopeHostOptions`) pointing the other
|
|
56
|
+
* way. There, the hosted adapter refuses an option it could only honour for half of
|
|
57
|
+
* the host's judgements; here, the pure adapter refuses a surface it cannot honour at
|
|
58
|
+
* all. A live read needs something that outlives a request and can be woken when an
|
|
59
|
+
* event lands. On Cloudflare that is the scope's own Durable Object, which the runtime
|
|
60
|
+
* keeps addressable between requests. This host is a function call inside somebody
|
|
61
|
+
* else's process: nothing here survives the return, so the only honest answer is that
|
|
62
|
+
* there is no subscription to hand out.
|
|
63
|
+
*
|
|
64
|
+
* `never` rather than an omission, and rather than a `subscribe` that throws, because
|
|
65
|
+
* those two fail in the places this one does not: an omission makes
|
|
66
|
+
* `host.liveReads?.subscribe(…)` compile and silently do nothing, and a thrower moves
|
|
67
|
+
* the discovery to runtime, in production, on the one path nobody drove in a test.
|
|
68
|
+
* The field is declared so that reaching for it is refused by the compiler at the call
|
|
69
|
+
* site — the same argument the clock seam makes in its own comment.
|
|
70
|
+
*
|
|
71
|
+
* What this costs, stated rather than hidden: nothing in the fan-out is held to a
|
|
72
|
+
* CONTRACT suite, because a contract suite asserts the two adapters agree and on this
|
|
73
|
+
* they deliberately do not. The tests live on `adapter-cloudflare` instead, beside the
|
|
74
|
+
* only host that can run them. The day a pure host grows a long-lived transport, this
|
|
75
|
+
* comment and those tests' home are the whole change.
|
|
76
|
+
*/
|
|
77
|
+
readonly liveReads?: never;
|
|
52
78
|
private readonly dir;
|
|
53
79
|
private readonly checker;
|
|
54
80
|
private readonly directory;
|
|
55
81
|
private readonly scopes;
|
|
56
82
|
private readonly scopesById;
|
|
83
|
+
/** The runtimes holding an open `reader` (#1624), least recently read first — `READER_CAP`'s LRU. */
|
|
84
|
+
private readonly readers;
|
|
57
85
|
/** Per-tenant relational stores (#301), opened lazily and cached by `ref` (the bare
|
|
58
86
|
* `.sqlite` filename). The pure-adapter analogue of a per-tenant D1 — one file per
|
|
59
87
|
* (tenant, vertical, binding), physically separate from the scope DBs. */
|
|
@@ -98,6 +126,13 @@ export declare class SqliteScopeHost implements ScopeHost {
|
|
|
98
126
|
private readonly roles;
|
|
99
127
|
/** Executor id → {eventType, handler} (K-22 §4.2). Host code, not module code. */
|
|
100
128
|
private readonly executors;
|
|
129
|
+
/**
|
|
130
|
+
* `<moduleId>/<job>` → the pass body and its default step policy (#1577). Host
|
|
131
|
+
* code like `executors`, and keyed the way a run row is: the coalescing key's
|
|
132
|
+
* first two thirds, so a run picked off the table finds its handler by the
|
|
133
|
+
* columns it already carries.
|
|
134
|
+
*/
|
|
135
|
+
private readonly jobs;
|
|
101
136
|
/**
|
|
102
137
|
* The event currently being effected by an executor, stamped onto any admin rows
|
|
103
138
|
* it writes. Ambient rather than threaded through every HostAdmin signature: it is
|
|
@@ -216,6 +251,29 @@ export declare class SqliteScopeHost implements ScopeHost {
|
|
|
216
251
|
*/
|
|
217
252
|
getImpersonatedScope(session: ImpersonationSessionId, tenantId: TenantId, scopeId: ScopeId, options?: ScopeStubOptions): Promise<ScopeStub>;
|
|
218
253
|
getSystemScope(moduleId: ModuleId, tenantId: TenantId, scopeId: ScopeId): Promise<ScopeStub>;
|
|
254
|
+
/**
|
|
255
|
+
* The lifecycle gate the capability doors share (#1672): the scope must exist in this
|
|
256
|
+
* tenant, the tenant must be active, the scope must be active — K-3's fail-closed pair
|
|
257
|
+
* check, worded as the principal door words it, so a scope in another tenant reads the
|
|
258
|
+
* same as one that does not exist. Migrations are applied as on every door.
|
|
259
|
+
*/
|
|
260
|
+
private openActiveScope;
|
|
261
|
+
/**
|
|
262
|
+
* The exchange (#1672) — a secret traded for a session, or for the principal a `become`
|
|
263
|
+
* capability yields. One serialized scope task and one transaction, so the use it takes
|
|
264
|
+
* and the `capability.exercised` event recording it commit together or not at all; the
|
|
265
|
+
* event's consumers then dispatch as an invoke's would.
|
|
266
|
+
*/
|
|
267
|
+
exchangeCapability(tenantId: TenantId, scopeId: ScopeId, secret: string, options?: {
|
|
268
|
+
mode?: 'act' | 'become';
|
|
269
|
+
}): Promise<CapabilityExchange | null>;
|
|
270
|
+
/**
|
|
271
|
+
* The capability door (#1672) — mirror of the connection and system doors. The token is
|
|
272
|
+
* shape-checked and hashed HERE, and only its hash travels on: `buildStub` re-resolves it
|
|
273
|
+
* to its capability on every invoke, so a revoke or an expiry refuses the very next call
|
|
274
|
+
* on a stub minted before it.
|
|
275
|
+
*/
|
|
276
|
+
getCapabilityScope(sessionToken: string, tenantId: TenantId, scopeId: ScopeId, options?: ScopeStubOptions): Promise<ScopeStub>;
|
|
219
277
|
registeredSchedules(): ScheduleRegistration[];
|
|
220
278
|
registeredFreshness(): FreshnessRegistration[];
|
|
221
279
|
/**
|
|
@@ -236,7 +294,7 @@ export declare class SqliteScopeHost implements ScopeHost {
|
|
|
236
294
|
*/
|
|
237
295
|
checkFreshness(moduleId: ModuleId, tenantId: TenantId, scopeId: ScopeId): Promise<FreshnessReport>;
|
|
238
296
|
runDueSchedules(moduleId: ModuleId, tenantId: TenantId, scopeId: ScopeId): Promise<ScheduleRunReport>;
|
|
239
|
-
/** The stub body, shared by the principal, connection, system and
|
|
297
|
+
/** The stub body, shared by the principal, connection, system, impersonation and capability doors. */
|
|
240
298
|
private buildStub;
|
|
241
299
|
/**
|
|
242
300
|
* The entity a guarded operation's precondition is about (#129).
|
|
@@ -285,6 +343,35 @@ export declare class SqliteScopeHost implements ScopeHost {
|
|
|
285
343
|
*/
|
|
286
344
|
private recordExecutorDelivery;
|
|
287
345
|
drainDue(tenantId: TenantId, scopeId: ScopeId): Promise<ExecutorDrainReport>;
|
|
346
|
+
registerJob(moduleId: ModuleId, name: string, handler: JobHandler, retry?: ExecutorRetryPolicy): void;
|
|
347
|
+
/**
|
|
348
|
+
* D-14's in-process driver: the run store is direct SQL on the scope db.
|
|
349
|
+
*
|
|
350
|
+
* **The PASS stays outside the actor; every STORE OPERATION takes a turn on it.**
|
|
351
|
+
* That split is the whole of the concurrency design here, and the first cut got
|
|
352
|
+
* the second half wrong — it ran these statements on `rt.db` with no turn at all,
|
|
353
|
+
* under a comment claiming they "interleave exactly as any other write does".
|
|
354
|
+
* They do not. `invoke` opens a raw `BEGIN IMMEDIATE` on this same connection and
|
|
355
|
+
* HOLDS IT ACROSS AWAITS (its guards, its handler), so a job-store statement
|
|
356
|
+
* issued while some unrelated request was mid-operation landed INSIDE that
|
|
357
|
+
* request's transaction — and rolled back with it. A step whose effect had
|
|
358
|
+
* already happened would lose its ledger row and run a second time, for no reason
|
|
359
|
+
* connected to the job at all.
|
|
360
|
+
*
|
|
361
|
+
* A turn each is the fix, and it keeps the property the original comment wanted:
|
|
362
|
+
* a pass may take an hour, and holding the scope's lock for it would stop every
|
|
363
|
+
* request on that scope, so the pass itself is never enqueued. Only the short
|
|
364
|
+
* writes are. Nothing nests — a store operation never invokes, and the `invoke`s
|
|
365
|
+
* a pass makes through `pass.scope()` take their own separate turns — so there is
|
|
366
|
+
* no path by which this can deadlock against itself.
|
|
367
|
+
*/
|
|
368
|
+
private jobStore;
|
|
369
|
+
startJobRun(tenantId: TenantId, scopeId: ScopeId, input: StartJobRunInput): Promise<JobRun>;
|
|
370
|
+
runDueJobs(tenantId: TenantId, scopeId: ScopeId, options?: {
|
|
371
|
+
maxPasses?: number;
|
|
372
|
+
limit?: number;
|
|
373
|
+
}): Promise<JobDriveReport>;
|
|
374
|
+
jobRuns(tenantId: TenantId, scopeId: ScopeId, filter?: JobRunFilter): Promise<JobRun[]>;
|
|
288
375
|
dispatchConnector(tenantId: TenantId, scopeId: ScopeId, handler: ConnectorHandler, event: DomainEvent, options?: {
|
|
289
376
|
timeoutMs?: number;
|
|
290
377
|
}): Promise<void>;
|
|
@@ -324,7 +411,6 @@ export declare class SqliteScopeHost implements ScopeHost {
|
|
|
324
411
|
* point, since the denial is exactly the write the rolled-back operation could not make.
|
|
325
412
|
*/
|
|
326
413
|
private recordDenial;
|
|
327
|
-
private parseOutboxRow;
|
|
328
414
|
/**
|
|
329
415
|
* The single audit choke point (control-plane.md §4.4). EVERY control-plane
|
|
330
416
|
* mutation — here and `provisionScope` — routes through this one method, so
|
|
@@ -400,6 +486,29 @@ export declare class SqliteScopeHost implements ScopeHost {
|
|
|
400
486
|
* has to attempt-and-tolerate instead — see its `ensureDirectoryColumns`).
|
|
401
487
|
*/
|
|
402
488
|
private ensureColumn;
|
|
489
|
+
/**
|
|
490
|
+
* #1288: `_substrat_schedule_state`, rebuilt with `kind` in its key on a scope db
|
|
491
|
+
* whose table predates the column. The statements are the kernel's, so the DO
|
|
492
|
+
* adapter rebuilds byte-identically, and the detection is the `sqlite_master.sql`
|
|
493
|
+
* read `ensureIdentityKey` already uses — PRAGMA would do here, but not there.
|
|
494
|
+
*/
|
|
495
|
+
private ensureScheduleStateKind;
|
|
496
|
+
/**
|
|
497
|
+
* #1573: run a create-copy-drop-rename against the directory as ONE transaction.
|
|
498
|
+
* `exec` of four statements is four autocommits, and the state between DROP and
|
|
499
|
+
* RENAME is the one to fear: the next open runs the bootstrap first, whose `CREATE
|
|
500
|
+
* TABLE IF NOT EXISTS` puts an EMPTY table of the new shape back, detection then
|
|
501
|
+
* reads that shape and concludes the migration is done — and every copied row stays
|
|
502
|
+
* orphaned in the `_new` table, with nothing ever erroring. Atomic, neither
|
|
503
|
+
* intermediate state is reachable, so there is no recovery path to write (or to
|
|
504
|
+
* leave untested).
|
|
505
|
+
*
|
|
506
|
+
* `db.transaction` nests as a SAVEPOINT, as `ensureScheduleStateKind` (#1571) relies
|
|
507
|
+
* on. Each script leads with `DROP TABLE IF EXISTS <table>_new` to absorb a scratch
|
|
508
|
+
* table arriving from BELOW the transaction (a torn copy of the file, a backup that
|
|
509
|
+
* captured one mid-rebuild) — belt, not the fix.
|
|
510
|
+
*/
|
|
511
|
+
private rebuildAtomically;
|
|
403
512
|
/**
|
|
404
513
|
* Rebuild `_substrat_identities` when it still carries the pre-K-22 global key.
|
|
405
514
|
* A PRIMARY KEY cannot be ALTERed, so this is create-copy-drop-rename.
|
|
@@ -423,6 +532,20 @@ export declare class SqliteScopeHost implements ScopeHost {
|
|
|
423
532
|
* widens what a future row may say.
|
|
424
533
|
*/
|
|
425
534
|
private ensureAdminLogTenantNullable;
|
|
535
|
+
/**
|
|
536
|
+
* #1572: `_substrat_sweep_runs_intent` with `kind` in it, on a directory whose index
|
|
537
|
+
* predates that. `CREATE UNIQUE INDEX IF NOT EXISTS` matches on the name alone, so the
|
|
538
|
+
* bootstrap cannot do this: on an existing directory it sees the old index and skips,
|
|
539
|
+
* and the schedule/freshness collision the new key refuses stays live for good.
|
|
540
|
+
*
|
|
541
|
+
* Detected from `sqlite_master.sql`, like the table rebuilds above, and replaced as
|
|
542
|
+
* DROP-then-CREATE in one transaction (`rebuildAtomically`). Less rides on that than on
|
|
543
|
+
* a table rebuild — the index holds no rows, and one dropped but not re-created comes
|
|
544
|
+
* back on the next open, because the bootstrap creates it by name — but there is then
|
|
545
|
+
* no committed directory with no dedupe key at all. The CREATE cannot meet a row it
|
|
546
|
+
* refuses: every set of rows unique on (request_id, unit) is unique on the wider key.
|
|
547
|
+
*/
|
|
548
|
+
private ensureSweepRunsIntentKind;
|
|
426
549
|
private ensureDirectoryColumns;
|
|
427
550
|
private loadRoles;
|
|
428
551
|
/**
|
|
@@ -464,7 +587,50 @@ export declare class SqliteScopeHost implements ScopeHost {
|
|
|
464
587
|
* state.
|
|
465
588
|
*/
|
|
466
589
|
private assertScopeReachable;
|
|
590
|
+
/**
|
|
591
|
+
* The intent-journal half of `shredSubject` (#1600) — the DO's `redactSubject` twin.
|
|
592
|
+
*
|
|
593
|
+
* Row-by-row rather than one `UPDATE … WHERE`: the decision is structural (does this
|
|
594
|
+
* payload embed an event the erasure redacts?) and SQL cannot make it, because an
|
|
595
|
+
* intent payload is opaque JSON with no `pii_class` column to test. The SQL narrows to
|
|
596
|
+
* the rows that could possibly match; the kernel predicate decides; the kernel's
|
|
597
|
+
* statement writes. All three are shared with the Durable-Object adapter so the two
|
|
598
|
+
* cannot drift about what a redacted intent is.
|
|
599
|
+
*
|
|
600
|
+
* Returns how many rows it redacted — zero on a re-run, the tombstones having already
|
|
601
|
+
* stopped matching.
|
|
602
|
+
*/
|
|
603
|
+
private redactSubjectIntents;
|
|
467
604
|
private scopeDbFor;
|
|
605
|
+
/**
|
|
606
|
+
* The connection a `HostAdmin` READ runs on (#1624) — `scopeDbFor`'s twin, with the
|
|
607
|
+
* same K-3 and reap gate in front of it.
|
|
608
|
+
*
|
|
609
|
+
* From OUTSIDE the scope's actor it is the scope's read-only connection. `invoke` holds
|
|
610
|
+
* a `BEGIN IMMEDIATE` open on the shared connection across its awaits, so a read there
|
|
611
|
+
* saw a stranger's uncommitted rows: a lake drain shipped an event that then rolled
|
|
612
|
+
* back — permanently, since the lake is append-only — and an export captured one into a
|
|
613
|
+
* backup. The file is WAL, so the reader sees exactly what was committed.
|
|
614
|
+
*
|
|
615
|
+
* From INSIDE one of the scope's actor tasks (an executor handed `HostAdmin`, reading
|
|
616
|
+
* its own scope) it is the shared connection, as before. The only transaction open
|
|
617
|
+
* there is the caller's own unit — the actor serializes everything else — so reading
|
|
618
|
+
* it is reading your own writes, which is the answer the caller is owed and the one it
|
|
619
|
+
* had. `ScopeActor.turn` makes the same call for the writers (#1678).
|
|
620
|
+
*/
|
|
621
|
+
private scopeReadDbFor;
|
|
622
|
+
/**
|
|
623
|
+
* `scopeReadDbFor` without the directory gate, for the host-side reads that already
|
|
624
|
+
* resolved their runtime — the platform-intent drain's `listPlatformRequests` among them,
|
|
625
|
+
* where a stranger's uncommitted intent was a platform effect about to be carried out for
|
|
626
|
+
* an operation that then rolled back.
|
|
627
|
+
*/
|
|
628
|
+
private readDb;
|
|
629
|
+
/**
|
|
630
|
+
* Close a scope's connections and forget its runtime — the reader with the writer, so
|
|
631
|
+
* neither outlives the file a reap or a snapshot delete is about to remove.
|
|
632
|
+
*/
|
|
633
|
+
private closeRuntime;
|
|
468
634
|
/**
|
|
469
635
|
* The additive spine-column migrations, shared by `runtime()` and the dump replay.
|
|
470
636
|
* KERNEL_DDL is all IF NOT EXISTS, so a scope DB created before a column keeps the
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAcL,KAAK,eAAe,EAuDpB,KAAK,YAAY,EAGjB,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAcL,KAAK,eAAe,EAuDpB,KAAK,kBAAkB,EAMvB,KAAK,YAAY,EAGjB,KAAK,QAAQ,EAab,KAAK,WAAW,EAIhB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAI3B,KAAK,wBAAwB,EAY7B,KAAK,eAAe,EACpB,KAAK,WAAW,EAehB,KAAK,SAAS,EAEd,KAAK,OAAO,EAYZ,KAAK,sBAAsB,EAG3B,KAAK,QAAQ,EAGb,KAAK,iBAAiB,EAavB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EA8BL,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAc1B,KAAK,uBAAuB,EAG5B,KAAK,gBAAgB,EAGrB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EAkDxB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,SAAS,EAEd,KAAK,SAAS,EACd,KAAK,kBAAkB,EAEvB,KAAK,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