@mariozechner/pi-coding-agent 0.12.0 → 0.12.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/CHANGELOG.md +12 -0
- package/README.md +7 -2
- package/dist/paths.d.ts +2 -2
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +4 -4
- package/dist/paths.js.map +1 -1
- package/dist/tools/index.d.ts +11 -11
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.12.2] - 2025-12-02
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **Windows Binary Path Resolution**: Fixed Bun compiled binary on Windows failing to find `package.json` and other assets. The binary was incorrectly using the Bun runtime's virtual filesystem path (`B:\~BUN\`) instead of the actual executable location. Now uses `process.execPath` which correctly points to the compiled binary, and updated detection to check for `%7EBUN` (URL-encoded `~BUN`) in `import.meta.url`.
|
|
10
|
+
|
|
11
|
+
## [0.12.1] - 2025-12-02
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- **Binary Archive Structure**: Binary downloads now contain `pi` (or `pi.exe` on Windows) instead of platform-suffixed names like `pi-darwin-arm64`, making it easier to use after extraction.
|
|
16
|
+
|
|
5
17
|
## [0.12.0] - 2025-12-02
|
|
6
18
|
|
|
7
19
|
### Added
|
package/README.md
CHANGED
|
@@ -52,15 +52,20 @@ Extract and run:
|
|
|
52
52
|
```bash
|
|
53
53
|
# macOS/Linux
|
|
54
54
|
tar -xzf pi-darwin-arm64.tar.gz
|
|
55
|
-
./pi
|
|
55
|
+
./pi
|
|
56
56
|
|
|
57
57
|
# Windows
|
|
58
58
|
unzip pi-windows-x64.zip
|
|
59
|
-
pi
|
|
59
|
+
pi.exe
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
The archive includes the binary plus supporting files (README, CHANGELOG, themes). Keep them together in the same directory.
|
|
63
63
|
|
|
64
|
+
**macOS users**: The binary is not signed. macOS may block it on first run. To fix:
|
|
65
|
+
```bash
|
|
66
|
+
xattr -c ./pi
|
|
67
|
+
```
|
|
68
|
+
|
|
64
69
|
### Build Binary from Source
|
|
65
70
|
|
|
66
71
|
Requires [Bun](https://bun.sh) 1.0+:
|
package/dist/paths.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Detect if we're running as a Bun compiled binary.
|
|
3
|
-
* Bun binaries have import.meta.url
|
|
3
|
+
* Bun binaries have import.meta.url containing "%7EBUN" (URL-encoded ~BUN virtual filesystem path)
|
|
4
4
|
*/
|
|
5
5
|
export declare const isBunBinary: boolean;
|
|
6
6
|
/**
|
|
@@ -12,7 +12,7 @@ export declare const isBunBinary: boolean;
|
|
|
12
12
|
export declare function getPackageDir(): string;
|
|
13
13
|
/**
|
|
14
14
|
* Get path to the theme directory
|
|
15
|
-
* - For Bun binary:
|
|
15
|
+
* - For Bun binary: theme/ next to executable
|
|
16
16
|
* - For Node.js (dist/): dist/theme/
|
|
17
17
|
* - For tsx (src/): src/theme/
|
|
18
18
|
*/
|
package/dist/paths.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,eAAO,MAAM,WAAW,SAAqC,CAAC;AAO9D;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAWtC;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAMpC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC","sourcesContent":["import { existsSync } from \"fs\";\nimport { dirname, join, resolve } from \"path\";\nimport { fileURLToPath } from \"url\";\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n/**\n * Detect if we're running as a Bun compiled binary.\n * Bun binaries have import.meta.url containing \"%7EBUN\" (URL-encoded ~BUN virtual filesystem path)\n */\nexport const isBunBinary = import.meta.url.includes(\"%7EBUN\");\n\n/**\n * Type definition for Bun global (only available when running via Bun)\n */\ndeclare const Bun: { main: string } | undefined;\n\n/**\n * Get the base directory for resolving package assets (themes, package.json, README.md, CHANGELOG.md).\n * - For Bun binary: returns the directory containing the executable\n * - For Node.js (dist/): returns __dirname (the dist/ directory)\n * - For tsx (src/): returns parent directory (the package root)\n */\nexport function getPackageDir(): string {\n\tif (isBunBinary) {\n\t\t// Bun binary: process.execPath points to the compiled executable\n\t\treturn dirname(process.execPath);\n\t}\n\t// Node.js: check if package.json exists in __dirname (dist/) or parent (src/ case)\n\tif (existsSync(join(__dirname, \"package.json\"))) {\n\t\treturn __dirname;\n\t}\n\t// Running from src/ via tsx - go up one level to package root\n\treturn dirname(__dirname);\n}\n\n/**\n * Get path to the theme directory\n * - For Bun binary: theme/ next to executable\n * - For Node.js (dist/): dist/theme/\n * - For tsx (src/): src/theme/\n */\nexport function getThemeDir(): string {\n\tif (isBunBinary) {\n\t\treturn join(dirname(process.execPath), \"theme\");\n\t}\n\t// __dirname is either dist/ or src/ - theme is always a subdirectory\n\treturn join(__dirname, \"theme\");\n}\n\n/**\n * Get path to package.json\n */\nexport function getPackageJsonPath(): string {\n\treturn join(getPackageDir(), \"package.json\");\n}\n\n/**\n * Get path to README.md\n */\nexport function getReadmePath(): string {\n\treturn resolve(join(getPackageDir(), \"README.md\"));\n}\n\n/**\n * Get path to CHANGELOG.md\n */\nexport function getChangelogPath(): string {\n\treturn resolve(join(getPackageDir(), \"CHANGELOG.md\"));\n}\n"]}
|
package/dist/paths.js
CHANGED
|
@@ -5,9 +5,9 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
5
5
|
const __dirname = dirname(__filename);
|
|
6
6
|
/**
|
|
7
7
|
* Detect if we're running as a Bun compiled binary.
|
|
8
|
-
* Bun binaries have import.meta.url
|
|
8
|
+
* Bun binaries have import.meta.url containing "%7EBUN" (URL-encoded ~BUN virtual filesystem path)
|
|
9
9
|
*/
|
|
10
|
-
export const isBunBinary = import.meta.url.
|
|
10
|
+
export const isBunBinary = import.meta.url.includes("%7EBUN");
|
|
11
11
|
/**
|
|
12
12
|
* Get the base directory for resolving package assets (themes, package.json, README.md, CHANGELOG.md).
|
|
13
13
|
* - For Bun binary: returns the directory containing the executable
|
|
@@ -16,7 +16,7 @@ export const isBunBinary = import.meta.url.startsWith("file:///$bunfs/");
|
|
|
16
16
|
*/
|
|
17
17
|
export function getPackageDir() {
|
|
18
18
|
if (isBunBinary) {
|
|
19
|
-
// Bun binary:
|
|
19
|
+
// Bun binary: process.execPath points to the compiled executable
|
|
20
20
|
return dirname(process.execPath);
|
|
21
21
|
}
|
|
22
22
|
// Node.js: check if package.json exists in __dirname (dist/) or parent (src/ case)
|
|
@@ -28,7 +28,7 @@ export function getPackageDir() {
|
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Get path to the theme directory
|
|
31
|
-
* - For Bun binary:
|
|
31
|
+
* - For Bun binary: theme/ next to executable
|
|
32
32
|
* - For Node.js (dist/): dist/theme/
|
|
33
33
|
* - For tsx (src/): src/theme/
|
|
34
34
|
*/
|
package/dist/paths.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAA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C,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;IACD,qEAAqE;IACrE,OAAO,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAAA,CAChC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,GAAW;IAC5C,OAAO,IAAI,CAAC,aAAa,EAAE,EAAE,cAAc,CAAC,CAAC;AAAA,CAC7C;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,GAAW;IACvC,OAAO,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,WAAW,CAAC,CAAC,CAAC;AAAA,CACnD;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,GAAW;IAC1C,OAAO,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC;AAAA,CACtD","sourcesContent":["import { existsSync } from \"fs\";\nimport { dirname, join, resolve } from \"path\";\nimport { fileURLToPath } from \"url\";\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n/**\n * Detect if we're running as a Bun compiled binary.\n * Bun binaries have import.meta.url containing \"%7EBUN\" (URL-encoded ~BUN virtual filesystem path)\n */\nexport const isBunBinary = import.meta.url.includes(\"%7EBUN\");\n\n/**\n * Type definition for Bun global (only available when running via Bun)\n */\ndeclare const Bun: { main: string } | undefined;\n\n/**\n * Get the base directory for resolving package assets (themes, package.json, README.md, CHANGELOG.md).\n * - For Bun binary: returns the directory containing the executable\n * - For Node.js (dist/): returns __dirname (the dist/ directory)\n * - For tsx (src/): returns parent directory (the package root)\n */\nexport function getPackageDir(): string {\n\tif (isBunBinary) {\n\t\t// Bun binary: process.execPath points to the compiled executable\n\t\treturn dirname(process.execPath);\n\t}\n\t// Node.js: check if package.json exists in __dirname (dist/) or parent (src/ case)\n\tif (existsSync(join(__dirname, \"package.json\"))) {\n\t\treturn __dirname;\n\t}\n\t// Running from src/ via tsx - go up one level to package root\n\treturn dirname(__dirname);\n}\n\n/**\n * Get path to the theme directory\n * - For Bun binary: theme/ next to executable\n * - For Node.js (dist/): dist/theme/\n * - For tsx (src/): src/theme/\n */\nexport function getThemeDir(): string {\n\tif (isBunBinary) {\n\t\treturn join(dirname(process.execPath), \"theme\");\n\t}\n\t// __dirname is either dist/ or src/ - theme is always a subdirectory\n\treturn join(__dirname, \"theme\");\n}\n\n/**\n * Get path to package.json\n */\nexport function getPackageJsonPath(): string {\n\treturn join(getPackageDir(), \"package.json\");\n}\n\n/**\n * Get path to README.md\n */\nexport function getReadmePath(): string {\n\treturn resolve(join(getPackageDir(), \"README.md\"));\n}\n\n/**\n * Get path to CHANGELOG.md\n */\nexport function getChangelogPath(): string {\n\treturn resolve(join(getPackageDir(), \"CHANGELOG.md\"));\n}\n"]}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -5,41 +5,41 @@ export { grepTool } from "./grep.js";
|
|
|
5
5
|
export { lsTool } from "./ls.js";
|
|
6
6
|
export { readTool } from "./read.js";
|
|
7
7
|
export { writeTool } from "./write.js";
|
|
8
|
-
export declare const codingTools: (import("
|
|
8
|
+
export declare const codingTools: (import("../../../ai/dist/index.js").AgentTool<import("@sinclair/typebox").TObject<{
|
|
9
9
|
command: import("@sinclair/typebox").TString;
|
|
10
10
|
timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
11
|
-
}>, any> | import("
|
|
11
|
+
}>, any> | import("../../../ai/dist/index.js").AgentTool<import("@sinclair/typebox").TObject<{
|
|
12
12
|
path: import("@sinclair/typebox").TString;
|
|
13
13
|
oldText: import("@sinclair/typebox").TString;
|
|
14
14
|
newText: import("@sinclair/typebox").TString;
|
|
15
|
-
}>, any> | import("
|
|
15
|
+
}>, any> | import("../../../ai/dist/index.js").AgentTool<import("@sinclair/typebox").TObject<{
|
|
16
16
|
path: import("@sinclair/typebox").TString;
|
|
17
17
|
offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
18
18
|
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
19
|
-
}>, any> | import("
|
|
19
|
+
}>, any> | import("../../../ai/dist/index.js").AgentTool<import("@sinclair/typebox").TObject<{
|
|
20
20
|
path: import("@sinclair/typebox").TString;
|
|
21
21
|
content: import("@sinclair/typebox").TString;
|
|
22
22
|
}>, any>)[];
|
|
23
23
|
export declare const allTools: {
|
|
24
|
-
read: import("
|
|
24
|
+
read: import("../../../ai/dist/index.js").AgentTool<import("@sinclair/typebox").TObject<{
|
|
25
25
|
path: import("@sinclair/typebox").TString;
|
|
26
26
|
offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
27
27
|
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
28
28
|
}>, any>;
|
|
29
|
-
bash: import("
|
|
29
|
+
bash: import("../../../ai/dist/index.js").AgentTool<import("@sinclair/typebox").TObject<{
|
|
30
30
|
command: import("@sinclair/typebox").TString;
|
|
31
31
|
timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
32
32
|
}>, any>;
|
|
33
|
-
edit: import("
|
|
33
|
+
edit: import("../../../ai/dist/index.js").AgentTool<import("@sinclair/typebox").TObject<{
|
|
34
34
|
path: import("@sinclair/typebox").TString;
|
|
35
35
|
oldText: import("@sinclair/typebox").TString;
|
|
36
36
|
newText: import("@sinclair/typebox").TString;
|
|
37
37
|
}>, any>;
|
|
38
|
-
write: import("
|
|
38
|
+
write: import("../../../ai/dist/index.js").AgentTool<import("@sinclair/typebox").TObject<{
|
|
39
39
|
path: import("@sinclair/typebox").TString;
|
|
40
40
|
content: import("@sinclair/typebox").TString;
|
|
41
41
|
}>, any>;
|
|
42
|
-
grep: import("
|
|
42
|
+
grep: import("../../../ai/dist/index.js").AgentTool<import("@sinclair/typebox").TObject<{
|
|
43
43
|
pattern: import("@sinclair/typebox").TString;
|
|
44
44
|
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
45
45
|
glob: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -48,12 +48,12 @@ export declare const allTools: {
|
|
|
48
48
|
context: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
49
49
|
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
50
50
|
}>, any>;
|
|
51
|
-
find: import("
|
|
51
|
+
find: import("../../../ai/dist/index.js").AgentTool<import("@sinclair/typebox").TObject<{
|
|
52
52
|
pattern: import("@sinclair/typebox").TString;
|
|
53
53
|
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
54
54
|
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
55
55
|
}>, any>;
|
|
56
|
-
ls: import("
|
|
56
|
+
ls: import("../../../ai/dist/index.js").AgentTool<import("@sinclair/typebox").TObject<{
|
|
57
57
|
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
58
58
|
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
59
59
|
}>, any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mariozechner/pi-coding-agent",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"prepublishOnly": "npm run clean && npm run build"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@mariozechner/pi-agent-core": "^0.12.
|
|
28
|
-
"@mariozechner/pi-ai": "^0.12.
|
|
29
|
-
"@mariozechner/pi-tui": "^0.12.
|
|
27
|
+
"@mariozechner/pi-agent-core": "^0.12.2",
|
|
28
|
+
"@mariozechner/pi-ai": "^0.12.2",
|
|
29
|
+
"@mariozechner/pi-tui": "^0.12.2",
|
|
30
30
|
"chalk": "^5.5.0",
|
|
31
31
|
"diff": "^8.0.2",
|
|
32
32
|
"glob": "^11.0.3"
|