@moltzap/openclaw-channel 2026.511.0 → 2026.519.0
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/dist/context-log.d.ts +2 -21
- package/dist/context-log.d.ts.map +1 -1
- package/dist/context-log.js +46 -33
- package/dist/context-log.js.map +1 -1
- package/dist/openclaw-entry.d.ts +74 -40
- package/dist/openclaw-entry.d.ts.map +1 -1
- package/dist/openclaw-entry.js +562 -403
- package/dist/openclaw-entry.js.map +1 -1
- package/dist/test-utils/container-core.d.ts +14 -10
- package/dist/test-utils/container-core.d.ts.map +1 -1
- package/dist/test-utils/container-core.js +259 -135
- package/dist/test-utils/container-core.js.map +1 -1
- package/package.json +10 -4
- package/dist/format-cross-conv.d.ts +0 -13
- package/dist/format-cross-conv.d.ts.map +0 -1
- package/dist/format-cross-conv.js +0 -20
- package/dist/format-cross-conv.js.map +0 -1
- package/dist/mapping.d.ts +0 -34
- package/dist/mapping.d.ts.map +0 -1
- package/dist/mapping.js +0 -71
- package/dist/mapping.js.map +0 -1
package/dist/context-log.d.ts
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
1
2
|
import type { CrossConvMessage } from "@moltzap/client";
|
|
2
|
-
export interface OpenClawContextLogEntry {
|
|
3
|
-
readonly schemaVersion: 1;
|
|
4
|
-
readonly recordedAt: string;
|
|
5
|
-
readonly pid: number;
|
|
6
|
-
readonly cwd: string;
|
|
7
|
-
readonly stateDir?: string;
|
|
8
|
-
readonly accountId: string;
|
|
9
|
-
readonly accountAgentName?: string;
|
|
10
|
-
readonly ownAgentId?: string;
|
|
11
|
-
readonly conversationId: string;
|
|
12
|
-
readonly conversationName?: string;
|
|
13
|
-
readonly conversationType: "direct" | "group";
|
|
14
|
-
readonly from: string;
|
|
15
|
-
readonly to: string;
|
|
16
|
-
readonly body: string;
|
|
17
|
-
readonly bodyForAgent: string;
|
|
18
|
-
readonly crossConversationMessageCount: number;
|
|
19
|
-
readonly crossConversationMessages: readonly CrossConvMessage[];
|
|
20
|
-
}
|
|
21
3
|
export interface OpenClawContextLogInput {
|
|
22
4
|
readonly logDir: string | undefined;
|
|
23
5
|
readonly accountId: string;
|
|
@@ -32,6 +14,5 @@ export interface OpenClawContextLogInput {
|
|
|
32
14
|
readonly bodyForAgent: string;
|
|
33
15
|
readonly crossConversationMessages: readonly CrossConvMessage[];
|
|
34
16
|
}
|
|
35
|
-
export declare function
|
|
36
|
-
export declare function writeOpenClawContextLog(input: OpenClawContextLogInput): void;
|
|
17
|
+
export declare function writeOpenClawContextLog(input: OpenClawContextLogInput): Effect.Effect<void, unknown, never>;
|
|
37
18
|
//# sourceMappingURL=context-log.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-log.d.ts","sourceRoot":"","sources":["../src/context-log.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context-log.d.ts","sourceRoot":"","sources":["../src/context-log.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0B,MAAM,EAAU,MAAM,QAAQ,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAsBxD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,gBAAgB,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,yBAAyB,EAAE,SAAS,gBAAgB,EAAE,CAAC;CACjE;AAqCD,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,uBAAuB,GAC7B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CA2CrC"}
|
package/dist/context-log.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { FileSystem, Path } from "@effect/platform";
|
|
2
|
+
import { NodeFileSystem, NodePath } from "@effect/platform-node";
|
|
3
3
|
import { Config, ConfigProvider, Effect, Option } from "effect";
|
|
4
4
|
function sanitizePathPart(value) {
|
|
5
5
|
const sanitized = value.replace(/[^a-zA-Z0-9._-]+/g, "_");
|
|
@@ -7,40 +7,53 @@ function sanitizePathPart(value) {
|
|
|
7
7
|
}
|
|
8
8
|
const OpenClawStateDir = Config.option(Config.string("OPENCLAW_STATE_DIR"));
|
|
9
9
|
const getOpenClawStateDir = () => Option.getOrUndefined(Effect.runSync(OpenClawStateDir.pipe(Effect.withConfigProvider(ConfigProvider.fromEnv()))));
|
|
10
|
-
|
|
10
|
+
function contextLogPath(logDir, accountAgentName) {
|
|
11
11
|
const stateDir = getOpenClawStateDir();
|
|
12
|
-
const stateName = stateDir ? path.basename(stateDir) : `pid-${process.pid}`;
|
|
13
12
|
const agentName = accountAgentName ?? "agent";
|
|
14
|
-
return
|
|
13
|
+
return Path.Path.pipe(Effect.map((path) => {
|
|
14
|
+
const stateName = stateDir
|
|
15
|
+
? path.basename(stateDir)
|
|
16
|
+
: `pid-${process.pid}`;
|
|
17
|
+
return path.join(logDir, `${sanitizePathPart(agentName)}.${sanitizePathPart(stateName)}.${process.pid}.contexts.jsonl`);
|
|
18
|
+
}));
|
|
15
19
|
}
|
|
16
20
|
export function writeOpenClawContextLog(input) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
? {
|
|
29
|
-
:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
21
|
+
const logDir = input.logDir;
|
|
22
|
+
if (!logDir)
|
|
23
|
+
return Effect.void;
|
|
24
|
+
return Effect.gen(function* () {
|
|
25
|
+
const fileSystem = yield* FileSystem.FileSystem;
|
|
26
|
+
const stateDir = getOpenClawStateDir();
|
|
27
|
+
const entry = {
|
|
28
|
+
schemaVersion: 1,
|
|
29
|
+
recordedAt: new Date().toISOString(),
|
|
30
|
+
pid: process.pid,
|
|
31
|
+
cwd: process.cwd(),
|
|
32
|
+
...(stateDir !== undefined ? { stateDir } : {}),
|
|
33
|
+
accountId: input.accountId,
|
|
34
|
+
...(input.accountAgentName !== undefined
|
|
35
|
+
? { accountAgentName: input.accountAgentName }
|
|
36
|
+
: {}),
|
|
37
|
+
...(input.ownAgentId !== undefined
|
|
38
|
+
? { ownAgentId: input.ownAgentId }
|
|
39
|
+
: {}),
|
|
40
|
+
conversationId: input.conversationId,
|
|
41
|
+
...(input.conversationName !== undefined
|
|
42
|
+
? { conversationName: input.conversationName }
|
|
43
|
+
: {}),
|
|
44
|
+
conversationType: input.conversationType,
|
|
45
|
+
from: input.from,
|
|
46
|
+
to: input.to,
|
|
47
|
+
body: input.body,
|
|
48
|
+
bodyForAgent: input.bodyForAgent,
|
|
49
|
+
crossConversationMessageCount: input.crossConversationMessages.length,
|
|
50
|
+
crossConversationMessages: input.crossConversationMessages,
|
|
51
|
+
};
|
|
52
|
+
yield* fileSystem.makeDirectory(logDir, { recursive: true });
|
|
53
|
+
const file = yield* contextLogPath(logDir, input.accountAgentName);
|
|
54
|
+
yield* fileSystem.writeFileString(file, `${JSON.stringify(entry)}\n`, {
|
|
55
|
+
flag: "a",
|
|
56
|
+
});
|
|
57
|
+
}).pipe(Effect.withSpan("writeOpenClawContextLog"), Effect.provide(NodePath.layer), Effect.provide(NodeFileSystem.layer));
|
|
45
58
|
}
|
|
46
59
|
//# sourceMappingURL=context-log.js.map
|
package/dist/context-log.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-log.js","sourceRoot":"","sources":["../src/context-log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"context-log.js","sourceRoot":"","sources":["../src/context-log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAsChE,SAAS,gBAAgB,CAAC,KAAa;IACrC,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;IAC1D,OAAO,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;AACtD,CAAC;AAED,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC;AAE5E,MAAM,mBAAmB,GAAG,GAAuB,EAAE,CACnD,MAAM,CAAC,cAAc,CACnB,MAAM,CAAC,OAAO,CACZ,gBAAgB,CAAC,IAAI,CACnB,MAAM,CAAC,kBAAkB,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC,CACpD,CACF,CACF,CAAC;AAEJ,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B,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CACrC,CAAC;AACJ,CAAC"}
|
package/dist/openclaw-entry.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Wraps the existing MoltZapWsClient + mapping modules into the
|
|
5
5
|
* ChannelPlugin shape expected by OpenClaw's api.registerChannel().
|
|
6
6
|
*
|
|
7
|
-
* Installed via: openclaw plugin install
|
|
7
|
+
* Installed via: openclaw plugin install `@moltzap/openclaw-channel`
|
|
8
8
|
* Config: channels.moltzap.accounts[].{apiKey, serverUrl, agentName}
|
|
9
9
|
*
|
|
10
10
|
* OpenClaw's plugin interface imposes Promise-based contracts at the boundary
|
|
@@ -12,13 +12,40 @@
|
|
|
12
12
|
* those shapes are fixed. Internally we use Effect and only pay the
|
|
13
13
|
* `Effect.runPromise` tax at the plugin surface.
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
import { MoltZapChannelCore, type ChannelService, type ServiceRpcError } from "@moltzap/client";
|
|
16
|
+
import { LeaseAlreadyConsumed } from "@moltzap/client/channel-base";
|
|
17
|
+
import { Effect } from "effect";
|
|
18
|
+
import { type ParamsOf, type ResultOf, type RpcDefinition } from "@moltzap/protocol";
|
|
19
|
+
declare const OpenClawTargetResolved_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Readonly<A> & {
|
|
20
|
+
readonly _tag: "OpenClawTargetResolved";
|
|
21
|
+
};
|
|
22
|
+
declare class OpenClawTargetResolved extends OpenClawTargetResolved_base<{
|
|
23
|
+
readonly to: string;
|
|
24
|
+
}> {
|
|
25
|
+
readonly ok: true;
|
|
26
|
+
}
|
|
27
|
+
declare const OpenClawTargetRejected_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Readonly<A> & {
|
|
28
|
+
readonly _tag: "OpenClawTargetRejected";
|
|
29
|
+
};
|
|
30
|
+
declare class OpenClawTargetRejected extends OpenClawTargetRejected_base<{
|
|
31
|
+
readonly error: Error;
|
|
32
|
+
}> {
|
|
33
|
+
readonly ok: false;
|
|
34
|
+
}
|
|
35
|
+
type OpenClawTargetResolveResult = OpenClawTargetResolved | OpenClawTargetRejected;
|
|
36
|
+
declare const OpenClawSendTextSuccess_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Readonly<A> & {
|
|
37
|
+
readonly _tag: "OpenClawSendTextSuccess";
|
|
38
|
+
};
|
|
39
|
+
declare class OpenClawSendTextSuccess extends OpenClawSendTextSuccess_base<{}> {
|
|
40
|
+
readonly ok: true;
|
|
41
|
+
}
|
|
42
|
+
declare const OpenClawSendTextFailure_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Readonly<A> & {
|
|
43
|
+
readonly _tag: "OpenClawSendTextFailure";
|
|
44
|
+
};
|
|
45
|
+
declare class OpenClawSendTextFailure extends OpenClawSendTextFailure_base<{
|
|
46
|
+
readonly error: Error;
|
|
20
47
|
}> {
|
|
21
|
-
|
|
48
|
+
readonly ok: false;
|
|
22
49
|
}
|
|
23
50
|
type MoltZapAccount = {
|
|
24
51
|
id: string;
|
|
@@ -72,12 +99,46 @@ type OpenClawStopAccountContext = {
|
|
|
72
99
|
accountId: string;
|
|
73
100
|
log?: Pick<OpenClawLogger, "info">;
|
|
74
101
|
};
|
|
102
|
+
interface OpenClawClientService extends ChannelService {
|
|
103
|
+
sendRpc?<D extends RpcDefinition<string, any, any>>(definition: D, params: ParamsOf<D>): Effect.Effect<ResultOf<D>, ServiceRpcError>;
|
|
104
|
+
sendToAgent?(agentName: string, text: string, opts?: {
|
|
105
|
+
replyTo?: string;
|
|
106
|
+
}): Effect.Effect<void, unknown>;
|
|
107
|
+
}
|
|
108
|
+
interface MoltzapChannelPluginDeps {
|
|
109
|
+
readonly createService?: (account: MoltZapAccount) => OpenClawClientService;
|
|
110
|
+
readonly createCore?: (service: ChannelService) => MoltZapChannelCore;
|
|
111
|
+
/**
|
|
112
|
+
* Invoked when the dispatch lease was already consumed (single-use
|
|
113
|
+
* semantics). Deliver still returns `false` per the
|
|
114
|
+
* `OpenClawDeliver: PromiseLike<boolean>` contract; this callback is
|
|
115
|
+
* the side-channel for hosts that want the typed `LeaseAlreadyConsumed`
|
|
116
|
+
* error without violating that contract. Threaded from
|
|
117
|
+
* `createMoltzapChannelPlugin` deps through `createGatewaySection` and
|
|
118
|
+
* `registerInboundHandler` into the `createLeaseConsumingDeliver`
|
|
119
|
+
* closure. See spec C (#597) AC and arch sub-issue #605 §5.6.
|
|
120
|
+
*/
|
|
121
|
+
readonly onLeaseConsumed?: (err: LeaseAlreadyConsumed) => void;
|
|
122
|
+
}
|
|
123
|
+
interface OpenClawDirectoryParams {
|
|
124
|
+
readonly cfg: OpenClawConfig;
|
|
125
|
+
readonly accountId?: string | null;
|
|
126
|
+
readonly query?: string | null;
|
|
127
|
+
readonly limit?: number | null;
|
|
128
|
+
}
|
|
129
|
+
interface OpenClawResolveTargetParams {
|
|
130
|
+
readonly cfg: OpenClawConfig;
|
|
131
|
+
readonly accountId?: string | null;
|
|
132
|
+
readonly input: string;
|
|
133
|
+
readonly normalized: string;
|
|
134
|
+
readonly preferredKind?: "user" | "group" | "channel";
|
|
135
|
+
}
|
|
75
136
|
/**
|
|
76
137
|
* Factory: returns a fresh plugin object whose `activeClients` map lives in
|
|
77
138
|
* this closure. `register(api)` calls this so each registration gets its own
|
|
78
139
|
* per-plugin state, eliminating module-level mutable globals.
|
|
79
140
|
*/
|
|
80
|
-
export declare function createMoltzapChannelPlugin(): {
|
|
141
|
+
export declare function createMoltzapChannelPlugin(deps?: MoltzapChannelPluginDeps): {
|
|
81
142
|
id: "moltzap";
|
|
82
143
|
meta: {
|
|
83
144
|
id: "moltzap";
|
|
@@ -97,13 +158,7 @@ export declare function createMoltzapChannelPlugin(): {
|
|
|
97
158
|
targetResolver: {
|
|
98
159
|
looksLikeId(raw: string): boolean;
|
|
99
160
|
hint: string;
|
|
100
|
-
resolveTarget(params: {
|
|
101
|
-
cfg: OpenClawConfig;
|
|
102
|
-
accountId?: string | null;
|
|
103
|
-
input: string;
|
|
104
|
-
normalized: string;
|
|
105
|
-
preferredKind?: "user" | "group" | "channel";
|
|
106
|
-
}): Promise<null> | Promise<{
|
|
161
|
+
resolveTarget(params: OpenClawResolveTargetParams): Promise<null> | Promise<{
|
|
107
162
|
to: string;
|
|
108
163
|
kind: "group" | "user";
|
|
109
164
|
display: string;
|
|
@@ -112,22 +167,12 @@ export declare function createMoltzapChannelPlugin(): {
|
|
|
112
167
|
};
|
|
113
168
|
};
|
|
114
169
|
directory: {
|
|
115
|
-
listPeers(params: {
|
|
116
|
-
cfg: OpenClawConfig;
|
|
117
|
-
accountId?: string | null;
|
|
118
|
-
query?: string | null;
|
|
119
|
-
limit?: number | null;
|
|
120
|
-
}): Promise<never[] | {
|
|
170
|
+
listPeers(params: OpenClawDirectoryParams): Promise<never[] | {
|
|
121
171
|
id: string;
|
|
122
172
|
name: string;
|
|
123
173
|
kind: "user";
|
|
124
174
|
}[]>;
|
|
125
|
-
listGroups(params: {
|
|
126
|
-
cfg: OpenClawConfig;
|
|
127
|
-
accountId?: string | null;
|
|
128
|
-
query?: string | null;
|
|
129
|
-
limit?: number | null;
|
|
130
|
-
}): Promise<never[] | {
|
|
175
|
+
listGroups(params: OpenClawDirectoryParams): Promise<never[] | {
|
|
131
176
|
id: string;
|
|
132
177
|
name: string;
|
|
133
178
|
kind: "group";
|
|
@@ -151,25 +196,14 @@ export declare function createMoltzapChannelPlugin(): {
|
|
|
151
196
|
cfg?: OpenClawConfig;
|
|
152
197
|
accountId?: string | null;
|
|
153
198
|
mode?: string;
|
|
154
|
-
}):
|
|
155
|
-
ok: true;
|
|
156
|
-
to: string;
|
|
157
|
-
} | {
|
|
158
|
-
ok: false;
|
|
159
|
-
error: Error;
|
|
160
|
-
};
|
|
199
|
+
}): OpenClawTargetResolveResult;
|
|
161
200
|
sendText(ctx: {
|
|
162
201
|
cfg: OpenClawConfig;
|
|
163
202
|
to: string;
|
|
164
203
|
text: string;
|
|
165
204
|
accountId?: string | null;
|
|
166
205
|
replyToId?: string;
|
|
167
|
-
}): Promise<
|
|
168
|
-
ok: true;
|
|
169
|
-
} | {
|
|
170
|
-
ok: false;
|
|
171
|
-
error: Error | MoltZapClientNotConnectedError | import("@moltzap/client").AgentNotFoundError;
|
|
172
|
-
}>;
|
|
206
|
+
}): Promise<OpenClawSendTextSuccess | OpenClawSendTextFailure>;
|
|
173
207
|
};
|
|
174
208
|
};
|
|
175
209
|
export type MoltzapChannelPlugin = ReturnType<typeof createMoltzapChannelPlugin>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openclaw-entry.d.ts","sourceRoot":"","sources":["../src/openclaw-entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;;;;
|
|
1
|
+
{"version":3,"file":"openclaw-entry.d.ts","sourceRoot":"","sources":["../src/openclaw-entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,kBAAkB,EAElB,KAAK,cAAc,EAGnB,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,oBAAoB,EAMrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAgC,MAAM,EAAU,MAAM,QAAQ,CAAC;AAKtE,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,aAAa,EACnB,MAAM,mBAAmB,CAAC;;;;AAmD3B,cAAM,sBAAuB,SAAQ,4BAEnC;IACA,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB,CAAC;I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