clawdbot 2026.1.4-1 → 2026.1.5-1
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 +32 -6
- package/README.md +26 -1
- package/dist/agents/pi-embedded-runner.js +2 -0
- package/dist/agents/pi-embedded-subscribe.js +18 -3
- package/dist/agents/pi-tools.js +45 -6
- package/dist/agents/tools/browser-tool.js +38 -89
- package/dist/agents/tools/cron-tool.js +8 -8
- package/dist/agents/workspace.js +8 -1
- package/dist/auto-reply/command-detection.js +26 -0
- package/dist/auto-reply/reply/agent-runner.js +15 -8
- package/dist/auto-reply/reply/commands.js +36 -25
- package/dist/auto-reply/reply/directive-handling.js +4 -2
- package/dist/auto-reply/reply/directives.js +12 -0
- package/dist/auto-reply/reply/session-updates.js +2 -4
- package/dist/auto-reply/reply.js +26 -4
- package/dist/browser/config.js +22 -4
- package/dist/browser/profiles-service.js +3 -1
- package/dist/browser/profiles.js +14 -3
- package/dist/canvas-host/a2ui/.bundle.hash +2 -0
- package/dist/cli/gateway-cli.js +2 -2
- package/dist/cli/profile.js +81 -0
- package/dist/cli/program.js +10 -1
- package/dist/cli/run-main.js +33 -0
- package/dist/commands/configure.js +5 -0
- package/dist/commands/onboard-providers.js +1 -1
- package/dist/commands/setup.js +4 -1
- package/dist/config/defaults.js +56 -0
- package/dist/config/io.js +47 -6
- package/dist/config/paths.js +2 -2
- package/dist/config/port-defaults.js +32 -0
- package/dist/config/sessions.js +3 -2
- package/dist/config/validation.js +2 -2
- package/dist/config/zod-schema.js +16 -0
- package/dist/discord/monitor.js +75 -266
- package/dist/entry.js +16 -0
- package/dist/gateway/call.js +8 -1
- package/dist/gateway/server-methods/chat.js +1 -1
- package/dist/gateway/server.js +14 -3
- package/dist/index.js +2 -2
- package/dist/infra/control-ui-assets.js +118 -0
- package/dist/infra/dotenv.js +15 -0
- package/dist/infra/shell-env.js +79 -0
- package/dist/infra/system-events.js +50 -23
- package/dist/macos/relay.js +8 -2
- package/dist/telegram/bot.js +24 -1
- package/dist/utils.js +8 -2
- package/dist/web/auto-reply.js +18 -21
- package/dist/web/inbound.js +5 -1
- package/dist/web/qr-image.js +4 -4
- package/dist/web/session.js +2 -3
- package/docs/agent.md +0 -2
- package/docs/assets/markdown.css +4 -1
- package/docs/audio.md +0 -2
- package/docs/clawd.md +0 -2
- package/docs/configuration.md +62 -3
- package/docs/docs.json +9 -1
- package/docs/faq.md +32 -7
- package/docs/gateway.md +28 -0
- package/docs/images.md +0 -2
- package/docs/index.md +2 -4
- package/docs/mac/icon.md +1 -1
- package/docs/nix.md +57 -11
- package/docs/onboarding.md +0 -2
- package/docs/refactor/webagent-session.md +0 -2
- package/docs/research/memory.md +1 -1
- package/docs/skills.md +0 -2
- package/docs/templates/AGENTS.md +2 -2
- package/docs/tools.md +15 -0
- package/docs/whatsapp.md +2 -0
- package/package.json +9 -16
- package/dist/control-ui/assets/index-BFID3yAA.css +0 -1
- package/dist/control-ui/assets/index-CE_axlTS.js +0 -2235
- package/dist/control-ui/assets/index-CE_axlTS.js.map +0 -1
- package/dist/control-ui/index.html +0 -15
- package/dist/daemon/constants.js +0 -10
- package/dist/daemon/launchd.js +0 -276
- package/dist/daemon/legacy.js +0 -63
- package/dist/daemon/program-args.js +0 -76
- package/dist/daemon/schtasks.js +0 -257
- package/dist/daemon/service.js +0 -60
- package/dist/daemon/systemd.js +0 -266
- package/dist/imessage/client.js +0 -165
- package/dist/imessage/index.js +0 -3
- package/dist/imessage/monitor.js +0 -272
- package/dist/imessage/probe.js +0 -26
- package/dist/imessage/send.js +0 -83
- package/dist/imessage/targets.js +0 -176
- package/dist/signal/client.js +0 -134
- package/dist/signal/daemon.js +0 -69
- package/dist/signal/index.js +0 -3
- package/dist/signal/monitor.js +0 -336
- package/dist/signal/probe.js +0 -46
- package/dist/signal/send.js +0 -91
- package/dist/slack/actions.js +0 -97
- package/dist/slack/index.js +0 -5
- package/dist/slack/monitor.js +0 -1029
- package/dist/slack/probe.js +0 -47
- package/dist/slack/send.js +0 -131
- package/dist/slack/token.js +0 -10
- package/dist/tui/commands.js +0 -74
- package/dist/tui/components/assistant-message.js +0 -16
- package/dist/tui/components/chat-log.js +0 -92
- package/dist/tui/components/custom-editor.js +0 -53
- package/dist/tui/components/selectors.js +0 -8
- package/dist/tui/components/tool-execution.js +0 -111
- package/dist/tui/components/user-message.js +0 -17
- package/dist/tui/gateway-chat.js +0 -140
- package/dist/tui/layout.js +0 -41
- package/dist/tui/message-list.js +0 -57
- package/dist/tui/theme/theme.js +0 -80
- package/dist/tui/theme.js +0 -25
- package/dist/tui/tui.js +0 -708
- package/dist/wizard/clack-prompter.js +0 -56
- package/dist/wizard/onboarding.js +0 -452
- package/dist/wizard/prompts.js +0 -6
- package/dist/wizard/session.js +0 -203
package/dist/wizard/session.js
DELETED
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { WizardCancelledError, } from "./prompts.js";
|
|
3
|
-
function createDeferred() {
|
|
4
|
-
let resolve;
|
|
5
|
-
let reject;
|
|
6
|
-
const promise = new Promise((res, rej) => {
|
|
7
|
-
resolve = res;
|
|
8
|
-
reject = rej;
|
|
9
|
-
});
|
|
10
|
-
return { promise, resolve, reject };
|
|
11
|
-
}
|
|
12
|
-
class WizardSessionPrompter {
|
|
13
|
-
session;
|
|
14
|
-
constructor(session) {
|
|
15
|
-
this.session = session;
|
|
16
|
-
}
|
|
17
|
-
async intro(title) {
|
|
18
|
-
await this.prompt({
|
|
19
|
-
type: "note",
|
|
20
|
-
title,
|
|
21
|
-
message: "",
|
|
22
|
-
executor: "client",
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
async outro(message) {
|
|
26
|
-
await this.prompt({
|
|
27
|
-
type: "note",
|
|
28
|
-
title: "Done",
|
|
29
|
-
message,
|
|
30
|
-
executor: "client",
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
async note(message, title) {
|
|
34
|
-
await this.prompt({ type: "note", title, message, executor: "client" });
|
|
35
|
-
}
|
|
36
|
-
async select(params) {
|
|
37
|
-
const res = await this.prompt({
|
|
38
|
-
type: "select",
|
|
39
|
-
message: params.message,
|
|
40
|
-
options: params.options.map((opt) => ({
|
|
41
|
-
value: opt.value,
|
|
42
|
-
label: opt.label,
|
|
43
|
-
hint: opt.hint,
|
|
44
|
-
})),
|
|
45
|
-
initialValue: params.initialValue,
|
|
46
|
-
executor: "client",
|
|
47
|
-
});
|
|
48
|
-
return res;
|
|
49
|
-
}
|
|
50
|
-
async multiselect(params) {
|
|
51
|
-
const res = await this.prompt({
|
|
52
|
-
type: "multiselect",
|
|
53
|
-
message: params.message,
|
|
54
|
-
options: params.options.map((opt) => ({
|
|
55
|
-
value: opt.value,
|
|
56
|
-
label: opt.label,
|
|
57
|
-
hint: opt.hint,
|
|
58
|
-
})),
|
|
59
|
-
initialValue: params.initialValues,
|
|
60
|
-
executor: "client",
|
|
61
|
-
});
|
|
62
|
-
return (Array.isArray(res) ? res : []);
|
|
63
|
-
}
|
|
64
|
-
async text(params) {
|
|
65
|
-
const res = await this.prompt({
|
|
66
|
-
type: "text",
|
|
67
|
-
message: params.message,
|
|
68
|
-
initialValue: params.initialValue,
|
|
69
|
-
placeholder: params.placeholder,
|
|
70
|
-
executor: "client",
|
|
71
|
-
});
|
|
72
|
-
const value = res === null || res === undefined
|
|
73
|
-
? ""
|
|
74
|
-
: typeof res === "string"
|
|
75
|
-
? res
|
|
76
|
-
: typeof res === "number" ||
|
|
77
|
-
typeof res === "boolean" ||
|
|
78
|
-
typeof res === "bigint"
|
|
79
|
-
? String(res)
|
|
80
|
-
: "";
|
|
81
|
-
const error = params.validate?.(value);
|
|
82
|
-
if (error) {
|
|
83
|
-
throw new Error(error);
|
|
84
|
-
}
|
|
85
|
-
return value;
|
|
86
|
-
}
|
|
87
|
-
async confirm(params) {
|
|
88
|
-
const res = await this.prompt({
|
|
89
|
-
type: "confirm",
|
|
90
|
-
message: params.message,
|
|
91
|
-
initialValue: params.initialValue,
|
|
92
|
-
executor: "client",
|
|
93
|
-
});
|
|
94
|
-
return Boolean(res);
|
|
95
|
-
}
|
|
96
|
-
progress(_label) {
|
|
97
|
-
return {
|
|
98
|
-
update: (_message) => { },
|
|
99
|
-
stop: (_message) => { },
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
async prompt(step) {
|
|
103
|
-
return await this.session.awaitAnswer({
|
|
104
|
-
...step,
|
|
105
|
-
id: randomUUID(),
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
export class WizardSession {
|
|
110
|
-
runner;
|
|
111
|
-
currentStep = null;
|
|
112
|
-
stepDeferred = null;
|
|
113
|
-
answerDeferred = new Map();
|
|
114
|
-
status = "running";
|
|
115
|
-
error;
|
|
116
|
-
constructor(runner) {
|
|
117
|
-
this.runner = runner;
|
|
118
|
-
const prompter = new WizardSessionPrompter(this);
|
|
119
|
-
void this.run(prompter);
|
|
120
|
-
}
|
|
121
|
-
async next() {
|
|
122
|
-
if (this.currentStep) {
|
|
123
|
-
return { done: false, step: this.currentStep, status: this.status };
|
|
124
|
-
}
|
|
125
|
-
if (this.status !== "running") {
|
|
126
|
-
return { done: true, status: this.status, error: this.error };
|
|
127
|
-
}
|
|
128
|
-
if (!this.stepDeferred) {
|
|
129
|
-
this.stepDeferred = createDeferred();
|
|
130
|
-
}
|
|
131
|
-
const step = await this.stepDeferred.promise;
|
|
132
|
-
if (step) {
|
|
133
|
-
return { done: false, step, status: this.status };
|
|
134
|
-
}
|
|
135
|
-
return { done: true, status: this.status, error: this.error };
|
|
136
|
-
}
|
|
137
|
-
async answer(stepId, value) {
|
|
138
|
-
const deferred = this.answerDeferred.get(stepId);
|
|
139
|
-
if (!deferred) {
|
|
140
|
-
throw new Error("wizard: no pending step");
|
|
141
|
-
}
|
|
142
|
-
this.answerDeferred.delete(stepId);
|
|
143
|
-
this.currentStep = null;
|
|
144
|
-
deferred.resolve(value);
|
|
145
|
-
}
|
|
146
|
-
cancel() {
|
|
147
|
-
if (this.status !== "running")
|
|
148
|
-
return;
|
|
149
|
-
this.status = "cancelled";
|
|
150
|
-
this.error = "cancelled";
|
|
151
|
-
this.currentStep = null;
|
|
152
|
-
for (const [, deferred] of this.answerDeferred) {
|
|
153
|
-
deferred.reject(new WizardCancelledError());
|
|
154
|
-
}
|
|
155
|
-
this.answerDeferred.clear();
|
|
156
|
-
this.resolveStep(null);
|
|
157
|
-
}
|
|
158
|
-
pushStep(step) {
|
|
159
|
-
this.currentStep = step;
|
|
160
|
-
this.resolveStep(step);
|
|
161
|
-
}
|
|
162
|
-
async run(prompter) {
|
|
163
|
-
try {
|
|
164
|
-
await this.runner(prompter);
|
|
165
|
-
this.status = "done";
|
|
166
|
-
}
|
|
167
|
-
catch (err) {
|
|
168
|
-
if (err instanceof WizardCancelledError) {
|
|
169
|
-
this.status = "cancelled";
|
|
170
|
-
this.error = err.message;
|
|
171
|
-
}
|
|
172
|
-
else {
|
|
173
|
-
this.status = "error";
|
|
174
|
-
this.error = String(err);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
finally {
|
|
178
|
-
this.resolveStep(null);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
async awaitAnswer(step) {
|
|
182
|
-
if (this.status !== "running") {
|
|
183
|
-
throw new Error("wizard: session not running");
|
|
184
|
-
}
|
|
185
|
-
this.pushStep(step);
|
|
186
|
-
const deferred = createDeferred();
|
|
187
|
-
this.answerDeferred.set(step.id, deferred);
|
|
188
|
-
return await deferred.promise;
|
|
189
|
-
}
|
|
190
|
-
resolveStep(step) {
|
|
191
|
-
if (!this.stepDeferred)
|
|
192
|
-
return;
|
|
193
|
-
const deferred = this.stepDeferred;
|
|
194
|
-
this.stepDeferred = null;
|
|
195
|
-
deferred.resolve(step);
|
|
196
|
-
}
|
|
197
|
-
getStatus() {
|
|
198
|
-
return this.status;
|
|
199
|
-
}
|
|
200
|
-
getError() {
|
|
201
|
-
return this.error;
|
|
202
|
-
}
|
|
203
|
-
}
|