@revoengine/cli 1.0.20 → 1.0.21
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 +33 -8
- package/dist/src/cli.js +5 -1
- package/dist/src/client.d.ts +14 -1
- package/dist/src/client.js +44 -0
- package/dist/src/commands/agents.d.ts +2 -0
- package/dist/src/commands/agents.js +56 -0
- package/dist/src/commands/component.js +2 -0
- package/dist/src/commands/index.d.ts +1 -0
- package/dist/src/commands/index.js +1 -0
- package/dist/src/commands/migrate.js +14 -2
- package/dist/src/component-lock.d.ts +2 -0
- package/dist/src/component-lock.js +38 -0
- package/dist/src/metadata-backfill.js +39 -1
- package/dist/src/migration.d.ts +9 -2
- package/dist/src/migration.js +59 -0
- package/dist/src/resource-inventory.d.ts +4 -2
- package/dist/src/resource-inventory.js +11 -1
- package/dist/src/resource-syncs/agent-sync.d.ts +98 -0
- package/dist/src/resource-syncs/agent-sync.js +586 -0
- package/dist/src/tracked-resources.d.ts +1 -1
- package/dist/src/tracked-resources.js +4 -2
- package/dist/src/types.d.ts +12 -0
- package/dist/src/ui.js +5 -1
- package/dist/src/workspace-diff.js +2 -0
- package/dist/src/workspace-prune.js +38 -2
- package/package.json +2 -2
package/dist/src/ui.js
CHANGED
|
@@ -146,6 +146,10 @@ function renderCommandCatalog() {
|
|
|
146
146
|
commandRow('revo endpoints plan --all [--project <name>] [--json] [--strict]', 'Preview Endpoint state and Component compatibility'),
|
|
147
147
|
commandRow('revo endpoints push --all [--project <name>] [--yes] [--force]', 'Deploy and verify managed endpoints'),
|
|
148
148
|
'',
|
|
149
|
+
paintHeader('Agents and Agent Plugins'),
|
|
150
|
+
commandRow('revo agents <pull|plan|push> --all [--project <name>] [--json]', 'Sync Agent definitions; memory and execution state stay local'),
|
|
151
|
+
commandRow('revo agent-plugins <pull|plan|push> --all [--project <name>] [--json]', 'Sync tools, MCP servers, skills and packages'),
|
|
152
|
+
'',
|
|
149
153
|
paintHeader('Access'),
|
|
150
154
|
commandRow('revo service-accounts pull --all [--project <name>] [--force]', 'Pull portable service-account definitions'),
|
|
151
155
|
commandRow('revo service-accounts plan --all [--project <name>] [--json] [--strict]', 'Plan accounts, owners and manual credential setup'),
|
|
@@ -177,7 +181,7 @@ function renderCommandCatalog() {
|
|
|
177
181
|
commandRow('revo diff [--json]', 'Show only workspace-to-target resource differences without writes'),
|
|
178
182
|
commandRow('revo plan [--prune] [--out file] [--force] [--strict] [--json] [--hints]', 'Plan tracked workspace upserts and optional Stable Key deletions without writes'),
|
|
179
183
|
commandRow('revo deploy [--yes] [--prune] [--reviewed-plan file] [--force] [--json]', 'Review, confirm, deploy and prune tracked resources in dependency order'),
|
|
180
|
-
commandRow('revo migrate plan --from <env> --to <env> [--resources <list>] [--skip-groups] [--force] [--json] [--hints]', 'Preview
|
|
184
|
+
commandRow('revo migrate plan --from <env> --to <env> [--resources <list>] [--skip-groups] [--force] [--json] [--hints]', 'Preview twelve resource families and identity dependencies'),
|
|
181
185
|
commandRow('revo migrate run --from <env> --to <env> [--resources <list>] [--skip-groups] --yes [--force] [--json]', 'Pull, plan, migrate, and verify resources in dependency order'),
|
|
182
186
|
commandRow('revo migrate verify --from <env> --to <env> [--resources <list>] [--json]', 'Verify target resources against a fresh temporary source pull'),
|
|
183
187
|
commandRow('revo search <CODE|SIMPLE> <term>', 'Search code references or all platform content'),
|
|
@@ -9,6 +9,8 @@ function resourceItems(plan, resource) {
|
|
|
9
9
|
case 'schedule': return plan.schedules?.items || [];
|
|
10
10
|
case 'event': return plan.events?.items || [];
|
|
11
11
|
case 'group': return plan.groups?.items || [];
|
|
12
|
+
case 'agent': return plan.agents?.items || [];
|
|
13
|
+
case 'agent-plugin': return plan.agentPlugins?.items || [];
|
|
12
14
|
case 'service-account': return plan.serviceAccounts?.items || [];
|
|
13
15
|
case 'role-group': return plan.roleGroups?.items || [];
|
|
14
16
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { agentDependencies } from "./resource-syncs/agent-sync.js";
|
|
1
2
|
import fs from 'node:fs';
|
|
2
3
|
import path from 'node:path';
|
|
3
4
|
import { hashStable, readComponentLock, removeComponentLockBaseline, writeComponentLock } from "./component-lock.js";
|
|
@@ -7,6 +8,8 @@ import { normalizeStableKeyValue, readConfiguredResourceMetadataStableKey } from
|
|
|
7
8
|
import { isBuiltinSystemAccount } from "./resource-syncs/account-principal.js";
|
|
8
9
|
import { findManifestFiles, isRecord, requireProjectLayout } from "./resource-syncs/util.js";
|
|
9
10
|
const manifests = {
|
|
11
|
+
agent: ['Agents', 'agent.json'],
|
|
12
|
+
'agent-plugin': ['AgentPlugins', 'agent-plugin.json'],
|
|
10
13
|
component: ['Components', 'component.json'],
|
|
11
14
|
'job-template': ['JobTemplates', 'job-template.json'],
|
|
12
15
|
endpoint: ['Endpoints', 'endpoint.json'],
|
|
@@ -19,7 +22,7 @@ const manifests = {
|
|
|
19
22
|
'service-account': ['ServiceAccounts', 'service-account.json'],
|
|
20
23
|
};
|
|
21
24
|
const deletionOrder = [
|
|
22
|
-
'event', 'schedule', 'endpoint', 'job-template', 'component',
|
|
25
|
+
'agent', 'agent-plugin', 'event', 'schedule', 'endpoint', 'job-template', 'component',
|
|
23
26
|
'database-view', 'database-table', 'role-group', 'service-account', 'group',
|
|
24
27
|
];
|
|
25
28
|
function key(resource, identity) {
|
|
@@ -65,6 +68,9 @@ function localReferences(resource, manifest) {
|
|
|
65
68
|
if (typeof value === 'string' && value)
|
|
66
69
|
refs.push({ resource: family, identity: value });
|
|
67
70
|
};
|
|
71
|
+
if (resource === 'agent' || resource === 'agent-plugin')
|
|
72
|
+
for (const [family, dependency] of agentDependencies(manifest))
|
|
73
|
+
add(family, dependency);
|
|
68
74
|
if (resource === 'job-template' && isRecord(manifest.component))
|
|
69
75
|
add('component', manifest.component.stableKey);
|
|
70
76
|
if (resource === 'endpoint') {
|
|
@@ -102,6 +108,29 @@ function remoteReferences(resource, record, tables) {
|
|
|
102
108
|
if (typeof value === 'string' && value)
|
|
103
109
|
refs.push({ resource: family, identity: value, targetLocal });
|
|
104
110
|
};
|
|
111
|
+
if (resource === 'agent')
|
|
112
|
+
add('service-account', record.serviceAccountUserId);
|
|
113
|
+
const sections = resource === 'agent' ? [record.config, record.policy] : resource === 'agent-plugin' ? [record.config] : [];
|
|
114
|
+
function pluginRefs(value) {
|
|
115
|
+
if (!isRecord(value))
|
|
116
|
+
return;
|
|
117
|
+
add('component', value.componentId);
|
|
118
|
+
for (const kind of ['skill', 'package'])
|
|
119
|
+
if (isRecord(value[kind]) && Array.isArray(value[kind].pluginIds))
|
|
120
|
+
for (const id of value[kind].pluginIds)
|
|
121
|
+
add('agent-plugin', id);
|
|
122
|
+
}
|
|
123
|
+
for (const section of sections)
|
|
124
|
+
if (isRecord(section)) {
|
|
125
|
+
for (const field of ['pluginIds', 'eagerPluginIds'])
|
|
126
|
+
if (Array.isArray(section[field]))
|
|
127
|
+
for (const id of section[field])
|
|
128
|
+
add('agent-plugin', id);
|
|
129
|
+
if (Array.isArray(section.plugins))
|
|
130
|
+
for (const plugin of section.plugins)
|
|
131
|
+
pluginRefs(plugin);
|
|
132
|
+
pluginRefs(section);
|
|
133
|
+
}
|
|
105
134
|
if (resource === 'job-template' || resource === 'endpoint')
|
|
106
135
|
add('component', record.componentId);
|
|
107
136
|
if (resource === 'endpoint' && isRecord(record.options))
|
|
@@ -187,6 +216,8 @@ export function planWorkspacePrune(input) {
|
|
|
187
216
|
keys.add(identity);
|
|
188
217
|
if (!input.resources.includes(resource) || input.local[resource]?.has(identity))
|
|
189
218
|
continue;
|
|
219
|
+
if (resource === 'agent' || resource === 'agent-plugin')
|
|
220
|
+
blockers.push(`Prune of ${resource} is not supported; remove it explicitly after reviewing runs and dependencies.`);
|
|
190
221
|
if (resource === 'service-account' && (record.serviceAccount !== true || id === input.actorId)) {
|
|
191
222
|
blockers.push(`Cannot prune the authenticated account or a human account "${stableKey}".`);
|
|
192
223
|
}
|
|
@@ -308,7 +339,11 @@ export async function buildWorkspacePrunePlan(input) {
|
|
|
308
339
|
if (resources.has('component')) {
|
|
309
340
|
resources.add('job-template');
|
|
310
341
|
resources.add('endpoint');
|
|
342
|
+
resources.add('agent-plugin');
|
|
343
|
+
resources.add('agent');
|
|
311
344
|
}
|
|
345
|
+
if (resources.has('agent-plugin'))
|
|
346
|
+
resources.add('agent');
|
|
312
347
|
if (resources.has('job-template')) {
|
|
313
348
|
resources.add('event');
|
|
314
349
|
resources.add('schedule');
|
|
@@ -324,6 +359,7 @@ export async function buildWorkspacePrunePlan(input) {
|
|
|
324
359
|
resources.add('group');
|
|
325
360
|
resources.add('service-account');
|
|
326
361
|
resources.add('job-template');
|
|
362
|
+
resources.add('agent');
|
|
327
363
|
}
|
|
328
364
|
const local = readPruneManifests(input.cwd, input.resources);
|
|
329
365
|
const inventory = {};
|
|
@@ -373,7 +409,7 @@ function clearPruneBaseline(cwd, envName, item) {
|
|
|
373
409
|
const fields = {
|
|
374
410
|
'job-template': 'jobTemplates', endpoint: 'endpoints', schedule: 'schedules', event: 'events',
|
|
375
411
|
'database-table': 'databaseSchemas', 'database-view': 'databaseViews', group: 'groups',
|
|
376
|
-
'role-group': 'roleGroups', 'service-account': 'serviceAccounts',
|
|
412
|
+
'role-group': 'roleGroups', 'service-account': 'serviceAccounts', agent: 'agents', 'agent-plugin': 'agentPlugins',
|
|
377
413
|
};
|
|
378
414
|
const entries = lock[fields[item.resource]];
|
|
379
415
|
const entry = Object.values(entries).find((value) => normalizeStableKeyValue(value.stableKey) === normalizeStableKeyValue(item.stableKey));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revoengine/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"description": "CLI package for the RevoEngine Platform API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
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/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/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/migration-actions.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/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/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/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/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')\"",
|
|
15
15
|
"dev": "node ./scripts/dev.ts",
|
|
16
16
|
"prepack": "npm run build",
|
|
17
17
|
"test": "node --test ./test/*.test.ts",
|