Let a coder session use the CLI it is part of `openagents coder` is one subcommand of a CLI with eight others, and a session knew about none of them. Asked to look at an issue it could only describe what it would do, and a person had to explain the tool the session was running inside. Two halves, split by what can go stale. The `openagents` tool runs the CLI. The entry is resolved beside this module rather than through `PATH`, so what answers is the build this session is part of and `--help` describes the CLI that is actually running. That makes the command tree discoverable rather than described: the model asks, and no list here can drift. Given a question about issue 21 it read the skill, then ran `issue view 21 -R OpenAgentsInc/openagents --json` without being told the shape of the command. The `openagents-cli` skill carries what `--help` cannot: which commands work with no credential, what the two scopes are for, why a token minted for one alone fails a command later, and how to walk a person through a device login including what to tell them they are approving. It deliberately lists no flags. A written copy of them goes stale the first time one changes, and the help output cannot. The CLI now ships skills of its own, read after the repository's and the home directory's, so replacing one is writing a skill of the same name and there is nothing to uninstall. They are ordinary skills otherwise: they appear in the catalog and `/skills` switches them off like any other. Three commands are refused by name because the tool has no terminal to give them. `coder` would be a session inside a session, and the refusal names `delegate` instead. `auth login` waits for a browser, and the refusal names `auth login --headless`, which returns a URL and a code and does not wait -- that form is allowed, because it is the one a model needs to help someone sign in. `computer up` serves until stopped. Each says what to use instead rather than timing out with nothing on screen. Output is bounded and a failing command reports its exit code, because an empty failure reads as an empty success. Writes are real and the skill says so: the session is told to say what it is about to write before the first write, and that reads need no ceremony. 346 tests pass, eleven new. The directory of packaged skills is a parameter for the same reason the home directory is: a test should read what it made, not what this machine happens to have.
Let a coder session use the CLI it is part of
Deploy story
What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.
Not deployed through the forge lane
No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.
Changed files
-
modified
docs/assure-repo/false-green-candidates.v1.json -
modified
docs/assure-repo/surface-inventory.v1.json -
modified
packages/openagents-cli/package.json -
added
packages/openagents-cli/skills/openagents-cli/SKILL.md -
modified
packages/openagents-cli/src/cli.ts -
modified
packages/openagents-cli/src/coder-skills.ts -
modified
packages/openagents-cli/src/coder-tools.ts -
modified
packages/openagents-cli/test/coder-skills.test.ts -
added
packages/openagents-cli/test/coder-tools-openagents.test.ts
Diff
9 files changed, +399 -30
docs/assure-repo/false-green-candidates.v1.json modified +1 -1
@@ -4,7 +4,7 @@
| 4 | 4 |
|
| 5 | 5 |
|
| 6 | 6 |
|
| 7 |
|
|
| 7 |
|
|
| 8 | 8 |
|
| 9 | 9 |
|
| 10 | 10 |
|
docs/assure-repo/surface-inventory.v1.json modified +2 -2
@@ -1,7 +1,7 @@
| 1 | 1 |
|
| 2 | 2 |
|
| 3 | 3 |
|
| 4 |
|
|
| 4 |
|
|
| 5 | 5 |
|
| 6 | 6 |
|
| 7 | 7 |
|
packages/openagents-cli/package.json modified +2 -1
packages/openagents-cli/skills/openagents-cli/SKILL.md added +90
@@ -0,0 +1,90 @@
| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
|
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
|
| 35 |
|
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
|
| 39 |
|
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
|
| 48 |
|
|
| 49 |
|
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 57 |
|
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
|
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
|
|
| 71 |
|
|
| 72 |
|
|
| 73 |
|
|
| 74 |
|
|
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 79 |
|
|
| 80 |
|
|
| 81 |
|
|
| 82 |
|
|
| 83 |
|
|
| 84 |
|
|
| 85 |
|
|
| 86 |
|
|
| 87 |
|
|
| 88 |
|
|
| 89 |
|
|
| 90 |
|
packages/openagents-cli/src/cli.ts modified +2 -1
@@ -35,7 +35,7 @@ import {
| 35 | 35 |
|
| 36 | 36 |
|
| 37 | 37 |
|
| 38 |
|
|
| 38 |
|
|
| 39 | 39 |
|
| 40 | 40 |
|
| 41 | 41 |
|
@@ -1771,6 +1771,7 @@ const coderCommand = Command.make(
| 1771 | 1771 |
|
| 1772 | 1772 |
|
| 1773 | 1773 |
|
| 1774 |
|
|
| 1774 | 1775 |
|
| 1775 | 1776 |
|
| 1776 | 1777 |
|
packages/openagents-cli/src/coder-skills.ts modified +25 -5
@@ -21,13 +21,30 @@
| 21 | 21 |
|
| 22 | 22 |
|
| 23 | 23 |
|
| 24 |
|
|
| 24 | 25 |
|
| 25 |
|
|
| 26 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
|
| 35 |
|
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
|
| 27 | 39 |
|
| 28 | 40 |
|
| 41 |
|
|
| 29 | 42 |
|
| 30 | 43 |
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
|
| 31 | 48 |
|
| 32 | 49 |
|
| 33 | 50 |
|
@@ -103,12 +120,14 @@ export function discoverSkills(
| 103 | 120 |
|
| 104 | 121 |
|
| 105 | 122 |
|
| 106 |
|
|
| 123 |
|
|
| 124 |
|
|
| 107 | 125 |
|
| 126 |
|
|
| 108 | 127 |
|
| 109 | 128 |
|
| 110 | 129 |
|
| 111 |
|
|
| 130 |
|
|
| 112 | 131 |
|
| 113 | 132 |
|
| 114 | 133 |
|
@@ -226,8 +245,9 @@ const writeDisabled = (path: string, workspace: string, disabled: ReadonlySet<st
| 226 | 245 |
|
| 227 | 246 |
|
| 228 | 247 |
|
| 248 |
|
|
| 229 | 249 |
|
| 230 |
|
|
| 250 |
|
|
| 231 | 251 |
|
| 232 | 252 |
|
| 233 | 253 |
|
packages/openagents-cli/src/coder-tools.ts modified +167
@@ -14,6 +14,9 @@
| 14 | 14 |
|
| 15 | 15 |
|
| 16 | 16 |
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 17 | 20 |
|
| 18 | 21 |
|
| 19 | 22 |
|
@@ -218,3 +221,167 @@ export function skillTool(skills: ReadonlyArray<CoderSkill>): CoderTool {
| 218 | 221 |
|
| 219 | 222 |
|
| 220 | 223 |
|
| 224 |
|
|
| 225 |
|
|
| 226 |
|
|
| 227 |
|
|
| 228 |
|
|
| 229 |
|
|
| 230 |
|
|
| 231 |
|
|
| 232 |
|
|
| 233 |
|
|
| 234 |
|
|
| 235 |
|
|
| 236 |
|
|
| 237 |
|
|
| 238 |
|
|
| 239 |
|
|
| 240 |
|
|
| 241 |
|
|
| 242 |
|
|
| 243 |
|
|
| 244 |
|
|
| 245 |
|
|
| 246 |
|
|
| 247 |
|
|
| 248 |
|
|
| 249 |
|
|
| 250 |
|
|
| 251 |
|
|
| 252 |
|
|
| 253 |
|
|
| 254 |
|
|
| 255 |
|
|
| 256 |
|
|
| 257 |
|
|
| 258 |
|
|
| 259 |
|
|
| 260 |
|
|
| 261 |
|
|
| 262 |
|
|
| 263 |
|
|
| 264 |
|
|
| 265 |
|
|
| 266 |
|
|
| 267 |
|
|
| 268 |
|
|
| 269 |
|
|
| 270 |
|
|
| 271 |
|
|
| 272 |
|
|
| 273 |
|
|
| 274 |
|
|
| 275 |
|
|
| 276 |
|
|
| 277 |
|
|
| 278 |
|
|
| 279 |
|
|
| 280 |
|
|
| 281 |
|
|
| 282 |
|
|
| 283 |
|
|
| 284 |
|
|
| 285 |
|
|
| 286 |
|
|
| 287 |
|
|
| 288 |
|
|
| 289 |
|
|
| 290 |
|
|
| 291 |
|
|
| 292 |
|
|
| 293 |
|
|
| 294 |
|
|
| 295 |
|
|
| 296 |
|
|
| 297 |
|
|
| 298 |
|
|
| 299 |
|
|
| 300 |
|
|
| 301 |
|
|
| 302 |
|
|
| 303 |
|
|
| 304 |
|
|
| 305 |
|
|
| 306 |
|
|
| 307 |
|
|
| 308 |
|
|
| 309 |
|
|
| 310 |
|
|
| 311 |
|
|
| 312 |
|
|
| 313 |
|
|
| 314 |
|
|
| 315 |
|
|
| 316 |
|
|
| 317 |
|
|
| 318 |
|
|
| 319 |
|
|
| 320 |
|
|
| 321 |
|
|
| 322 |
|
|
| 323 |
|
|
| 324 |
|
|
| 325 |
|
|
| 326 |
|
|
| 327 |
|
|
| 328 |
|
|
| 329 |
|
|
| 330 |
|
|
| 331 |
|
|
| 332 |
|
|
| 333 |
|
|
| 334 |
|
|
| 335 |
|
|
| 336 |
|
|
| 337 |
|
|
| 338 |
|
|
| 339 |
|
|
| 340 |
|
|
| 341 |
|
|
| 342 |
|
|
| 343 |
|
|
| 344 |
|
|
| 345 |
|
|
| 346 |
|
|
| 347 |
|
|
| 348 |
|
|
| 349 |
|
|
| 350 |
|
|
| 351 |
|
|
| 352 |
|
|
| 353 |
|
|
| 354 |
|
|
| 355 |
|
|
| 356 |
|
|
| 357 |
|
|
| 358 |
|
|
| 359 |
|
|
| 360 |
|
|
| 361 |
|
|
| 362 |
|
|
| 363 |
|
|
| 364 |
|
|
| 365 |
|
|
| 366 |
|
|
| 367 |
|
|
| 368 |
|
|
| 369 |
|
|
| 370 |
|
|
| 371 |
|
|
| 372 |
|
|
| 373 |
|
|
| 374 |
|
|
| 375 |
|
|
| 376 |
|
|
| 377 |
|
|
| 378 |
|
|
| 379 |
|
|
| 380 |
|
|
| 381 |
|
|
| 382 |
|
|
| 383 |
|
|
| 384 |
|
|
| 385 |
|
|
| 386 |
|
|
| 387 |
|
packages/openagents-cli/test/coder-skills.test.ts modified +55 -20
@@ -20,6 +20,9 @@ const workspace = (skills: Record<string, string>): string => {
| 20 | 20 |
|
| 21 | 21 |
|
| 22 | 22 |
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 23 | 26 |
|
| 24 | 27 |
|
| 25 | 28 |
|
@@ -32,7 +35,7 @@ Use sentence case.
| 32 | 35 |
|
| 33 | 36 |
|
| 34 | 37 |
|
| 35 |
|
|
| 38 |
|
|
| 36 | 39 |
|
| 37 | 40 |
|
| 38 | 41 |
|
@@ -44,7 +47,7 @@ describe("discovering skills", () => {
| 44 | 47 |
|
| 45 | 48 |
|
| 46 | 49 |
|
| 47 |
|
|
| 50 |
|
|
| 48 | 51 |
|
| 49 | 52 |
|
| 50 | 53 |
|
@@ -53,7 +56,7 @@ describe("discovering skills", () => {
| 53 | 56 |
|
| 54 | 57 |
|
| 55 | 58 |
|
| 56 |
|
|
| 59 |
|
|
| 57 | 60 |
|
| 58 | 61 |
|
| 59 | 62 |
|
@@ -64,7 +67,7 @@ describe("discovering skills", () => {
| 64 | 67 |
|
| 65 | 68 |
|
| 66 | 69 |
|
| 67 |
|
|
| 70 |
|
|
| 68 | 71 |
|
| 69 | 72 |
|
| 70 | 73 |
|
@@ -83,7 +86,7 @@ describe("discovering skills", () => {
| 83 | 86 |
|
| 84 | 87 |
|
| 85 | 88 |
|
| 86 |
|
|
| 89 |
|
|
| 87 | 90 |
|
| 88 | 91 |
|
| 89 | 92 |
|
@@ -95,11 +98,11 @@ describe("discovering skills", () => {
| 95 | 98 |
|
| 96 | 99 |
|
| 97 | 100 |
|
| 98 |
|
|
| 101 |
|
|
| 99 | 102 |
|
| 100 | 103 |
|
| 101 | 104 |
|
| 102 |
|
|
| 105 |
|
|
| 103 | 106 |
|
| 104 | 107 |
|
| 105 | 108 |
|
@@ -107,12 +110,12 @@ describe("discovering skills", () => {
| 107 | 110 |
|
| 108 | 111 |
|
| 109 | 112 |
|
| 110 |
|
|
| 113 |
|
|
| 111 | 114 |
|
| 112 | 115 |
|
| 113 | 116 |
|
| 114 | 117 |
|
| 115 |
|
|
| 118 |
|
|
| 116 | 119 |
|
| 117 | 120 |
|
| 118 | 121 |
|
@@ -156,14 +159,14 @@ describe("choosing which skills the model is offered", () => {
| 156 | 159 |
|
| 157 | 160 |
|
| 158 | 161 |
|
| 159 |
|
|
| 162 |
|
|
| 160 | 163 |
|
| 161 | 164 |
|
| 162 | 165 |
|
| 163 | 166 |
|
| 164 | 167 |
|
| 165 | 168 |
|
| 166 |
|
|
| 169 |
|
|
| 167 | 170 |
|
| 168 | 171 |
|
| 169 | 172 |
|
@@ -177,19 +180,19 @@ describe("choosing which skills the model is offered", () => {
| 177 | 180 |
|
| 178 | 181 |
|
| 179 | 182 |
|
| 180 |
|
|
| 183 |
|
|
| 181 | 184 |
|
| 182 |
|
|
| 185 |
|
|
| 183 | 186 |
|
| 184 | 187 |
|
| 185 | 188 |
|
| 186 | 189 |
|
| 187 | 190 |
|
| 188 | 191 |
|
| 189 |
|
|
| 190 |
|
|
| 192 |
|
|
| 193 |
|
|
| 191 | 194 |
|
| 192 |
|
|
| 195 |
|
|
| 193 | 196 |
|
| 194 | 197 |
|
| 195 | 198 |
|
@@ -200,10 +203,10 @@ describe("choosing which skills the model is offered", () => {
| 200 | 203 |
|
| 201 | 204 |
|
| 202 | 205 |
|
| 203 |
|
|
| 206 |
|
|
| 204 | 207 |
|
| 205 | 208 |
|
| 206 |
|
|
| 209 |
|
|
| 207 | 210 |
|
| 208 | 211 |
|
| 209 | 212 |
|
@@ -212,7 +215,7 @@ describe("choosing which skills the model is offered", () => {
| 212 | 215 |
|
| 213 | 216 |
|
| 214 | 217 |
|
| 215 |
|
|
| 218 |
|
|
| 216 | 219 |
|
| 217 | 220 |
|
| 218 | 221 |
|
@@ -221,9 +224,41 @@ describe("choosing which skills the model is offered", () => {
| 221 | 224 |
|
| 222 | 225 |
|
| 223 | 226 |
|
| 224 |
|
|
| 227 |
|
|
| 225 | 228 |
|
| 226 | 229 |
|
| 227 | 230 |
|
| 228 | 231 |
|
| 229 | 232 |
|
| 233 |
|
|
| 234 |
|
|
| 235 |
|
|
| 236 |
|
|
| 237 |
|
|
| 238 |
|
|
| 239 |
|
|
| 240 |
|
|
| 241 |
|
|
| 242 |
|
|
| 243 |
|
|
| 244 |
|
|
| 245 |
|
|
| 246 |
|
|
| 247 |
|
|
| 248 |
|
|
| 249 |
|
|
| 250 |
|
|
| 251 |
|
|
| 252 |
|
|
| 253 |
|
|
| 254 |
|
|
| 255 |
|
|
| 256 |
|
|
| 257 |
|
|
| 258 |
|
|
| 259 |
|
|
| 260 |
|
|
| 261 |
|
|
| 262 |
|
|
| 263 |
|
|
| 264 |
|
packages/openagents-cli/test/coder-tools-openagents.test.ts added +55
@@ -0,0 +1,55 @@
| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
|
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
|
| 35 |
|
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
|
| 39 |
|
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
|
| 48 |
|
|
| 49 |
|
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|