@finddatatechnology/yongyi-client 0.1.1 → 0.1.2
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.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/mounts.d.ts +30 -0
- package/dist/mounts.js +45 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -12,9 +12,11 @@
|
|
|
12
12
|
// tokens person/deployment 令牌铸造 + 磁盘缓存 0600(自 cell-memory.js 移植)
|
|
13
13
|
// observe /observe 上报客户端(幂等键、失败即丢)
|
|
14
14
|
// http 出站 fetch 死线包装(fetchImpl 测试缝、FetchTimeoutError)
|
|
15
|
+
// mounts 挂载行与命名空间坐标(dsh/acp 两形状,自 agent-runner/memory-mount.js 移植)
|
|
15
16
|
export * from "./http.js";
|
|
16
17
|
export * from "./discipline.js";
|
|
17
18
|
export * from "./tokens.js";
|
|
18
19
|
export * from "./ladder.js";
|
|
19
20
|
export * from "./facts.js";
|
|
20
21
|
export * from "./observe.js";
|
|
22
|
+
export * from "./mounts.js";
|
package/dist/mounts.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare function memoryNamespaceFor(entry: {
|
|
2
|
+
metadata?: {
|
|
3
|
+
packId?: string | null;
|
|
4
|
+
agentId?: string | null;
|
|
5
|
+
};
|
|
6
|
+
name?: string | null;
|
|
7
|
+
} | null | undefined): string | null;
|
|
8
|
+
export declare function podMemoryNamespace(packId: string | null | undefined): string | null;
|
|
9
|
+
export declare function dshMemoryMount(url: string, token: string | null | undefined): {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
config: {
|
|
13
|
+
headers?: {
|
|
14
|
+
Authorization: string;
|
|
15
|
+
} | undefined;
|
|
16
|
+
serverName: string;
|
|
17
|
+
failOnStartupError: boolean;
|
|
18
|
+
transport: string;
|
|
19
|
+
url: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare function acpMemoryMount(url: string, token: string | null | undefined): {
|
|
23
|
+
type: string;
|
|
24
|
+
name: string;
|
|
25
|
+
url: string;
|
|
26
|
+
headers: {
|
|
27
|
+
name: string;
|
|
28
|
+
value: string;
|
|
29
|
+
}[];
|
|
30
|
+
};
|
package/dist/mounts.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// ── mounts.ts · 挂载行与命名空间坐标(add-yongyi-complete-solution 后续补件)──
|
|
2
|
+
//
|
|
3
|
+
// 从壹座 agent-runner/memory-mount.js 逐字节移植(adopt-yongyi-client-sdk
|
|
4
|
+
// 任务 0.1,paas 侧缺口审计裁定:命名空间坐标规则与 ACP/dsh 两种挂载行形状
|
|
5
|
+
// 属通用件,随 SDK 下发)。纯 builder——不碰网络、不碰 manager,可独立测试。
|
|
6
|
+
//
|
|
7
|
+
// 两个挂载行形状:
|
|
8
|
+
// dsh dsh-mcp-client loader 行(headers 为对象)——与 tokens.ts 的
|
|
9
|
+
// memoryMcpEntry 同源,此处以别名导出保持 runner 侧函数名不漂
|
|
10
|
+
// acp ACP SDK wire 行(headers 为 ARRAY of {name,value}——见 acpMcpServers)
|
|
11
|
+
// 成员条目的记忆坐标(add-memory-scopes-and-cluster-sharing 语义):
|
|
12
|
+
// metadata.agentId 是坐标本体——显示名不是(改名不得改变命名空间);名字
|
|
13
|
+
// 只作为 agentId 尚未入册的旧 descriptor 的回退。
|
|
14
|
+
export function memoryNamespaceFor(entry) {
|
|
15
|
+
const packId = entry?.metadata?.packId;
|
|
16
|
+
const agentId = entry?.metadata?.agentId ?? entry?.name;
|
|
17
|
+
if (!packId || !agentId)
|
|
18
|
+
return null;
|
|
19
|
+
return `d/${packId}/${agentId}`;
|
|
20
|
+
}
|
|
21
|
+
// pod 令牌挂的 pack 共享命名空间(2 段——fd-memory 按此形状铸 pod 族)。
|
|
22
|
+
export function podMemoryNamespace(packId) {
|
|
23
|
+
return packId ? `d/${packId}` : null;
|
|
24
|
+
}
|
|
25
|
+
export function dshMemoryMount(url, token) {
|
|
26
|
+
return {
|
|
27
|
+
id: "mcp-fd-memory",
|
|
28
|
+
name: "@deepseek-ai/dsh-mcp-client",
|
|
29
|
+
config: {
|
|
30
|
+
serverName: "fd-memory",
|
|
31
|
+
failOnStartupError: false,
|
|
32
|
+
transport: "streamable-http",
|
|
33
|
+
url,
|
|
34
|
+
...(token ? { headers: { Authorization: `Bearer ${token}` } } : {}),
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function acpMemoryMount(url, token) {
|
|
39
|
+
return {
|
|
40
|
+
type: "http",
|
|
41
|
+
name: "fd-memory",
|
|
42
|
+
url,
|
|
43
|
+
headers: token ? [{ name: "Authorization", value: `Bearer ${token}` }] : [],
|
|
44
|
+
};
|
|
45
|
+
}
|
package/package.json
CHANGED