@53ai/53ai-openclaw 1.0.6 → 1.0.8
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 +6 -0
- package/README.md +10 -10
- package/dist/index.cjs.js +91 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +91 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/src/compaction-hooks.d.ts +25 -0
- package/dist/src/message-sender.d.ts +1 -0
- package/dist/src/utils.d.ts +2 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface BeforeCompactionEvent {
|
|
2
|
+
messageCount: number;
|
|
3
|
+
compactingCount?: number;
|
|
4
|
+
tokenCount?: number;
|
|
5
|
+
messages?: unknown[];
|
|
6
|
+
sessionFile?: string;
|
|
7
|
+
}
|
|
8
|
+
interface AfterCompactionEvent {
|
|
9
|
+
messageCount: number;
|
|
10
|
+
tokenCount?: number;
|
|
11
|
+
compactedCount: number;
|
|
12
|
+
sessionFile?: string;
|
|
13
|
+
}
|
|
14
|
+
interface AgentContext {
|
|
15
|
+
agentId?: string;
|
|
16
|
+
sessionKey?: string;
|
|
17
|
+
sessionId?: string;
|
|
18
|
+
workspaceDir?: string;
|
|
19
|
+
messageProvider?: string;
|
|
20
|
+
trigger?: string;
|
|
21
|
+
channelId?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function handleBeforeCompaction(event: BeforeCompactionEvent, ctx: AgentContext): Promise<void>;
|
|
24
|
+
export declare function handleAfterCompaction(event: AfterCompactionEvent, ctx: AgentContext): Promise<void>;
|
|
25
|
+
export {};
|
|
@@ -12,6 +12,7 @@ interface SendReplyParams {
|
|
|
12
12
|
isError?: boolean;
|
|
13
13
|
errorCode?: ErrorCode | string;
|
|
14
14
|
errorDetails?: string;
|
|
15
|
+
isThinking?: boolean;
|
|
15
16
|
}
|
|
16
17
|
export declare function sendReply(params: SendReplyParams): Promise<void>;
|
|
17
18
|
export declare function sendDirectMessage(wsClient: WebSocket, to: string, content: string, runtime?: RuntimeEnv): Promise<void>;
|
package/dist/src/utils.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface AIHubConfig {
|
|
|
16
16
|
/** 访问令牌 */
|
|
17
17
|
token?: string;
|
|
18
18
|
/** WebSocket URL */
|
|
19
|
-
|
|
19
|
+
WSUrl?: string;
|
|
20
20
|
/** 访问控制白名单 */
|
|
21
21
|
allowFrom?: Array<string | number>;
|
|
22
22
|
/** 访问策略: open=开放, allowlist=白名单, pairing=配对审批 */
|
|
@@ -31,7 +31,7 @@ export interface ResolvedAccount {
|
|
|
31
31
|
accountId: string;
|
|
32
32
|
name: string;
|
|
33
33
|
enabled: boolean;
|
|
34
|
-
|
|
34
|
+
WSUrl: string;
|
|
35
35
|
botId: string;
|
|
36
36
|
secret: string;
|
|
37
37
|
token: string;
|
package/openclaw.plugin.json
CHANGED