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

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 +338 -47
  2. package/dist/index.js +338 -47
  3. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -4199,18 +4199,8 @@ var SKILL_SELECTION = `{
4199
4199
  }
4200
4200
  createdAt
4201
4201
  updatedAt
4202
+ updateVersion
4202
4203
  }`;
4203
- function asRecord4(value) {
4204
- return value && typeof value === "object" && !Array.isArray(value) ? value : null;
4205
- }
4206
- function findSkillById(id) {
4207
- return (payload) => {
4208
- if (!Array.isArray(payload)) {
4209
- return null;
4210
- }
4211
- return payload.find((entry2) => String(asRecord4(entry2)?.id ?? "") === id) ?? null;
4212
- };
4213
- }
4214
4204
  function registerSkillCommands(program) {
4215
4205
  const skills = program.command("skills").description("Skill record operations");
4216
4206
  skills.command("list").description("List Skill records").option("--scope <scope>", "Filter skills by scope").option("--query <query>", "Filter skills by search query").option("--limit <limit>", "Limit skills returned").requiredOption("--json", "Emit the stable JSON envelope").action(async (opts, cmd) => {
@@ -4238,7 +4228,7 @@ function registerSkillCommands(program) {
4238
4228
  isList: true
4239
4229
  });
4240
4230
  });
4241
- skills.command("show").description("Read one persisted Skill record by id").requiredOption("--id <id>", "Skill id").requiredOption("--json", "Emit the stable JSON envelope").action(async (opts, cmd) => {
4231
+ skills.command("show").description("Read one persisted Skill record by id or slug").requiredOption("--id <idOrSlug>", "Skill id or slug").option("--json", "Emit the stable JSON envelope").action(async (opts, cmd) => {
4242
4232
  const id = idSchema7.parse(opts.id);
4243
4233
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4244
4234
  const organizationId = resolveOrganizationId(context.organizationId);
@@ -4246,16 +4236,17 @@ function registerSkillCommands(program) {
4246
4236
  command: "skills.show",
4247
4237
  operationName: "SkillsShow",
4248
4238
  runtimeOptions: context.runtimeOptions,
4249
- field: "skills",
4239
+ field: "skill",
4250
4240
  variables: {
4251
- organization_id: organizationId
4241
+ organization_id: organizationId,
4242
+ id
4252
4243
  },
4253
4244
  variableTypes: {
4254
- organization_id: "ID!"
4245
+ organization_id: "ID!",
4246
+ id: "ID!"
4255
4247
  },
4256
4248
  selectionSet: SKILL_SELECTION,
4257
- isShow: true,
4258
- transformData: findSkillById(id)
4249
+ isShow: true
4259
4250
  });
4260
4251
  });
4261
4252
  }
@@ -6483,7 +6474,7 @@ var import_zod16 = require("zod");
6483
6474
 
6484
6475
  // src/internalOptions.ts
6485
6476
  var INTERNAL_OPTIONS_KEY = "__waveInternalOptions";
6486
- function asRecord5(value) {
6477
+ function asRecord4(value) {
6487
6478
  if (!value || typeof value !== "object" || Array.isArray(value)) {
6488
6479
  return null;
6489
6480
  }
@@ -6497,7 +6488,7 @@ function setInternalCliOptions(program, options) {
6497
6488
  function getInternalCliOptions(command) {
6498
6489
  let current = command;
6499
6490
  while (current) {
6500
- const record = asRecord5(current[INTERNAL_OPTIONS_KEY]);
6491
+ const record = asRecord4(current[INTERNAL_OPTIONS_KEY]);
6501
6492
  if (record) {
6502
6493
  return {
6503
6494
  enableRetryOnEmptyPhrase: record.enableRetryOnEmptyPhrase === true
@@ -10169,7 +10160,7 @@ function positiveInt2(raw, fallback) {
10169
10160
  function requestTimeoutMs(totalTimeoutMs) {
10170
10161
  return Math.max(1e3, Math.min(totalTimeoutMs, 1e4));
10171
10162
  }
10172
- function asRecord6(value) {
10163
+ function asRecord5(value) {
10173
10164
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
10174
10165
  }
10175
10166
  function asString(value) {
@@ -10216,9 +10207,9 @@ function cliTokenFromPoll(payload) {
10216
10207
  return asString(payload.cliToken) ?? asString(payload.cli_token) ?? asString(payload.token);
10217
10208
  }
10218
10209
  function unwrapMutationResult(value) {
10219
- const record = asRecord6(value);
10210
+ const record = asRecord5(value);
10220
10211
  if (!record) return null;
10221
- const data = asRecord6(record.data);
10212
+ const data = asRecord5(record.data);
10222
10213
  if (data && (Object.prototype.hasOwnProperty.call(record, "ok") || Object.prototype.hasOwnProperty.call(record, "errors") || Object.prototype.hasOwnProperty.call(record, "errorCode") || Object.prototype.hasOwnProperty.call(record, "error_code"))) {
10223
10214
  return data;
10224
10215
  }
@@ -10282,7 +10273,7 @@ async function runTokenLogin(cmd, opts) {
10282
10273
  exitCode: mapStatusToExitCode(status.error.status)
10283
10274
  });
10284
10275
  }
10285
- const statusData = asRecord6(status.result.data.cliAuthStatus) ?? {};
10276
+ const statusData = asRecord5(status.result.data.cliAuthStatus) ?? {};
10286
10277
  const storage = await writeStoredToken(token, baseUrl);
10287
10278
  const configPath2 = opts.saveBaseUrl ? await persistBaseUrl(baseUrl) : void 0;
10288
10279
  return printEnvelopeAndExit({
@@ -10499,7 +10490,7 @@ async function runLogout(cmd) {
10499
10490
  });
10500
10491
  if (result.ok) {
10501
10492
  requestId = result.result.requestId;
10502
- const payload = asRecord6(result.result.data.revokeCliToken) ?? {};
10493
+ const payload = asRecord5(result.result.data.revokeCliToken) ?? {};
10503
10494
  revokedRemote = payload.ok !== false;
10504
10495
  } else {
10505
10496
  requestId = result.requestId;
@@ -10562,7 +10553,7 @@ async function runAuthStatus(cmd) {
10562
10553
  exitCode: mapStatusToExitCode(result.error.status)
10563
10554
  });
10564
10555
  }
10565
- const status = asRecord6(result.result.data.cliAuthStatus) ?? {};
10556
+ const status = asRecord5(result.result.data.cliAuthStatus) ?? {};
10566
10557
  const baseAuthStatus = status.baseAuthStatus;
10567
10558
  return printEnvelopeAndExit({
10568
10559
  envelope: envelope({
@@ -12213,11 +12204,11 @@ function sanitizePlannerJson(value) {
12213
12204
  }
12214
12205
  return output;
12215
12206
  }
12216
- function asRecord7(value) {
12207
+ function asRecord6(value) {
12217
12208
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
12218
12209
  }
12219
12210
  function readPlannerStateKey(value, keys) {
12220
- const record = asRecord7(value);
12211
+ const record = asRecord6(value);
12221
12212
  if (!record) {
12222
12213
  return null;
12223
12214
  }
@@ -14786,6 +14777,7 @@ var agentToolAccessSchema = import_zod19.z.array(
14786
14777
  scope_value: nonEmptyStringSchema
14787
14778
  }).strict()
14788
14779
  ).min(1);
14780
+ var agentToolAccessUpdateSchema = agentToolAccessSchema.min(0);
14789
14781
  var agentPluginConnectionsSchema = import_zod19.z.array(
14790
14782
  import_zod19.z.object({
14791
14783
  external_tool_connection_id: nonEmptyStringSchema,
@@ -14797,6 +14789,30 @@ var agentPluginConnectionsSchema = import_zod19.z.array(
14797
14789
  enabled: import_zod19.z.boolean().optional()
14798
14790
  }).strict()
14799
14791
  ).min(1);
14792
+ var agentPluginConnectionUpdateSchema = import_zod19.z.array(
14793
+ import_zod19.z.union([
14794
+ import_zod19.z.object({
14795
+ id: nonEmptyStringSchema,
14796
+ _destroy: import_zod19.z.literal(true)
14797
+ }).strict(),
14798
+ import_zod19.z.object({
14799
+ id: nonEmptyStringSchema.optional(),
14800
+ external_tool_connection_id: nonEmptyStringSchema.optional(),
14801
+ tool_key: nonEmptyStringSchema.optional(),
14802
+ scope_value: nonEmptyStringSchema.optional(),
14803
+ allowed_tools: import_zod19.z.array(nonEmptyStringSchema).optional(),
14804
+ allowed_scopes: import_zod19.z.array(nonEmptyStringSchema).optional(),
14805
+ requires_confirmation: import_zod19.z.boolean().optional(),
14806
+ enabled: import_zod19.z.boolean().optional()
14807
+ }).strict().superRefine((value, context) => {
14808
+ if (value.id || value.external_tool_connection_id && value.tool_key) return;
14809
+ context.addIssue({
14810
+ code: import_zod19.z.ZodIssueCode.custom,
14811
+ message: "Plugin updates require an id, or both external_tool_connection_id and tool_key for a new grant."
14812
+ });
14813
+ })
14814
+ ])
14815
+ );
14800
14816
  var agentTriggerSchema = import_zod19.z.object({
14801
14817
  trigger_type: import_zod19.z.literal("cron"),
14802
14818
  cron_expression: nonEmptyStringSchema,
@@ -14806,6 +14822,14 @@ var agentTriggerSchema = import_zod19.z.object({
14806
14822
  max_runs: import_zod19.z.number().int().positive().nullable().optional(),
14807
14823
  enabled: import_zod19.z.boolean().optional()
14808
14824
  }).strict();
14825
+ var agentTriggerUpdateSchema = import_zod19.z.union([
14826
+ agentTriggerSchema.extend({ id: nonEmptyStringSchema.optional() }).strict(),
14827
+ import_zod19.z.object({
14828
+ id: nonEmptyStringSchema,
14829
+ _destroy: import_zod19.z.literal(true)
14830
+ }).strict()
14831
+ ]);
14832
+ var automationConfigSchema = import_zod19.z.record(import_zod19.z.string(), import_zod19.z.unknown());
14809
14833
  var AGENT_SELECTION = `{
14810
14834
  id
14811
14835
  type
@@ -14818,6 +14842,11 @@ var AGENT_SELECTION = `{
14818
14842
  model
14819
14843
  runWhenMentioned
14820
14844
  webAccessEnabled
14845
+ webFetchEnabled
14846
+ searchPastConversationsEnabled
14847
+ appRulesCreationEnabled
14848
+ toolDiscoveryEnabled
14849
+ selfUpdatesEnabled
14821
14850
  trustedUrls
14822
14851
  toolAccess
14823
14852
  agentToolConnections {
@@ -14851,6 +14880,7 @@ var AGENT_SELECTION = `{
14851
14880
  memberId
14852
14881
  createdAt
14853
14882
  updatedAt
14883
+ updateVersion
14854
14884
  }`;
14855
14885
  var AGENT_PLUGIN_CATALOG_SELECTION = `{
14856
14886
  externalToolConnectionId
@@ -14878,8 +14908,9 @@ var AUTOMATION_SELECTION = `{
14878
14908
  memberId
14879
14909
  createdAt
14880
14910
  updatedAt
14911
+ updateVersion
14881
14912
  }`;
14882
- function asRecord8(value) {
14913
+ function asRecord7(value) {
14883
14914
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
14884
14915
  }
14885
14916
  function asRequiredString(value) {
@@ -14928,12 +14959,12 @@ function parseJsonOption(value, optionName, schema) {
14928
14959
  return schema.parse(parseJson(String(value), optionName));
14929
14960
  }
14930
14961
  function normalizePersistedCreatePayload(payload) {
14931
- const mutation = asRecord8(payload);
14932
- const mutationData = asRecord8(mutation?.data);
14933
- const persisted = asRecord8(mutationData?.data) ?? mutationData;
14934
- const attributes = asRecord8(persisted?.attributes);
14935
- const meta = asRecord8(mutationData?.meta);
14936
- const idempotency = asRecord8(meta?.atlas_idempotency);
14962
+ const mutation = asRecord7(payload);
14963
+ const mutationData = asRecord7(mutation?.data);
14964
+ const persisted = asRecord7(mutationData?.data) ?? mutationData;
14965
+ const attributes = asRecord7(persisted?.attributes);
14966
+ const meta = asRecord7(mutationData?.meta);
14967
+ const idempotency = asRecord7(meta?.atlas_idempotency);
14937
14968
  const id = asRequiredString(persisted?.id);
14938
14969
  const slug = asRequiredString(persisted?.slug) ?? asRequiredString(attributes?.slug);
14939
14970
  const replay = idempotency?.replay;
@@ -14962,15 +14993,62 @@ function normalizePersistedCreatePayload(payload) {
14962
14993
  }
14963
14994
  };
14964
14995
  }
14996
+ function normalizePersistedUpdatePayload(payload) {
14997
+ const mutation = asRecord7(payload);
14998
+ const mutationData = asRecord7(mutation?.data);
14999
+ const persisted = asRecord7(mutationData?.data) ?? mutationData;
15000
+ const attributes = asRecord7(persisted?.attributes);
15001
+ const id = asRequiredString(persisted?.id);
15002
+ const slug = asRequiredString(persisted?.slug) ?? asRequiredString(attributes?.slug);
15003
+ const updateVersion = asRequiredString(persisted?.updateVersion) ?? asRequiredString(attributes?.updateVersion) ?? asRequiredString(attributes?.update_version);
15004
+ if (!mutation || !mutationData || !persisted || !id || !slug || !updateVersion) {
15005
+ throw new CliError({
15006
+ message: "Update response did not include persisted id, slug, and updateVersion.",
15007
+ kind: "malformed_response",
15008
+ status: 502,
15009
+ exitCode: EXIT_CODES.networkOrUpstream
15010
+ });
15011
+ }
15012
+ return {
15013
+ ok: mutation.ok,
15014
+ status: mutation.status,
15015
+ errorCode: mutation.errorCode ?? null,
15016
+ errors: mutation.errors ?? null,
15017
+ persisted: { id, slug, update_version: updateVersion }
15018
+ };
15019
+ }
15020
+ function parseAutomationConfig(value) {
15021
+ return automationConfigSchema.parse(parseJson(String(value), "--ai-task-config"));
15022
+ }
15023
+ function parseExpectedUpdateVersion(value) {
15024
+ return nonEmptyStringSchema.parse(String(value));
15025
+ }
14965
15026
  function registerAtlasAuthoringCommands(program) {
14966
15027
  const agents = program.command("agents").description("Bounded Agent authoring operations");
14967
- 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("--trusted-urls <urls>", "Comma-separated trusted URLs").option("--tool-access <json>", "JSON array of canonical native Agent tool scopes").option(
15028
+ 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(
14968
15029
  "--plugin-connections <json>",
14969
15030
  "JSON array of persisted Agent connector grants"
14970
15031
  ).option("--trigger <json>", "Canonical cron Agent trigger JSON").action(async (opts, cmd) => {
14971
15032
  const idempotencyKey = idempotencyKeySchema.parse(opts.idempotencyKey);
14972
15033
  const runWhenMentioned = parseBooleanOption(opts.runWhenMentioned, "--run-when-mentioned");
14973
15034
  const webAccessEnabled = parseBooleanOption(opts.webAccessEnabled, "--web-access-enabled");
15035
+ const webFetchEnabled = parseBooleanOption(opts.webFetchEnabled, "--web-fetch-enabled");
15036
+ const searchPastConversationsEnabled = parseBooleanOption(
15037
+ opts.searchPastConversationsEnabled,
15038
+ "--search-past-conversations-enabled"
15039
+ );
15040
+ const appRulesCreationEnabled = parseBooleanOption(
15041
+ opts.appRulesCreationEnabled,
15042
+ "--app-rules-creation-enabled"
15043
+ );
15044
+ const toolDiscoveryEnabled = parseBooleanOption(
15045
+ opts.toolDiscoveryEnabled,
15046
+ "--tool-discovery-enabled"
15047
+ );
15048
+ const selfUpdatesEnabled = parseBooleanOption(
15049
+ opts.selfUpdatesEnabled,
15050
+ "--self-updates-enabled"
15051
+ );
14974
15052
  const trustedUrls = parseCommaSeparatedStrings(opts.trustedUrls);
14975
15053
  const toolAccess = parseJsonOption(
14976
15054
  opts.toolAccess,
@@ -15008,6 +15086,11 @@ function registerAtlasAuthoringCommands(program) {
15008
15086
  ...opts.model !== void 0 ? { model: String(opts.model) } : {},
15009
15087
  ...runWhenMentioned !== void 0 ? { run_when_mentioned: runWhenMentioned } : {},
15010
15088
  ...webAccessEnabled !== void 0 ? { web_access_enabled: webAccessEnabled } : {},
15089
+ ...webFetchEnabled !== void 0 ? { web_fetch_enabled: webFetchEnabled } : {},
15090
+ ...searchPastConversationsEnabled !== void 0 ? { search_past_conversations_enabled: searchPastConversationsEnabled } : {},
15091
+ ...appRulesCreationEnabled !== void 0 ? { app_rules_creation_enabled: appRulesCreationEnabled } : {},
15092
+ ...toolDiscoveryEnabled !== void 0 ? { tool_discovery_enabled: toolDiscoveryEnabled } : {},
15093
+ ...selfUpdatesEnabled !== void 0 ? { self_updates_enabled: selfUpdatesEnabled } : {},
15011
15094
  ...trustedUrls !== void 0 ? { trusted_urls: trustedUrls } : {},
15012
15095
  ...toolAccess !== void 0 ? { tool_access: toolAccess } : {},
15013
15096
  ...pluginConnections !== void 0 ? { agent_tool_connections_attributes: pluginConnections } : {},
@@ -15019,7 +15102,7 @@ function registerAtlasAuthoringCommands(program) {
15019
15102
  transformMutationPayload: normalizePersistedCreatePayload
15020
15103
  });
15021
15104
  });
15022
- agents.command("show").description("Read one persisted Agent by id").requiredOption("--id <id>", "Agent id").action(async (opts, cmd) => {
15105
+ agents.command("show").description("Read one persisted Agent by id or slug").requiredOption("--id <idOrSlug>", "Agent id or slug").action(async (opts, cmd) => {
15023
15106
  const id = idSchema14.parse(opts.id);
15024
15107
  const context = await resolveCommandContext(cmd.optsWithGlobals());
15025
15108
  const organizationId = resolveOrganizationId(context.organizationId);
@@ -15034,6 +15117,104 @@ function registerAtlasAuthoringCommands(program) {
15034
15117
  isShow: true
15035
15118
  });
15036
15119
  });
15120
+ agents.command("update").description("Update one persisted Agent through the API-owned updateAgent contract").requiredOption("--id <idOrSlug>", "Agent id or slug").requiredOption(
15121
+ "--expected-update-version <version>",
15122
+ "Exact opaque updateVersion value from agents show; rejects stale writes"
15123
+ ).option("--name <name>").option("--description <description>").option("--notes <notes>").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("--clear-trusted-urls", "Clear all trusted URLs").option("--tool-access <json>", "JSON array of the complete canonical native Agent tool scopes").option(
15124
+ "--plugin-connections <json>",
15125
+ "JSON array of Agent connector grant patches; removals require id and _destroy:true"
15126
+ ).option(
15127
+ "--trigger <json>",
15128
+ "Canonical Agent trigger patch; use the trigger id from agents show to replace or remove it"
15129
+ ).action(async (opts, cmd) => {
15130
+ if (opts.clearTrustedUrls && opts.trustedUrls !== void 0) {
15131
+ throw new CliError({
15132
+ message: "Use either --trusted-urls or --clear-trusted-urls, not both.",
15133
+ kind: "invalid_args",
15134
+ status: 400,
15135
+ exitCode: EXIT_CODES.invalidArgs
15136
+ });
15137
+ }
15138
+ const runWhenMentioned = parseBooleanOption(opts.runWhenMentioned, "--run-when-mentioned");
15139
+ const webAccessEnabled = parseBooleanOption(opts.webAccessEnabled, "--web-access-enabled");
15140
+ const webFetchEnabled = parseBooleanOption(opts.webFetchEnabled, "--web-fetch-enabled");
15141
+ const searchPastConversationsEnabled = parseBooleanOption(
15142
+ opts.searchPastConversationsEnabled,
15143
+ "--search-past-conversations-enabled"
15144
+ );
15145
+ const appRulesCreationEnabled = parseBooleanOption(
15146
+ opts.appRulesCreationEnabled,
15147
+ "--app-rules-creation-enabled"
15148
+ );
15149
+ const toolDiscoveryEnabled = parseBooleanOption(
15150
+ opts.toolDiscoveryEnabled,
15151
+ "--tool-discovery-enabled"
15152
+ );
15153
+ const selfUpdatesEnabled = parseBooleanOption(opts.selfUpdatesEnabled, "--self-updates-enabled");
15154
+ const trustedUrls = parseCommaSeparatedStrings(opts.trustedUrls);
15155
+ const toolAccess = parseJsonOption(
15156
+ opts.toolAccess,
15157
+ "--tool-access",
15158
+ agentToolAccessUpdateSchema
15159
+ );
15160
+ const pluginConnections = parseJsonOption(
15161
+ opts.pluginConnections,
15162
+ "--plugin-connections",
15163
+ agentPluginConnectionUpdateSchema
15164
+ );
15165
+ const trigger = parseJsonOption(opts.trigger, "--trigger", agentTriggerUpdateSchema);
15166
+ const patch = {
15167
+ ...opts.name !== void 0 ? { name: String(opts.name) } : {},
15168
+ ...opts.description !== void 0 ? { description: String(opts.description) } : {},
15169
+ ...opts.notes !== void 0 ? { notes: String(opts.notes) } : {},
15170
+ ...opts.status !== void 0 ? { status: String(opts.status) } : {},
15171
+ ...opts.visibility !== void 0 ? { visibility: String(opts.visibility) } : {},
15172
+ ...opts.model !== void 0 ? { model: String(opts.model) } : {},
15173
+ ...runWhenMentioned !== void 0 ? { run_when_mentioned: runWhenMentioned } : {},
15174
+ ...webAccessEnabled !== void 0 ? { web_access_enabled: webAccessEnabled } : {},
15175
+ ...webFetchEnabled !== void 0 ? { web_fetch_enabled: webFetchEnabled } : {},
15176
+ ...searchPastConversationsEnabled !== void 0 ? { search_past_conversations_enabled: searchPastConversationsEnabled } : {},
15177
+ ...appRulesCreationEnabled !== void 0 ? { app_rules_creation_enabled: appRulesCreationEnabled } : {},
15178
+ ...toolDiscoveryEnabled !== void 0 ? { tool_discovery_enabled: toolDiscoveryEnabled } : {},
15179
+ ...selfUpdatesEnabled !== void 0 ? { self_updates_enabled: selfUpdatesEnabled } : {},
15180
+ ...trustedUrls !== void 0 ? { trusted_urls: trustedUrls } : {},
15181
+ ...opts.clearTrustedUrls ? { trusted_urls: [] } : {},
15182
+ ...toolAccess !== void 0 ? { tool_access: toolAccess } : {},
15183
+ ...pluginConnections !== void 0 ? { agent_tool_connections_attributes: pluginConnections } : {},
15184
+ ...trigger !== void 0 ? { trigger_attributes: trigger } : {}
15185
+ };
15186
+ if (Object.keys(patch).length === 0) {
15187
+ throw new CliError({
15188
+ message: "agents update requires at least one mutable Agent field.",
15189
+ kind: "invalid_args",
15190
+ status: 400,
15191
+ exitCode: EXIT_CODES.invalidArgs
15192
+ });
15193
+ }
15194
+ const id = idSchema14.parse(opts.id);
15195
+ const expectedUpdateVersion = parseExpectedUpdateVersion(opts.expectedUpdateVersion);
15196
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
15197
+ const organizationId = resolveOrganizationId(context.organizationId);
15198
+ await runGraphqlMutationCommand({
15199
+ command: "agents.update",
15200
+ operationName: "AgentsUpdate",
15201
+ runtimeOptions: context.runtimeOptions,
15202
+ field: "update_agent",
15203
+ variableTypes: {
15204
+ organization_id: "ID!",
15205
+ agent_id: "ID!",
15206
+ params: "UpdateAgentParamsInput!",
15207
+ expected_update_version: "String!"
15208
+ },
15209
+ variables: {
15210
+ organization_id: organizationId,
15211
+ agent_id: id,
15212
+ params: { agent: patch },
15213
+ expected_update_version: expectedUpdateVersion
15214
+ },
15215
+ transformMutationPayload: normalizePersistedUpdatePayload
15216
+ });
15217
+ });
15037
15218
  agents.command("plugin-catalog").description("Read connected Agent plugin capabilities for one supported service").requiredOption(
15038
15219
  "--service <service>",
15039
15220
  "Supported service: gmail, calendar, slack, or stripe"
@@ -15084,7 +15265,7 @@ function registerAtlasAuthoringCommands(program) {
15084
15265
  transformMutationPayload: normalizePersistedCreatePayload
15085
15266
  });
15086
15267
  });
15087
- automations.command("show").description("Read one persisted Automation by id").requiredOption("--id <id>", "Automation id").action(async (opts, cmd) => {
15268
+ automations.command("show").description("Read one persisted Automation by id or slug").requiredOption("--id <idOrSlug>", "Automation id or slug").action(async (opts, cmd) => {
15088
15269
  const id = idSchema14.parse(opts.id);
15089
15270
  const context = await resolveCommandContext(cmd.optsWithGlobals());
15090
15271
  const organizationId = resolveOrganizationId(context.organizationId);
@@ -15099,6 +15280,66 @@ function registerAtlasAuthoringCommands(program) {
15099
15280
  isShow: true
15100
15281
  });
15101
15282
  });
15283
+ automations.command("update").description("Update one task-backed Automation through the API-owned updateTask contract").requiredOption("--id <idOrSlug>", "Automation id or slug").requiredOption(
15284
+ "--expected-update-version <version>",
15285
+ "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(
15287
+ "--agent-id <agentId>",
15288
+ "Executor Agent id; requires --ai-task-config and is stored in that config"
15289
+ ).action(async (opts, cmd) => {
15290
+ if (opts.agentId !== void 0 && opts.aiTaskConfig === void 0) {
15291
+ throw new CliError({
15292
+ message: "automations update requires --ai-task-config whenever --agent-id is supplied.",
15293
+ kind: "invalid_args",
15294
+ status: 400,
15295
+ exitCode: EXIT_CODES.invalidArgs
15296
+ });
15297
+ }
15298
+ const aiTaskConfig = opts.aiTaskConfig === void 0 ? void 0 : {
15299
+ ...parseAutomationConfig(opts.aiTaskConfig),
15300
+ ...opts.agentId !== void 0 ? { agent_id: idSchema14.parse(opts.agentId) } : {}
15301
+ };
15302
+ const patch = {
15303
+ ...opts.summary !== void 0 ? { summary: String(opts.summary) } : {},
15304
+ ...opts.description !== void 0 ? { description: String(opts.description) } : {},
15305
+ ...opts.notes !== void 0 ? { notes: String(opts.notes) } : {},
15306
+ ...opts.status !== void 0 ? { status: String(opts.status) } : {},
15307
+ ...opts.priority !== void 0 ? { priority: String(opts.priority) } : {},
15308
+ ...opts.dueDate !== void 0 ? { due_date: isoDateSchema.parse(opts.dueDate) } : {},
15309
+ ...aiTaskConfig !== void 0 ? { ai_task_config: aiTaskConfig } : {}
15310
+ };
15311
+ if (Object.keys(patch).length === 0) {
15312
+ throw new CliError({
15313
+ message: "automations update requires at least one mutable Automation field.",
15314
+ kind: "invalid_args",
15315
+ status: 400,
15316
+ exitCode: EXIT_CODES.invalidArgs
15317
+ });
15318
+ }
15319
+ const id = idSchema14.parse(opts.id);
15320
+ const expectedUpdateVersion = parseExpectedUpdateVersion(opts.expectedUpdateVersion);
15321
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
15322
+ const organizationId = resolveOrganizationId(context.organizationId);
15323
+ await runGraphqlMutationCommand({
15324
+ command: "automations.update",
15325
+ operationName: "AutomationsUpdate",
15326
+ runtimeOptions: context.runtimeOptions,
15327
+ field: "update_task",
15328
+ variableTypes: {
15329
+ organization_id: "ID!",
15330
+ task_id: "ID!",
15331
+ params: "UpdateTaskParamsInput!",
15332
+ expected_update_version: "String!"
15333
+ },
15334
+ variables: {
15335
+ organization_id: organizationId,
15336
+ task_id: id,
15337
+ params: { task: patch },
15338
+ expected_update_version: expectedUpdateVersion
15339
+ },
15340
+ transformMutationPayload: normalizePersistedUpdatePayload
15341
+ });
15342
+ });
15102
15343
  const skills = program.commands.find((command) => command.name() === "skills");
15103
15344
  if (!skills) {
15104
15345
  throw new Error("Skills command must be registered before Atlas authoring commands.");
@@ -15130,6 +15371,47 @@ function registerAtlasAuthoringCommands(program) {
15130
15371
  transformMutationPayload: normalizePersistedCreatePayload
15131
15372
  });
15132
15373
  });
15374
+ skills.command("update").description("Update one persisted Skill through the API-owned updateSkill contract").requiredOption("--id <idOrSlug>", "Skill id or slug").requiredOption(
15375
+ "--expected-update-version <version>",
15376
+ "Exact opaque updateVersion value from skills show; rejects stale writes"
15377
+ ).option("--name <name>").option("--emoji <emoji>").option("--description <description>").action(async (opts, cmd) => {
15378
+ const patch = {
15379
+ ...opts.name !== void 0 ? { name: String(opts.name) } : {},
15380
+ ...opts.emoji !== void 0 ? { emoji: String(opts.emoji) } : {},
15381
+ ...opts.description !== void 0 ? { description: String(opts.description) } : {}
15382
+ };
15383
+ if (Object.keys(patch).length === 0) {
15384
+ throw new CliError({
15385
+ message: "skills update requires at least one mutable Skill field.",
15386
+ kind: "invalid_args",
15387
+ status: 400,
15388
+ exitCode: EXIT_CODES.invalidArgs
15389
+ });
15390
+ }
15391
+ const id = idSchema14.parse(opts.id);
15392
+ const expectedUpdateVersion = parseExpectedUpdateVersion(opts.expectedUpdateVersion);
15393
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
15394
+ const organizationId = resolveOrganizationId(context.organizationId);
15395
+ await runGraphqlMutationCommand({
15396
+ command: "skills.update",
15397
+ operationName: "SkillsUpdate",
15398
+ runtimeOptions: context.runtimeOptions,
15399
+ field: "update_skill",
15400
+ variableTypes: {
15401
+ organization_id: "ID!",
15402
+ id: "ID!",
15403
+ input: "UpdateSkillInput!",
15404
+ expected_update_version: "String!"
15405
+ },
15406
+ variables: {
15407
+ organization_id: organizationId,
15408
+ id,
15409
+ input: patch,
15410
+ expected_update_version: expectedUpdateVersion
15411
+ },
15412
+ transformMutationPayload: normalizePersistedUpdatePayload
15413
+ });
15414
+ });
15133
15415
  }
15134
15416
 
15135
15417
  // src/commands/discovery.ts
@@ -15140,7 +15422,7 @@ var import_node_path4 = require("path");
15140
15422
  var import_node_crypto3 = require("crypto");
15141
15423
 
15142
15424
  // src/version.ts
15143
- var CLI_VERSION = "0.1.70";
15425
+ var CLI_VERSION = "0.1.72";
15144
15426
 
15145
15427
  // src/operationMetadata.ts
15146
15428
  var DISCOVERY_OPERATION_IDS = [
@@ -15453,7 +15735,9 @@ var WRITE_OPERATION_IDS = [
15453
15735
  "accountability.create",
15454
15736
  "accountability.update",
15455
15737
  "agents.create",
15738
+ "agents.update",
15456
15739
  "automations.create",
15740
+ "automations.update",
15457
15741
  "contacts.create",
15458
15742
  "contacts.update",
15459
15743
  "content.create-contact",
@@ -15559,6 +15843,7 @@ var WRITE_OPERATION_IDS = [
15559
15843
  "scorecards.create",
15560
15844
  "scorecards.update",
15561
15845
  "skills.create",
15846
+ "skills.update",
15562
15847
  "smart-kpi-views.create",
15563
15848
  "stand-ups.create",
15564
15849
  "stand-ups.update",
@@ -15910,12 +16195,13 @@ var NAMESPACE_DOCS = {
15910
16195
  skills: {
15911
16196
  name: "skills",
15912
16197
  tier: "primary",
15913
- description: "Skill record readback and bounded create operations.",
16198
+ description: "Skill record readback and bounded create/update operations.",
15914
16199
  examples: [
15915
16200
  "wave skills list --json",
15916
16201
  "wave skills list --scope ADMIN_GLOBAL --json",
15917
16202
  "wave skills show --id 123 --json",
15918
- 'wave skills create --name "Weekly planning" --scope MEMBER_PERSONAL --idempotency-key skill-create-001'
16203
+ 'wave skills create --name "Weekly planning" --scope MEMBER_PERSONAL --idempotency-key skill-create-001',
16204
+ 'wave skills update --id SKL-01 --expected-update-version 2026-07-17T12:00:00.123456Z --description "Review my projects."'
15919
16205
  ],
15920
16206
  schema: {
15921
16207
  output: "json-envelope-default",
@@ -15923,20 +16209,22 @@ var NAMESPACE_DOCS = {
15923
16209
  safety: [
15924
16210
  "Uses API-owned Skill GraphQL read fields only.",
15925
16211
  "Create calls only createSkill with an explicit idempotency key.",
16212
+ "Update calls only updateSkill with an exact opaque updateVersion token and does not change scope or ownership.",
15926
16213
  "Skill create supports the API-defined ADMIN_GLOBAL and MEMBER_PERSONAL scopes.",
15927
16214
  "Does not update, destroy, archive, approve, or apply Skill records."
15928
16215
  ],
15929
- commands: ["list", "show", "create"]
16216
+ commands: ["list", "show", "create", "update"]
15930
16217
  }
15931
16218
  },
15932
16219
  agents: {
15933
16220
  name: "agents",
15934
16221
  tier: "primary",
15935
- description: "Bounded Agent create and persisted readback operations.",
16222
+ description: "Bounded Agent create, readback, and stale-write-protected update operations.",
15936
16223
  examples: [
15937
16224
  'wave agents create --name "Planning helper" --idempotency-key agent-create-001',
15938
16225
  `wave agents create --name "Project summary" --notes "Summarize my projects." --tool-access '[{"tool_key":"projects","scope_value":"all"}]' --trigger '{"trigger_type":"cron","cron_expression":"0 14 * * 2","timezone":"America/Phoenix","enabled":true}' --idempotency-key agent-create-002`,
15939
- "wave agents show --id 123"
16226
+ "wave agents show --id AGT-01",
16227
+ 'wave agents update --id AGT-01 --expected-update-version 2026-07-17T12:00:00.123456Z --notes "Summarize my projects."'
15940
16228
  ],
15941
16229
  schema: {
15942
16230
  output: "json-envelope-default",
@@ -15944,20 +16232,22 @@ var NAMESPACE_DOCS = {
15944
16232
  safety: [
15945
16233
  "Create calls only createAgent with an explicit idempotency key.",
15946
16234
  "Create preserves API-owned defaults by sending only supplied typed Agent fields.",
16235
+ "Update calls only updateAgent with an exact opaque updateVersion token and cannot change ownership.",
15947
16236
  "Native tools, plugin connector grants, and the cron trigger use strict canonical JSON shapes.",
15948
16237
  "Outlook Calendar and Outlook Mail are not supported Agent plugin families in this release.",
15949
16238
  "Show uses the API-owned agent query by id; no slug fallback is implemented."
15950
16239
  ],
15951
- commands: ["create", "show"]
16240
+ commands: ["create", "show", "update"]
15952
16241
  }
15953
16242
  },
15954
16243
  automations: {
15955
16244
  name: "automations",
15956
16245
  tier: "primary",
15957
- description: "Bounded Automation create and persisted readback operations.",
16246
+ description: "Bounded task-backed Automation create, readback, and stale-write-protected update operations.",
15958
16247
  examples: [
15959
16248
  `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`,
15960
- "wave automations show --id 123"
16249
+ "wave automations show --id ATK-01",
16250
+ 'wave automations update --id ATK-01 --expected-update-version 2026-07-17T12:00:00.123456Z --summary "Weekly project review"'
15961
16251
  ],
15962
16252
  schema: {
15963
16253
  output: "json-envelope-default",
@@ -15966,10 +16256,11 @@ var NAMESPACE_DOCS = {
15966
16256
  "Create calls only createAutomation with an explicit idempotency key.",
15967
16257
  "Only the API-defined ai_task_config field accepts validated JSON.",
15968
16258
  "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.",
15969
16260
  "Does not create a project Task, run an Automation, or invoke AI OS actions.",
15970
16261
  "Show uses the API-owned automation query by id; no slug fallback is implemented."
15971
16262
  ],
15972
- commands: ["create", "show"]
16263
+ commands: ["create", "show", "update"]
15973
16264
  }
15974
16265
  },
15975
16266
  broadcast: {
package/dist/index.js CHANGED
@@ -4198,18 +4198,8 @@ var SKILL_SELECTION = `{
4198
4198
  }
4199
4199
  createdAt
4200
4200
  updatedAt
4201
+ updateVersion
4201
4202
  }`;
4202
- function asRecord4(value) {
4203
- return value && typeof value === "object" && !Array.isArray(value) ? value : null;
4204
- }
4205
- function findSkillById(id) {
4206
- return (payload) => {
4207
- if (!Array.isArray(payload)) {
4208
- return null;
4209
- }
4210
- return payload.find((entry2) => String(asRecord4(entry2)?.id ?? "") === id) ?? null;
4211
- };
4212
- }
4213
4203
  function registerSkillCommands(program) {
4214
4204
  const skills = program.command("skills").description("Skill record operations");
4215
4205
  skills.command("list").description("List Skill records").option("--scope <scope>", "Filter skills by scope").option("--query <query>", "Filter skills by search query").option("--limit <limit>", "Limit skills returned").requiredOption("--json", "Emit the stable JSON envelope").action(async (opts, cmd) => {
@@ -4237,7 +4227,7 @@ function registerSkillCommands(program) {
4237
4227
  isList: true
4238
4228
  });
4239
4229
  });
4240
- skills.command("show").description("Read one persisted Skill record by id").requiredOption("--id <id>", "Skill id").requiredOption("--json", "Emit the stable JSON envelope").action(async (opts, cmd) => {
4230
+ skills.command("show").description("Read one persisted Skill record by id or slug").requiredOption("--id <idOrSlug>", "Skill id or slug").option("--json", "Emit the stable JSON envelope").action(async (opts, cmd) => {
4241
4231
  const id = idSchema7.parse(opts.id);
4242
4232
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4243
4233
  const organizationId = resolveOrganizationId(context.organizationId);
@@ -4245,16 +4235,17 @@ function registerSkillCommands(program) {
4245
4235
  command: "skills.show",
4246
4236
  operationName: "SkillsShow",
4247
4237
  runtimeOptions: context.runtimeOptions,
4248
- field: "skills",
4238
+ field: "skill",
4249
4239
  variables: {
4250
- organization_id: organizationId
4240
+ organization_id: organizationId,
4241
+ id
4251
4242
  },
4252
4243
  variableTypes: {
4253
- organization_id: "ID!"
4244
+ organization_id: "ID!",
4245
+ id: "ID!"
4254
4246
  },
4255
4247
  selectionSet: SKILL_SELECTION,
4256
- isShow: true,
4257
- transformData: findSkillById(id)
4248
+ isShow: true
4258
4249
  });
4259
4250
  });
4260
4251
  }
@@ -6482,7 +6473,7 @@ import { z as z16 } from "zod";
6482
6473
 
6483
6474
  // src/internalOptions.ts
6484
6475
  var INTERNAL_OPTIONS_KEY = "__waveInternalOptions";
6485
- function asRecord5(value) {
6476
+ function asRecord4(value) {
6486
6477
  if (!value || typeof value !== "object" || Array.isArray(value)) {
6487
6478
  return null;
6488
6479
  }
@@ -6496,7 +6487,7 @@ function setInternalCliOptions(program, options) {
6496
6487
  function getInternalCliOptions(command) {
6497
6488
  let current = command;
6498
6489
  while (current) {
6499
- const record = asRecord5(current[INTERNAL_OPTIONS_KEY]);
6490
+ const record = asRecord4(current[INTERNAL_OPTIONS_KEY]);
6500
6491
  if (record) {
6501
6492
  return {
6502
6493
  enableRetryOnEmptyPhrase: record.enableRetryOnEmptyPhrase === true
@@ -10168,7 +10159,7 @@ function positiveInt2(raw, fallback) {
10168
10159
  function requestTimeoutMs(totalTimeoutMs) {
10169
10160
  return Math.max(1e3, Math.min(totalTimeoutMs, 1e4));
10170
10161
  }
10171
- function asRecord6(value) {
10162
+ function asRecord5(value) {
10172
10163
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
10173
10164
  }
10174
10165
  function asString(value) {
@@ -10215,9 +10206,9 @@ function cliTokenFromPoll(payload) {
10215
10206
  return asString(payload.cliToken) ?? asString(payload.cli_token) ?? asString(payload.token);
10216
10207
  }
10217
10208
  function unwrapMutationResult(value) {
10218
- const record = asRecord6(value);
10209
+ const record = asRecord5(value);
10219
10210
  if (!record) return null;
10220
- const data = asRecord6(record.data);
10211
+ const data = asRecord5(record.data);
10221
10212
  if (data && (Object.prototype.hasOwnProperty.call(record, "ok") || Object.prototype.hasOwnProperty.call(record, "errors") || Object.prototype.hasOwnProperty.call(record, "errorCode") || Object.prototype.hasOwnProperty.call(record, "error_code"))) {
10222
10213
  return data;
10223
10214
  }
@@ -10281,7 +10272,7 @@ async function runTokenLogin(cmd, opts) {
10281
10272
  exitCode: mapStatusToExitCode(status.error.status)
10282
10273
  });
10283
10274
  }
10284
- const statusData = asRecord6(status.result.data.cliAuthStatus) ?? {};
10275
+ const statusData = asRecord5(status.result.data.cliAuthStatus) ?? {};
10285
10276
  const storage = await writeStoredToken(token, baseUrl);
10286
10277
  const configPath2 = opts.saveBaseUrl ? await persistBaseUrl(baseUrl) : void 0;
10287
10278
  return printEnvelopeAndExit({
@@ -10498,7 +10489,7 @@ async function runLogout(cmd) {
10498
10489
  });
10499
10490
  if (result.ok) {
10500
10491
  requestId = result.result.requestId;
10501
- const payload = asRecord6(result.result.data.revokeCliToken) ?? {};
10492
+ const payload = asRecord5(result.result.data.revokeCliToken) ?? {};
10502
10493
  revokedRemote = payload.ok !== false;
10503
10494
  } else {
10504
10495
  requestId = result.requestId;
@@ -10561,7 +10552,7 @@ async function runAuthStatus(cmd) {
10561
10552
  exitCode: mapStatusToExitCode(result.error.status)
10562
10553
  });
10563
10554
  }
10564
- const status = asRecord6(result.result.data.cliAuthStatus) ?? {};
10555
+ const status = asRecord5(result.result.data.cliAuthStatus) ?? {};
10565
10556
  const baseAuthStatus = status.baseAuthStatus;
10566
10557
  return printEnvelopeAndExit({
10567
10558
  envelope: envelope({
@@ -12212,11 +12203,11 @@ function sanitizePlannerJson(value) {
12212
12203
  }
12213
12204
  return output;
12214
12205
  }
12215
- function asRecord7(value) {
12206
+ function asRecord6(value) {
12216
12207
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
12217
12208
  }
12218
12209
  function readPlannerStateKey(value, keys) {
12219
- const record = asRecord7(value);
12210
+ const record = asRecord6(value);
12220
12211
  if (!record) {
12221
12212
  return null;
12222
12213
  }
@@ -14785,6 +14776,7 @@ var agentToolAccessSchema = z19.array(
14785
14776
  scope_value: nonEmptyStringSchema
14786
14777
  }).strict()
14787
14778
  ).min(1);
14779
+ var agentToolAccessUpdateSchema = agentToolAccessSchema.min(0);
14788
14780
  var agentPluginConnectionsSchema = z19.array(
14789
14781
  z19.object({
14790
14782
  external_tool_connection_id: nonEmptyStringSchema,
@@ -14796,6 +14788,30 @@ var agentPluginConnectionsSchema = z19.array(
14796
14788
  enabled: z19.boolean().optional()
14797
14789
  }).strict()
14798
14790
  ).min(1);
14791
+ var agentPluginConnectionUpdateSchema = z19.array(
14792
+ z19.union([
14793
+ z19.object({
14794
+ id: nonEmptyStringSchema,
14795
+ _destroy: z19.literal(true)
14796
+ }).strict(),
14797
+ z19.object({
14798
+ id: nonEmptyStringSchema.optional(),
14799
+ external_tool_connection_id: nonEmptyStringSchema.optional(),
14800
+ tool_key: nonEmptyStringSchema.optional(),
14801
+ scope_value: nonEmptyStringSchema.optional(),
14802
+ allowed_tools: z19.array(nonEmptyStringSchema).optional(),
14803
+ allowed_scopes: z19.array(nonEmptyStringSchema).optional(),
14804
+ requires_confirmation: z19.boolean().optional(),
14805
+ enabled: z19.boolean().optional()
14806
+ }).strict().superRefine((value, context) => {
14807
+ if (value.id || value.external_tool_connection_id && value.tool_key) return;
14808
+ context.addIssue({
14809
+ code: z19.ZodIssueCode.custom,
14810
+ message: "Plugin updates require an id, or both external_tool_connection_id and tool_key for a new grant."
14811
+ });
14812
+ })
14813
+ ])
14814
+ );
14799
14815
  var agentTriggerSchema = z19.object({
14800
14816
  trigger_type: z19.literal("cron"),
14801
14817
  cron_expression: nonEmptyStringSchema,
@@ -14805,6 +14821,14 @@ var agentTriggerSchema = z19.object({
14805
14821
  max_runs: z19.number().int().positive().nullable().optional(),
14806
14822
  enabled: z19.boolean().optional()
14807
14823
  }).strict();
14824
+ var agentTriggerUpdateSchema = z19.union([
14825
+ agentTriggerSchema.extend({ id: nonEmptyStringSchema.optional() }).strict(),
14826
+ z19.object({
14827
+ id: nonEmptyStringSchema,
14828
+ _destroy: z19.literal(true)
14829
+ }).strict()
14830
+ ]);
14831
+ var automationConfigSchema = z19.record(z19.string(), z19.unknown());
14808
14832
  var AGENT_SELECTION = `{
14809
14833
  id
14810
14834
  type
@@ -14817,6 +14841,11 @@ var AGENT_SELECTION = `{
14817
14841
  model
14818
14842
  runWhenMentioned
14819
14843
  webAccessEnabled
14844
+ webFetchEnabled
14845
+ searchPastConversationsEnabled
14846
+ appRulesCreationEnabled
14847
+ toolDiscoveryEnabled
14848
+ selfUpdatesEnabled
14820
14849
  trustedUrls
14821
14850
  toolAccess
14822
14851
  agentToolConnections {
@@ -14850,6 +14879,7 @@ var AGENT_SELECTION = `{
14850
14879
  memberId
14851
14880
  createdAt
14852
14881
  updatedAt
14882
+ updateVersion
14853
14883
  }`;
14854
14884
  var AGENT_PLUGIN_CATALOG_SELECTION = `{
14855
14885
  externalToolConnectionId
@@ -14877,8 +14907,9 @@ var AUTOMATION_SELECTION = `{
14877
14907
  memberId
14878
14908
  createdAt
14879
14909
  updatedAt
14910
+ updateVersion
14880
14911
  }`;
14881
- function asRecord8(value) {
14912
+ function asRecord7(value) {
14882
14913
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
14883
14914
  }
14884
14915
  function asRequiredString(value) {
@@ -14927,12 +14958,12 @@ function parseJsonOption(value, optionName, schema) {
14927
14958
  return schema.parse(parseJson(String(value), optionName));
14928
14959
  }
14929
14960
  function normalizePersistedCreatePayload(payload) {
14930
- const mutation = asRecord8(payload);
14931
- const mutationData = asRecord8(mutation?.data);
14932
- const persisted = asRecord8(mutationData?.data) ?? mutationData;
14933
- const attributes = asRecord8(persisted?.attributes);
14934
- const meta = asRecord8(mutationData?.meta);
14935
- const idempotency = asRecord8(meta?.atlas_idempotency);
14961
+ const mutation = asRecord7(payload);
14962
+ const mutationData = asRecord7(mutation?.data);
14963
+ const persisted = asRecord7(mutationData?.data) ?? mutationData;
14964
+ const attributes = asRecord7(persisted?.attributes);
14965
+ const meta = asRecord7(mutationData?.meta);
14966
+ const idempotency = asRecord7(meta?.atlas_idempotency);
14936
14967
  const id = asRequiredString(persisted?.id);
14937
14968
  const slug = asRequiredString(persisted?.slug) ?? asRequiredString(attributes?.slug);
14938
14969
  const replay = idempotency?.replay;
@@ -14961,15 +14992,62 @@ function normalizePersistedCreatePayload(payload) {
14961
14992
  }
14962
14993
  };
14963
14994
  }
14995
+ function normalizePersistedUpdatePayload(payload) {
14996
+ const mutation = asRecord7(payload);
14997
+ const mutationData = asRecord7(mutation?.data);
14998
+ const persisted = asRecord7(mutationData?.data) ?? mutationData;
14999
+ const attributes = asRecord7(persisted?.attributes);
15000
+ const id = asRequiredString(persisted?.id);
15001
+ const slug = asRequiredString(persisted?.slug) ?? asRequiredString(attributes?.slug);
15002
+ const updateVersion = asRequiredString(persisted?.updateVersion) ?? asRequiredString(attributes?.updateVersion) ?? asRequiredString(attributes?.update_version);
15003
+ if (!mutation || !mutationData || !persisted || !id || !slug || !updateVersion) {
15004
+ throw new CliError({
15005
+ message: "Update response did not include persisted id, slug, and updateVersion.",
15006
+ kind: "malformed_response",
15007
+ status: 502,
15008
+ exitCode: EXIT_CODES.networkOrUpstream
15009
+ });
15010
+ }
15011
+ return {
15012
+ ok: mutation.ok,
15013
+ status: mutation.status,
15014
+ errorCode: mutation.errorCode ?? null,
15015
+ errors: mutation.errors ?? null,
15016
+ persisted: { id, slug, update_version: updateVersion }
15017
+ };
15018
+ }
15019
+ function parseAutomationConfig(value) {
15020
+ return automationConfigSchema.parse(parseJson(String(value), "--ai-task-config"));
15021
+ }
15022
+ function parseExpectedUpdateVersion(value) {
15023
+ return nonEmptyStringSchema.parse(String(value));
15024
+ }
14964
15025
  function registerAtlasAuthoringCommands(program) {
14965
15026
  const agents = program.command("agents").description("Bounded Agent authoring operations");
14966
- 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("--trusted-urls <urls>", "Comma-separated trusted URLs").option("--tool-access <json>", "JSON array of canonical native Agent tool scopes").option(
15027
+ 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(
14967
15028
  "--plugin-connections <json>",
14968
15029
  "JSON array of persisted Agent connector grants"
14969
15030
  ).option("--trigger <json>", "Canonical cron Agent trigger JSON").action(async (opts, cmd) => {
14970
15031
  const idempotencyKey = idempotencyKeySchema.parse(opts.idempotencyKey);
14971
15032
  const runWhenMentioned = parseBooleanOption(opts.runWhenMentioned, "--run-when-mentioned");
14972
15033
  const webAccessEnabled = parseBooleanOption(opts.webAccessEnabled, "--web-access-enabled");
15034
+ const webFetchEnabled = parseBooleanOption(opts.webFetchEnabled, "--web-fetch-enabled");
15035
+ const searchPastConversationsEnabled = parseBooleanOption(
15036
+ opts.searchPastConversationsEnabled,
15037
+ "--search-past-conversations-enabled"
15038
+ );
15039
+ const appRulesCreationEnabled = parseBooleanOption(
15040
+ opts.appRulesCreationEnabled,
15041
+ "--app-rules-creation-enabled"
15042
+ );
15043
+ const toolDiscoveryEnabled = parseBooleanOption(
15044
+ opts.toolDiscoveryEnabled,
15045
+ "--tool-discovery-enabled"
15046
+ );
15047
+ const selfUpdatesEnabled = parseBooleanOption(
15048
+ opts.selfUpdatesEnabled,
15049
+ "--self-updates-enabled"
15050
+ );
14973
15051
  const trustedUrls = parseCommaSeparatedStrings(opts.trustedUrls);
14974
15052
  const toolAccess = parseJsonOption(
14975
15053
  opts.toolAccess,
@@ -15007,6 +15085,11 @@ function registerAtlasAuthoringCommands(program) {
15007
15085
  ...opts.model !== void 0 ? { model: String(opts.model) } : {},
15008
15086
  ...runWhenMentioned !== void 0 ? { run_when_mentioned: runWhenMentioned } : {},
15009
15087
  ...webAccessEnabled !== void 0 ? { web_access_enabled: webAccessEnabled } : {},
15088
+ ...webFetchEnabled !== void 0 ? { web_fetch_enabled: webFetchEnabled } : {},
15089
+ ...searchPastConversationsEnabled !== void 0 ? { search_past_conversations_enabled: searchPastConversationsEnabled } : {},
15090
+ ...appRulesCreationEnabled !== void 0 ? { app_rules_creation_enabled: appRulesCreationEnabled } : {},
15091
+ ...toolDiscoveryEnabled !== void 0 ? { tool_discovery_enabled: toolDiscoveryEnabled } : {},
15092
+ ...selfUpdatesEnabled !== void 0 ? { self_updates_enabled: selfUpdatesEnabled } : {},
15010
15093
  ...trustedUrls !== void 0 ? { trusted_urls: trustedUrls } : {},
15011
15094
  ...toolAccess !== void 0 ? { tool_access: toolAccess } : {},
15012
15095
  ...pluginConnections !== void 0 ? { agent_tool_connections_attributes: pluginConnections } : {},
@@ -15018,7 +15101,7 @@ function registerAtlasAuthoringCommands(program) {
15018
15101
  transformMutationPayload: normalizePersistedCreatePayload
15019
15102
  });
15020
15103
  });
15021
- agents.command("show").description("Read one persisted Agent by id").requiredOption("--id <id>", "Agent id").action(async (opts, cmd) => {
15104
+ agents.command("show").description("Read one persisted Agent by id or slug").requiredOption("--id <idOrSlug>", "Agent id or slug").action(async (opts, cmd) => {
15022
15105
  const id = idSchema14.parse(opts.id);
15023
15106
  const context = await resolveCommandContext(cmd.optsWithGlobals());
15024
15107
  const organizationId = resolveOrganizationId(context.organizationId);
@@ -15033,6 +15116,104 @@ function registerAtlasAuthoringCommands(program) {
15033
15116
  isShow: true
15034
15117
  });
15035
15118
  });
15119
+ agents.command("update").description("Update one persisted Agent through the API-owned updateAgent contract").requiredOption("--id <idOrSlug>", "Agent id or slug").requiredOption(
15120
+ "--expected-update-version <version>",
15121
+ "Exact opaque updateVersion value from agents show; rejects stale writes"
15122
+ ).option("--name <name>").option("--description <description>").option("--notes <notes>").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("--clear-trusted-urls", "Clear all trusted URLs").option("--tool-access <json>", "JSON array of the complete canonical native Agent tool scopes").option(
15123
+ "--plugin-connections <json>",
15124
+ "JSON array of Agent connector grant patches; removals require id and _destroy:true"
15125
+ ).option(
15126
+ "--trigger <json>",
15127
+ "Canonical Agent trigger patch; use the trigger id from agents show to replace or remove it"
15128
+ ).action(async (opts, cmd) => {
15129
+ if (opts.clearTrustedUrls && opts.trustedUrls !== void 0) {
15130
+ throw new CliError({
15131
+ message: "Use either --trusted-urls or --clear-trusted-urls, not both.",
15132
+ kind: "invalid_args",
15133
+ status: 400,
15134
+ exitCode: EXIT_CODES.invalidArgs
15135
+ });
15136
+ }
15137
+ const runWhenMentioned = parseBooleanOption(opts.runWhenMentioned, "--run-when-mentioned");
15138
+ const webAccessEnabled = parseBooleanOption(opts.webAccessEnabled, "--web-access-enabled");
15139
+ const webFetchEnabled = parseBooleanOption(opts.webFetchEnabled, "--web-fetch-enabled");
15140
+ const searchPastConversationsEnabled = parseBooleanOption(
15141
+ opts.searchPastConversationsEnabled,
15142
+ "--search-past-conversations-enabled"
15143
+ );
15144
+ const appRulesCreationEnabled = parseBooleanOption(
15145
+ opts.appRulesCreationEnabled,
15146
+ "--app-rules-creation-enabled"
15147
+ );
15148
+ const toolDiscoveryEnabled = parseBooleanOption(
15149
+ opts.toolDiscoveryEnabled,
15150
+ "--tool-discovery-enabled"
15151
+ );
15152
+ const selfUpdatesEnabled = parseBooleanOption(opts.selfUpdatesEnabled, "--self-updates-enabled");
15153
+ const trustedUrls = parseCommaSeparatedStrings(opts.trustedUrls);
15154
+ const toolAccess = parseJsonOption(
15155
+ opts.toolAccess,
15156
+ "--tool-access",
15157
+ agentToolAccessUpdateSchema
15158
+ );
15159
+ const pluginConnections = parseJsonOption(
15160
+ opts.pluginConnections,
15161
+ "--plugin-connections",
15162
+ agentPluginConnectionUpdateSchema
15163
+ );
15164
+ const trigger = parseJsonOption(opts.trigger, "--trigger", agentTriggerUpdateSchema);
15165
+ const patch = {
15166
+ ...opts.name !== void 0 ? { name: String(opts.name) } : {},
15167
+ ...opts.description !== void 0 ? { description: String(opts.description) } : {},
15168
+ ...opts.notes !== void 0 ? { notes: String(opts.notes) } : {},
15169
+ ...opts.status !== void 0 ? { status: String(opts.status) } : {},
15170
+ ...opts.visibility !== void 0 ? { visibility: String(opts.visibility) } : {},
15171
+ ...opts.model !== void 0 ? { model: String(opts.model) } : {},
15172
+ ...runWhenMentioned !== void 0 ? { run_when_mentioned: runWhenMentioned } : {},
15173
+ ...webAccessEnabled !== void 0 ? { web_access_enabled: webAccessEnabled } : {},
15174
+ ...webFetchEnabled !== void 0 ? { web_fetch_enabled: webFetchEnabled } : {},
15175
+ ...searchPastConversationsEnabled !== void 0 ? { search_past_conversations_enabled: searchPastConversationsEnabled } : {},
15176
+ ...appRulesCreationEnabled !== void 0 ? { app_rules_creation_enabled: appRulesCreationEnabled } : {},
15177
+ ...toolDiscoveryEnabled !== void 0 ? { tool_discovery_enabled: toolDiscoveryEnabled } : {},
15178
+ ...selfUpdatesEnabled !== void 0 ? { self_updates_enabled: selfUpdatesEnabled } : {},
15179
+ ...trustedUrls !== void 0 ? { trusted_urls: trustedUrls } : {},
15180
+ ...opts.clearTrustedUrls ? { trusted_urls: [] } : {},
15181
+ ...toolAccess !== void 0 ? { tool_access: toolAccess } : {},
15182
+ ...pluginConnections !== void 0 ? { agent_tool_connections_attributes: pluginConnections } : {},
15183
+ ...trigger !== void 0 ? { trigger_attributes: trigger } : {}
15184
+ };
15185
+ if (Object.keys(patch).length === 0) {
15186
+ throw new CliError({
15187
+ message: "agents update requires at least one mutable Agent field.",
15188
+ kind: "invalid_args",
15189
+ status: 400,
15190
+ exitCode: EXIT_CODES.invalidArgs
15191
+ });
15192
+ }
15193
+ const id = idSchema14.parse(opts.id);
15194
+ const expectedUpdateVersion = parseExpectedUpdateVersion(opts.expectedUpdateVersion);
15195
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
15196
+ const organizationId = resolveOrganizationId(context.organizationId);
15197
+ await runGraphqlMutationCommand({
15198
+ command: "agents.update",
15199
+ operationName: "AgentsUpdate",
15200
+ runtimeOptions: context.runtimeOptions,
15201
+ field: "update_agent",
15202
+ variableTypes: {
15203
+ organization_id: "ID!",
15204
+ agent_id: "ID!",
15205
+ params: "UpdateAgentParamsInput!",
15206
+ expected_update_version: "String!"
15207
+ },
15208
+ variables: {
15209
+ organization_id: organizationId,
15210
+ agent_id: id,
15211
+ params: { agent: patch },
15212
+ expected_update_version: expectedUpdateVersion
15213
+ },
15214
+ transformMutationPayload: normalizePersistedUpdatePayload
15215
+ });
15216
+ });
15036
15217
  agents.command("plugin-catalog").description("Read connected Agent plugin capabilities for one supported service").requiredOption(
15037
15218
  "--service <service>",
15038
15219
  "Supported service: gmail, calendar, slack, or stripe"
@@ -15083,7 +15264,7 @@ function registerAtlasAuthoringCommands(program) {
15083
15264
  transformMutationPayload: normalizePersistedCreatePayload
15084
15265
  });
15085
15266
  });
15086
- automations.command("show").description("Read one persisted Automation by id").requiredOption("--id <id>", "Automation id").action(async (opts, cmd) => {
15267
+ automations.command("show").description("Read one persisted Automation by id or slug").requiredOption("--id <idOrSlug>", "Automation id or slug").action(async (opts, cmd) => {
15087
15268
  const id = idSchema14.parse(opts.id);
15088
15269
  const context = await resolveCommandContext(cmd.optsWithGlobals());
15089
15270
  const organizationId = resolveOrganizationId(context.organizationId);
@@ -15098,6 +15279,66 @@ function registerAtlasAuthoringCommands(program) {
15098
15279
  isShow: true
15099
15280
  });
15100
15281
  });
15282
+ automations.command("update").description("Update one task-backed Automation through the API-owned updateTask contract").requiredOption("--id <idOrSlug>", "Automation id or slug").requiredOption(
15283
+ "--expected-update-version <version>",
15284
+ "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(
15286
+ "--agent-id <agentId>",
15287
+ "Executor Agent id; requires --ai-task-config and is stored in that config"
15288
+ ).action(async (opts, cmd) => {
15289
+ if (opts.agentId !== void 0 && opts.aiTaskConfig === void 0) {
15290
+ throw new CliError({
15291
+ message: "automations update requires --ai-task-config whenever --agent-id is supplied.",
15292
+ kind: "invalid_args",
15293
+ status: 400,
15294
+ exitCode: EXIT_CODES.invalidArgs
15295
+ });
15296
+ }
15297
+ const aiTaskConfig = opts.aiTaskConfig === void 0 ? void 0 : {
15298
+ ...parseAutomationConfig(opts.aiTaskConfig),
15299
+ ...opts.agentId !== void 0 ? { agent_id: idSchema14.parse(opts.agentId) } : {}
15300
+ };
15301
+ const patch = {
15302
+ ...opts.summary !== void 0 ? { summary: String(opts.summary) } : {},
15303
+ ...opts.description !== void 0 ? { description: String(opts.description) } : {},
15304
+ ...opts.notes !== void 0 ? { notes: String(opts.notes) } : {},
15305
+ ...opts.status !== void 0 ? { status: String(opts.status) } : {},
15306
+ ...opts.priority !== void 0 ? { priority: String(opts.priority) } : {},
15307
+ ...opts.dueDate !== void 0 ? { due_date: isoDateSchema.parse(opts.dueDate) } : {},
15308
+ ...aiTaskConfig !== void 0 ? { ai_task_config: aiTaskConfig } : {}
15309
+ };
15310
+ if (Object.keys(patch).length === 0) {
15311
+ throw new CliError({
15312
+ message: "automations update requires at least one mutable Automation field.",
15313
+ kind: "invalid_args",
15314
+ status: 400,
15315
+ exitCode: EXIT_CODES.invalidArgs
15316
+ });
15317
+ }
15318
+ const id = idSchema14.parse(opts.id);
15319
+ const expectedUpdateVersion = parseExpectedUpdateVersion(opts.expectedUpdateVersion);
15320
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
15321
+ const organizationId = resolveOrganizationId(context.organizationId);
15322
+ await runGraphqlMutationCommand({
15323
+ command: "automations.update",
15324
+ operationName: "AutomationsUpdate",
15325
+ runtimeOptions: context.runtimeOptions,
15326
+ field: "update_task",
15327
+ variableTypes: {
15328
+ organization_id: "ID!",
15329
+ task_id: "ID!",
15330
+ params: "UpdateTaskParamsInput!",
15331
+ expected_update_version: "String!"
15332
+ },
15333
+ variables: {
15334
+ organization_id: organizationId,
15335
+ task_id: id,
15336
+ params: { task: patch },
15337
+ expected_update_version: expectedUpdateVersion
15338
+ },
15339
+ transformMutationPayload: normalizePersistedUpdatePayload
15340
+ });
15341
+ });
15101
15342
  const skills = program.commands.find((command) => command.name() === "skills");
15102
15343
  if (!skills) {
15103
15344
  throw new Error("Skills command must be registered before Atlas authoring commands.");
@@ -15129,6 +15370,47 @@ function registerAtlasAuthoringCommands(program) {
15129
15370
  transformMutationPayload: normalizePersistedCreatePayload
15130
15371
  });
15131
15372
  });
15373
+ skills.command("update").description("Update one persisted Skill through the API-owned updateSkill contract").requiredOption("--id <idOrSlug>", "Skill id or slug").requiredOption(
15374
+ "--expected-update-version <version>",
15375
+ "Exact opaque updateVersion value from skills show; rejects stale writes"
15376
+ ).option("--name <name>").option("--emoji <emoji>").option("--description <description>").action(async (opts, cmd) => {
15377
+ const patch = {
15378
+ ...opts.name !== void 0 ? { name: String(opts.name) } : {},
15379
+ ...opts.emoji !== void 0 ? { emoji: String(opts.emoji) } : {},
15380
+ ...opts.description !== void 0 ? { description: String(opts.description) } : {}
15381
+ };
15382
+ if (Object.keys(patch).length === 0) {
15383
+ throw new CliError({
15384
+ message: "skills update requires at least one mutable Skill field.",
15385
+ kind: "invalid_args",
15386
+ status: 400,
15387
+ exitCode: EXIT_CODES.invalidArgs
15388
+ });
15389
+ }
15390
+ const id = idSchema14.parse(opts.id);
15391
+ const expectedUpdateVersion = parseExpectedUpdateVersion(opts.expectedUpdateVersion);
15392
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
15393
+ const organizationId = resolveOrganizationId(context.organizationId);
15394
+ await runGraphqlMutationCommand({
15395
+ command: "skills.update",
15396
+ operationName: "SkillsUpdate",
15397
+ runtimeOptions: context.runtimeOptions,
15398
+ field: "update_skill",
15399
+ variableTypes: {
15400
+ organization_id: "ID!",
15401
+ id: "ID!",
15402
+ input: "UpdateSkillInput!",
15403
+ expected_update_version: "String!"
15404
+ },
15405
+ variables: {
15406
+ organization_id: organizationId,
15407
+ id,
15408
+ input: patch,
15409
+ expected_update_version: expectedUpdateVersion
15410
+ },
15411
+ transformMutationPayload: normalizePersistedUpdatePayload
15412
+ });
15413
+ });
15132
15414
  }
15133
15415
 
15134
15416
  // src/commands/discovery.ts
@@ -15139,7 +15421,7 @@ import { join as join3 } from "path";
15139
15421
  import { createHash } from "crypto";
15140
15422
 
15141
15423
  // src/version.ts
15142
- var CLI_VERSION = "0.1.70";
15424
+ var CLI_VERSION = "0.1.72";
15143
15425
 
15144
15426
  // src/operationMetadata.ts
15145
15427
  var DISCOVERY_OPERATION_IDS = [
@@ -15452,7 +15734,9 @@ var WRITE_OPERATION_IDS = [
15452
15734
  "accountability.create",
15453
15735
  "accountability.update",
15454
15736
  "agents.create",
15737
+ "agents.update",
15455
15738
  "automations.create",
15739
+ "automations.update",
15456
15740
  "contacts.create",
15457
15741
  "contacts.update",
15458
15742
  "content.create-contact",
@@ -15558,6 +15842,7 @@ var WRITE_OPERATION_IDS = [
15558
15842
  "scorecards.create",
15559
15843
  "scorecards.update",
15560
15844
  "skills.create",
15845
+ "skills.update",
15561
15846
  "smart-kpi-views.create",
15562
15847
  "stand-ups.create",
15563
15848
  "stand-ups.update",
@@ -15909,12 +16194,13 @@ var NAMESPACE_DOCS = {
15909
16194
  skills: {
15910
16195
  name: "skills",
15911
16196
  tier: "primary",
15912
- description: "Skill record readback and bounded create operations.",
16197
+ description: "Skill record readback and bounded create/update operations.",
15913
16198
  examples: [
15914
16199
  "wave skills list --json",
15915
16200
  "wave skills list --scope ADMIN_GLOBAL --json",
15916
16201
  "wave skills show --id 123 --json",
15917
- 'wave skills create --name "Weekly planning" --scope MEMBER_PERSONAL --idempotency-key skill-create-001'
16202
+ 'wave skills create --name "Weekly planning" --scope MEMBER_PERSONAL --idempotency-key skill-create-001',
16203
+ 'wave skills update --id SKL-01 --expected-update-version 2026-07-17T12:00:00.123456Z --description "Review my projects."'
15918
16204
  ],
15919
16205
  schema: {
15920
16206
  output: "json-envelope-default",
@@ -15922,20 +16208,22 @@ var NAMESPACE_DOCS = {
15922
16208
  safety: [
15923
16209
  "Uses API-owned Skill GraphQL read fields only.",
15924
16210
  "Create calls only createSkill with an explicit idempotency key.",
16211
+ "Update calls only updateSkill with an exact opaque updateVersion token and does not change scope or ownership.",
15925
16212
  "Skill create supports the API-defined ADMIN_GLOBAL and MEMBER_PERSONAL scopes.",
15926
16213
  "Does not update, destroy, archive, approve, or apply Skill records."
15927
16214
  ],
15928
- commands: ["list", "show", "create"]
16215
+ commands: ["list", "show", "create", "update"]
15929
16216
  }
15930
16217
  },
15931
16218
  agents: {
15932
16219
  name: "agents",
15933
16220
  tier: "primary",
15934
- description: "Bounded Agent create and persisted readback operations.",
16221
+ description: "Bounded Agent create, readback, and stale-write-protected update operations.",
15935
16222
  examples: [
15936
16223
  'wave agents create --name "Planning helper" --idempotency-key agent-create-001',
15937
16224
  `wave agents create --name "Project summary" --notes "Summarize my projects." --tool-access '[{"tool_key":"projects","scope_value":"all"}]' --trigger '{"trigger_type":"cron","cron_expression":"0 14 * * 2","timezone":"America/Phoenix","enabled":true}' --idempotency-key agent-create-002`,
15938
- "wave agents show --id 123"
16225
+ "wave agents show --id AGT-01",
16226
+ 'wave agents update --id AGT-01 --expected-update-version 2026-07-17T12:00:00.123456Z --notes "Summarize my projects."'
15939
16227
  ],
15940
16228
  schema: {
15941
16229
  output: "json-envelope-default",
@@ -15943,20 +16231,22 @@ var NAMESPACE_DOCS = {
15943
16231
  safety: [
15944
16232
  "Create calls only createAgent with an explicit idempotency key.",
15945
16233
  "Create preserves API-owned defaults by sending only supplied typed Agent fields.",
16234
+ "Update calls only updateAgent with an exact opaque updateVersion token and cannot change ownership.",
15946
16235
  "Native tools, plugin connector grants, and the cron trigger use strict canonical JSON shapes.",
15947
16236
  "Outlook Calendar and Outlook Mail are not supported Agent plugin families in this release.",
15948
16237
  "Show uses the API-owned agent query by id; no slug fallback is implemented."
15949
16238
  ],
15950
- commands: ["create", "show"]
16239
+ commands: ["create", "show", "update"]
15951
16240
  }
15952
16241
  },
15953
16242
  automations: {
15954
16243
  name: "automations",
15955
16244
  tier: "primary",
15956
- description: "Bounded Automation create and persisted readback operations.",
16245
+ description: "Bounded task-backed Automation create, readback, and stale-write-protected update operations.",
15957
16246
  examples: [
15958
16247
  `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`,
15959
- "wave automations show --id 123"
16248
+ "wave automations show --id ATK-01",
16249
+ 'wave automations update --id ATK-01 --expected-update-version 2026-07-17T12:00:00.123456Z --summary "Weekly project review"'
15960
16250
  ],
15961
16251
  schema: {
15962
16252
  output: "json-envelope-default",
@@ -15965,10 +16255,11 @@ var NAMESPACE_DOCS = {
15965
16255
  "Create calls only createAutomation with an explicit idempotency key.",
15966
16256
  "Only the API-defined ai_task_config field accepts validated JSON.",
15967
16257
  "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.",
15968
16259
  "Does not create a project Task, run an Automation, or invoke AI OS actions.",
15969
16260
  "Show uses the API-owned automation query by id; no slug fallback is implemented."
15970
16261
  ],
15971
- commands: ["create", "show"]
16262
+ commands: ["create", "show", "update"]
15972
16263
  }
15973
16264
  },
15974
16265
  broadcast: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wave-ai-os/wave-cli",
3
- "version": "0.1.70",
3
+ "version": "0.1.72",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "wave": "dist/index.js"