@codemem/core 0.47.0-beta.3 → 0.47.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/account-owner-association-directory.d.ts +6 -0
- package/dist/account-owner-association-directory.d.ts.map +1 -0
- package/dist/account-owner-association.d.ts +50 -0
- package/dist/account-owner-association.d.ts.map +1 -0
- package/dist/better-sqlite-coordinator-store.d.ts +27 -1
- package/dist/better-sqlite-coordinator-store.d.ts.map +1 -1
- package/dist/coordinator-account-change.d.ts +0 -5
- package/dist/coordinator-account-change.d.ts.map +1 -1
- package/dist/coordinator-account-connection-link.d.ts +7 -1
- package/dist/coordinator-account-connection-link.d.ts.map +1 -1
- package/dist/coordinator-account-connection-schema.d.ts +3 -0
- package/dist/coordinator-account-connection-schema.d.ts.map +1 -1
- package/dist/coordinator-account-link-receiver.d.ts +19 -0
- package/dist/coordinator-account-link-receiver.d.ts.map +1 -1
- package/dist/coordinator-account-link-status.d.ts.map +1 -1
- package/dist/coordinator-account-owner-target.d.ts +40 -0
- package/dist/coordinator-account-owner-target.d.ts.map +1 -0
- package/dist/coordinator-actions.d.ts +5 -0
- package/dist/coordinator-actions.d.ts.map +1 -1
- package/dist/coordinator-api.d.ts +2 -0
- package/dist/coordinator-api.d.ts.map +1 -1
- package/dist/coordinator-auth-browser-view.d.ts +6 -0
- package/dist/coordinator-auth-browser-view.d.ts.map +1 -1
- package/dist/coordinator-auth-controller-consistency-test-fixtures.d.ts +51 -0
- package/dist/coordinator-auth-controller-consistency-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-auth-controller-history.d.ts +71 -0
- package/dist/coordinator-auth-controller-history.d.ts.map +1 -0
- package/dist/coordinator-auth-controller-owner-review.d.ts +35 -0
- package/dist/coordinator-auth-controller-owner-review.d.ts.map +1 -0
- package/dist/coordinator-auth-controller-owner.d.ts +20 -0
- package/dist/coordinator-auth-controller-owner.d.ts.map +1 -0
- package/dist/coordinator-auth-controller-review-route.d.ts +16 -2
- package/dist/coordinator-auth-controller-review-route.d.ts.map +1 -1
- package/dist/coordinator-auth-controller.d.ts +30 -3
- package/dist/coordinator-auth-controller.d.ts.map +1 -1
- package/dist/coordinator-auth-device-claim-eligibility.d.ts +8 -3
- package/dist/coordinator-auth-device-claim-eligibility.d.ts.map +1 -1
- package/dist/coordinator-auth-historical-store-test-fixture.d.ts.map +1 -1
- package/dist/coordinator-auth-legacy-assignment.d.ts +1 -1
- package/dist/coordinator-auth-legacy-assignment.d.ts.map +1 -1
- package/dist/coordinator-auth-link-authority.d.ts +2 -1
- package/dist/coordinator-auth-link-authority.d.ts.map +1 -1
- package/dist/coordinator-auth-link.d.ts +1 -0
- package/dist/coordinator-auth-link.d.ts.map +1 -1
- package/dist/coordinator-auth-schema.d.ts.map +1 -1
- package/dist/coordinator-auth-store-test-fixtures.d.ts.map +1 -1
- package/dist/coordinator-browser-auth-app.d.ts.map +1 -1
- package/dist/coordinator-browser-auth-callback.d.ts +7 -1
- package/dist/coordinator-browser-auth-callback.d.ts.map +1 -1
- package/dist/coordinator-device-auth-link.d.ts +6 -1
- package/dist/coordinator-device-auth-link.d.ts.map +1 -1
- package/dist/coordinator-device-ownership-evidence-classify.d.ts +22 -0
- package/dist/coordinator-device-ownership-evidence-classify.d.ts.map +1 -0
- package/dist/coordinator-device-ownership-evidence-digest.d.ts +8 -0
- package/dist/coordinator-device-ownership-evidence-digest.d.ts.map +1 -0
- package/dist/coordinator-device-ownership-evidence-queries.d.ts +13 -0
- package/dist/coordinator-device-ownership-evidence-queries.d.ts.map +1 -0
- package/dist/coordinator-device-ownership-evidence-test-fixtures.d.ts +80 -0
- package/dist/coordinator-device-ownership-evidence-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-device-ownership-evidence.d.ts +60 -0
- package/dist/coordinator-device-ownership-evidence.d.ts.map +1 -0
- package/dist/coordinator-device-ownership-schema.d.ts +7 -1
- package/dist/coordinator-device-ownership-schema.d.ts.map +1 -1
- package/dist/coordinator-device-rebind-browser.d.ts +26 -0
- package/dist/coordinator-device-rebind-browser.d.ts.map +1 -0
- package/dist/coordinator-device-rebind-ceremony.d.ts +126 -0
- package/dist/coordinator-device-rebind-ceremony.d.ts.map +1 -0
- package/dist/coordinator-device-rebind-client.d.ts +82 -0
- package/dist/coordinator-device-rebind-client.d.ts.map +1 -0
- package/dist/coordinator-device-rebind-commit.d.ts +58 -0
- package/dist/coordinator-device-rebind-commit.d.ts.map +1 -0
- package/dist/coordinator-device-rebind-http.d.ts +11 -0
- package/dist/coordinator-device-rebind-http.d.ts.map +1 -0
- package/dist/coordinator-device-rebind-proof.d.ts +55 -0
- package/dist/coordinator-device-rebind-proof.d.ts.map +1 -0
- package/dist/coordinator-device-rebind-schema.d.ts +38 -0
- package/dist/coordinator-device-rebind-schema.d.ts.map +1 -0
- package/dist/coordinator-device-rebind-test-fixtures.d.ts +47 -0
- package/dist/coordinator-device-rebind-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-device-rebind-view.d.ts +37 -0
- package/dist/coordinator-device-rebind-view.d.ts.map +1 -0
- package/dist/coordinator-enrollment-ownership.d.ts +14 -0
- package/dist/coordinator-enrollment-ownership.d.ts.map +1 -0
- package/dist/coordinator-enrollment-reconciler.d.ts.map +1 -1
- package/dist/coordinator-history-sql-equivalence-test-fixtures.d.ts +35 -0
- package/dist/coordinator-history-sql-equivalence-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-legacy-completion-owner-proof.d.ts +47 -0
- package/dist/coordinator-legacy-completion-owner-proof.d.ts.map +1 -0
- package/dist/coordinator-legacy-owner-compatibility.d.ts +33 -0
- package/dist/coordinator-legacy-owner-compatibility.d.ts.map +1 -0
- package/dist/coordinator-legacy-owner-resolution-birth-test-fixtures.d.ts +3 -0
- package/dist/coordinator-legacy-owner-resolution-birth-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-legacy-owner-resolution-commit-test-fixtures.d.ts +54 -0
- package/dist/coordinator-legacy-owner-resolution-commit-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-legacy-owner-resolution-commit.d.ts +34 -0
- package/dist/coordinator-legacy-owner-resolution-commit.d.ts.map +1 -0
- package/dist/coordinator-legacy-owner-resolution-metadata.d.ts +40 -0
- package/dist/coordinator-legacy-owner-resolution-metadata.d.ts.map +1 -0
- package/dist/coordinator-legacy-owner-resolution-schema.d.ts +70 -0
- package/dist/coordinator-legacy-owner-resolution-schema.d.ts.map +1 -0
- package/dist/coordinator-legacy-owner-resolution-upgrade.d.ts +4 -0
- package/dist/coordinator-legacy-owner-resolution-upgrade.d.ts.map +1 -0
- package/dist/coordinator-legacy-team-completion.d.ts +17 -0
- package/dist/coordinator-legacy-team-completion.d.ts.map +1 -1
- package/dist/coordinator-owner-enrollment-commit.d.ts +7 -6
- package/dist/coordinator-owner-enrollment-commit.d.ts.map +1 -1
- package/dist/coordinator-owner-negative-consistency.d.ts +38 -0
- package/dist/coordinator-owner-negative-consistency.d.ts.map +1 -0
- package/dist/coordinator-owner-resolution-review-client.d.ts +17 -0
- package/dist/coordinator-owner-resolution-review-client.d.ts.map +1 -0
- package/dist/coordinator-owner-resolution-review-read.d.ts +48 -0
- package/dist/coordinator-owner-resolution-review-read.d.ts.map +1 -0
- package/dist/coordinator-owner-resolution-review-test-fixtures.d.ts +60 -0
- package/dist/coordinator-owner-resolution-review-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-owner-resolution-review.d.ts +73 -0
- package/dist/coordinator-owner-resolution-review.d.ts.map +1 -0
- package/dist/coordinator-producer-negative-owner-test-fixtures.d.ts +26 -0
- package/dist/coordinator-producer-negative-owner-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-recipient-owner-consistency.d.ts +8 -0
- package/dist/coordinator-recipient-owner-consistency.d.ts.map +1 -0
- package/dist/coordinator-resolved-account-owner-status-client.d.ts +27 -0
- package/dist/coordinator-resolved-account-owner-status-client.d.ts.map +1 -0
- package/dist/coordinator-resolved-account-owner-status-query.d.ts +21 -0
- package/dist/coordinator-resolved-account-owner-status-query.d.ts.map +1 -0
- package/dist/coordinator-resolved-account-owner-status-test-fixtures.d.ts +84 -0
- package/dist/coordinator-resolved-account-owner-status-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-resolved-account-owner-status.d.ts +57 -0
- package/dist/coordinator-resolved-account-owner-status.d.ts.map +1 -0
- package/dist/coordinator-store-contract.d.ts +4 -0
- package/dist/coordinator-store-contract.d.ts.map +1 -1
- package/dist/coordinator-store-test-harness.d.ts.map +1 -1
- package/dist/d1-coordinator-runtime.d.ts +1 -0
- package/dist/d1-coordinator-runtime.d.ts.map +1 -1
- package/dist/d1-coordinator-store.d.ts +23 -1
- package/dist/d1-coordinator-store.d.ts.map +1 -1
- package/dist/db.d.ts.map +1 -1
- package/dist/index.d.ts +20 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13953 -18682
- package/dist/index.js.map +1 -1
- package/dist/internal/cloudflare-coordinator.js +1806 -1329
- package/dist/internal/cloudflare-coordinator.js.map +1 -1
- package/dist/legacy-team-setup-completion-manifest.d.ts.map +1 -1
- package/dist/legacy-team-setup-draft.d.ts +7 -0
- package/dist/legacy-team-setup-draft.d.ts.map +1 -1
- package/dist/local-identity-generation.d.ts +14 -0
- package/dist/local-identity-generation.d.ts.map +1 -0
- package/dist/local-identity-switch.d.ts +82 -0
- package/dist/local-identity-switch.d.ts.map +1 -0
- package/dist/memory-retirement-delivery.d.ts.map +1 -1
- package/dist/operational-status.d.ts.map +1 -1
- package/dist/owner-enrollment-start-XwN1p7du.js +8395 -0
- package/dist/owner-enrollment-start-XwN1p7du.js.map +1 -0
- package/dist/pack.d.ts +4 -4
- package/dist/pack.d.ts.map +1 -1
- package/dist/recipient-policy-contract-Ca40IBUh.js +24 -0
- package/dist/recipient-policy-contract-Ca40IBUh.js.map +1 -0
- package/dist/recipient-policy-contract.js +2 -24
- package/dist/same-actor-peers.d.ts +4 -0
- package/dist/same-actor-peers.d.ts.map +1 -0
- package/dist/schema-bootstrap.d.ts.map +1 -1
- package/dist/schema.d.ts +38 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/search.d.ts +2 -0
- package/dist/search.d.ts.map +1 -1
- package/dist/semantic/semantic-executor-seam.d.ts +30 -0
- package/dist/semantic/semantic-executor-seam.d.ts.map +1 -0
- package/dist/semantic/semantic-ranking-reference.test-helper.d.ts +34 -0
- package/dist/semantic/semantic-ranking-reference.test-helper.d.ts.map +1 -0
- package/dist/semantic/semantic-ranking.d.ts +50 -0
- package/dist/semantic/semantic-ranking.d.ts.map +1 -0
- package/dist/semantic/semantic-ranking.test-helper.d.ts +17 -0
- package/dist/semantic/semantic-ranking.test-helper.d.ts.map +1 -0
- package/dist/semantic/semantic-worker-entry.d.ts +2 -0
- package/dist/semantic/semantic-worker-entry.d.ts.map +1 -0
- package/dist/semantic/semantic-worker-executor.d.ts +20 -0
- package/dist/semantic/semantic-worker-executor.d.ts.map +1 -0
- package/dist/semantic/semantic-worker-job.d.ts +2 -0
- package/dist/semantic/semantic-worker-job.d.ts.map +1 -0
- package/dist/semantic/semantic-worker-protocol.d.ts +48 -0
- package/dist/semantic/semantic-worker-protocol.d.ts.map +1 -0
- package/dist/semantic/semantic-worker-queue.d.ts +32 -0
- package/dist/semantic/semantic-worker-queue.d.ts.map +1 -0
- package/dist/semantic/semantic-worker-ranking.d.ts +8 -0
- package/dist/semantic/semantic-worker-ranking.d.ts.map +1 -0
- package/dist/semantic/semantic-worker-test-fixtures.d.ts +55 -0
- package/dist/semantic/semantic-worker-test-fixtures.d.ts.map +1 -0
- package/dist/semantic/validated-vector-index-audit.d.ts +10 -0
- package/dist/semantic/validated-vector-index-audit.d.ts.map +1 -0
- package/dist/semantic/validated-vector-index-mutations.d.ts +23 -0
- package/dist/semantic/validated-vector-index-mutations.d.ts.map +1 -0
- package/dist/semantic/validated-vector-index-state.d.ts +77 -0
- package/dist/semantic/validated-vector-index-state.d.ts.map +1 -0
- package/dist/semantic/validated-vector-index-statements.d.ts +30 -0
- package/dist/semantic/validated-vector-index-statements.d.ts.map +1 -0
- package/dist/semantic/validated-vector-index.d.ts +16 -0
- package/dist/semantic/validated-vector-index.d.ts.map +1 -0
- package/dist/semantic/validated-vector-index.test-helper.d.ts +9 -0
- package/dist/semantic/validated-vector-index.test-helper.d.ts.map +1 -0
- package/dist/semantic-query.d.ts +10 -0
- package/dist/semantic-query.d.ts.map +1 -0
- package/dist/semantic-worker-entry.js +14 -0
- package/dist/semantic-worker-entry.js.map +1 -0
- package/dist/semantic-worker-job-a7S-qbRH.js +49 -0
- package/dist/semantic-worker-job-a7S-qbRH.js.map +1 -0
- package/dist/semantic-worker-ranking-hRyoWJtp.js +7680 -0
- package/dist/semantic-worker-ranking-hRyoWJtp.js.map +1 -0
- package/dist/store.d.ts +25 -12
- package/dist/store.d.ts.map +1 -1
- package/dist/test-schema.generated.d.ts +1 -1
- package/dist/test-schema.generated.d.ts.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/usage-aggregate-index.d.ts +4 -0
- package/dist/usage-aggregate-index.d.ts.map +1 -0
- package/dist/vector-index-maintenance.d.ts +28 -0
- package/dist/vector-index-maintenance.d.ts.map +1 -0
- package/dist/vector-index-upgrade.d.ts +21 -0
- package/dist/vector-index-upgrade.d.ts.map +1 -0
- package/dist/vector-layout.d.ts +21 -0
- package/dist/vector-layout.d.ts.map +1 -0
- package/dist/vector-migration.d.ts.map +1 -1
- package/dist/vector-writes.d.ts +26 -0
- package/dist/vector-writes.d.ts.map +1 -0
- package/dist/vectors.d.ts +8 -3
- package/dist/vectors.d.ts.map +1 -1
- package/dist/workspace-identity-C2g2-ZRR.js +10038 -0
- package/dist/workspace-identity-C2g2-ZRR.js.map +1 -0
- package/package.json +5 -5
- package/dist/owner-enrollment-start-xsoRbhG2.js +0 -14318
- package/dist/owner-enrollment-start-xsoRbhG2.js.map +0 -1
- package/dist/recipient-policy-contract.js.map +0 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Explicit operator operation: install empty inert receipt storage, never ownership
|
|
2
|
+
* or access. Operators must pause writers, drain attempts and back up first. */
|
|
3
|
+
export declare function upgradeCoordinatorOwnerResolutionSchemaFile(path: string): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=coordinator-legacy-owner-resolution-upgrade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-legacy-owner-resolution-upgrade.d.ts","sourceRoot":"","sources":["../src/coordinator-legacy-owner-resolution-upgrade.ts"],"names":[],"mappings":"AAgKA;gFACgF;AAChF,wBAAsB,2CAA2C,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB7F"}
|
|
@@ -9,13 +9,30 @@ export interface CoordinatorLegacyTeamCompletionMembershipV1 {
|
|
|
9
9
|
identity_id: string;
|
|
10
10
|
role: "member";
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Who asserted an included device's Identity. `self` is the uploading device's
|
|
14
|
+
* own assignment. `label` is that device's guess about another device. It keeps
|
|
15
|
+
* Team access but never counts as ownership evidence. Manifests written before
|
|
16
|
+
* this field existed omit it, and their rows keep the old meaning.
|
|
17
|
+
*/
|
|
18
|
+
export type CoordinatorLegacyTeamCompletionIdentityEvidence = "self" | "label";
|
|
12
19
|
export interface CoordinatorLegacyTeamCompletionDeviceDecisionV1 {
|
|
13
20
|
device_id: string;
|
|
14
21
|
key_fingerprint: string;
|
|
15
22
|
enabled: boolean;
|
|
16
23
|
identity_id: string | null;
|
|
17
24
|
decision: "included" | "excluded";
|
|
25
|
+
identity_evidence?: CoordinatorLegacyTeamCompletionIdentityEvidence;
|
|
18
26
|
}
|
|
27
|
+
/** False only for a decision another device guessed; such rows never prove ownership. */
|
|
28
|
+
export declare function legacyDecisionCountsAsOwner(decision: Pick<CoordinatorLegacyTeamCompletionDeviceDecisionV1, "identity_evidence">): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* SQL form of {@link legacyDecisionCountsAsOwner} for one `json_each` element,
|
|
31
|
+
* e.g. `legacyDecisionCountsAsOwnerSql("d.value")`. Stored rows are canonical,
|
|
32
|
+
* but an unexpected value must still fail closed: a grant counts only `self` or
|
|
33
|
+
* an absent mark, and a denial counts everything except an explicit label.
|
|
34
|
+
*/
|
|
35
|
+
export declare function legacyDecisionCountsAsOwnerSql(element: string, use?: "grant" | "deny"): string;
|
|
19
36
|
export interface CoordinatorLegacyTeamCompletionProjectMappingV1 {
|
|
20
37
|
project_ref: string;
|
|
21
38
|
resolved_project_ref: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-legacy-team-completion.d.ts","sourceRoot":"","sources":["../src/coordinator-legacy-team-completion.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,0CAA0C,EAAG,CAAU,CAAC;AACrE,eAAO,MAAM,6CAA6C,KAAK,CAAC;AAChE,eAAO,MAAM,8CAA8C,MAAM,CAAC;AAClE,eAAO,MAAM,4CAA4C,UAAY,CAAC;AACtE,eAAO,MAAM,kDAAkD,QACb,CAAC;AAGnD,eAAO,MAAM,2DAA2D,QAKnE,CAAC;AACN,eAAO,MAAM,2CAA2C,EAAG,qBAA8B,CAAC;AAE1F,MAAM,WAAW,2CAA2C;IAC3D,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,CAAC;CACf;AAED,MAAM,WAAW,+CAA+C;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,UAAU,GAAG,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"coordinator-legacy-team-completion.d.ts","sourceRoot":"","sources":["../src/coordinator-legacy-team-completion.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,0CAA0C,EAAG,CAAU,CAAC;AACrE,eAAO,MAAM,6CAA6C,KAAK,CAAC;AACh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gB,oDAAoD,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE3F;AAED,wBAAgB,iDAAiD,CAChE,QAAQ,EAAE,yCAAyC,GACjD,IAAI,CAEN;AAED,wBAAgB,sDAAsD,CACrE,QAAQ,EAAE,yCAAyC,EACnD,OAAO,EAAE,MAAM,GACb,IAAI,CAEN;AAED,wBAAgB,mDAAmD,CAClE,QAAQ,EAAE,yCAAyC,EACnD,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,2CAA2C,EAAE,GACrD,MAAM,GAAG,IAAI,CAmBf"}
|
|
@@ -6,18 +6,19 @@ export declare const COORDINATOR_OWNER_ENROLLMENT_AUDIT_SCHEMA_SQL = "\nCREATE T
|
|
|
6
6
|
/** Historical link provenance is equality only: never consult the old controller/device. */
|
|
7
7
|
export declare const OWNER_ACTIVE_LINK_SQL = "EXISTS (SELECT 1 FROM coordinator_auth_account_links l\n WHERE l.coordinator_id = a.coordinator_id AND l.link_id = a.link_id\n AND l.authority_kind = 'controller_attestation' AND l.controller_attestation_id IS NOT NULL AND l.device_claim_id IS NULL\n AND l.issuer = a.issuer AND l.subject = a.account_subject AND l.identity_id = a.identity_id\n AND l.attempt_id = a.link_attempt_id AND l.controller_attestation_id = a.link_controller_attestation_id\n AND l.auth_config_revision = a.link_auth_config_revision AND l.revoked_at_ms IS NULL)";
|
|
8
8
|
export declare function ownerExcludedLegacyDecisionSql(groupExpression: "r.group_id" | "json_extract(p.value,'$.groupId')"): string;
|
|
9
|
-
|
|
10
|
-
* The later ceremony caller must supply trusted current config and a stored confirmed attempt.
|
|
11
|
-
* SQL failures propagate: a failed post-commit read must not claim nothing changed.
|
|
12
|
-
*/
|
|
13
|
-
export declare function commitOwnerEnrollment(input: {
|
|
9
|
+
interface OwnerEnrollmentCommitInput {
|
|
14
10
|
backend: AuthLinkBackend;
|
|
15
11
|
row: OwnerAttempt;
|
|
16
12
|
revision: string;
|
|
17
13
|
now: number;
|
|
18
14
|
completionSecret: string;
|
|
19
15
|
signature: string;
|
|
20
|
-
}
|
|
16
|
+
}
|
|
17
|
+
/** Internal atomic finalization, not a package export or standalone ownership writer.
|
|
18
|
+
* The later ceremony caller must supply trusted current config and a stored confirmed attempt.
|
|
19
|
+
* SQL failures propagate: a failed post-commit read must not claim nothing changed.
|
|
20
|
+
*/
|
|
21
|
+
export declare function commitOwnerEnrollment(input: OwnerEnrollmentCommitInput): Promise<boolean>;
|
|
21
22
|
/** Prior writes only; missing enrollment/audit rows are never repaired and revocations are never undone. */
|
|
22
23
|
export declare function readOwnerEnrollmentReceipt(backend: AuthLinkBackend, row: OwnerAttempt): Promise<boolean>;
|
|
23
24
|
//# sourceMappingURL=coordinator-owner-enrollment-commit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-owner-enrollment-commit.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-enrollment-commit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,4BAA4B,CAAC;AAMrF,OAAO,EACN,KAAK,qBAAqB,IAAI,YAAY,EAI1C,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"coordinator-owner-enrollment-commit.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-enrollment-commit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,4BAA4B,CAAC;AAMrF,OAAO,EACN,KAAK,qBAAqB,IAAI,YAAY,EAI1C,MAAM,yCAAyC,CAAC;AAQjD,OAAO,EACN,KAAK,YAAY,EACjB,8BAA8B,GAC9B,MAAM,yCAAyC,CAAC;AAEjD,oEAAoE;AACpE,eAAO,MAAM,6CAA6C,oYAMvD,CAAC;AAEJ,4FAA4F;AAC5F,eAAO,MAAM,qBAAqB,6hBAKqD,CAAC;AAGxF,wBAAgB,8BAA8B,CAC7C,eAAe,EAAE,YAAY,GAAG,mCAAmC,GACjE,MAAM,CAOR;AAwDD,UAAU,0BAA0B;IACnC,OAAO,EAAE,eAAe,CAAC;IACzB,GAAG,EAAE,YAAY,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,OAAO,CAAC,CA2D/F;AAsOD,4GAA4G;AAC5G,wBAAsB,0BAA0B,CAC/C,OAAO,EAAE,eAAe,EACxB,GAAG,EAAE,YAAY,GACf,OAAO,CAAC,OAAO,CAAC,CAelB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type ControllerHistorySnapshot } from "./coordinator-auth-controller-history.js";
|
|
2
|
+
import type { AuthLinkStatement } from "./coordinator-auth-link.js";
|
|
3
|
+
interface Backend {
|
|
4
|
+
first<T>(statement: AuthLinkStatement): Promise<T | null>;
|
|
5
|
+
all?<T>(statement: AuthLinkStatement): Promise<T[]>;
|
|
6
|
+
}
|
|
7
|
+
export interface NegativeOwnerConsistency extends AuthLinkStatement {
|
|
8
|
+
/** Catalog, retained facts and original source only; unaffected by producer output. */
|
|
9
|
+
retainedRecheck: AuthLinkStatement;
|
|
10
|
+
}
|
|
11
|
+
/** Trusted subject metadata, not authority. Enrollment is optional for future
|
|
12
|
+
* new-device producers; those producers must independently prove admission.
|
|
13
|
+
*/
|
|
14
|
+
export interface NegativeOwnerSubject {
|
|
15
|
+
coordinatorId: string;
|
|
16
|
+
deviceId: string;
|
|
17
|
+
publicKey: string;
|
|
18
|
+
fingerprint: string;
|
|
19
|
+
ownerIdentityId: string;
|
|
20
|
+
enrollment?: {
|
|
21
|
+
groupId: string;
|
|
22
|
+
};
|
|
23
|
+
verifiedHistory?: ControllerHistorySnapshot;
|
|
24
|
+
}
|
|
25
|
+
/** Returns only a negative write predicate. No result grants owner authority.
|
|
26
|
+
* The missing-schema predicate deliberately never names the absent table.
|
|
27
|
+
*/
|
|
28
|
+
export declare function prepareNegativeOwnerConsistency(backend: Backend, input: NegativeOwnerSubject): Promise<NegativeOwnerConsistency | null>;
|
|
29
|
+
/** Compatibility for old internal callers, never infer a coordinator namespace. */
|
|
30
|
+
export declare function prepareUnknownNamespaceOwnerConsistency(backend: Backend, input: Pick<NegativeOwnerSubject, "deviceId" | "publicKey">): Promise<NegativeOwnerConsistency | null>;
|
|
31
|
+
/** Keep the ordinary authority and evidence trees in independent materialized
|
|
32
|
+
* root stages instead of nesting one predicate beneath the other's SQL tree.
|
|
33
|
+
*/
|
|
34
|
+
export declare function withNegativeOwnerConsistency(statement: AuthLinkStatement, predicate: AuthLinkStatement): AuthLinkStatement;
|
|
35
|
+
/** Compose only trusted producer statements; all captured data remains bound. */
|
|
36
|
+
export declare function withNegativeOwnerWrite(statement: AuthLinkStatement, predicate: AuthLinkStatement): AuthLinkStatement;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=coordinator-owner-negative-consistency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-owner-negative-consistency.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-negative-consistency.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,yBAAyB,EAE9B,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAsBpE,UAAU,OAAO;IAChB,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC1D,GAAG,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;CACpD;AAED,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IAClE,uFAAuF;IACvF,eAAe,EAAE,iBAAiB,CAAC;CACnC;AAcD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,eAAe,CAAC,EAAE,yBAAyB,CAAC;CAC5C;AAkHD;;GAEG;AACH,wBAAsB,+BAA+B,CACpD,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,oBAAoB,GACzB,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CA2B1C;AAED,mFAAmF;AACnF,wBAAsB,uCAAuC,CAC5D,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,WAAW,CAAC,GACzD,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAsB1C;AAyFD;;GAEG;AACH,wBAAgB,4BAA4B,CAC3C,SAAS,EAAE,iBAAiB,EAC5B,SAAS,EAAE,iBAAiB,GAC1B,iBAAiB,CAOnB;AAED,iFAAiF;AACjF,wBAAgB,sBAAsB,CACrC,SAAS,EAAE,iBAAiB,EAC5B,SAAS,EAAE,iBAAiB,GAC1B,iBAAiB,CAWnB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const SCOPE = "historical_included_owner_labels_only";
|
|
2
|
+
interface ResolutionOptions {
|
|
3
|
+
purpose?: "existing_account_owner";
|
|
4
|
+
resolutionScope?: typeof SCOPE;
|
|
5
|
+
groupId: string;
|
|
6
|
+
deviceId: string;
|
|
7
|
+
identityId: string;
|
|
8
|
+
fingerprint: string;
|
|
9
|
+
confirmEvidenceDigest?: string;
|
|
10
|
+
confirmOwnerResolutionDigest?: string;
|
|
11
|
+
assertBeforeOwnerResolutionConfirm?: () => void;
|
|
12
|
+
}
|
|
13
|
+
type PostReview = (body: Record<string, unknown>) => Promise<Record<string, unknown> | null>;
|
|
14
|
+
export declare function validateResolutionOptions(opts: ResolutionOptions): void;
|
|
15
|
+
export declare function scopedResolutionReview(opts: ResolutionOptions, body: Record<string, unknown>, post: PostReview): Promise<Record<string, unknown>>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=coordinator-owner-resolution-review-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-owner-resolution-review-client.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-resolution-review-client.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,KAAK,0CAA0C,CAAC;AACtD,UAAU,iBAAiB;IAC1B,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC,eAAe,CAAC,EAAE,OAAO,KAAK,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,kCAAkC,CAAC,EAAE,MAAM,IAAI,CAAC;CAChD;AACD,KAAK,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;AAK7F,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,CA6BvE;AAuED,wBAAsB,sBAAsB,CAC3C,IAAI,EAAE,iBAAiB,EACvB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,IAAI,EAAE,UAAU,GACd,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAmClC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { CoordinatorAuthControllerAttestation } from "./coordinator-auth-controller.js";
|
|
2
|
+
import type { ControllerHistorySnapshot } from "./coordinator-auth-controller-history.js";
|
|
3
|
+
import type { CoordinatorAuthLinkConfig, CoordinatorAuthLinkSigner } from "./coordinator-auth-link-contract.js";
|
|
4
|
+
import type { CoordinatorDeviceOwnershipEvidence } from "./coordinator-device-ownership-evidence.js";
|
|
5
|
+
import { type LegacyOwnerResolutionRecord } from "./coordinator-legacy-owner-resolution-metadata.js";
|
|
6
|
+
import type { OwnerResolutionReviewBackend, OwnerResolutionReviewSelection } from "./coordinator-owner-resolution-review.js";
|
|
7
|
+
export interface ResolutionTarget {
|
|
8
|
+
link_id: string;
|
|
9
|
+
auth_config_revision: string;
|
|
10
|
+
created_at_ms: number;
|
|
11
|
+
}
|
|
12
|
+
export declare class ReviewUnavailable extends Error {
|
|
13
|
+
}
|
|
14
|
+
export declare function requireReviewSchema(backend: OwnerResolutionReviewBackend): Promise<void>;
|
|
15
|
+
/** Account provenance belongs to A; the requester is collected separately, never impersonated. */
|
|
16
|
+
export declare function readResolutionTarget(backend: OwnerResolutionReviewBackend, selection: OwnerResolutionReviewSelection, config: CoordinatorAuthLinkConfig): Promise<ResolutionTarget>;
|
|
17
|
+
export declare function readResolutionRequester(backend: OwnerResolutionReviewBackend, selection: OwnerResolutionReviewSelection): Promise<{
|
|
18
|
+
signer: {
|
|
19
|
+
groupId: string;
|
|
20
|
+
deviceId: string;
|
|
21
|
+
publicKey: string;
|
|
22
|
+
fingerprint: string;
|
|
23
|
+
};
|
|
24
|
+
enrollmentIdentityId: string | null;
|
|
25
|
+
}>;
|
|
26
|
+
export declare function readResolutionInvites(backend: OwnerResolutionReviewBackend, signer: CoordinatorAuthLinkSigner): Promise<{
|
|
27
|
+
inviteId: string;
|
|
28
|
+
kind: "team_member" | "add_device";
|
|
29
|
+
actorId: string;
|
|
30
|
+
assignedIdentityId: string | null;
|
|
31
|
+
targetIdentityId: string | null;
|
|
32
|
+
digest: string;
|
|
33
|
+
}[]>;
|
|
34
|
+
export declare function readResolutionSource(options: {
|
|
35
|
+
backend: OwnerResolutionReviewBackend;
|
|
36
|
+
config: CoordinatorAuthLinkConfig;
|
|
37
|
+
selection: OwnerResolutionReviewSelection;
|
|
38
|
+
signer: CoordinatorAuthLinkSigner;
|
|
39
|
+
history: ControllerHistorySnapshot;
|
|
40
|
+
evidence: CoordinatorDeviceOwnershipEvidence;
|
|
41
|
+
}): Promise<{
|
|
42
|
+
controller: CoordinatorAuthControllerAttestation;
|
|
43
|
+
resolution: LegacyOwnerResolutionRecord;
|
|
44
|
+
} | {
|
|
45
|
+
controller: CoordinatorAuthControllerAttestation | null;
|
|
46
|
+
resolution: null;
|
|
47
|
+
}>;
|
|
48
|
+
//# sourceMappingURL=coordinator-owner-resolution-review-read.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-owner-resolution-review-read.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-resolution-review-read.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACX,oCAAoC,EAEpC,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,KAAK,EACX,yBAAyB,EACzB,yBAAyB,EACzB,MAAM,qCAAqC,CAAC;AAG7C,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAMrG,OAAO,EAEN,KAAK,2BAA2B,EAEhC,MAAM,mDAAmD,CAAC;AAC3D,OAAO,KAAK,EACX,4BAA4B,EAC5B,8BAA8B,EAC9B,MAAM,0CAA0C,CAAC;AAElD,MAAM,WAAW,gBAAgB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,iBAAkB,SAAQ,KAAK;CAAG;AAE/C,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,4BAA4B,iBAQ9E;AAED,kGAAkG;AAClG,wBAAsB,oBAAoB,CACzC,OAAO,EAAE,4BAA4B,EACrC,SAAS,EAAE,8BAA8B,EACzC,MAAM,EAAE,yBAAyB,GAC/B,OAAO,CAAC,gBAAgB,CAAC,CAqB3B;AAED,wBAAsB,uBAAuB,CAC5C,OAAO,EAAE,4BAA4B,EACrC,SAAS,EAAE,8BAA8B;;QAsBvC,OAAO;QACP,QAAQ;QACR,SAAS;QACT,WAAW;;;GAIb;AAED,wBAAsB,qBAAqB,CAC1C,OAAO,EAAE,4BAA4B,EACrC,MAAM,EAAE,yBAAyB;;;;;;;KAejC;AA+FD,wBAAsB,oBAAoB,CAAC,OAAO,EAAE;IACnD,OAAO,EAAE,4BAA4B,CAAC;IACtC,MAAM,EAAE,yBAAyB,CAAC;IAClC,SAAS,EAAE,8BAA8B,CAAC;IAC1C,MAAM,EAAE,yBAAyB,CAAC;IAClC,OAAO,EAAE,yBAAyB,CAAC;IACnC,QAAQ,EAAE,kCAAkC,CAAC;CAC7C;;;;;;GAwBA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { AuthLinkStatement } from "./coordinator-auth-link.js";
|
|
2
|
+
import { type LinkFixture } from "./coordinator-auth-link-test-fixtures.js";
|
|
3
|
+
import { type Backend } from "./coordinator-auth-store-test-fixtures.js";
|
|
4
|
+
import { signer } from "./coordinator-legacy-owner-resolution-commit-test-fixtures.js";
|
|
5
|
+
export { signer };
|
|
6
|
+
export declare const selection: {
|
|
7
|
+
groupId: string;
|
|
8
|
+
deviceId: string;
|
|
9
|
+
identityId: string;
|
|
10
|
+
fingerprint: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const scope = "historical_included_owner_labels_only";
|
|
13
|
+
export declare function deterministicReviewTests(): void;
|
|
14
|
+
export declare function setupReview(f: LinkFixture, kind: Backend, weakCurrent?: boolean): Promise<{
|
|
15
|
+
hooks: {
|
|
16
|
+
beforeBatch?: () => void;
|
|
17
|
+
mapStatement?: (statement: AuthLinkStatement) => AuthLinkStatement;
|
|
18
|
+
afterBatch?: () => void;
|
|
19
|
+
beforeFirst?: (statement: AuthLinkStatement) => void;
|
|
20
|
+
};
|
|
21
|
+
batchCount: () => number;
|
|
22
|
+
resetBatchCount: () => void;
|
|
23
|
+
evidence: import("./coordinator-device-ownership-evidence.js").CoordinatorDeviceOwnershipEvidence;
|
|
24
|
+
backend: {
|
|
25
|
+
prepareAuthLinkSource?: (attemptId: string, config: import("./coordinator-auth-link-contract.js").CoordinatorAuthLinkConfig, now: number, alias?: "a" | "coordinator_auth_link_attempts", options?: {
|
|
26
|
+
currentDevice?: boolean;
|
|
27
|
+
}) => Promise<AuthLinkStatement>;
|
|
28
|
+
prepareAuthLinkBrowserSource?: (input: {
|
|
29
|
+
binderHash: string;
|
|
30
|
+
stateHash?: string;
|
|
31
|
+
attemptId?: string;
|
|
32
|
+
}, config: import("./coordinator-auth-link-contract.js").CoordinatorAuthLinkConfig & {
|
|
33
|
+
redirectUri: string;
|
|
34
|
+
}, now: number) => Promise<AuthLinkStatement>;
|
|
35
|
+
readAuthSchemaState?: () => Promise<import("./coordinator-account-connection-schema.js").ConnectionSchemaState>;
|
|
36
|
+
first<T>(statement: AuthLinkStatement): Promise<T | null>;
|
|
37
|
+
run(statement: AuthLinkStatement): Promise<number>;
|
|
38
|
+
batch(statements: AuthLinkStatement[]): Promise<unknown>;
|
|
39
|
+
all<T>({ sql, values }: AuthLinkStatement): Promise<T[]>;
|
|
40
|
+
};
|
|
41
|
+
}>;
|
|
42
|
+
export declare function projectLabel(f: LinkFixture, actor?: string): void;
|
|
43
|
+
export declare function existingFact(f: LinkFixture, h: Awaited<ReturnType<typeof setupReview>>, options?: {
|
|
44
|
+
retainedSource?: boolean;
|
|
45
|
+
}): Promise<{
|
|
46
|
+
controller: import("./coordinator-auth-controller.js").CoordinatorAuthControllerAttestation;
|
|
47
|
+
controllerDisposition: "created" | "reused";
|
|
48
|
+
resolution: import("./coordinator-legacy-owner-resolution-metadata.js").LegacyOwnerResolutionRecord;
|
|
49
|
+
resolutionDisposition: "created" | "reused";
|
|
50
|
+
}>;
|
|
51
|
+
export declare function anotherGroup(f: LinkFixture): Promise<{
|
|
52
|
+
deviceId: string;
|
|
53
|
+
identityId: string;
|
|
54
|
+
fingerprint: string;
|
|
55
|
+
groupId: string;
|
|
56
|
+
}>;
|
|
57
|
+
export declare function expectSafeDto(value: unknown): void;
|
|
58
|
+
export declare function unrelatedChurn(f: LinkFixture): Promise<string>;
|
|
59
|
+
export declare function reconnectTarget(f: LinkFixture): void;
|
|
60
|
+
//# sourceMappingURL=coordinator-owner-resolution-review-test-fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-owner-resolution-review-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-resolution-review-test-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,KAAK,WAAW,EAAO,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,2CAA2C,CAAC;AAIjF,OAAO,EAMN,MAAM,EACN,MAAM,+DAA+D,CAAC;AAEvE,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,eAAO,MAAM,SAAS;IACrB,OAAO;IACP,QAAQ;IACR,UAAU;IACV,WAAW;CACX,CAAC;AACF,eAAO,MAAM,KAAK,0CAA0C,CAAC;AAC7D,wBAAgB,wBAAwB,SASvC;AAED,wBAAsB,WAAW,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,UAAO;;;;;;;;;;;;;;;;;;;;;;;;;YAOvE,CAAC,mBAAmB,iBAAiB,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;;GAK/D;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,SAAqB,QAYtE;AAED,wBAAsB,YAAY,CACjC,CAAC,EAAE,WAAW,EACd,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,EAC1C,OAAO,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAO;;;;;GAW1C;AAED,wBAAsB,YAAY,CAAC,CAAC,EAAE,WAAW;;;;;GAOhD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,QAM3C;AAED,wBAAsB,cAAc,CAAC,CAAC,EAAE,WAAW,mBAgClD;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,WAAW,QAqD7C"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type ControllerHistoryEvidence } from "./coordinator-auth-controller-history.js";
|
|
2
|
+
import type { AuthLinkBackend, AuthLinkStatement } from "./coordinator-auth-link.js";
|
|
3
|
+
import type { CoordinatorAuthLinkConfig } from "./coordinator-auth-link-contract.js";
|
|
4
|
+
import type { ReviewedWeakLabel } from "./coordinator-legacy-owner-resolution-metadata.js";
|
|
5
|
+
import { type ResolutionTarget } from "./coordinator-owner-resolution-review-read.js";
|
|
6
|
+
export interface OwnerResolutionReviewBackend extends AuthLinkBackend {
|
|
7
|
+
all<T>(statement: AuthLinkStatement): Promise<T[]>;
|
|
8
|
+
}
|
|
9
|
+
export interface OwnerResolutionReviewSelection {
|
|
10
|
+
groupId: string;
|
|
11
|
+
deviceId: string;
|
|
12
|
+
identityId: string;
|
|
13
|
+
fingerprint: string;
|
|
14
|
+
}
|
|
15
|
+
export interface OwnerResolutionReviewConfirmation extends OwnerResolutionReviewSelection {
|
|
16
|
+
confirmOwnerResolutionDigest?: string;
|
|
17
|
+
}
|
|
18
|
+
type Disposition = "created" | "reused";
|
|
19
|
+
export interface OwnerResolutionReviewResult {
|
|
20
|
+
purpose: "existing_account_owner";
|
|
21
|
+
resolution_scope: "historical_included_owner_labels_only";
|
|
22
|
+
state: "ready" | "needs_review" | "restored";
|
|
23
|
+
reasons: string[];
|
|
24
|
+
coordinator_id: string;
|
|
25
|
+
group_id: string;
|
|
26
|
+
device_id: string;
|
|
27
|
+
identity_id: string;
|
|
28
|
+
fingerprint: string;
|
|
29
|
+
owner_resolution_digest?: string;
|
|
30
|
+
account_owner_target?: ResolutionTarget & {
|
|
31
|
+
identity_id: string;
|
|
32
|
+
};
|
|
33
|
+
legacy_history: ControllerHistoryEvidence[];
|
|
34
|
+
reviewed_weak_labels: ReviewedWeakLabel[];
|
|
35
|
+
attestation_id?: string;
|
|
36
|
+
recovery_receipt?: {
|
|
37
|
+
disposition: Disposition;
|
|
38
|
+
review_receipt_id: string;
|
|
39
|
+
evidence_digest: string;
|
|
40
|
+
created_at: string;
|
|
41
|
+
};
|
|
42
|
+
owner_resolution?: {
|
|
43
|
+
disposition: Disposition;
|
|
44
|
+
resolution_id: string;
|
|
45
|
+
evidence_digest: string;
|
|
46
|
+
created_at: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/** Callers must authenticate their trusted operator before using this capability. */
|
|
50
|
+
export interface CoordinatorOwnerResolutionReviewStore {
|
|
51
|
+
previewOwnerResolutionReview(selection: OwnerResolutionReviewSelection, config: CoordinatorAuthLinkConfig): Promise<OwnerResolutionReviewResult>;
|
|
52
|
+
confirmOwnerResolutionReview(selection: OwnerResolutionReviewConfirmation, config: CoordinatorAuthLinkConfig): Promise<OwnerResolutionReviewResult>;
|
|
53
|
+
}
|
|
54
|
+
export declare class OwnerResolutionReviewError extends Error {
|
|
55
|
+
readonly code: "review_stale" | "owner_resolution_outcome_unknown";
|
|
56
|
+
constructor(code: "review_stale" | "owner_resolution_outcome_unknown");
|
|
57
|
+
}
|
|
58
|
+
/** Internal review builder, not an HTTP authentication or account-mutation boundary.
|
|
59
|
+
* Each call owns its reader and opaque snapshot; nothing is retained across requests.
|
|
60
|
+
*/
|
|
61
|
+
export declare class OwnerResolutionReviewOperations implements CoordinatorOwnerResolutionReviewStore {
|
|
62
|
+
private readonly backend;
|
|
63
|
+
private readonly clock;
|
|
64
|
+
constructor(backend: OwnerResolutionReviewBackend, clock?: () => number);
|
|
65
|
+
previewOwnerResolutionReview(selection: OwnerResolutionReviewSelection, config: CoordinatorAuthLinkConfig): Promise<OwnerResolutionReviewResult>;
|
|
66
|
+
confirmOwnerResolutionReview(selection: OwnerResolutionReviewConfirmation, config: CoordinatorAuthLinkConfig): Promise<OwnerResolutionReviewResult>;
|
|
67
|
+
private prepare;
|
|
68
|
+
private captureSubject;
|
|
69
|
+
private requireUnchangedCapture;
|
|
70
|
+
private prepareCaptured;
|
|
71
|
+
}
|
|
72
|
+
export {};
|
|
73
|
+
//# sourceMappingURL=coordinator-owner-resolution-review.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-owner-resolution-review.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-resolution-review.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,KAAK,yBAAyB,EAI9B,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EACX,yBAAyB,EAEzB,MAAM,qCAAqC,CAAC;AAO7C,OAAO,KAAK,EAEX,iBAAiB,EACjB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EACN,KAAK,gBAAgB,EAOrB,MAAM,+CAA+C,CAAC;AAEvD,MAAM,WAAW,4BAA6B,SAAQ,eAAe;IACpE,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;CACnD;AACD,MAAM,WAAW,8BAA8B;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,WAAW,iCAAkC,SAAQ,8BAA8B;IACxF,4BAA4B,CAAC,EAAE,MAAM,CAAC;CACtC;AACD,KA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Q,KAAK;IACxC,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,kCAAkC;IAA9E,YAAqB,IAAI,EAAE,cAAc,GAAG,kCAAkC,EAO7E;CACD;AAmKD;;GAEG;AACH,qBAAa,+BAAgC,YAAW,qCAAqC;IAE3F,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAFvB,YACkB,OAAO,EAAE,4BAA4B,EACrC,KAAK,GAAE,MAAM,MAAiB,EAC5C;IAEE,4BAA4B,CACjC,SAAS,EAAE,8BAA8B,EACzC,MAAM,EAAE,yBAAyB,GAC/B,OAAO,CAAC,2BAA2B,CAAC,CAEtC;IAEK,4BAA4B,CACjC,SAAS,EAAE,iCAAiC,EAC5C,MAAM,EAAE,yBAAyB,GAC/B,OAAO,CAAC,2BAA2B,CAAC,CAgCtC;YAEa,OAAO;YA2BP,cAAc;YA2Cd,uBAAuB;YAoBvB,eAAe;CAgD7B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Database } from "better-sqlite3";
|
|
2
|
+
type Subject = {
|
|
3
|
+
coordinatorId: string;
|
|
4
|
+
deviceId: string;
|
|
5
|
+
publicKey: string;
|
|
6
|
+
fingerprint: string;
|
|
7
|
+
ownerIdentityId: string;
|
|
8
|
+
};
|
|
9
|
+
/** Old retained provenance is seeded before the new producer; no production bypass. */
|
|
10
|
+
export declare function retainProducerOwner(db: Database, subject: Subject, options?: {
|
|
11
|
+
removeSource?: boolean;
|
|
12
|
+
resolutionDeviceId?: string;
|
|
13
|
+
}): Promise<void>;
|
|
14
|
+
/** Compute real canonical key metadata before a synchronous winning-write hook. */
|
|
15
|
+
export declare function prepareProducerOwner(db: Database, subject: Subject, options?: {
|
|
16
|
+
removeSource?: boolean;
|
|
17
|
+
resolutionDeviceId?: string;
|
|
18
|
+
}): Promise<() => void>;
|
|
19
|
+
export declare function producerSnapshot(db: Database): (string | unknown[])[][];
|
|
20
|
+
/** Execution hook: D1 may prepare before the batch starts its transaction. */
|
|
21
|
+
export declare function beforeProducerWinningWrite(db: Database, gate: RegExp, mutate: () => void): {
|
|
22
|
+
observed: () => boolean;
|
|
23
|
+
restore(): void;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=coordinator-producer-negative-owner-test-fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-producer-negative-owner-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-producer-negative-owner-test-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAK/C,KAAK,OAAO,GAAG;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;CACxB,CAAC;AAQF,uFAAuF;AACvF,wBAAsB,mBAAmB,CACxC,EAAE,EAAE,QAAQ,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,GAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAO,iBAGrE;AAED,mFAAmF;AACnF,wBAAsB,oBAAoB,CACzC,EAAE,EAAE,QAAQ,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,GAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAO,uBAiDrE;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,QAAQ,4BAK5C;AAED,8EAA8E;AAC9E,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,IAAI;IAiBvF,QAAQ;IACR,OAAO;EAKR"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AuthLinkBackend, AuthLinkStatement } from "./coordinator-auth-link.js";
|
|
2
|
+
import { type NegativeOwnerConsistency } from "./coordinator-owner-negative-consistency.js";
|
|
3
|
+
import type { CoordinatorConsumeRecipientInviteInput } from "./coordinator-store-contract.js";
|
|
4
|
+
export declare function validateRecipientOwnerInput(input: CoordinatorConsumeRecipientInviteInput): void;
|
|
5
|
+
export declare function prepareRecipientOwnerConsistency(backend: Pick<AuthLinkBackend, "first" | "all">, input: CoordinatorConsumeRecipientInviteInput): Promise<NegativeOwnerConsistency | null>;
|
|
6
|
+
export declare function assertRecipientOwnerConsistency(backend: Pick<AuthLinkBackend, "first">, predicate: AuthLinkStatement | null): Promise<void>;
|
|
7
|
+
export declare function recipientOwnerWriteSql(sql: string, predicate: AuthLinkStatement): string;
|
|
8
|
+
//# sourceMappingURL=coordinator-recipient-owner-consistency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-recipient-owner-consistency.d.ts","sourceRoot":"","sources":["../src/coordinator-recipient-owner-consistency.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,EACN,KAAK,wBAAwB,EAI7B,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,iCAAiC,CAAC;AAE9F,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,sCAAsC,GAAG,IAAI,CAc/F;AAED,wBAAgB,gCAAgC,CAC/C,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,KAAK,CAAC,EAC/C,KAAK,EAAE,sCAAsC,GAC3C,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAW1C;AAED,wBAAsB,+BAA+B,CACpD,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,EACvC,SAAS,EAAE,iBAAiB,GAAG,IAAI,GACjC,OAAO,CAAC,IAAI,CAAC,CAGf;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,GAAG,MAAM,CAExF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ResolvedAccountOwnerReceiptReference, type ResolvedAccountOwnerStatus } from "./coordinator-resolved-account-owner-status.js";
|
|
2
|
+
export interface ReadCoordinatorResolvedAccountOwnerStatusOptions {
|
|
3
|
+
dbPath: string;
|
|
4
|
+
keysDir?: string;
|
|
5
|
+
groupId: string;
|
|
6
|
+
coordinatorUrl: string;
|
|
7
|
+
ownerIdentityId: string;
|
|
8
|
+
signal?: AbortSignal;
|
|
9
|
+
fetch?: typeof globalThis.fetch;
|
|
10
|
+
}
|
|
11
|
+
export interface ReadCoordinatorResolvedAccountOwnerReceiptStatusOptions extends ReadCoordinatorResolvedAccountOwnerStatusOptions {
|
|
12
|
+
receipt: ResolvedAccountOwnerReceiptReference;
|
|
13
|
+
}
|
|
14
|
+
export type CoordinatorResolvedAccountOwnerStatusRead = {
|
|
15
|
+
kind: "owner_status";
|
|
16
|
+
status: ResolvedAccountOwnerStatus;
|
|
17
|
+
} | {
|
|
18
|
+
kind: "unsupported";
|
|
19
|
+
} | {
|
|
20
|
+
kind: "unavailable";
|
|
21
|
+
code: "coordinator_unavailable" | "coordinator_auth_schema_upgrade_required" | "rate_limited" | "coordinator_rejected" | "coordinator_incompatible" | "coordinator_unreachable" | "invalid_response" | "device_unavailable";
|
|
22
|
+
};
|
|
23
|
+
/** Display-only remote read using existing keys; failures never imply unlink or authority. */
|
|
24
|
+
export declare function readCoordinatorResolvedAccountOwnerStatus(options: ReadCoordinatorResolvedAccountOwnerStatusOptions): Promise<CoordinatorResolvedAccountOwnerStatusRead>;
|
|
25
|
+
/** Check a complete pasted receipt using the same existing device and display-only DTO. */
|
|
26
|
+
export declare function readCoordinatorResolvedAccountOwnerReceiptStatus(options: ReadCoordinatorResolvedAccountOwnerReceiptStatusOptions): Promise<CoordinatorResolvedAccountOwnerStatusRead>;
|
|
27
|
+
//# sourceMappingURL=coordinator-resolved-account-owner-status-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-resolved-account-owner-status-client.d.ts","sourceRoot":"","sources":["../src/coordinator-resolved-account-owner-status-client.ts"],"names":[],"mappings":"AASA,OAAO,EAEN,KAAK,oCAAoC,EACzC,KAAK,0BAA0B,EAC/B,MAAM,gDAAgD,CAAC;AAExD,MAAM,WAAW,gDAAgD;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CAChC;AACD,MAAM,WAAW,uDAChB,SAAQ,gDAAgD;IACxD,OAAO,EAAE,oCAAoC,CAAC;CAC9C;AACD,MAAM,MAAM,yCAAyC,GAClD;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,0BAA0B,CAAA;CAAE,GAC5D;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IACA,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EACD,yBAAyB,GACzB,0CAA0C,GAC1C,cAAc,GACd,sBAAsB,GACtB,0BAA0B,GAC1B,yBAAyB,GACzB,kBAAkB,GAClB,oBAAoB,CAAC;CACvB,CAAC;AA0RL,8FAA8F;AAC9F,wBAAsB,yCAAyC,CAC9D,OAAO,EAAE,gDAAgD,GACvD,OAAO,CAAC,yCAAyC,CAAC,CASpD;AAED,2FAA2F;AAC3F,wBAAsB,gDAAgD,CACrE,OAAO,EAAE,uDAAuD,GAC9D,OAAO,CAAC,yCAAyC,CAAC,CAKpD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { AuthLinkStatement } from "./coordinator-auth-link.js";
|
|
2
|
+
import type { CoordinatorAuthLinkConfig, CoordinatorAuthLinkSigner } from "./coordinator-auth-link-contract.js";
|
|
3
|
+
import type { LegacyOwnerResolutionRecord } from "./coordinator-legacy-owner-resolution-metadata.js";
|
|
4
|
+
export interface ResolvedOwnerProfileRow {
|
|
5
|
+
link_count: number;
|
|
6
|
+
link_id: string | null;
|
|
7
|
+
not_revoked: number | null;
|
|
8
|
+
valid_link: string | null;
|
|
9
|
+
display_name: unknown;
|
|
10
|
+
email: unknown;
|
|
11
|
+
email_verified: unknown;
|
|
12
|
+
picture_url: unknown;
|
|
13
|
+
}
|
|
14
|
+
export declare function resolvedOwnerProfileQuery(options: {
|
|
15
|
+
signer: CoordinatorAuthLinkSigner;
|
|
16
|
+
config: CoordinatorAuthLinkConfig;
|
|
17
|
+
resolution: LegacyOwnerResolutionRecord;
|
|
18
|
+
keyId: string;
|
|
19
|
+
recheck: AuthLinkStatement;
|
|
20
|
+
}): AuthLinkStatement;
|
|
21
|
+
//# sourceMappingURL=coordinator-resolved-account-owner-status-query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-resolved-account-owner-status-query.d.ts","sourceRoot":"","sources":["../src/coordinator-resolved-account-owner-status-query.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EACX,yBAAyB,EACzB,yBAAyB,EACzB,MAAM,qCAAqC,CAAC;AAG7C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAErG,MAAM,WAAW,uBAAuB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,OAAO,CAAC;CACrB;AAYD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE;IAClD,MAAM,EAAE,yBAAyB,CAAC;IAClC,MAAM,EAAE,yBAAyB,CAAC;IAClC,UAAU,EAAE,2BAA2B,CAAC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,iBAAiB,CAAC;CAC3B,GAAG,iBAAiB,CAwDpB"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { AuthLinkStatement } from "./coordinator-auth-link.js";
|
|
2
|
+
import type { LinkFixture } from "./coordinator-auth-link-test-fixtures.js";
|
|
3
|
+
import type { Backend } from "./coordinator-auth-store-test-fixtures.js";
|
|
4
|
+
import { snapshot } from "./coordinator-legacy-owner-resolution-commit-test-fixtures.js";
|
|
5
|
+
import type { LegacyOwnerResolutionRecord } from "./coordinator-legacy-owner-resolution-metadata.js";
|
|
6
|
+
import { signer } from "./coordinator-owner-resolution-review-test-fixtures.js";
|
|
7
|
+
export { signer, snapshot };
|
|
8
|
+
export declare const selectedOwnerId = "identity-a";
|
|
9
|
+
export declare const safeProfile: {
|
|
10
|
+
displayName: string;
|
|
11
|
+
email: string;
|
|
12
|
+
pictureUrl: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A linked owner's profile as a device running as another Identity sees it:
|
|
16
|
+
* an empty object, never the name, email, or picture (ADR 0005 Section 8).
|
|
17
|
+
*/
|
|
18
|
+
export declare const withheldProfile: any;
|
|
19
|
+
export declare function databaseSnapshot(f: LinkFixture): {
|
|
20
|
+
catalog: unknown[];
|
|
21
|
+
tables: (string | unknown[])[][];
|
|
22
|
+
};
|
|
23
|
+
export declare function seedCurrentProfile(f: LinkFixture, options?: {
|
|
24
|
+
attemptId?: string;
|
|
25
|
+
profile?: typeof safeProfile;
|
|
26
|
+
}): void;
|
|
27
|
+
export declare function strongOtherOwner(f: LinkFixture): void;
|
|
28
|
+
export declare function overflowSources(f: LinkFixture, options: {
|
|
29
|
+
rows: number;
|
|
30
|
+
commentBytes: number;
|
|
31
|
+
}): void;
|
|
32
|
+
export declare function setupResolved(f: LinkFixture, kind: Backend, options?: {
|
|
33
|
+
fact?: boolean;
|
|
34
|
+
}): Promise<{
|
|
35
|
+
hooks: {
|
|
36
|
+
beforeBatch?: () => void;
|
|
37
|
+
mapStatement?: (statement: AuthLinkStatement) => AuthLinkStatement;
|
|
38
|
+
afterBatch?: () => void;
|
|
39
|
+
beforeFirst?: (statement: AuthLinkStatement) => void;
|
|
40
|
+
};
|
|
41
|
+
batchCount: () => number;
|
|
42
|
+
resetBatchCount: () => void;
|
|
43
|
+
evidence: import("./coordinator-device-ownership-evidence.js").CoordinatorDeviceOwnershipEvidence;
|
|
44
|
+
backend: {
|
|
45
|
+
prepareAuthLinkSource?: (attemptId: string, config: import("./coordinator-auth-link-contract.js").CoordinatorAuthLinkConfig, now: number, alias?: "a" | "coordinator_auth_link_attempts", options?: {
|
|
46
|
+
currentDevice?: boolean;
|
|
47
|
+
}) => Promise<AuthLinkStatement>;
|
|
48
|
+
prepareAuthLinkBrowserSource?: (input: {
|
|
49
|
+
binderHash: string;
|
|
50
|
+
stateHash?: string;
|
|
51
|
+
attemptId?: string;
|
|
52
|
+
}, config: import("./coordinator-auth-link-contract.js").CoordinatorAuthLinkConfig & {
|
|
53
|
+
redirectUri: string;
|
|
54
|
+
}, now: number) => Promise<AuthLinkStatement>;
|
|
55
|
+
readAuthSchemaState?: () => Promise<import("./coordinator-account-connection-schema.js").ConnectionSchemaState>;
|
|
56
|
+
run(statement: AuthLinkStatement): Promise<number>;
|
|
57
|
+
batch(statements: AuthLinkStatement[]): Promise<unknown>;
|
|
58
|
+
first<T>(statement: AuthLinkStatement): Promise<T | null>;
|
|
59
|
+
all<T>(statement: AuthLinkStatement): Promise<T[]>;
|
|
60
|
+
};
|
|
61
|
+
fact: {
|
|
62
|
+
controller: import("./coordinator-auth-controller.js").CoordinatorAuthControllerAttestation;
|
|
63
|
+
controllerDisposition: "created" | "reused";
|
|
64
|
+
resolution: LegacyOwnerResolutionRecord;
|
|
65
|
+
resolutionDisposition: "created" | "reused";
|
|
66
|
+
} | null;
|
|
67
|
+
finalRead: {
|
|
68
|
+
inject: (() => void) | undefined;
|
|
69
|
+
count: number;
|
|
70
|
+
};
|
|
71
|
+
statements: AuthLinkStatement[];
|
|
72
|
+
}>;
|
|
73
|
+
export type ResolvedHarness = Awaited<ReturnType<typeof setupResolved>>;
|
|
74
|
+
export declare function replaceFacts(f: LinkFixture, rows: LegacyOwnerResolutionRecord[]): void;
|
|
75
|
+
export declare function appendLegitimateFact(f: LinkFixture, h: ResolvedHarness): Promise<{
|
|
76
|
+
controller: import("./coordinator-auth-controller.js").CoordinatorAuthControllerAttestation;
|
|
77
|
+
controllerDisposition: "created" | "reused";
|
|
78
|
+
resolution: LegacyOwnerResolutionRecord;
|
|
79
|
+
resolutionDisposition: "created" | "reused";
|
|
80
|
+
}>;
|
|
81
|
+
export declare function sourceController(f: LinkFixture, h: ResolvedHarness, assignment: string): void;
|
|
82
|
+
export declare function expectNoDisclosure(value: unknown): void;
|
|
83
|
+
export declare function expectDisplayOnly(value: unknown): void;
|
|
84
|
+
//# sourceMappingURL=coordinator-resolved-account-owner-status-test-fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-resolved-account-owner-status-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-resolved-account-owner-status-test-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AAEzE,OAAO,EAEN,QAAQ,EACR,MAAM,+DAA+D,CAAC;AACv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AE,2BAA2B,EAAE,QAa/E;AAED,wBAAsB,oBAAoB,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,eAAe;;;;;GAW5E;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,QAOtF;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,QAShD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,QAiB/C"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { AuthLinkBackend, AuthLinkStatement } from "./coordinator-auth-link.js";
|
|
2
|
+
import type { CoordinatorAuthLinkConfig, CoordinatorAuthLinkSigner } from "./coordinator-auth-link-contract.js";
|
|
3
|
+
type ResolvedOwnerBackend = AuthLinkBackend & {
|
|
4
|
+
all<T>(statement: AuthLinkStatement): Promise<T[]>;
|
|
5
|
+
};
|
|
6
|
+
interface SafeProfile {
|
|
7
|
+
displayName?: string;
|
|
8
|
+
email?: string;
|
|
9
|
+
pictureUrl?: string;
|
|
10
|
+
}
|
|
11
|
+
interface StatusSubject {
|
|
12
|
+
version: 1;
|
|
13
|
+
coordinatorId: string;
|
|
14
|
+
groupId: string;
|
|
15
|
+
deviceId: string;
|
|
16
|
+
fingerprint: string;
|
|
17
|
+
}
|
|
18
|
+
export type ResolvedAccountOwnerStatus = StatusSubject & ({
|
|
19
|
+
state: "owner_unconfirmed";
|
|
20
|
+
ownerIdentity: null;
|
|
21
|
+
profileState: "unavailable";
|
|
22
|
+
profile: null;
|
|
23
|
+
} | {
|
|
24
|
+
state: "owner_confirmed";
|
|
25
|
+
ownerIdentity: string;
|
|
26
|
+
profileState: "linked";
|
|
27
|
+
profile: SafeProfile;
|
|
28
|
+
} | {
|
|
29
|
+
state: "owner_confirmed";
|
|
30
|
+
ownerIdentity: string;
|
|
31
|
+
profileState: "account_unlinked" | "unavailable";
|
|
32
|
+
profile: null;
|
|
33
|
+
});
|
|
34
|
+
export declare class ResolvedAccountOwnerStatusUnavailableError extends Error {
|
|
35
|
+
constructor();
|
|
36
|
+
}
|
|
37
|
+
export interface ResolvedAccountOwnerReceiptReference {
|
|
38
|
+
attestationId: string;
|
|
39
|
+
reviewReceiptId: string;
|
|
40
|
+
reviewEvidenceDigest: string;
|
|
41
|
+
resolutionId: string;
|
|
42
|
+
resolutionEvidenceDigest: string;
|
|
43
|
+
}
|
|
44
|
+
/** Capture data descriptors only; never evaluate submitted accessors. */
|
|
45
|
+
export declare function captureResolvedAccountOwnerReceiptReference(value: unknown): ResolvedAccountOwnerReceiptReference | null;
|
|
46
|
+
/** Read-only display proof. The selected owner is a query, never an authority input. */
|
|
47
|
+
export declare class ResolvedAccountOwnerStatusOperations {
|
|
48
|
+
private readonly backend;
|
|
49
|
+
constructor(backend: ResolvedOwnerBackend);
|
|
50
|
+
readResolvedAccountOwnerStatus(signer: CoordinatorAuthLinkSigner, config: CoordinatorAuthLinkConfig, options: {
|
|
51
|
+
ownerIdentityId: string;
|
|
52
|
+
expectedReceipt?: unknown;
|
|
53
|
+
}): Promise<ResolvedAccountOwnerStatus>;
|
|
54
|
+
private readCaptured;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=coordinator-resolved-account-owner-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-resolved-account-owner-status.d.ts","sourceRoot":"","sources":["../src/coordinator-resolved-account-owner-status.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EACX,yBAAyB,EACzB,yBAAyB,EACzB,MAAM,qCAAqC,CAAC;AAwB7C,KAAK,oBAAoB,GAAG,eAAe,GAAG;IAC7C,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;CACnD,CAA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