@1agents/dreammate-network 0.3.2 → 0.4.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.
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* 协议版本,与本包的 package.json 版本保持一致——两个版本号会让人永远猜不准
|
|
13
13
|
* 该看哪个。服务在 `manifest.metadata.protocol_version` 里报告它遵循的版本。
|
|
14
14
|
*/
|
|
15
|
-
export declare const PROTOCOL_VERSION = "0.
|
|
15
|
+
export declare const PROTOCOL_VERSION = "0.4.0";
|
|
16
16
|
/** `session://<node>/<runtime>/<session_id>` */
|
|
17
17
|
export type SessionURI = `session://${string}/${string}/${string}`;
|
|
18
18
|
/** 资源寻址,如 `recording://tingqi-01/abc`、`speaker://tingqi-001/speaker-23` */
|
|
@@ -98,13 +98,52 @@ export type ServiceKind = "generic" | "agent_runtime" | "session_registry" | "re
|
|
|
98
98
|
*/
|
|
99
99
|
/** 这个 Service 能被谁连上。省略时按 `network` 理解。 */
|
|
100
100
|
export type Reachability = "localhost" | "network";
|
|
101
|
+
/**
|
|
102
|
+
* 方法契约描述:定义供大模型与 RPC 调用的方法接口。
|
|
103
|
+
*/
|
|
104
|
+
export interface MethodDescriptor {
|
|
105
|
+
/** 方法的业务功能描述,供智能体理解意图。 */
|
|
106
|
+
description: string;
|
|
107
|
+
/**
|
|
108
|
+
* 入参 JSON Schema(必须为 object 结构)。
|
|
109
|
+
* 包含 properties、required 等标准 JSON Schema 字段。
|
|
110
|
+
*/
|
|
111
|
+
parameters?: {
|
|
112
|
+
type?: 'object';
|
|
113
|
+
properties?: Record<string, unknown>;
|
|
114
|
+
required?: string[];
|
|
115
|
+
[key: string]: unknown;
|
|
116
|
+
} | Record<string, unknown>;
|
|
117
|
+
/** 返回值结构说明。 */
|
|
118
|
+
returns?: Record<string, unknown>;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* 技能 SOP 指南描述:提供大模型在复杂任务下的多步编排与避坑指南。
|
|
122
|
+
*/
|
|
123
|
+
export interface SkillDescriptor {
|
|
124
|
+
/** 技能唯一标识名。 */
|
|
125
|
+
name: string;
|
|
126
|
+
/** 技能触发场景描述。 */
|
|
127
|
+
description: string;
|
|
128
|
+
/** Markdown 格式的完整 SOP 操作指南。 */
|
|
129
|
+
sop: string;
|
|
130
|
+
/** 是否具备可跨节点打包下载的本地技能包。 */
|
|
131
|
+
has_package?: boolean;
|
|
132
|
+
metadata?: Record<string, unknown>;
|
|
133
|
+
}
|
|
101
134
|
export interface Service {
|
|
102
135
|
id: string;
|
|
103
136
|
name?: string | null;
|
|
104
137
|
/** 省略等同于 `"generic"` */
|
|
105
138
|
kind?: ServiceKind;
|
|
106
|
-
/**
|
|
139
|
+
/**
|
|
140
|
+
* @deprecated 历史遗留字段,新服务请直接使用 `methods` 与 `skills`。
|
|
141
|
+
*/
|
|
107
142
|
capabilities?: Capability[];
|
|
143
|
+
/** 可供调用的机器方法契约集合。 */
|
|
144
|
+
methods?: Record<string, MethodDescriptor>;
|
|
145
|
+
/** 配套的领域业务 SOP 与技能指南。 */
|
|
146
|
+
skills?: Record<string, SkillDescriptor>;
|
|
108
147
|
resources?: ResourceDescriptor[];
|
|
109
148
|
access?: AccessDescriptor[];
|
|
110
149
|
/**
|
package/dist/typescript/types.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* 协议版本,与本包的 package.json 版本保持一致——两个版本号会让人永远猜不准
|
|
13
13
|
* 该看哪个。服务在 `manifest.metadata.protocol_version` 里报告它遵循的版本。
|
|
14
14
|
*/
|
|
15
|
-
export const PROTOCOL_VERSION = "0.
|
|
15
|
+
export const PROTOCOL_VERSION = "0.4.0";
|
|
16
16
|
/* ------------------------------------------------------------------ *
|
|
17
17
|
* 发现
|
|
18
18
|
* ------------------------------------------------------------------ */
|
package/package.json
CHANGED
|
@@ -40,24 +40,68 @@
|
|
|
40
40
|
},
|
|
41
41
|
"capabilities": {
|
|
42
42
|
"type": "array",
|
|
43
|
-
"description": "
|
|
43
|
+
"description": "@deprecated 历史遗留字段,新服务请优先使用 methods 与 skills。可以为空数组(纯 Resource Provider)。",
|
|
44
44
|
"items": {
|
|
45
45
|
"type": "string",
|
|
46
46
|
"minLength": 1
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"methods": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"description": "该 Service 提供的可调用 RPC 方法集合,明确参数与返回值契约。",
|
|
52
|
+
"additionalProperties": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"required": [
|
|
55
|
+
"description"
|
|
52
56
|
],
|
|
53
|
-
|
|
54
|
-
"
|
|
57
|
+
"properties": {
|
|
58
|
+
"description": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "该方法的业务功能描述。"
|
|
61
|
+
},
|
|
62
|
+
"parameters": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"description": "入参 JSON Schema 定义(必须是 object 结构)。"
|
|
65
|
+
},
|
|
66
|
+
"returns": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"description": "返回值结构说明。"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"skills": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"description": "该 Service 配套的领域业务 SOP 与操作指南(Markdown 格式)。",
|
|
76
|
+
"additionalProperties": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"required": [
|
|
79
|
+
"name",
|
|
80
|
+
"description",
|
|
81
|
+
"sop"
|
|
55
82
|
],
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
83
|
+
"properties": {
|
|
84
|
+
"name": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"description": "技能唯一标识名。"
|
|
87
|
+
},
|
|
88
|
+
"description": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"description": "技能触发场景说明。"
|
|
91
|
+
},
|
|
92
|
+
"sop": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"description": "包含步骤指导的完整 Markdown SOP 正文。"
|
|
95
|
+
},
|
|
96
|
+
"has_package": {
|
|
97
|
+
"type": "boolean",
|
|
98
|
+
"description": "是否具备可供跨节点打包下载的完整本地技能包。"
|
|
99
|
+
},
|
|
100
|
+
"metadata": {
|
|
101
|
+
"type": "object"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
61
105
|
},
|
|
62
106
|
"resources": {
|
|
63
107
|
"type": "array",
|