@lenso/cli 0.1.30 → 0.2.13

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.
package/README.md CHANGED
@@ -93,6 +93,119 @@ lenso service dev
93
93
  installed services from `.lenso/module-services.json`, then runs the host.
94
94
  Workspace reads prefer `lenso.workspace.json` and also accept the older
95
95
  `.lenso/services.json` path for compatibility.
96
+
97
+ For a System v2 graph containing multiple Autonomous Services, use the
98
+ clusterless System Sandbox on macOS or Linux:
99
+
100
+ ```sh
101
+ lenso system dev --dry-run --json
102
+ lenso system dev
103
+ lenso system dev --scenario deadline-timeout --json
104
+ lenso system dev --cleanup
105
+ ```
106
+
107
+ The System graph remains in `lenso.system.json`. Local-only executable details
108
+ live beside it in `lenso.system-sandbox.json`:
109
+
110
+ ```json
111
+ {
112
+ "protocol": "lenso.system-sandbox.v1",
113
+ "services": [{
114
+ "serviceId": "support",
115
+ "workloads": [{
116
+ "workloadId": "support-migrate",
117
+ "command": ["cargo", "run", "--bin", "support-migrate"]
118
+ }, {
119
+ "workloadId": "support-api",
120
+ "command": ["cargo", "run", "--bin", "support-api"],
121
+ "scenarioCommand": ["cargo", "run", "--bin", "support-scenario-driver"],
122
+ "endpoint": "http://127.0.0.1:4110",
123
+ "healthUrl": "http://127.0.0.1:4110/health/ready"
124
+ }, {
125
+ "workloadId": "support-worker",
126
+ "command": ["cargo", "run", "--bin", "support-worker"]
127
+ }]
128
+ }],
129
+ "scenarios": [{
130
+ "scenarioId": "deadline-timeout",
131
+ "fault": {
132
+ "kind": "timeout",
133
+ "serviceId": "support",
134
+ "workloadId": "support-api",
135
+ "delayMs": 100
136
+ },
137
+ "callPolicy": {
138
+ "deadlineMs": 100,
139
+ "maxAttempts": 2,
140
+ "idempotent": true
141
+ }
142
+ }]
143
+ }
144
+ ```
145
+
146
+ Failure controls are inert during ordinary startup and dry-run. They are read
147
+ only from the local System Sandbox definition and activated only when an
148
+ explicit `--scenario <scenarioId>` is supplied. Supported fault kinds are
149
+ `timeout`, `slow_dependency`, `workload_crash`, `overload`, and
150
+ `partial_unavailability`. Timeout and slow-dependency decisions use controlled
151
+ scenario time; overload uses declared `capacity` and `demand`, never machine
152
+ pressure.
153
+
154
+ Timeout, slow-dependency, and overload scenarios require the affected
155
+ Workload's `scenarioCommand`. The Sandbox invokes that Workload-owned adapter
156
+ only for an explicit scenario, supplies `LENSO_SANDBOX_*` controlled-time,
157
+ fault, capacity, and Call Policy inputs, and accepts one
158
+ `lenso.sandbox-workload-observation.v1` JSON result. The adapter exercises the
159
+ Service's real local call or dependency path; normal Workload startup never
160
+ receives those failure-control inputs.
161
+
162
+ Each run emits `lenso.failure-scenario-result.v1` JSON, performs Sandbox-owned
163
+ process and state cleanup, and writes the equivalent durable Story Segment to
164
+ `.lenso/system-sandbox-results/<systemId>/<scenarioId>/story-segment.json`.
165
+ Results include the injected fault, affected Service and Workload, attempt and
166
+ retry evidence, Call Policy and health transitions, outcome, cleanup, and next
167
+ actions. Repeating the same declared scenario overwrites that evidence with an
168
+ equivalent result.
169
+
170
+ Dry-run performs the same definition, cwd, executable, URL, graph, and
171
+ dependency validation as launch without creating Store directories, state, or
172
+ processes. Launch assigns each Workload an explicit `local-dev://` identity,
173
+ allocates one sandbox-owned Store path per Service, waits for declared health,
174
+ and records correlated endpoint and process state under
175
+ `.lenso/system-sandbox/<systemId>`. This identity is development-only and
176
+ does not claim production authentication. Ctrl-C and `--cleanup` terminate
177
+ only token-proven sandbox processes or their process groups, and remove state
178
+ only when its ownership marker
179
+ matches; Kubernetes, a Host, service mesh, external broker, System Plane, and a
180
+ production identity provider are not required.
181
+ Host and Provider declarations may remain in the System graph for topology
182
+ validation, but the sandbox neither starts nor contacts them.
183
+
184
+ ## Assess linked Module extraction
185
+
186
+ Report whether one Host-owned linked Module is ready to move behind an
187
+ Autonomous Service boundary:
188
+
189
+ ```sh
190
+ lenso module extraction readiness support-ticket \
191
+ --module-manifest modules/support-ticket/lenso.module.json \
192
+ --system-file lenso.system.json \
193
+ --evidence-file support-ticket.extraction-evidence.json \
194
+ --json
195
+ ```
196
+
197
+ The CLI scans Rust Module Cargo dependencies, imports, and fully qualified
198
+ in-process calls under `modules/`. The evidence file supplies authoritative
199
+ Service/Event Contract mappings and active Consumer compatibility results;
200
+ omitting or supplying ambiguous evidence produces a blocked report. Human and
201
+ JSON output come from the same `lenso.extraction-readiness-report.v1` artifact.
202
+ Blocked reports exit non-zero so the command can gate CI.
203
+
204
+ Readiness analysis is read-only: it does not write repository files, start
205
+ Workloads, move data, or change authority. Use `--repo-root` and
206
+ `--modules-root` when the Module sources are not under the current repository's
207
+ default `modules/` directory.
208
+
96
209
  Generated TS and Rust services also support `--check-release` to print the
97
210
  development module release descriptor before packaging.
98
211
  Before handing a service to another app or deployment pipeline, package-check
@@ -364,3 +477,31 @@ descriptors with a `source` field for new installs.
364
477
  lenso module install auth --source linked
365
478
  lenso module uninstall auth --source linked
366
479
  ```
480
+
481
+ ## M6 GA support operations
482
+
483
+ The GA commands consume exact versioned evidence and never infer compatibility
484
+ from nearby semantic versions:
485
+
486
+ ```sh
487
+ lenso ga support-check --manifest lenso.ga-support-manifest.v1.json \
488
+ --component cli:@lenso/cli@0.1.30 \
489
+ --component runtime:lenso-service@0.1.4 \
490
+ --state-version service-store.v1 --json
491
+
492
+ lenso ga manifest-migrate --manifest lenso.ga-support-manifest.v1.json \
493
+ --source lenso.system.json --target-format lenso.system.v2 \
494
+ --identity-pointer /systemId --dry-run --json
495
+
496
+ lenso ga service-upgrade --manifest lenso.ga-support-manifest.v1.json \
497
+ --input service-upgrade-input.json --json
498
+
499
+ lenso ga contract-retire --input contract-retirement-input.json --json
500
+ lenso ga failure-evaluate --input failure-scenario.json --json
501
+ ```
502
+
503
+ Manifest migration and Service upgrade are non-mutating plans by default.
504
+ Contract Retirement does not apply without an exact human approval bound to
505
+ the current plan digest. Unknown combinations, stale inputs, active Consumers,
506
+ incomplete deprecation windows, incompatible state, and unexpected failure
507
+ behavior stop with stable issue codes and next actions.
package/bin/lenso.js CHANGED
@@ -22,6 +22,25 @@ function binaryPath(baseDir = path.join(__dirname, '..'), platform = process.pla
22
22
  return path.join(baseDir, 'vendor', tag, exe);
23
23
  }
24
24
 
25
+ function forwardTerminationSignals(parent, child, signals = ['SIGINT', 'SIGTERM']) {
26
+ const handlers = new Map(signals.map((signal) => [
27
+ signal,
28
+ () => {
29
+ if (child.exitCode === null && child.signalCode === null) {
30
+ child.kill(signal);
31
+ }
32
+ },
33
+ ]));
34
+ for (const [signal, handler] of handlers) {
35
+ parent.on(signal, handler);
36
+ }
37
+ return () => {
38
+ for (const [signal, handler] of handlers) {
39
+ parent.off(signal, handler);
40
+ }
41
+ };
42
+ }
43
+
25
44
  function run() {
26
45
  const exe = binaryPath();
27
46
  if (!exe) {
@@ -30,6 +49,7 @@ function run() {
30
49
  }
31
50
 
32
51
  const child = spawn(exe, process.argv.slice(2), { stdio: 'inherit' });
52
+ const stopForwardingSignals = forwardTerminationSignals(process, child);
33
53
  child.on('error', (error) => {
34
54
  if (error.code === 'ENOENT') {
35
55
  console.error(`lenso: bundled binary is missing for ${process.platform}/${process.arch}`);
@@ -39,6 +59,7 @@ function run() {
39
59
  process.exit(1);
40
60
  });
41
61
  child.on('exit', (code, signal) => {
62
+ stopForwardingSignals();
42
63
  if (signal) {
43
64
  process.kill(process.pid, signal);
44
65
  return;
@@ -51,4 +72,4 @@ if (require.main === module) {
51
72
  run();
52
73
  }
53
74
 
54
- module.exports = { binaryPath, platformTag };
75
+ module.exports = { binaryPath, forwardTerminationSignals, platformTag };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lenso/cli",
3
- "version": "0.1.30",
3
+ "version": "0.2.13",
4
4
  "description": "Lenso command-line interface for scaffolding and operating Lenso backend projects.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/LioRael/lenso-cli",
@@ -17,15 +17,25 @@
17
17
  ],
18
18
  "scripts": {
19
19
  "check:npm-publish": "node scripts/check-npm-publish.mjs",
20
+ "check:reviewed-publisher": "node scripts/check-reviewed-publisher.mjs",
20
21
  "check:npm-shim": "node scripts/check-npm-shim.mjs",
22
+ "check:release-versions": "node scripts/check-release-versions.mjs",
23
+ "install:hosted-console": "node scripts/install-hosted-console.mjs",
21
24
  "package:npm": "node scripts/package-npm.mjs",
22
25
  "prepack": "node scripts/package-npm.mjs",
23
- "prepublishOnly": "node scripts/check-npm-publish.mjs"
26
+ "prepublishOnly": "node scripts/check-npm-publish.mjs",
27
+ "release:intent-check": "node scripts/release-plan.mjs --check-intent",
28
+ "release:plan": "node scripts/release-plan.mjs",
29
+ "release:verify": "npm run check:release-versions && node scripts/release-plan.mjs --verify"
30
+ },
31
+ "devDependencies": {
32
+ "tegami": "1.2.5"
24
33
  },
25
34
  "publishConfig": {
26
35
  "access": "public"
27
36
  },
28
37
  "engines": {
29
38
  "node": ">=18"
30
- }
39
+ },
40
+ "packageManager": "pnpm@11.7.0"
31
41
  }
Binary file
Binary file
Binary file
Binary file