@axiom-lattice/protocols 4.3.0 → 4.3.1

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/protocols@4.3.0 build /home/runner/work/agentic/agentic/packages/protocols
2
+ > @axiom-lattice/protocols@4.3.1 build /home/runner/work/agentic/agentic/packages/protocols
3
3
  > tsup src/index.ts --format cjs,esm --dts --sourcemap
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,11 +10,11 @@
10
10
  ESM Build start
11
11
  CJS dist/index.js 43.00 KB
12
12
  CJS dist/index.js.map 143.38 KB
13
- CJS ⚡️ Build success in 348ms
13
+ CJS ⚡️ Build success in 328ms
14
14
  ESM dist/index.mjs 38.54 KB
15
15
  ESM dist/index.mjs.map 139.79 KB
16
- ESM ⚡️ Build success in 361ms
16
+ ESM ⚡️ Build success in 330ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 12740ms
19
- DTS dist/index.d.ts 214.74 KB
20
- DTS dist/index.d.mts 214.74 KB
18
+ DTS ⚡️ Build success in 15080ms
19
+ DTS dist/index.d.ts 214.99 KB
20
+ DTS dist/index.d.mts 214.99 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @axiom-lattice/protocols
2
2
 
3
+ ## 4.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - f3f4883: enhance mcp
8
+
3
9
  ## 4.3.0
4
10
 
5
11
  ### Minor Changes
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>) => Promise<PluginConnectionTestResult>;
6123
+ test?: (config: Record<string, unknown>, context?: PluginConnectionContext) => Promise<PluginConnectionTestResult>;
6114
6124
  /** 资源发现回调(存在即声明 hasDiscover: true) */
6115
- discover?: (config: Record<string, unknown>) => Promise<PluginDiscoveredResource[]>;
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>) => Promise<PluginConnectionTestResult>;
6123
+ test?: (config: Record<string, unknown>, context?: PluginConnectionContext) => Promise<PluginConnectionTestResult>;
6114
6124
  /** 资源发现回调(存在即声明 hasDiscover: true) */
6115
- discover?: (config: Record<string, unknown>) => Promise<PluginDiscoveredResource[]>;
6125
+ discover?: (config: Record<string, unknown>, context?: PluginConnectionContext) => Promise<PluginDiscoveredResource[]>;
6116
6126
  /** 资源发现面板标题 */
6117
6127
  resourceLabel?: string;
6118
6128
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiom-lattice/protocols",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "description": "Unified protocol type definitions for Axiom Lattice framework",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -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?: (config: Record<string, unknown>) => Promise<PluginConnectionTestResult>;
70
+ test?: (
71
+ config: Record<string, unknown>,
72
+ context?: PluginConnectionContext,
73
+ ) => Promise<PluginConnectionTestResult>;
60
74
  /** 资源发现回调(存在即声明 hasDiscover: true) */
61
- discover?: (config: Record<string, unknown>) => Promise<PluginDiscoveredResource[]>;
75
+ discover?: (
76
+ config: Record<string, unknown>,
77
+ context?: PluginConnectionContext,
78
+ ) => Promise<PluginDiscoveredResource[]>;
62
79
  /** 资源发现面板标题 */
63
80
  resourceLabel?: string;
64
81
  }