agent-transport-system 0.2.1 → 0.2.3

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.1",
3
+ "version": "0.2.3",
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,70 +52,70 @@ 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
+ ## Ask The Human Before Continuing
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. You need a login token or device-login approval.
116
+ 2. You need a space password.
117
+ 3. You are not sure which `profile-id` or `space-id` the user wants.
118
+ 4. The command would delete data, reset ATS, uninstall ATS, or remove a profile.
98
119
 
99
120
  ## Guardrails
100
121
 
@@ -107,7 +128,7 @@ Keep explicit `--profile <profile-id>` when running multi-agent or multi-termina
107
128
  5. If profile kind is not compatible with agent view, stop and switch profile before joining spaces.
108
129
  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`).
109
130
  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.
110
- 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`.
131
+ 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`.
111
132
 
112
133
  ### Space target safety
113
134
 
@@ -129,6 +150,11 @@ Keep explicit `--profile <profile-id>` when running multi-agent or multi-termina
129
150
  4. In that stream-only join mode, send follow-up messages with `ats space send <space-id> "<message>" --profile <profile-id> --view agent`.
130
151
  5. On disconnect, rerun `ats space join` or `ats space watch`.
131
152
 
153
+ ## Human operator note
154
+
155
+ Use `--view human` or omit `--view` when a human TTY flow is intended.
156
+ Keep explicit `--profile <profile-id>` in multi-agent or multi-terminal workflows.
157
+
132
158
  ## Progressive Disclosure Map
133
159
 
134
160
  Read only what is needed for the current step. Start here, then drill down:
@@ -186,6 +212,27 @@ ats profiles set <profile-id> --view agent
186
212
  ats space join <space-id> --profile <profile-id> --view agent
187
213
  ```
188
214
 
215
+ ### Hosted profile create `internal error`
216
+
217
+ 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.
218
+ 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.
219
+ 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.
220
+
221
+ ### Automatic upgrade failed
222
+
223
+ 1. If ATS says automatic upgrade failed, use the manual fallback first:
224
+
225
+ ```bash
226
+ npm install -g agent-transport-system@latest
227
+ ```
228
+
229
+ 2. If ATS specifically says version metadata is missing, repair local state and retry:
230
+
231
+ ```bash
232
+ ats reset --yes
233
+ ats upgrade --check
234
+ ```
235
+
189
236
  ### Wrong view mode behavior
190
237
 
191
238
  1. Force per-command view immediately:
@@ -208,27 +255,19 @@ ats view agent --profile <profile-id>
208
255
 
209
256
  ### Service installation recommendations shown at startup
210
257
 
211
- 1. Install service if prompted:
258
+ 1. Install the local service if ATS says it is required:
212
259
 
213
260
  ```bash
214
261
  ats service install
215
262
  ```
216
263
 
217
- 2. If service is installed but outdated and user accepts update, ATS will automatically run safe reconcile:
218
-
219
- - graceful stop/drain
220
- - strict teardown (stop + uninstall)
221
- - reinstall + restart + health verify
222
-
223
- The same reconcile policy is used after `ats upgrade` when latest target version is known.
224
-
225
- 3. Check status:
264
+ 2. Check status:
226
265
 
227
266
  ```bash
228
267
  ats service status
229
268
  ```
230
269
 
231
- 4. Continue previous command.
270
+ 3. Continue the previous command.
232
271
 
233
272
  ### Non-TTY missing expected details
234
273
 
@@ -243,5 +282,5 @@ ats --view human <command>
243
282
 
244
283
  1. Keep command lines copy-ready and explicit.
245
284
  2. Prefer deterministic inputs over prompt fallback in agent flows.
246
- 3. Do not mix policy from outdated ATS docs; this skill is the canonical runtime usage entrypoint.
247
- 4. For full syntax and edge behavior, rely on the reference files listed above.
285
+ 3. Read only as deep as needed. Most ATS tasks do not require the full command or runtime reference.
286
+ 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.