@revoengine/cli 2.1.0 → 2.1.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.1.1 — 2026-11-11
4
+
5
+ - Prepare native terminal permissions automatically during macOS installation, while retaining preparation at the first PTY launch when installation scripts are disabled.
6
+ - Pin the optional native dependency and verify fresh packaged installations through the real CLI runner, including interactive input and terminal size. Ordinary commands remain available without native PTY support.
7
+
3
8
  ## 2.1.0 — 2026-11-11
4
9
 
5
10
  - Pull, plan and push Job Template Batch or Debounce delivery across every trigger source and dynamic concurrency paths on Platform 1.9.0. Reject retired Event-level collection policies with explicit migration guidance. Preserve source-specific Event and Schedule input and ignore retired merge modes in existing manifests.
package/README.md CHANGED
@@ -10,11 +10,13 @@ The CLI has three main capabilities:
10
10
  2. **Project migration** — plan, run, and verify a direct migration between two saved projects with `--from` and `--to`.
11
11
  3. **Resource synchronization** — work with one supported resource family through its dedicated `pull`, `plan`, and `push` commands.
12
12
 
13
- ## Version 2.1.0
13
+ ## Version 2.1.1
14
+
15
+ On macOS, package installation prepares the native terminal helper automatically. The runner retains the same preparation when installation scripts are disabled. This patch keeps the Platform 1.9 automation contract unchanged.
14
16
 
15
17
  Use this release with Platform 1.9.0 or later and VS Code extension 2.1.0 or later. Update the compatible clients and backend together. Endpoint and Job configurations no longer accept `skipLibs`, `includeLibs` or `excludeLibs`, including `false` and empty arrays. Remove these fields from current manifests; review and test non-default selections first. Ordinary business payload fields are unaffected.
16
18
 
17
- Debugger execution defaults to the caller and can explicitly select the global endpoint or job policy. Browser Live Preview supports pointer gestures, selected-text feedback and active-session status while retaining privacy controls. See the [2.1.0 changelog](CHANGELOG.md).
19
+ Debugger execution defaults to the caller and can explicitly select the global endpoint or job policy. Browser Live Preview supports pointer gestures, selected-text feedback and active-session status while retaining privacy controls. See the [2.1.1 changelog](CHANGELOG.md).
18
20
 
19
21
  Component creation and reviewed source saves can wait up to ten minutes, including cold Sandbox startup. This also extends Node fetch's response-header waiting limit. Upgrade the matching API/Sandbox services to receive the longer server-side validation budget. See the [1.0.35 changelog](CHANGELOG.md). Writes with `--omit` still require the matching API capability `atomicResourceUpdates`.
20
22
 
@@ -227,7 +229,7 @@ For explicit cleanup of an older local snapshot, `terminal browser-profile forge
227
229
 
228
230
  `upload_file` and `download_file` stream an explicit authorized workspace file directly to/from GCS HTTPS signed/resumable URLs with permitted headers. Full network permission is required. WebSocket carries metadata only. Resumable uploads report committed offsets and partial completion; do not finalize a Storage upload before completion or blindly repeat an uncertain upload. Downloads commit atomically and do not overwrite unless explicitly requested. The stream's idle timeout is 90 seconds; grant expiry and runner lifetime still apply. Signed URLs/headers are credentials and must not be copied into logs or source files.
229
231
 
230
- Interactive PTY commands use the optional native `node-pty` package. An unavailable native build does not block CLI installation; PTY requests return `pty_unavailable` until the optional package can be installed. To skip native installation when PTY is not needed, install locally with `npm install --omit=optional @revoengine/cli` and run `npx revo`; npm 11.9 may still install the optional dependency during a global installation. On macOS, the runner verifies the spawn helper's executable permission when a PTY starts. Ordinary commands and local development servers run with pipes.
232
+ Interactive PTY commands use the optional native `node-pty` package. An unavailable native build does not block CLI installation; PTY requests return `pty_unavailable` until the optional package can be installed. To skip native installation when PTY is not needed, install locally with `npm install --omit=optional @revoengine/cli` and run `npx revo`; npm 11.9 may still install the optional dependency during a global installation. On macOS, installation prepares the spawn helper's executable permission, and the runner verifies it again when a PTY starts. If installation scripts are disabled, the first PTY request performs preparation automatically using the installed native prebuild. The optional native dependency is pinned so CI and fresh installations use the same version. Ordinary commands and local development servers run with pipes.
231
233
 
232
234
  Local Browser mode filters HTTP and WebSocket requests and disables WebRTC, WebTransport, Worker and SharedWorker before page scripts. Worker-dependent pages may not work in this mode; Chromium is not enclosed in an OS network sandbox. A temporary Local or Full network lease closes the Browser context at expiry when the current permanent grant does not cover it, including before a queued secure credential fill. A lost WebSocket connection, a controlled Realtime restart, or a temporary dependency outage retains running processes and Browser contexts for one two-minute (120-second) reconnect period; repeated failures do not renew it. Receiving `ready` alone does not reset that period while executions still await resume confirmation. Handshake, ready and execution resume each have a ten-second transport deadline. Access revocation and malformed runner frames stop the runner and its processes. Grant revision changes reject older execute frames and stop only work outside the remaining permanent or temporary scope. A network upgrade preserves the original temporary lease for a subsequent downgrade.
233
235
 
@@ -3,9 +3,10 @@ import path from 'node:path';
3
3
  import { createRequire } from 'node:module';
4
4
  const require = createRequire(import.meta.url);
5
5
  /** node-pty's macOS prebuild launches this helper with posix_spawn. */
6
- export function ensurePtyHelperExecutable(packageRoot = path.dirname(require.resolve('node-pty/package.json')), platform = process.platform, arch = process.arch) {
6
+ export function ensurePtyHelperExecutable(packageRoot, platform = process.platform, arch = process.arch) {
7
7
  if (platform !== 'darwin')
8
8
  return;
9
+ packageRoot ??= path.dirname(require.resolve('node-pty/package.json'));
9
10
  const candidates = [path.join(packageRoot, 'prebuilds', `darwin-${arch}`, 'spawn-helper'),
10
11
  path.join(packageRoot, 'build', 'Release', 'spawn-helper')];
11
12
  let found = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revoengine/cli",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "CLI package for the RevoEngine Platform API",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -11,20 +11,22 @@
11
11
  "scripts": {
12
12
  "build": "npm run clean && tsc -p tsconfig.build.json",
13
13
  "clean": "node --input-type=module -e \"import fs from 'node:fs'; fs.rmSync('dist', { recursive: true, force: true });\"",
14
- "check": "node --input-type=module -e \"await import('./src/config.ts'); await import('./src/commands/terminal-process-group.ts'); await import('./src/commands/terminal-file-descriptor.ts'); await import('./src/workspace-write-lock.ts'); await import('./src/argument-contract.ts'); await import('./src/legacy.ts'); await import('./src/http-trace.ts'); await import('./src/request-queue.ts'); await import('./src/client.ts'); await import('./src/component-lock.ts'); await import('./src/component-lifecycle.ts'); await import('./src/component-element-validation.ts'); await import('./src/component-source-validation.ts'); await import('./src/request-contract.ts'); await import('./src/sync-omit.ts'); await import('./src/sync-omit-command.ts'); await import('./src/sync-omit-write-fence.ts'); await import('./src/component-contract.ts'); await import('./src/component-manifests.ts'); await import('./src/planning-snapshot.ts'); await import('./src/workspace-digests.ts'); await import('./src/database-indexes.ts'); await import('./src/diff-details.ts'); await import('./src/resource-metadata.ts'); await import('./src/tracked-resources.ts'); await import('./src/resource-inventory.ts'); await import('./src/metadata-backfill.ts'); await import('./src/workspace-component.ts'); await import('./src/workspace-resource.ts'); await import('./src/database-table-artifacts.ts'); await import('./src/project.ts'); await import('./src/prompt.ts'); await import('./src/runtime-view.ts'); await import('./src/spinner.ts'); await import('./src/types.ts'); await import('./src/utils.ts'); await import('./src/resource-syncs/util.ts'); await import('./src/resource-syncs/agent-sync.ts'); await import('./src/resource-syncs/database-table-sync.ts'); await import('./src/resource-syncs/database-view-sync.ts'); await import('./src/resource-syncs/endpoint-sync.ts'); await import('./src/resource-syncs/group-sync.ts'); await import('./src/resource-syncs/role-group-sync.ts'); await import('./src/resource-syncs/job-template-sync.ts'); await import('./src/resource-syncs/schedule-sync.ts'); await import('./src/resource-syncs/event-sync.ts'); await import('./src/resource-syncs/account-principal.ts'); await import('./src/resource-syncs/identity-migration.ts'); await import('./src/resource-syncs/service-account-sync.ts'); await import('./src/commands/service-accounts.ts'); await import('./src/commands/agents.ts'); await import('./src/migration-actions.ts'); await import('./src/reviewed-plan.ts'); await import('./src/migration.ts'); await import('./src/workspace-diff.ts'); await import('./src/workspace-prune.ts'); await import('./src/sync-output.ts'); await import('./src/ui.ts'); await import('./src/update-notifier.ts'); await import('./src/env-sync.ts'); await import('./src/commands/auth.ts'); await import('./src/commands/component.ts'); await import('./src/commands/database-tables.ts'); await import('./src/commands/database-views.ts'); await import('./src/commands/endpoints.ts'); await import('./src/commands/emulate.ts'); await import('./src/commands/env.ts'); await import('./src/commands/events.ts'); await import('./src/commands/groups.ts'); await import('./src/commands/info.ts'); await import('./src/commands/job-templates.ts'); await import('./src/commands/metadata.ts'); await import('./src/commands/migrate.ts'); await import('./src/commands/request.ts'); await import('./src/commands/studio.ts'); await import('./src/commands/tests.ts'); await import('./src/native-tests.ts'); await import('./src/test-workspace.ts'); await import('./src/commands/role-groups.ts'); await import('./src/commands/search.ts'); await import('./src/commands/schedules.ts'); await import('./src/commands/terminal-service.ts'); await import('./src/commands/terminal-browser.ts'); await import('./src/commands/terminal-image.ts'); await import('./src/commands/terminal-sandbox.ts'); await import('./src/commands/terminal-patch.ts'); await import('./src/commands/terminal-patch-worker.ts'); await import('./src/commands/terminal-browser-profile-import.protocol.ts'); await import('./src/commands/terminal-browser-profile-import.ts'); await import('./src/commands/terminal-browser-profile-import-runner.ts'); await import('./src/commands/terminal.ts'); await import('./src/cli.ts'); await import('./src/index.ts'); await import('./bin/revo.ts'); await import('./scripts/dev.ts')\"",
14
+ "check": "node --input-type=module -e \"await import('./src/config.ts'); await import('./scripts/postinstall.mjs'); await import('./src/commands/terminal-process-group.ts'); await import('./src/commands/terminal-file-descriptor.ts'); await import('./src/workspace-write-lock.ts'); await import('./src/argument-contract.ts'); await import('./src/legacy.ts'); await import('./src/http-trace.ts'); await import('./src/request-queue.ts'); await import('./src/client.ts'); await import('./src/component-lock.ts'); await import('./src/component-lifecycle.ts'); await import('./src/component-element-validation.ts'); await import('./src/component-source-validation.ts'); await import('./src/request-contract.ts'); await import('./src/sync-omit.ts'); await import('./src/sync-omit-command.ts'); await import('./src/sync-omit-write-fence.ts'); await import('./src/component-contract.ts'); await import('./src/component-manifests.ts'); await import('./src/planning-snapshot.ts'); await import('./src/workspace-digests.ts'); await import('./src/database-indexes.ts'); await import('./src/diff-details.ts'); await import('./src/resource-metadata.ts'); await import('./src/tracked-resources.ts'); await import('./src/resource-inventory.ts'); await import('./src/metadata-backfill.ts'); await import('./src/workspace-component.ts'); await import('./src/workspace-resource.ts'); await import('./src/database-table-artifacts.ts'); await import('./src/project.ts'); await import('./src/prompt.ts'); await import('./src/runtime-view.ts'); await import('./src/spinner.ts'); await import('./src/types.ts'); await import('./src/utils.ts'); await import('./src/resource-syncs/util.ts'); await import('./src/resource-syncs/agent-sync.ts'); await import('./src/resource-syncs/database-table-sync.ts'); await import('./src/resource-syncs/database-view-sync.ts'); await import('./src/resource-syncs/endpoint-sync.ts'); await import('./src/resource-syncs/group-sync.ts'); await import('./src/resource-syncs/role-group-sync.ts'); await import('./src/resource-syncs/job-template-sync.ts'); await import('./src/resource-syncs/schedule-sync.ts'); await import('./src/resource-syncs/event-sync.ts'); await import('./src/resource-syncs/account-principal.ts'); await import('./src/resource-syncs/identity-migration.ts'); await import('./src/resource-syncs/service-account-sync.ts'); await import('./src/commands/service-accounts.ts'); await import('./src/commands/agents.ts'); await import('./src/migration-actions.ts'); await import('./src/reviewed-plan.ts'); await import('./src/migration.ts'); await import('./src/workspace-diff.ts'); await import('./src/workspace-prune.ts'); await import('./src/sync-output.ts'); await import('./src/ui.ts'); await import('./src/update-notifier.ts'); await import('./src/env-sync.ts'); await import('./src/commands/auth.ts'); await import('./src/commands/component.ts'); await import('./src/commands/database-tables.ts'); await import('./src/commands/database-views.ts'); await import('./src/commands/endpoints.ts'); await import('./src/commands/emulate.ts'); await import('./src/commands/env.ts'); await import('./src/commands/events.ts'); await import('./src/commands/groups.ts'); await import('./src/commands/info.ts'); await import('./src/commands/job-templates.ts'); await import('./src/commands/metadata.ts'); await import('./src/commands/migrate.ts'); await import('./src/commands/request.ts'); await import('./src/commands/studio.ts'); await import('./src/commands/tests.ts'); await import('./src/native-tests.ts'); await import('./src/test-workspace.ts'); await import('./src/commands/role-groups.ts'); await import('./src/commands/search.ts'); await import('./src/commands/schedules.ts'); await import('./src/commands/terminal-service.ts'); await import('./src/commands/terminal-browser.ts'); await import('./src/commands/terminal-image.ts'); await import('./src/commands/terminal-sandbox.ts'); await import('./src/commands/terminal-patch.ts'); await import('./src/commands/terminal-patch-worker.ts'); await import('./src/commands/terminal-browser-profile-import.protocol.ts'); await import('./src/commands/terminal-browser-profile-import.ts'); await import('./src/commands/terminal-browser-profile-import-runner.ts'); await import('./src/commands/terminal.ts'); await import('./src/cli.ts'); await import('./src/index.ts'); await import('./bin/revo.ts'); await import('./scripts/dev.ts')\"",
15
15
  "dev": "node ./scripts/dev.ts",
16
16
  "prepack": "npm run build",
17
17
  "test": "node --test ./test/*.test.ts",
18
- "postinstall": "playwright-core install chromium",
18
+ "postinstall": "node scripts/postinstall.mjs",
19
19
  "generate:automation-contract": "node scripts/generate-automation-contract.ts --write",
20
- "check:automation-contract": "node scripts/generate-automation-contract.ts"
20
+ "check:automation-contract": "node scripts/generate-automation-contract.ts",
21
+ "test:installed": "node scripts/verify-installed-cli.mjs"
21
22
  },
22
23
  "files": [
23
24
  "dist/",
24
25
  "README.md",
25
26
  "CHANGELOG.md",
26
27
  "tsconfig.json",
27
- "tsconfig.build.json"
28
+ "tsconfig.build.json",
29
+ "scripts/postinstall.mjs"
28
30
  ],
29
31
  "engines": {
30
32
  "node": ">=24"
@@ -41,6 +43,9 @@
41
43
  "ws": "^8.19.0"
42
44
  },
43
45
  "optionalDependencies": {
44
- "node-pty": "^1.0.0"
46
+ "node-pty": "1.1.0"
47
+ },
48
+ "allowScripts": {
49
+ "node-pty": true
45
50
  }
46
51
  }
@@ -0,0 +1,40 @@
1
+ import { spawnSync } from 'node:child_process';
2
+ import { existsSync, realpathSync } from 'node:fs';
3
+ import { createRequire } from 'node:module';
4
+ import path from 'node:path';
5
+ import { pathToFileURL } from 'node:url';
6
+ // Published packages use compiled code; source checkouts can run npm install before build.
7
+ const compiledHelper = new URL('../dist/src/commands/terminal-pty.js', import.meta.url);
8
+ const { ensurePtyHelperExecutable } = await import(existsSync(compiledHelper)
9
+ ? compiledHelper.href : new URL('../src/commands/terminal-pty.ts', import.meta.url).href);
10
+
11
+ const require = createRequire(import.meta.url);
12
+
13
+ /** Optional PTY support must not prevent installing the ordinary CLI commands. */
14
+ export function prepareOptionalPtyInstallation() {
15
+ try {
16
+ ensurePtyHelperExecutable();
17
+ } catch (error) {
18
+ if (error?.code === 'MODULE_NOT_FOUND') return;
19
+ process.stderr.write('Optional interactive terminal setup could not finish; the runner will retry before starting a PTY.\n');
20
+ }
21
+ }
22
+
23
+ export function postinstall() {
24
+ prepareOptionalPtyInstallation();
25
+ // Use this package's browser installer, independently of the caller's PATH.
26
+ const browserCli = path.join(path.dirname(require.resolve('playwright-core/package.json')), 'cli.js');
27
+ const result = spawnSync(process.execPath, [browserCli, 'install', 'chromium'], {
28
+ stdio: 'inherit',
29
+ });
30
+ if (result.error) throw result.error;
31
+ return result.status ?? 1;
32
+ }
33
+
34
+ if (process.argv[1] && import.meta.url === pathToFileURL(realpathSync(process.argv[1])).href) {
35
+ try { process.exitCode = postinstall(); }
36
+ catch (error) {
37
+ process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
38
+ process.exitCode = 1;
39
+ }
40
+ }