agentplane 0.2.2 → 0.2.3
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/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/cli/http.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/cli/http.ts"],"names":[],"mappings":"AAQA,wBAAsB,SAAS,CAC7B,GAAG,EAAE,MAAM,EACX,SAAS,SAA2B,GACnC,OAAO,CAAC,OAAO,CAAC,CA0BlB;AAED,wBAAsB,SAAS,CAC7B,GAAG,EAAE,MAAM,EACX,SAAS,SAA2B,GACnC,OAAO,CAAC,MAAM,CAAC,CA0BjB;AAED,wBAAsB,cAAc,CAClC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,SAAS,SAA8B,GACtC,OAAO,CAAC,IAAI,CAAC,CA2Bf"}
|
package/dist/cli/http.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { writeFile } from "node:fs/promises";
|
|
2
2
|
import { exitCodeForError } from "./exit-codes.js";
|
|
3
3
|
import { CliError } from "../shared/errors.js";
|
|
4
|
-
const
|
|
5
|
-
|
|
4
|
+
const DEFAULT_FETCH_TIMEOUT_MS = 1500;
|
|
5
|
+
const DEFAULT_DOWNLOAD_TIMEOUT_MS = 30_000;
|
|
6
|
+
export async function fetchJson(url, timeoutMs = DEFAULT_FETCH_TIMEOUT_MS) {
|
|
6
7
|
const controller = new AbortController();
|
|
7
8
|
const timeout = setTimeout(() => controller.abort(), timeoutMs);
|
|
8
9
|
try {
|
|
@@ -32,7 +33,7 @@ export async function fetchJson(url, timeoutMs = DEFAULT_TIMEOUT_MS) {
|
|
|
32
33
|
clearTimeout(timeout);
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
|
-
export async function fetchText(url, timeoutMs =
|
|
36
|
+
export async function fetchText(url, timeoutMs = DEFAULT_FETCH_TIMEOUT_MS) {
|
|
36
37
|
const controller = new AbortController();
|
|
37
38
|
const timeout = setTimeout(() => controller.abort(), timeoutMs);
|
|
38
39
|
try {
|
|
@@ -62,7 +63,7 @@ export async function fetchText(url, timeoutMs = DEFAULT_TIMEOUT_MS) {
|
|
|
62
63
|
clearTimeout(timeout);
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
export async function downloadToFile(url, destPath, timeoutMs =
|
|
66
|
+
export async function downloadToFile(url, destPath, timeoutMs = DEFAULT_DOWNLOAD_TIMEOUT_MS) {
|
|
66
67
|
const controller = new AbortController();
|
|
67
68
|
const timeout = setTimeout(() => controller.abort(), timeoutMs);
|
|
68
69
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../src/commands/upgrade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../src/commands/upgrade.ts"],"names":[],"mappings":"AAwBA,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,MAAM,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,oBAAoB,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAmBF,wBAAgB,kCAAkC,CAAC,MAAM,EAAE,MAAM,GAAG;IAClE,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB,CAWA;AAED,wBAAgB,iCAAiC,CAAC,IAAI,EAAE;IACtD,OAAO,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB,GACG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAC1D;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAqB1C;AAkOD,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,YAAY,CAAC;CACrB,GAAG,OAAO,CAAC,MAAM,CAAC,CAgSlB"}
|
package/dist/commands/upgrade.js
CHANGED
|
@@ -12,6 +12,7 @@ import { CliError } from "../shared/errors.js";
|
|
|
12
12
|
import { ensureNetworkApproved } from "./shared/network-approval.js";
|
|
13
13
|
const DEFAULT_UPGRADE_ASSET = "agentplane-upgrade.tar.gz";
|
|
14
14
|
const DEFAULT_UPGRADE_CHECKSUM_ASSET = "agentplane-upgrade.tar.gz.sha256";
|
|
15
|
+
const UPGRADE_DOWNLOAD_TIMEOUT_MS = 60_000;
|
|
15
16
|
function parseGitHubRepo(source) {
|
|
16
17
|
const trimmed = source.trim();
|
|
17
18
|
if (!trimmed)
|
|
@@ -322,7 +323,7 @@ export async function cmdUpgradeParsed(opts) {
|
|
|
322
323
|
bundlePath = isUrl ? path.join(tempRoot, "bundle.tar.gz") : path.resolve(flags.bundle);
|
|
323
324
|
if (isUrl) {
|
|
324
325
|
await ensureApproved("upgrade downloads the bundle/checksum from the network");
|
|
325
|
-
await downloadToFile(flags.bundle, bundlePath);
|
|
326
|
+
await downloadToFile(flags.bundle, bundlePath, UPGRADE_DOWNLOAD_TIMEOUT_MS);
|
|
326
327
|
}
|
|
327
328
|
const checksumValue = flags.checksum ?? "";
|
|
328
329
|
const checksumIsUrl = checksumValue.startsWith("http://") || checksumValue.startsWith("https://");
|
|
@@ -331,7 +332,7 @@ export async function cmdUpgradeParsed(opts) {
|
|
|
331
332
|
: path.resolve(checksumValue);
|
|
332
333
|
if (checksumIsUrl) {
|
|
333
334
|
await ensureApproved("upgrade downloads the bundle/checksum from the network");
|
|
334
|
-
await downloadToFile(checksumValue, checksumPath);
|
|
335
|
+
await downloadToFile(checksumValue, checksumPath, UPGRADE_DOWNLOAD_TIMEOUT_MS);
|
|
335
336
|
}
|
|
336
337
|
}
|
|
337
338
|
else {
|
|
@@ -353,14 +354,14 @@ export async function cmdUpgradeParsed(opts) {
|
|
|
353
354
|
if (download.kind === "assets") {
|
|
354
355
|
bundlePath = path.join(tempRoot, assetName);
|
|
355
356
|
checksumPath = path.join(tempRoot, checksumName);
|
|
356
|
-
await downloadToFile(download.bundleUrl, bundlePath);
|
|
357
|
-
await downloadToFile(download.checksumUrl, checksumPath);
|
|
357
|
+
await downloadToFile(download.bundleUrl, bundlePath, UPGRADE_DOWNLOAD_TIMEOUT_MS);
|
|
358
|
+
await downloadToFile(download.checksumUrl, checksumPath, UPGRADE_DOWNLOAD_TIMEOUT_MS);
|
|
358
359
|
}
|
|
359
360
|
else {
|
|
360
361
|
process.stderr.write(`${warnMessage(`upgrade release does not include ${assetName}/${checksumName}; falling back to tarball_url without checksum verification`)}\n`);
|
|
361
362
|
allowNonUpgradePaths = true;
|
|
362
363
|
bundlePath = path.join(tempRoot, "source.tar.gz");
|
|
363
|
-
await downloadToFile(download.tarballUrl, bundlePath);
|
|
364
|
+
await downloadToFile(download.tarballUrl, bundlePath, UPGRADE_DOWNLOAD_TIMEOUT_MS);
|
|
364
365
|
checksumPath = "";
|
|
365
366
|
}
|
|
366
367
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentplane",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Agent Plane CLI for task workflows, recipes, and project automation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentplane",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"prepublishOnly": "npm run prepack"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@agentplaneorg/core": "0.2.
|
|
57
|
+
"@agentplaneorg/core": "0.2.3",
|
|
58
58
|
"yauzl": "^2.10.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|