@codemem/core 0.49.0-beta.2 → 0.49.0-beta.3
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/better-sqlite-coordinator-store.d.ts +21 -2
- package/dist/better-sqlite-coordinator-store.d.ts.map +1 -1
- package/dist/coordinator-account-change-authority.d.ts +56 -0
- package/dist/coordinator-account-change-authority.d.ts.map +1 -0
- package/dist/coordinator-account-change-decision.d.ts +141 -0
- package/dist/coordinator-account-change-decision.d.ts.map +1 -0
- package/dist/coordinator-account-change-http-test-fixtures.d.ts +3 -1
- package/dist/coordinator-account-change-http-test-fixtures.d.ts.map +1 -1
- package/dist/coordinator-account-change-original-sql-test-fixtures.d.ts +61 -0
- package/dist/coordinator-account-change-original-sql-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-account-change.d.ts +7 -1
- package/dist/coordinator-account-change.d.ts.map +1 -1
- package/dist/coordinator-account-connection-schema.d.ts +31 -0
- package/dist/coordinator-account-connection-schema.d.ts.map +1 -1
- package/dist/coordinator-account-connection-session.d.ts +9 -0
- package/dist/coordinator-account-connection-session.d.ts.map +1 -1
- package/dist/coordinator-account-historical-revoke-original-sql-test-fixtures.d.ts +7 -0
- package/dist/coordinator-account-historical-revoke-original-sql-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-account-historical-revoke.d.ts +8 -2
- package/dist/coordinator-account-historical-revoke.d.ts.map +1 -1
- package/dist/coordinator-account-link-status.d.ts.map +1 -1
- package/dist/coordinator-account-schema-sqlite-test-fixtures.d.ts +58 -0
- package/dist/coordinator-account-schema-sqlite-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-account-schema-test-fixtures.d.ts +20 -0
- package/dist/coordinator-account-schema-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-auth-browser-owner-purpose-test-harness.d.ts.map +1 -1
- package/dist/coordinator-auth-browser-transaction-test-fixtures.d.ts.map +1 -1
- package/dist/coordinator-auth-browser-transaction.d.ts.map +1 -1
- package/dist/coordinator-auth-controller-consistency-test-fixtures.d.ts +5 -1
- package/dist/coordinator-auth-controller-consistency-test-fixtures.d.ts.map +1 -1
- package/dist/coordinator-auth-controller-history.d.ts +0 -1
- package/dist/coordinator-auth-controller-history.d.ts.map +1 -1
- package/dist/coordinator-auth-controller-original-sql-test-fixtures.d.ts +41 -0
- package/dist/coordinator-auth-controller-original-sql-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-auth-controller-owner.d.ts +0 -6
- package/dist/coordinator-auth-controller-owner.d.ts.map +1 -1
- package/dist/coordinator-auth-controller-race-test-fixtures.d.ts +38 -0
- package/dist/coordinator-auth-controller-race-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-auth-controller-read-set.d.ts +47 -0
- package/dist/coordinator-auth-controller-read-set.d.ts.map +1 -0
- package/dist/coordinator-auth-controller-stages-original-sql-test-fixtures.d.ts +8 -0
- package/dist/coordinator-auth-controller-stages-original-sql-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-auth-controller.d.ts +1 -21
- package/dist/coordinator-auth-controller.d.ts.map +1 -1
- package/dist/coordinator-auth-device-claim-eligibility.d.ts +39 -1
- package/dist/coordinator-auth-device-claim-eligibility.d.ts.map +1 -1
- package/dist/coordinator-auth-historical-store-test-fixture.d.ts +2 -0
- package/dist/coordinator-auth-historical-store-test-fixture.d.ts.map +1 -1
- package/dist/coordinator-auth-legacy-assignment.d.ts +4 -2
- package/dist/coordinator-auth-legacy-assignment.d.ts.map +1 -1
- package/dist/coordinator-auth-link-authority-upgrade.d.ts +5 -0
- package/dist/coordinator-auth-link-authority-upgrade.d.ts.map +1 -1
- package/dist/coordinator-auth-link-maintenance-fixtures.d.ts +2 -2
- package/dist/coordinator-auth-link-maintenance-fixtures.d.ts.map +1 -1
- package/dist/coordinator-auth-link-provenance.d.ts.map +1 -1
- package/dist/coordinator-auth-link-revocation-test-harness.d.ts.map +1 -1
- package/dist/coordinator-auth-link-test-fixtures.d.ts +26 -4
- package/dist/coordinator-auth-link-test-fixtures.d.ts.map +1 -1
- package/dist/coordinator-auth-link.d.ts +4 -0
- package/dist/coordinator-auth-link.d.ts.map +1 -1
- package/dist/coordinator-auth-read-set.d.ts +99 -0
- package/dist/coordinator-auth-read-set.d.ts.map +1 -0
- package/dist/coordinator-auth-schema-stage.d.ts +36 -0
- package/dist/coordinator-auth-schema-stage.d.ts.map +1 -0
- package/dist/coordinator-auth-schema.d.ts.map +1 -1
- package/dist/coordinator-auth-session.d.ts.map +1 -1
- package/dist/coordinator-auth-store-test-fixtures.d.ts +12 -0
- package/dist/coordinator-auth-store-test-fixtures.d.ts.map +1 -1
- package/dist/coordinator-controller-revocation-test-harness.d.ts.map +1 -1
- package/dist/coordinator-d1-schema-inventory.d.ts +10 -0
- package/dist/coordinator-d1-schema-inventory.d.ts.map +1 -0
- package/dist/coordinator-device-claim-binding-reuse.d.ts +2 -0
- package/dist/coordinator-device-claim-binding-reuse.d.ts.map +1 -1
- package/dist/coordinator-device-claim-binding-sql.d.ts +8 -0
- package/dist/coordinator-device-claim-binding-sql.d.ts.map +1 -1
- package/dist/coordinator-device-ownership-evidence-original-sql-test-fixtures.d.ts +88 -0
- package/dist/coordinator-device-ownership-evidence-original-sql-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-device-ownership-evidence-queries.d.ts +4 -14
- package/dist/coordinator-device-ownership-evidence-queries.d.ts.map +1 -1
- package/dist/coordinator-device-ownership-evidence-test-fixtures.d.ts +10 -0
- package/dist/coordinator-device-ownership-evidence-test-fixtures.d.ts.map +1 -1
- package/dist/coordinator-device-ownership-evidence.d.ts +11 -3
- package/dist/coordinator-device-ownership-evidence.d.ts.map +1 -1
- package/dist/coordinator-device-rebind-browser.d.ts +1 -1
- package/dist/coordinator-device-rebind-ceremony.d.ts +2 -1
- package/dist/coordinator-device-rebind-ceremony.d.ts.map +1 -1
- package/dist/coordinator-device-rebind-commit.d.ts.map +1 -1
- package/dist/coordinator-device-rebind-test-fixtures.d.ts.map +1 -1
- package/dist/coordinator-device-self-bind-authority.d.ts +11 -2
- package/dist/coordinator-device-self-bind-authority.d.ts.map +1 -1
- package/dist/coordinator-device-self-bind-decision.d.ts +84 -0
- package/dist/coordinator-device-self-bind-decision.d.ts.map +1 -0
- package/dist/coordinator-device-self-bind-original-sql-test-fixtures.d.ts +17 -0
- package/dist/coordinator-device-self-bind-original-sql-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-device-self-bind-test-fixtures.d.ts +12 -1
- package/dist/coordinator-device-self-bind-test-fixtures.d.ts.map +1 -1
- package/dist/coordinator-history-sql-equivalence-test-fixtures.d.ts +6 -2
- package/dist/coordinator-history-sql-equivalence-test-fixtures.d.ts.map +1 -1
- package/dist/coordinator-legacy-completion-owner-proof-original-sql-test-fixtures.d.ts +77 -0
- package/dist/coordinator-legacy-completion-owner-proof-original-sql-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-legacy-completion-owner-proof-test-fixtures.d.ts +46 -0
- package/dist/coordinator-legacy-completion-owner-proof-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-legacy-completion-owner-proof.d.ts +19 -2
- package/dist/coordinator-legacy-completion-owner-proof.d.ts.map +1 -1
- package/dist/coordinator-legacy-owner-compatibility.d.ts +23 -0
- package/dist/coordinator-legacy-owner-compatibility.d.ts.map +1 -1
- package/dist/coordinator-legacy-owner-resolution-commit-original-sql-test-fixtures.d.ts +63 -0
- package/dist/coordinator-legacy-owner-resolution-commit-original-sql-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-legacy-owner-resolution-commit-test-fixtures.d.ts +3 -1
- package/dist/coordinator-legacy-owner-resolution-commit-test-fixtures.d.ts.map +1 -1
- package/dist/coordinator-legacy-owner-resolution-commit.d.ts.map +1 -1
- package/dist/coordinator-owner-enrollment-commit.d.ts.map +1 -1
- package/dist/coordinator-owner-enrollment-historical-test-fixture.d.ts +2 -0
- package/dist/coordinator-owner-enrollment-historical-test-fixture.d.ts.map +1 -1
- package/dist/coordinator-owner-enrollment-start-test-fixtures.d.ts.map +1 -1
- package/dist/coordinator-owner-negative-consistency.d.ts +11 -17
- package/dist/coordinator-owner-negative-consistency.d.ts.map +1 -1
- package/dist/coordinator-owner-negative-original-sql-test-fixtures.d.ts +44 -0
- package/dist/coordinator-owner-negative-original-sql-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-owner-negative-race-test-fixtures.d.ts +26 -0
- package/dist/coordinator-owner-negative-race-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-owner-negative-read-set.d.ts +43 -0
- package/dist/coordinator-owner-negative-read-set.d.ts.map +1 -0
- package/dist/coordinator-owner-negative-reads.d.ts +32 -0
- package/dist/coordinator-owner-negative-reads.d.ts.map +1 -0
- package/dist/coordinator-owner-producer-original-sql-test-fixtures.d.ts +26 -0
- package/dist/coordinator-owner-producer-original-sql-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-owner-resolution-review-test-fixtures.d.ts +1 -0
- package/dist/coordinator-owner-resolution-review-test-fixtures.d.ts.map +1 -1
- package/dist/coordinator-owner-resolution-review.d.ts +1 -0
- package/dist/coordinator-owner-resolution-review.d.ts.map +1 -1
- package/dist/coordinator-producer-negative-owner-test-fixtures.d.ts +8 -2
- package/dist/coordinator-producer-negative-owner-test-fixtures.d.ts.map +1 -1
- package/dist/coordinator-recipient-negative-race-test-fixtures.d.ts +54 -0
- package/dist/coordinator-recipient-negative-race-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-recipient-owner-consistency.d.ts +4 -5
- package/dist/coordinator-recipient-owner-consistency.d.ts.map +1 -1
- package/dist/coordinator-recipient-owner-original-sql-test-fixtures.d.ts +30 -0
- package/dist/coordinator-recipient-owner-original-sql-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-resolved-account-owner-status-query.d.ts +4 -1
- package/dist/coordinator-resolved-account-owner-status-query.d.ts.map +1 -1
- package/dist/coordinator-resolved-account-owner-status-test-fixtures.d.ts +1 -0
- package/dist/coordinator-resolved-account-owner-status-test-fixtures.d.ts.map +1 -1
- package/dist/coordinator-resolved-account-owner-status.d.ts +2 -0
- package/dist/coordinator-resolved-account-owner-status.d.ts.map +1 -1
- package/dist/{coordinator-runtime-kbPwxxKq.js → coordinator-runtime-BXJQAKFD.js} +3 -3
- package/dist/{coordinator-runtime-kbPwxxKq.js.map → coordinator-runtime-BXJQAKFD.js.map} +1 -1
- package/dist/coordinator-sql-compare.d.ts +22 -0
- package/dist/coordinator-sql-compare.d.ts.map +1 -0
- package/dist/d1-coordinator-store.d.ts +16 -1
- package/dist/d1-coordinator-store.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8907 -8434
- package/dist/index.js.map +1 -1
- package/dist/internal/cloudflare-coordinator.js +1070 -1065
- package/dist/internal/cloudflare-coordinator.js.map +1 -1
- package/dist/internal/relay-runtime.js +2 -2
- package/dist/linked-legacy-setup-test-fixtures.d.ts +2 -0
- package/dist/linked-legacy-setup-test-fixtures.d.ts.map +1 -1
- package/dist/{owner-enrollment-start-BtoRKf3z.js → owner-enrollment-start-BFyBKWvZ.js} +2626 -2425
- package/dist/owner-enrollment-start-BFyBKWvZ.js.map +1 -0
- package/dist/owner-enrollment-start.d.ts.map +1 -1
- package/dist/relay-admission-table-keys-test-fixtures.d.ts +2 -1
- package/dist/relay-admission-table-keys-test-fixtures.d.ts.map +1 -1
- package/dist/{relay-peer-client-0XpekgnZ.js → relay-peer-client-DrTb2oZt.js} +2631 -2617
- package/dist/relay-peer-client-DrTb2oZt.js.map +1 -0
- package/dist/{sync-auth-constants-DvALG0T0.js → sync-auth-constants-BVzVfSmn.js} +4019 -3416
- package/dist/sync-auth-constants-BVzVfSmn.js.map +1 -0
- package/dist/{sync-reachability-pass-BpDt2z4y.js → sync-reachability-pass-CUe5bK61.js} +12 -12
- package/dist/{sync-reachability-pass-BpDt2z4y.js.map → sync-reachability-pass-CUe5bK61.js.map} +1 -1
- package/dist/sync-reachability-pass-D9cA54fj.js +2 -0
- package/package.json +3 -3
- package/dist/owner-enrollment-start-BtoRKf3z.js.map +0 -1
- package/dist/relay-peer-client-0XpekgnZ.js.map +0 -1
- package/dist/sync-auth-constants-DvALG0T0.js.map +0 -1
- package/dist/sync-reachability-pass-Bi4GBi-x.js +0 -2
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test-only. This file exists only to pin equivalence with the pre-port SQL.
|
|
3
|
+
*
|
|
4
|
+
* Between the markers are, copied verbatim from main at 075d46647 before ownership
|
|
5
|
+
* evidence moved to read-set guards: the evidence statements of
|
|
6
|
+
* coordinator-device-ownership-evidence-queries.ts, and the collector class of
|
|
7
|
+
* coordinator-device-ownership-evidence.ts. Only the class was renamed; its imports of
|
|
8
|
+
* those statements now resolve to the copies above it. Everything else it imports is
|
|
9
|
+
* unchanged since that commit. Do not edit the copy to follow later changes; delete this
|
|
10
|
+
* file with coordinator-device-ownership-evidence-equivalence.test.ts.
|
|
11
|
+
*/
|
|
12
|
+
import { type ControllerHistorySnapshot } from "./coordinator-auth-controller-history.js";
|
|
13
|
+
import type { AuthLinkStatement } from "./coordinator-auth-link.js";
|
|
14
|
+
import { type OwnershipDecision } from "./coordinator-device-ownership-evidence-classify.js";
|
|
15
|
+
import { type ReviewedWeakLabel } from "./coordinator-legacy-owner-resolution-metadata.js";
|
|
16
|
+
export declare const ROW_LIMIT = 500;
|
|
17
|
+
export declare const BYTE_LIMIT = 750000;
|
|
18
|
+
export interface EvidenceQuery {
|
|
19
|
+
name: string;
|
|
20
|
+
sql: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const CONTROLLER_COLUMNS: string[];
|
|
23
|
+
export declare const RESOLUTION_COLUMNS: string[];
|
|
24
|
+
export declare const EVIDENCE_QUERIES: EvidenceQuery[];
|
|
25
|
+
export declare function readEvidenceQuery(query: EvidenceQuery, encoded: string): AuthLinkStatement;
|
|
26
|
+
export interface CapturedEvidenceRow {
|
|
27
|
+
category: string;
|
|
28
|
+
row_count: number;
|
|
29
|
+
row: string | null;
|
|
30
|
+
}
|
|
31
|
+
export declare function readCombinedEvidenceQuery(encoded: string): AuthLinkStatement;
|
|
32
|
+
export declare function atomicEvidenceQuery(encoded: string): AuthLinkStatement;
|
|
33
|
+
interface EvidenceBackend {
|
|
34
|
+
first<T>(statement: AuthLinkStatement): Promise<T | null>;
|
|
35
|
+
all<T>(statement: AuthLinkStatement): Promise<T[]>;
|
|
36
|
+
}
|
|
37
|
+
interface ActualSigner {
|
|
38
|
+
groupId: string;
|
|
39
|
+
deviceId: string;
|
|
40
|
+
publicKey: string;
|
|
41
|
+
fingerprint: string;
|
|
42
|
+
}
|
|
43
|
+
interface CollectionInput {
|
|
44
|
+
canonicalOwnerId: string;
|
|
45
|
+
actualSigner: ActualSigner;
|
|
46
|
+
verifiedHistory: ControllerHistorySnapshot;
|
|
47
|
+
}
|
|
48
|
+
interface RecheckSnapshot {
|
|
49
|
+
readonly version: 1;
|
|
50
|
+
}
|
|
51
|
+
type OwnershipCollection = {
|
|
52
|
+
kind: "collected";
|
|
53
|
+
decision: OwnershipDecision;
|
|
54
|
+
weakLabels: ReviewedWeakLabel[];
|
|
55
|
+
recheckSnapshot: RecheckSnapshot;
|
|
56
|
+
} | {
|
|
57
|
+
kind: "unavailable";
|
|
58
|
+
authorizationUnavailable: true;
|
|
59
|
+
};
|
|
60
|
+
type SourceVerification = {
|
|
61
|
+
kind: "verified_controller_source" | "source_missing" | "source_revoked" | "source_mismatch";
|
|
62
|
+
} | {
|
|
63
|
+
kind: "unavailable";
|
|
64
|
+
authorizationUnavailable: true;
|
|
65
|
+
};
|
|
66
|
+
/** Internal read-only metadata collector. No result of this class grants access. */
|
|
67
|
+
export declare class OriginalDeviceOwnershipEvidence {
|
|
68
|
+
private readonly backend;
|
|
69
|
+
private readonly snapshots;
|
|
70
|
+
private readonly coordinatorId;
|
|
71
|
+
constructor(backend: EvidenceBackend, config: {
|
|
72
|
+
coordinatorId: string;
|
|
73
|
+
});
|
|
74
|
+
collect(input: CollectionInput): Promise<OwnershipCollection>;
|
|
75
|
+
private verifyHistory;
|
|
76
|
+
private captureRows;
|
|
77
|
+
/** A predicate for a future checked batch, never an admission or a write. */
|
|
78
|
+
prepareAtomicRecheck(snapshot: RecheckSnapshot): AuthLinkStatement;
|
|
79
|
+
/** Private confirmation metadata; only this reader's original capture is accepted. */
|
|
80
|
+
reviewedEvidenceDigest(snapshot: unknown): Promise<string | null>;
|
|
81
|
+
verifyControllerSource(input: {
|
|
82
|
+
sourceRef: unknown;
|
|
83
|
+
expectedOwnerId: string;
|
|
84
|
+
actualSigner: ActualSigner;
|
|
85
|
+
}): Promise<SourceVerification>;
|
|
86
|
+
}
|
|
87
|
+
export {};
|
|
88
|
+
//# sourceMappingURL=coordinator-device-ownership-evidence-original-sql-test-fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-ownership-evidence-original-sql-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-device-ownership-evidence-original-sql-test-fixtures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAEN,KAAK,yBAAyB,EAI9B,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EASN,KAAK,iBAAiB,EACtB,MAAM,qDAAqD,CAAC;AAE7D,OAAO,EAGN,KAAK,iBAAiB,EAEtB,MAAM,mDAAmD,CAAC;AAE3D,eAAO,MAAM,SAAS,MAAM,CAAC;AAC7B,eAAO,MAAM,UAAU,SAAU,CAAC;AAClC,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACZ;AAID,eAAO,MAAM,kBAAkB,UAA+B,CAAC;AAC/D,eAAO,MAAM,kBAAkB,UAG7B,CAAC;AAqCH,eAAO,MAAM,gBAAgB,EAAE,aAAa,EA2D3C,CAAC;AAOF,wB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G,iBAAiB,CAAA;CAAE,GAChG;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,wBAAwB,EAAE,IAAI,CAAA;CAAE,CAAC;AA+H3D,oFAAoF;AACpF,qBAAa,+BAA+B;IAI1C,OAAO,CAAC,QAAQ,CAAC,OAAO;IAHzB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA8D;IACxF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,YACkB,OAAO,EAAE,eAAe,EACzC,MAAM,EAAE;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,EAGjC;IAEK,OAAO,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAoClE;YAEa,aAAa;YA0Bb,WAAW;IA4BzB,6EAA6E;IAC7E,oBAAoB,CAAC,QAAQ,EAAE,eAAe,GAAG,iBAAiB,CAIjE;IAED,sFAAsF;IAChF,sBAAsB,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAGtE;IAEK,sBAAsB,CAAC,KAAK,EAAE;QACnC,SAAS,EAAE,OAAO,CAAC;QACnB,eAAe,EAAE,MAAM,CAAC;QACxB,YAAY,EAAE,YAAY,CAAC;KAC3B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA2C9B;CACD"}
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Limits and column lists of the ownership evidence categories. The reads themselves are
|
|
3
|
+
* in coordinator-owner-negative-reads.ts.
|
|
4
|
+
*/
|
|
2
5
|
export declare const ROW_LIMIT = 500;
|
|
3
6
|
export declare const BYTE_LIMIT = 750000;
|
|
4
|
-
export interface EvidenceQuery {
|
|
5
|
-
name: string;
|
|
6
|
-
sql: string;
|
|
7
|
-
}
|
|
8
7
|
export declare const CONTROLLER_COLUMNS: string[];
|
|
9
8
|
export declare const RESOLUTION_COLUMNS: string[];
|
|
10
|
-
export declare const EVIDENCE_QUERIES: EvidenceQuery[];
|
|
11
|
-
export declare function readEvidenceQuery(query: EvidenceQuery, encoded: string): AuthLinkStatement;
|
|
12
|
-
export interface CapturedEvidenceRow {
|
|
13
|
-
category: string;
|
|
14
|
-
row_count: number;
|
|
15
|
-
row: string | null;
|
|
16
|
-
}
|
|
17
|
-
export declare function readCombinedEvidenceQuery(encoded: string): AuthLinkStatement;
|
|
18
|
-
export declare function atomicEvidenceQuery(encoded: string): AuthLinkStatement;
|
|
19
9
|
//# sourceMappingURL=coordinator-device-ownership-evidence-queries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-device-ownership-evidence-queries.d.ts","sourceRoot":"","sources":["../src/coordinator-device-ownership-evidence-queries.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coordinator-device-ownership-evidence-queries.d.ts","sourceRoot":"","sources":["../src/coordinator-device-ownership-evidence-queries.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,SAAS,MAAM,CAAC;AAC7B,eAAO,MAAM,UAAU,SAAU,CAAC;AAIlC,eAAO,MAAM,kBAAkB,UAA+B,CAAC;AAC/D,eAAO,MAAM,kBAAkB,UAG7B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AuthLinkStatement } from "./coordinator-auth-link.js";
|
|
2
2
|
import { cfg } from "./coordinator-auth-link-test-fixtures.js";
|
|
3
|
+
import { type AtomicReader } from "./coordinator-auth-read-set.js";
|
|
3
4
|
import { type Backend, type Fixture } from "./coordinator-auth-store-test-fixtures.js";
|
|
4
5
|
import { EXPECTED_KEY_ID } from "./coordinator-ed25519-key-id-test-fixtures.js";
|
|
5
6
|
export { cfg, EXPECTED_KEY_ID };
|
|
@@ -16,6 +17,8 @@ export declare function insert(f: Fixture, table: string, row: Row): void;
|
|
|
16
17
|
export declare function evidenceBackend(f: Fixture, backend: Backend): {
|
|
17
18
|
first<T>(statement: AuthLinkStatement): Promise<T | null>;
|
|
18
19
|
all<T>(statement: AuthLinkStatement): Promise<T[]>;
|
|
20
|
+
/** Both stores' backends read a set of statements together, as one snapshot. */
|
|
21
|
+
readBatch<T>(statements: AuthLinkStatement[]): Promise<T[][]>;
|
|
19
22
|
};
|
|
20
23
|
export declare function evidenceTest(backend: Backend): import("vitest").TestAPI<{
|
|
21
24
|
f: Fixture;
|
|
@@ -77,4 +80,11 @@ export declare function sourceRef(row: ReturnType<typeof controller>): {
|
|
|
77
80
|
reviewed_weak_labels_json: string;
|
|
78
81
|
created_at: string;
|
|
79
82
|
};
|
|
83
|
+
/**
|
|
84
|
+
* Runs a capture's recheck guards together and reports them as the old atomic recheck
|
|
85
|
+
* did: 1 while every read still holds, 0 once one changed or for an unknown capture.
|
|
86
|
+
*/
|
|
87
|
+
export declare function recheckMatches(db: AtomicReader, guards: AuthLinkStatement[] | null): Promise<{
|
|
88
|
+
matches: 0 | 1;
|
|
89
|
+
}>;
|
|
80
90
|
//# sourceMappingURL=coordinator-device-ownership-evidence-test-fixtures.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-device-ownership-evidence-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-device-ownership-evidence-test-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,GAAG,EAAO,MAAM,0CAA0C,CAAC;AACpE,OAAO,EACN,KAAK,OAAO,EAEZ,KAAK,OAAO,EAIZ,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAEN,eAAe,EACf,MAAM,+CAA+C,CAAC;AAQvD,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC;AAChC,eAAO,MAAM,SAAS,6BAA6B,CAAC;AACpD,eAAO,MAAM,MAAM;;;;;CAKlB,CAAC;AACF,eAAO,MAAM,QAAQ,qFAC8D,CAAC;AACpF,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,CAAC;AACzD,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,QAOzD;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;IAGpD,KAAK,CAAC,CAAC,aAAa,iBAAiB,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IASzD,GAAG,CAAC,CAAC,aAAa,iBAAiB,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"coordinator-device-ownership-evidence-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-device-ownership-evidence-test-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,GAAG,EAAO,MAAM,0CAA0C,CAAC;AACpE,OAAO,EAAE,KAAK,YAAY,EAAc,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EACN,KAAK,OAAO,EAEZ,KAAK,OAAO,EAIZ,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAEN,eAAe,EACf,MAAM,+CAA+C,CAAC;AAQvD,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC;AAChC,eAAO,MAAM,SAAS,6BAA6B,CAAC;AACpD,eAAO,MAAM,MAAM;;;;;CAKlB,CAAC;AACF,eAAO,MAAM,QAAQ,qFAC8D,CAAC;AACpF,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,CAAC;AACzD,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,QAOzD;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;IAGpD,KAA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AA;CAAE,CAAC,CAE7B"}
|
|
@@ -5,6 +5,11 @@ import { type ReviewedWeakLabel } from "./coordinator-legacy-owner-resolution-me
|
|
|
5
5
|
interface EvidenceBackend {
|
|
6
6
|
first<T>(statement: AuthLinkStatement): Promise<T | null>;
|
|
7
7
|
all<T>(statement: AuthLinkStatement): Promise<T[]>;
|
|
8
|
+
/**
|
|
9
|
+
* Runs reads together, so a capture and each recheck are one snapshot. Required: a
|
|
10
|
+
* one-at-a-time fallback would check the guards at different moments.
|
|
11
|
+
*/
|
|
12
|
+
readBatch<T>(statements: AuthLinkStatement[]): Promise<T[][]>;
|
|
8
13
|
}
|
|
9
14
|
interface ActualSigner {
|
|
10
15
|
groupId: string;
|
|
@@ -45,9 +50,12 @@ export declare class CoordinatorDeviceOwnershipEvidence {
|
|
|
45
50
|
});
|
|
46
51
|
collect(input: CollectionInput): Promise<OwnershipCollection>;
|
|
47
52
|
private verifyHistory;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Guards that re-run every read of this capture, for a later checked batch: each aborts
|
|
55
|
+
* it once its read changed. Never an admission or a write. Null for a snapshot this
|
|
56
|
+
* reader did not capture, which therefore never matches.
|
|
57
|
+
*/
|
|
58
|
+
recheckGuards(snapshot: RecheckSnapshot): AuthLinkStatement[] | null;
|
|
51
59
|
/** Private confirmation metadata; only this reader's original capture is accepted. */
|
|
52
60
|
reviewedEvidenceDigest(snapshot: unknown): Promise<string | null>;
|
|
53
61
|
verifyControllerSource(input: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-device-ownership-evidence.d.ts","sourceRoot":"","sources":["../src/coordinator-device-ownership-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,yBAAyB,
|
|
1
|
+
{"version":3,"file":"coordinator-device-ownership-evidence.d.ts","sourceRoot":"","sources":["../src/coordinator-device-ownership-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK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CAAE,GAChG;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,wBAAwB,EAAE,IAAI,CAAA;CAAE,CAAC;AA8E3D,oFAAoF;AACpF,qBAAa,kCAAkC;IAO7C,OAAO,CAAC,QAAQ,CAAC,OAAO;IANzB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAGtB;IACJ,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,YACkB,OAAO,EAAE,eAAe,EACzC,MAAM,EAAE;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,EAGjC;IAEK,OAAO,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAoClE;YAEa,aAAa;IA0B3B;;;;OAIG;IACH,aAAa,CAAC,QAAQ,EAAE,eAAe,GAAG,iBAAiB,EAAE,GAAG,IAAI,CAEnE;IAED,sFAAsF;IAChF,sBAAsB,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAGtE;IAEK,sBAAsB,CAAC,KAAK,EAAE;QACnC,SAAS,EAAE,OAAO,CAAC;QACnB,eAAe,EAAE,MAAM,CAAC;QACxB,YAAY,EAAE,YAAY,CAAC;KAC3B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA2C9B;CACD"}
|
|
@@ -12,8 +12,8 @@ export interface DeviceRebindBrowserInput {
|
|
|
12
12
|
now?: () => number;
|
|
13
13
|
}
|
|
14
14
|
export declare function createDeviceRebindBrowser(input: DeviceRebindBrowserInput): Promise<{
|
|
15
|
-
handlers?: undefined;
|
|
16
15
|
ok: false;
|
|
16
|
+
handlers?: undefined;
|
|
17
17
|
} | {
|
|
18
18
|
ok: true;
|
|
19
19
|
handlers: Readonly<{
|
|
@@ -99,7 +99,8 @@ export interface DeviceRebindDependencies extends DeviceRebindDeviceDependencies
|
|
|
99
99
|
/**
|
|
100
100
|
* The browser and device ceremony for ADR 0005 Section 8 rebinding. Every
|
|
101
101
|
* step re-checks live authority in its winning statement; pre-reads only pick
|
|
102
|
-
* the refusal reason shown to the person.
|
|
102
|
+
* the refusal reason shown to the person. The pinned self-bind authority is
|
|
103
|
+
* read and decided before the write, and guards in the same batch re-run its reads.
|
|
103
104
|
*/
|
|
104
105
|
export declare function createDeviceRebindCeremony(deps: DeviceRebindDependencies): Readonly<{
|
|
105
106
|
claimBrowser: (request: Request, clientKey: string) => Promise<DeviceRebindResult | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-device-rebind-ceremony.d.ts","sourceRoot":"","sources":["../src/coordinator-device-rebind-ceremony.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coordinator-device-rebind-ceremony.d.ts","sourceRoot":"","sources":["../src/coordinator-device-rebind-ceremony.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAC;AAOvG,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,4BAA4B,CAAC;AAiBrF,OAAO,EACN,KAAK,cAAc,EAGnB,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EAGN,KAAK,mBAAmB,EAGxB,MAAM,uCAAuC,CAAC;AAW/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,mFAAmF;AACnF,MAAM,WAAW,kBAAkB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,wFAAwF;IACxF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,+EAA+E;IAC/E,gBAAgB,EAAE,M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AAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;GAuB7D;AAED,6EAA6E;AAC7E,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,8BAA8B;4DA1BtD,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;;mBAyjBjD,MAAM;gBACT,kBAAkB;0BACR,MAAM;mBACb,MAAM;UA5jBS,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;;mBAyoBJ,MAAM;gBAAU,kBAAkB;UAzoBhE,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;GA4B7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-device-rebind-commit.d.ts","sourceRoot":"","sources":["../src/coordinator-device-rebind-commit.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"coordinator-device-rebind-commit.d.ts","sourceRoot":"","sources":["../src/coordinator-device-rebind-commit.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,4BAA4B,CAAC;AAmBrF,0FAA0F;AAC1F,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAG3C,MAAM,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GACjC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,mBAAmB,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,mBAAmB,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAuFvB;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,03BAWF,CAAC;AAuP5B;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC5C,OAAO,EAAE,eAAe,EACxB,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,GACf,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAyBrC;AAED,UAAU,uBAAuB;IAChC,OAAO,EAAE,eAAe,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACvC,KAAK,EAAE,uBAAuB,GAC5B,OAAO,CAAC,wBAAwB,CAAC,CAkCnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-device-rebind-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-device-rebind-test-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"coordinator-device-rebind-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-device-rebind-test-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAE,KAAK,OAAO,EAAwB,MAAM,2CAA2C,CAAC;AAC/F,OAAO,EACN,KAAK,mBAAmB,EAGxB,MAAM,sCAAsC,CAAC;AAI9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGxE,eAAO,MAAM,GAAG,gBAAoB,CAA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AAE,EAAE,QAAQ,CAAC,QAAQ,EACrB,KAAK,EAAE;IACN,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CACjB,GACC,OAAO,CAAC,IAAI,CAAC,CAkBf"}
|
|
@@ -6,10 +6,19 @@ export interface DeviceSelfBindInput {
|
|
|
6
6
|
attemptId?: string;
|
|
7
7
|
}
|
|
8
8
|
export declare function hasDeviceRebindStartAuthorityColumn(backend: AuthLinkBackend): Promise<boolean>;
|
|
9
|
-
|
|
9
|
+
export interface DeviceSelfBindAuthority {
|
|
10
|
+
/** Stored as `start_authority_json` at start; every later step requires the same text. */
|
|
11
|
+
snapshot: string;
|
|
12
|
+
/** These go first in the batch that writes. They re-run every read behind the pin. */
|
|
13
|
+
guards: AuthLinkStatement[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Server proof only. Reads the facts, decides in TypeScript, and returns the pin with
|
|
17
|
+
* the guards that re-run every read. The decision is void unless those guards run in
|
|
18
|
+
* the batch that writes; never authorize from the pin alone.
|
|
10
19
|
* The account link may originate on a peer. Its immutable genesis still has to verify.
|
|
11
20
|
*/
|
|
12
|
-
export declare function prepareDeviceSelfBindAuthority(backend: AuthLinkBackend, input: DeviceSelfBindInput, config: CoordinatorAuthLinkConfig, now: number): Promise<
|
|
21
|
+
export declare function prepareDeviceSelfBindAuthority(backend: AuthLinkBackend, input: DeviceSelfBindInput, config: CoordinatorAuthLinkConfig, now: number): Promise<DeviceSelfBindAuthority | null>;
|
|
13
22
|
/** Readiness is deliberately fail closed on D1 before migration 0044. */
|
|
14
23
|
export declare function readDeviceSelfBindEligibility(backend: AuthLinkBackend, input: DeviceSelfBindInput, config: CoordinatorAuthLinkConfig, now: number): Promise<{
|
|
15
24
|
kind: "eligible";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-device-self-bind-authority.d.ts","sourceRoot":"","sources":["../src/coordinator-device-self-bind-authority.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EACX,yBAAyB,EACzB,yBAAyB,EACzB,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"coordinator-device-self-bind-authority.d.ts","sourceRoot":"","sources":["../src/coordinator-device-self-bind-authority.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EACX,yBAAyB,EACzB,yBAAyB,EACzB,MAAM,qCAAqC,CAAC;AAW7C,MAAM,WAAW,mBAAmB;IACnC,MAAM,EAAE,yBAAyB,CAAC;IAClC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,mCAAmC,CACxD,OAAO,EAAE,eAAe,GACtB,OAAO,CAAC,OAAO,CAAC,CAOlB;AAmJD,MAAM,WAAW,uBAAuB;IACvC,0FAA0F;IAC1F,QAAQ,EAAE,MAAM,CAAC;IACjB,sFAAsF;IACtF,MAAM,EAAE,iBAAiB,EAAE,CAAC;CAC5B;AAwDD;;;;;GAKG;AACH,wBAAsB,8BAA8B,CACnD,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,yBAAyB,EACjC,GAAG,EAAE,MAAM,GACT,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CA0BzC;AAED,yEAAyE;AACzE,wBAAsB,6BAA6B,CAClD,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,yBAAyB,EACjC,GAAG,EAAE,MAAM,GACT,OAAO,CAAC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,CAAC,CAS7E"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { type SqlValue } from "./coordinator-sql-compare.js";
|
|
2
|
+
/** Trusted server values: the signed enrollment, the configuration, and derived key facts. */
|
|
3
|
+
export interface SelfBindSubject {
|
|
4
|
+
coordinatorId: string;
|
|
5
|
+
identityId: string;
|
|
6
|
+
groupId: string;
|
|
7
|
+
deviceId: string;
|
|
8
|
+
publicKey: string;
|
|
9
|
+
fingerprint: string;
|
|
10
|
+
keyId: string;
|
|
11
|
+
issuer: string;
|
|
12
|
+
nowMs: number;
|
|
13
|
+
attemptId: string | null;
|
|
14
|
+
/** Every stored text form of this device's key. */
|
|
15
|
+
aliases: string[];
|
|
16
|
+
}
|
|
17
|
+
export interface SelfBindEnrollment {
|
|
18
|
+
group_id: string;
|
|
19
|
+
device_id: string;
|
|
20
|
+
public_key: SqlValue;
|
|
21
|
+
fingerprint: SqlValue;
|
|
22
|
+
identity_id: SqlValue;
|
|
23
|
+
enabled: SqlValue;
|
|
24
|
+
created_at: SqlValue;
|
|
25
|
+
/** For an enrollment in the signed group: 1 when that group exists and is not archived. */
|
|
26
|
+
group_live: SqlValue;
|
|
27
|
+
}
|
|
28
|
+
export interface SelfBindAttestation {
|
|
29
|
+
coordinator_id: string;
|
|
30
|
+
attestation_id: string;
|
|
31
|
+
identity_id: SqlValue;
|
|
32
|
+
group_id: SqlValue;
|
|
33
|
+
device_id: SqlValue;
|
|
34
|
+
public_key: SqlValue;
|
|
35
|
+
fingerprint: SqlValue;
|
|
36
|
+
review_receipt_id: SqlValue;
|
|
37
|
+
evidence_digest: SqlValue;
|
|
38
|
+
enrollment_identity_id: SqlValue;
|
|
39
|
+
revision: SqlValue;
|
|
40
|
+
created_at: SqlValue;
|
|
41
|
+
revoked_at: SqlValue;
|
|
42
|
+
}
|
|
43
|
+
export interface SelfBindLink {
|
|
44
|
+
/** The pinned link columns, in pin order. */
|
|
45
|
+
link: SqlValue[];
|
|
46
|
+
issuer: SqlValue;
|
|
47
|
+
/** SQL verdict: the link's immutable creation records verify. */
|
|
48
|
+
proven: SqlValue;
|
|
49
|
+
/** SQL verdict: a controller-reviewed link has its complete browser creation receipt. */
|
|
50
|
+
controller_receipt: SqlValue;
|
|
51
|
+
/** SQL verdict: the link came from a device without a browser. */
|
|
52
|
+
headless: SqlValue;
|
|
53
|
+
/** The pinned columns of the link's controller review and device claim, if any. */
|
|
54
|
+
linkController: SqlValue[][];
|
|
55
|
+
linkClaim: SqlValue[][];
|
|
56
|
+
}
|
|
57
|
+
/** Everything the decision looks at. A list named `...Conflicts` must be empty. */
|
|
58
|
+
export type SelfBindFacts = {
|
|
59
|
+
/** Enrollments of this device or of any text form of its key. */
|
|
60
|
+
enrollments: SelfBindEnrollment[];
|
|
61
|
+
/** Controller reviews of this device or of any text form of its key. */
|
|
62
|
+
attestations: SelfBindAttestation[];
|
|
63
|
+
/** Active account links of the current Identity. */
|
|
64
|
+
links: SelfBindLink[];
|
|
65
|
+
/** Consumed invites that assigned this device, key or fingerprint to another Identity. */
|
|
66
|
+
inviteConflicts: unknown[];
|
|
67
|
+
bindingConflicts: unknown[];
|
|
68
|
+
claimConflicts: unknown[];
|
|
69
|
+
revocationConflicts: unknown[];
|
|
70
|
+
otherIdentityLinkAttemptConflicts: unknown[];
|
|
71
|
+
otherIdentityLinkAuditConflicts: unknown[];
|
|
72
|
+
ownerAttemptConflicts: unknown[];
|
|
73
|
+
linkAttemptConflicts: unknown[];
|
|
74
|
+
rebindAttemptConflicts: unknown[];
|
|
75
|
+
legacyDecisionConflicts: unknown[];
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Pure decision over the facts read. Returns the pin that the start stores as
|
|
79
|
+
* `start_authority_json` and every later step requires again, or null when this device
|
|
80
|
+
* may not connect this way. The pin is byte-compatible with the SQL `json_object` that
|
|
81
|
+
* produced it before, so attempts started by an earlier release still match.
|
|
82
|
+
*/
|
|
83
|
+
export declare function decideDeviceSelfBind(p: SelfBindSubject, facts: SelfBindFacts): string | null;
|
|
84
|
+
//# sourceMappingURL=coordinator-device-self-bind-decision.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-self-bind-decision.d.ts","sourceRoot":"","sources":["../src/coordinator-device-self-bind-decision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAuB,MAAM,8BAA8B,CAAC;AAElF,8FAA8F;AAC9F,MAAM,WAAW,eAAe;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,mDAAmD;IACnD,OAAO,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,QAAQ,CAAC;IACrB,WAAW,EAAE,QAAQ,CAAC;IACtB,WAAW,EAAE,QAAQ,CAAC;IACtB,OAAO,EAAE,QAAQ,CAAC;IAClB,UAAU,EAAE,QAAQ,CAAC;IACrB,2FAA2F;IAC3F,UAAU,EAAE,QAAQ,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IACnC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,QAAQ,CAAC;IACtB,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,QAAQ,CAAC;IACpB,UAAU,EAAE,QAAQ,CAAC;IACr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gB,oBAAoB,CAAC,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI,CAO5F"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AuthLinkBackend, AuthLinkStatement } from "./coordinator-auth-link.js";
|
|
2
|
+
import type { CoordinatorAuthLinkConfig } from "./coordinator-auth-link-contract.js";
|
|
3
|
+
import { type DeviceSelfBindInput } from "./coordinator-device-self-bind-authority.js";
|
|
4
|
+
/** Server proof only. Embed this SELECT in the winning statement, never authorize from a pre-read.
|
|
5
|
+
* The account link may originate on a peer. Its immutable genesis still has to verify.
|
|
6
|
+
*/
|
|
7
|
+
export declare function prepareOriginalSelfBindAuthority(backend: AuthLinkBackend, input: DeviceSelfBindInput, config: CoordinatorAuthLinkConfig, now: number): Promise<AuthLinkStatement | null>;
|
|
8
|
+
export declare const ORIGINAL_CHECK_COUNT: number;
|
|
9
|
+
/** What the original statement answered: its pin, or null when it selected no row. */
|
|
10
|
+
export declare function originalSelfBindSnapshot(backend: AuthLinkBackend, input: DeviceSelfBindInput, config: CoordinatorAuthLinkConfig, now: number): Promise<string | null>;
|
|
11
|
+
/**
|
|
12
|
+
* The original statement's individual checks, by index into CHECKS, that did not hold.
|
|
13
|
+
* Null when the statement was never built. It reuses the original WITH clause and
|
|
14
|
+
* replaces only the final SELECT, which has no bound values.
|
|
15
|
+
*/
|
|
16
|
+
export declare function originalFailedChecks(backend: AuthLinkBackend, input: DeviceSelfBindInput, config: CoordinatorAuthLinkConfig, now: number): Promise<number[] | null>;
|
|
17
|
+
//# sourceMappingURL=coordinator-device-self-bind-original-sql-test-fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-self-bind-original-sql-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-device-self-bind-original-sql-test-fixtures.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAErF,OAAO,EACN,KAAK,mBAAmB,EAExB,MAAM,6CAA6C,CAAC;AAqDrD;;GAEG;AACH,wBAAsB,gCAAgC,CACrD,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,yBAAyB,EACjC,GAAG,EAAE,MAAM,GACT,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CA4CnC;AAGD,eAAO,MAAM,oBAAoB,QAAgB,CAAC;AAElD,sFAAsF;AACtF,wBAAsB,wBAAwB,CAC7C,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,yBAAyB,EACjC,GAAG,EAAE,MAAM,GACT,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAIxB;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CACzC,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,yBAAyB,EACjC,GAAG,EAAE,MAAM,GACT,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAU1B"}
|
|
@@ -7,7 +7,10 @@ export declare const SELF_BIND_NOW = 1791028800000;
|
|
|
7
7
|
* Peer-origin links intentionally have no relationship to that own review.
|
|
8
8
|
*/
|
|
9
9
|
export type SelfBindLinkOrigin = "own" | "peer" | "peer_controller";
|
|
10
|
-
export
|
|
10
|
+
export interface SelfBindFixtureOptions {
|
|
11
|
+
accountSchema?: "current" | "v2";
|
|
12
|
+
}
|
|
13
|
+
export declare function selfBindFixture(kind: Backend, origin?: SelfBindLinkOrigin, identityId?: string, options?: SelfBindFixtureOptions): Promise<{
|
|
11
14
|
store: import("./coordinator-auth-store-test-fixtures.js").Store;
|
|
12
15
|
db: Database.Database;
|
|
13
16
|
own: {
|
|
@@ -100,4 +103,12 @@ export declare function selfBindFixture(kind: Backend, origin?: SelfBindLinkOrig
|
|
|
100
103
|
};
|
|
101
104
|
close: () => Promise<void>;
|
|
102
105
|
}>;
|
|
106
|
+
/** Stores a canonical legacy completion of group-a that assigns device-a to its Identity. */
|
|
107
|
+
export declare function assignLegacyCompletion(f: Awaited<ReturnType<typeof selfBindFixture>>): void;
|
|
108
|
+
/**
|
|
109
|
+
* Stores a retained legacy owner resolution for device-a whose original source is the
|
|
110
|
+
* device's own controller review. The self-bind authority then takes the path that
|
|
111
|
+
* reads and classifies ownership evidence, which needs a backend that can read rows.
|
|
112
|
+
*/
|
|
113
|
+
export declare function retainOwnReviewOwnership(f: Awaited<ReturnType<typeof selfBindFixture>>): Promise<void>;
|
|
103
114
|
//# sourceMappingURL=coordinator-device-self-bind-test-fixtures.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-device-self-bind-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-device-self-bind-test-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"coordinator-device-self-bind-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-device-self-bind-test-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAQtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EACN,KAAK,OAAO,EAKZ,MAAM,2CAA2C,CAAC;AAInD,OAAO,EACN,KAAK,mBAAmB,EAExB,MAAM,sCAAsC,CAAC;AAa9C,eAAO,MAAM,aAAa,gBAAoB,CAAC;AAU/C;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,MAAM,GAAG,iBAAiB,CAAC;AAkJpE,MAAM,WAAW,sBAAsB;IACtC,aAAa,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CACjC;AAED,wBAAsB,eAAe,CACpC,IAAI,EAAE,OAAO,EACb,MAAM,GAAE,kBAA0B,EAClC,UAAU,SAAmB,EAC7B,OAAO,GAAE,sBAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAQL,eAAe;;;;;;;;;;;;;;;;0BA8BjB,mBAAmB,UAAU,MAAM;;;;;;;;;;;;GAmBhE;AAuDD,6FAA6F;AAC7F,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,GAAG,IAAI,CAsC3F;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC7C,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,GAC5C,OAAO,CAAC,IAAI,CAAC,CA2Bf"}
|
|
@@ -11,11 +11,15 @@ export declare function captureHistorySql(backend: Backend, input: {
|
|
|
11
11
|
}): Promise<{
|
|
12
12
|
statement: AuthLinkStatement;
|
|
13
13
|
observedRows: unknown[];
|
|
14
|
+
/**
|
|
15
|
+
* 1 while every guard of the winning batch holds. With `reference`, the history
|
|
16
|
+
* guard uses the frozen selector instead of the live one.
|
|
17
|
+
*/
|
|
14
18
|
current(options?: {
|
|
15
19
|
reference?: boolean;
|
|
16
20
|
}): Promise<{
|
|
17
21
|
current: number;
|
|
18
|
-
}
|
|
22
|
+
}>;
|
|
19
23
|
}>;
|
|
20
24
|
export declare function historyCases(statement: AuthLinkStatement): {
|
|
21
25
|
name: string;
|
|
@@ -23,10 +27,10 @@ export declare function historyCases(statement: AuthLinkStatement): {
|
|
|
23
27
|
selected: boolean;
|
|
24
28
|
}[];
|
|
25
29
|
export declare function compareHistorySql(backend: Backend, statement: AuthLinkStatement): Promise<{
|
|
26
|
-
error?: undefined;
|
|
27
30
|
rows: {
|
|
28
31
|
row: string;
|
|
29
32
|
}[];
|
|
33
|
+
error?: undefined;
|
|
30
34
|
} | {
|
|
31
35
|
rows?: undefined;
|
|
32
36
|
error: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-history-sql-equivalence-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-history-sql-equivalence-test-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAOpE,KAAK,OAAO,GAAG;IACd,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IACnD,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;CAC1D,CAAC;AAoBF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAsBvD;AAED,wBAAsB,iBAAiB,CACtC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE;;;
|
|
1
|
+
{"version":3,"file":"coordinator-history-sql-equivalence-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-history-sql-equivalence-test-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAOpE,KAAK,OAAO,GAAG;IACd,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IACnD,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;CAC1D,CAAC;AAoBF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAsBvD;AAED,wBAAsB,iBAAiB,CACtC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE;;;IA0BpE;;;OAGG;sBACoB;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE;;;GAc/C;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,iBAAiB;UAYpC,MAAM;SAAO,MAAM;cAAY,OAAO;IA0B1D;AAuDD,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,iBAAiB;;aAG3C,MAAM;;;;;;GAShD"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test-only. This file exists only to pin equivalence with the pre-port SQL.
|
|
3
|
+
*
|
|
4
|
+
* Between the markers are, copied verbatim from main at 075d46647 before legacy team
|
|
5
|
+
* completions moved to guarded capture reads: the whole of
|
|
6
|
+
* coordinator-legacy-completion-owner-proof.ts below its imports, and the winning INSERT
|
|
7
|
+
* of BetterSqliteCoordinatorStore.createLegacyTeamCompletion. Only the INSERT was wrapped
|
|
8
|
+
* in a function that binds what the store bound, in the same order; the D1 store sent
|
|
9
|
+
* the same statement with other whitespace. Do not edit the copy to follow later
|
|
10
|
+
* changes; delete this file with
|
|
11
|
+
* coordinator-legacy-completion-owner-proof-equivalence.test.ts.
|
|
12
|
+
*/
|
|
13
|
+
import { type ControllerHistoryRecord, type ControllerHistorySnapshot } from "./coordinator-auth-controller-history.js";
|
|
14
|
+
import type { AuthLinkStatement } from "./coordinator-auth-link.js";
|
|
15
|
+
import { type EvidenceRow, type EvidenceRows, type EvidenceSubject } from "./coordinator-device-ownership-evidence-classify.js";
|
|
16
|
+
interface Backend {
|
|
17
|
+
first<T>(statement: AuthLinkStatement): Promise<T | null>;
|
|
18
|
+
all<T>(statement: AuthLinkStatement): Promise<T[]>;
|
|
19
|
+
}
|
|
20
|
+
/** Internal capability, meaningful only to this module's WeakMap. */
|
|
21
|
+
export interface LegacyCompletionOwnerProof {
|
|
22
|
+
readonly version: 1;
|
|
23
|
+
}
|
|
24
|
+
interface Subject extends EvidenceSubject {
|
|
25
|
+
owner: string;
|
|
26
|
+
fragments: string[];
|
|
27
|
+
fingerprints: string[];
|
|
28
|
+
}
|
|
29
|
+
interface ProofSql {
|
|
30
|
+
/** Append after LEGACY_OWNER_INPUT_SQL, which already starts WITH. */
|
|
31
|
+
readonly ctes: string;
|
|
32
|
+
readonly currentSql: string;
|
|
33
|
+
readonly compatibleSql: string;
|
|
34
|
+
/** Bind after the three LEGACY_OWNER_INPUT_SQL values. */
|
|
35
|
+
readonly values: readonly string[];
|
|
36
|
+
}
|
|
37
|
+
/** Internal capture preparation; not exported from the package entrypoint. */
|
|
38
|
+
export declare function prepareCompletionHistory(rows: EvidenceRow[], decode?: (text: string) => unknown): {
|
|
39
|
+
row: EvidenceRow;
|
|
40
|
+
record: ControllerHistoryRecord;
|
|
41
|
+
decode: () => unknown;
|
|
42
|
+
}[];
|
|
43
|
+
/** Internal subject view; canonical validation remains subject-specific. */
|
|
44
|
+
export declare function subjectHistory(rows: EvidenceRows, subject: Subject, keys: Map<string, string>, prepared: ReturnType<typeof prepareCompletionHistory>): ControllerHistorySnapshot;
|
|
45
|
+
/** Read-only capture. No submitted approved-subject list or source reference is accepted.
|
|
46
|
+
* Call only after the stores validate the canonical manifest and its source binding.
|
|
47
|
+
*/
|
|
48
|
+
export declare function captureLegacyCompletionOwnerProof(input: {
|
|
49
|
+
backend: Backend;
|
|
50
|
+
groupId: string;
|
|
51
|
+
manifestJson: string;
|
|
52
|
+
keyMetadata: string;
|
|
53
|
+
}): Promise<LegacyCompletionOwnerProof>;
|
|
54
|
+
/** The winning INSERT must use both predicates. A token by itself grants nothing.
|
|
55
|
+
* Keep LEGACY_OWNER_SOURCE_CURRENT_SQL and all ordinary completion checks as well.
|
|
56
|
+
*/
|
|
57
|
+
export declare function legacyCompletionOwnerProofSql(proof: LegacyCompletionOwnerProof): ProofSql;
|
|
58
|
+
/** The pre-port INSERT, bound as the store bound it. */
|
|
59
|
+
export declare function originalLegacyCompletionInsertStatement(input: {
|
|
60
|
+
proof: {
|
|
61
|
+
ctes: string;
|
|
62
|
+
currentSql: string;
|
|
63
|
+
compatibleSql: string;
|
|
64
|
+
values: readonly string[];
|
|
65
|
+
};
|
|
66
|
+
groupId: string;
|
|
67
|
+
manifest: {
|
|
68
|
+
candidate_ref: string;
|
|
69
|
+
version: number;
|
|
70
|
+
completed_at: string;
|
|
71
|
+
};
|
|
72
|
+
manifestJson: string;
|
|
73
|
+
coordinatorId: string | null;
|
|
74
|
+
createdAt: string;
|
|
75
|
+
}): AuthLinkStatement;
|
|
76
|
+
export {};
|
|
77
|
+
//# sourceMappingURL=coordinator-legacy-completion-owner-proof-original-sql-test-fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-legacy-completion-owner-proof-original-sql-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-legacy-completion-owner-proof-original-sql-test-fixtures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EACN,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAG9B,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAEN,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,eAAe,EAGpB,MAAM,qDAAqD,CAAC;AAsB7D,UAAU,OAAO;IAChB,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC1D,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;CACnD;AAED,qEAAqE;AACrE,MAAM,WAAW,0BAA0B;IAC1C,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;CACpB;AAED,UAAU,OAAQ,SAAQ,eAAe;IACxC,K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,MAAM,CAAC;IAChB,QAAQ,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3E,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;CAClB,GAAG,iBAAiB,CA+DpB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { LinkFixture } from "./coordinator-auth-link-test-fixtures.js";
|
|
2
|
+
import type { Backend } from "./coordinator-auth-store-test-fixtures.js";
|
|
3
|
+
import type { CoordinatorLegacyTeamCompletionManifestV1 } from "./coordinator-legacy-team-completion.js";
|
|
4
|
+
export declare const futureGroup = "future-completion";
|
|
5
|
+
export declare const completions = "coordinator_legacy_team_completions";
|
|
6
|
+
export declare const resolutions = "coordinator_legacy_owner_resolutions";
|
|
7
|
+
export declare const controllers = "coordinator_auth_controller_attestations";
|
|
8
|
+
export declare function manifest(f: LinkFixture, owner?: string, options?: {
|
|
9
|
+
deviceId?: string;
|
|
10
|
+
publicKey?: string;
|
|
11
|
+
groupId?: string;
|
|
12
|
+
}): CoordinatorLegacyTeamCompletionManifestV1;
|
|
13
|
+
export declare function ordinary(f: LinkFixture): Promise<CoordinatorLegacyTeamCompletionManifestV1>;
|
|
14
|
+
export declare function recovery(f: LinkFixture, kind: Backend): Promise<{
|
|
15
|
+
h: {
|
|
16
|
+
backend: import("./coordinator-auth-link.js").AuthLinkBackend & Required<Pick<import("./coordinator-auth-link.js").AuthLinkBackend, "readBatch">>;
|
|
17
|
+
hooks: {
|
|
18
|
+
beforeBatch?: () => void;
|
|
19
|
+
mapStatement?: (statement: import("./coordinator-auth-link.js").AuthLinkStatement) => import("./coordinator-auth-link.js").AuthLinkStatement;
|
|
20
|
+
afterBatch?: () => void;
|
|
21
|
+
beforeFirst?: (statement: import("./coordinator-auth-link.js").AuthLinkStatement) => void;
|
|
22
|
+
};
|
|
23
|
+
batchCount: () => number;
|
|
24
|
+
resetBatchCount: () => void;
|
|
25
|
+
evidence: import("./coordinator-device-ownership-evidence.js").CoordinatorDeviceOwnershipEvidence;
|
|
26
|
+
};
|
|
27
|
+
result: {
|
|
28
|
+
controller: import("./coordinator-auth-controller.js").CoordinatorAuthControllerAttestation;
|
|
29
|
+
controllerDisposition: "created" | "reused";
|
|
30
|
+
resolution: import("./coordinator-legacy-owner-resolution-metadata.js").LegacyOwnerResolutionRecord;
|
|
31
|
+
resolutionDisposition: "created" | "reused";
|
|
32
|
+
};
|
|
33
|
+
value: CoordinatorLegacyTeamCompletionManifestV1;
|
|
34
|
+
}>;
|
|
35
|
+
export declare const WINNING_INSERT: RegExp;
|
|
36
|
+
export declare const GUARD_MARKER = "auth_snapshot_changed";
|
|
37
|
+
/**
|
|
38
|
+
* Runs `inject` once, just before the winning transaction starts. Both stores write the
|
|
39
|
+
* completion in one transaction the capture's guards lead (the D1 batch is one), so this
|
|
40
|
+
* is the last moment a concurrent write can land. A hook inside it would be rolled back
|
|
41
|
+
* with the batch, or would model an interleaving neither store allows.
|
|
42
|
+
*/
|
|
43
|
+
export declare function beforeWinningBatch(f: LinkFixture, inject: () => void): {
|
|
44
|
+
injected: () => boolean;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=coordinator-legacy-completion-owner-proof-test-fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-legacy-completion-owner-proof-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-legacy-completion-owner-proof-test-fixtures.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AAUzE,OAAO,KAAK,EAAE,yCAAyC,EAAE,MAAM,yCAAyC,CAAC;AAOzG,eAAO,MAAM,WAAW,sBAAsB,CAAC;AAC/C,eAAO,MAAM,WAAW,wCAAwC,CAAC;AACjE,eAAO,MAAM,WAAW,yCAAyC,CAAC;AAClE,eAAO,MAAM,WAAW,6CAA6C,CAAC;AAEtE,wBAAgB,QAAQ,CACvB,CAAC,EAAE,WAAW,EACd,KAAK,SAAe,EACpB,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GACvE,yCAAyC,CA+B3C;AAED,wBAAsB,QAAQ,CAAC,CAAC,EAAE,WAAW,sDAQ5C;AAED,wBAAsB,QAAQ,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;GA8D3D;AAED,eAAO,MAAM,cAAc,QACqD,CAAC;AACjF,eAAO,MAAM,YAAY,0BAA0B,CAAC;AAEpD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,IAAI;IAuB3D,QAAQ;EACjB"}
|