@wave-ai-os/wave-cli 0.1.74 → 0.1.75

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/dist/index.cjs CHANGED
@@ -14883,6 +14883,7 @@ var idempotencyKeySchema = import_zod19.z.string().min(1).refine((value) => valu
14883
14883
  var skillScopeSchema = import_zod19.z.enum(["ADMIN_GLOBAL", "MEMBER_PERSONAL"]);
14884
14884
  var isoDateSchema = import_zod19.z.iso.date();
14885
14885
  var nonEmptyStringSchema = import_zod19.z.string().trim().min(1);
14886
+ var AUTOMATION_RUN_HTTP_TIMEOUT_MS = 6e4;
14886
14887
  var agentToolAccessSchema = import_zod19.z.array(
14887
14888
  import_zod19.z.object({
14888
14889
  tool_key: nonEmptyStringSchema,
@@ -15018,10 +15019,33 @@ var AUTOMATION_SELECTION = `{
15018
15019
  aiTaskConfig
15019
15020
  organizationId
15020
15021
  memberId
15022
+ agentId
15021
15023
  createdAt
15022
15024
  updatedAt
15023
15025
  updateVersion
15024
15026
  }`;
15027
+ var AUTOMATION_RUN_SELECTION = `{
15028
+ id
15029
+ type
15030
+ attributes {
15031
+ id
15032
+ title
15033
+ status
15034
+ errorMessage
15035
+ usedAt
15036
+ agentTriggerId
15037
+ executionId
15038
+ executionSlug
15039
+ traceId
15040
+ outputContentId
15041
+ outputContentSlug
15042
+ outputContent {
15043
+ id
15044
+ slug
15045
+ }
15046
+ targetId
15047
+ }
15048
+ }`;
15025
15049
  function asRecord7(value) {
15026
15050
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
15027
15051
  }
@@ -15129,12 +15153,92 @@ function normalizePersistedUpdatePayload(payload) {
15129
15153
  persisted: { id, slug, update_version: updateVersion }
15130
15154
  };
15131
15155
  }
15156
+ function normalizeAutomationRunPayload(payload) {
15157
+ const mutation = asRecord7(payload);
15158
+ if (!mutation) {
15159
+ throw new CliError({
15160
+ message: "Automation run response did not include a mutation payload.",
15161
+ kind: "malformed_response",
15162
+ status: 502,
15163
+ exitCode: EXIT_CODES.networkOrUpstream
15164
+ });
15165
+ }
15166
+ if (mutation.ok !== true) {
15167
+ return {
15168
+ ok: mutation.ok,
15169
+ status: mutation.status,
15170
+ errorCode: mutation.errorCode ?? null,
15171
+ errors: mutation.errors ?? null,
15172
+ data: mutation.data ?? null
15173
+ };
15174
+ }
15175
+ const data = asRecord7(mutation.data);
15176
+ const automationTaskId = asRequiredString(data?.automation_task_id);
15177
+ const automationTaskSlug = asRequiredString(data?.automation_task_slug);
15178
+ const agentId = asRequiredString(data?.agent_id);
15179
+ const agentSlug = asRequiredString(data?.agent_slug);
15180
+ const agentTriggerId = asRequiredString(data?.agent_trigger_id);
15181
+ const executionId = asRequiredString(data?.execution_id);
15182
+ const executionSlug = asRequiredString(data?.execution_slug);
15183
+ const executionStatus = asRequiredString(data?.execution_status);
15184
+ const traceId = asRequiredString(data?.trace_id);
15185
+ if (!data || !automationTaskId || !automationTaskSlug || !agentId || !agentSlug || !agentTriggerId || !executionId || !executionSlug || !executionStatus || !traceId) {
15186
+ throw new CliError({
15187
+ message: "Automation run response did not include automation, execution, and trace evidence.",
15188
+ kind: "malformed_response",
15189
+ status: 502,
15190
+ exitCode: EXIT_CODES.networkOrUpstream
15191
+ });
15192
+ }
15193
+ return {
15194
+ ok: mutation.ok,
15195
+ status: mutation.status,
15196
+ errorCode: mutation.errorCode ?? null,
15197
+ errors: mutation.errors ?? null,
15198
+ run: {
15199
+ executed: data.executed === true,
15200
+ skipped_reason: asRequiredString(data.skipped_reason),
15201
+ automation: {
15202
+ id: automationTaskId,
15203
+ slug: automationTaskSlug
15204
+ },
15205
+ agent: {
15206
+ id: agentId,
15207
+ slug: agentSlug
15208
+ },
15209
+ trigger: {
15210
+ id: agentTriggerId,
15211
+ type: asRequiredString(data.trigger_type)
15212
+ },
15213
+ execution: {
15214
+ id: executionId,
15215
+ slug: executionSlug,
15216
+ status: executionStatus
15217
+ },
15218
+ output_content: {
15219
+ id: asRequiredString(data.output_content_id),
15220
+ slug: asRequiredString(data.output_content_slug)
15221
+ },
15222
+ trace_id: traceId,
15223
+ correlation_id: asRequiredString(data.correlation_id),
15224
+ readback_command: `wave automations run-show --agent-id ${agentSlug} --execution-slug ${executionSlug}`
15225
+ }
15226
+ };
15227
+ }
15132
15228
  function parseAutomationConfig(value) {
15133
15229
  return automationConfigSchema.parse(parseJson(String(value), "--ai-task-config"));
15134
15230
  }
15135
15231
  function parseExpectedUpdateVersion(value) {
15136
15232
  return nonEmptyStringSchema.parse(String(value));
15137
15233
  }
15234
+ function withAutomationRunTimeout(runtimeOptions) {
15235
+ const configuredTimeoutMs = Number(runtimeOptions.timeoutMs);
15236
+ const timeoutMs = Number.isFinite(configuredTimeoutMs) && configuredTimeoutMs > AUTOMATION_RUN_HTTP_TIMEOUT_MS ? configuredTimeoutMs : AUTOMATION_RUN_HTTP_TIMEOUT_MS;
15237
+ return {
15238
+ ...runtimeOptions,
15239
+ timeoutMs
15240
+ };
15241
+ }
15138
15242
  function registerAtlasAuthoringCommands(program) {
15139
15243
  const agents = program.command("agents").description("Bounded Agent authoring operations");
15140
15244
  agents.command("create").description("Create an Agent through the API-owned createAgent contract").requiredOption("--idempotency-key <key>", "Required create idempotency key").option("--name <name>").option("--description <description>").option("--notes <notes>").option("--member-id <memberId>").option("--status <status>").option("--visibility <visibility>").option("--model <model>").option("--run-when-mentioned <boolean>", "true or false").option("--web-access-enabled <boolean>", "true or false").option("--web-fetch-enabled <boolean>", "true or false").option("--search-past-conversations-enabled <boolean>", "true or false").option("--app-rules-creation-enabled <boolean>", "true or false").option("--tool-discovery-enabled <boolean>", "true or false").option("--self-updates-enabled <boolean>", "true or false").option("--trusted-urls <urls>", "Comma-separated trusted URLs").option("--tool-access <json>", "JSON array of canonical native Agent tool scopes").option(
@@ -15367,7 +15471,7 @@ function registerAtlasAuthoringCommands(program) {
15367
15471
  ...opts.description !== void 0 ? { description: String(opts.description) } : {},
15368
15472
  ...opts.notes !== void 0 ? { notes: String(opts.notes) } : {},
15369
15473
  ...opts.memberId !== void 0 ? { member_id: idSchema14.parse(opts.memberId) } : {},
15370
- ...opts.agentId !== void 0 ? { agentId: idSchema14.parse(opts.agentId) } : {},
15474
+ ...opts.agentId !== void 0 ? { agent_id: idSchema14.parse(opts.agentId) } : {},
15371
15475
  ...opts.priority !== void 0 ? { priority: String(opts.priority) } : {},
15372
15476
  ...opts.dueDate !== void 0 ? { due_date: isoDateSchema.parse(opts.dueDate) } : {}
15373
15477
  },
@@ -15391,6 +15495,44 @@ function registerAtlasAuthoringCommands(program) {
15391
15495
  isShow: true
15392
15496
  });
15393
15497
  });
15498
+ automations.command("run").description("Run one scheduled Automation by id or slug and return execution trace evidence").requiredOption("--id <idOrSlug>", "Automation id or slug").action(async (opts, cmd) => {
15499
+ const automationId = idSchema14.parse(opts.id);
15500
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
15501
+ const organizationId = resolveOrganizationId(context.organizationId);
15502
+ await runGraphqlMutationCommand({
15503
+ command: "automations.run",
15504
+ operationName: "AutomationsRunNow",
15505
+ runtimeOptions: withAutomationRunTimeout(context.runtimeOptions),
15506
+ field: "run_automation_now",
15507
+ variableTypes: { organization_id: "ID!", automation_id: "ID!" },
15508
+ variables: { organization_id: organizationId, automation_id: automationId },
15509
+ transformMutationPayload: normalizeAutomationRunPayload
15510
+ });
15511
+ });
15512
+ automations.command("run-show").description("Read one Automation run artifact by Agent id and execution slug").requiredOption("--agent-id <agentIdOrSlug>", "Agent id or slug").requiredOption("--execution-slug <executionSlug>", "Execution slug returned by automations run").action(async (opts, cmd) => {
15513
+ const agentId = idSchema14.parse(opts.agentId);
15514
+ const executionSlug = idSchema14.parse(opts.executionSlug);
15515
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
15516
+ const organizationId = resolveOrganizationId(context.organizationId);
15517
+ await runGraphqlQueryCommand({
15518
+ command: "automations.run-show",
15519
+ operationName: "AutomationsRunShow",
15520
+ runtimeOptions: context.runtimeOptions,
15521
+ field: "agent_automation_run",
15522
+ variables: {
15523
+ organization_id: organizationId,
15524
+ agent_id: agentId,
15525
+ automation_id: executionSlug
15526
+ },
15527
+ variableTypes: {
15528
+ organization_id: "ID!",
15529
+ agent_id: "ID!",
15530
+ automation_id: "ID!"
15531
+ },
15532
+ selectionSet: AUTOMATION_RUN_SELECTION,
15533
+ isShow: true
15534
+ });
15535
+ });
15394
15536
  automations.command("update").description("Update one task-backed Automation without changing its system-managed status").requiredOption("--id <idOrSlug>", "Automation id or slug").requiredOption(
15395
15537
  "--expected-update-version <version>",
15396
15538
  "Exact opaque updateVersion value from automations show; rejects stale writes"
@@ -15654,6 +15796,7 @@ var READ_OPERATION_IDS = [
15654
15796
  "agents.plugin-catalog",
15655
15797
  "agents.show",
15656
15798
  "auth.status",
15799
+ "automations.run-show",
15657
15800
  "automations.show",
15658
15801
  "broadcast.community",
15659
15802
  "broadcast.list",
@@ -15852,6 +15995,7 @@ var WRITE_OPERATION_IDS = [
15852
15995
  "agents.create",
15853
15996
  "agents.update",
15854
15997
  "automations.create",
15998
+ "automations.run",
15855
15999
  "automations.update",
15856
16000
  "contacts.create",
15857
16001
  "contacts.update",
@@ -16362,6 +16506,8 @@ var NAMESPACE_DOCS = {
16362
16506
  examples: [
16363
16507
  `wave automations create --summary "Weekly review" --agent-id 123 --ai-task-config '{"cycle":"repeat","repeatSchedule":{"interval":1,"frequency":"week","weekdays":[1,3],"at":"2:30 PM","starting":"2026-07-20T00:00:00.000Z","ending":"never","endingRuns":1,"endingDate":null,"timezone":"America/Phoenix"}}' --idempotency-key automation-create-001`,
16364
16508
  "wave automations show --id ATK-01",
16509
+ "wave automations run --id ATK-01",
16510
+ "wave automations run-show --agent-id AGT-01 --execution-slug ART-1234567890",
16365
16511
  'wave automations update --id ATK-01 --expected-update-version 2026-07-17T12:00:00.123456Z --summary "Weekly project review"'
16366
16512
  ],
16367
16513
  schema: {
@@ -16373,10 +16519,11 @@ var NAMESPACE_DOCS = {
16373
16519
  "Only the API-defined ai_task_config field accepts validated JSON.",
16374
16520
  "Optional executor Agent linkage is sent only through the API-defined top-level agentId input.",
16375
16521
  "Update calls only updateTask with an exact opaque updateVersion token; it cannot change status, task type, ownership, or project linkage.",
16376
- "Does not create a project Task, run an Automation, or invoke AI OS actions.",
16522
+ "Run calls only runAutomationNow for an existing scheduled Automation and returns execution/trace evidence.",
16523
+ "Run-show reads the persisted Automation run artifact through agentAutomationRun by Agent id and execution slug.",
16377
16524
  "Show uses the API-owned automation query by id; no slug fallback is implemented."
16378
16525
  ],
16379
- commands: ["create", "show", "update"]
16526
+ commands: ["create", "show", "run", "run-show", "update"]
16380
16527
  }
16381
16528
  },
16382
16529
  broadcast: {
@@ -16856,10 +17003,14 @@ async function resolveDoctorAuthOrganization(params) {
16856
17003
  }
16857
17004
  const id = organization.id;
16858
17005
  const slug = organization.slug;
16859
- return {
16860
- id: typeof id === "string" && id.trim() !== "" ? id : void 0,
16861
- slug: typeof slug === "string" && slug.trim() !== "" ? slug : void 0
16862
- };
17006
+ const result = {};
17007
+ if (typeof id === "string" && id.trim() !== "") {
17008
+ result.id = id;
17009
+ }
17010
+ if (typeof slug === "string" && slug.trim() !== "") {
17011
+ result.slug = slug;
17012
+ }
17013
+ return result;
16863
17014
  } catch {
16864
17015
  return null;
16865
17016
  }
@@ -16872,7 +17023,14 @@ async function runDoctor(cmd, opts) {
16872
17023
  const tokenSource = runtime.tokenSource ?? "none";
16873
17024
  const organizationId = context.organizationId;
16874
17025
  const authStorage = await getAuthStorageInfo(baseUrl);
16875
- const authOrganization = organizationId ? null : await resolveDoctorAuthOrganization({ baseUrl, token });
17026
+ const authOptions = {};
17027
+ if (baseUrl) {
17028
+ authOptions.baseUrl = baseUrl;
17029
+ }
17030
+ if (token) {
17031
+ authOptions.token = token;
17032
+ }
17033
+ const authOrganization = organizationId ? null : await resolveDoctorAuthOrganization(authOptions);
16876
17034
  const checks = [
16877
17035
  {
16878
17036
  name: "auth_token",
package/dist/index.js CHANGED
@@ -14882,6 +14882,7 @@ var idempotencyKeySchema = z19.string().min(1).refine((value) => value.trim() ==
14882
14882
  var skillScopeSchema = z19.enum(["ADMIN_GLOBAL", "MEMBER_PERSONAL"]);
14883
14883
  var isoDateSchema = z19.iso.date();
14884
14884
  var nonEmptyStringSchema = z19.string().trim().min(1);
14885
+ var AUTOMATION_RUN_HTTP_TIMEOUT_MS = 6e4;
14885
14886
  var agentToolAccessSchema = z19.array(
14886
14887
  z19.object({
14887
14888
  tool_key: nonEmptyStringSchema,
@@ -15017,10 +15018,33 @@ var AUTOMATION_SELECTION = `{
15017
15018
  aiTaskConfig
15018
15019
  organizationId
15019
15020
  memberId
15021
+ agentId
15020
15022
  createdAt
15021
15023
  updatedAt
15022
15024
  updateVersion
15023
15025
  }`;
15026
+ var AUTOMATION_RUN_SELECTION = `{
15027
+ id
15028
+ type
15029
+ attributes {
15030
+ id
15031
+ title
15032
+ status
15033
+ errorMessage
15034
+ usedAt
15035
+ agentTriggerId
15036
+ executionId
15037
+ executionSlug
15038
+ traceId
15039
+ outputContentId
15040
+ outputContentSlug
15041
+ outputContent {
15042
+ id
15043
+ slug
15044
+ }
15045
+ targetId
15046
+ }
15047
+ }`;
15024
15048
  function asRecord7(value) {
15025
15049
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
15026
15050
  }
@@ -15128,12 +15152,92 @@ function normalizePersistedUpdatePayload(payload) {
15128
15152
  persisted: { id, slug, update_version: updateVersion }
15129
15153
  };
15130
15154
  }
15155
+ function normalizeAutomationRunPayload(payload) {
15156
+ const mutation = asRecord7(payload);
15157
+ if (!mutation) {
15158
+ throw new CliError({
15159
+ message: "Automation run response did not include a mutation payload.",
15160
+ kind: "malformed_response",
15161
+ status: 502,
15162
+ exitCode: EXIT_CODES.networkOrUpstream
15163
+ });
15164
+ }
15165
+ if (mutation.ok !== true) {
15166
+ return {
15167
+ ok: mutation.ok,
15168
+ status: mutation.status,
15169
+ errorCode: mutation.errorCode ?? null,
15170
+ errors: mutation.errors ?? null,
15171
+ data: mutation.data ?? null
15172
+ };
15173
+ }
15174
+ const data = asRecord7(mutation.data);
15175
+ const automationTaskId = asRequiredString(data?.automation_task_id);
15176
+ const automationTaskSlug = asRequiredString(data?.automation_task_slug);
15177
+ const agentId = asRequiredString(data?.agent_id);
15178
+ const agentSlug = asRequiredString(data?.agent_slug);
15179
+ const agentTriggerId = asRequiredString(data?.agent_trigger_id);
15180
+ const executionId = asRequiredString(data?.execution_id);
15181
+ const executionSlug = asRequiredString(data?.execution_slug);
15182
+ const executionStatus = asRequiredString(data?.execution_status);
15183
+ const traceId = asRequiredString(data?.trace_id);
15184
+ if (!data || !automationTaskId || !automationTaskSlug || !agentId || !agentSlug || !agentTriggerId || !executionId || !executionSlug || !executionStatus || !traceId) {
15185
+ throw new CliError({
15186
+ message: "Automation run response did not include automation, execution, and trace evidence.",
15187
+ kind: "malformed_response",
15188
+ status: 502,
15189
+ exitCode: EXIT_CODES.networkOrUpstream
15190
+ });
15191
+ }
15192
+ return {
15193
+ ok: mutation.ok,
15194
+ status: mutation.status,
15195
+ errorCode: mutation.errorCode ?? null,
15196
+ errors: mutation.errors ?? null,
15197
+ run: {
15198
+ executed: data.executed === true,
15199
+ skipped_reason: asRequiredString(data.skipped_reason),
15200
+ automation: {
15201
+ id: automationTaskId,
15202
+ slug: automationTaskSlug
15203
+ },
15204
+ agent: {
15205
+ id: agentId,
15206
+ slug: agentSlug
15207
+ },
15208
+ trigger: {
15209
+ id: agentTriggerId,
15210
+ type: asRequiredString(data.trigger_type)
15211
+ },
15212
+ execution: {
15213
+ id: executionId,
15214
+ slug: executionSlug,
15215
+ status: executionStatus
15216
+ },
15217
+ output_content: {
15218
+ id: asRequiredString(data.output_content_id),
15219
+ slug: asRequiredString(data.output_content_slug)
15220
+ },
15221
+ trace_id: traceId,
15222
+ correlation_id: asRequiredString(data.correlation_id),
15223
+ readback_command: `wave automations run-show --agent-id ${agentSlug} --execution-slug ${executionSlug}`
15224
+ }
15225
+ };
15226
+ }
15131
15227
  function parseAutomationConfig(value) {
15132
15228
  return automationConfigSchema.parse(parseJson(String(value), "--ai-task-config"));
15133
15229
  }
15134
15230
  function parseExpectedUpdateVersion(value) {
15135
15231
  return nonEmptyStringSchema.parse(String(value));
15136
15232
  }
15233
+ function withAutomationRunTimeout(runtimeOptions) {
15234
+ const configuredTimeoutMs = Number(runtimeOptions.timeoutMs);
15235
+ const timeoutMs = Number.isFinite(configuredTimeoutMs) && configuredTimeoutMs > AUTOMATION_RUN_HTTP_TIMEOUT_MS ? configuredTimeoutMs : AUTOMATION_RUN_HTTP_TIMEOUT_MS;
15236
+ return {
15237
+ ...runtimeOptions,
15238
+ timeoutMs
15239
+ };
15240
+ }
15137
15241
  function registerAtlasAuthoringCommands(program) {
15138
15242
  const agents = program.command("agents").description("Bounded Agent authoring operations");
15139
15243
  agents.command("create").description("Create an Agent through the API-owned createAgent contract").requiredOption("--idempotency-key <key>", "Required create idempotency key").option("--name <name>").option("--description <description>").option("--notes <notes>").option("--member-id <memberId>").option("--status <status>").option("--visibility <visibility>").option("--model <model>").option("--run-when-mentioned <boolean>", "true or false").option("--web-access-enabled <boolean>", "true or false").option("--web-fetch-enabled <boolean>", "true or false").option("--search-past-conversations-enabled <boolean>", "true or false").option("--app-rules-creation-enabled <boolean>", "true or false").option("--tool-discovery-enabled <boolean>", "true or false").option("--self-updates-enabled <boolean>", "true or false").option("--trusted-urls <urls>", "Comma-separated trusted URLs").option("--tool-access <json>", "JSON array of canonical native Agent tool scopes").option(
@@ -15366,7 +15470,7 @@ function registerAtlasAuthoringCommands(program) {
15366
15470
  ...opts.description !== void 0 ? { description: String(opts.description) } : {},
15367
15471
  ...opts.notes !== void 0 ? { notes: String(opts.notes) } : {},
15368
15472
  ...opts.memberId !== void 0 ? { member_id: idSchema14.parse(opts.memberId) } : {},
15369
- ...opts.agentId !== void 0 ? { agentId: idSchema14.parse(opts.agentId) } : {},
15473
+ ...opts.agentId !== void 0 ? { agent_id: idSchema14.parse(opts.agentId) } : {},
15370
15474
  ...opts.priority !== void 0 ? { priority: String(opts.priority) } : {},
15371
15475
  ...opts.dueDate !== void 0 ? { due_date: isoDateSchema.parse(opts.dueDate) } : {}
15372
15476
  },
@@ -15390,6 +15494,44 @@ function registerAtlasAuthoringCommands(program) {
15390
15494
  isShow: true
15391
15495
  });
15392
15496
  });
15497
+ automations.command("run").description("Run one scheduled Automation by id or slug and return execution trace evidence").requiredOption("--id <idOrSlug>", "Automation id or slug").action(async (opts, cmd) => {
15498
+ const automationId = idSchema14.parse(opts.id);
15499
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
15500
+ const organizationId = resolveOrganizationId(context.organizationId);
15501
+ await runGraphqlMutationCommand({
15502
+ command: "automations.run",
15503
+ operationName: "AutomationsRunNow",
15504
+ runtimeOptions: withAutomationRunTimeout(context.runtimeOptions),
15505
+ field: "run_automation_now",
15506
+ variableTypes: { organization_id: "ID!", automation_id: "ID!" },
15507
+ variables: { organization_id: organizationId, automation_id: automationId },
15508
+ transformMutationPayload: normalizeAutomationRunPayload
15509
+ });
15510
+ });
15511
+ automations.command("run-show").description("Read one Automation run artifact by Agent id and execution slug").requiredOption("--agent-id <agentIdOrSlug>", "Agent id or slug").requiredOption("--execution-slug <executionSlug>", "Execution slug returned by automations run").action(async (opts, cmd) => {
15512
+ const agentId = idSchema14.parse(opts.agentId);
15513
+ const executionSlug = idSchema14.parse(opts.executionSlug);
15514
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
15515
+ const organizationId = resolveOrganizationId(context.organizationId);
15516
+ await runGraphqlQueryCommand({
15517
+ command: "automations.run-show",
15518
+ operationName: "AutomationsRunShow",
15519
+ runtimeOptions: context.runtimeOptions,
15520
+ field: "agent_automation_run",
15521
+ variables: {
15522
+ organization_id: organizationId,
15523
+ agent_id: agentId,
15524
+ automation_id: executionSlug
15525
+ },
15526
+ variableTypes: {
15527
+ organization_id: "ID!",
15528
+ agent_id: "ID!",
15529
+ automation_id: "ID!"
15530
+ },
15531
+ selectionSet: AUTOMATION_RUN_SELECTION,
15532
+ isShow: true
15533
+ });
15534
+ });
15393
15535
  automations.command("update").description("Update one task-backed Automation without changing its system-managed status").requiredOption("--id <idOrSlug>", "Automation id or slug").requiredOption(
15394
15536
  "--expected-update-version <version>",
15395
15537
  "Exact opaque updateVersion value from automations show; rejects stale writes"
@@ -15653,6 +15795,7 @@ var READ_OPERATION_IDS = [
15653
15795
  "agents.plugin-catalog",
15654
15796
  "agents.show",
15655
15797
  "auth.status",
15798
+ "automations.run-show",
15656
15799
  "automations.show",
15657
15800
  "broadcast.community",
15658
15801
  "broadcast.list",
@@ -15851,6 +15994,7 @@ var WRITE_OPERATION_IDS = [
15851
15994
  "agents.create",
15852
15995
  "agents.update",
15853
15996
  "automations.create",
15997
+ "automations.run",
15854
15998
  "automations.update",
15855
15999
  "contacts.create",
15856
16000
  "contacts.update",
@@ -16361,6 +16505,8 @@ var NAMESPACE_DOCS = {
16361
16505
  examples: [
16362
16506
  `wave automations create --summary "Weekly review" --agent-id 123 --ai-task-config '{"cycle":"repeat","repeatSchedule":{"interval":1,"frequency":"week","weekdays":[1,3],"at":"2:30 PM","starting":"2026-07-20T00:00:00.000Z","ending":"never","endingRuns":1,"endingDate":null,"timezone":"America/Phoenix"}}' --idempotency-key automation-create-001`,
16363
16507
  "wave automations show --id ATK-01",
16508
+ "wave automations run --id ATK-01",
16509
+ "wave automations run-show --agent-id AGT-01 --execution-slug ART-1234567890",
16364
16510
  'wave automations update --id ATK-01 --expected-update-version 2026-07-17T12:00:00.123456Z --summary "Weekly project review"'
16365
16511
  ],
16366
16512
  schema: {
@@ -16372,10 +16518,11 @@ var NAMESPACE_DOCS = {
16372
16518
  "Only the API-defined ai_task_config field accepts validated JSON.",
16373
16519
  "Optional executor Agent linkage is sent only through the API-defined top-level agentId input.",
16374
16520
  "Update calls only updateTask with an exact opaque updateVersion token; it cannot change status, task type, ownership, or project linkage.",
16375
- "Does not create a project Task, run an Automation, or invoke AI OS actions.",
16521
+ "Run calls only runAutomationNow for an existing scheduled Automation and returns execution/trace evidence.",
16522
+ "Run-show reads the persisted Automation run artifact through agentAutomationRun by Agent id and execution slug.",
16376
16523
  "Show uses the API-owned automation query by id; no slug fallback is implemented."
16377
16524
  ],
16378
- commands: ["create", "show", "update"]
16525
+ commands: ["create", "show", "run", "run-show", "update"]
16379
16526
  }
16380
16527
  },
16381
16528
  broadcast: {
@@ -16855,10 +17002,14 @@ async function resolveDoctorAuthOrganization(params) {
16855
17002
  }
16856
17003
  const id = organization.id;
16857
17004
  const slug = organization.slug;
16858
- return {
16859
- id: typeof id === "string" && id.trim() !== "" ? id : void 0,
16860
- slug: typeof slug === "string" && slug.trim() !== "" ? slug : void 0
16861
- };
17005
+ const result = {};
17006
+ if (typeof id === "string" && id.trim() !== "") {
17007
+ result.id = id;
17008
+ }
17009
+ if (typeof slug === "string" && slug.trim() !== "") {
17010
+ result.slug = slug;
17011
+ }
17012
+ return result;
16862
17013
  } catch {
16863
17014
  return null;
16864
17015
  }
@@ -16871,7 +17022,14 @@ async function runDoctor(cmd, opts) {
16871
17022
  const tokenSource = runtime.tokenSource ?? "none";
16872
17023
  const organizationId = context.organizationId;
16873
17024
  const authStorage = await getAuthStorageInfo(baseUrl);
16874
- const authOrganization = organizationId ? null : await resolveDoctorAuthOrganization({ baseUrl, token });
17025
+ const authOptions = {};
17026
+ if (baseUrl) {
17027
+ authOptions.baseUrl = baseUrl;
17028
+ }
17029
+ if (token) {
17030
+ authOptions.token = token;
17031
+ }
17032
+ const authOrganization = organizationId ? null : await resolveDoctorAuthOrganization(authOptions);
16875
17033
  const checks = [
16876
17034
  {
16877
17035
  name: "auth_token",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wave-ai-os/wave-cli",
3
- "version": "0.1.74",
3
+ "version": "0.1.75",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "wave": "dist/index.js"