@pulse-compute/wasm-contracts 0.0.0 → 1.0.0-beta.1

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 (96) hide show
  1. package/README.md +34 -2
  2. package/package.json +123 -6
  3. package/src/assets/contracts.js +296 -0
  4. package/src/config/provider-resolution.js +54 -0
  5. package/src/config/runtime-provider-kv.js +73 -0
  6. package/src/config/symbolic-refs.js +192 -0
  7. package/src/crypto/contracts.js +637 -0
  8. package/src/definitions/config-schema.js +30 -0
  9. package/src/definitions/handler-roles.js +66 -0
  10. package/src/definitions/path-grammar.js +11 -0
  11. package/src/definitions/router-api.js +146 -0
  12. package/src/diagnostics/codes.js +42 -0
  13. package/src/diagnostics/reporter.js +20 -0
  14. package/src/diagnostics.js +139 -0
  15. package/src/dispatch-table.js +23 -0
  16. package/src/entities/catalog.d.ts +7 -0
  17. package/src/entities/catalog.js +87 -0
  18. package/src/entities/contracts.d.ts +95 -0
  19. package/src/entities/contracts.js +122 -0
  20. package/src/entities/json-rpc.d.ts +27 -0
  21. package/src/entities/json-rpc.js +69 -0
  22. package/src/entities/runtime.d.ts +67 -0
  23. package/src/entities/runtime.js +288 -0
  24. package/src/events/contracts.js +456 -0
  25. package/src/execution-plan.js +42 -0
  26. package/src/grip/contracts.js +106 -0
  27. package/src/handler/backend-json-request-body.js +58 -0
  28. package/src/handler/beta-lifecycle-golden.js +97 -0
  29. package/src/handler/canonical-native-plan.js +143 -0
  30. package/src/handler/canonical-native-runtime.js +168 -0
  31. package/src/handler/canonical-runtime.js +13 -0
  32. package/src/handler/context.js +131 -0
  33. package/src/handler/ctx-contract.js +71 -0
  34. package/src/handler/doctor-readiness-aggregator.js +67 -0
  35. package/src/handler/effects.js +446 -0
  36. package/src/handler/io-lifecycle.js +134 -0
  37. package/src/handler/lifecycle-authoring-alignment.js +52 -0
  38. package/src/handler/lifecycle-readiness-aggregate.js +93 -0
  39. package/src/handler/reference-node-lifecycle-golden.js +73 -0
  40. package/src/handler/request-json-body.js +147 -0
  41. package/src/handler/runtime-api.js +471 -0
  42. package/src/handler/schema-decode-result.js +135 -0
  43. package/src/handler/schema-response-codec.js +141 -0
  44. package/src/handler/surface-contract.js +594 -0
  45. package/src/handler/types-contract.js +51 -0
  46. package/src/handler-table.js +28 -0
  47. package/src/host/backend-capabilities.js +24 -0
  48. package/src/host/capabilities.js +273 -0
  49. package/src/host/channel-broadcaster.js +60 -0
  50. package/src/host/json-body.js +80 -0
  51. package/src/host/request-result-headers.js +38 -0
  52. package/src/host/streaming-passthrough.js +90 -0
  53. package/src/host/wasm-host-abi.js +154 -0
  54. package/src/index.js +75 -0
  55. package/src/jwt/contracts.js +427 -0
  56. package/src/library/api-surface.js +99 -0
  57. package/src/library/contracts.js +273 -0
  58. package/src/library/manifest.js +317 -0
  59. package/src/library/second-package-owned-lowering.js +39 -0
  60. package/src/library/sidecars.js +147 -0
  61. package/src/logging.js +89 -0
  62. package/src/package/package-contract.js +975 -0
  63. package/src/package/package-contract.schema.json +303 -0
  64. package/src/package/runtime-pulse-live.js +100 -0
  65. package/src/path-table.js +12 -0
  66. package/src/path.js +275 -0
  67. package/src/project/config-factory.js +48 -0
  68. package/src/project/config-plan.js +409 -0
  69. package/src/project/config-runtime.js +46 -0
  70. package/src/project/javascript-application.js +212 -0
  71. package/src/project/javascript-core-capabilities.js +44 -0
  72. package/src/project/native-optimization.js +9 -0
  73. package/src/project/package-ownership.js +242 -0
  74. package/src/project/package-product-projection.js +171 -0
  75. package/src/project/reachable-graph-identity.js +219 -0
  76. package/src/project/reachable-graph-projections.js +279 -0
  77. package/src/project/reachable-graph-resolver.js +303 -0
  78. package/src/project/reachable-graph-v2.js +430 -0
  79. package/src/project/reachable-graph-v2.schema.json +285 -0
  80. package/src/project/reachable-graph.js +199 -0
  81. package/src/project/reachable-graph.schema.json +222 -0
  82. package/src/project/target-support-evidence.js +559 -0
  83. package/src/provider/canonical-provider.js +235 -0
  84. package/src/provider/final-wasm-policy.js +87 -0
  85. package/src/provider/toolchain.js +771 -0
  86. package/src/route-plan.js +43 -0
  87. package/src/schema-json/compile.js +63 -0
  88. package/src/schema-json/contracts.js +10 -0
  89. package/src/schema-json/generic-parser.js +62 -0
  90. package/src/schema-json/registry.js +359 -0
  91. package/src/schema-json/semantic-trace.js +241 -0
  92. package/src/schema-json/v1.js +65 -0
  93. package/src/schema-json/v2.js +110 -0
  94. package/src/sha256.js +104 -0
  95. package/src/spine.js +381 -0
  96. package/src/stable-id.js +142 -0
@@ -0,0 +1,52 @@
1
+ 'use strict';
2
+
3
+ const LIFECYCLE_AUTHORING_ALIGNMENT_VERSION = 'pulsewasm.lifecycle-authoring-alignment.v1';
4
+ const LIFECYCLE_AUTHORING_ALIGNMENT_PHASE = '52';
5
+ const LIFECYCLE_AUTHORING_ALIGNMENT_ARTIFACT = 'lifecycle-authoring-alignment.json';
6
+ const LIFECYCLE_AUTHORING_ALIGNMENT_CONTRACT_ID = 'pulse.lifecycle-authoring-alignment';
7
+
8
+ const LIFECYCLE_AUTHORING_ALIGNMENT_SCOPE = Object.freeze({
9
+ betaApp: 'examples/beta-lifecycle/app.js',
10
+ assetsPackageOutApp: 'examples/assets-package-out/app.js',
11
+ command: 'corepack pnpm run -s test:lifecycle-authoring-alignment',
12
+ publicRouterHeadRequired: true,
13
+ routeEffectMethodConsistencyRequired: true,
14
+ doctorAlignmentOutputRequired: true,
15
+ docsExamplesCurrentRequired: true
16
+ });
17
+
18
+ const LIFECYCLE_AUTHORING_ALIGNMENT_POLICY = Object.freeze({
19
+ purpose: 'make the beta lowerable authoring subset explicit and fail fast when route methods and package-owned lowerable effect methods diverge',
20
+ productionCompletenessRequired: false,
21
+ simpleUserFunctionLoweringIntentional: true,
22
+ routerMethods: Object.freeze(['GET', 'HEAD', 'POST']),
23
+ packageEffectAlignment: Object.freeze({
24
+ assets: Object.freeze({
25
+ rule: 'assets.lookup method must match the owning router route method when route metadata is available',
26
+ diagnostic: 'PULSEWASM_ASSETS_ROUTE_METHOD_MISMATCH',
27
+ fix: 'use router.head(...) with assets.lookup(..., { method: "HEAD" }) or router.get(...) with GET lookups'
28
+ })
29
+ }),
30
+ stillUnsupported: Object.freeze({
31
+ dynamicRouteRegistration: false,
32
+ computedRouterMethods: false,
33
+ dynamicAssetKeys: false,
34
+ dynamicBackends: false,
35
+ asyncAwait: false,
36
+ promises: false,
37
+ arbitraryObjectLowering: false,
38
+ binaryBodies: false,
39
+ streams: false,
40
+ multipart: false,
41
+ uploads: false
42
+ })
43
+ });
44
+
45
+ module.exports = {
46
+ LIFECYCLE_AUTHORING_ALIGNMENT_VERSION,
47
+ LIFECYCLE_AUTHORING_ALIGNMENT_PHASE,
48
+ LIFECYCLE_AUTHORING_ALIGNMENT_ARTIFACT,
49
+ LIFECYCLE_AUTHORING_ALIGNMENT_CONTRACT_ID,
50
+ LIFECYCLE_AUTHORING_ALIGNMENT_SCOPE,
51
+ LIFECYCLE_AUTHORING_ALIGNMENT_POLICY
52
+ };
@@ -0,0 +1,93 @@
1
+ 'use strict';
2
+
3
+ const LIFECYCLE_READINESS_AGGREGATE_VERSION = 'pulsewasm.lifecycle-readiness-aggregate.v1';
4
+ const LIFECYCLE_READINESS_AGGREGATE_PHASE = '53';
5
+ const LIFECYCLE_READINESS_AGGREGATE_ARTIFACT = 'lifecycle-readiness-aggregate.json';
6
+ const LIFECYCLE_READINESS_AGGREGATE_CONTRACT_ID = 'pulse.lifecycle-readiness-aggregate';
7
+
8
+ const LIFECYCLE_READINESS_AGGREGATE_SCOPE = Object.freeze({
9
+ betaApp: 'examples/beta-lifecycle/app.js',
10
+ referenceApp: 'examples/reference-node-lifecycle/app.js',
11
+ assetsPackageOutApp: 'examples/assets-package-out/app.js',
12
+ command: 'corepack pnpm run -s test:lifecycle-readiness',
13
+ doctorCommand: 'pulsewasm doctor examples/beta-lifecycle/app.js',
14
+ nodeProviderReadinessRequired: true,
15
+ fastlyProviderReadinessRequired: true,
16
+ routeReadinessRequired: true,
17
+ packageReadinessRequired: true,
18
+ proofArtifactsAggregated: true,
19
+ productionCompletenessRequired: false
20
+ });
21
+
22
+ const LIFECYCLE_READINESS_STATES = Object.freeze({
23
+ implemented: 'implemented',
24
+ implementedNarrow: 'implemented-narrow',
25
+ implementedNarrowTerminalAssets: 'implemented-narrow-terminal-get-head-text',
26
+ symbolicParity: 'symbolic-parity',
27
+ proofAvailable: 'proof-available',
28
+ planOnly: 'plan-only',
29
+ reserved: 'reserved',
30
+ notRequired: 'not-required',
31
+ notSupported: 'not-supported',
32
+ splitProofRequired: 'split-proof-required',
33
+ unknown: 'unknown'
34
+ });
35
+
36
+ const LIFECYCLE_READINESS_AGGREGATE_POLICY = Object.freeze({
37
+ purpose: 'make pulsewasm doctor the developer-facing source of truth for beta lifecycle route, package, provider, and unsupported-edge readiness',
38
+ productionCompletenessRequired: false,
39
+ betaQualityTarget: true,
40
+ providerSpecificReadinessRequired: true,
41
+ aggregateSourceArtifacts: Object.freeze([
42
+ 'handler-io-lifecycle-plan.json',
43
+ 'reference-node-lifecycle-golden.json',
44
+ 'beta-lifecycle-golden.json',
45
+ 'lifecycle-authoring-alignment.json',
46
+ 'node-live-origin-route-handler-effect-proof.json',
47
+ 'node-compiled-route-handler-effect-bridge.json',
48
+ 'node-backend-json-request-body-proof.json',
49
+ 'fastly-lifecycle-parity-proof.json',
50
+ 'assets-package-owned-lowering-proof.json',
51
+ 'assets-package-out-discovery-proof.json',
52
+ 'assets-compiled-wasm-sidecar-plan.json',
53
+ 'assets-sidecar-compile-link-proof.json',
54
+ 'node-compiled-wasm-assets-lifecycle-proof.json',
55
+ 'fastly-assets-package-out-parity-proof.json'
56
+ ]),
57
+ routeReadinessMustExplain: Object.freeze([
58
+ 'route',
59
+ 'handler',
60
+ 'node backend/live-origin/compiled-Wasm readiness',
61
+ 'Fastly backend/parity readiness',
62
+ 'request body/schema posture',
63
+ 'backend JSON body posture',
64
+ 'assets terminal response posture',
65
+ 'unsupported/reserved body modes',
66
+ 'diagnostics'
67
+ ]),
68
+ packageReadinessMustExplain: Object.freeze([
69
+ 'package-owned lowerer',
70
+ 'package-out discovery',
71
+ 'sidecar readiness',
72
+ 'Node direct/provider readiness',
73
+ 'Node compiled-Wasm readiness',
74
+ 'Fastly parity readiness',
75
+ 'Fastly compiled-Wasm plan-only posture',
76
+ 'reserved binary/stream posture'
77
+ ]),
78
+ knownBreaksRemainExplicit: Object.freeze({
79
+ combinedAppCompiledRouteBridge: 'split-proof-required-assets-handlers-not-yet-in-pass38-compiled-handler-lowerer',
80
+ realAssemblyScriptAssetsSidecarCompileLink: 'dependency-gated-or-implemented',
81
+ fastlyCompiledWasmAssets: 'plan-only'
82
+ })
83
+ });
84
+
85
+ module.exports = {
86
+ LIFECYCLE_READINESS_AGGREGATE_VERSION,
87
+ LIFECYCLE_READINESS_AGGREGATE_PHASE,
88
+ LIFECYCLE_READINESS_AGGREGATE_ARTIFACT,
89
+ LIFECYCLE_READINESS_AGGREGATE_CONTRACT_ID,
90
+ LIFECYCLE_READINESS_AGGREGATE_SCOPE,
91
+ LIFECYCLE_READINESS_AGGREGATE_POLICY,
92
+ LIFECYCLE_READINESS_STATES
93
+ };
@@ -0,0 +1,73 @@
1
+ 'use strict';
2
+
3
+ const REFERENCE_NODE_LIFECYCLE_GOLDEN_VERSION = 'pulsewasm.reference-node-lifecycle-golden.v1';
4
+ const REFERENCE_NODE_LIFECYCLE_GOLDEN_PHASE = '45';
5
+ const REFERENCE_NODE_LIFECYCLE_GOLDEN_ARTIFACT = 'reference-node-lifecycle-golden.json';
6
+ const REFERENCE_NODE_LIFECYCLE_GOLDEN_CONTRACT_ID = 'pulse.reference-node-lifecycle-golden';
7
+
8
+ const REFERENCE_NODE_LIFECYCLE_GOLDEN_SCOPE = Object.freeze({
9
+ referenceApp: 'examples/reference-node-lifecycle/app.js',
10
+ command: 'corepack pnpm run -s test:reference-node-lifecycle',
11
+ publicSurfaceOnly: true,
12
+ compilerOrchestrates: true,
13
+ providersOwnProviderBehavior: true,
14
+ nodeLiveOriginProviderProof: true,
15
+ nodeCompiledWasmResolveResumeBridge: true,
16
+ requestJsonDecodeLifecycle: true,
17
+ schemaEncodeDecodeLifecycle: true,
18
+ backendJsonRequestBodies: true,
19
+ fastlyLifecycleParity: true,
20
+ fastlyPostJsonRequestBodyReadiness: 'plan-only',
21
+ noReferenceAppSpecialPath: true,
22
+ noHiddenEagerWork: true,
23
+ noUserAuthoredAsync: true,
24
+ promises: false,
25
+ asyncAwait: false,
26
+ asyncify: false
27
+ });
28
+
29
+ const REFERENCE_NODE_LIFECYCLE_GOLDEN_POLICY = Object.freeze({
30
+ appBoundary: 'reference app uses only public router/ctx surfaces',
31
+ harnessBoundary: 'tests and proof builders may orchestrate origins/providers/CLI commands',
32
+ requiredCommand: 'corepack pnpm run -s test:reference-node-lifecycle',
33
+ validates: [
34
+ 'CLI plan',
35
+ 'CLI doctor',
36
+ 'CLI build',
37
+ 'artifact freshness',
38
+ 'handler I/O lifecycle artifact',
39
+ 'Node live-origin provider proof',
40
+ 'Node compiled-Wasm resolve/resume bridge',
41
+ 'lazy ctx.req.json',
42
+ 'schema-backed request decode',
43
+ 'schema decode result ergonomics',
44
+ 'schema-backed final response encode',
45
+ 'origin response schema decode',
46
+ 'backend JSON request bodies',
47
+ 'Fastly lifecycle parity',
48
+ 'unsupported body-mode diagnostics',
49
+ 'public-surface-only reference app',
50
+ 'no reference app special path'
51
+ ],
52
+ unsupportedOutOfScope: [
53
+ 'binary bodies',
54
+ 'stream bodies',
55
+ 'async/await lowering',
56
+ 'Promise lowering',
57
+ 'Asyncify',
58
+ 'automatic schema generation',
59
+ 'arbitrary JS object lowering',
60
+ 'multipart/form-data',
61
+ 'uploads',
62
+ 'general object-store semantics'
63
+ ]
64
+ });
65
+
66
+ module.exports = {
67
+ REFERENCE_NODE_LIFECYCLE_GOLDEN_VERSION,
68
+ REFERENCE_NODE_LIFECYCLE_GOLDEN_PHASE,
69
+ REFERENCE_NODE_LIFECYCLE_GOLDEN_ARTIFACT,
70
+ REFERENCE_NODE_LIFECYCLE_GOLDEN_CONTRACT_ID,
71
+ REFERENCE_NODE_LIFECYCLE_GOLDEN_SCOPE,
72
+ REFERENCE_NODE_LIFECYCLE_GOLDEN_POLICY
73
+ };
@@ -0,0 +1,147 @@
1
+ 'use strict';
2
+
3
+ const REQUEST_JSON_BODY_PLAN_VERSION = 'pulsewasm.request-json-body-plan.v1';
4
+ const REQUEST_JSON_BODY_PLAN_PHASE = '39';
5
+ const REQUEST_JSON_BODY_PLAN_ARTIFACT = 'request-json-body-plan.json';
6
+ const REQUEST_JSON_BODY_CONTRACT_ID = 'pulse.request-json-body';
7
+ const NODE_REQUEST_JSON_BODY_PROOF_VERSION = 'pulsewasm.node-request-json-body-proof.v1';
8
+ const NODE_REQUEST_JSON_BODY_PROOF_PHASE = '39';
9
+ const NODE_REQUEST_JSON_BODY_PROOF_ARTIFACT = 'node-request-json-body-proof.json';
10
+ const NODE_REQUEST_JSON_BODY_RUNTIME_VERSION = 'pulsewasm.node-request-json-body-runtime.v1';
11
+
12
+ const REQUEST_JSON_BODY_SCOPE = Object.freeze({
13
+ lazyRequestBodyRead: true,
14
+ routeDemandOnly: true,
15
+ perRequestDecodeCache: true,
16
+ compiledWasmRuntimeImplemented: true,
17
+ nodeCompiledProofImplemented: true,
18
+ providerNetworkFetchRequired: false,
19
+ backendJsonRequestBodyImplemented: false,
20
+ binaryRequestBodyParsing: false,
21
+ streamRequestBodyParsing: false,
22
+ requestBodyEffects: false,
23
+ asyncAwait: false,
24
+ promises: false,
25
+ asyncify: false,
26
+ automaticSchemaGeneration: false,
27
+ arbitraryJsObjectInference: false
28
+ });
29
+
30
+ const REQUEST_JSON_BODY_SURFACE = Object.freeze({
31
+ canonical: 'ctx.req.parse("Schema")',
32
+ schemaSugar: 'ctx.req.json("Schema")',
33
+ genericSugar: 'ctx.req.json()',
34
+ aliases: Object.freeze(['ctx.request.json("Schema")', 'ctx.request.json()']),
35
+ compiledHandle: 'opaque request-json ref',
36
+ schemaMode: 'schema-backed request JSON decode',
37
+ genericMode: 'explicit as-json generic parser fallback'
38
+ });
39
+
40
+ const REQUEST_JSON_BODY_MODES = Object.freeze({
41
+ none: { status: 'implemented-now', description: 'route does not read a request JSON body' },
42
+ schemaJson: { status: 'implemented-compiled-node-proof', surface: 'ctx.req.json("Schema") / ctx.req.parse("Schema")' },
43
+ genericJson: { status: 'implemented-compiled-node-proof', surface: 'ctx.req.json() with explicit as-json fallback config' },
44
+ text: { status: 'reserved-with-diagnostic', surface: 'ctx.req.text()' },
45
+ binary: { status: 'reserved-with-diagnostic', surface: 'ctx.req.arrayBuffer() / binary request body parsing' },
46
+ stream: { status: 'reserved-with-diagnostic', surface: 'ctx.req.stream() / stream request body parsing' }
47
+ });
48
+
49
+ const REQUEST_JSON_BODY_ACCESSORS = Object.freeze([
50
+ 'ok',
51
+ 'errorText',
52
+ 'jsonText',
53
+ 'getString',
54
+ 'getI32',
55
+ 'getU32',
56
+ 'getF64',
57
+ 'getBool',
58
+ 'has'
59
+ ]);
60
+
61
+ const REQUEST_JSON_BODY_RESERVED_ACCESSORS = Object.freeze([
62
+ 'bytes',
63
+ 'stream',
64
+ 'json object materialization',
65
+ 'typed schema-specific accessors',
66
+ 'schema-backed result ergonomics are owned by @pulse-compute/wasm-contracts/handler/schema-decode-result',
67
+ 'mutation APIs',
68
+ 'automatic schema inference'
69
+ ]);
70
+
71
+ const REQUEST_JSON_BODY_LAZY_POLICY = Object.freeze({
72
+ bodyRead: 'route-demand-only',
73
+ parse: 'first ctx.req.json/parse call only',
74
+ cache: 'per-request body/decode refs',
75
+ repeatedReads: 'cached; no reread or reparse',
76
+ noEagerParsing: true,
77
+ noImplicitGenericParserBundle: true,
78
+ missingBody: 'empty text decoded as invalid JSON for json helpers',
79
+ invalidJson: 'inspectable decode result; no throw'
80
+ });
81
+
82
+ const REQUEST_JSON_BODY_DIAGNOSTICS = Object.freeze({
83
+ planMissing: 'PULSEWASM_REQUEST_JSON_BODY_PLAN_MISSING',
84
+ nonLiteralSchema: 'PULSEWASM_REQUEST_JSON_SCHEMA_MUST_BE_LITERAL',
85
+ genericParserRequired: 'PULSEWASM_REQUEST_JSON_GENERIC_PARSER_REQUIRED',
86
+ unsupportedParser: 'PULSEWASM_REQUEST_JSON_GENERIC_PARSER_UNSUPPORTED',
87
+ schemaRequired: 'PULSEWASM_REQUEST_JSON_SCHEMA_REQUIRED',
88
+ accessorUnsupported: 'PULSEWASM_REQUEST_JSON_ACCESSOR_UNSUPPORTED',
89
+ accessorPathMustBeLiteral: 'PULSEWASM_REQUEST_JSON_ACCESSOR_PATH_MUST_BE_LITERAL',
90
+ bodyTextReserved: 'PULSEWASM_REQUEST_JSON_TEXT_BODY_RESERVED',
91
+ binaryReserved: 'PULSEWASM_REQUEST_JSON_BINARY_BODY_RESERVED',
92
+ streamReserved: 'PULSEWASM_REQUEST_JSON_STREAM_BODY_RESERVED',
93
+ compiledSmokeFailed: 'PULSEWASM_REQUEST_JSON_COMPILED_SMOKE_FAILED',
94
+ wasmMissing: 'PULSEWASM_REQUEST_JSON_COMPILED_WASM_MISSING'
95
+ });
96
+
97
+ function defaultRequestJsonBodyPolicy() {
98
+ return {
99
+ contractId: REQUEST_JSON_BODY_CONTRACT_ID,
100
+ artifact: REQUEST_JSON_BODY_PLAN_ARTIFACT,
101
+ phase: REQUEST_JSON_BODY_PLAN_PHASE,
102
+ scope: { ...REQUEST_JSON_BODY_SCOPE },
103
+ surface: JSON.parse(JSON.stringify(REQUEST_JSON_BODY_SURFACE)),
104
+ modes: JSON.parse(JSON.stringify(REQUEST_JSON_BODY_MODES)),
105
+ accessors: [...REQUEST_JSON_BODY_ACCESSORS],
106
+ reservedAccessors: [...REQUEST_JSON_BODY_RESERVED_ACCESSORS],
107
+ lazy: JSON.parse(JSON.stringify(REQUEST_JSON_BODY_LAZY_POLICY)),
108
+ diagnostics: { ...REQUEST_JSON_BODY_DIAGNOSTICS }
109
+ };
110
+ }
111
+
112
+ function defaultNodeRequestJsonBodyProofPolicy() {
113
+ return {
114
+ ...defaultRequestJsonBodyPolicy(),
115
+ provider: 'node',
116
+ proofArtifact: NODE_REQUEST_JSON_BODY_PROOF_ARTIFACT,
117
+ proofVersion: NODE_REQUEST_JSON_BODY_PROOF_VERSION,
118
+ runtimeVersion: NODE_REQUEST_JSON_BODY_RUNTIME_VERSION,
119
+ compiledWasmRuntimeImplemented: true,
120
+ nodeCompiledProofImplemented: true,
121
+ actualNetworkFetch: false,
122
+ userAuthoredAsync: false,
123
+ promises: false,
124
+ asyncAwait: false,
125
+ asyncify: false
126
+ };
127
+ }
128
+
129
+ module.exports = {
130
+ REQUEST_JSON_BODY_PLAN_VERSION,
131
+ REQUEST_JSON_BODY_PLAN_PHASE,
132
+ REQUEST_JSON_BODY_PLAN_ARTIFACT,
133
+ REQUEST_JSON_BODY_CONTRACT_ID,
134
+ NODE_REQUEST_JSON_BODY_PROOF_VERSION,
135
+ NODE_REQUEST_JSON_BODY_PROOF_PHASE,
136
+ NODE_REQUEST_JSON_BODY_PROOF_ARTIFACT,
137
+ NODE_REQUEST_JSON_BODY_RUNTIME_VERSION,
138
+ REQUEST_JSON_BODY_SCOPE,
139
+ REQUEST_JSON_BODY_SURFACE,
140
+ REQUEST_JSON_BODY_MODES,
141
+ REQUEST_JSON_BODY_ACCESSORS,
142
+ REQUEST_JSON_BODY_RESERVED_ACCESSORS,
143
+ REQUEST_JSON_BODY_LAZY_POLICY,
144
+ REQUEST_JSON_BODY_DIAGNOSTICS,
145
+ defaultRequestJsonBodyPolicy,
146
+ defaultNodeRequestJsonBodyProofPolicy
147
+ };