@getcirrus/space-conformance 0.0.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.
Files changed (49) hide show
  1. package/dist/base-D8a-ZK57.d.ts +249 -0
  2. package/dist/base-D8a-ZK57.d.ts.map +1 -0
  3. package/dist/cli.d.ts +1 -0
  4. package/dist/cli.js +373 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/coverage-DhJZu8P8.js +1914 -0
  7. package/dist/coverage-DhJZu8P8.js.map +1 -0
  8. package/dist/full-D4ufJLcw.js +409 -0
  9. package/dist/full-D4ufJLcw.js.map +1 -0
  10. package/dist/full.d.ts +59 -0
  11. package/dist/full.d.ts.map +1 -0
  12. package/dist/full.js +4 -0
  13. package/dist/index.d.ts +178 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +114 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/operator-BErXCDow.js +923 -0
  18. package/dist/operator-BErXCDow.js.map +1 -0
  19. package/lexicons/MANIFEST.json +7 -0
  20. package/lexicons/simplespace/addMember.json +37 -0
  21. package/lexicons/simplespace/checkUserAccess.json +43 -0
  22. package/lexicons/simplespace/createSpace.json +74 -0
  23. package/lexicons/simplespace/defs.json +47 -0
  24. package/lexicons/simplespace/deleteSpace.json +32 -0
  25. package/lexicons/simplespace/getSpace.json +53 -0
  26. package/lexicons/simplespace/listMembers.json +65 -0
  27. package/lexicons/simplespace/removeMember.json +37 -0
  28. package/lexicons/simplespace/updateSpace.json +57 -0
  29. package/lexicons/space/applyWrites.json +163 -0
  30. package/lexicons/space/createRecord.json +79 -0
  31. package/lexicons/space/defs.json +38 -0
  32. package/lexicons/space/deleteRecord.json +51 -0
  33. package/lexicons/space/getBlob.json +54 -0
  34. package/lexicons/space/getDelegationToken.json +34 -0
  35. package/lexicons/space/getLatestCommit.json +57 -0
  36. package/lexicons/space/getRecord.json +76 -0
  37. package/lexicons/space/getRepo.json +41 -0
  38. package/lexicons/space/getSpaceCredential.json +67 -0
  39. package/lexicons/space/listBlobs.json +59 -0
  40. package/lexicons/space/listRecords.json +108 -0
  41. package/lexicons/space/listRepoOps.json +111 -0
  42. package/lexicons/space/listRepos.json +75 -0
  43. package/lexicons/space/listSpaces.json +65 -0
  44. package/lexicons/space/notifySpaceDeleted.json +24 -0
  45. package/lexicons/space/notifyWrite.json +38 -0
  46. package/lexicons/space/putRecord.json +75 -0
  47. package/lexicons/space/registerNotify.json +49 -0
  48. package/lexicons/space/unregisterNotify.json +29 -0
  49. package/package.json +53 -0
@@ -0,0 +1,178 @@
1
+ import { A as Tier, C as Citation, D as InboxDelivery, E as IdentityProvider, M as pass, O as SyncerInbox, S as CheckStatus, T as HarnessIdentity, _ as Capability, a as credentialGet, b as CheckOutcome, c as operatorChecks, d as operatorHeaders, f as xrpcGet, g as createDpopProofJwt, h as createDpopKey, i as createProbeSpace, j as fail, k as Target, l as operatorCreateRecord, m as xrpcUrl, n as Credential, o as deleteProbeSpace, p as xrpcPost, r as ProbeSpace, s as obtainCredentialViaDelegation, t as baseChecks, u as XrpcResult, v as Check, w as DpopKey, x as CheckResult, y as CheckContext } from "./base-D8a-ZK57.js";
2
+
3
+ //#region src/registry.d.ts
4
+
5
+ /**
6
+ * Define a check, enforcing the catalog's structural rules at
7
+ * registration time rather than in review:
8
+ *
9
+ * - ids are `area.slug`, unique within a catalog;
10
+ * - a `must` check carries at least one citation to specified behavior —
11
+ * without one it is someone's opinion and belongs in `should` or `info`.
12
+ */
13
+ declare function defineCheck(check: Check): Check;
14
+ interface CatalogFilter {
15
+ tiers?: Tier[];
16
+ /** Capabilities the harness can provide. */
17
+ capabilities?: Capability[];
18
+ /** Include checks that create/delete state on the target. */
19
+ destructive?: boolean;
20
+ /** Include checks that wait out real expiry windows. */
21
+ slow?: boolean;
22
+ /** Restrict to areas (the part of the id before the dot). */
23
+ areas?: string[];
24
+ ids?: string[];
25
+ }
26
+ interface FilteredCatalog {
27
+ runnable: Check[];
28
+ /** Checks excluded with the reason, for honest reporting. */
29
+ skipped: Array<{
30
+ check: Check;
31
+ reason: string;
32
+ }>;
33
+ }
34
+ declare function buildCatalog(checks: Check[]): Check[];
35
+ /**
36
+ * Partition a catalog into runnable and skipped for a given harness. A
37
+ * skipped check is part of the report — "not testable here" must never
38
+ * silently read as "conformant".
39
+ */
40
+ declare function filterCatalog(catalog: Check[], filter: CatalogFilter): FilteredCatalog;
41
+ //#endregion
42
+ //#region src/car.d.ts
43
+ /**
44
+ * Just enough CARv1 reading to assert getRepo's declared shape: the
45
+ * lexicon requires exactly two roots (the signed commit, then the index).
46
+ * Reading the header needs only a varint and a dag-cbor decode — no CAR
47
+ * library, no node streams — so it stays runnable anywhere the full entry
48
+ * runs.
49
+ */
50
+ interface CarHeaderInfo {
51
+ version: number;
52
+ rootCount: number;
53
+ }
54
+ /** Parse just the CARv1 header block and report its version and root count. */
55
+ declare function readCarHeader(bytes: Uint8Array): CarHeaderInfo;
56
+ //#endregion
57
+ //#region src/descriptors.d.ts
58
+ interface CheckDescriptor {
59
+ id: string;
60
+ title: string;
61
+ tier: Tier;
62
+ needs: Capability[];
63
+ citations: Citation[];
64
+ destructive?: boolean;
65
+ slow?: boolean;
66
+ }
67
+ /**
68
+ * Every crypto-bound check, by metadata. Keep in the same order and with
69
+ * the same fields as `cryptoChecks` (enforced by the drift test).
70
+ */
71
+ declare const cryptoCheckDescriptors: CheckDescriptor[];
72
+ /**
73
+ * Turn a descriptor into a listable Check. Its run() is never invoked —
74
+ * beyond the descriptor's own needs, the stub declares `alpha-libs` (the
75
+ * ability to execute the alpha crypto code), which no browser harness
76
+ * provides, so the runner always filters it into `skipped` — but it
77
+ * throws if reached, so a mistaken run surfaces loudly rather than
78
+ * passing.
79
+ */
80
+ declare function descriptorToStub(d: CheckDescriptor): Check;
81
+ //#endregion
82
+ //#region src/runner.d.ts
83
+ interface RunReport {
84
+ suite: {
85
+ name: string;
86
+ version: string;
87
+ };
88
+ /** The alpha build the suite's verifiers are pinned to. */
89
+ alphaBuild: string;
90
+ target: Target;
91
+ startedAt: string;
92
+ finishedAt: string;
93
+ results: CheckResult[];
94
+ logs: string[];
95
+ summary: {
96
+ pass: number;
97
+ fail: number;
98
+ mustFail: number;
99
+ /**
100
+ * must-tier checks that errored (threw or timed out). A CI gate must
101
+ * treat these as failures too: an unreachable or hung target errors
102
+ * its checks rather than failing them, and must not exit 0.
103
+ */
104
+ mustError: number;
105
+ skipped: number;
106
+ error: number;
107
+ };
108
+ }
109
+ interface RunOptions {
110
+ catalog: FilteredCatalog;
111
+ context: Omit<CheckContext, "state" | "log">;
112
+ suiteVersion: string;
113
+ alphaBuild: string;
114
+ /** Per-check timeout; a hung target must not hang the run. */
115
+ checkTimeoutMs?: number;
116
+ /**
117
+ * Called with each result as it is determined, in run order — so a UI
118
+ * can render progress live instead of waiting for the whole report.
119
+ * Skipped results are delivered too (at the end). A throwing callback
120
+ * is contained: it must not be able to abort the run.
121
+ */
122
+ onResult?: (result: CheckResult) => void;
123
+ }
124
+ declare function runChecks(options: RunOptions): Promise<RunReport>;
125
+ /** Render a compact human-readable summary of a report. */
126
+ declare function renderReport(report: RunReport): string;
127
+ //#endregion
128
+ //#region src/lexicons.d.ts
129
+ /**
130
+ * Vendored lexicon access. Regenerated by the vendor step of the weekly
131
+ * sync whenever lexicons/ changes — imports are explicit so bundlers
132
+ * carry the documents without filesystem access at runtime.
133
+ */
134
+ interface LexiconDoc {
135
+ lexicon: number;
136
+ id: string;
137
+ defs: Record<string, unknown>;
138
+ }
139
+ declare const lexicons: LexiconDoc[];
140
+ //#endregion
141
+ //#region src/coverage.d.ts
142
+ interface CoverageRequirement {
143
+ /** `<nsid>` for the method itself, `<nsid>@error:<Name>` for an error. */
144
+ ref: string;
145
+ kind: "method" | "error";
146
+ }
147
+ interface CoverageReport {
148
+ requirements: CoverageRequirement[];
149
+ covered: Array<{
150
+ ref: string;
151
+ by: string[];
152
+ }>;
153
+ gaps: CoverageRequirement[];
154
+ /** Lexicon citations on checks that match no requirement (typo guard). */
155
+ danglingCitations: Array<{
156
+ checkId: string;
157
+ ref: string;
158
+ }>;
159
+ }
160
+ /** Extract the coverage requirements from the vendored lexicons. */
161
+ declare function coverageRequirements(docs?: LexiconDoc[]): CoverageRequirement[];
162
+ declare function coverageReport(catalog: Check[], docs?: LexiconDoc[]): CoverageReport;
163
+ //#endregion
164
+ //#region src/index.d.ts
165
+ /**
166
+ * A catalog for transports that cannot run the crypto-bound checks (the
167
+ * browser). The base checks run anonymously; the operator checks — writes,
168
+ * simplespace, blobs, the self credential flow — are real and run whenever
169
+ * the harness supplies an operator session (an OAuth sign-in in the web
170
+ * checker). Only the checks that genuinely need the alpha crypto libs or
171
+ * foreign identities are metadata stubs, reported as skipped ("not
172
+ * testable here") — listed rather than omitted, so a green run never
173
+ * silently reads as fuller conformance than it proved.
174
+ */
175
+ declare const browserCatalog: Check[];
176
+ //#endregion
177
+ export { type Capability, type CatalogFilter, type Check, type CheckContext, type CheckDescriptor, type CheckOutcome, type CheckResult, type CheckStatus, type Citation, type CoverageReport, type CoverageRequirement, type Credential, type DpopKey, type FilteredCatalog, type HarnessIdentity, type IdentityProvider, type InboxDelivery, type LexiconDoc, type ProbeSpace, type RunOptions, type RunReport, type SyncerInbox, type Target, type Tier, type XrpcResult, baseChecks, browserCatalog, buildCatalog, coverageReport, coverageRequirements, createDpopKey, createDpopProofJwt, createProbeSpace, credentialGet, cryptoCheckDescriptors, defineCheck, deleteProbeSpace, descriptorToStub, fail, filterCatalog, lexicons, obtainCredentialViaDelegation, operatorChecks, operatorCreateRecord, operatorHeaders, pass, readCarHeader, renderReport, runChecks, xrpcGet, xrpcPost, xrpcUrl };
178
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/registry.ts","../src/car.ts","../src/descriptors.ts","../src/runner.ts","../src/lexicons.ts","../src/coverage.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;;AA0BA;AAaA;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t, f as baseChecks, g as xrpcPost, h as xrpcGet, i as deleteProbeSpace, l as readCarHeader, m as operatorHeaders, n as createProbeSpace, o as obtainCredentialViaDelegation, r as credentialGet, s as operatorChecks, u as createDpopKey, v as buildCatalog, x as fail, y as defineCheck } from "./operator-BErXCDow.js";
2
+ import { a as runChecks, i as renderReport, n as coverageRequirements, r as lexicons, t as coverageReport } from "./coverage-DhJZu8P8.js";
3
+
4
+ //#region src/descriptors.ts
5
+ const L = (ref) => ({
6
+ source: "lexicon",
7
+ ref
8
+ });
9
+ /**
10
+ * Every crypto-bound check, by metadata. Keep in the same order and with
11
+ * the same fields as `cryptoChecks` (enforced by the drift test).
12
+ */
13
+ const cryptoCheckDescriptors = [
14
+ {
15
+ id: "credential.round-trip",
16
+ title: "A member exchanges a delegation token for a credential and reads",
17
+ tier: "must",
18
+ needs: ["operator", "identities"],
19
+ citations: [L("com.atproto.space.getSpaceCredential"), L("com.atproto.space.getRecord")],
20
+ destructive: true
21
+ },
22
+ {
23
+ id: "credential.cross-space-refused",
24
+ title: "A credential for one space cannot read another",
25
+ tier: "must",
26
+ needs: ["operator", "identities"],
27
+ citations: [L("com.atproto.space.getRecord")],
28
+ destructive: true
29
+ },
30
+ {
31
+ id: "delegation.replay-refused",
32
+ title: "A delegation token cannot be used twice",
33
+ tier: "must",
34
+ needs: ["operator", "identities"],
35
+ citations: [L("com.atproto.space.getSpaceCredential@error:InvalidDelegationToken")],
36
+ destructive: true
37
+ },
38
+ {
39
+ id: "delegation.wrong-audience-refused",
40
+ title: "A delegation token addressed to another host is refused",
41
+ tier: "must",
42
+ needs: ["operator", "identities"],
43
+ citations: [L("com.atproto.space.getSpaceCredential@error:InvalidDelegationToken")],
44
+ destructive: true
45
+ },
46
+ {
47
+ id: "sync.oplog-folds-to-commit",
48
+ title: "Folding the oplog reproduces the commit set-hash",
49
+ tier: "must",
50
+ needs: ["operator"],
51
+ citations: [L("com.atproto.space.listRepoOps"), L("com.atproto.space.defs")],
52
+ destructive: true
53
+ },
54
+ {
55
+ id: "host.member-list-gates",
56
+ title: "member-list policy refuses a non-member and admits a member",
57
+ tier: "must",
58
+ needs: ["operator", "identities"],
59
+ citations: [L("com.atproto.space.getSpaceCredential@error:UserNotAuthorized"), L("com.atproto.simplespace.addMember")],
60
+ destructive: true
61
+ },
62
+ {
63
+ id: "host.delete-space-tombstone",
64
+ title: "After deleteSpace, getSpaceCredential answers SpaceDeleted",
65
+ tier: "must",
66
+ needs: ["operator", "identities"],
67
+ citations: [L("com.atproto.simplespace.deleteSpace"), L("com.atproto.space.getSpaceCredential@error:SpaceDeleted")],
68
+ destructive: true
69
+ }
70
+ ];
71
+ /**
72
+ * Turn a descriptor into a listable Check. Its run() is never invoked —
73
+ * beyond the descriptor's own needs, the stub declares `alpha-libs` (the
74
+ * ability to execute the alpha crypto code), which no browser harness
75
+ * provides, so the runner always filters it into `skipped` — but it
76
+ * throws if reached, so a mistaken run surfaces loudly rather than
77
+ * passing.
78
+ */
79
+ function descriptorToStub(d) {
80
+ return {
81
+ id: d.id,
82
+ title: d.title,
83
+ tier: d.tier,
84
+ needs: [...d.needs, "alpha-libs"],
85
+ citations: d.citations,
86
+ ...d.destructive ? { destructive: true } : {},
87
+ ...d.slow ? { slow: true } : {},
88
+ run: async () => {
89
+ throw new Error(`${d.id} is a metadata stub and cannot run in this transport`);
90
+ }
91
+ };
92
+ }
93
+
94
+ //#endregion
95
+ //#region src/index.ts
96
+ /**
97
+ * A catalog for transports that cannot run the crypto-bound checks (the
98
+ * browser). The base checks run anonymously; the operator checks — writes,
99
+ * simplespace, blobs, the self credential flow — are real and run whenever
100
+ * the harness supplies an operator session (an OAuth sign-in in the web
101
+ * checker). Only the checks that genuinely need the alpha crypto libs or
102
+ * foreign identities are metadata stubs, reported as skipped ("not
103
+ * testable here") — listed rather than omitted, so a green run never
104
+ * silently reads as fuller conformance than it proved.
105
+ */
106
+ const browserCatalog = buildCatalog([
107
+ ...baseChecks,
108
+ ...operatorChecks,
109
+ ...cryptoCheckDescriptors.map(descriptorToStub)
110
+ ]);
111
+
112
+ //#endregion
113
+ export { baseChecks, browserCatalog, buildCatalog, coverageReport, coverageRequirements, createDpopKey, createDpopProofJwt, createProbeSpace, credentialGet, cryptoCheckDescriptors, defineCheck, deleteProbeSpace, descriptorToStub, fail, filterCatalog, lexicons, obtainCredentialViaDelegation, operatorChecks, operatorCreateRecord, operatorHeaders, pass, readCarHeader, renderReport, runChecks, xrpcGet, xrpcPost, xrpcUrl };
114
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["cryptoCheckDescriptors: CheckDescriptor[]","build","base","operator","descriptors","stub"],"sources":["../src/descriptors.ts","../src/index.ts"],"sourcesContent":["/**\n * Dependency-free descriptors of the crypto-bound checks.\n *\n * The browser adapter can't import the real crypto catalog (it pulls the\n * alpha libs and node streams), but it must still *list* those checks so a\n * viewer sees them reported as \"not testable here\" rather than silently\n * omitted — an omitted check reads as conformant, the exact failure this\n * suite exists to prevent.\n *\n * These are metadata only: id, tier, what the check needs. A drift test in\n * the full test suite asserts they match the real `cryptoChecks` exactly,\n * so adding a crypto check without a descriptor fails CI.\n */\n\nimport type { Capability, Check, Citation, Tier } from \"./model.js\";\nimport { pass } from \"./model.js\";\n\nexport interface CheckDescriptor {\n\tid: string;\n\ttitle: string;\n\ttier: Tier;\n\tneeds: Capability[];\n\tcitations: Citation[];\n\tdestructive?: boolean;\n\tslow?: boolean;\n}\n\nconst L = (ref: string): Citation => ({ source: \"lexicon\", ref });\n\n/**\n * Every crypto-bound check, by metadata. Keep in the same order and with\n * the same fields as `cryptoChecks` (enforced by the drift test).\n */\nexport const cryptoCheckDescriptors: CheckDescriptor[] = [\n\t{\n\t\tid: \"credential.round-trip\",\n\t\ttitle: \"A member exchanges a delegation token for a credential and reads\",\n\t\ttier: \"must\",\n\t\tneeds: [\"operator\", \"identities\"],\n\t\tcitations: [\n\t\t\tL(\"com.atproto.space.getSpaceCredential\"),\n\t\t\tL(\"com.atproto.space.getRecord\"),\n\t\t],\n\t\tdestructive: true,\n\t},\n\t{\n\t\tid: \"credential.cross-space-refused\",\n\t\ttitle: \"A credential for one space cannot read another\",\n\t\ttier: \"must\",\n\t\tneeds: [\"operator\", \"identities\"],\n\t\tcitations: [L(\"com.atproto.space.getRecord\")],\n\t\tdestructive: true,\n\t},\n\t{\n\t\tid: \"delegation.replay-refused\",\n\t\ttitle: \"A delegation token cannot be used twice\",\n\t\ttier: \"must\",\n\t\tneeds: [\"operator\", \"identities\"],\n\t\tcitations: [\n\t\t\tL(\"com.atproto.space.getSpaceCredential@error:InvalidDelegationToken\"),\n\t\t],\n\t\tdestructive: true,\n\t},\n\t{\n\t\tid: \"delegation.wrong-audience-refused\",\n\t\ttitle: \"A delegation token addressed to another host is refused\",\n\t\ttier: \"must\",\n\t\tneeds: [\"operator\", \"identities\"],\n\t\tcitations: [\n\t\t\tL(\"com.atproto.space.getSpaceCredential@error:InvalidDelegationToken\"),\n\t\t],\n\t\tdestructive: true,\n\t},\n\t{\n\t\tid: \"sync.oplog-folds-to-commit\",\n\t\ttitle: \"Folding the oplog reproduces the commit set-hash\",\n\t\ttier: \"must\",\n\t\tneeds: [\"operator\"],\n\t\tcitations: [\n\t\t\tL(\"com.atproto.space.listRepoOps\"),\n\t\t\tL(\"com.atproto.space.defs\"),\n\t\t],\n\t\tdestructive: true,\n\t},\n\t{\n\t\tid: \"host.member-list-gates\",\n\t\ttitle: \"member-list policy refuses a non-member and admits a member\",\n\t\ttier: \"must\",\n\t\tneeds: [\"operator\", \"identities\"],\n\t\tcitations: [\n\t\t\tL(\"com.atproto.space.getSpaceCredential@error:UserNotAuthorized\"),\n\t\t\tL(\"com.atproto.simplespace.addMember\"),\n\t\t],\n\t\tdestructive: true,\n\t},\n\t{\n\t\tid: \"host.delete-space-tombstone\",\n\t\ttitle: \"After deleteSpace, getSpaceCredential answers SpaceDeleted\",\n\t\ttier: \"must\",\n\t\tneeds: [\"operator\", \"identities\"],\n\t\tcitations: [\n\t\t\tL(\"com.atproto.simplespace.deleteSpace\"),\n\t\t\tL(\"com.atproto.space.getSpaceCredential@error:SpaceDeleted\"),\n\t\t],\n\t\tdestructive: true,\n\t},\n];\n\n/**\n * Turn a descriptor into a listable Check. Its run() is never invoked —\n * beyond the descriptor's own needs, the stub declares `alpha-libs` (the\n * ability to execute the alpha crypto code), which no browser harness\n * provides, so the runner always filters it into `skipped` — but it\n * throws if reached, so a mistaken run surfaces loudly rather than\n * passing.\n */\nexport function descriptorToStub(d: CheckDescriptor): Check {\n\treturn {\n\t\tid: d.id,\n\t\ttitle: d.title,\n\t\ttier: d.tier,\n\t\tneeds: [...d.needs, \"alpha-libs\"],\n\t\tcitations: d.citations,\n\t\t...(d.destructive ? { destructive: true } : {}),\n\t\t...(d.slow ? { slow: true } : {}),\n\t\trun: async () => {\n\t\t\tthrow new Error(\n\t\t\t\t`${d.id} is a metadata stub and cannot run in this transport`,\n\t\t\t);\n\t\t\t// unreachable; satisfies the return type\n\t\t\treturn pass(\"\");\n\t\t},\n\t};\n}\n","/**\n * @getcirrus/space-conformance – black-box conformance suite for atproto\n * spaces implementations (alpha).\n *\n * One check model, multiple runners: the same tiered, citation-carrying\n * checks run in-process against a local implementation, from a CLI against\n * a live host, or inside a web checker. `must` checks cite specified\n * behavior; `should` checks are calibrated against the reference\n * implementation; `info` checks never fail anyone.\n */\n\nexport { pass, fail } from \"./model.js\";\nexport type {\n\tCapability,\n\tCheck,\n\tCheckContext,\n\tCheckOutcome,\n\tCheckResult,\n\tCheckStatus,\n\tCitation,\n\tDpopKey,\n\tHarnessIdentity,\n\tIdentityProvider,\n\tInboxDelivery,\n\tSyncerInbox,\n\tTarget,\n\tTier,\n} from \"./model.js\";\n\nexport { buildCatalog, defineCheck, filterCatalog } from \"./registry.js\";\nexport type { CatalogFilter, FilteredCatalog } from \"./registry.js\";\n\nexport { xrpcGet, xrpcPost, xrpcUrl, operatorHeaders } from \"./http.js\";\nexport type { XrpcResult } from \"./http.js\";\n\nexport { baseChecks } from \"./checks/base.js\";\nexport {\n\toperatorChecks,\n\tcreateProbeSpace,\n\tdeleteProbeSpace,\n\toperatorCreateRecord,\n\tobtainCredentialViaDelegation,\n\tcredentialGet,\n} from \"./checks/operator.js\";\nexport type { Credential, ProbeSpace } from \"./checks/operator.js\";\n\nexport { createDpopKey, createDpopProofJwt } from \"./dpop.js\";\nexport { readCarHeader } from \"./car.js\";\n\nexport { cryptoCheckDescriptors, descriptorToStub } from \"./descriptors.js\";\nexport type { CheckDescriptor } from \"./descriptors.js\";\n\nimport { baseChecks as base } from \"./checks/base.js\";\nimport { operatorChecks as operator } from \"./checks/operator.js\";\nimport { buildCatalog as build } from \"./registry.js\";\nimport {\n\tcryptoCheckDescriptors as descriptors,\n\tdescriptorToStub as stub,\n} from \"./descriptors.js\";\n\n/**\n * A catalog for transports that cannot run the crypto-bound checks (the\n * browser). The base checks run anonymously; the operator checks — writes,\n * simplespace, blobs, the self credential flow — are real and run whenever\n * the harness supplies an operator session (an OAuth sign-in in the web\n * checker). Only the checks that genuinely need the alpha crypto libs or\n * foreign identities are metadata stubs, reported as skipped (\"not\n * testable here\") — listed rather than omitted, so a green run never\n * silently reads as fuller conformance than it proved.\n */\nexport const browserCatalog = build([\n\t...base,\n\t...operator,\n\t...descriptors.map(stub),\n]);\n\nexport { renderReport, runChecks } from \"./runner.js\";\nexport type { RunOptions, RunReport } from \"./runner.js\";\n\nexport { coverageReport, coverageRequirements } from \"./coverage.js\";\nexport type { CoverageReport, CoverageRequirement } from \"./coverage.js\";\n\nexport { lexicons } from \"./lexicons.js\";\nexport type { LexiconDoc } from \"./lexicons.js\";\n"],"mappings":";;;;AA2BA,MAAM,KAAK,SAA2B;CAAE,QAAQ;CAAW;CAAK;;;;;AAMhE,MAAaA,yBAA4C;CACxD;EACC,IAAI;EACJ,OAAO;EACP,MAAM;EACN,OAAO,CAAC,YAAY,aAAa;EACjC,WAAW,CACV,EAAE,uCAAuC,EACzC,EAAE,8BAA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