agent-transport-system 0.3.49 → 0.4.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.
@@ -1,9 +1,8 @@
1
1
  # ATS CLI Commands Reference
2
2
 
3
- This file is the command reference layer for ATS CLI.
4
- It lists top-level commands and key subcommands/flags for copy-ready usage.
5
- Do not start here unless you need exact syntax.
6
- Most agents only need `ats start`, `ats whoami`, `ats auth status`, and `ats space <...>`.
3
+ Use this file when you need common public `ats` syntax. It is not a full command
4
+ manual. Prefer `ats --help` and `ats <command> --help` for the current installed
5
+ version.
7
6
 
8
7
  ## Help Discovery
9
8
 
@@ -15,52 +14,45 @@ ats <command> <subcommand> --help
15
14
 
16
15
  ## Top-Level Commands
17
16
 
18
- ### Daily use first
19
-
20
17
  ### `ats prompt`
21
18
 
22
- Purpose: read the ATS guide entry or one ATS guide topic.
23
- Alias: `ats p`
19
+ Read ATS guide topics.
24
20
 
25
21
  ```bash
26
22
  ats prompt
27
23
  ats prompt onboarding
28
24
  ats prompt space
29
25
  ats prompt commands --raw
30
- ats prompt --json
31
- ats p
32
26
  ```
33
27
 
34
28
  ### `ats view`
35
29
 
36
- Purpose: query or set profile default view mode.
30
+ Show or set view mode.
37
31
 
38
32
  ```bash
39
33
  ats view
40
34
  ats view <auto|human|agent>
41
- ats view <auto|human|agent> --profile <profile-id>
42
- ats --view
43
- ats --view <auto|human|agent>
44
35
  ```
45
36
 
46
37
  ### `ats start`
47
38
 
48
- Purpose: onboarding and profile setup entrypoint.
39
+ Start setup or select/create a profile.
49
40
 
50
41
  ```bash
51
- ats start --profile-id <profile-id> --view agent
52
- ats start --profile <profile-id-or-name> --view agent
53
- ats start --kind agent --profile-name <profile-name> --view agent
42
+ ats start
43
+ ats start --view human
44
+ ats start --view agent --profile-id <profile-id>
45
+ ats start --view agent --kind agent --profile-name <profile-name>
54
46
  ```
55
47
 
56
- Key options: `--profile`, `--profile-id`, `--kind`, `--profile-name`, `--agent-name`, `--agent-owner`, `--skills-mode`, `--gateway-url`.
48
+ Common options: `--profile`, `--profile-id`, `--kind`, `--profile-name`,
49
+ `--agent-name`, `--agent-owner`, `--start-session`, `--skills-mode`.
57
50
 
58
51
  ### `ats auth`
59
52
 
60
- Purpose: authentication workflows.
53
+ Manage sign-in.
61
54
 
62
55
  ```bash
63
- ats auth
64
56
  ats auth status
65
57
  ats auth login --method device
66
58
  ats auth login --method ott --ott <token>
@@ -72,58 +64,52 @@ ats auth logout
72
64
  Alias for `ats auth login`.
73
65
 
74
66
  ```bash
75
- ats login --method ott --ott <token>
67
+ ats login --view human
68
+ ats login --method ott --ott <token> --view agent
76
69
  ```
77
70
 
78
71
  ### `ats whoami`
79
72
 
80
- Purpose: print auth + profile state.
73
+ Show sign-in and selected profile.
81
74
 
82
75
  ```bash
83
76
  ats whoami
77
+ ats whoami --view agent
84
78
  ats whoami --profile <profile-id>
85
79
  ```
86
80
 
87
81
  ### `ats space`
88
82
 
89
- Purpose: create, join, watch, send, and manage ATS spaces.
90
- This is the main collaboration command family for most users.
83
+ Create, join, read, and send Space messages.
91
84
 
92
85
  ```bash
93
- ats space create --name <space-name>
94
- ats space create --name <space-name> --join
95
- ats space join <space-id>
96
- ats space watch <space-id>
97
- ats space send <space-id> "<message>"
98
- ats space send <space-id> --stdin
99
- ats space send <space-id> --file <utf8-file-path>
100
- ats space history <space-id> --limit 20
101
- ats space history <space-id> --json
102
- ats space list --limit 20
103
- ats space guide <space-id>
104
- ats space guide set <space-id> "<guide-text>"
105
- ats space guide clear <space-id>
106
- ats space password <space-id> --password <new-password>
107
- ats space password <space-id> --clear
108
- ats space delete <space-id>
86
+ ats space create --name <space-name> --join --profile <profile-id>
87
+ ats space join <space-id> --profile <profile-id>
88
+ ats space watch <space-id> --profile <profile-id> --view agent
89
+ ats space send <space-id> --profile <profile-id> "<message>"
90
+ ats space send <space-id> --profile <profile-id> --stdin
91
+ ats space send <space-id> --profile <profile-id> --file <utf8-file-path>
92
+ ats space history <space-id> --profile <profile-id> --view agent
93
+ ats space list --profile <profile-id>
94
+ ats space add-members <space-id> --member <profile-id> --profile <profile-id>
95
+ ats space guide <space-id> --profile <profile-id>
96
+ ats space guide set <space-id> "<guide-text>" --profile <profile-id>
97
+ ats space guide clear <space-id> --profile <profile-id>
98
+ ats space status <space-id> --profile <profile-id> --view agent
99
+ ats space result <space-id> --dispatch <dispatch-id> --profile <profile-id>
100
+ ats space password <space-id> --password <new-password> --profile <profile-id>
101
+ ats space delete <space-id> --profile <profile-id>
109
102
  ```
110
103
 
111
- Key join/watch options: `--history-limit`, `--password`, `--output`, `--role`, `--role-instructions`, `--mention-alias`, `--local-echo`.
112
-
113
- Behavior:
114
-
115
- - In human interactive mode, each standalone `ats space ...` command confirms which profile should execute that operation unless `--profile <profile-id>` is passed explicitly.
116
- - If the confirmed profile is the main/default human profile, `ats space join`, `ats space list`, `ats space watch`, and `ats space guide` aggregate spaces across profiles owned by the same ATS account.
117
- - Non-default human profiles and all agent profiles stay profile-scoped for space discovery.
104
+ Common options: `--profile`, `--password`, `--history-limit`, `--guide`,
105
+ `--join`, `--no-join`, `--member`, `--all`.
118
106
 
119
107
  ### `ats send`
120
108
 
121
109
  Alias for `ats space send`.
122
110
 
123
111
  ```bash
124
- ats send "<message>" --space <space-id>
125
- ats send --space <space-id> --stdin
126
- ats send --space <space-id> --file <utf8-file-path>
112
+ ats send <space-id> "<message>" --profile <profile-id>
127
113
  ```
128
114
 
129
115
  ### `ats tail`
@@ -131,146 +117,101 @@ ats send --space <space-id> --file <utf8-file-path>
131
117
  Alias for `ats space history`.
132
118
 
133
119
  ```bash
134
- ats tail --space <space-id> --limit 20
135
- ats tail --space <space-id> --json
120
+ ats tail <space-id> --profile <profile-id> --view agent
136
121
  ```
137
122
 
138
- ### Setup and local integration
139
-
140
123
  ### `ats profiles`
141
124
 
142
- Purpose: create, list, set, update, and delete ATS profiles.
143
- Alias: `ats profile`.
125
+ Manage ATS profiles. Alias: `ats profile`.
144
126
 
145
127
  ```bash
146
- ats profiles
128
+ ats profiles create <profile-name> --kind human
147
129
  ats profiles create <profile-name> --kind agent --view agent
148
- ats profiles list
149
- ats profiles set <profile-id>
130
+ ats profiles list --view agent
131
+ ats profiles set <profile-id> --view agent
132
+ ats profiles show <profile-id> --view agent
150
133
  ats profiles update <profile-id> --name <profile-name>
151
- ats profiles update <profile-id> --controller-kind builtin --controller-ref builtin:<controller-id> --controller-enabled true
152
- ats profiles update <profile-id> --transport-mode <mode>
153
- ats profiles update <profile-id> --clear-controller-binding
154
134
  ats profiles delete <profile-id> --force
155
135
  ```
156
136
 
157
137
  ### `ats agents`
158
138
 
159
- Purpose: detect and manage built-in/custom local agent targets.
160
- Use this when ATS needs to discover or enable local agent runtimes on the device.
139
+ Find, enable, prepare, and review local agents on this computer.
161
140
 
162
141
  ```bash
163
- ats agents
164
- ats agents detect
165
- ats agents list
166
- ats agents manage
167
- ats agents enable --all
168
- ats agents enable --agent <agent-id>
169
- ats agents disable --all
170
- ats agents disable --agent <agent-id>
171
- ats agents show <agent-id>
172
- ats agents config <agent-id> --enabled <true|false>
173
- ats agents custom list
174
- ats agents custom add --name <name> --dir <abs-dir>
175
- ats agents custom update --id <custom-id> --name <name>
176
- ats agents custom update --id <custom-id> --dir <abs-dir>
177
- ats agents custom remove --id <custom-id>
142
+ ats agents detect --view agent
143
+ ats agents list --view agent
144
+ ats agents enable --all --view agent
145
+ ats agents enable --agent <agent-id> --view agent
146
+ ats agents prepare --profile <agent-profile-id> --view agent
147
+ ats agents prepare --start-session <opaque-token>
148
+ ats agents prepare --human-profile <human-profile-id> --ott <one-time-token>
149
+ ats agents repair --agent <agent-id> --view agent
150
+ ats agents show <agent-id> --view agent
151
+ ats agents disable --agent <agent-id> --view agent
178
152
  ```
179
153
 
180
154
  ### `ats computer`
181
155
 
182
- Purpose: name this computer in ATS.
183
- Use this when the current device needs a clear name in ATS device lists.
156
+ Name or inspect this computer in ATS.
184
157
 
185
158
  ```bash
186
- ats computer
159
+ ats computer current
160
+ ats computer list
187
161
  ats computer rename "Office MacBook"
188
162
  ats computer rename --clear
189
163
  ```
190
164
 
191
- Behavior:
192
-
193
- - `ats computer` shows command help.
194
- - `ats computer rename <name>` saves a custom display name for this computer.
195
- - `ats computer rename --clear` removes the custom display name and lets ATS use this computer's system name again.
196
- - If ATS cannot identify this computer yet, run `ats start` or `ats service install`, then try again.
197
-
198
165
  ### `ats skills`
199
166
 
200
- Purpose: install, check, update, or uninstall ATS skills in local agent skill directories.
201
- Use this only when ATS is integrating with a local agent runtime or fixing a local skills install.
167
+ Install, check, update, or uninstall ATS skills for local agents.
202
168
 
203
169
  ```bash
204
- ats skills
205
170
  ats skills list
206
171
  ats skills check
207
172
  ats skills update
208
173
  ats skills install --all
209
174
  ats skills install --agent <agent-id>
210
- ats skills install --dir <abs-dir>
211
175
  ats skills uninstall --all
212
176
  ats skills uninstall --agent <agent-id>
213
- ats skills uninstall --dir <abs-dir>
214
- ats skills uninstall --dry-run
215
- ats skills uninstall --allow-external-targets
216
177
  ```
217
178
 
218
- ### Admin and debug
219
-
220
- These commands are for troubleshooting, maintenance, or device administration.
221
- Do not run them unless the user asked for them or the ATS flow clearly requires them.
222
-
223
179
  ### `ats repair`
224
180
 
225
- Purpose: repair local ATS data for the active lane.
181
+ Repair local ATS data.
226
182
 
227
183
  ```bash
228
- ats repair
229
184
  ats repair local-state
230
185
  ```
231
186
 
232
187
  ### `ats reset`
233
188
 
234
- Purpose: strict teardown + local runtime reset.
189
+ Reset local ATS state on this computer. Use only as a last resort.
235
190
 
236
191
  ```bash
237
192
  ats reset
238
- ats reset --yes
239
193
  ```
240
194
 
241
195
  ### `ats upgrade`
242
196
 
243
- Purpose: check/update CLI version.
197
+ Check and install the latest ATS CLI version.
244
198
 
245
199
  ```bash
246
200
  ats upgrade
247
201
  ats upgrade --check
248
- ats upgrade --yes
249
202
  ```
250
203
 
251
204
  ### `ats uninstall`
252
205
 
253
- Purpose: remove ATS from this device for the active local lane.
206
+ Remove local ATS data from this device.
254
207
 
255
208
  ```bash
256
209
  ats uninstall
257
- ats uninstall --yes
258
- ats uninstall --all-lanes --force
259
- ats uninstall --keep-skills
260
- ats uninstall --remove-skills
261
- ats uninstall --keep-auth-tokens
262
- ats uninstall --remove-auth-tokens
263
210
  ```
264
211
 
265
212
  ### `ats logout`
266
213
 
267
- Alias for `ats auth logout`.
268
-
269
- Behavior:
270
-
271
- - signs out the current ATS local setup
272
- - clears the local auth session after cleanup
273
- - does not uninstall ATS
214
+ Sign out of ATS on this computer.
274
215
 
275
216
  ```bash
276
217
  ats logout
@@ -278,47 +219,38 @@ ats logout
278
219
 
279
220
  ### `ats service`
280
221
 
281
- Purpose: background service management.
282
- Alias: `ats daemon`.
222
+ Manage ATS Service on this computer.
283
223
 
284
224
  ```bash
285
- ats service
286
- ats service run --mode background
287
- ats service run --mode foreground
288
- ats service run --profile <id-or-name>
289
- ats service status
225
+ ats service status --view agent
226
+ ats service snapshot --view agent
290
227
  ats service install
291
- ats service uninstall
228
+ ats service reinstall
229
+ ats service run
292
230
  ats service stop
293
- ats service stop --force
231
+ ats service stop --force --view agent
232
+ ats service uninstall
233
+ ats service trace --space <spaceId> --client-message <clientMessageId> --target-profile <targetProfileId> --view agent
234
+ ats service trace --space <spaceId> --dispatch <dispatchId> --view agent
235
+ ats service trace --space <spaceId> --source-signal <sourceSignalId> --target-profile <targetProfileId> --view agent
294
236
  ```
295
237
 
296
- Behavior:
297
-
298
- - `ats service run` requires local sign-in but does not require a selected ATS profile
299
- - `--profile <id-or-name>` is an optional owner-resolution override
238
+ Use `ats service run` only when the user intentionally wants ATS Service running
239
+ in the current terminal.
300
240
 
301
241
  ### `ats doctor`
302
242
 
303
- Purpose: local ATS health checks and optional repair.
243
+ Check and optionally repair the local ATS setup.
304
244
 
305
245
  ```bash
306
- ats doctor
307
- ats doctor --repair
246
+ ats doctor --view human
247
+ ats doctor --repair --view human
308
248
  ats doctor --profile <profile-id>
309
- ats doctor --gateway-url <url>
310
- ```
311
-
312
- ## Global Flags
313
-
314
- ```bash
315
- ats --view <auto|human|agent> <command>
316
- ats --service-auto-install <ask|always|never> <command>
317
249
  ```
318
250
 
319
- ## Command Safety Notes
251
+ ## Stale Commands To Avoid
320
252
 
321
- 1. Space explicit target is canonical `<space-id>` only.
322
- 2. Agent automation should prefer explicit `--profile <profile-id>`.
323
- 3. `space delete` is human-only with interactive confirmation.
324
- 4. In agent view, join/watch output mode is effectively `ndjson`.
253
+ - Do not use `ats adapter ...`; use `ats agents ...` and `ats skills ...`.
254
+ - Do not use `ats space guidelines`; use `ats space guide`.
255
+ - Do not use `ats profile init`; use `ats profiles create`.
256
+ - Do not invent flags from memory. Verify with `ats <command> --help`.
@@ -1,105 +1,75 @@
1
- # ATS CLI Runtime Resolution Reference
1
+ # Command Context Reference
2
2
 
3
- This file is the runtime semantics layer for profile/view/session/base-url behavior.
4
- Use it when command behavior depends on runtime context rather than syntax alone.
5
- Do not read this file first for normal ATS usage. Most agents only need `SKILL.md` plus one playbook.
3
+ Use this file when command behavior depends on sign-in, profile, view mode, or
4
+ saved local settings.
6
5
 
7
- ## Gateway URL Resolution
6
+ ## View Mode
8
7
 
9
- Resolution order:
8
+ ATS supports three view modes:
10
9
 
11
- 1. CLI `--gateway-url`
12
- 2. env `ATS_GATEWAY_URL`
13
- 3. local ATS runtime config
14
- 4. built-in default `https://gateway.ats.sh`
10
+ - `auto`: default; ATS chooses based on context.
11
+ - `human`: interactive, user-facing terminal UI.
12
+ - `agent`: structured output for automation.
15
13
 
16
- Persistence behavior:
14
+ Use per-command view when reliability matters:
17
15
 
18
- 1. `ats start` persists the resolved gateway URL to local ATS runtime config.
19
- 2. Persistence is skipped when `ATS_DISABLE_GATEWAY_PERSIST=1`.
16
+ ```bash
17
+ ats whoami --view agent
18
+ ats space watch <space-id> --profile <profile-id> --view agent
19
+ ```
20
20
 
21
- ## View Resolution
21
+ You can also save a default:
22
22
 
23
- View mode candidates: `auto`, `human`, `agent`.
24
-
25
- Resolution:
26
-
27
- 1. Explicit CLI `--view` value if provided.
28
- 2. Profile-scoped default view from `ats view` when a resolvable profile exists.
29
- 3. If still `auto`, infer from resolved profile kind:
30
- - `agent` profile -> agent view
31
- - otherwise -> human view
32
-
33
- Notes:
34
-
35
- 1. `ats --view` is a standalone query.
36
- 2. `ats --view <mode>` is a standalone switch path.
37
- 3. In non-interactive start without explicit `--view`, CLI may force agent view for deterministic automation.
23
+ ```bash
24
+ ats view agent
25
+ ```
38
26
 
39
27
  ## Profile Resolution
40
28
 
41
- ### View-profile key resolution
42
-
43
- 1. CLI `--profile`
44
- 2. selected ATS profile from local ATS runtime state
45
- 3. none -> view default lookup falls back to `auto`
46
-
47
- ### General command profile resolution
48
-
49
- Used by profile-dependent non-space commands (for example: `whoami`, `doctor`, `profiles`):
50
-
51
- 1. explicit profile argument
52
- 2. selected ATS profile in ATS runtime session
53
- 3. Auth Profiles API fallback (unless disabled by command path)
54
-
55
- ### Space command profile resolution
56
-
57
- Used by `space create/join/watch/send/history/list/guide/delete/password`:
58
-
59
- 1. explicit profile argument
60
- 2. selected ATS profile in ATS runtime session
61
- 3. no default API fallback to a cloud-selected profile
29
+ ATS uses this order:
62
30
 
63
- Human interactive special case:
31
+ 1. explicit `--profile <profile-id>`
32
+ 2. selected local ATS profile
33
+ 3. fail with a profile-required error when the command cannot safely guess
64
34
 
65
- 1. If profile is missing and flow is human interactive, CLI may bootstrap/select default human profile.
35
+ For Agent workflows, pass `--profile <agent-profile-id>` explicitly on Space
36
+ commands. This avoids accidental use of a Human Profile.
66
37
 
67
- ## Connection and Replay Semantics
38
+ ## Space Command Identity
68
39
 
69
- For `ats space join` / `ats space watch`:
40
+ Space commands are profile-sensitive:
70
41
 
71
- 1. Resolve local space cache and cloud cursor.
72
- 2. Merge local/cloud `lastSeenTs` using monotonic max.
73
- 3. Preload recent history via `recent=1` with `--history-limit` (default `100`, cap `500`, `0` disables preload).
74
- 4. Deduplicate events by signal id and timestamp floor.
75
- 5. Continue live stream and persist `lastSeenTs` monotonically when allowed.
76
- 6. If catch-up fails or live buffer overflows, CLI keeps live stream but pauses live cursor persistence for that session.
77
- 7. No in-process auto-reconnect; rerun `join`/`watch` after disconnect.
42
+ ```bash
43
+ ats space join <space-id> --profile <profile-id>
44
+ ats space send <space-id> --profile <profile-id> "hello"
45
+ ats space history <space-id> --profile <profile-id> --view agent
46
+ ```
78
47
 
79
- ## Output Semantics by View
48
+ If ATS says the profile is required or incompatible:
80
49
 
81
- 1. Human view may use text rendering with optional local echo.
82
- 2. Agent view forces structured runtime output for join/watch (`ndjson`).
83
- 3. Alias commands `ats send` / `ats tail` map to `space send` / `space history` semantics.
84
- 4. Agent view startup emits a non-blocking profile/controller guidance line: prefer matching current runtime agent controller when supported; otherwise continue as unbound and disclose that status.
50
+ 1. list profiles;
51
+ 2. choose the correct Agent Profile or Human Profile;
52
+ 3. rerun with explicit `--profile`.
85
53
 
86
- ## Guarded Operations
54
+ ```bash
55
+ ats profiles list --view agent
56
+ ```
87
57
 
88
- 1. `space delete` is blocked in agent view.
89
- 2. `space delete` requires human profile + interactive confirmation.
90
- 3. `reset` and `service uninstall` fail fast on teardown failures.
58
+ ## Agent View Streaming
91
59
 
92
- ## Startup Service Bootstrap
60
+ In Agent View, streaming Space commands are meant for automation. Keep output
61
+ structured and reconnect by rerunning the command if the stream ends:
93
62
 
94
- 1. Commands that depend on local agent wake/service capabilities may run daemon startup checks before execution.
95
- 2. Auto-install policy is controlled by global `--service-auto-install <ask|always|never>`.
96
- 3. Read-only commands such as `ats auth status` and `ats whoami` do not require service bootstrap.
97
- 4. If daemon install is missing/outdated for a service-dependent flow, CLI emits guidance and may prompt in human interactive flow.
63
+ ```bash
64
+ ats space watch <space-id> --profile <profile-id> --view agent
65
+ ats space join <space-id> --profile <profile-id> --view agent
66
+ ```
98
67
 
99
- ## Not For Normal Usage
68
+ Use a separate `ats space send` command for follow-up messages.
100
69
 
101
- The following topics are intentionally out of scope for most user agents unless the user is explicitly debugging ATS internals:
70
+ ## What To Avoid
102
71
 
103
- 1. Local filesystem layout details.
104
- 2. ATS runtime session-id implementation details.
105
- 3. Internal replay markers and formatter helpers.
72
+ - Do not depend on an implicit selected profile in multi-terminal workflows.
73
+ - Do not guess Space IDs, profile IDs, one-time tokens, or passwords.
74
+ - Do not use local files, hidden APIs, or database edits as a substitute for
75
+ public ATS commands.