@alva-ai/toolkit 0.32.0-beta.0 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dispatch.js CHANGED
@@ -6051,6 +6051,9 @@ var EMBEDDED_COMMAND_DEFINITIONS = [
6051
6051
  { values: ["delivery-ids", "digest-run-id"] },
6052
6052
  "steward-self"
6053
6053
  ),
6054
+ route("company-news create", "company-news create", {
6055
+ values: ["name", "tickers", "initial-lookback-hours", "page-size"]
6056
+ }),
6054
6057
  route("thesis create", "thesis create", {
6055
6058
  values: [
6056
6059
  "request-id",
@@ -6065,6 +6068,21 @@ var EMBEDDED_COMMAND_DEFINITIONS = [
6065
6068
  route("thesis asset-candidates", "thesis asset-candidates", {
6066
6069
  values: ["text"]
6067
6070
  }),
6071
+ route("thesis list", "thesis list", {
6072
+ values: [
6073
+ "person",
6074
+ "person-name",
6075
+ "user",
6076
+ "ticker",
6077
+ "entity-id",
6078
+ "status",
6079
+ "first",
6080
+ "cursor"
6081
+ ]
6082
+ }),
6083
+ route("thesis related", "thesis related", {
6084
+ values: ["id", "first", "cursor"]
6085
+ }),
6068
6086
  route("thesis get", "thesis get", { values: ["id"] }),
6069
6087
  route("thesis version get", "thesis version get", {
6070
6088
  values: ["id", "author-version-id"]
@@ -6495,7 +6513,8 @@ Commands:
6495
6513
  automation Create and operate scheduled automations
6496
6514
  schedule Manage future messages for this Session Inbox
6497
6515
  steward Push steward reports for this Session Inbox (decide, forward, send, pending, briefed)
6498
- thesis Create and manage authored theses
6516
+ thesis Read published viewpoints and manage authored theses
6517
+ company-news Create backend-managed multi-ticker News Feeds
6499
6518
  playbooks Discover, build, release, and manage Playbooks
6500
6519
  alert Manage personal automation alert bindings
6501
6520
  for-you Read your For You publications (list, theses)
@@ -6504,6 +6523,16 @@ Commands:
6504
6523
 
6505
6524
  Run 'alva <command> --help' for a command tree.`;
6506
6525
  var AGENT_COMMAND_HELP = {
6526
+ "company-news": `Usage: alva company-news create --name <name> --tickers <NVDA,AMD> [options]
6527
+
6528
+ Create one backend-managed News Feed for 1-1000 unique uppercase tickers.
6529
+ Optional: --initial-lookback-hours <0-168> (default 24), --page-size <0-100>
6530
+ (default 20). Zero selects the backend default. No script upload or path.
6531
+ Returns decimal-string feed_id and cronjob_id. New feeds are paused; creation
6532
+ does not start model work. Once resumed, the creator pays model credits.
6533
+ Pull-only: no push delivery is enabled. Repeating the same name/configuration
6534
+ returns the existing resource without changing its activation state.
6535
+ Authentication and endpoints belong to the host; no identity overrides.`,
6507
6536
  steward: `Usage: alva steward <subcommand> [options]
6508
6537
 
6509
6538
  Report this push steward's decisions for Feed alerts routed to its Inbox and
@@ -6582,7 +6611,21 @@ Examples:
6582
6611
  alva for-you theses --cursor '<nextCursor>'`,
6583
6612
  thesis: `Usage: alva thesis <subcommand> [options]
6584
6613
 
6585
- Subcommands: asset-candidates, create, get, version get, signals, set-visibility, update, close, delete, rewrite.
6614
+ Subcommands: list, related, asset-candidates, create, get, version get, signals, set-visibility, update, close, delete, rewrite.
6615
+
6616
+ list --person <slug> | --person-name <name> | --user <username>
6617
+ | --ticker <ticker> | --entity-id <id>
6618
+ [--status ACTIVE|ARCHIVED] [--first 10] [--cursor <nextCursor>]
6619
+ Choose one selector; --status is for author lists only (default ACTIVE).
6620
+ related --id <playbook-id> [--first 10] [--cursor <nextCursor>]
6621
+ Both read one page (default 10, maximum 50) with full bodies. Pass nextCursor
6622
+ to --cursor while it is non-null, even after an empty page. Name/ticker
6623
+ ambiguity returns candidates; retry with an exact slug or entity ID. A
6624
+ publisher's __typename picks its selector: Person --person <slug>, PublicUser
6625
+ --user <username>. publication.playbookId is the ID for get/version/signals/
6626
+ related; null publication means no readable snapshot. Author lists include the
6627
+ signed-in owner's private Theses. Related uses the source's current version
6628
+ (GENERATING, READY or FAILED), never a quoted historical version.
6586
6629
 
6587
6630
  asset-candidates --text <unsaved thesis text> reads catalog IDs and suggested
6588
6631
  directions without publishing. Use resolved entity IDs with create --entity-ids
@@ -6789,10 +6832,10 @@ ${options.join("\n")}`;
6789
6832
  }
6790
6833
  function agentHelpFor(args) {
6791
6834
  const helpIndex = args.findIndex(
6792
- (argument) => argument === "--help" || argument === "-h"
6835
+ (argument2) => argument2 === "--help" || argument2 === "-h"
6793
6836
  );
6794
6837
  const path = (helpIndex === -1 ? args : args.slice(0, helpIndex)).filter(
6795
- (argument) => !argument.startsWith("-")
6838
+ (argument2) => !argument2.startsWith("-")
6796
6839
  );
6797
6840
  for (let length = path.length; length > 0; length--) {
6798
6841
  const command2 = path.slice(0, length).join(" ");
@@ -7033,6 +7076,116 @@ var parseEmbeddedCommand = createCommandParser(
7033
7076
  EMBEDDED_GLOBAL_FLAG_DEFINITIONS
7034
7077
  );
7035
7078
 
7079
+ // src/resources/thesisPublication.ts
7080
+ function record(value) {
7081
+ return typeof value === "object" && value !== null && !Array.isArray(value);
7082
+ }
7083
+ function isPositiveInt64(value) {
7084
+ return typeof value === "string" && /^[1-9]\d{0,18}$/.test(value) && BigInt(value) <= 9223372036854775807n;
7085
+ }
7086
+ var THESIS_PUBLICATION_FIELDS = `
7087
+ thesisId playbookId authorVersionId materialVersionId itemKey
7088
+ title body publishedAtMs changeKind visibility
7089
+ closed archived note closingNote researchPaused
7090
+ entityIds categoryIds
7091
+ entityStances { entityId stance }
7092
+ entities { id ticker name }
7093
+ publisher {
7094
+ __typename id displayName avatarUrl bio followersCount
7095
+ viewerState { following }
7096
+ ... on Person { slug }
7097
+ ... on PublicUser { username }
7098
+ }
7099
+ medias { type coverUrl url }
7100
+ signalFeed { id }
7101
+ snapshotRelease {
7102
+ versionId materialVersionId publishedAtMs changeKind
7103
+ sourceRefs {
7104
+ title sourceKind sourceContentId publicUrl sourceTimeMs locator
7105
+ }
7106
+ }
7107
+ `;
7108
+
7109
+ // src/resources/thesisReads.ts
7110
+ var PAGE = "pageInfo { endCursor hasNextPage }";
7111
+ var PERSON = "__typename id slug displayName bio";
7112
+ var USER = "__typename id username displayName bio";
7113
+ var ENTITY = "__typename id ticker name kind assetClass venue { id name }";
7114
+ var AUTHOR_THESES = `theses(input: $input) {
7115
+ edges { cursor node { id latestRelease { thesisPublication { ${THESIS_PUBLICATION_FIELDS} } } } }
7116
+ ${PAGE}
7117
+ }`;
7118
+ var PERSON_QUERY = `query ToolkitPersonTheses($slug: String!, $input: ProfileThesisConnectionInput) {
7119
+ scope: person(slug: $slug) { ${PERSON} ${AUTHOR_THESES} }
7120
+ }`;
7121
+ var USER_QUERY = `query ToolkitUserTheses($username: String!, $input: ProfileThesisConnectionInput) {
7122
+ scope: publicUser(username: $username) { ${USER} ${AUTHOR_THESES} }
7123
+ }`;
7124
+ var ENTITY_QUERY = `query ToolkitEntityTheses($id: ID!, $input: EntityThesisConnectionInput) {
7125
+ market { scope: entity(input: { id: $id }) { ${ENTITY}
7126
+ theses(input: $input) { edges { cursor node { ${THESIS_PUBLICATION_FIELDS} } } ${PAGE} }
7127
+ } }
7128
+ }`;
7129
+ var PEOPLE_QUERY = `query ToolkitThesisPeople($query: String!) {
7130
+ search: people(input: { query: $query, first: 50 }) {
7131
+ edges { node { ${PERSON} } } pageInfo { hasNextPage }
7132
+ }
7133
+ }`;
7134
+ var ENTITIES_QUERY = `query ToolkitThesisEntities($query: String!) {
7135
+ market { search: entities(input: { query: $query, first: 50, byPrefix: false }) {
7136
+ edges { node { ${ENTITY} } } pageInfo { hasNextPage }
7137
+ } }
7138
+ }`;
7139
+ var RELATED_QUERY = `query ToolkitRelatedTheses($id: ID!, $input: RelatedThesisInput) {
7140
+ node(id: $id) { ... on Playbook { relatedTheses(input: $input) {
7141
+ state nextCursor
7142
+ edges { cursor node { itemKey score publication { ${THESIS_PUBLICATION_FIELDS} } } }
7143
+ } } }
7144
+ }`;
7145
+ var SELECTORS = [
7146
+ "person",
7147
+ "personName",
7148
+ "user",
7149
+ "ticker",
7150
+ "entityId"
7151
+ ];
7152
+ function validateThesisPageParams(params) {
7153
+ if (!record(params)) throw argument("Thesis parameters must be an object");
7154
+ const first = params.first === void 0 ? 10 : params.first;
7155
+ if (typeof first !== "number" || !Number.isInteger(first) || first < 1 || first > 50) {
7156
+ throw argument("first must be an integer between 1 and 50");
7157
+ }
7158
+ if (params.cursor !== void 0 && !nonempty(params.cursor)) {
7159
+ throw argument("cursor must be non-empty");
7160
+ }
7161
+ }
7162
+ function validateListThesesParams(params) {
7163
+ validateThesisPageParams(params);
7164
+ const chosen = SELECTORS.filter((key) => params[key] !== void 0);
7165
+ if (chosen.length !== 1) {
7166
+ throw argument(
7167
+ "Choose exactly one of person, personName, user, ticker or entityId"
7168
+ );
7169
+ }
7170
+ if (!nonempty(params[chosen[0]]))
7171
+ throw argument(`${chosen[0]} must be non-empty`);
7172
+ if (params.entityId !== void 0 && !isPositiveInt64(params.entityId)) {
7173
+ throw argument("entityId must be a positive int64 string");
7174
+ }
7175
+ if (params.status !== void 0 && params.status !== "ACTIVE" && params.status !== "ARCHIVED") {
7176
+ throw argument("status must be ACTIVE or ARCHIVED");
7177
+ }
7178
+ if (params.status !== void 0 && (params.ticker !== void 0 || params.entityId !== void 0)) {
7179
+ throw argument("status applies only to author lists");
7180
+ }
7181
+ }
7182
+ function nonempty(value) {
7183
+ return typeof value === "string" && value.trim().length > 0;
7184
+ }
7185
+ function argument(message) {
7186
+ return new AlvaError("INVALID_ARGUMENT", message, 400);
7187
+ }
7188
+
7036
7189
  // src/resources/forYou.ts
7037
7190
  var FOR_YOU_QUERY = `
7038
7191
  query ToolkitForYou($input: FeedEntryConnectionInput) {
@@ -7062,9 +7215,6 @@ query ToolkitForYou($input: FeedEntryConnectionInput) {
7062
7215
  }
7063
7216
  }
7064
7217
  `.trim();
7065
- function record(value) {
7066
- return typeof value === "object" && value !== null && !Array.isArray(value);
7067
- }
7068
7218
  function validateForYouListParams(params) {
7069
7219
  if (!record(params)) throw new Error("For You parameters must be an object");
7070
7220
  const first = params.first === void 0 ? 20 : params.first;
@@ -7081,9 +7231,6 @@ function validateForYouListParams(params) {
7081
7231
  throw new Error("feedId must be a positive decimal int64 string");
7082
7232
  }
7083
7233
  }
7084
- function isPositiveInt64(value) {
7085
- return typeof value === "string" && /^[1-9]\d{0,18}$/.test(value) && BigInt(value) <= 9223372036854775807n;
7086
- }
7087
7234
  var THESIS_RECOMMENDATION_QUERY = `
7088
7235
  query ToolkitForYouTheses($input: ThesisRecommendationInput) {
7089
7236
  viewer {
@@ -7095,24 +7242,7 @@ query ToolkitForYouTheses($input: ThesisRecommendationInput) {
7095
7242
  node {
7096
7243
  itemKey
7097
7244
  publication {
7098
- thesisId playbookId authorVersionId materialVersionId itemKey
7099
- title body publishedAtMs changeKind visibility
7100
- closed archived note closingNote researchPaused
7101
- entityIds categoryIds
7102
- entityStances { entityId stance }
7103
- entities { id ticker name }
7104
- publisher {
7105
- id displayName avatarUrl bio followersCount
7106
- viewerState { following }
7107
- }
7108
- medias { type coverUrl url }
7109
- signalFeed { id }
7110
- snapshotRelease {
7111
- versionId materialVersionId publishedAtMs changeKind
7112
- sourceRefs {
7113
- title sourceKind sourceContentId publicUrl sourceTimeMs locator
7114
- }
7115
- }
7245
+ ${THESIS_PUBLICATION_FIELDS}
7116
7246
  }
7117
7247
  }
7118
7248
  }
@@ -7176,6 +7306,39 @@ function requireDecision(value) {
7176
7306
  return value;
7177
7307
  }
7178
7308
 
7309
+ // src/resources/companyNews.ts
7310
+ function validateCompanyNewsCreateParams(params) {
7311
+ if (typeof params?.name !== "string" || params.name.trim() !== params.name || !/^[a-zA-Z0-9][a-zA-Z0-9-]{0,63}$/.test(params.name) || params.name === "news-lane") {
7312
+ throw new AlvaError(
7313
+ "INVALID_ARGUMENT",
7314
+ "name must be 1-64 alphanumeric/hyphen characters and distinct from news-lane",
7315
+ 400
7316
+ );
7317
+ }
7318
+ if (!Array.isArray(params.tickers) || params.tickers.length < 1 || params.tickers.length > 1e3 || params.tickers.some(
7319
+ (ticker) => typeof ticker !== "string" || ticker.trim() !== ticker || !/^[A-Z0-9][A-Z0-9.-]{0,19}$/.test(ticker)
7320
+ ) || new Set(params.tickers).size !== params.tickers.length) {
7321
+ throw new AlvaError(
7322
+ "INVALID_ARGUMENT",
7323
+ "tickers must contain 1-1000 unique uppercase symbols",
7324
+ 400
7325
+ );
7326
+ }
7327
+ for (const [name, maximum] of [
7328
+ ["initial_lookback_hours", 168],
7329
+ ["page_size", 100]
7330
+ ]) {
7331
+ const value = params[name];
7332
+ if (value !== void 0 && (!Number.isInteger(value) || value < 0 || value > maximum)) {
7333
+ throw new AlvaError(
7334
+ "INVALID_ARGUMENT",
7335
+ `${name} must be an integer from 0 to ${maximum} (0 selects the default)`,
7336
+ 400
7337
+ );
7338
+ }
7339
+ }
7340
+ }
7341
+
7179
7342
  // src/resources/schedules.ts
7180
7343
  var SCHEDULE_FIELDS = `
7181
7344
  id
@@ -7401,6 +7564,9 @@ var COMMAND_DEFINITIONS = [
7401
7564
  command("steward briefed", {
7402
7565
  values: ["inbox-path", "delivery-ids", "digest-run-id"]
7403
7566
  }),
7567
+ command("company-news create", {
7568
+ values: ["name", "tickers", "initial-lookback-hours", "page-size"]
7569
+ }),
7404
7570
  command("thesis create", {
7405
7571
  values: [
7406
7572
  "request-id",
@@ -7415,6 +7581,19 @@ var COMMAND_DEFINITIONS = [
7415
7581
  booleans: ["body-stdin"]
7416
7582
  }),
7417
7583
  command("thesis asset-candidates", { values: ["text"] }),
7584
+ command("thesis list", {
7585
+ values: [
7586
+ "person",
7587
+ "person-name",
7588
+ "user",
7589
+ "ticker",
7590
+ "entity-id",
7591
+ "status",
7592
+ "first",
7593
+ "cursor"
7594
+ ]
7595
+ }),
7596
+ command("thesis related", { values: ["id", "first", "cursor"] }),
7418
7597
  command("thesis get", { values: ["id"] }),
7419
7598
  command("thesis version get", {
7420
7599
  values: ["id", "author-version-id"]
@@ -11566,7 +11745,7 @@ function formatTradingPairResolved(result) {
11566
11745
  }
11567
11746
 
11568
11747
  // src/cli/dispatch.ts
11569
- var CLI_VERSION = true ? "0.32.0-beta.0" : "dev";
11748
+ var CLI_VERSION = true ? "0.32.0" : "dev";
11570
11749
  var DEFAULT_RUN_TIMEOUT_MS = 6e5;
11571
11750
  var RUN_TIMEOUT_ENV = "ALVA_RUN_TIMEOUT_MS";
11572
11751
  var GLOBAL_VALUE_FLAGS = Object.entries(GLOBAL_FLAG_DEFINITIONS).filter(([, kind]) => kind === "value").map(([name]) => `--${name}`);
@@ -11600,6 +11779,27 @@ function isVersionOlderThan(a, b) {
11600
11779
  return false;
11601
11780
  }
11602
11781
  var COMMAND_HELP = {
11782
+ "company-news": `Usage: alva company-news create --name <name> --tickers <NVDA,AMD> [options]
11783
+
11784
+ Create one private, backend-managed Feed covering all supplied tickers.
11785
+ No script upload, entry path or cron deployment is required.
11786
+
11787
+ Options:
11788
+ --name <name> Owner-local name (1-64 alphanumeric/hyphen characters; not news-lane)
11789
+ --tickers <A,B,C> 1-1000 unique uppercase symbols
11790
+ --initial-lookback-hours <0-168> Initial history window (default: 24; 0 selects default)
11791
+ --page-size <0-100> Editorial batch size (default: 20; 0 selects default)
11792
+
11793
+ New feeds are paused. Returns decimal-string feed_id and cronjob_id.
11794
+ Creation does not run the model or resume the producer. After reviewing the
11795
+ configuration, use 'alva feed resume --id <feed_id>' to start paid execution.
11796
+ Model credits are charged to the authenticated creator, not the platform.
11797
+ This is pull-only: starting the producer does not enable push notifications.
11798
+ Retry an unclear result with the same name and configuration; an existing
11799
+ feed's current activation state is preserved. Different configuration conflicts.
11800
+ The backend and database migration must be deployed; no script fallback is used.
11801
+
11802
+ Example: alva company-news create --name my-company-news --tickers NVDA,AMD`,
11603
11803
  steward: `Usage: alva steward <subcommand> [options]
11604
11804
 
11605
11805
  Report a push steward's decisions for Feed alerts routed to its Session Inbox,
@@ -12913,6 +13113,8 @@ Create and update never rewrite text automatically.
12913
13113
 
12914
13114
  Subcommands:
12915
13115
  create Create a thesis
13116
+ list Read theses by author or market entity
13117
+ related Read related current publications
12916
13118
  get Get one thesis
12917
13119
  version get Get one exact author version
12918
13120
  signals Read published Signal history
@@ -12935,6 +13137,20 @@ Update requires --visibility explicitly so it cannot inadvertently publish.
12935
13137
 
12936
13138
  Other flags:
12937
13139
  create --request-id <uuid> --body ... [--title <text>] [--tickers <ticker,ticker>] [--entity-ids <id,id>] [--entity-stances <json>] [--visibility <value>]
13140
+ list --person <slug> | --person-name <name> | --user <username>
13141
+ | --ticker <ticker> | --entity-id <id>
13142
+ [--status ACTIVE|ARCHIVED] [--first 10] [--cursor <nextCursor>]
13143
+ Choose one selector; --status is for author lists only (default ACTIVE).
13144
+ Name/ticker ambiguity returns candidates; retry with an exact slug or entity ID.
13145
+ A publisher's __typename picks its selector: Person --person <slug>,
13146
+ PublicUser --user <username>.
13147
+ related --id <playbook-id> [--first 10] [--cursor <nextCursor>]
13148
+ Uses the source's current version; state is GENERATING, READY or FAILED.
13149
+ list/related read one page (default 10, maximum 50) with full bodies. Pass
13150
+ nextCursor to --cursor while it is non-null, even after an empty page.
13151
+ publication.playbookId is the ID for get/version/signals/related;
13152
+ publication=null means no readable snapshot. Author lists include the
13153
+ signed-in owner's private Theses (visibility private).
12938
13154
  asset-candidates --text <unsaved thesis text>
12939
13155
  get --id <signed-int64-decimal>
12940
13156
  version get --id <signed-int64-decimal> --author-version-id <signed-int64-decimal>
@@ -13022,6 +13238,16 @@ function requirePositiveIntegerStringFlag(flags, name, command2) {
13022
13238
  }
13023
13239
  return val;
13024
13240
  }
13241
+ function requireFeedIDFlag(flags, command2) {
13242
+ const value = requirePositiveIntegerStringFlag(flags, "id", command2);
13243
+ if (value.length > 19 || value.trim() !== value || BigInt(value) > 9223372036854775807n) {
13244
+ throw new CliUsageError(
13245
+ `--id must be a positive decimal int64 for '${command2}'`,
13246
+ "feed"
13247
+ );
13248
+ }
13249
+ return value;
13250
+ }
13025
13251
  function optionalBoundedIntegerFlag(flags, name, command2, min, max) {
13026
13252
  const val = flags[name];
13027
13253
  if (val === void 0) return void 0;
@@ -14229,6 +14455,38 @@ async function executeParsedCommand(client, parsedCommand, meta, deps) {
14229
14455
  );
14230
14456
  }
14231
14457
  }
14458
+ case "company-news": {
14459
+ if (subcommand !== "create") {
14460
+ throw new CliUsageError("Expected company-news create", "company-news");
14461
+ }
14462
+ const params = {
14463
+ name: requireFlag(flags, "name", "company-news create"),
14464
+ tickers: requireFlag(flags, "tickers", "company-news create").split(",").map((ticker) => ticker.trim())
14465
+ };
14466
+ for (const [flag, field] of [
14467
+ ["initial-lookback-hours", "initial_lookback_hours"],
14468
+ ["page-size", "page_size"]
14469
+ ]) {
14470
+ const value = flags[flag];
14471
+ if (value === void 0) continue;
14472
+ if (!/^\d+$/.test(value)) {
14473
+ throw new CliUsageError(
14474
+ `--${flag} must be a nonnegative integer`,
14475
+ "company-news"
14476
+ );
14477
+ }
14478
+ params[field] = Number(value);
14479
+ }
14480
+ try {
14481
+ validateCompanyNewsCreateParams(params);
14482
+ } catch (error) {
14483
+ throw new CliUsageError(
14484
+ error instanceof Error ? error.message : "Invalid company news configuration",
14485
+ "company-news"
14486
+ );
14487
+ }
14488
+ return client.companyNews.create(params);
14489
+ }
14232
14490
  case "thesis": {
14233
14491
  if (!subcommand) {
14234
14492
  throw new CliUsageError("Missing subcommand for thesis", "thesis");
@@ -14248,6 +14506,39 @@ async function executeParsedCommand(client, parsedCommand, meta, deps) {
14248
14506
  return client.theses.assetCandidates(
14249
14507
  requireFlag(flags, "text", "thesis asset-candidates")
14250
14508
  );
14509
+ case "list": {
14510
+ const params = {
14511
+ person: flags.person,
14512
+ personName: flags["person-name"],
14513
+ user: flags.user,
14514
+ ticker: flags.ticker,
14515
+ entityId: flags["entity-id"],
14516
+ status: flags.status,
14517
+ first: flags.first === void 0 ? void 0 : Number(flags.first),
14518
+ cursor: flags.cursor
14519
+ };
14520
+ try {
14521
+ validateListThesesParams(params);
14522
+ } catch (error) {
14523
+ throw new CliUsageError(error.message, "thesis");
14524
+ }
14525
+ return client.theses.list(params);
14526
+ }
14527
+ case "related": {
14528
+ const params = {
14529
+ first: flags.first === void 0 ? void 0 : Number(flags.first),
14530
+ cursor: flags.cursor
14531
+ };
14532
+ try {
14533
+ validateThesisPageParams(params);
14534
+ } catch (error) {
14535
+ throw new CliUsageError(error.message, "thesis");
14536
+ }
14537
+ return client.theses.related(
14538
+ requireFlag(flags, "id", "thesis related"),
14539
+ params
14540
+ );
14541
+ }
14251
14542
  case "get":
14252
14543
  return client.theses.get(requireFlag(flags, "id", "thesis get"));
14253
14544
  case "version":
@@ -14372,19 +14663,19 @@ async function executeParsedCommand(client, parsedCommand, meta, deps) {
14372
14663
  });
14373
14664
  case "stop":
14374
14665
  return client.feed.stop({
14375
- id: requireNumericFlag(flags, "id", "feed stop")
14666
+ id: requireFeedIDFlag(flags, "feed stop")
14376
14667
  });
14377
14668
  case "resume":
14378
14669
  return client.feed.resume({
14379
- id: requireNumericFlag(flags, "id", "feed resume")
14670
+ id: requireFeedIDFlag(flags, "feed resume")
14380
14671
  });
14381
14672
  case "delete":
14382
14673
  return client.feed.delete({
14383
- id: requireNumericFlag(flags, "id", "feed delete")
14674
+ id: requireFeedIDFlag(flags, "feed delete")
14384
14675
  });
14385
14676
  case "set-visibility":
14386
14677
  return client.feed.setVisibility({
14387
- id: requireNumericFlag(flags, "id", "feed set-visibility"),
14678
+ id: requireFeedIDFlag(flags, "feed set-visibility"),
14388
14679
  visibility: feedVisibility(
14389
14680
  requireFlag(flags, "visibility", "feed set-visibility")
14390
14681
  )
@@ -16002,18 +16293,18 @@ async function dispatchEmbedded(client, args, meta, deps) {
16002
16293
  return { _help: true, text: AGENT_HELP_TEXT };
16003
16294
  }
16004
16295
  const requestedHelpIndex = args.findIndex(
16005
- (argument) => argument === "--help" || argument === "-h"
16296
+ (argument2) => argument2 === "--help" || argument2 === "-h"
16006
16297
  );
16007
16298
  const requestedHelp = requestedHelpIndex !== -1;
16008
16299
  const brokerNativeHelp = args[0] === "trading" && args[1] === "broker" && requestedHelpIndex > 2;
16009
- const bareHelp = args.every((argument) => !argument.startsWith("-")) ? AGENT_COMMAND_HELP[args.join(" ")] : void 0;
16300
+ const bareHelp = args.every((argument2) => !argument2.startsWith("-")) ? AGENT_COMMAND_HELP[args.join(" ")] : void 0;
16010
16301
  if (bareHelp !== void 0) {
16011
16302
  return { _help: true, text: bareHelp };
16012
16303
  }
16013
16304
  if (requestedHelp && !brokerNativeHelp) {
16014
16305
  const helpIndex = requestedHelpIndex;
16015
16306
  const helpPath = args.slice(0, helpIndex);
16016
- const treeHelp = helpIndex === args.length - 1 && helpPath.every((argument) => !argument.startsWith("-")) ? AGENT_COMMAND_HELP[helpPath.join(" ")] : void 0;
16307
+ const treeHelp = helpIndex === args.length - 1 && helpPath.every((argument2) => !argument2.startsWith("-")) ? AGENT_COMMAND_HELP[helpPath.join(" ")] : void 0;
16017
16308
  if (treeHelp !== void 0 && !ALPI_ALVA_COMMAND_PATH_SET.has(helpPath.join(" "))) {
16018
16309
  return { _help: true, text: treeHelp };
16019
16310
  }
@@ -16040,7 +16331,7 @@ async function dispatchEmbedded(client, args, meta, deps) {
16040
16331
  );
16041
16332
  }
16042
16333
  const commandSelector = brokerArgv.findIndex(
16043
- (argument) => argument === "--command"
16334
+ (argument2) => argument2 === "--command"
16044
16335
  );
16045
16336
  const describedCommand = brokerArgv[commandSelector + 1];
16046
16337
  if (command2 === "describe" && commandSelector !== -1 && HIDDEN_BROKER_COMMANDS.has(describedCommand)) {