@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file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AC;CACnD;AACD,MAAM,MAAM,oCAAoC,GAC7C,QAAQ,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAC,sCAAsC,CAAC,CAAA;CAAE,CAAC,GAClF,QAAQ,CAAC;IACT,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE,6BAA6B,CAAC;IACrC,KAAK,EAAE,iCAAiC,CAAC;CACxC,CAAC,GACF,QAAQ,CAAC;IACT,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EACF,uBAAuB,GACvB,eAAe,GACf,uBAAuB,GACvB,gCAAgC,CAAC;CACnC,CAAC,CAAC;AAgUN,2FAA2F;AAC3F,wBAAsB,oCAAoC,CACzD,KAAK,EAAE,mCAAmC,GACxC,OAAO,CAAC,oCAAoC,CAAC,CA0D/C"}
|
|
@@ -2,9 +2,14 @@ import type { Context } from "hono";
|
|
|
2
2
|
import type { CoordinatorAccountLinkStatusStore } from "./coordinator-account-link-status.js";
|
|
3
3
|
import type { CoordinatorAuthBrowserConfig, CoordinatorAuthBrowserTransactionStore } from "./coordinator-auth-browser-transaction-contract.js";
|
|
4
4
|
import type { CoordinatorAuthControllerStore } from "./coordinator-auth-controller.js";
|
|
5
|
+
import type { AuthLinkBackend } from "./coordinator-auth-link.js";
|
|
5
6
|
import { type CoordinatorAuthLinkStore } from "./coordinator-auth-link-contract.js";
|
|
7
|
+
import { type ResolvedAccountOwnerStatusOperations } from "./coordinator-resolved-account-owner-status.js";
|
|
6
8
|
import type { CoordinatorEnrollment, CoordinatorStore } from "./coordinator-store-contract.js";
|
|
7
|
-
export type CoordinatorDeviceAuthLinkStore = CoordinatorStore & Partial<CoordinatorAccountLinkStatusStore> & Pick<CoordinatorAuthControllerStore, "createAuthControllerAttestation"> & Pick<CoordinatorAuthLinkStore, "createAuthLinkAttempt" | "getAuthLinkAttemptStatus" | "finalizeAuthLinkAttempt" | "failAuthLinkAttempt"> & Pick<CoordinatorAuthBrowserTransactionStore, "retireAuthBrowserTransactions"
|
|
9
|
+
export type CoordinatorDeviceAuthLinkStore = CoordinatorStore & Partial<CoordinatorAccountLinkStatusStore> & Partial<Pick<ResolvedAccountOwnerStatusOperations, "readResolvedAccountOwnerStatus">> & Pick<CoordinatorAuthControllerStore, "createAuthControllerAttestation" | "captureAuthControllerLegacyHistory"> & Pick<CoordinatorAuthLinkStore, "createAuthLinkAttempt" | "getAuthLinkAttemptStatus" | "finalizeAuthLinkAttempt" | "failAuthLinkAttempt"> & Pick<CoordinatorAuthBrowserTransactionStore, "retireAuthBrowserTransactions"> & {
|
|
10
|
+
/** Rebind storage (ADR 0005 Section 8), or null before its tables exist. */
|
|
11
|
+
readDeviceRebindBackend?(): Promise<AuthLinkBackend | null>;
|
|
12
|
+
};
|
|
8
13
|
export interface CoordinatorDeviceAuthLinkOptions {
|
|
9
14
|
config: CoordinatorAuthBrowserConfig;
|
|
10
15
|
storeFactory: () => CoordinatorDeviceAuthLinkStore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-device-auth-link.d.ts","sourceRoot":"","sources":["../src/coordinator-device-auth-link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OAAO,KAAK,EACX,4BAA4B,EAC5B,sCAAsC,EACtC,MAAM,oDAAoD,CAAC;AAC5D,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAEvF,OAAO,EAIN,KAAK,wBAAwB,EAC7B,MAAM,qCAAqC,CAAC;AAW7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAE/F,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,GAC5D,OAAO,CAAC,iCAAiC,CAAC,GAC1C,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"coordinator-device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G,EAAE,iBAAiB,EACtB,IAAI,EAAE,kBAAkB,GACtB,IAAI,CAaN;AAED,wBAAgB,uCAAuC,CACtD,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE,kBAAkB,GACtB,IAAI,CA8BN"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ControllerHistorySnapshot } from "./coordinator-auth-controller-history.js";
|
|
2
|
+
import { type ReviewedWeakLabel } from "./coordinator-legacy-owner-resolution-metadata.js";
|
|
3
|
+
export type EvidenceRow = (string | number | null)[];
|
|
4
|
+
export type EvidenceRows = Record<string, EvidenceRow[]>;
|
|
5
|
+
export declare function evidenceRows(rows: EvidenceRows, name: string): EvidenceRow[];
|
|
6
|
+
export interface EvidenceSubject {
|
|
7
|
+
coordinatorId: string;
|
|
8
|
+
groupId: string;
|
|
9
|
+
deviceId: string;
|
|
10
|
+
publicKey: string;
|
|
11
|
+
fingerprint: string;
|
|
12
|
+
keyId: string;
|
|
13
|
+
}
|
|
14
|
+
export type OwnershipDecision = "compatible" | "owner_transfer_required" | "weak_label_review_required" | "device_revoked";
|
|
15
|
+
export declare function identifier(value: unknown): value is string;
|
|
16
|
+
export declare function hash(value: unknown): value is string;
|
|
17
|
+
export declare function keyId(value: unknown): Promise<string>;
|
|
18
|
+
export declare function classifyEvidence(rows: EvidenceRows, subject: EvidenceSubject, owner: string, history: ControllerHistorySnapshot): Promise<{
|
|
19
|
+
decision: OwnershipDecision;
|
|
20
|
+
weakLabels: ReviewedWeakLabel[];
|
|
21
|
+
}>;
|
|
22
|
+
//# sourceMappingURL=coordinator-device-ownership-evidence-classify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-ownership-evidence-classify.d.ts","sourceRoot":"","sources":["../src/coordinator-device-ownership-evidence-classify.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,yBAAyB,EAE9B,MAAM,0CAA0C,CAAC;AAGlD,OAAO,EAEN,KAAK,iBAAiB,EACtB,MAAM,mDAAmD,CAAC;AAE3D,MAAM,MAAM,WAAW,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;AACrD,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;AACzD,wBAAgB,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CAI5E;AACD,MAAM,WAAW,eAAe;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACd;AACD,MAAM,MAAM,iBAAiB,GAC1B,YAAY,GACZ,yBAAyB,GACzB,4BAA4B,GAC5B,gBAAgB,CAAC;AAEpB,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAQ1D;AACD,wBAAgB,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAEpD;AASD,wBAAsB,KAAK,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAK3D;AAkJD,wBAAsB,gBAAgB,CACrC,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,yBAAyB,GAChC,OAAO,CAAC;IAAE,QAAQ,EAAE,iBAAiB,CAAC;IAAC,UAAU,EAAE,iBAAiB,EAAE,CAAA;CAAE,CAAC,CA+B3E"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ControllerHistorySnapshot } from "./coordinator-auth-controller-history.js";
|
|
2
|
+
import { type EvidenceRows, type EvidenceSubject } from "./coordinator-device-ownership-evidence-classify.js";
|
|
3
|
+
/** Hash only validated semantic evidence, not conservative SQL discovery inputs.
|
|
4
|
+
* Row positions follow the fixed source column lists; sorting uses code units,
|
|
5
|
+
* never locale rules. Exact source key text remains part of relevant evidence.
|
|
6
|
+
*/
|
|
7
|
+
export declare function capturedOwnershipEvidenceDigest(rows: EvidenceRows, subject: EvidenceSubject, canonicalOwnerId: string, history: ControllerHistorySnapshot): Promise<string>;
|
|
8
|
+
//# sourceMappingURL=coordinator-device-ownership-evidence-digest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-ownership-evidence-digest.d.ts","sourceRoot":"","sources":["../src/coordinator-device-ownership-evidence-digest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAEN,KAAK,YAAY,EACjB,KAAK,eAAe,EAGpB,MAAM,qDAAqD,CAAC;AAsB7D;;;GAGG;AACH,wBAAsB,+BAA+B,CACpD,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,eAAe,EACxB,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,yBAAyB,GAChC,OAAO,CAAC,MAAM,CAAC,CAuCjB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AuthLinkStatement } from "./coordinator-auth-link.js";
|
|
2
|
+
export declare const ROW_LIMIT = 500;
|
|
3
|
+
export declare const BYTE_LIMIT = 750000;
|
|
4
|
+
export interface EvidenceQuery {
|
|
5
|
+
name: string;
|
|
6
|
+
sql: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const CONTROLLER_COLUMNS: string[];
|
|
9
|
+
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 declare function atomicEvidenceQuery(encoded: string): AuthLinkStatement;
|
|
13
|
+
//# sourceMappingURL=coordinator-device-ownership-evidence-queries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-ownership-evidence-queries.d.ts","sourceRoot":"","sources":["../src/coordinator-device-ownership-evidence-queries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,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,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAM1F;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAiBtE"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { AuthLinkStatement } from "./coordinator-auth-link.js";
|
|
2
|
+
import { cfg } from "./coordinator-auth-link-test-fixtures.js";
|
|
3
|
+
import { type Backend, type Fixture } from "./coordinator-auth-store-test-fixtures.js";
|
|
4
|
+
import { EXPECTED_KEY_ID } from "./coordinator-ed25519-key-id-test-fixtures.js";
|
|
5
|
+
export { cfg, EXPECTED_KEY_ID };
|
|
6
|
+
export declare const timestamp = "2026-10-01T00:00:00.000Z";
|
|
7
|
+
export declare const signer: {
|
|
8
|
+
groupId: string;
|
|
9
|
+
deviceId: string;
|
|
10
|
+
publicKey: string;
|
|
11
|
+
fingerprint: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const otherKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID1AF8PoQ4lakrcKp00bfrycmCzPLsSWjMDNVfEq9GYM";
|
|
14
|
+
export type Row = Record<string, string | number | null>;
|
|
15
|
+
export declare function insert(f: Fixture, table: string, row: Row): void;
|
|
16
|
+
export declare function evidenceBackend(f: Fixture, backend: Backend): {
|
|
17
|
+
first<T>(statement: AuthLinkStatement): Promise<T | null>;
|
|
18
|
+
all<T>(statement: AuthLinkStatement): Promise<T[]>;
|
|
19
|
+
};
|
|
20
|
+
export declare function evidenceTest(backend: Backend): import("vitest").TestAPI<{
|
|
21
|
+
f: Fixture;
|
|
22
|
+
}>;
|
|
23
|
+
export declare function databaseSnapshot(f: Fixture): (string | unknown[])[][];
|
|
24
|
+
export declare function controller(f: Fixture, patch?: Row): {
|
|
25
|
+
attestation_id: string;
|
|
26
|
+
coordinator_id: string;
|
|
27
|
+
identity_id: string;
|
|
28
|
+
group_id: string;
|
|
29
|
+
device_id: string;
|
|
30
|
+
public_key: string;
|
|
31
|
+
fingerprint: string;
|
|
32
|
+
review_receipt_id: string;
|
|
33
|
+
evidence_digest: string;
|
|
34
|
+
enrollment_identity_id: string;
|
|
35
|
+
revision: number;
|
|
36
|
+
created_at: string;
|
|
37
|
+
revoked_at: null;
|
|
38
|
+
};
|
|
39
|
+
export declare function binding(f: Fixture, patch?: Row): void;
|
|
40
|
+
export declare function claim(f: Fixture, patch?: Row): void;
|
|
41
|
+
export declare function invitation(f: Fixture, patch?: Row): void;
|
|
42
|
+
export declare function history(f: Fixture, patch?: {
|
|
43
|
+
label?: string;
|
|
44
|
+
deviceId?: string;
|
|
45
|
+
fingerprint?: string;
|
|
46
|
+
decision?: "included" | "excluded";
|
|
47
|
+
}): void;
|
|
48
|
+
export declare function collectInput(f: Fixture): Promise<{
|
|
49
|
+
canonicalOwnerId: string;
|
|
50
|
+
actualSigner: {
|
|
51
|
+
groupId: string;
|
|
52
|
+
deviceId: string;
|
|
53
|
+
publicKey: string;
|
|
54
|
+
fingerprint: string;
|
|
55
|
+
};
|
|
56
|
+
verifiedHistory: import("./coordinator-auth-controller-history.js").ControllerHistorySnapshot;
|
|
57
|
+
}>;
|
|
58
|
+
export declare function sourceRef(row: ReturnType<typeof controller>): {
|
|
59
|
+
coordinator_id: string;
|
|
60
|
+
resolution_id: string;
|
|
61
|
+
resolution_version: number;
|
|
62
|
+
device_id: string;
|
|
63
|
+
key_id: string;
|
|
64
|
+
owner_identity_id: string;
|
|
65
|
+
purpose: string;
|
|
66
|
+
scope: string;
|
|
67
|
+
source_attestation_id: string;
|
|
68
|
+
source_group_id: string;
|
|
69
|
+
source_controller_revision: number;
|
|
70
|
+
source_public_key: string;
|
|
71
|
+
source_fingerprint: string;
|
|
72
|
+
source_enrollment_identity_id: string;
|
|
73
|
+
source_created_at: string;
|
|
74
|
+
source_review_receipt_id: string;
|
|
75
|
+
source_evidence_digest: string;
|
|
76
|
+
resolution_evidence_digest: string;
|
|
77
|
+
reviewed_weak_labels_json: string;
|
|
78
|
+
created_at: string;
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=coordinator-device-ownership-evidence-test-fixtures.d.ts.map
|
|
@@ -0,0 +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,G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erHistorySnapshot } from "./coordinator-auth-controller-history.js";
|
|
2
|
+
import type { AuthLinkStatement } from "./coordinator-auth-link.js";
|
|
3
|
+
import { type OwnershipDecision } from "./coordinator-device-ownership-evidence-classify.js";
|
|
4
|
+
import { type ReviewedWeakLabel } from "./coordinator-legacy-owner-resolution-metadata.js";
|
|
5
|
+
interface EvidenceBackend {
|
|
6
|
+
first<T>(statement: AuthLinkStatement): Promise<T | null>;
|
|
7
|
+
all<T>(statement: AuthLinkStatement): Promise<T[]>;
|
|
8
|
+
}
|
|
9
|
+
interface ActualSigner {
|
|
10
|
+
groupId: string;
|
|
11
|
+
deviceId: string;
|
|
12
|
+
publicKey: string;
|
|
13
|
+
fingerprint: string;
|
|
14
|
+
}
|
|
15
|
+
interface CollectionInput {
|
|
16
|
+
canonicalOwnerId: string;
|
|
17
|
+
actualSigner: ActualSigner;
|
|
18
|
+
verifiedHistory: ControllerHistorySnapshot;
|
|
19
|
+
}
|
|
20
|
+
interface RecheckSnapshot {
|
|
21
|
+
readonly version: 1;
|
|
22
|
+
}
|
|
23
|
+
type OwnershipCollection = {
|
|
24
|
+
kind: "collected";
|
|
25
|
+
decision: OwnershipDecision;
|
|
26
|
+
weakLabels: ReviewedWeakLabel[];
|
|
27
|
+
recheckSnapshot: RecheckSnapshot;
|
|
28
|
+
} | {
|
|
29
|
+
kind: "unavailable";
|
|
30
|
+
authorizationUnavailable: true;
|
|
31
|
+
};
|
|
32
|
+
type SourceVerification = {
|
|
33
|
+
kind: "verified_controller_source" | "source_missing" | "source_revoked" | "source_mismatch";
|
|
34
|
+
} | {
|
|
35
|
+
kind: "unavailable";
|
|
36
|
+
authorizationUnavailable: true;
|
|
37
|
+
};
|
|
38
|
+
/** Internal read-only metadata collector. No result of this class grants access. */
|
|
39
|
+
export declare class CoordinatorDeviceOwnershipEvidence {
|
|
40
|
+
private readonly backend;
|
|
41
|
+
private readonly snapshots;
|
|
42
|
+
private readonly coordinatorId;
|
|
43
|
+
constructor(backend: EvidenceBackend, config: {
|
|
44
|
+
coordinatorId: string;
|
|
45
|
+
});
|
|
46
|
+
collect(input: CollectionInput): Promise<OwnershipCollection>;
|
|
47
|
+
private verifyHistory;
|
|
48
|
+
private captureRows;
|
|
49
|
+
/** A predicate for a future checked batch, never an admission or a write. */
|
|
50
|
+
prepareAtomicRecheck(snapshot: RecheckSnapshot): AuthLinkStatement;
|
|
51
|
+
/** Private confirmation metadata; only this reader's original capture is accepted. */
|
|
52
|
+
reviewedEvidenceDigest(snapshot: unknown): Promise<string | null>;
|
|
53
|
+
verifyControllerSource(input: {
|
|
54
|
+
sourceRef: unknown;
|
|
55
|
+
expectedOwnerId: string;
|
|
56
|
+
actualSigner: ActualSigner;
|
|
57
|
+
}): Promise<SourceVerification>;
|
|
58
|
+
}
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=coordinator-device-ownership-evidence.d.ts.map
|
|
@@ -0,0 +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,EAI9B,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EASN,KAAK,iBAAiB,EACtB,MAAM,qDAAqD,CAAC;AAU7D,OAAO,EAGN,KAAK,iBAAiB,EAEtB,MAAM,mDAAmD,CAAC;AAE3D,UAAU,eAAe;IACxB,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;AACD,UAAU,YAAY;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MA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,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,3 +1,9 @@
|
|
|
1
1
|
/** Inert ledger schema: only future verified, atomic enrollment writes may populate it. */
|
|
2
|
-
export declare const COORDINATOR_DEVICE_OWNERSHIP_SCHEMA_SQL = "\nCREATE TABLE IF NOT EXISTS coordinator_device_ownership_bindings (\n device_id TEXT PRIMARY KEY NOT NULL CHECK(\n typeof(device_id) = 'text' AND length(trim(device_id)) > 0 AND instr(device_id, char(0)) = 0),\n key_id TEXT NOT NULL UNIQUE CHECK(\n typeof(key_id) = 'text' AND length(key_id) = 64 AND key_id NOT GLOB '*[^a-f0-9]*'\n AND instr(key_id, char(0)) = 0),\n identity_id TEXT NOT NULL CHECK(\n typeof(identity_id) = 'text' AND length(trim(identity_id)) > 0 AND instr(identity_id, char(0)) = 0),\n coordinator_id TEXT NOT NULL CHECK(\n typeof(coordinator_id) = 'text' AND length(trim(coordinator_id)) > 0 AND instr(coordinator_id, char(0)) = 0),\n binding_id TEXT NOT NULL UNIQUE CHECK(\n typeof(binding_id) = 'text' AND length(trim(binding_id)) > 0 AND instr(binding_id, char(0)) = 0),\n provenance TEXT NOT NULL CHECK(\n typeof(provenance) = 'text' AND provenance IN ('owner_enrollment', 'reviewed_legacy_migration')),\n source_ref TEXT NOT NULL CHECK(\n typeof(source_ref) = 'text' AND length(trim(source_ref)) > 0 AND instr(source_ref, char(0)) = 0),\n bound_at TEXT NOT NULL CHECK(\n typeof(bound_at) = 'text' AND length(trim(bound_at)) > 0 AND instr(bound_at, char(0)) = 0)\n);\n\n-- REPLACE's implicit deletes may skip DELETE triggers when recursive triggers are off.\nCREATE TRIGGER IF NOT EXISTS coordinator_device_ownership_insert_collision\nBEFORE INSERT ON coordinator_device_ownership_bindings\nWHEN EXISTS (\n SELECT 1 FROM coordinator_device_ownership_bindings\n WHERE device_id = NEW.device_id OR key_id = NEW.key_id
|
|
2
|
+
export declare const COORDINATOR_DEVICE_OWNERSHIP_SCHEMA_SQL = "\nCREATE TABLE IF NOT EXISTS coordinator_device_ownership_bindings (\n device_id TEXT PRIMARY KEY NOT NULL CHECK(\n typeof(device_id) = 'text' AND length(trim(device_id)) > 0 AND instr(device_id, char(0)) = 0),\n key_id TEXT NOT NULL UNIQUE CHECK(\n typeof(key_id) = 'text' AND length(key_id) = 64 AND key_id NOT GLOB '*[^a-f0-9]*'\n AND instr(key_id, char(0)) = 0),\n identity_id TEXT NOT NULL CHECK(\n typeof(identity_id) = 'text' AND length(trim(identity_id)) > 0 AND instr(identity_id, char(0)) = 0),\n coordinator_id TEXT NOT NULL CHECK(\n typeof(coordinator_id) = 'text' AND length(trim(coordinator_id)) > 0 AND instr(coordinator_id, char(0)) = 0),\n binding_id TEXT NOT NULL UNIQUE CHECK(\n typeof(binding_id) = 'text' AND length(trim(binding_id)) > 0 AND instr(binding_id, char(0)) = 0),\n provenance TEXT NOT NULL CHECK(\n typeof(provenance) = 'text' AND provenance IN ('owner_enrollment', 'reviewed_legacy_migration')),\n source_ref TEXT NOT NULL CHECK(\n typeof(source_ref) = 'text' AND length(trim(source_ref)) > 0 AND instr(source_ref, char(0)) = 0),\n bound_at TEXT NOT NULL CHECK(\n typeof(bound_at) = 'text' AND length(trim(bound_at)) > 0 AND instr(bound_at, char(0)) = 0)\n);\n\n-- REPLACE's implicit deletes may skip DELETE triggers when recursive triggers are off.\nCREATE TRIGGER IF NOT EXISTS coordinator_device_ownership_insert_collision\nBEFORE INSERT ON coordinator_device_ownership_bindings\nWHEN EXISTS (\n SELECT 1 FROM coordinator_device_ownership_bindings\n WHERE rowid = NEW.rowid OR device_id = NEW.device_id OR key_id = NEW.key_id\n OR binding_id = NEW.binding_id\n)\nBEGIN\n SELECT RAISE(ABORT, 'device_ownership_collision');\nEND;\n\n-- An automatic rowid reads as -1 before insert; positive rowids keep that from matching a row.\nCREATE TRIGGER IF NOT EXISTS coordinator_device_ownership_rowid\nAFTER INSERT ON coordinator_device_ownership_bindings\nWHEN NEW.rowid < 1\nBEGIN\n SELECT RAISE(ABORT, 'device_ownership_rowid');\nEND;\n\nCREATE TRIGGER IF NOT EXISTS coordinator_device_ownership_immutable_update\nBEFORE UPDATE ON coordinator_device_ownership_bindings\nBEGIN\n SELECT RAISE(ABORT, 'device_ownership_immutable');\nEND;\n\nCREATE TRIGGER IF NOT EXISTS coordinator_device_ownership_immutable_delete\nBEFORE DELETE ON coordinator_device_ownership_bindings\nBEGIN\n SELECT RAISE(ABORT, 'device_ownership_immutable');\nEND;\n";
|
|
3
|
+
/**
|
|
4
|
+
* Earlier installs have a collision trigger that ignores rowid, so INSERT OR
|
|
5
|
+
* REPLACE with an existing rowid could delete a binding without firing its
|
|
6
|
+
* DELETE trigger. Returns the SQL that replaces it, or null when current.
|
|
7
|
+
*/
|
|
8
|
+
export declare function upgradeDeviceOwnershipTriggersSql(existingTriggerSql: string | null): string | null;
|
|
3
9
|
//# sourceMappingURL=coordinator-device-ownership-schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-device-ownership-schema.d.ts","sourceRoot":"","sources":["../src/coordinator-device-ownership-schema.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,eAAO,MAAM,uCAAuC,
|
|
1
|
+
{"version":3,"file":"coordinator-device-ownership-schema.d.ts","sourceRoot":"","sources":["../src/coordinator-device-ownership-schema.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,eAAO,MAAM,uCAAuC,g3EAoDnD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,iCAAiC,CAChD,kBAAkB,EAAE,MAAM,GAAG,IAAI,GAC/B,MAAM,GAAG,IAAI,CAGf"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { AuthLinkBackend } from "./coordinator-auth-link.js";
|
|
2
|
+
import { type BrowserCsrfKey } from "./coordinator-browser-csrf.js";
|
|
3
|
+
import { type CoordinatorOidcOptions } from "./coordinator-oidc.js";
|
|
4
|
+
import type { InMemoryRequestRateLimiter } from "./request-rate-limit.js";
|
|
5
|
+
export interface DeviceRebindBrowserInput {
|
|
6
|
+
config: unknown;
|
|
7
|
+
csrfKey: BrowserCsrfKey;
|
|
8
|
+
limiter: InMemoryRequestRateLimiter;
|
|
9
|
+
/** Must already have the rebind tables; see readDeviceRebindBackend. */
|
|
10
|
+
backend: AuthLinkBackend;
|
|
11
|
+
oidcOptions?: CoordinatorOidcOptions;
|
|
12
|
+
now?: () => number;
|
|
13
|
+
}
|
|
14
|
+
export declare function createDeviceRebindBrowser(input: DeviceRebindBrowserInput): Promise<{
|
|
15
|
+
ok: false;
|
|
16
|
+
handlers?: undefined;
|
|
17
|
+
} | {
|
|
18
|
+
ok: true;
|
|
19
|
+
handlers: Readonly<{
|
|
20
|
+
startPage: (request: Request, clientKey: string) => Promise<Response>;
|
|
21
|
+
start: (request: Request, clientKey: string) => Promise<Response>;
|
|
22
|
+
confirm: (request: Request, clientKey: string) => Promise<Response>;
|
|
23
|
+
callback: (request: Request) => Promise<Response | null>;
|
|
24
|
+
}>;
|
|
25
|
+
}>;
|
|
26
|
+
//# sourceMappingURL=coordinator-device-rebind-browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-rebind-browser.d.ts","sourceRoot":"","sources":["../src/coordinator-device-rebind-browser.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAQlE,OAAO,EAAE,KAAK,cAAc,EAAyB,MAAM,+BAA+B,CAAC;AAiB3F,OAAO,EAEN,KAAK,sBAAsB,EAE3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,MAAM,WAAW,wBAAwB;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,0BAA0B,CAAC;IACpC,wEAAwE;IACxE,OAAO,EAAE,eAAe,CAAC;IACzB,WAAW,CAAC,EAAE,sBAAsB,CAAC;IACrC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACnB;AAmKD,wBAAsB,yBAAyB,CAAC,KAAK,EAAE,wBAAwB;;;;;;4DATnD,OAAO,CAAC,QAAQ,CAAC;wDAAjB,OAAO,CAAC,QAAQ,CAAC;0DAAjB,OAAO,CAAC,QAAQ,CAAC;4BAiDhB,OAAO,KAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;;GAS9D"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import type { CoordinatorAuthBrowserConfig } from "./coordinator-auth-browser-transaction-contract.js";
|
|
2
|
+
import type { AuthLinkBackend } from "./coordinator-auth-link.js";
|
|
3
|
+
import { type BrowserCsrfKey } from "./coordinator-browser-csrf.js";
|
|
4
|
+
import { type DeviceRebindReceipt } from "./coordinator-device-rebind-commit.js";
|
|
5
|
+
import type { CoordinatorOidcClient } from "./coordinator-oidc.js";
|
|
6
|
+
import type { InMemoryRequestRateLimiter } from "./request-rate-limit.js";
|
|
7
|
+
/** The signed device request's verified enrollment; the route authenticates it. */
|
|
8
|
+
export interface DeviceRebindSigner {
|
|
9
|
+
groupId: string;
|
|
10
|
+
deviceId: string;
|
|
11
|
+
publicKey: string;
|
|
12
|
+
fingerprint: string;
|
|
13
|
+
}
|
|
14
|
+
export interface DeviceRebindStart {
|
|
15
|
+
attemptId: string;
|
|
16
|
+
signer: DeviceRebindSigner;
|
|
17
|
+
/** The device's current Identity (its local actor), checked against its enrollments. */
|
|
18
|
+
currentIdentityId: string;
|
|
19
|
+
loopbackRedirect: string;
|
|
20
|
+
/** SHA-256 hex of the browser start code; the device keeps the code itself. */
|
|
21
|
+
browserStartHash: string;
|
|
22
|
+
/** SHA-256 hex of the device's local review; any local change aborts the switch. */
|
|
23
|
+
reviewDigest: string;
|
|
24
|
+
}
|
|
25
|
+
/** Why a step refused; the Viewer turns these into the next action for the person. */
|
|
26
|
+
export type DeviceRebindRefusal = "unavailable" | "current_identity_linked" | "device_already_bound" | "account_not_linked" | "already_this_identity" | "daily_limit" | "retry";
|
|
27
|
+
export interface DeviceRebindConfirmation {
|
|
28
|
+
attemptId: string;
|
|
29
|
+
deviceId: string;
|
|
30
|
+
fingerprint: string;
|
|
31
|
+
issuer: string;
|
|
32
|
+
subject: string;
|
|
33
|
+
currentIdentityId: string;
|
|
34
|
+
targetIdentityId: string;
|
|
35
|
+
/** Groups where the device stays enrolled but the target Identity has no access yet. */
|
|
36
|
+
groupsWithoutAccess: readonly string[];
|
|
37
|
+
confirmationHash: string;
|
|
38
|
+
}
|
|
39
|
+
export type DeviceRebindResult = {
|
|
40
|
+
kind: "refused";
|
|
41
|
+
reason: DeviceRebindRefusal;
|
|
42
|
+
/** This step burned the browser's transaction; its cookie can be cleared. */
|
|
43
|
+
retired?: true;
|
|
44
|
+
/** Where the browser tells the device the attempt ended, so it stops waiting. */
|
|
45
|
+
returnTo?: {
|
|
46
|
+
loopbackRedirect: string;
|
|
47
|
+
attemptId: string;
|
|
48
|
+
};
|
|
49
|
+
} | {
|
|
50
|
+
kind: "unknown";
|
|
51
|
+
} | {
|
|
52
|
+
kind: "started";
|
|
53
|
+
attemptId: string;
|
|
54
|
+
expiresAtMs: number;
|
|
55
|
+
} | {
|
|
56
|
+
kind: "browser_claimed";
|
|
57
|
+
authorizationUrl: string;
|
|
58
|
+
setCookies: string[];
|
|
59
|
+
} | {
|
|
60
|
+
kind: "verified";
|
|
61
|
+
confirmation: DeviceRebindConfirmation;
|
|
62
|
+
csrf: string;
|
|
63
|
+
} | {
|
|
64
|
+
kind: "confirmed";
|
|
65
|
+
completionSecret: string;
|
|
66
|
+
loopbackRedirect: string;
|
|
67
|
+
} | {
|
|
68
|
+
kind: "finalized" | "prior_commit";
|
|
69
|
+
receipt: DeviceRebindReceipt;
|
|
70
|
+
} | {
|
|
71
|
+
kind: "status";
|
|
72
|
+
state: string;
|
|
73
|
+
expiresAtMs: number;
|
|
74
|
+
/** Shown once the person confirmed; the device signs it at finalize. */
|
|
75
|
+
targetIdentityId: string | null;
|
|
76
|
+
receipt: DeviceRebindReceipt | null;
|
|
77
|
+
};
|
|
78
|
+
/** What the signed device steps need: no OIDC client or browser CSRF key. */
|
|
79
|
+
export interface DeviceRebindDeviceDependencies {
|
|
80
|
+
backend: AuthLinkBackend;
|
|
81
|
+
/** Store settings of the enabled browser-auth configuration. */
|
|
82
|
+
config: CoordinatorAuthBrowserConfig;
|
|
83
|
+
publicOrigin: string;
|
|
84
|
+
limiter: InMemoryRequestRateLimiter;
|
|
85
|
+
now(): number;
|
|
86
|
+
}
|
|
87
|
+
export interface DeviceRebindDependencies extends DeviceRebindDeviceDependencies {
|
|
88
|
+
csrfKey: BrowserCsrfKey;
|
|
89
|
+
client: Pick<CoordinatorOidcClient, "createAuthorizationRequest" | "verifyCallback">;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The browser and device ceremony for ADR 0005 Section 8 rebinding. Every
|
|
93
|
+
* step re-checks live authority in its winning statement; pre-reads only pick
|
|
94
|
+
* the refusal reason shown to the person.
|
|
95
|
+
*/
|
|
96
|
+
export declare function createDeviceRebindCeremony(deps: DeviceRebindDependencies): Readonly<{
|
|
97
|
+
claimBrowser: (request: Request, clientKey: string) => Promise<DeviceRebindResult | null>;
|
|
98
|
+
verifyCallback: (request: Request) => Promise<DeviceRebindResult | null>;
|
|
99
|
+
confirm: (request: Request, clientKey: string, commitment: string) => Promise<DeviceRebindResult | null>;
|
|
100
|
+
start: (input: DeviceRebindStart, clientKey: string) => Promise<DeviceRebindResult | null>;
|
|
101
|
+
finalize: (input: {
|
|
102
|
+
attemptId: string;
|
|
103
|
+
signer: DeviceRebindSigner;
|
|
104
|
+
completionSecret: string;
|
|
105
|
+
signature: string;
|
|
106
|
+
}) => Promise<DeviceRebindResult | null>;
|
|
107
|
+
status: (input: {
|
|
108
|
+
attemptId: string;
|
|
109
|
+
signer: DeviceRebindSigner;
|
|
110
|
+
}) => Promise<DeviceRebindResult | null>;
|
|
111
|
+
}>;
|
|
112
|
+
/** The steps a signed device request drives: start, status, and finalize. */
|
|
113
|
+
export declare function createDeviceRebindDeviceSteps(deps: DeviceRebindDeviceDependencies): Readonly<{
|
|
114
|
+
start: (input: DeviceRebindStart, clientKey: string) => Promise<DeviceRebindResult | null>;
|
|
115
|
+
finalize: (input: {
|
|
116
|
+
attemptId: string;
|
|
117
|
+
signer: DeviceRebindSigner;
|
|
118
|
+
completionSecret: string;
|
|
119
|
+
signature: string;
|
|
120
|
+
}) => Promise<DeviceRebindResult | null>;
|
|
121
|
+
status: (input: {
|
|
122
|
+
attemptId: string;
|
|
123
|
+
signer: DeviceRebindSigner;
|
|
124
|
+
}) => Promise<DeviceRebindResult | null>;
|
|
125
|
+
}>;
|
|
126
|
+
//# sourceMappingURL=coordinator-device-rebind-ceremony.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-rebind-ceremony.d.ts","sourceRoot":"","sources":["../src/coordinator-device-rebind-ceremony.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAC;AAEvG,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,4BAA4B,CAAC;AAgBrF,OAAO,EACN,KAAK,cAAc,EAGnB,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EAGN,KAAK,mBAAmB,EAGxB,MAAM,uCAAuC,CAAC;AAO/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,MAA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MAAM;gBACT,kBAAkB;0BACR,MAAM;mBACb,MAAM;UAnhBS,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;;mBAulBJ,MAAM;gBAAU,kBAAkB;UAvlBhE,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;GAsB7D;AAED,6EAA6E;AAC7E,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,8BAA8B;4DAzBtD,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;;mBAghBjD,MAAM;gBACT,kBAAkB;0BACR,MAAM;mBACb,MAAM;UAnhBS,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;;mBAulBJ,MAAM;gBAAU,kBAAkB;UAvlBhE,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;GA2B7D"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
declare const REFUSALS: readonly ["unavailable", "current_identity_linked", "device_already_bound", "account_not_linked", "already_this_identity", "daily_limit", "retry"];
|
|
2
|
+
export type DeviceRebindClientRefusal = (typeof REFUSALS)[number];
|
|
3
|
+
export interface DeviceRebindReceiptV1 {
|
|
4
|
+
attemptId: string;
|
|
5
|
+
bindingId: string;
|
|
6
|
+
deviceId: string;
|
|
7
|
+
previousIdentityId: string;
|
|
8
|
+
targetIdentityId: string;
|
|
9
|
+
enrollmentCount: number;
|
|
10
|
+
finalizedAtMs: number;
|
|
11
|
+
}
|
|
12
|
+
/** What the caller must store durably before finalize, to resume by status. */
|
|
13
|
+
export interface DeviceRebindPending {
|
|
14
|
+
attemptId: string;
|
|
15
|
+
coordinatorOrigin: string;
|
|
16
|
+
groupId: string;
|
|
17
|
+
deviceId: string;
|
|
18
|
+
previousIdentityId: string;
|
|
19
|
+
targetIdentityId: string;
|
|
20
|
+
reviewDigest: string;
|
|
21
|
+
expiresAtMs: number;
|
|
22
|
+
}
|
|
23
|
+
export type DeviceRebindOutcome = {
|
|
24
|
+
kind: "finalized";
|
|
25
|
+
receipt: DeviceRebindReceiptV1;
|
|
26
|
+
}
|
|
27
|
+
/** `beforeBrowser`: the coordinator refused the start, so no Google trip happened. */
|
|
28
|
+
| {
|
|
29
|
+
kind: "refused";
|
|
30
|
+
reason: DeviceRebindClientRefusal;
|
|
31
|
+
beforeBrowser?: true;
|
|
32
|
+
}
|
|
33
|
+
/** Nothing was committed; the person may start again. */
|
|
34
|
+
| {
|
|
35
|
+
kind: "failed";
|
|
36
|
+
error: "device_unavailable" | "request_failed" | "browser_stopped";
|
|
37
|
+
}
|
|
38
|
+
/** Finalize may have committed; resolve with resumeDeviceRebind. */
|
|
39
|
+
| {
|
|
40
|
+
kind: "unknown";
|
|
41
|
+
pending: DeviceRebindPending;
|
|
42
|
+
};
|
|
43
|
+
export interface DeviceRebindOptions {
|
|
44
|
+
dbPath: string;
|
|
45
|
+
keysDir?: string;
|
|
46
|
+
coordinatorUrl: string;
|
|
47
|
+
groupId: string;
|
|
48
|
+
/** The device's current Identity, which the coordinator checks against its enrollments. */
|
|
49
|
+
currentIdentityId: string;
|
|
50
|
+
/** SHA-256 hex of the device's local review; it is pinned and signed. */
|
|
51
|
+
reviewDigest: string;
|
|
52
|
+
openBrowser(url: string): void | Promise<void>;
|
|
53
|
+
/** Must persist durably; a throw stops the rebind before finalize. */
|
|
54
|
+
recordPending(pending: DeviceRebindPending): void | Promise<void>;
|
|
55
|
+
fetch?: typeof globalThis.fetch;
|
|
56
|
+
signal?: AbortSignal;
|
|
57
|
+
}
|
|
58
|
+
export declare function runDeviceRebind(options: DeviceRebindOptions): Promise<DeviceRebindOutcome>;
|
|
59
|
+
export interface ResumeOptions {
|
|
60
|
+
dbPath: string;
|
|
61
|
+
keysDir?: string;
|
|
62
|
+
coordinatorUrl: string;
|
|
63
|
+
groupId: string;
|
|
64
|
+
pending: DeviceRebindPending;
|
|
65
|
+
fetch?: typeof globalThis.fetch;
|
|
66
|
+
signal?: AbortSignal;
|
|
67
|
+
now?: () => number;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Reads the recorded attempt. `not_committed` only once the attempt can no
|
|
71
|
+
* longer finalize; otherwise an unclear answer stays `unknown`.
|
|
72
|
+
*/
|
|
73
|
+
export declare function resumeDeviceRebind(options: ResumeOptions): Promise<{
|
|
74
|
+
kind: "finalized";
|
|
75
|
+
receipt: DeviceRebindReceiptV1;
|
|
76
|
+
} | {
|
|
77
|
+
kind: "not_committed";
|
|
78
|
+
} | {
|
|
79
|
+
kind: "unknown";
|
|
80
|
+
}>;
|
|
81
|
+
export {};
|
|
82
|
+
//# sourceMappingURL=coordinator-device-rebind-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-rebind-client.d.ts","sourceRoot":"","sources":["../src/coordinator-device-rebind-client.ts"],"names":[],"mappings":"AAuCA,QAAA,MAAM,QAAQ,YACb,aAAa,EACb,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,aAAa,EACb,OAAO,CACE,CAAC;AACX,MAAM,MAAM,yBAAyB,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,MAAM,WAAW,qBAAqB;IACrC,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;AAED,+EAA+E;AAC/E,MAAM,WAAW,mBAAmB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CA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AE,mBAAmB,CAAC;IAC7B,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAChC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACvC,OAAO,EAAE,aAAa,GACpB,OAAO,CACP;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,qBAAqB,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,GACzB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CACrB,CAwBA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { AuthLinkBackend } from "./coordinator-auth-link.js";
|
|
2
|
+
/** Finalized rebinds allowed per target Identity in any 24 hours (ADR 0005 Section 8). */
|
|
3
|
+
export declare const DEVICE_REBIND_DAILY_LIMIT = 3;
|
|
4
|
+
export type DeviceRebindReceipt = {
|
|
5
|
+
kind: "finalized";
|
|
6
|
+
attemptId: string;
|
|
7
|
+
bindingId: string;
|
|
8
|
+
deviceId: string;
|
|
9
|
+
previousIdentityId: string;
|
|
10
|
+
targetIdentityId: string;
|
|
11
|
+
enrollmentCount: number;
|
|
12
|
+
finalizedAtMs: number;
|
|
13
|
+
};
|
|
14
|
+
export type DeviceRebindCommitResult = {
|
|
15
|
+
kind: "committed";
|
|
16
|
+
receipt: DeviceRebindReceipt;
|
|
17
|
+
} | {
|
|
18
|
+
kind: "prior_commit";
|
|
19
|
+
receipt: DeviceRebindReceipt;
|
|
20
|
+
} | {
|
|
21
|
+
kind: "refused";
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* This device has no proof of its own for its current Identity, as account
|
|
25
|
+
* changes select it: no claim for this device and key in a live Team, and no
|
|
26
|
+
* active attestation for this key in a live Team it is still enrolled in (a binding
|
|
27
|
+
* already blocks every attempt). Only such a device may self-bind, getting a
|
|
28
|
+
* binding for the Identity it already uses.
|
|
29
|
+
*/
|
|
30
|
+
export declare const NO_OWN_PROOF_SQL = "NOT EXISTS (SELECT 1 FROM coordinator_auth_device_claims d\n WHERE d.coordinator_id = a.coordinator_id AND d.identity_id = a.current_identity_id\n AND d.device_id = a.device_id AND d.key_id = a.key_id\n AND EXISTS (SELECT 1 FROM groups g WHERE g.group_id = d.group_id AND g.archived_at IS NULL))\n AND NOT EXISTS (SELECT 1 FROM coordinator_auth_controller_attestations t\n JOIN enrolled_devices e ON e.group_id = t.group_id AND e.device_id = t.device_id\n AND e.public_key = t.public_key AND e.fingerprint = t.fingerprint AND e.enabled = 1\n AND (e.identity_id IS NULL OR e.identity_id = t.identity_id)\n JOIN groups g ON g.group_id = t.group_id AND g.archived_at IS NULL\n WHERE t.coordinator_id = a.coordinator_id AND t.identity_id = a.current_identity_id\n AND t.device_id = a.device_id AND t.public_key = a.public_key AND t.fingerprint = a.fingerprint\n AND t.revoked_at IS NULL)";
|
|
31
|
+
/**
|
|
32
|
+
* Reads a finalized rebind from records that never change: the finalized
|
|
33
|
+
* attempt, its binding, and its audit event. Enrollments are not consulted,
|
|
34
|
+
* because an admin may change them after the commit. Resolves an unknown commit outcome
|
|
35
|
+
* without retrying the write. Null means "not committed as recorded".
|
|
36
|
+
*/
|
|
37
|
+
export declare function readDeviceRebindReceipt(backend: AuthLinkBackend, coordinatorId: string, attemptId: string): Promise<DeviceRebindReceipt | null>;
|
|
38
|
+
interface DeviceRebindCommitInput {
|
|
39
|
+
backend: AuthLinkBackend;
|
|
40
|
+
coordinatorId: string;
|
|
41
|
+
attemptId: string;
|
|
42
|
+
/** Trusted current auth config revision, never a client value. */
|
|
43
|
+
revision: string;
|
|
44
|
+
now: number;
|
|
45
|
+
completionSecret: string;
|
|
46
|
+
signature: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* One atomic commit: finalize the attempt, write the immutable ownership
|
|
50
|
+
* binding, move every enrollment of the device key to the target Identity, and
|
|
51
|
+
* record the audit event. Team memberships and grants are untouched. An exact
|
|
52
|
+
* retry of an already finalized attempt returns its receipt; anything else
|
|
53
|
+
* writes nothing. SQL errors propagate so an unknown outcome is never reported
|
|
54
|
+
* as a refusal; callers resolve it with readDeviceRebindReceipt.
|
|
55
|
+
*/
|
|
56
|
+
export declare function commitDeviceRebind(input: DeviceRebindCommitInput): Promise<DeviceRebindCommitResult>;
|
|
57
|
+
export {};
|
|
58
|
+
//# sourceMappingURL=coordinator-device-rebind-commit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-rebind-commit.d.ts","sourceRoot":"","sources":["../src/coordinator-device-rebind-commit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,4BAA4B,CAAC;AAcrF,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;AA0M5B;;;;;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,CAyBnC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Signed device routes for ADR 0005 Section 8 rebinding: start, status, finalize. */
|
|
2
|
+
import type { Hono } from "hono";
|
|
3
|
+
import type { registerCoordinatorDeviceAuthLinkRoutes } from "./coordinator-device-auth-link.js";
|
|
4
|
+
type LinkDeps = Parameters<typeof registerCoordinatorDeviceAuthLinkRoutes>[1];
|
|
5
|
+
export declare const DEVICE_REBIND_ATTEMPTS_PATH = "/v1/auth/rebind-attempts";
|
|
6
|
+
/** Signed admission runs before any rebind storage is touched. */
|
|
7
|
+
export declare function registerCoordinatorDeviceRebindRoutes(app: Hono, deps: LinkDeps & {
|
|
8
|
+
now?: () => number;
|
|
9
|
+
}): void;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=coordinator-device-rebind-http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-rebind-http.d.ts","sourceRoot":"","sources":["../src/coordinator-device-rebind-http.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,MAAM,CAAC;AAG1C,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,mCAAmC,CAAC;AAYjG,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,uCAAuC,CAAC,CAAC,CAAC,CAAC,CAAC;AAM9E,eAAO,MAAM,2BAA2B,6BAA6B,CAAC;AA2MtE,kEAAkE;AAClE,wBAAgB,qCAAqC,CACpD,GAAG,EAAE,IAAI,EACT,IAAI,EAAE,QAAQ,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CAAE,GACrC,IAAI,CASN"}
|