@alva-ai/toolkit 0.37.0 → 0.38.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/index.d.ts CHANGED
@@ -2015,1044 +2015,1081 @@ declare class SubscriptionsResource {
2015
2015
  unsubscribeBatch(params: UnsubscribeBatchParams): Promise<UnsubscribeBatchResponse>;
2016
2016
  }
2017
2017
 
2018
- /** Market entity kinds that can be added to the watchlist. */
2019
- type WatchlistTickerKind = 'STOCK' | 'ETF' | 'CRYPTO';
2020
- /** Public profile kinds: USER is an Alva user, PERSON a curated person. */
2021
- type FollowProfileKind = 'USER' | 'PERSON';
2022
- /** One requested symbol with an optional kind for just that symbol. */
2023
- interface WatchlistTickerSpec {
2024
- ticker: string;
2025
- kind?: WatchlistTickerKind;
2018
+ interface ThesisPageParams {
2019
+ /** 1-50; omitted reads 10. */
2020
+ first?: number;
2021
+ /** The previous page's `nextCursor`. */
2022
+ cursor?: string;
2026
2023
  }
2027
- interface WatchlistTickersParams {
2028
- /**
2029
- * 1-50 ticker symbols, matched exactly (case-insensitive). A spec's own
2030
- * kind overrides `kind`, so one call can mix kinds (NVDA and BTC:crypto).
2031
- */
2032
- tickers: Array<string | WatchlistTickerSpec>;
2033
- /** Default kind for tickers without their own kind. */
2034
- kind?: WatchlistTickerKind;
2024
+ interface ListThesesParams extends ThesisPageParams {
2025
+ /** Exact Person slug, e.g. a Person publisher's `slug`. */
2026
+ person?: string;
2027
+ /** Person name search; resolves only a unique match. */
2028
+ personName?: string;
2029
+ /** Exact PublicUser username, e.g. a publisher's `username`; not a display name. */
2030
+ user?: string;
2031
+ /** Catalog ticker or alias; resolves only a unique entity. */
2032
+ ticker?: string;
2033
+ entityId?: string;
2034
+ /** Author lists only; omitted means ACTIVE. */
2035
+ status?: 'ACTIVE' | 'ARCHIVED';
2035
2036
  }
2036
- interface ResolvedTicker {
2037
- /** The symbol as the caller supplied it, normalized to upper case. */
2038
- input: string;
2039
- entityId: string;
2037
+ type ThesisReadScope = {
2038
+ __typename: 'Person';
2039
+ id: string;
2040
+ slug: string;
2041
+ displayName: string;
2042
+ bio: string;
2043
+ } | {
2044
+ __typename: 'PublicUser';
2045
+ id: string;
2046
+ username: string;
2047
+ displayName: string;
2048
+ bio: string;
2049
+ } | {
2050
+ __typename: 'Entity';
2051
+ id: string;
2040
2052
  ticker: string;
2041
2053
  name: string;
2042
2054
  kind: string;
2055
+ assetClass: string;
2056
+ venue: {
2057
+ id: string;
2058
+ name: string;
2059
+ } | null;
2060
+ };
2061
+ /**
2062
+ * `nextCursor` is the only continuation: pass it as `cursor`, and stop when it
2063
+ * is null. A page can be empty while `nextCursor` is still set.
2064
+ */
2065
+ interface ThesisListPage {
2066
+ scope: ThesisReadScope;
2067
+ edges: {
2068
+ cursor: string;
2069
+ node: {
2070
+ /** Internal ID accepted by get/version/signals/related. */
2071
+ playbookId: string;
2072
+ /** Null when the author list has no readable publication snapshot. */
2073
+ publication: ThesisPublicationSummary | null;
2074
+ };
2075
+ }[];
2076
+ nextCursor: string | null;
2043
2077
  }
2044
- interface UnresolvedTicker {
2045
- input: string;
2046
- /** The kind the lookup was restricted to, when one was given. */
2047
- kind?: WatchlistTickerKind;
2048
- /** NOT_FOUND or FAILED_PRECONDITION (several entities share the symbol). */
2049
- code: string;
2050
- message: string;
2078
+ /** Related publications of the source's current version. */
2079
+ interface RelatedThesesPage {
2080
+ /** GENERATING and FAILED carry no matches; READY with no edges means none. */
2081
+ state: 'GENERATING' | 'READY' | 'FAILED';
2082
+ edges: {
2083
+ cursor: string;
2084
+ node: {
2085
+ itemKey: string;
2086
+ /** Relatedness, not quality or support. */
2087
+ score: number;
2088
+ publication: ThesisPublicationSummary;
2089
+ };
2090
+ }[];
2091
+ nextCursor: string | null;
2051
2092
  }
2052
- interface AddToWatchlistResult {
2053
- /** Tickers newly added to the watchlist by this call. */
2054
- added: ResolvedTicker[];
2055
- /** Tickers already in the watchlist; nothing was written for them. */
2056
- unchanged: ResolvedTicker[];
2057
- unresolved: UnresolvedTicker[];
2093
+ interface ThesisReturnParams {
2094
+ /** Revalue at the latest prices and include each Update's positions. */
2095
+ detail?: boolean;
2058
2096
  }
2059
- interface RemoveFromWatchlistResult {
2060
- /** Tickers removed from the watchlist by this call. */
2061
- removed: ResolvedTicker[];
2062
- /**
2063
- * Tickers that were not in the watchlist. The removal is still recorded, so
2064
- * holdings sync will not add them later.
2065
- */
2066
- unchanged: ResolvedTicker[];
2067
- unresolved: UnresolvedTicker[];
2097
+ /** A position of one Update, as ThesisPositionReturn in GraphQL. */
2098
+ interface ThesisPositionReturn {
2099
+ entityId: string;
2100
+ symbol: string;
2101
+ direction: 'BULLISH' | 'BEARISH';
2102
+ startPrice: number | null;
2103
+ startAtMs: number | null;
2104
+ endPrice: number | null;
2105
+ endAtMs: number | null;
2106
+ end: 'PENDING' | 'NEXT_UPDATE' | 'LATEST';
2107
+ positionReturn: number;
2108
+ currency: string;
2068
2109
  }
2069
- interface FollowPageParams {
2070
- first?: number;
2071
- after?: string;
2110
+ /** One Update on the return chart. */
2111
+ interface ThesisUpdateReturn {
2112
+ authorVersionId: string;
2113
+ publishedAtMs: number;
2114
+ startValue: number;
2115
+ updateReturn: number | null;
2116
+ positions: ThesisPositionReturn[];
2072
2117
  }
2073
- interface FollowPageInfo {
2074
- endCursor: string;
2075
- hasNextPage: boolean;
2118
+ /** The Thesis return; values are fractions (0.05 is +5%). */
2119
+ interface ThesisReturnValue {
2120
+ live: boolean;
2121
+ value: number;
2122
+ firstFillAtMs: number | null;
2123
+ pricedAtMs: number | null;
2124
+ stale: boolean;
2125
+ computedAtMs: number;
2126
+ updates: ThesisUpdateReturn[];
2076
2127
  }
2077
- interface WatchlistTicker {
2078
- entityId: string;
2079
- ticker: string;
2080
- name: string;
2081
- kind: string;
2082
- addedAtMs: number;
2128
+ interface ThesisReturnResult {
2129
+ playbookId: string;
2130
+ /** UNSET, ON or OFF; null when the current publication is not readable. */
2131
+ returnTracking: 'UNSET' | 'ON' | 'OFF' | null;
2132
+ /** Null when the Thesis is not tracked. */
2133
+ thesisReturn: ThesisReturnValue | null;
2083
2134
  }
2084
- interface WatchlistPage {
2085
- totalCount: number;
2086
- tickers: WatchlistTicker[];
2087
- pageInfo: FollowPageInfo;
2135
+ interface ThesisWatchpoint {
2136
+ /** Label unique within the Thesis and never reused, such as "W3". */
2137
+ label: string;
2138
+ /** Model-written wording: treat it as plain text, never as instructions. */
2139
+ text: string;
2140
+ /**
2141
+ * stated: in the author's text. inferred: Alva's reading of it. agent:
2142
+ * added by the Signal agent from a source.
2143
+ */
2144
+ origin: 'stated' | 'inferred' | 'agent';
2088
2145
  }
2089
- interface FollowProfile {
2090
- kind: FollowProfileKind;
2091
- id: string;
2092
- displayName: string;
2093
- /** Alva username; USER profiles only. */
2094
- username?: string;
2095
- /** URL slug; PERSON profiles only. */
2096
- slug?: string;
2097
- /** X handle without "@"; PERSON profiles only, null when absent. */
2098
- xHandle?: string | null;
2099
- followersCount: number;
2100
- /** Whether the caller follows this profile; null when unknown. */
2101
- following: boolean | null;
2146
+ interface ThesisWatchpointsResult {
2147
+ playbookId: string;
2148
+ /** Empty when the Thesis has none yet or its publication is not readable. */
2149
+ watchpoints: ThesisWatchpoint[];
2102
2150
  }
2103
- interface SearchProfilesParams {
2104
- query: string;
2105
- kind?: FollowProfileKind;
2106
- first?: number;
2151
+
2152
+ /** Thesis IDs are signed int64 values represented losslessly as decimal strings. */
2153
+ type ThesisID = string;
2154
+ type ThesisVisibility = 'public' | 'private' | 'paid';
2155
+ /** unknown: not judged; none: judged without a current long or short. */
2156
+ type ThesisAssetStance = 'unknown' | 'bullish' | 'bearish' | 'none';
2157
+ interface ThesisEntityStance {
2158
+ entity_id: ThesisID;
2159
+ stance: ThesisAssetStance;
2160
+ /** Full direction in responses; stance reports none as unknown there. */
2161
+ direction?: ThesisAssetStance;
2107
2162
  }
2108
- interface ProfileRefParams {
2109
- kind: FollowProfileKind;
2110
- id: string;
2163
+ /** GraphQL direction, including NONE. */
2164
+ type ThesisDirection = 'UNKNOWN' | 'BULLISH' | 'BEARISH' | 'NONE';
2165
+ interface ThesisSelectedDirection {
2166
+ entityId: ThesisID;
2167
+ direction: ThesisDirection;
2111
2168
  }
2112
- interface FollowedProfilesParams extends FollowPageParams {
2113
- kind?: FollowProfileKind;
2169
+ type ThesisReturnTracking = 'UNSET' | 'ON' | 'OFF';
2170
+ /** What publishing the selected entities with their directions would store. */
2171
+ interface ThesisReturnPreview {
2172
+ /** The Thesis's return switch now; UNSET for a new Thesis. */
2173
+ tracking: ThesisReturnTracking;
2174
+ /** Ask the author whether to keep the return on. */
2175
+ askSwitch: boolean;
2176
+ /** Directions publishing would store; UNKNOWN could not be judged. */
2177
+ directions: ThesisSelectedDirection[];
2178
+ /** Exits that keep the previous direction (last-leg rule). */
2179
+ keptEntityIds: ThesisID[];
2180
+ /** Publishing this draft fails with THESIS_RETURN_LAST_LEG. */
2181
+ lastLegRemoved: boolean;
2114
2182
  }
2115
- interface ProfilesPage {
2116
- profiles: FollowProfile[];
2117
- pageInfo: FollowPageInfo;
2183
+ interface ThesisAssetCandidatesParams {
2184
+ /** Known catalog IDs to classify; with discover false, only these. */
2185
+ entityIds?: ThesisID[];
2186
+ /** The Thesis being updated: its current directions seed carried tickers. */
2187
+ thesisId?: ThesisID;
2188
+ /** False skips ticker discovery. Defaults to true. */
2189
+ discover?: boolean;
2118
2190
  }
2119
- interface ProfileFollowResult {
2120
- following: boolean;
2121
- profile: FollowProfile | null;
2191
+ interface ThesisAssetCandidate {
2192
+ entityId: ThesisID;
2193
+ ticker: string;
2194
+ name: string;
2195
+ kind: 'STOCK' | 'ETF' | 'CRYPTO' | 'INDEX';
2122
2196
  }
2123
- /**
2124
- * The Alva App's ticker watchlist (add/remove) and people follows (Alva users
2125
- * and curated people). Gateway stores watchlist entries as ticker follows.
2126
- * Playbook follows stay in `client.subscriptions`; Thesis bookmarks are
2127
- * Thesis star/unstar. The user always comes from the API key; there is no
2128
- * identity override.
2129
- */
2130
- declare class FollowsResource {
2131
- private client;
2132
- constructor(client: AlvaClient);
2133
- /** Add tickers to the watchlist by exact symbol in one atomic batch. */
2134
- addToWatchlist(params: WatchlistTickersParams): Promise<AddToWatchlistResult>;
2135
- /** Remove tickers from the watchlist by exact symbol in one atomic batch. */
2136
- removeFromWatchlist(params: WatchlistTickersParams): Promise<RemoveFromWatchlistResult>;
2137
- /** One page of the watchlist, most recently added first. */
2138
- watchlist(params?: FollowPageParams): Promise<WatchlistPage>;
2139
- /** Search public profiles (Alva users and curated people). */
2140
- searchProfiles(params: SearchProfilesParams): Promise<ProfilesPage>;
2141
- /** One page of profiles the caller follows. */
2142
- profiles(params?: FollowedProfilesParams): Promise<ProfilesPage>;
2143
- /** Follow one profile. Idempotent. */
2144
- followProfile(params: ProfileRefParams): Promise<ProfileFollowResult>;
2145
- /** Unfollow one profile. Idempotent. */
2146
- unfollowProfile(params: ProfileRefParams): Promise<ProfileFollowResult>;
2147
- private profilesPage;
2148
- private changeProfile;
2149
- private changeWatchlist;
2150
- private lookupTickers;
2151
- private lookupTicker;
2197
+ interface ThesisAssetMention {
2198
+ quote: string;
2199
+ ticker: string;
2200
+ resolution: 'RESOLVED' | 'AMBIGUOUS' | 'UNRESOLVED';
2201
+ stance: 'UNKNOWN' | 'BULLISH' | 'BEARISH';
2202
+ candidates: ThesisAssetCandidate[];
2152
2203
  }
2153
-
2154
- /**
2155
- * Product-facing alert API. The current transport still calls the legacy
2156
- * subscription and notification-history endpoints.
2157
- */
2158
- declare class AlertsResource {
2159
- private client;
2160
- constructor(client: AlvaClient);
2161
- list(params?: PushSubscriptionListParams): Promise<PushSubscriptionListResponse>;
2162
- follows(params?: FollowsListParams): Promise<FollowsListResponse>;
2163
- enableAutomation(params: SubscribeFeedParams): Promise<SubscribeFeedResponse>;
2164
- disableAutomation(params: PushSubscriptionFeedParams): Promise<UnsubscribeResponse>;
2165
- enableBatch(params: SubscribeBatchParams): Promise<SubscribeBatchResponse>;
2166
- disableBatch(params: UnsubscribeBatchParams): Promise<UnsubscribeBatchResponse>;
2167
- historyAutomation(params: NotificationListParams): Promise<FeedNotificationListResponse>;
2168
- preferences(): Promise<NotificationPreferencesResponse>;
2169
- updatePreference(params: NotificationPreferenceUpdateParams): Promise<NotificationPreferenceUpdateResponse>;
2204
+ interface ThesisAssetCandidatesResponse {
2205
+ mentions: ThesisAssetMention[];
2206
+ /** Null only from a server without the preview. */
2207
+ returnPreview: ThesisReturnPreview | null;
2170
2208
  }
2171
-
2172
- /**
2173
- * Group push subscriptions for an external channel session.
2174
- *
2175
- * These APIs subscribe the Telegram/Discord group attached to `session_id`
2176
- * to feed push events the group admin may read. Mutations are idempotent no-ops
2177
- * unless the authenticated caller is that group's Alva admin.
2178
- */
2179
- declare class ChannelGroupSubscriptionsResource {
2180
- private client;
2181
- constructor(client: AlvaClient);
2182
- context(params: ChannelGroupSubscriptionSessionParams): Promise<ChannelGroupSubscriptionContextResponse>;
2183
- list(params: ChannelGroupSubscriptionSessionParams): Promise<ChannelGroupSubscriptionListResponse>;
2184
- subscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
2185
- unsubscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
2186
- /**
2187
- * Read a group's buffered chat messages in a time window, for the group-chat
2188
- * digest automation. Admin-gated: the authenticated caller must be that
2189
- * group's Alva admin (a digest feed runs as that admin). Each message carries
2190
- * a `permalink` deep-link back to the original message for "jump to original".
2191
- * `from_micros`/`to_micros` are message-origin timestamps in microseconds.
2192
- */
2193
- getGroupChatHistory(params: ChannelGroupHistoryParams): Promise<ChannelGroupHistoryResponse>;
2209
+ /** Canonical server-supported candidate rewrite operation. */
2210
+ type ThesisRewriteMode = 'reformat' | 'shorten' | 'enrich';
2211
+ interface ThesisMedia {
2212
+ type: 'image' | 'price_chart' | 'audio' | 'video';
2213
+ cover_url: string;
2214
+ url?: string | null;
2194
2215
  }
2195
-
2196
- declare class FeedbackResource {
2197
- private client;
2198
- constructor(client: AlvaClient);
2199
- submit(params: SubmitFeedbackRequest): Promise<SubmitFeedbackResponse>;
2216
+ interface Thesis {
2217
+ id: ThesisID;
2218
+ author_version_id: ThesisID;
2219
+ material_version_id: ThesisID;
2220
+ title: string;
2221
+ body: string;
2222
+ entity_ids: ThesisID[];
2223
+ entity_stances?: ThesisEntityStance[];
2224
+ visibility: ThesisVisibility;
2225
+ medias?: ThesisMedia[];
2226
+ closed: boolean;
2227
+ closing_note: string;
2228
+ author_kind: string;
2229
+ author_ref: string;
2230
+ archived: boolean;
2231
+ version_archived?: boolean;
2232
+ note?: string;
2233
+ /** `initial` for a Thesis's first publication, `material` for an Update. */
2234
+ change_kind?: string;
2200
2235
  }
2201
-
2202
- interface PlaybookFunction {
2203
- id: string | number;
2204
- playbook_id: string | number;
2205
- function_name: string;
2206
- entry_script_path: string;
2207
- created_at?: string;
2208
- updated_at?: string;
2209
- disabled?: boolean;
2210
- params_schema?: string;
2211
- allow_charges?: boolean;
2236
+ interface ThesisResponse {
2237
+ thesis: Thesis;
2212
2238
  }
2213
- interface RegisterFunctionParams {
2214
- playbook_id: number;
2215
- function_name: string;
2216
- entry_script_path: string;
2217
- params_schema?: string;
2218
- allow_charges?: boolean;
2219
- /**
2220
- * Run invocations of this function under a restricted service-account
2221
- * identity (an SA id owned by the caller) instead of the owner (#602).
2222
- * Omitted ⇒ runs as the owner. A string: SA ids are snowflake int64s that
2223
- * overflow JS number precision.
2224
- */
2225
- run_as_user_id?: string;
2239
+ interface ThesisAuthor {
2240
+ id: ThesisID;
2241
+ kind: string;
2242
+ display_name: string;
2243
+ avatar_url: string;
2244
+ username: string;
2226
2245
  }
2227
- interface RegisterFunctionResponse {
2228
- function?: PlaybookFunction;
2246
+ interface ThesisEntity {
2247
+ id: ThesisID;
2248
+ ticker: string;
2249
+ name: string;
2250
+ icon_url: string;
2251
+ kind: string;
2229
2252
  }
2230
- interface ListFunctionsParams {
2231
- playbook_id: number;
2253
+ interface ThesisGetResponse extends ThesisResponse {
2254
+ author: ThesisAuthor;
2255
+ entities: ThesisEntity[];
2232
2256
  }
2233
- interface ListFunctionsResponse {
2234
- functions: PlaybookFunction[];
2257
+ interface ThesisResearchStatus {
2258
+ state: string;
2259
+ pending_work: number;
2260
+ read_complete: boolean;
2261
+ last_attempt_ms?: number;
2262
+ last_completed_ms?: number;
2235
2263
  }
2236
- interface DeleteFunctionParams {
2237
- playbook_id: number;
2238
- function_name: string;
2264
+ interface ThesisSignalEvidenceExcerpt {
2265
+ text: string;
2266
+ omitted_before: boolean;
2267
+ omitted_after: boolean;
2239
2268
  }
2240
- interface InvokeFunctionParams {
2241
- playbook_id: number;
2242
- function_name: string;
2243
- parameters?: unknown;
2269
+ interface ThesisSignalSource {
2270
+ title: string;
2271
+ url?: string;
2272
+ published_at_ms?: number;
2244
2273
  }
2245
- interface InvokeFunctionResponse<TResult = unknown> {
2246
- result: TResult;
2247
- logs: string;
2248
- credits_used_total: number;
2249
- credits_charged_owner: number;
2250
- credits_charged_consumer: number;
2274
+ interface ThesisSignal {
2275
+ id: ThesisID;
2276
+ thesis_id: ThesisID;
2277
+ author_version_id: ThesisID;
2278
+ statement_snapshot: string;
2279
+ stance: string;
2280
+ explanation: string;
2281
+ information_kind: string;
2282
+ evidence_excerpt?: ThesisSignalEvidenceExcerpt;
2283
+ source: ThesisSignalSource;
2251
2284
  }
2252
- interface CreditAllowance {
2253
- id: string | number;
2254
- consumer_uid: string | number;
2255
- playbook_id: string | number;
2256
- amount: number;
2257
- used: number;
2258
- remaining: number;
2259
- created_at_ms?: number;
2260
- updated_at_ms?: number;
2285
+ interface ThesisSignalEntry {
2286
+ feed_entry_id: ThesisID;
2287
+ cursor: string;
2288
+ signal: ThesisSignal;
2261
2289
  }
2262
- interface GetAllowanceParams {
2263
- playbook_id: number;
2290
+ interface ListThesisSignalsParams {
2291
+ first?: number;
2292
+ cursor?: string;
2264
2293
  }
2265
- interface ListAllowancesResponse {
2266
- allowances: CreditAllowance[];
2294
+ interface ThesisSignalsResponse {
2295
+ research: ThesisResearchStatus;
2296
+ entries: ThesisSignalEntry[];
2297
+ next_cursor: string;
2267
2298
  }
2268
- interface CreateAllowanceParams {
2269
- playbook_id: number;
2270
- amount: number;
2299
+ interface CreateThesisParams {
2300
+ /** Public images already uploaded with the existing upload tool, in display order. */
2301
+ images?: string[];
2302
+ /** Caller-supplied, stable non-zero UUID. Reuse it only to resolve ambiguity. */
2303
+ request_id: string;
2304
+ body: string;
2305
+ title?: string;
2306
+ entity_ids?: ThesisID[];
2307
+ /** Author direction keyed by an entity ID also supplied in entity_ids. */
2308
+ entity_stances?: ThesisEntityStance[];
2309
+ /** Exact STOCK ticker symbols resolved by Backend during creation. */
2310
+ tickers?: string[];
2311
+ /** Omitted means public, as defined by the REST contract. */
2312
+ visibility?: 'public' | 'private';
2313
+ /** Thesis return switch; omitted keeps the default (on). */
2314
+ track_return?: boolean;
2271
2315
  }
2272
- interface CreateAllowanceResponse {
2273
- allowance: CreditAllowance;
2316
+ interface UpdateThesisParams {
2317
+ /** Full media replacement; pass current medias for a text-only update. */
2318
+ medias?: ThesisMedia[];
2319
+ /** Caller-supplied, stable non-zero UUID. Reuse it only to resolve ambiguity. */
2320
+ request_id: string;
2321
+ expected_author_version_id: ThesisID;
2322
+ body: string;
2323
+ title?: string;
2324
+ entity_ids?: ThesisID[];
2325
+ /** Full replacement: resubmit existing directions when only editing the body. */
2326
+ entity_stances?: ThesisEntityStance[];
2327
+ /** Required so an update cannot inadvertently publish a private thesis. */
2328
+ visibility: ThesisVisibility;
2329
+ archived?: boolean;
2330
+ note?: string;
2331
+ /** Thesis return switch; omitted keeps the current decision or default. */
2332
+ track_return?: boolean;
2274
2333
  }
2275
- interface RevokeAllowanceParams {
2276
- playbook_id: number;
2334
+ interface SetThesisArchivedParams {
2335
+ /** Caller-supplied, stable non-zero UUID for this archive transition. */
2336
+ request_id: string;
2337
+ archived: boolean;
2338
+ note?: string;
2277
2339
  }
2278
- interface RevokeAllowanceResponse {
2279
- ok: boolean;
2340
+ interface ThesisStarredResponse {
2341
+ thesis_id: ThesisID;
2342
+ star_count: number;
2343
+ is_starred: boolean;
2344
+ }
2345
+ interface ThesisSignalEnabledResponse {
2346
+ thesis_id: ThesisID;
2347
+ author_version_id: ThesisID;
2348
+ archived: boolean;
2349
+ research_paused: boolean;
2350
+ enabled: boolean;
2351
+ }
2352
+ interface SetThesisVisibilityParams {
2353
+ visibility: 'public' | 'private';
2354
+ }
2355
+ interface RewriteThesisParams {
2356
+ body: string;
2357
+ /** Omitted selects the canonical `reformat` mode. */
2358
+ mode?: ThesisRewriteMode;
2359
+ }
2360
+ interface RewriteThesisResponse {
2361
+ body: string;
2280
2362
  }
2281
2363
  /**
2282
- * Playbook function management. These functions are registered by a playbook
2283
- * creator and invoked by released playbook UI through the browser UDF runtime.
2364
+ * Thesis CRUD and explicit text rewriting. This resource never retries,
2365
+ * starts Signal/Alert setup, or invokes rewrite as a side effect of CRUD.
2284
2366
  */
2285
- declare class FunctionsResource {
2367
+ declare class ThesesResource {
2286
2368
  private client;
2287
2369
  constructor(client: AlvaClient);
2288
- register(params: RegisterFunctionParams): Promise<RegisterFunctionResponse>;
2289
- list(params: ListFunctionsParams): Promise<ListFunctionsResponse>;
2290
- delete(params: DeleteFunctionParams): Promise<void>;
2291
- invoke<TResult = unknown>(params: InvokeFunctionParams): Promise<InvokeFunctionResponse<TResult>>;
2292
- getAllowance(params: GetAllowanceParams): Promise<CreditAllowance | null>;
2293
- listAllowances(): Promise<ListAllowancesResponse>;
2294
- createAllowance(params: CreateAllowanceParams): Promise<CreateAllowanceResponse>;
2295
- revokeAllowance(params: RevokeAllowanceParams): Promise<RevokeAllowanceResponse>;
2370
+ /** One visible page; no automatic pagination or content truncation. */
2371
+ list(params: ListThesesParams): Promise<ThesisListPage>;
2372
+ /** Related publications always use the current source version. */
2373
+ related(id: ThesisID, params?: ThesisPageParams): Promise<RelatedThesesPage>;
2374
+ assetCandidates(text: string, params?: ThesisAssetCandidatesParams): Promise<ThesisAssetCandidatesResponse>;
2375
+ /** The Thesis return of a Playbook's current publication; detail revalues it. */
2376
+ thesisReturn(id: ThesisID, params?: ThesisReturnParams): Promise<ThesisReturnResult>;
2377
+ /**
2378
+ * List every watchpoint of a Thesis (its current set, in number order): the
2379
+ * things the Thesis depends on, or that would show it right or wrong.
2380
+ */
2381
+ watchpoints(id: ThesisID): Promise<ThesisWatchpointsResult>;
2382
+ create(params: CreateThesisParams): Promise<ThesisResponse>;
2383
+ get(id: ThesisID): Promise<ThesisGetResponse>;
2384
+ getVersion(id: ThesisID, authorVersionID: ThesisID): Promise<ThesisResponse>;
2385
+ /** Lists reader-visible Updates, with editorial revisions folded together. */
2386
+ listUpdates(id: ThesisID, params?: {
2387
+ first?: number;
2388
+ cursor?: string;
2389
+ }): Promise<{
2390
+ versions: Thesis[];
2391
+ next_cursor: string;
2392
+ }>;
2393
+ signals(id: ThesisID, params?: ListThesisSignalsParams): Promise<ThesisSignalsResponse>;
2394
+ update(id: ThesisID, params: UpdateThesisParams): Promise<ThesisResponse>;
2395
+ /**
2396
+ * Archive or unarchive the current version without asking callers to resend
2397
+ * its body. Unarchiving publishes the current content as a new Update; an
2398
+ * archived Thesis takes no other Update.
2399
+ */
2400
+ setArchived(id: ThesisID, params: SetThesisArchivedParams): Promise<ThesisResponse>;
2401
+ setStarred(id: ThesisID, isStarred: boolean): Promise<ThesisStarredResponse>;
2402
+ setSignalEnabled(id: ThesisID, enabled: boolean): Promise<ThesisSignalEnabledResponse>;
2403
+ setVisibility(id: ThesisID, params: SetThesisVisibilityParams): Promise<ThesisResponse>;
2404
+ rewrite(params: RewriteThesisParams): Promise<RewriteThesisResponse>;
2296
2405
  }
2297
2406
 
2298
- declare class CreditsResource {
2299
- private client;
2300
- constructor(client: AlvaClient);
2301
- wallet(): Promise<CreditWallet>;
2302
- items(params: CreditWalletItemsParams): Promise<CreditWalletItemsResponse>;
2303
- private graphql;
2407
+ /** Market entity kinds that can be added to the watchlist. */
2408
+ type WatchlistTickerKind = 'STOCK' | 'ETF' | 'CRYPTO';
2409
+ /** Public profile kinds: USER is an Alva user, PERSON a curated person. */
2410
+ type FollowProfileKind = 'USER' | 'PERSON';
2411
+ /** One requested symbol with an optional kind for just that symbol. */
2412
+ interface WatchlistTickerSpec {
2413
+ ticker: string;
2414
+ kind?: WatchlistTickerKind;
2304
2415
  }
2305
-
2306
- type CompanyFiscalQuarter = 'Q1' | 'Q2' | 'Q3' | 'Q4';
2307
- type CompanyEarningsEvent = 'latest-completed' | 'next-confirmed';
2308
- type CompanyEarningsStatus = 'UPCOMING' | 'COMPLETED';
2309
- type CompanyEarningsContentStatus = 'AVAILABLE' | 'NOT_AVAILABLE_YET' | 'UNAVAILABLE';
2310
- type CompanyEarningsSession = 'BEFORE_MARKET_OPEN' | 'AFTER_MARKET_CLOSE';
2311
- interface CompanyNarrative {
2312
- asOf: string;
2313
- generatedAtMs: number;
2314
- narrative: string;
2315
- peers: string;
2416
+ interface WatchlistTickersParams {
2417
+ /**
2418
+ * 1-50 ticker symbols, matched exactly (case-insensitive). A spec's own
2419
+ * kind overrides `kind`, so one call can mix kinds (NVDA and BTC:crypto).
2420
+ */
2421
+ tickers: Array<string | WatchlistTickerSpec>;
2422
+ /** Default kind for tickers without their own kind. */
2423
+ kind?: WatchlistTickerKind;
2316
2424
  }
2317
- interface CompanyNarrativeSnapshot {
2318
- asOf: string;
2319
- generatedAtMs: number;
2320
- narrative: string;
2425
+ interface ResolvedTicker {
2426
+ /** The symbol as the caller supplied it, normalized to upper case. */
2427
+ input: string;
2428
+ entityId: string;
2429
+ ticker: string;
2430
+ name: string;
2431
+ kind: string;
2321
2432
  }
2322
- interface CompanyNarrativeChangeLogEntry {
2323
- asOf: string;
2324
- generatedAtMs: number;
2325
- narrativeChangeLog: string | null;
2433
+ interface UnresolvedTicker {
2434
+ input: string;
2435
+ /** The kind the lookup was restricted to, when one was given. */
2436
+ kind?: WatchlistTickerKind;
2437
+ /** NOT_FOUND or FAILED_PRECONDITION (several entities share the symbol). */
2438
+ code: string;
2439
+ message: string;
2326
2440
  }
2327
- interface CompanyNarrativeHistory {
2328
- snapshots: CompanyNarrativeSnapshot[];
2329
- changeLog: CompanyNarrativeChangeLogEntry[];
2441
+ interface AddToWatchlistResult {
2442
+ /** Tickers newly added to the watchlist by this call. */
2443
+ added: ResolvedTicker[];
2444
+ /** Tickers already in the watchlist; nothing was written for them. */
2445
+ unchanged: ResolvedTicker[];
2446
+ unresolved: UnresolvedTicker[];
2330
2447
  }
2331
- interface CompanyNarrativeContext {
2332
- ticker: string;
2333
- current: CompanyNarrative | null;
2334
- history: CompanyNarrativeHistory | null;
2448
+ interface RemoveFromWatchlistResult {
2449
+ /** Tickers removed from the watchlist by this call. */
2450
+ removed: ResolvedTicker[];
2451
+ /**
2452
+ * Tickers that were not in the watchlist. The removal is still recorded, so
2453
+ * holdings sync will not add them later.
2454
+ */
2455
+ unchanged: ResolvedTicker[];
2456
+ unresolved: UnresolvedTicker[];
2335
2457
  }
2336
- interface CompanyEarningsPeriod {
2337
- fiscalYear: number;
2338
- fiscalQuarter: CompanyFiscalQuarter;
2339
- label: string;
2340
- fiscalDateEnding: string;
2341
- earningsDate: string;
2342
- session: CompanyEarningsSession | null;
2343
- status: CompanyEarningsStatus;
2344
- isDefault: boolean;
2458
+ interface FollowPageParams {
2459
+ first?: number;
2460
+ after?: string;
2345
2461
  }
2346
- interface CompanyEarningsCatalog {
2347
- periods: CompanyEarningsPeriod[];
2348
- defaultPeriod: CompanyEarningsPeriod | null;
2349
- unresolvedEventCount: number;
2462
+ interface FollowPageInfo {
2463
+ endCursor: string;
2464
+ hasNextPage: boolean;
2350
2465
  }
2351
- interface CompanyPreEarningsAnalysis {
2352
- status: CompanyEarningsContentStatus;
2353
- asOf: string | null;
2354
- summary: string | null;
2355
- whatWouldChangeView: string | null;
2356
- mainQuestion: string | null;
2357
- investorFocus: string[];
2358
- consensusAndGuidance: string | null;
2359
- stockSetup: string | null;
2360
- eventRisk: string | null;
2361
- whatWouldDriveUpside: string | null;
2362
- bullCase: string | null;
2363
- baseCase: string | null;
2364
- bearCase: string | null;
2365
- keyAsymmetry: string | null;
2366
- consensusN: number | null;
2367
- consensusObservedAt: string | null;
2466
+ interface WatchlistTicker {
2467
+ entityId: string;
2468
+ ticker: string;
2469
+ name: string;
2470
+ kind: string;
2471
+ addedAtMs: number;
2368
2472
  }
2369
- interface CompanyEarningsRelease {
2370
- status: CompanyEarningsContentStatus;
2371
- releaseDate: string | null;
2372
- url: string | null;
2473
+ interface WatchlistPage {
2474
+ totalCount: number;
2475
+ tickers: WatchlistTicker[];
2476
+ pageInfo: FollowPageInfo;
2373
2477
  }
2374
- interface CompanyEarningsTranscriptEntry {
2375
- speaker: string;
2376
- title: string;
2377
- content: string;
2478
+ interface FollowProfile {
2479
+ kind: FollowProfileKind;
2480
+ id: string;
2481
+ displayName: string;
2482
+ /** Alva username; USER profiles only. */
2483
+ username?: string;
2484
+ /** URL slug; PERSON profiles only. */
2485
+ slug?: string;
2486
+ /** X handle without "@"; PERSON profiles only, null when absent. */
2487
+ xHandle?: string | null;
2488
+ followersCount: number;
2489
+ /** Whether the caller follows this profile; null when unknown. */
2490
+ following: boolean | null;
2378
2491
  }
2379
- interface CompanyEarningsTranscriptSection {
2380
- name: string;
2381
- entries: CompanyEarningsTranscriptEntry[];
2492
+ interface SearchProfilesParams {
2493
+ query: string;
2494
+ kind?: FollowProfileKind;
2495
+ first?: number;
2382
2496
  }
2383
- interface CompanyEarningsTranscript {
2384
- status: CompanyEarningsContentStatus;
2385
- date: string | null;
2386
- publishedAtMs: number | null;
2387
- sections: CompanyEarningsTranscriptSection[];
2497
+ interface ProfileRefParams {
2498
+ kind: FollowProfileKind;
2499
+ id: string;
2388
2500
  }
2389
- interface CompanyPostEarningsSummary {
2390
- status: CompanyEarningsContentStatus;
2391
- asOf: string | null;
2392
- reportedCurrency: string | null;
2393
- evidenceState: 'INITIAL_PRINT' | 'POST_CALL' | null;
2394
- openingQuote: string | null;
2395
- openingQuoteSpeaker: string | null;
2396
- openingQuoteTitle: string | null;
2397
- openingQuoteNote: string | null;
2398
- buriedSignals: string[];
2399
- whatYouShouldKnow: string[];
2400
- consensusN: number | null;
2401
- consensusObservedAt: string | null;
2501
+ interface FollowedProfilesParams extends FollowPageParams {
2502
+ kind?: FollowProfileKind;
2402
2503
  }
2403
- interface CompanyEarningsContext {
2404
- ticker: string;
2405
- period: CompanyEarningsPeriod;
2406
- preEarningsAnalysis: CompanyPreEarningsAnalysis;
2407
- earningsRelease: CompanyEarningsRelease;
2408
- earningsTranscript: CompanyEarningsTranscript;
2409
- postEarningsSummary: CompanyPostEarningsSummary;
2504
+ interface ProfilesPage {
2505
+ profiles: FollowProfile[];
2506
+ pageInfo: FollowPageInfo;
2410
2507
  }
2411
- type CompanyEarningsParams = {
2412
- ticker: string;
2413
- event?: CompanyEarningsEvent;
2414
- fiscalYear?: never;
2415
- fiscalQuarter?: never;
2416
- } | {
2417
- ticker: string;
2418
- event?: never;
2419
- fiscalYear: number;
2420
- fiscalQuarter: CompanyFiscalQuarter;
2421
- };
2422
- declare class MarketsResource {
2423
- private client;
2424
- constructor(client: AlvaClient);
2425
- narrative(ticker: string): Promise<CompanyNarrativeContext>;
2426
- earningsPeriods(ticker: string): Promise<CompanyEarningsCatalog>;
2427
- earnings(params: CompanyEarningsParams): Promise<CompanyEarningsContext>;
2428
- private selectPeriod;
2429
- private notFound;
2430
- private graphql;
2508
+ interface FollowingThesesParams {
2509
+ /** The previous page's `next_cursor`; omitted starts 24 hours back. */
2510
+ cursor?: string;
2511
+ /** 1-100; omitted reads 20. */
2512
+ first?: number;
2431
2513
  }
2432
-
2433
- type AgentScheduleStatus = 'active' | 'paused' | 'completed' | 'failed';
2434
- type AgentScheduleFailureCode = 'target_invalid' | 'delivery_exhausted' | 'payload_conflict';
2435
- type AgentScheduleRule = {
2436
- kind: 'at';
2437
- timestamp: string;
2438
- } | {
2439
- kind: 'every';
2440
- interval: string;
2441
- } | {
2442
- kind: 'cron';
2443
- expression: string;
2444
- timezone: string;
2445
- };
2446
- interface AgentScheduleBounds {
2447
- startsAt?: string;
2448
- until?: string;
2449
- maxOccurrences?: number;
2514
+ /** The author of a Thesis in the following feed. */
2515
+ interface FollowingThesisAuthor {
2516
+ kind: 'user' | 'person';
2517
+ /** Set for a user. */
2518
+ username?: string;
2519
+ /** Set for a person. */
2520
+ slug?: string;
2521
+ display_name: string;
2450
2522
  }
2451
- interface AgentSchedule {
2452
- name: string;
2453
- rule: AgentScheduleRule;
2454
- bounds: AgentScheduleBounds;
2455
- text: string;
2456
- status: AgentScheduleStatus;
2457
- failure?: {
2458
- code: AgentScheduleFailureCode;
2459
- at?: string;
2460
- };
2461
- occurrencesUsed: number;
2462
- nextFireAt?: string;
2463
- createdAt: string;
2464
- updatedAt: string;
2523
+ interface FollowingThesisItem {
2524
+ thesis: Thesis;
2525
+ /** Null when the author's profile could not be read. */
2526
+ author: FollowingThesisAuthor | null;
2465
2527
  }
2466
- type AgentScheduleTarget = {
2467
- channelId: string | number;
2468
- inboxPath?: never;
2469
- } | {
2470
- inboxPath: string;
2471
- channelId?: never;
2472
- };
2473
- type PutAgentScheduleParams = AgentScheduleTarget & {
2474
- name: string;
2475
- rule: AgentScheduleRule | {
2476
- kind: 'after';
2477
- duration: string;
2478
- };
2479
- bounds?: AgentScheduleBounds;
2480
- text: string;
2481
- };
2482
- type ManageAgentScheduleParams = AgentScheduleTarget & {
2483
- name: string;
2484
- };
2485
- declare class SchedulesResource {
2528
+ /**
2529
+ * Thesis Updates by the profiles the caller follows, oldest arrival first.
2530
+ * `next_cursor` is always set: pass it back as `cursor`, also after an empty
2531
+ * page, and page on while `has_more`.
2532
+ */
2533
+ interface FollowingThesesPage {
2534
+ items: FollowingThesisItem[];
2535
+ next_cursor: string;
2536
+ has_more: boolean;
2537
+ }
2538
+ interface ProfileFollowResult {
2539
+ following: boolean;
2540
+ profile: FollowProfile | null;
2541
+ }
2542
+ /**
2543
+ * The Alva App's ticker watchlist (add/remove) and people follows (Alva users
2544
+ * and curated people). Gateway stores watchlist entries as ticker follows.
2545
+ * Playbook follows stay in `client.subscriptions`; Thesis bookmarks are
2546
+ * Thesis star/unstar. The user always comes from the API key; there is no
2547
+ * identity override.
2548
+ */
2549
+ declare class FollowsResource {
2486
2550
  private client;
2487
2551
  constructor(client: AlvaClient);
2488
- list(params: AgentScheduleTarget): Promise<AgentSchedule[]>;
2489
- put(params: PutAgentScheduleParams): Promise<AgentSchedule>;
2490
- pause(params: ManageAgentScheduleParams): Promise<AgentSchedule>;
2491
- resume(params: ManageAgentScheduleParams): Promise<AgentSchedule>;
2492
- delete(params: ManageAgentScheduleParams): Promise<void>;
2493
- /** Resolve the authenticated viewer's unique Agent Channel for CLI defaults. */
2494
- agentChannelId(): Promise<string>;
2495
- private manage;
2496
- private update;
2497
- private graphql;
2552
+ /** Add tickers to the watchlist by exact symbol in one atomic batch. */
2553
+ addToWatchlist(params: WatchlistTickersParams): Promise<AddToWatchlistResult>;
2554
+ /** Remove tickers from the watchlist by exact symbol in one atomic batch. */
2555
+ removeFromWatchlist(params: WatchlistTickersParams): Promise<RemoveFromWatchlistResult>;
2556
+ /** One page of the watchlist, most recently added first. */
2557
+ watchlist(params?: FollowPageParams): Promise<WatchlistPage>;
2558
+ /** Search public profiles (Alva users and curated people). */
2559
+ searchProfiles(params: SearchProfilesParams): Promise<ProfilesPage>;
2560
+ /** One page of profiles the caller follows. */
2561
+ profiles(params?: FollowedProfilesParams): Promise<ProfilesPage>;
2562
+ /**
2563
+ * Thesis Updates by the profiles the caller follows, in the order they
2564
+ * reached Alva. Keep `next_cursor` to read only what is new next time.
2565
+ */
2566
+ theses(params?: FollowingThesesParams): Promise<FollowingThesesPage>;
2567
+ /** Follow one profile. Idempotent. */
2568
+ followProfile(params: ProfileRefParams): Promise<ProfileFollowResult>;
2569
+ /** Unfollow one profile. Idempotent. */
2570
+ unfollowProfile(params: ProfileRefParams): Promise<ProfileFollowResult>;
2571
+ private profilesPage;
2572
+ private changeProfile;
2573
+ private changeWatchlist;
2574
+ private lookupTickers;
2575
+ private lookupTicker;
2498
2576
  }
2499
2577
 
2500
2578
  /**
2501
- * Push steward tool commands (mono-meta #935). Every call names the steward by
2502
- * its own Session Inbox path, which the host supplies to the embedded `alva`
2503
- * tool; the Backend resolves it to the caller's ready steward binding and
2504
- * scopes every delivery to that binding's Channel.
2579
+ * Product-facing alert API. The current transport still calls the legacy
2580
+ * subscription and notification-history endpoints.
2505
2581
  */
2506
- type StewardDecision = 'immediate' | 'digest' | 'suppress';
2507
- interface StewardTarget {
2508
- inboxPath: string;
2582
+ declare class AlertsResource {
2583
+ private client;
2584
+ constructor(client: AlvaClient);
2585
+ list(params?: PushSubscriptionListParams): Promise<PushSubscriptionListResponse>;
2586
+ follows(params?: FollowsListParams): Promise<FollowsListResponse>;
2587
+ enableAutomation(params: SubscribeFeedParams): Promise<SubscribeFeedResponse>;
2588
+ disableAutomation(params: PushSubscriptionFeedParams): Promise<UnsubscribeResponse>;
2589
+ enableBatch(params: SubscribeBatchParams): Promise<SubscribeBatchResponse>;
2590
+ disableBatch(params: UnsubscribeBatchParams): Promise<UnsubscribeBatchResponse>;
2591
+ historyAutomation(params: NotificationListParams): Promise<FeedNotificationListResponse>;
2592
+ preferences(): Promise<NotificationPreferencesResponse>;
2593
+ updatePreference(params: NotificationPreferenceUpdateParams): Promise<NotificationPreferenceUpdateResponse>;
2509
2594
  }
2510
- interface StewardDecideParams extends StewardTarget {
2511
- deliveryId: string;
2512
- decision: StewardDecision;
2513
- reason: string;
2595
+
2596
+ /**
2597
+ * Group push subscriptions for an external channel session.
2598
+ *
2599
+ * These APIs subscribe the Telegram/Discord group attached to `session_id`
2600
+ * to feed push events the group admin may read. Mutations are idempotent no-ops
2601
+ * unless the authenticated caller is that group's Alva admin.
2602
+ */
2603
+ declare class ChannelGroupSubscriptionsResource {
2604
+ private client;
2605
+ constructor(client: AlvaClient);
2606
+ context(params: ChannelGroupSubscriptionSessionParams): Promise<ChannelGroupSubscriptionContextResponse>;
2607
+ list(params: ChannelGroupSubscriptionSessionParams): Promise<ChannelGroupSubscriptionListResponse>;
2608
+ subscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
2609
+ unsubscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
2610
+ /**
2611
+ * Read a group's buffered chat messages in a time window, for the group-chat
2612
+ * digest automation. Admin-gated: the authenticated caller must be that
2613
+ * group's Alva admin (a digest feed runs as that admin). Each message carries
2614
+ * a `permalink` deep-link back to the original message for "jump to original".
2615
+ * `from_micros`/`to_micros` are message-origin timestamps in microseconds.
2616
+ */
2617
+ getGroupChatHistory(params: ChannelGroupHistoryParams): Promise<ChannelGroupHistoryResponse>;
2514
2618
  }
2515
- interface StewardForwardParams extends StewardTarget {
2516
- deliveryId: string;
2517
- /** Idempotency key; the CLI generates a UUID when omitted. */
2518
- requestId?: string;
2619
+
2620
+ declare class FeedbackResource {
2621
+ private client;
2622
+ constructor(client: AlvaClient);
2623
+ submit(params: SubmitFeedbackRequest): Promise<SubmitFeedbackResponse>;
2519
2624
  }
2520
- interface StewardSendParams extends StewardTarget {
2521
- body: string;
2522
- /** Omit or pass [] for a For-You-only Brief that covers no ledger delivery. */
2523
- deliveryIds?: string[];
2524
- requestId?: string;
2625
+
2626
+ interface PlaybookFunction {
2627
+ id: string | number;
2628
+ playbook_id: string | number;
2629
+ function_name: string;
2630
+ entry_script_path: string;
2631
+ created_at?: string;
2632
+ updated_at?: string;
2633
+ disabled?: boolean;
2634
+ params_schema?: string;
2635
+ allow_charges?: boolean;
2525
2636
  }
2526
- type StewardSourceKind = 'FEED' | 'MARKET_ENTITY' | 'THESIS_FEED';
2527
- interface StewardPendingParams extends StewardTarget {
2528
- /** @deprecated Use `pendingPage` for explicit single-page reads. */
2529
- after?: string;
2530
- /** First page only: lower bound on decision time. */
2531
- sinceMs?: number;
2532
- /** First page only: fixed upper bound of the Brief window (the digest_request's untilMs). */
2533
- untilMs?: number;
2534
- first?: number;
2637
+ interface RegisterFunctionParams {
2638
+ playbook_id: number;
2639
+ function_name: string;
2640
+ entry_script_path: string;
2641
+ params_schema?: string;
2642
+ allow_charges?: boolean;
2643
+ /**
2644
+ * Run invocations of this function under a restricted service-account
2645
+ * identity (an SA id owned by the caller) instead of the owner (#602).
2646
+ * Omitted ⇒ runs as the owner. A string: SA ids are snowflake int64s that
2647
+ * overflow JS number precision.
2648
+ */
2649
+ run_as_user_id?: string;
2535
2650
  }
2536
- interface StewardPendingPageParams extends StewardPendingParams {
2537
- /** Opaque cursor from the previous page's `nextCursor`; carries the window. */
2538
- after?: string;
2651
+ interface RegisterFunctionResponse {
2652
+ function?: PlaybookFunction;
2539
2653
  }
2540
- type StewardPendingFullParams = Omit<StewardPendingParams, 'after'> & {
2541
- after?: undefined;
2542
- };
2543
- interface StewardBriefedParams extends StewardTarget {
2544
- deliveryIds: string[];
2545
- digestRunId: string;
2654
+ interface ListFunctionsParams {
2655
+ playbook_id: number;
2546
2656
  }
2547
- interface StewardDigestRunParams extends StewardTarget {
2548
- digestRunId: string;
2657
+ interface ListFunctionsResponse {
2658
+ functions: PlaybookFunction[];
2549
2659
  }
2550
- interface StewardSendDigestRunParams extends StewardDigestRunParams {
2551
- /** Exact reviewed coverage; omit or pass [] for a For-You-only Brief. */
2552
- deliveryIds?: string[];
2553
- /** Omit when complete reviewed coverage produces no useful Brief content. */
2554
- body?: string;
2660
+ interface DeleteFunctionParams {
2661
+ playbook_id: number;
2662
+ function_name: string;
2555
2663
  }
2556
- interface StewardDecideResult {
2557
- state: string;
2664
+ interface InvokeFunctionParams {
2665
+ playbook_id: number;
2666
+ function_name: string;
2667
+ parameters?: unknown;
2558
2668
  }
2559
- interface StewardForwardResult {
2560
- channelMessageId: string;
2561
- state: string;
2669
+ interface InvokeFunctionResponse<TResult = unknown> {
2670
+ result: TResult;
2671
+ logs: string;
2672
+ credits_used_total: number;
2673
+ credits_charged_owner: number;
2674
+ credits_charged_consumer: number;
2562
2675
  }
2563
- interface StewardSendResult {
2564
- channelMessageId: string;
2565
- /** The idempotency key used; pass it as digestRunId to `briefed`. */
2566
- requestId: string;
2676
+ interface CreditAllowance {
2677
+ id: string | number;
2678
+ consumer_uid: string | number;
2679
+ playbook_id: string | number;
2680
+ amount: number;
2681
+ used: number;
2682
+ remaining: number;
2683
+ created_at_ms?: number;
2684
+ updated_at_ms?: number;
2567
2685
  }
2568
- interface StewardPendingItem {
2569
- deliveryId: string;
2570
- feedEntryId: string;
2571
- source: {
2572
- kind: StewardSourceKind;
2573
- id: string;
2574
- };
2575
- decisionReason: string;
2576
- consumedAtMs: number;
2577
- alertSnapshot?: string | null;
2686
+ interface GetAllowanceParams {
2687
+ playbook_id: number;
2578
2688
  }
2579
- interface StewardPendingPage {
2580
- items: StewardPendingItem[];
2581
- /** Cursor for the next page; `null` when this page was the last. */
2582
- nextCursor: string | null;
2583
- /** The window every page of this Brief was read with. */
2584
- windowSinceMs: number;
2585
- windowUntilMs: number;
2689
+ interface ListAllowancesResponse {
2690
+ allowances: CreditAllowance[];
2586
2691
  }
2587
- interface StewardPendingResult {
2588
- items: StewardPendingItem[];
2589
- /** The fixed window used for the complete read. */
2590
- windowSinceMs: number;
2591
- windowUntilMs: number;
2692
+ interface CreateAllowanceParams {
2693
+ playbook_id: number;
2694
+ amount: number;
2592
2695
  }
2593
- type StewardDigestRunState = 'EXPECTED' | 'RUNNING' | 'SEND_UNCERTAIN' | 'SENT' | 'INTENTIONALLY_EMPTY' | 'FAILED_BEFORE_SEND' | 'FAILED' | 'FAILED_EXPIRED';
2594
- interface StewardDigestRun {
2595
- digestRunId: string;
2596
- state: StewardDigestRunState;
2597
- scheduleId: string;
2598
- scheduleVersion: number;
2599
- occurrenceIndex: number;
2600
- windowSinceMs: number;
2601
- windowUntilMs: number;
2602
- scanCompletedAtMs?: number | null;
2603
- bodySha256?: string | null;
2604
- coverageSha256?: string | null;
2605
- channelMessageId?: string | null;
2606
- attempts: number;
2607
- lastError: string;
2608
- startedAtMs?: number | null;
2609
- completedAtMs?: number | null;
2610
- sendUncertainAtMs?: number | null;
2696
+ interface CreateAllowanceResponse {
2697
+ allowance: CreditAllowance;
2611
2698
  }
2612
- declare class StewardResource {
2699
+ interface RevokeAllowanceParams {
2700
+ playbook_id: number;
2701
+ }
2702
+ interface RevokeAllowanceResponse {
2703
+ ok: boolean;
2704
+ }
2705
+ /**
2706
+ * Playbook function management. These functions are registered by a playbook
2707
+ * creator and invoked by released playbook UI through the browser UDF runtime.
2708
+ */
2709
+ declare class FunctionsResource {
2613
2710
  private client;
2614
2711
  constructor(client: AlvaClient);
2615
- decide(params: StewardDecideParams): Promise<StewardDecideResult>;
2616
- forward(params: StewardForwardParams): Promise<StewardForwardResult>;
2617
- send(params: StewardSendParams): Promise<StewardSendResult>;
2618
- pending(params: StewardPendingParams & {
2619
- after: string;
2620
- }): Promise<StewardPendingPage>;
2621
- pending(params: StewardPendingFullParams): Promise<StewardPendingResult>;
2622
- pending(params: StewardPendingParams): Promise<StewardPendingResult | StewardPendingPage>;
2623
- pendingPage(params: StewardPendingPageParams): Promise<StewardPendingPage>;
2624
- private pendingPageWithRetry;
2625
- briefed(params: StewardBriefedParams): Promise<{
2626
- ok: true;
2627
- }>;
2628
- digestRun(params: StewardDigestRunParams): Promise<StewardDigestRun>;
2629
- digestRunPending(params: StewardDigestRunParams): Promise<StewardPendingItem[]>;
2630
- sendDigestRun(params: StewardSendDigestRunParams): Promise<StewardDigestRun>;
2631
- private graphql;
2712
+ register(params: RegisterFunctionParams): Promise<RegisterFunctionResponse>;
2713
+ list(params: ListFunctionsParams): Promise<ListFunctionsResponse>;
2714
+ delete(params: DeleteFunctionParams): Promise<void>;
2715
+ invoke<TResult = unknown>(params: InvokeFunctionParams): Promise<InvokeFunctionResponse<TResult>>;
2716
+ getAllowance(params: GetAllowanceParams): Promise<CreditAllowance | null>;
2717
+ listAllowances(): Promise<ListAllowancesResponse>;
2718
+ createAllowance(params: CreateAllowanceParams): Promise<CreateAllowanceResponse>;
2719
+ revokeAllowance(params: RevokeAllowanceParams): Promise<RevokeAllowanceResponse>;
2632
2720
  }
2633
2721
 
2634
- interface TradingPairCandidate {
2635
- /** Underlying ticker returned by the market catalog. */
2636
- symbol: string;
2637
- /** Complete canonical identity used by OHLCV, Altra, and orders. */
2638
- tradingPair: string;
2639
- market: string;
2640
- instrumentType: string;
2641
- underlyingType?: string;
2642
- quote: string;
2643
- type?: string;
2644
- description?: string;
2645
- feeRate?: number;
2646
- symbolIconUrl?: string;
2647
- }
2648
- interface TradingPairSearchParams {
2649
- symbol: string;
2650
- market?: string;
2651
- instrumentType?: string;
2652
- underlyingType?: string;
2653
- quote?: string;
2654
- limit?: number;
2655
- }
2656
- interface TradingPairSearchResponse {
2657
- query: string;
2658
- candidates: TradingPairCandidate[];
2659
- truncated?: boolean;
2660
- }
2661
- type TradingPairResolveFilters = Omit<TradingPairSearchParams, 'symbol' | 'limit'>;
2662
- declare class TradingPairsResource {
2722
+ declare class CreditsResource {
2663
2723
  private client;
2664
2724
  constructor(client: AlvaClient);
2665
- search(params: TradingPairSearchParams): Promise<TradingPairSearchResponse>;
2666
- resolve(params: ({
2667
- pair: string;
2668
- } & TradingPairResolveFilters) | Omit<TradingPairSearchParams, 'limit'>): Promise<TradingPairCandidate>;
2725
+ wallet(): Promise<CreditWallet>;
2726
+ items(params: CreditWalletItemsParams): Promise<CreditWalletItemsResponse>;
2727
+ private graphql;
2669
2728
  }
2670
2729
 
2671
- interface ThesisPageParams {
2672
- /** 1-50; omitted reads 10. */
2673
- first?: number;
2674
- /** The previous page's `nextCursor`. */
2675
- cursor?: string;
2730
+ type CompanyFiscalQuarter = 'Q1' | 'Q2' | 'Q3' | 'Q4';
2731
+ type CompanyEarningsEvent = 'latest-completed' | 'next-confirmed';
2732
+ type CompanyEarningsStatus = 'UPCOMING' | 'COMPLETED';
2733
+ type CompanyEarningsContentStatus = 'AVAILABLE' | 'NOT_AVAILABLE_YET' | 'UNAVAILABLE';
2734
+ type CompanyEarningsSession = 'BEFORE_MARKET_OPEN' | 'AFTER_MARKET_CLOSE';
2735
+ interface CompanyNarrative {
2736
+ asOf: string;
2737
+ generatedAtMs: number;
2738
+ narrative: string;
2739
+ peers: string;
2676
2740
  }
2677
- interface ListThesesParams extends ThesisPageParams {
2678
- /** Exact Person slug, e.g. a Person publisher's `slug`. */
2679
- person?: string;
2680
- /** Person name search; resolves only a unique match. */
2681
- personName?: string;
2682
- /** Exact PublicUser username, e.g. a publisher's `username`; not a display name. */
2683
- user?: string;
2684
- /** Catalog ticker or alias; resolves only a unique entity. */
2685
- ticker?: string;
2686
- entityId?: string;
2687
- /** Author lists only; omitted means ACTIVE. */
2688
- status?: 'ACTIVE' | 'ARCHIVED';
2741
+ interface CompanyNarrativeSnapshot {
2742
+ asOf: string;
2743
+ generatedAtMs: number;
2744
+ narrative: string;
2689
2745
  }
2690
- type ThesisReadScope = {
2691
- __typename: 'Person';
2692
- id: string;
2693
- slug: string;
2694
- displayName: string;
2695
- bio: string;
2696
- } | {
2697
- __typename: 'PublicUser';
2698
- id: string;
2699
- username: string;
2700
- displayName: string;
2701
- bio: string;
2702
- } | {
2703
- __typename: 'Entity';
2704
- id: string;
2705
- ticker: string;
2706
- name: string;
2707
- kind: string;
2708
- assetClass: string;
2709
- venue: {
2710
- id: string;
2711
- name: string;
2712
- } | null;
2713
- };
2714
- /**
2715
- * `nextCursor` is the only continuation: pass it as `cursor`, and stop when it
2716
- * is null. A page can be empty while `nextCursor` is still set.
2717
- */
2718
- interface ThesisListPage {
2719
- scope: ThesisReadScope;
2720
- edges: {
2721
- cursor: string;
2722
- node: {
2723
- /** Internal ID accepted by get/version/signals/related. */
2724
- playbookId: string;
2725
- /** Null when the author list has no readable publication snapshot. */
2726
- publication: ThesisPublicationSummary | null;
2727
- };
2728
- }[];
2729
- nextCursor: string | null;
2746
+ interface CompanyNarrativeChangeLogEntry {
2747
+ asOf: string;
2748
+ generatedAtMs: number;
2749
+ narrativeChangeLog: string | null;
2730
2750
  }
2731
- /** Related publications of the source's current version. */
2732
- interface RelatedThesesPage {
2733
- /** GENERATING and FAILED carry no matches; READY with no edges means none. */
2734
- state: 'GENERATING' | 'READY' | 'FAILED';
2735
- edges: {
2736
- cursor: string;
2737
- node: {
2738
- itemKey: string;
2739
- /** Relatedness, not quality or support. */
2740
- score: number;
2741
- publication: ThesisPublicationSummary;
2742
- };
2743
- }[];
2744
- nextCursor: string | null;
2751
+ interface CompanyNarrativeHistory {
2752
+ snapshots: CompanyNarrativeSnapshot[];
2753
+ changeLog: CompanyNarrativeChangeLogEntry[];
2745
2754
  }
2746
- interface ThesisReturnParams {
2747
- /** Revalue at the latest prices and include each Update's positions. */
2748
- detail?: boolean;
2755
+ interface CompanyNarrativeContext {
2756
+ ticker: string;
2757
+ current: CompanyNarrative | null;
2758
+ history: CompanyNarrativeHistory | null;
2749
2759
  }
2750
- /** A position of one Update, as ThesisPositionReturn in GraphQL. */
2751
- interface ThesisPositionReturn {
2752
- entityId: string;
2753
- symbol: string;
2754
- direction: 'BULLISH' | 'BEARISH';
2755
- startPrice: number | null;
2756
- startAtMs: number | null;
2757
- endPrice: number | null;
2758
- endAtMs: number | null;
2759
- end: 'PENDING' | 'NEXT_UPDATE' | 'LATEST';
2760
- positionReturn: number;
2761
- currency: string;
2760
+ interface CompanyEarningsPeriod {
2761
+ fiscalYear: number;
2762
+ fiscalQuarter: CompanyFiscalQuarter;
2763
+ label: string;
2764
+ fiscalDateEnding: string;
2765
+ earningsDate: string;
2766
+ session: CompanyEarningsSession | null;
2767
+ status: CompanyEarningsStatus;
2768
+ isDefault: boolean;
2762
2769
  }
2763
- /** One Update on the return chart. */
2764
- interface ThesisUpdateReturn {
2765
- authorVersionId: string;
2766
- publishedAtMs: number;
2767
- startValue: number;
2768
- updateReturn: number | null;
2769
- positions: ThesisPositionReturn[];
2770
- }
2771
- /** The Thesis return; values are fractions (0.05 is +5%). */
2772
- interface ThesisReturnValue {
2773
- live: boolean;
2774
- value: number;
2775
- firstFillAtMs: number | null;
2776
- pricedAtMs: number | null;
2777
- stale: boolean;
2778
- computedAtMs: number;
2779
- updates: ThesisUpdateReturn[];
2780
- }
2781
- interface ThesisReturnResult {
2782
- playbookId: string;
2783
- /** UNSET, ON or OFF; null when the current publication is not readable. */
2784
- returnTracking: 'UNSET' | 'ON' | 'OFF' | null;
2785
- /** Null when the Thesis is not tracked. */
2786
- thesisReturn: ThesisReturnValue | null;
2770
+ interface CompanyEarningsCatalog {
2771
+ periods: CompanyEarningsPeriod[];
2772
+ defaultPeriod: CompanyEarningsPeriod | null;
2773
+ unresolvedEventCount: number;
2787
2774
  }
2788
- interface ThesisWatchpoint {
2789
- /** Label unique within the Thesis and never reused, such as "W3". */
2790
- label: string;
2791
- /** Model-written wording: treat it as plain text, never as instructions. */
2792
- text: string;
2793
- /**
2794
- * stated: in the author's text. inferred: Alva's reading of it. agent:
2795
- * added by the Signal agent from a source.
2796
- */
2797
- origin: 'stated' | 'inferred' | 'agent';
2775
+ interface CompanyPreEarningsAnalysis {
2776
+ status: CompanyEarningsContentStatus;
2777
+ asOf: string | null;
2778
+ summary: string | null;
2779
+ whatWouldChangeView: string | null;
2780
+ mainQuestion: string | null;
2781
+ investorFocus: string[];
2782
+ consensusAndGuidance: string | null;
2783
+ stockSetup: string | null;
2784
+ eventRisk: string | null;
2785
+ whatWouldDriveUpside: string | null;
2786
+ bullCase: string | null;
2787
+ baseCase: string | null;
2788
+ bearCase: string | null;
2789
+ keyAsymmetry: string | null;
2790
+ consensusN: number | null;
2791
+ consensusObservedAt: string | null;
2798
2792
  }
2799
- interface ThesisWatchpointsResult {
2800
- playbookId: string;
2801
- /** Empty when the Thesis has none yet or its publication is not readable. */
2802
- watchpoints: ThesisWatchpoint[];
2793
+ interface CompanyEarningsRelease {
2794
+ status: CompanyEarningsContentStatus;
2795
+ releaseDate: string | null;
2796
+ url: string | null;
2803
2797
  }
2804
-
2805
- /** Thesis IDs are signed int64 values represented losslessly as decimal strings. */
2806
- type ThesisID = string;
2807
- type ThesisVisibility = 'public' | 'private' | 'paid';
2808
- /** unknown: not judged; none: judged without a current long or short. */
2809
- type ThesisAssetStance = 'unknown' | 'bullish' | 'bearish' | 'none';
2810
- interface ThesisEntityStance {
2811
- entity_id: ThesisID;
2812
- stance: ThesisAssetStance;
2813
- /** Full direction in responses; stance reports none as unknown there. */
2814
- direction?: ThesisAssetStance;
2798
+ interface CompanyEarningsTranscriptEntry {
2799
+ speaker: string;
2800
+ title: string;
2801
+ content: string;
2815
2802
  }
2816
- /** GraphQL direction, including NONE. */
2817
- type ThesisDirection = 'UNKNOWN' | 'BULLISH' | 'BEARISH' | 'NONE';
2818
- interface ThesisSelectedDirection {
2819
- entityId: ThesisID;
2820
- direction: ThesisDirection;
2803
+ interface CompanyEarningsTranscriptSection {
2804
+ name: string;
2805
+ entries: CompanyEarningsTranscriptEntry[];
2821
2806
  }
2822
- type ThesisReturnTracking = 'UNSET' | 'ON' | 'OFF';
2823
- /** What publishing the selected entities with their directions would store. */
2824
- interface ThesisReturnPreview {
2825
- /** The Thesis's return switch now; UNSET for a new Thesis. */
2826
- tracking: ThesisReturnTracking;
2827
- /** Ask the author whether to keep the return on. */
2828
- askSwitch: boolean;
2829
- /** Directions publishing would store; UNKNOWN could not be judged. */
2830
- directions: ThesisSelectedDirection[];
2831
- /** Exits that keep the previous direction (last-leg rule). */
2832
- keptEntityIds: ThesisID[];
2833
- /** Publishing this draft fails with THESIS_RETURN_LAST_LEG. */
2834
- lastLegRemoved: boolean;
2807
+ interface CompanyEarningsTranscript {
2808
+ status: CompanyEarningsContentStatus;
2809
+ date: string | null;
2810
+ publishedAtMs: number | null;
2811
+ sections: CompanyEarningsTranscriptSection[];
2835
2812
  }
2836
- interface ThesisAssetCandidatesParams {
2837
- /** Known catalog IDs to classify; with discover false, only these. */
2838
- entityIds?: ThesisID[];
2839
- /** The Thesis being updated: its current directions seed carried tickers. */
2840
- thesisId?: ThesisID;
2841
- /** False skips ticker discovery. Defaults to true. */
2842
- discover?: boolean;
2813
+ interface CompanyPostEarningsSummary {
2814
+ status: CompanyEarningsContentStatus;
2815
+ asOf: string | null;
2816
+ reportedCurrency: string | null;
2817
+ evidenceState: 'INITIAL_PRINT' | 'POST_CALL' | null;
2818
+ openingQuote: string | null;
2819
+ openingQuoteSpeaker: string | null;
2820
+ openingQuoteTitle: string | null;
2821
+ openingQuoteNote: string | null;
2822
+ buriedSignals: string[];
2823
+ whatYouShouldKnow: string[];
2824
+ consensusN: number | null;
2825
+ consensusObservedAt: string | null;
2843
2826
  }
2844
- interface ThesisAssetCandidate {
2845
- entityId: ThesisID;
2827
+ interface CompanyEarningsContext {
2846
2828
  ticker: string;
2847
- name: string;
2848
- kind: 'STOCK' | 'ETF' | 'CRYPTO' | 'INDEX';
2829
+ period: CompanyEarningsPeriod;
2830
+ preEarningsAnalysis: CompanyPreEarningsAnalysis;
2831
+ earningsRelease: CompanyEarningsRelease;
2832
+ earningsTranscript: CompanyEarningsTranscript;
2833
+ postEarningsSummary: CompanyPostEarningsSummary;
2849
2834
  }
2850
- interface ThesisAssetMention {
2851
- quote: string;
2835
+ type CompanyEarningsParams = {
2852
2836
  ticker: string;
2853
- resolution: 'RESOLVED' | 'AMBIGUOUS' | 'UNRESOLVED';
2854
- stance: 'UNKNOWN' | 'BULLISH' | 'BEARISH';
2855
- candidates: ThesisAssetCandidate[];
2837
+ event?: CompanyEarningsEvent;
2838
+ fiscalYear?: never;
2839
+ fiscalQuarter?: never;
2840
+ } | {
2841
+ ticker: string;
2842
+ event?: never;
2843
+ fiscalYear: number;
2844
+ fiscalQuarter: CompanyFiscalQuarter;
2845
+ };
2846
+ declare class MarketsResource {
2847
+ private client;
2848
+ constructor(client: AlvaClient);
2849
+ narrative(ticker: string): Promise<CompanyNarrativeContext>;
2850
+ earningsPeriods(ticker: string): Promise<CompanyEarningsCatalog>;
2851
+ earnings(params: CompanyEarningsParams): Promise<CompanyEarningsContext>;
2852
+ private selectPeriod;
2853
+ private notFound;
2854
+ private graphql;
2856
2855
  }
2857
- interface ThesisAssetCandidatesResponse {
2858
- mentions: ThesisAssetMention[];
2859
- /** Null only from a server without the preview. */
2860
- returnPreview: ThesisReturnPreview | null;
2856
+
2857
+ type AgentScheduleStatus = 'active' | 'paused' | 'completed' | 'failed';
2858
+ type AgentScheduleFailureCode = 'target_invalid' | 'delivery_exhausted' | 'payload_conflict';
2859
+ type AgentScheduleRule = {
2860
+ kind: 'at';
2861
+ timestamp: string;
2862
+ } | {
2863
+ kind: 'every';
2864
+ interval: string;
2865
+ } | {
2866
+ kind: 'cron';
2867
+ expression: string;
2868
+ timezone: string;
2869
+ };
2870
+ interface AgentScheduleBounds {
2871
+ startsAt?: string;
2872
+ until?: string;
2873
+ maxOccurrences?: number;
2861
2874
  }
2862
- /** Canonical server-supported candidate rewrite operation. */
2863
- type ThesisRewriteMode = 'reformat' | 'shorten' | 'enrich';
2864
- interface ThesisMedia {
2865
- type: 'image' | 'price_chart' | 'audio' | 'video';
2866
- cover_url: string;
2867
- url?: string | null;
2875
+ interface AgentSchedule {
2876
+ name: string;
2877
+ rule: AgentScheduleRule;
2878
+ bounds: AgentScheduleBounds;
2879
+ text: string;
2880
+ status: AgentScheduleStatus;
2881
+ failure?: {
2882
+ code: AgentScheduleFailureCode;
2883
+ at?: string;
2884
+ };
2885
+ occurrencesUsed: number;
2886
+ nextFireAt?: string;
2887
+ createdAt: string;
2888
+ updatedAt: string;
2868
2889
  }
2869
- interface Thesis {
2870
- id: ThesisID;
2871
- author_version_id: ThesisID;
2872
- material_version_id: ThesisID;
2873
- title: string;
2874
- body: string;
2875
- entity_ids: ThesisID[];
2876
- entity_stances?: ThesisEntityStance[];
2877
- visibility: ThesisVisibility;
2878
- medias?: ThesisMedia[];
2879
- closed: boolean;
2880
- closing_note: string;
2881
- author_kind: string;
2882
- author_ref: string;
2883
- archived: boolean;
2884
- version_archived?: boolean;
2885
- note?: string;
2890
+ type AgentScheduleTarget = {
2891
+ channelId: string | number;
2892
+ inboxPath?: never;
2893
+ } | {
2894
+ inboxPath: string;
2895
+ channelId?: never;
2896
+ };
2897
+ type PutAgentScheduleParams = AgentScheduleTarget & {
2898
+ name: string;
2899
+ rule: AgentScheduleRule | {
2900
+ kind: 'after';
2901
+ duration: string;
2902
+ };
2903
+ bounds?: AgentScheduleBounds;
2904
+ text: string;
2905
+ };
2906
+ type ManageAgentScheduleParams = AgentScheduleTarget & {
2907
+ name: string;
2908
+ };
2909
+ declare class SchedulesResource {
2910
+ private client;
2911
+ constructor(client: AlvaClient);
2912
+ list(params: AgentScheduleTarget): Promise<AgentSchedule[]>;
2913
+ put(params: PutAgentScheduleParams): Promise<AgentSchedule>;
2914
+ pause(params: ManageAgentScheduleParams): Promise<AgentSchedule>;
2915
+ resume(params: ManageAgentScheduleParams): Promise<AgentSchedule>;
2916
+ delete(params: ManageAgentScheduleParams): Promise<void>;
2917
+ /** Resolve the authenticated viewer's unique Agent Channel for CLI defaults. */
2918
+ agentChannelId(): Promise<string>;
2919
+ private manage;
2920
+ private update;
2921
+ private graphql;
2886
2922
  }
2887
- interface ThesisResponse {
2888
- thesis: Thesis;
2923
+
2924
+ /**
2925
+ * Push steward tool commands (mono-meta #935). Every call names the steward by
2926
+ * its own Session Inbox path, which the host supplies to the embedded `alva`
2927
+ * tool; the Backend resolves it to the caller's ready steward binding and
2928
+ * scopes every delivery to that binding's Channel.
2929
+ */
2930
+ type StewardDecision = 'immediate' | 'digest' | 'suppress';
2931
+ interface StewardTarget {
2932
+ inboxPath: string;
2889
2933
  }
2890
- interface ThesisAuthor {
2891
- id: ThesisID;
2892
- kind: string;
2893
- display_name: string;
2894
- avatar_url: string;
2895
- username: string;
2934
+ interface StewardDecideParams extends StewardTarget {
2935
+ deliveryId: string;
2936
+ decision: StewardDecision;
2937
+ reason: string;
2896
2938
  }
2897
- interface ThesisEntity {
2898
- id: ThesisID;
2899
- ticker: string;
2900
- name: string;
2901
- icon_url: string;
2902
- kind: string;
2939
+ interface StewardForwardParams extends StewardTarget {
2940
+ deliveryId: string;
2941
+ /** Idempotency key; the CLI generates a UUID when omitted. */
2942
+ requestId?: string;
2903
2943
  }
2904
- interface ThesisGetResponse extends ThesisResponse {
2905
- author: ThesisAuthor;
2906
- entities: ThesisEntity[];
2944
+ interface StewardSendParams extends StewardTarget {
2945
+ body: string;
2946
+ /** Omit or pass [] for a For-You-only Brief that covers no ledger delivery. */
2947
+ deliveryIds?: string[];
2948
+ requestId?: string;
2949
+ }
2950
+ type StewardSourceKind = 'FEED' | 'MARKET_ENTITY' | 'THESIS_FEED';
2951
+ interface StewardPendingParams extends StewardTarget {
2952
+ /** @deprecated Use `pendingPage` for explicit single-page reads. */
2953
+ after?: string;
2954
+ /** First page only: lower bound on decision time. */
2955
+ sinceMs?: number;
2956
+ /** First page only: fixed upper bound of the Brief window (the digest_request's untilMs). */
2957
+ untilMs?: number;
2958
+ first?: number;
2907
2959
  }
2908
- interface ThesisResearchStatus {
2909
- state: string;
2910
- pending_work: number;
2911
- read_complete: boolean;
2912
- last_attempt_ms?: number;
2913
- last_completed_ms?: number;
2960
+ interface StewardPendingPageParams extends StewardPendingParams {
2961
+ /** Opaque cursor from the previous page's `nextCursor`; carries the window. */
2962
+ after?: string;
2914
2963
  }
2915
- interface ThesisSignalEvidenceExcerpt {
2916
- text: string;
2917
- omitted_before: boolean;
2918
- omitted_after: boolean;
2964
+ type StewardPendingFullParams = Omit<StewardPendingParams, 'after'> & {
2965
+ after?: undefined;
2966
+ };
2967
+ interface StewardBriefedParams extends StewardTarget {
2968
+ deliveryIds: string[];
2969
+ digestRunId: string;
2919
2970
  }
2920
- interface ThesisSignalSource {
2921
- title: string;
2922
- url?: string;
2923
- published_at_ms?: number;
2971
+ interface StewardDigestRunParams extends StewardTarget {
2972
+ digestRunId: string;
2924
2973
  }
2925
- interface ThesisSignal {
2926
- id: ThesisID;
2927
- thesis_id: ThesisID;
2928
- author_version_id: ThesisID;
2929
- statement_snapshot: string;
2930
- stance: string;
2931
- explanation: string;
2932
- information_kind: string;
2933
- evidence_excerpt?: ThesisSignalEvidenceExcerpt;
2934
- source: ThesisSignalSource;
2974
+ interface StewardSendDigestRunParams extends StewardDigestRunParams {
2975
+ /** Exact reviewed coverage; omit or pass [] for a For-You-only Brief. */
2976
+ deliveryIds?: string[];
2977
+ /** Omit when complete reviewed coverage produces no useful Brief content. */
2978
+ body?: string;
2935
2979
  }
2936
- interface ThesisSignalEntry {
2937
- feed_entry_id: ThesisID;
2938
- cursor: string;
2939
- signal: ThesisSignal;
2980
+ interface StewardDecideResult {
2981
+ state: string;
2940
2982
  }
2941
- interface ListThesisSignalsParams {
2942
- first?: number;
2943
- cursor?: string;
2983
+ interface StewardForwardResult {
2984
+ channelMessageId: string;
2985
+ state: string;
2944
2986
  }
2945
- interface ThesisSignalsResponse {
2946
- research: ThesisResearchStatus;
2947
- entries: ThesisSignalEntry[];
2948
- next_cursor: string;
2987
+ interface StewardSendResult {
2988
+ channelMessageId: string;
2989
+ /** The idempotency key used; pass it as digestRunId to `briefed`. */
2990
+ requestId: string;
2949
2991
  }
2950
- interface CreateThesisParams {
2951
- /** Public images already uploaded with the existing upload tool, in display order. */
2952
- images?: string[];
2953
- /** Caller-supplied, stable non-zero UUID. Reuse it only to resolve ambiguity. */
2954
- request_id: string;
2955
- body: string;
2956
- title?: string;
2957
- entity_ids?: ThesisID[];
2958
- /** Author direction keyed by an entity ID also supplied in entity_ids. */
2959
- entity_stances?: ThesisEntityStance[];
2960
- /** Exact STOCK ticker symbols resolved by Backend during creation. */
2961
- tickers?: string[];
2962
- /** Omitted means public, as defined by the REST contract. */
2963
- visibility?: 'public' | 'private';
2964
- /** Thesis return switch; omitted keeps the default (on). */
2965
- track_return?: boolean;
2992
+ interface StewardPendingItem {
2993
+ deliveryId: string;
2994
+ feedEntryId: string;
2995
+ source: {
2996
+ kind: StewardSourceKind;
2997
+ id: string;
2998
+ };
2999
+ decisionReason: string;
3000
+ consumedAtMs: number;
3001
+ alertSnapshot?: string | null;
2966
3002
  }
2967
- interface UpdateThesisParams {
2968
- /** Full media replacement; pass current medias for a text-only update. */
2969
- medias?: ThesisMedia[];
2970
- /** Caller-supplied, stable non-zero UUID. Reuse it only to resolve ambiguity. */
2971
- request_id: string;
2972
- expected_author_version_id: ThesisID;
2973
- body: string;
2974
- title?: string;
2975
- entity_ids?: ThesisID[];
2976
- /** Full replacement: resubmit existing directions when only editing the body. */
2977
- entity_stances?: ThesisEntityStance[];
2978
- /** Required so an update cannot inadvertently publish a private thesis. */
2979
- visibility: ThesisVisibility;
2980
- archived?: boolean;
2981
- note?: string;
2982
- /** Thesis return switch; omitted keeps the current decision or default. */
2983
- track_return?: boolean;
3003
+ interface StewardPendingPage {
3004
+ items: StewardPendingItem[];
3005
+ /** Cursor for the next page; `null` when this page was the last. */
3006
+ nextCursor: string | null;
3007
+ /** The window every page of this Brief was read with. */
3008
+ windowSinceMs: number;
3009
+ windowUntilMs: number;
2984
3010
  }
2985
- interface SetThesisArchivedParams {
2986
- /** Caller-supplied, stable non-zero UUID for this archive transition. */
2987
- request_id: string;
2988
- archived: boolean;
2989
- note?: string;
3011
+ interface StewardPendingResult {
3012
+ items: StewardPendingItem[];
3013
+ /** The fixed window used for the complete read. */
3014
+ windowSinceMs: number;
3015
+ windowUntilMs: number;
2990
3016
  }
2991
- interface ThesisStarredResponse {
2992
- thesis_id: ThesisID;
2993
- star_count: number;
2994
- is_starred: boolean;
3017
+ type StewardDigestRunState = 'EXPECTED' | 'RUNNING' | 'SEND_UNCERTAIN' | 'SENT' | 'INTENTIONALLY_EMPTY' | 'FAILED_BEFORE_SEND' | 'FAILED' | 'FAILED_EXPIRED';
3018
+ interface StewardDigestRun {
3019
+ digestRunId: string;
3020
+ state: StewardDigestRunState;
3021
+ scheduleId: string;
3022
+ scheduleVersion: number;
3023
+ occurrenceIndex: number;
3024
+ windowSinceMs: number;
3025
+ windowUntilMs: number;
3026
+ scanCompletedAtMs?: number | null;
3027
+ bodySha256?: string | null;
3028
+ coverageSha256?: string | null;
3029
+ channelMessageId?: string | null;
3030
+ attempts: number;
3031
+ lastError: string;
3032
+ startedAtMs?: number | null;
3033
+ completedAtMs?: number | null;
3034
+ sendUncertainAtMs?: number | null;
2995
3035
  }
2996
- interface ThesisSignalEnabledResponse {
2997
- thesis_id: ThesisID;
2998
- author_version_id: ThesisID;
2999
- archived: boolean;
3000
- research_paused: boolean;
3001
- enabled: boolean;
3036
+ declare class StewardResource {
3037
+ private client;
3038
+ constructor(client: AlvaClient);
3039
+ decide(params: StewardDecideParams): Promise<StewardDecideResult>;
3040
+ forward(params: StewardForwardParams): Promise<StewardForwardResult>;
3041
+ send(params: StewardSendParams): Promise<StewardSendResult>;
3042
+ pending(params: StewardPendingParams & {
3043
+ after: string;
3044
+ }): Promise<StewardPendingPage>;
3045
+ pending(params: StewardPendingFullParams): Promise<StewardPendingResult>;
3046
+ pending(params: StewardPendingParams): Promise<StewardPendingResult | StewardPendingPage>;
3047
+ pendingPage(params: StewardPendingPageParams): Promise<StewardPendingPage>;
3048
+ private pendingPageWithRetry;
3049
+ briefed(params: StewardBriefedParams): Promise<{
3050
+ ok: true;
3051
+ }>;
3052
+ digestRun(params: StewardDigestRunParams): Promise<StewardDigestRun>;
3053
+ digestRunPending(params: StewardDigestRunParams): Promise<StewardPendingItem[]>;
3054
+ sendDigestRun(params: StewardSendDigestRunParams): Promise<StewardDigestRun>;
3055
+ private graphql;
3002
3056
  }
3003
- interface SetThesisVisibilityParams {
3004
- visibility: 'public' | 'private';
3057
+
3058
+ interface TradingPairCandidate {
3059
+ /** Underlying ticker returned by the market catalog. */
3060
+ symbol: string;
3061
+ /** Complete canonical identity used by OHLCV, Altra, and orders. */
3062
+ tradingPair: string;
3063
+ market: string;
3064
+ instrumentType: string;
3065
+ underlyingType?: string;
3066
+ quote: string;
3067
+ type?: string;
3068
+ description?: string;
3069
+ feeRate?: number;
3070
+ symbolIconUrl?: string;
3005
3071
  }
3006
- interface RewriteThesisParams {
3007
- body: string;
3008
- /** Omitted selects the canonical `reformat` mode. */
3009
- mode?: ThesisRewriteMode;
3072
+ interface TradingPairSearchParams {
3073
+ symbol: string;
3074
+ market?: string;
3075
+ instrumentType?: string;
3076
+ underlyingType?: string;
3077
+ quote?: string;
3078
+ limit?: number;
3010
3079
  }
3011
- interface RewriteThesisResponse {
3012
- body: string;
3080
+ interface TradingPairSearchResponse {
3081
+ query: string;
3082
+ candidates: TradingPairCandidate[];
3083
+ truncated?: boolean;
3013
3084
  }
3014
- /**
3015
- * Thesis CRUD and explicit text rewriting. This resource never retries,
3016
- * starts Signal/Alert setup, or invokes rewrite as a side effect of CRUD.
3017
- */
3018
- declare class ThesesResource {
3085
+ type TradingPairResolveFilters = Omit<TradingPairSearchParams, 'symbol' | 'limit'>;
3086
+ declare class TradingPairsResource {
3019
3087
  private client;
3020
3088
  constructor(client: AlvaClient);
3021
- /** One visible page; no automatic pagination or content truncation. */
3022
- list(params: ListThesesParams): Promise<ThesisListPage>;
3023
- /** Related publications always use the current source version. */
3024
- related(id: ThesisID, params?: ThesisPageParams): Promise<RelatedThesesPage>;
3025
- assetCandidates(text: string, params?: ThesisAssetCandidatesParams): Promise<ThesisAssetCandidatesResponse>;
3026
- /** The Thesis return of a Playbook's current publication; detail revalues it. */
3027
- thesisReturn(id: ThesisID, params?: ThesisReturnParams): Promise<ThesisReturnResult>;
3028
- /**
3029
- * List every watchpoint of a Thesis (its current set, in number order): the
3030
- * things the Thesis depends on, or that would show it right or wrong.
3031
- */
3032
- watchpoints(id: ThesisID): Promise<ThesisWatchpointsResult>;
3033
- create(params: CreateThesisParams): Promise<ThesisResponse>;
3034
- get(id: ThesisID): Promise<ThesisGetResponse>;
3035
- getVersion(id: ThesisID, authorVersionID: ThesisID): Promise<ThesisResponse>;
3036
- /** Lists reader-visible Updates, with editorial revisions folded together. */
3037
- listUpdates(id: ThesisID, params?: {
3038
- first?: number;
3039
- cursor?: string;
3040
- }): Promise<{
3041
- versions: Thesis[];
3042
- next_cursor: string;
3043
- }>;
3044
- signals(id: ThesisID, params?: ListThesisSignalsParams): Promise<ThesisSignalsResponse>;
3045
- update(id: ThesisID, params: UpdateThesisParams): Promise<ThesisResponse>;
3046
- /**
3047
- * Archive or unarchive the current version without asking callers to resend
3048
- * its body. Unarchiving publishes the current content as a new Update; an
3049
- * archived Thesis takes no other Update.
3050
- */
3051
- setArchived(id: ThesisID, params: SetThesisArchivedParams): Promise<ThesisResponse>;
3052
- setStarred(id: ThesisID, isStarred: boolean): Promise<ThesisStarredResponse>;
3053
- setSignalEnabled(id: ThesisID, enabled: boolean): Promise<ThesisSignalEnabledResponse>;
3054
- setVisibility(id: ThesisID, params: SetThesisVisibilityParams): Promise<ThesisResponse>;
3055
- rewrite(params: RewriteThesisParams): Promise<RewriteThesisResponse>;
3089
+ search(params: TradingPairSearchParams): Promise<TradingPairSearchResponse>;
3090
+ resolve(params: ({
3091
+ pair: string;
3092
+ } & TradingPairResolveFilters) | Omit<TradingPairSearchParams, 'limit'>): Promise<TradingPairCandidate>;
3056
3093
  }
3057
3094
 
3058
3095
  interface CreateCompanyNewsParams {
@@ -3337,4 +3374,4 @@ declare const installPlaybookRuntime: (targetWindow?: Window) => void;
3337
3374
  /** SDK version, injected at build time from package.json. */
3338
3375
  declare const VERSION: string;
3339
3376
 
3340
- export { type AddToWatchlistResult, type AgentSchedule, type AgentScheduleBounds, type AgentScheduleFailureCode, type AgentScheduleRule, type AgentScheduleStatus, type AgentScheduleTarget, AlertsResource, AlvaClient, type AlvaClientConfig, AlvaError, type AutomationAlertDelivery, type AutomationAlertDeliveryGetRequest, AutomationAlertDeliveryResource, type AutomationAlertDeliveryUpdateRequest, type AutomationAlertDeliveryUpdateResponse, type AutomationEmailDelivery, AutomationResource, type ChannelGroupAdminInfo, type ChannelGroupCallerInfo, type ChannelGroupHistoryParams, type ChannelGroupHistoryResponse, type ChannelGroupSubscription, type ChannelGroupSubscriptionContextResponse, type ChannelGroupSubscriptionListResponse, type ChannelGroupSubscriptionMutationParams, type ChannelGroupSubscriptionMutationResponse, type ChannelGroupSubscriptionSessionParams, type ChannelGroupSubscriptionTarget, type ChannelGroupSubscriptionTargetType, CliUsageError, type CompanyEarningsCatalog, type CompanyEarningsContentStatus, type CompanyEarningsContext, type CompanyEarningsEvent, type CompanyEarningsParams, type CompanyEarningsPeriod, type CompanyEarningsRelease, type CompanyEarningsSession, type CompanyEarningsStatus, type CompanyEarningsTranscript, type CompanyEarningsTranscriptEntry, type CompanyEarningsTranscriptSection, type CompanyFiscalQuarter, type CompanyNarrative, type CompanyNarrativeChangeLogEntry, type CompanyNarrativeContext, type CompanyNarrativeHistory, type CompanyNarrativeSnapshot, CompanyNewsResource, type CompanyPostEarningsSummary, type CompanyPreEarningsAnalysis, type CreateAllowanceParams, type CreateAllowanceResponse, type CreateCompanyNewsParams, type CreateCompanyNewsResponse, type CreateThesisParams, type CreditAllowance, type CreditWallet, type CreditWalletItem, type CreditWalletItemConnection, type CreditWalletItemEdge, type CreditWalletItemsParams, type CreditWalletItemsResponse, type CreditWalletPageInfo, type DeleteFunctionParams, type FeedDeleteRequest, type FeedDeleteResponse, type FeedListItem, type FeedListParams, type FeedListResponse, type FeedListStatus, type FeedStatusUpdateRequest, type FeedStatusUpdateResponse, type FollowPageInfo, type FollowPageParams, type FollowPlaybookResponse, type FollowProfile, type FollowProfileKind, type FollowedProfilesParams, FollowsResource, type ForYouConnection, type ForYouEntry, type ForYouListParams, ForYouResource, type ForYouThesesParams, type FsChmodParams, type FsCopyParams, type FsEntry, type FsGrantParams, type FsMkdirParams, type FsRawWriteParams, type FsReadParams, type FsReaddirParams, type FsReaddirResponse, type FsReadlinkParams, type FsRemoveParams, type FsRenameParams, type FsRevokeParams, type FsStat, type FsSymlinkParams, type FsWriteParams, type FsWriteResponse, type GetAllowanceParams, type GroupChatMessage, type InvokeFunctionParams, type InvokeFunctionResponse, type ListAllowancesResponse, type ListFunctionsParams, type ListFunctionsResponse, type ListThesesParams, type ListThesisSignalsParams, type ManageAgentScheduleParams, MarketsResource, type NotificationPreference, type NotificationPreferenceKey, type NotificationPreferenceUpdateParams, type NotificationPreferenceUpdateResponse, type NotificationPreferencesResponse, PBSV_UPDATE_MESSAGE, type PlaybookFollowParams, type PlaybookFunction, type PlaybookSkillFile, type PlaybookSkillFileMeta, type PlaybookSkillMeta, type PlaybookSkillSummary, type PlaybookSkillTagEntry, type ProfileFollowResult, type ProfileRefParams, type ProfilesPage, type PutAgentScheduleParams, type RegisterFunctionParams, type RegisterFunctionResponse, type RelatedThesesPage, type RemoveFromWatchlistResult, type ResolvedTicker, type RevokeAllowanceParams, type RevokeAllowanceResponse, type RewriteThesisParams, type RewriteThesisResponse, SUBSCRIBE_MANAGE_MESSAGE, SUBSCRIBE_PROPOSE_MESSAGE, SUBSCRIBE_RESULT_MESSAGE, SchedulesResource, type SearchProfilesParams, type SetThesisArchivedParams, type SetThesisVisibilityParams, type SkillDoc, type SkillEndpointMetadata, type SkillEndpointTier, type SkillMetadata, type SkillSummary, type StewardBriefedParams, type StewardDecideParams, type StewardDecision, type StewardDigestRun, type StewardDigestRunParams, type StewardDigestRunState, type StewardForwardParams, type StewardPendingFullParams, type StewardPendingItem, type StewardPendingPage, type StewardPendingPageParams, type StewardPendingParams, type StewardPendingResult, StewardResource, type StewardSendDigestRunParams, type StewardSendParams, type StewardTarget, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SubscribeApi, type SubscribeBatchParams, type SubscribeBatchResponse, type SubscribeProposalInput, type SubscribeProposalResult, ThesesResource, type Thesis, type ThesisAssetCandidate, type ThesisAssetCandidatesResponse, type ThesisAssetMention, type ThesisAssetStance, type ThesisAuthor, type ThesisEntity, type ThesisEntityStance, type ThesisGetResponse, type ThesisID, type ThesisListPage, type ThesisMedia, type ThesisPageParams, type ThesisPublicationSummary, type ThesisPublisher, type ThesisReadScope, type ThesisRecommendation, type ThesisRecommendationPage, type ThesisResearchStatus, type ThesisResponse, type ThesisRewriteMode, type ThesisSignal, type ThesisSignalEnabledResponse, type ThesisSignalEntry, type ThesisSignalEvidenceExcerpt, type ThesisSignalSource, type ThesisSignalsResponse, type ThesisSourceReference, type ThesisStarredResponse, type ThesisVisibility, type TradingPairCandidate, type TradingPairSearchParams, type TradingPairSearchResponse, TradingPairsResource, type TrendingPlaybookItem, type TrendingPlaybooksDir, type TrendingPlaybooksParams, type TrendingPlaybooksResponse, type TrendingPlaybooksSort, UDF_AUTH_REQUIRED_MESSAGE, UDF_CONSENT_REQUEST_MESSAGE, UDF_CONSENT_RESPONSE_MESSAGE, type UdfApi, UdfAuthRequiredError, type UdfButtonEventDetail, type UdfButtonOptions, UdfConsentDeniedError, UdfConsentRequiredError, UdfConsentTimeoutError, type UdfDescriptor, UdfError, UdfExecutionError, UdfFunctionDisabledError, UdfFunctionNotFoundError, UdfInsufficientCredits, type UdfInvokeResponse, UdfPidMismatchError, UdfRateLimitedError, UdfTokenExpiredError, UdfTokenInvalidError, UdfTransportError, type UnfollowPlaybookResponse, type UnresolvedTicker, type UnsubscribeBatchParams, type UnsubscribeBatchResponse, type UpdateThesisParams, VERSION, type WatchlistPage, type WatchlistTicker, type WatchlistTickerKind, type WatchlistTickerSpec, type WatchlistTickersParams, type XAccount, type XConnectionStatus, type XPost, type XReadPage, type XReadParams, XResource, getViewerToken, installPlaybookRuntime, mapUdfErrorResponse, playbookIdFromToken, subscribe, udf };
3377
+ export { type AddToWatchlistResult, type AgentSchedule, type AgentScheduleBounds, type AgentScheduleFailureCode, type AgentScheduleRule, type AgentScheduleStatus, type AgentScheduleTarget, AlertsResource, AlvaClient, type AlvaClientConfig, AlvaError, type AutomationAlertDelivery, type AutomationAlertDeliveryGetRequest, AutomationAlertDeliveryResource, type AutomationAlertDeliveryUpdateRequest, type AutomationAlertDeliveryUpdateResponse, type AutomationEmailDelivery, AutomationResource, type ChannelGroupAdminInfo, type ChannelGroupCallerInfo, type ChannelGroupHistoryParams, type ChannelGroupHistoryResponse, type ChannelGroupSubscription, type ChannelGroupSubscriptionContextResponse, type ChannelGroupSubscriptionListResponse, type ChannelGroupSubscriptionMutationParams, type ChannelGroupSubscriptionMutationResponse, type ChannelGroupSubscriptionSessionParams, type ChannelGroupSubscriptionTarget, type ChannelGroupSubscriptionTargetType, CliUsageError, type CompanyEarningsCatalog, type CompanyEarningsContentStatus, type CompanyEarningsContext, type CompanyEarningsEvent, type CompanyEarningsParams, type CompanyEarningsPeriod, type CompanyEarningsRelease, type CompanyEarningsSession, type CompanyEarningsStatus, type CompanyEarningsTranscript, type CompanyEarningsTranscriptEntry, type CompanyEarningsTranscriptSection, type CompanyFiscalQuarter, type CompanyNarrative, type CompanyNarrativeChangeLogEntry, type CompanyNarrativeContext, type CompanyNarrativeHistory, type CompanyNarrativeSnapshot, CompanyNewsResource, type CompanyPostEarningsSummary, type CompanyPreEarningsAnalysis, type CreateAllowanceParams, type CreateAllowanceResponse, type CreateCompanyNewsParams, type CreateCompanyNewsResponse, type CreateThesisParams, type CreditAllowance, type CreditWallet, type CreditWalletItem, type CreditWalletItemConnection, type CreditWalletItemEdge, type CreditWalletItemsParams, type CreditWalletItemsResponse, type CreditWalletPageInfo, type DeleteFunctionParams, type FeedDeleteRequest, type FeedDeleteResponse, type FeedListItem, type FeedListParams, type FeedListResponse, type FeedListStatus, type FeedStatusUpdateRequest, type FeedStatusUpdateResponse, type FollowPageInfo, type FollowPageParams, type FollowPlaybookResponse, type FollowProfile, type FollowProfileKind, type FollowedProfilesParams, type FollowingThesesPage, type FollowingThesesParams, type FollowingThesisAuthor, type FollowingThesisItem, FollowsResource, type ForYouConnection, type ForYouEntry, type ForYouListParams, ForYouResource, type ForYouThesesParams, type FsChmodParams, type FsCopyParams, type FsEntry, type FsGrantParams, type FsMkdirParams, type FsRawWriteParams, type FsReadParams, type FsReaddirParams, type FsReaddirResponse, type FsReadlinkParams, type FsRemoveParams, type FsRenameParams, type FsRevokeParams, type FsStat, type FsSymlinkParams, type FsWriteParams, type FsWriteResponse, type GetAllowanceParams, type GroupChatMessage, type InvokeFunctionParams, type InvokeFunctionResponse, type ListAllowancesResponse, type ListFunctionsParams, type ListFunctionsResponse, type ListThesesParams, type ListThesisSignalsParams, type ManageAgentScheduleParams, MarketsResource, type NotificationPreference, type NotificationPreferenceKey, type NotificationPreferenceUpdateParams, type NotificationPreferenceUpdateResponse, type NotificationPreferencesResponse, PBSV_UPDATE_MESSAGE, type PlaybookFollowParams, type PlaybookFunction, type PlaybookSkillFile, type PlaybookSkillFileMeta, type PlaybookSkillMeta, type PlaybookSkillSummary, type PlaybookSkillTagEntry, type ProfileFollowResult, type ProfileRefParams, type ProfilesPage, type PutAgentScheduleParams, type RegisterFunctionParams, type RegisterFunctionResponse, type RelatedThesesPage, type RemoveFromWatchlistResult, type ResolvedTicker, type RevokeAllowanceParams, type RevokeAllowanceResponse, type RewriteThesisParams, type RewriteThesisResponse, SUBSCRIBE_MANAGE_MESSAGE, SUBSCRIBE_PROPOSE_MESSAGE, SUBSCRIBE_RESULT_MESSAGE, SchedulesResource, type SearchProfilesParams, type SetThesisArchivedParams, type SetThesisVisibilityParams, type SkillDoc, type SkillEndpointMetadata, type SkillEndpointTier, type SkillMetadata, type SkillSummary, type StewardBriefedParams, type StewardDecideParams, type StewardDecision, type StewardDigestRun, type StewardDigestRunParams, type StewardDigestRunState, type StewardForwardParams, type StewardPendingFullParams, type StewardPendingItem, type StewardPendingPage, type StewardPendingPageParams, type StewardPendingParams, type StewardPendingResult, StewardResource, type StewardSendDigestRunParams, type StewardSendParams, type StewardTarget, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SubscribeApi, type SubscribeBatchParams, type SubscribeBatchResponse, type SubscribeProposalInput, type SubscribeProposalResult, ThesesResource, type Thesis, type ThesisAssetCandidate, type ThesisAssetCandidatesResponse, type ThesisAssetMention, type ThesisAssetStance, type ThesisAuthor, type ThesisEntity, type ThesisEntityStance, type ThesisGetResponse, type ThesisID, type ThesisListPage, type ThesisMedia, type ThesisPageParams, type ThesisPublicationSummary, type ThesisPublisher, type ThesisReadScope, type ThesisRecommendation, type ThesisRecommendationPage, type ThesisResearchStatus, type ThesisResponse, type ThesisRewriteMode, type ThesisSignal, type ThesisSignalEnabledResponse, type ThesisSignalEntry, type ThesisSignalEvidenceExcerpt, type ThesisSignalSource, type ThesisSignalsResponse, type ThesisSourceReference, type ThesisStarredResponse, type ThesisVisibility, type TradingPairCandidate, type TradingPairSearchParams, type TradingPairSearchResponse, TradingPairsResource, type TrendingPlaybookItem, type TrendingPlaybooksDir, type TrendingPlaybooksParams, type TrendingPlaybooksResponse, type TrendingPlaybooksSort, UDF_AUTH_REQUIRED_MESSAGE, UDF_CONSENT_REQUEST_MESSAGE, UDF_CONSENT_RESPONSE_MESSAGE, type UdfApi, UdfAuthRequiredError, type UdfButtonEventDetail, type UdfButtonOptions, UdfConsentDeniedError, UdfConsentRequiredError, UdfConsentTimeoutError, type UdfDescriptor, UdfError, UdfExecutionError, UdfFunctionDisabledError, UdfFunctionNotFoundError, UdfInsufficientCredits, type UdfInvokeResponse, UdfPidMismatchError, UdfRateLimitedError, UdfTokenExpiredError, UdfTokenInvalidError, UdfTransportError, type UnfollowPlaybookResponse, type UnresolvedTicker, type UnsubscribeBatchParams, type UnsubscribeBatchResponse, type UpdateThesisParams, VERSION, type WatchlistPage, type WatchlistTicker, type WatchlistTickerKind, type WatchlistTickerSpec, type WatchlistTickersParams, type XAccount, type XConnectionStatus, type XPost, type XReadPage, type XReadParams, XResource, getViewerToken, installPlaybookRuntime, mapUdfErrorResponse, playbookIdFromToken, subscribe, udf };