orchajs 0.23.6 → 0.23.8

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/dist/bin.js CHANGED
@@ -3,7 +3,7 @@ import { spawn } from "node:child_process";
3
3
  import { existsSync } from "node:fs";
4
4
  import { resolve } from "node:path";
5
5
  const TOOLING_PACKAGES = [
6
- "@orchajs/playground-ui@^0.2.4",
6
+ "@orchajs/playground-ui@^0.2.5",
7
7
  "esbuild@^0.25",
8
8
  "chokidar@^4",
9
9
  "dotenv@^16",
package/dist/cli.js CHANGED
@@ -17,54 +17,48 @@ import { runTests } from "./testing.js";
17
17
  const command = process.argv[2];
18
18
  const commandArguments = process.argv.slice(3);
19
19
  const projectRoot = process.cwd();
20
- try {
21
- switch (command) {
22
- case "init":
23
- assertNoArguments(commandArguments, "init");
24
- await initializeProject(projectRoot);
25
- break;
26
- case "dev":
27
- await watchProject(projectRoot, parseDevTargets(commandArguments));
28
- break;
29
- case "run":
30
- await runAgent(projectRoot, commandArguments);
31
- break;
32
- case "test":
33
- await testAgents(projectRoot, commandArguments);
34
- break;
35
- case "playground":
36
- await runPlayground(projectRoot, commandArguments);
37
- break;
38
- case "migrate-storage":
39
- await migrateStorage(projectRoot, commandArguments);
40
- break;
41
- case "export-session":
42
- await exportSession(projectRoot, commandArguments);
43
- break;
44
- case "build": {
45
- const parsed = parseArguments(commandArguments, new Set(["--target"]), new Set());
46
- if (parsed.positionals.length > 0) {
47
- throw new Error("Usage: orcha build [--target node|browser|react-native]");
48
- }
49
- const target = parseBuildTarget(parsed.values.get("--target"));
50
- loadProjectEnvironment(projectRoot);
51
- const outputPath = await buildProject({ projectRoot, target });
52
- console.log(`Built ${relative(projectRoot, outputPath)}`);
53
- break;
20
+ switch (command) {
21
+ case "init":
22
+ assertNoArguments(commandArguments, "init");
23
+ await initializeProject(projectRoot);
24
+ break;
25
+ case "dev":
26
+ await watchProject(projectRoot, parseDevTargets(commandArguments));
27
+ break;
28
+ case "run":
29
+ await runAgent(projectRoot, commandArguments);
30
+ break;
31
+ case "test":
32
+ await testAgents(projectRoot, commandArguments);
33
+ break;
34
+ case "playground":
35
+ await runPlayground(projectRoot, commandArguments);
36
+ break;
37
+ case "migrate-storage":
38
+ await migrateStorage(projectRoot, commandArguments);
39
+ break;
40
+ case "export-session":
41
+ await exportSession(projectRoot, commandArguments);
42
+ break;
43
+ case "build": {
44
+ const parsed = parseArguments(commandArguments, new Set(["--target"]), new Set());
45
+ if (parsed.positionals.length > 0) {
46
+ throw new Error("Usage: orcha build [--target node|browser|react-native]");
54
47
  }
55
- case "help":
56
- case "--help":
57
- case "-h":
58
- case undefined:
59
- printUsage();
60
- break;
61
- default:
62
- throw new Error(`Unknown command "${command}". Run "orcha --help".`);
63
- }
64
- }
65
- catch (error) {
66
- console.error(error instanceof Error ? error.message : String(error));
67
- process.exitCode = 1;
48
+ const target = parseBuildTarget(parsed.values.get("--target"));
49
+ loadProjectEnvironment(projectRoot);
50
+ const outputPath = await buildProject({ projectRoot, target });
51
+ console.log(`Built ${relative(projectRoot, outputPath)}`);
52
+ break;
53
+ }
54
+ case "help":
55
+ case "--help":
56
+ case "-h":
57
+ case undefined:
58
+ printUsage();
59
+ break;
60
+ default:
61
+ throw new Error(`Unknown command "${command}". Run "orcha --help".`);
68
62
  }
69
63
  async function initializeProject(projectRoot) {
70
64
  const files = new Map([
@@ -478,8 +478,8 @@ async function buildPlaygroundAssets(projectRoot) {
478
478
  let stylesheetPath;
479
479
  let logoPath;
480
480
  try {
481
- scriptPath = fileURLToPath(import.meta.resolve("@orchajs/playground-ui/app.js"));
482
- stylesheetPath = fileURLToPath(import.meta.resolve("@orchajs/playground-ui/app.css"));
481
+ scriptPath = fileURLToPath(import.meta.resolve("@orchajs/playground-ui/playground.js"));
482
+ stylesheetPath = fileURLToPath(import.meta.resolve("@orchajs/playground-ui/playground.css"));
483
483
  logoPath = fileURLToPath(import.meta.resolve("@orchajs/playground-ui/orcha-logo.svg"));
484
484
  }
485
485
  catch (error) {
@@ -506,10 +506,10 @@ async function buildPlaygroundAssets(projectRoot) {
506
506
  let logoPath;
507
507
  try {
508
508
  scriptPath = (0, import_url.fileURLToPath)(
509
- import_meta.resolve("@orchajs/playground-ui/app.js")
509
+ import_meta.resolve("@orchajs/playground-ui/playground.js")
510
510
  );
511
511
  stylesheetPath = (0, import_url.fileURLToPath)(
512
- import_meta.resolve("@orchajs/playground-ui/app.css")
512
+ import_meta.resolve("@orchajs/playground-ui/playground.css")
513
513
  );
514
514
  logoPath = (0, import_url.fileURLToPath)(
515
515
  import_meta.resolve("@orchajs/playground-ui/orcha-logo.svg")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orchajs",
3
- "version": "0.23.6",
3
+ "version": "0.23.8",
4
4
  "description": "A filesystem-convention, stateful agent framework for JavaScript.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -107,7 +107,7 @@
107
107
  "LICENSE"
108
108
  ],
109
109
  "scripts": {
110
- "build": "node scripts/clean-dist.mjs && npm run build --workspace=@orchajs/playground-ui && tsc -p tsconfig.json && node scripts/build-cjs.mjs && tsc -p tsconfig.playground.json",
110
+ "build": "node scripts/clean-dist.mjs && npm run build --workspace=@orchajs/playground-ui && tsc -p tsconfig.json && node scripts/build-cjs.mjs && tsc -p tsconfig.playground.json && node scripts/finalize-build.mjs",
111
111
  "dev": "tsc -p tsconfig.json --watch",
112
112
  "test": "npm run build && npm run test:runtime && npm run test:create-orcha",
113
113
  "test:runtime": "node --test tests/*.test.mjs",
@@ -124,7 +124,7 @@
124
124
  "node": ">=18.20.8"
125
125
  },
126
126
  "peerDependencies": {
127
- "@orchajs/playground-ui": ">=0.2.4",
127
+ "@orchajs/playground-ui": ">=0.2.5",
128
128
  "@react-native-async-storage/async-storage": ">=2 <3",
129
129
  "@aws-sdk/client-bedrock-runtime": ">=3.864.0 <4",
130
130
  "@google/genai": ">=2.22.0 <3",