@revoengine/cli 1.0.31 → 1.0.33

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 (51) hide show
  1. package/README.md +68 -17
  2. package/dist/src/automation-contract.generated.d.ts +55 -21
  3. package/dist/src/automation-contract.generated.js +67 -25
  4. package/dist/src/client.d.ts +32 -2
  5. package/dist/src/client.js +54 -13
  6. package/dist/src/commands/database-tables.js +10 -3
  7. package/dist/src/commands/migrate.js +2 -0
  8. package/dist/src/commands/terminal-browser-central-profile.d.ts +65 -0
  9. package/dist/src/commands/terminal-browser-central-profile.js +203 -0
  10. package/dist/src/commands/terminal-browser-human-input.d.ts +3 -1
  11. package/dist/src/commands/terminal-browser-human-input.js +3 -1
  12. package/dist/src/commands/terminal-browser-interaction.js +1 -1
  13. package/dist/src/commands/terminal-browser-live-protocol.d.ts +34 -2
  14. package/dist/src/commands/terminal-browser-live-protocol.js +28 -12
  15. package/dist/src/commands/terminal-browser-live-transport.d.ts +1 -0
  16. package/dist/src/commands/terminal-browser-live-transport.js +9 -5
  17. package/dist/src/commands/terminal-browser-live.d.ts +24 -3
  18. package/dist/src/commands/terminal-browser-live.js +199 -30
  19. package/dist/src/commands/terminal-browser-page-input.d.ts +4 -1
  20. package/dist/src/commands/terminal-browser-page-input.js +46 -1
  21. package/dist/src/commands/terminal-browser-profile-crypto.d.ts +30 -0
  22. package/dist/src/commands/terminal-browser-profile-crypto.js +101 -0
  23. package/dist/src/commands/terminal-browser-profile-import-runner.d.ts +31 -0
  24. package/dist/src/commands/terminal-browser-profile-import-runner.js +112 -0
  25. package/dist/src/commands/terminal-browser-profile-import.d.ts +28 -0
  26. package/dist/src/commands/terminal-browser-profile-import.js +125 -0
  27. package/dist/src/commands/terminal-browser-profile-import.protocol.d.ts +50 -0
  28. package/dist/src/commands/terminal-browser-profile-import.protocol.js +52 -0
  29. package/dist/src/commands/terminal-browser-profile-preferences.d.ts +1 -0
  30. package/dist/src/commands/terminal-browser-profile-preferences.js +16 -0
  31. package/dist/src/commands/terminal-browser-profile-sync.d.ts +14 -0
  32. package/dist/src/commands/terminal-browser-profile-sync.js +169 -0
  33. package/dist/src/commands/terminal-browser-profile-sync.protocol.d.ts +50 -0
  34. package/dist/src/commands/terminal-browser-profile-sync.protocol.js +19 -0
  35. package/dist/src/commands/terminal-browser-profile.d.ts +10 -1
  36. package/dist/src/commands/terminal-browser-profile.js +30 -4
  37. package/dist/src/commands/terminal-browser-recording.d.ts +39 -0
  38. package/dist/src/commands/terminal-browser-recording.js +74 -0
  39. package/dist/src/commands/terminal-browser-recording.protocol.d.ts +49 -0
  40. package/dist/src/commands/terminal-browser-recording.protocol.js +16 -0
  41. package/dist/src/commands/terminal-browser.d.ts +14 -1
  42. package/dist/src/commands/terminal-browser.js +98 -33
  43. package/dist/src/commands/terminal-output-buffer.d.ts +18 -1
  44. package/dist/src/commands/terminal-output-buffer.js +95 -8
  45. package/dist/src/commands/terminal.d.ts +3 -1
  46. package/dist/src/commands/terminal.js +257 -54
  47. package/dist/src/resource-syncs/database-table-sync.d.ts +8 -1
  48. package/dist/src/resource-syncs/database-table-sync.js +34 -11
  49. package/dist/src/sync-output.d.ts +3 -3
  50. package/dist/src/ui.js +1 -0
  51. package/package.json +5 -5
@@ -1,7 +1,7 @@
1
1
  import { databaseIndexPayload } from "../database-indexes.js";
2
2
  import fs from 'node:fs';
3
3
  import path from 'node:path';
4
- import { ApiError } from "../client.js";
4
+ import { ApiError, DatabaseSchemaOperationWaitError, isDatabaseSchemaOperation } from "../client.js";
5
5
  import { hashStable, readComponentLock, writeComponentLock, } from "../component-lock.js";
6
6
  import { excludeDatabaseBackupArtifacts, isDatabaseBackupArtifact } from "../database-table-artifacts.js";
7
7
  import { readConfiguredResourceMetadataStableKey, sanitizeUserMetadata } from "../resource-metadata.js";
@@ -1933,6 +1933,9 @@ function recordDeletedPartitionTombstone(input) {
1933
1933
  writeComponentLock(projectRoot, lock);
1934
1934
  }
1935
1935
  export async function pushDatabaseSchemas(input) {
1936
+ if (input.async && (!input.stableKey || input.prunePartitions || input.pruneOrphans)) {
1937
+ throw new Error('--async requires one Database Table Stable Key and cannot prune dependent resources.');
1938
+ }
1936
1939
  const plan = await buildDatabaseSchemasPlan(input);
1937
1940
  const localByKey = readWorkspaceDatabaseSchemasForPush(input.cwd, input.stableKeyName);
1938
1941
  if (input.stableKey && !localByKey.has(input.stableKey) && input.pruneOrphans !== true) {
@@ -2013,11 +2016,22 @@ export async function pushDatabaseSchemas(input) {
2013
2016
  stableKeyName: input.stableKeyName,
2014
2017
  });
2015
2018
  lastMutation.at = Date.now();
2016
- const created = unwrapData(await input.client.createDatabaseSchema(createPayloadForDatabaseSchema({
2017
- manifest: desired,
2018
- parentName: preflight.parentName,
2019
+ const payload = createPayloadForDatabaseSchema({
2020
+ manifest: desired, parentName: preflight.parentName,
2019
2021
  restricted: sourceLock.databaseSchemas[stableKey]?.sourceRestricted === true,
2020
- })));
2022
+ });
2023
+ if (input.async) {
2024
+ const operation = await input.client.acceptDatabaseSchema(payload, undefined, input.idempotencyKey);
2025
+ if (!isDatabaseSchemaOperation(operation))
2026
+ throw new Error('Backend did not return a durable schema receipt.');
2027
+ const accepted = { stableKey, action: 'create', status: 'accepted',
2028
+ targetPath: localTargetPath(input.cwd, local.manifestPath), operation,
2029
+ reason: `Schema operation ${operation.jobId}: ${operation.status}; baseline awaits verified completion` };
2030
+ results.push(accepted);
2031
+ resultsByKey.set(stableKey, accepted);
2032
+ continue;
2033
+ }
2034
+ const created = unwrapData(await input.client.createDatabaseSchema(payload, { idempotencyKey: input.idempotencyKey }));
2021
2035
  writeAccepted = true;
2022
2036
  const createdId = databaseIdOf(created);
2023
2037
  if (!createdId) {
@@ -2048,6 +2062,8 @@ export async function pushDatabaseSchemas(input) {
2048
2062
  resultsByKey.set(stableKey, deployed);
2049
2063
  }
2050
2064
  catch (error) {
2065
+ if (error instanceof DatabaseSchemaOperationWaitError)
2066
+ writeAccepted = true;
2051
2067
  const message = error instanceof Error ? error.message : String(error);
2052
2068
  const unavailableParent = error instanceof PartitionParentUnavailableError;
2053
2069
  const result = {
@@ -2116,12 +2132,17 @@ export async function pushDatabaseSchemas(input) {
2116
2132
  }
2117
2133
  await waitForDatabaseSchemaMutation(lastMutation.at);
2118
2134
  lastMutation.at = Date.now();
2119
- await input.client.updateDatabaseSchema(live.databaseId, buildDatabaseSchemaUpdatePayload({
2120
- desired,
2121
- target: live.record,
2122
- stableKeyName: input.stableKeyName,
2123
- sourceWins: input.migrationPolicy?.sourceWins,
2124
- }));
2135
+ const payload = buildDatabaseSchemaUpdatePayload({ desired, target: live.record,
2136
+ stableKeyName: input.stableKeyName, sourceWins: input.migrationPolicy?.sourceWins });
2137
+ if (input.async) {
2138
+ const operation = await input.client.acceptDatabaseSchema(payload, live.databaseId, input.idempotencyKey);
2139
+ if (!isDatabaseSchemaOperation(operation))
2140
+ throw new Error('Backend did not return a durable schema receipt.');
2141
+ results.push({ stableKey, action, status: 'accepted', targetPath, operation,
2142
+ reason: `Schema operation ${operation.jobId}: ${operation.status}; baseline awaits verified completion` });
2143
+ return;
2144
+ }
2145
+ await input.client.updateDatabaseSchema(live.databaseId, payload, { idempotencyKey: input.idempotencyKey });
2125
2146
  writeAccepted = true;
2126
2147
  if (live.record.audit === true) {
2127
2148
  lastAuditedWrite.at = Date.now();
@@ -2174,6 +2195,8 @@ export async function pushDatabaseSchemas(input) {
2174
2195
  });
2175
2196
  }
2176
2197
  catch (error) {
2198
+ if (error instanceof DatabaseSchemaOperationWaitError)
2199
+ writeAccepted = true;
2177
2200
  const message = error instanceof Error ? error.message : String(error);
2178
2201
  results.push({
2179
2202
  stableKey,
@@ -1,13 +1,13 @@
1
1
  import type { CommandContext } from './types.ts';
2
2
  import type { FieldChange } from './diff-details.ts';
3
3
  import type { WorkspaceDiff } from './workspace-diff.ts';
4
- export type WorkspaceSyncStatus = 'pulled' | 'pruned' | 'deployed' | 'skipped' | 'failed' | 'write-unverified';
4
+ export type WorkspaceSyncStatus = 'pulled' | 'pruned' | 'deployed' | 'accepted' | 'skipped' | 'failed' | 'write-unverified';
5
5
  export type WorkspaceSyncResult = {
6
6
  status: WorkspaceSyncStatus;
7
7
  targetPath: string;
8
8
  reason?: string;
9
9
  };
10
- export type SyncOutputStatus = 'Pulled' | 'Pruned' | 'Skipped' | 'Deployed' | 'Activated' | 'Deactivated' | 'Failed' | 'Unverified';
10
+ export type SyncOutputStatus = 'Pulled' | 'Pruned' | 'Skipped' | 'Deployed' | 'Accepted' | 'Activated' | 'Deactivated' | 'Failed' | 'Unverified';
11
11
  export type SyncPlanDetail = {
12
12
  label: string;
13
13
  values?: string | ReadonlyArray<string>;
@@ -63,4 +63,4 @@ export declare function printSyncStatus(println: CommandContext['println'], inpu
63
63
  reason?: string;
64
64
  }): void;
65
65
  export declare function printSyncNotice(println: CommandContext['println'], message: string): void;
66
- export declare function printSyncSummary(println: CommandContext['println'], label: 'Pulled' | 'Deployed' | 'Activated', results: ReadonlyArray<Pick<WorkspaceSyncResult, 'status'>>, durationMs: number): void;
66
+ export declare function printSyncSummary(println: CommandContext['println'], label: 'Pulled' | 'Deployed' | 'Accepted' | 'Activated', results: ReadonlyArray<Pick<WorkspaceSyncResult, 'status'>>, durationMs: number): void;
package/dist/src/ui.js CHANGED
@@ -147,6 +147,7 @@ function renderCommandCatalog() {
147
147
  commandRow('revo database-tables pull --all [--project <name>] [--force] [--strict]', 'Pull portable Database Tables and partitions'),
148
148
  commandRow('revo database-tables plan --all [--project <name>] [--with-stats] [--json] [--strict] [--hints]', 'Preview schema drift, DDL risks, partitions, and performance hints'),
149
149
  commandRow('revo database-tables push <stableKey>|--all [--project <name>] --yes [--force] [--prune-partitions]', 'Create, safely update, or explicitly prune managed partitions'),
150
+ commandRow('revo database-tables push <stableKey> --yes --async [--idempotency-key <uuid>] [--json]', 'Accept durable schema work; poll Database Operations before dependent writes'),
150
151
  commandRow('revo database-views pull --all [--project <name>] [--force] [--strict]', 'Pull portable STRUCTURED and RAW_SQL Database Views after Database Table convergence'),
151
152
  commandRow('revo database-views plan --all [--project <name>] [--json] [--strict] [--hints]', 'Preview Database View drift, source readiness, and target compilation'),
152
153
  commandRow('revo database-views push <stableKey>|--all [--project <name>] --yes [--force]', 'Create or update Database Views after live preview'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revoengine/cli",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
4
4
  "description": "CLI package for the RevoEngine Platform API",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -11,11 +11,11 @@
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/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/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/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.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('./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/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/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 --only-shell chromium",
18
+ "postinstall": "playwright-core install chromium",
19
19
  "generate:automation-contract": "node scripts/generate-automation-contract.ts --write",
20
20
  "check:automation-contract": "node scripts/generate-automation-contract.ts"
21
21
  },
@@ -35,8 +35,8 @@
35
35
  "typescript": "^6.0.3"
36
36
  },
37
37
  "dependencies": {
38
- "ws": "^8.19.0",
39
- "playwright-core": "1.63.0"
38
+ "playwright-core": "1.64.0",
39
+ "ws": "^8.19.0"
40
40
  },
41
41
  "optionalDependencies": {
42
42
  "node-pty": "^1.0.0"