viveworker 0.5.5 → 0.6.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/README.md +178 -27
- package/package.json +7 -2
- package/scripts/a2a-cli.mjs +11 -6
- package/scripts/moltbook-api.mjs +319 -72
- package/scripts/share-cli.mjs +576 -0
- package/scripts/viveworker-bridge.mjs +61 -14
- package/scripts/viveworker.mjs +771 -130
- package/web/i18n.js +164 -6
package/README.md
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
[](https://badge.fury.io/js/viveworker)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
-
`viveworker`
|
|
8
|
+
`viveworker` is an open mobile control surface for Codex Desktop, Claude Desktop, Claude Code, A2A tasks, File Share, and Moltbook.
|
|
9
9
|
|
|
10
|
-
When your AI desktop session needs an approval, asks whether to implement a plan, wants you to choose from options, or
|
|
10
|
+
When your AI desktop session needs an approval, asks whether to implement a plan, wants you to choose from options, finishes a task, needs to hand off a file, or receives a task from another agent while you are away from your desk, `viveworker` keeps all of that within reach on your phone. Instead of breaking your rhythm, it helps you keep vivecoding going from anywhere in your home or office.
|
|
11
11
|
|
|
12
12
|
Think of it as a local companion for Codex or Claude on your Mac:
|
|
13
13
|
your Mac keeps building, and your device keeps you in the loop.
|
|
@@ -25,6 +25,19 @@ With `viveworker`, you can:
|
|
|
25
25
|
The point is simple:
|
|
26
26
|
keep your AI session moving, keep context close, and keep your momentum.
|
|
27
27
|
|
|
28
|
+
## What Ships Today
|
|
29
|
+
|
|
30
|
+
`viveworker` already covers five connected loops:
|
|
31
|
+
|
|
32
|
+
- **AI coding sessions**: approvals, plan checks, questions, completions, and mobile code review for Codex and Claude
|
|
33
|
+
- **Thread Sharing**: pass context, plan-review requests, or full handoffs between Codex and Claude sessions
|
|
34
|
+
- **File Share**: host static files on a private URL, with optional password protection and expiry
|
|
35
|
+
- **Moltbook ops**: draft posts, scout replies, and handle incoming responses from the same phone UI
|
|
36
|
+
- **A2A relay**: receive tasks from other agents, approve them on your phone, and execute locally on your Mac
|
|
37
|
+
|
|
38
|
+
That combination is the product thesis:
|
|
39
|
+
one phone, one local control surface, multiple agent workflows.
|
|
40
|
+
|
|
28
41
|
## Best Fit
|
|
29
42
|
|
|
30
43
|
`viveworker` works best with:
|
|
@@ -57,13 +70,14 @@ You can use it as:
|
|
|
57
70
|
For the full experience, start here:
|
|
58
71
|
|
|
59
72
|
```bash
|
|
60
|
-
npx viveworker setup
|
|
73
|
+
npx viveworker setup
|
|
61
74
|
```
|
|
62
75
|
|
|
63
|
-
|
|
76
|
+
`viveworker setup` now checks for `mkcert` by default and installs it automatically when HTTPS/Web Push needs it and Homebrew is available.
|
|
77
|
+
If you want to manage certificates yourself, use:
|
|
64
78
|
|
|
65
79
|
```bash
|
|
66
|
-
npx viveworker setup
|
|
80
|
+
npx viveworker setup --no-auto-mkcert
|
|
67
81
|
```
|
|
68
82
|
|
|
69
83
|
By default, `viveworker` uses port `8810`.
|
|
@@ -77,7 +91,7 @@ npx viveworker setup --port 8820
|
|
|
77
91
|
|
|
78
92
|
`viveworker` enables Web Push by default. The recommended first-time flow is:
|
|
79
93
|
|
|
80
|
-
1. Run `npx viveworker setup
|
|
94
|
+
1. Run `npx viveworker setup` on your Mac
|
|
81
95
|
2. If macOS asks, allow the local CA install
|
|
82
96
|
3. On your device, open the printed `rootCA.pem` URL
|
|
83
97
|
4. If your device requires local CA trust, install the certificate profile and trust it
|
|
@@ -108,7 +122,17 @@ After setup:
|
|
|
108
122
|
Use these commands most often:
|
|
109
123
|
|
|
110
124
|
- `npx viveworker setup`
|
|
111
|
-
create or refresh the local setup,
|
|
125
|
+
create or refresh the base local setup, detect Codex / Claude, and start the app
|
|
126
|
+
- `npx viveworker pair`
|
|
127
|
+
generate a fresh one-time pairing code and pairing URL for adding another device
|
|
128
|
+
- `npx viveworker enable claude`
|
|
129
|
+
repair Claude Desktop hooks later, or target a custom Claude settings file
|
|
130
|
+
- `npx viveworker enable a2a --user-id <id>`
|
|
131
|
+
register your A2A relay identity after base setup
|
|
132
|
+
- `npx viveworker enable moltbook --api-key <key> --agent-id <id>`
|
|
133
|
+
install the Moltbook watcher and auto-scout after base setup
|
|
134
|
+
- `npx viveworker enable scout`
|
|
135
|
+
tune, reinstall, or uninstall the Moltbook auto-scout job
|
|
112
136
|
- `npx viveworker start`
|
|
113
137
|
start `viveworker` again using the saved config
|
|
114
138
|
- `npx viveworker stop`
|
|
@@ -117,24 +141,53 @@ Use these commands most often:
|
|
|
117
141
|
show the current app URL, launchd/background status, and health
|
|
118
142
|
- `npx viveworker doctor`
|
|
119
143
|
diagnose local setup problems when something is not working
|
|
120
|
-
- `npx viveworker
|
|
121
|
-
|
|
144
|
+
- `npx viveworker doctor --fix`
|
|
145
|
+
repair common local setup problems and restart the bridge
|
|
122
146
|
|
|
123
147
|
Useful options:
|
|
124
148
|
|
|
125
149
|
- `--port <n>` if `8810` is already in use
|
|
126
|
-
- `--
|
|
150
|
+
- `--no-auto-mkcert` if you want to manage the local certificate setup yourself
|
|
151
|
+
- `--no-auto-claude` if you want to skip automatic Claude hook install during setup
|
|
127
152
|
- `--disable-web-push` only if you intentionally do not want notifications
|
|
128
153
|
|
|
129
|
-
|
|
154
|
+
`pair` reissues only the short-lived pairing code and pairing URL.
|
|
130
155
|
It does not change the main app URL, port, session secret, TLS, or Web Push settings.
|
|
131
156
|
Use it only when you want to add another trusted device or browser.
|
|
132
157
|
|
|
158
|
+
## File Share
|
|
159
|
+
|
|
160
|
+
`viveworker` includes **File Share**, a private file-hosting surface for agent outputs. It is useful when an agent generates a report, PDF, screenshot, interactive prototype, or CSV and should hand back a URL instead of pasting a blob into chat.
|
|
161
|
+
|
|
162
|
+
What it supports:
|
|
163
|
+
|
|
164
|
+
- static HTML
|
|
165
|
+
- PDF
|
|
166
|
+
- PNG / JPG / GIF / WebP
|
|
167
|
+
- CSV rendered as an HTML table by default
|
|
168
|
+
- optional password protection
|
|
169
|
+
- optional expiry
|
|
170
|
+
|
|
171
|
+
It reuses the same A2A credentials as the rest of `viveworker`, so there is no separate auth or setup step.
|
|
172
|
+
|
|
173
|
+
Typical commands:
|
|
174
|
+
|
|
175
|
+
- `npx viveworker share upload report.html`
|
|
176
|
+
- `npx viveworker share upload report.pdf --password "hunter2" --expires-days 7`
|
|
177
|
+
- `npx viveworker share list`
|
|
178
|
+
- `npx viveworker share update <slug> --password "hunter2"`
|
|
179
|
+
- `npx viveworker share update <slug> --expires-days 7`
|
|
180
|
+
- `npx viveworker share link <slug>`
|
|
181
|
+
|
|
182
|
+
The current public File Share surface is focused on private static artefact delivery from your Mac and your agents.
|
|
183
|
+
|
|
133
184
|
## Claude Desktop Integration
|
|
134
185
|
|
|
135
|
-
`viveworker
|
|
186
|
+
During `npx viveworker setup`, viveworker checks whether Claude Desktop is already installed and, if so, automatically installs hook entries into `~/.claude/settings.json` (`UserPromptSubmit`, `Notification`, `Stop`, `PermissionRequest`, `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `SessionEnd`).
|
|
187
|
+
|
|
188
|
+
Run `npx viveworker enable claude` if you want to repair the hooks later or target a non-default Claude settings file.
|
|
136
189
|
|
|
137
|
-
Advanced: pass `--claude-settings-file <path>` to target a non-default Claude settings file.
|
|
190
|
+
Advanced: pass `--settings-file <path>` (or `--claude-settings-file <path>`) to target a non-default Claude settings file.
|
|
138
191
|
|
|
139
192
|
### Sync Mode (for Claude plans and questions)
|
|
140
193
|
|
|
@@ -179,13 +232,14 @@ Because the Claude hook opens browser windows and returns focus to Claude Deskto
|
|
|
179
232
|
### Setup
|
|
180
233
|
|
|
181
234
|
```bash
|
|
182
|
-
#
|
|
183
|
-
npx viveworker setup
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
--
|
|
188
|
-
--
|
|
235
|
+
# Base setup
|
|
236
|
+
npx viveworker setup
|
|
237
|
+
|
|
238
|
+
# Install the Moltbook watcher
|
|
239
|
+
npx viveworker enable moltbook \
|
|
240
|
+
--api-key your-api-key \
|
|
241
|
+
--agent-id your-agent-id \
|
|
242
|
+
--agent-name "your-agent-name"
|
|
189
243
|
|
|
190
244
|
# Describe your agent's voice and expertise
|
|
191
245
|
npx viveworker moltbook persona init
|
|
@@ -194,8 +248,8 @@ npx viveworker moltbook persona init
|
|
|
194
248
|
npx viveworker start
|
|
195
249
|
```
|
|
196
250
|
|
|
197
|
-
`
|
|
198
|
-
`--
|
|
251
|
+
`enable moltbook` writes `~/.viveworker/moltbook.env`, installs the Moltbook watcher, and installs auto-scout by default.
|
|
252
|
+
Use `--no-scout` only if you want watcher-only mode. `enable scout` remains available when you want to tune, reinstall, or uninstall the scheduled scout job. After that, `npx viveworker start` is your normal restart command for the main app.
|
|
199
253
|
|
|
200
254
|
Open `Settings > Moltbook` in the phone app to see the current auto-scout posting quota, current batch, and recent compose status.
|
|
201
255
|
|
|
@@ -209,7 +263,7 @@ Open `Settings > Moltbook` in the phone app to see the current auto-scout postin
|
|
|
209
263
|
- `npx viveworker moltbook compose` — inspect today's activity for original-post material
|
|
210
264
|
- `npx viveworker moltbook compose-propose --title "..." --content "..."` — submit an original-post draft for phone approval
|
|
211
265
|
- `npx viveworker moltbook persona show` — view your agent's persona
|
|
212
|
-
- `npx viveworker
|
|
266
|
+
- `npx viveworker enable scout --uninstall` — remove the scheduled auto-scout job
|
|
213
267
|
|
|
214
268
|
## A2A Integration
|
|
215
269
|
|
|
@@ -233,7 +287,7 @@ External agent → Cloudflare Worker relay → bridge polls → phone approval
|
|
|
233
287
|
Your agent reads the setup guide and handles everything — you just click "Authorize" on GitHub:
|
|
234
288
|
|
|
235
289
|
```bash
|
|
236
|
-
npx viveworker a2a
|
|
290
|
+
npx viveworker enable a2a --user-id <desired-id> \
|
|
237
291
|
--description "<description>" \
|
|
238
292
|
--skills "<comma-separated tags>" \
|
|
239
293
|
--avatar "<image-url-or-emoji>"
|
|
@@ -243,7 +297,7 @@ The bridge detects the new credentials within 30 seconds and auto-connects.
|
|
|
243
297
|
|
|
244
298
|
### Key commands
|
|
245
299
|
|
|
246
|
-
- `npx viveworker a2a
|
|
300
|
+
- `npx viveworker enable a2a --user-id <id>` — register with the relay via GitHub OAuth
|
|
247
301
|
- `npx viveworker a2a card` — show current Agent Card settings
|
|
248
302
|
- `npx viveworker a2a card --description "..." --skills "..." --avatar "..."` — update your public profile
|
|
249
303
|
- `npx viveworker a2a activity` — show activity history across all agents (useful for drafting descriptions)
|
|
@@ -252,12 +306,108 @@ The bridge detects the new credentials within 30 seconds and auto-connects.
|
|
|
252
306
|
|
|
253
307
|
Visit `https://a2a.viveworker.com/u/<user-id>` in a browser to see your profile, or request it with `Accept: application/json` to get the Agent Card JSON.
|
|
254
308
|
|
|
309
|
+
## Build On Top
|
|
310
|
+
|
|
311
|
+
`viveworker` is MIT-licensed and meant to be built on.
|
|
312
|
+
|
|
313
|
+
If you are building your own agent tool, the easiest way to think about it is:
|
|
314
|
+
|
|
315
|
+
- desktop AI sessions keep running on the Mac
|
|
316
|
+
- `viveworker` provides the mobile decision surface
|
|
317
|
+
- A2A provides the external task exchange
|
|
318
|
+
- File Share provides the static artefact handoff
|
|
319
|
+
- Thread Sharing provides the context-transfer layer between sessions
|
|
320
|
+
|
|
321
|
+
Today the project already exposes practical integration points through:
|
|
322
|
+
|
|
323
|
+
- Codex + Claude Desktop support
|
|
324
|
+
- Claude hooks
|
|
325
|
+
- A2A relay + Agent Card
|
|
326
|
+
- File Share URLs
|
|
327
|
+
- Thread Sharing across sessions
|
|
328
|
+
|
|
329
|
+
The long-term goal is straightforward:
|
|
330
|
+
make `viveworker` the default local/mobile surface that other AI tools can plug into instead of every tool reinventing approvals, questions, completions, handoffs, and file delivery on its own.
|
|
331
|
+
|
|
332
|
+
### Integration Surfaces
|
|
333
|
+
|
|
334
|
+
If you want to build on `viveworker`, these are the main surfaces to think in:
|
|
335
|
+
|
|
336
|
+
- **Approvals and structured decisions**: approvals, plan checks, multiple-choice questions, and completions all land in the same mobile flow
|
|
337
|
+
- **Thread Sharing**: move notes, plan reviews, and handoffs between Codex and Claude sessions with phone approval in the loop
|
|
338
|
+
- **File Share**: hand back static artefacts as private URLs instead of chat attachments
|
|
339
|
+
- **A2A relay**: receive or send external agent tasks through a public relay while execution stays local
|
|
340
|
+
- **Moltbook ops**: route social drafts and incoming replies through the same approval surface
|
|
341
|
+
|
|
342
|
+
### What Feels Stable Today
|
|
343
|
+
|
|
344
|
+
These parts already feel like core product surface, not side experiments:
|
|
345
|
+
|
|
346
|
+
- Codex mobile approvals, questions, completions, and code review
|
|
347
|
+
- Claude Desktop integration through hooks
|
|
348
|
+
- trusted-LAN pairing, HTTPS, PWA install, and Web Push
|
|
349
|
+
- A2A task intake + approval + local execution
|
|
350
|
+
- File Share for static artefacts
|
|
351
|
+
- Thread Sharing between Codex and Claude sessions
|
|
352
|
+
- Moltbook drafts, reply notifications, and approval flow
|
|
353
|
+
|
|
354
|
+
### What Still Feels Experimental
|
|
355
|
+
|
|
356
|
+
These are good places to expect iteration:
|
|
357
|
+
|
|
358
|
+
- provider-specific UX differences between Codex and Claude
|
|
359
|
+
- the exact shape of cross-session Thread Sharing semantics
|
|
360
|
+
- A2A execution policies and how different agent runtimes plug in
|
|
361
|
+
- higher-level automation patterns around Moltbook and external agent workflows
|
|
362
|
+
|
|
363
|
+
If you are building on `viveworker`, the safest bet is to target the core control-loop idea:
|
|
364
|
+
your tool keeps running where it already runs, and `viveworker` provides the mobile decision surface around it.
|
|
365
|
+
|
|
366
|
+
### Works With viveworker
|
|
367
|
+
|
|
368
|
+
As a practical rule of thumb, a tool fits `viveworker` well if it can do at least one of these:
|
|
369
|
+
|
|
370
|
+
- emit an approval or yes/no gate before doing something consequential
|
|
371
|
+
- ask a structured question or plan check that can be answered on mobile
|
|
372
|
+
- produce a completion or "done, here is what happened" summary
|
|
373
|
+
- hand back a static artefact that is better delivered as a private link than a chat blob
|
|
374
|
+
- receive or send a task through A2A
|
|
375
|
+
- accept a thread handoff, review request, or note from another session
|
|
376
|
+
|
|
377
|
+
If your tool can already express work in those terms, it is usually a good candidate for `viveworker` integration.
|
|
378
|
+
|
|
379
|
+
### Current Working Model
|
|
380
|
+
|
|
381
|
+
This is the current mental model for integrations. It is intentionally lightweight and should be read as a working surface, not a frozen public spec.
|
|
382
|
+
|
|
383
|
+
- **approval**: a user decision is required before the tool continues
|
|
384
|
+
- **choice / plan check**: the tool needs a structured answer, not free-form chat
|
|
385
|
+
- **completion**: the tool finished a unit of work and should surface a summary
|
|
386
|
+
- **code / file change**: the tool changed files and the user may want to review them from the phone
|
|
387
|
+
- **thread share / handoff**: context should move from one session to another with approval in the loop
|
|
388
|
+
- **file share**: a report, prototype, image, or CSV should be delivered as a private URL
|
|
389
|
+
- **a2a task**: an external agent wants work done and the request should land in the same approval flow
|
|
390
|
+
|
|
391
|
+
In other words, the stable idea is not "one provider's internal protocol." It is a common mobile control loop for these kinds of events.
|
|
392
|
+
|
|
393
|
+
### Best Integration Paths Right Now
|
|
394
|
+
|
|
395
|
+
If you are deciding where to plug in, the shortest paths today are:
|
|
396
|
+
|
|
397
|
+
- **Codex / desktop-integrated tools**: route decisions and thread handoffs into the local bridge
|
|
398
|
+
- **Claude Desktop / Claude Code**: use hooks to surface approvals, questions, completions, and file changes
|
|
399
|
+
- **external agents**: use A2A for task exchange
|
|
400
|
+
- **static outputs**: use File Share for reports, prototypes, screenshots, and CSVs
|
|
401
|
+
- **social / outbound agent activity**: use the same approval loop that Moltbook already uses
|
|
402
|
+
|
|
403
|
+
If you can map your tool onto one of those paths, you probably do not need a brand-new mobile UX.
|
|
404
|
+
|
|
255
405
|
## Security Model
|
|
256
406
|
|
|
257
407
|
- use `viveworker` only on a trusted LAN
|
|
258
408
|
- do not expose the bridge directly to the Internet
|
|
259
409
|
- if you lose a paired device, revoke it from `Settings > Devices`
|
|
260
|
-
- use `
|
|
410
|
+
- use `pair` only when you want to add another trusted device
|
|
261
411
|
- A2A relay authentication: external agents must provide a valid API key (`X-A2A-Key` header), and registration requires GitHub OAuth
|
|
262
412
|
|
|
263
413
|
## Optional `ntfy`
|
|
@@ -270,7 +420,7 @@ If you later want a second wake-up notification path, you can add `ntfy` alongsi
|
|
|
270
420
|
## Troubleshooting
|
|
271
421
|
|
|
272
422
|
- If the `.local` URL does not open, use the printed IP-based URL
|
|
273
|
-
- If pairing has expired, run `npx viveworker
|
|
423
|
+
- If pairing has expired, run `npx viveworker pair`
|
|
274
424
|
- If notifications do not appear, make sure you opened the Home Screen app, not just a browser tab
|
|
275
425
|
- If Web Push is enabled, make sure you are opening the HTTPS URL
|
|
276
426
|
- On some devices, local CA trust must be enabled manually before HTTPS works
|
|
@@ -280,6 +430,7 @@ If you later want a second wake-up notification path, you can add `ntfy` alongsi
|
|
|
280
430
|
```bash
|
|
281
431
|
npx viveworker status
|
|
282
432
|
npx viveworker doctor
|
|
433
|
+
npx viveworker doctor --fix
|
|
283
434
|
```
|
|
284
435
|
|
|
285
436
|
## Roadmap
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "viveworker",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.6.1",
|
|
4
|
+
"description": "Open mobile control surface for Codex, Claude, Thread Sharing, File Share, Moltbook, and A2A tasks on your trusted LAN.",
|
|
5
5
|
"author": "Yuta Hoshino <hoshino.lireneo@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
@@ -20,9 +20,13 @@
|
|
|
20
20
|
"questions",
|
|
21
21
|
"code-review",
|
|
22
22
|
"moltbook",
|
|
23
|
+
"file-share",
|
|
24
|
+
"thread-sharing",
|
|
23
25
|
"ai-agents",
|
|
24
26
|
"a2a",
|
|
25
27
|
"agent-to-agent",
|
|
28
|
+
"a2a-relay",
|
|
29
|
+
"agent-control-plane",
|
|
26
30
|
"lan",
|
|
27
31
|
"companion-app",
|
|
28
32
|
"vivecoding"
|
|
@@ -47,6 +51,7 @@
|
|
|
47
51
|
"scripts/a2a-handler.mjs",
|
|
48
52
|
"scripts/a2a-executor.mjs",
|
|
49
53
|
"scripts/a2a-relay-client.mjs",
|
|
54
|
+
"scripts/share-cli.mjs",
|
|
50
55
|
"scripts/lib",
|
|
51
56
|
"web",
|
|
52
57
|
"README.md",
|
package/scripts/a2a-cli.mjs
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* a2a-cli.mjs — CLI for viveworker A2A relay operations.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Recommended usage:
|
|
5
|
+
* viveworker enable a2a --user-id <id> [--relay-url <url>] [--timeout <seconds>]
|
|
6
|
+
*
|
|
7
|
+
* Direct usage:
|
|
5
8
|
* viveworker a2a setup --user-id <id> [--relay-url <url>] [--timeout <seconds>]
|
|
6
9
|
*
|
|
7
10
|
* The `setup` command:
|
|
@@ -9,7 +12,7 @@
|
|
|
9
12
|
* 2. Opens the GitHub OAuth URL in the user's browser
|
|
10
13
|
* 3. Polls for completion (user approves in browser)
|
|
11
14
|
* 4. Writes credentials to ~/.viveworker/a2a.env
|
|
12
|
-
* 5.
|
|
15
|
+
* 5. The running bridge auto-detects the credentials within ~30 seconds
|
|
13
16
|
*/
|
|
14
17
|
|
|
15
18
|
import { promises as fs } from "node:fs";
|
|
@@ -39,6 +42,7 @@ export async function runA2ACli(args) {
|
|
|
39
42
|
return handleCard(args.slice(1));
|
|
40
43
|
default:
|
|
41
44
|
console.log("Commands:");
|
|
45
|
+
console.log(" viveworker enable a2a --user-id <id> [--description <text>] [--skills <csv>]");
|
|
42
46
|
console.log(" viveworker a2a setup --user-id <id> [--description <text>] [--skills <csv>]");
|
|
43
47
|
console.log(" viveworker a2a activity [--state-file <path>]");
|
|
44
48
|
console.log(" viveworker a2a card [--description <text>] [--skills <csv>] [--avatar <url-or-emoji>]");
|
|
@@ -62,7 +66,7 @@ async function handleSetup(args) {
|
|
|
62
66
|
const avatar = flags["avatar"] || "";
|
|
63
67
|
|
|
64
68
|
if (!userId) {
|
|
65
|
-
throw new Error("--user-id is required\nUsage: viveworker a2a
|
|
69
|
+
throw new Error("--user-id is required\nUsage: viveworker enable a2a --user-id <id>");
|
|
66
70
|
}
|
|
67
71
|
|
|
68
72
|
console.log(`\n🔗 viveworker A2A Relay Setup`);
|
|
@@ -152,7 +156,8 @@ async function handleSetup(args) {
|
|
|
152
156
|
await fs.writeFile(A2A_ENV_FILE, updated, { mode: 0o600 });
|
|
153
157
|
|
|
154
158
|
console.log(`✅ Credentials saved\n`);
|
|
155
|
-
console.log(`🚀 Setup complete!
|
|
159
|
+
console.log(`🚀 Setup complete! If your bridge is already running, it will reconnect within about 30 seconds.`);
|
|
160
|
+
console.log(` If not, run: npx viveworker start`);
|
|
156
161
|
console.log(` Your A2A endpoint: ${result.relayUrl}/u/${result.userId}\n`);
|
|
157
162
|
}
|
|
158
163
|
|
|
@@ -267,7 +272,7 @@ async function handleCard(args) {
|
|
|
267
272
|
try {
|
|
268
273
|
currentEnv = await fs.readFile(A2A_ENV_FILE, "utf8");
|
|
269
274
|
} catch {
|
|
270
|
-
throw new Error(`No a2a.env found at ${A2A_ENV_FILE}. Run 'viveworker a2a
|
|
275
|
+
throw new Error(`No a2a.env found at ${A2A_ENV_FILE}. Run 'viveworker enable a2a --user-id <id>' first.`);
|
|
271
276
|
}
|
|
272
277
|
|
|
273
278
|
const currentDesc = envValue(currentEnv, "A2A_DESCRIPTION");
|
|
@@ -287,7 +292,7 @@ async function handleCard(args) {
|
|
|
287
292
|
try {
|
|
288
293
|
currentEnv = await fs.readFile(A2A_ENV_FILE, "utf8");
|
|
289
294
|
} catch {
|
|
290
|
-
throw new Error(`No a2a.env found at ${A2A_ENV_FILE}. Run 'viveworker a2a
|
|
295
|
+
throw new Error(`No a2a.env found at ${A2A_ENV_FILE}. Run 'viveworker enable a2a --user-id <id>' first.`);
|
|
291
296
|
}
|
|
292
297
|
|
|
293
298
|
const updates = {};
|