@agent-proxy/agy 0.11.1 → 0.11.3
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/catalog.d.ts +1 -4
- package/dist/catalog.js +4 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +2 -2
package/dist/catalog.d.ts
CHANGED
|
@@ -64,10 +64,7 @@ export interface AgyCatalogStoreOptions {
|
|
|
64
64
|
/** manual 仅允许显式刷新;目录查询不按 TTL 拉取。 */
|
|
65
65
|
catalogMode?: "dynamic" | "manual";
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
* 目录存储:内存 + 磁盘双指纹缓存、TTL、单飞刷新、失败回退 last-good。
|
|
69
|
-
* 账号切换(identity 变化)后旧 key 条目不复用。
|
|
70
|
-
*/
|
|
67
|
+
export declare const AGY_RUNTIME_ARTIFACTS: readonly string[];
|
|
71
68
|
export declare function createAgyCatalogStore(options: AgyCatalogStoreOptions): {
|
|
72
69
|
/** 返回目录条目、档位家族与旧 id 重定向表;无凭据或完全无缓存时抛错。 */
|
|
73
70
|
catalog(): Promise<{
|
package/dist/catalog.js
CHANGED
|
@@ -277,12 +277,15 @@ export function mergeAgyCatalog(base, agy) {
|
|
|
277
277
|
* 目录存储:内存 + 磁盘双指纹缓存、TTL、单飞刷新、失败回退 last-good。
|
|
278
278
|
* 账号切换(identity 变化)后旧 key 条目不复用。
|
|
279
279
|
*/
|
|
280
|
+
/** agy 落在缓存目录的产物清单(目录缓存,与落盘点同源);卸载清理与受管值守卫经组合层聚合消费。 */
|
|
281
|
+
const AGY_CATALOG_FILE_NAME = "agy-catalog.json";
|
|
282
|
+
export const AGY_RUNTIME_ARTIFACTS = Object.freeze([AGY_CATALOG_FILE_NAME]);
|
|
280
283
|
export function createAgyCatalogStore(options) {
|
|
281
284
|
const now = options.now ?? Date.now;
|
|
282
285
|
const ttlMs = Math.max(60_000, options.ttlMs ?? CATALOG_TTL_MS);
|
|
283
286
|
const endpoint = options.endpoint ?? AGY_ENDPOINT;
|
|
284
287
|
const endpointDigest = createHash("sha256").update(endpoint).digest("hex").slice(0, 16);
|
|
285
|
-
const cacheFile = path.join(options.cacheDirectory,
|
|
288
|
+
const cacheFile = path.join(options.cacheDirectory, AGY_CATALOG_FILE_NAME);
|
|
286
289
|
let cached;
|
|
287
290
|
let retryAt = 0;
|
|
288
291
|
let refreshing;
|
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export interface SafeAgyError {
|
|
|
41
41
|
/** 只输出预定义分类;私有错误正文(可能回显请求或凭据)不进客户端与日志。 */
|
|
42
42
|
export declare function safeAgyUpstreamError(status: number, body: string): SafeAgyError;
|
|
43
43
|
export { isAgyModel, mergeAgyCatalog };
|
|
44
|
+
export { AGY_RUNTIME_ARTIFACTS } from "./catalog.ts";
|
|
44
45
|
export declare function createAgyAdapter<Config extends AgentConfig>(config: Config, dependencies?: AgyDependencies): {
|
|
45
46
|
catalog(): Promise<ModelCatalog>;
|
|
46
47
|
/** 显式刷新不吞错;无 last-good 时由命令报告失败。 */
|
package/dist/index.js
CHANGED
|
@@ -358,6 +358,7 @@ function buildAgyAdapter(config, dependencies = {}) {
|
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
360
|
export { isAgyModel, mergeAgyCatalog };
|
|
361
|
+
export { AGY_RUNTIME_ARTIFACTS } from "./catalog.js";
|
|
361
362
|
export function createAgyAdapter(config, dependencies = {}) {
|
|
362
363
|
return bindHostMethods(buildAgyAdapter(config, dependencies));
|
|
363
364
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-proxy/agy",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"description": "Agent Proxy agy 插件;保留基线转换行为。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@agent-proxy/plugin-api": "0.11.1"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "37235103f935530274005fa391dba83abe522888"
|
|
43
43
|
}
|