@tool-bridge/server 0.15.0 → 0.16.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-QYTOPRFV.js → airtable-S3T4TAN7.js} +4 -4
- package/dist/{alt_text_generator_ai-2CFYNSZV.js → alt_text_generator_ai-4DIRIDKL.js} +4 -4
- package/dist/{amap-HGOBOHSZ.js → amap-LGVGNPML.js} +4 -4
- package/dist/{anthropic-3OXOQNSR.js → anthropic-27RFZO35.js} +4 -4
- package/dist/{apify-PUV2QGKL.js → apify-6WLYAIAS.js} +4 -4
- package/dist/{brave_search-DG75AVKA.js → brave_search-K2SVJ66F.js} +4 -4
- package/dist/{chunk-KH663T3A.js → chunk-2O27H4Y2.js} +1 -1
- package/dist/{chunk-NLPTB3IL.js → chunk-BB6ZLMTU.js} +1120 -114
- package/dist/{chunk-UI4E4T5Q.js → chunk-GKX72JMJ.js} +1 -1
- package/dist/{chunk-NQ67PIIS.js → chunk-VK3V2WTY.js} +2 -2
- package/dist/{chunk-DXXYNIXV.js → chunk-YB2FLNWI.js} +1611 -42
- package/dist/{circleci-EFNLX5AW.js → circleci-WV3ITU7Q.js} +4 -4
- package/dist/{clerk-UWDLMZVM.js → clerk-NFQEFKS4.js} +4 -4
- package/dist/{cloudflare_dns-WQXVDSPU.js → cloudflare_dns-2RK5ASBJ.js} +4 -4
- package/dist/{cohere-VPDIKUDP.js → cohere-5KEW7LWT.js} +4 -4
- package/dist/{confluence-NBOOQNTR.js → confluence-SZE63S46.js} +4 -4
- package/dist/{convertapi-6Z6OP25T.js → convertapi-QPG2JC5K.js} +4 -4
- package/dist/{currencyapi-CAMUWCTV.js → currencyapi-UO2APQRY.js} +4 -4
- package/dist/{deepseek-GRALXYXR.js → deepseek-LJELIMM3.js} +4 -4
- package/dist/{docker_hub-5AASF3TJ.js → docker_hub-2MFXSBOF.js} +4 -4
- package/dist/{dropbox-HS3VGRD3.js → dropbox-GQYNTTVA.js} +4 -4
- package/dist/{dub-KHERUTW6.js → dub-KI2LHXST.js} +4 -4
- package/dist/{e2b-4MGHPFXY.js → e2b-WO6ISY3C.js} +4 -4
- package/dist/{exa-O77PKTBT.js → exa-IZ7B3BPT.js} +4 -4
- package/dist/{fal_ai-TX2TZFMP.js → fal_ai-LTMF36GJ.js} +4 -4
- package/dist/{feishu-I7VPWO3C.js → feishu-WM7SLSFD.js} +3 -3
- package/dist/{feishu_custom_bot-D4XZDLES.js → feishu_custom_bot-66W3MXH2.js} +4 -4
- package/dist/{figma-SW3HZCZ5.js → figma-2Z274VQZ.js} +4 -4
- package/dist/{firehydrant-ND5DEW3L.js → firehydrant-IFI4R65V.js} +4 -4
- package/dist/{fixer-ZTSV7ZK3.js → fixer-BCCZEB3D.js} +4 -4
- package/dist/{fly-RZ7SZKFT.js → fly-755FXYB5.js} +4 -4
- package/dist/{front-Q5MZVUGX.js → front-4FZKKXXK.js} +4 -4
- package/dist/{geocodio-QPHHODHG.js → geocodio-WYKDJ3DP.js} +4 -4
- package/dist/{ghost-3Q6O7EWZ.js → ghost-5BNQTCOH.js} +4 -4
- package/dist/{github-LDMGJHXV.js → github-ULELF5VX.js} +4 -4
- package/dist/{gmail-6QBCI3TT.js → gmail-G34WT64J.js} +4 -4
- package/dist/{googlecalendar-LLSYY4ZJ.js → googlecalendar-BQU255SC.js} +4 -4
- package/dist/{googledocs-KRGVBGWY.js → googledocs-HPCNQXYJ.js} +4 -4
- package/dist/{grafana-OHPZMRHT.js → grafana-VOV24FIC.js} +4 -4
- package/dist/{graphhopper-2PBY7OX4.js → graphhopper-D5RXW6AP.js} +4 -4
- package/dist/index.d.ts +147 -61
- package/dist/index.js +2 -2
- package/dist/{ip2proxy-GPBQZKKG.js → ip2proxy-DAYO7EKZ.js} +4 -4
- package/dist/{ipgeolocation_io-YNTOLOFH.js → ipgeolocation_io-XD4PSLII.js} +4 -4
- package/dist/{ipqualityscore-CZLQUAQ7.js → ipqualityscore-K27QEAWK.js} +4 -4
- package/dist/{jina_ai-JIFEYH5C.js → jina_ai-E6UXFV2P.js} +4 -4
- package/dist/{jira-2DKTIWHK.js → jira-ZDSXGQ6W.js} +4 -4
- package/dist/{langsmith-UCX7NHKP.js → langsmith-TIFJRREW.js} +4 -4
- package/dist/{lemlist-IS6K2VJG.js → lemlist-DASEMJMA.js} +4 -4
- package/dist/{linear-AK6547ZS.js → linear-KE6UP4SP.js} +4 -4
- package/dist/{logsnag-EB5LICOH.js → logsnag-IMNDN4R5.js} +4 -4
- package/dist/main.js +101 -101
- package/dist/{mattermost-YOSWUA3R.js → mattermost-HHHMUXQA.js} +4 -4
- package/dist/{mem0-IICTSHLB.js → mem0-D2FGGOIY.js} +4 -4
- package/dist/{memos-DIV6MZPB.js → memos-4OVIGFPH.js} +4 -4
- package/dist/{metabase-ZGHNTCAT.js → metabase-33WCX5YD.js} +4 -4
- package/dist/{mistral_ai-IAG3WZYO.js → mistral_ai-QIMZ2JYL.js} +4 -4
- package/dist/{mother_duck-PYKG4ZHO.js → mother_duck-M6VWS2VH.js} +4 -4
- package/dist/{ngrok-BXN3DGTK.js → ngrok-Z2PKQBHH.js} +4 -4
- package/dist/{notes-L2UO36HQ.js → notes-SS4RPC4K.js} +2 -2
- package/dist/{notion-PVHVOV4R.js → notion-FJCNQ6I7.js} +4 -4
- package/dist/{open_exchange_rates-DVMOPFNQ.js → open_exchange_rates-WU57WTT5.js} +4 -4
- package/dist/{openai-VW6F5YTK.js → openai-JODZ4GKT.js} +4 -4
- package/dist/{opengraph_io-MQUREYWM.js → opengraph_io-SQRAUSV5.js} +4 -4
- package/dist/{openrouter-5MI3ODCU.js → openrouter-Q5XXEJZ7.js} +4 -4
- package/dist/{outline-B2U7NIVA.js → outline-RT2EHJ2X.js} +4 -4
- package/dist/{paddle-LDZTVYQO.js → paddle-OF2V7GAC.js} +4 -4
- package/dist/{perplexity-P7BNWFMH.js → perplexity-LNZEWLHG.js} +4 -4
- package/dist/{pinecone-3Y67EJYP.js → pinecone-JSJIXZYN.js} +4 -4
- package/dist/{pipedrive-4KFLGCJW.js → pipedrive-D4CKVUXR.js} +4 -4
- package/dist/{polar-NIULQPUD.js → polar-M7ZYP6UR.js} +4 -4
- package/dist/{posthog-UXGCIHRP.js → posthog-YV7CZOH4.js} +4 -4
- package/dist/{postmark-XT77YNQM.js → postmark-KYHLECRG.js} +4 -4
- package/dist/{prerender-37E6ZN6Z.js → prerender-HCMHBKV2.js} +4 -4
- package/dist/{pubmed-BO2W4IR6.js → pubmed-WYVLCCN3.js} +4 -4
- package/dist/{railway-5BACZNYC.js → railway-TWIRD5KR.js} +4 -4
- package/dist/{readwise-DXABSDKY.js → readwise-UZ467IQ7.js} +4 -4
- package/dist/{render-4MCO6RLA.js → render-MECUC5CC.js} +4 -4
- package/dist/{replicate-IVEPY4EP.js → replicate-A5MEK3SW.js} +4 -4
- package/dist/{resend-XJBJO46B.js → resend-BC6EAWJQ.js} +4 -4
- package/dist/{rootly-R6QDVF3D.js → rootly-ZM3QDUIS.js} +4 -4
- package/dist/{scrapfly-E24XNN32.js → scrapfly-WAML42QJ.js} +4 -4
- package/dist/{scrapingbee-QT3O334C.js → scrapingbee-DG7PET3V.js} +4 -4
- package/dist/{screenshot_fyi-MJNFPUFV.js → screenshot_fyi-HY6WTHIO.js} +4 -4
- package/dist/{semantic_scholar-BVKWS72R.js → semantic_scholar-C5IZA7IP.js} +4 -4
- package/dist/{sentry-52T5XARK.js → sentry-OKBPSTDM.js} +4 -4
- package/dist/{shodan-RTOTTCX2.js → shodan-PPC6DYU4.js} +4 -4
- package/dist/{shopify-3RVWQDZ6.js → shopify-EWGUHBXO.js} +4 -4
- package/dist/{stripe-M3T2K3EW.js → stripe-6RPDPC5W.js} +4 -4
- package/dist/{supabase-UUUXAEYR.js → supabase-SK7DQ42N.js} +4 -4
- package/dist/{tavily-LVOZQQKJ.js → tavily-YCG5VQMH.js} +4 -4
- package/dist/{telegram-WJQPCKQT.js → telegram-2OES5FYB.js} +4 -4
- package/dist/{telnyx-THKSKAI2.js → telnyx-POOSBBR4.js} +4 -4
- package/dist/{todoist-YTRGFFRC.js → todoist-M7YD6YSS.js} +4 -4
- package/dist/{trello-QBK6WKN2.js → trello-IS6V5W3E.js} +4 -4
- package/dist/{turso-EA44ZKLR.js → turso-RCFHUFVH.js} +4 -4
- package/dist/{twilio-GSW3V55S.js → twilio-OS2RXFGO.js} +4 -4
- package/dist/{umami-DVZ7XUYC.js → umami-PQ2SJ2LN.js} +4 -4
- package/dist/{unsplash-ZWUWQ7OS.js → unsplash-C6BPZO4E.js} +4 -4
- package/dist/{upstash_redis-BQIQB5NM.js → upstash_redis-WH6UER7H.js} +4 -4
- package/dist/{uptimerobot-2OJHTUPV.js → uptimerobot-M3YZGS6Z.js} +4 -4
- package/dist/{v2ex-IZF4BB4O.js → v2ex-R4JWTEHN.js} +4 -4
- package/dist/{vercel-PI3BJENX.js → vercel-FZVYUOQD.js} +4 -4
- package/dist/{wolfram_alpha_api-EYQ2QCHH.js → wolfram_alpha_api-2KOLO5DC.js} +4 -4
- package/dist/{wordpress-ETDA6XLX.js → wordpress-XRWGO6LG.js} +4 -4
- package/dist/{workos-D7INO4Y4.js → workos-WR4NKOYL.js} +4 -4
- package/dist/{zhihu-Q7FNHEDM.js → zhihu-BKZIB3WA.js} +4 -4
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -68,8 +68,24 @@ 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
|
+
* store:object:<id> → StoreObject(revision CAS)
|
|
72
|
+
* store:upload:<id> → UploadSession(revision CAS)
|
|
73
|
+
* store:call-capability:<id> → CallUploadCapability(token 仅存 hash)
|
|
74
|
+
* store:share:<id> → ShareGrant(token 仅存 hash)
|
|
71
75
|
*/
|
|
72
76
|
interface StateStore {
|
|
77
|
+
/**
|
|
78
|
+
* 可选原子 compare-and-swap 原语,供带 `revision` 的权威记录做跨副本状态转换。
|
|
79
|
+
*
|
|
80
|
+
* - `expectedRevision === null`:仅当 key 不存在时写入;
|
|
81
|
+
* - 数字:仅当现存值是对象且其 `revision` 严格等于该值时替换或删除;
|
|
82
|
+
* - `value === null`:命中后删除,否则替换为 value。
|
|
83
|
+
*
|
|
84
|
+
* 调用方负责让新值的 revision 从 expectedRevision 单调加一。实现必须把比较与
|
|
85
|
+
* 写入/删除放在同一条原子存储操作中,不能用 get→put 或进程内锁模拟。
|
|
86
|
+
* StoreService 等依赖并发状态机的能力会在缺少此原语时 fail closed。
|
|
87
|
+
*/
|
|
88
|
+
compareAndSwap?(key: string, expectedRevision: number | null, value: unknown | null): Promise<boolean>;
|
|
73
89
|
delete(key: string): Promise<void>;
|
|
74
90
|
get(key: string): Promise<unknown | null>;
|
|
75
91
|
/** 批量读取,返回值只包含当前存在的 key;单次最多 100 keys。 */
|
|
@@ -358,66 +374,6 @@ interface BuiltinCatalogEntry {
|
|
|
358
374
|
/** binding 名 → 目录项。 */
|
|
359
375
|
type BuiltinCatalog = Record<string, BuiltinCatalogEntry>;
|
|
360
376
|
|
|
361
|
-
/**
|
|
362
|
-
* Context Layer 类型(原样转写;方法签名异步化以兼容对象存储后端)。
|
|
363
|
-
*
|
|
364
|
-
* 全部动词可选:能力由 handler 存在性推导(见 context/capabilities.ts)。
|
|
365
|
-
* 可选能力(Search/Delete)另在 ~describe 的 capabilities 中声明,调用方先探测再用。
|
|
366
|
-
*/
|
|
367
|
-
|
|
368
|
-
interface ContextEntryMeta {
|
|
369
|
-
/** "text/markdown" | "application/json" | ... */
|
|
370
|
-
contentType: string;
|
|
371
|
-
metadata: Record<string, string>;
|
|
372
|
-
size?: number;
|
|
373
|
-
updatedAt: Timestamp;
|
|
374
|
-
/** node://<namespace-path>/<entry-path>;目录条目以尾 '/' 表示。 */
|
|
375
|
-
uri: URI;
|
|
376
|
-
/** 乐观并发:Update/Write 可携带 ifVersion;对象存储后端 = etag。 */
|
|
377
|
-
version: string;
|
|
378
|
-
}
|
|
379
|
-
interface ContextEntry extends ContextEntryMeta {
|
|
380
|
-
/** 文本或 JSON;大对象返回 { $ref: <预签名或中转 URL> }。 */
|
|
381
|
-
content: string | unknown;
|
|
382
|
-
}
|
|
383
|
-
interface ContextEntryInput {
|
|
384
|
-
content: string | unknown;
|
|
385
|
-
/** 字符串 content 必填(缺失 → invalid_argument);非字符串 content 缺省 application/json。 */
|
|
386
|
-
contentType?: string;
|
|
387
|
-
/** 不匹配 → conflict。 */
|
|
388
|
-
ifVersion?: string;
|
|
389
|
-
metadata?: Record<string, string>;
|
|
390
|
-
}
|
|
391
|
-
interface ContextPatch {
|
|
392
|
-
content?: string | unknown;
|
|
393
|
-
ifVersion?: string;
|
|
394
|
-
/** 浅合并。 */
|
|
395
|
-
metadata?: Record<string, string>;
|
|
396
|
-
}
|
|
397
|
-
interface SearchOptions extends ListOptions {
|
|
398
|
-
/** 缺省 keyword;semantic 需 capabilities 声明 "search:semantic",未声明 → invalid_argument。 */
|
|
399
|
-
mode?: 'keyword' | 'semantic';
|
|
400
|
-
}
|
|
401
|
-
/**
|
|
402
|
-
* Context provider。**全部动词可选**:能力由 handler 存在性推导(context/capabilities.ts),
|
|
403
|
-
* `~help` 只列真实存在的操作,没有任何写动词即自动只读。
|
|
404
|
-
*
|
|
405
|
-
* 这样只读资源、纯搜索服务、append-only 存储都能如实表达自己,不必为满足接口而伪造
|
|
406
|
-
* 方法或抛 unimplemented。未实现的动词在数据面按 unknown cmd 拒绝(invalid_argument)。
|
|
407
|
-
*/
|
|
408
|
-
interface ContextProvider {
|
|
409
|
-
delete?(path: string): Promise<void>;
|
|
410
|
-
/** 读取单个条目(含内容);不存在 → not_found。 */
|
|
411
|
-
get?(path: string): Promise<ContextEntry>;
|
|
412
|
-
/** 枚举条目(浅层列表 + 分页);path 为 namespace 内相对路径前缀。 */
|
|
413
|
-
list?(path: string, opts?: ListOptions): Promise<Page<ContextEntryMeta>>;
|
|
414
|
-
search?(query: string, opts?: SearchOptions): Promise<Page<ContextEntryMeta>>;
|
|
415
|
-
/** 部分更新已存在条目的内容或 metadata;不存在 → not_found。 */
|
|
416
|
-
update?(path: string, patch: ContextPatch): Promise<ContextEntryMeta>;
|
|
417
|
-
/** 创建或整体替换条目(幂等 upsert)。 */
|
|
418
|
-
write?(path: string, entry: ContextEntryInput): Promise<ContextEntryMeta>;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
377
|
/**
|
|
422
378
|
* ObjectStore:对象存储抽象。
|
|
423
379
|
*
|
|
@@ -456,6 +412,8 @@ interface ObjectPutOptions {
|
|
|
456
412
|
contentType?: string;
|
|
457
413
|
/** 与现存对象 etag 不符(含对象不存在)→ TBError conflict。 */
|
|
458
414
|
ifMatchEtag?: string;
|
|
415
|
+
/** `*` 表示仅当对象不存在时创建;命中现存对象 → TBError conflict。 */
|
|
416
|
+
ifNoneMatch?: '*';
|
|
459
417
|
metadata?: Record<string, string>;
|
|
460
418
|
}
|
|
461
419
|
interface ObjectListOptions {
|
|
@@ -482,7 +440,19 @@ interface ObjectPresignPutOptions {
|
|
|
482
440
|
/** `*` 表示仅当对象不存在时写入;必须随 PUT 一同签名并发送。 */
|
|
483
441
|
ifNoneMatch?: '*';
|
|
484
442
|
}
|
|
443
|
+
/**
|
|
444
|
+
* 定长直传契约:实现必须把 Content-Length 纳入签名,让存储端拒绝
|
|
445
|
+
* 任何与声明字节数不同的请求。普通 `presignPut` 没有这个安全保证。
|
|
446
|
+
*/
|
|
447
|
+
interface ObjectPresignPutExactOptions extends ObjectPresignPutOptions {
|
|
448
|
+
contentLength: number;
|
|
449
|
+
}
|
|
485
450
|
interface ObjectStore {
|
|
451
|
+
/**
|
|
452
|
+
* 可选宿主钩子:清理 prefix 下早于 olderThan 的未落位 staging 临时文件。
|
|
453
|
+
* staging 不进入 list,且命名/mtime 属于 driver 私有实现;返回实际删除数量。
|
|
454
|
+
*/
|
|
455
|
+
cleanupStaging?(prefix: string, olderThan: string): Promise<number>;
|
|
486
456
|
/** 幂等:不存在静默。 */
|
|
487
457
|
delete(key: string): Promise<void>;
|
|
488
458
|
get(key: string): Promise<{
|
|
@@ -495,9 +465,71 @@ interface ObjectStore {
|
|
|
495
465
|
presign?(key: string, ttlSec: number): Promise<string>;
|
|
496
466
|
/** 生成限时、定路径的直传 PUT 请求;后端或凭证不支持时缺省。 */
|
|
497
467
|
presignPut?(key: string, ttlSec: number, opts: ObjectPresignPutOptions): Promise<ObjectPresignedPut>;
|
|
468
|
+
/** 仅当 backend 能在签名中强制精确 Content-Length 时提供。 */
|
|
469
|
+
presignPutExact?(key: string, ttlSec: number, opts: ObjectPresignPutExactOptions): Promise<ObjectPresignedPut>;
|
|
498
470
|
put(key: string, body: ObjectBody, opts?: ObjectPutOptions): Promise<ObjectMeta>;
|
|
499
471
|
}
|
|
500
472
|
|
|
473
|
+
/**
|
|
474
|
+
* Context Layer 类型(原样转写;方法签名异步化以兼容对象存储后端)。
|
|
475
|
+
*
|
|
476
|
+
* 全部动词可选:能力由 handler 存在性推导(见 context/capabilities.ts)。
|
|
477
|
+
* 可选能力(Search/Delete)另在 ~describe 的 capabilities 中声明,调用方先探测再用。
|
|
478
|
+
*/
|
|
479
|
+
|
|
480
|
+
interface ContextEntryMeta {
|
|
481
|
+
/** "text/markdown" | "application/json" | ... */
|
|
482
|
+
contentType: string;
|
|
483
|
+
metadata: Record<string, string>;
|
|
484
|
+
size?: number;
|
|
485
|
+
updatedAt: Timestamp;
|
|
486
|
+
/** node://<namespace-path>/<entry-path>;目录条目以尾 '/' 表示。 */
|
|
487
|
+
uri: URI;
|
|
488
|
+
/** 乐观并发:Update/Write 可携带 ifVersion;对象存储后端 = etag。 */
|
|
489
|
+
version: string;
|
|
490
|
+
}
|
|
491
|
+
interface ContextEntry extends ContextEntryMeta {
|
|
492
|
+
/** 文本或 JSON;大对象返回 { $ref: <预签名或中转 URL> }。 */
|
|
493
|
+
content: string | unknown;
|
|
494
|
+
}
|
|
495
|
+
interface ContextEntryInput {
|
|
496
|
+
content: string | unknown;
|
|
497
|
+
/** 字符串 content 必填(缺失 → invalid_argument);非字符串 content 缺省 application/json。 */
|
|
498
|
+
contentType?: string;
|
|
499
|
+
/** 不匹配 → conflict。 */
|
|
500
|
+
ifVersion?: string;
|
|
501
|
+
metadata?: Record<string, string>;
|
|
502
|
+
}
|
|
503
|
+
interface ContextPatch {
|
|
504
|
+
content?: string | unknown;
|
|
505
|
+
ifVersion?: string;
|
|
506
|
+
/** 浅合并。 */
|
|
507
|
+
metadata?: Record<string, string>;
|
|
508
|
+
}
|
|
509
|
+
interface SearchOptions extends ListOptions {
|
|
510
|
+
/** 缺省 keyword;semantic 需 capabilities 声明 "search:semantic",未声明 → invalid_argument。 */
|
|
511
|
+
mode?: 'keyword' | 'semantic';
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Context provider。**全部动词可选**:能力由 handler 存在性推导(context/capabilities.ts),
|
|
515
|
+
* `~help` 只列真实存在的操作,没有任何写动词即自动只读。
|
|
516
|
+
*
|
|
517
|
+
* 这样只读资源、纯搜索服务、append-only 存储都能如实表达自己,不必为满足接口而伪造
|
|
518
|
+
* 方法或抛 unimplemented。未实现的动词在数据面按 unknown cmd 拒绝(invalid_argument)。
|
|
519
|
+
*/
|
|
520
|
+
interface ContextProvider {
|
|
521
|
+
delete?(path: string): Promise<void>;
|
|
522
|
+
/** 读取单个条目(含内容);不存在 → not_found。 */
|
|
523
|
+
get?(path: string): Promise<ContextEntry>;
|
|
524
|
+
/** 枚举条目(浅层列表 + 分页);path 为 namespace 内相对路径前缀。 */
|
|
525
|
+
list?(path: string, opts?: ListOptions): Promise<Page<ContextEntryMeta>>;
|
|
526
|
+
search?(query: string, opts?: SearchOptions): Promise<Page<ContextEntryMeta>>;
|
|
527
|
+
/** 部分更新已存在条目的内容或 metadata;不存在 → not_found。 */
|
|
528
|
+
update?(path: string, patch: ContextPatch): Promise<ContextEntryMeta>;
|
|
529
|
+
/** 创建或整体替换条目(幂等 upsert)。 */
|
|
530
|
+
write?(path: string, entry: ContextEntryInput): Promise<ContextEntryMeta>;
|
|
531
|
+
}
|
|
532
|
+
|
|
501
533
|
/**
|
|
502
534
|
* DeviceFrame:设备 WS 帧协议的类型与编解码。
|
|
503
535
|
*
|
|
@@ -524,6 +556,16 @@ interface DeviceCallContext {
|
|
|
524
556
|
expiresAt: Timestamp;
|
|
525
557
|
/** 全链路观测,与 call id 同源。 */
|
|
526
558
|
traceId: string;
|
|
559
|
+
/**
|
|
560
|
+
* 本次 call 独享的 Store 上传能力。token 是短期 bearer,只由 SDK 消费并放入
|
|
561
|
+
* capability-only 请求 header,设备 handler 不应把它写入结果或日志。
|
|
562
|
+
*/
|
|
563
|
+
upload?: {
|
|
564
|
+
expiresAt: Timestamp;
|
|
565
|
+
maxBytes: number;
|
|
566
|
+
maxObjects: number;
|
|
567
|
+
token: string;
|
|
568
|
+
};
|
|
527
569
|
}
|
|
528
570
|
|
|
529
571
|
/**
|
|
@@ -917,6 +959,26 @@ interface TbAppDeps {
|
|
|
917
959
|
search?: SearchIndex;
|
|
918
960
|
secrets: SecretStoreImpl;
|
|
919
961
|
state: StateStore;
|
|
962
|
+
/** call capability 允许的 MIME pattern;缺省 `*\/*`。 */
|
|
963
|
+
storeCallAllowedContentTypes?: string[];
|
|
964
|
+
/** 单次 device call 的聚合上传字节预算。 */
|
|
965
|
+
storeCallMaxBytes?: number;
|
|
966
|
+
/** 单次 device call 的单对象字节预算。 */
|
|
967
|
+
storeCallMaxObjectBytes?: number;
|
|
968
|
+
/** 单次 device call 最多创建的 Store 对象数。 */
|
|
969
|
+
storeCallMaxObjects?: number;
|
|
970
|
+
/** default Store 的单对象部署级上限。 */
|
|
971
|
+
storeMaxObjectBytes?: number;
|
|
972
|
+
/** owner read `$ref` 有效期秒;缺省 refTtlSec 或 900。 */
|
|
973
|
+
storeReadTtlSec?: number;
|
|
974
|
+
/** relay transport 的有效 request-body 上限;direct 不受此值收紧。 */
|
|
975
|
+
storeRelayMaxBytes?: number;
|
|
976
|
+
/** 短期 share 的缺省有效期秒。 */
|
|
977
|
+
storeShareTtlSec?: number;
|
|
978
|
+
/** Store capability HMAC secret;缺省由 StateStore 原子生成并持久化。 */
|
|
979
|
+
storeTokenSecret?: string;
|
|
980
|
+
/** Store upload session 有效期秒。 */
|
|
981
|
+
storeUploadTtlSec?: number;
|
|
920
982
|
/** mcp/tool 工具缓存 TTL 秒(缺省 300)。 */
|
|
921
983
|
toolCacheTtlSec?: number;
|
|
922
984
|
/** create_upload 写入 grant 有效期秒;缺省 min(refTtlSec, 900)。 */
|
|
@@ -972,7 +1034,7 @@ interface ServerConfig {
|
|
|
972
1034
|
encryptionKey?: string;
|
|
973
1035
|
host: string;
|
|
974
1036
|
/**
|
|
975
|
-
* 平台对象存储(context `$ref` 大对象落点)。给出则用 S3/R2 兼容端点,
|
|
1037
|
+
* 平台对象存储(default Store + context `$ref` 大对象落点)。给出则用 S3/R2 兼容端点,
|
|
976
1038
|
* 缺省回退 dataDir 下的本地 FS。配 S3 后容器可无状态横向扩容 —— FS 落点
|
|
977
1039
|
* 在多副本间互不可见、容器重建即丢。
|
|
978
1040
|
*/
|
|
@@ -1021,6 +1083,28 @@ interface ServerConfig {
|
|
|
1021
1083
|
* 请求吃闭门羹;单机/本地开发保持 0,关停立即进行。
|
|
1022
1084
|
*/
|
|
1023
1085
|
shutdownDrainSec?: number;
|
|
1086
|
+
/** 设备调用允许上传的 MIME pattern;缺省由应用使用安全默认值。 */
|
|
1087
|
+
storeCallAllowedContentTypes?: string[];
|
|
1088
|
+
/** 设备调用所签发 Store capability 的总字节上限。 */
|
|
1089
|
+
storeCallMaxBytes?: number;
|
|
1090
|
+
/** 设备调用单个 Store 对象的字节上限。 */
|
|
1091
|
+
storeCallMaxObjectBytes?: number;
|
|
1092
|
+
/** 设备调用最多可创建的 Store 对象数。 */
|
|
1093
|
+
storeCallMaxObjects?: number;
|
|
1094
|
+
/** Store 孤儿字节、过期 session/share/call capability 的周期清理间隔。 */
|
|
1095
|
+
storeCleanupIntervalSec: number;
|
|
1096
|
+
/** Store 对象统一上限;direct upload 可使用完整值。 */
|
|
1097
|
+
storeMaxObjectBytes?: number;
|
|
1098
|
+
/** Store owner read ref 的有效期。 */
|
|
1099
|
+
storeReadTtlSec?: number;
|
|
1100
|
+
/** relay upload 的宿主有效上限;缺省等于对象统一上限。 */
|
|
1101
|
+
storeRelayMaxBytes?: number;
|
|
1102
|
+
/** Store 匿名可撤销 share 的有效期。 */
|
|
1103
|
+
storeShareTtlSec?: number;
|
|
1104
|
+
/** 显式 Store token 根密钥;缺省由应用在 StateStore 原子生成并持久化。 */
|
|
1105
|
+
storeTokenSecret?: string;
|
|
1106
|
+
/** Store upload session 的有效期。 */
|
|
1107
|
+
storeUploadTtlSec?: number;
|
|
1024
1108
|
toolCacheTtlSec?: number;
|
|
1025
1109
|
/** Dashboard 静态资源目录覆盖(缺省经 @tool-bridge/dashboard 包解析)。 */
|
|
1026
1110
|
uiDir?: string;
|
|
@@ -1247,6 +1331,7 @@ declare class PgStateStore implements StateStore {
|
|
|
1247
1331
|
get(key: string): Promise<unknown | null>;
|
|
1248
1332
|
getMany(keys: readonly string[]): Promise<Map<string, unknown>>;
|
|
1249
1333
|
put(key: string, value: unknown): Promise<void>;
|
|
1334
|
+
compareAndSwap(key: string, expectedRevision: number | null, value: unknown | null): Promise<boolean>;
|
|
1250
1335
|
putIfAbsent(key: string, value: unknown): Promise<boolean>;
|
|
1251
1336
|
delete(key: string): Promise<void>;
|
|
1252
1337
|
list(prefix: string, opts?: {
|
|
@@ -1349,6 +1434,7 @@ declare class SqliteStateStore implements StateStore {
|
|
|
1349
1434
|
get(key: string): Promise<unknown | null>;
|
|
1350
1435
|
getMany(keys: readonly string[]): Promise<Map<string, unknown>>;
|
|
1351
1436
|
put(key: string, value: unknown): Promise<void>;
|
|
1437
|
+
compareAndSwap(key: string, expectedRevision: number | null, value: unknown | null): Promise<boolean>;
|
|
1352
1438
|
putIfAbsent(key: string, value: unknown): Promise<boolean>;
|
|
1353
1439
|
delete(key: string): Promise<void>;
|
|
1354
1440
|
list(prefix: string, opts?: {
|
package/dist/index.js
CHANGED
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
configFromEnv,
|
|
13
13
|
createDataObjectStore,
|
|
14
14
|
createTbServer
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-BB6ZLMTU.js";
|
|
16
|
+
import "./chunk-YB2FLNWI.js";
|
|
17
17
|
import "./chunk-MLKGABMK.js";
|
|
18
18
|
export {
|
|
19
19
|
DEVICE_FORWARD_TIMEOUT_MS,
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VK3V2WTY.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-2O27H4Y2.js";
|
|
9
|
+
import "./chunk-GKX72JMJ.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YB2FLNWI.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/ip2proxy/schema.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VK3V2WTY.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-2O27H4Y2.js";
|
|
9
|
+
import "./chunk-GKX72JMJ.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YB2FLNWI.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/ipgeolocation_io/api.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VK3V2WTY.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-2O27H4Y2.js";
|
|
9
|
+
import "./chunk-GKX72JMJ.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YB2FLNWI.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/ipqualityscore/api.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VK3V2WTY.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-2O27H4Y2.js";
|
|
9
|
+
import "./chunk-GKX72JMJ.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YB2FLNWI.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/jina_ai/api.ts
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireCredential,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VK3V2WTY.js";
|
|
6
6
|
import {
|
|
7
7
|
assertPublicHttpUrl,
|
|
8
8
|
guardedFetch
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-2O27H4Y2.js";
|
|
10
|
+
import "./chunk-GKX72JMJ.js";
|
|
11
11
|
import {
|
|
12
12
|
TBError,
|
|
13
13
|
external_exports
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YB2FLNWI.js";
|
|
15
15
|
import "./chunk-MLKGABMK.js";
|
|
16
16
|
|
|
17
17
|
// ../plugins/src/jira/api.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VK3V2WTY.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-2O27H4Y2.js";
|
|
9
|
+
import "./chunk-GKX72JMJ.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YB2FLNWI.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/langsmith/api.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VK3V2WTY.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-2O27H4Y2.js";
|
|
9
|
+
import "./chunk-GKX72JMJ.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YB2FLNWI.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/lemlist/api.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VK3V2WTY.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-2O27H4Y2.js";
|
|
9
|
+
import "./chunk-GKX72JMJ.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YB2FLNWI.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/linear/api.ts
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VK3V2WTY.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-2O27H4Y2.js";
|
|
9
|
+
import "./chunk-GKX72JMJ.js";
|
|
10
10
|
import {
|
|
11
11
|
external_exports
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YB2FLNWI.js";
|
|
13
13
|
import "./chunk-MLKGABMK.js";
|
|
14
14
|
|
|
15
15
|
// ../plugins/src/logsnag/api.ts
|