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

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.
Files changed (3) hide show
  1. package/dist/index.cjs +167 -11
  2. package/dist/index.js +167 -11
  3. package/package.json +1 -1
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,
@@ -14947,8 +14948,6 @@ var AGENT_SELECTION = `{
14947
14948
  type
14948
14949
  name
14949
14950
  slug
14950
- description
14951
- notes
14952
14951
  status
14953
14952
  visibility
14954
14953
  model
@@ -15018,10 +15017,33 @@ var AUTOMATION_SELECTION = `{
15018
15017
  aiTaskConfig
15019
15018
  organizationId
15020
15019
  memberId
15020
+ agentId
15021
15021
  createdAt
15022
15022
  updatedAt
15023
15023
  updateVersion
15024
15024
  }`;
15025
+ var AUTOMATION_RUN_SELECTION = `{
15026
+ id
15027
+ type
15028
+ attributes {
15029
+ id
15030
+ title
15031
+ status
15032
+ errorMessage
15033
+ usedAt
15034
+ agentTriggerId
15035
+ executionId
15036
+ executionSlug
15037
+ traceId
15038
+ outputContentId
15039
+ outputContentSlug
15040
+ outputContent {
15041
+ id
15042
+ slug
15043
+ }
15044
+ targetId
15045
+ }
15046
+ }`;
15025
15047
  function asRecord7(value) {
15026
15048
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
15027
15049
  }
@@ -15129,12 +15151,92 @@ function normalizePersistedUpdatePayload(payload) {
15129
15151
  persisted: { id, slug, update_version: updateVersion }
15130
15152
  };
15131
15153
  }
15154
+ function normalizeAutomationRunPayload(payload) {
15155
+ const mutation = asRecord7(payload);
15156
+ if (!mutation) {
15157
+ throw new CliError({
15158
+ message: "Automation run response did not include a mutation payload.",
15159
+ kind: "malformed_response",
15160
+ status: 502,
15161
+ exitCode: EXIT_CODES.networkOrUpstream
15162
+ });
15163
+ }
15164
+ if (mutation.ok !== true) {
15165
+ return {
15166
+ ok: mutation.ok,
15167
+ status: mutation.status,
15168
+ errorCode: mutation.errorCode ?? null,
15169
+ errors: mutation.errors ?? null,
15170
+ data: mutation.data ?? null
15171
+ };
15172
+ }
15173
+ const data = asRecord7(mutation.data);
15174
+ const automationTaskId = asRequiredString(data?.automation_task_id);
15175
+ const automationTaskSlug = asRequiredString(data?.automation_task_slug);
15176
+ const agentId = asRequiredString(data?.agent_id);
15177
+ const agentSlug = asRequiredString(data?.agent_slug);
15178
+ const agentTriggerId = asRequiredString(data?.agent_trigger_id);
15179
+ const executionId = asRequiredString(data?.execution_id);
15180
+ const executionSlug = asRequiredString(data?.execution_slug);
15181
+ const executionStatus = asRequiredString(data?.execution_status);
15182
+ const traceId = asRequiredString(data?.trace_id);
15183
+ if (!data || !automationTaskId || !automationTaskSlug || !agentId || !agentSlug || !agentTriggerId || !executionId || !executionSlug || !executionStatus || !traceId) {
15184
+ throw new CliError({
15185
+ message: "Automation run response did not include automation, execution, and trace evidence.",
15186
+ kind: "malformed_response",
15187
+ status: 502,
15188
+ exitCode: EXIT_CODES.networkOrUpstream
15189
+ });
15190
+ }
15191
+ return {
15192
+ ok: mutation.ok,
15193
+ status: mutation.status,
15194
+ errorCode: mutation.errorCode ?? null,
15195
+ errors: mutation.errors ?? null,
15196
+ run: {
15197
+ executed: data.executed === true,
15198
+ skipped_reason: asRequiredString(data.skipped_reason),
15199
+ automation: {
15200
+ id: automationTaskId,
15201
+ slug: automationTaskSlug
15202
+ },
15203
+ agent: {
15204
+ id: agentId,
15205
+ slug: agentSlug
15206
+ },
15207
+ trigger: {
15208
+ id: agentTriggerId,
15209
+ type: asRequiredString(data.trigger_type)
15210
+ },
15211
+ execution: {
15212
+ id: executionId,
15213
+ slug: executionSlug,
15214
+ status: executionStatus
15215
+ },
15216
+ output_content: {
15217
+ id: asRequiredString(data.output_content_id),
15218
+ slug: asRequiredString(data.output_content_slug)
15219
+ },
15220
+ trace_id: traceId,
15221
+ correlation_id: asRequiredString(data.correlation_id),
15222
+ readback_command: `wave automations run-show --agent-id ${agentSlug} --execution-slug ${executionSlug}`
15223
+ }
15224
+ };
15225
+ }
15132
15226
  function parseAutomationConfig(value) {
15133
15227
  return automationConfigSchema.parse(parseJson(String(value), "--ai-task-config"));
15134
15228
  }
15135
15229
  function parseExpectedUpdateVersion(value) {
15136
15230
  return nonEmptyStringSchema.parse(String(value));
15137
15231
  }
15232
+ function withAutomationRunTimeout(runtimeOptions) {
15233
+ const configuredTimeoutMs = Number(runtimeOptions.timeoutMs);
15234
+ const timeoutMs = Number.isFinite(configuredTimeoutMs) && configuredTimeoutMs > AUTOMATION_RUN_HTTP_TIMEOUT_MS ? configuredTimeoutMs : AUTOMATION_RUN_HTTP_TIMEOUT_MS;
15235
+ return {
15236
+ ...runtimeOptions,
15237
+ timeoutMs
15238
+ };
15239
+ }
15138
15240
  function registerAtlasAuthoringCommands(program) {
15139
15241
  const agents = program.command("agents").description("Bounded Agent authoring operations");
15140
15242
  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 +15469,7 @@ function registerAtlasAuthoringCommands(program) {
15367
15469
  ...opts.description !== void 0 ? { description: String(opts.description) } : {},
15368
15470
  ...opts.notes !== void 0 ? { notes: String(opts.notes) } : {},
15369
15471
  ...opts.memberId !== void 0 ? { member_id: idSchema14.parse(opts.memberId) } : {},
15370
- ...opts.agentId !== void 0 ? { agentId: idSchema14.parse(opts.agentId) } : {},
15472
+ ...opts.agentId !== void 0 ? { agent_id: idSchema14.parse(opts.agentId) } : {},
15371
15473
  ...opts.priority !== void 0 ? { priority: String(opts.priority) } : {},
15372
15474
  ...opts.dueDate !== void 0 ? { due_date: isoDateSchema.parse(opts.dueDate) } : {}
15373
15475
  },
@@ -15391,6 +15493,44 @@ function registerAtlasAuthoringCommands(program) {
15391
15493
  isShow: true
15392
15494
  });
15393
15495
  });
15496
+ 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) => {
15497
+ const automationId = idSchema14.parse(opts.id);
15498
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
15499
+ const organizationId = resolveOrganizationId(context.organizationId);
15500
+ await runGraphqlMutationCommand({
15501
+ command: "automations.run",
15502
+ operationName: "AutomationsRunNow",
15503
+ runtimeOptions: withAutomationRunTimeout(context.runtimeOptions),
15504
+ field: "run_automation_now",
15505
+ variableTypes: { organization_id: "ID!", automation_id: "ID!" },
15506
+ variables: { organization_id: organizationId, automation_id: automationId },
15507
+ transformMutationPayload: normalizeAutomationRunPayload
15508
+ });
15509
+ });
15510
+ 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) => {
15511
+ const agentId = idSchema14.parse(opts.agentId);
15512
+ const executionSlug = idSchema14.parse(opts.executionSlug);
15513
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
15514
+ const organizationId = resolveOrganizationId(context.organizationId);
15515
+ await runGraphqlQueryCommand({
15516
+ command: "automations.run-show",
15517
+ operationName: "AutomationsRunShow",
15518
+ runtimeOptions: context.runtimeOptions,
15519
+ field: "agent_automation_run",
15520
+ variables: {
15521
+ organization_id: organizationId,
15522
+ agent_id: agentId,
15523
+ automation_id: executionSlug
15524
+ },
15525
+ variableTypes: {
15526
+ organization_id: "ID!",
15527
+ agent_id: "ID!",
15528
+ automation_id: "ID!"
15529
+ },
15530
+ selectionSet: AUTOMATION_RUN_SELECTION,
15531
+ isShow: true
15532
+ });
15533
+ });
15394
15534
  automations.command("update").description("Update one task-backed Automation without changing its system-managed status").requiredOption("--id <idOrSlug>", "Automation id or slug").requiredOption(
15395
15535
  "--expected-update-version <version>",
15396
15536
  "Exact opaque updateVersion value from automations show; rejects stale writes"
@@ -15532,7 +15672,7 @@ var import_node_path4 = require("path");
15532
15672
  var import_node_crypto3 = require("crypto");
15533
15673
 
15534
15674
  // src/version.ts
15535
- var CLI_VERSION = "0.1.74";
15675
+ var CLI_VERSION = "0.1.76";
15536
15676
 
15537
15677
  // src/operationMetadata.ts
15538
15678
  var DISCOVERY_OPERATION_IDS = [
@@ -15654,6 +15794,7 @@ var READ_OPERATION_IDS = [
15654
15794
  "agents.plugin-catalog",
15655
15795
  "agents.show",
15656
15796
  "auth.status",
15797
+ "automations.run-show",
15657
15798
  "automations.show",
15658
15799
  "broadcast.community",
15659
15800
  "broadcast.list",
@@ -15852,6 +15993,7 @@ var WRITE_OPERATION_IDS = [
15852
15993
  "agents.create",
15853
15994
  "agents.update",
15854
15995
  "automations.create",
15996
+ "automations.run",
15855
15997
  "automations.update",
15856
15998
  "contacts.create",
15857
15999
  "contacts.update",
@@ -16362,6 +16504,8 @@ var NAMESPACE_DOCS = {
16362
16504
  examples: [
16363
16505
  `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
16506
  "wave automations show --id ATK-01",
16507
+ "wave automations run --id ATK-01",
16508
+ "wave automations run-show --agent-id AGT-01 --execution-slug ART-1234567890",
16365
16509
  'wave automations update --id ATK-01 --expected-update-version 2026-07-17T12:00:00.123456Z --summary "Weekly project review"'
16366
16510
  ],
16367
16511
  schema: {
@@ -16373,10 +16517,11 @@ var NAMESPACE_DOCS = {
16373
16517
  "Only the API-defined ai_task_config field accepts validated JSON.",
16374
16518
  "Optional executor Agent linkage is sent only through the API-defined top-level agentId input.",
16375
16519
  "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.",
16520
+ "Run calls only runAutomationNow for an existing scheduled Automation and returns execution/trace evidence.",
16521
+ "Run-show reads the persisted Automation run artifact through agentAutomationRun by Agent id and execution slug.",
16377
16522
  "Show uses the API-owned automation query by id; no slug fallback is implemented."
16378
16523
  ],
16379
- commands: ["create", "show", "update"]
16524
+ commands: ["create", "show", "run", "run-show", "update"]
16380
16525
  }
16381
16526
  },
16382
16527
  broadcast: {
@@ -16856,10 +17001,14 @@ async function resolveDoctorAuthOrganization(params) {
16856
17001
  }
16857
17002
  const id = organization.id;
16858
17003
  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
- };
17004
+ const result = {};
17005
+ if (typeof id === "string" && id.trim() !== "") {
17006
+ result.id = id;
17007
+ }
17008
+ if (typeof slug === "string" && slug.trim() !== "") {
17009
+ result.slug = slug;
17010
+ }
17011
+ return result;
16863
17012
  } catch {
16864
17013
  return null;
16865
17014
  }
@@ -16872,7 +17021,14 @@ async function runDoctor(cmd, opts) {
16872
17021
  const tokenSource = runtime.tokenSource ?? "none";
16873
17022
  const organizationId = context.organizationId;
16874
17023
  const authStorage = await getAuthStorageInfo(baseUrl);
16875
- const authOrganization = organizationId ? null : await resolveDoctorAuthOrganization({ baseUrl, token });
17024
+ const authOptions = {};
17025
+ if (baseUrl) {
17026
+ authOptions.baseUrl = baseUrl;
17027
+ }
17028
+ if (token) {
17029
+ authOptions.token = token;
17030
+ }
17031
+ const authOrganization = organizationId ? null : await resolveDoctorAuthOrganization(authOptions);
16876
17032
  const checks = [
16877
17033
  {
16878
17034
  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,
@@ -14946,8 +14947,6 @@ var AGENT_SELECTION = `{
14946
14947
  type
14947
14948
  name
14948
14949
  slug
14949
- description
14950
- notes
14951
14950
  status
14952
14951
  visibility
14953
14952
  model
@@ -15017,10 +15016,33 @@ var AUTOMATION_SELECTION = `{
15017
15016
  aiTaskConfig
15018
15017
  organizationId
15019
15018
  memberId
15019
+ agentId
15020
15020
  createdAt
15021
15021
  updatedAt
15022
15022
  updateVersion
15023
15023
  }`;
15024
+ var AUTOMATION_RUN_SELECTION = `{
15025
+ id
15026
+ type
15027
+ attributes {
15028
+ id
15029
+ title
15030
+ status
15031
+ errorMessage
15032
+ usedAt
15033
+ agentTriggerId
15034
+ executionId
15035
+ executionSlug
15036
+ traceId
15037
+ outputContentId
15038
+ outputContentSlug
15039
+ outputContent {
15040
+ id
15041
+ slug
15042
+ }
15043
+ targetId
15044
+ }
15045
+ }`;
15024
15046
  function asRecord7(value) {
15025
15047
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
15026
15048
  }
@@ -15128,12 +15150,92 @@ function normalizePersistedUpdatePayload(payload) {
15128
15150
  persisted: { id, slug, update_version: updateVersion }
15129
15151
  };
15130
15152
  }
15153
+ function normalizeAutomationRunPayload(payload) {
15154
+ const mutation = asRecord7(payload);
15155
+ if (!mutation) {
15156
+ throw new CliError({
15157
+ message: "Automation run response did not include a mutation payload.",
15158
+ kind: "malformed_response",
15159
+ status: 502,
15160
+ exitCode: EXIT_CODES.networkOrUpstream
15161
+ });
15162
+ }
15163
+ if (mutation.ok !== true) {
15164
+ return {
15165
+ ok: mutation.ok,
15166
+ status: mutation.status,
15167
+ errorCode: mutation.errorCode ?? null,
15168
+ errors: mutation.errors ?? null,
15169
+ data: mutation.data ?? null
15170
+ };
15171
+ }
15172
+ const data = asRecord7(mutation.data);
15173
+ const automationTaskId = asRequiredString(data?.automation_task_id);
15174
+ const automationTaskSlug = asRequiredString(data?.automation_task_slug);
15175
+ const agentId = asRequiredString(data?.agent_id);
15176
+ const agentSlug = asRequiredString(data?.agent_slug);
15177
+ const agentTriggerId = asRequiredString(data?.agent_trigger_id);
15178
+ const executionId = asRequiredString(data?.execution_id);
15179
+ const executionSlug = asRequiredString(data?.execution_slug);
15180
+ const executionStatus = asRequiredString(data?.execution_status);
15181
+ const traceId = asRequiredString(data?.trace_id);
15182
+ if (!data || !automationTaskId || !automationTaskSlug || !agentId || !agentSlug || !agentTriggerId || !executionId || !executionSlug || !executionStatus || !traceId) {
15183
+ throw new CliError({
15184
+ message: "Automation run response did not include automation, execution, and trace evidence.",
15185
+ kind: "malformed_response",
15186
+ status: 502,
15187
+ exitCode: EXIT_CODES.networkOrUpstream
15188
+ });
15189
+ }
15190
+ return {
15191
+ ok: mutation.ok,
15192
+ status: mutation.status,
15193
+ errorCode: mutation.errorCode ?? null,
15194
+ errors: mutation.errors ?? null,
15195
+ run: {
15196
+ executed: data.executed === true,
15197
+ skipped_reason: asRequiredString(data.skipped_reason),
15198
+ automation: {
15199
+ id: automationTaskId,
15200
+ slug: automationTaskSlug
15201
+ },
15202
+ agent: {
15203
+ id: agentId,
15204
+ slug: agentSlug
15205
+ },
15206
+ trigger: {
15207
+ id: agentTriggerId,
15208
+ type: asRequiredString(data.trigger_type)
15209
+ },
15210
+ execution: {
15211
+ id: executionId,
15212
+ slug: executionSlug,
15213
+ status: executionStatus
15214
+ },
15215
+ output_content: {
15216
+ id: asRequiredString(data.output_content_id),
15217
+ slug: asRequiredString(data.output_content_slug)
15218
+ },
15219
+ trace_id: traceId,
15220
+ correlation_id: asRequiredString(data.correlation_id),
15221
+ readback_command: `wave automations run-show --agent-id ${agentSlug} --execution-slug ${executionSlug}`
15222
+ }
15223
+ };
15224
+ }
15131
15225
  function parseAutomationConfig(value) {
15132
15226
  return automationConfigSchema.parse(parseJson(String(value), "--ai-task-config"));
15133
15227
  }
15134
15228
  function parseExpectedUpdateVersion(value) {
15135
15229
  return nonEmptyStringSchema.parse(String(value));
15136
15230
  }
15231
+ function withAutomationRunTimeout(runtimeOptions) {
15232
+ const configuredTimeoutMs = Number(runtimeOptions.timeoutMs);
15233
+ const timeoutMs = Number.isFinite(configuredTimeoutMs) && configuredTimeoutMs > AUTOMATION_RUN_HTTP_TIMEOUT_MS ? configuredTimeoutMs : AUTOMATION_RUN_HTTP_TIMEOUT_MS;
15234
+ return {
15235
+ ...runtimeOptions,
15236
+ timeoutMs
15237
+ };
15238
+ }
15137
15239
  function registerAtlasAuthoringCommands(program) {
15138
15240
  const agents = program.command("agents").description("Bounded Agent authoring operations");
15139
15241
  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 +15468,7 @@ function registerAtlasAuthoringCommands(program) {
15366
15468
  ...opts.description !== void 0 ? { description: String(opts.description) } : {},
15367
15469
  ...opts.notes !== void 0 ? { notes: String(opts.notes) } : {},
15368
15470
  ...opts.memberId !== void 0 ? { member_id: idSchema14.parse(opts.memberId) } : {},
15369
- ...opts.agentId !== void 0 ? { agentId: idSchema14.parse(opts.agentId) } : {},
15471
+ ...opts.agentId !== void 0 ? { agent_id: idSchema14.parse(opts.agentId) } : {},
15370
15472
  ...opts.priority !== void 0 ? { priority: String(opts.priority) } : {},
15371
15473
  ...opts.dueDate !== void 0 ? { due_date: isoDateSchema.parse(opts.dueDate) } : {}
15372
15474
  },
@@ -15390,6 +15492,44 @@ function registerAtlasAuthoringCommands(program) {
15390
15492
  isShow: true
15391
15493
  });
15392
15494
  });
15495
+ 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) => {
15496
+ const automationId = idSchema14.parse(opts.id);
15497
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
15498
+ const organizationId = resolveOrganizationId(context.organizationId);
15499
+ await runGraphqlMutationCommand({
15500
+ command: "automations.run",
15501
+ operationName: "AutomationsRunNow",
15502
+ runtimeOptions: withAutomationRunTimeout(context.runtimeOptions),
15503
+ field: "run_automation_now",
15504
+ variableTypes: { organization_id: "ID!", automation_id: "ID!" },
15505
+ variables: { organization_id: organizationId, automation_id: automationId },
15506
+ transformMutationPayload: normalizeAutomationRunPayload
15507
+ });
15508
+ });
15509
+ 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) => {
15510
+ const agentId = idSchema14.parse(opts.agentId);
15511
+ const executionSlug = idSchema14.parse(opts.executionSlug);
15512
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
15513
+ const organizationId = resolveOrganizationId(context.organizationId);
15514
+ await runGraphqlQueryCommand({
15515
+ command: "automations.run-show",
15516
+ operationName: "AutomationsRunShow",
15517
+ runtimeOptions: context.runtimeOptions,
15518
+ field: "agent_automation_run",
15519
+ variables: {
15520
+ organization_id: organizationId,
15521
+ agent_id: agentId,
15522
+ automation_id: executionSlug
15523
+ },
15524
+ variableTypes: {
15525
+ organization_id: "ID!",
15526
+ agent_id: "ID!",
15527
+ automation_id: "ID!"
15528
+ },
15529
+ selectionSet: AUTOMATION_RUN_SELECTION,
15530
+ isShow: true
15531
+ });
15532
+ });
15393
15533
  automations.command("update").description("Update one task-backed Automation without changing its system-managed status").requiredOption("--id <idOrSlug>", "Automation id or slug").requiredOption(
15394
15534
  "--expected-update-version <version>",
15395
15535
  "Exact opaque updateVersion value from automations show; rejects stale writes"
@@ -15531,7 +15671,7 @@ import { join as join3 } from "path";
15531
15671
  import { createHash } from "crypto";
15532
15672
 
15533
15673
  // src/version.ts
15534
- var CLI_VERSION = "0.1.74";
15674
+ var CLI_VERSION = "0.1.76";
15535
15675
 
15536
15676
  // src/operationMetadata.ts
15537
15677
  var DISCOVERY_OPERATION_IDS = [
@@ -15653,6 +15793,7 @@ var READ_OPERATION_IDS = [
15653
15793
  "agents.plugin-catalog",
15654
15794
  "agents.show",
15655
15795
  "auth.status",
15796
+ "automations.run-show",
15656
15797
  "automations.show",
15657
15798
  "broadcast.community",
15658
15799
  "broadcast.list",
@@ -15851,6 +15992,7 @@ var WRITE_OPERATION_IDS = [
15851
15992
  "agents.create",
15852
15993
  "agents.update",
15853
15994
  "automations.create",
15995
+ "automations.run",
15854
15996
  "automations.update",
15855
15997
  "contacts.create",
15856
15998
  "contacts.update",
@@ -16361,6 +16503,8 @@ var NAMESPACE_DOCS = {
16361
16503
  examples: [
16362
16504
  `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
16505
  "wave automations show --id ATK-01",
16506
+ "wave automations run --id ATK-01",
16507
+ "wave automations run-show --agent-id AGT-01 --execution-slug ART-1234567890",
16364
16508
  'wave automations update --id ATK-01 --expected-update-version 2026-07-17T12:00:00.123456Z --summary "Weekly project review"'
16365
16509
  ],
16366
16510
  schema: {
@@ -16372,10 +16516,11 @@ var NAMESPACE_DOCS = {
16372
16516
  "Only the API-defined ai_task_config field accepts validated JSON.",
16373
16517
  "Optional executor Agent linkage is sent only through the API-defined top-level agentId input.",
16374
16518
  "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.",
16519
+ "Run calls only runAutomationNow for an existing scheduled Automation and returns execution/trace evidence.",
16520
+ "Run-show reads the persisted Automation run artifact through agentAutomationRun by Agent id and execution slug.",
16376
16521
  "Show uses the API-owned automation query by id; no slug fallback is implemented."
16377
16522
  ],
16378
- commands: ["create", "show", "update"]
16523
+ commands: ["create", "show", "run", "run-show", "update"]
16379
16524
  }
16380
16525
  },
16381
16526
  broadcast: {
@@ -16855,10 +17000,14 @@ async function resolveDoctorAuthOrganization(params) {
16855
17000
  }
16856
17001
  const id = organization.id;
16857
17002
  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
- };
17003
+ const result = {};
17004
+ if (typeof id === "string" && id.trim() !== "") {
17005
+ result.id = id;
17006
+ }
17007
+ if (typeof slug === "string" && slug.trim() !== "") {
17008
+ result.slug = slug;
17009
+ }
17010
+ return result;
16862
17011
  } catch {
16863
17012
  return null;
16864
17013
  }
@@ -16871,7 +17020,14 @@ async function runDoctor(cmd, opts) {
16871
17020
  const tokenSource = runtime.tokenSource ?? "none";
16872
17021
  const organizationId = context.organizationId;
16873
17022
  const authStorage = await getAuthStorageInfo(baseUrl);
16874
- const authOrganization = organizationId ? null : await resolveDoctorAuthOrganization({ baseUrl, token });
17023
+ const authOptions = {};
17024
+ if (baseUrl) {
17025
+ authOptions.baseUrl = baseUrl;
17026
+ }
17027
+ if (token) {
17028
+ authOptions.token = token;
17029
+ }
17030
+ const authOrganization = organizationId ? null : await resolveDoctorAuthOrganization(authOptions);
16875
17031
  const checks = [
16876
17032
  {
16877
17033
  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.76",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "wave": "dist/index.js"