@vishal2612200/agentpack 0.3.31 → 0.3.34
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/bin/agentpack.js +21 -10
- package/package.json +1 -1
package/bin/agentpack.js
CHANGED
|
@@ -6,7 +6,7 @@ const fs = require("node:fs");
|
|
|
6
6
|
const os = require("node:os");
|
|
7
7
|
const path = require("node:path");
|
|
8
8
|
|
|
9
|
-
const PACKAGE_VERSION = "0.3.
|
|
9
|
+
const PACKAGE_VERSION = "0.3.34";
|
|
10
10
|
const PYPI_PACKAGE = `agentpack-cli==${PACKAGE_VERSION}`;
|
|
11
11
|
|
|
12
12
|
function compareVersions(left, right) {
|
|
@@ -110,9 +110,18 @@ function installOrUpdateVenv(systemPython, paths) {
|
|
|
110
110
|
fs.writeFileSync(paths.marker, `${PACKAGE_VERSION}\n`);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
function main(
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
function main(
|
|
114
|
+
argv = process.argv.slice(2),
|
|
115
|
+
{
|
|
116
|
+
cacheRootFn = cacheRoot,
|
|
117
|
+
venvPathsFn = venvPaths,
|
|
118
|
+
findPythonFn = findPython,
|
|
119
|
+
installOrUpdateVenvFn = installOrUpdateVenv,
|
|
120
|
+
spawnSyncFn = spawnSync,
|
|
121
|
+
} = {},
|
|
122
|
+
) {
|
|
123
|
+
const root = cacheRootFn();
|
|
124
|
+
const paths = venvPathsFn(root);
|
|
116
125
|
|
|
117
126
|
if (process.env.AGENTPACK_NPM_DRY_RUN === "1") {
|
|
118
127
|
console.log(JSON.stringify({
|
|
@@ -121,28 +130,28 @@ function main(argv = process.argv.slice(2)) {
|
|
|
121
130
|
cacheRoot: root,
|
|
122
131
|
venv: paths.venv,
|
|
123
132
|
}));
|
|
124
|
-
return;
|
|
133
|
+
return 0;
|
|
125
134
|
}
|
|
126
135
|
|
|
127
|
-
const python =
|
|
136
|
+
const python = findPythonFn();
|
|
128
137
|
if (!python) {
|
|
129
138
|
fail("Python >=3.10 is required. Install Python, set AGENTPACK_PYTHON=/path/to/python, or use the Windows py launcher.");
|
|
130
139
|
}
|
|
131
140
|
|
|
132
|
-
|
|
141
|
+
installOrUpdateVenvFn(python, paths);
|
|
133
142
|
|
|
134
|
-
const result =
|
|
143
|
+
const result = spawnSyncFn(paths.agentpack, argv, {
|
|
135
144
|
stdio: "inherit",
|
|
136
145
|
env: process.env,
|
|
137
146
|
});
|
|
138
147
|
if (result.error) {
|
|
139
148
|
fail(`failed to run ${paths.agentpack}: ${result.error.message}`);
|
|
140
149
|
}
|
|
141
|
-
|
|
150
|
+
return typeof result.status === "number" ? result.status : 1;
|
|
142
151
|
}
|
|
143
152
|
|
|
144
153
|
if (require.main === module) {
|
|
145
|
-
main();
|
|
154
|
+
process.exit(main());
|
|
146
155
|
}
|
|
147
156
|
|
|
148
157
|
module.exports = {
|
|
@@ -151,6 +160,8 @@ module.exports = {
|
|
|
151
160
|
cacheRoot,
|
|
152
161
|
compareVersions,
|
|
153
162
|
findPython,
|
|
163
|
+
installOrUpdateVenv,
|
|
164
|
+
main,
|
|
154
165
|
pythonVersion,
|
|
155
166
|
venvPaths,
|
|
156
167
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vishal2612200/agentpack",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.34",
|
|
4
4
|
"description": "Local context engine for AI coding agents. Ranks relevant repo files and builds compact task-focused context packs for Claude Code, Codex, Cursor, Windsurf, MCP, and CI workflows.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/vishal2612200/agentpack#readme",
|