@liquidmetal-ai/raindrop 0.4.13 → 0.5.0

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.
@@ -1,7 +1,6 @@
1
1
  import { valueOf } from '@liquidmetal-ai/drizzle/appify/build';
2
2
  import { Args, Flags } from '@oclif/core';
3
3
  import { BaseCommand } from '../../base-command.js';
4
- import { defaultConfig } from '../../config.js';
5
4
  export default class Delete extends BaseCommand {
6
5
  static args = {
7
6
  application: Args.string({ char: 'a', description: 'application name', required: false }),
@@ -59,10 +58,6 @@ Deleted (application) at version (version)
59
58
  const config = await this.loadConfig();
60
59
  versionId = config.versionId;
61
60
  }
62
- // Don't allow deleting the epoch version.
63
- if (versionId === defaultConfig.versionId) {
64
- this.error('There are no applications at the epoch version', { exit: 1 });
65
- }
66
61
  if (this.args.application === undefined) {
67
62
  const apps = await this.loadManifest();
68
63
  const app = apps[0];
@@ -78,12 +73,6 @@ Deleted (application) at version (version)
78
73
  // Omitting versionId will delete all versions of the application
79
74
  applications: [{ applicationName: this.args.application, currentVersionId: versionId || '' }],
80
75
  });
81
- // TODO [ian] Failures?
82
- // if (resp.failure.length) {
83
- // this.error(`Failed to delete applications: ${resp.failure.map((f) => `${f.name}@${f.versionId}`).join(', ')}`, {
84
- // exit: 1,
85
- // });
86
- // }
87
76
  }
88
77
  catch (e) {
89
78
  if (e instanceof Error) {
@@ -11,7 +11,6 @@ export default class Deploy extends BaseCommand<typeof Deploy> {
11
11
  impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
12
  start: import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
13
  'no-watch': import("@oclif/core/interfaces").BooleanFlag<boolean>;
14
- resume: import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
14
  lock: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
15
  amend: import("@oclif/core/interfaces").BooleanFlag<boolean>;
17
16
  config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/build/deploy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAmC;IAErD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;;;;;;MA2CV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAuD3B"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/build/deploy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAmC;IAErD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;;;;;MAsCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA0C3B"}
@@ -43,11 +43,6 @@ Deploy a Raindrop application version.
43
43
  required: false,
44
44
  default: false,
45
45
  }),
46
- resume: Flags.boolean({
47
- description: 'resume a deployment',
48
- required: false,
49
- default: false,
50
- }),
51
46
  lock: Flags.string({
52
47
  description: 'override lock ID to resume deployment',
53
48
  required: false,
@@ -57,19 +52,11 @@ Deploy a Raindrop application version.
57
52
  async run() {
58
53
  const config = await this.loadConfig();
59
54
  const versionId = this.flags.versionId ?? config.versionId;
60
- const unlock = this.flags.resume ? (this.flags.lock ?? config.lock) : undefined;
61
- if (this.flags.resume) {
62
- if (versionId === undefined) {
63
- this.error(`Cannot resume deployment without a versionId. Please specify a versionId or run without --resume to start a new deployment.`);
64
- }
65
- if (unlock === undefined) {
66
- this.error(`Cannot resume deployment without a lock. Please specify --lock or run without --resume to start a new deployment.`);
67
- }
68
- }
55
+ const unlock = this.flags.lock ?? config.lock ?? 'user';
69
56
  // Resuming and Sandbox is _always_ amending
70
- const amend = config.sandbox || this.flags.resume || this.flags.amend;
57
+ const amend = config.sandbox || this.flags.amend;
71
58
  if (config.sandbox) {
72
- this.log(`🔔 Branch is in Sandbox mode, running deploy in amend mode`);
59
+ this.log(`🔔 Application is in Sandbox mode, running deploy in amend mode`);
73
60
  }
74
61
  await deploy({
75
62
  command: this,
@@ -159,8 +159,8 @@ Find modules for a specific application and version.
159
159
  console.log(` └─ ${chalk.cyan(module.name)} ${chalk.dim(`(${module.moduleId})`)} ${chalk.yellow(module.type)}`);
160
160
  console.log(` Status: ${convergedStatus} at ${chalk.dim(date)}`);
161
161
  // Display routes for service and actor modules
162
- if (module.service || module.actor) {
163
- const moduleData = module.service || module.actor;
162
+ if (module.service || module.actor || module.mcpService) {
163
+ const moduleData = module.service || module.actor || module.mcpService;
164
164
  if (moduleData?.routes && moduleData.routes.length > 0) {
165
165
  console.log(` ${chalk.bold('Routes:')}`);
166
166
  for (const route of moduleData.routes) {
@@ -33,6 +33,7 @@ export default class List extends BaseCommand<typeof List> {
33
33
  nodesMap: Map<string, VersionNode>;
34
34
  };
35
35
  renderGitLogStyle(applications: ApplicationsResponse_Application[]): string;
36
+ formatAppName(app: ApplicationsResponse_Application): string;
36
37
  groupApplicationsByName(applications: ApplicationsResponse_Application[]): Map<string, ApplicationsResponse_Application[]>;
37
38
  renderCompactView(applications: ApplicationsResponse_Application[]): string;
38
39
  renderTreeView(applications: ApplicationsResponse_Application[]): string;
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/build/list.ts"],"names":[],"mappings":"AAEA,O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AC;IAC9C,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CASzC,CAAC;AAEX,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAqC;IAEvD,MAAM,CAAC,QAAQ,WAgBb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;;;MAmCV;IAEF,gBAAgB,CAAC,YAAY,EAAE,gCAAgC,EAAE;;;;IAkCjE,iBAAiB,CAAC,YAAY,EAAE,gCAAgC,EAAE;IA0IlE,aAAa,CAAC,GAAG,EAAE,gCAAgC,GAAG,MAAM;IAM5D,uBAAuB,CAAC,YAAY,EAAE,gCAAgC,EAAE;IAwBxE,iBAAiB,CAAC,YAAY,EAAE,gCAAgC,EAAE;IAmElE,cAAc,CAAC,YAAY,EAAE,gCAAgC,EAAE;IAoDzD,gBAAgB;IA+DhB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAG3B"}
@@ -106,9 +106,13 @@ Show only running/active versions.
106
106
  const groups = this.groupApplicationsByName(applications);
107
107
  const result = [];
108
108
  // Process each application group separately
109
- for (const [appName, appVersions] of groups) {
109
+ for (const [_appName, appVersions] of groups) {
110
110
  result.push('');
111
- result.push(chalk.bold.underline(`=== ${appName} ===`));
111
+ const firstApp = appVersions[0];
112
+ if (!firstApp)
113
+ continue;
114
+ const formattedAppName = this.formatAppName(firstApp);
115
+ result.push(chalk.bold.underline(`=== ${formattedAppName} ===`));
112
116
  result.push('');
113
117
  // Build the version tree for this app
114
118
  const { rootNodes } = this.buildVersionTree(appVersions);
@@ -215,12 +219,17 @@ Show only running/active versions.
215
219
  result.push(`${graphLine} ${chalk.bold('Status:')} ${statusColor(statusString[app.state])}`);
216
220
  result.push(`${graphLine} ${chalk.bold('Date:')} ${chalk.dim(timestamp)}`);
217
221
  result.push(`${graphLine} `);
218
- result.push(`${graphLine} ${chalk.bold(app.name)}`);
222
+ result.push(`${graphLine} ${chalk.bold(this.formatAppName(app))}`);
219
223
  result.push(`${graphLine}`);
220
224
  }
221
225
  }
222
226
  return result.join('\n');
223
227
  }
228
+ // Helper function to format app name with privileged indicator
229
+ formatAppName(app) {
230
+ const privilegedIcon = app.privileged ? chalk.magenta('🔒 ') : '';
231
+ return `${privilegedIcon}${app.name}`;
232
+ }
224
233
  // Group applications by name
225
234
  groupApplicationsByName(applications) {
226
235
  const groups = new Map();
@@ -255,10 +264,15 @@ Show only running/active versions.
255
264
  const bTime = timestampDate(bLatest.createdAt || EPOCH_TS).getTime();
256
265
  return bTime - aTime;
257
266
  });
258
- for (const [appName, versions] of sortedGroups) {
267
+ for (const [_appName, versions] of sortedGroups) {
259
268
  const activeVersions = versions.filter(v => v.state === UnitState.RUNNING);
260
269
  const deletedVersions = versions.filter(v => v.state === UnitState.DELETED || v.state === UnitState.DELETING);
261
- result.push(`\n${chalk.bold(appName)} ${chalk.dim(`(${versions.length} version${versions.length !== 1 ? 's' : ''})`)}`);
270
+ // Use the first version to check if app is privileged (all versions of same app have same privileged status)
271
+ const firstVersion = versions[0];
272
+ if (!firstVersion)
273
+ continue;
274
+ const formattedAppName = this.formatAppName(firstVersion);
275
+ result.push(`\n${chalk.bold(formattedAppName)} ${chalk.dim(`(${versions.length} version${versions.length !== 1 ? 's' : ''})`)}`);
262
276
  // Show active versions first
263
277
  let shown = 0;
264
278
  for (const version of activeVersions) {
@@ -300,8 +314,12 @@ Show only running/active versions.
300
314
  renderTreeView(applications) {
301
315
  const groups = this.groupApplicationsByName(applications);
302
316
  const result = [];
303
- for (const [appName, versions] of groups) {
304
- result.push(`\n${chalk.bold.underline(`=== ${appName} ===`)}`);
317
+ for (const [_appName, versions] of groups) {
318
+ const firstVersion = versions[0];
319
+ if (!firstVersion)
320
+ continue;
321
+ const formattedAppName = this.formatAppName(firstVersion);
322
+ result.push(`\n${chalk.bold.underline(`=== ${formattedAppName} ===`)}`);
305
323
  // Build version tree for this app
306
324
  const { rootNodes } = this.buildVersionTree(versions);
307
325
  // Render each root and its descendants
@@ -381,11 +399,12 @@ Show only running/active versions.
381
399
  ...a,
382
400
  status: statusString[a.state],
383
401
  locked: a.lock ? 'locked' : '',
402
+ privileged: a.privileged ? 'system' : 'user',
384
403
  };
385
404
  return acc;
386
405
  },
387
406
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
388
- {}), ['organizationId', 'name', 'versionId', 'branch', 'status', 'locked', ...(this.flags.all ? ['deletedAt'] : [])]);
407
+ {}), ['organizationId', 'name', 'versionId', 'branch', 'status', 'locked', 'privileged', ...(this.flags.all ? ['deletedAt'] : [])]);
389
408
  }
390
409
  else if (this.flags.output === 'json') {
391
410
  console.log(toJsonString(ApplicationsResponseSchema, resp, { prettySpaces: 2 }));
@@ -71,7 +71,7 @@ export default class Tail extends BaseCommand {
71
71
  }
72
72
  this.flags.application = valueOf(app.name);
73
73
  }
74
- const { userId, client: riverjackService, organizationId: defaultOrganizationId, } = await this.riverjackService(this.flags.application, this.flags.version);
74
+ const { userId, client: riverjackService, organizationId: defaultOrganizationId, } = await this.tenantRiverjackService();
75
75
  const organizationId = this.flags.impersonate ?? defaultOrganizationId;
76
76
  this.log(`Using organization: ${organizationId}`);
77
77
  this.log(`Using user: ${userId}`);
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,OAAO,WAAW;IAEzD,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAGxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IAGf,SAAS,C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C;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,MAAM,CAAC,CAAC,SAAS,OAAO,WAAW,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAmHrG;AAkID,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,OAAO,WAAW;IAE1D,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAExB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,OAAO,CAAC,CAAC,SAAS,OAAO,WAAW,EACxD,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,GACzB,OAAO,CACR;IACE,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;CACtB,EAAE,CACJ,CA6BA"}
package/dist/deploy.js CHANGED
@@ -132,7 +132,7 @@ async function checkEnvironmentVariables(command, app, catalogService, userId, o
132
132
  }
133
133
  }
134
134
  if (unset) {
135
- command.error('Please set the above environment variables before deploying. You can resume using `raindrop build deploy --resume`');
135
+ command.error('Please set environment variables before deploying. You can resume using `raindrop build deploy --amend`');
136
136
  }
137
137
  }
138
138
  }
@@ -203,9 +203,6 @@ async function uploadDbBundle(command, root, catalogService, userId, organizatio
203
203
  export async function sandbox(options) {
204
204
  const { command, versionId: versionIdRaw, impersonate, isSandboxed } = options;
205
205
  const config = await command.loadConfig();
206
- if (config.lock) {
207
- throw new Error('Operation not allowed: application is in a locked state');
208
- }
209
206
  const { client: catalogService, userId, organizationId: defaultOrganizationId } = await command.catalogService();
210
207
  const organizationId = impersonate ?? defaultOrganizationId;
211
208
  const apps = await command.loadManifest();