create-orcha 0.4.4 → 0.4.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 +1 -1
- package/template/AGENTS.md +4 -2
- package/template/orcha/AGENTS.md +83 -12
package/package.json
CHANGED
package/template/AGENTS.md
CHANGED
|
@@ -22,5 +22,7 @@ Use the complete Orcha `AGENTS.md` generated by `orchajs init` as the source of
|
|
|
22
22
|
truth for agent configuration, actions, skills, tests, evaluations, and JSONL
|
|
23
23
|
event schemas.
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
Direct-provider credentials belong in `.env`. Projects using
|
|
26
|
+
`amarsia.inference: true` need only `amarsia.key`; the standalone Orcha CLI
|
|
27
|
+
loads environment files without overriding values already in the process.
|
|
28
|
+
`storage: { strategy: "cloud" }` is local-first and uses the same project key.
|
package/template/orcha/AGENTS.md
CHANGED
|
@@ -68,6 +68,23 @@ orcha.init({
|
|
|
68
68
|
});
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
+
For Amarsia inference, the registry contains only project routing and agent
|
|
72
|
+
paths; provider and model selection stay in each agent `index.json`. Supported
|
|
73
|
+
providers are `openai`, `anthropic`, `googlegenai`, and `deepseek`; `bedrock`
|
|
74
|
+
and `vertexai` are direct-inference providers only:
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
orcha.init({
|
|
78
|
+
amarsia: {
|
|
79
|
+
key: process.env.AMARSIA_PROJECT_KEY ?? "",
|
|
80
|
+
inference: true,
|
|
81
|
+
},
|
|
82
|
+
agents: {
|
|
83
|
+
supportBot: "./supportBot",
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
```
|
|
87
|
+
|
|
71
88
|
Only registered agents are compiled. Agent keys become runtime properties
|
|
72
89
|
such as `orcha.supportBot`. Local actions use the native Node.js runtime by
|
|
73
90
|
default. Set `actions.runtime: "sandbox"` only when isolated execution is
|
|
@@ -75,20 +92,29 @@ required.
|
|
|
75
92
|
|
|
76
93
|
`orcha.init()` fields:
|
|
77
94
|
|
|
78
|
-
- `providers` (required): provider configurations keyed
|
|
79
|
-
name.
|
|
95
|
+
- `providers` (required for direct inference): provider configurations keyed
|
|
96
|
+
by built-in provider name. Omit it when `amarsia.inference` is true.
|
|
80
97
|
- `agents` (required): runtime property names mapped to folders relative to
|
|
81
98
|
`orcha/`. At least one agent is required.
|
|
82
99
|
- `amarsia.key` (optional): project connection key generated in Amarsia.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
100
|
+
By itself, it syncs structural project and agent metadata only. Enabling
|
|
101
|
+
inference sends model requests through Amarsia, and cloud storage syncs
|
|
102
|
+
session events. Provider credentials, environment values, and action source
|
|
103
|
+
are never included.
|
|
86
104
|
- `amarsia.endpoint` (optional): Amarsia API URL for project sync. Defaults to
|
|
87
105
|
`AMARSIA_API_URL` and then `https://api.amarsia.com`.
|
|
106
|
+
- `amarsia.inference` (optional): routes all model calls through Amarsia while
|
|
107
|
+
preserving the provider and model in each manifest. It reuses `amarsia.key`;
|
|
108
|
+
local provider credentials are not required.
|
|
88
109
|
- `actions` (optional): overrides the native local-action runtime or configures
|
|
89
110
|
its environment and sandbox settings.
|
|
90
|
-
- `
|
|
91
|
-
|
|
111
|
+
- `mcp.credentials` (optional): runtime-only values used to resolve
|
|
112
|
+
`${NAME}` placeholders in MCP headers or stdio environment values.
|
|
113
|
+
- `storage.strategy` (optional): `"node-jsonl"` (default), `"sqlite"`, or
|
|
114
|
+
local-first `"cloud"`. Cloud requires `amarsia.key`, keeps a native local
|
|
115
|
+
cache, commits appends locally without cloud latency, and delivers durable
|
|
116
|
+
bounded outbox batches in the background. Await `orcha.close()` before
|
|
117
|
+
reinitializing; close reports any cloud tail that could not be flushed.
|
|
92
118
|
- `storage.directory` (optional): session directory relative to project
|
|
93
119
|
root; defaults to `.orcha/sessions`.
|
|
94
120
|
- `root` (optional): absolute or working-directory-relative project root;
|
|
@@ -138,11 +164,47 @@ explicit service-account credentials are optional. Bedrock requires `region`;
|
|
|
138
164
|
explicit AWS credentials are optional. Never place credentials in
|
|
139
165
|
`index.json`, instructions, tests, session metadata, or committed files.
|
|
140
166
|
|
|
167
|
+
## MCP connections
|
|
168
|
+
|
|
169
|
+
Assign named MCP folders in an agent or subagent registration:
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
agents: {
|
|
173
|
+
supportBot: {
|
|
174
|
+
path: "./supportBot",
|
|
175
|
+
mcp: {
|
|
176
|
+
github: "./mcp/github",
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
`orcha/mcp/github/index.json` configures either cross-platform Streamable
|
|
183
|
+
HTTP or Node-only stdio:
|
|
184
|
+
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"transport": "streamable-http",
|
|
188
|
+
"url": "https://mcp.example.com",
|
|
189
|
+
"headers": {
|
|
190
|
+
"Authorization": "Bearer ${GITHUB_MCP_TOKEN}"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
All discovered tools are available as `github__<toolName>`. MCP output is
|
|
196
|
+
untrusted external data. Keep secrets out of JSON and provide placeholder
|
|
197
|
+
values through `orcha.init().mcp.credentials`; Node also reads
|
|
198
|
+
`process.env`.
|
|
199
|
+
|
|
141
200
|
## Agent folders
|
|
142
201
|
|
|
143
202
|
```text
|
|
144
203
|
orcha/
|
|
145
204
|
index.ts
|
|
205
|
+
mcp/
|
|
206
|
+
github/
|
|
207
|
+
index.json
|
|
146
208
|
supportBot/
|
|
147
209
|
index.json
|
|
148
210
|
instructions.md
|
|
@@ -302,7 +364,7 @@ environment. The complete pause/continue flow is:
|
|
|
302
364
|
}
|
|
303
365
|
5. Application executes every requested action.
|
|
304
366
|
6. Application calls agent.resume(sessionId, {
|
|
305
|
-
toolResults: [{ callId, output, isError? }]
|
|
367
|
+
toolResults: [{ callId, output, contents?, isError? }]
|
|
306
368
|
}).
|
|
307
369
|
7. Orcha validates every callId and output, stores the results, and continues
|
|
308
370
|
the same paused run from its prior model context.
|
|
@@ -342,9 +404,9 @@ const result = await execution.result;
|
|
|
342
404
|
const evaluations = await execution.evaluations;
|
|
343
405
|
```
|
|
344
406
|
|
|
345
|
-
`run()`
|
|
407
|
+
`run()` and conversational `resume()` accept either a direct `AgentContentInput` (a string, a single content item, or an array of content items) or an object with `content` and optional fields:
|
|
346
408
|
|
|
347
|
-
- `content` (required): a non-empty string, one content item, or an array.
|
|
409
|
+
- `content` (required when passing an options object): a non-empty string, one content item, or an array.
|
|
348
410
|
Use `{ filePath: "./document.pdf" }` for a local file or
|
|
349
411
|
`{ url: "https://example.com/document.pdf" }` for a remote file.
|
|
350
412
|
`mimeType` is optional when it can be inferred from the extension. Durable
|
|
@@ -374,7 +436,11 @@ client actions in the application and submit every result:
|
|
|
374
436
|
```ts
|
|
375
437
|
orcha.supportBot.resume(sessionId, {
|
|
376
438
|
toolResults: [
|
|
377
|
-
{
|
|
439
|
+
{
|
|
440
|
+
callId: "call_123",
|
|
441
|
+
output: { approved: true },
|
|
442
|
+
contents: [{ filePath: "./signed-approval.pdf" }], // optional media/content items
|
|
443
|
+
}
|
|
378
444
|
],
|
|
379
445
|
});
|
|
380
446
|
```
|
|
@@ -482,6 +548,11 @@ The local action signature is
|
|
|
482
548
|
`sessionId`, immutable session `metadata`, a stable `idempotencyKey`,
|
|
483
549
|
allowlisted `env`, guarded `fetch`, and prefixed `log`.
|
|
484
550
|
|
|
551
|
+
Actions can also return media or multimodal content back to the model alongside
|
|
552
|
+
their structured JSON output by returning `{ output: jsonOutput, contents: [...] }`.
|
|
553
|
+
`contents` accepts any `AgentContentInput` (such as `{ filePath }`,
|
|
554
|
+
`{ url }`, or content items). `outputSchema` validates `output` directly.
|
|
555
|
+
|
|
485
556
|
## Skills
|
|
486
557
|
|
|
487
558
|
Skills are lazy-loaded procedural instructions. Direct child folders under
|
|
@@ -1029,7 +1100,7 @@ offline production compilation. Neither command invokes a provider.
|
|
|
1029
1100
|
The parent reports `waiting_for_subagent` until each synchronous child
|
|
1030
1101
|
call returns.
|
|
1031
1102
|
8. The model loop continues until final output, failure, a pause, or the
|
|
1032
|
-
maximum of
|
|
1103
|
+
maximum of 20 action rounds.
|
|
1033
1104
|
9. Usage is normalized and aggregated across every model call in the run.
|
|
1034
1105
|
10. After `run.completed`, enabled evaluations start in the background.
|
|
1035
1106
|
`execution.result` is already available; `execution.evaluations` waits
|