@alva-ai/toolkit 0.28.1-beta.1 → 0.31.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.
@@ -549,6 +549,8 @@ interface PlaybookDraftResponse {
549
549
  playbook_path: string;
550
550
  }
551
551
  interface PlaybookReleaseRequest {
552
+ /** Explicit consent to deliver bundled non-public Feeds to the Playbook audience. */
553
+ confirm_bundled_feed_exposure?: boolean;
552
554
  name: string;
553
555
  version: string;
554
556
  feeds: Array<{
@@ -1329,11 +1331,121 @@ interface ForYouConnection {
1329
1331
  hasPreviousPage: boolean;
1330
1332
  };
1331
1333
  }
1334
+ interface ForYouThesesParams {
1335
+ first?: number;
1336
+ after?: string;
1337
+ }
1338
+ /** Interface fields shared by user and curated-person publisher profiles. */
1339
+ interface ThesisPublisher {
1340
+ id: string;
1341
+ displayName: string;
1342
+ avatarUrl: string;
1343
+ bio: string;
1344
+ followersCount: number;
1345
+ viewerState: {
1346
+ following: boolean | null;
1347
+ };
1348
+ }
1349
+ interface ThesisSourceReference {
1350
+ title: string | null;
1351
+ sourceKind: string;
1352
+ sourceContentId: string;
1353
+ publicUrl: string;
1354
+ sourceTimeMs: number | null;
1355
+ locator: string;
1356
+ }
1357
+ /** The exact author version this recommendation renders, not the mutable Thesis. */
1358
+ interface ThesisPublicationSummary {
1359
+ thesisId: string;
1360
+ playbookId: string;
1361
+ authorVersionId: string;
1362
+ materialVersionId: string;
1363
+ itemKey: string;
1364
+ title: string;
1365
+ body: string;
1366
+ publishedAtMs: number;
1367
+ changeKind: string;
1368
+ visibility: string;
1369
+ closed: boolean;
1370
+ archived: boolean;
1371
+ note: string;
1372
+ closingNote: string;
1373
+ researchPaused: boolean;
1374
+ entityIds: string[];
1375
+ categoryIds: string[];
1376
+ /** `stance` is UNKNOWN, BULLISH or BEARISH today; Gateway may add values. */
1377
+ entityStances: {
1378
+ entityId: string;
1379
+ stance: string;
1380
+ }[];
1381
+ entities: {
1382
+ id: string;
1383
+ ticker: string;
1384
+ name: string;
1385
+ }[];
1386
+ publisher: ThesisPublisher;
1387
+ /** `type` is PRICE_CHART, IMAGE, AUDIO or VIDEO today; Gateway may add values. */
1388
+ medias: {
1389
+ type: string;
1390
+ coverUrl: string;
1391
+ url: string | null;
1392
+ }[];
1393
+ signalFeed: {
1394
+ id: string;
1395
+ } | null;
1396
+ snapshotRelease: {
1397
+ versionId: string;
1398
+ materialVersionId: string;
1399
+ publishedAtMs: number;
1400
+ changeKind: string;
1401
+ sourceRefs: ThesisSourceReference[];
1402
+ };
1403
+ }
1404
+ interface ThesisRecommendation {
1405
+ itemKey: string;
1406
+ publication: ThesisPublicationSummary;
1407
+ }
1408
+ /**
1409
+ * A ranked page, not a chronological one. `exhausted` is the only end of the
1410
+ * candidate pool; `scanLimited` means this page stopped at its scan budget and
1411
+ * more remains. A page may be empty while `hasNextPage` is still true, because
1412
+ * `endCursor` advances past scanned references that current visibility hides.
1413
+ *
1414
+ * `edges` is the only carrier. Gateway also returns an `items` list built from
1415
+ * the same nodes, but selecting it would put every publication body on the
1416
+ * wire twice for no extra information, so this read does not request it.
1417
+ */
1418
+ interface ThesisRecommendationPage {
1419
+ edges: {
1420
+ cursor: string;
1421
+ node: ThesisRecommendation;
1422
+ }[];
1423
+ pageInfo: {
1424
+ startCursor: string;
1425
+ endCursor: string;
1426
+ hasNextPage: boolean;
1427
+ hasPreviousPage: boolean;
1428
+ };
1429
+ listId: string;
1430
+ pageCursor: string;
1431
+ nextCursor: string | null;
1432
+ exhausted: boolean;
1433
+ scanLimited: boolean;
1434
+ }
1332
1435
  declare class ForYouResource {
1333
1436
  private client;
1334
1437
  constructor(client: AlvaClient);
1335
1438
  /** One newest-first page. Does not truncate content or advance a watermark. */
1336
1439
  list(params?: ForYouListParams): Promise<ForYouConnection>;
1440
+ /**
1441
+ * One ranked page of Thesis recommendations -- the stream the Feed App reads,
1442
+ * which is not the chronological `list` stream. Page to `exhausted` and filter
1443
+ * on `publication.publishedAtMs` yourself; the order is slot-mixed, so a time
1444
+ * bound is never a reason to stop paging. Publications the viewer already saw
1445
+ * are withheld by an upstream cooldown, so a window read is "recommended and
1446
+ * recent", not every publication in the window.
1447
+ */
1448
+ theses(params?: ForYouThesesParams): Promise<ThesisRecommendationPage>;
1337
1449
  }
1338
1450
 
1339
1451
  /**
@@ -2215,7 +2327,8 @@ interface StewardForwardParams extends StewardTarget {
2215
2327
  }
2216
2328
  interface StewardSendParams extends StewardTarget {
2217
2329
  body: string;
2218
- deliveryIds: string[];
2330
+ /** Omit or pass [] for a For-You-only Brief that covers no ledger delivery. */
2331
+ deliveryIds?: string[];
2219
2332
  requestId?: string;
2220
2333
  }
2221
2334
  type StewardSourceKind = 'FEED' | 'MARKET_ENTITY' | 'THESIS_FEED';
@@ -2315,6 +2428,27 @@ declare class TradingPairsResource {
2315
2428
  /** Thesis IDs are signed int64 values represented losslessly as decimal strings. */
2316
2429
  type ThesisID = string;
2317
2430
  type ThesisVisibility = 'public' | 'private';
2431
+ type ThesisAssetStance = 'unknown' | 'bullish' | 'bearish';
2432
+ interface ThesisEntityStance {
2433
+ entity_id: ThesisID;
2434
+ stance: ThesisAssetStance;
2435
+ }
2436
+ interface ThesisAssetCandidate {
2437
+ entityId: ThesisID;
2438
+ ticker: string;
2439
+ name: string;
2440
+ kind: 'STOCK' | 'ETF' | 'CRYPTO' | 'INDEX';
2441
+ }
2442
+ interface ThesisAssetMention {
2443
+ quote: string;
2444
+ ticker: string;
2445
+ resolution: 'RESOLVED' | 'AMBIGUOUS' | 'UNRESOLVED';
2446
+ stance: 'UNKNOWN' | 'BULLISH' | 'BEARISH';
2447
+ candidates: ThesisAssetCandidate[];
2448
+ }
2449
+ interface ThesisAssetCandidatesResponse {
2450
+ mentions: ThesisAssetMention[];
2451
+ }
2318
2452
  /** Canonical server-supported candidate rewrite operation. */
2319
2453
  type ThesisRewriteMode = 'reformat' | 'shorten' | 'enrich';
2320
2454
  interface Thesis {
@@ -2324,6 +2458,7 @@ interface Thesis {
2324
2458
  title: string;
2325
2459
  body: string;
2326
2460
  entity_ids: ThesisID[];
2461
+ entity_stances?: ThesisEntityStance[];
2327
2462
  visibility: ThesisVisibility;
2328
2463
  closed: boolean;
2329
2464
  closing_note: string;
@@ -2351,12 +2486,56 @@ interface ThesisGetResponse extends ThesisResponse {
2351
2486
  author: ThesisAuthor;
2352
2487
  entities: ThesisEntity[];
2353
2488
  }
2489
+ interface ThesisResearchStatus {
2490
+ state: string;
2491
+ pending_work: number;
2492
+ read_complete: boolean;
2493
+ last_attempt_ms?: number;
2494
+ last_completed_ms?: number;
2495
+ }
2496
+ interface ThesisSignalEvidenceExcerpt {
2497
+ text: string;
2498
+ omitted_before: boolean;
2499
+ omitted_after: boolean;
2500
+ }
2501
+ interface ThesisSignalSource {
2502
+ title: string;
2503
+ url?: string;
2504
+ published_at_ms?: number;
2505
+ }
2506
+ interface ThesisSignal {
2507
+ id: ThesisID;
2508
+ thesis_id: ThesisID;
2509
+ author_version_id: ThesisID;
2510
+ statement_snapshot: string;
2511
+ stance: string;
2512
+ explanation: string;
2513
+ information_kind: string;
2514
+ evidence_excerpt?: ThesisSignalEvidenceExcerpt;
2515
+ source: ThesisSignalSource;
2516
+ }
2517
+ interface ThesisSignalEntry {
2518
+ feed_entry_id: ThesisID;
2519
+ cursor: string;
2520
+ signal: ThesisSignal;
2521
+ }
2522
+ interface ListThesisSignalsParams {
2523
+ first?: number;
2524
+ cursor?: string;
2525
+ }
2526
+ interface ThesisSignalsResponse {
2527
+ research: ThesisResearchStatus;
2528
+ entries: ThesisSignalEntry[];
2529
+ next_cursor: string;
2530
+ }
2354
2531
  interface CreateThesisParams {
2355
2532
  /** Caller-supplied, stable non-zero UUID. Reuse it only to resolve ambiguity. */
2356
2533
  request_id: string;
2357
2534
  body: string;
2358
2535
  title?: string;
2359
2536
  entity_ids?: ThesisID[];
2537
+ /** Author direction keyed by an entity ID also supplied in entity_ids. */
2538
+ entity_stances?: ThesisEntityStance[];
2360
2539
  /** Exact STOCK ticker symbols resolved by Backend during creation. */
2361
2540
  tickers?: string[];
2362
2541
  /** Omitted means public, as defined by the REST contract. */
@@ -2395,8 +2574,11 @@ interface RewriteThesisResponse {
2395
2574
  declare class ThesesResource {
2396
2575
  private client;
2397
2576
  constructor(client: AlvaClient);
2577
+ assetCandidates(text: string): Promise<ThesisAssetCandidatesResponse>;
2398
2578
  create(params: CreateThesisParams): Promise<ThesisResponse>;
2399
2579
  get(id: ThesisID): Promise<ThesisGetResponse>;
2580
+ getVersion(id: ThesisID, authorVersionID: ThesisID): Promise<ThesisResponse>;
2581
+ signals(id: ThesisID, params?: ListThesisSignalsParams): Promise<ThesisSignalsResponse>;
2400
2582
  update(id: ThesisID, params: UpdateThesisParams): Promise<ThesisResponse>;
2401
2583
  setVisibility(id: ThesisID, params: SetThesisVisibilityParams): Promise<ThesisResponse>;
2402
2584
  close(id: ThesisID, params: CloseThesisParams): Promise<ThesisResponse>;
package/dist/dispatch.js CHANGED
@@ -6057,11 +6057,21 @@ var EMBEDDED_COMMAND_DEFINITIONS = [
6057
6057
  "body",
6058
6058
  "title",
6059
6059
  "entity-ids",
6060
+ "entity-stances",
6060
6061
  "tickers",
6061
6062
  "visibility"
6062
6063
  ]
6063
6064
  }),
6065
+ route("thesis asset-candidates", "thesis asset-candidates", {
6066
+ values: ["text"]
6067
+ }),
6064
6068
  route("thesis get", "thesis get", { values: ["id"] }),
6069
+ route("thesis version get", "thesis version get", {
6070
+ values: ["id", "author-version-id"]
6071
+ }),
6072
+ route("thesis signals", "thesis signals", {
6073
+ values: ["id", "first", "cursor"]
6074
+ }),
6065
6075
  route("thesis set-visibility", "thesis set-visibility", {
6066
6076
  values: ["id", "visibility"]
6067
6077
  }),
@@ -6313,7 +6323,7 @@ var EMBEDDED_COMMAND_DEFINITIONS = [
6313
6323
  }),
6314
6324
  route("playbooks release", "release playbook", {
6315
6325
  values: ["name", "version", "feeds", "changelog", "readme-url"],
6316
- booleans: ["bypass-lint"]
6326
+ booleans: ["bypass-lint", "confirm-bundled-feed-exposure"]
6317
6327
  }),
6318
6328
  route("playbooks lint", "lint playbook", {
6319
6329
  values: ["format"],
@@ -6393,6 +6403,9 @@ var EMBEDDED_COMMAND_DEFINITIONS = [
6393
6403
  route("for-you list", "for-you list", {
6394
6404
  values: ["limit", "cursor", "newer-than", "feed-id"]
6395
6405
  }),
6406
+ route("for-you theses", "for-you theses", {
6407
+ values: ["limit", "cursor"]
6408
+ }),
6396
6409
  route("alert enable", "alert enable", {
6397
6410
  values: ["automation", "automation-ids", "channel-id"]
6398
6411
  }),
@@ -6485,7 +6498,7 @@ Commands:
6485
6498
  thesis Create and manage authored theses
6486
6499
  playbooks Discover, build, release, and manage Playbooks
6487
6500
  alert Manage personal automation alert bindings
6488
- for-you Read your For You publications (list)
6501
+ for-you Read your For You publications (list, theses)
6489
6502
  portfolio Read connected accounts, assets, activity, and history
6490
6503
  trading Inspect controls and use Signal or Broker execution
6491
6504
 
@@ -6501,9 +6514,10 @@ decide --delivery-id <id> --decision <immediate|digest|suppress> --reason <tex
6501
6514
  Record the decision first; forward/send are rejected without it.
6502
6515
  forward --delivery-id <id> [--request-id <uuid>]
6503
6516
  Re-post the original alert card by reference (immediate only).
6504
- send --delivery-ids <a,b,c> --body <markdown> [--request-id <uuid>]
6517
+ send [--delivery-ids <a,b,c>] --body <markdown> [--request-id <uuid>]
6505
6518
  Post your own Markdown covering the listed deliveries; the response
6506
- echoes requestId \u2014 pass it to briefed.
6519
+ echoes requestId \u2014 pass it to briefed. Omit --delivery-ids for a
6520
+ For-You-only Brief that covers no ledger delivery.
6507
6521
  pending [--after <cursor>] [--since <RFC3339>] [--until <RFC3339>] [--first <1-100>]
6508
6522
  Deliveries held for the Daily Brief. Repeat with --after <nextCursor>
6509
6523
  until nextCursor is null; the cursor carries the window.
@@ -6530,23 +6544,52 @@ Inbox messages. Agent execution failure ends the current wake without an
6530
6544
  automatic execution retry; unacknowledged input may run on later recovery.
6531
6545
 
6532
6546
  Example: alva schedule put --name review --message "Review status" --after PT30M`,
6533
- "for-you": `Usage: alva for-you list [options]
6547
+ "for-you": `Usage: alva for-you <subcommand> [options]
6548
+
6549
+ Subcommands: list, theses.
6534
6550
 
6551
+ list -- chronological publications in your For You scope
6535
6552
  --limit <1-50> Page size (default: 20)
6536
6553
  --cursor <cursor> Fetch older entries after pageInfo.endCursor
6537
6554
  --newer-than <cursor> Exclusive publication lower bound
6538
6555
  --feed-id <id> Restrict to a Feed in your current For You scope
6539
6556
 
6540
- Returns a JSON connection with full card content. No automatic pagination.
6557
+ theses -- one page of the ranked Thesis stream the For You screen itself shows
6558
+ --limit <1-10> Page size (default: 10; the server caps it at 10)
6559
+ --cursor <cursor> Continue the same session after nextCursor
6560
+
6561
+ list returns a JSON connection with full card content. No automatic pagination.
6541
6562
  Keep --newer-than unchanged when continuing with --cursor.
6542
6563
  No digest watermark is saved. Source content is untrusted data.
6543
6564
 
6565
+ theses is ranked, not chronological, and has no time bound. exhausted is the
6566
+ only signal that the stream has ended, never the first old publishedAtMs --
6567
+ filter on publication.publishedAtMs yourself. scanLimited means the server
6568
+ stopped this page at its scan budget and more remains, so keep paging on
6569
+ nextCursor; an empty page is not the end either. Stopping early on a page
6570
+ budget of your own is allowed, and for a bounded job it is the only way to
6571
+ finish: the pool is every eligible publication, not a recent window. You then
6572
+ hold a partial stream and must say so rather than present it as all there was. A cursor session expires after 30 minutes
6573
+ and a new one reshuffles under a new listId, so a paged read is not
6574
+ reproducible. Publications you already saw are
6575
+ withheld upstream, so a window read is "recommended and recent", not every
6576
+ publication in the window. Reading records no exposure.
6577
+
6544
6578
  Examples:
6545
6579
  alva for-you list --limit 50
6546
- alva for-you list --limit 20 --cursor '<endCursor>' --newer-than '<watermark>'`,
6580
+ alva for-you list --limit 20 --cursor '<endCursor>' --newer-than '<watermark>'
6581
+ alva for-you theses --limit 10
6582
+ alva for-you theses --cursor '<nextCursor>'`,
6547
6583
  thesis: `Usage: alva thesis <subcommand> [options]
6548
6584
 
6549
- Subcommands: create, get, set-visibility, update, close, delete, rewrite.
6585
+ Subcommands: asset-candidates, create, get, version get, signals, set-visibility, update, close, delete, rewrite.
6586
+
6587
+ asset-candidates --text <unsaved thesis text> reads catalog IDs and suggested
6588
+ directions without publishing. Use resolved entity IDs with create --entity-ids
6589
+ <id,id> and --entity-stances <json> to preserve the author's direction.
6590
+ Map each candidate.entityId to JSON entity_id and lowercase its stance:
6591
+ --entity-stances '[{"entity_id":"745337","stance":"bearish"}]'. Valid stances:
6592
+ unknown, bullish, bearish. Ask the author if a suggested direction is ambiguous.
6550
6593
 
6551
6594
  Embedded thesis commands accept literal --body text only; file and stdin body
6552
6595
  transports are intentionally unavailable because this runtime has no verified
@@ -7040,6 +7083,52 @@ function validateForYouListParams(params) {
7040
7083
  function isPositiveInt64(value) {
7041
7084
  return typeof value === "string" && /^[1-9]\d{0,18}$/.test(value) && BigInt(value) <= 9223372036854775807n;
7042
7085
  }
7086
+ var THESIS_RECOMMENDATION_QUERY = `
7087
+ query ToolkitForYouTheses($input: ThesisRecommendationInput) {
7088
+ viewer {
7089
+ thesisRecommendations(input: $input) {
7090
+ listId pageCursor nextCursor exhausted scanLimited
7091
+ pageInfo { startCursor endCursor hasNextPage hasPreviousPage }
7092
+ edges {
7093
+ cursor
7094
+ node {
7095
+ itemKey
7096
+ publication {
7097
+ thesisId playbookId authorVersionId materialVersionId itemKey
7098
+ title body publishedAtMs changeKind visibility
7099
+ closed archived note closingNote researchPaused
7100
+ entityIds categoryIds
7101
+ entityStances { entityId stance }
7102
+ entities { id ticker name }
7103
+ publisher {
7104
+ id displayName avatarUrl bio followersCount
7105
+ viewerState { following }
7106
+ }
7107
+ medias { type coverUrl url }
7108
+ signalFeed { id }
7109
+ snapshotRelease {
7110
+ versionId materialVersionId publishedAtMs changeKind
7111
+ sourceRefs {
7112
+ title sourceKind sourceContentId publicUrl sourceTimeMs locator
7113
+ }
7114
+ }
7115
+ }
7116
+ }
7117
+ }
7118
+ }
7119
+ }
7120
+ }
7121
+ `.trim();
7122
+ function validateForYouThesesParams(params) {
7123
+ if (!record(params)) throw new Error("Thesis parameters must be an object");
7124
+ const first = params.first === void 0 ? 10 : params.first;
7125
+ if (typeof first !== "number" || !Number.isInteger(first) || first < 1 || first > 10) {
7126
+ throw new Error("first must be an integer between 1 and 10");
7127
+ }
7128
+ if (params.after !== void 0 && (typeof params.after !== "string" || !params.after.trim())) {
7129
+ throw new Error("after must be a non-empty cursor");
7130
+ }
7131
+ }
7043
7132
 
7044
7133
  // src/resources/steward.ts
7045
7134
  var DECIDE = `
@@ -7318,12 +7407,18 @@ var COMMAND_DEFINITIONS = [
7318
7407
  "body-file",
7319
7408
  "title",
7320
7409
  "entity-ids",
7410
+ "entity-stances",
7321
7411
  "tickers",
7322
7412
  "visibility"
7323
7413
  ],
7324
7414
  booleans: ["body-stdin"]
7325
7415
  }),
7416
+ command("thesis asset-candidates", { values: ["text"] }),
7326
7417
  command("thesis get", { values: ["id"] }),
7418
+ command("thesis version get", {
7419
+ values: ["id", "author-version-id"]
7420
+ }),
7421
+ command("thesis signals", { values: ["id", "first", "cursor"] }),
7327
7422
  command("thesis set-visibility", { values: ["id", "visibility"] }),
7328
7423
  command("thesis update", {
7329
7424
  values: [
@@ -7405,6 +7500,7 @@ var COMMAND_DEFINITIONS = [
7405
7500
  command("for-you list", {
7406
7501
  values: ["limit", "cursor", "newer-than", "feed-id"]
7407
7502
  }),
7503
+ command("for-you theses", { values: ["limit", "cursor"] }),
7408
7504
  command("credits items", {
7409
7505
  values: ["last", "start", "end", "session-id", "first", "after"],
7410
7506
  booleans: ["today"]
@@ -7478,7 +7574,7 @@ var COMMAND_DEFINITIONS = [
7478
7574
  }),
7479
7575
  command("release playbook", {
7480
7576
  values: ["name", "version", "feeds", "changelog", "readme-url"],
7481
- booleans: ["bypass-lint"]
7577
+ booleans: ["bypass-lint", "confirm-bundled-feed-exposure"]
7482
7578
  }),
7483
7579
  command("lint playbook", {
7484
7580
  values: ["format"],
@@ -11469,7 +11565,7 @@ function formatTradingPairResolved(result) {
11469
11565
  }
11470
11566
 
11471
11567
  // src/cli/dispatch.ts
11472
- var CLI_VERSION = true ? "0.28.1-beta.1" : "dev";
11568
+ var CLI_VERSION = true ? "0.31.0" : "dev";
11473
11569
  var DEFAULT_RUN_TIMEOUT_MS = 6e5;
11474
11570
  var RUN_TIMEOUT_ENV = "ALVA_RUN_TIMEOUT_MS";
11475
11571
  var GLOBAL_VALUE_FLAGS = Object.entries(GLOBAL_FLAG_DEFINITIONS).filter(([, kind]) => kind === "value").map(([name]) => `--${name}`);
@@ -11520,7 +11616,7 @@ Subcommands:
11520
11616
  Flags:
11521
11617
  --inbox-path <path> Steward Session Inbox (terminal CLI only)
11522
11618
  --delivery-id <id> One delivery (decide, forward)
11523
- --delivery-ids <a,b,c> Comma-separated deliveries (send, briefed)
11619
+ --delivery-ids <a,b,c> Comma-separated deliveries (briefed; optional for send \u2014 omit for a For-You-only Brief)
11524
11620
  --decision <immediate|digest|suppress>
11525
11621
  --reason <text> Short audit note stored with the decision
11526
11622
  --body <markdown> Message body (send)
@@ -11535,6 +11631,7 @@ Examples (terminal; the embedded Agent tool omits --inbox-path):
11535
11631
  alva steward decide --inbox-path /alva/home/alice/agents/steward-9/.pi/agent/sessions/main.inbox.jsonl --delivery-id 123 --decision immediate --reason "guidance cut 15%"
11536
11632
  alva steward forward --inbox-path <inbox> --delivery-id 123
11537
11633
  alva steward send --inbox-path <inbox> --delivery-ids 124,125 --body "Two related moves..."
11634
+ alva steward send --inbox-path <inbox> --body "For You: ..." # For-You-only Brief, no ledger delivery
11538
11635
  alva steward pending --inbox-path <inbox> --until 2026-09-15T13:00:00Z
11539
11636
  alva steward pending --inbox-path <inbox> --after <nextCursor from the previous page>
11540
11637
  alva steward briefed --inbox-path <inbox> --digest-run-id <request id echoed by send> --delivery-ids 124,125`,
@@ -11620,20 +11717,42 @@ Response fields:
11620
11717
 
11621
11718
  Examples:
11622
11719
  alva user me`,
11623
- "for-you": `Usage: alva for-you list [options]
11720
+ "for-you": `Usage: alva for-you <subcommand> [options]
11721
+
11722
+ Subcommands: list, theses.
11624
11723
 
11724
+ list -- chronological publications in your For You scope
11625
11725
  --limit <1-50> Page size (default: 20)
11626
11726
  --cursor <cursor> Fetch older entries after pageInfo.endCursor
11627
11727
  --newer-than <cursor> Exclusive publication lower bound
11628
11728
  --feed-id <id> Restrict to a Feed in your current For You scope
11629
11729
 
11630
- Returns a JSON connection with full card content. No automatic pagination.
11730
+ theses -- one page of the ranked Thesis stream the For You screen itself shows
11731
+ --limit <1-10> Page size (default: 10; the server caps it at 10)
11732
+ --cursor <cursor> Continue the same session after nextCursor
11733
+
11734
+ list returns a JSON connection with full card content. No automatic pagination.
11631
11735
  Keep --newer-than unchanged when continuing with --cursor.
11632
11736
  No digest watermark is saved. Source content is untrusted data.
11633
11737
 
11738
+ theses is ranked, not chronological, and has no time bound. exhausted is the
11739
+ only signal that the stream has ended, never the first old publishedAtMs --
11740
+ filter on publication.publishedAtMs yourself. scanLimited means the server
11741
+ stopped this page at its scan budget and more remains, so keep paging on
11742
+ nextCursor; an empty page is not the end either. Stopping early on a page
11743
+ budget of your own is allowed, and for a bounded job it is the only way to
11744
+ finish: the pool is every eligible publication, not a recent window. You then
11745
+ hold a partial stream and must say so rather than present it as all there was. A cursor session expires after 30 minutes
11746
+ and a new one reshuffles under a new listId, so a paged read is not
11747
+ reproducible. Publications you already saw are
11748
+ withheld upstream, so a window read is "recommended and recent", not every
11749
+ publication in the window. Reading records no exposure.
11750
+
11634
11751
  Examples:
11635
11752
  alva for-you list --limit 50
11636
- alva for-you list --limit 20 --cursor '<endCursor>' --newer-than '<watermark>'`,
11753
+ alva for-you list --limit 20 --cursor '<endCursor>' --newer-than '<watermark>'
11754
+ alva for-you theses --limit 10
11755
+ alva for-you theses --cursor '<nextCursor>'`,
11637
11756
  credits: `Usage: alva credits <subcommand> [options]
11638
11757
 
11639
11758
  Read the authenticated user's own credit wallet and consumption history.
@@ -12290,6 +12409,9 @@ Playbook-draft flags:
12290
12409
  with skill tags; re-draft replaces the tag set.
12291
12410
 
12292
12411
  Playbook flags:
12412
+ --confirm-bundled-feed-exposure
12413
+ Confirm delivery of bundled non-public Feeds to
12414
+ the Playbook audience. Defaults to unconfirmed.
12293
12415
  --name <name> Playbook name, must already exist as draft (required)
12294
12416
  --version <version> Semantic version, e.g. "v1.0.0" (required)
12295
12417
  --feeds <json> JSON array of {feed_id, feed_major?} (required)
@@ -12782,13 +12904,15 @@ Examples:
12782
12904
  alva arrays token status`,
12783
12905
  thesis: `Usage: alva thesis <subcommand> [options]
12784
12906
 
12785
- Create, read, update, close, delete, or explicitly rewrite an authored thesis.
12907
+ Create, read, inspect Signals and exact author versions, update, close, delete, or explicitly rewrite an authored thesis.
12786
12908
  Backend owns Signal/Alert setup; the CLI never starts them separately.
12787
12909
  Create and update never rewrite text automatically.
12788
12910
 
12789
12911
  Subcommands:
12790
12912
  create Create a thesis
12791
12913
  get Get one thesis
12914
+ version get Get one exact author version
12915
+ signals Read published Signal history
12792
12916
  set-visibility Change current access without publishing a version
12793
12917
  update Replaces document fields: body, title, entities, visibility (all sent in full)
12794
12918
  close Close the current author version with an optional note
@@ -12807,8 +12931,11 @@ the backend; do not send a fresh ID. Create defaults --visibility to public.
12807
12931
  Update requires --visibility explicitly so it cannot inadvertently publish.
12808
12932
 
12809
12933
  Other flags:
12810
- create --request-id <uuid> --body ... [--title <text>] [--tickers <ticker,ticker>] [--entity-ids <id,id>] [--visibility <value>]
12934
+ create --request-id <uuid> --body ... [--title <text>] [--tickers <ticker,ticker>] [--entity-ids <id,id>] [--entity-stances <json>] [--visibility <value>]
12935
+ asset-candidates --text <unsaved thesis text>
12811
12936
  get --id <signed-int64-decimal>
12937
+ version get --id <signed-int64-decimal> --author-version-id <signed-int64-decimal>
12938
+ signals --id <id> [--first <1-50>] [--cursor <opaque-cursor>]
12812
12939
  set-visibility --id <id> --visibility public|private
12813
12940
  update --id <id> --request-id <uuid> --expected-author-version-id <id> --body ... --visibility <value> [--title <text>] [--entity-ids <id,id>] [--editorial]
12814
12941
  close --id <id> --expected-author-version-id <id> [--note <text>]
@@ -12822,7 +12949,7 @@ it must not invent factual evidence, numbers, or citations. Rewrite returns a
12822
12949
  candidate only: it never creates, updates, retries, or chooses a mode from body
12823
12950
  length or errors.
12824
12951
 
12825
- IDs are decimal strings, never JavaScript numbers; provide at most 20 entity
12952
+ IDs are decimal strings, never JavaScript numbers; provide at most 100 entity
12826
12953
  IDs. Body text must be nonblank,
12827
12954
  valid Unicode, and at most 65536 UTF-8 bytes; title is optional and at most
12828
12955
  500 UTF-8 bytes. Text is passed without trimming or newline conversion.
@@ -13496,6 +13623,19 @@ function thesisTickers(flags) {
13496
13623
  }
13497
13624
  return tickers;
13498
13625
  }
13626
+ function thesisEntityStances(flags) {
13627
+ const raw = flags["entity-stances"];
13628
+ if (raw === void 0) return void 0;
13629
+ let parsed;
13630
+ try {
13631
+ parsed = JSON.parse(raw);
13632
+ } catch {
13633
+ throw new CliUsageError("--entity-stances must be a JSON array", "thesis");
13634
+ }
13635
+ if (!Array.isArray(parsed))
13636
+ throw new CliUsageError("--entity-stances must be a JSON array", "thesis");
13637
+ return parsed;
13638
+ }
13499
13639
  function strictThesisUTF8(value, command2, flag) {
13500
13640
  const bytes = toByteView(value);
13501
13641
  if (bytes === void 0) {
@@ -14003,7 +14143,12 @@ async function executeParsedCommand(client, parsedCommand, meta, deps) {
14003
14143
  "inbox-path",
14004
14144
  `steward ${subcommand}`
14005
14145
  );
14006
- const ids = (name) => requireFlag(flags, name, `steward ${subcommand}`).split(",").map((value) => value.trim()).filter((value) => value !== "");
14146
+ const splitIds = (raw) => raw.split(",").map((value) => value.trim()).filter((value) => value !== "");
14147
+ const ids = (name) => splitIds(requireFlag(flags, name, `steward ${subcommand}`));
14148
+ const optionalIds = (name) => {
14149
+ const raw = flags[name];
14150
+ return raw === void 0 ? [] : splitIds(raw);
14151
+ };
14007
14152
  switch (subcommand) {
14008
14153
  case "decide":
14009
14154
  return client.steward.decide({
@@ -14024,7 +14169,7 @@ async function executeParsedCommand(client, parsedCommand, meta, deps) {
14024
14169
  return client.steward.send({
14025
14170
  inboxPath,
14026
14171
  body: requireFlag(flags, "body", "steward send"),
14027
- deliveryIds: ids("delivery-ids"),
14172
+ deliveryIds: optionalIds("delivery-ids"),
14028
14173
  requestId: flags["request-id"]
14029
14174
  });
14030
14175
  case "pending": {
@@ -14073,11 +14218,29 @@ async function executeParsedCommand(client, parsedCommand, meta, deps) {
14073
14218
  body: await thesisBodyFromFlags(flags, "thesis create", deps),
14074
14219
  title: flags.title ?? "",
14075
14220
  entity_ids: thesisEntityIDs(flags),
14221
+ entity_stances: thesisEntityStances(flags),
14076
14222
  tickers: thesisTickers(flags),
14077
14223
  visibility: flags.visibility === void 0 ? "public" : thesisVisibility(flags.visibility)
14078
14224
  });
14225
+ case "asset-candidates":
14226
+ return client.theses.assetCandidates(
14227
+ requireFlag(flags, "text", "thesis asset-candidates")
14228
+ );
14079
14229
  case "get":
14080
14230
  return client.theses.get(requireFlag(flags, "id", "thesis get"));
14231
+ case "version":
14232
+ return client.theses.getVersion(
14233
+ requireFlag(flags, "id", "thesis version get"),
14234
+ requireFlag(flags, "author-version-id", "thesis version get")
14235
+ );
14236
+ case "signals":
14237
+ return client.theses.signals(
14238
+ requireFlag(flags, "id", "thesis signals"),
14239
+ {
14240
+ first: flags.first === void 0 ? void 0 : Number(flags.first),
14241
+ cursor: flags.cursor
14242
+ }
14243
+ );
14081
14244
  case "set-visibility":
14082
14245
  return client.theses.setVisibility(
14083
14246
  requireFlag(flags, "id", "thesis set-visibility"),
@@ -14283,8 +14446,32 @@ async function executeParsedCommand(client, parsedCommand, meta, deps) {
14283
14446
  }
14284
14447
  }
14285
14448
  case "for-you": {
14449
+ if (subcommand === "theses") {
14450
+ const params2 = {
14451
+ first: optionalBoundedIntegerFlag(
14452
+ flags,
14453
+ "limit",
14454
+ "for-you theses",
14455
+ 1,
14456
+ 10
14457
+ ),
14458
+ after: flags.cursor
14459
+ };
14460
+ try {
14461
+ validateForYouThesesParams(params2);
14462
+ } catch (error) {
14463
+ throw new CliUsageError(
14464
+ error instanceof Error ? error.message : String(error),
14465
+ "for-you"
14466
+ );
14467
+ }
14468
+ return client.forYou.theses(params2);
14469
+ }
14286
14470
  if (subcommand !== "list") {
14287
- throw new CliUsageError("Expected for-you list", "for-you");
14471
+ throw new CliUsageError(
14472
+ "Expected for-you list or for-you theses",
14473
+ "for-you"
14474
+ );
14288
14475
  }
14289
14476
  const params = {
14290
14477
  first: optionalBoundedIntegerFlag(
@@ -14608,7 +14795,10 @@ async function executeParsedCommand(client, parsedCommand, meta, deps) {
14608
14795
  version,
14609
14796
  feeds: jsonParse(feedsRaw),
14610
14797
  changelog,
14611
- readme_url: readmeUrl
14798
+ readme_url: readmeUrl,
14799
+ confirm_bundled_feed_exposure: boolFlag(
14800
+ flags["confirm-bundled-feed-exposure"]
14801
+ )
14612
14802
  });
14613
14803
  }
14614
14804
  default: