@alva-ai/toolkit 0.28.0 → 0.28.1-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.cts CHANGED
@@ -13,6 +13,8 @@ interface AlvaClientConfig {
13
13
  originSessionId?: string;
14
14
  /** Session profile kind used to gate attached-context CLI commands. */
15
15
  originSessionKind?: string;
16
+ /** Host-attached canonical Session Inbox path; embedded scheduling is self-only. */
17
+ originInboxPath?: string;
16
18
  }
17
19
  interface UserProfile {
18
20
  id: string;
@@ -2157,8 +2159,14 @@ interface AgentSchedule {
2157
2159
  createdAt: string;
2158
2160
  updatedAt: string;
2159
2161
  }
2160
- interface PutAgentScheduleParams {
2162
+ type AgentScheduleTarget = {
2161
2163
  channelId: string | number;
2164
+ inboxPath?: never;
2165
+ } | {
2166
+ inboxPath: string;
2167
+ channelId?: never;
2168
+ };
2169
+ type PutAgentScheduleParams = AgentScheduleTarget & {
2162
2170
  name: string;
2163
2171
  rule: AgentScheduleRule | {
2164
2172
  kind: 'after';
@@ -2166,17 +2174,14 @@ interface PutAgentScheduleParams {
2166
2174
  };
2167
2175
  bounds?: AgentScheduleBounds;
2168
2176
  text: string;
2169
- }
2170
- interface ManageAgentScheduleParams {
2171
- channelId: string | number;
2177
+ };
2178
+ type ManageAgentScheduleParams = AgentScheduleTarget & {
2172
2179
  name: string;
2173
- }
2180
+ };
2174
2181
  declare class SchedulesResource {
2175
2182
  private client;
2176
2183
  constructor(client: AlvaClient);
2177
- list(params: {
2178
- channelId: string | number;
2179
- }): Promise<AgentSchedule[]>;
2184
+ list(params: AgentScheduleTarget): Promise<AgentSchedule[]>;
2180
2185
  put(params: PutAgentScheduleParams): Promise<AgentSchedule>;
2181
2186
  pause(params: ManageAgentScheduleParams): Promise<AgentSchedule>;
2182
2187
  resume(params: ManageAgentScheduleParams): Promise<AgentSchedule>;
@@ -2184,6 +2189,89 @@ declare class SchedulesResource {
2184
2189
  /** Resolve the authenticated viewer's unique Agent Channel for CLI defaults. */
2185
2190
  agentChannelId(): Promise<string>;
2186
2191
  private manage;
2192
+ private update;
2193
+ private graphql;
2194
+ }
2195
+
2196
+ /**
2197
+ * Push steward tool commands (mono-meta #935). Every call names the steward by
2198
+ * its own Session Inbox path, which the host supplies to the embedded `alva`
2199
+ * tool; the Backend resolves it to the caller's ready steward binding and
2200
+ * scopes every delivery to that binding's Channel.
2201
+ */
2202
+ type StewardDecision = 'immediate' | 'digest' | 'suppress';
2203
+ interface StewardTarget {
2204
+ inboxPath: string;
2205
+ }
2206
+ interface StewardDecideParams extends StewardTarget {
2207
+ deliveryId: string;
2208
+ decision: StewardDecision;
2209
+ reason: string;
2210
+ }
2211
+ interface StewardForwardParams extends StewardTarget {
2212
+ deliveryId: string;
2213
+ /** Idempotency key; the CLI generates a UUID when omitted. */
2214
+ requestId?: string;
2215
+ }
2216
+ interface StewardSendParams extends StewardTarget {
2217
+ body: string;
2218
+ deliveryIds: string[];
2219
+ requestId?: string;
2220
+ }
2221
+ type StewardSourceKind = 'FEED' | 'MARKET_ENTITY' | 'THESIS_FEED';
2222
+ interface StewardPendingParams extends StewardTarget {
2223
+ /** Opaque cursor from the previous page's `nextCursor`; carries the window. */
2224
+ after?: string;
2225
+ /** First page only: lower bound on decision time. */
2226
+ sinceMs?: number;
2227
+ /** First page only: fixed upper bound of the Brief window (the digest_request's untilMs). */
2228
+ untilMs?: number;
2229
+ first?: number;
2230
+ }
2231
+ interface StewardBriefedParams extends StewardTarget {
2232
+ deliveryIds: string[];
2233
+ digestRunId: string;
2234
+ }
2235
+ interface StewardDecideResult {
2236
+ state: string;
2237
+ }
2238
+ interface StewardForwardResult {
2239
+ channelMessageId: string;
2240
+ state: string;
2241
+ }
2242
+ interface StewardSendResult {
2243
+ channelMessageId: string;
2244
+ /** The idempotency key used; pass it as digestRunId to `briefed`. */
2245
+ requestId: string;
2246
+ }
2247
+ interface StewardPendingItem {
2248
+ deliveryId: string;
2249
+ feedEntryId: string;
2250
+ source: {
2251
+ kind: StewardSourceKind;
2252
+ id: string;
2253
+ };
2254
+ decisionReason: string;
2255
+ consumedAtMs: number;
2256
+ }
2257
+ interface StewardPendingPage {
2258
+ items: StewardPendingItem[];
2259
+ /** Cursor for the next page; `null` when this page was the last. */
2260
+ nextCursor: string | null;
2261
+ /** The window every page of this Brief was read with. */
2262
+ windowSinceMs: number;
2263
+ windowUntilMs: number;
2264
+ }
2265
+ declare class StewardResource {
2266
+ private client;
2267
+ constructor(client: AlvaClient);
2268
+ decide(params: StewardDecideParams): Promise<StewardDecideResult>;
2269
+ forward(params: StewardForwardParams): Promise<StewardForwardResult>;
2270
+ send(params: StewardSendParams): Promise<StewardSendResult>;
2271
+ pending(params: StewardPendingParams): Promise<StewardPendingPage>;
2272
+ briefed(params: StewardBriefedParams): Promise<{
2273
+ ok: true;
2274
+ }>;
2187
2275
  private graphql;
2188
2276
  }
2189
2277
 
@@ -2224,6 +2312,92 @@ declare class TradingPairsResource {
2224
2312
  } & TradingPairResolveFilters) | Omit<TradingPairSearchParams, 'limit'>): Promise<TradingPairCandidate>;
2225
2313
  }
2226
2314
 
2315
+ /** Thesis IDs are signed int64 values represented losslessly as decimal strings. */
2316
+ type ThesisID = string;
2317
+ type ThesisVisibility = 'public' | 'private';
2318
+ /** Canonical server-supported candidate rewrite operation. */
2319
+ type ThesisRewriteMode = 'reformat' | 'shorten' | 'enrich';
2320
+ interface Thesis {
2321
+ id: ThesisID;
2322
+ author_version_id: ThesisID;
2323
+ material_version_id: ThesisID;
2324
+ title: string;
2325
+ body: string;
2326
+ entity_ids: ThesisID[];
2327
+ visibility: ThesisVisibility;
2328
+ closed: boolean;
2329
+ closing_note: string;
2330
+ author_kind: string;
2331
+ author_ref: string;
2332
+ }
2333
+ interface ThesisResponse {
2334
+ thesis: Thesis;
2335
+ }
2336
+ interface ThesisAuthor {
2337
+ id: ThesisID;
2338
+ kind: string;
2339
+ display_name: string;
2340
+ avatar_url: string;
2341
+ username: string;
2342
+ }
2343
+ interface ThesisEntity {
2344
+ id: ThesisID;
2345
+ ticker: string;
2346
+ name: string;
2347
+ icon_url: string;
2348
+ kind: string;
2349
+ }
2350
+ interface ThesisGetResponse extends ThesisResponse {
2351
+ author: ThesisAuthor;
2352
+ entities: ThesisEntity[];
2353
+ }
2354
+ interface CreateThesisParams {
2355
+ /** Caller-supplied, stable non-zero UUID. Reuse it only to resolve ambiguity. */
2356
+ request_id: string;
2357
+ body: string;
2358
+ title?: string;
2359
+ entity_ids?: ThesisID[];
2360
+ /** Omitted means public, as defined by the REST contract. */
2361
+ visibility?: ThesisVisibility;
2362
+ }
2363
+ interface UpdateThesisParams {
2364
+ /** Caller-supplied, stable non-zero UUID. Reuse it only to resolve ambiguity. */
2365
+ request_id: string;
2366
+ expected_author_version_id: ThesisID;
2367
+ body: string;
2368
+ title?: string;
2369
+ entity_ids?: ThesisID[];
2370
+ /** Required so an update cannot inadvertently publish a private thesis. */
2371
+ visibility: ThesisVisibility;
2372
+ editorial?: boolean;
2373
+ }
2374
+ interface CloseThesisParams {
2375
+ expected_author_version_id: ThesisID;
2376
+ note?: string;
2377
+ }
2378
+ interface RewriteThesisParams {
2379
+ body: string;
2380
+ /** Omitted selects the canonical `reformat` mode. */
2381
+ mode?: ThesisRewriteMode;
2382
+ }
2383
+ interface RewriteThesisResponse {
2384
+ body: string;
2385
+ }
2386
+ /**
2387
+ * Thesis CRUD and explicit text rewriting. This resource never retries,
2388
+ * starts Signal/Alert setup, or invokes rewrite as a side effect of CRUD.
2389
+ */
2390
+ declare class ThesesResource {
2391
+ private client;
2392
+ constructor(client: AlvaClient);
2393
+ create(params: CreateThesisParams): Promise<ThesisResponse>;
2394
+ get(id: ThesisID): Promise<ThesisGetResponse>;
2395
+ update(id: ThesisID, params: UpdateThesisParams): Promise<ThesisResponse>;
2396
+ close(id: ThesisID, params: CloseThesisParams): Promise<ThesisResponse>;
2397
+ delete(id: ThesisID): Promise<Record<string, never>>;
2398
+ rewrite(params: RewriteThesisParams): Promise<RewriteThesisResponse>;
2399
+ }
2400
+
2227
2401
  interface RequestOptions {
2228
2402
  query?: Record<string, unknown>;
2229
2403
  body?: unknown;
@@ -2261,6 +2435,8 @@ declare class AlvaClient {
2261
2435
  readonly originSessionId?: string;
2262
2436
  /** Session profile kind associated with originSessionId. */
2263
2437
  readonly originSessionKind?: string;
2438
+ /** Host-attached file Session target, distinct from the chat origin header. */
2439
+ readonly originInboxPath?: string;
2264
2440
  private _fs?;
2265
2441
  private _run?;
2266
2442
  private _deploy?;
@@ -2291,7 +2467,9 @@ declare class AlvaClient {
2291
2467
  private _credits?;
2292
2468
  private _markets?;
2293
2469
  private _schedules?;
2470
+ private _steward?;
2294
2471
  private _tradingPairs?;
2472
+ private _theses?;
2295
2473
  constructor(config: AlvaClientConfig);
2296
2474
  get fs(): FsResource;
2297
2475
  get run(): RunResource;
@@ -2323,6 +2501,8 @@ declare class AlvaClient {
2323
2501
  get markets(): MarketsResource;
2324
2502
  get tradingPairs(): TradingPairsResource;
2325
2503
  get schedules(): SchedulesResource;
2504
+ get steward(): StewardResource;
2505
+ get theses(): ThesesResource;
2326
2506
  _requireAuth(): void;
2327
2507
  get forYou(): ForYouResource;
2328
2508
  _request(method: string, path: string, options?: RequestOptions): Promise<unknown>;
@@ -2478,4 +2658,4 @@ declare const installPlaybookRuntime: (targetWindow?: Window) => void;
2478
2658
  /** SDK version, injected at build time from package.json. */
2479
2659
  declare const VERSION: string;
2480
2660
 
2481
- export { type AgentSchedule, type AgentScheduleBounds, type AgentScheduleFailureCode, type AgentScheduleRule, type AgentScheduleStatus, 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, type CompanyPostEarningsSummary, type CompanyPreEarningsAnalysis, type CreateAllowanceParams, type CreateAllowanceResponse, 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 FollowPlaybookResponse, type ForYouConnection, type ForYouEntry, type ForYouListParams, ForYouResource, 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 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 PutAgentScheduleParams, type RegisterFunctionParams, type RegisterFunctionResponse, type RevokeAllowanceParams, type RevokeAllowanceResponse, SUBSCRIBE_MANAGE_MESSAGE, SUBSCRIBE_PROPOSE_MESSAGE, SUBSCRIBE_RESULT_MESSAGE, SchedulesResource, type SkillDoc, type SkillEndpointMetadata, type SkillEndpointTier, type SkillMetadata, type SkillSummary, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SubscribeApi, type SubscribeBatchParams, type SubscribeBatchResponse, type SubscribeProposalInput, type SubscribeProposalResult, 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 UnsubscribeBatchParams, type UnsubscribeBatchResponse, VERSION, getViewerToken, installPlaybookRuntime, mapUdfErrorResponse, playbookIdFromToken, subscribe, udf };
2661
+ export { 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 CloseThesisParams, 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, type CompanyPostEarningsSummary, type CompanyPreEarningsAnalysis, type CreateAllowanceParams, type CreateAllowanceResponse, 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 FollowPlaybookResponse, type ForYouConnection, type ForYouEntry, type ForYouListParams, ForYouResource, 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 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 PutAgentScheduleParams, type RegisterFunctionParams, type RegisterFunctionResponse, type RevokeAllowanceParams, type RevokeAllowanceResponse, type RewriteThesisParams, type RewriteThesisResponse, SUBSCRIBE_MANAGE_MESSAGE, SUBSCRIBE_PROPOSE_MESSAGE, SUBSCRIBE_RESULT_MESSAGE, SchedulesResource, type SkillDoc, type SkillEndpointMetadata, type SkillEndpointTier, type SkillMetadata, type SkillSummary, type StewardBriefedParams, type StewardDecideParams, type StewardDecision, type StewardForwardParams, type StewardPendingItem, type StewardPendingPage, type StewardPendingParams, StewardResource, type StewardSendParams, type StewardTarget, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SubscribeApi, type SubscribeBatchParams, type SubscribeBatchResponse, type SubscribeProposalInput, type SubscribeProposalResult, ThesesResource, type Thesis, type ThesisAuthor, type ThesisEntity, type ThesisGetResponse, type ThesisID, type ThesisResponse, type ThesisRewriteMode, 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 UnsubscribeBatchParams, type UnsubscribeBatchResponse, type UpdateThesisParams, VERSION, getViewerToken, installPlaybookRuntime, mapUdfErrorResponse, playbookIdFromToken, subscribe, udf };
package/dist/index.d.ts CHANGED
@@ -13,6 +13,8 @@ interface AlvaClientConfig {
13
13
  originSessionId?: string;
14
14
  /** Session profile kind used to gate attached-context CLI commands. */
15
15
  originSessionKind?: string;
16
+ /** Host-attached canonical Session Inbox path; embedded scheduling is self-only. */
17
+ originInboxPath?: string;
16
18
  }
17
19
  interface UserProfile {
18
20
  id: string;
@@ -2157,8 +2159,14 @@ interface AgentSchedule {
2157
2159
  createdAt: string;
2158
2160
  updatedAt: string;
2159
2161
  }
2160
- interface PutAgentScheduleParams {
2162
+ type AgentScheduleTarget = {
2161
2163
  channelId: string | number;
2164
+ inboxPath?: never;
2165
+ } | {
2166
+ inboxPath: string;
2167
+ channelId?: never;
2168
+ };
2169
+ type PutAgentScheduleParams = AgentScheduleTarget & {
2162
2170
  name: string;
2163
2171
  rule: AgentScheduleRule | {
2164
2172
  kind: 'after';
@@ -2166,17 +2174,14 @@ interface PutAgentScheduleParams {
2166
2174
  };
2167
2175
  bounds?: AgentScheduleBounds;
2168
2176
  text: string;
2169
- }
2170
- interface ManageAgentScheduleParams {
2171
- channelId: string | number;
2177
+ };
2178
+ type ManageAgentScheduleParams = AgentScheduleTarget & {
2172
2179
  name: string;
2173
- }
2180
+ };
2174
2181
  declare class SchedulesResource {
2175
2182
  private client;
2176
2183
  constructor(client: AlvaClient);
2177
- list(params: {
2178
- channelId: string | number;
2179
- }): Promise<AgentSchedule[]>;
2184
+ list(params: AgentScheduleTarget): Promise<AgentSchedule[]>;
2180
2185
  put(params: PutAgentScheduleParams): Promise<AgentSchedule>;
2181
2186
  pause(params: ManageAgentScheduleParams): Promise<AgentSchedule>;
2182
2187
  resume(params: ManageAgentScheduleParams): Promise<AgentSchedule>;
@@ -2184,6 +2189,89 @@ declare class SchedulesResource {
2184
2189
  /** Resolve the authenticated viewer's unique Agent Channel for CLI defaults. */
2185
2190
  agentChannelId(): Promise<string>;
2186
2191
  private manage;
2192
+ private update;
2193
+ private graphql;
2194
+ }
2195
+
2196
+ /**
2197
+ * Push steward tool commands (mono-meta #935). Every call names the steward by
2198
+ * its own Session Inbox path, which the host supplies to the embedded `alva`
2199
+ * tool; the Backend resolves it to the caller's ready steward binding and
2200
+ * scopes every delivery to that binding's Channel.
2201
+ */
2202
+ type StewardDecision = 'immediate' | 'digest' | 'suppress';
2203
+ interface StewardTarget {
2204
+ inboxPath: string;
2205
+ }
2206
+ interface StewardDecideParams extends StewardTarget {
2207
+ deliveryId: string;
2208
+ decision: StewardDecision;
2209
+ reason: string;
2210
+ }
2211
+ interface StewardForwardParams extends StewardTarget {
2212
+ deliveryId: string;
2213
+ /** Idempotency key; the CLI generates a UUID when omitted. */
2214
+ requestId?: string;
2215
+ }
2216
+ interface StewardSendParams extends StewardTarget {
2217
+ body: string;
2218
+ deliveryIds: string[];
2219
+ requestId?: string;
2220
+ }
2221
+ type StewardSourceKind = 'FEED' | 'MARKET_ENTITY' | 'THESIS_FEED';
2222
+ interface StewardPendingParams extends StewardTarget {
2223
+ /** Opaque cursor from the previous page's `nextCursor`; carries the window. */
2224
+ after?: string;
2225
+ /** First page only: lower bound on decision time. */
2226
+ sinceMs?: number;
2227
+ /** First page only: fixed upper bound of the Brief window (the digest_request's untilMs). */
2228
+ untilMs?: number;
2229
+ first?: number;
2230
+ }
2231
+ interface StewardBriefedParams extends StewardTarget {
2232
+ deliveryIds: string[];
2233
+ digestRunId: string;
2234
+ }
2235
+ interface StewardDecideResult {
2236
+ state: string;
2237
+ }
2238
+ interface StewardForwardResult {
2239
+ channelMessageId: string;
2240
+ state: string;
2241
+ }
2242
+ interface StewardSendResult {
2243
+ channelMessageId: string;
2244
+ /** The idempotency key used; pass it as digestRunId to `briefed`. */
2245
+ requestId: string;
2246
+ }
2247
+ interface StewardPendingItem {
2248
+ deliveryId: string;
2249
+ feedEntryId: string;
2250
+ source: {
2251
+ kind: StewardSourceKind;
2252
+ id: string;
2253
+ };
2254
+ decisionReason: string;
2255
+ consumedAtMs: number;
2256
+ }
2257
+ interface StewardPendingPage {
2258
+ items: StewardPendingItem[];
2259
+ /** Cursor for the next page; `null` when this page was the last. */
2260
+ nextCursor: string | null;
2261
+ /** The window every page of this Brief was read with. */
2262
+ windowSinceMs: number;
2263
+ windowUntilMs: number;
2264
+ }
2265
+ declare class StewardResource {
2266
+ private client;
2267
+ constructor(client: AlvaClient);
2268
+ decide(params: StewardDecideParams): Promise<StewardDecideResult>;
2269
+ forward(params: StewardForwardParams): Promise<StewardForwardResult>;
2270
+ send(params: StewardSendParams): Promise<StewardSendResult>;
2271
+ pending(params: StewardPendingParams): Promise<StewardPendingPage>;
2272
+ briefed(params: StewardBriefedParams): Promise<{
2273
+ ok: true;
2274
+ }>;
2187
2275
  private graphql;
2188
2276
  }
2189
2277
 
@@ -2224,6 +2312,92 @@ declare class TradingPairsResource {
2224
2312
  } & TradingPairResolveFilters) | Omit<TradingPairSearchParams, 'limit'>): Promise<TradingPairCandidate>;
2225
2313
  }
2226
2314
 
2315
+ /** Thesis IDs are signed int64 values represented losslessly as decimal strings. */
2316
+ type ThesisID = string;
2317
+ type ThesisVisibility = 'public' | 'private';
2318
+ /** Canonical server-supported candidate rewrite operation. */
2319
+ type ThesisRewriteMode = 'reformat' | 'shorten' | 'enrich';
2320
+ interface Thesis {
2321
+ id: ThesisID;
2322
+ author_version_id: ThesisID;
2323
+ material_version_id: ThesisID;
2324
+ title: string;
2325
+ body: string;
2326
+ entity_ids: ThesisID[];
2327
+ visibility: ThesisVisibility;
2328
+ closed: boolean;
2329
+ closing_note: string;
2330
+ author_kind: string;
2331
+ author_ref: string;
2332
+ }
2333
+ interface ThesisResponse {
2334
+ thesis: Thesis;
2335
+ }
2336
+ interface ThesisAuthor {
2337
+ id: ThesisID;
2338
+ kind: string;
2339
+ display_name: string;
2340
+ avatar_url: string;
2341
+ username: string;
2342
+ }
2343
+ interface ThesisEntity {
2344
+ id: ThesisID;
2345
+ ticker: string;
2346
+ name: string;
2347
+ icon_url: string;
2348
+ kind: string;
2349
+ }
2350
+ interface ThesisGetResponse extends ThesisResponse {
2351
+ author: ThesisAuthor;
2352
+ entities: ThesisEntity[];
2353
+ }
2354
+ interface CreateThesisParams {
2355
+ /** Caller-supplied, stable non-zero UUID. Reuse it only to resolve ambiguity. */
2356
+ request_id: string;
2357
+ body: string;
2358
+ title?: string;
2359
+ entity_ids?: ThesisID[];
2360
+ /** Omitted means public, as defined by the REST contract. */
2361
+ visibility?: ThesisVisibility;
2362
+ }
2363
+ interface UpdateThesisParams {
2364
+ /** Caller-supplied, stable non-zero UUID. Reuse it only to resolve ambiguity. */
2365
+ request_id: string;
2366
+ expected_author_version_id: ThesisID;
2367
+ body: string;
2368
+ title?: string;
2369
+ entity_ids?: ThesisID[];
2370
+ /** Required so an update cannot inadvertently publish a private thesis. */
2371
+ visibility: ThesisVisibility;
2372
+ editorial?: boolean;
2373
+ }
2374
+ interface CloseThesisParams {
2375
+ expected_author_version_id: ThesisID;
2376
+ note?: string;
2377
+ }
2378
+ interface RewriteThesisParams {
2379
+ body: string;
2380
+ /** Omitted selects the canonical `reformat` mode. */
2381
+ mode?: ThesisRewriteMode;
2382
+ }
2383
+ interface RewriteThesisResponse {
2384
+ body: string;
2385
+ }
2386
+ /**
2387
+ * Thesis CRUD and explicit text rewriting. This resource never retries,
2388
+ * starts Signal/Alert setup, or invokes rewrite as a side effect of CRUD.
2389
+ */
2390
+ declare class ThesesResource {
2391
+ private client;
2392
+ constructor(client: AlvaClient);
2393
+ create(params: CreateThesisParams): Promise<ThesisResponse>;
2394
+ get(id: ThesisID): Promise<ThesisGetResponse>;
2395
+ update(id: ThesisID, params: UpdateThesisParams): Promise<ThesisResponse>;
2396
+ close(id: ThesisID, params: CloseThesisParams): Promise<ThesisResponse>;
2397
+ delete(id: ThesisID): Promise<Record<string, never>>;
2398
+ rewrite(params: RewriteThesisParams): Promise<RewriteThesisResponse>;
2399
+ }
2400
+
2227
2401
  interface RequestOptions {
2228
2402
  query?: Record<string, unknown>;
2229
2403
  body?: unknown;
@@ -2261,6 +2435,8 @@ declare class AlvaClient {
2261
2435
  readonly originSessionId?: string;
2262
2436
  /** Session profile kind associated with originSessionId. */
2263
2437
  readonly originSessionKind?: string;
2438
+ /** Host-attached file Session target, distinct from the chat origin header. */
2439
+ readonly originInboxPath?: string;
2264
2440
  private _fs?;
2265
2441
  private _run?;
2266
2442
  private _deploy?;
@@ -2291,7 +2467,9 @@ declare class AlvaClient {
2291
2467
  private _credits?;
2292
2468
  private _markets?;
2293
2469
  private _schedules?;
2470
+ private _steward?;
2294
2471
  private _tradingPairs?;
2472
+ private _theses?;
2295
2473
  constructor(config: AlvaClientConfig);
2296
2474
  get fs(): FsResource;
2297
2475
  get run(): RunResource;
@@ -2323,6 +2501,8 @@ declare class AlvaClient {
2323
2501
  get markets(): MarketsResource;
2324
2502
  get tradingPairs(): TradingPairsResource;
2325
2503
  get schedules(): SchedulesResource;
2504
+ get steward(): StewardResource;
2505
+ get theses(): ThesesResource;
2326
2506
  _requireAuth(): void;
2327
2507
  get forYou(): ForYouResource;
2328
2508
  _request(method: string, path: string, options?: RequestOptions): Promise<unknown>;
@@ -2478,4 +2658,4 @@ declare const installPlaybookRuntime: (targetWindow?: Window) => void;
2478
2658
  /** SDK version, injected at build time from package.json. */
2479
2659
  declare const VERSION: string;
2480
2660
 
2481
- export { type AgentSchedule, type AgentScheduleBounds, type AgentScheduleFailureCode, type AgentScheduleRule, type AgentScheduleStatus, 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, type CompanyPostEarningsSummary, type CompanyPreEarningsAnalysis, type CreateAllowanceParams, type CreateAllowanceResponse, 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 FollowPlaybookResponse, type ForYouConnection, type ForYouEntry, type ForYouListParams, ForYouResource, 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 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 PutAgentScheduleParams, type RegisterFunctionParams, type RegisterFunctionResponse, type RevokeAllowanceParams, type RevokeAllowanceResponse, SUBSCRIBE_MANAGE_MESSAGE, SUBSCRIBE_PROPOSE_MESSAGE, SUBSCRIBE_RESULT_MESSAGE, SchedulesResource, type SkillDoc, type SkillEndpointMetadata, type SkillEndpointTier, type SkillMetadata, type SkillSummary, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SubscribeApi, type SubscribeBatchParams, type SubscribeBatchResponse, type SubscribeProposalInput, type SubscribeProposalResult, 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 UnsubscribeBatchParams, type UnsubscribeBatchResponse, VERSION, getViewerToken, installPlaybookRuntime, mapUdfErrorResponse, playbookIdFromToken, subscribe, udf };
2661
+ export { 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 CloseThesisParams, 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, type CompanyPostEarningsSummary, type CompanyPreEarningsAnalysis, type CreateAllowanceParams, type CreateAllowanceResponse, 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 FollowPlaybookResponse, type ForYouConnection, type ForYouEntry, type ForYouListParams, ForYouResource, 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 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 PutAgentScheduleParams, type RegisterFunctionParams, type RegisterFunctionResponse, type RevokeAllowanceParams, type RevokeAllowanceResponse, type RewriteThesisParams, type RewriteThesisResponse, SUBSCRIBE_MANAGE_MESSAGE, SUBSCRIBE_PROPOSE_MESSAGE, SUBSCRIBE_RESULT_MESSAGE, SchedulesResource, type SkillDoc, type SkillEndpointMetadata, type SkillEndpointTier, type SkillMetadata, type SkillSummary, type StewardBriefedParams, type StewardDecideParams, type StewardDecision, type StewardForwardParams, type StewardPendingItem, type StewardPendingPage, type StewardPendingParams, StewardResource, type StewardSendParams, type StewardTarget, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SubscribeApi, type SubscribeBatchParams, type SubscribeBatchResponse, type SubscribeProposalInput, type SubscribeProposalResult, ThesesResource, type Thesis, type ThesisAuthor, type ThesisEntity, type ThesisGetResponse, type ThesisID, type ThesisResponse, type ThesisRewriteMode, 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 UnsubscribeBatchParams, type UnsubscribeBatchResponse, type UpdateThesisParams, VERSION, getViewerToken, installPlaybookRuntime, mapUdfErrorResponse, playbookIdFromToken, subscribe, udf };