@alfe.ai/agent-api-client 0.10.0 → 0.11.1
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.cjs +119 -25
- package/dist/index.d.cts +105 -14
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +105 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +119 -25
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -138,6 +138,7 @@ var AgentApiClient = class {
|
|
|
138
138
|
if (!res.ok) {
|
|
139
139
|
await res.text();
|
|
140
140
|
const error = /* @__PURE__ */ new Error(`Agent API request failed (${String(res.status)})`);
|
|
141
|
+
error.status = res.status;
|
|
141
142
|
if (attempt === 1 && RETRYABLE_STATUS.has(res.status)) {
|
|
142
143
|
lastError = error;
|
|
143
144
|
await sleep(RETRY_DELAY_MS);
|
|
@@ -211,7 +212,17 @@ var AgentApiClient = class {
|
|
|
211
212
|
return this.request("/agent/integrations");
|
|
212
213
|
}
|
|
213
214
|
async getIntegrationConfig(integrationId) {
|
|
214
|
-
|
|
215
|
+
try {
|
|
216
|
+
return await this.request(`/agent/integrations/${encodeURIComponent(integrationId)}/config`);
|
|
217
|
+
} catch (err) {
|
|
218
|
+
if (err.status === 404) return {
|
|
219
|
+
integrationId,
|
|
220
|
+
config: {},
|
|
221
|
+
configSchema: [],
|
|
222
|
+
installed: false
|
|
223
|
+
};
|
|
224
|
+
throw err;
|
|
225
|
+
}
|
|
215
226
|
}
|
|
216
227
|
async updateIntegrationConfig(integrationId, config) {
|
|
217
228
|
await this.request(`/agent/integrations/${encodeURIComponent(integrationId)}`, {
|
|
@@ -315,49 +326,71 @@ var AgentApiClient = class {
|
|
|
315
326
|
* Pattern A: multi-account credential fetch for cTrader.
|
|
316
327
|
*
|
|
317
328
|
* Unlike atlassian/salesforce (one Connection row per account/site), a
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
*
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
329
|
+
* cTrader is MULTI-grant per agent: an agent may connect several distinct
|
|
330
|
+
* cTrader logins, each its own Connection row keyed on `accountIdentifier =
|
|
331
|
+
* ctid:<userId>` (Phase 1). This aggregates the *trading accounts* across
|
|
332
|
+
* ALL of those Connection rows — each row contributes its `availableAccounts`
|
|
333
|
+
* flattened, and every account carries ITS OWN grant's `accessToken` (the
|
|
334
|
+
* token that authenticates that account against the cTrader Open API). One
|
|
335
|
+
* OAuth grant still covers all accounts under that single login on one shared
|
|
336
|
+
* token; only the `ctidTraderAccountId` and the protobuf socket `host` (live
|
|
337
|
+
* vs demo) differ within a grant. Across grants the tokens differ, so the
|
|
338
|
+
* token is now PER-ACCOUNT rather than hoisted to the top level.
|
|
326
339
|
*
|
|
327
340
|
* `host` per account is derived from the account's `isLive` flag
|
|
328
341
|
* (`live.ctraderapi.com` / `demo.ctraderapi.com`) — the same mapping the
|
|
329
342
|
* connect provider applies server-side when an account is auto-selected.
|
|
330
343
|
*
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
*
|
|
334
|
-
*
|
|
344
|
+
* `clientId` / `clientSecret` are the SST-sourced GLOBAL app credentials the
|
|
345
|
+
* connect endpoint injects — identical across every Connection row (one
|
|
346
|
+
* cTrader app), never persisted on a connection. We take them from the first
|
|
347
|
+
* row that carries them.
|
|
348
|
+
*
|
|
349
|
+
* Accounts are deduped on `ctidTraderAccountId` first-wins: Spotware ids are
|
|
350
|
+
* globally unique across logins, so a duplicate can only appear if the same
|
|
351
|
+
* account somehow surfaced under two grants — first-wins keeps it
|
|
352
|
+
* deterministic.
|
|
353
|
+
*
|
|
354
|
+
* `accounts` may be empty (no cTrader Connection at all), in which case we
|
|
355
|
+
* return empty creds rather than throwing.
|
|
335
356
|
*/
|
|
336
357
|
async getCTraderAccounts() {
|
|
337
358
|
const raw = await this.request("/agent/connect/ctrader/accounts");
|
|
338
359
|
if (raw.accounts.length === 0) return {
|
|
339
360
|
accounts: [],
|
|
340
361
|
clientId: "",
|
|
341
|
-
clientSecret: ""
|
|
342
|
-
accessToken: ""
|
|
362
|
+
clientSecret: ""
|
|
343
363
|
};
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
364
|
+
let clientId = "";
|
|
365
|
+
let clientSecret = "";
|
|
366
|
+
for (const row of raw.accounts) {
|
|
367
|
+
if (!clientId && row.clientId) clientId = row.clientId;
|
|
368
|
+
if (!clientSecret && row.clientSecret) clientSecret = row.clientSecret;
|
|
369
|
+
if (clientId && clientSecret) break;
|
|
370
|
+
}
|
|
371
|
+
const seen = /* @__PURE__ */ new Set();
|
|
372
|
+
const accounts = [];
|
|
373
|
+
for (const row of raw.accounts) {
|
|
374
|
+
const rowToken = row.accessToken ?? "";
|
|
375
|
+
for (const a of row.availableAccounts ?? []) {
|
|
348
376
|
const id = a.ctidTraderAccountId != null ? String(a.ctidTraderAccountId) : a.accountId != null ? String(a.accountId) : "";
|
|
377
|
+
if (id.length === 0 || seen.has(id)) continue;
|
|
378
|
+
seen.add(id);
|
|
349
379
|
const isLive = a.isLive === true;
|
|
350
|
-
|
|
380
|
+
accounts.push({
|
|
351
381
|
ctidTraderAccountId: id,
|
|
352
382
|
host: isLive ? "live.ctraderapi.com" : "demo.ctraderapi.com",
|
|
353
383
|
isLive,
|
|
354
384
|
...a.brokerName != null ? { brokerName: a.brokerName } : {},
|
|
355
|
-
...a.accountNumber != null ? { accountNumber: String(a.accountNumber) } : {}
|
|
356
|
-
|
|
357
|
-
|
|
385
|
+
...a.accountNumber != null ? { accountNumber: String(a.accountNumber) } : {},
|
|
386
|
+
accessToken: rowToken
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
return {
|
|
391
|
+
accounts,
|
|
358
392
|
clientId,
|
|
359
|
-
clientSecret
|
|
360
|
-
accessToken
|
|
393
|
+
clientSecret
|
|
361
394
|
};
|
|
362
395
|
}
|
|
363
396
|
/**
|
|
@@ -401,6 +434,44 @@ var AgentApiClient = class {
|
|
|
401
434
|
})) };
|
|
402
435
|
}
|
|
403
436
|
/**
|
|
437
|
+
* Pattern A: provider-parameterized multi-account credential fetch for the
|
|
438
|
+
* social connectors (Bluesky, and the approval-gated backlog: X, Meta,
|
|
439
|
+
* Threads, LinkedIn, Pinterest, TikTok, Reddit, YouTube).
|
|
440
|
+
*
|
|
441
|
+
* Unlike the bespoke `getGithubAccounts()` / `getXeroAccounts()` shapes,
|
|
442
|
+
* this returns a UNIFORM normalized account shape so `@alfe.ai/social-mcp`'s
|
|
443
|
+
* shared driver can require a single `account` selector on every
|
|
444
|
+
* credential-touching tool regardless of platform. The backend
|
|
445
|
+
* `api-agents/{provider}/accounts` route is already provider-generic; this
|
|
446
|
+
* is the client-side normalization the plan (`do-we-need-any-moonlit-toucan`
|
|
447
|
+
* Phase 0, step 5) calls for.
|
|
448
|
+
*
|
|
449
|
+
* `accountIdentifier` is the stable per-account selector the LLM should
|
|
450
|
+
* pass back (for Bluesky: the account DID). `accessToken` carries whatever
|
|
451
|
+
* the provider's `buildCredentialsResponse` bundles (for Bluesky: the JSON
|
|
452
|
+
* session bundle — the driver parses the `accessJwt` out of it, or reads the
|
|
453
|
+
* top-level `accessJwt` from `providerMetadata`-adjacent fields). Everything
|
|
454
|
+
* else the driver needs for routing (handle, pdsHost, did, …) is on
|
|
455
|
+
* `providerMetadata`.
|
|
456
|
+
*
|
|
457
|
+
* Token refresh is delegated to connect (never done in-plugin) via
|
|
458
|
+
* `POST /agent/connect/{provider}/refresh` — not exposed here.
|
|
459
|
+
*/
|
|
460
|
+
async getSocialAccounts(provider) {
|
|
461
|
+
const raw = await this.request(`/agent/connect/${encodeURIComponent(provider)}/accounts`);
|
|
462
|
+
return {
|
|
463
|
+
provider: raw.provider ?? provider,
|
|
464
|
+
accounts: raw.accounts.map((a) => ({
|
|
465
|
+
connectionId: a.connectionId,
|
|
466
|
+
accountIdentifier: a.accountIdentifier,
|
|
467
|
+
displayName: a.displayName,
|
|
468
|
+
accessToken: a.accessToken ?? "",
|
|
469
|
+
providerMetadata: a.providerMetadata ?? {},
|
|
470
|
+
connectedAt: a.connectedAt
|
|
471
|
+
}))
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
404
475
|
* @deprecated Returns a single primary credential blob (legacy "pick-the-
|
|
405
476
|
* default-connection" shape). Use `getXeroAccounts()` for the multi-
|
|
406
477
|
* account shape required by Pattern A — explicit selector args on every
|
|
@@ -1140,6 +1211,15 @@ var AgentApiClient = class {
|
|
|
1140
1211
|
...scope ? { body: JSON.stringify({ scope }) } : {}
|
|
1141
1212
|
});
|
|
1142
1213
|
}
|
|
1214
|
+
async sendSms(args) {
|
|
1215
|
+
return this.request("/mobile/sms/send", {
|
|
1216
|
+
method: "POST",
|
|
1217
|
+
body: JSON.stringify({
|
|
1218
|
+
to: args.to,
|
|
1219
|
+
body: args.body
|
|
1220
|
+
})
|
|
1221
|
+
});
|
|
1222
|
+
}
|
|
1143
1223
|
async searchWeb(params) {
|
|
1144
1224
|
return this.request("/agent/search/web", {
|
|
1145
1225
|
method: "POST",
|
|
@@ -1158,6 +1238,20 @@ var AgentApiClient = class {
|
|
|
1158
1238
|
body: JSON.stringify(params)
|
|
1159
1239
|
});
|
|
1160
1240
|
}
|
|
1241
|
+
/** Search news across the selected provider's corpus. → POST /agent/news/search */
|
|
1242
|
+
async newsSearch(params) {
|
|
1243
|
+
return this.request("/agent/news/search", {
|
|
1244
|
+
method: "POST",
|
|
1245
|
+
body: JSON.stringify(params)
|
|
1246
|
+
});
|
|
1247
|
+
}
|
|
1248
|
+
/** Top headlines for the selected provider. → POST /agent/news/headlines */
|
|
1249
|
+
async newsHeadlines(params) {
|
|
1250
|
+
return this.request("/agent/news/headlines", {
|
|
1251
|
+
method: "POST",
|
|
1252
|
+
body: JSON.stringify(params ?? {})
|
|
1253
|
+
});
|
|
1254
|
+
}
|
|
1161
1255
|
/**
|
|
1162
1256
|
* Semantic search across the agent's member scopes. Fan-out is gated
|
|
1163
1257
|
* server-side by `listScopes` set-inclusion (fail-closed). Pass
|
package/dist/index.d.cts
CHANGED
|
@@ -59,6 +59,26 @@ interface AgentApiClientConfig {
|
|
|
59
59
|
apiKey: string;
|
|
60
60
|
apiUrl: string;
|
|
61
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* The broad-news providers behind the metered `services/news` Lambda. The
|
|
64
|
+
* server validates this with a zod enum; a value outside the union is an
|
|
65
|
+
* unpriceable product, so keep the literal union in lockstep with the service.
|
|
66
|
+
*/
|
|
67
|
+
type NewsProvider = "apitube" | "newsdata";
|
|
68
|
+
/** One normalized article. `sentiment` is provider-shaped (APITube supplies it). */
|
|
69
|
+
interface NewsArticle {
|
|
70
|
+
title: string;
|
|
71
|
+
url: string;
|
|
72
|
+
source: string;
|
|
73
|
+
publishedAt: string;
|
|
74
|
+
snippet: string;
|
|
75
|
+
sentiment?: unknown;
|
|
76
|
+
}
|
|
77
|
+
/** Provider-agnostic result — the server normalizes every adapter to this. */
|
|
78
|
+
interface NewsResult {
|
|
79
|
+
articles: NewsArticle[];
|
|
80
|
+
provider: string;
|
|
81
|
+
}
|
|
62
82
|
interface RemoteSessionInfo {
|
|
63
83
|
sessionId: string;
|
|
64
84
|
agentId: string;
|
|
@@ -473,23 +493,33 @@ declare class AgentApiClient {
|
|
|
473
493
|
* Pattern A: multi-account credential fetch for cTrader.
|
|
474
494
|
*
|
|
475
495
|
* Unlike atlassian/salesforce (one Connection row per account/site), a
|
|
476
|
-
*
|
|
477
|
-
*
|
|
478
|
-
*
|
|
479
|
-
*
|
|
480
|
-
*
|
|
481
|
-
*
|
|
482
|
-
*
|
|
483
|
-
*
|
|
496
|
+
* cTrader is MULTI-grant per agent: an agent may connect several distinct
|
|
497
|
+
* cTrader logins, each its own Connection row keyed on `accountIdentifier =
|
|
498
|
+
* ctid:<userId>` (Phase 1). This aggregates the *trading accounts* across
|
|
499
|
+
* ALL of those Connection rows — each row contributes its `availableAccounts`
|
|
500
|
+
* flattened, and every account carries ITS OWN grant's `accessToken` (the
|
|
501
|
+
* token that authenticates that account against the cTrader Open API). One
|
|
502
|
+
* OAuth grant still covers all accounts under that single login on one shared
|
|
503
|
+
* token; only the `ctidTraderAccountId` and the protobuf socket `host` (live
|
|
504
|
+
* vs demo) differ within a grant. Across grants the tokens differ, so the
|
|
505
|
+
* token is now PER-ACCOUNT rather than hoisted to the top level.
|
|
484
506
|
*
|
|
485
507
|
* `host` per account is derived from the account's `isLive` flag
|
|
486
508
|
* (`live.ctraderapi.com` / `demo.ctraderapi.com`) — the same mapping the
|
|
487
509
|
* connect provider applies server-side when an account is auto-selected.
|
|
488
510
|
*
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
*
|
|
511
|
+
* `clientId` / `clientSecret` are the SST-sourced GLOBAL app credentials the
|
|
512
|
+
* connect endpoint injects — identical across every Connection row (one
|
|
513
|
+
* cTrader app), never persisted on a connection. We take them from the first
|
|
514
|
+
* row that carries them.
|
|
515
|
+
*
|
|
516
|
+
* Accounts are deduped on `ctidTraderAccountId` first-wins: Spotware ids are
|
|
517
|
+
* globally unique across logins, so a duplicate can only appear if the same
|
|
518
|
+
* account somehow surfaced under two grants — first-wins keeps it
|
|
519
|
+
* deterministic.
|
|
520
|
+
*
|
|
521
|
+
* `accounts` may be empty (no cTrader Connection at all), in which case we
|
|
522
|
+
* return empty creds rather than throwing.
|
|
493
523
|
*/
|
|
494
524
|
getCTraderAccounts(): Promise<{
|
|
495
525
|
accounts: {
|
|
@@ -498,10 +528,10 @@ declare class AgentApiClient {
|
|
|
498
528
|
isLive: boolean;
|
|
499
529
|
brokerName?: string;
|
|
500
530
|
accountNumber?: string;
|
|
531
|
+
accessToken: string;
|
|
501
532
|
}[];
|
|
502
533
|
clientId: string;
|
|
503
534
|
clientSecret: string;
|
|
504
|
-
accessToken: string;
|
|
505
535
|
}>;
|
|
506
536
|
/**
|
|
507
537
|
* @deprecated Returns a single primary credential blob (legacy "pick-the-
|
|
@@ -540,6 +570,41 @@ declare class AgentApiClient {
|
|
|
540
570
|
scopes: string;
|
|
541
571
|
}[];
|
|
542
572
|
}>;
|
|
573
|
+
/**
|
|
574
|
+
* Pattern A: provider-parameterized multi-account credential fetch for the
|
|
575
|
+
* social connectors (Bluesky, and the approval-gated backlog: X, Meta,
|
|
576
|
+
* Threads, LinkedIn, Pinterest, TikTok, Reddit, YouTube).
|
|
577
|
+
*
|
|
578
|
+
* Unlike the bespoke `getGithubAccounts()` / `getXeroAccounts()` shapes,
|
|
579
|
+
* this returns a UNIFORM normalized account shape so `@alfe.ai/social-mcp`'s
|
|
580
|
+
* shared driver can require a single `account` selector on every
|
|
581
|
+
* credential-touching tool regardless of platform. The backend
|
|
582
|
+
* `api-agents/{provider}/accounts` route is already provider-generic; this
|
|
583
|
+
* is the client-side normalization the plan (`do-we-need-any-moonlit-toucan`
|
|
584
|
+
* Phase 0, step 5) calls for.
|
|
585
|
+
*
|
|
586
|
+
* `accountIdentifier` is the stable per-account selector the LLM should
|
|
587
|
+
* pass back (for Bluesky: the account DID). `accessToken` carries whatever
|
|
588
|
+
* the provider's `buildCredentialsResponse` bundles (for Bluesky: the JSON
|
|
589
|
+
* session bundle — the driver parses the `accessJwt` out of it, or reads the
|
|
590
|
+
* top-level `accessJwt` from `providerMetadata`-adjacent fields). Everything
|
|
591
|
+
* else the driver needs for routing (handle, pdsHost, did, …) is on
|
|
592
|
+
* `providerMetadata`.
|
|
593
|
+
*
|
|
594
|
+
* Token refresh is delegated to connect (never done in-plugin) via
|
|
595
|
+
* `POST /agent/connect/{provider}/refresh` — not exposed here.
|
|
596
|
+
*/
|
|
597
|
+
getSocialAccounts(provider: string): Promise<{
|
|
598
|
+
provider: string;
|
|
599
|
+
accounts: {
|
|
600
|
+
connectionId: string;
|
|
601
|
+
accountIdentifier: string;
|
|
602
|
+
displayName: string | null;
|
|
603
|
+
accessToken: string;
|
|
604
|
+
providerMetadata: Record<string, unknown>;
|
|
605
|
+
connectedAt: string;
|
|
606
|
+
}[];
|
|
607
|
+
}>;
|
|
543
608
|
/**
|
|
544
609
|
* @deprecated Returns a single primary credential blob (legacy "pick-the-
|
|
545
610
|
* default-connection" shape). Use `getXeroAccounts()` for the multi-
|
|
@@ -1348,6 +1413,13 @@ declare class AgentApiClient {
|
|
|
1348
1413
|
synced: true;
|
|
1349
1414
|
syncedAt: string;
|
|
1350
1415
|
}>;
|
|
1416
|
+
sendSms(args: {
|
|
1417
|
+
to: string;
|
|
1418
|
+
body: string;
|
|
1419
|
+
}): Promise<{
|
|
1420
|
+
sent: boolean;
|
|
1421
|
+
sid: string;
|
|
1422
|
+
}>;
|
|
1351
1423
|
searchWeb(params: {
|
|
1352
1424
|
query: string;
|
|
1353
1425
|
count?: number;
|
|
@@ -1364,6 +1436,25 @@ declare class AgentApiClient {
|
|
|
1364
1436
|
count?: number;
|
|
1365
1437
|
freshness?: string;
|
|
1366
1438
|
}): Promise<unknown>;
|
|
1439
|
+
/** Search news across the selected provider's corpus. → POST /agent/news/search */
|
|
1440
|
+
newsSearch(params: {
|
|
1441
|
+
query: string;
|
|
1442
|
+
provider?: NewsProvider;
|
|
1443
|
+
source?: string;
|
|
1444
|
+
from?: string;
|
|
1445
|
+
to?: string;
|
|
1446
|
+
language?: string;
|
|
1447
|
+
category?: string;
|
|
1448
|
+
limit?: number;
|
|
1449
|
+
}): Promise<NewsResult>;
|
|
1450
|
+
/** Top headlines for the selected provider. → POST /agent/news/headlines */
|
|
1451
|
+
newsHeadlines(params?: {
|
|
1452
|
+
provider?: NewsProvider;
|
|
1453
|
+
category?: string;
|
|
1454
|
+
source?: string;
|
|
1455
|
+
language?: string;
|
|
1456
|
+
limit?: number;
|
|
1457
|
+
}): Promise<NewsResult>;
|
|
1367
1458
|
/**
|
|
1368
1459
|
* Semantic search across the agent's member scopes. Fan-out is gated
|
|
1369
1460
|
* server-side by `listScopes` set-inclusion (fail-closed). Pass
|
|
@@ -1486,5 +1577,5 @@ declare class AgentApiClient {
|
|
|
1486
1577
|
}
|
|
1487
1578
|
//# sourceMappingURL=index.d.ts.map
|
|
1488
1579
|
//#endregion
|
|
1489
|
-
export { AgentApiClient, AgentApiClientConfig, AgentAvatarPresign, AgentSelf, AgentVoice, AgentVoiceConfig, ChangeRequestActorKind, ChangeRequestOperation, ChangeRequestResourceType, ChangeRequestStatus, type ChangelogAction, type ChangelogActor, type ChangelogEntry, type EncryptedEnvelopeV1, type Field, type FieldEnvelope, type FieldFormat, type FieldSensitivity, type FieldView, type GeneratedDataKey, type InstallToolErrorCaptureOptions, type IntegrationConfigResult, type IntegrationConfigSchemaField, type IntegrationInstall, KnowledgeChangeRequest, KnowledgeDoc, KnowledgeProfile, KnowledgeProfileLink, KnowledgeScope, KnowledgeScopeType, KnowledgeSearchHit, KnowledgeSearchResult, ProposeScopeChangeInput, type RegistryEntry, RemoteSessionInfo, type ScopeInfo, type SecretAggregate, type SecretCategory, type SecretMetadata, type SecretScope, SharedFileEntry, SyncAgentInfo, SyncAgentStats, SyncConfirmedUpload, SyncFileEntry, SyncManifest, SyncManifestEntry, SyncPresignedUrl, SyncReconstructBundle, SyncReconstructFile, SyncSessionContent, SyncSessionEntry, type ToolCaptureApi, VoiceSttArgs, VoiceSttResult, VoiceTtsArgs, VoiceTtsModel, VoiceTtsResult, installToolErrorCapture };
|
|
1580
|
+
export { AgentApiClient, AgentApiClientConfig, AgentAvatarPresign, AgentSelf, AgentVoice, AgentVoiceConfig, ChangeRequestActorKind, ChangeRequestOperation, ChangeRequestResourceType, ChangeRequestStatus, type ChangelogAction, type ChangelogActor, type ChangelogEntry, type EncryptedEnvelopeV1, type Field, type FieldEnvelope, type FieldFormat, type FieldSensitivity, type FieldView, type GeneratedDataKey, type InstallToolErrorCaptureOptions, type IntegrationConfigResult, type IntegrationConfigSchemaField, type IntegrationInstall, KnowledgeChangeRequest, KnowledgeDoc, KnowledgeProfile, KnowledgeProfileLink, KnowledgeScope, KnowledgeScopeType, KnowledgeSearchHit, KnowledgeSearchResult, NewsArticle, NewsProvider, NewsResult, ProposeScopeChangeInput, type RegistryEntry, RemoteSessionInfo, type ScopeInfo, type SecretAggregate, type SecretCategory, type SecretMetadata, type SecretScope, SharedFileEntry, SyncAgentInfo, SyncAgentStats, SyncConfirmedUpload, SyncFileEntry, SyncManifest, SyncManifestEntry, SyncPresignedUrl, SyncReconstructBundle, SyncReconstructFile, SyncSessionContent, SyncSessionEntry, type ToolCaptureApi, VoiceSttArgs, VoiceSttResult, VoiceTtsArgs, VoiceTtsModel, VoiceTtsResult, installToolErrorCapture };
|
|
1490
1581
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/tool-error-capture.ts","../src/index.ts"],"mappings":";;;;;;;AA6BA;AAIA;AA0GA;;;;;;;;ACtFA;AAOA;AAmBA;AAWA;AASA;;;;;AAOA;AAMA;AAQA;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/tool-error-capture.ts","../src/index.ts"],"mappings":";;;;;;;AA6BA;AAIA;AA0GA;;;;;;;;ACtFA;AAYA;AAGA;AAUA;AAOA;AAmBA;AAWA;AASA;;;;;AAOA;AAMA;AAQA;AAQiB,UD5HA,cAAA,CC4HqB;EASrB,YAAA,CAAA,GAAA,IAAc,EAAA,KAAA,EAAA,CAAA,EAAA,OAAA;AAQ/B;AASiB,UDlJA,8BAAA,CCkJgB;EAQhB;EAMA,MAAA,EAAA,MAAA;EAeL;AAEZ;AAMA;AAmBA;AAMA;AAKA;EAAiC,IAAA,CAAA,EAAA,CAAA,IAAA,EAAA,MAAA,EAAA,GAAA,IAAA;;;;AAUjC;AAiBA;AACA;AACA;AAMA;AAGiB,iBDjJD,uBAAA,CCiJuB,GAAA,EDhJhC,cCgJgC,EAAA,OAAA,ED/I5B,8BC+I4B,C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sBA;;;;;;;;;;;;MAsBA;;;;wDAYwD;;;;uCAWjB;;;;;;;;;;;oBAOnB;;;;;;;;kCAOc;;;iBAMjB;;;;;;;;;;;;;;;MAcjB;;;;;;2BAiB2B;;;;;;2DASgC;;;;;;;MAiBZ;;;;;;;;;;MAe/C;;;;MAUA;;;;;MAWA;;;;eAiBS;;;;;;;MAOT,QAAQ;;;eASC;;;;;MAKT,QAAQ;;;;;;;;;gBA2B2B;;MACpC,QAAQ;;gBAaS;YAAkB;;;6BAMzB,sCAEV,QAAQ;;2BAQE;;;MAGV;WAAiB;;;;;;;;0BAgBP,wDAGV;;;;;;;;;;;2BAqBU;;;MAKV;;;;;;;;;;gCA+CU,4CAEJ,0BACN,QAAQ;;;;;qCAkDE;aAEO;;;MACjB;oBAA0B;;;iCAaQ;;;;;;;;;;;MAcjC;;;;;MAqBA;;;;uCAOuC,QAAQ;4CAIH;;;;;;;;;;;;;;;;;;;;;;YA0EhC,eAAe,QAAQ;;;;;;;;YAyBvB,eAAe,QAAQ"}
|
package/dist/index.d.ts
CHANGED
|
@@ -59,6 +59,26 @@ interface AgentApiClientConfig {
|
|
|
59
59
|
apiKey: string;
|
|
60
60
|
apiUrl: string;
|
|
61
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* The broad-news providers behind the metered `services/news` Lambda. The
|
|
64
|
+
* server validates this with a zod enum; a value outside the union is an
|
|
65
|
+
* unpriceable product, so keep the literal union in lockstep with the service.
|
|
66
|
+
*/
|
|
67
|
+
type NewsProvider = "apitube" | "newsdata";
|
|
68
|
+
/** One normalized article. `sentiment` is provider-shaped (APITube supplies it). */
|
|
69
|
+
interface NewsArticle {
|
|
70
|
+
title: string;
|
|
71
|
+
url: string;
|
|
72
|
+
source: string;
|
|
73
|
+
publishedAt: string;
|
|
74
|
+
snippet: string;
|
|
75
|
+
sentiment?: unknown;
|
|
76
|
+
}
|
|
77
|
+
/** Provider-agnostic result — the server normalizes every adapter to this. */
|
|
78
|
+
interface NewsResult {
|
|
79
|
+
articles: NewsArticle[];
|
|
80
|
+
provider: string;
|
|
81
|
+
}
|
|
62
82
|
interface RemoteSessionInfo {
|
|
63
83
|
sessionId: string;
|
|
64
84
|
agentId: string;
|
|
@@ -473,23 +493,33 @@ declare class AgentApiClient {
|
|
|
473
493
|
* Pattern A: multi-account credential fetch for cTrader.
|
|
474
494
|
*
|
|
475
495
|
* Unlike atlassian/salesforce (one Connection row per account/site), a
|
|
476
|
-
*
|
|
477
|
-
*
|
|
478
|
-
*
|
|
479
|
-
*
|
|
480
|
-
*
|
|
481
|
-
*
|
|
482
|
-
*
|
|
483
|
-
*
|
|
496
|
+
* cTrader is MULTI-grant per agent: an agent may connect several distinct
|
|
497
|
+
* cTrader logins, each its own Connection row keyed on `accountIdentifier =
|
|
498
|
+
* ctid:<userId>` (Phase 1). This aggregates the *trading accounts* across
|
|
499
|
+
* ALL of those Connection rows — each row contributes its `availableAccounts`
|
|
500
|
+
* flattened, and every account carries ITS OWN grant's `accessToken` (the
|
|
501
|
+
* token that authenticates that account against the cTrader Open API). One
|
|
502
|
+
* OAuth grant still covers all accounts under that single login on one shared
|
|
503
|
+
* token; only the `ctidTraderAccountId` and the protobuf socket `host` (live
|
|
504
|
+
* vs demo) differ within a grant. Across grants the tokens differ, so the
|
|
505
|
+
* token is now PER-ACCOUNT rather than hoisted to the top level.
|
|
484
506
|
*
|
|
485
507
|
* `host` per account is derived from the account's `isLive` flag
|
|
486
508
|
* (`live.ctraderapi.com` / `demo.ctraderapi.com`) — the same mapping the
|
|
487
509
|
* connect provider applies server-side when an account is auto-selected.
|
|
488
510
|
*
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
*
|
|
511
|
+
* `clientId` / `clientSecret` are the SST-sourced GLOBAL app credentials the
|
|
512
|
+
* connect endpoint injects — identical across every Connection row (one
|
|
513
|
+
* cTrader app), never persisted on a connection. We take them from the first
|
|
514
|
+
* row that carries them.
|
|
515
|
+
*
|
|
516
|
+
* Accounts are deduped on `ctidTraderAccountId` first-wins: Spotware ids are
|
|
517
|
+
* globally unique across logins, so a duplicate can only appear if the same
|
|
518
|
+
* account somehow surfaced under two grants — first-wins keeps it
|
|
519
|
+
* deterministic.
|
|
520
|
+
*
|
|
521
|
+
* `accounts` may be empty (no cTrader Connection at all), in which case we
|
|
522
|
+
* return empty creds rather than throwing.
|
|
493
523
|
*/
|
|
494
524
|
getCTraderAccounts(): Promise<{
|
|
495
525
|
accounts: {
|
|
@@ -498,10 +528,10 @@ declare class AgentApiClient {
|
|
|
498
528
|
isLive: boolean;
|
|
499
529
|
brokerName?: string;
|
|
500
530
|
accountNumber?: string;
|
|
531
|
+
accessToken: string;
|
|
501
532
|
}[];
|
|
502
533
|
clientId: string;
|
|
503
534
|
clientSecret: string;
|
|
504
|
-
accessToken: string;
|
|
505
535
|
}>;
|
|
506
536
|
/**
|
|
507
537
|
* @deprecated Returns a single primary credential blob (legacy "pick-the-
|
|
@@ -540,6 +570,41 @@ declare class AgentApiClient {
|
|
|
540
570
|
scopes: string;
|
|
541
571
|
}[];
|
|
542
572
|
}>;
|
|
573
|
+
/**
|
|
574
|
+
* Pattern A: provider-parameterized multi-account credential fetch for the
|
|
575
|
+
* social connectors (Bluesky, and the approval-gated backlog: X, Meta,
|
|
576
|
+
* Threads, LinkedIn, Pinterest, TikTok, Reddit, YouTube).
|
|
577
|
+
*
|
|
578
|
+
* Unlike the bespoke `getGithubAccounts()` / `getXeroAccounts()` shapes,
|
|
579
|
+
* this returns a UNIFORM normalized account shape so `@alfe.ai/social-mcp`'s
|
|
580
|
+
* shared driver can require a single `account` selector on every
|
|
581
|
+
* credential-touching tool regardless of platform. The backend
|
|
582
|
+
* `api-agents/{provider}/accounts` route is already provider-generic; this
|
|
583
|
+
* is the client-side normalization the plan (`do-we-need-any-moonlit-toucan`
|
|
584
|
+
* Phase 0, step 5) calls for.
|
|
585
|
+
*
|
|
586
|
+
* `accountIdentifier` is the stable per-account selector the LLM should
|
|
587
|
+
* pass back (for Bluesky: the account DID). `accessToken` carries whatever
|
|
588
|
+
* the provider's `buildCredentialsResponse` bundles (for Bluesky: the JSON
|
|
589
|
+
* session bundle — the driver parses the `accessJwt` out of it, or reads the
|
|
590
|
+
* top-level `accessJwt` from `providerMetadata`-adjacent fields). Everything
|
|
591
|
+
* else the driver needs for routing (handle, pdsHost, did, …) is on
|
|
592
|
+
* `providerMetadata`.
|
|
593
|
+
*
|
|
594
|
+
* Token refresh is delegated to connect (never done in-plugin) via
|
|
595
|
+
* `POST /agent/connect/{provider}/refresh` — not exposed here.
|
|
596
|
+
*/
|
|
597
|
+
getSocialAccounts(provider: string): Promise<{
|
|
598
|
+
provider: string;
|
|
599
|
+
accounts: {
|
|
600
|
+
connectionId: string;
|
|
601
|
+
accountIdentifier: string;
|
|
602
|
+
displayName: string | null;
|
|
603
|
+
accessToken: string;
|
|
604
|
+
providerMetadata: Record<string, unknown>;
|
|
605
|
+
connectedAt: string;
|
|
606
|
+
}[];
|
|
607
|
+
}>;
|
|
543
608
|
/**
|
|
544
609
|
* @deprecated Returns a single primary credential blob (legacy "pick-the-
|
|
545
610
|
* default-connection" shape). Use `getXeroAccounts()` for the multi-
|
|
@@ -1348,6 +1413,13 @@ declare class AgentApiClient {
|
|
|
1348
1413
|
synced: true;
|
|
1349
1414
|
syncedAt: string;
|
|
1350
1415
|
}>;
|
|
1416
|
+
sendSms(args: {
|
|
1417
|
+
to: string;
|
|
1418
|
+
body: string;
|
|
1419
|
+
}): Promise<{
|
|
1420
|
+
sent: boolean;
|
|
1421
|
+
sid: string;
|
|
1422
|
+
}>;
|
|
1351
1423
|
searchWeb(params: {
|
|
1352
1424
|
query: string;
|
|
1353
1425
|
count?: number;
|
|
@@ -1364,6 +1436,25 @@ declare class AgentApiClient {
|
|
|
1364
1436
|
count?: number;
|
|
1365
1437
|
freshness?: string;
|
|
1366
1438
|
}): Promise<unknown>;
|
|
1439
|
+
/** Search news across the selected provider's corpus. → POST /agent/news/search */
|
|
1440
|
+
newsSearch(params: {
|
|
1441
|
+
query: string;
|
|
1442
|
+
provider?: NewsProvider;
|
|
1443
|
+
source?: string;
|
|
1444
|
+
from?: string;
|
|
1445
|
+
to?: string;
|
|
1446
|
+
language?: string;
|
|
1447
|
+
category?: string;
|
|
1448
|
+
limit?: number;
|
|
1449
|
+
}): Promise<NewsResult>;
|
|
1450
|
+
/** Top headlines for the selected provider. → POST /agent/news/headlines */
|
|
1451
|
+
newsHeadlines(params?: {
|
|
1452
|
+
provider?: NewsProvider;
|
|
1453
|
+
category?: string;
|
|
1454
|
+
source?: string;
|
|
1455
|
+
language?: string;
|
|
1456
|
+
limit?: number;
|
|
1457
|
+
}): Promise<NewsResult>;
|
|
1367
1458
|
/**
|
|
1368
1459
|
* Semantic search across the agent's member scopes. Fan-out is gated
|
|
1369
1460
|
* server-side by `listScopes` set-inclusion (fail-closed). Pass
|
|
@@ -1486,5 +1577,5 @@ declare class AgentApiClient {
|
|
|
1486
1577
|
}
|
|
1487
1578
|
//# sourceMappingURL=index.d.ts.map
|
|
1488
1579
|
//#endregion
|
|
1489
|
-
export { AgentApiClient, AgentApiClientConfig, AgentAvatarPresign, AgentSelf, AgentVoice, AgentVoiceConfig, ChangeRequestActorKind, ChangeRequestOperation, ChangeRequestResourceType, ChangeRequestStatus, type ChangelogAction, type ChangelogActor, type ChangelogEntry, type EncryptedEnvelopeV1, type Field, type FieldEnvelope, type FieldFormat, type FieldSensitivity, type FieldView, type GeneratedDataKey, type InstallToolErrorCaptureOptions, type IntegrationConfigResult, type IntegrationConfigSchemaField, type IntegrationInstall, KnowledgeChangeRequest, KnowledgeDoc, KnowledgeProfile, KnowledgeProfileLink, KnowledgeScope, KnowledgeScopeType, KnowledgeSearchHit, KnowledgeSearchResult, ProposeScopeChangeInput, type RegistryEntry, RemoteSessionInfo, type ScopeInfo, type SecretAggregate, type SecretCategory, type SecretMetadata, type SecretScope, SharedFileEntry, SyncAgentInfo, SyncAgentStats, SyncConfirmedUpload, SyncFileEntry, SyncManifest, SyncManifestEntry, SyncPresignedUrl, SyncReconstructBundle, SyncReconstructFile, SyncSessionContent, SyncSessionEntry, type ToolCaptureApi, VoiceSttArgs, VoiceSttResult, VoiceTtsArgs, VoiceTtsModel, VoiceTtsResult, installToolErrorCapture };
|
|
1580
|
+
export { AgentApiClient, AgentApiClientConfig, AgentAvatarPresign, AgentSelf, AgentVoice, AgentVoiceConfig, ChangeRequestActorKind, ChangeRequestOperation, ChangeRequestResourceType, ChangeRequestStatus, type ChangelogAction, type ChangelogActor, type ChangelogEntry, type EncryptedEnvelopeV1, type Field, type FieldEnvelope, type FieldFormat, type FieldSensitivity, type FieldView, type GeneratedDataKey, type InstallToolErrorCaptureOptions, type IntegrationConfigResult, type IntegrationConfigSchemaField, type IntegrationInstall, KnowledgeChangeRequest, KnowledgeDoc, KnowledgeProfile, KnowledgeProfileLink, KnowledgeScope, KnowledgeScopeType, KnowledgeSearchHit, KnowledgeSearchResult, NewsArticle, NewsProvider, NewsResult, ProposeScopeChangeInput, type RegistryEntry, RemoteSessionInfo, type ScopeInfo, type SecretAggregate, type SecretCategory, type SecretMetadata, type SecretScope, SharedFileEntry, SyncAgentInfo, SyncAgentStats, SyncConfirmedUpload, SyncFileEntry, SyncManifest, SyncManifestEntry, SyncPresignedUrl, SyncReconstructBundle, SyncReconstructFile, SyncSessionContent, SyncSessionEntry, type ToolCaptureApi, VoiceSttArgs, VoiceSttResult, VoiceTtsArgs, VoiceTtsModel, VoiceTtsResult, installToolErrorCapture };
|
|
1490
1581
|
//# sourceMappingURL=index.d.ts.map
|