@tool-bridge/server 0.17.0 → 0.20.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/{airtable-NOSOMOVB.js → airtable-ZNWHIJMO.js} +4 -4
- package/dist/{alt_text_generator_ai-BHIJ4LW5.js → alt_text_generator_ai-X7RMDDM5.js} +4 -4
- package/dist/{amap-QRLP4TWZ.js → amap-3VER75VH.js} +4 -4
- package/dist/{anthropic-IEOI36EV.js → anthropic-N7NTB3UC.js} +4 -4
- package/dist/{apify-3CCYTQVK.js → apify-JB5P5AJI.js} +4 -4
- package/dist/{brave_search-PZNYDQG7.js → brave_search-USL5OOBS.js} +4 -4
- package/dist/{chunk-U5UHT7CX.js → chunk-3WL6EXYX.js} +1 -1
- package/dist/{chunk-YASUMV2K.js → chunk-6ANLYNFB.js} +1 -1
- package/dist/{chunk-WW2IMPQK.js → chunk-6X55ALDX.js} +3 -3
- package/dist/{chunk-TLNUIPFZ.js → chunk-RVUERWUZ.js} +2698 -247
- package/dist/{chunk-RVWZN3CI.js → chunk-WIGQCP6O.js} +1306 -207
- package/dist/{circleci-VSJ4O5FC.js → circleci-LBGB25LP.js} +4 -4
- package/dist/{clerk-CC2JZBZI.js → clerk-6RX37CNZ.js} +4 -4
- package/dist/{cloudflare_dns-PJEBSEYQ.js → cloudflare_dns-NQGW7FHV.js} +4 -4
- package/dist/{cohere-KBACYSPF.js → cohere-XPC2NAEW.js} +4 -4
- package/dist/{confluence-2PX3O7G5.js → confluence-ZUG2LT5A.js} +4 -4
- package/dist/{convertapi-BVOTD2PJ.js → convertapi-ZLXKWV3L.js} +3 -3
- package/dist/{currencyapi-6ZQ2VNQ7.js → currencyapi-T3A3HSOD.js} +4 -4
- package/dist/{deepseek-MB3WVVTB.js → deepseek-NJMOD23E.js} +4 -4
- package/dist/{docker_hub-7CLQL2IJ.js → docker_hub-D2MQCSJ7.js} +4 -4
- package/dist/{dropbox-VFYDVUNK.js → dropbox-MI6U3SOT.js} +4 -4
- package/dist/{dub-QN3EETJY.js → dub-P2BYBYV4.js} +4 -4
- package/dist/{e2b-NKC3Y776.js → e2b-BGKIAE54.js} +4 -4
- package/dist/{exa-KKZ6F25K.js → exa-EUY7VV4C.js} +4 -4
- package/dist/{fal_ai-25LYJD2O.js → fal_ai-AAOG5FYJ.js} +4 -4
- package/dist/{feishu-NRT55B3Q.js → feishu-AN5IJYOW.js} +2 -2
- package/dist/{feishu_custom_bot-3W3XXUG4.js → feishu_custom_bot-BWGMNVXF.js} +3 -3
- package/dist/{figma-4FLP35TC.js → figma-SJSWYCGD.js} +4 -4
- package/dist/{firehydrant-BLXPLZ3X.js → firehydrant-MOXK2PST.js} +4 -4
- package/dist/{fixer-4OR62TGE.js → fixer-ISIDUDZU.js} +4 -4
- package/dist/{fly-MYCKOZZK.js → fly-U4KPSGBF.js} +4 -4
- package/dist/{front-3DFYVMF3.js → front-ZHM2YX2E.js} +4 -4
- package/dist/{geocodio-CXMD6VKA.js → geocodio-SVCCAXAV.js} +4 -4
- package/dist/{ghost-4UUE737W.js → ghost-INTR7FIY.js} +4 -4
- package/dist/{github-WFS2ON2N.js → github-T275VVWR.js} +4 -4
- package/dist/{gmail-KW7FXA7A.js → gmail-KSSPOE67.js} +4 -4
- package/dist/{googlecalendar-AMH5JQMC.js → googlecalendar-JB5RW27L.js} +4 -4
- package/dist/{googledocs-R5VA6CKD.js → googledocs-G522PUGW.js} +3 -3
- package/dist/{grafana-IT6DWIVB.js → grafana-44ZPIV5P.js} +4 -4
- package/dist/{graphhopper-TYFDJZWC.js → graphhopper-2MORXLOW.js} +4 -4
- package/dist/index.d.ts +74 -14
- package/dist/index.js +3 -3
- package/dist/{ip2proxy-GJ4HXVXO.js → ip2proxy-R4K4KEMI.js} +4 -4
- package/dist/{ipgeolocation_io-OAGR6PRF.js → ipgeolocation_io-H4J55OGI.js} +4 -4
- package/dist/{ipqualityscore-BCKAMDGL.js → ipqualityscore-XGID4OHA.js} +4 -4
- package/dist/{jina_ai-N3NXRVIZ.js → jina_ai-7ZVDOR3Z.js} +4 -4
- package/dist/{jira-CHLBKWLO.js → jira-CTIYZTT3.js} +4 -4
- package/dist/{langsmith-OIKOTPY3.js → langsmith-ISP567FS.js} +4 -4
- package/dist/{lemlist-VAKYPKS3.js → lemlist-OGKK272F.js} +4 -4
- package/dist/{linear-Q6QTPJ5R.js → linear-6JX4E3JI.js} +3 -3
- package/dist/{logsnag-SQOQBTES.js → logsnag-BVB36ZCL.js} +4 -4
- package/dist/main.js +102 -102
- package/dist/{mattermost-G2KBEICM.js → mattermost-UECVPZGY.js} +4 -4
- package/dist/{mem0-D2FPLYDX.js → mem0-EUA7S2OO.js} +4 -4
- package/dist/{memos-76PTWV5V.js → memos-BYSBJRWZ.js} +4 -4
- package/dist/{metabase-TWSIDVBM.js → metabase-4JXZH3YG.js} +4 -4
- package/dist/{mistral_ai-TP7TQUEJ.js → mistral_ai-2C5BTBKW.js} +4 -4
- package/dist/{mother_duck-UXY5THYU.js → mother_duck-ZGNNNR3X.js} +4 -4
- package/dist/{ngrok-RZW2ISJK.js → ngrok-NTPGMRXI.js} +4 -4
- package/dist/{notes-B2I6FWK2.js → notes-KGYXX6N6.js} +1 -1
- package/dist/{notion-QOKRUE6M.js → notion-EX3X2G7G.js} +4 -4
- package/dist/{open_exchange_rates-ODLFWEJ7.js → open_exchange_rates-2V2LIGPS.js} +4 -4
- package/dist/{openai-ZPBPPPGT.js → openai-KQFQPK7Z.js} +4 -4
- package/dist/{opengraph_io-EOI5UJKT.js → opengraph_io-B63SEYJY.js} +4 -4
- package/dist/{openrouter-BUWLF3BG.js → openrouter-62A4H62Q.js} +4 -4
- package/dist/{outline-NXS3QRXO.js → outline-QC33XLCK.js} +4 -4
- package/dist/{paddle-T4MSKQ76.js → paddle-HDZG35Y7.js} +4 -4
- package/dist/{perplexity-WW5N2LW7.js → perplexity-M7LOMJWA.js} +4 -4
- package/dist/{pinecone-RY5AZPQM.js → pinecone-Y7YCJRZM.js} +4 -4
- package/dist/{pipedrive-OHYQNZTU.js → pipedrive-FLJA62UX.js} +4 -4
- package/dist/{polar-XZIAHXS5.js → polar-AE55Q425.js} +4 -4
- package/dist/{posthog-DTPTWORY.js → posthog-IAY5D3YW.js} +4 -4
- package/dist/{postmark-F4UCQKC3.js → postmark-NMKAXDXZ.js} +4 -4
- package/dist/{prerender-P3Y2MLIC.js → prerender-CDJM7I7N.js} +4 -4
- package/dist/{pubmed-RHU3GXFB.js → pubmed-N437ZJOR.js} +3 -3
- package/dist/{railway-VB6SRLI6.js → railway-NBWYXCUM.js} +3 -3
- package/dist/{readwise-DIMSKJZR.js → readwise-QRO3UC3R.js} +4 -4
- package/dist/{render-XCCDCEEK.js → render-NEW7SROG.js} +4 -4
- package/dist/{replicate-IUEOQ4JC.js → replicate-73YQLRTY.js} +4 -4
- package/dist/{resend-N5MJZH5E.js → resend-R5BAZFHZ.js} +4 -4
- package/dist/{rootly-25T4NBTU.js → rootly-5BLALPCS.js} +4 -4
- package/dist/{scrapfly-PK4XFXUA.js → scrapfly-EHFLNNUZ.js} +4 -4
- package/dist/{scrapingbee-ITPBMWQU.js → scrapingbee-UXLYS72S.js} +4 -4
- package/dist/{screenshot_fyi-5U6ZYPKR.js → screenshot_fyi-KC3NLTJ6.js} +4 -4
- package/dist/{semantic_scholar-BJGCI2MU.js → semantic_scholar-SA5OIUWA.js} +4 -4
- package/dist/{sentry-63IC263P.js → sentry-BAE3XLJN.js} +4 -4
- package/dist/{shodan-2WBIFHFN.js → shodan-FJR6MKKW.js} +4 -4
- package/dist/{shopify-XLLJRAGM.js → shopify-7OA6SLN5.js} +4 -4
- package/dist/{stripe-WLVCY3UN.js → stripe-MUWDZGGF.js} +3 -3
- package/dist/{supabase-BKNZ35ER.js → supabase-SWWGNWYR.js} +4 -4
- package/dist/{tavily-YFSDEUTL.js → tavily-XQNJ5EDI.js} +4 -4
- package/dist/{telegram-FC35W74G.js → telegram-RR6JPZOG.js} +4 -4
- package/dist/{telnyx-MI32XZUG.js → telnyx-7PKXOWSO.js} +4 -4
- package/dist/{todoist-4ZFJKZC6.js → todoist-63X5IUJE.js} +4 -4
- package/dist/{trello-UOGFNMK4.js → trello-MOG63DAI.js} +4 -4
- package/dist/{turso-YTSTW3ZS.js → turso-ENWTSHDL.js} +4 -4
- package/dist/{twilio-XAJDFUQH.js → twilio-FDXUN7VX.js} +3 -3
- package/dist/{umami-ZVIUBPAI.js → umami-TM7PROWF.js} +4 -4
- package/dist/{unsplash-IU3PLDNS.js → unsplash-NWXLKSOW.js} +4 -4
- package/dist/{upstash_redis-3EYJW7SY.js → upstash_redis-CUTQ5L2N.js} +4 -4
- package/dist/{uptimerobot-PJG2ASRU.js → uptimerobot-NNO32M3I.js} +3 -3
- package/dist/{v2ex-KFQWWGFC.js → v2ex-24KMSWS7.js} +4 -4
- package/dist/{vercel-I2ZDOQRL.js → vercel-B45LPF6I.js} +4 -4
- package/dist/{wolfram_alpha_api-BNXOJMB6.js → wolfram_alpha_api-DKJWVR6G.js} +4 -4
- package/dist/{wordpress-36D7BSMP.js → wordpress-XYFSDZXY.js} +4 -4
- package/dist/{workos-6X4JJRRC.js → workos-BEM7EPHM.js} +4 -4
- package/dist/{zhihu-CIXKCHIU.js → zhihu-CFHZ4NC7.js} +4 -4
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderHttpClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6X55ALDX.js";
|
|
4
4
|
import {
|
|
5
5
|
asJsonObject
|
|
6
6
|
} from "./chunk-JXHMDBAY.js";
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
createProviderPlugin,
|
|
9
9
|
requireApiKey,
|
|
10
10
|
upstreamError
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-6ANLYNFB.js";
|
|
12
|
+
import "./chunk-3WL6EXYX.js";
|
|
13
13
|
import {
|
|
14
14
|
TBError,
|
|
15
15
|
external_exports
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WIGQCP6O.js";
|
|
17
17
|
import "./chunk-U67V476Y.js";
|
|
18
18
|
|
|
19
19
|
// ../plugins/src/graphhopper/api.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ interface Scope {
|
|
|
68
68
|
* sys:bootstrapped → true(Admin SK 引导幂等标志)
|
|
69
69
|
* annotation:<path> → { text, updatedAt, updatedBy }(管理员 Path 补充说明)
|
|
70
70
|
* feedback:<path> → FeedbackEntry[](Agent 使用反馈,单 key 整存)
|
|
71
|
+
* deviceop:<sha256(deviceId)>:<operationId> → DeviceOperationRecord(revision CAS,密文 payload/result)
|
|
71
72
|
* store:object:<id> → StoreObject(revision CAS)
|
|
72
73
|
* store:upload:<id> → UploadSession(revision CAS)
|
|
73
74
|
* store:call-capability:<id> → CallUploadCapability(token 仅存 hash)
|
|
@@ -542,6 +543,8 @@ interface ContextProvider {
|
|
|
542
543
|
interface ToolSpec {
|
|
543
544
|
/** 危险操作二次确认;进 `~help` 的 confirm 行。 */
|
|
544
545
|
confirm?: boolean;
|
|
546
|
+
/** 仅 device-backed tool 使用;mailbox/both 表示 invoke 可选择持久化交付。 */
|
|
547
|
+
delivery?: 'realtime' | 'mailbox' | 'both';
|
|
545
548
|
/** 一句话描述;进 `~help` 的 `h` 行。上游可能不带 → 可缺省。 */
|
|
546
549
|
description?: string;
|
|
547
550
|
/** 副作用标记(read/write/destructive);进 `~help` 的 effect 行。 */
|
|
@@ -631,8 +634,36 @@ type DeviceCallResult = {
|
|
|
631
634
|
error: TBErrorBody;
|
|
632
635
|
ok: false;
|
|
633
636
|
};
|
|
637
|
+
/**
|
|
638
|
+
* 网关对一次 realtime 尝试的权威认知。
|
|
639
|
+
*
|
|
640
|
+
* - completed:设备明确返回 result(成功或业务错误);
|
|
641
|
+
* - not_dispatched:call 帧确定没有交给设备,可安全改走 Mailbox;
|
|
642
|
+
* - unknown:call 帧已经发送或可能已经发送,但结果未收敛,不能自动重试/入队。
|
|
643
|
+
*/
|
|
644
|
+
type DeviceCallDisposition = 'completed' | 'not_dispatched' | 'unknown';
|
|
645
|
+
interface DeviceCallAttempt {
|
|
646
|
+
disposition: DeviceCallDisposition;
|
|
647
|
+
result: DeviceCallResult;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
interface RuntimeRemoteSettings {
|
|
651
|
+
allowInsecure: boolean;
|
|
652
|
+
allowlist: string[];
|
|
653
|
+
federatedSearch?: {
|
|
654
|
+
maxConcurrency?: number;
|
|
655
|
+
maxResponseBodyBytes?: number;
|
|
656
|
+
maxSources?: number;
|
|
657
|
+
minChildWorkMs?: number;
|
|
658
|
+
perHopReturnReserveMs?: number;
|
|
659
|
+
sessionTtlMs?: number;
|
|
660
|
+
totalDeadlineMs?: number;
|
|
661
|
+
};
|
|
662
|
+
instanceId?: string;
|
|
663
|
+
maxHops: number;
|
|
664
|
+
}
|
|
634
665
|
|
|
635
|
-
type SearchCapability = 'search' | 'search:semantic';
|
|
666
|
+
type SearchCapability = 'search' | 'search:federated' | 'search:semantic';
|
|
636
667
|
/** 全局工具搜索的完整结果;只在权限和可见性候选筛选后 hydrate。 */
|
|
637
668
|
interface ToolSearchHit {
|
|
638
669
|
path: TreePath;
|
|
@@ -640,26 +671,48 @@ interface ToolSearchHit {
|
|
|
640
671
|
}
|
|
641
672
|
/** adapter 返回的轻量候选;resumeOffset 仅在当前请求内传递,不暴露给协议调用方。 */
|
|
642
673
|
interface ToolSearchCandidate {
|
|
674
|
+
/** 命中的原始 logical terms / 全部原始 logical terms;不按派生 unit 重复计数。 */
|
|
675
|
+
coverage: number;
|
|
676
|
+
matchedTermCount: number;
|
|
643
677
|
name: string;
|
|
644
678
|
path: TreePath;
|
|
645
679
|
ref: string;
|
|
646
680
|
resumeOffset: number;
|
|
647
681
|
revision: number;
|
|
682
|
+
/** 仅供宿主在 canonical hydration 提前截页时续签同一搜索约束,不进入 wire。 */
|
|
683
|
+
searchOptionsFingerprint?: string;
|
|
684
|
+
totalTermCount: number;
|
|
648
685
|
}
|
|
686
|
+
type ToolSearchEffect = 'destructive' | 'read' | 'unknown' | 'write';
|
|
687
|
+
type ToolSearchMatching = 'all' | 'best';
|
|
649
688
|
interface ToolSearchOptions {
|
|
650
689
|
cursor?: string;
|
|
690
|
+
effects?: ToolSearchEffect[];
|
|
651
691
|
limit?: number;
|
|
692
|
+
matching?: ToolSearchMatching;
|
|
693
|
+
minCoverage?: number;
|
|
652
694
|
mode?: 'keyword' | 'semantic';
|
|
695
|
+
pathPrefix?: TreePath;
|
|
696
|
+
}
|
|
697
|
+
/** 会改变候选集合或分页档位的规范化约束;cursor 必须绑定其完整指纹。 */
|
|
698
|
+
interface NormalizedToolSearchOptions {
|
|
699
|
+
effects?: ToolSearchEffect[];
|
|
700
|
+
matching: ToolSearchMatching;
|
|
701
|
+
minCoverage?: number;
|
|
702
|
+
pathPrefix?: TreePath;
|
|
653
703
|
}
|
|
654
704
|
/** 宿主提供的全局工具索引;权限和虚拟化仍由 gateway 处理。 */
|
|
655
705
|
interface SearchIndex {
|
|
656
706
|
readonly capabilities: readonly SearchCapability[];
|
|
657
707
|
cursorFor(query: string, candidate: ToolSearchCandidate, mode?: 'keyword' | 'semantic'): Promise<string>;
|
|
708
|
+
/** 联邦 continuation 的 topology binding;不实现的自定义 adapter 只能提供 local search。 */
|
|
709
|
+
revision?(): Promise<number | string>;
|
|
658
710
|
search(query: string, opts?: ToolSearchOptions): Promise<Page<ToolSearchCandidate>>;
|
|
659
711
|
}
|
|
660
712
|
/** 索引持久层使用的轻量记录;完整 ToolSpec 只保留摘要,不进入派生数据库。 */
|
|
661
713
|
interface SerializedToolSearchRecord {
|
|
662
714
|
description: string;
|
|
715
|
+
effect: ToolSearchEffect;
|
|
663
716
|
feedback: string;
|
|
664
717
|
name: string;
|
|
665
718
|
path: TreePath;
|
|
@@ -745,7 +798,7 @@ interface SqlSearchDialect {
|
|
|
745
798
|
* 把已 normalize 的 query 变成候选查询语句(含排序与分页)。三后端共用查询单元
|
|
746
799
|
* 展开和评分形态,方言只选择占位符语法与 LIKE/ILIKE。
|
|
747
800
|
*/
|
|
748
|
-
candidateStatement(query: string, limit: number, offset: number): SqlSearchStatement;
|
|
801
|
+
candidateStatement(query: string, limit: number, offset: number, constraints?: NormalizedToolSearchOptions): SqlSearchStatement;
|
|
749
802
|
/** 建表(幂等),元素不带尾分号。 */
|
|
750
803
|
readonly schemaStatements: readonly string[];
|
|
751
804
|
/** 编排直接下发的固定语句。 */
|
|
@@ -786,6 +839,7 @@ declare class SqlSearchIndex implements MutableSearchIndex {
|
|
|
786
839
|
private meta;
|
|
787
840
|
private snapshotDigests;
|
|
788
841
|
initialized(): Promise<boolean>;
|
|
842
|
+
revision(): Promise<number>;
|
|
789
843
|
replace(path: TreePath, tools: readonly ToolSpec[], opts?: {
|
|
790
844
|
feedback?: string;
|
|
791
845
|
}): Promise<void>;
|
|
@@ -851,11 +905,22 @@ interface RemoteSettings {
|
|
|
851
905
|
allowInsecure: boolean;
|
|
852
906
|
/** baseUrl 的 host 后缀白名单;空数组 = 拒一切 remote。 */
|
|
853
907
|
allowlist: string[];
|
|
908
|
+
/** 联邦 search 的部署级硬上限;客户端与下游 header 只能进一步收紧。 */
|
|
909
|
+
federatedSearch?: Partial<FederatedSearchSettings>;
|
|
854
910
|
/** 本实例 X-TB-Via 标识;缺省用**入站请求 host** 派生(跨实例联邦须显式配置才能可靠去环)。 */
|
|
855
911
|
instanceId?: string;
|
|
856
912
|
/** X-TB-Via 跳数上限(缺省 4,由宿主适配层落默认)。 */
|
|
857
913
|
maxHops: number;
|
|
858
914
|
}
|
|
915
|
+
interface FederatedSearchSettings {
|
|
916
|
+
maxConcurrency: number;
|
|
917
|
+
maxResponseBodyBytes: number;
|
|
918
|
+
maxSources: number;
|
|
919
|
+
minChildWorkMs: number;
|
|
920
|
+
perHopReturnReserveMs: number;
|
|
921
|
+
sessionTtlMs: number;
|
|
922
|
+
totalDeadlineMs: number;
|
|
923
|
+
}
|
|
859
924
|
|
|
860
925
|
/**
|
|
861
926
|
* 宿主注入面与请求期公共类型。
|
|
@@ -877,8 +942,8 @@ interface DeviceInvokeRequest {
|
|
|
877
942
|
}
|
|
878
943
|
/** 设备通道宿主(CF = DeviceSession DO / Docker = ws)。 */
|
|
879
944
|
interface DeviceChannel {
|
|
880
|
-
/** HTTP→WS
|
|
881
|
-
invoke(deviceId: string, req: DeviceInvokeRequest): Promise<
|
|
945
|
+
/** HTTP→WS 调用转发,并显式报告是否已 dispatch,供安全 Mailbox fallback 判定。 */
|
|
946
|
+
invoke(deviceId: string, req: DeviceInvokeRequest): Promise<DeviceCallAttempt>;
|
|
882
947
|
/** WS 升级请求转交(/system/device/ws)。 */
|
|
883
948
|
ws(deviceId: string, request: Request): Promise<Response>;
|
|
884
949
|
}
|
|
@@ -1073,12 +1138,7 @@ interface ServerConfig {
|
|
|
1073
1138
|
redisUrl?: string;
|
|
1074
1139
|
refThresholdBytes?: number;
|
|
1075
1140
|
refTtlSec?: number;
|
|
1076
|
-
remote:
|
|
1077
|
-
allowInsecure: boolean;
|
|
1078
|
-
allowlist: string[];
|
|
1079
|
-
instanceId?: string;
|
|
1080
|
-
maxHops: number;
|
|
1081
|
-
};
|
|
1141
|
+
remote: RuntimeRemoteSettings;
|
|
1082
1142
|
/**
|
|
1083
1143
|
* 本副本标识(TB_REPLICA_ID),路由表的 value。缺省用 hostname —— 容器平台上
|
|
1084
1144
|
* 每个副本的 hostname 天然唯一;同机多进程需显式区分。
|
|
@@ -1180,7 +1240,7 @@ declare class DeviceRouter {
|
|
|
1180
1240
|
constructor(replicaId: string, backend: DeviceRouterBackend, opts: {
|
|
1181
1241
|
forwardTimeoutMs?: number;
|
|
1182
1242
|
/** 收到转发来的调用时,在本副本执行(本地无该连接则返回 offline)。 */
|
|
1183
|
-
onLocalCall: (deviceId: string, req: DeviceInvokeRequest) => Promise<
|
|
1243
|
+
onLocalCall: (deviceId: string, req: DeviceInvokeRequest) => Promise<DeviceCallAttempt>;
|
|
1184
1244
|
ttlSec?: number;
|
|
1185
1245
|
});
|
|
1186
1246
|
private get ttlSec();
|
|
@@ -1196,7 +1256,7 @@ declare class DeviceRouter {
|
|
|
1196
1256
|
* 把调用转发给持有该设备的副本并等结果。
|
|
1197
1257
|
* 无人持有 → null(调用方按 deviceOffline 处理)。
|
|
1198
1258
|
*/
|
|
1199
|
-
forward(deviceId: string, req: DeviceInvokeRequest): Promise<
|
|
1259
|
+
forward(deviceId: string, req: DeviceInvokeRequest): Promise<DeviceCallAttempt | null>;
|
|
1200
1260
|
close(): Promise<void>;
|
|
1201
1261
|
/** correlationId 的进程内序号(与 replicaId 组合后全局唯一)。 */
|
|
1202
1262
|
private static seq;
|
|
@@ -1224,7 +1284,7 @@ declare class DeviceRouter {
|
|
|
1224
1284
|
*/
|
|
1225
1285
|
|
|
1226
1286
|
/** router 回调本副本执行设备调用的签名。 */
|
|
1227
|
-
type DeviceLocalCall = (deviceId: string, req: DeviceInvokeRequest) => Promise<
|
|
1287
|
+
type DeviceLocalCall = (deviceId: string, req: DeviceInvokeRequest) => Promise<DeviceCallAttempt>;
|
|
1228
1288
|
declare const DEVICE_WS_PATH = "/system/device/ws";
|
|
1229
1289
|
declare class DeviceHub {
|
|
1230
1290
|
private readonly store;
|
|
@@ -1259,7 +1319,7 @@ declare class DeviceHub {
|
|
|
1259
1319
|
* 本地没有但配了 router → 问路由表并转发给持有者副本(socket 不可序列化,
|
|
1260
1320
|
* 只能把调用送到 socket 所在进程)。都没有 → deviceOffline。
|
|
1261
1321
|
*/
|
|
1262
|
-
invoke(deviceId: string, req: DeviceInvokeRequest): Promise<
|
|
1322
|
+
invoke(deviceId: string, req: DeviceInvokeRequest): Promise<DeviceCallAttempt>;
|
|
1263
1323
|
/**
|
|
1264
1324
|
* 只走本副本 socket 的调用执行。
|
|
1265
1325
|
*
|
package/dist/index.js
CHANGED
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
configFromEnv,
|
|
13
13
|
createDataObjectStore,
|
|
14
14
|
createTbServer
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-RVUERWUZ.js";
|
|
16
|
+
import "./chunk-3WL6EXYX.js";
|
|
17
|
+
import "./chunk-WIGQCP6O.js";
|
|
18
18
|
import "./chunk-U67V476Y.js";
|
|
19
19
|
export {
|
|
20
20
|
DEVICE_FORWARD_TIMEOUT_MS,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderHttpClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6X55ALDX.js";
|
|
4
4
|
import "./chunk-JXHMDBAY.js";
|
|
5
5
|
import {
|
|
6
6
|
createProviderPlugin,
|
|
7
7
|
requireApiKey,
|
|
8
8
|
upstreamError
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-6ANLYNFB.js";
|
|
10
|
+
import "./chunk-3WL6EXYX.js";
|
|
11
11
|
import {
|
|
12
12
|
TBError,
|
|
13
13
|
external_exports
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WIGQCP6O.js";
|
|
15
15
|
import "./chunk-U67V476Y.js";
|
|
16
16
|
|
|
17
17
|
// ../plugins/src/ip2proxy/schema.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderHttpClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6X55ALDX.js";
|
|
4
4
|
import {
|
|
5
5
|
asJsonObject
|
|
6
6
|
} from "./chunk-JXHMDBAY.js";
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
createProviderPlugin,
|
|
9
9
|
requireApiKey,
|
|
10
10
|
upstreamError
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-6ANLYNFB.js";
|
|
12
|
+
import "./chunk-3WL6EXYX.js";
|
|
13
13
|
import {
|
|
14
14
|
external_exports
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WIGQCP6O.js";
|
|
16
16
|
import "./chunk-U67V476Y.js";
|
|
17
17
|
|
|
18
18
|
// ../plugins/src/ipgeolocation_io/api.ts
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderHttpClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6X55ALDX.js";
|
|
4
4
|
import "./chunk-JXHMDBAY.js";
|
|
5
5
|
import {
|
|
6
6
|
createProviderPlugin,
|
|
7
7
|
requireApiKey,
|
|
8
8
|
upstreamError
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-6ANLYNFB.js";
|
|
10
|
+
import "./chunk-3WL6EXYX.js";
|
|
11
11
|
import {
|
|
12
12
|
TBError,
|
|
13
13
|
external_exports
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WIGQCP6O.js";
|
|
15
15
|
import "./chunk-U67V476Y.js";
|
|
16
16
|
|
|
17
17
|
// ../plugins/src/ipqualityscore/api.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderHttpClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6X55ALDX.js";
|
|
4
4
|
import {
|
|
5
5
|
messageFrom
|
|
6
6
|
} from "./chunk-JXHMDBAY.js";
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
createProviderPlugin,
|
|
9
9
|
requireApiKey,
|
|
10
10
|
upstreamError
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-6ANLYNFB.js";
|
|
12
|
+
import "./chunk-3WL6EXYX.js";
|
|
13
13
|
import {
|
|
14
14
|
external_exports
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WIGQCP6O.js";
|
|
16
16
|
import "./chunk-U67V476Y.js";
|
|
17
17
|
|
|
18
18
|
// ../plugins/src/jina_ai/api.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderHttpClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6X55ALDX.js";
|
|
4
4
|
import {
|
|
5
5
|
asJsonObject,
|
|
6
6
|
booleanValue,
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
createProviderPlugin,
|
|
13
13
|
requireCredential,
|
|
14
14
|
upstreamError
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6ANLYNFB.js";
|
|
16
16
|
import {
|
|
17
17
|
assertPublicHttpUrl
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3WL6EXYX.js";
|
|
19
19
|
import {
|
|
20
20
|
TBError,
|
|
21
21
|
external_exports
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WIGQCP6O.js";
|
|
23
23
|
import "./chunk-U67V476Y.js";
|
|
24
24
|
|
|
25
25
|
// ../plugins/src/jira/api.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderHttpClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6X55ALDX.js";
|
|
4
4
|
import {
|
|
5
5
|
asJsonObject,
|
|
6
6
|
compactDefined,
|
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
createProviderPlugin,
|
|
13
13
|
requireApiKey,
|
|
14
14
|
upstreamError
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-6ANLYNFB.js";
|
|
16
|
+
import "./chunk-3WL6EXYX.js";
|
|
17
17
|
import {
|
|
18
18
|
TBError,
|
|
19
19
|
external_exports
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-WIGQCP6O.js";
|
|
21
21
|
import "./chunk-U67V476Y.js";
|
|
22
22
|
|
|
23
23
|
// ../plugins/src/langsmith/api.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderHttpClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6X55ALDX.js";
|
|
4
4
|
import {
|
|
5
5
|
asJsonObject,
|
|
6
6
|
compactDefined,
|
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
createProviderPlugin,
|
|
11
11
|
requireApiKey,
|
|
12
12
|
upstreamError
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-6ANLYNFB.js";
|
|
14
|
+
import "./chunk-3WL6EXYX.js";
|
|
15
15
|
import {
|
|
16
16
|
TBError,
|
|
17
17
|
external_exports
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WIGQCP6O.js";
|
|
19
19
|
import "./chunk-U67V476Y.js";
|
|
20
20
|
|
|
21
21
|
// ../plugins/src/lemlist/api.ts
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
createProviderPlugin,
|
|
8
8
|
requireApiKey,
|
|
9
9
|
upstreamError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6ANLYNFB.js";
|
|
11
11
|
import {
|
|
12
12
|
guardedFetch
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3WL6EXYX.js";
|
|
14
14
|
import {
|
|
15
15
|
TBError,
|
|
16
16
|
external_exports
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WIGQCP6O.js";
|
|
18
18
|
import "./chunk-U67V476Y.js";
|
|
19
19
|
|
|
20
20
|
// ../plugins/src/linear/api.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderHttpClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6X55ALDX.js";
|
|
4
4
|
import {
|
|
5
5
|
messageFrom
|
|
6
6
|
} from "./chunk-JXHMDBAY.js";
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
createProviderPlugin,
|
|
9
9
|
requireApiKey,
|
|
10
10
|
upstreamError
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-6ANLYNFB.js";
|
|
12
|
+
import "./chunk-3WL6EXYX.js";
|
|
13
13
|
import {
|
|
14
14
|
external_exports
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WIGQCP6O.js";
|
|
16
16
|
import "./chunk-U67V476Y.js";
|
|
17
17
|
|
|
18
18
|
// ../plugins/src/logsnag/api.ts
|