visionclaw 0.1.83 → 0.1.85
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 +27 -0
- package/LICENSE +200 -0
- package/README.md +14 -4
- package/dist/agent/activity-tracker.d.ts +7 -0
- package/dist/agent/activity-tracker.d.ts.map +1 -1
- package/dist/agent/activity-tracker.js +8 -0
- package/dist/agent/activity-tracker.js.map +1 -1
- package/dist/agent/command-handlers.d.ts +22 -0
- package/dist/agent/command-handlers.d.ts.map +1 -0
- package/dist/agent/command-handlers.js +127 -0
- package/dist/agent/command-handlers.js.map +1 -0
- package/dist/agent/fast-responder.d.ts.map +1 -1
- package/dist/agent/fast-responder.js +6 -4
- package/dist/agent/fast-responder.js.map +1 -1
- package/dist/agent/loop.d.ts.map +1 -1
- package/dist/agent/loop.js +10 -90
- package/dist/agent/loop.js.map +1 -1
- package/dist/agent/session.d.ts +6 -0
- package/dist/agent/session.d.ts.map +1 -1
- package/dist/agent/session.js +3 -0
- package/dist/agent/session.js.map +1 -1
- package/dist/agent/status.d.ts +14 -0
- package/dist/agent/status.d.ts.map +1 -0
- package/dist/agent/status.js +230 -0
- package/dist/agent/status.js.map +1 -0
- package/dist/agent/stream-handler.d.ts.map +1 -1
- package/dist/agent/stream-handler.js +6 -0
- package/dist/agent/stream-handler.js.map +1 -1
- package/dist/channels/interface.d.ts +17 -0
- package/dist/channels/interface.d.ts.map +1 -1
- package/dist/channels/manager.d.ts.map +1 -1
- package/dist/channels/manager.js +6 -0
- package/dist/channels/manager.js.map +1 -1
- package/dist/channels/telegram.d.ts.map +1 -1
- package/dist/channels/telegram.js +21 -0
- package/dist/channels/telegram.js.map +1 -1
- package/dist/config/types.d.ts +5 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js +3 -0
- package/dist/config/types.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/obs/server.d.ts +2 -0
- package/dist/obs/server.d.ts.map +1 -1
- package/dist/obs/server.js +18 -1
- package/dist/obs/server.js.map +1 -1
- package/dist/obs/tunnel.d.ts +5 -1
- package/dist/obs/tunnel.d.ts.map +1 -1
- package/dist/obs/tunnel.js +60 -1
- package/dist/obs/tunnel.js.map +1 -1
- package/dist/obs/ui.d.ts.map +1 -1
- package/dist/obs/ui.js +67 -0
- package/dist/obs/ui.js.map +1 -1
- package/dist/onboarding/index.d.ts +8 -0
- package/dist/onboarding/index.d.ts.map +1 -1
- package/dist/onboarding/index.js +115 -0
- package/dist/onboarding/index.js.map +1 -1
- package/dist/onboarding/macos-permissions.d.ts +8 -3
- package/dist/onboarding/macos-permissions.d.ts.map +1 -1
- package/dist/onboarding/macos-permissions.js +12 -6
- package/dist/onboarding/macos-permissions.js.map +1 -1
- package/dist/onboarding/prepare-mac.d.ts.map +1 -1
- package/dist/onboarding/prepare-mac.js +58 -2
- package/dist/onboarding/prepare-mac.js.map +1 -1
- package/dist/reconfigure.d.ts.map +1 -1
- package/dist/reconfigure.js +35 -0
- package/dist/reconfigure.js.map +1 -1
- package/package.json +25 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
## [0.1.85](https://github.com/babelcloud/visionclaw/compare/v0.1.84...v0.1.85) (2026-03-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **fast-responder:** skip fast replies for Gmail messages and update recipient handling ([1931fe2](https://github.com/babelcloud/visionclaw/commit/1931fe23f80fb7539756c73d5d6bf09c3b2caddb))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **obs:** implement named tunnel configuration for OBS ([4045198](https://github.com/babelcloud/visionclaw/commit/40451981a6f6a49289b0fbfc79f45d972b303763))
|
|
12
|
+
* **showcase:** enhance homepage with new showcase section and update meta descriptions ([bd4b066](https://github.com/babelcloud/visionclaw/commit/bd4b0663990ece0fc006cedd9e57eeaa38d9e3c6))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [0.1.84](https://github.com/babelcloud/visionclaw/compare/v0.1.83...v0.1.84) (2026-03-04)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* **activity-tracker:** add TodoItem interface and command handlers for todos ([ba2b36d](https://github.com/babelcloud/visionclaw/commit/ba2b36dc38041d251132097a3164c9263187a05b))
|
|
22
|
+
* **onboarding:** add wallpaper screen saver management functions ([d0685e7](https://github.com/babelcloud/visionclaw/commit/d0685e74f91eb4c3bf5a51a369ee1a388d02629b))
|
|
23
|
+
* **onboarding:** update macOS permission checks for Accessibility and Automation ([c9f8297](https://github.com/babelcloud/visionclaw/commit/c9f82973000a428914daa5bed74be2bfa5b976ca))
|
|
24
|
+
* **setup:** update project configuration and documentation ([a063d52](https://github.com/babelcloud/visionclaw/commit/a063d5270950a4fd2590f6d53750c8cf1193a486))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
1
28
|
## [0.1.83](https://github.com/babelcloud/visionclaw/compare/v0.1.82...v0.1.83) (2026-03-03)
|
|
2
29
|
|
|
3
30
|
|
package/LICENSE
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding any notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. Please also get an
|
|
186
|
+
"application/vnd.apache" MIME type registered for your file format.
|
|
187
|
+
|
|
188
|
+
Copyright 2025-2026 BabelCloud
|
|
189
|
+
|
|
190
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
191
|
+
you may not use this file except in compliance with the License.
|
|
192
|
+
You may obtain a copy of the License at
|
|
193
|
+
|
|
194
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
195
|
+
|
|
196
|
+
Unless required by applicable law or agreed to in writing, software
|
|
197
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
198
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
199
|
+
See the License for the specific language governing permissions and
|
|
200
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# VisionClaw
|
|
2
2
|
|
|
3
|
-
A personal assistant agent that runs on your desktop (macOS
|
|
3
|
+
A personal assistant agent that runs on your desktop (macOS). It receives command messages from pre-configured channels (Gmail, Telegram, Discord) and executes tasks autonomously using desktop control and browser automation. Results are sent back through the same channel.
|
|
4
|
+
|
|
5
|
+
> **Platform note**: Desktop automation (mouse, keyboard, screenshots) requires macOS with `cliclick` installed. Browser automation and channel integrations work cross-platform, but full computer-use features are macOS-only.
|
|
4
6
|
|
|
5
7
|
## Features
|
|
6
8
|
|
|
@@ -37,7 +39,7 @@ gui/ # Electron desktop GUI
|
|
|
37
39
|
|
|
38
40
|
## Prerequisites
|
|
39
41
|
|
|
40
|
-
- Node.js >=
|
|
42
|
+
- Node.js >= 24.12.0
|
|
41
43
|
- An Anthropic API key
|
|
42
44
|
- A dedicated Gmail account for the agent
|
|
43
45
|
- Google Cloud OAuth2 credentials (Client ID + Secret) with Gmail and Calendar API enabled
|
|
@@ -90,9 +92,9 @@ This is controlled via **advanced config** (not asked during onboarding):
|
|
|
90
92
|
}
|
|
91
93
|
```
|
|
92
94
|
|
|
93
|
-
## GUI
|
|
95
|
+
## GUI (Work in Progress)
|
|
94
96
|
|
|
95
|
-
|
|
97
|
+
> **Note**: The Electron GUI is under development and not yet functional. Use the CLI for now.
|
|
96
98
|
|
|
97
99
|
```bash
|
|
98
100
|
cd gui
|
|
@@ -127,3 +129,11 @@ pnpm start
|
|
|
127
129
|
| `computer_use_key` | Press a key or key combination |
|
|
128
130
|
| `computer_use_scroll` | Scroll at a target location |
|
|
129
131
|
| `computer_use_drag` | Drag from one element to another |
|
|
132
|
+
|
|
133
|
+
## Contributing
|
|
134
|
+
|
|
135
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
|
|
136
|
+
|
|
137
|
+
## License
|
|
138
|
+
|
|
139
|
+
[Apache License 2.0](LICENSE)
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export interface TodoItem {
|
|
2
|
+
content: string;
|
|
3
|
+
status: "pending" | "in_progress" | "completed";
|
|
4
|
+
}
|
|
1
5
|
/**
|
|
2
6
|
* Maintains a rolling summary of the primary agent's current activity.
|
|
3
7
|
* Read by the fast responder to give context-aware quick replies when the
|
|
@@ -8,12 +12,15 @@ export declare class ActivityTracker {
|
|
|
8
12
|
private recentActions;
|
|
9
13
|
private lastAssistantText;
|
|
10
14
|
private taskStartedAt;
|
|
15
|
+
private lastTodos;
|
|
11
16
|
private readonly maxActions;
|
|
12
17
|
constructor(maxActions?: number);
|
|
13
18
|
startTask(description: string): void;
|
|
14
19
|
recordAssistantText(text: string): void;
|
|
15
20
|
recordToolCall(name: string, inputSummary: string): void;
|
|
16
21
|
recordToolResult(name: string, outputSummary: string): void;
|
|
22
|
+
recordTodos(todos: TodoItem[]): void;
|
|
23
|
+
getTodos(): TodoItem[];
|
|
17
24
|
/**
|
|
18
25
|
* Produce a concise summary of the agent's current activity for the fast
|
|
19
26
|
* responder's system context.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-tracker.d.ts","sourceRoot":"","sources":["../../src/agent/activity-tracker.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,sBAAsB,CAAM;IACpC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,iBAAiB,CAAM;IAC/B,OAAO,CAAC,aAAa,CAAuB;
|
|
1
|
+
{"version":3,"file":"activity-tracker.d.ts","sourceRoot":"","sources":["../../src/agent/activity-tracker.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,CAAC;CACjD;AAED;;;;GAIG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,sBAAsB,CAAM;IACpC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,iBAAiB,CAAM;IAC/B,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,SAAS,CAAkB;IAEnC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;gBAExB,UAAU,SAAK;IAI3B,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAQpC,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAIvC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI;IAOxD,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI;IAO3D,WAAW,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI;IAIpC,QAAQ,IAAI,QAAQ,EAAE;IAItB;;;OAGG;IACH,UAAU,IAAI,MAAM;IA0BpB,KAAK,IAAI,IAAI;IAQb,OAAO,CAAC,IAAI;CAMb"}
|
|
@@ -9,6 +9,7 @@ export class ActivityTracker {
|
|
|
9
9
|
recentActions = [];
|
|
10
10
|
lastAssistantText = "";
|
|
11
11
|
taskStartedAt = null;
|
|
12
|
+
lastTodos = [];
|
|
12
13
|
maxActions;
|
|
13
14
|
constructor(maxActions = 15) {
|
|
14
15
|
this.maxActions = maxActions;
|
|
@@ -35,6 +36,12 @@ export class ActivityTracker {
|
|
|
35
36
|
: outputSummary;
|
|
36
37
|
this.push(`← ${name}: ${truncated}`);
|
|
37
38
|
}
|
|
39
|
+
recordTodos(todos) {
|
|
40
|
+
this.lastTodos = todos;
|
|
41
|
+
}
|
|
42
|
+
getTodos() {
|
|
43
|
+
return this.lastTodos;
|
|
44
|
+
}
|
|
38
45
|
/**
|
|
39
46
|
* Produce a concise summary of the agent's current activity for the fast
|
|
40
47
|
* responder's system context.
|
|
@@ -66,6 +73,7 @@ export class ActivityTracker {
|
|
|
66
73
|
this.recentActions = [];
|
|
67
74
|
this.lastAssistantText = "";
|
|
68
75
|
this.taskStartedAt = null;
|
|
76
|
+
this.lastTodos = [];
|
|
69
77
|
}
|
|
70
78
|
push(entry) {
|
|
71
79
|
this.recentActions.push(entry);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-tracker.js","sourceRoot":"","sources":["../../src/agent/activity-tracker.ts"],"names":[],"mappings":"AAAA,OAA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AAK,MAAM,CAAC,IAAI,IAAI,CAAC,aAAa;gBAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC3D,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,KAAK;QACH,IAAI,CAAC,sBAAsB,GAAG,EAAE,CAAC;QACjC,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;QACxB,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC;QAC5B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACtB,CAAC;IAEO,IAAI,CAAC,KAAa;QACxB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/B,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;YAChD,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;QAC7B,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { VisionClawConfig, OwnerConfig } from "../config/types.js";
|
|
2
|
+
import type { ChannelManager } from "../channels/manager.js";
|
|
3
|
+
import type { MessageQueue } from "../channels/queue.js";
|
|
4
|
+
import type { SessionManager } from "./session-manager.js";
|
|
5
|
+
import type { AgentState } from "./state.js";
|
|
6
|
+
export interface CommandHandlerDeps {
|
|
7
|
+
agentState: AgentState;
|
|
8
|
+
channelManager: ChannelManager;
|
|
9
|
+
messageQueue: MessageQueue;
|
|
10
|
+
session: SessionManager;
|
|
11
|
+
config: VisionClawConfig;
|
|
12
|
+
ownerConfig: OwnerConfig;
|
|
13
|
+
obsClose?: () => Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Register all slash-command event handlers on the channel manager.
|
|
17
|
+
* These handle /stop, /sleep, /console, /dual-session, /restart,
|
|
18
|
+
* /tunnel, /help, and /status — responding directly without entering
|
|
19
|
+
* the message queue.
|
|
20
|
+
*/
|
|
21
|
+
export declare function registerCommandHandlers(deps: CommandHandlerDeps): void;
|
|
22
|
+
//# sourceMappingURL=command-handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-handlers.d.ts","sourceRoot":"","sources":["../../src/agent/command-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAWxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAK7C,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,UAAU,CAAC;IACvB,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE,gBAAgB,CAAC;IACzB,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAoKtE"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { saveOwnerConfig } from "../config/index.js";
|
|
2
|
+
import { logger } from "../logger.js";
|
|
3
|
+
import { buildHelpText, buildStatusReport } from "./status.js";
|
|
4
|
+
/**
|
|
5
|
+
* Register all slash-command event handlers on the channel manager.
|
|
6
|
+
* These handle /stop, /sleep, /console, /dual-session, /restart,
|
|
7
|
+
* /tunnel, /help, and /status — responding directly without entering
|
|
8
|
+
* the message queue.
|
|
9
|
+
*/
|
|
10
|
+
export function registerCommandHandlers(deps) {
|
|
11
|
+
const { agentState, channelManager, messageQueue, session, config, ownerConfig } = deps;
|
|
12
|
+
channelManager.on("stop_request", (req) => {
|
|
13
|
+
if (agentState.busy && !agentState.stopRequested) {
|
|
14
|
+
agentState.requestStop();
|
|
15
|
+
logger.system(`Agent stop requested via ${req.channel} by ${req.sender}`);
|
|
16
|
+
channelManager
|
|
17
|
+
.sendMessage(req.channel, req.sender, "Stop signal sent. The agent will finish its current step and stop.")
|
|
18
|
+
.catch((err) => {
|
|
19
|
+
logger.warn(`Failed to send stop confirmation: ${err instanceof Error ? err.message : String(err)}`);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
channelManager
|
|
24
|
+
.sendMessage(req.channel, req.sender, "The agent is not currently working.")
|
|
25
|
+
.catch((err) => {
|
|
26
|
+
logger.warn(`Failed to send stop reply: ${err instanceof Error ? err.message : String(err)}`);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
channelManager.on("sleep_request", (req) => {
|
|
31
|
+
const minutes = Math.max(1, Math.min(1440, req.minutes));
|
|
32
|
+
const oldMs = ownerConfig.heartbeatIntervalMs;
|
|
33
|
+
ownerConfig.heartbeatIntervalMs = minutes * 60 * 1000;
|
|
34
|
+
saveOwnerConfig(ownerConfig);
|
|
35
|
+
logger.system(`Sleep interval changed from ${oldMs / 60000}m to ${minutes}m by ${req.sender} via ${req.channel}`);
|
|
36
|
+
channelManager
|
|
37
|
+
.sendMessage(req.channel, req.sender, `Sleep interval changed from ${oldMs / 60000}m to ${minutes}m.`)
|
|
38
|
+
.catch((err) => {
|
|
39
|
+
logger.warn(`Failed to send sleep confirmation: ${err instanceof Error ? err.message : String(err)}`);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
channelManager.on("console_request", (req) => {
|
|
43
|
+
const url = agentState.consoleUrl;
|
|
44
|
+
const reply = url
|
|
45
|
+
? `${url}/console`
|
|
46
|
+
: "Console URL is not available yet (tunnel may still be starting).";
|
|
47
|
+
channelManager
|
|
48
|
+
.sendMessage(req.channel, req.sender, reply)
|
|
49
|
+
.catch((err) => {
|
|
50
|
+
logger.warn(`Failed to send console URL: ${err instanceof Error ? err.message : String(err)}`);
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
channelManager.on("dual_session_request", (req) => {
|
|
54
|
+
const oldValue = ownerConfig.dualSessionEnabled;
|
|
55
|
+
ownerConfig.dualSessionEnabled = req.enabled;
|
|
56
|
+
saveOwnerConfig(ownerConfig);
|
|
57
|
+
session.setDualSessionEnabled(req.enabled);
|
|
58
|
+
const status = req.enabled ? "enabled" : "disabled";
|
|
59
|
+
logger.system(`Dual session ${status} by ${req.sender} via ${req.channel} (was: ${oldValue ? "enabled" : "disabled"})`);
|
|
60
|
+
channelManager
|
|
61
|
+
.sendMessage(req.channel, req.sender, `Dual session mode ${status}.`)
|
|
62
|
+
.catch((err) => {
|
|
63
|
+
logger.warn(`Failed to send dual-session confirmation: ${err instanceof Error ? err.message : String(err)}`);
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
channelManager.on("restart_request", (req) => {
|
|
67
|
+
logger.system(`Restart requested by ${req.sender} via ${req.channel}`);
|
|
68
|
+
channelManager
|
|
69
|
+
.sendMessage(req.channel, req.sender, "Restarting agent in 5 seconds...")
|
|
70
|
+
.catch((err) => {
|
|
71
|
+
logger.warn(`Failed to send restart confirmation: ${err instanceof Error ? err.message : String(err)}`);
|
|
72
|
+
});
|
|
73
|
+
const doRestart = async () => {
|
|
74
|
+
if (deps.obsClose)
|
|
75
|
+
await deps.obsClose();
|
|
76
|
+
const { scheduleRestart } = await import("../utils/restart.js");
|
|
77
|
+
scheduleRestart(5_000);
|
|
78
|
+
};
|
|
79
|
+
doRestart().catch((err) => {
|
|
80
|
+
logger.err(`Failed to schedule restart: ${err instanceof Error ? err.message : String(err)}`);
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
channelManager.on("tunnel_request", (req) => {
|
|
84
|
+
logger.system(`Tunnel restart requested by ${req.sender} via ${req.channel}`);
|
|
85
|
+
if (!agentState.restartTunnel) {
|
|
86
|
+
channelManager
|
|
87
|
+
.sendMessage(req.channel, req.sender, "Tunnel is not configured.")
|
|
88
|
+
.catch((err) => {
|
|
89
|
+
logger.warn(`Failed to send tunnel reply: ${err instanceof Error ? err.message : String(err)}`);
|
|
90
|
+
});
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
channelManager
|
|
94
|
+
.sendMessage(req.channel, req.sender, "Restarting tunnel...")
|
|
95
|
+
.catch((err) => {
|
|
96
|
+
logger.warn(`Failed to send tunnel reply: ${err instanceof Error ? err.message : String(err)}`);
|
|
97
|
+
});
|
|
98
|
+
agentState.restartTunnel().catch((err) => {
|
|
99
|
+
logger.warn(`Failed to restart tunnel: ${err instanceof Error ? err.message : String(err)}`);
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
channelManager.on("help_request", (req) => {
|
|
103
|
+
channelManager
|
|
104
|
+
.sendMessage(req.channel, req.sender, buildHelpText())
|
|
105
|
+
.catch((err) => {
|
|
106
|
+
logger.warn(`Failed to send help reply: ${err instanceof Error ? err.message : String(err)}`);
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
channelManager.on("status_request", (req) => {
|
|
110
|
+
logger.system(`Status requested by ${req.sender} via ${req.channel}${req.forceRefresh ? " (refresh)" : ""}`);
|
|
111
|
+
const doStatus = async () => {
|
|
112
|
+
const report = await buildStatusReport({
|
|
113
|
+
agentState,
|
|
114
|
+
sessionManager: session,
|
|
115
|
+
messageQueue,
|
|
116
|
+
config,
|
|
117
|
+
ownerConfig,
|
|
118
|
+
forceRefresh: req.forceRefresh,
|
|
119
|
+
});
|
|
120
|
+
await channelManager.sendMessage(req.channel, req.sender, report);
|
|
121
|
+
};
|
|
122
|
+
doStatus().catch((err) => {
|
|
123
|
+
logger.warn(`Failed to send status reply: ${err instanceof Error ? err.message : String(err)}`);
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=command-handlers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-handlers.js","sourceRoot":"","sources":["../../src/agent/command-handlers.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAY/D;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAAwB;IAC9D,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IAExF,cAAc,CAAC,EAAE,CAAC,cAAc,EAAE,CAAC,GAAgB,EAAE,EAAE;QACrD,IAAI,UAAU,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC;YACjD,UAAU,CAAC,WAAW,EAAE,CAAC;YACzB,MAAM,CAAC,MAAM,CAAC,4BAA4B,GAAG,CAAC,OAAO,OAAO,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;YAC1E,cAAc;iBACX,WAAW,CACV,GAAG,CAAC,OAAO,EACX,GAAG,CAAC,MAAM,EACV,oEAAoE,CACrE;iBACA,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;gBACtB,MAAM,CAAC,IAAI,CACT,qCAAqC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CACxF,CAAC;YACJ,CAAC,CAAC,CAAC;QACP,CAAC;aAAM,CAAC;YACN,cAAc;iBACX,WAAW,CACV,GAAG,CAAC,OAAO,EACX,GAAG,CAAC,MAAM,EACV,qCAAqC,CACtC;iBACA,KAAK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
|
@@ -40,11 +40,13 @@ const FastResponseSchema = z.object({
|
|
|
40
40
|
*/
|
|
41
41
|
export async function fastRespond(options) {
|
|
42
42
|
const { systemPrompt, messages, activitySummary, config, mode = "interrupt" } = options;
|
|
43
|
-
|
|
43
|
+
// Gmail messages are threaded and asynchronous — skip fast replies for them.
|
|
44
|
+
const eligible = messages.filter((m) => m.channel !== "gmail");
|
|
45
|
+
if (eligible.length === 0)
|
|
44
46
|
return null;
|
|
45
47
|
// Pre-compute unique recipients so the prompt can list them explicitly
|
|
46
48
|
const recipientKeys = new Map();
|
|
47
|
-
for (const m of
|
|
49
|
+
for (const m of eligible) {
|
|
48
50
|
const key = `${m.channel}::${m.sender}`;
|
|
49
51
|
if (!recipientKeys.has(key)) {
|
|
50
52
|
recipientKeys.set(key, { channel: m.channel, sender: m.sender });
|
|
@@ -55,7 +57,7 @@ export async function fastRespond(options) {
|
|
|
55
57
|
.join("\n");
|
|
56
58
|
try {
|
|
57
59
|
const client = createClient(config);
|
|
58
|
-
const messageSummary =
|
|
60
|
+
const messageSummary = eligible
|
|
59
61
|
.map((m) => {
|
|
60
62
|
const parts = [
|
|
61
63
|
`- [${m.channel}] from ${m.sender} at ${m.timestamp}: ${m.text}`,
|
|
@@ -105,7 +107,7 @@ export async function fastRespond(options) {
|
|
|
105
107
|
"## Current Agent Activity",
|
|
106
108
|
activitySummary,
|
|
107
109
|
"",
|
|
108
|
-
`## Incoming Message${
|
|
110
|
+
`## Incoming Message${eligible.length > 1 ? `s (${eligible.length})` : ""}`,
|
|
109
111
|
messageSummary,
|
|
110
112
|
].join("\n"),
|
|
111
113
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fast-responder.js","sourceRoot":"","sources":["../../src/agent/fast-responder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,MAAM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Q,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;wBAC3E,cAAc;qBACf,CAAC,IAAI,CAAC,IAAI,CAAC;iBACb;aACF;YACD,MAAM,EAAE,KAAK;SACd,CAAC,CAAC;QAEH,MAAM,IAAI,GACR,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QAEvE,OAAO,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACpD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,CAAC,IAAI,CACT,0BAA0B,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAC7E,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/dist/agent/loop.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../../src/agent/loop.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../../src/agent/loop.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA4B3D,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAyC3C;;GAEG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,gBAAgB,EACxB,OAAO,CAAC,EAAE;IAAE,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,GACzF,OAAO,CAAC,IAAI,CAAC,CAkdf"}
|