@zhin.js/adapter-lark 5.0.1 → 5.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @zhin.js/adapter-lark
2
2
 
3
+ ## 5.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [f346346]
8
+ - @zhin.js/agent@1.0.8
9
+ - @zhin.js/core@1.4.2
10
+ - zhin.js@5.0.2
11
+
12
+ ## 5.0.2
13
+
14
+ ### Patch Changes
15
+
16
+ - d5cd4aa: Publish Plugin Runtime entry points and convention modules as JavaScript so
17
+ installed npm plugins load on Node without TypeScript stripping. Workspace
18
+ development continues to prefer TypeScript sources for local HMR.
19
+
20
+ Remove the unconsumed legacy game hub APIs from game-kit; game navigation and
21
+ records now use ordinary convention commands owned by the game hub plugin.
22
+
23
+ - Updated dependencies [d5cd4aa]
24
+ - @zhin.js/command@1.0.4
25
+ - zhin.js@5.0.2
26
+ - @zhin.js/adapter@1.1.2
27
+ - @zhin.js/core@1.4.2
28
+ - @zhin.js/agent@1.0.7
29
+
3
30
  ## 5.0.1
4
31
 
5
32
  ### Patch Changes
@@ -0,0 +1,34 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ /**
3
+ * Convention entry: discover `adapters/lark.ts` → defineAdapter.
4
+ */
5
+ import { defineAdapter } from '@zhin.js/adapter';
6
+ import { messageGatewayToken } from '@zhin.js/core/runtime';
7
+ import { httpHostToken } from '@zhin.js/host-http';
8
+ import { LarkEndpoint } from "../lib/endpoint.js";
9
+ import { resolveLarkConfig, } from "../lib/protocol.js";
10
+ import { larkRuntimeStateToken } from "../lib/lark-runtime-state.js";
11
+ export { LarkEndpoint } from "../lib/endpoint.js";
12
+ export default defineAdapter({
13
+ capabilities: ['inbound', 'outbound'],
14
+ // image 段经 /im/v1/images 物化为 image_key(url 下载后上传);
15
+ // 卡片交互未接入出站通道,交互段降级纯文本。
16
+ segments: {
17
+ outboundMedia: ['url', 'upload'],
18
+ interactive: 'text',
19
+ },
20
+ create(context) {
21
+ const config = resolveLarkConfig(context.config);
22
+ // 注册到插件运行时状态(lark endpoint list 的"运行中"数据源)
23
+ context.use(larkRuntimeStateToken).endpoints.set(config.name, {
24
+ name: config.name,
25
+ mode: 'webhook',
26
+ });
27
+ return new LarkEndpoint({
28
+ id: context.id,
29
+ gateway: context.use(messageGatewayToken),
30
+ http: context.use(httpHostToken),
31
+ config,
32
+ });
33
+ },
34
+ });
@@ -0,0 +1,3 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { larkEndpointCommands } from "../../../lib/lark-endpoint-commands.js";
3
+ export default larkEndpointCommands.add;
@@ -0,0 +1,3 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { larkEndpointCommands } from "../../lib/lark-endpoint-commands.js";
3
+ export default larkEndpointCommands.list;
@@ -0,0 +1,3 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { larkEndpointCommands } from "../../../lib/lark-endpoint-commands.js";
3
+ export default larkEndpointCommands.remove;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-lark",
3
- "version": "5.0.1",
3
+ "version": "5.0.3",
4
4
  "description": "Zhin.js Lark/Feishu (飞书) adapter for Plugin Runtime (HTTP webhook)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -34,21 +34,21 @@
34
34
  "directory": "plugins/adapters/lark"
35
35
  },
36
36
  "dependencies": {
37
- "@zhin.js/adapter": "1.1.1",
38
- "@zhin.js/command": "1.0.3",
39
- "@zhin.js/core": "1.4.1",
37
+ "@zhin.js/adapter": "1.1.2",
38
+ "@zhin.js/command": "1.0.4",
39
+ "@zhin.js/core": "1.4.2",
40
40
  "@zhin.js/host-http": "1.0.3",
41
41
  "@zhin.js/logger": "1.0.75",
42
42
  "@zhin.js/plugin-runtime": "1.1.1"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "zod": "^4.0.0",
46
- "@zhin.js/adapter": "1.1.1",
47
- "@zhin.js/agent": "1.0.6",
48
- "@zhin.js/core": "1.4.1",
46
+ "@zhin.js/adapter": "1.1.2",
47
+ "@zhin.js/agent": "1.0.8",
48
+ "@zhin.js/core": "1.4.2",
49
49
  "@zhin.js/host-http": "1.0.3",
50
50
  "@zhin.js/plugin-runtime": "1.1.1",
51
- "zhin.js": "5.0.1"
51
+ "zhin.js": "5.0.2"
52
52
  },
53
53
  "peerDependenciesMeta": {
54
54
  "zhin.js": {
@@ -66,13 +66,13 @@
66
66
  "typescript": "^6.0.3",
67
67
  "vitest": "^4.1.10",
68
68
  "zod": "^4.4.3",
69
- "@zhin.js/agent": "1.0.6",
70
- "zhin.js": "5.0.1"
69
+ "@zhin.js/agent": "1.0.8",
70
+ "zhin.js": "5.0.2"
71
71
  },
72
72
  "files": [
73
73
  "adapters",
74
74
  "commands",
75
- "plugin.ts",
75
+ "plugin.js",
76
76
  "schema.json",
77
77
  "src",
78
78
  "lib",
@@ -90,7 +90,7 @@
90
90
  "zhin": {
91
91
  "protocol": 1,
92
92
  "type": "plugin",
93
- "entry": "./plugin.ts",
93
+ "entry": "./plugin.js",
94
94
  "engine": "^1.0.0",
95
95
  "runtime": "trusted",
96
96
  "features": [
package/plugin.js ADDED
@@ -0,0 +1,16 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { createEndpointRuntimeState } from '@zhin.js/adapter';
3
+ import { definePlugin } from '@zhin.js/plugin-runtime';
4
+ import { registerLarkPlatformPermitChecker } from "./lib/platform-permit.js";
5
+ import { larkRuntimeStateToken } from "./lib/lark-runtime-state.js";
6
+ export default definePlugin({
7
+ name: 'lark',
8
+ metadata: {
9
+ displayName: 'Lark/Feishu (飞书) Adapter',
10
+ },
11
+ setup(context) {
12
+ // 运行中 endpoint 注册表(lark endpoint list 的"运行中"数据源)
13
+ context.resources.provide(larkRuntimeStateToken, createEndpointRuntimeState());
14
+ return registerLarkPlatformPermitChecker();
15
+ },
16
+ });
package/plugin.ts DELETED
@@ -1,16 +0,0 @@
1
- import { createEndpointRuntimeState } from '@zhin.js/adapter';
2
- import { definePlugin } from '@zhin.js/plugin-runtime';
3
- import { registerLarkPlatformPermitChecker } from './src/platform-permit.js';
4
- import { larkRuntimeStateToken } from './src/lark-runtime-state.js';
5
-
6
- export default definePlugin({
7
- name: 'lark',
8
- metadata: {
9
- displayName: 'Lark/Feishu (飞书) Adapter',
10
- },
11
- setup(context) {
12
- // 运行中 endpoint 注册表(lark endpoint list 的"运行中"数据源)
13
- context.resources.provide(larkRuntimeStateToken, createEndpointRuntimeState());
14
- return registerLarkPlatformPermitChecker();
15
- },
16
- });