@zhin.js/core 1.1.35 → 1.1.38
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/README.md +79 -193
- package/lib/built/ai-outbound/index.d.ts +0 -1
- package/lib/built/ai-outbound/index.js +0 -1
- package/lib/built/ai-outbound/types.d.ts +0 -9
- package/lib/built/ai-trigger.d.ts +0 -5
- package/lib/built/ai-trigger.js +1 -27
- package/lib/built/common-adapter-tools.d.ts +0 -2
- package/lib/built/common-adapter-tools.js +0 -4
- package/lib/built/html-segment-fallback.d.ts +2 -5
- package/lib/built/html-segment-fallback.js +0 -15
- package/lib/built/interactive-segments/index.d.ts +0 -2
- package/lib/built/interactive-segments/index.js +0 -2
- package/lib/built/interactive-segments/keyboard-segment.d.ts +0 -1
- package/lib/built/interactive-segments/keyboard-segment.js +0 -1
- package/lib/built/interactive-segments/onebot-keyboard.d.ts +0 -1
- package/lib/built/interactive-segments/onebot-keyboard.js +0 -2
- package/lib/built/interactive-segments/resolve.d.ts +0 -1
- package/lib/built/interactive-segments/resolve.js +0 -1
- package/lib/built/interactive-segments/types.d.ts +0 -5
- package/lib/built/login-assist.d.ts +1 -8
- package/lib/built/message-enrich.d.ts +2 -8
- package/lib/built/message-enrich.js +3 -11
- package/lib/built/segment-contract/assert.js +2 -1
- package/lib/built/segment-contract/delivery.js +1 -0
- package/lib/built/segment-contract/index.d.ts +2 -2
- package/lib/built/segment-contract/index.js +1 -1
- package/lib/built/segment-contract/json-schema.d.ts +1 -1
- package/lib/built/segment-contract/json-schema.js +33 -2
- package/lib/built/segment-contract/preview.js +7 -0
- package/lib/built/segment-contract/types.d.ts +2 -2
- package/lib/built/segment-contract/validate.d.ts +43 -2
- package/lib/built/segment-contract/validate.js +37 -3
- package/lib/built/tool-access.d.ts +5 -0
- package/lib/built/tool-access.js +17 -0
- package/lib/built/user-interaction.js +0 -4
- package/lib/feature/handler.d.ts +1 -5
- package/lib/index.d.ts +4 -45
- package/lib/index.js +3 -39
- package/lib/message.d.ts +1 -2
- package/lib/models/system-log.d.ts +0 -2
- package/lib/models/system-log.js +1 -8
- package/lib/models/user.d.ts +0 -2
- package/lib/models/user.js +1 -7
- package/lib/notice.d.ts +1 -2
- package/lib/plugin-runtime/im/conversation-runtime.d.ts +19 -0
- package/lib/plugin-runtime/im/conversation-runtime.js +312 -0
- package/lib/plugin-runtime/im/endpoint-runtime.d.ts +79 -0
- package/lib/plugin-runtime/im/endpoint-runtime.js +162 -0
- package/lib/plugin-runtime/im/im-runtime.d.ts +13 -106
- package/lib/plugin-runtime/im/im-runtime.js +58 -1061
- package/lib/plugin-runtime/im/inbound-runtime.d.ts +31 -0
- package/lib/plugin-runtime/im/inbound-runtime.js +252 -0
- package/lib/plugin-runtime/im/index.d.ts +4 -2
- package/lib/plugin-runtime/im/index.js +2 -2
- package/lib/plugin-runtime/im/ingress-route.d.ts +10 -0
- package/lib/plugin-runtime/im/ingress-route.js +10 -0
- package/lib/plugin-runtime/im/interaction-runtime.d.ts +23 -0
- package/lib/plugin-runtime/im/interaction-runtime.js +181 -0
- package/lib/plugin-runtime/im/interactive-router.d.ts +17 -0
- package/lib/plugin-runtime/im/interactive-router.js +98 -0
- package/lib/plugin-runtime/im/message-bus.d.ts +3 -3
- package/lib/plugin-runtime/im/message-bus.js +3 -3
- package/lib/plugin-runtime/im/message-events.d.ts +26 -0
- package/lib/plugin-runtime/im/message-events.js +61 -0
- package/lib/plugin-runtime/im/outbound-delivery-runtime.d.ts +19 -0
- package/lib/plugin-runtime/im/outbound-delivery-runtime.js +165 -0
- package/lib/plugin-runtime/im/outbound-segments.d.ts +2 -3
- package/lib/plugin-runtime/im/outbound-segments.js +3 -4
- package/lib/plugin-runtime/im/runtime-middleware.d.ts +3 -0
- package/lib/plugin-runtime/im/runtime-middleware.js +13 -0
- package/lib/request.d.ts +1 -2
- package/lib/side-event/base.d.ts +1 -2
- package/lib/side-event/normalize.d.ts +1 -5
- package/lib/side-event/normalize.js +1 -11
- package/lib/system-event.d.ts +1 -2
- package/lib/types.d.ts +9 -116
- package/lib/utils.d.ts +51 -24
- package/lib/utils.js +11 -23
- package/package.json +18 -28
- package/lib/adapter.d.ts +0 -145
- package/lib/adapter.js +0 -377
- package/lib/built/adapter-process.d.ts +0 -58
- package/lib/built/adapter-process.js +0 -128
- package/lib/built/agent-preset.d.ts +0 -64
- package/lib/built/agent-preset.js +0 -79
- package/lib/built/ai-outbound/adapter-access.d.ts +0 -3
- package/lib/built/ai-outbound/adapter-access.js +0 -9
- package/lib/built/authorization.d.ts +0 -10
- package/lib/built/authorization.js +0 -76
- package/lib/built/command.d.ts +0 -72
- package/lib/built/command.js +0 -105
- package/lib/built/component.d.ts +0 -67
- package/lib/built/component.js +0 -97
- package/lib/built/config.d.ts +0 -98
- package/lib/built/config.js +0 -372
- package/lib/built/connect-endpoint-instance.d.ts +0 -17
- package/lib/built/connect-endpoint-instance.js +0 -42
- package/lib/built/database.d.ts +0 -68
- package/lib/built/database.js +0 -106
- package/lib/built/dispatcher.d.ts +0 -141
- package/lib/built/dispatcher.js +0 -383
- package/lib/built/endpoint-commands.d.ts +0 -3
- package/lib/built/endpoint-commands.js +0 -99
- package/lib/built/endpoint-lifecycle-service.d.ts +0 -28
- package/lib/built/endpoint-lifecycle-service.js +0 -242
- package/lib/built/endpoint-lifecycle.d.ts +0 -27
- package/lib/built/endpoint-lifecycle.js +0 -36
- package/lib/built/endpoint-manager.d.ts +0 -34
- package/lib/built/endpoint-manager.js +0 -1
- package/lib/built/html-renderer-loader.d.ts +0 -13
- package/lib/built/html-renderer-loader.js +0 -33
- package/lib/built/inbound-pipeline.d.ts +0 -37
- package/lib/built/inbound-pipeline.js +0 -63
- package/lib/built/inbound-runner.d.ts +0 -22
- package/lib/built/inbound-runner.js +0 -34
- package/lib/built/interactive-segment-contract.d.ts +0 -6
- package/lib/built/interactive-segment-contract.js +0 -9
- package/lib/built/interactive-segments/fallback-store.d.ts +0 -29
- package/lib/built/interactive-segments/fallback-store.js +0 -63
- package/lib/built/interactive-segments/handlers.d.ts +0 -16
- package/lib/built/interactive-segments/handlers.js +0 -74
- package/lib/built/introspection-format.d.ts +0 -10
- package/lib/built/introspection-format.js +0 -28
- package/lib/built/management-command-guard.d.ts +0 -15
- package/lib/built/management-command-guard.js +0 -25
- package/lib/built/message-filter.d.ts +0 -176
- package/lib/built/message-filter.js +0 -239
- package/lib/built/optional-peer-import.d.ts +0 -3
- package/lib/built/optional-peer-import.js +0 -33
- package/lib/built/outbound-media-contract.d.ts +0 -22
- package/lib/built/outbound-media-contract.js +0 -10
- package/lib/built/permission.d.ts +0 -51
- package/lib/built/permission.js +0 -99
- package/lib/built/permit-check.d.ts +0 -7
- package/lib/built/permit-check.js +0 -35
- package/lib/built/permit-parse.d.ts +0 -16
- package/lib/built/permit-parse.js +0 -32
- package/lib/built/platform-permit.d.ts +0 -20
- package/lib/built/platform-permit.js +0 -91
- package/lib/built/rich-segments/adapter-policies.d.ts +0 -9
- package/lib/built/rich-segments/adapter-policies.js +0 -27
- package/lib/built/rich-segments/base.d.ts +0 -11
- package/lib/built/rich-segments/base.js +0 -24
- package/lib/built/rich-segments/builtins.d.ts +0 -4
- package/lib/built/rich-segments/builtins.js +0 -40
- package/lib/built/rich-segments/capabilities.d.ts +0 -6
- package/lib/built/rich-segments/capabilities.js +0 -38
- package/lib/built/rich-segments/html-segment.d.ts +0 -15
- package/lib/built/rich-segments/html-segment.js +0 -62
- package/lib/built/rich-segments/index.d.ts +0 -13
- package/lib/built/rich-segments/index.js +0 -13
- package/lib/built/rich-segments/markdown-segment.d.ts +0 -14
- package/lib/built/rich-segments/markdown-segment.js +0 -58
- package/lib/built/rich-segments/qrcode-segment.d.ts +0 -18
- package/lib/built/rich-segments/qrcode-segment.js +0 -73
- package/lib/built/rich-segments/registry.d.ts +0 -16
- package/lib/built/rich-segments/registry.js +0 -52
- package/lib/built/rich-segments/resolve.d.ts +0 -5
- package/lib/built/rich-segments/resolve.js +0 -87
- package/lib/built/rich-segments/tts-segment.d.ts +0 -13
- package/lib/built/rich-segments/tts-segment.js +0 -51
- package/lib/built/rich-segments/types.d.ts +0 -79
- package/lib/built/rich-segments/types.js +0 -17
- package/lib/built/runtime-io.d.ts +0 -9
- package/lib/built/runtime-io.js +0 -67
- package/lib/built/schedule.d.ts +0 -54
- package/lib/built/schedule.js +0 -112
- package/lib/built/schema-endpoint-manager.d.ts +0 -17
- package/lib/built/schema-endpoint-manager.js +0 -73
- package/lib/built/schema-feature.d.ts +0 -77
- package/lib/built/schema-feature.js +0 -130
- package/lib/built/skill.d.ts +0 -120
- package/lib/built/skill.js +0 -151
- package/lib/built/speech-loader.d.ts +0 -14
- package/lib/built/speech-loader.js +0 -32
- package/lib/built/tool.d.ts +0 -151
- package/lib/built/tool.js +0 -388
- package/lib/command.d.ts +0 -50
- package/lib/command.js +0 -106
- package/lib/endpoint-capabilities.d.ts +0 -46
- package/lib/endpoint-capabilities.js +0 -55
- package/lib/endpoint.d.ts +0 -19
- package/lib/endpoint.js +0 -3
- package/lib/host-plugin-registry.d.ts +0 -8
- package/lib/host-plugin-registry.js +0 -12
- package/lib/plugin-context.d.ts +0 -27
- package/lib/plugin-context.js +0 -64
- package/lib/plugin-runtime/im/interactive.d.ts +0 -26
- package/lib/plugin-runtime/im/interactive.js +0 -46
- package/lib/plugin-runtime/im/service-tokens.d.ts +0 -18
- package/lib/plugin-runtime/im/service-tokens.js +0 -13
- package/lib/plugin.d.ts +0 -268
- package/lib/plugin.js +0 -583
- package/lib/schema-interaction.d.ts +0 -117
- package/lib/schema-interaction.js +0 -247
- package/lib/tool-zod.d.ts +0 -43
- package/lib/tool-zod.js +0 -184
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isStrictCanonicalSegment } from './validate.js';
|
|
2
2
|
const STRICT_CANONICAL_TYPES = new Set([
|
|
3
|
-
'text', 'mention', 'image', 'audio', 'video', 'file', 'reply', 'forward',
|
|
3
|
+
'text', 'mention', 'image', 'audio', 'video', 'file', 'reply', 'forward',
|
|
4
|
+
'face', 'dice', 'rps', 'share',
|
|
4
5
|
]);
|
|
5
6
|
// These are Core-owned wire extensions rather than canonical data types. Keep
|
|
6
7
|
// their gradual contracts isolated here; third-party extensions must be
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type { Segment, SegmentBase, MediaRef, TextSegment, MentionSegment, ImageSegment, AudioSegment, VideoSegment, FileSegment, ReplySegment, ForwardSegment, FaceSegment, DiceSegment, RpsSegment, } from './types.js';
|
|
2
|
-
export { mediaRefSchema, textSegmentSchema, mentionSegmentSchema, imageSegmentSchema, audioSegmentSchema, videoSegmentSchema, fileSegmentSchema, replySegmentSchema, forwardSegmentSchema, faceSegmentSchema, diceSegmentSchema, rpsSegmentSchema, canonicalSegmentSchema, segmentArraySchema, } from './validate.js';
|
|
1
|
+
export type { Segment, SegmentBase, MediaRef, TextSegment, MentionSegment, ImageSegment, AudioSegment, VideoSegment, FileSegment, ReplySegment, ForwardSegment, ShareSegment, FaceSegment, DiceSegment, RpsSegment, } from './types.js';
|
|
2
|
+
export { mediaRefSchema, textSegmentSchema, mentionSegmentSchema, imageSegmentSchema, audioSegmentSchema, videoSegmentSchema, fileSegmentSchema, replySegmentSchema, forwardSegmentSchema, faceSegmentSchema, diceSegmentSchema, rpsSegmentSchema, shareSegmentSchema, canonicalSegmentSchema, segmentArraySchema, } from './validate.js';
|
|
3
3
|
export { assertCanonicalSegments, isCanonicalSegment } from './assert.js';
|
|
4
4
|
export { mediaRefJsonSchema, outboundSegmentJsonSchema, aiOutboundJsonSchema, STRICT_OUTBOUND_SEGMENT_TYPES, } from './json-schema.js';
|
|
5
5
|
export { segmentsForImDelivery } from './delivery.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { mediaRefSchema, textSegmentSchema, mentionSegmentSchema, imageSegmentSchema, audioSegmentSchema, videoSegmentSchema, fileSegmentSchema, replySegmentSchema, forwardSegmentSchema, faceSegmentSchema, diceSegmentSchema, rpsSegmentSchema, canonicalSegmentSchema, segmentArraySchema, } from './validate.js';
|
|
1
|
+
export { mediaRefSchema, textSegmentSchema, mentionSegmentSchema, imageSegmentSchema, audioSegmentSchema, videoSegmentSchema, fileSegmentSchema, replySegmentSchema, forwardSegmentSchema, faceSegmentSchema, diceSegmentSchema, rpsSegmentSchema, shareSegmentSchema, canonicalSegmentSchema, segmentArraySchema, } from './validate.js';
|
|
2
2
|
export { assertCanonicalSegments, isCanonicalSegment } from './assert.js';
|
|
3
3
|
export { mediaRefJsonSchema, outboundSegmentJsonSchema, aiOutboundJsonSchema, STRICT_OUTBOUND_SEGMENT_TYPES, } from './json-schema.js';
|
|
4
4
|
export { segmentsForImDelivery } from './delivery.js';
|
|
@@ -13,7 +13,7 @@ type JsonSchemaObject = Record<string, unknown>;
|
|
|
13
13
|
/** MediaRef(canonical 媒体引用):types.ts 的 MediaRef 接口 */
|
|
14
14
|
export declare const mediaRefJsonSchema: JsonSchemaObject;
|
|
15
15
|
/** 严格段类型集合(SSOT:assert.ts STRICT_CANONICAL_TYPES) */
|
|
16
|
-
export declare const STRICT_OUTBOUND_SEGMENT_TYPES: readonly ["text", "mention", "image", "reply", "forward", "face", "dice", "rps"];
|
|
16
|
+
export declare const STRICT_OUTBOUND_SEGMENT_TYPES: readonly ["text", "mention", "image", "audio", "video", "file", "reply", "forward", "face", "dice", "rps", "share"];
|
|
17
17
|
/**
|
|
18
18
|
* 单条 outbound 消息段的 JSON Schema。
|
|
19
19
|
* 严格段镜像 validate.ts 的 data 约束;宽松段走 generic 分支。
|
|
@@ -50,7 +50,7 @@ const looseBranch = {
|
|
|
50
50
|
properties: {
|
|
51
51
|
type: {
|
|
52
52
|
type: 'string',
|
|
53
|
-
enum: ['
|
|
53
|
+
enum: ['voice', 'record', 'link', 'markdown', 'html', 'keyboard', 'action'],
|
|
54
54
|
},
|
|
55
55
|
data: { type: 'object' },
|
|
56
56
|
platform: platformJsonSchema,
|
|
@@ -60,7 +60,8 @@ const looseBranch = {
|
|
|
60
60
|
};
|
|
61
61
|
/** 严格段类型集合(SSOT:assert.ts STRICT_CANONICAL_TYPES) */
|
|
62
62
|
export const STRICT_OUTBOUND_SEGMENT_TYPES = [
|
|
63
|
-
'text', 'mention', 'image', '
|
|
63
|
+
'text', 'mention', 'image', 'audio', 'video', 'file', 'reply', 'forward',
|
|
64
|
+
'face', 'dice', 'rps', 'share',
|
|
64
65
|
];
|
|
65
66
|
/**
|
|
66
67
|
* 单条 outbound 消息段的 JSON Schema。
|
|
@@ -80,6 +81,19 @@ export const outboundSegmentJsonSchema = {
|
|
|
80
81
|
media: mediaRefJsonSchema,
|
|
81
82
|
alt: { type: 'string' },
|
|
82
83
|
}, ['media'])),
|
|
84
|
+
strictBranch('audio', dataObject({
|
|
85
|
+
media: mediaRefJsonSchema,
|
|
86
|
+
duration: { type: 'number' },
|
|
87
|
+
}, ['media'])),
|
|
88
|
+
strictBranch('video', dataObject({
|
|
89
|
+
media: mediaRefJsonSchema,
|
|
90
|
+
duration: { type: 'number' },
|
|
91
|
+
alt: { type: 'string' },
|
|
92
|
+
}, ['media'])),
|
|
93
|
+
strictBranch('file', dataObject({
|
|
94
|
+
media: mediaRefJsonSchema,
|
|
95
|
+
name: { type: 'string' },
|
|
96
|
+
}, ['media'])),
|
|
83
97
|
strictBranch('reply', dataObject({
|
|
84
98
|
message_id: { type: 'string', description: '被引用消息的平台消息 id' },
|
|
85
99
|
}, ['message_id'])),
|
|
@@ -98,6 +112,23 @@ export const outboundSegmentJsonSchema = {
|
|
|
98
112
|
strictBranch('rps', dataObject({
|
|
99
113
|
result: { type: 'number' },
|
|
100
114
|
}, [])),
|
|
115
|
+
strictBranch('share', dataObject({
|
|
116
|
+
url: { type: 'string', description: '分享跳转地址' },
|
|
117
|
+
title: { type: 'string', description: '分享标题' },
|
|
118
|
+
description: { type: 'string', description: '分享摘要' },
|
|
119
|
+
image: { type: 'string', description: '预览图地址' },
|
|
120
|
+
audio: { type: 'string', description: '音频地址' },
|
|
121
|
+
content: { type: 'string', description: '消息列表中的显示文字' },
|
|
122
|
+
artist: { type: 'string', description: '音乐分享的艺术家' },
|
|
123
|
+
duration: { type: 'number', description: '音频时长(秒)' },
|
|
124
|
+
config: dataObject({
|
|
125
|
+
appid: { type: 'number' },
|
|
126
|
+
package: { type: 'string' },
|
|
127
|
+
sign: { type: 'string' },
|
|
128
|
+
icon: { type: 'string' },
|
|
129
|
+
version: { type: 'string' },
|
|
130
|
+
}, ['appid']),
|
|
131
|
+
}, ['url', 'title'])),
|
|
101
132
|
looseBranch,
|
|
102
133
|
],
|
|
103
134
|
};
|
|
@@ -106,6 +106,13 @@ export function formatSegmentPreview(item) {
|
|
|
106
106
|
return clip(`${text} <${url}>`);
|
|
107
107
|
return clip(url || text || '[link]');
|
|
108
108
|
}
|
|
109
|
+
case 'share': {
|
|
110
|
+
const url = typeof data.url === 'string' ? data.url : '';
|
|
111
|
+
const title = typeof data.title === 'string' ? data.title : '';
|
|
112
|
+
if (title && url)
|
|
113
|
+
return clip(`[share] ${title} <${url}>`);
|
|
114
|
+
return clip(title || url || '[share]');
|
|
115
|
+
}
|
|
109
116
|
case 'dice':
|
|
110
117
|
return data.result != null ? `{dice}(${data.result})` : '{dice}';
|
|
111
118
|
case 'rps':
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Canonical Segment SSOT lives in @zhin.js/im-contract. */
|
|
2
2
|
import type { MediaRef, SegmentBase } from '@zhin.js/im-contract';
|
|
3
|
-
export type { ForwardSegment, MediaRef, MentionSegment, ReplySegment, Segment, SegmentBase, TextSegment, } from '@zhin.js/im-contract';
|
|
3
|
+
export type { ForwardSegment, MediaRef, MentionSegment, ReplySegment, ShareSegment, Segment, SegmentBase, TextSegment, } from '@zhin.js/im-contract';
|
|
4
4
|
/**
|
|
5
5
|
* 媒体引用占位(全框架唯一媒体表达)。
|
|
6
6
|
* kind=file:平台侧不透明文件引用(如 Telegram file_id、Milky resource_id),
|
|
@@ -54,5 +54,5 @@ export interface RpsSegment extends SegmentBase {
|
|
|
54
54
|
result?: number;
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
/** 规范态 segment(严格校验 text / mention / image / audio / video / file / reply / forward / face / dice / rps) */
|
|
57
|
+
/** 规范态 segment(严格校验 text / mention / image / audio / video / file / reply / forward / face / dice / rps / share) */
|
|
58
58
|
export type LegacySpecificSegment = ImageSegment | AudioSegment | VideoSegment | FileSegment | FaceSegment | DiceSegment | RpsSegment;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Schema } from '@zhin.js/schema';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Segment } from './types.js';
|
|
3
|
+
export { isMediaRef } from '@zhin.js/im-contract';
|
|
3
4
|
export declare const mediaRefSchema: Schema<{
|
|
4
5
|
kind?: any;
|
|
5
6
|
value?: string | undefined;
|
|
@@ -222,8 +223,48 @@ export declare const rpsSegmentSchema: Schema<{
|
|
|
222
223
|
} | undefined;
|
|
223
224
|
platform?: Record<string, any> | undefined;
|
|
224
225
|
}>;
|
|
226
|
+
export declare const shareSegmentSchema: Schema<{
|
|
227
|
+
type?: "share" | undefined;
|
|
228
|
+
data?: {
|
|
229
|
+
url?: string | undefined;
|
|
230
|
+
title?: string | undefined;
|
|
231
|
+
description?: string | undefined;
|
|
232
|
+
image?: string | undefined;
|
|
233
|
+
audio?: string | undefined;
|
|
234
|
+
content?: string | undefined;
|
|
235
|
+
artist?: string | undefined;
|
|
236
|
+
duration?: number | undefined;
|
|
237
|
+
config?: {
|
|
238
|
+
appid?: number | undefined;
|
|
239
|
+
package?: string | undefined;
|
|
240
|
+
sign?: string | undefined;
|
|
241
|
+
icon?: string | undefined;
|
|
242
|
+
version?: string | undefined;
|
|
243
|
+
} | undefined;
|
|
244
|
+
} | undefined;
|
|
245
|
+
platform?: Record<string, any> | undefined;
|
|
246
|
+
}, {
|
|
247
|
+
type?: "share" | undefined;
|
|
248
|
+
data?: {
|
|
249
|
+
url?: string | undefined;
|
|
250
|
+
title?: string | undefined;
|
|
251
|
+
description?: string | undefined;
|
|
252
|
+
image?: string | undefined;
|
|
253
|
+
audio?: string | undefined;
|
|
254
|
+
content?: string | undefined;
|
|
255
|
+
artist?: string | undefined;
|
|
256
|
+
duration?: number | undefined;
|
|
257
|
+
config?: {
|
|
258
|
+
appid?: number | undefined;
|
|
259
|
+
package?: string | undefined;
|
|
260
|
+
sign?: string | undefined;
|
|
261
|
+
icon?: string | undefined;
|
|
262
|
+
version?: string | undefined;
|
|
263
|
+
} | undefined;
|
|
264
|
+
} | undefined;
|
|
265
|
+
platform?: Record<string, any> | undefined;
|
|
266
|
+
}>;
|
|
225
267
|
export declare const canonicalSegmentSchema: Schema<any, any>;
|
|
226
268
|
export declare const segmentArraySchema: Schema<any[], any[]>;
|
|
227
|
-
export declare function isMediaRef(value: unknown): value is MediaRef;
|
|
228
269
|
/** 严格 canonical 段校验(@zhin.js/schema validate-only) */
|
|
229
270
|
export declare function isStrictCanonicalSegment(value: unknown): value is Segment;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Schema } from '@zhin.js/schema';
|
|
2
|
+
export { isMediaRef } from '@zhin.js/im-contract';
|
|
2
3
|
const platformSchema = Schema.dict(Schema.any());
|
|
3
4
|
const mediaKindSchema = Schema.union([
|
|
4
5
|
Schema.const('url'),
|
|
@@ -95,6 +96,28 @@ export const rpsSegmentSchema = Schema.object({
|
|
|
95
96
|
data: Schema.object({ result: Schema.number() }).required(),
|
|
96
97
|
platform: platformSchema,
|
|
97
98
|
});
|
|
99
|
+
const shareConfigSchema = Schema.object({
|
|
100
|
+
appid: Schema.number().required(),
|
|
101
|
+
package: Schema.string(),
|
|
102
|
+
sign: Schema.string(),
|
|
103
|
+
icon: Schema.string(),
|
|
104
|
+
version: Schema.string(),
|
|
105
|
+
});
|
|
106
|
+
export const shareSegmentSchema = Schema.object({
|
|
107
|
+
type: Schema.const('share'),
|
|
108
|
+
data: Schema.object({
|
|
109
|
+
url: Schema.string().required(),
|
|
110
|
+
title: Schema.string().required(),
|
|
111
|
+
description: Schema.string(),
|
|
112
|
+
image: Schema.string(),
|
|
113
|
+
audio: Schema.string(),
|
|
114
|
+
content: Schema.string(),
|
|
115
|
+
artist: Schema.string(),
|
|
116
|
+
duration: Schema.number(),
|
|
117
|
+
config: shareConfigSchema,
|
|
118
|
+
}).required(),
|
|
119
|
+
platform: platformSchema,
|
|
120
|
+
});
|
|
98
121
|
export const canonicalSegmentSchema = Schema.discriminatedUnion('type', {
|
|
99
122
|
text: {
|
|
100
123
|
data: Schema.object({ text: Schema.string().required() }).required(),
|
|
@@ -163,11 +186,22 @@ export const canonicalSegmentSchema = Schema.discriminatedUnion('type', {
|
|
|
163
186
|
data: Schema.object({ result: Schema.number() }).required(),
|
|
164
187
|
platform: platformSchema,
|
|
165
188
|
},
|
|
189
|
+
share: {
|
|
190
|
+
data: Schema.object({
|
|
191
|
+
url: Schema.string().required(),
|
|
192
|
+
title: Schema.string().required(),
|
|
193
|
+
description: Schema.string(),
|
|
194
|
+
image: Schema.string(),
|
|
195
|
+
audio: Schema.string(),
|
|
196
|
+
content: Schema.string(),
|
|
197
|
+
artist: Schema.string(),
|
|
198
|
+
duration: Schema.number(),
|
|
199
|
+
config: shareConfigSchema,
|
|
200
|
+
}).required(),
|
|
201
|
+
platform: platformSchema,
|
|
202
|
+
},
|
|
166
203
|
});
|
|
167
204
|
export const segmentArraySchema = Schema.list(canonicalSegmentSchema);
|
|
168
|
-
export function isMediaRef(value) {
|
|
169
|
-
return mediaRefSchema.safeParse(value).success;
|
|
170
|
-
}
|
|
171
205
|
/** 严格 canonical 段校验(@zhin.js/schema validate-only) */
|
|
172
206
|
export function isStrictCanonicalSegment(value) {
|
|
173
207
|
return canonicalSegmentSchema.safeParse(value).success;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type PermissionHost } from '@zhin.js/permission';
|
|
2
|
+
import type { Message } from '../message.js';
|
|
3
|
+
import type { Tool } from '../types.js';
|
|
4
|
+
/** Checks whether a Tool is visible to the current IM message context. */
|
|
5
|
+
export declare function canAccessTool(tool: Tool, message?: Message<any>, host?: PermissionHost | null): Promise<boolean>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { toPermissionSubject } from '@zhin.js/permission';
|
|
2
|
+
/** Checks whether a Tool is visible to the current IM message context. */
|
|
3
|
+
export async function canAccessTool(tool, message, host) {
|
|
4
|
+
if (!message)
|
|
5
|
+
return !tool.platforms?.length && !tool.scopes?.length && !tool.permissions?.length;
|
|
6
|
+
const adapter = String(message.$adapter);
|
|
7
|
+
const scope = (message.$channel?.type || 'private');
|
|
8
|
+
if (tool.platforms?.length && !tool.platforms.includes(adapter))
|
|
9
|
+
return false;
|
|
10
|
+
if (tool.scopes?.length && !tool.scopes.includes(scope))
|
|
11
|
+
return false;
|
|
12
|
+
if (!tool.permissions?.length)
|
|
13
|
+
return true;
|
|
14
|
+
if (!host)
|
|
15
|
+
return false;
|
|
16
|
+
return host.checkAll(tool.permissions, toPermissionSubject(message));
|
|
17
|
+
}
|
|
@@ -14,14 +14,10 @@ export function assertUserInteractionRequest(request) {
|
|
|
14
14
|
if (request.type === 'select' || request.type === 'multiselect') {
|
|
15
15
|
if (request.options.length === 0)
|
|
16
16
|
throw new TypeError('User interaction options must not be empty');
|
|
17
|
-
const labels = new Set();
|
|
18
17
|
for (const option of request.options) {
|
|
19
18
|
const label = option.label.trim().toLocaleLowerCase();
|
|
20
19
|
if (!label)
|
|
21
20
|
throw new TypeError('User interaction option label must not be empty');
|
|
22
|
-
if (labels.has(label))
|
|
23
|
-
throw new TypeError(`Duplicate user interaction option label: ${option.label}`);
|
|
24
|
-
labels.add(label);
|
|
25
21
|
}
|
|
26
22
|
}
|
|
27
23
|
if (request.type === 'multiselect') {
|
package/lib/feature/handler.d.ts
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
/** Authoring API for Handler Feature — implementation in `@zhin.js/handler`. */
|
|
2
2
|
export { parseHandlerDefinition, HandlerIndex, isHandlerIndex, handlerFeatureId, handlerFeature, handlerEventFromLocalName, resolveHandlerEvent, type HandlerEventMap, type HandlerDefinition, type HandlerDescriptor, type HandlerContext, type HandlerDispatchOptions, } from '@zhin.js/handler';
|
|
3
3
|
import { type HandlerContext, type HandlerDefinition, type HandlerEventMap } from '@zhin.js/handler';
|
|
4
|
-
import type { Plugin } from '../plugin.js';
|
|
5
4
|
import type { Message } from '../plugin-runtime/im/contracts.js';
|
|
6
5
|
import type { Notice } from '../notice.js';
|
|
7
6
|
import type { Request } from '../request.js';
|
|
8
7
|
import type { SystemEvent } from '../system-event.js';
|
|
9
8
|
import type { AdapterClient, AdapterEvents, EndpointEvent, EndpointIdentity, PlatformEvent, RegisteredAdapterName } from '@zhin.js/adapter';
|
|
10
|
-
type KnownKeys<T> = {
|
|
11
|
-
[K in keyof T as string extends K ? never : number extends K ? never : K]: T[K];
|
|
12
|
-
};
|
|
13
9
|
declare module '@zhin.js/handler' {
|
|
14
|
-
interface HandlerEventMap
|
|
10
|
+
interface HandlerEventMap {
|
|
15
11
|
'message.receive': [event: EndpointEvent<Message>];
|
|
16
12
|
'notice.receive': [event: EndpointEvent<Notice>];
|
|
17
13
|
'request.receive': [event: EndpointEvent<Request>];
|
package/lib/index.d.ts
CHANGED
|
@@ -2,82 +2,41 @@
|
|
|
2
2
|
* Canonical IM messages, Endpoints, rendering, and plugin-facing core types.
|
|
3
3
|
* @module @zhin.js/core
|
|
4
4
|
*/
|
|
5
|
-
export * from './endpoint.js';
|
|
6
|
-
export * from './endpoint-capabilities.js';
|
|
7
|
-
export * from './plugin.js';
|
|
8
|
-
export * from './command.js';
|
|
9
5
|
export * from './component.js';
|
|
10
|
-
export * from './adapter.js';
|
|
11
6
|
export * from './message.js';
|
|
12
7
|
export * from './im-scene.js';
|
|
13
8
|
export * from './notice.js';
|
|
14
9
|
export * from './request.js';
|
|
15
10
|
export * from './system-event.js';
|
|
16
11
|
export * from './side-event/index.js';
|
|
17
|
-
export * from './schema-interaction.js';
|
|
18
12
|
export type * from '@zhin.js/interaction';
|
|
19
13
|
export * from './types.js';
|
|
20
14
|
export * from './utils.js';
|
|
21
15
|
export * from './errors.js';
|
|
22
|
-
export * from './built/config.js';
|
|
23
|
-
export * from './built/command.js';
|
|
24
|
-
export * from './built/schedule.js';
|
|
25
|
-
export type { ScheduleDescriptor, ScheduleHandle, ScheduleContextExtensions } from './built/schedule.js';
|
|
26
16
|
export * from './models/system-log.js';
|
|
27
17
|
export * from './models/user.js';
|
|
28
|
-
export * from './built/permit-parse.js';
|
|
29
|
-
export * from './built/permit-check.js';
|
|
30
|
-
export * from './built/platform-permit.js';
|
|
31
|
-
export * from './built/authorization.js';
|
|
32
18
|
export * from './built/message-enrich.js';
|
|
33
19
|
export type { AgentTurnMessage, SyntheticMessageInput } from './built/message-enrich.js';
|
|
34
|
-
export * from './built/
|
|
35
|
-
export * from './built/database.js';
|
|
36
|
-
export * from './built/message-filter.js';
|
|
37
|
-
export * from './built/tool.js';
|
|
38
|
-
export * from './built/skill.js';
|
|
39
|
-
export * from './built/agent-preset.js';
|
|
20
|
+
export * from './built/tool-access.js';
|
|
40
21
|
export * from './built/common-adapter-tools.js';
|
|
41
22
|
export * from './built/roles.js';
|
|
42
23
|
export * from './im-session-id.js';
|
|
43
24
|
export * from './built/ai-trigger.js';
|
|
44
25
|
export * from './built/ai-access.js';
|
|
45
|
-
export * from './built/dispatcher.js';
|
|
46
|
-
export * from './built/schema-feature.js';
|
|
47
26
|
export * from './built/login-assist.js';
|
|
48
27
|
export * from './built/generated-qrcode.js';
|
|
49
|
-
export
|
|
28
|
+
export { markdownToPlainText } from './built/rich-segments/markdown-to-text.js';
|
|
50
29
|
export * from './built/interactive-segments/index.js';
|
|
51
30
|
export * from './built/user-interaction.js';
|
|
52
31
|
export * from './built/ai-outbound/index.js';
|
|
53
|
-
export { loadHtmlRenderer, seedHtmlRenderer, HTML_RENDERER_PACKAGE } from './built/html-renderer-loader.js';
|
|
54
|
-
export { loadSpeechPipeline, seedSpeechPipeline, SPEECH_PACKAGE } from './built/speech-loader.js';
|
|
55
32
|
export * from './built/outbound-media-utils.js';
|
|
56
|
-
export * from './built/outbound-media-contract.js';
|
|
57
|
-
export * from './built/interactive-segment-contract.js';
|
|
58
33
|
export * from './built/segment-contract/index.js';
|
|
59
34
|
export type { SegmentMediaRef } from './built/segment-contract/media.js';
|
|
60
35
|
export * from './built/generic-segment-mapper.js';
|
|
61
|
-
export * from './built/adapter-process.js';
|
|
62
|
-
export * from './built/component.js';
|
|
63
|
-
export * from './built/inbound-runner.js';
|
|
64
|
-
export type { RunInboundMessageOptions, InboundRunResult } from './built/inbound-runner.js';
|
|
65
|
-
export * from './built/connect-endpoint-instance.js';
|
|
66
|
-
export type { ConnectEndpointInstanceOptions } from './built/connect-endpoint-instance.js';
|
|
67
|
-
export * from './built/endpoint-lifecycle.js';
|
|
68
|
-
export type { EndpointLifecycleKind, EndpointLifecyclePayload } from './built/endpoint-lifecycle.js';
|
|
69
|
-
export * from './built/endpoint-manager.js';
|
|
70
|
-
export type { EndpointConfigRecord, EndpointManager, ProvisionContext } from './built/endpoint-manager.js';
|
|
71
|
-
export * from './built/endpoint-lifecycle-service.js';
|
|
72
|
-
export * from './built/schema-endpoint-manager.js';
|
|
73
|
-
export * from './built/endpoint-commands.js';
|
|
74
|
-
export * from './built/introspection-format.js';
|
|
75
|
-
export * from './built/management-command-guard.js';
|
|
76
36
|
export * from './built/html-to-text.js';
|
|
77
37
|
export * from './built/html-segment-fallback.js';
|
|
78
38
|
export * from '@zhin.js/database';
|
|
79
39
|
export * from '@zhin.js/logger';
|
|
80
40
|
export { Schema } from '@zhin.js/schema';
|
|
81
|
-
export
|
|
82
|
-
export {
|
|
83
|
-
export type { FeatureJSON, FeatureListener, Schedule, JobPayload, JobState, ScheduledJob, JobStore, JobCallback, AddJobOptions, IScheduler, SchedulerOptions, ScheduleFireCallback, MemoryScheduleRegistration, ScheduleEngineOptions, JobContext, ResolvedJob, ScheduleKind, } from '@zhin.js/kernel';
|
|
41
|
+
export { ScheduleEngine, Scheduler, } from '@zhin.js/kernel';
|
|
42
|
+
export type { Schedule, JobPayload, JobState, ScheduledJob, JobStore, JobCallback, AddJobOptions, IScheduler, SchedulerOptions, ScheduleFireCallback, MemoryScheduleRegistration, ScheduleEngineOptions, JobContext, ResolvedJob, ScheduleKind, } from '@zhin.js/kernel';
|
package/lib/index.js
CHANGED
|
@@ -2,76 +2,40 @@
|
|
|
2
2
|
* Canonical IM messages, Endpoints, rendering, and plugin-facing core types.
|
|
3
3
|
* @module @zhin.js/core
|
|
4
4
|
*/
|
|
5
|
-
// ── Core 类模块 ──────────────────────────────────────────────────────
|
|
6
|
-
export * from './endpoint.js';
|
|
7
|
-
export * from './endpoint-capabilities.js';
|
|
8
|
-
export * from './plugin.js';
|
|
9
|
-
export * from './command.js';
|
|
10
5
|
export * from './component.js';
|
|
11
|
-
export * from './adapter.js';
|
|
12
6
|
export * from './message.js';
|
|
13
7
|
export * from './im-scene.js';
|
|
14
8
|
export * from './notice.js';
|
|
15
9
|
export * from './request.js';
|
|
16
10
|
export * from './system-event.js';
|
|
17
11
|
export * from './side-event/index.js';
|
|
18
|
-
export * from './schema-interaction.js';
|
|
19
12
|
export * from './types.js';
|
|
20
13
|
export * from './utils.js';
|
|
21
14
|
export * from './errors.js';
|
|
22
15
|
// ── Built 模块 ──────────────────────────────────────────────────────
|
|
23
|
-
export * from './built/config.js';
|
|
24
|
-
export * from './built/command.js';
|
|
25
|
-
export * from './built/schedule.js';
|
|
26
16
|
// Models
|
|
27
17
|
export * from './models/system-log.js';
|
|
28
18
|
export * from './models/user.js';
|
|
29
|
-
export * from './built/permit-parse.js';
|
|
30
|
-
export * from './built/permit-check.js';
|
|
31
|
-
export * from './built/platform-permit.js';
|
|
32
|
-
export * from './built/authorization.js';
|
|
33
19
|
export * from './built/message-enrich.js';
|
|
34
|
-
export * from './built/
|
|
35
|
-
export * from './built/database.js';
|
|
36
|
-
export * from './built/message-filter.js';
|
|
37
|
-
export * from './built/tool.js';
|
|
38
|
-
export * from './built/skill.js';
|
|
39
|
-
export * from './built/agent-preset.js';
|
|
20
|
+
export * from './built/tool-access.js';
|
|
40
21
|
export * from './built/common-adapter-tools.js';
|
|
41
22
|
export * from './built/roles.js';
|
|
42
23
|
export * from './im-session-id.js';
|
|
43
24
|
export * from './built/ai-trigger.js';
|
|
44
25
|
export * from './built/ai-access.js';
|
|
45
|
-
export * from './built/dispatcher.js';
|
|
46
|
-
export * from './built/schema-feature.js';
|
|
47
26
|
export * from './built/login-assist.js';
|
|
48
27
|
export * from './built/generated-qrcode.js';
|
|
49
|
-
export
|
|
28
|
+
export { markdownToPlainText } from './built/rich-segments/markdown-to-text.js';
|
|
50
29
|
export * from './built/interactive-segments/index.js';
|
|
51
30
|
export * from './built/user-interaction.js';
|
|
52
31
|
export * from './built/ai-outbound/index.js';
|
|
53
|
-
export { loadHtmlRenderer, seedHtmlRenderer, HTML_RENDERER_PACKAGE } from './built/html-renderer-loader.js';
|
|
54
|
-
export { loadSpeechPipeline, seedSpeechPipeline, SPEECH_PACKAGE } from './built/speech-loader.js';
|
|
55
32
|
export * from './built/outbound-media-utils.js';
|
|
56
|
-
export * from './built/outbound-media-contract.js';
|
|
57
|
-
export * from './built/interactive-segment-contract.js';
|
|
58
33
|
export * from './built/segment-contract/index.js';
|
|
59
34
|
export * from './built/generic-segment-mapper.js';
|
|
60
|
-
export * from './built/adapter-process.js';
|
|
61
|
-
export * from './built/component.js';
|
|
62
|
-
export * from './built/inbound-runner.js';
|
|
63
|
-
export * from './built/connect-endpoint-instance.js';
|
|
64
|
-
export * from './built/endpoint-lifecycle.js';
|
|
65
|
-
export * from './built/endpoint-manager.js';
|
|
66
|
-
export * from './built/endpoint-lifecycle-service.js';
|
|
67
|
-
export * from './built/schema-endpoint-manager.js';
|
|
68
|
-
export * from './built/endpoint-commands.js';
|
|
69
|
-
export * from './built/introspection-format.js';
|
|
70
|
-
export * from './built/management-command-guard.js';
|
|
71
35
|
export * from './built/html-to-text.js';
|
|
72
36
|
export * from './built/html-segment-fallback.js';
|
|
73
37
|
// ── 外部库 re-export ──────────────────────────────────────────────────
|
|
74
38
|
export * from '@zhin.js/database';
|
|
75
39
|
export * from '@zhin.js/logger';
|
|
76
40
|
export { Schema } from '@zhin.js/schema';
|
|
77
|
-
export {
|
|
41
|
+
export { ScheduleEngine, Scheduler, } from '@zhin.js/kernel';
|
package/lib/message.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { MessageElement, MessageSender, SendContent } from "./types.js";
|
|
2
2
|
import { Component } from "./component.js";
|
|
3
|
-
import { Adapters } from "./adapter.js";
|
|
4
3
|
/**
|
|
5
4
|
* 消息组件类型:用于自定义消息结构
|
|
6
5
|
*/
|
|
@@ -35,7 +34,7 @@ export type MessageType = 'group' | 'private' | 'channel';
|
|
|
35
34
|
*/
|
|
36
35
|
export interface MessageBase {
|
|
37
36
|
$id: string;
|
|
38
|
-
$adapter:
|
|
37
|
+
$adapter: string;
|
|
39
38
|
$endpoint: string;
|
|
40
39
|
$content: MessageElement[];
|
|
41
40
|
$sender: MessageSender;
|
package/lib/models/system-log.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
id: { type: 'integer', autoIncrement: true, primary: true },
|
|
3
|
-
level: { type: 'text', nullable: false },
|
|
4
|
-
name: { type: 'text', nullable: false },
|
|
5
|
-
message: { type: 'text', nullable: false },
|
|
6
|
-
source: { type: 'text', nullable: false },
|
|
7
|
-
timestamp: { type: 'date', nullable: false }
|
|
8
|
-
};
|
|
1
|
+
export {};
|
package/lib/models/user.d.ts
CHANGED
package/lib/models/user.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
id: { type: "text", nullable: false },
|
|
3
|
-
name: { type: 'text', nullable: true },
|
|
4
|
-
password: { type: 'text', nullable: true },
|
|
5
|
-
third_part: { type: 'json', default: [] },
|
|
6
|
-
permissions: { type: 'json', default: [] }
|
|
7
|
-
};
|
|
1
|
+
export {};
|
package/lib/notice.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Adapters } from './adapter.js';
|
|
2
1
|
import type { NoticeKind } from './side-event/types.js';
|
|
3
2
|
import type { SideEventBase } from './side-event/base.js';
|
|
4
3
|
export type { NoticeKind, ComposedNoticeName } from './side-event/types.js';
|
|
@@ -26,7 +25,7 @@ export { composeSideEventName, formatSideEventName, matchesSideEventName, parseS
|
|
|
26
25
|
* ```
|
|
27
26
|
*/
|
|
28
27
|
export interface NoticeBase extends SideEventBase {
|
|
29
|
-
$adapter:
|
|
28
|
+
$adapter: string;
|
|
30
29
|
$type: NoticeKind;
|
|
31
30
|
}
|
|
32
31
|
/**
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ConversationContextBlock, type ConversationEventReader, type ConversationEventStore, type ConversationReference, type ConversationResolution, type ConversationRef, type DeliveryReceipt } from '@zhin.js/im-contract';
|
|
2
|
+
import type { Notice } from '../../notice.js';
|
|
3
|
+
import type { IncomingMessage, MessageSenderRef, SendRequest } from './contracts.js';
|
|
4
|
+
/** Owns one ImRuntime's conversation fact store, projections, and consumer cursors. */
|
|
5
|
+
export declare class ConversationRuntime {
|
|
6
|
+
#private;
|
|
7
|
+
constructor(events?: ConversationEventStore);
|
|
8
|
+
get reader(): ConversationEventReader;
|
|
9
|
+
replaceStore(events: ConversationEventStore): void;
|
|
10
|
+
resolveLocal(reference: ConversationReference): Promise<ConversationResolution | undefined>;
|
|
11
|
+
readContext(conversation: ConversationRef, consumer: string, throughSequence: number, limit?: number, excludeMessageId?: string): Promise<Readonly<{
|
|
12
|
+
blocks: readonly ConversationContextBlock[];
|
|
13
|
+
cursor: number;
|
|
14
|
+
}>>;
|
|
15
|
+
commitContext(conversation: ConversationRef, consumer: string, cursor: number): Promise<void>;
|
|
16
|
+
recordIncoming(input: IncomingMessage, sender: MessageSenderRef | undefined): Promise<number | undefined>;
|
|
17
|
+
recordOutbound(request: SendRequest, receipt: DeliveryReceipt): Promise<void>;
|
|
18
|
+
recordNotice(notice: Notice): Promise<void>;
|
|
19
|
+
}
|