mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-07-09 17:28:45 +00:00
chore: package structure
This commit is contained in:
parent
20da9bc140
commit
7ece19b0e8
8 changed files with 100 additions and 1 deletions
|
|
@ -12,7 +12,7 @@
|
|||
],
|
||||
"scripts": {
|
||||
"clean": "npm run clean --workspaces",
|
||||
"build": "cd packages/tui && npm run build && cd ../ai && npm run build && cd ../agent && npm run build && cd ../coding-agent && npm run build",
|
||||
"build": "cd packages/tui && npm run build && cd ../ai && npm run build && cd ../agent && npm run build && cd ../coding-agent && npm run build && cd ../orchestrator && npm run build",
|
||||
"check": "biome check --write --error-on-warnings . && npm run check:pinned-deps && npm run check:ts-imports && npm run check:shrinkwrap && tsgo --noEmit && npm run check:browser-smoke",
|
||||
"check:browser-smoke": "node scripts/check-browser-smoke.mjs",
|
||||
"check:pinned-deps": "node scripts/check-pinned-deps.mjs",
|
||||
|
|
|
|||
3
packages/orchestrator/CHANGELOG.md
Normal file
3
packages/orchestrator/CHANGELOG.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Changelog
|
||||
|
||||
## [Unreleased]
|
||||
9
packages/orchestrator/README.md
Normal file
9
packages/orchestrator/README.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# orchestrator
|
||||
|
||||
Orchestrator package for pi.
|
||||
|
||||
## CLI
|
||||
|
||||
```bash
|
||||
orchestrator --help
|
||||
```
|
||||
46
packages/orchestrator/package.json
Normal file
46
packages/orchestrator/package.json
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"name": "@earendil-works/pi-orchestrator",
|
||||
"version": "0.79.6",
|
||||
"description": "orchestrator package for pi",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"orchestrator": "dist/cli.js"
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md",
|
||||
"CHANGELOG.md"
|
||||
],
|
||||
"scripts": {
|
||||
"clean": "shx rm -rf dist",
|
||||
"dev": "tsgo -p tsconfig.build.json --watch --preserveWatchOutput",
|
||||
"build": "tsgo -p tsconfig.build.json && shx chmod +x dist/cli.js",
|
||||
"prepublishOnly": "npm run clean && npm run build"
|
||||
},
|
||||
"keywords": [
|
||||
"pi",
|
||||
"orchestrator"
|
||||
],
|
||||
"author": "Earendil Works",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/badlogic/pi-mono.git",
|
||||
"directory": "packages/orchestrator"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.19.0"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"shx": "0.4.0"
|
||||
}
|
||||
}
|
||||
30
packages/orchestrator/src/cli.ts
Normal file
30
packages/orchestrator/src/cli.ts
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env node
|
||||
import { readFileSync } from "node:fs";
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const packageJson = JSON.parse(readFileSync(join(__dirname, "../package.json"), "utf-8")) as {
|
||||
version: string;
|
||||
};
|
||||
|
||||
function printHelp(): void {
|
||||
console.log(`orchestrator v${packageJson.version}\n\nUsage:\n orchestrator --help\n orchestrator --version`);
|
||||
}
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
|
||||
if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
|
||||
printHelp();
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
if (args[0] === "--version" || args[0] === "-v") {
|
||||
console.log(packageJson.version);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
console.error(`Unknown command: ${args[0]}`);
|
||||
printHelp();
|
||||
process.exit(1);
|
||||
0
packages/orchestrator/src/index.ts
Normal file
0
packages/orchestrator/src/index.ts
Normal file
9
packages/orchestrator/tsconfig.build.json
Normal file
9
packages/orchestrator/tsconfig.build.json
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["node_modules", "dist", "**/*.d.ts", "src/**/*.d.ts"]
|
||||
}
|
||||
|
|
@ -13,6 +13,8 @@
|
|||
"@earendil-works/pi-coding-agent": ["./packages/coding-agent/src/index.ts"],
|
||||
"@earendil-works/pi-coding-agent/hooks": ["./packages/coding-agent/src/core/hooks/index.ts"],
|
||||
"@earendil-works/pi-coding-agent/*": ["./packages/coding-agent/src/*"],
|
||||
"@earendil-works/pi-orchestrator": ["./packages/orchestrator/src/index.ts"],
|
||||
"@earendil-works/pi-orchestrator/*": ["./packages/orchestrator/src/*"],
|
||||
"typebox": ["./node_modules/typebox"],
|
||||
"@earendil-works/pi-tui": ["./packages/tui/src/index.ts"],
|
||||
"@earendil-works/pi-tui/*": ["./packages/tui/src/*"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue