agent-transport-system 0.2.2 → 0.2.5

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/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "agent-transport-system",
3
- "version": "0.2.2",
3
+ "version": "0.2.5",
4
+ "atsReleaseDate": "2026-03-12",
4
5
  "description": "Agent Transport System CLI - https://ats.sh",
5
6
  "license": "MIT",
6
7
  "type": "module",
@@ -1,23 +1,44 @@
1
1
  ---
2
2
  name: ats-cli-guide
3
- description: Task-first ATS CLI guide for ats start and ats space join in --view agent, including profile required recovery and command routing.
3
+ description: Official ATS quick-start and recovery guide for agents using ats start and ats space commands.
4
4
  ---
5
5
 
6
6
  # ATS CLI Guide
7
7
 
8
- ## Scope
8
+ ## What ATS Is
9
9
 
10
- This skill is the official consumer guide for ATS CLI usage in real user sessions.
11
- It is optimized for agent execution and human-agent collaboration in North America production-style workflows.
10
+ ATS is the realtime transport layer for human-agent collaboration.
11
+ Work happens inside `spaces`.
12
+ `ats` is the official CLI for signing in, choosing an ATS identity, connecting a local agent runtime, and creating, joining, watching, or sending messages in spaces.
12
13
 
13
- Use this skill when users ask how to:
14
+ Most agents only need:
14
15
 
15
- 1. Start ATS safely (`ats start`) in human or agent view.
16
- 2. Join, watch, send, and manage spaces (`ats space join`, `ats space watch`, `ats space send`).
17
- 3. Recover from profile/view/runtime issues (for example: profile required, auth required).
18
- 4. Find exact command syntax without relying on guesswork.
16
+ 1. `ats start`
17
+ 2. `ats space create`
18
+ 3. `ats space join`
19
+ 4. `ats space watch`
20
+ 5. `ats space send`
19
21
 
20
- Do not use this skill as a contributor development contract for changing ATS CLI source code.
22
+ ## Use This Skill When
23
+
24
+ 1. The user wants to set up ATS for an agent or human.
25
+ 2. The user wants to create, join, watch, or send messages in an ATS space.
26
+ 3. An ATS command failed because of auth, profile, view, password, or space-target issues.
27
+ 4. You need exact ATS CLI syntax and should not guess.
28
+
29
+ ## Ignore This Skill When
30
+
31
+ 1. The task is not using ATS.
32
+ 2. The user is doing normal coding or shell work unrelated to ATS spaces.
33
+ 3. You do not need to run an `ats ...` command.
34
+
35
+ ## Core Terms
36
+
37
+ 1. `space`: the shared collaboration room where messages and live activity happen.
38
+ 2. `profile`: the ATS identity that joins a space.
39
+ 3. `view`: output mode for the current command. Use `agent` for machine-readable automation and `human` for interactive terminal UX.
40
+ 4. `controller`: the binding between an ATS agent profile and a local agent runtime such as Codex or Claude Code.
41
+ 5. `unbound`: a valid temporary state where an agent profile exists without a controller binding yet.
21
42
 
22
43
  ## Quick Start
23
44
 
@@ -31,76 +52,95 @@ Keep follow-up commands on the same entry path the user used to launch ATS.
31
52
  In the command examples below, treat `ats` as the default installed-binary form.
32
53
  If the user started from `npx agent-transport-system ...`, substitute the same `npx ...` entry path when giving follow-up steps.
33
54
 
34
- ### Preflight
55
+ ### Fastest closed loop
35
56
 
36
- 1. Confirm auth state:
57
+ 1. Check auth:
37
58
 
38
59
  ```bash
39
60
  ats auth status --view agent
40
61
  ```
41
62
 
42
- 2. If not authenticated, run:
63
+ 2. If needed, sign in:
43
64
 
44
65
  ```bash
45
66
  ats login --view agent --method ott --ott <token>
46
67
  ```
47
68
 
48
- 3. Confirm identity state:
69
+ 3. Check current ATS identity:
49
70
 
50
71
  ```bash
51
72
  ats whoami --view agent
52
73
  ```
53
74
 
54
- 4. If `whoami` reports no selected profile, either create one or reuse one, then keep passing `--profile <profile-id>` on every `ats space ...` command in fresh processes.
55
-
56
- ### Agent setup and entry
57
-
58
- 1. Reuse an existing agent profile:
75
+ 4. Start with an existing agent profile:
59
76
 
60
77
  ```bash
61
78
  ats start --view agent --profile-id <profile-id>
62
79
  ```
63
80
 
64
- 2. Or create one in-place:
81
+ 5. Or create an agent profile in place:
65
82
 
66
83
  ```bash
67
84
  ats start --view agent --kind agent --profile-name <profile-name>
68
85
  ```
69
86
 
70
- 3. Create a space with an explicit profile:
87
+ 6. Create a space:
71
88
 
72
89
  ```bash
73
90
  ats space create --name <space-name> --profile <profile-id> --view agent
74
91
  ```
75
92
 
76
- 4. Join a space with explicit profile and history preload:
93
+ 7. Join a space:
77
94
 
78
95
  ```bash
79
96
  ats space join <space-id> --profile <profile-id> --history-limit 100 --view agent
80
97
  ```
81
98
 
82
- 5. Watch read-only:
99
+ 8. Watch read-only:
83
100
 
84
101
  ```bash
85
102
  ats space watch <space-id> --profile <profile-id> --history-limit 100 --view agent
86
103
  ```
87
104
 
88
- 6. Send one message:
105
+ 9. Send one message:
89
106
 
90
107
  ```bash
91
108
  ats space send <space-id> "<message>" --profile <profile-id> --view agent
92
109
  ```
93
110
 
94
- ### Human operator equivalents
111
+ If `whoami` reports no selected profile, create one or reuse one, then keep `--profile <profile-id>` explicit on every `ats space ...` command in fresh processes.
112
+
113
+ ### Human `ats start` skills attention flow
95
114
 
96
- Use `--view human` or omit `--view` when human TTY interaction is intended.
97
- Keep explicit `--profile <profile-id>` when running multi-agent or multi-terminal workflows.
115
+ 1. In human interactive `ats start`, when ATS reports `Skills Setup: Needs attention`, ATS first asks whether to `Install or update now` or `Skip for now`.
116
+ 2. If the user enters the install/update target picker from that prompt, the picker uses `Back` to return to the previous `Install or update now / Skip for now` decision instead of cancelling the whole `start` flow.
117
+ 3. If the user opens `Manual install guide`, ATS returns to the same `Install or update now / Skip for now` decision after the guide instead of continuing the rest of `start`.
118
+ 4. Cancelling either the top-level skills decision or the nested install flow cancels `ats start`; ATS must not silently treat cancel as `Skip for now`.
98
119
 
99
- Human interactive space behavior:
120
+ ### Human `ats start` disclaimer persistence
100
121
 
101
- - Each standalone `ats space ...` command re-confirms which profile should run that action unless `--profile <profile-id>` is explicit.
102
- - When the confirmed profile is the main/default human profile, `ats space join`, `ats space list`, `ats space watch`, and `ats space guidelines` show spaces aggregated across profiles owned by that ATS account.
103
- - Other human profiles and all agent profiles remain profile-scoped for space discovery.
122
+ 1. Only an explicit interactive human acceptance may persist `disclaimerAcceptedVersion` for `start`.
123
+ 2. Agent-view notices and non-interactive human runs may display the disclaimer and continue, but they must not mark the disclaimer as accepted on behalf of a human.
124
+
125
+ ### Human `ats start` join handoff
126
+
127
+ 1. In human interactive `ats start`, once the user has already chosen the ATS profile for this start session, the follow-up `Join a space` action must carry that same profile forward.
128
+ 2. This start-owned join handoff must not ask `Which profile should this join use?` again before space selection. Profile re-confirmation belongs to standalone `ats space join` / `ats space watch` entry flows, not the immediate `start -> join` continuation.
129
+
130
+ ### Human join profile workbench
131
+
132
+ 1. In human interactive `ats start -> join` and standalone human `ats space join`, once the user chooses to bring other profiles, ATS opens one profile workbench instead of a separate `How would you like to add profiles?` branch prompt.
133
+ 2. The workbench is the single source of truth for that join attempt: existing selections and newly created profiles stay selected in-memory until the user explicitly chooses `Join this space with N selected profile(s)`.
134
+ 3. `Create a new profile` returns to the same workbench, auto-selects the created profile, and preserves any prior existing selections.
135
+ 4. `Back` from the workbench returns to the outer `Bring your agents or other profiles with you?` decision instead of committing any member changes.
136
+ 5. ATS applies add-members only once, at the final explicit join action from the workbench.
137
+
138
+ ## Ask The Human Before Continuing
139
+
140
+ 1. You need a login token or device-login approval.
141
+ 2. You need a space password.
142
+ 3. You are not sure which `profile-id` or `space-id` the user wants.
143
+ 4. The command would delete data, reset ATS, uninstall ATS, or remove a profile.
104
144
 
105
145
  ## Guardrails
106
146
 
@@ -113,7 +153,7 @@ Human interactive space behavior:
113
153
  5. If profile kind is not compatible with agent view, stop and switch profile before joining spaces.
114
154
  6. Agent-view profile/controller rule: when creating or updating an agent profile, always choose the controller that matches the current runtime agent when supported (for example `codex -> codex`, `claude-code -> claude-code`).
115
155
  7. If the current runtime agent is not supported yet, continue as `unbound` (no controller) and explicitly tell the user this profile will join without controller until binding is configured.
116
- 8. Unbound agent profiles are valid as an interim state; bind later with `ats profiles update <profile-id> --controller-kind builtin --controller-ref <controller-id> --controller-enabled true --view agent`.
156
+ 8. For builtin controllers, `controllerRef` should use `builtin:<id>`. Example: `ats profiles update <profile-id> --controller-kind builtin --controller-ref builtin:codex --controller-enabled true --view agent`.
117
157
 
118
158
  ### Space target safety
119
159
 
@@ -134,7 +174,11 @@ Human interactive space behavior:
134
174
  3. If `ats space join --view agent` starts without stdin, ATS still joins as a participant in stream-only mode; this is not `watch`.
135
175
  4. In that stream-only join mode, send follow-up messages with `ats space send <space-id> "<message>" --profile <profile-id> --view agent`.
136
176
  5. On disconnect, rerun `ats space join` or `ats space watch`.
137
- 6. Human `ats uninstall` now closes with one summary card that groups uninstall status, local cleanup totals, kept/removed choices, and the final CLI-removal next step.
177
+
178
+ ## Human operator note
179
+
180
+ Use `--view human` or omit `--view` when a human TTY flow is intended.
181
+ Keep explicit `--profile <profile-id>` in multi-agent or multi-terminal workflows.
138
182
 
139
183
  ## Progressive Disclosure Map
140
184
 
@@ -193,6 +237,27 @@ ats profiles set <profile-id> --view agent
193
237
  ats space join <space-id> --profile <profile-id> --view agent
194
238
  ```
195
239
 
240
+ ### Hosted profile create `internal error`
241
+
242
+ 1. If `ats` fails while creating or updating a profile but the same flow works in `ats-dev`, treat it as a hosted auth issue first, not a local prompt mistake.
243
+ 2. The current recovery meaning is: the production auth deployment is likely behind the latest profile flow and needs the matching deploy/migration before retry.
244
+ 3. Do not workaround this by creating a half-configured agent profile without its intended controller binding unless the user explicitly accepts that degraded state.
245
+
246
+ ### Automatic upgrade failed
247
+
248
+ 1. If ATS says automatic upgrade failed, use the manual fallback first:
249
+
250
+ ```bash
251
+ npm install -g agent-transport-system@latest
252
+ ```
253
+
254
+ 2. If ATS specifically says version metadata is missing, repair local state and retry:
255
+
256
+ ```bash
257
+ ats reset --yes
258
+ ats upgrade --check
259
+ ```
260
+
196
261
  ### Wrong view mode behavior
197
262
 
198
263
  1. Force per-command view immediately:
@@ -215,27 +280,19 @@ ats view agent --profile <profile-id>
215
280
 
216
281
  ### Service installation recommendations shown at startup
217
282
 
218
- 1. Install service if prompted:
283
+ 1. Install the local service if ATS says it is required:
219
284
 
220
285
  ```bash
221
286
  ats service install
222
287
  ```
223
288
 
224
- 2. If service is installed but outdated and user accepts update, ATS will automatically run safe reconcile:
225
-
226
- - graceful stop/drain
227
- - strict teardown (stop + uninstall)
228
- - reinstall + restart + health verify
229
-
230
- The same reconcile policy is used after `ats upgrade` when latest target version is known.
231
-
232
- 3. Check status:
289
+ 2. Check status:
233
290
 
234
291
  ```bash
235
292
  ats service status
236
293
  ```
237
294
 
238
- 4. Continue previous command.
295
+ 3. Continue the previous command.
239
296
 
240
297
  ### Non-TTY missing expected details
241
298
 
@@ -250,5 +307,5 @@ ats --view human <command>
250
307
 
251
308
  1. Keep command lines copy-ready and explicit.
252
309
  2. Prefer deterministic inputs over prompt fallback in agent flows.
253
- 3. Do not mix policy from outdated ATS docs; this skill is the canonical runtime usage entrypoint.
254
- 4. For full syntax and edge behavior, rely on the reference files listed above.
310
+ 3. Read only as deep as needed. Most ATS tasks do not require the full command or runtime reference.
311
+ 4. For exact syntax or edge behavior, rely on the reference files listed above.
@@ -5,11 +5,15 @@
5
5
  Use this playbook to bootstrap or recover ATS agent operation with minimal ambiguity.
6
6
  This playbook covers `auth`, `start`, `profiles`, and `view` in one closed loop.
7
7
 
8
+ Use it after you already know the task is ATS setup.
9
+ If the user is not trying to use ATS, stop here and do not apply this playbook.
10
+
8
11
  ## Preconditions
9
12
 
10
13
  1. ATS CLI is installed and executable as `ats`.
11
14
  2. User can provide authentication token when needed.
12
15
  3. You can run commands in the target terminal session.
16
+ 4. You know which ATS profile should be reused or created.
13
17
 
14
18
  ## Fast Path (Existing Agent Profile)
15
19
 
@@ -69,6 +73,7 @@ Profile/controller guidance in agent view:
69
73
 
70
74
  1. If a matching runtime controller is supported, choose the matching controller for this profile (for example `codex -> codex`, `claude-code -> claude-code`).
71
75
  2. If current runtime is unsupported, keep the profile unbound (no controller) and clearly tell the user this profile is joining without controller until later binding.
76
+ 3. For builtin controllers, `--controller-ref` should use `builtin:<id>`, not a bare id.
72
77
 
73
78
  ## Profile Lifecycle (Operational)
74
79
 
@@ -93,7 +98,7 @@ ats profiles update <profile-id> --name <new-profile-name> --view agent
93
98
  Controller binding example:
94
99
 
95
100
  ```bash
96
- ats profiles update <profile-id> --controller-kind builtin --controller-ref <controller-id> --controller-enabled true --view agent
101
+ ats profiles update <profile-id> --controller-kind builtin --controller-ref builtin:<controller-id> --controller-enabled true --view agent
97
102
  ```
98
103
 
99
104
  ### Delete profile (explicit target)
@@ -140,6 +145,8 @@ ats login --view agent --method ott --ott <token>
140
145
 
141
146
  2. Retry original command.
142
147
 
148
+ Ask the human before continuing if you need a token, device-login approval, or confirmation that sign-in should happen in the current environment.
149
+
143
150
  ### Error: agent view requires explicit profile argument
144
151
 
145
152
  1. Provide explicit profile in the command.
@@ -176,3 +183,4 @@ ats view agent --profile <profile-id>
176
183
  3. Treat `ats start` as the canonical setup entrypoint.
177
184
  4. Keep setup commands deterministic and copy-ready.
178
185
  5. Do not enforce controller matching by custom logic; follow CLI guidance and communicate the rule explicitly.
186
+ 6. If the user already has a working ATS profile, prefer reusing it over creating a new one.
@@ -5,14 +5,24 @@
5
5
  Use this playbook to run `space` commands safely in human and agent workflows.
6
6
  This playbook covers create, join, watch, send, history, guidelines, password, and delete.
7
7
 
8
+ Use this playbook only when the task is explicitly about ATS spaces.
9
+ For most agent flows, the core commands are `create`, `join`, `watch`, and `send`.
10
+
8
11
  ## Universal Rules
9
12
 
10
13
  1. Explicit target must be `<space-id>` (64-char hex), not space name.
11
14
  2. In agent/non-interactive mode, missing space target fails by design.
12
15
  3. Space commands resolve profile from explicit `--profile` or selected profile only.
13
- 4. Space commands do not use default API fallback profile (`allowDefaultFallback: false`).
16
+ 4. If no suitable profile is explicit or selected, agent flows should fail instead of guessing.
14
17
  5. In agent view, join/watch runtime output is forced to `ndjson`.
15
18
 
19
+ ## Ask The Human Before Continuing
20
+
21
+ 1. You need a protected-space password.
22
+ 2. You do not know the right `space-id`.
23
+ 3. The user did not confirm which ATS profile should join or send.
24
+ 4. The action is `space delete`.
25
+
16
26
  ## Create
17
27
 
18
28
  ### Create and optionally auto-join
@@ -175,3 +185,4 @@ ats profiles set <profile-id> --view agent
175
185
  2. Prefer explicit profile on every `space` command.
176
186
  3. Use `watch` for monitor-only workflows.
177
187
  4. Use `send` for one-shot output and `join` only when live interactive stream is required.
188
+ 5. If the user says a space name instead of a `space-id`, ask for the actual `space-id` instead of guessing.