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 +1 -1
- package/dist/cli.js +41 -47
- package/dist/playground/server.js +2 -2
- package/dist-cjs/playground/server.js +2 -2
- package/package.json +3 -3
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.
|
|
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
|
-
|
|
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
|
-
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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/
|
|
482
|
-
stylesheetPath = fileURLToPath(import.meta.resolve("@orchajs/playground-ui/
|
|
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/
|
|
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/
|
|
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.
|
|
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.
|
|
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",
|