@genfeedai/cli 0.7.2 → 0.7.3

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 (2) hide show
  1. package/dist/index.js +526 -111
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -56494,6 +56494,9 @@ async function adminRequest(method, path, body, baseUrl) {
56494
56494
  }
56495
56495
  throw new ApiError(message, response.status);
56496
56496
  }
56497
+ if (response.status === 204) {
56498
+ return;
56499
+ }
56497
56500
  return await response.json();
56498
56501
  }
56499
56502
  function adminGet(path, baseUrl) {
@@ -56502,6 +56505,9 @@ function adminGet(path, baseUrl) {
56502
56505
  function adminPost(path, body, baseUrl) {
56503
56506
  return adminRequest("POST", path, body ?? {}, baseUrl);
56504
56507
  }
56508
+ function adminDelete(path) {
56509
+ return adminRequest("DELETE", path);
56510
+ }
56505
56511
  function adminPatch(path, body) {
56506
56512
  return adminRequest("PATCH", path, body);
56507
56513
  }
@@ -56519,58 +56525,6 @@ async function revokeAdminSession(apiUrl, cookie) {
56519
56525
  }
56520
56526
  }
56521
56527
 
56522
- // src/operations/admin-brand-os.ts
56523
- async function approveOrganizationBrandOs(organizationId, brandId, kit) {
56524
- const response = await adminPost(`/admin/organizations/${encodeURIComponent(organizationId)}/brands/${encodeURIComponent(brandId)}/brand-os/approve`, kit);
56525
- return response.data;
56526
- }
56527
-
56528
- // src/commands/admin/brand-os.ts
56529
- function collect(value, previous = []) {
56530
- return [...previous, value];
56531
- }
56532
- function toKit(options) {
56533
- const kit = {
56534
- description: options.description,
56535
- promptGuidelines: options.guidelines,
56536
- voiceAudience: options.audience,
56537
- voiceDoNotSoundLike: options.doNotSoundLike,
56538
- voiceMessagingPillars: options.messagingPillars,
56539
- voiceSampleOutput: options.sample,
56540
- voiceStyle: options.style,
56541
- voiceTone: options.tone,
56542
- voiceValues: options.values
56543
- };
56544
- return Object.fromEntries(Object.entries(kit).filter(([, value]) => value !== undefined));
56545
- }
56546
- function createBrandOsApproveCommand() {
56547
- return new Command("os-approve").description("Set the voice and guidelines of a brand in any organization and approve its Brand OS (preview unless --yes)").requiredOption("--org <organizationId>", "Organization id").requiredOption("--brand <brandId>", "Brand id").option("--description <text>", "Brand description").option("--tone <text>", "Voice tone").option("--style <text>", "Voice style").option("--sample <text>", "Sample output in the brand voice").option("--guidelines <text>", "Prompt guidelines").option("--audience <text>", "Audience (repeat for several)", collect).option("--values <text>", "Voice value (repeat for several)", collect).option("--messaging-pillars <text>", "Messaging pillar (repeat for several)", collect).option("--do-not-sound-like <text>", "What the voice must not sound like (repeat)", collect).option("--yes", "Apply the fields and approve the revision").action(async (options) => {
56548
- try {
56549
- const kit = toKit(options);
56550
- if (Object.keys(kit).length === 0) {
56551
- throw new GenfeedError("Pass at least one kit field.", 'Example: --tone "Bold and punchy" --style "Very short lines"');
56552
- }
56553
- if (!options.yes) {
56554
- print(formatHeader(`Brand OS approval (preview)
56555
- `));
56556
- print(formatLabel("Organization", options.org));
56557
- print(formatLabel("Brand", options.brand));
56558
- for (const [field, value] of Object.entries(kit)) {
56559
- print(formatLabel(field, Array.isArray(value) ? value.join(" | ") : String(value)));
56560
- }
56561
- print(formatWarning("Re-run with --yes to apply these fields and approve the Brand OS."));
56562
- return;
56563
- }
56564
- const result = await approveOrganizationBrandOs(options.org, options.brand, kit);
56565
- print(formatSuccess(`Approved Brand OS revision ${result.revisionId} (v${result.version})`));
56566
- print(formatLabel("Status", result.status));
56567
- print(formatLabel("Applied", result.appliedFields.join(", ") || "none"));
56568
- } catch (error) {
56569
- handleError(error);
56570
- }
56571
- });
56572
- }
56573
-
56574
56528
  // ../contracts/src/enums/credit.enum.ts
56575
56529
  var CreditTransactionCategory;
56576
56530
  ((CreditTransactionCategory) => {
@@ -59161,6 +59115,17 @@ async function mintPartnerApiKey(organizationId, input) {
59161
59115
  const response = await adminPost(`/admin/organizations/${encodeURIComponent(organizationId)}/api-keys`, input);
59162
59116
  return response.data;
59163
59117
  }
59118
+ async function mintOperatorKey(input) {
59119
+ const response = await adminPost("/admin/operator-keys", input);
59120
+ return response.data;
59121
+ }
59122
+ async function listOperatorKeys() {
59123
+ const response = await adminGet("/admin/operator-keys");
59124
+ return response.data;
59125
+ }
59126
+ async function revokeOperatorKey(id) {
59127
+ await adminDelete(`/admin/operator-keys/${encodeURIComponent(id)}`);
59128
+ }
59164
59129
  async function addOrganizationMember(organizationId, input) {
59165
59130
  const response = await adminPost(`/admin/organizations/${encodeURIComponent(organizationId)}/members`, input);
59166
59131
  return response.data;
@@ -59375,6 +59340,161 @@ function parseIntegerInRange(value, minimum, maximum) {
59375
59340
  return parsed;
59376
59341
  }
59377
59342
 
59343
+ // src/commands/admin/api-keys.ts
59344
+ function createPartnerKeyCommand() {
59345
+ return new Command("partner-key").description("Mint partner API keys (scopes a user cannot grant to their own key)").addCommand(new Command("create").description("Mint a partner key for an organization (preview unless --yes). Default: images=write, brands=write").requiredOption("--org <organizationId>", "Organization id").requiredOption("--label <label>", "Key name shown in the organization settings").option("--level <resource=level...>", "Override the levels, e.g. images=write brands=read (none, read or write)").option("--brand <brandId>", "Default brand for generation calls").option("--allowed-brand <brandId...>", "Limit the key to these brands (default: every brand in the organization)").option("--description <text>", "What the key is for").option("--expires-in-days <days>", "Expire the key after N days", Number).option("--yes", "Mint the key").option("--json", "Output as JSON").action(async (options, command) => {
59346
+ try {
59347
+ const levels = options.level ? parsePartnerKeyLevels(options.level) : undefined;
59348
+ if (!options.yes) {
59349
+ print(formatHeader(`Partner key (preview)
59350
+ `));
59351
+ print(formatLabel("Organization", options.org));
59352
+ print(formatLabel("Label", options.label));
59353
+ print(formatLabel("Levels", levels ? Object.entries(levels).map(([resource, level]) => `${resource}=${level}`).join(", ") : "images=write, brands=write (partner default)"));
59354
+ if (options.brand)
59355
+ print(formatLabel("Default brand", options.brand));
59356
+ print(formatLabel("Brands", options.allowedBrand ? options.allowedBrand.join(", ") : "every brand"));
59357
+ print(formatWarning("Re-run with --yes to mint the key. It is shown once."));
59358
+ return;
59359
+ }
59360
+ const minted = await mintPartnerApiKey(options.org, {
59361
+ allowedBrandIds: options.allowedBrand,
59362
+ defaultBrandId: options.brand,
59363
+ description: options.description,
59364
+ expiresInDays: options.expiresInDays,
59365
+ label: options.label,
59366
+ levels
59367
+ });
59368
+ if (wantsJson(command)) {
59369
+ printJson(minted);
59370
+ return;
59371
+ }
59372
+ print(formatSuccess(`Minted partner key ${minted.apiKeyId}`));
59373
+ print(formatLabel("Scopes", minted.scopes.join(", ")));
59374
+ print(formatLabel("Owner", minted.userId));
59375
+ if (minted.allowedBrandIds) {
59376
+ print(formatLabel("Brands", minted.allowedBrandIds.join(", ")));
59377
+ }
59378
+ if (minted.expiresAt)
59379
+ print(formatLabel("Expires", minted.expiresAt));
59380
+ print(formatLabel("Key", minted.key));
59381
+ print(formatWarning("Store this key now. It will not be shown again."));
59382
+ } catch (error) {
59383
+ handleError(error);
59384
+ }
59385
+ }));
59386
+ }
59387
+ function createOperatorKeyCommand() {
59388
+ return new Command("operator-key").description("Read-only keys for headless agents on the admin MCP (/mcp/admin). Revocable, shown once").addCommand(new Command("create").description("Mint a key bound to the organization you are signed in to (preview unless --yes)").requiredOption("--label <label>", "Key name, e.g. the agent that will use it").option("--expires-in-days <days>", "Expire the key after N days (default 90, at most 365)", Number).option("--allowed-ip <ip...>", "Accept the key only from these IP addresses (default: any)").option("--yes", "Mint the key").option("--json", "Output as JSON").action(async (options, command) => {
59389
+ try {
59390
+ if (!options.yes) {
59391
+ print(formatHeader(`Operator key (preview)
59392
+ `));
59393
+ print(formatLabel("Label", options.label));
59394
+ print(formatLabel("Access", "read only, reviewed operator routes"));
59395
+ print(formatLabel("Expires", `${options.expiresInDays ?? 90} days`));
59396
+ print(formatLabel("IPs", options.allowedIp ? options.allowedIp.join(", ") : "any"));
59397
+ print(formatWarning("Re-run with --yes to mint the key. It is shown once."));
59398
+ return;
59399
+ }
59400
+ const minted = await mintOperatorKey({
59401
+ allowedIps: options.allowedIp,
59402
+ expiresInDays: options.expiresInDays,
59403
+ label: options.label
59404
+ });
59405
+ if (wantsJson(command)) {
59406
+ printJson(minted);
59407
+ return;
59408
+ }
59409
+ print(formatSuccess(`Minted operator key ${minted.id}`));
59410
+ print(formatLabel("Organization", minted.organizationId));
59411
+ if (minted.expiresAt)
59412
+ print(formatLabel("Expires", minted.expiresAt));
59413
+ print(formatLabel("Key", minted.key));
59414
+ print(formatWarning("Store this key now. It will not be shown again."));
59415
+ } catch (error) {
59416
+ handleError(error);
59417
+ }
59418
+ })).addCommand(new Command("list").description("List the operator keys you minted in this organization").option("--json", "Output as JSON").action(async (_options, command) => {
59419
+ try {
59420
+ const keys = await listOperatorKeys();
59421
+ if (wantsJson(command)) {
59422
+ printJson(keys);
59423
+ return;
59424
+ }
59425
+ if (keys.length === 0) {
59426
+ print("No operator keys");
59427
+ return;
59428
+ }
59429
+ for (const key of keys) {
59430
+ const state = key.isRevoked ? "revoked" : "active";
59431
+ print(`${key.id} ${key.label} …${key.lastFour} ${state} last used ${key.lastUsedAt ?? "never"}`);
59432
+ }
59433
+ } catch (error) {
59434
+ handleError(error);
59435
+ }
59436
+ })).addCommand(new Command("revoke").description("Revoke a key. The next call with it is refused").argument("<keyId>", "Operator key id").action(async (keyId) => {
59437
+ try {
59438
+ await revokeOperatorKey(keyId);
59439
+ print(formatSuccess(`Revoked operator key ${keyId}`));
59440
+ } catch (error) {
59441
+ handleError(error);
59442
+ }
59443
+ }));
59444
+ }
59445
+
59446
+ // src/operations/admin-brand-os.ts
59447
+ async function approveOrganizationBrandOs(organizationId, brandId, kit) {
59448
+ const response = await adminPost(`/admin/organizations/${encodeURIComponent(organizationId)}/brands/${encodeURIComponent(brandId)}/brand-os/approve`, kit);
59449
+ return response.data;
59450
+ }
59451
+
59452
+ // src/commands/admin/brand-os.ts
59453
+ function collect(value, previous = []) {
59454
+ return [...previous, value];
59455
+ }
59456
+ function toKit(options) {
59457
+ const kit = {
59458
+ description: options.description,
59459
+ promptGuidelines: options.guidelines,
59460
+ voiceAudience: options.audience,
59461
+ voiceDoNotSoundLike: options.doNotSoundLike,
59462
+ voiceMessagingPillars: options.messagingPillars,
59463
+ voiceSampleOutput: options.sample,
59464
+ voiceStyle: options.style,
59465
+ voiceTone: options.tone,
59466
+ voiceValues: options.values
59467
+ };
59468
+ return Object.fromEntries(Object.entries(kit).filter(([, value]) => value !== undefined));
59469
+ }
59470
+ function createBrandOsApproveCommand() {
59471
+ return new Command("os-approve").description("Set the voice and guidelines of a brand in any organization and approve its Brand OS (preview unless --yes)").requiredOption("--org <organizationId>", "Organization id").requiredOption("--brand <brandId>", "Brand id").option("--description <text>", "Brand description").option("--tone <text>", "Voice tone").option("--style <text>", "Voice style").option("--sample <text>", "Sample output in the brand voice").option("--guidelines <text>", "Prompt guidelines").option("--audience <text>", "Audience (repeat for several)", collect).option("--values <text>", "Voice value (repeat for several)", collect).option("--messaging-pillars <text>", "Messaging pillar (repeat for several)", collect).option("--do-not-sound-like <text>", "What the voice must not sound like (repeat)", collect).option("--yes", "Apply the fields and approve the revision").action(async (options) => {
59472
+ try {
59473
+ const kit = toKit(options);
59474
+ if (Object.keys(kit).length === 0) {
59475
+ throw new GenfeedError("Pass at least one kit field.", 'Example: --tone "Bold and punchy" --style "Very short lines"');
59476
+ }
59477
+ if (!options.yes) {
59478
+ print(formatHeader(`Brand OS approval (preview)
59479
+ `));
59480
+ print(formatLabel("Organization", options.org));
59481
+ print(formatLabel("Brand", options.brand));
59482
+ for (const [field, value] of Object.entries(kit)) {
59483
+ print(formatLabel(field, Array.isArray(value) ? value.join(" | ") : String(value)));
59484
+ }
59485
+ print(formatWarning("Re-run with --yes to apply these fields and approve the Brand OS."));
59486
+ return;
59487
+ }
59488
+ const result = await approveOrganizationBrandOs(options.org, options.brand, kit);
59489
+ print(formatSuccess(`Approved Brand OS revision ${result.revisionId} (v${result.version})`));
59490
+ print(formatLabel("Status", result.status));
59491
+ print(formatLabel("Applied", result.appliedFields.join(", ") || "none"));
59492
+ } catch (error) {
59493
+ handleError(error);
59494
+ }
59495
+ });
59496
+ }
59497
+
59378
59498
  // src/commands/admin/brand-scan.ts
59379
59499
  function createBrandScanCommand() {
59380
59500
  return new Command("scan").description("Scan a website or social profile into the brand kit (preview unless --yes)").requiredOption("--org <organizationId>", "Organization id").requiredOption("--brand <brandId>", "Brand id").requiredOption("--url <url>", "Website or social profile URL to scan").option("--yes", "Run the scan").option("--json", "Output as JSON").action(async (options, command) => {
@@ -61809,49 +61929,6 @@ function createMemberCommand() {
61809
61929
  }
61810
61930
  }));
61811
61931
  }
61812
- function createPartnerKeyCommand() {
61813
- return new Command("partner-key").description("Mint partner API keys (scopes a user cannot grant to their own key)").addCommand(new Command("create").description("Mint a partner key for an organization (preview unless --yes). Default: images=write, brands=write").requiredOption("--org <organizationId>", "Organization id").requiredOption("--label <label>", "Key name shown in the organization settings").option("--level <resource=level...>", "Override the levels, e.g. images=write brands=read (none, read or write)").option("--brand <brandId>", "Default brand for generation calls").option("--allowed-brand <brandId...>", "Limit the key to these brands (default: every brand in the organization)").option("--description <text>", "What the key is for").option("--expires-in-days <days>", "Expire the key after N days", Number).option("--yes", "Mint the key").option("--json", "Output as JSON").action(async (options, command) => {
61814
- try {
61815
- const levels = options.level ? parsePartnerKeyLevels(options.level) : undefined;
61816
- if (!options.yes) {
61817
- print(formatHeader(`Partner key (preview)
61818
- `));
61819
- print(formatLabel("Organization", options.org));
61820
- print(formatLabel("Label", options.label));
61821
- print(formatLabel("Levels", levels ? Object.entries(levels).map(([resource, level]) => `${resource}=${level}`).join(", ") : "images=write, brands=write (partner default)"));
61822
- if (options.brand)
61823
- print(formatLabel("Default brand", options.brand));
61824
- print(formatLabel("Brands", options.allowedBrand ? options.allowedBrand.join(", ") : "every brand"));
61825
- print(formatWarning("Re-run with --yes to mint the key. It is shown once."));
61826
- return;
61827
- }
61828
- const minted = await mintPartnerApiKey(options.org, {
61829
- allowedBrandIds: options.allowedBrand,
61830
- defaultBrandId: options.brand,
61831
- description: options.description,
61832
- expiresInDays: options.expiresInDays,
61833
- label: options.label,
61834
- levels
61835
- });
61836
- if (wantsJson(command)) {
61837
- printJson(minted);
61838
- return;
61839
- }
61840
- print(formatSuccess(`Minted partner key ${minted.apiKeyId}`));
61841
- print(formatLabel("Scopes", minted.scopes.join(", ")));
61842
- print(formatLabel("Owner", minted.userId));
61843
- if (minted.allowedBrandIds) {
61844
- print(formatLabel("Brands", minted.allowedBrandIds.join(", ")));
61845
- }
61846
- if (minted.expiresAt)
61847
- print(formatLabel("Expires", minted.expiresAt));
61848
- print(formatLabel("Key", minted.key));
61849
- print(formatWarning("Store this key now. It will not be shown again."));
61850
- } catch (error) {
61851
- handleError(error);
61852
- }
61853
- }));
61854
- }
61855
61932
  var adminCommand = new Command("admin").description("Super admin one-offs over the API: organization apps, harness packs, pricing, seeds and the system brand").addCommand(new Command("login").description("Sign in as a super admin in your browser (no API key is created)").action(wrap(runAdminLogin))).addCommand(new Command("logout").description("Revoke and remove the stored admin session").action(wrap(runAdminLogout))).addCommand(new Command("status").description("Show whether an admin session is stored and valid").option("--json", "Output as JSON").action(async (_options, command) => {
61856
61933
  try {
61857
61934
  await runAdminStatus(wantsJson(command));
@@ -61908,7 +61985,7 @@ var adminCommand = new Command("admin").description("Super admin one-offs over t
61908
61985
  } catch (error) {
61909
61986
  handleError(error);
61910
61987
  }
61911
- })).addCommand(createPricingCommand()).addCommand(createSeedCommand()).addCommand(createBrandCommand()).addCommand(createCreditsCommand()).addCommand(createMemberCommand()).addCommand(createPartnerKeyCommand()).addCommand(createWarmupCommand()).addCommand(createMarketplaceCommand());
61988
+ })).addCommand(createPricingCommand()).addCommand(createSeedCommand()).addCommand(createBrandCommand()).addCommand(createCreditsCommand()).addCommand(createMemberCommand()).addCommand(createPartnerKeyCommand()).addCommand(createOperatorKeyCommand()).addCommand(createWarmupCommand()).addCommand(createMarketplaceCommand());
61912
61989
 
61913
61990
  // src/commands/auth-status.ts
61914
61991
  async function readAuthStatus() {
@@ -71828,7 +71905,7 @@ var package_default = {
71828
71905
  "type-check": "bun run ../../scripts/architecture/check-typecheck-prerequisites.ts && bun check --no-script"
71829
71906
  },
71830
71907
  type: "module",
71831
- version: "0.7.2"
71908
+ version: "0.7.3"
71832
71909
  };
71833
71910
 
71834
71911
  // src/commands/host/catalog.ts
@@ -76957,7 +77034,7 @@ var MCP_CATALOG_TOOLS = [
76957
77034
  {
76958
77035
  action: "visual_code_quote",
76959
77036
  executes: "quote_visual_code_generation",
76960
- summary: "Quote a visual-code request without spending credits; show the model, inspection uncertainty, formats and maximum credits before requesting approval."
77037
+ summary: 'Quote a visual-code request without spending credits; show the model, inspection uncertainty, formats and maximum credits before requesting approval. A create quote takes input={operation:"create", input:{brandId, ...}}: brandId goes inside the inner input.'
76961
77038
  }
76962
77039
  ]
76963
77040
  },
@@ -77138,7 +77215,7 @@ var MCP_CATALOG_TOOLS = [
77138
77215
  },
77139
77216
  {
77140
77217
  name: "control_release",
77141
- description: "Control a release. control requests cancel, reopen (undo a cancel on the same release), pause, resume or publish-now of a scheduled release; publish publishes an owned, reviewed article publicly; remove_post deletes a post from Genfeed, a published one included, and with deleteMedia the Library media only it uses (the social network copy is not touched); remove_asset deletes one Library asset by assetId from every post that uses it. Review first with get_content, and check_channel(action=validate) before publish-now. publish-now, resume, publish, remove_post and remove_asset change nothing on the first call: show the person what returns, and after they agree in this conversation repeat it with confirmed true in the input. cancel and pause need no confirmation. After a delete read back with get_content(action=posts) and get_assets.",
77218
+ description: "Control a release. control requests cancel, reopen (undo a cancel on the same release), pause, resume or publish-now of a scheduled release; publish publishes an owned, reviewed article publicly; remove_post deletes a post from Genfeed, a published one included, with deleteMedia the Library media only it uses, and with deleteOnPlatform the copy on its network first (X and Mastodon only, refused elsewhere; without it the network copy stays live); remove_asset deletes one Library asset by assetId from every post that uses it. Review first with get_content, and check_channel(action=validate) before publish-now. publish-now, resume, publish, remove_post and remove_asset change nothing on the first call: show the person what returns, and after they agree in this conversation repeat it with confirmed true in the input. cancel and pause need no confirmation. After a delete read back with get_content(action=posts) and get_assets.",
77142
77219
  claudeActions: ["control", "publish"],
77143
77220
  operations: [
77144
77221
  { action: "control", executes: "control_scheduled_release" },
@@ -77223,7 +77300,7 @@ var MCP_CATALOG_TOOLS = [
77223
77300
  },
77224
77301
  {
77225
77302
  name: "setup_brand",
77226
- description: "Set a brand up. onboard creates a brand from a URL or details; interview_start, interview_answer and interview_skip run the brand interview; connect_account and connect_oauth link a social account; brand_kit manages the kit: the brand name, visual identity, writing voice and strategy sections, and approving the draft (input.action picks what); voice_draft and voice_save draft and save the brand voice; generation_settings sets the brand defaults for generation.",
77303
+ description: "Set a brand up. onboard creates a brand from a URL or details; interview_start, interview_answer and interview_skip run the brand interview; connect_account and connect_oauth link a social account; brand_kit manages the kit: the brand name, visual identity, writing voice and strategy sections, and approving the draft (input.action picks what); brand_settings changes the handle, description, active state and default models or deletes it (owner or admin, brand-settings:write); channel_settings disconnects a connected channel or reads and replaces its posting times (input.action picks what); voice_draft and voice_save draft and save the brand voice; generation_settings sets the brand defaults for generation.",
77227
77304
  claudeActions: [
77228
77305
  "onboard",
77229
77306
  "interview_start",
@@ -77238,6 +77315,8 @@ var MCP_CATALOG_TOOLS = [
77238
77315
  { action: "connect_account", executes: "connect_social_account" },
77239
77316
  { action: "connect_oauth", executes: "initiate_oauth_connect" },
77240
77317
  { action: "brand_kit", executes: "manage_brand_kit" },
77318
+ { action: "brand_settings", executes: "manage_brand_settings" },
77319
+ { action: "channel_settings", executes: "manage_channel_settings" },
77241
77320
  { action: "voice_draft", executes: "draft_brand_voice_profile" },
77242
77321
  { action: "voice_save", executes: "save_brand_voice_profile" },
77243
77322
  { action: "generation_settings", executes: "set_generation_settings" }
@@ -77308,9 +77387,10 @@ var MCP_CATALOG_TOOLS = [
77308
77387
  },
77309
77388
  {
77310
77389
  name: "manage_workspace",
77311
- description: "Work in the workspace. new_task records a task and task updates, comments on or completes one; neither starts work. new_chat and chat_message talk to the agent.",
77390
+ description: "Work in the workspace. new_task records a task and task updates, comments on or completes one; neither starts work. new_chat and chat_message talk to the agent. organization reads or changes the organization settings an owner or admin edits in Settings (input.action read or update); it needs the organization-settings:write scope and an owner or admin role.",
77312
77391
  operations: [
77313
77392
  { action: "new_task", executes: "create_task" },
77393
+ { action: "organization", executes: "manage_organization_settings" },
77314
77394
  { action: "task", executes: "manage_task" },
77315
77395
  { action: "new_chat", executes: "create_chat" },
77316
77396
  { action: "chat_message", executes: "send_chat_message" }
@@ -77582,6 +77662,7 @@ var CURATED_ACTION_CATALOG = [
77582
77662
  {
77583
77663
  actionClass: "brand-context",
77584
77664
  category: "other",
77665
+ isOpenWorld: true,
77585
77666
  mutationPolicy: "direct",
77586
77667
  name: "capture_knowledge",
77587
77668
  surfaces: ["agent", "mcp", "workflow"],
@@ -77631,6 +77712,7 @@ var CURATED_ACTION_CATALOG = [
77631
77712
  {
77632
77713
  annotationHint: "non-destructive-write",
77633
77714
  category: "content",
77715
+ isOpenWorld: true,
77634
77716
  mcpCardKind: "media",
77635
77717
  mutationPolicy: "direct",
77636
77718
  name: "complete_media_upload",
@@ -78266,7 +78348,7 @@ var CURATED_ACTION_CATALOG = [
78266
78348
  {
78267
78349
  category: "other",
78268
78350
  name: "get_clipper_projects",
78269
- surfaces: ["mcp"],
78351
+ surfaces: ["agent", "mcp"],
78270
78352
  toolset: "clipper"
78271
78353
  },
78272
78354
  {
@@ -78315,13 +78397,13 @@ var CURATED_ACTION_CATALOG = [
78315
78397
  {
78316
78398
  category: "other",
78317
78399
  name: "get_editor_project",
78318
- surfaces: ["mcp"],
78400
+ surfaces: ["agent", "mcp"],
78319
78401
  toolset: "editor"
78320
78402
  },
78321
78403
  {
78322
78404
  category: "other",
78323
78405
  name: "get_editor_projects",
78324
- surfaces: ["mcp"],
78406
+ surfaces: ["agent", "mcp"],
78325
78407
  toolset: "editor"
78326
78408
  },
78327
78409
  {
@@ -78486,6 +78568,13 @@ var CURATED_ACTION_CATALOG = [
78486
78568
  surfaces: ["mcp"],
78487
78569
  toolset: "models3d"
78488
78570
  },
78571
+ {
78572
+ category: "other",
78573
+ isReadOnly: true,
78574
+ name: "get_operator",
78575
+ surfaces: ["mcp"],
78576
+ toolset: "core"
78577
+ },
78489
78578
  {
78490
78579
  category: "other",
78491
78580
  mcpCardKind: "summary",
@@ -78762,6 +78851,7 @@ var CURATED_ACTION_CATALOG = [
78762
78851
  },
78763
78852
  {
78764
78853
  category: "other",
78854
+ isOpenWorld: true,
78765
78855
  mutationPolicy: "approval-required",
78766
78856
  name: "install_skills_pro_skill",
78767
78857
  surfaces: ["mcp"],
@@ -78790,6 +78880,15 @@ var CURATED_ACTION_CATALOG = [
78790
78880
  surfaces: ["mcp"],
78791
78881
  toolset: "brand-kit"
78792
78882
  },
78883
+ {
78884
+ actionClass: "brand-context",
78885
+ category: "social",
78886
+ mcpBrandRequired: true,
78887
+ mutationPolicy: "direct",
78888
+ name: "manage_brand_settings",
78889
+ surfaces: ["mcp"],
78890
+ toolset: "brand"
78891
+ },
78793
78892
  {
78794
78893
  category: "campaign",
78795
78894
  mcpCardKind: "summary",
@@ -78798,6 +78897,13 @@ var CURATED_ACTION_CATALOG = [
78798
78897
  surfaces: ["mcp"],
78799
78898
  toolset: "content"
78800
78899
  },
78900
+ {
78901
+ category: "social",
78902
+ mutationPolicy: "direct",
78903
+ name: "manage_channel_settings",
78904
+ surfaces: ["mcp"],
78905
+ toolset: "brand"
78906
+ },
78801
78907
  {
78802
78908
  category: "other",
78803
78909
  name: "manage_knowledge",
@@ -78811,6 +78917,21 @@ var CURATED_ACTION_CATALOG = [
78811
78917
  surfaces: ["agent"],
78812
78918
  toolset: "engagement"
78813
78919
  },
78920
+ {
78921
+ annotationHint: "destructive",
78922
+ category: "other",
78923
+ mutationPolicy: "direct",
78924
+ name: "manage_operator",
78925
+ surfaces: ["mcp"],
78926
+ toolset: "core"
78927
+ },
78928
+ {
78929
+ category: "other",
78930
+ mutationPolicy: "direct",
78931
+ name: "manage_organization_settings",
78932
+ surfaces: ["mcp"],
78933
+ toolset: "workspace"
78934
+ },
78814
78935
  {
78815
78936
  category: "other",
78816
78937
  name: "manage_skill",
@@ -78865,7 +78986,7 @@ var CURATED_ACTION_CATALOG = [
78865
78986
  category: "other",
78866
78987
  mutationPolicy: "direct",
78867
78988
  name: "open_in_editor",
78868
- surfaces: ["mcp"],
78989
+ surfaces: ["agent", "mcp"],
78869
78990
  toolset: "editor"
78870
78991
  },
78871
78992
  {
@@ -78958,6 +79079,7 @@ var CURATED_ACTION_CATALOG = [
78958
79079
  },
78959
79080
  {
78960
79081
  category: "other",
79082
+ isOpenWorld: true,
78961
79083
  mutationPolicy: "direct",
78962
79084
  name: "publish_skill",
78963
79085
  surfaces: ["mcp"],
@@ -79087,6 +79209,7 @@ var CURATED_ACTION_CATALOG = [
79087
79209
  {
79088
79210
  annotationHint: "non-destructive-write",
79089
79211
  category: "content",
79212
+ isOpenWorld: true,
79090
79213
  mcpBrandRequiredWhenMultiple: true,
79091
79214
  mcpCardKind: "summary",
79092
79215
  mutationPolicy: "direct",
@@ -79154,7 +79277,7 @@ var CURATED_ACTION_CATALOG = [
79154
79277
  isOpenWorld: true,
79155
79278
  mutationPolicy: "approval-required",
79156
79279
  name: "run_clipper",
79157
- surfaces: ["mcp"],
79280
+ surfaces: ["agent", "mcp"],
79158
79281
  toolset: "clipper"
79159
79282
  },
79160
79283
  {
@@ -79350,7 +79473,7 @@ var CURATED_ACTION_CATALOG = [
79350
79473
  category: "other",
79351
79474
  mutationPolicy: "direct",
79352
79475
  name: "start_editor_render",
79353
- surfaces: ["mcp"],
79476
+ surfaces: ["agent", "mcp"],
79354
79477
  toolset: "editor"
79355
79478
  },
79356
79479
  {
@@ -79557,7 +79680,7 @@ var CURATED_ACTION_CATALOG = [
79557
79680
  annotationOverride: {
79558
79681
  destructiveHint: false,
79559
79682
  idempotentHint: true,
79560
- openWorldHint: false,
79683
+ openWorldHint: true,
79561
79684
  readOnlyHint: false
79562
79685
  },
79563
79686
  category: "other",
@@ -84721,6 +84844,156 @@ var MCP_ONBOARDING_TOOLS = [
84721
84844
  }
84722
84845
  ];
84723
84846
 
84847
+ // ../actions/src/registry/source/mcp-only/operator.tools.ts
84848
+ var OPERATOR_READ_ACTIONS = [
84849
+ "organizations",
84850
+ "apps",
84851
+ "organization",
84852
+ "brands",
84853
+ "members",
84854
+ "credit_usage",
84855
+ "credit_ledger"
84856
+ ];
84857
+ var OPERATOR_WRITE_ACTIONS = [
84858
+ "credit_grant",
84859
+ "member_add",
84860
+ "brand_create",
84861
+ "brand_update",
84862
+ "brand_os_approve"
84863
+ ];
84864
+ var MCP_OPERATOR_TOOLS = [
84865
+ {
84866
+ creditCost: 0,
84867
+ description: "Platform operators: read any organization. organizations lists every organization with owner, tier and member count; apps lists the apps each organization sees; organization returns one organization with its brands, members and credit usage; brands lists the brands of an organization (pass brandId for one); members lists its members; credit_usage returns the last 30 days; credit_ledger returns the ledger rows between from and to (at most 31 days). Read-only.",
84868
+ name: "get_operator",
84869
+ parameters: {
84870
+ properties: {
84871
+ action: {
84872
+ description: "What to read.",
84873
+ enum: [...OPERATOR_READ_ACTIONS],
84874
+ type: "string"
84875
+ },
84876
+ brandId: {
84877
+ description: "With action brands: read one brand of the organization.",
84878
+ type: "string"
84879
+ },
84880
+ from: {
84881
+ description: "With action credit_ledger: window start, an ISO timestamp with offset.",
84882
+ type: "string"
84883
+ },
84884
+ includeDeleted: {
84885
+ description: "With action organizations: also list deleted ones.",
84886
+ type: "boolean"
84887
+ },
84888
+ limit: {
84889
+ description: "Rows per page for organizations and apps (up to 100), or ledger rows (up to 500).",
84890
+ type: "number"
84891
+ },
84892
+ organizationId: {
84893
+ description: "The organization to read. Required for every action except organizations and apps.",
84894
+ type: "string"
84895
+ },
84896
+ page: {
84897
+ description: "Page number for organizations and apps, from 1.",
84898
+ type: "number"
84899
+ },
84900
+ to: {
84901
+ description: "With action credit_ledger: window end, an ISO timestamp with offset.",
84902
+ type: "string"
84903
+ }
84904
+ },
84905
+ required: ["action"],
84906
+ type: "object"
84907
+ },
84908
+ requiredRole: "admin"
84909
+ },
84910
+ {
84911
+ creditCost: 0,
84912
+ description: "Platform operators: change any organization. credit_grant adds credits (amount, reason, optional expiresInDays), member_add adds a person without sending email (email, roleKey admin or member), brand_create makes a brand (label), brand_update edits kit fields, brand_os_approve applies kit fields and approves the brand’s Brand OS draft. The first call changes nothing and returns a preview; call again with the same arguments and confirmed true to apply it. A repeat of a confirmed call never applies twice. Every change is logged with the acting operator.",
84913
+ name: "manage_operator",
84914
+ parameters: {
84915
+ properties: {
84916
+ action: {
84917
+ description: "What to change.",
84918
+ enum: [...OPERATOR_WRITE_ACTIONS],
84919
+ type: "string"
84920
+ },
84921
+ amount: {
84922
+ description: "With credit_grant: whole credits to add, 1 to 100000.",
84923
+ type: "number"
84924
+ },
84925
+ brandId: {
84926
+ description: "With brand_update and brand_os_approve: the brand to change.",
84927
+ type: "string"
84928
+ },
84929
+ confirmed: {
84930
+ description: "Apply the change. Leave unset to get the preview; set true only after the operator has seen it.",
84931
+ type: "boolean"
84932
+ },
84933
+ email: {
84934
+ description: "With member_add: the person’s email.",
84935
+ type: "string"
84936
+ },
84937
+ expiresInDays: {
84938
+ description: "With credit_grant: days until the credits expire.",
84939
+ type: "number"
84940
+ },
84941
+ fields: {
84942
+ additionalProperties: false,
84943
+ description: "With brand_create and brand_update: the kit fields to set. With brand_os_approve: the voice and guideline fields to apply before approving.",
84944
+ properties: {
84945
+ backgroundColor: { type: "string" },
84946
+ description: { type: "string" },
84947
+ fontFamily: { type: "string" },
84948
+ label: { type: "string" },
84949
+ primaryColor: { type: "string" },
84950
+ promptGuidelines: { type: "string" },
84951
+ secondaryColor: { type: "string" },
84952
+ voiceAudience: { items: { type: "string" }, type: "array" },
84953
+ voiceDoNotSoundLike: { items: { type: "string" }, type: "array" },
84954
+ voiceMessagingPillars: { items: { type: "string" }, type: "array" },
84955
+ voiceSampleOutput: { type: "string" },
84956
+ voiceStyle: { type: "string" },
84957
+ voiceTone: { type: "string" },
84958
+ voiceValues: { items: { type: "string" }, type: "array" },
84959
+ watermarkOpacity: { type: "number" },
84960
+ watermarkPosition: {
84961
+ enum: ["top-left", "top-right", "bottom-left", "bottom-right"],
84962
+ type: "string"
84963
+ },
84964
+ watermarkText: { type: "string" }
84965
+ },
84966
+ type: "object"
84967
+ },
84968
+ firstName: {
84969
+ description: "With member_add: first name for a new account.",
84970
+ type: "string"
84971
+ },
84972
+ lastName: {
84973
+ description: "With member_add: last name for a new account.",
84974
+ type: "string"
84975
+ },
84976
+ organizationId: {
84977
+ description: "The organization to change.",
84978
+ type: "string"
84979
+ },
84980
+ reason: {
84981
+ description: "With credit_grant: why, at least 8 characters. It is kept on the ledger and keys the retry guard, so a second grant of the same size needs a different reason.",
84982
+ type: "string"
84983
+ },
84984
+ roleKey: {
84985
+ description: "With member_add: admin (default) or member.",
84986
+ enum: ["admin", "member"],
84987
+ type: "string"
84988
+ }
84989
+ },
84990
+ required: ["action", "organizationId"],
84991
+ type: "object"
84992
+ },
84993
+ requiredRole: "admin"
84994
+ }
84995
+ ];
84996
+
84724
84997
  // ../actions/src/registry/source/mcp-only/other.tools.ts
84725
84998
  var MCP_OTHER_TOOLS = [
84726
84999
  {
@@ -84763,6 +85036,146 @@ var MCP_OTHER_TOOLS = [
84763
85036
  }
84764
85037
  ];
84765
85038
 
85039
+ // ../actions/src/registry/source/mcp-only/owner-settings.tools.ts
85040
+ var bool = { type: "boolean" };
85041
+ var text2 = { type: "string" };
85042
+ var texts2 = { type: "array", items: text2 };
85043
+ var MCP_OWNER_SETTINGS_TOOLS = [
85044
+ {
85045
+ name: "manage_organization_settings",
85046
+ description: "Read or change the organization settings an owner or admin edits in Settings: MCP approvals, notification channels, watermark, generation and verification toggles, enabled models, default models, timezone, locale and daily publishing caps. read returns the stored settings. update changes only the fields sent and returns the stored settings; owners and admins only. The server keeps refusing plan limits, subscription tier, release access and onboarding state, and the tool adds no rule of its own. Provider keys and webhook secrets are never read or written here; those stay in the Genfeed app. Turning MCP approvals off (isMcpApprovalRequired false) changes nothing on the first call and returns what to confirm; after the person agrees in this conversation, repeat it with confirmed true.",
85047
+ creditCost: 0,
85048
+ requiredRole: "user",
85049
+ parameters: {
85050
+ type: "object",
85051
+ additionalProperties: false,
85052
+ properties: {
85053
+ action: { type: "string", enum: ["read", "update"] },
85054
+ confirmed: {
85055
+ type: "boolean",
85056
+ description: "For update only, when isMcpApprovalRequired is false. Set true only after the person has explicitly agreed, in this conversation, to let credit-spending MCP requests run without waiting in the approvals queue."
85057
+ },
85058
+ settings: {
85059
+ type: "object",
85060
+ description: "For update: the fields to change. Send only what changes.",
85061
+ properties: {
85062
+ agentReplyStyle: text2,
85063
+ defaultImageModel: text2,
85064
+ defaultImageToVideoModel: text2,
85065
+ defaultLocale: text2,
85066
+ defaultModel: text2,
85067
+ defaultModelReview: text2,
85068
+ defaultModelUpdate: text2,
85069
+ defaultMusicModel: text2,
85070
+ defaultVideoModel: text2,
85071
+ defaultVoiceProvider: text2,
85072
+ enabledModelIds: texts2,
85073
+ isAutoEvaluateEnabled: bool,
85074
+ isBrandVisionChecksEnabled: bool,
85075
+ isBreakoutAutoPublishEnabled: bool,
85076
+ isBreakoutResponsesEnabled: bool,
85077
+ isGenerateArticlesEnabled: bool,
85078
+ isGenerateImagesEnabled: bool,
85079
+ isGenerateMusicEnabled: bool,
85080
+ isGenerateVideosEnabled: bool,
85081
+ isMcpApprovalRequired: {
85082
+ ...bool,
85083
+ description: "Whether MCP requests that spend credits wait in the approvals queue. Turning it off needs confirmed true."
85084
+ },
85085
+ isNotificationsDiscordEnabled: bool,
85086
+ isNotificationsEmailEnabled: bool,
85087
+ isNotificationsTelegramEnabled: bool,
85088
+ isVerifyIngredientEnabled: bool,
85089
+ isVerifyScriptEnabled: bool,
85090
+ isVerifyVideoEnabled: bool,
85091
+ isVoiceControlEnabled: bool,
85092
+ isWatermarkEnabled: bool,
85093
+ isWhitelabelEnabled: bool,
85094
+ quotaInstagram: { type: "number" },
85095
+ quotaTiktok: { type: "number" },
85096
+ quotaTwitter: { type: "number" },
85097
+ quotaYoutube: { type: "number" },
85098
+ timezone: text2
85099
+ }
85100
+ }
85101
+ },
85102
+ required: ["action"]
85103
+ }
85104
+ },
85105
+ {
85106
+ name: "manage_brand_settings",
85107
+ description: "Change the settings an owner or admin edits in Brand Settings, for one explicit brand: update changes the handle (slug), description, active state, public analytics and default image, video and music models; delete removes the brand. Name, voice, colors and fonts are the Brand Kit (manage_brand_kit), not this. Owners and admins only, inside the brand limit chosen at consent. delete changes nothing on the first call and returns what to confirm; after the person agrees in this conversation, repeat it with confirmed true. Moving a brand to another organization stays in the Genfeed app.",
85108
+ creditCost: 0,
85109
+ requiredRole: "user",
85110
+ parameters: {
85111
+ type: "object",
85112
+ additionalProperties: false,
85113
+ properties: {
85114
+ action: { type: "string", enum: ["update", "delete"] },
85115
+ brandId: { type: "string", description: "The ID of the brand." },
85116
+ confirmed: {
85117
+ type: "boolean",
85118
+ description: "For delete only. Set true only after the person has explicitly agreed, in this conversation, to delete this brand."
85119
+ },
85120
+ settings: {
85121
+ type: "object",
85122
+ description: "For update: the fields to change. Send only what changes.",
85123
+ additionalProperties: false,
85124
+ properties: {
85125
+ defaultImageModel: text2,
85126
+ defaultImageToVideoModel: text2,
85127
+ defaultMusicModel: text2,
85128
+ defaultVideoModel: text2,
85129
+ description: text2,
85130
+ isActive: bool,
85131
+ isPublicAnalyticsEnabled: bool,
85132
+ slug: {
85133
+ ...text2,
85134
+ description: "The brand handle used in its public address."
85135
+ }
85136
+ }
85137
+ }
85138
+ },
85139
+ required: ["action", "brandId"]
85140
+ }
85141
+ },
85142
+ {
85143
+ name: "manage_channel_settings",
85144
+ description: "Change the settings of one connected channel (a social account), by credentialId from get_context or check_channel: disconnect removes it from its brand (owner or admin, brand-settings:write, inside the brand limit chosen at consent; posts already published stay); posting_times reads the preferred posting times, or replaces them when times is sent (the same route the app uses, so it needs a posting scope, not an owner). disconnect changes nothing on the first call: it returns the scheduled posts that would lose their channel, and after the person agrees in this conversation, repeat it with confirmed true. Tokens and secrets are never read or written here. Connecting a channel is connect_account or connect_oauth.",
85145
+ creditCost: 0,
85146
+ requiredRole: "user",
85147
+ parameters: {
85148
+ type: "object",
85149
+ additionalProperties: false,
85150
+ properties: {
85151
+ action: { type: "string", enum: ["disconnect", "posting_times"] },
85152
+ confirmed: {
85153
+ type: "boolean",
85154
+ description: "For disconnect only. Set true only after the person has explicitly agreed, in this conversation, to disconnect this channel."
85155
+ },
85156
+ credentialId: {
85157
+ type: "string",
85158
+ description: "The ID of the connected channel."
85159
+ },
85160
+ times: {
85161
+ type: "array",
85162
+ description: "For posting_times: the full list that replaces the stored one (hour 0-23, minute 0-59, in the brand timezone). Omit to read. An empty list clears them.",
85163
+ items: {
85164
+ type: "object",
85165
+ additionalProperties: false,
85166
+ properties: {
85167
+ hour: { type: "integer", minimum: 0, maximum: 23 },
85168
+ minute: { type: "integer", minimum: 0, maximum: 59 }
85169
+ },
85170
+ required: ["hour", "minute"]
85171
+ }
85172
+ }
85173
+ },
85174
+ required: ["action", "credentialId"]
85175
+ }
85176
+ }
85177
+ ];
85178
+
84766
85179
  // ../actions/src/registry/source/mcp-only/presets.tools.ts
84767
85180
  var presetKinds = [
84768
85181
  "image",
@@ -86900,6 +87313,7 @@ var MCP_ONLY_TOOLS = [
86900
87313
  ...MCP_WORKFLOW_TOOLS,
86901
87314
  ...MCP_SOCIAL_TOOLS,
86902
87315
  ...MCP_ADMIN_TOOLS,
87316
+ ...MCP_OPERATOR_TOOLS,
86903
87317
  ...MCP_AGENT_CONTROL_TOOLS,
86904
87318
  ...MCP_ADS_TOOLS,
86905
87319
  ...MCP_CAMPAIGN_TOOLS,
@@ -86912,7 +87326,8 @@ var MCP_ONLY_TOOLS = [
86912
87326
  ...MCP_STORYBOARD_CAPABILITY_TOOLS,
86913
87327
  ...MCP_STORYBOARD_VIDEO_TOOLS,
86914
87328
  ...MCP_SKILLS_PRO_TOOLS,
86915
- ...MCP_WORKSPACE_TOOLS
87329
+ ...MCP_WORKSPACE_TOOLS,
87330
+ ...MCP_OWNER_SETTINGS_TOOLS
86916
87331
  ];
86917
87332
 
86918
87333
  // ../actions/src/registry/media-generation.ts
@@ -88297,7 +88712,7 @@ var OVERLAP_TOOLS = [
88297
88712
  {
88298
88713
  creditCost: 0,
88299
88714
  description: "Create a post draft from supplied text for review. On MCP this never publishes or schedules: confirmed and existing-content publishing are rejected, and scheduledAt is ignored. Use create_scheduled_release for release drafts or confirmed scheduling. Existing-content publishing is available only in the Genfeed app.",
88300
- mcpDescription: "Save a reviewable draft from text or media. To attach Library media to a generated draft, pass its postId, the same brandId, and mediaUrls. This replaces the ordered media and keeps the draft’s text and generation receipt. This tool never publishes or schedules.",
88715
+ mcpDescription: "Save a reviewable draft from text or media. To attach Library media to a generated draft, pass its postId, the same brandId, and mediaUrls. This replaces the ordered media and keeps the draft’s text and generation receipt; an empty mediaUrls list removes the media. This tool never publishes or schedules.",
88301
88716
  mcpHiddenParameters: [
88302
88717
  "caption",
88303
88718
  "confirmed",
@@ -88344,7 +88759,7 @@ var OVERLAP_TOOLS = [
88344
88759
  type: "string"
88345
88760
  },
88346
88761
  mediaUrls: {
88347
- description: "Hosted Library asset URLs in slide order. Required when passing postId; the list becomes that draft’s media.",
88762
+ description: "Hosted Library asset URLs in slide order. Required when passing postId; the list becomes that draft’s media, and an empty list removes it.",
88348
88763
  items: { type: "string" },
88349
88764
  type: "array"
88350
88765
  },
package/package.json CHANGED
@@ -74,5 +74,5 @@
74
74
  "type-check": "bun run ../../scripts/architecture/check-typecheck-prerequisites.ts && bun check --no-script"
75
75
  },
76
76
  "type": "module",
77
- "version": "0.7.2"
77
+ "version": "0.7.3"
78
78
  }