@alva-ai/toolkit 0.33.1-beta.0 → 0.34.0-beta.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/cli.d.ts CHANGED
@@ -697,7 +697,8 @@ interface PortfolioAsset {
697
697
  allocation?: number;
698
698
  }
699
699
  interface TradingPortfolio {
700
- equity: number;
700
+ /** Null when one or more holdings could not be valued. */
701
+ equity: number | null;
701
702
  cash: number;
702
703
  unrealizedPnl?: number;
703
704
  assets: PortfolioAsset[];
@@ -2421,6 +2422,7 @@ interface StewardPendingItem {
2421
2422
  };
2422
2423
  decisionReason: string;
2423
2424
  consumedAtMs: number;
2425
+ alertSnapshot?: string | null;
2424
2426
  }
2425
2427
  interface StewardPendingPage {
2426
2428
  items: StewardPendingItem[];
@@ -2558,7 +2560,7 @@ interface RelatedThesesPage {
2558
2560
 
2559
2561
  /** Thesis IDs are signed int64 values represented losslessly as decimal strings. */
2560
2562
  type ThesisID = string;
2561
- type ThesisVisibility = 'public' | 'private';
2563
+ type ThesisVisibility = 'public' | 'private' | 'paid';
2562
2564
  type ThesisAssetStance = 'unknown' | 'bullish' | 'bearish';
2563
2565
  interface ThesisEntityStance {
2564
2566
  entity_id: ThesisID;
@@ -2582,6 +2584,11 @@ interface ThesisAssetCandidatesResponse {
2582
2584
  }
2583
2585
  /** Canonical server-supported candidate rewrite operation. */
2584
2586
  type ThesisRewriteMode = 'reformat' | 'shorten' | 'enrich';
2587
+ interface ThesisMedia {
2588
+ type: 'image' | 'price_chart' | 'audio' | 'video';
2589
+ cover_url: string;
2590
+ url?: string | null;
2591
+ }
2585
2592
  interface Thesis {
2586
2593
  id: ThesisID;
2587
2594
  author_version_id: ThesisID;
@@ -2591,10 +2598,14 @@ interface Thesis {
2591
2598
  entity_ids: ThesisID[];
2592
2599
  entity_stances?: ThesisEntityStance[];
2593
2600
  visibility: ThesisVisibility;
2601
+ medias?: ThesisMedia[];
2594
2602
  closed: boolean;
2595
2603
  closing_note: string;
2596
2604
  author_kind: string;
2597
2605
  author_ref: string;
2606
+ archived: boolean;
2607
+ version_archived?: boolean;
2608
+ note?: string;
2598
2609
  }
2599
2610
  interface ThesisResponse {
2600
2611
  thesis: Thesis;
@@ -2660,6 +2671,8 @@ interface ThesisSignalsResponse {
2660
2671
  next_cursor: string;
2661
2672
  }
2662
2673
  interface CreateThesisParams {
2674
+ /** Public images already uploaded with the existing upload tool, in display order. */
2675
+ images?: string[];
2663
2676
  /** Caller-supplied, stable non-zero UUID. Reuse it only to resolve ambiguity. */
2664
2677
  request_id: string;
2665
2678
  body: string;
@@ -2670,9 +2683,11 @@ interface CreateThesisParams {
2670
2683
  /** Exact STOCK ticker symbols resolved by Backend during creation. */
2671
2684
  tickers?: string[];
2672
2685
  /** Omitted means public, as defined by the REST contract. */
2673
- visibility?: ThesisVisibility;
2686
+ visibility?: 'public' | 'private';
2674
2687
  }
2675
2688
  interface UpdateThesisParams {
2689
+ /** Full media replacement; pass current medias for a text-only update. */
2690
+ medias?: ThesisMedia[];
2676
2691
  /** Caller-supplied, stable non-zero UUID. Reuse it only to resolve ambiguity. */
2677
2692
  request_id: string;
2678
2693
  expected_author_version_id: ThesisID;
@@ -2684,9 +2699,29 @@ interface UpdateThesisParams {
2684
2699
  /** Required so an update cannot inadvertently publish a private thesis. */
2685
2700
  visibility: ThesisVisibility;
2686
2701
  editorial?: boolean;
2702
+ archived?: boolean;
2703
+ note?: string;
2704
+ }
2705
+ interface SetThesisArchivedParams {
2706
+ /** Caller-supplied, stable non-zero UUID for this archive transition. */
2707
+ request_id: string;
2708
+ archived: boolean;
2709
+ note?: string;
2710
+ }
2711
+ interface ThesisStarredResponse {
2712
+ thesis_id: ThesisID;
2713
+ star_count: number;
2714
+ is_starred: boolean;
2715
+ }
2716
+ interface ThesisSignalEnabledResponse {
2717
+ thesis_id: ThesisID;
2718
+ author_version_id: ThesisID;
2719
+ archived: boolean;
2720
+ research_paused: boolean;
2721
+ enabled: boolean;
2687
2722
  }
2688
2723
  interface SetThesisVisibilityParams {
2689
- visibility: ThesisVisibility;
2724
+ visibility: 'public' | 'private';
2690
2725
  }
2691
2726
  interface CloseThesisParams {
2692
2727
  expected_author_version_id: ThesisID;
@@ -2715,8 +2750,22 @@ declare class ThesesResource {
2715
2750
  create(params: CreateThesisParams): Promise<ThesisResponse>;
2716
2751
  get(id: ThesisID): Promise<ThesisGetResponse>;
2717
2752
  getVersion(id: ThesisID, authorVersionID: ThesisID): Promise<ThesisResponse>;
2753
+ /** Lists reader-visible Updates, with editorial revisions folded together. */
2754
+ listUpdates(id: ThesisID, params?: {
2755
+ first?: number;
2756
+ cursor?: string;
2757
+ }): Promise<{
2758
+ versions: Thesis[];
2759
+ next_cursor: string;
2760
+ }>;
2761
+ /** Deletes only the selected Update; never falls back to whole-Thesis deletion. */
2762
+ deleteUpdate(id: ThesisID, authorVersionID: ThesisID, expectedAuthorVersionID: ThesisID): Promise<ThesisResponse>;
2718
2763
  signals(id: ThesisID, params?: ListThesisSignalsParams): Promise<ThesisSignalsResponse>;
2719
2764
  update(id: ThesisID, params: UpdateThesisParams): Promise<ThesisResponse>;
2765
+ /** Archive or restore the current version without asking callers to resend its body. */
2766
+ setArchived(id: ThesisID, params: SetThesisArchivedParams): Promise<ThesisResponse>;
2767
+ setStarred(id: ThesisID, isStarred: boolean): Promise<ThesisStarredResponse>;
2768
+ setSignalEnabled(id: ThesisID, enabled: boolean): Promise<ThesisSignalEnabledResponse>;
2720
2769
  setVisibility(id: ThesisID, params: SetThesisVisibilityParams): Promise<ThesisResponse>;
2721
2770
  close(id: ThesisID, params: CloseThesisParams): Promise<ThesisResponse>;
2722
2771
  delete(id: ThesisID): Promise<Record<string, never>>;