@autohq/cli 0.1.201 → 0.1.203

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.
@@ -22418,6 +22418,7 @@ var SESSION_STATUSES = [
22418
22418
  var SESSION_DISPLAY_TITLE_MAX_LENGTH = 64;
22419
22419
  var SessionStatusSchema = external_exports.enum(SESSION_STATUSES);
22420
22420
  var RunDisplayTitleSchema = external_exports.string().trim().max(SESSION_DISPLAY_TITLE_MAX_LENGTH);
22421
+ var AmbientStatusSchema = external_exports.string().trim().min(1);
22421
22422
  var SESSION_CHECK_STATUSES = [
22422
22423
  "queued",
22423
22424
  "in_progress",
@@ -22452,6 +22453,8 @@ var SessionRecordSchema = external_exports.object({
22452
22453
  correlationKey: external_exports.string().nullable(),
22453
22454
  workflowId: external_exports.string().min(1),
22454
22455
  displayTitle: RunDisplayTitleSchema,
22456
+ ambientStatus: AmbientStatusSchema.nullable(),
22457
+ ambientStatusUpdatedAt: external_exports.string().datetime().nullable(),
22455
22458
  starterActor: AuthActorSchema.nullable(),
22456
22459
  snapshot: AgentResourceSchema,
22457
22460
  environmentSnapshot: EnvironmentResourceSchema,
@@ -22606,6 +22609,7 @@ var RunSummarySchema = external_exports.object({
22606
22609
  id: SessionIdSchema2,
22607
22610
  agentName: external_exports.string(),
22608
22611
  displayTitle: external_exports.string(),
22612
+ ambientStatus: AmbientStatusSchema.nullable(),
22609
22613
  status: SessionStatusSchema,
22610
22614
  error: JsonValueSchema2.nullable(),
22611
22615
  workflowId: external_exports.string(),
@@ -26656,7 +26660,7 @@ Object.assign(lookup, {
26656
26660
  // package.json
26657
26661
  var package_default = {
26658
26662
  name: "@autohq/cli",
26659
- version: "0.1.201",
26663
+ version: "0.1.203",
26660
26664
  license: "SEE LICENSE IN README.md",
26661
26665
  publishConfig: {
26662
26666
  access: "public"
package/dist/index.js CHANGED
@@ -18280,7 +18280,7 @@ function isSessionTerminalStatus(status) {
18280
18280
  (terminalStatus) => terminalStatus === status
18281
18281
  );
18282
18282
  }
18283
- var SESSION_STATUSES, SESSION_TERMINAL_STATUSES, SESSION_DISPLAY_TITLE_MAX_LENGTH, SessionStatusSchema, RunDisplayTitleSchema, SESSION_CHECK_STATUSES, SESSION_CHECK_CONCLUSIONS, SESSION_CHECK_TIMEOUT_PHASES, SessionCheckStatusSchema, SessionCheckConclusionSchema, SessionCheckTimeoutPhaseSchema, ManualSessionRequestSchema, SessionArchiveRequestSchema, SessionsArchiveRequestSchema, SessionRecordSchema, SessionsArchiveResponseSchema;
18283
+ var SESSION_STATUSES, SESSION_TERMINAL_STATUSES, SESSION_DISPLAY_TITLE_MAX_LENGTH, SessionStatusSchema, RunDisplayTitleSchema, AmbientStatusSchema, SESSION_CHECK_STATUSES, SESSION_CHECK_CONCLUSIONS, SESSION_CHECK_TIMEOUT_PHASES, SessionCheckStatusSchema, SessionCheckConclusionSchema, SessionCheckTimeoutPhaseSchema, ManualSessionRequestSchema, SessionArchiveRequestSchema, SessionsArchiveRequestSchema, SessionRecordSchema, SessionsArchiveResponseSchema;
18284
18284
  var init_sessions = __esm({
18285
18285
  "../../packages/schemas/src/sessions.ts"() {
18286
18286
  "use strict";
@@ -18302,6 +18302,7 @@ var init_sessions = __esm({
18302
18302
  SESSION_DISPLAY_TITLE_MAX_LENGTH = 64;
18303
18303
  SessionStatusSchema = external_exports.enum(SESSION_STATUSES);
18304
18304
  RunDisplayTitleSchema = external_exports.string().trim().max(SESSION_DISPLAY_TITLE_MAX_LENGTH);
18305
+ AmbientStatusSchema = external_exports.string().trim().min(1);
18305
18306
  SESSION_CHECK_STATUSES = [
18306
18307
  "queued",
18307
18308
  "in_progress",
@@ -18336,6 +18337,8 @@ var init_sessions = __esm({
18336
18337
  correlationKey: external_exports.string().nullable(),
18337
18338
  workflowId: external_exports.string().min(1),
18338
18339
  displayTitle: RunDisplayTitleSchema,
18340
+ ambientStatus: AmbientStatusSchema.nullable(),
18341
+ ambientStatusUpdatedAt: external_exports.string().datetime().nullable(),
18339
18342
  starterActor: AuthActorSchema.nullable(),
18340
18343
  snapshot: AgentResourceSchema,
18341
18344
  environmentSnapshot: EnvironmentResourceSchema,
@@ -18502,6 +18505,7 @@ var init_session_introspection = __esm({
18502
18505
  id: SessionIdSchema,
18503
18506
  agentName: external_exports.string(),
18504
18507
  displayTitle: external_exports.string(),
18508
+ ambientStatus: AmbientStatusSchema.nullable(),
18505
18509
  status: SessionStatusSchema,
18506
18510
  error: JsonValueSchema.nullable(),
18507
18511
  workflowId: external_exports.string(),
@@ -21669,7 +21673,7 @@ var init_package = __esm({
21669
21673
  "package.json"() {
21670
21674
  package_default = {
21671
21675
  name: "@autohq/cli",
21672
- version: "0.1.201",
21676
+ version: "0.1.203",
21673
21677
  license: "SEE LICENSE IN README.md",
21674
21678
  publishConfig: {
21675
21679
  access: "public"
@@ -35314,6 +35318,53 @@ function scopeLabel(projectId) {
35314
35318
  return projectId ? `project:${projectId}` : "organization";
35315
35319
  }
35316
35320
 
35321
+ // src/commands/secrets/view.ts
35322
+ init_base_url();
35323
+ init_browser();
35324
+ init_file();
35325
+ async function viewSecrets(input) {
35326
+ const scope = await resolveSecretsScope(input);
35327
+ const url2 = secretsSettingsUrl({
35328
+ webBaseUrl: resolveSecretsWebBaseUrl(input),
35329
+ ...scope
35330
+ });
35331
+ input.context.writeOutput(`Opening ${url2}`);
35332
+ (input.openBrowser ?? openBrowser)(url2);
35333
+ }
35334
+ function secretsSettingsUrl(input) {
35335
+ const path2 = input.projectId ? `/orgs/${input.organizationId}/projects/${input.projectId}/settings/secrets` : `/orgs/${input.organizationId}/settings/secrets`;
35336
+ return new URL(path2, input.webBaseUrl).toString();
35337
+ }
35338
+ async function resolveSecretsScope(input) {
35339
+ const client = createContextApiClient(input.context);
35340
+ if (input.commandOptions.project) {
35341
+ const scope = await requireProjectScope({
35342
+ context: input.context,
35343
+ options: input.commandOptions,
35344
+ identifier: input.commandOptions.project,
35345
+ explicitHint: "--project <project>"
35346
+ });
35347
+ const organizationId2 = scope.organizationId ?? (await client.activeOrganization()).organizationId;
35348
+ return { organizationId: organizationId2, projectId: scope.projectId };
35349
+ }
35350
+ const { organizationId } = await client.activeOrganization();
35351
+ return { organizationId };
35352
+ }
35353
+ function resolveSecretsWebBaseUrl(input) {
35354
+ const explicitWebBaseUrl = normalizeApiBaseUrl(
35355
+ input.context.env.AUTO_WEB_BASE_URL
35356
+ );
35357
+ if (explicitWebBaseUrl) {
35358
+ return explicitWebBaseUrl;
35359
+ }
35360
+ const config2 = readConfig(input.context.configPath);
35361
+ return resolveApiBaseUrl({
35362
+ explicit: apiUrlFromOptions(input.context, input.commandOptions),
35363
+ env: input.context.env,
35364
+ configServerUrl: config2.serverUrl
35365
+ });
35366
+ }
35367
+
35317
35368
  // src/commands/secrets/commands.ts
35318
35369
  function registerSecretCommands(program, context) {
35319
35370
  const secrets = program.command("secrets").description("Manage Auto organization and project secrets.");
@@ -35359,6 +35410,9 @@ function registerSecretCommands(program, context) {
35359
35410
  context
35360
35411
  });
35361
35412
  });
35413
+ secrets.command("view").description("Open the web Secrets settings page in your browser.").option("--project <project>", "project id; defaults to organization scope").option("--api-url <url>", "Auto API base URL").option("--api-base-url <url>", "Auto API base URL").action(async (commandOptions) => {
35414
+ await viewSecrets({ commandOptions, context });
35415
+ });
35362
35416
  secrets.command("remove").alias("rm").description("Remove a secret.").argument("<name>", "secret name").option("--project <project>", "project id; defaults to organization scope").option("--json", "print removed secret metadata as JSON").option("-y, --yes", "skip confirmation prompt").option("--api-url <url>", "Auto API base URL").option("--api-base-url <url>", "Auto API base URL").action(async (name, commandOptions) => {
35363
35417
  await removeSecret({
35364
35418
  client: createContextApiClient(context),
@@ -36161,6 +36215,9 @@ function formatRunShowText(result, writeLine, style) {
36161
36215
  if (summary.session.displayTitle) {
36162
36216
  writeLine(`${style.label("title:")} ${summary.session.displayTitle}`);
36163
36217
  }
36218
+ if (summary.session.ambientStatus) {
36219
+ writeLine(`${style.label("progress:")} ${summary.session.ambientStatus}`);
36220
+ }
36164
36221
  writeLine(
36165
36222
  style.dim(
36166
36223
  `created=${summary.session.createdAt} started=${summary.session.startedAt ?? "-"} finished=${summary.session.finishedAt ?? "-"}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.201",
3
+ "version": "0.1.203",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"