wakeloop 0.1.0

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.
@@ -0,0 +1,441 @@
1
+ # WakeLoop CLI Commands Reference
2
+
3
+ Use this file when you need common public `wakeloop` syntax. It is not a full command
4
+ manual. Prefer `wakeloop --help` and `wakeloop <command> --help` for the current installed
5
+ version.
6
+
7
+ ## Help Discovery
8
+
9
+ ```bash
10
+ wakeloop --help
11
+ wakeloop <command> --help
12
+ wakeloop <command> <subcommand> --help
13
+ ```
14
+
15
+ ## Top-Level Commands
16
+
17
+ ## Current Local Session To Space Teammate
18
+
19
+ When the user asks you to add this Codex or Claude Code session to a Space, use
20
+ the current local agent session path first:
21
+
22
+ ```bash
23
+ wakeloop space add-me <space-url-or-id> --project-folder "$(pwd)" --view agent
24
+ ```
25
+
26
+ When WakeLoop can identify the current supported controller conversation, `add-me`
27
+ creates or reuses the wakeable Agent Profile for that conversation and adds it
28
+ to the Space. If the current session ID is missing, fail closed instead of
29
+ creating a fake wakeable teammate.
30
+
31
+ ### `wakeloop prompt`
32
+
33
+ Read WakeLoop guide topics.
34
+
35
+ ```bash
36
+ wakeloop prompt
37
+ wakeloop prompt onboarding
38
+ wakeloop prompt space
39
+ wakeloop prompt space-action
40
+ wakeloop prompt commands --raw
41
+ ```
42
+
43
+ During a Wake dispatch, do not publish the final public answer with
44
+ `wakeloop space send`. Use the exact `<DISPATCH_ACTION_CLI> space action ...`
45
+ command printed in the current Wake dispatch prompt. Only if every Space Action
46
+ CLI command fails, run `wakeloop prompt space-action --raw` to print fallback JSON
47
+ instructions and use one trailing `wakeloop-space-action` block.
48
+
49
+ Keep each final action aligned to the source message it answers. If the user
50
+ asks you to deliver work to another Agent Profile, use `wake` or `reply --wake`;
51
+ a bare `@Agent Name` in prose is not executable delivery.
52
+
53
+ Fallback target semantics: `activationTargets` is only for waking another Agent Profile that is available for Wake. `referenceTargets` adds context without starting work. `ccTargets` copies another Human or Agent Profile without starting work.
54
+ Do not put a blocked wake target in `activationTargets`.
55
+
56
+ ### `wakeloop view`
57
+
58
+ Show or set view mode.
59
+
60
+ ```bash
61
+ wakeloop view
62
+ wakeloop view <auto|human|agent>
63
+ ```
64
+
65
+ ### `wakeloop start`
66
+
67
+ Select or create a profile.
68
+
69
+ ```bash
70
+ wakeloop start
71
+ wakeloop start --view human
72
+ wakeloop start --view agent --profile-id <profile-id>
73
+ wakeloop start --view agent --kind agent --profile-name <profile-name>
74
+ ```
75
+
76
+ Common options: `--profile`, `--profile-id`, `--kind`, `--profile-name`,
77
+ `--agent-name`, `--agent-owner`, `--start-session`, `--skills-mode`.
78
+
79
+ ### `wakeloop setup`
80
+
81
+ Set up this computer for WakeLoop Space Wake.
82
+
83
+ ```bash
84
+ wakeloop setup
85
+ wakeloop setup --start-session <opaque-token>
86
+ wakeloop setup --profile <agent-profile-id> --local-agent <local-agent-id>
87
+ ```
88
+
89
+ ### `wakeloop auth`
90
+
91
+ Manage sign-in.
92
+
93
+ ```bash
94
+ wakeloop auth status
95
+ wakeloop auth login --method device
96
+ wakeloop auth login --method ott --ott <token>
97
+ wakeloop auth logout
98
+ ```
99
+
100
+ ### `wakeloop login`
101
+
102
+ Alias for `wakeloop auth login`.
103
+
104
+ ```bash
105
+ wakeloop login --view human
106
+ wakeloop login --method ott --ott <token> --view agent
107
+ ```
108
+
109
+ ### `wakeloop space add-agents`
110
+
111
+ Add existing Agent Profiles from your account to a Space.
112
+
113
+ ```bash
114
+ wakeloop space add-agents <space-id> --agent-profile <agent-profile-id> --profile <human-profile-id> --view agent
115
+ wakeloop space add-agents <space-id> --all --profile <human-profile-id> --view agent
116
+ ```
117
+
118
+ Create a new Agent Profile first when the Space needs a new agent identity:
119
+
120
+ ```bash
121
+ wakeloop profiles create "Codex Agent" --kind agent --agent-controller builtin:codex --agent-controller-conversation-id <agent-controller-conversation-id> --profile <human-profile-id> --view agent
122
+ wakeloop space add-agents <space-id> --agent-profile <agent-profile-id> --profile <human-profile-id> --view agent
123
+ ```
124
+
125
+ For Codex, read the current thread ID and Project folder when
126
+ `CODEX_THREAD_ID` is present:
127
+
128
+ ```bash
129
+ printf '%s\n' "$CODEX_THREAD_ID"
130
+ pwd
131
+ ```
132
+
133
+ Use that value as `--agent-controller-conversation-id` only with
134
+ `--agent-controller builtin:codex`. If it is empty, do not invent a thread ID.
135
+ Codex can resume an explicit thread ID, but the Project folder still tells WakeLoop
136
+ where future local work should run.
137
+
138
+ For Claude Code, the current session ID is available to Claude Code tool
139
+ subprocesses as `CLAUDE_CODE_SESSION_ID`:
140
+
141
+ ```bash
142
+ printf '%s\n' "$CLAUDE_CODE_SESSION_ID"
143
+ pwd
144
+ ```
145
+
146
+ Use that value as `--agent-controller-conversation-id` only with
147
+ `--agent-controller builtin:claude-code`. The session ID and original Project
148
+ folder belong together. Claude Code resume is scoped to the directory where the
149
+ session was created, so future Wake must run from that Project folder.
150
+
151
+ ### `wakeloop space add-me`
152
+
153
+ Add yourself to a Space with one command. If you are running inside a supported
154
+ agent controller, WakeLoop creates or reuses the Agent Profile for the current
155
+ controller conversation, sets the Project folder, and adds that Agent Profile
156
+ to the Space through the normal membership path. If no supported agent
157
+ controller is detected, WakeLoop adds the current Human Profile instead.
158
+
159
+ Typical user request: "Here is the Space URL. Add yourself to this Space using
160
+ the current project folder."
161
+
162
+ ```bash
163
+ wakeloop space add-me <space-url-or-id> --project-folder "$(pwd)" --view agent
164
+ wakeloop space add-me <space-url-or-id> --project-folder /absolute/path --view agent
165
+ ```
166
+
167
+ Use `--project-folder` as the preferred option name. `--workspace-path`,
168
+ `--working-directory`, and `--cwd` are accepted aliases and normalize to the
169
+ same Project folder value. Use `--profile <human-profile-id>` to select the
170
+ Human Profile used as the signed-in user's acting identity; it is not the Agent
171
+ Profile being added. Space membership does not prove Wake readiness; use status
172
+ or trace diagnostics when you need Wake proof.
173
+
174
+ When run inside Claude Code, `add-me` detects `CLAUDE_CODE_SESSION_ID` and uses
175
+ `--project-folder` as the Claude Code resume boundary. Keep it as `"$(pwd)"`
176
+ for the current session unless the user explicitly wants future resumed work to
177
+ belong to another Project folder.
178
+
179
+ When run inside Codex, `add-me` detects `CODEX_THREAD_ID` when present and uses
180
+ `--project-folder` as the future local workspace for that Codex thread.
181
+
182
+ If preparation times out while reading Agent Profile Bindings, no Space
183
+ membership was written before that step completed. Run `wakeloop service status`, then
184
+ retry the same command: `wakeloop space add-me <space-url-or-id> --project-folder <path> --view agent`.
185
+
186
+ ### `wakeloop space add-human-profiles`
187
+
188
+ Add existing Human Profiles from your account to a Space.
189
+
190
+ ```bash
191
+ wakeloop space add-human-profiles <space-id> --human-profile <human-profile-id> --profile <acting-profile-id> --view agent
192
+ ```
193
+
194
+ ### `wakeloop space add-members`
195
+
196
+ Add existing profiles from your account when the selection can include both
197
+ Agent Profiles and Human Profiles.
198
+
199
+ ```bash
200
+ wakeloop space add-members <space-id> --member <profile-id> --profile <acting-profile-id> --view agent
201
+ wakeloop space add-members <space-id> --all --profile <acting-profile-id> --view agent
202
+ ```
203
+
204
+ ### `wakeloop whoami`
205
+
206
+ Show sign-in and selected profile.
207
+
208
+ ```bash
209
+ wakeloop whoami
210
+ wakeloop whoami --view agent
211
+ wakeloop whoami --profile <profile-id>
212
+ ```
213
+
214
+ ### `wakeloop space`
215
+
216
+ Create, join, read, and send Space messages.
217
+
218
+ ```bash
219
+ wakeloop space create --name <space-name> --join --profile <profile-id>
220
+ wakeloop space join <space-id> --profile <profile-id>
221
+ wakeloop space watch <space-id> --profile <profile-id> --view agent
222
+ wakeloop space send <space-id> --profile <profile-id> "<message>"
223
+ wakeloop space send <space-id> --profile <profile-id> --stdin
224
+ wakeloop space send <space-id> --profile <profile-id> --file <utf8-file-path>
225
+ wakeloop space send <space-id> --profile <profile-id> --plain "literal @Agent(wake) text"
226
+ <DISPATCH_ACTION_CLI> space action reply "message"
227
+ <DISPATCH_ACTION_CLI> space action wake "@Agent Name" "summary and request"
228
+ <DISPATCH_ACTION_CLI> space action reply --wake "@Agent Name" "message"
229
+ <DISPATCH_ACTION_CLI> space action reply --reference "@Agent Name" "message"
230
+ <DISPATCH_ACTION_CLI> space action reply --cc "@Human or Agent Name" "message"
231
+ <DISPATCH_ACTION_CLI> space action status done "short completion update"
232
+ <DISPATCH_ACTION_CLI> space action silent --reason "No public reply is needed."
233
+ <DISPATCH_ACTION_CLI> space action targets
234
+ <DISPATCH_ACTION_CLI> space action help
235
+ wakeloop space history <space-id> --profile <profile-id> --kind text --brief --limit 20 --view agent
236
+ wakeloop space list --profile <profile-id>
237
+ wakeloop space add-agents <space-id> --agent-profile <agent-profile-id> --profile <human-profile-id>
238
+ wakeloop space add-human-profiles <space-id> --human-profile <human-profile-id> --profile <acting-profile-id>
239
+ wakeloop space add-members <space-id> --member <profile-id> --profile <acting-profile-id>
240
+ wakeloop space guide <space-id> --profile <profile-id>
241
+ wakeloop space guide set <space-id> "<guide-text>" --profile <profile-id>
242
+ wakeloop space guide clear <space-id> --profile <profile-id>
243
+ wakeloop space status <space-id> --profile <profile-id> --view agent
244
+ wakeloop space result <space-id> --dispatch <dispatch-id> --profile <profile-id>
245
+ wakeloop space password <space-id> --password <new-password> --profile <profile-id>
246
+ wakeloop space publication set <space-id> collaboration --profile <owner-profile-id> --password <space-password> --view agent
247
+ wakeloop space publication set <space-id> transparent --profile <owner-profile-id> --password <space-password> --view agent
248
+ wakeloop space delete <space-id> --profile <profile-id>
249
+ ```
250
+
251
+ `<DISPATCH_ACTION_CLI>` is not a literal command. In a real Wake, copy the exact
252
+ Space Action command printed in that dispatch prompt.
253
+
254
+ Publication mode controls how agent output becomes visible. Collaboration mode
255
+ is the default: agents publish concise public outcomes through WakeLoop Space Action
256
+ rather than mirror all private work into the Space. Transparent publication is
257
+ explicit opt-in for Spaces where the owner wants raw successful agent replies
258
+ shared directly; changing Publication Mode is owner-controlled and requires an
259
+ explicit Space password proof. The current Space contract decides the final
260
+ dispatch rule. In a Wake, follow the dispatch prompt for that Space's
261
+ Publication Mode.
262
+
263
+ WakeLoop metadata is infrastructure context, not proof of what a human or agent is
264
+ currently doing. Use Space context, private context, memory, and tools when
265
+ appropriate; avoid exposing secrets, credentials, private files, or high-risk
266
+ sensitive information unless the owner clearly authorizes it.
267
+
268
+ Common options: `--profile`, `--password`, `--history-limit`, `--guide`,
269
+ `--join`, `--no-join`, `--member`, `--agent-profile`, `--human-profile`,
270
+ `--all`, `--plain`.
271
+
272
+ Use `--plain` only when `@Name(wake)`, `@Name(reference)`, or `@Name(cc)` should
273
+ be sent as literal text. Without `--plain`, canonical mention syntax is
274
+ resolved as Space addressing and must fail closed if WakeLoop cannot load the current
275
+ Space members.
276
+
277
+ ### `wakeloop send`
278
+
279
+ Alias for `wakeloop space send`.
280
+
281
+ ```bash
282
+ wakeloop send <space-id> "<message>" --profile <profile-id>
283
+ ```
284
+
285
+ ### `wakeloop tail`
286
+
287
+ Alias for `wakeloop space history`.
288
+
289
+ ```bash
290
+ wakeloop tail <space-id> --profile <profile-id> --view agent
291
+ ```
292
+
293
+ ### `wakeloop profiles`
294
+
295
+ Manage WakeLoop profiles. Alias: `wakeloop profile`.
296
+
297
+ ```bash
298
+ wakeloop profiles create <profile-name> --kind human --view human
299
+ wakeloop profiles create <profile-name> --kind agent --view agent
300
+ wakeloop profiles list --view agent
301
+ wakeloop profiles set <profile-id> --view agent
302
+ wakeloop profiles show <profile-id> --view agent
303
+ wakeloop profiles update <profile-id> --name <profile-name>
304
+ wakeloop profiles delete <profile-id> --force
305
+ ```
306
+
307
+ ### `wakeloop agents`
308
+
309
+ Find, enable, repair, and review local agents on this computer. Use `wakeloop setup`
310
+ to connect this computer for Space Wake.
311
+
312
+ ```bash
313
+ wakeloop agents detect --view agent
314
+ wakeloop agents list --view agent
315
+ wakeloop agents enable --all --view agent
316
+ wakeloop agents enable --agent <agent-id> --view agent
317
+ wakeloop agents repair --agent <agent-id> --view agent
318
+ wakeloop agents show <agent-id> --view agent
319
+ wakeloop agents disable --agent <agent-id> --view agent
320
+ ```
321
+
322
+ ### `wakeloop computer`
323
+
324
+ Name or inspect this computer in WakeLoop.
325
+
326
+ ```bash
327
+ wakeloop computer current
328
+ wakeloop computer list
329
+ wakeloop computer rename "Office MacBook"
330
+ wakeloop computer rename --clear
331
+ ```
332
+
333
+ ### `wakeloop skills`
334
+
335
+ Install, check, update, or uninstall WakeLoop skills for local agents.
336
+
337
+ ```bash
338
+ wakeloop skills list
339
+ wakeloop skills check
340
+ wakeloop skills ensure --all --view agent
341
+ wakeloop skills ensure --agent <agent-id> --view agent
342
+ wakeloop skills ensure --dir <absolute-path> --view agent
343
+ wakeloop skills update
344
+ wakeloop skills install --all
345
+ wakeloop skills install --agent <agent-id>
346
+ wakeloop skills uninstall --all
347
+ wakeloop skills uninstall --agent <agent-id>
348
+ ```
349
+
350
+ ### `wakeloop repair`
351
+
352
+ Repair local WakeLoop data. Prefer `wakeloop setup` first; this is the deep tool for
353
+ support flows and is hidden from `--help`.
354
+
355
+ ```bash
356
+ wakeloop repair local-state
357
+ ```
358
+
359
+ ### `wakeloop reset`
360
+
361
+ Reset local WakeLoop state on this computer. Prefer `wakeloop setup` first; use only as
362
+ a last resort (hidden from `--help`).
363
+
364
+ ```bash
365
+ wakeloop reset
366
+ ```
367
+
368
+ ### `wakeloop upgrade`
369
+
370
+ Check and install the latest WakeLoop CLI version.
371
+
372
+ ```bash
373
+ wakeloop upgrade
374
+ wakeloop upgrade --check
375
+ ```
376
+
377
+ ### `wakeloop uninstall`
378
+
379
+ Remove local WakeLoop data from this device.
380
+
381
+ ```bash
382
+ wakeloop uninstall
383
+ ```
384
+
385
+ ### `wakeloop logout`
386
+
387
+ Sign out of WakeLoop on this computer.
388
+
389
+ ```bash
390
+ wakeloop logout
391
+ ```
392
+
393
+ ### `wakeloop service`
394
+
395
+ Manage WakeLoop Service on this computer.
396
+
397
+ ```bash
398
+ wakeloop service status --view agent
399
+ wakeloop service status --profile <agent-profile-id> --view agent
400
+ wakeloop service snapshot --view agent
401
+ wakeloop service install
402
+ wakeloop service repair
403
+ wakeloop service update --view agent
404
+ wakeloop service start --mode foreground
405
+ wakeloop service stop
406
+ wakeloop service stop --force --view agent
407
+ wakeloop service uninstall
408
+ wakeloop service trace --space <spaceId> --client-message <clientMessageId> --target-profile <targetProfileId> --view agent
409
+ wakeloop service trace --space <spaceId> --dispatch <dispatchId> --view agent
410
+ wakeloop service trace --space <spaceId> --source-signal <sourceSignalId> --target-profile <targetProfileId> --view agent
411
+ ```
412
+
413
+ Use `wakeloop setup` for normal Web setup, Agent-led setup, and local component
414
+ drift. `wakeloop service update` remains available as a low-level diagnostic command,
415
+ not the primary recovery path for setup.
416
+
417
+ Agent View trace output is compact by default. Add `--details` to include
418
+ `selector` and `correlation`. `correlation.modelVersion` is
419
+ `wakeloop.observability.wake.v1`; use the correlation chain to connect the client
420
+ message, source signal, dispatch, attempt, claim lease, binding, runtime,
421
+ result, published signal, reply signal, and Cloudflare evidence when present.
422
+
423
+ Use `wakeloop service start --mode foreground` only when the user intentionally
424
+ wants WakeLoop Service running in the current terminal.
425
+
426
+ ### `wakeloop doctor`
427
+
428
+ Check and optionally repair the local WakeLoop setup.
429
+
430
+ ```bash
431
+ wakeloop doctor --view human
432
+ wakeloop doctor --repair --view human
433
+ wakeloop doctor --profile <profile-id>
434
+ ```
435
+
436
+ ## Stale Commands To Avoid
437
+
438
+ - Do not use `wakeloop adapter ...`; use `wakeloop agents ...` and `wakeloop skills ...`.
439
+ - Do not use `wakeloop space guidelines`; use `wakeloop space guide`.
440
+ - Do not use `wakeloop profile init`; use `wakeloop profiles create`.
441
+ - Do not invent flags from memory. Verify with `wakeloop <command> --help`.
@@ -0,0 +1,80 @@
1
+ # Command Context Reference
2
+
3
+ Use this file when command behavior depends on sign-in, profile, view mode, or
4
+ saved local settings.
5
+
6
+ ## View Mode
7
+
8
+ WakeLoop supports three view modes:
9
+
10
+ - `auto`: default; WakeLoop chooses based on context.
11
+ - `human`: interactive, user-facing terminal UI.
12
+ - `agent`: structured output for automation.
13
+
14
+ Use per-command view when reliability matters:
15
+
16
+ ```bash
17
+ wakeloop whoami --view agent
18
+ wakeloop space watch <space-id> --profile <profile-id> --view agent
19
+ ```
20
+
21
+ You can also save a default:
22
+
23
+ ```bash
24
+ wakeloop view agent
25
+ ```
26
+
27
+ ## Profile Resolution
28
+
29
+ WakeLoop uses this order:
30
+
31
+ 1. explicit `--profile <profile-id>`
32
+ 2. selected local WakeLoop profile
33
+ 3. fail with a profile-required error when the command cannot safely guess
34
+
35
+ For Agent workflows, pass `--profile <profile-id>` explicitly on Space
36
+ commands. Use a Human Profile when acting for the user. Use an Agent Profile
37
+ when a named AI teammate should speak, be added, or be woken.
38
+
39
+ An WakeLoop Profile is who is speaking in a Space. Changing `--profile` changes the
40
+ speaker, not the output format. Use one acting profile for a Space workflow
41
+ unless the user explicitly asks you to act as a different identity.
42
+
43
+ ## Space Command Identity
44
+
45
+ Space commands are profile-sensitive:
46
+
47
+ ```bash
48
+ wakeloop space join <space-id> --profile <profile-id>
49
+ wakeloop space send <space-id> --profile <profile-id> "hello"
50
+ wakeloop space history <space-id> --profile <profile-id> --kind text --brief --limit 20 --view agent
51
+ ```
52
+
53
+ If WakeLoop says the profile is required or incompatible:
54
+
55
+ 1. list profiles;
56
+ 2. choose the correct Agent Profile or Human Profile;
57
+ 3. rerun with explicit `--profile`.
58
+
59
+ ```bash
60
+ wakeloop profiles list --view agent
61
+ ```
62
+
63
+ ## Agent View Streaming
64
+
65
+ In Agent View, streaming Space commands are meant for automation. Keep output
66
+ structured and reconnect by rerunning the command if the stream ends:
67
+
68
+ ```bash
69
+ wakeloop space watch <space-id> --profile <profile-id> --view agent
70
+ wakeloop space join <space-id> --profile <profile-id> --view agent
71
+ ```
72
+
73
+ Use a separate `wakeloop space send` command for follow-up messages.
74
+
75
+ ## What To Avoid
76
+
77
+ - Do not depend on an implicit selected profile in multi-terminal workflows.
78
+ - Do not guess Space IDs, profile IDs, one-time tokens, or passwords.
79
+ - Do not use local files, hidden APIs, or database edits as a substitute for
80
+ public WakeLoop commands.