@privateclaw/privateclaw 0.1.24 → 0.1.26
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 +22 -0
- package/dist/bot-mode-topics.d.ts +7 -0
- package/dist/bot-mode-topics.js +236 -0
- package/dist/bot-mode-topics.js.map +1 -0
- package/dist/cli.js +24 -0
- package/dist/cli.js.map +1 -1
- package/dist/compat/openclaw.d.ts +14 -0
- package/dist/compat/openclaw.js +14 -0
- package/dist/compat/openclaw.js.map +1 -1
- package/dist/openclaw-plugin.d.ts +3 -0
- package/dist/openclaw-plugin.js +35 -0
- package/dist/openclaw-plugin.js.map +1 -1
- package/dist/provider.d.ts +19 -1
- package/dist/provider.js +579 -140
- package/dist/provider.js.map +1 -1
- package/dist/types.d.ts +15 -0
- package/openclaw.plugin.json +15 -1
- package/package.json +1 -1
- package/src/bot-mode-topics.test.ts +39 -0
- package/src/bot-mode-topics.ts +248 -0
- package/src/cli.ts +33 -0
- package/src/compat/openclaw.ts +15 -0
- package/src/openclaw-plugin.test.ts +3 -0
- package/src/openclaw-plugin.ts +46 -0
- package/src/provider.test.ts +794 -1
- package/src/provider.ts +775 -174
- package/src/types.ts +15 -0
package/src/types.ts
CHANGED
|
@@ -85,6 +85,9 @@ export interface PrivateClawProviderOptions {
|
|
|
85
85
|
defaultTtlMs?: number;
|
|
86
86
|
providerLabel?: string;
|
|
87
87
|
welcomeMessage?: string;
|
|
88
|
+
botMode?: boolean;
|
|
89
|
+
botModeSilentJoinDelayMs?: number;
|
|
90
|
+
botModeIdleDelayMs?: number;
|
|
88
91
|
commandsProvider?: () => Promise<PrivateClawSlashCommand[]>;
|
|
89
92
|
verboseController?: PrivateClawVerboseController;
|
|
90
93
|
onLog?: (message: string) => void;
|
|
@@ -92,6 +95,8 @@ export interface PrivateClawProviderOptions {
|
|
|
92
95
|
|
|
93
96
|
export interface ProviderParticipantState extends PrivateClawParticipant {
|
|
94
97
|
lastSeenAt: string;
|
|
98
|
+
lastUserMessageAt?: string;
|
|
99
|
+
botModeSilentJoinPromptSentAt?: string;
|
|
95
100
|
supportsThinkingTrace?: boolean;
|
|
96
101
|
}
|
|
97
102
|
|
|
@@ -124,12 +129,18 @@ export interface ProviderSessionState {
|
|
|
124
129
|
participants: Map<string, ProviderParticipantState>;
|
|
125
130
|
removedParticipantAppIds: Set<string>;
|
|
126
131
|
state: "awaiting_hello" | "active";
|
|
132
|
+
lastGroupActivityAt?: string;
|
|
133
|
+
botModeIdleAnchorAt?: string;
|
|
134
|
+
botModeLastIdlePromptAt?: string;
|
|
135
|
+
botModeLastIdleTopicId?: string;
|
|
127
136
|
pendingRenewal?: {
|
|
128
137
|
expiresAt: string;
|
|
129
138
|
sentAt: string;
|
|
130
139
|
};
|
|
131
140
|
renewalReminderSentAt?: string;
|
|
132
141
|
renewalReminderTimer?: ReturnType<typeof setTimeout>;
|
|
142
|
+
botModeIdleTimer?: ReturnType<typeof setTimeout>;
|
|
143
|
+
botModeSilentJoinTimers?: Map<string, ReturnType<typeof setTimeout>>;
|
|
133
144
|
}
|
|
134
145
|
|
|
135
146
|
export interface PrivateClawProviderSessionHandoff {
|
|
@@ -146,6 +157,10 @@ export interface PrivateClawProviderSessionHandoff {
|
|
|
146
157
|
sentAt: string;
|
|
147
158
|
};
|
|
148
159
|
renewalReminderSentAt?: string;
|
|
160
|
+
lastGroupActivityAt?: string;
|
|
161
|
+
botModeIdleAnchorAt?: string;
|
|
162
|
+
botModeLastIdlePromptAt?: string;
|
|
163
|
+
botModeLastIdleTopicId?: string;
|
|
149
164
|
}
|
|
150
165
|
|
|
151
166
|
export interface PrivateClawProviderHandoffState {
|