create-orcha 0.4.0 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-orcha",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Create a complete OrchaJS project with example agents and a local playground.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -32,7 +32,7 @@
32
32
  "test": "node --test"
33
33
  },
34
34
  "engines": {
35
- "node": ">=20"
35
+ "node": ">=18.20.8"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public"
@@ -16,12 +16,17 @@ files under `.orcha/`.
16
16
  pending client-action results.
17
17
  - `orcha test` runs every enabled discovered agent test.
18
18
  - `orcha test <agent>` or `orcha test <agent>/<case>` narrows the run.
19
+ - `orcha migrate-storage --to sqlite|node-jsonl` copies all session histories
20
+ between local stores without deleting the source.
21
+ - `orcha export-session <agent> <sessionId> [--output <path>]` exports one
22
+ session from the active store as JSONL.
19
23
  - `orcha build` creates the production Orcha bundle without calling models.
20
24
  - Add `--json` to `run` and `test` for machine-readable output.
21
25
 
22
26
  `run`, `test`, and playground executions use real providers and require
23
- credentials. `dev` and `build` are offline. Session logs are JSONL files under
24
- `.orcha/sessions/<agentName>/ses_<timestamp>_<uuid>.jsonl`.
27
+ credentials. `dev` and `build` are offline. Sessions use JSONL by default
28
+ under `.orcha/sessions/<agentName>/`; opt-in SQLite stores all agents in
29
+ `.orcha/sessions/orcha-sqlite.db`.
25
30
 
26
31
  ## Registry
27
32
 
@@ -52,9 +57,16 @@ required.
52
57
  name.
53
58
  - `agents` (required): runtime property names mapped to folders relative to
54
59
  `orcha/`. At least one agent is required.
60
+ - `amarsia.key` (optional): project connection key generated in Amarsia.
61
+ When set, Orcha syncs structural project and agent metadata only. It never
62
+ uploads provider credentials, environment values, prompts, instructions,
63
+ test inputs, or action source.
64
+ - `amarsia.endpoint` (optional): Amarsia API URL for project sync. Defaults to
65
+ `AMARSIA_API_URL` and then `https://api.amarsia.com`.
55
66
  - `actions` (optional): overrides the native local-action runtime or configures
56
67
  its environment and sandbox settings.
57
- - `storage.strategy` (optional): currently only `"node-jsonl"`.
68
+ - `storage.strategy` (optional): `"node-jsonl"` (default) or `"sqlite"`.
69
+ The SQLite driver ships as an internal optional Orcha dependency.
58
70
  - `storage.directory` (optional): session directory relative to project
59
71
  root; defaults to `.orcha/sessions`.
60
72
  - `root` (optional): absolute or working-directory-relative project root;
@@ -595,9 +607,9 @@ string, and non-empty evidence array for every configured metric.
595
607
 
596
608
  ## Sessions and logs
597
609
 
598
- JSONL is the durable source of truth. Each line is one complete JSON object;
599
- never treat the file as one JSON array. Events are append-only and ordered by
600
- `sequence`.
610
+ The configured session store is the durable source of truth. JSONL stores one
611
+ complete event object per line; SQLite stores one event per row. Events are
612
+ append-only and ordered by `sequence`.
601
613
 
602
614
  All events use this envelope:
603
615
 
@@ -1007,7 +1019,7 @@ cause `resume()` to fail spuriously or reuse sequence numbers.
1007
1019
 
1008
1020
  ### Replay and context
1009
1021
 
1010
- Orcha does not send raw JSONL back to the model. It projects durable events
1022
+ Orcha does not send raw stored events back to the model. It projects them
1011
1023
  into provider-neutral conversation messages. Completed and explicitly paused
1012
1024
  conversational runs become user, assistant, and tool messages, so a new run
1013
1025
  sees incomplete assistant text preserved by `pause()`. Lifecycle bookkeeping
@@ -1,6 +1,9 @@
1
1
  import { orcha } from "orchajs";
2
2
 
3
3
  orcha.init({
4
+ amarsia: process.env.AMARSIA_PROJECT_KEY
5
+ ? { key: process.env.AMARSIA_PROJECT_KEY }
6
+ : undefined,
4
7
  providers: {
5
8
  openai: process.env.OPENAI_API_KEY ?? "",
6
9
  },
@@ -15,6 +15,6 @@
15
15
  "orchajs": "__ORCHA_VERSION__"
16
16
  },
17
17
  "engines": {
18
- "node": ">=20.12"
18
+ "node": ">=18.20.8"
19
19
  }
20
20
  }