@wave-ai-os/wave-cli 0.1.72 → 0.1.73

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 CHANGED
@@ -74,6 +74,12 @@ The API base defaults to production: `https://api.ourwave.io`. Supply
74
74
  `--base-url`, stdin context, `WAVE_API_BASE_URL`/`WAVE_API_URL`, or config only
75
75
  when using a non-production environment.
76
76
 
77
+ `wave login` always opens the production browser login at
78
+ `https://app.ourwave.io/login` unless `--base-url` is supplied explicitly.
79
+ The CLI uses `https://api.ourwave.io` only to create and poll that login
80
+ session. Ambient endpoint configuration never redirects a bare login to a
81
+ local environment.
82
+
77
83
  Organization-scoped data commands use the organization certified by the
78
84
  authenticated CLI token. `--organization-id` is the only local override.
79
85
 
package/dist/index.cjs CHANGED
@@ -10166,6 +10166,9 @@ function asRecord5(value) {
10166
10166
  function asString(value) {
10167
10167
  return typeof value === "string" && value.trim() !== "" ? value.trim() : void 0;
10168
10168
  }
10169
+ function resolveLoginApiBaseUrl(globals) {
10170
+ return asString(globals.baseUrl) ?? DEFAULT_PRODUCTION_API_BASE_URL;
10171
+ }
10169
10172
  function localUiBaseUrlFor(baseUrl) {
10170
10173
  const parsed = new URL(baseUrl);
10171
10174
  if ((parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1") && parsed.port === "3009") {
@@ -10228,9 +10231,10 @@ async function authStatusRequest(params) {
10228
10231
  }
10229
10232
  async function runTokenLogin(cmd, opts) {
10230
10233
  const context = await resolveUnscopedCommandContext(cmd.optsWithGlobals());
10231
- const baseUrl = context.runtimeOptions.baseUrl;
10232
10234
  const globals = cmd.optsWithGlobals();
10233
- const token = typeof opts.token === "string" && opts.token.trim() !== "" ? opts.token.trim() : typeof globals.token === "string" && globals.token.trim() !== "" ? globals.token.trim() : context.runtimeOptions.token;
10235
+ const explicitBaseUrl = asString(globals.baseUrl);
10236
+ const baseUrl = resolveLoginApiBaseUrl(globals);
10237
+ const token = typeof opts.token === "string" && opts.token.trim() !== "" ? opts.token.trim() : typeof globals.token === "string" && globals.token.trim() !== "" ? globals.token.trim() : explicitBaseUrl ? context.runtimeOptions.token : void 0;
10234
10238
  const timeoutMs = positiveInt2(opts.timeoutMs ?? context.runtimeOptions.timeoutMs, 1e4);
10235
10239
  if (!baseUrl) {
10236
10240
  return printEnvelopeAndExit({
@@ -10295,7 +10299,7 @@ async function runTokenLogin(cmd, opts) {
10295
10299
  }
10296
10300
  async function runBrowserLogin(cmd, opts) {
10297
10301
  const context = await resolveUnscopedCommandContext(cmd.optsWithGlobals());
10298
- const baseUrl = context.runtimeOptions.baseUrl;
10302
+ const baseUrl = resolveLoginApiBaseUrl(cmd.optsWithGlobals());
10299
10303
  const timeoutMs = positiveInt2(opts.timeoutMs ?? context.runtimeOptions.timeoutMs, DEFAULT_LOGIN_TIMEOUT_MS);
10300
10304
  const pollIntervalMs = positiveInt2(opts.pollIntervalMs, DEFAULT_POLL_INTERVAL_MS);
10301
10305
  if (!baseUrl) {
@@ -15233,7 +15237,7 @@ function registerAtlasAuthoringCommands(program) {
15233
15237
  });
15234
15238
  });
15235
15239
  const automations = program.command("automations").description("Bounded Automation authoring operations");
15236
- automations.command("create").description("Create an Automation through the API-owned createAutomation contract").requiredOption("--summary <summary>").requiredOption("--ai-task-config <json>", "Valid JSON for the API-owned ai_task_config field").requiredOption("--idempotency-key <key>", "Required create idempotency key").option("--description <description>").option("--notes <notes>").option("--member-id <memberId>").option("--agent-id <agentId>", "Optional executor Agent id for a repeat Automation").option("--status <status>").option("--priority <priority>").option("--due-date <date>", "ISO-8601 date (YYYY-MM-DD)").action(async (opts, cmd) => {
15240
+ automations.command("create").description("Create a Backlog Automation through the API-owned createAutomation contract").requiredOption("--summary <summary>").requiredOption("--ai-task-config <json>", "Valid JSON for the API-owned ai_task_config field").requiredOption("--idempotency-key <key>", "Required create idempotency key").option("--description <description>").option("--notes <notes>").option("--member-id <memberId>").option("--agent-id <agentId>", "Optional executor Agent id for a repeat Automation").option("--priority <priority>").option("--due-date <date>", "ISO-8601 date (YYYY-MM-DD)").action(async (opts, cmd) => {
15237
15241
  const idempotencyKey = idempotencyKeySchema.parse(opts.idempotencyKey);
15238
15242
  const context = await resolveCommandContext(cmd.optsWithGlobals());
15239
15243
  const organizationId = resolveOrganizationId(context.organizationId);
@@ -15256,7 +15260,6 @@ function registerAtlasAuthoringCommands(program) {
15256
15260
  ...opts.notes !== void 0 ? { notes: String(opts.notes) } : {},
15257
15261
  ...opts.memberId !== void 0 ? { member_id: idSchema14.parse(opts.memberId) } : {},
15258
15262
  ...opts.agentId !== void 0 ? { agentId: idSchema14.parse(opts.agentId) } : {},
15259
- ...opts.status !== void 0 ? { status: String(opts.status) } : {},
15260
15263
  ...opts.priority !== void 0 ? { priority: String(opts.priority) } : {},
15261
15264
  ...opts.dueDate !== void 0 ? { due_date: isoDateSchema.parse(opts.dueDate) } : {}
15262
15265
  },
@@ -15280,10 +15283,10 @@ function registerAtlasAuthoringCommands(program) {
15280
15283
  isShow: true
15281
15284
  });
15282
15285
  });
15283
- automations.command("update").description("Update one task-backed Automation through the API-owned updateTask contract").requiredOption("--id <idOrSlug>", "Automation id or slug").requiredOption(
15286
+ automations.command("update").description("Update one task-backed Automation without changing its system-managed status").requiredOption("--id <idOrSlug>", "Automation id or slug").requiredOption(
15284
15287
  "--expected-update-version <version>",
15285
15288
  "Exact opaque updateVersion value from automations show; rejects stale writes"
15286
- ).option("--summary <summary>").option("--description <description>").option("--notes <notes>").option("--status <status>").option("--priority <priority>").option("--due-date <date>", "ISO-8601 date (YYYY-MM-DD)").option("--ai-task-config <json>", "Complete replacement ai_task_config JSON object").option(
15289
+ ).option("--summary <summary>").option("--description <description>").option("--notes <notes>").option("--priority <priority>").option("--due-date <date>", "ISO-8601 date (YYYY-MM-DD)").option("--ai-task-config <json>", "Complete replacement ai_task_config JSON object").option(
15287
15290
  "--agent-id <agentId>",
15288
15291
  "Executor Agent id; requires --ai-task-config and is stored in that config"
15289
15292
  ).action(async (opts, cmd) => {
@@ -15303,7 +15306,6 @@ function registerAtlasAuthoringCommands(program) {
15303
15306
  ...opts.summary !== void 0 ? { summary: String(opts.summary) } : {},
15304
15307
  ...opts.description !== void 0 ? { description: String(opts.description) } : {},
15305
15308
  ...opts.notes !== void 0 ? { notes: String(opts.notes) } : {},
15306
- ...opts.status !== void 0 ? { status: String(opts.status) } : {},
15307
15309
  ...opts.priority !== void 0 ? { priority: String(opts.priority) } : {},
15308
15310
  ...opts.dueDate !== void 0 ? { due_date: isoDateSchema.parse(opts.dueDate) } : {},
15309
15311
  ...aiTaskConfig !== void 0 ? { ai_task_config: aiTaskConfig } : {}
@@ -15422,7 +15424,7 @@ var import_node_path4 = require("path");
15422
15424
  var import_node_crypto3 = require("crypto");
15423
15425
 
15424
15426
  // src/version.ts
15425
- var CLI_VERSION = "0.1.72";
15427
+ var CLI_VERSION = "0.1.73";
15426
15428
 
15427
15429
  // src/operationMetadata.ts
15428
15430
  var DISCOVERY_OPERATION_IDS = [
@@ -16254,9 +16256,10 @@ var NAMESPACE_DOCS = {
16254
16256
  mutates: true,
16255
16257
  safety: [
16256
16258
  "Create calls only createAutomation with an explicit idempotency key.",
16259
+ "Create always leaves status to the API, which starts Automations in Backlog.",
16257
16260
  "Only the API-defined ai_task_config field accepts validated JSON.",
16258
16261
  "Optional executor Agent linkage is sent only through the API-defined top-level agentId input.",
16259
- "Update calls only updateTask with an exact opaque updateVersion token; it cannot change task type, ownership, or project linkage.",
16262
+ "Update calls only updateTask with an exact opaque updateVersion token; it cannot change status, task type, ownership, or project linkage.",
16260
16263
  "Does not create a project Task, run an Automation, or invoke AI OS actions.",
16261
16264
  "Show uses the API-owned automation query by id; no slug fallback is implemented."
16262
16265
  ],
package/dist/index.js CHANGED
@@ -10165,6 +10165,9 @@ function asRecord5(value) {
10165
10165
  function asString(value) {
10166
10166
  return typeof value === "string" && value.trim() !== "" ? value.trim() : void 0;
10167
10167
  }
10168
+ function resolveLoginApiBaseUrl(globals) {
10169
+ return asString(globals.baseUrl) ?? DEFAULT_PRODUCTION_API_BASE_URL;
10170
+ }
10168
10171
  function localUiBaseUrlFor(baseUrl) {
10169
10172
  const parsed = new URL(baseUrl);
10170
10173
  if ((parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1") && parsed.port === "3009") {
@@ -10227,9 +10230,10 @@ async function authStatusRequest(params) {
10227
10230
  }
10228
10231
  async function runTokenLogin(cmd, opts) {
10229
10232
  const context = await resolveUnscopedCommandContext(cmd.optsWithGlobals());
10230
- const baseUrl = context.runtimeOptions.baseUrl;
10231
10233
  const globals = cmd.optsWithGlobals();
10232
- const token = typeof opts.token === "string" && opts.token.trim() !== "" ? opts.token.trim() : typeof globals.token === "string" && globals.token.trim() !== "" ? globals.token.trim() : context.runtimeOptions.token;
10234
+ const explicitBaseUrl = asString(globals.baseUrl);
10235
+ const baseUrl = resolveLoginApiBaseUrl(globals);
10236
+ const token = typeof opts.token === "string" && opts.token.trim() !== "" ? opts.token.trim() : typeof globals.token === "string" && globals.token.trim() !== "" ? globals.token.trim() : explicitBaseUrl ? context.runtimeOptions.token : void 0;
10233
10237
  const timeoutMs = positiveInt2(opts.timeoutMs ?? context.runtimeOptions.timeoutMs, 1e4);
10234
10238
  if (!baseUrl) {
10235
10239
  return printEnvelopeAndExit({
@@ -10294,7 +10298,7 @@ async function runTokenLogin(cmd, opts) {
10294
10298
  }
10295
10299
  async function runBrowserLogin(cmd, opts) {
10296
10300
  const context = await resolveUnscopedCommandContext(cmd.optsWithGlobals());
10297
- const baseUrl = context.runtimeOptions.baseUrl;
10301
+ const baseUrl = resolveLoginApiBaseUrl(cmd.optsWithGlobals());
10298
10302
  const timeoutMs = positiveInt2(opts.timeoutMs ?? context.runtimeOptions.timeoutMs, DEFAULT_LOGIN_TIMEOUT_MS);
10299
10303
  const pollIntervalMs = positiveInt2(opts.pollIntervalMs, DEFAULT_POLL_INTERVAL_MS);
10300
10304
  if (!baseUrl) {
@@ -15232,7 +15236,7 @@ function registerAtlasAuthoringCommands(program) {
15232
15236
  });
15233
15237
  });
15234
15238
  const automations = program.command("automations").description("Bounded Automation authoring operations");
15235
- automations.command("create").description("Create an Automation through the API-owned createAutomation contract").requiredOption("--summary <summary>").requiredOption("--ai-task-config <json>", "Valid JSON for the API-owned ai_task_config field").requiredOption("--idempotency-key <key>", "Required create idempotency key").option("--description <description>").option("--notes <notes>").option("--member-id <memberId>").option("--agent-id <agentId>", "Optional executor Agent id for a repeat Automation").option("--status <status>").option("--priority <priority>").option("--due-date <date>", "ISO-8601 date (YYYY-MM-DD)").action(async (opts, cmd) => {
15239
+ automations.command("create").description("Create a Backlog Automation through the API-owned createAutomation contract").requiredOption("--summary <summary>").requiredOption("--ai-task-config <json>", "Valid JSON for the API-owned ai_task_config field").requiredOption("--idempotency-key <key>", "Required create idempotency key").option("--description <description>").option("--notes <notes>").option("--member-id <memberId>").option("--agent-id <agentId>", "Optional executor Agent id for a repeat Automation").option("--priority <priority>").option("--due-date <date>", "ISO-8601 date (YYYY-MM-DD)").action(async (opts, cmd) => {
15236
15240
  const idempotencyKey = idempotencyKeySchema.parse(opts.idempotencyKey);
15237
15241
  const context = await resolveCommandContext(cmd.optsWithGlobals());
15238
15242
  const organizationId = resolveOrganizationId(context.organizationId);
@@ -15255,7 +15259,6 @@ function registerAtlasAuthoringCommands(program) {
15255
15259
  ...opts.notes !== void 0 ? { notes: String(opts.notes) } : {},
15256
15260
  ...opts.memberId !== void 0 ? { member_id: idSchema14.parse(opts.memberId) } : {},
15257
15261
  ...opts.agentId !== void 0 ? { agentId: idSchema14.parse(opts.agentId) } : {},
15258
- ...opts.status !== void 0 ? { status: String(opts.status) } : {},
15259
15262
  ...opts.priority !== void 0 ? { priority: String(opts.priority) } : {},
15260
15263
  ...opts.dueDate !== void 0 ? { due_date: isoDateSchema.parse(opts.dueDate) } : {}
15261
15264
  },
@@ -15279,10 +15282,10 @@ function registerAtlasAuthoringCommands(program) {
15279
15282
  isShow: true
15280
15283
  });
15281
15284
  });
15282
- automations.command("update").description("Update one task-backed Automation through the API-owned updateTask contract").requiredOption("--id <idOrSlug>", "Automation id or slug").requiredOption(
15285
+ automations.command("update").description("Update one task-backed Automation without changing its system-managed status").requiredOption("--id <idOrSlug>", "Automation id or slug").requiredOption(
15283
15286
  "--expected-update-version <version>",
15284
15287
  "Exact opaque updateVersion value from automations show; rejects stale writes"
15285
- ).option("--summary <summary>").option("--description <description>").option("--notes <notes>").option("--status <status>").option("--priority <priority>").option("--due-date <date>", "ISO-8601 date (YYYY-MM-DD)").option("--ai-task-config <json>", "Complete replacement ai_task_config JSON object").option(
15288
+ ).option("--summary <summary>").option("--description <description>").option("--notes <notes>").option("--priority <priority>").option("--due-date <date>", "ISO-8601 date (YYYY-MM-DD)").option("--ai-task-config <json>", "Complete replacement ai_task_config JSON object").option(
15286
15289
  "--agent-id <agentId>",
15287
15290
  "Executor Agent id; requires --ai-task-config and is stored in that config"
15288
15291
  ).action(async (opts, cmd) => {
@@ -15302,7 +15305,6 @@ function registerAtlasAuthoringCommands(program) {
15302
15305
  ...opts.summary !== void 0 ? { summary: String(opts.summary) } : {},
15303
15306
  ...opts.description !== void 0 ? { description: String(opts.description) } : {},
15304
15307
  ...opts.notes !== void 0 ? { notes: String(opts.notes) } : {},
15305
- ...opts.status !== void 0 ? { status: String(opts.status) } : {},
15306
15308
  ...opts.priority !== void 0 ? { priority: String(opts.priority) } : {},
15307
15309
  ...opts.dueDate !== void 0 ? { due_date: isoDateSchema.parse(opts.dueDate) } : {},
15308
15310
  ...aiTaskConfig !== void 0 ? { ai_task_config: aiTaskConfig } : {}
@@ -15421,7 +15423,7 @@ import { join as join3 } from "path";
15421
15423
  import { createHash } from "crypto";
15422
15424
 
15423
15425
  // src/version.ts
15424
- var CLI_VERSION = "0.1.72";
15426
+ var CLI_VERSION = "0.1.73";
15425
15427
 
15426
15428
  // src/operationMetadata.ts
15427
15429
  var DISCOVERY_OPERATION_IDS = [
@@ -16253,9 +16255,10 @@ var NAMESPACE_DOCS = {
16253
16255
  mutates: true,
16254
16256
  safety: [
16255
16257
  "Create calls only createAutomation with an explicit idempotency key.",
16258
+ "Create always leaves status to the API, which starts Automations in Backlog.",
16256
16259
  "Only the API-defined ai_task_config field accepts validated JSON.",
16257
16260
  "Optional executor Agent linkage is sent only through the API-defined top-level agentId input.",
16258
- "Update calls only updateTask with an exact opaque updateVersion token; it cannot change task type, ownership, or project linkage.",
16261
+ "Update calls only updateTask with an exact opaque updateVersion token; it cannot change status, task type, ownership, or project linkage.",
16259
16262
  "Does not create a project Task, run an Automation, or invoke AI OS actions.",
16260
16263
  "Show uses the API-owned automation query by id; no slug fallback is implemented."
16261
16264
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wave-ai-os/wave-cli",
3
- "version": "0.1.72",
3
+ "version": "0.1.73",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "wave": "dist/index.js"