agentplane 0.3.14 → 0.3.15
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/.build-manifest.json +10 -10
- package/dist/commands/release/apply.mutation.d.ts.map +1 -1
- package/dist/commands/release/apply.mutation.js +1 -1
- package/dist/commands/task/hosted-close.command.d.ts.map +1 -1
- package/dist/commands/task/hosted-close.command.js +23 -2
- package/package.json +3 -3
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
3
|
"package_dir": "/home/runner/work/agentplane/agentplane/packages/agentplane",
|
|
4
|
-
"generated_at": "2026-04-
|
|
5
|
-
"git_head": "
|
|
6
|
-
"src_cli_mtime_ms":
|
|
4
|
+
"generated_at": "2026-04-19T11:54:20.586Z",
|
|
5
|
+
"git_head": "49f09c7c261fd37886c557ab7873d6b9a7690f1e",
|
|
6
|
+
"src_cli_mtime_ms": 1776599588460.387,
|
|
7
7
|
"src_index_mtime_ms": null,
|
|
8
|
-
"dist_cli_mtime_ms":
|
|
8
|
+
"dist_cli_mtime_ms": 1776599659877.1965,
|
|
9
9
|
"dist_index_mtime_ms": null,
|
|
10
|
-
"tsbuildinfo_mtime_ms":
|
|
10
|
+
"tsbuildinfo_mtime_ms": 1776599659954.1973,
|
|
11
11
|
"watched_runtime_paths": [
|
|
12
12
|
"src",
|
|
13
13
|
"bin/agentplane.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"bin/runtime-context.js",
|
|
16
16
|
"bin/stale-dist-policy.js"
|
|
17
17
|
],
|
|
18
|
-
"watched_runtime_snapshot_hash": "
|
|
18
|
+
"watched_runtime_snapshot_hash": "838eaca752464f6970245d6727d135abda707c3954d5b2e98618f4b9e152a9d8",
|
|
19
19
|
"watched_runtime_files": [
|
|
20
20
|
{
|
|
21
21
|
"path": "bin/agentplane.js",
|
|
@@ -1254,8 +1254,8 @@
|
|
|
1254
1254
|
},
|
|
1255
1255
|
{
|
|
1256
1256
|
"path": "src/commands/release/apply.mutation.ts",
|
|
1257
|
-
"sha256": "
|
|
1258
|
-
"size_bytes":
|
|
1257
|
+
"sha256": "cf26966db58afa0775ea410c9c7918cead0dff1c0811c3930dcfed119b689023",
|
|
1258
|
+
"size_bytes": 5695
|
|
1259
1259
|
},
|
|
1260
1260
|
{
|
|
1261
1261
|
"path": "src/commands/release/apply.pipeline.ts",
|
|
@@ -1619,8 +1619,8 @@
|
|
|
1619
1619
|
},
|
|
1620
1620
|
{
|
|
1621
1621
|
"path": "src/commands/task/hosted-close.command.ts",
|
|
1622
|
-
"sha256": "
|
|
1623
|
-
"size_bytes":
|
|
1622
|
+
"sha256": "5259928bd285c9ea049cb5ffd0cb41147409c48810ccb4742d28846b5bdd9773",
|
|
1623
|
+
"size_bytes": 16385
|
|
1624
1624
|
},
|
|
1625
1625
|
{
|
|
1626
1626
|
"path": "src/commands/task/hosted-merge-sync.ts",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.mutation.d.ts","sourceRoot":"","sources":["../../../src/commands/release/apply.mutation.ts"],"names":[],"mappings":"AASA,wBAAsB,2BAA2B,CAC/C,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAWf;AAED,wBAAsB,gCAAgC,CACpD,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAqCf;AAED,wBAAsB,+BAA+B,CACnD,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"apply.mutation.d.ts","sourceRoot":"","sources":["../../../src/commands/release/apply.mutation.ts"],"names":[],"mappings":"AASA,wBAAsB,2BAA2B,CAC/C,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAWf;AAED,wBAAsB,gCAAgC,CACpD,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAqCf;AAED,wBAAsB,+BAA+B,CACnD,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAiBf;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,GAC1C,OAAO,CAAC,IAAI,CAAC,CAyBf;AAED,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,GAC1C,OAAO,CAAC,OAAO,CAAC,CAyBlB;AAED,wBAAsB,8BAA8B,CAClD,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,OAAO,CAAC,CAQlB;AAED,wBAAgB,YAAY,IAAI,MAAM,CAAC,UAAU,CAOhD"}
|
|
@@ -48,7 +48,7 @@ export async function replaceAgentplanePackageMetadata(pkgJsonPath, nextVersion)
|
|
|
48
48
|
}
|
|
49
49
|
export async function replacePackageDependencyVersion(pkgJsonPath, dependencyName, nextVersion) {
|
|
50
50
|
const text = await readFile(pkgJsonPath, "utf8");
|
|
51
|
-
const pattern = new RegExp(`("${dependencyName.replace("/",
|
|
51
|
+
const pattern = new RegExp(String.raw `("${dependencyName.replace("/", String.raw `\/`)}"\s*:\s*")[^"]*(")`, "u");
|
|
52
52
|
const replaced = text.replace(pattern, `$1${nextVersion}$2`);
|
|
53
53
|
if (replaced === text) {
|
|
54
54
|
throw new CliError({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-close.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/hosted-close.command.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAStE,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAOrF,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,qBAAqB,CAqClE,CAAC;
|
|
1
|
+
{"version":3,"file":"hosted-close.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/hosted-close.command.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAStE,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAOrF,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,qBAAqB,CAqClE,CAAC;AAyZF,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IAC9E,KAAK,UAAU,EAAE,QAAQ,qBAAqB,KAAG,OAAO,CAAC,MAAM,CAAC,CA2B/E"}
|
|
@@ -243,18 +243,33 @@ async function closeHostedTask(opts) {
|
|
|
243
243
|
const gitRoot = opts.ctx.resolvedProject.gitRoot;
|
|
244
244
|
const taskDirRelative = path.join(opts.ctx.config.paths.workflow_dir, target.taskId);
|
|
245
245
|
const taskReadmePath = path.join(gitRoot, taskDirRelative, "README.md");
|
|
246
|
+
const existingMetaPath = path.join(gitRoot, taskDirRelative, "pr", "meta.json");
|
|
247
|
+
let existingMeta = null;
|
|
248
|
+
if (await fileExists(existingMetaPath)) {
|
|
249
|
+
existingMeta = parsePrMeta(await readFile(existingMetaPath, "utf8"), target.taskId);
|
|
250
|
+
}
|
|
251
|
+
const existingMergeCommit = existingMeta?.merge_commit?.trim() ?? "";
|
|
252
|
+
const existingMetaAlreadyMerged = existingMeta?.status === "MERGED" &&
|
|
253
|
+
existingMergeCommit.length > 0 &&
|
|
254
|
+
existingMergeCommit === target.mergedPr.mergeCommit.oid;
|
|
246
255
|
let task;
|
|
247
256
|
try {
|
|
248
257
|
task = await loadTaskFromContext({
|
|
249
258
|
ctx: opts.ctx,
|
|
250
259
|
taskId: target.taskId,
|
|
251
|
-
preferBranchSnapshot:
|
|
252
|
-
branchSnapshotBranch: target.branch,
|
|
260
|
+
preferBranchSnapshot: !existingMetaAlreadyMerged,
|
|
261
|
+
branchSnapshotBranch: existingMetaAlreadyMerged ? null : target.branch,
|
|
253
262
|
});
|
|
254
263
|
}
|
|
255
264
|
catch (err) {
|
|
256
265
|
if (!isMissingTaskReadmeError(err, taskReadmePath))
|
|
257
266
|
throw err;
|
|
267
|
+
if (existingMetaAlreadyMerged) {
|
|
268
|
+
return {
|
|
269
|
+
outcome: "noop",
|
|
270
|
+
detail: `${target.taskId} is already closed for merge ${target.mergedPr.mergeCommit.oid.slice(0, 12)}`,
|
|
271
|
+
};
|
|
272
|
+
}
|
|
258
273
|
const recovered = await buildHostedTaskFromTrackedPrArtifacts({
|
|
259
274
|
gitRoot,
|
|
260
275
|
taskDirRelative,
|
|
@@ -286,6 +301,12 @@ async function closeHostedTask(opts) {
|
|
|
286
301
|
`${task.commit?.hash} != ${target.mergedPr.mergeCommit.oid}`,
|
|
287
302
|
});
|
|
288
303
|
}
|
|
304
|
+
if (alreadyClosed && existingMetaAlreadyMerged) {
|
|
305
|
+
return {
|
|
306
|
+
outcome: "noop",
|
|
307
|
+
detail: `${target.taskId} is already closed for merge ${target.mergedPr.mergeCommit.oid.slice(0, 12)}`,
|
|
308
|
+
};
|
|
309
|
+
}
|
|
289
310
|
const nextMeta = buildIntegratedPrMeta({
|
|
290
311
|
meta,
|
|
291
312
|
branch: target.branch,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentplane",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.15",
|
|
4
4
|
"description": "Agent Plane CLI for task workflows, recipes, and project automation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentplane",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"prepublishOnly": "node ../../scripts/enforce-github-publish.mjs && npm run prepack"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@agentplaneorg/core": "0.3.
|
|
62
|
-
"@agentplaneorg/recipes": "0.3.
|
|
61
|
+
"@agentplaneorg/core": "0.3.15",
|
|
62
|
+
"@agentplaneorg/recipes": "0.3.15",
|
|
63
63
|
"yauzl": "^2.10.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|