@pulse-compute/wasm-compiler 0.0.0 → 1.0.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.
Files changed (104) hide show
  1. package/README.md +53 -1
  2. package/bin/provider-proof-composition.js +34 -0
  3. package/bin/pulsewasm-extract.js +20 -0
  4. package/package.json +60 -5
  5. package/src/artifacts-dir.js +13 -0
  6. package/src/ast-json.js +52 -0
  7. package/src/build-manifest.js +354 -0
  8. package/src/canonical-api-compiler.js +269 -0
  9. package/src/canonical-native-compiler.js +411 -0
  10. package/src/canonical-native-plan.js +1478 -0
  11. package/src/canonical-project-compiler.js +1224 -0
  12. package/src/canonical-router-compiler.js +25 -0
  13. package/src/cli-intents.js +1235 -0
  14. package/src/cli.js +1927 -0
  15. package/src/codegen/assemblyscript-compile.js +3 -0
  16. package/src/codegen/assemblyscript-core.js +3 -0
  17. package/src/codegen/assemblyscript-shape.js +3 -0
  18. package/src/codegen/assemblyscript-wasm-smoke.js +3 -0
  19. package/src/codegen/backend-capabilities.js +3 -0
  20. package/src/codegen/channel-broadcaster.js +3 -0
  21. package/src/codegen/compiled-handlers.js +3 -0
  22. package/src/codegen/compiled-wasm-runtime.js +3 -0
  23. package/src/codegen/config-references.js +248 -0
  24. package/src/codegen/dispatch-ts.js +145 -0
  25. package/src/codegen/effect-composition.js +331 -0
  26. package/src/codegen/effect-runtime.js +418 -0
  27. package/src/codegen/execution-harness-ts.js +467 -0
  28. package/src/codegen/handler-bindings-ts.js +298 -0
  29. package/src/codegen/handler-library-contracts.js +3 -0
  30. package/src/codegen/host-capabilities.js +3 -0
  31. package/src/codegen/host-runtime-kernel.js +3 -0
  32. package/src/codegen/integrated-compiled-app.js +3 -0
  33. package/src/codegen/json-body.js +3 -0
  34. package/src/codegen/library-sidecars.js +3 -0
  35. package/src/codegen/local-harness-ts.js +453 -0
  36. package/src/codegen/pulse-wrapper.js +217 -0
  37. package/src/codegen/request-result-headers.js +3 -0
  38. package/src/codegen/schema-json-compile.js +3 -0
  39. package/src/codegen/schema-json-sidecar-v2.js +3 -0
  40. package/src/codegen/schema-json-sidecar.js +3 -0
  41. package/src/codegen/streaming-passthrough.js +3 -0
  42. package/src/codegen/wasm-host-abi.js +3 -0
  43. package/src/codegen/wasm-host-bridge.js +3 -0
  44. package/src/compiled-wasm-host-runtime-kv.js +3 -0
  45. package/src/config-resolver.js +813 -0
  46. package/src/crypto-requirement-planner.js +89 -0
  47. package/src/definitions/config-schema.js +14 -0
  48. package/src/definitions/handler-roles.js +14 -0
  49. package/src/definitions/path-grammar.js +14 -0
  50. package/src/definitions/router-api.js +14 -0
  51. package/src/diagnostics/codes.js +14 -0
  52. package/src/diagnostics/reporter.js +14 -0
  53. package/src/diagnostics.js +14 -0
  54. package/src/dispatch-table.js +400 -0
  55. package/src/events/event-emit.js +265 -0
  56. package/src/events/event-topology.js +127 -0
  57. package/src/execution-plan.js +463 -0
  58. package/src/extractor.js +2816 -0
  59. package/src/handler-eval.js +1154 -0
  60. package/src/handler-table.js +326 -0
  61. package/src/index.js +19 -0
  62. package/src/javascript-application-plan.js +181 -0
  63. package/src/kv-provider.js +3 -0
  64. package/src/path-table.js +60 -0
  65. package/src/path.js +14 -0
  66. package/src/patterns/config-define.js +30 -0
  67. package/src/patterns/dependency-call.js +18 -0
  68. package/src/patterns/env-lookup.js +13 -0
  69. package/src/patterns/handler-reference.js +29 -0
  70. package/src/patterns/path-literal.js +35 -0
  71. package/src/patterns/result.js +15 -0
  72. package/src/patterns/router-chain-call.js +50 -0
  73. package/src/patterns/router-construction.js +19 -0
  74. package/src/project/package-reachability.js +782 -0
  75. package/src/project/reachable-graph-builder.js +992 -0
  76. package/src/project/reachable-graph-contract.js +54 -0
  77. package/src/project/reachable-graph-implementation.js +36 -0
  78. package/src/project/router-module-linker.js +710 -0
  79. package/src/project-config-compiler.js +222 -0
  80. package/src/project-target-support.js +500 -0
  81. package/src/provider-toolchain.js +299 -0
  82. package/src/spine/async-surface-normalizer.js +328 -0
  83. package/src/spine/canonical-handler-ir.js +336 -0
  84. package/src/spine/canonical-native-module.js +87 -0
  85. package/src/spine/canonical-native-plan.js +89 -0
  86. package/src/spine/canonical-project.js +76 -0
  87. package/src/spine/canonical-router.js +155 -0
  88. package/src/spine/canonical-source.js +165 -0
  89. package/src/spine/diagnostic-authority.js +290 -0
  90. package/src/spine/equivalence.js +262 -0
  91. package/src/spine/guest-unit-stage.js +87 -0
  92. package/src/spine/handler-ir-emitter.js +455 -0
  93. package/src/spine/handler-ir-managed.js +1598 -0
  94. package/src/spine/handler-ir.js +797 -0
  95. package/src/spine/handler-surface-authority.js +588 -0
  96. package/src/spine/package-operation-seam.js +1015 -0
  97. package/src/spine/pipeline.js +202 -0
  98. package/src/spine/plain-handler-frontend.js +545 -0
  99. package/src/spine/provider-requirement-authority.js +208 -0
  100. package/src/spine/router-control-contract.js +17 -0
  101. package/src/spine/router-handler-frontend.js +514 -0
  102. package/src/spine/router-handler-ir.js +372 -0
  103. package/src/spine/router-topology-frontend.js +638 -0
  104. package/src/stable-id.js +14 -0
@@ -0,0 +1,54 @@
1
+ 'use strict';
2
+
3
+ function loadGraphContract() {
4
+ try {
5
+ return require('@pulse-compute/wasm-contracts/project/reachable-graph');
6
+ } catch (error) {
7
+ if (error && error.code === 'MODULE_NOT_FOUND' && String(error.message).includes('@pulse-compute/wasm-contracts')) {
8
+ return require('../../../contracts/src/project/reachable-graph.js');
9
+ }
10
+ throw error;
11
+ }
12
+ }
13
+
14
+ const graph = loadGraphContract();
15
+
16
+ const COMPILER_REACHABLE_GRAPH_CONTRACT_VERSION = 'pulse.compiler-reachable-graph-contract.v1';
17
+
18
+ function compilerReachableGraphContract() {
19
+ const implementation = graph.defaultReachableGraphImplementationContract();
20
+ const resolver = graph.defaultModuleResolverContract();
21
+ return Object.freeze({
22
+ version: COMPILER_REACHABLE_GRAPH_CONTRACT_VERSION,
23
+ manifestVersion: implementation.manifestVersion,
24
+ identityVersion: implementation.identityVersion,
25
+ resolverVersion: implementation.resolverVersion,
26
+ handlerReferenceVersion: implementation.handlerReferenceVersion,
27
+ authorities: Object.freeze({
28
+ resolverRules: '@pulse-compute/wasm-contracts/project/reachable-graph',
29
+ stableIdentity: '@pulse-compute/wasm-contracts/project/reachable-graph',
30
+ manifestSchema: '@pulse-compute/wasm-contracts/project/reachable-graph',
31
+ handlerSemantics: 'canonical Handler IR',
32
+ packageLowering: 'canonical package-operation seam'
33
+ }),
34
+ implementation: Object.freeze({
35
+ resolverRulesLocked: true,
36
+ manifestSchemaLocked: true,
37
+ deterministicIdentityLocked: true,
38
+ recursiveWalkerImplemented: false,
39
+ importedHandlerCompilationImplemented: false,
40
+ packageReachabilityImplemented: false,
41
+ lifecycleReachabilityImplemented: false,
42
+ eligibilityProjectionImplemented: false,
43
+ cacheImplemented: false,
44
+ bundlerImplemented: false
45
+ }),
46
+ resolverPolicies: resolver.policies,
47
+ consumers: implementation.consumers
48
+ });
49
+ }
50
+
51
+ module.exports = Object.freeze({
52
+ COMPILER_REACHABLE_GRAPH_CONTRACT_VERSION,
53
+ compilerReachableGraphContract
54
+ });
@@ -0,0 +1,36 @@
1
+ 'use strict';
2
+
3
+ const {
4
+ compilerReachableGraphContract
5
+ } = require('./reachable-graph-contract.js');
6
+
7
+ const COMPILER_REACHABLE_GRAPH_IMPLEMENTATION_VERSION = 'pulse.compiler-reachable-graph-contract.v3';
8
+
9
+ function compilerReachableGraphImplementationContract() {
10
+ const legacy = compilerReachableGraphContract();
11
+ return Object.freeze({
12
+ ...legacy,
13
+ version: COMPILER_REACHABLE_GRAPH_IMPLEMENTATION_VERSION,
14
+ implementation: Object.freeze({
15
+ ...legacy.implementation,
16
+ recursiveWalkerImplemented: true,
17
+ importedHandlerCompilationImplemented: true,
18
+ importedRouterCompilationImplemented: true,
19
+ sourceOwnershipImplemented: true,
20
+ runtimeCycleDiagnosticsImplemented: true,
21
+ unsupportedBoundaryDiagnosticsImplemented: true,
22
+ packageReachabilityImplemented: true,
23
+ packageBindingOwnershipImplemented: true,
24
+ packageReExportOwnershipImplemented: true,
25
+ lifecycleReachabilityImplemented: true,
26
+ eligibilityProjectionImplemented: true,
27
+ cacheImplemented: false,
28
+ bundlerImplemented: false
29
+ })
30
+ });
31
+ }
32
+
33
+ module.exports = Object.freeze({
34
+ COMPILER_REACHABLE_GRAPH_IMPLEMENTATION_VERSION,
35
+ compilerReachableGraphImplementationContract
36
+ });