@orchestraworks/cli 0.5.0 → 0.5.1
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/README.md +15 -11
- package/dist/cli/core/banner.d.ts +10 -0
- package/dist/cli/core/banner.js +63 -0
- package/dist/cli/core/package-root.d.ts +3 -2
- package/dist/cli/core/package-root.js +4 -4
- package/dist/cli/core/skill-pointer.d.ts +7 -2
- package/dist/cli/core/skill-pointer.js +13 -3
- package/dist/cli/main.js +5 -3
- package/dist/cli/skill-install-fs.d.ts +0 -2
- package/dist/cli/skill-install-fs.js +0 -2
- package/node_modules/@orchestraworks/client/package.json +1 -1
- package/package.json +2 -2
- package/skills/orchestra/SKILL.md +138 -123
- package/skills/orchestra-fdk/SKILL.md +269 -120
- package/skills/orchestra-fdk/references/authoring.md +12 -1
- package/skills/orchestra-fdk/references/environment.md +39 -24
|
@@ -49,7 +49,7 @@ orchestra fdk init --repository acme/shop
|
|
|
49
49
|
writes a bug-fix factory for that GitHub repository: `fdk.json`, `tsconfig.json`, `main.ts`, the machine
|
|
50
50
|
image under `image/`, the agent's standing instructions and an empty codebase skill. In `package.json` it
|
|
51
51
|
sets `"type": "module"`, adds a `typecheck` script, and adds `tsx`, `typescript` and `@types/node`. `--model-key anthropic` or `--model-key openai` adds the organization's own
|
|
52
|
-
model key; without it the agent runs
|
|
52
|
+
model key; without it the agent runs through the model gateway. It touches no platform and
|
|
53
53
|
overwrites nothing. **Setting up a factory for a codebase is the `orchestra-fdk` skill's job**: the fast
|
|
54
54
|
path from `orchestra fdk init` to a first fix, and the traps on the way.
|
|
55
55
|
|
|
@@ -103,6 +103,17 @@ entrypoint decides what answers. Omit `harness`, or misspell it, and synth fails
|
|
|
103
103
|
a message naming the five; there is no default, because guessing which one an author meant would pick a
|
|
104
104
|
different program than the one they wanted.
|
|
105
105
|
|
|
106
|
+
### Platform skills are attached by id
|
|
107
|
+
|
|
108
|
+
An agent uses a platform skill only when its `skills` list names it: `Skill.fromId(factory, "skill_<key>")`
|
|
109
|
+
in the kit, or `skillIds` on the API. Not released yet: managed skills that the kit and the create request
|
|
110
|
+
add by default (`includeManagedSkills`).
|
|
111
|
+
|
|
112
|
+
### Not released yet: an environment's working folder, `workingDirectory`
|
|
113
|
+
|
|
114
|
+
Today the harness starts outside the code. The agent clones or uses its code under `/work` in its own first
|
|
115
|
+
turn, as the starter's agents do.
|
|
116
|
+
|
|
106
117
|
### Identity comes from the construct path
|
|
107
118
|
|
|
108
119
|
With no explicit `slug`, a resource's slug is the **factory name + full construct path**,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Port a codebase's setup to Orchestra machines
|
|
2
2
|
|
|
3
|
-
Step
|
|
3
|
+
Step 8 of the orchestra-fdk skill, "Set up the machines", sends you here, and so does its step 3 for a new
|
|
4
|
+
environment in an existing factory. When you finish, go back to the step that sent you.
|
|
4
5
|
|
|
5
6
|
An agent can fix, test or show a codebase only if its machine can install and run it. You find out how
|
|
6
7
|
this team sets up their code, prove it on this computer first, write it into the factory, and apply it.
|
|
@@ -10,9 +11,15 @@ An *environment* is the declared shape of a machine, and every machine an agent
|
|
|
10
11
|
The orchestra skill, sections 4 to 6, explains environments, machines, network rules and secrets, and says what
|
|
11
12
|
they cannot do yet. Read those sections before you choose a mode.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
Where you edit depends on the starter:
|
|
15
|
+
|
|
16
|
+
- *Engineering-team starter:* every environment is built by `declareEnvironment` in
|
|
17
|
+
`<factory>/lib/environment.ts`. You edit only the section marked `WHAT THE CODE NEEDS`, and the end of
|
|
18
|
+
`<factory>/lib/setup.sh`, unless the chosen path needs more.
|
|
19
|
+
- *Bug-fix starter:* each environment is a `new Environment` in `<factory>/main.ts`. Its setup script is
|
|
20
|
+
`<factory>/image/setup.sh`, and its image is built from `<factory>/image/Dockerfile`.
|
|
21
|
+
|
|
22
|
+
Below, *the setup script* and *the environment code* mean these files for your starter.
|
|
16
23
|
|
|
17
24
|
## 1. Find the sources
|
|
18
25
|
|
|
@@ -74,7 +81,7 @@ the computer's own operating system picks among them.
|
|
|
74
81
|
|
|
75
82
|
Even when rows 1 and 2 do not work, a Linux full VM is the preferred cloud machine, on a Mac or Windows
|
|
76
83
|
computer too. Use a hosted Mac or a Windows full VM only when the project truly depends on that operating
|
|
77
|
-
system, such as iOS or Xcode. A hosted Mac is a dedicated Apple machine
|
|
84
|
+
system, such as iOS or Xcode. A hosted Mac is a dedicated Apple machine.
|
|
78
85
|
Today Orchestra launches no Mac: path B says what works now.
|
|
79
86
|
|
|
80
87
|
**Open: proving a Linux full VM locally on a Mac or Windows computer.** The host outpost there runs on
|
|
@@ -149,16 +156,16 @@ proves the agent works in the environment.
|
|
|
149
156
|
|
|
150
157
|
### The agent's model key, locally
|
|
151
158
|
|
|
152
|
-
The local agent needs a model key. The developer
|
|
159
|
+
The local agent needs a model key. The developer uses one of three sources, the one they have, and exports
|
|
153
160
|
it in the shell that starts `orchestra local`:
|
|
154
161
|
|
|
155
162
|
1. **A local token from their own subscription,** such as the one `claude setup-token` prints for Claude
|
|
156
163
|
Code.
|
|
157
164
|
2. **An API key from the model provider.**
|
|
158
|
-
3. **A model gateway key from Orchestra
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
165
|
+
3. **A model gateway key from Orchestra.** It is a separate key for local work, such as `local-dev`, with a
|
|
166
|
+
monthly cap. The developer creates it in the console at **Settings › Gateway keys**, which shows the
|
|
167
|
+
value once. The model gateway is a public service at `models.orchestraworks.ai`, so the key works locally
|
|
168
|
+
too.
|
|
162
169
|
|
|
163
170
|
**What each harness itself accepts:**
|
|
164
171
|
|
|
@@ -183,7 +190,7 @@ sign-in is reported by the Orchestra team and not yet verified in pi's docs.
|
|
|
183
190
|
| `pi` | `ANTHROPIC_OAUTH_TOKEN` for Anthropic. OpenAI: not wired yet | Anthropic and OpenAI keys: not wired yet | `ANTHROPIC_OAUTH_TOKEN` (not proven yet) |
|
|
184
191
|
| `script`, `custom` | No key needed | No key needed | No key needed |
|
|
185
192
|
|
|
186
|
-
The path that works
|
|
193
|
+
The path that works today is a `claude` agent with `CLAUDE_CODE_OAUTH_TOKEN`. Use it unless the agent
|
|
187
194
|
must run another harness.
|
|
188
195
|
|
|
189
196
|
- **For a gateway key,** also export
|
|
@@ -222,9 +229,12 @@ the settings are stored as plain text and shown on every read.
|
|
|
222
229
|
2. The two export lines point `orchestra` at this local run. Load them only into the commands meant for the
|
|
223
230
|
run. Never load them into a command meant for Orchestra's cloud.
|
|
224
231
|
3. Create the environment and an agent on the run with `npx orchestra environments create --body @<file>` and
|
|
225
|
-
`npx orchestra agents create --body @<file>`. Build each body from the
|
|
226
|
-
|
|
227
|
-
|
|
232
|
+
`npx orchestra agents create --body @<file>`. Build each body from the entries in
|
|
233
|
+
`<factory>/fdk.out/plan.json` for the environment you are proving and an agent on it. For a new
|
|
234
|
+
engineering-team factory, that is `manager-work-lg` and `manager-agent`. For a new environment in an
|
|
235
|
+
existing factory, it is the environment and the agent you added. Keep that environment's setup script in
|
|
236
|
+
its body: `<factory>/lib/setup.sh` or `<factory>/image/setup.sh`, as the top of this file says. The
|
|
237
|
+
network rules may stay: the local environment does not enforce them. Set the
|
|
228
238
|
agent's model settings for the key source, as "The agent's model key, locally" says.
|
|
229
239
|
`npx orchestra fdk apply` does not work against a run: it stops at the first thing the run does not serve.
|
|
230
240
|
4. Cut a git bundle of the default branch outside the codebase:
|
|
@@ -240,7 +250,7 @@ the settings are stored as plain text and shown on every read.
|
|
|
240
250
|
`orchestra local status` shows checks 1 and 2 (the machine started, and the harness opened its
|
|
241
251
|
conversation).
|
|
242
252
|
2. Find the machine's container with `docker ps`. Copy in the bundle with `docker cp`.
|
|
243
|
-
3. Change the setup in
|
|
253
|
+
3. Change the setup in the setup script, so the script you prove is the script you apply. Then
|
|
244
254
|
update the environment on the run and start a new machine.
|
|
245
255
|
*Fallback until the local environment runs the setup script:* copy the script in with `docker cp` and run
|
|
246
256
|
it as root yourself: `docker exec -u root <container> bash /tmp/setup.sh`.
|
|
@@ -308,10 +318,10 @@ The local key is never carried over. It stays on the developer's computer. In th
|
|
|
308
318
|
Orchestra Secret, and our network edge adds it to each model call, so no machine and no person holds it:
|
|
309
319
|
|
|
310
320
|
- For the gateway, `apply` creates the gateway key and its secret. The starter already declares them.
|
|
311
|
-
- For a provider key, declare a Secret and a rule that adds it on the provider's
|
|
312
|
-
sections 6 and 7).
|
|
321
|
+
- For a subscription token or a provider key, declare a Secret and a rule that adds it on the provider's
|
|
322
|
+
host, as step 6 of the orchestra-fdk skill says (orchestra skill, sections 6 and 7).
|
|
313
323
|
|
|
314
|
-
Ask the developer to revoke the `local-dev` gateway key, at **Settings
|
|
324
|
+
Ask the developer to revoke the `local-dev` gateway key, at **Settings › Gateway keys**, when local work is
|
|
315
325
|
done.
|
|
316
326
|
|
|
317
327
|
**Check:** milestones 1 and 2 pass and the agent turn completes in the chosen mode, or you know which one
|
|
@@ -346,6 +356,8 @@ agent can run the team's own `docker compose up` unchanged.
|
|
|
346
356
|
32 CPU, md 16, sm 2.
|
|
347
357
|
6. When the project runs containers, keep the disk at `/var/lib/docker`. The starter declares it. It keeps
|
|
348
358
|
the inner Docker's images across machine starts (next part).
|
|
359
|
+
7. Not released yet: `workingDirectory`, the folder where every conversation starts. Today each agent clones
|
|
360
|
+
or uses its code under `/work` in its own first turn, as the starter's agents do.
|
|
349
361
|
|
|
350
362
|
#### Setup script or a baked image
|
|
351
363
|
|
|
@@ -404,23 +416,26 @@ Write down what is missing and stop here. Report it to the developer, and go bac
|
|
|
404
416
|
|
|
405
417
|
## 6. Write and check
|
|
406
418
|
|
|
407
|
-
1. Edit `lib/environment.ts`
|
|
419
|
+
1. Edit the environment code for the chosen path: `lib/environment.ts` in the engineering-team starter,
|
|
420
|
+
`main.ts` and `image/` in the bug-fix starter.
|
|
408
421
|
2. In `<factory>`, run `npm run typecheck`, then `npx orchestra fdk synth`. The starter is one program, at the folder's
|
|
409
422
|
root.
|
|
410
423
|
3. Read `<factory>/fdk.out/plan.json`. Every environment has your setup script, ports and settings, and
|
|
411
|
-
the
|
|
412
|
-
|
|
424
|
+
the model rule from step 6 of the orchestra-fdk skill: the `model-gateway` rule,
|
|
425
|
+
or a Secret's rule on the provider's host. On a new factory, no environment has a Bitbucket or Jira rule
|
|
426
|
+
yet: those come with the tokens, in step 12 of the orchestra-fdk skill. On an existing factory, with its
|
|
427
|
+
inputs loaded, the rules it has now stay as they are.
|
|
413
428
|
4. Write `ENVIRONMENT.md` in `<factory>`: what you found and where, the mode you proved in and its result
|
|
414
429
|
for each success criterion, the commands, every outbound attempt the proof logged, and what is still
|
|
415
430
|
unknown.
|
|
416
431
|
|
|
417
|
-
**Check:** the typecheck and the synth pass, and the plan is as in item 3. Go back to
|
|
418
|
-
|
|
432
|
+
**Check:** the typecheck and the synth pass, and the plan is as in item 3. Go back to the orchestra-fdk
|
|
433
|
+
step that sent you for the apply.
|
|
419
434
|
|
|
420
435
|
## 7. The cloud
|
|
421
436
|
|
|
422
437
|
The cloud is the fallback when no local mode can run. It is also the confirmation after the local proof:
|
|
423
|
-
the Manager Agent's "Set up" item, which step
|
|
438
|
+
the Manager Agent's "Set up" item, which step 10 of the orchestra-fdk skill starts. It proves what only the
|
|
424
439
|
cloud can: the micro VM, Docker, the network rules and the tokens. The Engineer Agents' machines cannot clone from
|
|
425
440
|
Bitbucket, so the Set up item also proves the tests run from a git bundle.
|
|
426
441
|
|