@alva-ai/toolkit 0.37.0 → 0.38.0-beta.1

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
@@ -6065,7 +6065,9 @@ var EMBEDDED_COMMAND_DEFINITIONS = [
6065
6065
  "entity-stances",
6066
6066
  "tickers",
6067
6067
  "visibility",
6068
- "track-return"
6068
+ "track-return",
6069
+ "signal-kinds",
6070
+ "signal-min-importance"
6069
6071
  ]
6070
6072
  }),
6071
6073
  route("thesis asset-candidates", "thesis asset-candidates", {
@@ -6113,6 +6115,12 @@ var EMBEDDED_COMMAND_DEFINITIONS = [
6113
6115
  route("thesis set-signal-enabled", "thesis set-signal-enabled", {
6114
6116
  values: ["id", "enabled"]
6115
6117
  }),
6118
+ route("thesis signal-preferences get", "thesis signal-preferences get", {
6119
+ values: ["id"]
6120
+ }),
6121
+ route("thesis signal-preferences set", "thesis signal-preferences set", {
6122
+ values: ["id", "kinds", "min-importance"]
6123
+ }),
6116
6124
  route("thesis update", "thesis update", {
6117
6125
  values: [
6118
6126
  "id",
@@ -6240,6 +6248,9 @@ var EMBEDDED_COMMAND_DEFINITIONS = [
6240
6248
  route("people follows list", "people follows list", {
6241
6249
  values: ["kind", "limit", "cursor"]
6242
6250
  }),
6251
+ route("people follows theses", "people follows theses", {
6252
+ values: ["cursor"]
6253
+ }),
6243
6254
  route("people follows follow", "people follows follow", {
6244
6255
  values: ["kind", "id"]
6245
6256
  }),
@@ -6670,7 +6681,7 @@ Examples:
6670
6681
  alva for-you theses --cursor '<nextCursor>'`,
6671
6682
  thesis: `Usage: alva thesis <subcommand> [options]
6672
6683
 
6673
- Subcommands: list, related, asset-candidates, create, get, version get, signals, watchpoints, set-visibility, archive, star, unstar, set-signal-enabled, update, rewrite.
6684
+ Subcommands: list, related, asset-candidates, create, get, version get, signals, watchpoints, set-visibility, archive, star, unstar, set-signal-enabled, signal-preferences get|set, update, rewrite.
6674
6685
 
6675
6686
  list --person <slug> | --person-name <name> | --user <username>
6676
6687
  | --ticker <ticker> | --entity-id <id>
@@ -6694,10 +6705,22 @@ the Thesis return switch (askSwitch) and whether the draft would be rejected
6694
6705
  (lastLegRemoved). Publish with create/update --entity-ids <id,id> and
6695
6706
  --entity-stances <json> equal to returnPreview.directions, lowercased:
6696
6707
  --entity-stances '[{"entity_id":"745337","stance":"bearish"}]'. Valid stances:
6697
- unknown, bullish, bearish, none. --track-return false turns the Thesis return
6708
+ unknown, bullish, bearish, none. An optional "weight" (a fraction, 0.4 is 40%,
6709
+ at most four decimals) sets that long or short's share and the rest is cash:
6710
+ give one to every bullish or bearish entity or to none; without weights the
6711
+ shares follow the default rules and what the body says, and get shows weight
6712
+ only on an Update published with weights. --track-return false turns the Thesis return
6698
6713
  off for good; it is accepted only while the switch is UNSET.
6714
+ create --signal-kinds <kind,kind> --signal-min-importance all|notable|major
6715
+ limits which Signals the new Thesis shows (omit both: every Signal). Kinds:
6716
+ fundamentals, macro, technicals, commentary.
6717
+ signal-preferences get [--id <id>] reads which Signals your Thesis shows
6718
+ (without --id: your last saved setting); signal-preferences set --id <id>
6719
+ [--kinds <kind,kind>] [--min-importance all|notable|major] changes only what is
6720
+ given, for every reader of that Thesis. Author only.
6699
6721
  return --id <id> [--detail] reads the Thesis return (fractions; --detail adds
6700
- each Update's positions).
6722
+ each Update's positions with their weight and the allocation: the current
6723
+ target shares and cash, not drifted with prices).
6701
6724
  watchpoints --id <thesis-id> lists every watchpoint of the Thesis (the same id
6702
6725
  as get and signals). A watchpoint is one thing the Thesis depends on, or that
6703
6726
  would show it right or wrong; Alva's Signal research checks each new source
@@ -6796,16 +6819,18 @@ resolves. add re-adds a ticker the user removed earlier. list takes
6796
6819
 
6797
6820
  Subcommands:
6798
6821
  search --query <text> [--kind user|person] [--limit <1-50>]
6799
- follows list|follow|unfollow
6822
+ follows list|theses|follow|unfollow
6800
6823
 
6801
6824
  USER is an Alva user; PERSON is a curated person (KOL). follow/unfollow take
6802
6825
  --kind and --id from search or list results. Search is a prefix match on
6803
6826
  name, username, or slug. Follow only an exact match; when several profiles
6804
6827
  match, ask the user which one. Act only when the user asks to follow or
6805
6828
  unfollow.`,
6806
- "people follows": `Usage: alva people follows <list|follow|unfollow> [options]
6829
+ "people follows": `Usage: alva people follows <list|theses|follow|unfollow> [options]
6807
6830
 
6808
6831
  list: [--kind user|person] [--limit <1-50>] [--cursor <pageInfo.endCursor>]
6832
+ theses: [--cursor <next_cursor>] Thesis Updates by followed profiles in the
6833
+ order they reached Alva; page while has_more, keep the last next_cursor
6809
6834
  follow|unfollow: --kind user|person --id <profile id>`,
6810
6835
  "trading-pairs": `Usage: alva trading-pairs <subcommand>
6811
6836
 
@@ -7216,103 +7241,8 @@ function validateXReadParams(params) {
7216
7241
  }
7217
7242
  }
7218
7243
 
7219
- // src/resources/follows.ts
7220
- var MAX_TICKERS = 50;
7221
- var MAX_TICKER_LENGTH = 40;
7222
- var MAX_PROFILE_FIRST = 50;
7223
- var MAX_PROFILE_QUERY_LENGTH = 200;
7224
- var TICKER_KINDS = ["STOCK", "ETF", "CRYPTO"];
7225
- var PROFILE_KINDS = ["USER", "PERSON"];
7226
- function record2(value) {
7227
- return typeof value === "object" && value !== null && !Array.isArray(value);
7228
- }
7229
- function boundedFirst(value, max, name = "first") {
7230
- if (value === void 0) return void 0;
7231
- if (!Number.isInteger(value) || value < 1 || value > max) {
7232
- throw new Error(`${name} must be an integer between 1 and ${max}`);
7233
- }
7234
- return value;
7235
- }
7236
- function profileKind(value, required) {
7237
- if (value === void 0 && !required) return void 0;
7238
- if (typeof value !== "string" || !PROFILE_KINDS.includes(value)) {
7239
- throw new Error("kind must be USER or PERSON");
7240
- }
7241
- return value;
7242
- }
7243
- function tickerKind(value) {
7244
- if (value === void 0) return void 0;
7245
- if (typeof value !== "string" || !TICKER_KINDS.includes(value)) {
7246
- throw new Error("kind must be STOCK, ETF, or CRYPTO");
7247
- }
7248
- return value;
7249
- }
7250
- function parseTickerSpec(raw) {
7251
- const separator = raw.lastIndexOf(":");
7252
- if (separator === -1) return { ticker: raw };
7253
- return {
7254
- ticker: raw.slice(0, separator),
7255
- kind: tickerKind(
7256
- raw.slice(separator + 1).trim().toUpperCase()
7257
- )
7258
- };
7259
- }
7260
- function normalizeWatchlistTickersParams(params) {
7261
- if (!record2(params) || !Array.isArray(params.tickers)) {
7262
- throw new Error("tickers must be a list of ticker symbols");
7263
- }
7264
- const defaultKind = tickerKind(params.kind);
7265
- const tickers = [];
7266
- for (const raw of params.tickers) {
7267
- const spec = typeof raw === "string" ? { ticker: raw } : raw;
7268
- if (!record2(spec) || typeof spec.ticker !== "string") {
7269
- throw new Error("tickers must be symbols or {ticker, kind} specs");
7270
- }
7271
- const ticker = spec.ticker.trim().toUpperCase();
7272
- if (!ticker || /\s/.test(ticker) || ticker.length > MAX_TICKER_LENGTH) {
7273
- throw new Error(
7274
- `ticker '${spec.ticker}' must be a non-empty symbol of at most ${MAX_TICKER_LENGTH} characters`
7275
- );
7276
- }
7277
- const kind = tickerKind(spec.kind) ?? defaultKind;
7278
- if (!tickers.some((t) => t.ticker === ticker && t.kind === kind)) {
7279
- tickers.push(kind === void 0 ? { ticker } : { ticker, kind });
7280
- }
7281
- }
7282
- if (tickers.length === 0 || tickers.length > MAX_TICKERS) {
7283
- throw new Error(
7284
- `tickers must contain between 1 and ${MAX_TICKERS} symbols`
7285
- );
7286
- }
7287
- return { tickers };
7288
- }
7289
- function validateProfileRef(params) {
7290
- if (!record2(params)) throw new Error("profile reference must be an object");
7291
- const kind = profileKind(params.kind, true);
7292
- if (typeof params.id !== "string" || !/^[1-9]\d{0,18}$/.test(params.id)) {
7293
- throw new Error("id must be a positive decimal profile id");
7294
- }
7295
- return { kind, id: params.id };
7296
- }
7297
- function validateSearchProfilesParams(params) {
7298
- if (!record2(params) || typeof params.query !== "string") {
7299
- throw new Error("query is required");
7300
- }
7301
- const query = params.query.trim();
7302
- if (!query || query.length > MAX_PROFILE_QUERY_LENGTH) {
7303
- throw new Error(
7304
- `query must be non-empty and at most ${MAX_PROFILE_QUERY_LENGTH} characters`
7305
- );
7306
- }
7307
- return {
7308
- query,
7309
- kind: profileKind(params.kind, false),
7310
- first: boundedFirst(params.first, MAX_PROFILE_FIRST)
7311
- };
7312
- }
7313
-
7314
7244
  // src/resources/thesisPublication.ts
7315
- function record3(value) {
7245
+ function record2(value) {
7316
7246
  return typeof value === "object" && value !== null && !Array.isArray(value);
7317
7247
  }
7318
7248
  function isPositiveInt64(value) {
@@ -7385,7 +7315,7 @@ var SELECTORS = [
7385
7315
  "entityId"
7386
7316
  ];
7387
7317
  function validateThesisPageParams(params) {
7388
- if (!record3(params)) throw argument("Thesis parameters must be an object");
7318
+ if (!record2(params)) throw argument("Thesis parameters must be an object");
7389
7319
  const first = params.first === void 0 ? 10 : params.first;
7390
7320
  if (typeof first !== "number" || !Number.isInteger(first) || first < 1 || first > 50) {
7391
7321
  throw argument("first must be an integer between 1 and 50");
@@ -7421,6 +7351,110 @@ function argument(message) {
7421
7351
  return new AlvaError("INVALID_ARGUMENT", message, 400);
7422
7352
  }
7423
7353
 
7354
+ // src/resources/theses.ts
7355
+ var THESIS_SIGNAL_KINDS = [
7356
+ "fundamentals",
7357
+ "macro",
7358
+ "technicals",
7359
+ "commentary"
7360
+ ];
7361
+ var encoder = new TextEncoder();
7362
+
7363
+ // src/resources/follows.ts
7364
+ var MAX_TICKERS = 50;
7365
+ var MAX_TICKER_LENGTH = 40;
7366
+ var MAX_PROFILE_FIRST = 50;
7367
+ var MAX_PROFILE_QUERY_LENGTH = 200;
7368
+ var TICKER_KINDS = ["STOCK", "ETF", "CRYPTO"];
7369
+ var PROFILE_KINDS = ["USER", "PERSON"];
7370
+ function record3(value) {
7371
+ return typeof value === "object" && value !== null && !Array.isArray(value);
7372
+ }
7373
+ function boundedFirst(value, max, name = "first") {
7374
+ if (value === void 0) return void 0;
7375
+ if (!Number.isInteger(value) || value < 1 || value > max) {
7376
+ throw new Error(`${name} must be an integer between 1 and ${max}`);
7377
+ }
7378
+ return value;
7379
+ }
7380
+ function profileKind(value, required) {
7381
+ if (value === void 0 && !required) return void 0;
7382
+ if (typeof value !== "string" || !PROFILE_KINDS.includes(value)) {
7383
+ throw new Error("kind must be USER or PERSON");
7384
+ }
7385
+ return value;
7386
+ }
7387
+ function tickerKind(value) {
7388
+ if (value === void 0) return void 0;
7389
+ if (typeof value !== "string" || !TICKER_KINDS.includes(value)) {
7390
+ throw new Error("kind must be STOCK, ETF, or CRYPTO");
7391
+ }
7392
+ return value;
7393
+ }
7394
+ function parseTickerSpec(raw) {
7395
+ const separator = raw.lastIndexOf(":");
7396
+ if (separator === -1) return { ticker: raw };
7397
+ return {
7398
+ ticker: raw.slice(0, separator),
7399
+ kind: tickerKind(
7400
+ raw.slice(separator + 1).trim().toUpperCase()
7401
+ )
7402
+ };
7403
+ }
7404
+ function normalizeWatchlistTickersParams(params) {
7405
+ if (!record3(params) || !Array.isArray(params.tickers)) {
7406
+ throw new Error("tickers must be a list of ticker symbols");
7407
+ }
7408
+ const defaultKind = tickerKind(params.kind);
7409
+ const tickers = [];
7410
+ for (const raw of params.tickers) {
7411
+ const spec = typeof raw === "string" ? { ticker: raw } : raw;
7412
+ if (!record3(spec) || typeof spec.ticker !== "string") {
7413
+ throw new Error("tickers must be symbols or {ticker, kind} specs");
7414
+ }
7415
+ const ticker = spec.ticker.trim().toUpperCase();
7416
+ if (!ticker || /\s/.test(ticker) || ticker.length > MAX_TICKER_LENGTH) {
7417
+ throw new Error(
7418
+ `ticker '${spec.ticker}' must be a non-empty symbol of at most ${MAX_TICKER_LENGTH} characters`
7419
+ );
7420
+ }
7421
+ const kind = tickerKind(spec.kind) ?? defaultKind;
7422
+ if (!tickers.some((t) => t.ticker === ticker && t.kind === kind)) {
7423
+ tickers.push(kind === void 0 ? { ticker } : { ticker, kind });
7424
+ }
7425
+ }
7426
+ if (tickers.length === 0 || tickers.length > MAX_TICKERS) {
7427
+ throw new Error(
7428
+ `tickers must contain between 1 and ${MAX_TICKERS} symbols`
7429
+ );
7430
+ }
7431
+ return { tickers };
7432
+ }
7433
+ function validateProfileRef(params) {
7434
+ if (!record3(params)) throw new Error("profile reference must be an object");
7435
+ const kind = profileKind(params.kind, true);
7436
+ if (typeof params.id !== "string" || !/^[1-9]\d{0,18}$/.test(params.id)) {
7437
+ throw new Error("id must be a positive decimal profile id");
7438
+ }
7439
+ return { kind, id: params.id };
7440
+ }
7441
+ function validateSearchProfilesParams(params) {
7442
+ if (!record3(params) || typeof params.query !== "string") {
7443
+ throw new Error("query is required");
7444
+ }
7445
+ const query = params.query.trim();
7446
+ if (!query || query.length > MAX_PROFILE_QUERY_LENGTH) {
7447
+ throw new Error(
7448
+ `query must be non-empty and at most ${MAX_PROFILE_QUERY_LENGTH} characters`
7449
+ );
7450
+ }
7451
+ return {
7452
+ query,
7453
+ kind: profileKind(params.kind, false),
7454
+ first: boundedFirst(params.first, MAX_PROFILE_FIRST)
7455
+ };
7456
+ }
7457
+
7424
7458
  // src/resources/forYou.ts
7425
7459
  var FOR_YOU_QUERY = `
7426
7460
  query ToolkitForYou($input: FeedEntryConnectionInput) {
@@ -7451,7 +7485,7 @@ query ToolkitForYou($input: FeedEntryConnectionInput) {
7451
7485
  }
7452
7486
  `.trim();
7453
7487
  function validateForYouListParams(params) {
7454
- if (!record3(params)) throw new Error("For You parameters must be an object");
7488
+ if (!record2(params)) throw new Error("For You parameters must be an object");
7455
7489
  const first = params.first === void 0 ? 20 : params.first;
7456
7490
  if (typeof first !== "number" || !Number.isInteger(first) || first < 1 || first > 50) {
7457
7491
  throw new Error("first must be an integer between 1 and 50");
@@ -7486,7 +7520,7 @@ query ToolkitForYouTheses($input: ThesisRecommendationInput) {
7486
7520
  }
7487
7521
  `.trim();
7488
7522
  function validateForYouThesesParams(params) {
7489
- if (!record3(params)) throw new Error("Thesis parameters must be an object");
7523
+ if (!record2(params)) throw new Error("Thesis parameters must be an object");
7490
7524
  const first = params.first === void 0 ? 10 : params.first;
7491
7525
  if (typeof first !== "number" || !Number.isInteger(first) || first < 1 || first > 10) {
7492
7526
  throw new Error("first must be an integer between 1 and 10");
@@ -7714,7 +7748,7 @@ var COMMAND_DEFINITIONS = [
7714
7748
  // deeper leaves.
7715
7749
  command("auth"),
7716
7750
  command("auth login", {
7717
- values: ["profile", "auth-url", "base-url"],
7751
+ values: ["profile", "auth-url", "base-url", "agent"],
7718
7752
  booleans: ["browser", "no-browser"]
7719
7753
  }),
7720
7754
  command("whoami"),
@@ -7844,7 +7878,9 @@ var COMMAND_DEFINITIONS = [
7844
7878
  "entity-stances",
7845
7879
  "tickers",
7846
7880
  "visibility",
7847
- "track-return"
7881
+ "track-return",
7882
+ "signal-kinds",
7883
+ "signal-min-importance"
7848
7884
  ],
7849
7885
  booleans: ["body-stdin"]
7850
7886
  }),
@@ -7878,6 +7914,10 @@ var COMMAND_DEFINITIONS = [
7878
7914
  command("thesis star", { values: ["id"] }),
7879
7915
  command("thesis unstar", { values: ["id"] }),
7880
7916
  command("thesis set-signal-enabled", { values: ["id", "enabled"] }),
7917
+ command("thesis signal-preferences get", { values: ["id"] }),
7918
+ command("thesis signal-preferences set", {
7919
+ values: ["id", "kinds", "min-importance"]
7920
+ }),
7881
7921
  command("thesis update", {
7882
7922
  values: [
7883
7923
  "id",
@@ -8205,6 +8245,7 @@ var COMMAND_DEFINITIONS = [
8205
8245
  command("people search", { values: ["query", "kind", "limit"] }),
8206
8246
  command("people follows"),
8207
8247
  command("people follows list", { values: ["kind", "limit", "cursor"] }),
8248
+ command("people follows theses", { values: ["cursor"] }),
8208
8249
  command("people follows follow", { values: ["kind", "id"] }),
8209
8250
  command("people follows unfollow", { values: ["kind", "id"] }),
8210
8251
  command("trading-pairs search", {
@@ -12036,7 +12077,7 @@ function formatTradingPairResolved(result) {
12036
12077
  }
12037
12078
 
12038
12079
  // src/cli/dispatch.ts
12039
- var CLI_VERSION = true ? "0.37.0" : "dev";
12080
+ var CLI_VERSION = true ? "0.38.0-beta.1" : "dev";
12040
12081
  var DEFAULT_RUN_TIMEOUT_MS = 6e5;
12041
12082
  var RUN_TIMEOUT_ENV = "ALVA_RUN_TIMEOUT_MS";
12042
12083
  var GLOBAL_VALUE_FLAGS = Object.entries(GLOBAL_FLAG_DEFINITIONS).filter(([, kind]) => kind === "value").map(([name]) => `--${name}`);
@@ -12154,7 +12195,7 @@ Examples:
12154
12195
  alva configure --api-key alva_abc123 --base-url http://localhost:8080
12155
12196
  alva configure --profile staging --api-key alva_stg_key --base-url https://api-llm.stg.alva.ai
12156
12197
  alva --profile staging whoami`,
12157
- auth: `Usage: alva auth login [--browser | --no-browser] [--profile <name>]
12198
+ auth: `Usage: alva auth login [--browser | --no-browser] [--profile <name>] [--agent <name>]
12158
12199
 
12159
12200
  By default, opens a browser locally and listens for the OAuth callback. Use
12160
12201
  --no-browser for SSH / container / headless environments \u2014 alva will print
@@ -12171,12 +12212,16 @@ Flags:
12171
12212
  --browser Force the local browser + 127.0.0.1 callback flow
12172
12213
  --no-browser Force the paste-code flow (no local listener)
12173
12214
  --profile <name> Profile name to save credentials under (default: "default")
12215
+ --agent <name> The AI agent signing in, e.g. "Claude Code" or "Grok bot".
12216
+ The new key is named "<agent> \xB7 <computer>"; without it
12217
+ the agent is detected from the environment when it can be.
12174
12218
 
12175
12219
  Examples:
12176
12220
  alva auth login # auto-detect
12177
12221
  alva auth login --no-browser # force paste-code flow
12178
12222
  alva auth login --browser # force browser flow
12179
- alva auth login --profile staging`,
12223
+ alva auth login --profile staging
12224
+ alva auth login --agent "Codex"`,
12180
12225
  whoami: `Usage: alva whoami [--profile <name>]
12181
12226
 
12182
12227
  Verify that your credentials are valid by calling the Alva API. Shows your
@@ -13327,6 +13372,7 @@ person. These change the same Following list the user sees in the Alva App.
13327
13372
  Subcommands:
13328
13373
  search Prefix match on name, username, slug, or alias
13329
13374
  follows list List the profiles the caller follows
13375
+ follows theses Thesis Updates by followed profiles, oldest arrival first
13330
13376
  follows follow Follow one profile (idempotent)
13331
13377
  follows unfollow Unfollow one profile (idempotent)
13332
13378
 
@@ -13336,12 +13382,15 @@ Flags:
13336
13382
  required, from a search or list result
13337
13383
  --id <id> follow/unfollow: profile id (required)
13338
13384
  --limit <1-50> search/list: page size
13339
- --cursor <endCursor> list: pageInfo.endCursor of the previous page
13385
+ --cursor <endCursor> list: pageInfo.endCursor of the previous page;
13386
+ theses: next_cursor of the previous read (omitted:
13387
+ the last 24 hours)
13340
13388
 
13341
13389
  Examples:
13342
13390
  alva people search --query "cathie wood" --kind person
13343
13391
  alva people follows follow --kind person --id 42
13344
- alva people follows list`,
13392
+ alva people follows list
13393
+ alva people follows theses --cursor <next_cursor>`,
13345
13394
  "trading-pairs": `Usage: alva trading-pairs <subcommand> [options]
13346
13395
 
13347
13396
  Discover canonical trading-pair identities before backtesting or trading.
@@ -13469,6 +13518,7 @@ Subcommands:
13469
13518
  star Add the Thesis to your bookmarks
13470
13519
  unstar Remove the Thesis from your bookmarks
13471
13520
  set-signal-enabled Enable or disable managed Signal research
13521
+ signal-preferences get|set Read or change which Signals your Thesis shows
13472
13522
  update Publish a new Update replacing body, title, entities, visibility (all sent in full);
13473
13523
  with --archived false it also unarchives the Thesis
13474
13524
  rewrite Explicitly request a candidate body rewrite; never called by another command
@@ -13485,7 +13535,9 @@ the backend; do not send a fresh ID. Create defaults --visibility to public.
13485
13535
  Update requires --visibility explicitly so it cannot inadvertently publish.
13486
13536
 
13487
13537
  Other flags:
13488
- create --request-id <uuid> --body ... [--images <json-array-of-https-urls>] [--title <text>] [--tickers <ticker,ticker>] [--entity-ids <id,id>] [--entity-stances <json>] [--visibility <value>] [--track-return true|false]
13538
+ create --request-id <uuid> --body ... [--images <json-array-of-https-urls>] [--title <text>] [--tickers <ticker,ticker>] [--entity-ids <id,id>] [--entity-stances <json>] [--visibility <value>] [--track-return true|false] [--signal-kinds <kind,kind>] [--signal-min-importance all|notable|major]
13539
+ Signals: omit both to show every Signal. Kinds: fundamentals, macro,
13540
+ technicals, commentary; with only one flag the other keeps its default.
13489
13541
  Images: public creation only, at most 20 in display order. Upload selected files
13490
13542
  with the existing host upload tool after publication confirmation. Private
13491
13543
  images and local/ALFS paths are not supported; this flag does not upload.
@@ -13526,6 +13578,13 @@ Other flags:
13526
13578
  archive --id <id> --request-id <uuid> [--note <text>]
13527
13579
  star|unstar --id <id>
13528
13580
  set-signal-enabled --id <id> --enabled true|false
13581
+ signal-preferences get [--id <id>]
13582
+ Which Signals your Thesis shows to every reader: {thesis_id, preferences:
13583
+ {kinds, min_importance}}. Without --id: the setting you last saved, which
13584
+ prefills a new Thesis. Only the author can read or set it.
13585
+ signal-preferences set --id <id> [--kinds <kind,kind>] [--min-importance all|notable|major]
13586
+ Changes only what is given. Applies to every reader, the Thesis's
13587
+ deliveries and, from its next daily run, its Overview.
13529
13588
 
13530
13589
  Maintenance behavior:
13531
13590
  archive reads the current Thesis first, preserves its body, title,
@@ -13884,6 +13943,14 @@ function dispatchPeople(client, path, flags) {
13884
13943
  first: optionalBoundedIntegerFlag(flags, "limit", command2, 1, 50),
13885
13944
  after: usageChecked(command2, () => optionalCursorFlag(flags["cursor"]))
13886
13945
  });
13946
+ case "follows theses":
13947
+ return client.follows.theses({
13948
+ cursor: usageChecked(
13949
+ command2,
13950
+ () => optionalCursorFlag(flags["cursor"])
13951
+ ),
13952
+ first: 100
13953
+ });
13887
13954
  case "follows follow":
13888
13955
  case "follows unfollow": {
13889
13956
  const params = usageChecked(
@@ -14413,6 +14480,22 @@ function thesisImages(flags) {
14413
14480
  "thesis"
14414
14481
  );
14415
14482
  }
14483
+ function thesisSignalKindList(raw, flag) {
14484
+ const kinds = raw.split(",").map((kind) => kind.trim());
14485
+ if (kinds.some((kind) => kind === "")) {
14486
+ throw new CliUsageError(`${flag} must not contain empty kinds`, "thesis");
14487
+ }
14488
+ return kinds;
14489
+ }
14490
+ function thesisCreateSignalPreferences(flags) {
14491
+ const kinds = flags["signal-kinds"];
14492
+ const minImportance = flags["signal-min-importance"];
14493
+ if (kinds === void 0 && minImportance === void 0) return void 0;
14494
+ return {
14495
+ kinds: kinds === void 0 ? [...THESIS_SIGNAL_KINDS] : thesisSignalKindList(kinds, "--signal-kinds"),
14496
+ min_importance: minImportance ?? "all"
14497
+ };
14498
+ }
14416
14499
  function thesisTrackReturn(flags, command2) {
14417
14500
  const raw = flags["track-return"];
14418
14501
  if (raw === void 0) return void 0;
@@ -15087,7 +15170,8 @@ async function executeParsedCommand(client, parsedCommand, meta, deps) {
15087
15170
  entity_stances: thesisEntityStances(flags),
15088
15171
  tickers: thesisTickers(flags),
15089
15172
  visibility: flags.visibility === void 0 ? "public" : thesisCreateVisibility(flags.visibility),
15090
- track_return: thesisTrackReturn(flags, "thesis create")
15173
+ track_return: thesisTrackReturn(flags, "thesis create"),
15174
+ signal_preferences: thesisCreateSignalPreferences(flags)
15091
15175
  });
15092
15176
  case "asset-candidates":
15093
15177
  return client.theses.assetCandidates(
@@ -15192,6 +15276,23 @@ async function executeParsedCommand(client, parsedCommand, meta, deps) {
15192
15276
  requireFlag(flags, "id", "thesis unstar"),
15193
15277
  false
15194
15278
  );
15279
+ case "signal-preferences": {
15280
+ if (parsedCommand.path[2] === "get") {
15281
+ return client.theses.getSignalPreferences(flags.id);
15282
+ }
15283
+ const id = requireFlag(flags, "id", "thesis signal-preferences set");
15284
+ if (flags.kinds === void 0 && flags["min-importance"] === void 0) {
15285
+ throw new CliUsageError(
15286
+ "thesis signal-preferences set needs --kinds or --min-importance",
15287
+ "thesis"
15288
+ );
15289
+ }
15290
+ const current = await client.theses.getSignalPreferences(id);
15291
+ return client.theses.setSignalPreferences(id, {
15292
+ kinds: flags.kinds === void 0 ? current.preferences.kinds : thesisSignalKindList(flags.kinds, "--kinds"),
15293
+ min_importance: flags["min-importance"] === void 0 ? current.preferences.min_importance : flags["min-importance"]
15294
+ });
15295
+ }
15195
15296
  case "set-signal-enabled":
15196
15297
  return client.theses.setSignalEnabled(
15197
15298
  requireFlag(flags, "id", "thesis set-signal-enabled"),