@alva-ai/toolkit 0.29.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -2
- package/dist/browser.global.js +63 -24
- package/dist/browser.global.js.map +1 -1
- package/dist/cli.d.ts +137 -1
- package/dist/cli.js +377 -40
- package/dist/cli.js.map +1 -1
- package/dist/dispatch.d.ts +137 -1
- package/dist/dispatch.js +174 -17
- package/dist/dispatch.js.map +1 -1
- package/dist/index.cjs +294 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +138 -2
- package/dist/index.d.ts +138 -2
- package/dist/index.js +294 -31
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.d.ts
CHANGED
|
@@ -1331,11 +1331,121 @@ interface ForYouConnection {
|
|
|
1331
1331
|
hasPreviousPage: boolean;
|
|
1332
1332
|
};
|
|
1333
1333
|
}
|
|
1334
|
+
interface ForYouThesesParams {
|
|
1335
|
+
first?: number;
|
|
1336
|
+
after?: string;
|
|
1337
|
+
}
|
|
1338
|
+
/** Interface fields shared by user and curated-person publisher profiles. */
|
|
1339
|
+
interface ThesisPublisher {
|
|
1340
|
+
id: string;
|
|
1341
|
+
displayName: string;
|
|
1342
|
+
avatarUrl: string;
|
|
1343
|
+
bio: string;
|
|
1344
|
+
followersCount: number;
|
|
1345
|
+
viewerState: {
|
|
1346
|
+
following: boolean | null;
|
|
1347
|
+
};
|
|
1348
|
+
}
|
|
1349
|
+
interface ThesisSourceReference {
|
|
1350
|
+
title: string | null;
|
|
1351
|
+
sourceKind: string;
|
|
1352
|
+
sourceContentId: string;
|
|
1353
|
+
publicUrl: string;
|
|
1354
|
+
sourceTimeMs: number | null;
|
|
1355
|
+
locator: string;
|
|
1356
|
+
}
|
|
1357
|
+
/** The exact author version this recommendation renders, not the mutable Thesis. */
|
|
1358
|
+
interface ThesisPublicationSummary {
|
|
1359
|
+
thesisId: string;
|
|
1360
|
+
playbookId: string;
|
|
1361
|
+
authorVersionId: string;
|
|
1362
|
+
materialVersionId: string;
|
|
1363
|
+
itemKey: string;
|
|
1364
|
+
title: string;
|
|
1365
|
+
body: string;
|
|
1366
|
+
publishedAtMs: number;
|
|
1367
|
+
changeKind: string;
|
|
1368
|
+
visibility: string;
|
|
1369
|
+
closed: boolean;
|
|
1370
|
+
archived: boolean;
|
|
1371
|
+
note: string;
|
|
1372
|
+
closingNote: string;
|
|
1373
|
+
researchPaused: boolean;
|
|
1374
|
+
entityIds: string[];
|
|
1375
|
+
categoryIds: string[];
|
|
1376
|
+
/** `stance` is UNKNOWN, BULLISH or BEARISH today; Gateway may add values. */
|
|
1377
|
+
entityStances: {
|
|
1378
|
+
entityId: string;
|
|
1379
|
+
stance: string;
|
|
1380
|
+
}[];
|
|
1381
|
+
entities: {
|
|
1382
|
+
id: string;
|
|
1383
|
+
ticker: string;
|
|
1384
|
+
name: string;
|
|
1385
|
+
}[];
|
|
1386
|
+
publisher: ThesisPublisher;
|
|
1387
|
+
/** `type` is PRICE_CHART, IMAGE, AUDIO or VIDEO today; Gateway may add values. */
|
|
1388
|
+
medias: {
|
|
1389
|
+
type: string;
|
|
1390
|
+
coverUrl: string;
|
|
1391
|
+
url: string | null;
|
|
1392
|
+
}[];
|
|
1393
|
+
signalFeed: {
|
|
1394
|
+
id: string;
|
|
1395
|
+
} | null;
|
|
1396
|
+
snapshotRelease: {
|
|
1397
|
+
versionId: string;
|
|
1398
|
+
materialVersionId: string;
|
|
1399
|
+
publishedAtMs: number;
|
|
1400
|
+
changeKind: string;
|
|
1401
|
+
sourceRefs: ThesisSourceReference[];
|
|
1402
|
+
};
|
|
1403
|
+
}
|
|
1404
|
+
interface ThesisRecommendation {
|
|
1405
|
+
itemKey: string;
|
|
1406
|
+
publication: ThesisPublicationSummary;
|
|
1407
|
+
}
|
|
1408
|
+
/**
|
|
1409
|
+
* A ranked page, not a chronological one. `exhausted` is the only end of the
|
|
1410
|
+
* candidate pool; `scanLimited` means this page stopped at its scan budget and
|
|
1411
|
+
* more remains. A page may be empty while `hasNextPage` is still true, because
|
|
1412
|
+
* `endCursor` advances past scanned references that current visibility hides.
|
|
1413
|
+
*
|
|
1414
|
+
* `edges` is the only carrier. Gateway also returns an `items` list built from
|
|
1415
|
+
* the same nodes, but selecting it would put every publication body on the
|
|
1416
|
+
* wire twice for no extra information, so this read does not request it.
|
|
1417
|
+
*/
|
|
1418
|
+
interface ThesisRecommendationPage {
|
|
1419
|
+
edges: {
|
|
1420
|
+
cursor: string;
|
|
1421
|
+
node: ThesisRecommendation;
|
|
1422
|
+
}[];
|
|
1423
|
+
pageInfo: {
|
|
1424
|
+
startCursor: string;
|
|
1425
|
+
endCursor: string;
|
|
1426
|
+
hasNextPage: boolean;
|
|
1427
|
+
hasPreviousPage: boolean;
|
|
1428
|
+
};
|
|
1429
|
+
listId: string;
|
|
1430
|
+
pageCursor: string;
|
|
1431
|
+
nextCursor: string | null;
|
|
1432
|
+
exhausted: boolean;
|
|
1433
|
+
scanLimited: boolean;
|
|
1434
|
+
}
|
|
1334
1435
|
declare class ForYouResource {
|
|
1335
1436
|
private client;
|
|
1336
1437
|
constructor(client: AlvaClient);
|
|
1337
1438
|
/** One newest-first page. Does not truncate content or advance a watermark. */
|
|
1338
1439
|
list(params?: ForYouListParams): Promise<ForYouConnection>;
|
|
1440
|
+
/**
|
|
1441
|
+
* One ranked page of Thesis recommendations -- the stream the Feed App reads,
|
|
1442
|
+
* which is not the chronological `list` stream. Page to `exhausted` and filter
|
|
1443
|
+
* on `publication.publishedAtMs` yourself; the order is slot-mixed, so a time
|
|
1444
|
+
* bound is never a reason to stop paging. Publications the viewer already saw
|
|
1445
|
+
* are withheld by an upstream cooldown, so a window read is "recommended and
|
|
1446
|
+
* recent", not every publication in the window.
|
|
1447
|
+
*/
|
|
1448
|
+
theses(params?: ForYouThesesParams): Promise<ThesisRecommendationPage>;
|
|
1339
1449
|
}
|
|
1340
1450
|
|
|
1341
1451
|
/**
|
|
@@ -2217,7 +2327,8 @@ interface StewardForwardParams extends StewardTarget {
|
|
|
2217
2327
|
}
|
|
2218
2328
|
interface StewardSendParams extends StewardTarget {
|
|
2219
2329
|
body: string;
|
|
2220
|
-
|
|
2330
|
+
/** Omit or pass [] for a For-You-only Brief that covers no ledger delivery. */
|
|
2331
|
+
deliveryIds?: string[];
|
|
2221
2332
|
requestId?: string;
|
|
2222
2333
|
}
|
|
2223
2334
|
type StewardSourceKind = 'FEED' | 'MARKET_ENTITY' | 'THESIS_FEED';
|
|
@@ -2317,6 +2428,27 @@ declare class TradingPairsResource {
|
|
|
2317
2428
|
/** Thesis IDs are signed int64 values represented losslessly as decimal strings. */
|
|
2318
2429
|
type ThesisID = string;
|
|
2319
2430
|
type ThesisVisibility = 'public' | 'private';
|
|
2431
|
+
type ThesisAssetStance = 'unknown' | 'bullish' | 'bearish';
|
|
2432
|
+
interface ThesisEntityStance {
|
|
2433
|
+
entity_id: ThesisID;
|
|
2434
|
+
stance: ThesisAssetStance;
|
|
2435
|
+
}
|
|
2436
|
+
interface ThesisAssetCandidate {
|
|
2437
|
+
entityId: ThesisID;
|
|
2438
|
+
ticker: string;
|
|
2439
|
+
name: string;
|
|
2440
|
+
kind: 'STOCK' | 'ETF' | 'CRYPTO' | 'INDEX';
|
|
2441
|
+
}
|
|
2442
|
+
interface ThesisAssetMention {
|
|
2443
|
+
quote: string;
|
|
2444
|
+
ticker: string;
|
|
2445
|
+
resolution: 'RESOLVED' | 'AMBIGUOUS' | 'UNRESOLVED';
|
|
2446
|
+
stance: 'UNKNOWN' | 'BULLISH' | 'BEARISH';
|
|
2447
|
+
candidates: ThesisAssetCandidate[];
|
|
2448
|
+
}
|
|
2449
|
+
interface ThesisAssetCandidatesResponse {
|
|
2450
|
+
mentions: ThesisAssetMention[];
|
|
2451
|
+
}
|
|
2320
2452
|
/** Canonical server-supported candidate rewrite operation. */
|
|
2321
2453
|
type ThesisRewriteMode = 'reformat' | 'shorten' | 'enrich';
|
|
2322
2454
|
interface Thesis {
|
|
@@ -2326,6 +2458,7 @@ interface Thesis {
|
|
|
2326
2458
|
title: string;
|
|
2327
2459
|
body: string;
|
|
2328
2460
|
entity_ids: ThesisID[];
|
|
2461
|
+
entity_stances?: ThesisEntityStance[];
|
|
2329
2462
|
visibility: ThesisVisibility;
|
|
2330
2463
|
closed: boolean;
|
|
2331
2464
|
closing_note: string;
|
|
@@ -2401,6 +2534,8 @@ interface CreateThesisParams {
|
|
|
2401
2534
|
body: string;
|
|
2402
2535
|
title?: string;
|
|
2403
2536
|
entity_ids?: ThesisID[];
|
|
2537
|
+
/** Author direction keyed by an entity ID also supplied in entity_ids. */
|
|
2538
|
+
entity_stances?: ThesisEntityStance[];
|
|
2404
2539
|
/** Exact STOCK ticker symbols resolved by Backend during creation. */
|
|
2405
2540
|
tickers?: string[];
|
|
2406
2541
|
/** Omitted means public, as defined by the REST contract. */
|
|
@@ -2439,6 +2574,7 @@ interface RewriteThesisResponse {
|
|
|
2439
2574
|
declare class ThesesResource {
|
|
2440
2575
|
private client;
|
|
2441
2576
|
constructor(client: AlvaClient);
|
|
2577
|
+
assetCandidates(text: string): Promise<ThesisAssetCandidatesResponse>;
|
|
2442
2578
|
create(params: CreateThesisParams): Promise<ThesisResponse>;
|
|
2443
2579
|
get(id: ThesisID): Promise<ThesisGetResponse>;
|
|
2444
2580
|
getVersion(id: ThesisID, authorVersionID: ThesisID): Promise<ThesisResponse>;
|