subagent-cli 0.2.0 → 0.2.2
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/cli.cjs +28 -0
- package/dist/cli.js +4 -0
- package/package.json +4 -2
- package/tsconfig.json +28 -0
package/dist/cli.cjs
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Morph Code launcher — delegates to Bun
|
|
3
|
+
const { execSync, spawn } = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
const libDir = path.resolve(__dirname, '..');
|
|
7
|
+
const entry = path.join(libDir, 'src', 'entrypoints', 'cli.tsx');
|
|
8
|
+
const preload = path.join(libDir, 'stubs', 'globals.ts');
|
|
9
|
+
|
|
10
|
+
// Find Bun
|
|
11
|
+
let bunPath;
|
|
12
|
+
try {
|
|
13
|
+
bunPath = execSync('which bun', { encoding: 'utf-8' }).trim();
|
|
14
|
+
} catch {
|
|
15
|
+
console.error('Error: Morph Code requires Bun runtime.');
|
|
16
|
+
console.error('Install Bun: curl -fsSL https://bun.sh/install | bash');
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Launch Bun with --cwd pointing to the package root so tsconfig.json
|
|
21
|
+
// path aliases (src/*) resolve correctly, but pass the real cwd via env
|
|
22
|
+
// so file operations use the user's directory.
|
|
23
|
+
const child = spawn(bunPath, ['run', '--cwd', libDir, '--preload', preload, entry, ...process.argv.slice(2)], {
|
|
24
|
+
stdio: 'inherit',
|
|
25
|
+
env: { ...process.env, SA_USER_CWD: process.cwd() },
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
child.on('exit', (code) => process.exit(code ?? 0));
|
package/dist/cli.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "subagent-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "sa — Morph Code CLI (Claude Code fork with multi-provider LLM, WarpGrep, and subagent support)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
"bin",
|
|
11
11
|
"src",
|
|
12
12
|
"stubs",
|
|
13
|
-
"bunfig.toml"
|
|
13
|
+
"bunfig.toml",
|
|
14
|
+
"dist",
|
|
15
|
+
"tsconfig.json"
|
|
14
16
|
],
|
|
15
17
|
"scripts": {
|
|
16
18
|
"build": "tsup src/main.tsx --format esm --dts --target node20",
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"jsx": "react-jsx",
|
|
7
|
+
"jsxImportSource": "react",
|
|
8
|
+
"strict": false,
|
|
9
|
+
"noImplicitAny": false,
|
|
10
|
+
"strictNullChecks": false,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"allowImportingTsExtensions": true,
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
"isolatedModules": true,
|
|
17
|
+
"verbatimModuleSyntax": false,
|
|
18
|
+
"allowJs": true,
|
|
19
|
+
"paths": {
|
|
20
|
+
"src/*": ["./src/*"],
|
|
21
|
+
"color-diff-napi": ["./src/native-ts/color-diff/index.ts"]
|
|
22
|
+
},
|
|
23
|
+
"baseUrl": ".",
|
|
24
|
+
"types": []
|
|
25
|
+
},
|
|
26
|
+
"include": ["src/**/*", "stubs/**/*"],
|
|
27
|
+
"exclude": ["node_modules"]
|
|
28
|
+
}
|