mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 19:00:44 +00:00
Fix pi-agent CLI execution issue when installed globally
- Remove isMainModule check that was preventing execution via npm symlink - CLI now runs main function directly when executed - Bump version to 0.5.1
This commit is contained in:
parent
c615f3f011
commit
d304f377d7
10 changed files with 19 additions and 110 deletions
4
packages/agent/package-lock.json
generated
4
packages/agent/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@mariozechner/pi-agent",
|
||||
"version": "0.5.0",
|
||||
"version": "0.5.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@mariozechner/pi-agent",
|
||||
"version": "0.5.0",
|
||||
"version": "0.5.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@mariozechner/tui": "^0.1.1",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@mariozechner/pi-agent",
|
||||
"version": "0.5.0",
|
||||
"version": "0.5.1",
|
||||
"description": "General-purpose agent with tool calling and session persistence",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
"prepublishOnly": "npm run clean && npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mariozechner/pi-tui": "^0.5.0",
|
||||
"@mariozechner/pi-tui": "^0.5.1",
|
||||
"@types/glob": "^8.1.0",
|
||||
"chalk": "^5.5.0",
|
||||
"glob": "^11.0.3",
|
||||
|
|
|
|||
|
|
@ -286,9 +286,8 @@ export async function main(args: string[]): Promise<void> {
|
|||
}
|
||||
|
||||
// Run as CLI if invoked directly
|
||||
if (import.meta.url === `file://${process.argv[1]}`) {
|
||||
main(process.argv.slice(2)).catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
// Run main function when executed directly
|
||||
main(process.argv.slice(2)).catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue