@axiom-lattice/protocols 4.3.0 → 4.3.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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +12 -2
- package/dist/index.d.ts +12 -2
- package/package.json +1 -1
- package/src/PluginProtocol.ts +19 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/protocols@4.3.
|
|
2
|
+
> @axiom-lattice/protocols@4.3.2 build /home/runner/work/agentic/agentic/packages/protocols
|
|
3
3
|
> tsup src/index.ts --format cjs,esm --dts --sourcemap
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
[34mCLI[39m Target: es2020
|
|
9
9
|
[34mCJS[39m Build start
|
|
10
10
|
[34mESM[39m Build start
|
|
11
|
-
[32mCJS[39m [1mdist/index.js [22m[32m43.00 KB[39m
|
|
12
|
-
[32mCJS[39m [1mdist/index.js.map [22m[32m143.38 KB[39m
|
|
13
|
-
[32mCJS[39m ⚡️ Build success in 348ms
|
|
14
11
|
[32mESM[39m [1mdist/index.mjs [22m[32m38.54 KB[39m
|
|
15
12
|
[32mESM[39m [1mdist/index.mjs.map [22m[32m139.79 KB[39m
|
|
16
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 443ms
|
|
14
|
+
[32mCJS[39m [1mdist/index.js [22m[32m43.00 KB[39m
|
|
15
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m143.38 KB[39m
|
|
16
|
+
[32mCJS[39m ⚡️ Build success in 446ms
|
|
17
17
|
[34mDTS[39m Build start
|
|
18
|
-
[32mDTS[39m ⚡️ Build success in
|
|
19
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m214.
|
|
20
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m214.
|
|
18
|
+
[32mDTS[39m ⚡️ Build success in 17469ms
|
|
19
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m214.99 KB[39m
|
|
20
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m214.99 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -6106,13 +6106,23 @@ interface PluginDiscoveredResource {
|
|
|
6106
6106
|
* - discover: 资源发现 → API 推导 hasDiscover
|
|
6107
6107
|
* - resourceLabel: 资源面板标题
|
|
6108
6108
|
*/
|
|
6109
|
+
/**
|
|
6110
|
+
* 连接 test/discover 回调的请求级上下文。
|
|
6111
|
+
*
|
|
6112
|
+
* 由宿主(gateway)从鉴权上下文注入,供需要"按租户发现资源"的插件使用。
|
|
6113
|
+
* 仅含请求作用域数据,不含凭据。
|
|
6114
|
+
*/
|
|
6115
|
+
interface PluginConnectionContext {
|
|
6116
|
+
/** 经认证的请求租户。 */
|
|
6117
|
+
tenantId?: string;
|
|
6118
|
+
}
|
|
6109
6119
|
interface PluginConnection {
|
|
6110
6120
|
/** 连接表单字段 */
|
|
6111
6121
|
fields: PluginConnectionFieldSchema[];
|
|
6112
6122
|
/** 连通测试回调(存在即声明 hasTest: true) */
|
|
6113
|
-
test?: (config: Record<string, unknown
|
|
6123
|
+
test?: (config: Record<string, unknown>, context?: PluginConnectionContext) => Promise<PluginConnectionTestResult>;
|
|
6114
6124
|
/** 资源发现回调(存在即声明 hasDiscover: true) */
|
|
6115
|
-
discover?: (config: Record<string, unknown
|
|
6125
|
+
discover?: (config: Record<string, unknown>, context?: PluginConnectionContext) => Promise<PluginDiscoveredResource[]>;
|
|
6116
6126
|
/** 资源发现面板标题 */
|
|
6117
6127
|
resourceLabel?: string;
|
|
6118
6128
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -6106,13 +6106,23 @@ interface PluginDiscoveredResource {
|
|
|
6106
6106
|
* - discover: 资源发现 → API 推导 hasDiscover
|
|
6107
6107
|
* - resourceLabel: 资源面板标题
|
|
6108
6108
|
*/
|
|
6109
|
+
/**
|
|
6110
|
+
* 连接 test/discover 回调的请求级上下文。
|
|
6111
|
+
*
|
|
6112
|
+
* 由宿主(gateway)从鉴权上下文注入,供需要"按租户发现资源"的插件使用。
|
|
6113
|
+
* 仅含请求作用域数据,不含凭据。
|
|
6114
|
+
*/
|
|
6115
|
+
interface PluginConnectionContext {
|
|
6116
|
+
/** 经认证的请求租户。 */
|
|
6117
|
+
tenantId?: string;
|
|
6118
|
+
}
|
|
6109
6119
|
interface PluginConnection {
|
|
6110
6120
|
/** 连接表单字段 */
|
|
6111
6121
|
fields: PluginConnectionFieldSchema[];
|
|
6112
6122
|
/** 连通测试回调(存在即声明 hasTest: true) */
|
|
6113
|
-
test?: (config: Record<string, unknown
|
|
6123
|
+
test?: (config: Record<string, unknown>, context?: PluginConnectionContext) => Promise<PluginConnectionTestResult>;
|
|
6114
6124
|
/** 资源发现回调(存在即声明 hasDiscover: true) */
|
|
6115
|
-
discover?: (config: Record<string, unknown
|
|
6125
|
+
discover?: (config: Record<string, unknown>, context?: PluginConnectionContext) => Promise<PluginDiscoveredResource[]>;
|
|
6116
6126
|
/** 资源发现面板标题 */
|
|
6117
6127
|
resourceLabel?: string;
|
|
6118
6128
|
}
|
package/package.json
CHANGED
package/src/PluginProtocol.ts
CHANGED
|
@@ -52,13 +52,30 @@ export interface PluginDiscoveredResource {
|
|
|
52
52
|
* - discover: 资源发现 → API 推导 hasDiscover
|
|
53
53
|
* - resourceLabel: 资源面板标题
|
|
54
54
|
*/
|
|
55
|
+
/**
|
|
56
|
+
* 连接 test/discover 回调的请求级上下文。
|
|
57
|
+
*
|
|
58
|
+
* 由宿主(gateway)从鉴权上下文注入,供需要"按租户发现资源"的插件使用。
|
|
59
|
+
* 仅含请求作用域数据,不含凭据。
|
|
60
|
+
*/
|
|
61
|
+
export interface PluginConnectionContext {
|
|
62
|
+
/** 经认证的请求租户。 */
|
|
63
|
+
tenantId?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
55
66
|
export interface PluginConnection {
|
|
56
67
|
/** 连接表单字段 */
|
|
57
68
|
fields: PluginConnectionFieldSchema[];
|
|
58
69
|
/** 连通测试回调(存在即声明 hasTest: true) */
|
|
59
|
-
test?: (
|
|
70
|
+
test?: (
|
|
71
|
+
config: Record<string, unknown>,
|
|
72
|
+
context?: PluginConnectionContext,
|
|
73
|
+
) => Promise<PluginConnectionTestResult>;
|
|
60
74
|
/** 资源发现回调(存在即声明 hasDiscover: true) */
|
|
61
|
-
discover?: (
|
|
75
|
+
discover?: (
|
|
76
|
+
config: Record<string, unknown>,
|
|
77
|
+
context?: PluginConnectionContext,
|
|
78
|
+
) => Promise<PluginDiscoveredResource[]>;
|
|
62
79
|
/** 资源发现面板标题 */
|
|
63
80
|
resourceLabel?: string;
|
|
64
81
|
}
|