@gaganref/confect-test 10.3.1-fork.91 → 10.3.1-fork.93

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 (51) hide show
  1. package/dist/TestConfect.d.ts +26 -0
  2. package/dist/TestConfect.d.ts.map +1 -1
  3. package/dist/TestConfect.js +9 -1
  4. package/dist/TestConfect.js.map +1 -1
  5. package/dist/internal/Attempt.d.ts +14 -1
  6. package/dist/internal/Attempt.d.ts.map +1 -1
  7. package/dist/internal/Attempt.js +18 -1
  8. package/dist/internal/Attempt.js.map +1 -1
  9. package/dist/internal/ConvexTest.d.ts +26 -1
  10. package/dist/internal/ConvexTest.d.ts.map +1 -1
  11. package/dist/internal/ConvexTest.js +55 -27
  12. package/dist/internal/ConvexTest.js.map +1 -1
  13. package/dist/internal/Execution.d.ts +151 -1
  14. package/dist/internal/Execution.d.ts.map +1 -1
  15. package/dist/internal/Execution.js +731 -214
  16. package/dist/internal/Execution.js.map +1 -1
  17. package/dist/internal/KernelQuery.d.ts +8 -3
  18. package/dist/internal/KernelQuery.d.ts.map +1 -1
  19. package/dist/internal/KernelQuery.js +10 -3
  20. package/dist/internal/KernelQuery.js.map +1 -1
  21. package/dist/internal/KernelRefusal.d.ts +134 -0
  22. package/dist/internal/KernelRefusal.d.ts.map +1 -1
  23. package/dist/internal/KernelRefusal.js +134 -1
  24. package/dist/internal/KernelRefusal.js.map +1 -1
  25. package/dist/internal/Metering.d.ts +186 -0
  26. package/dist/internal/Metering.d.ts.map +1 -0
  27. package/dist/internal/Metering.js +401 -0
  28. package/dist/internal/Metering.js.map +1 -0
  29. package/dist/internal/Redaction.d.ts +142 -0
  30. package/dist/internal/Redaction.d.ts.map +1 -0
  31. package/dist/internal/Redaction.js +448 -0
  32. package/dist/internal/Redaction.js.map +1 -0
  33. package/dist/internal/Snapshot.d.ts +298 -0
  34. package/dist/internal/Snapshot.d.ts.map +1 -0
  35. package/dist/internal/Snapshot.js +532 -0
  36. package/dist/internal/Snapshot.js.map +1 -0
  37. package/dist/internal/Subscriptions.d.ts +13 -0
  38. package/dist/internal/Subscriptions.d.ts.map +1 -1
  39. package/dist/internal/Subscriptions.js +27 -3
  40. package/dist/internal/Subscriptions.js.map +1 -1
  41. package/package.json +3 -3
  42. package/src/TestConfect.ts +63 -4
  43. package/src/internal/Attempt.ts +24 -0
  44. package/src/internal/ConvexTest.ts +135 -38
  45. package/src/internal/Execution.ts +1141 -324
  46. package/src/internal/KernelQuery.ts +17 -6
  47. package/src/internal/KernelRefusal.ts +160 -0
  48. package/src/internal/Metering.ts +520 -0
  49. package/src/internal/Redaction.ts +730 -0
  50. package/src/internal/Snapshot.ts +945 -0
  51. package/src/internal/Subscriptions.ts +34 -4
@@ -1 +1 @@
1
- {"version":3,"file":"ConvexTest.js","names":["Execution.withIdentity","KernelRefusal.rowPending","Execution.World","Subscriptions.Registry","Execution.anonymous"],"sources":["../../src/internal/ConvexTest.ts"],"sourcesContent":["import type {\n GenericSchema,\n SchemaDefinition,\n UserIdentity,\n} from \"convex/server\";\nimport { componentsGeneric } from \"convex/server\";\nimport * as Execution from \"./Execution.js\";\nimport type * as Kernel from \"./Kernel.js\";\nimport * as KernelRefusal from \"./KernelRefusal.js\";\nimport * as Subscriptions from \"./Subscriptions.js\";\nimport type * as Scheduling from \"./Scheduling.js\";\n\ntype Modules = Record<string, () => Promise<any>>;\n\n/**\n * What the kernel adds to convex-test's surface, typed. The shim itself returns\n * `any`, as convex-test's callers expect.\n */\nexport interface KernelControls {\n readonly query: (reference: any, args?: any) => Promise<any>;\n readonly mutation: (reference: any, args?: any) => Promise<any>;\n readonly action: (reference: any, args?: any) => Promise<any>;\n readonly prepare: (\n reference: any,\n args?: any,\n ) => Promise<Execution.HeldAttempt>;\n readonly apply: (id: string) => Promise<Execution.KernelApply>;\n readonly held: () => ReadonlyArray<Execution.HeldAttempt>;\n readonly withIdentity: (identity: Partial<UserIdentity>) => KernelControls;\n readonly withRequestMetadata: (metadata: {\n readonly ip?: string | null;\n readonly userAgent?: string | null;\n }) => KernelControls;\n /**\n * A client's query set under this accessor's caller.\n */\n readonly subscriber: () => Subscriptions.Subscriber;\n /**\n * Rerun every stale subscription. Lists each one whose value changed.\n */\n readonly refresh: () => Promise<ReadonlyArray<Subscriptions.Transition>>;\n /**\n * Rerun every subscription from scratch. Lists each one whose value differs\n * from the full rerun.\n */\n readonly reference: () => Promise<ReadonlyArray<Subscriptions.Disagreement>>;\n /**\n * Move the kernel's clock forward, running each job due on the way at its\n * deadline.\n */\n readonly advance: (ms: number) => Promise<void>;\n /**\n * The pending jobs, earliest deadline first.\n */\n readonly jobs: () => ReadonlyArray<Scheduling.Job>;\n /**\n * Run the jobs due now. No future deadline is crossed.\n */\n readonly finishInProgressScheduledFunctions: () => Promise<void>;\n /**\n * Run jobs at their deadlines until only standing jobs remain, or fail with\n * `DrainBudgetExceeded` after `maxIterations` jobs. The kernel keeps its own\n * clock, so it never calls `advanceTimers`.\n */\n readonly finishAllScheduledFunctions: (\n advanceTimers?: () => void,\n maxIterations?: number,\n ) => Promise<void>;\n}\n\n/**\n * How a kit registers a component beyond its schema and modules.\n */\nexport interface RegisterOptions {\n /**\n * The component's functions, as `module:export`, that schedule their own next\n * run, such as the crons component's `public:rescheduler`. A job that runs\n * one, or that one schedules, is never drain work.\n */\n readonly standing?: ReadonlyArray<string>;\n}\n\nconst isSchemaDefinition = (\n value: unknown,\n): value is SchemaDefinition<GenericSchema, boolean> =>\n value !== null &&\n typeof value === \"object\" &&\n \"tables\" in value &&\n typeof (value as { tables: unknown }).tables === \"object\";\n\nconst accessor = (\n world: Execution.World,\n subscriptions: Subscriptions.Registry,\n caller: Execution.Caller,\n): any => ({\n query: (reference: any, args?: any) => world.query(caller, reference, args),\n mutation: (reference: any, args?: any) =>\n world.mutation(caller, reference, args),\n action: (reference: any, args?: any) => world.action(caller, reference, args),\n prepare: (reference: any, args?: any) =>\n world.prepare(caller, reference, args),\n apply: (id: string) => world.apply(id),\n held: () => world.held(),\n subscriber: () => subscriptions.subscriber(caller),\n refresh: () => subscriptions.refresh(),\n reference: () => subscriptions.reference(),\n run: (handler: (ctx: any) => any) => world.run(caller, \"\", handler),\n runInComponent: (componentPath: string, handler: (ctx: any) => any) =>\n world.run(caller, componentPath, handler),\n withIdentity: (identity: Partial<UserIdentity>) =>\n accessor(world, subscriptions, Execution.withIdentity(caller, identity)),\n withRequestMetadata: (metadata: {\n readonly ip?: string | null;\n readonly userAgent?: string | null;\n }) =>\n accessor(world, subscriptions, {\n ...caller,\n ip: metadata.ip ?? null,\n userAgent: metadata.userAgent ?? null,\n }),\n fetch: () => Promise.reject(KernelRefusal.rowPending(\"HTTP routes\", 6)),\n jwks: () => Promise.reject(KernelRefusal.rowPending(\"JWT verification\", 6)),\n advance: (ms: number) => world.advance(ms),\n jobs: () => world.jobs(),\n finishInProgressScheduledFunctions: () => world.advance(0),\n finishAllScheduledFunctions: (\n _advanceTimers?: () => void,\n maxIterations?: number,\n ) => world.drain(maxIterations),\n});\n\n/**\n * The test kernel under convex-test's `convexTest` signature. The fork's kernel\n * lane aliases `convex-test` to this module, so every suite that calls\n * `convexTest` directly, and `TestConfect` itself, runs on the kernel.\n *\n * Beyond convex-test, `prepare` runs a mutation to its commit point and holds\n * it, and `apply` validates and publishes a held attempt. `mutation` applies\n * each attempt it prepares at once and prepares the next on a conflict, up to\n * attempt 5. `runtime` supplies the clock and commit timestamps. Scheduled\n * functions run on the kernel's clock, never on a host timer. A subscriber's\n * subscriptions go stale when a commit changes what they read or the identity\n * they read changes, and `refresh` reruns them.\n */\nexport function convexTest(\n schemaOrOptions?:\n | SchemaDefinition<GenericSchema, boolean>\n | {\n readonly schema?: SchemaDefinition<GenericSchema, boolean>;\n readonly modules?: Modules;\n readonly transactionLimits?: unknown;\n readonly runtime?: Kernel.KernelRuntime;\n },\n modules?: Modules,\n): any {\n let schema: SchemaDefinition<GenericSchema, boolean> | undefined;\n let runtime: Kernel.KernelRuntime | undefined;\n if (isSchemaDefinition(schemaOrOptions)) {\n schema = schemaOrOptions;\n } else if (schemaOrOptions !== undefined) {\n if (schemaOrOptions.transactionLimits !== undefined) {\n throw KernelRefusal.rowPending(\"transaction limits\", 6);\n }\n schema = schemaOrOptions.schema;\n modules = schemaOrOptions.modules;\n runtime = schemaOrOptions.runtime;\n }\n if (modules === undefined) {\n throw new Error(\n \"The test kernel needs the modules map: pass `import.meta.glob(...)` as the second argument.\",\n );\n }\n const world = new Execution.World(schema, modules, runtime);\n return {\n ...accessor(world, new Subscriptions.Registry(world), Execution.anonymous),\n registerComponent: (\n componentPath: string,\n componentSchema: SchemaDefinition<GenericSchema, boolean>,\n componentModules: Modules,\n options?: RegisterOptions,\n ) => {\n world.register(\n componentPath,\n componentSchema,\n componentModules,\n options?.standing,\n );\n return (componentsGeneric() as any)[componentPath];\n },\n };\n}\n"],"mappings":";;;;;AAkFA,MAAM,sBACJ,UAEA,UAAU,QACV,OAAO,UAAU,YACjB,YAAY,SACZ,OAAQ,MAA8B,WAAW;AAEnD,MAAM,YACJ,OACA,eACA,YACS;CACT,QAAQ,WAAgB,SAAe,MAAM,MAAM,QAAQ,WAAW,IAAI;CAC1E,WAAW,WAAgB,SACzB,MAAM,SAAS,QAAQ,WAAW,IAAI;CACxC,SAAS,WAAgB,SAAe,MAAM,OAAO,QAAQ,WAAW,IAAI;CAC5E,UAAU,WAAgB,SACxB,MAAM,QAAQ,QAAQ,WAAW,IAAI;CACvC,QAAQ,OAAe,MAAM,MAAM,EAAE;CACrC,YAAY,MAAM,KAAK;CACvB,kBAAkB,cAAc,WAAW,MAAM;CACjD,eAAe,cAAc,QAAQ;CACrC,iBAAiB,cAAc,UAAU;CACzC,MAAM,YAA+B,MAAM,IAAI,QAAQ,IAAI,OAAO;CAClE,iBAAiB,eAAuB,YACtC,MAAM,IAAI,QAAQ,eAAe,OAAO;CAC1C,eAAe,aACb,SAAS,OAAO,eAAeA,aAAuB,QAAQ,QAAQ,CAAC;CACzE,sBAAsB,aAIpB,SAAS,OAAO,eAAe;EAC7B,GAAG;EACH,IAAI,SAAS,MAAM;EACnB,WAAW,SAAS,aAAa;CACnC,CAAC;CACH,aAAa,QAAQ,OAAOC,WAAyB,eAAe,CAAC,CAAC;CACtE,YAAY,QAAQ,OAAOA,WAAyB,oBAAoB,CAAC,CAAC;CAC1E,UAAU,OAAe,MAAM,QAAQ,EAAE;CACzC,YAAY,MAAM,KAAK;CACvB,0CAA0C,MAAM,QAAQ,CAAC;CACzD,8BACE,gBACA,kBACG,MAAM,MAAM,aAAa;AAChC;;;;;;;;;;;;;;AAeA,SAAgB,WACd,iBAQA,SACK;CACL,IAAI;CACJ,IAAI;CACJ,IAAI,mBAAmB,eAAe,GACpC,SAAS;MACJ,IAAI,oBAAoB,KAAA,GAAW;EACxC,IAAI,gBAAgB,sBAAsB,KAAA,GACxC,MAAMA,WAAyB,sBAAsB,CAAC;EAExD,SAAS,gBAAgB;EACzB,UAAU,gBAAgB;EAC1B,UAAU,gBAAgB;CAC5B;CACA,IAAI,YAAY,KAAA,GACd,MAAM,IAAI,MACR,6FACF;CAEF,MAAM,QAAQ,IAAIC,MAAgB,QAAQ,SAAS,OAAO;CAC1D,OAAO;EACL,GAAG,SAAS,OAAO,IAAIC,SAAuB,KAAK,GAAGC,SAAmB;EACzE,oBACE,eACA,iBACA,kBACA,YACG;GACH,MAAM,SACJ,eACA,iBACA,kBACA,SAAS,QACX;GACA,OAAQ,kBAAkB,CAAC,CAAS;EACtC;CACF;AACF"}
1
+ {"version":3,"file":"ConvexTest.js","names":["Execution.withIdentity","KernelRefusal.rowPending","Execution.World","Subscriptions.Registry","Execution.anonymous"],"sources":["../../src/internal/ConvexTest.ts"],"sourcesContent":["import type {\n GenericSchema,\n SchemaDefinition,\n UserIdentity,\n} from \"convex/server\";\nimport { componentsGeneric } from \"convex/server\";\nimport * as Execution from \"./Execution.js\";\nimport type * as Invocation from \"./Invocation.js\";\nimport type * as Redaction from \"./Redaction.js\";\nimport type * as Kernel from \"./Kernel.js\";\nimport * as KernelRefusal from \"./KernelRefusal.js\";\nimport * as Subscriptions from \"./Subscriptions.js\";\nimport type * as Scheduling from \"./Scheduling.js\";\n\ntype Modules = Record<string, () => Promise<any>>;\n\n/**\n * What the kernel adds to convex-test's surface, typed. The shim itself returns\n * `any`, as convex-test's callers expect.\n */\nexport interface KernelControls {\n readonly query: (reference: any, args?: any) => Promise<any>;\n readonly mutation: (reference: any, args?: any) => Promise<any>;\n readonly action: (reference: any, args?: any) => Promise<any>;\n readonly prepare: (\n reference: any,\n args?: any,\n ) => Promise<Execution.HeldAttempt>;\n readonly apply: (id: string) => Promise<Execution.KernelApply>;\n readonly held: () => ReadonlyArray<Execution.HeldAttempt>;\n readonly withIdentity: (identity: Partial<UserIdentity>) => KernelControls;\n readonly withRequestMetadata: (metadata: {\n readonly ip?: string | null;\n readonly userAgent?: string | null;\n }) => KernelControls;\n /**\n * A client's query set under this accessor's caller.\n */\n readonly subscriber: () => Subscriptions.Subscriber;\n /**\n * Rerun every stale subscription. Lists each one whose value changed.\n */\n readonly refresh: () => Promise<ReadonlyArray<Subscriptions.Transition>>;\n /**\n * Rerun every subscription from scratch. Lists each one whose value differs\n * from the full rerun.\n */\n readonly reference: () => Promise<ReadonlyArray<Subscriptions.Disagreement>>;\n /**\n * Move the kernel's clock forward, running each job due on the way at its\n * deadline.\n */\n readonly advance: (ms: number) => Promise<void>;\n /**\n * The pending jobs, earliest deadline first.\n */\n readonly jobs: () => ReadonlyArray<Scheduling.Job>;\n /**\n * Run the jobs due now. No future deadline is crossed.\n */\n readonly finishInProgressScheduledFunctions: () => Promise<void>;\n /**\n * Run jobs at their deadlines until only standing jobs remain, or fail with\n * `DrainBudgetExceeded` after `maxIterations` jobs. The kernel keeps its own\n * clock, so it never calls `advanceTimers`.\n */\n readonly finishAllScheduledFunctions: (\n advanceTimers?: () => void,\n maxIterations?: number,\n ) => Promise<void>;\n /**\n * The committed state as snapshot bytes, bound to their SHA-256 digest. Two\n * exports of the same state are the same bytes.\n */\n readonly exportSnapshot: () => Uint8Array;\n /**\n * Replace a fresh backend's state with a snapshot's. Each job's world\n * resolves by name among `worlds`. Tampered bytes refuse with\n * `SnapshotDigestMismatch`.\n */\n readonly restoreSnapshot: (\n bytes: Uint8Array,\n options?: {\n readonly worlds?: ReadonlyArray<Invocation.World>;\n readonly secrets?: Redaction.Secrets;\n },\n ) => Promise<void>;\n /**\n * A copy of the raw secrets the backend has seen under a secret schema node.\n * A snapshot marks each one, and a restore given this copy puts them back. It\n * lives in memory and is never written to an artifact.\n */\n readonly secrets: () => Redaction.Secrets;\n}\n\n/**\n * How a kit registers a component beyond its schema and modules.\n */\nexport interface RegisterOptions {\n /**\n * The component's functions, as `module:export`, that schedule their own next\n * run, such as the crons component's `public:rescheduler`. A job that runs\n * one, or that one schedules, is never drain work.\n */\n readonly standing?: ReadonlyArray<string>;\n}\n\nconst isSchemaDefinition = (\n value: unknown,\n): value is SchemaDefinition<GenericSchema, boolean> =>\n value !== null &&\n typeof value === \"object\" &&\n \"tables\" in value &&\n typeof (value as { tables: unknown }).tables === \"object\";\n\nconst accessor = (\n world: Execution.World,\n subscriptions: Subscriptions.Registry,\n caller: Execution.Caller,\n): any => {\n // Every failure the kernel hands back is a report a test runner prints, so\n // each leaves through the world's redaction.\n const reported = <A>(run: () => Promise<A>): Promise<A> =>\n run().catch((error: unknown) => {\n throw world.redactFailure(error);\n });\n // A diff names its subscription; its outcomes are marked by the shape of\n // what that subscription's query returns.\n const returnsOf = (subscription: string) =>\n world.functionPathOf(subscriptions.referenceOf(subscription));\n return {\n query: (reference: any, args?: any) =>\n reported(() => world.query(caller, reference, args)),\n mutation: (reference: any, args?: any) =>\n reported(() => world.mutation(caller, reference, args)),\n action: (reference: any, args?: any) =>\n reported(() => world.action(caller, reference, args)),\n prepare: (reference: any, args?: any) =>\n reported(() => world.prepare(caller, reference, args)).then((view) =>\n world.projectHeld(view),\n ),\n apply: (id: string) => {\n // The attempt leaves `held` once applied, so its function is read first.\n const functionPath = world\n .held()\n .find((view) => view.id === id)?.functionPath;\n return reported(() => world.apply(id)).then((applied) =>\n world.projectApplied(applied, functionPath),\n );\n },\n held: () => world.held().map((view) => world.projectHeld(view)),\n subscriber: () => subscriptions.subscriber(caller),\n refresh: () =>\n reported(() => subscriptions.refresh()).then((transitions) =>\n transitions.map((transition): Subscriptions.Transition => ({\n ...transition,\n from: world.redactOutcome(\n transition.from,\n returnsOf(transition.subscription),\n ),\n to: world.redactOutcome(\n transition.to,\n returnsOf(transition.subscription),\n ),\n because:\n transition.because.kind === \"commit\"\n ? {\n kind: \"commit\",\n change: world.redactChange(transition.because.change),\n }\n : transition.because,\n })),\n ),\n reference: () =>\n reported(() => subscriptions.reference()).then((disagreements) =>\n disagreements.map((disagreement): Subscriptions.Disagreement => ({\n ...disagreement,\n incremental: world.redactOutcome(\n disagreement.incremental,\n returnsOf(disagreement.subscription),\n ),\n reference: world.redactOutcome(\n disagreement.reference,\n returnsOf(disagreement.subscription),\n ),\n })),\n ),\n run: (handler: (ctx: any) => any) =>\n reported(() => world.run(caller, \"\", handler)),\n runInComponent: (componentPath: string, handler: (ctx: any) => any) =>\n reported(() => world.run(caller, componentPath, handler)),\n withIdentity: (identity: Partial<UserIdentity>) =>\n accessor(world, subscriptions, Execution.withIdentity(caller, identity)),\n withRequestMetadata: (metadata: {\n readonly ip?: string | null;\n readonly userAgent?: string | null;\n }) =>\n accessor(world, subscriptions, {\n ...caller,\n ip: metadata.ip ?? null,\n userAgent: metadata.userAgent ?? null,\n }),\n fetch: () => Promise.reject(KernelRefusal.rowPending(\"HTTP routes\", 6)),\n jwks: () => Promise.reject(KernelRefusal.rowPending(\"JWT verification\", 6)),\n advance: (ms: number) => reported(() => world.advance(ms)),\n jobs: () => world.jobs(),\n finishInProgressScheduledFunctions: () => reported(() => world.advance(0)),\n finishAllScheduledFunctions: (\n _advanceTimers?: () => void,\n maxIterations?: number,\n ) => reported(() => world.drain(maxIterations)),\n exportSnapshot: () => world.exportSnapshot(),\n restoreSnapshot: (\n bytes: Uint8Array,\n options?: {\n readonly worlds?: ReadonlyArray<Invocation.World>;\n readonly secrets?: Redaction.Secrets;\n },\n ) => world.restoreSnapshot(bytes, options),\n secrets: () => world.keptSecrets(),\n };\n};\n\n/**\n * The test kernel under convex-test's `convexTest` signature. The fork's kernel\n * lane aliases `convex-test` to this module, so every suite that calls\n * `convexTest` directly, and `TestConfect` itself, runs on the kernel.\n *\n * Beyond convex-test, `prepare` runs a mutation to its commit point and holds\n * it, and `apply` validates and publishes a held attempt. `mutation` applies\n * each attempt it prepares at once and prepares the next on a conflict, up to\n * attempt 5. `runtime` supplies the clock and commit timestamps. Scheduled\n * functions run on the kernel's clock, never on a host timer. A subscriber's\n * subscriptions go stale when a commit changes what they read or the identity\n * they read changes, and `refresh` reruns them. `redaction` names the secret\n * schema nodes of tables and functions: a value under one reaches a snapshot, a\n * failure report or a diff only as a marker.\n */\nexport function convexTest(\n schemaOrOptions?:\n | SchemaDefinition<GenericSchema, boolean>\n | {\n readonly schema?: SchemaDefinition<GenericSchema, boolean>;\n readonly modules?: Modules;\n readonly transactionLimits?: unknown;\n readonly runtime?: Kernel.KernelRuntime;\n readonly redaction?: Redaction.Policy;\n },\n modules?: Modules,\n): any {\n let schema: SchemaDefinition<GenericSchema, boolean> | undefined;\n let runtime: Kernel.KernelRuntime | undefined;\n let redaction: Redaction.Policy | undefined;\n if (isSchemaDefinition(schemaOrOptions)) {\n schema = schemaOrOptions;\n } else if (schemaOrOptions !== undefined) {\n if (schemaOrOptions.transactionLimits !== undefined) {\n throw KernelRefusal.rowPending(\"transaction limits\", 6);\n }\n schema = schemaOrOptions.schema;\n modules = schemaOrOptions.modules;\n runtime = schemaOrOptions.runtime;\n redaction = schemaOrOptions.redaction;\n }\n if (modules === undefined) {\n throw new Error(\n \"The test kernel needs the modules map: pass `import.meta.glob(...)` as the second argument.\",\n );\n }\n const world = new Execution.World(schema, modules, runtime, redaction);\n return {\n ...accessor(world, new Subscriptions.Registry(world), Execution.anonymous),\n registerComponent: (\n componentPath: string,\n componentSchema: SchemaDefinition<GenericSchema, boolean>,\n componentModules: Modules,\n options?: RegisterOptions,\n ) => {\n world.register(\n componentPath,\n componentSchema,\n componentModules,\n options?.standing,\n );\n return (componentsGeneric() as any)[componentPath];\n },\n };\n}\n"],"mappings":";;;;;AA2GA,MAAM,sBACJ,UAEA,UAAU,QACV,OAAO,UAAU,YACjB,YAAY,SACZ,OAAQ,MAA8B,WAAW;AAEnD,MAAM,YACJ,OACA,eACA,WACQ;CAGR,MAAM,YAAe,QACnB,IAAI,CAAC,CAAC,OAAO,UAAmB;EAC9B,MAAM,MAAM,cAAc,KAAK;CACjC,CAAC;CAGH,MAAM,aAAa,iBACjB,MAAM,eAAe,cAAc,YAAY,YAAY,CAAC;CAC9D,OAAO;EACL,QAAQ,WAAgB,SACtB,eAAe,MAAM,MAAM,QAAQ,WAAW,IAAI,CAAC;EACrD,WAAW,WAAgB,SACzB,eAAe,MAAM,SAAS,QAAQ,WAAW,IAAI,CAAC;EACxD,SAAS,WAAgB,SACvB,eAAe,MAAM,OAAO,QAAQ,WAAW,IAAI,CAAC;EACtD,UAAU,WAAgB,SACxB,eAAe,MAAM,QAAQ,QAAQ,WAAW,IAAI,CAAC,CAAC,CAAC,MAAM,SAC3D,MAAM,YAAY,IAAI,CACxB;EACF,QAAQ,OAAe;GAErB,MAAM,eAAe,MAClB,KAAK,CAAC,CACN,MAAM,SAAS,KAAK,OAAO,EAAE,CAAC,EAAE;GACnC,OAAO,eAAe,MAAM,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,YAC3C,MAAM,eAAe,SAAS,YAAY,CAC5C;EACF;EACA,YAAY,MAAM,KAAK,CAAC,CAAC,KAAK,SAAS,MAAM,YAAY,IAAI,CAAC;EAC9D,kBAAkB,cAAc,WAAW,MAAM;EACjD,eACE,eAAe,cAAc,QAAQ,CAAC,CAAC,CAAC,MAAM,gBAC5C,YAAY,KAAK,gBAA0C;GACzD,GAA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IAAI;CACJ,IAAI;CACJ,IAAI,mBAAmB,eAAe,GACpC,SAAS;MACJ,IAAI,oBAAoB,KAAA,GAAW;EACxC,IAAI,gBAAgB,sBAAsB,KAAA,GACxC,MAAMA,WAAyB,sBAAsB,CAAC;EAExD,SAAS,gBAAgB;EACzB,UAAU,gBAAgB;EAC1B,UAAU,gBAAgB;EAC1B,YAAY,gBAAgB;CAC9B;CACA,IAAI,YAAY,KAAA,GACd,MAAM,IAAI,MACR,6FACF;CAEF,MAAM,QAAQ,IAAIC,MAAgB,QAAQ,SAAS,SAAS,SAAS;CACrE,OAAO;EACL,GAAG,SAAS,OAAO,IAAIC,SAAuB,KAAK,GAAGC,SAAmB;EACzE,oBACE,eACA,iBACA,kBACA,YACG;GACH,MAAM,SACJ,eACA,iBACA,kBACA,SAAS,QACX;GACA,OAAQ,kBAAkB,CAAC,CAAS;EACtC;CACF;AACF"}
@@ -5,7 +5,10 @@ import * as Kernel from "./Kernel.js";
5
5
  import * as KernelQuery from "./KernelQuery.js";
6
6
  import * as KernelRefusal from "./KernelRefusal.js";
7
7
  import type * as ReadSet from "./ReadSet.js";
8
+ import * as Redaction from "./Redaction.js";
8
9
  import * as Scheduling from "./Scheduling.js";
10
+ import * as Snapshot from "./Snapshot.js";
11
+ import type { FunctionPath } from "./KernelValues.js";
9
12
  type Modules = Record<string, () => Promise<any>>;
10
13
  /**
11
14
  * One registered component: its schema, its function modules, each loaded once
@@ -48,6 +51,11 @@ export type Outcome = {
48
51
  */
49
52
  export interface HeldAttempt {
50
53
  readonly id: string;
54
+ /**
55
+ * The mutation the attempt runs, whose return shape marks its outcome in an
56
+ * artifact.
57
+ */
58
+ readonly functionPath: FunctionPath;
51
59
  readonly request: string;
52
60
  readonly number: Invocation.Attempt;
53
61
  readonly snapshot: Kernel.Version;
@@ -100,6 +108,7 @@ export interface QueryRun {
100
108
  */
101
109
  export declare class World {
102
110
  private readonly runtime;
111
+ private readonly redaction;
103
112
  readonly components: Map<string, Component>;
104
113
  state: Kernel.State;
105
114
  private opened;
@@ -115,7 +124,24 @@ export declare class World {
115
124
  */
116
125
  private floor;
117
126
  private readonly targets;
118
- constructor(schema: SchemaDefinition<GenericSchema, boolean> | null | undefined, modules: Modules, runtime?: Kernel.KernelRuntime);
127
+ /**
128
+ * The raw secrets this world has seen under a secret schema node. Replay
129
+ * state, kept in memory and never written to an artifact.
130
+ */
131
+ private secrets;
132
+ /**
133
+ * The live registries `Snapshot.contract.live` names, each a count: calls
134
+ * from the test, scheduler walks, function executions (nested and detached
135
+ * ones included) and registered subscribers. Held attempts are `holding`.
136
+ */
137
+ private readonly live;
138
+ /**
139
+ * The latest identity version a subscriber's `authenticate` reached. Each
140
+ * subscriber starts at the epoch, and each identity change advances it, so a
141
+ * restored world never hands out a version its source already used.
142
+ */
143
+ private identityEpoch;
144
+ constructor(schema: SchemaDefinition<GenericSchema, boolean> | null | undefined, modules: Modules, runtime?: Kernel.KernelRuntime, redaction?: Redaction.Policy);
119
145
  register(componentPath: string, schema: SchemaDefinition<GenericSchema, boolean>, modules: Modules, standing?: ReadonlyArray<string>): void;
120
146
  /**
121
147
  * Load every registered module of every component, once, before any function
@@ -156,6 +182,63 @@ export declare class World {
156
182
  readonly time?: number;
157
183
  readonly journal: string | null;
158
184
  }): Promise<QueryRun>;
185
+ /**
186
+ * Run `call`, a call from the test, counted as running until it settles.
187
+ */
188
+ private during;
189
+ /**
190
+ * Run `work` counted in the live registry `registry` until it settles.
191
+ */
192
+ private track;
193
+ /**
194
+ * How many entries each live registry holds now.
195
+ */
196
+ liveCounts(): {
197
+ readonly [K in keyof typeof Snapshot.contract.live]: number;
198
+ };
199
+ /**
200
+ * Count a subscriber the shim's registry created. Subscribers live as long as
201
+ * their test, so the count never falls.
202
+ */
203
+ registerSubscriber(): void;
204
+ /**
205
+ * The identity version a new subscriber starts at.
206
+ */
207
+ currentIdentityEpoch(): number;
208
+ /**
209
+ * The next identity version, for a subscriber whose identity changed.
210
+ */
211
+ nextIdentityEpoch(): number;
212
+ /**
213
+ * The committed state as snapshot bytes: every component's rows and the
214
+ * version that wrote each, the write log, the jobs and their targets, the
215
+ * clock's floor and the identity counters. Each job's world is recorded by
216
+ * name. Two exports of the same state are the same bytes. A world running a
217
+ * call or holding attempts refuses, since a snapshot carries neither.
218
+ */
219
+ exportSnapshot(): Uint8Array;
220
+ /**
221
+ * Replace this world's state with a snapshot's. The world must register the
222
+ * snapshot's components, run nothing, and have committed nothing and hold
223
+ * nothing. Each job's world resolves by name among `worlds`. Bytes whose
224
+ * digest does not match, and state the kernel could not have reached, refuse
225
+ * before anything changes.
226
+ */
227
+ restoreSnapshot(bytes: Uint8Array, options?: {
228
+ readonly worlds?: ReadonlyArray<Invocation.World>;
229
+ readonly secrets?: Redaction.Secrets;
230
+ }): Promise<void>;
231
+ private restore;
232
+ /**
233
+ * Whether `functionPath`'s component exports a Convex function there.
234
+ */
235
+ private exports;
236
+ /**
237
+ * Refuse a snapshot while any live registry `operation` waits on is
238
+ * non-empty, or, restoring, once `version` shows the world committed
239
+ * something of its own.
240
+ */
241
+ private refuseBusy;
159
242
  /**
160
243
  * The committed pending jobs, earliest deadline first.
161
244
  */
@@ -237,8 +320,75 @@ export declare class World {
237
320
  */
238
321
  private publish;
239
322
  private runAction;
323
+ private keepArgs;
324
+ private keepReturns;
325
+ private keepRow;
326
+ /**
327
+ * Where a stored document holds secrets: its table's shape at its root, and
328
+ * for a job's row, its target's argument shape at `args.0`.
329
+ */
330
+ private documentPlacements;
331
+ /**
332
+ * A copy of the raw secrets this world has kept, for a restore of its
333
+ * snapshots. It lives in memory only.
334
+ */
335
+ keptSecrets(): Redaction.Secrets;
336
+ /**
337
+ * The failure report for `thrown`, whatever was thrown, with every kept
338
+ * secret marked. `thrown` itself is never changed.
339
+ */
340
+ redactFailure(thrown: unknown): unknown;
341
+ /**
342
+ * `outcome` as an artifact writes it: a value marked by the shape of what
343
+ * `functionPath` returns, a failure as its report.
344
+ */
345
+ redactOutcome(outcome: Outcome, functionPath?: FunctionPath): Outcome;
346
+ /**
347
+ * A changed document as an artifact writes it, marked by its table's shape.
348
+ */
349
+ redactChange(change: Kernel.Change): Kernel.Change;
350
+ /**
351
+ * The function a subscription's or call's reference names, if it names one.
352
+ */
353
+ functionPathOf(reference: unknown): FunctionPath | undefined;
354
+ /**
355
+ * Read records as an artifact writes them. A key or range bound on a field
356
+ * its table's shape holds secret is the marker, and so is any string holding
357
+ * a kept secret.
358
+ */
359
+ projectReads(reads: ReadonlyArray<ReadSet.Read>): ReadonlyArray<ReadSet.Read>;
360
+ /**
361
+ * A held attempt as an artifact writes it: its read records projected and its
362
+ * outcome marked.
363
+ */
364
+ projectHeld(view: HeldAttempt): HeldAttempt;
365
+ /**
366
+ * What `apply` answered as an artifact writes it: an applied result marked by
367
+ * the shape of what `functionPath` returns, a conflict's next attempt
368
+ * projected, a refusal as its report.
369
+ */
370
+ projectApplied(applied: KernelApply, functionPath: FunctionPath | undefined): KernelApply;
371
+ /**
372
+ * A function's arguments as an artifact writes them, marked by the shape of
373
+ * its arguments. A command log of provider calls (#137's `commands()`) writes
374
+ * each command's input through this.
375
+ */
376
+ projectArguments(functionPath: FunctionPath, args: Value): Value;
240
377
  private schema;
241
378
  private view;
379
+ /**
380
+ * Read one document by ID, as the binary's `get_inner` does for a get and for
381
+ * the document a patch, replace, delete or cancel changes: it reads the ID's
382
+ * interval of the table's `by_id` index, then charges the document if there
383
+ * is one (`crates/database/src/transaction.rs:1188-1250`).
384
+ */
385
+ private readById;
386
+ /**
387
+ * Stage a write to a user table, counted against the execution's limits
388
+ * first. A write over a limit is not staged (`Writes::update`,
389
+ * `crates/database/src/writes.rs:241-310`).
390
+ */
391
+ private stage;
242
392
  private generateId;
243
393
  syscall(op: string, jsonArgs: string): string;
244
394
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Execution.d.ts","sourceRoot":"","sources":["../../src/internal/Execution.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,aAAa,EAClB,KAAK,gBAAgB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