@codemem/core 0.48.1 → 0.49.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/better-sqlite-coordinator-store.d.ts.map +1 -1
- package/dist/coordinator-account-connection-link.d.ts +1 -1
- package/dist/coordinator-account-connection-link.d.ts.map +1 -1
- package/dist/coordinator-account-connection-schema.d.ts +1 -1
- package/dist/coordinator-account-link-status-client.d.ts +4 -0
- package/dist/coordinator-account-link-status-client.d.ts.map +1 -1
- package/dist/coordinator-api.d.ts.map +1 -1
- package/dist/coordinator-auth-device-claim-eligibility.d.ts +12 -1
- 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-link.d.ts +1 -0
- package/dist/coordinator-auth-link.d.ts.map +1 -1
- package/dist/coordinator-device-claim-binding-contract.d.ts +37 -0
- package/dist/coordinator-device-claim-binding-contract.d.ts.map +1 -0
- package/dist/coordinator-device-claim-binding-reuse.d.ts +21 -0
- package/dist/coordinator-device-claim-binding-reuse.d.ts.map +1 -0
- package/dist/coordinator-device-claim-binding-sql.d.ts +32 -0
- package/dist/coordinator-device-claim-binding-sql.d.ts.map +1 -0
- package/dist/coordinator-device-claim-binding.d.ts +21 -0
- package/dist/coordinator-device-claim-binding.d.ts.map +1 -0
- package/dist/coordinator-device-rebind-browser.d.ts +1 -1
- package/dist/coordinator-device-rebind-ceremony.d.ts.map +1 -1
- package/dist/coordinator-device-rebind-commit.d.ts.map +1 -1
- package/dist/coordinator-device-rebind-proof.d.ts +1 -0
- package/dist/coordinator-device-rebind-proof.d.ts.map +1 -1
- package/dist/coordinator-device-rebind-schema.d.ts +4 -3
- package/dist/coordinator-device-rebind-schema.d.ts.map +1 -1
- package/dist/coordinator-device-self-bind-authority.d.ts +20 -0
- package/dist/coordinator-device-self-bind-authority.d.ts.map +1 -0
- package/dist/coordinator-device-self-bind-test-fixtures.d.ts +103 -0
- package/dist/coordinator-device-self-bind-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-device-setup-client.d.ts +26 -0
- package/dist/coordinator-device-setup-client.d.ts.map +1 -0
- package/dist/coordinator-device-setup-http.d.ts +9 -0
- package/dist/coordinator-device-setup-http.d.ts.map +1 -0
- package/dist/{coordinator-runtime-DjVICtRs.js → coordinator-runtime-kbPwxxKq.js} +164 -163
- package/dist/{coordinator-runtime-DjVICtRs.js.map → coordinator-runtime-kbPwxxKq.js.map} +1 -1
- package/dist/db.d.ts.map +1 -1
- package/dist/feed-contract.d.ts +59 -0
- package/dist/feed-contract.d.ts.map +1 -0
- package/dist/feed-contract.js +187 -0
- package/dist/feed-contract.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7823 -7641
- package/dist/index.js.map +1 -1
- package/dist/ingest-events.d.ts.map +1 -1
- package/dist/ingest-pipeline.d.ts +38 -2
- package/dist/ingest-pipeline.d.ts.map +1 -1
- package/dist/internal/cloudflare-coordinator.js +1022 -1021
- package/dist/internal/cloudflare-coordinator.js.map +1 -1
- package/dist/internal/relay-runtime.js +36 -36
- package/dist/linked-legacy-setup-test-fixtures.d.ts +69 -0
- package/dist/linked-legacy-setup-test-fixtures.d.ts.map +1 -0
- package/dist/operational-status.d.ts +3 -0
- package/dist/operational-status.d.ts.map +1 -1
- package/dist/{owner-enrollment-start-DFVkODlJ.js → owner-enrollment-start-BtoRKf3z.js} +2871 -2656
- package/dist/owner-enrollment-start-BtoRKf3z.js.map +1 -0
- package/dist/owner-qualified-consumer-access-test-harness.d.ts.map +1 -1
- package/dist/owner-qualified-consumer-adversarial-test-harness.d.ts +1 -1
- package/dist/owner-qualified-consumer-adversarial-test-harness.d.ts.map +1 -1
- package/dist/owner-qualified-consumer-test-harness.d.ts +3 -0
- package/dist/owner-qualified-consumer-test-harness.d.ts.map +1 -1
- package/dist/owner-qualified-headless-test-harness.d.ts +1 -1
- package/dist/owner-qualified-headless-test-harness.d.ts.map +1 -1
- package/dist/project-scope-settings.d.ts.map +1 -1
- package/dist/raw-event-flush.d.ts.map +1 -1
- package/dist/raw-event-ingest.d.ts.map +1 -1
- package/dist/{relay-health-DhxMrW_S.js → relay-health-zrKtNQLQ.js} +16 -16
- package/dist/{relay-health-DhxMrW_S.js.map → relay-health-zrKtNQLQ.js.map} +1 -1
- package/dist/{relay-peer-client-CpY-lVbi.js → relay-peer-client-0XpekgnZ.js} +4446 -1978
- package/dist/relay-peer-client-0XpekgnZ.js.map +1 -0
- package/dist/schema-bootstrap.d.ts.map +1 -1
- package/dist/scope-membership-cache-read-B6z47l2W.js +4114 -0
- package/dist/scope-membership-cache-read-B6z47l2W.js.map +1 -0
- package/dist/scope-membership-cache-read.d.ts +60 -0
- package/dist/scope-membership-cache-read.d.ts.map +1 -0
- package/dist/scope-membership-cache.d.ts +2 -57
- package/dist/scope-membership-cache.d.ts.map +1 -1
- package/dist/scope-membership-semantics-B8qXaMqx.js +205 -0
- package/dist/scope-membership-semantics-B8qXaMqx.js.map +1 -0
- package/dist/semantic-worker-entry.js +1 -1
- package/dist/{semantic-worker-job-BmwXMG7v.js → semantic-worker-job-CMjFE5cp.js} +3 -3
- package/dist/{semantic-worker-job-BmwXMG7v.js.map → semantic-worker-job-CMjFE5cp.js.map} +1 -1
- package/dist/{semantic-worker-ranking-D31rfYAT.js → semantic-worker-ranking-it8Zs3qb.js} +18 -18
- package/dist/{semantic-worker-ranking-D31rfYAT.js.map → semantic-worker-ranking-it8Zs3qb.js.map} +1 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/{sync-auth-constants-Cb8-a8lE.js → sync-auth-constants-DvALG0T0.js} +3099 -2874
- package/dist/sync-auth-constants-DvALG0T0.js.map +1 -0
- package/dist/sync-reachability-pass-Bi4GBi-x.js +2 -0
- package/dist/{sync-reachability-pass-EOj3hEau.js → sync-reachability-pass-BpDt2z4y.js} +2466 -2565
- package/dist/sync-reachability-pass-BpDt2z4y.js.map +1 -0
- package/dist/sync-status-indexes.d.ts +4 -0
- package/dist/sync-status-indexes.d.ts.map +1 -0
- package/dist/{validated-vector-index-audit-OuQct6jU.js → validated-vector-index-audit-B64yhEBF.js} +50 -50
- package/dist/validated-vector-index-audit-B64yhEBF.js.map +1 -0
- package/dist/vector-backfill-queue.d.ts +6 -0
- package/dist/vector-backfill-queue.d.ts.map +1 -1
- package/dist/vector-cutover-validation.d.ts +1 -0
- package/dist/vector-cutover-validation.d.ts.map +1 -1
- package/dist/vector-migration.d.ts +1 -0
- package/dist/vector-migration.d.ts.map +1 -1
- package/dist/vectors.d.ts +8 -2
- package/dist/vectors.d.ts.map +1 -1
- package/package.json +9 -4
- package/dist/owner-enrollment-start-DFVkODlJ.js.map +0 -1
- package/dist/relay-admission-proof-DjvC-e6G.js +0 -78
- package/dist/relay-admission-proof-DjvC-e6G.js.map +0 -1
- package/dist/relay-peer-client-CpY-lVbi.js.map +0 -1
- package/dist/scope-membership-cache-ByHJl5gt.js +0 -6549
- package/dist/scope-membership-cache-ByHJl5gt.js.map +0 -1
- package/dist/sync-auth-constants-Cb8-a8lE.js.map +0 -1
- package/dist/sync-reachability-pass-C6SYfltg.js +0 -2
- package/dist/sync-reachability-pass-EOj3hEau.js.map +0 -1
- package/dist/validated-vector-index-audit-OuQct6jU.js.map +0 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import Database from "better-sqlite3";
|
|
2
|
+
import type { AuthLinkBackend } from "./coordinator-auth-link.js";
|
|
3
|
+
import { type Backend } from "./coordinator-auth-store-test-fixtures.js";
|
|
4
|
+
import { type DeviceRebindAttempt } from "./coordinator-device-rebind-proof.js";
|
|
5
|
+
export declare const SELF_BIND_NOW = 1791028800000;
|
|
6
|
+
/** Original pre-upgrade account genesis, with an independent own controller review.
|
|
7
|
+
* Peer-origin links intentionally have no relationship to that own review.
|
|
8
|
+
*/
|
|
9
|
+
export type SelfBindLinkOrigin = "own" | "peer" | "peer_controller";
|
|
10
|
+
export declare function selfBindFixture(kind: Backend, origin?: SelfBindLinkOrigin, identityId?: string): Promise<{
|
|
11
|
+
store: import("./coordinator-auth-store-test-fixtures.js").Store;
|
|
12
|
+
db: Database.Database;
|
|
13
|
+
own: {
|
|
14
|
+
publicKey: string;
|
|
15
|
+
sign: (message: string) => string;
|
|
16
|
+
};
|
|
17
|
+
signer: {
|
|
18
|
+
groupId: string;
|
|
19
|
+
deviceId: string;
|
|
20
|
+
publicKey: string;
|
|
21
|
+
fingerprint: string;
|
|
22
|
+
};
|
|
23
|
+
identityId: string;
|
|
24
|
+
config: {
|
|
25
|
+
coordinatorId: string;
|
|
26
|
+
issuer: string;
|
|
27
|
+
revision: string;
|
|
28
|
+
enabled: boolean;
|
|
29
|
+
redirectUri: string;
|
|
30
|
+
clientId: string;
|
|
31
|
+
clientSecret: string;
|
|
32
|
+
};
|
|
33
|
+
pins: import("./coordinator-auth-historical-test-fixture.js").HistoricalAccountPins;
|
|
34
|
+
backend: AuthLinkBackend;
|
|
35
|
+
account: {
|
|
36
|
+
issuer: string;
|
|
37
|
+
subject: string;
|
|
38
|
+
ok: boolean;
|
|
39
|
+
};
|
|
40
|
+
input: {
|
|
41
|
+
signer: {
|
|
42
|
+
groupId: string;
|
|
43
|
+
deviceId: string;
|
|
44
|
+
publicKey: string;
|
|
45
|
+
fingerprint: string;
|
|
46
|
+
};
|
|
47
|
+
attemptId: string;
|
|
48
|
+
currentIdentityId: string;
|
|
49
|
+
browserStartHash: string;
|
|
50
|
+
reviewDigest: string;
|
|
51
|
+
loopbackRedirect: string;
|
|
52
|
+
};
|
|
53
|
+
steps: (c?: Readonly<{
|
|
54
|
+
claimBrowser: (request: Request, clientKey: string) => Promise<import("./coordinator-device-rebind-ceremony.js").DeviceRebindResult | null>;
|
|
55
|
+
verifyCallback: (request: Request) => Promise<import("./coordinator-device-rebind-ceremony.js").DeviceRebindResult | null>;
|
|
56
|
+
confirm: (request: Request, clientKey: string, commitment: string) => Promise<import("./coordinator-device-rebind-ceremony.js").DeviceRebindResult | null>;
|
|
57
|
+
start: (input: import("./coordinator-device-rebind-ceremony.js").DeviceRebindStart, clientKey: string) => Promise<import("./coordinator-device-rebind-ceremony.js").DeviceRebindResult | null>;
|
|
58
|
+
finalize: (input: {
|
|
59
|
+
attemptId: string;
|
|
60
|
+
signer: import("./coordinator-device-rebind-ceremony.js").DeviceRebindSigner;
|
|
61
|
+
completionSecret: string;
|
|
62
|
+
signature: string;
|
|
63
|
+
}) => Promise<import("./coordinator-device-rebind-ceremony.js").DeviceRebindResult | null>;
|
|
64
|
+
status: (input: {
|
|
65
|
+
attemptId: string;
|
|
66
|
+
signer: import("./coordinator-device-rebind-ceremony.js").DeviceRebindSigner;
|
|
67
|
+
}) => Promise<import("./coordinator-device-rebind-ceremony.js").DeviceRebindResult | null>;
|
|
68
|
+
}>) => {
|
|
69
|
+
start: () => Promise<import("./coordinator-device-rebind-ceremony.js").DeviceRebindResult | null>;
|
|
70
|
+
claim: () => Promise<import("./coordinator-device-rebind-ceremony.js").DeviceRebindResult | null>;
|
|
71
|
+
verify: () => Promise<import("./coordinator-device-rebind-ceremony.js").DeviceRebindResult | null>;
|
|
72
|
+
confirm: () => Promise<import("./coordinator-device-rebind-ceremony.js").DeviceRebindResult | null>;
|
|
73
|
+
};
|
|
74
|
+
makeCeremony: (backend: AuthLinkBackend) => Readonly<{
|
|
75
|
+
claimBrowser: (request: Request, clientKey: string) => Promise<import("./coordinator-device-rebind-ceremony.js").DeviceRebindResult | null>;
|
|
76
|
+
verifyCallback: (request: Request) => Promise<import("./coordinator-device-rebind-ceremony.js").DeviceRebindResult | null>;
|
|
77
|
+
confirm: (request: Request, clientKey: string, commitment: string) => Promise<import("./coordinator-device-rebind-ceremony.js").DeviceRebindResult | null>;
|
|
78
|
+
start: (input: import("./coordinator-device-rebind-ceremony.js").DeviceRebindStart, clientKey: string) => Promise<import("./coordinator-device-rebind-ceremony.js").DeviceRebindResult | null>;
|
|
79
|
+
finalize: (input: {
|
|
80
|
+
attemptId: string;
|
|
81
|
+
signer: import("./coordinator-device-rebind-ceremony.js").DeviceRebindSigner;
|
|
82
|
+
completionSecret: string;
|
|
83
|
+
signature: string;
|
|
84
|
+
}) => Promise<import("./coordinator-device-rebind-ceremony.js").DeviceRebindResult | null>;
|
|
85
|
+
status: (input: {
|
|
86
|
+
attemptId: string;
|
|
87
|
+
signer: import("./coordinator-device-rebind-ceremony.js").DeviceRebindSigner;
|
|
88
|
+
}) => Promise<import("./coordinator-device-rebind-ceremony.js").DeviceRebindResult | null>;
|
|
89
|
+
}>;
|
|
90
|
+
finalizedInput: (row: DeviceRebindAttempt, secret: string) => {
|
|
91
|
+
attemptId: string;
|
|
92
|
+
signer: {
|
|
93
|
+
groupId: string;
|
|
94
|
+
deviceId: string;
|
|
95
|
+
publicKey: string;
|
|
96
|
+
fingerprint: string;
|
|
97
|
+
};
|
|
98
|
+
completionSecret: string;
|
|
99
|
+
signature: string;
|
|
100
|
+
};
|
|
101
|
+
close: () => Promise<void>;
|
|
102
|
+
}>;
|
|
103
|
+
//# sourceMappingURL=coordinator-device-self-bind-test-fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-self-bind-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-device-self-bind-test-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EACN,KAAK,OAAO,EAIZ,MAAM,2CAA2C,CAAC;AAInD,OAAO,EACN,KAAK,mBAAmB,EAExB,MAAM,sCAAsC,CAAC;AAM9C,eAAO,MAAM,aAAa,gBAAoB,CAAC;AAU/C;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,MAAM,GAAG,iBAAiB,CAAC;AA+HpE,wBAAsB,eAAe,CACpC,IAAI,EAAE,OAAO,EACb,MAAM,GAAE,kBAA0B,EAClC,UAAU,SAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAQE,eAAe;;;;;;;;;;;;;;;;0BA8BjB,mBAAmB,UAAU,MAAM;;;;;;;;;;;;GAmBhE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface CoordinatorDeviceSetupOptions {
|
|
2
|
+
dbPath: string;
|
|
3
|
+
keysDir?: string;
|
|
4
|
+
coordinatorUrl: string;
|
|
5
|
+
groupId: string;
|
|
6
|
+
currentIdentityId: string;
|
|
7
|
+
fetch?: typeof globalThis.fetch;
|
|
8
|
+
signal?: AbortSignal;
|
|
9
|
+
}
|
|
10
|
+
export type CoordinatorDeviceSetupOutcome = {
|
|
11
|
+
kind: "ready" | "complete" | "requires_review" | "connect_required";
|
|
12
|
+
} | {
|
|
13
|
+
kind: "unsupported";
|
|
14
|
+
cause: "coordinator_upgrade_required";
|
|
15
|
+
} | {
|
|
16
|
+
kind: "unknown";
|
|
17
|
+
cause: "completion_outcome_unknown";
|
|
18
|
+
} | {
|
|
19
|
+
kind: "unavailable";
|
|
20
|
+
cause: "device_unavailable" | "invalid_input" | "coordinator_unreachable" | "invalid_response" | "coordinator_rejected" | "rate_limited" | "coordinator_auth_schema_upgrade_required" | "coordinator_unavailable";
|
|
21
|
+
};
|
|
22
|
+
/** Read status once without attempting completion or changing local state. */
|
|
23
|
+
export declare function readCoordinatorDeviceSetup(options: CoordinatorDeviceSetupOptions): Promise<CoordinatorDeviceSetupOutcome>;
|
|
24
|
+
/** Complete directly. Resolve an ambiguous POST with one GET, never a POST retry. */
|
|
25
|
+
export declare function completeCoordinatorDeviceSetup(options: CoordinatorDeviceSetupOptions): Promise<CoordinatorDeviceSetupOutcome>;
|
|
26
|
+
//# sourceMappingURL=coordinator-device-setup-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-setup-client.d.ts","sourceRoot":"","sources":["../src/coordinator-device-setup-client.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,6BAA6B;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAChC,MAAM,CAAC,EAAE,WAAW,CAAC;CACrB;AACD,MAAM,MAAM,6BAA6B,GACtC;IAAE,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,iBAAiB,GAAG,kBAAkB,CAAA;CAAE,GACvE;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,KAAK,EAAE,8BAA8B,CAAA;CAAE,GAC9D;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,4BAA4B,CAAA;CAAE,GACxD;IACA,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EACF,oBAAoB,GACpB,eAAe,GACf,yBAAyB,GACzB,kBAAkB,GAClB,sBAAsB,GACtB,cAAc,GACd,0CAA0C,GAC1C,yBAAyB,CAAC;CAC5B,CAAC;AAmKL,8EAA8E;AAC9E,wBAAgB,0BAA0B,CACzC,OAAO,EAAE,6BAA6B,GACpC,OAAO,CAAC,6BAA6B,CAAC,CAExC;AAED,qFAAqF;AACrF,wBAAgB,8BAA8B,CAC7C,OAAO,EAAE,6BAA6B,GACpC,OAAO,CAAC,6BAA6B,CAAC,CAExC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Same-Identity completion derives authority from a committed own-device claim. */
|
|
2
|
+
import type { Hono } from "hono";
|
|
3
|
+
import { type DeviceAuthLinkDeps } from "./coordinator-device-auth-link.js";
|
|
4
|
+
export declare const DEVICE_BINDING_PATH = "/v1/auth/device-binding";
|
|
5
|
+
/** Uses the maintained signed admission, including nonce/revocation checks. */
|
|
6
|
+
export declare function registerCoordinatorDeviceSetupRoutes(app: Hono, deps: DeviceAuthLinkDeps & {
|
|
7
|
+
now?: () => number;
|
|
8
|
+
}): void;
|
|
9
|
+
//# sourceMappingURL=coordinator-device-setup-http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-setup-http.d.ts","sourceRoot":"","sources":["../src/coordinator-device-setup-http.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,EACN,KAAK,kBAAkB,EAGvB,MAAM,mCAAmC,CAAC;AAO3C,eAAO,MAAM,mBAAmB,4BAA4B,CAAC;AAmE7D,+EAA+E;AAC/E,wBAAgB,oCAAoC,CACnD,GAAG,EAAE,IAAI,EACT,IAAI,EAAE,kBAAkB,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CAAE,GAC/C,IAAI,CAeN"}
|