@pulse-compute/cli 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 (191) hide show
  1. package/API.md +572 -0
  2. package/CHANGELOG.md +71 -0
  3. package/README.md +71 -1
  4. package/bin/pulse.js +15 -0
  5. package/bin/pulsewasm-extract.js +22 -0
  6. package/cli-spec.json +575 -0
  7. package/completions/_pulse +106 -0
  8. package/completions/pulse.bash +31 -0
  9. package/completions/pulse.fish +76 -0
  10. package/docs/README.md +77 -0
  11. package/docs/architecture/current-contracts.md +470 -0
  12. package/docs/architecture/overview.md +93 -0
  13. package/docs/architecture/vision.md +515 -0
  14. package/docs/concepts/bodies.md +186 -0
  15. package/docs/concepts/compilation-and-lowering.md +496 -0
  16. package/docs/concepts/contracts-and-providers.md +158 -0
  17. package/docs/concepts/effects-and-continuations.md +300 -0
  18. package/docs/concepts/entities-and-adapters.md +71 -0
  19. package/docs/concepts/package-owned-lowering.md +175 -0
  20. package/docs/concepts/targets-and-hosts.md +70 -0
  21. package/docs/contributing/README.md +38 -0
  22. package/docs/contributing/adding-core-provider.md +315 -0
  23. package/docs/contributing/adding-first-party-lowerer.md +327 -0
  24. package/docs/contributing/entities-lowering.md +91 -0
  25. package/docs/contributing/package-lowerer-contract.md +383 -0
  26. package/docs/contributing/pulse-aware-packages.md +149 -0
  27. package/docs/examples.md +112 -0
  28. package/docs/fixtures/inspect-fetch-composition.selected.json +181 -0
  29. package/docs/getting-started.md +128 -0
  30. package/docs/guides/compatibility-imports.md +60 -0
  31. package/docs/guides/deploying-fastly.md +188 -0
  32. package/docs/guides/deploying-node.md +143 -0
  33. package/docs/guides/events.md +233 -0
  34. package/docs/guides/fastly-capabilities.md +153 -0
  35. package/docs/guides/fetching-and-composition.md +101 -0
  36. package/docs/guides/grip.md +94 -0
  37. package/docs/guides/json-schemas.md +233 -0
  38. package/docs/guides/migrating-from-express.md +192 -0
  39. package/docs/guides/project-lifecycle.md +143 -0
  40. package/docs/guides/routing.md +202 -0
  41. package/docs/guides/troubleshooting.md +47 -0
  42. package/docs/maintainers/README.md +60 -0
  43. package/docs/maintainers/codex-maintainer.md +71 -0
  44. package/docs/maintainers/documentation-deployment.md +147 -0
  45. package/docs/maintainers/documentation-system.md +58 -0
  46. package/docs/maintainers/documentation-versioning.md +65 -0
  47. package/docs/maintainers/maintainer-charter.md +100 -0
  48. package/docs/maintainers/maintenance-policy.json +809 -0
  49. package/docs/maintainers/maintenance-policy.md +124 -0
  50. package/docs/maintainers/npm-publishing.md +154 -0
  51. package/docs/maintainers/plugin-readiness.json +19 -0
  52. package/docs/maintainers/plugin-readiness.md +31 -0
  53. package/docs/maintainers/public-site.md +158 -0
  54. package/docs/maintainers/release-acceptance.md +293 -0
  55. package/docs/maintainers/release-manifest.md +89 -0
  56. package/docs/maintainers/repository-setup.md +145 -0
  57. package/docs/maintainers/scope-policy.md +105 -0
  58. package/docs/maintainers/support-and-triage.md +74 -0
  59. package/docs/maintainers/testing.md +334 -0
  60. package/docs/packages/README.md +60 -0
  61. package/docs/packages/assets.md +85 -0
  62. package/docs/packages/cli.md +190 -0
  63. package/docs/packages/crypto.md +78 -0
  64. package/docs/packages/entities.md +129 -0
  65. package/docs/packages/grip.md +82 -0
  66. package/docs/packages/implementation-packages.md +122 -0
  67. package/docs/packages/jwt.md +55 -0
  68. package/docs/packages/provider-fastly.md +243 -0
  69. package/docs/packages/pulse.md +159 -0
  70. package/docs/packages/runtime.md +265 -0
  71. package/docs/packages/s3.md +101 -0
  72. package/docs/preview-scope.md +142 -0
  73. package/docs/reference/README.md +33 -0
  74. package/docs/reference/cli-spec.json +575 -0
  75. package/docs/reference/cli.md +457 -0
  76. package/docs/reference/compatibility-matrix.md +169 -0
  77. package/docs/reference/diagnostics.md +1872 -0
  78. package/docs/reference/documentation-versions.json +22 -0
  79. package/docs/reference/environment.md +347 -0
  80. package/docs/reference/handler-authoring.md +264 -0
  81. package/docs/reference/project-config.md +582 -0
  82. package/docs/reference/project-config.schema.json +981 -0
  83. package/docs/reference/release-manifest.json +441 -0
  84. package/docs/reference/shell-completion.md +23 -0
  85. package/documentation-site.json +668 -0
  86. package/documentation-versions.json +22 -0
  87. package/examples/01-hello-json/.pulse/.gitignore +3 -0
  88. package/examples/01-hello-json/.pulse/config.ts +16 -0
  89. package/examples/01-hello-json/README.md +119 -0
  90. package/examples/01-hello-json/package.json +20 -0
  91. package/examples/01-hello-json/src/index.ts +9 -0
  92. package/examples/01-hello-json/tests/pulse.harness.ts +22 -0
  93. package/examples/01-hello-json/tsconfig.json +14 -0
  94. package/examples/02-request-schema/.pulse/.gitignore +3 -0
  95. package/examples/02-request-schema/.pulse/config.ts +17 -0
  96. package/examples/02-request-schema/README.md +145 -0
  97. package/examples/02-request-schema/package.json +20 -0
  98. package/examples/02-request-schema/src/index.ts +18 -0
  99. package/examples/02-request-schema/src/schemas.ts +20 -0
  100. package/examples/02-request-schema/tests/pulse.harness.ts +37 -0
  101. package/examples/02-request-schema/tsconfig.json +14 -0
  102. package/examples/03-fetch-composition/.pulse/.gitignore +3 -0
  103. package/examples/03-fetch-composition/.pulse/config.ts +31 -0
  104. package/examples/03-fetch-composition/README.md +210 -0
  105. package/examples/03-fetch-composition/package.json +20 -0
  106. package/examples/03-fetch-composition/src/index.ts +60 -0
  107. package/examples/03-fetch-composition/tests/pulse.harness.ts +47 -0
  108. package/examples/03-fetch-composition/tsconfig.json +14 -0
  109. package/examples/05-fastly-capabilities/.pulse/.gitignore +3 -0
  110. package/examples/05-fastly-capabilities/.pulse/config.ts +57 -0
  111. package/examples/05-fastly-capabilities/README.md +257 -0
  112. package/examples/05-fastly-capabilities/package.json +22 -0
  113. package/examples/05-fastly-capabilities/src/index.ts +55 -0
  114. package/examples/05-fastly-capabilities/tests/pulse.harness.ts +66 -0
  115. package/examples/05-fastly-capabilities/tsconfig.json +14 -0
  116. package/examples/07-opaque-proxy/.pulse/.gitignore +3 -0
  117. package/examples/07-opaque-proxy/.pulse/config.ts +38 -0
  118. package/examples/07-opaque-proxy/README.md +150 -0
  119. package/examples/07-opaque-proxy/package.json +21 -0
  120. package/examples/07-opaque-proxy/src/index.ts +9 -0
  121. package/examples/07-opaque-proxy/tests/pulse.harness.ts +25 -0
  122. package/examples/07-opaque-proxy/tsconfig.json +14 -0
  123. package/examples/09-router-lowering/.pulse/.gitignore +3 -0
  124. package/examples/09-router-lowering/.pulse/config.ts +22 -0
  125. package/examples/09-router-lowering/README.md +287 -0
  126. package/examples/09-router-lowering/package.json +22 -0
  127. package/examples/09-router-lowering/src/index.ts +65 -0
  128. package/examples/09-router-lowering/tests/pulse.harness.ts +91 -0
  129. package/examples/09-router-lowering/tsconfig.json +14 -0
  130. package/examples/10-entities-tools/.pulse/.gitignore +4 -0
  131. package/examples/10-entities-tools/.pulse/config.ts +23 -0
  132. package/examples/10-entities-tools/README.md +165 -0
  133. package/examples/10-entities-tools/package.json +21 -0
  134. package/examples/10-entities-tools/src/handlers.ts +15 -0
  135. package/examples/10-entities-tools/src/index.ts +31 -0
  136. package/examples/10-entities-tools/src/schemas.ts +18 -0
  137. package/examples/10-entities-tools/tests/pulse.harness.ts +40 -0
  138. package/examples/10-entities-tools/tools-facade.cjs +158 -0
  139. package/examples/10-entities-tools/tsconfig.json +14 -0
  140. package/examples/11-events/.pulse/.gitignore +4 -0
  141. package/examples/11-events/.pulse/config.ts +24 -0
  142. package/examples/11-events/README.md +194 -0
  143. package/examples/11-events/package.json +20 -0
  144. package/examples/11-events/src/index.ts +27 -0
  145. package/examples/11-events/src/schemas.ts +19 -0
  146. package/examples/11-events/tests/pulse.harness.ts +34 -0
  147. package/examples/11-events/tsconfig.json +15 -0
  148. package/examples/12-mcp-proxy/.pulse/.gitignore +3 -0
  149. package/examples/12-mcp-proxy/.pulse/config.ts +25 -0
  150. package/examples/12-mcp-proxy/README.md +149 -0
  151. package/examples/12-mcp-proxy/package.json +20 -0
  152. package/examples/12-mcp-proxy/src/index.ts +17 -0
  153. package/examples/12-mcp-proxy/tests/pulse.harness.ts +29 -0
  154. package/examples/12-mcp-proxy/tsconfig.json +14 -0
  155. package/examples/13-jwt-es256/.pulse/config.ts +19 -0
  156. package/examples/13-jwt-es256/README.md +195 -0
  157. package/examples/13-jwt-es256/package.json +21 -0
  158. package/examples/13-jwt-es256/src/index.ts +21 -0
  159. package/examples/13-jwt-es256/tests/pulse.harness.ts +54 -0
  160. package/examples/13-jwt-es256/tsconfig.json +14 -0
  161. package/examples/README.md +36 -0
  162. package/package.json +66 -6
  163. package/project-config.schema.json +981 -0
  164. package/release-manifest.json +441 -0
  165. package/src/command-spec.js +279 -0
  166. package/src/completion.js +113 -0
  167. package/src/diagnostics.js +350 -0
  168. package/src/documentation.js +45 -0
  169. package/src/index.d.ts +133 -0
  170. package/src/index.js +15 -0
  171. package/src/internal/command-executor.d.ts +29 -0
  172. package/src/internal/command-executor.js +143 -0
  173. package/src/internal/command-plan.d.ts +9 -0
  174. package/src/internal/command-plan.js +73 -0
  175. package/src/internal/command-reporter.d.ts +15 -0
  176. package/src/internal/command-reporter.js +133 -0
  177. package/src/internal/command-request.d.ts +35 -0
  178. package/src/internal/command-request.js +154 -0
  179. package/src/internal/node-http.js +54 -0
  180. package/src/internal/project-context.d.ts +66 -0
  181. package/src/internal/project-context.js +175 -0
  182. package/src/project-config-reference.js +4 -0
  183. package/src/project-config-schema.d.ts +23 -0
  184. package/src/project-config-schema.js +271 -0
  185. package/src/project-config.js +724 -0
  186. package/src/project-execution.js +2946 -0
  187. package/src/provider-drivers.js +3 -0
  188. package/src/target-support.js +3 -0
  189. package/src/typescript-module-loader.js +269 -0
  190. package/src/workflow.js +78 -0
  191. package/src/workspace.js +82 -0
package/README.md CHANGED
@@ -1,3 +1,73 @@
1
1
  # @pulse-compute/cli
2
2
 
3
- This is an inert namespace-bootstrap package. It contains no executable code.
3
+ <!-- pulse-package-status:start -->
4
+ > **Support tier:** Canonical application surface<br>
5
+ > **Audience:** Pulse application authors, CI workflows, and tooling integrations.<br>
6
+ > **Install directly:** Yes. Install the package globally or as a project development dependency.<br>
7
+ > **Supported entry points:** `pulse binary`, `@pulse-compute/cli`, `@pulse-compute/cli/workflow`, `@pulse-compute/cli/project-config`, `@pulse-compute/cli/project-execution`, `@pulse-compute/cli/project-config-schema`, `@pulse-compute/cli/diagnostics`, `@pulse-compute/cli/project-config.schema.json`, `@pulse-compute/cli/cli-spec.json`, `@pulse-compute/cli/release-manifest.json`, `@pulse-compute/cli/documentation-versions.json`, `@pulse-compute/cli/documentation-site.json`<br>
8
+ > **Stability:** Supported Beta workflow and project-configuration contract.<br>
9
+ > **npm:** [`@pulse-compute/cli`](https://www.npmjs.com/package/@pulse-compute/cli)<br>
10
+ > **Canonical documentation:** [Package guide](https://pulsecompute.io/v1.0.0-beta.2/packages/cli/)
11
+ >
12
+ > This release-status block is generated from the synchronized `Pulse 1.0.0-beta.2` package policy.
13
+ <!-- pulse-package-status:end -->
14
+
15
+ The public CLI and conventional `@pulse-compute/pulse` application root are
16
+ both part of the synchronized `1.0.0-beta.2` release set. Validate the generated
17
+ workflow from the repository or the exact packed acceptance set:
18
+
19
+ ```bash
20
+ pnpm pulse -- init ./my-app
21
+ cd ./my-app
22
+ npm install
23
+ pulse doctor
24
+ pulse test
25
+ pulse inspect
26
+ pulse dev
27
+ pulse build
28
+ ```
29
+
30
+ `pulse init` writes exact catalog package versions and does not invoke a package manager. Project commands discover one authoritative `.pulse/config.ts` workspace, select a flat profile, compile the same canonical handler contract, and realize Node, Fastly, or compile-only `none`.
31
+
32
+ ## Supported programmatic entries
33
+
34
+ - package root for `defineConfig`, public types, diagnostics, and workflow integration;
35
+ - `workflow` for command parsing/execution;
36
+ - `project-config` for discovery and normalization;
37
+ - `project-execution` for canonical command orchestration;
38
+ - `diagnostics` for stable public descriptors and mappings.
39
+
40
+ Repository fixture/profile/task flags are not part of installed help or the public contract.
41
+
42
+ ## JavaScript support and eligibility
43
+
44
+ Profiles may select `target: 'javascript'` with either the Node or Fastly
45
+ provider. Both targets execute the live Router/context and package
46
+ implementations, and both satisfy their declared full-target-support gates.
47
+
48
+ `pulse inspect` and `pulse doctor` expose general target availability separately
49
+ from deterministic project eligibility and loader observations. `pulse test`
50
+ and `pulse dev` execute only when the reachable application, capabilities,
51
+ provider requirements, and packages are eligible. Fastly identifies this local
52
+ mode as provider emulation; it is not Node-provider fallback.
53
+
54
+ `pulse compile` remains provider-neutral while recording the configured
55
+ JavaScript target and static eligibility evidence in `pulse-compile.json`.
56
+ `pulse build` emits a deterministic Node or Fastly source package. Fastly output
57
+ also carries exact downstream compiler pins and deployment-candidate metadata;
58
+ the release gate compiles that closure to a runtime Wasm without deploying or
59
+ publishing it. Pending or blocked projects never switch to Native execution:
60
+ `automaticFallback` is always false.
61
+
62
+ ## Included documentation
63
+
64
+ - [Documentation index](./docs/README.md)
65
+ - [Package guide](./docs/packages/cli.md)
66
+ - [CLI reference](./docs/reference/cli.md)
67
+ - [Project configuration](./docs/reference/project-config.md)
68
+ - [Diagnostics](./docs/reference/diagnostics.md)
69
+ - [Environment variables](./docs/reference/environment.md)
70
+ - [Canonical API](./API.md)
71
+ - [Runnable examples](./examples/README.md)
72
+
73
+ These references and examples ship in the npm tarball and are checked after packing.
package/bin/pulse.js ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const { runPulseWorkflowCli } = require('../src/workflow.js');
5
+
6
+ runPulseWorkflowCli(process.argv.slice(2), {
7
+ cwd: process.cwd(),
8
+ stdout: process.stdout,
9
+ stderr: process.stderr
10
+ }).then((result) => {
11
+ process.exitCode = result.status || 0;
12
+ }).catch((error) => {
13
+ process.stderr.write(`${error && error.stack ? error.stack : String(error)}\n`);
14
+ process.exitCode = 1;
15
+ });
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const path = require('node:path');
5
+ const { runCli } = require('@pulse-compute/wasm-compiler/cli');
6
+ const { getDefaultArtifactsDir } = require('@pulse-compute/wasm-build-support/artifacts-dir');
7
+ const compilerRoot = path.resolve(require.resolve('@pulse-compute/wasm-compiler'), '..', '..');
8
+ const providerProofs = require(path.join(compilerRoot, 'bin', 'provider-proof-composition.js'));
9
+
10
+ runCli(process.argv.slice(2), {
11
+ cwd: process.cwd(),
12
+ stdout: process.stdout,
13
+ stderr: process.stderr,
14
+ defaultOutDir: getDefaultArtifactsDir(process.cwd()),
15
+ providerProofs,
16
+ exitOnComplete: true
17
+ }).then(() => {
18
+ process.exit(process.exitCode || 0);
19
+ }).catch((error) => {
20
+ process.stderr.write(`${error && error.stack ? error.stack : String(error)}\n`);
21
+ process.exit(1);
22
+ });
package/cli-spec.json ADDED
@@ -0,0 +1,575 @@
1
+ {
2
+ "schemaVersion": "pulse.cli-command-spec.v5",
3
+ "cliVersion": "1.0.0-beta.2",
4
+ "completionShells": [
5
+ "bash",
6
+ "zsh",
7
+ "fish"
8
+ ],
9
+ "metaInvocations": [
10
+ {
11
+ "syntax": "pulse --help | pulse -h | pulse help",
12
+ "description": "Print public help."
13
+ },
14
+ {
15
+ "syntax": "pulse --version | pulse -v | pulse version",
16
+ "description": "Print the installed CLI package version."
17
+ },
18
+ {
19
+ "syntax": "pulse completion <bash|zsh|fish>",
20
+ "description": "Print a shell completion script generated from the public command specification."
21
+ }
22
+ ],
23
+ "globalOptions": [
24
+ {
25
+ "id": "help",
26
+ "key": "help",
27
+ "flags": [
28
+ {
29
+ "name": "--help"
30
+ },
31
+ {
32
+ "name": "-h"
33
+ }
34
+ ],
35
+ "kind": "boolean",
36
+ "description": "Print public CLI help and exit."
37
+ },
38
+ {
39
+ "id": "json",
40
+ "key": "json",
41
+ "flags": [
42
+ {
43
+ "name": "--json"
44
+ }
45
+ ],
46
+ "kind": "boolean",
47
+ "description": "Emit machine-readable JSON. pulse dev emits one JSON event per line."
48
+ },
49
+ {
50
+ "id": "dry-run",
51
+ "key": "dryRun",
52
+ "flags": [
53
+ {
54
+ "name": "--dry-run"
55
+ },
56
+ {
57
+ "name": "--plan"
58
+ }
59
+ ],
60
+ "kind": "boolean",
61
+ "description": "Resolve and report the command plan without executing it."
62
+ }
63
+ ],
64
+ "commands": [
65
+ {
66
+ "name": "init",
67
+ "summary": "Create a conventional .pulse workspace with an async Pulse application and dedicated test harness.",
68
+ "usage": [
69
+ "pulse init [directory] [--name <package-name>] [--force]"
70
+ ],
71
+ "positionals": [
72
+ {
73
+ "name": "directory",
74
+ "key": "target",
75
+ "description": "Target directory. Defaults to the current directory."
76
+ }
77
+ ],
78
+ "options": [
79
+ {
80
+ "id": "force",
81
+ "key": "force",
82
+ "flags": [
83
+ {
84
+ "name": "--force"
85
+ }
86
+ ],
87
+ "kind": "boolean",
88
+ "description": "Allow generated files to replace entries in a non-empty target directory."
89
+ },
90
+ {
91
+ "id": "name",
92
+ "key": "name",
93
+ "flags": [
94
+ {
95
+ "name": "--name"
96
+ }
97
+ ],
98
+ "kind": "value",
99
+ "valueName": "<package-name>",
100
+ "description": "Set the generated npm package name."
101
+ }
102
+ ],
103
+ "examples": [
104
+ "pulse init ./my-pulse-app",
105
+ "pulse init ./edge-app --name @example/edge-app"
106
+ ],
107
+ "diagnostics": [
108
+ "PULSE_INIT_NOT_EMPTY",
109
+ "PULSE_INIT_FILE_EXISTS",
110
+ "PULSE_PROVIDER_UNSUPPORTED"
111
+ ],
112
+ "outputs": [
113
+ "Human output lists generated files and next steps.",
114
+ "With --json, emits one initialization result object."
115
+ ],
116
+ "sideEffects": [
117
+ "Creates .pulse/config.ts, an async Pulse application, a dedicated test harness, package scripts, and documentation.",
118
+ "Does not install dependencies or run npm, pnpm, or any network operation."
119
+ ],
120
+ "exit": "0 on success; 2 for invalid usage, provider selection, or unsafe overwrite conditions."
121
+ },
122
+ {
123
+ "name": "doctor",
124
+ "summary": "Audit project shape, compilation, schemas, provider bindings, output safety, and required tools.",
125
+ "usage": [
126
+ "pulse doctor [directory] [--profile <name>] [--strict]"
127
+ ],
128
+ "positionals": [
129
+ {
130
+ "name": "directory",
131
+ "key": "directory",
132
+ "description": "Project discovery start. Defaults to the current directory."
133
+ }
134
+ ],
135
+ "options": [
136
+ {
137
+ "id": "strict",
138
+ "key": "strict",
139
+ "flags": [
140
+ {
141
+ "name": "--strict"
142
+ }
143
+ ],
144
+ "kind": "boolean",
145
+ "description": "Treat doctor warnings as failed checks."
146
+ },
147
+ {
148
+ "id": "profile",
149
+ "key": "profile",
150
+ "flags": [
151
+ {
152
+ "name": "--profile"
153
+ }
154
+ ],
155
+ "kind": "value",
156
+ "valueName": "<profile>",
157
+ "description": "Select a project profile. Precedence: --profile, PULSE_PROFILE, pulse.defaultProfile."
158
+ }
159
+ ],
160
+ "examples": [
161
+ "pulse doctor ./my-pulse-app",
162
+ "pulse doctor ./edge-app --strict --json"
163
+ ],
164
+ "diagnostics": [
165
+ "PULSE_CONFIG_NOT_FOUND",
166
+ "PULSE_PROJECT_COMPILE_FAILED",
167
+ "PULSE_NODE_VERSION_UNSUPPORTED",
168
+ "PULSE_CANONICAL_NATIVE_COMPILE_FAILED"
169
+ ],
170
+ "outputs": [
171
+ "Human output prints every check.",
172
+ "With --json, emits one completed audit object including failed and warning checks."
173
+ ],
174
+ "sideEffects": [
175
+ "Reads and compiles the project.",
176
+ "Does not write the build output."
177
+ ],
178
+ "exit": "0 when the audit passes; 1 when a completed audit contains failed checks; 2–5 only when the audit command itself cannot be completed."
179
+ },
180
+ {
181
+ "name": "inspect",
182
+ "summary": "Report canonical compiler, schema, effect, continuation, capability, provider, and build-mode details.",
183
+ "usage": [
184
+ "pulse inspect [directory] [--profile <name>]",
185
+ "pulse inspect --artifact <file.json>"
186
+ ],
187
+ "positionals": [
188
+ {
189
+ "name": "directory",
190
+ "key": "directory",
191
+ "description": "Project discovery start. Defaults to the current directory."
192
+ }
193
+ ],
194
+ "options": [
195
+ {
196
+ "id": "profile",
197
+ "key": "profile",
198
+ "flags": [
199
+ {
200
+ "name": "--profile"
201
+ }
202
+ ],
203
+ "kind": "value",
204
+ "valueName": "<profile>",
205
+ "description": "Select a project profile. Precedence: --profile, PULSE_PROFILE, pulse.defaultProfile."
206
+ },
207
+ {
208
+ "id": "artifact",
209
+ "key": "artifact",
210
+ "flags": [
211
+ {
212
+ "name": "--artifact"
213
+ }
214
+ ],
215
+ "kind": "value",
216
+ "valueName": "<file.json>",
217
+ "description": "Inspect an existing JSON build or compiler artifact instead of a project."
218
+ }
219
+ ],
220
+ "examples": [
221
+ "pulse inspect ./my-pulse-app --json",
222
+ "pulse inspect --artifact ./dist/pulse-build.json"
223
+ ],
224
+ "diagnostics": [
225
+ "PULSE_CONFIG_NOT_FOUND",
226
+ "PULSE_PROJECT_COMPILE_FAILED",
227
+ "PULSE_CANONICAL_COMPILE_FAILED"
228
+ ],
229
+ "outputs": [
230
+ "Human output prints a compact project/compiler summary.",
231
+ "With --json, emits one inspection or artifact object."
232
+ ],
233
+ "sideEffects": [
234
+ "Compiles and validates the project in memory.",
235
+ "Does not write the build output."
236
+ ],
237
+ "exit": "0 on success; 2–5 according to the emitted stable diagnostic."
238
+ },
239
+ {
240
+ "name": "test",
241
+ "summary": "Run configured cases through the selected provider local-conformance runtime.",
242
+ "usage": [
243
+ "pulse test [directory] [--profile <name>] [--case <name>]"
244
+ ],
245
+ "positionals": [
246
+ {
247
+ "name": "directory",
248
+ "key": "directory",
249
+ "description": "Project discovery start. Defaults to the current directory."
250
+ }
251
+ ],
252
+ "options": [
253
+ {
254
+ "id": "profile",
255
+ "key": "profile",
256
+ "flags": [
257
+ {
258
+ "name": "--profile"
259
+ }
260
+ ],
261
+ "kind": "value",
262
+ "valueName": "<profile>",
263
+ "description": "Select a project profile. Precedence: --profile, PULSE_PROFILE, pulse.defaultProfile."
264
+ },
265
+ {
266
+ "id": "case",
267
+ "key": "caseName",
268
+ "flags": [
269
+ {
270
+ "name": "--case"
271
+ }
272
+ ],
273
+ "kind": "value",
274
+ "valueName": "<name>",
275
+ "description": "Run one named project test case."
276
+ }
277
+ ],
278
+ "examples": [
279
+ "pulse test ./my-pulse-app",
280
+ "pulse test ./my-pulse-app --case smoke --json"
281
+ ],
282
+ "diagnostics": [
283
+ "PULSE_TEST_PROVIDER_REQUIRED",
284
+ "PULSE_PROVIDER_CAPABILITY_MISSING",
285
+ "PULSE_SCHEMA_DECODE"
286
+ ],
287
+ "outputs": [
288
+ "Human output uses TAP-like case lines and a summary.",
289
+ "With --json, emits one test-run object; expected stable errors remain inside their case results."
290
+ ],
291
+ "sideEffects": [
292
+ "Compiles the project and executes configured deterministic or live fixtures.",
293
+ "Does not write the build output."
294
+ ],
295
+ "exit": "0 when all selected cases pass; 1 when the completed test run has failed cases; 2–5 when setup, compilation, runtime, or toolchain execution fails before a normal result."
296
+ },
297
+ {
298
+ "name": "dev",
299
+ "summary": "Start the foreground local server with the selected provider conformance runtime.",
300
+ "usage": [
301
+ "pulse dev [directory] [--profile <name>] [--host <host>] [--port <port>] [--watch|--no-watch] [--once]"
302
+ ],
303
+ "positionals": [
304
+ {
305
+ "name": "directory",
306
+ "key": "directory",
307
+ "description": "Project discovery start. Defaults to the current directory."
308
+ }
309
+ ],
310
+ "options": [
311
+ {
312
+ "id": "once",
313
+ "key": "once",
314
+ "flags": [
315
+ {
316
+ "name": "--once"
317
+ }
318
+ ],
319
+ "kind": "boolean",
320
+ "description": "Close the development server after the first completed request."
321
+ },
322
+ {
323
+ "id": "watch",
324
+ "key": "watch",
325
+ "flags": [
326
+ {
327
+ "name": "--watch",
328
+ "value": true
329
+ },
330
+ {
331
+ "name": "--no-watch",
332
+ "value": false
333
+ }
334
+ ],
335
+ "kind": "boolean-value",
336
+ "description": "Enable or disable entry and schema dependency watching. Watching is enabled by default."
337
+ },
338
+ {
339
+ "id": "profile",
340
+ "key": "profile",
341
+ "flags": [
342
+ {
343
+ "name": "--profile"
344
+ }
345
+ ],
346
+ "kind": "value",
347
+ "valueName": "<profile>",
348
+ "description": "Select a project profile. Precedence: --profile, PULSE_PROFILE, pulse.defaultProfile."
349
+ },
350
+ {
351
+ "id": "host",
352
+ "key": "host",
353
+ "flags": [
354
+ {
355
+ "name": "--host"
356
+ }
357
+ ],
358
+ "kind": "value",
359
+ "valueName": "<host>",
360
+ "description": "Override the development listen host."
361
+ },
362
+ {
363
+ "id": "port",
364
+ "key": "port",
365
+ "flags": [
366
+ {
367
+ "name": "--port"
368
+ }
369
+ ],
370
+ "kind": "value",
371
+ "valueName": "<port>",
372
+ "description": "Override the development listen port. Use 0 to request an ephemeral port."
373
+ }
374
+ ],
375
+ "examples": [
376
+ "pulse dev ./my-pulse-app",
377
+ "pulse dev ./my-pulse-app --port 0 --once --json"
378
+ ],
379
+ "diagnostics": [
380
+ "PULSE_DEV_PROVIDER_UNSUPPORTED",
381
+ "PULSE_REQUEST_BODY_TOO_LARGE",
382
+ "PULSE_FETCH_NETWORK"
383
+ ],
384
+ "outputs": [
385
+ "Human output reports the ready URL and reload or error messages.",
386
+ "With --json, stdout is newline-delimited JSON events: compiled, ready, reloaded, request, compile-error, and request-error. It is not one enclosing JSON document."
387
+ ],
388
+ "sideEffects": [
389
+ "Binds a foreground HTTP listener.",
390
+ "Watches the entry and schema dependency graph by default.",
391
+ "Configuration-file changes require restarting the command."
392
+ ],
393
+ "exit": "0 after a normal server close; 2–5 when setup, compilation, provider, runtime, or toolchain initialization fails."
394
+ },
395
+ {
396
+ "name": "compile",
397
+ "summary": "Compile the canonical project into provider-neutral Pulse-owned WebAssembly.",
398
+ "usage": [
399
+ "pulse compile [directory] [--profile <name>] [--out <dir>] [--clean|--no-clean] [--experimental-native-size]"
400
+ ],
401
+ "positionals": [
402
+ {
403
+ "name": "directory",
404
+ "key": "directory",
405
+ "description": "Project discovery start. Defaults to the current directory."
406
+ }
407
+ ],
408
+ "options": [
409
+ {
410
+ "id": "clean",
411
+ "key": "clean",
412
+ "flags": [
413
+ {
414
+ "name": "--clean",
415
+ "value": true
416
+ },
417
+ {
418
+ "name": "--no-clean",
419
+ "value": false
420
+ }
421
+ ],
422
+ "kind": "boolean-value",
423
+ "description": "Remove or preserve the selected output directory before writing artifacts. Cleaning is enabled by default."
424
+ },
425
+ {
426
+ "id": "experimental-native-size",
427
+ "key": "experimentalNativeSize",
428
+ "flags": [
429
+ {
430
+ "name": "--experimental-native-size"
431
+ }
432
+ ],
433
+ "kind": "boolean",
434
+ "description": "Experimentally optimize Native Wasm for size. JavaScript build targets reject this flag."
435
+ },
436
+ {
437
+ "id": "profile",
438
+ "key": "profile",
439
+ "flags": [
440
+ {
441
+ "name": "--profile"
442
+ }
443
+ ],
444
+ "kind": "value",
445
+ "valueName": "<profile>",
446
+ "description": "Select a project profile. Precedence: --profile, PULSE_PROFILE, pulse.defaultProfile."
447
+ },
448
+ {
449
+ "id": "out",
450
+ "key": "outDir",
451
+ "flags": [
452
+ {
453
+ "name": "--out"
454
+ }
455
+ ],
456
+ "kind": "value",
457
+ "valueName": "<dir>",
458
+ "description": "Override the project-relative artifact output directory."
459
+ }
460
+ ],
461
+ "examples": [
462
+ "pulse compile ./my-pulse-app",
463
+ "pulse compile ./edge-app --out ./dist --json",
464
+ "pulse compile ./edge-app --experimental-native-size"
465
+ ],
466
+ "diagnostics": [
467
+ "PULSE_BUILD_OUT_UNSAFE",
468
+ "PULSE_CANONICAL_NATIVE_PLAN_FAILED",
469
+ "PULSE_CANONICAL_NATIVE_COMPILE_FAILED"
470
+ ],
471
+ "outputs": [
472
+ "Writes pulse-compile.json, the canonical program, native plan, generated AssemblyScript, compact Wasm, WAT, and native manifest.",
473
+ "The output is provider-neutral and does not package a deployment provider runtime.",
474
+ "Experimental size builds record the exact non-default Native compiler optimization settings.",
475
+ "With --json, emits one compile result object containing exact artifact paths and native metadata."
476
+ ],
477
+ "sideEffects": [
478
+ "Cleans the output directory by default.",
479
+ "Invokes the lockfile-pinned AssemblyScript compiler.",
480
+ "Refuses absolute, parent-traversal, and symbolic-link traversal outside the project root."
481
+ ],
482
+ "exit": "0 on success; 2–5 according to the emitted stable diagnostic."
483
+ },
484
+ {
485
+ "name": "build",
486
+ "summary": "Compile the canonical project and realize the deployment provider selected by the active project profile.",
487
+ "usage": [
488
+ "pulse build [directory] [--profile <name>] [--out <dir>] [--clean|--no-clean] [--experimental-native-size]"
489
+ ],
490
+ "positionals": [
491
+ {
492
+ "name": "directory",
493
+ "key": "directory",
494
+ "description": "Project discovery start. Defaults to the current directory."
495
+ }
496
+ ],
497
+ "options": [
498
+ {
499
+ "id": "clean",
500
+ "key": "clean",
501
+ "flags": [
502
+ {
503
+ "name": "--clean",
504
+ "value": true
505
+ },
506
+ {
507
+ "name": "--no-clean",
508
+ "value": false
509
+ }
510
+ ],
511
+ "kind": "boolean-value",
512
+ "description": "Remove or preserve the selected output directory before writing artifacts. Cleaning is enabled by default."
513
+ },
514
+ {
515
+ "id": "experimental-native-size",
516
+ "key": "experimentalNativeSize",
517
+ "flags": [
518
+ {
519
+ "name": "--experimental-native-size"
520
+ }
521
+ ],
522
+ "kind": "boolean",
523
+ "description": "Experimentally optimize Native Wasm for size. JavaScript build targets reject this flag."
524
+ },
525
+ {
526
+ "id": "profile",
527
+ "key": "profile",
528
+ "flags": [
529
+ {
530
+ "name": "--profile"
531
+ }
532
+ ],
533
+ "kind": "value",
534
+ "valueName": "<profile>",
535
+ "description": "Select a project profile. Precedence: --profile, PULSE_PROFILE, pulse.defaultProfile."
536
+ },
537
+ {
538
+ "id": "out",
539
+ "key": "outDir",
540
+ "flags": [
541
+ {
542
+ "name": "--out"
543
+ }
544
+ ],
545
+ "kind": "value",
546
+ "valueName": "<dir>",
547
+ "description": "Override the project-relative artifact output directory."
548
+ }
549
+ ],
550
+ "examples": [
551
+ "pulse build ./my-pulse-app",
552
+ "pulse build ./edge-app --out ./dist --json",
553
+ "pulse build ./edge-app --experimental-native-size"
554
+ ],
555
+ "diagnostics": [
556
+ "PULSE_BUILD_OUT_UNSAFE",
557
+ "PULSE_BUILD_PROVIDER_REQUIRED",
558
+ "PULSE_EXPERIMENTAL_NATIVE_SIZE_UNSUPPORTED",
559
+ "PULSE_CANONICAL_NATIVE_COMPILE_FAILED"
560
+ ],
561
+ "outputs": [
562
+ "Writes pulse-build.json, the provider-neutral native module, and the configured provider realization.",
563
+ "Fastly builds write generated AssemblyScript and direct-host-ABI native Wasm at bin/main.wasm; no JavaScript runtime image is packaged.",
564
+ "Experimental size builds record the exact non-default Native compiler optimization settings in portable, provider, and build metadata.",
565
+ "With --json, emits one build result object containing exact portable and provider artifact paths."
566
+ ],
567
+ "sideEffects": [
568
+ "Cleans the output directory by default.",
569
+ "Invokes the native compiler and configured provider realization.",
570
+ "Refuses absolute, parent-traversal, and symbolic-link traversal outside the project root."
571
+ ],
572
+ "exit": "0 on success; 2–5 according to the emitted stable diagnostic."
573
+ }
574
+ ]
575
+ }