@zhin.js/adapter-satori 5.0.9 → 5.0.10

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,15 @@
1
1
  # @zhin.js/adapter-satori
2
2
 
3
+ ## 5.0.10
4
+
5
+ ### Patch Changes
6
+
7
+ - eb84b77: fix: 更新文档,建立正确的依赖关系
8
+ - Updated dependencies [d3920e9]
9
+ - @zhin.js/core@1.5.10
10
+ - zhin.js@6.0.10
11
+ - @zhin.js/adapter@1.1.10
12
+
3
13
  ## 5.0.9
4
14
 
5
15
  ### Patch Changes
package/README.md CHANGED
@@ -23,7 +23,7 @@ pnpm add @zhin.js/adapter-satori
23
23
 
24
24
  - `@zhin.js/adapter` — 约定式 `adapters/satori.ts`(`defineAdapter`)
25
25
  - `@zhin.js/core` — `messageGatewayToken` 入站/出站
26
- - `@zhin.js/plugin-runtime` — `plugin.ts`(`definePlugin`)
26
+ - `zhin.js` — `plugin.ts`(`definePlugin`)
27
27
  - `@zhin.js/host-http` — Webhook 模式需 `httpHostToken` 注册 POST 路由
28
28
  - 配置经插件 `schema.json` 落到 `plugins.<instanceKey>`(`baseUrl` / `token` / …)
29
29
 
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Convention entry: discover `adapters/satori.ts` → defineAdapter.
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 { SatoriWebhookEndpoint, SatoriWsEndpoint } from "../lib/endpoint.js";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Convention entry: discover `adapters/satori.ts` → defineAdapter.
3
3
  */
4
- import { defineAdapter } from '@zhin.js/adapter';
4
+ import { defineAdapter } from 'zhin.js/adapter';
5
5
  import { messageGatewayToken } from '@zhin.js/core/runtime';
6
6
  import { httpHostToken } from '@zhin.js/host-http';
7
7
  import { SatoriWebhookEndpoint, SatoriWsEndpoint } from '../src/endpoint.js';
package/lib/endpoint.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * SatoriEndpoint — WebSocket and webhook lifecycle, outbound, admit.
3
3
  */
4
- import { type EndpointInstance, type EndpointManagement, type EndpointSendRequest } from '@zhin.js/adapter';
4
+ import { type EndpointInstance, type EndpointManagement, type 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 { callSatoriApi, type ResolvedSatoriWebhookConfig, type ResolvedSatoriWsConfig, type SatoriEventBody, type SatoriLogin } from './protocol.js';
9
9
  import { type CreateSatoriWebSocket } from './ws.js';
10
10
  export type SatoriApiCaller = typeof callSatoriApi;
package/lib/endpoint.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * SatoriEndpoint — WebSocket and webhook lifecycle, outbound, admit.
3
3
  */
4
- import { createEndpointLifecycle, } from '@zhin.js/adapter';
4
+ import { createEndpointLifecycle, } from 'zhin.js/adapter';
5
5
  import { formatCompact, getAdapterLogger } from '@zhin.js/logger';
6
6
  import { SatoriOpcode, buildWsUrl, callSatoriApi, extractCreatedMessageId, formatInboundContent, formatMessageId, formatSatoriOutbound, isMessageEvent, isSelfMentioned, parseMessageRef, resolveInboundSender, satoriInboundConversation, } from './protocol.js';
7
7
  import { registerSatoriWebhookRoutes } from './webhook.js';
package/lib/protocol.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Canonicalization is owned by gateway/core before endpoint.send.
4
4
  * Spec: https://satori.chat/zh-CN/protocol/overview.html
5
5
  */
6
- import { pickCredential } from '@zhin.js/adapter';
6
+ import { pickCredential } from 'zhin.js/adapter';
7
7
  import { isMediaRef } from '@zhin.js/core';
8
8
  import { formatCompact, getLogger } from '@zhin.js/logger';
9
9
  const logger = getLogger('satori');
@@ -2,8 +2,8 @@
2
2
  * `satori.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 { satoriRuntimeStateToken } from './satori-runtime-state.js';
8
8
  export const satoriEndpointCommands = createEndpointCommands({
9
9
  adapterKey: 'satori',
@@ -1 +1 @@
1
- export declare const satoriRuntimeStateToken: import("@zhin.js/plugin-runtime").Token<import("@zhin.js/adapter").EndpointRuntimeState>;
1
+ export declare const satoriRuntimeStateToken: import("zhin.js").Token<import("@zhin.js/adapter").EndpointRuntimeState>;
@@ -2,5 +2,5 @@
2
2
  * Satori 插件实例的运行时状态:adapter create() 注册的 endpoint 列表。
3
3
  * 由 plugin.ts setup() provide,adapter create 与 `satori.endpoint` 命令共享(同一 owner generation)。
4
4
  */
5
- import { defineEndpointRuntimeStateToken } from '@zhin.js/adapter';
5
+ import { defineEndpointRuntimeStateToken } from 'zhin.js/adapter';
6
6
  export const satoriRuntimeStateToken = defineEndpointRuntimeStateToken('satori');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-satori",
3
- "version": "5.0.9",
3
+ "version": "5.0.10",
4
4
  "description": "Zhin.js Satori adapter for Plugin Runtime (WebSocket client)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -39,26 +39,24 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "ws": "^8.21.1",
42
- "@zhin.js/adapter": "1.1.9",
43
- "@zhin.js/command": "1.0.13",
44
- "@zhin.js/core": "1.5.9",
42
+ "@zhin.js/adapter": "1.1.10",
43
+ "@zhin.js/core": "1.5.10",
45
44
  "@zhin.js/host-http": "1.0.10",
46
45
  "@zhin.js/im-contract": "1.0.3",
47
- "@zhin.js/logger": "1.0.76",
48
- "@zhin.js/plugin-runtime": "1.1.6"
46
+ "@zhin.js/logger": "1.0.76"
49
47
  },
50
48
  "devDependencies": {
51
49
  "@types/node": "^26.1.2",
52
50
  "@types/ws": "^8.18.1",
53
51
  "typescript": "^6.0.3",
54
52
  "vitest": "^4.1.10",
55
- "@zhin.js/host-http": "1.0.10"
53
+ "@zhin.js/host-http": "1.0.10",
54
+ "zhin.js": "6.0.10"
56
55
  },
57
56
  "peerDependencies": {
58
- "@zhin.js/adapter": "1.1.9",
59
- "@zhin.js/core": "1.5.9",
60
- "@zhin.js/plugin-runtime": "1.1.6",
61
- "zhin.js": "6.0.9"
57
+ "@zhin.js/adapter": "1.1.10",
58
+ "@zhin.js/core": "1.5.10",
59
+ "zhin.js": "6.0.10"
62
60
  },
63
61
  "peerDependenciesMeta": {
64
62
  "zhin.js": {
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 { satoriRuntimeStateToken } from "./lib/satori-runtime-state.js";
5
5
  export default definePlugin({
6
6
  name: 'satori',
package/src/endpoint.ts CHANGED
@@ -10,11 +10,11 @@ import {
10
10
  type EndpointLifecycle,
11
11
  type EndpointManagement,
12
12
  type EndpointSendRequest,
13
- } from '@zhin.js/adapter';
13
+ } from 'zhin.js/adapter';
14
14
  import type { MessageGateway } from '@zhin.js/core/runtime';
15
15
  import type { HttpHost, HttpRouteRegistration } from '@zhin.js/host-http';
16
16
  import { formatCompact, getAdapterLogger } from '@zhin.js/logger';
17
- import type { CapabilityId } from '@zhin.js/plugin-runtime';
17
+ import type { CapabilityId } from 'zhin.js';
18
18
  import {
19
19
  SatoriOpcode,
20
20
  buildWsUrl,
package/src/protocol.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Spec: https://satori.chat/zh-CN/protocol/overview.html
5
5
  */
6
6
 
7
- import { pickCredential } from '@zhin.js/adapter';
7
+ import { pickCredential } from 'zhin.js/adapter';
8
8
  import { isMediaRef } from '@zhin.js/core';
9
9
  import type { ConversationKind, ConversationRef } from '@zhin.js/im-contract';
10
10
  import { formatCompact, getLogger } from '@zhin.js/logger';
@@ -2,8 +2,8 @@
2
2
  * `satori.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 { satoriRuntimeStateToken } from './satori-runtime-state.js';
8
8
 
9
9
  export const satoriEndpointCommands = createEndpointCommands({
@@ -2,6 +2,6 @@
2
2
  * Satori 插件实例的运行时状态:adapter create() 注册的 endpoint 列表。
3
3
  * 由 plugin.ts setup() provide,adapter create 与 `satori.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 satoriRuntimeStateToken = defineEndpointRuntimeStateToken('satori');