@zhin.js/adapter-wecom 4.0.10 → 4.0.12

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,25 @@
1
1
  # @zhin.js/adapter-wecom
2
2
 
3
+ ## 4.0.12
4
+
5
+ ### Patch Changes
6
+
7
+ - 3556601: Declare Stable Feature packages referenced by `zhin.features` as optional `peerDependencies` on official plugins/adapters (`@zhin.js/runtime` ≥1.0.12 requires features to be declared in deps/peers). Keeps authoring via `zhin.js` facades without installing Feature implementation packages into `dependencies`, and removes the need for consumer postinstall peer-patch scripts. `zhin new` scaffolds the same peer shape.
8
+ - @zhin.js/agent@1.1.12
9
+ - @zhin.js/core@1.5.10
10
+ - zhin.js@6.0.10
11
+
12
+ ## 4.0.11
13
+
14
+ ### Patch Changes
15
+
16
+ - eb84b77: fix: 更新文档,建立正确的依赖关系
17
+ - Updated dependencies [d3920e9]
18
+ - @zhin.js/core@1.5.10
19
+ - zhin.js@6.0.10
20
+ - @zhin.js/adapter@1.1.10
21
+ - @zhin.js/agent@1.1.11
22
+
3
23
  ## 4.0.10
4
24
 
5
25
  ### Patch Changes
package/README.md CHANGED
@@ -20,7 +20,7 @@ pnpm add @zhin.js/adapter-wecom
20
20
  - `@zhin.js/adapter` — 约定式 `adapters/wecom.ts`(`defineAdapter`)
21
21
  - `@zhin.js/core` — `messageGatewayToken` 入站/出站
22
22
  - `@zhin.js/host-http` — `httpHostToken` 注册 Webhook 路由(**非** legacy host-router/Koa)
23
- - `@zhin.js/plugin-runtime` — `plugin.ts`(`definePlugin`)
23
+ - `zhin.js` — `plugin.ts`(`definePlugin`)
24
24
  - 配置经插件 `schema.json` 落到 `plugins.<instanceKey>`
25
25
 
26
26
  入站:`gateway.receive({ conversation, message: { conversation, id: MsgId }, content: text, sender, metadata })`(`conversation` 为 `ConversationRef`,`@chatroom` → kind `group`,其余 → kind `private`)
package/adapters/wecom.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Convention entry: discover `adapters/wecom.ts` → defineAdapter.
4
4
  * Implementation lives under `src/` (endpoint / webhook / protocol).
5
5
  */
6
- import { defineAdapter } from '@zhin.js/adapter';
6
+ import { defineAdapter } from 'zhin.js/adapter';
7
7
  import { messageGatewayToken } from '@zhin.js/core/runtime';
8
8
  import { httpHostToken } from '@zhin.js/host-http';
9
9
  import { WecomEndpoint } from "../lib/endpoint.js";
package/adapters/wecom.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Convention entry: discover `adapters/wecom.ts` → defineAdapter.
3
3
  * Implementation lives under `src/` (endpoint / webhook / protocol).
4
4
  */
5
- import { defineAdapter } from '@zhin.js/adapter';
5
+ import { defineAdapter } from 'zhin.js/adapter';
6
6
  import { messageGatewayToken } from '@zhin.js/core/runtime';
7
7
  import { httpHostToken } from '@zhin.js/host-http';
8
8
  import { WecomEndpoint } from '../src/endpoint.js';
package/lib/endpoint.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * WecomEndpoint — lifecycle, outbound send, inbound admit, OpenAPI helpers for agent tools.
3
3
  */
4
- import type { EndpointInstance, EndpointSendRequest } from '@zhin.js/adapter';
4
+ import type { EndpointInstance, EndpointSendRequest } from 'zhin.js/adapter';
5
5
  import type { MessageGateway } from '@zhin.js/core/runtime';
6
6
  import type { HttpHost } from '@zhin.js/host-http';
7
- import type { CapabilityId } from '@zhin.js/plugin-runtime';
7
+ import type { CapabilityId } from 'zhin.js';
8
8
  import { type ResolvedWecomConfig, type WecomApiResponse, type WecomMessage } from './protocol.js';
9
9
  export type WecomFetch = (url: string, init?: {
10
10
  readonly method?: string;
@@ -2,8 +2,8 @@
2
2
  * `wecom.endpoint` 命令族:由 @zhin.js/adapter 的 createEndpointCommands 套件生成。
3
3
  * commands/endpoint/ 下的 list / add / remove 直接默认导出这三项。
4
4
  */
5
- import { createEndpointCommands } from '@zhin.js/adapter';
6
- import { defineCommand } from '@zhin.js/command';
5
+ import { createEndpointCommands } from 'zhin.js/adapter';
6
+ import { defineCommand } from 'zhin.js/command';
7
7
  import { wecomRuntimeStateToken } from './wecom-runtime-state.js';
8
8
  export const wecomEndpointCommands = createEndpointCommands({
9
9
  adapterKey: 'wecom',
@@ -1 +1 @@
1
- export declare const wecomRuntimeStateToken: import("@zhin.js/plugin-runtime").Token<import("@zhin.js/adapter").EndpointRuntimeState>;
1
+ export declare const wecomRuntimeStateToken: import("zhin.js").Token<import("@zhin.js/adapter").EndpointRuntimeState>;
@@ -2,5 +2,5 @@
2
2
  * WeCom 插件实例的运行时状态:adapter create() 注册的 endpoint 列表。
3
3
  * 由 plugin.ts setup() provide,adapter create 与 `wecom.endpoint` 命令共享(同一 owner generation)。
4
4
  */
5
- import { defineEndpointRuntimeStateToken } from '@zhin.js/adapter';
5
+ import { defineEndpointRuntimeStateToken } from 'zhin.js/adapter';
6
6
  export const wecomRuntimeStateToken = defineEndpointRuntimeStateToken('wecom');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-wecom",
3
- "version": "4.0.10",
3
+ "version": "4.0.12",
4
4
  "description": "Zhin.js WeCom (企业微信) adapter for Plugin Runtime (HTTP webhook)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -34,29 +34,30 @@
34
34
  "directory": "plugins/adapters/wecom"
35
35
  },
36
36
  "dependencies": {
37
- "@zhin.js/adapter": "1.1.9",
38
- "@zhin.js/command": "1.0.13",
39
- "@zhin.js/core": "1.5.9",
37
+ "@zhin.js/adapter": "1.1.10",
38
+ "@zhin.js/core": "1.5.10",
40
39
  "@zhin.js/host-http": "1.0.10",
41
40
  "@zhin.js/im-contract": "1.0.3",
42
- "@zhin.js/logger": "1.0.76",
43
- "@zhin.js/plugin-runtime": "1.1.6"
41
+ "@zhin.js/logger": "1.0.76"
44
42
  },
45
43
  "peerDependencies": {
46
44
  "zod": "^4.0.0",
47
- "@zhin.js/adapter": "1.1.9",
48
- "@zhin.js/agent": "1.1.10",
49
- "@zhin.js/core": "1.5.9",
45
+ "@zhin.js/adapter": "1.1.10",
46
+ "@zhin.js/agent": "1.1.12",
47
+ "@zhin.js/command": "1.0.14",
48
+ "@zhin.js/core": "1.5.10",
50
49
  "@zhin.js/host-http": "1.0.10",
51
50
  "@zhin.js/permission": "1.0.2",
52
- "@zhin.js/plugin-runtime": "1.1.6",
53
- "zhin.js": "6.0.9"
51
+ "zhin.js": "6.0.10"
54
52
  },
55
53
  "peerDependenciesMeta": {
56
- "zhin.js": {
54
+ "@zhin.js/agent": {
57
55
  "optional": true
58
56
  },
59
- "@zhin.js/agent": {
57
+ "@zhin.js/command": {
58
+ "optional": true
59
+ },
60
+ "zhin.js": {
60
61
  "optional": true
61
62
  },
62
63
  "zod": {
@@ -68,8 +69,8 @@
68
69
  "typescript": "^6.0.3",
69
70
  "vitest": "^4.1.10",
70
71
  "zod": "^4.4.3",
71
- "@zhin.js/agent": "1.1.10",
72
- "zhin.js": "6.0.9"
72
+ "@zhin.js/agent": "1.1.12",
73
+ "zhin.js": "6.0.10"
73
74
  },
74
75
  "files": [
75
76
  "adapters",
package/plugin.js CHANGED
@@ -1,6 +1,6 @@
1
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';
2
+ import { createEndpointRuntimeState } from 'zhin.js/adapter';
3
+ import { definePlugin } from 'zhin.js';
4
4
  import { permissionHostToken } from '@zhin.js/permission';
5
5
  import { checkWecomPlatformPermit } from "./lib/platform-permit.js";
6
6
  import { wecomRuntimeStateToken } from "./lib/wecom-runtime-state.js";
package/src/endpoint.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * WecomEndpoint — lifecycle, outbound send, inbound admit, OpenAPI helpers for agent tools.
3
3
  */
4
- import type { EndpointInstance, EndpointSendRequest } from '@zhin.js/adapter';
4
+ import type { EndpointInstance, EndpointSendRequest } from 'zhin.js/adapter';
5
5
  import type { MessageGateway } from '@zhin.js/core/runtime';
6
6
  import type { HttpHost, HttpRouteRegistration } from '@zhin.js/host-http';
7
7
  import { formatCompact, getAdapterLogger } from '@zhin.js/logger';
8
- import type { CapabilityId } from '@zhin.js/plugin-runtime';
8
+ import type { CapabilityId } from 'zhin.js';
9
9
  import { registerWecomAgentEndpoint } from './wecom-agent-deps.js';
10
10
  import {
11
11
  buildMediaUploadForm,
@@ -2,8 +2,8 @@
2
2
  * `wecom.endpoint` 命令族:由 @zhin.js/adapter 的 createEndpointCommands 套件生成。
3
3
  * commands/endpoint/ 下的 list / add / remove 直接默认导出这三项。
4
4
  */
5
- import { createEndpointCommands } from '@zhin.js/adapter';
6
- import { defineCommand } from '@zhin.js/command';
5
+ import { createEndpointCommands } from 'zhin.js/adapter';
6
+ import { defineCommand } from 'zhin.js/command';
7
7
  import { wecomRuntimeStateToken } from './wecom-runtime-state.js';
8
8
 
9
9
  export const wecomEndpointCommands = createEndpointCommands({
@@ -2,6 +2,6 @@
2
2
  * WeCom 插件实例的运行时状态:adapter create() 注册的 endpoint 列表。
3
3
  * 由 plugin.ts setup() provide,adapter create 与 `wecom.endpoint` 命令共享(同一 owner generation)。
4
4
  */
5
- import { defineEndpointRuntimeStateToken } from '@zhin.js/adapter';
5
+ import { defineEndpointRuntimeStateToken } from 'zhin.js/adapter';
6
6
 
7
7
  export const wecomRuntimeStateToken = defineEndpointRuntimeStateToken('wecom');