agentplane 0.3.22 → 0.3.23
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/assets/policy/incidents.md +1 -0
- package/dist/.build-manifest.json +44 -24
- package/dist/cli/run-cli/commands/init/orchestrate-v2.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/orchestrate-v2.js +10 -2
- package/dist/cli/run-cli/commands/init/orchestrate.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/orchestrate.js +10 -2
- package/dist/cli/run-cli/commands/init/recipes.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/recipes.js +3 -1
- package/dist/cli.js +337 -337
- package/dist/commands/hooks/install.d.ts +4 -0
- package/dist/commands/hooks/install.d.ts.map +1 -1
- package/dist/commands/hooks/install.js +19 -0
- package/dist/commands/hooks/run.pre-push.d.ts.map +1 -1
- package/dist/commands/hooks/run.pre-push.js +5 -2
- package/dist/commands/recipes/impl/installed-recipes.d.ts +5 -1
- package/dist/commands/recipes/impl/installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/installed-recipes.js +38 -19
- package/dist/commands/release/apply.mutation.d.ts.map +1 -1
- package/dist/commands/release/apply.mutation.js +5 -4
- package/dist/commands/release/apply.pipeline/mutation.d.ts.map +1 -1
- package/dist/commands/release/apply.pipeline/mutation.js +6 -1
- package/dist/commands/release/apply.preflight.d.ts.map +1 -1
- package/dist/commands/release/apply.preflight.js +5 -4
- package/dist/runtime/prompt-modules/index.d.ts +3 -0
- package/dist/runtime/prompt-modules/index.d.ts.map +1 -0
- package/dist/runtime/prompt-modules/index.js +1 -0
- package/dist/runtime/prompt-modules/model.d.ts +89 -0
- package/dist/runtime/prompt-modules/model.d.ts.map +1 -0
- package/dist/runtime/prompt-modules/model.js +1 -0
- package/dist/runtime/prompt-modules/mutations.d.ts +103 -0
- package/dist/runtime/prompt-modules/mutations.d.ts.map +1 -0
- package/dist/runtime/prompt-modules/mutations.js +1 -0
- package/dist/shared/runtime-env.d.ts +3 -0
- package/dist/shared/runtime-env.d.ts.map +1 -0
- package/dist/shared/runtime-env.js +73 -0
- package/package.json +3 -3
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
- id: INC-20260420-01 | date: 2026-04-20 | scope: Audit CLI path resolution for global-install style layouts, fix any repo-local script path defects, and add regression tests that fail when installed CLI code resolves repository scripts from the global package location. | tags: bugfix, code, hooks | match: bugfix, code, hooks, audit, cli, path, resolution, for, global, install, style, layouts, fix, any, repo, local | failure: Audited import.meta.url/fileURLToPath candidates touching scripts/bin paths. The real repo-script risk was pre-push fallback returning a non-existent global prefix path; workflow-playbook's bin path is package-bundled and covered by existing workflow tests. | advice: Pre-push script resolution now returns repository-local script first, existing bundled fallback second, otherwise null with an actionable repository-local error message. | rule: Analogous Audit CLI path resolution for global-install style layouts, fix any repo-local script path defects, and add regression tests that fail when installed CLI code resolves repository scripts from the global package location. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604200850-9T6FTC; commit d30a706ce568 | enforcement: manual | fixability: external | state: open
|
|
15
15
|
- id: INC-20260422-01 | date: 2026-04-22 | scope: Runner prompt assembly only. Do not cache task-specific prompt content or mutable task state. | tags: cache, perf, runner | match: cache, perf, runner, prompt, assembly, only, not, task, specific, content, mutable, state, source, avoid, repeated, scanning | failure: Cached bundled agent templates, bundled policy gateway templates, and framework runner prompt assembly; repo-local policy/profile reads use mtime/size validation so changed files are not stale. | advice: Added regression coverage for repeated static prompt reuse and repo-local prompt cache invalidation. | rule: Analogous Runner prompt assembly only. Do not cache task-specific prompt content or mutable task state. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604220255-AQHZT4; commit 268c42af4447 | enforcement: manual | fixability: external | state: open
|
|
16
16
|
- id: INC-20260422-02 | date: 2026-04-22 | scope: Publish the next patch release containing the init cached recipe manifest compatibility fix and restored interactive init ASCII logo. | tags: ci, init, release | match: ci, init, release, publish, the, next, patch, containing, cached, recipe, manifest, compatibility, fix, and, restored, interactive | failure: Pre-push release-mode hook failed when inherited test execution changed shared git core.bare=true; restored local core.bare=false and confirmed remote tag v0.3.19 points at main merge commit 45ba9c57. | advice: Use hosted release workflow as publication evidence; record local hook pollution as a release-process follow-up rather than blocking this hotfix. | rule: Analogous Publish the next patch release containing the init cached recipe manifest compatibility fix and restored interactive init ASCII logo. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604221605-SQYRNQ; commit 45ba9c57f939 | enforcement: manual | fixability: external | state: open
|
|
17
|
+
- id: INC-20260422-03 | date: 2026-04-22 | scope: Create an executable v0.4 implementation task graph for modular prompt assembly, grouped into epics with atomic tasks and dependencies. | tags: architecture, planning, prompt-assembly, v0.4 | match: architecture, planning, prompt-assembly, v0.4, create, executable, implementation, task, graph, for, modular, prompt, assembly, grouped, into, epics | failure: task graph contains 30 new planned tasks plus the active decomposition task | advice: Validated with task list filtering, task file count, agentplane doctor, and git diff whitespace check | rule: Analogous Create an executable v0.4 implementation task graph for modular prompt assembly, grouped into epics with atomic tasks and dependencies. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604221536-1Z90V4; commit 3047ee2197c0 | enforcement: manual | fixability: external | state: open
|
|
17
18
|
- id: INC-20260423-01 | date: 2026-04-23 | scope: commit allowlist staging behavior and diagnostics for active task artifacts. Out of scope: broad commit policy rewrites or protected path model changes. | tags: code, git, workflow | match: code, git, workflow, commit, allowlist, staging, behavior, and, diagnostics, for, active, task, artifacts, out, scope, broad | failure: Ran bun run test:project -- cli-core packages/agentplane/src/cli/run-cli.core.guard.commit-wrapper.test.ts; bun run test:project -- guard; Prettier check for changed files. | advice: Added non-empty-index staging before guard validation and regression coverage. | rule: Analogous commit allowlist staging behavior and diagnostics for active task artifacts. Out of scope: broad commit policy rewrites or protected path model changes. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604230838-598K1H; commit afa741361351 | enforcement: manual | fixability: external | state: open
|
|
18
19
|
- id: INC-20260423-02 | date: 2026-04-23 | scope: generated guidance and default examples for test commands. Out of scope: rewriting historical release notes or changing user-supplied task verify commands. | tags: code, guidance, testing | match: code, guidance, testing, generated, and, default, examples, for, test, commands, out, scope, rewriting, historical, release, notes | failure: Ran bun run test:project -- cli-core packages/agentplane/src/cli/run-cli.core.tasks.scaffold-derive.test.ts; bun run workflows:command-check; bun run docs:cli:check; Prettier check for changed files. | advice: Updated task derive example/test fixture and expanded workflow command contract scanning to command specs. | rule: Analogous generated guidance and default examples for test commands. Out of scope: rewriting historical release notes or changing user-supplied task verify commands. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604230839-Y92ZJJ; commit 7e088c735372 | enforcement: manual | fixability: external | state: open
|
|
19
20
|
- id: INC-20260423-03 | date: 2026-04-23 | scope: Move managed hook shim readiness checks out of doctor/workspace.ts so hotspot gate passes after installed-user diagnostics additions. | tags: code, quality | match: code, quality, move, managed, hook, shim, readiness, checks, out, doctor, workspace, hotspot, gate, passes, after, installed | failure: Ran bun run hotspots:check; bun run test:project -- agentplane packages/agentplane/src/commands/doctor.command.runtime.test.ts; Prettier check for changed files. | advice: Extracted hook readiness diagnostics to doctor/hook-readiness.ts and updated oversized test baseline for already-grown warning files. | rule: Analogous Move managed hook shim readiness checks out of doctor/workspace.ts so hotspot gate passes after installed-user diagnostics additions. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604230949-E1BG2Q; commit 2fc331ddf503 | enforcement: manual | fixability: external | state: open
|
|
@@ -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-23T15:43:57.221Z",
|
|
5
|
+
"git_head": "46aaf3cfbc937ae5d85952931800f1b8471657fd",
|
|
6
|
+
"src_cli_mtime_ms": 1776958913932.756,
|
|
7
7
|
"src_index_mtime_ms": null,
|
|
8
|
-
"dist_cli_mtime_ms":
|
|
8
|
+
"dist_cli_mtime_ms": 1776959037005.2576,
|
|
9
9
|
"dist_index_mtime_ms": null,
|
|
10
|
-
"tsbuildinfo_mtime_ms":
|
|
10
|
+
"tsbuildinfo_mtime_ms": 1776959034870.2485,
|
|
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": "b8c29cd6478ae809960f276f543158a416a80a7497c61fefcda98506d69d48d3",
|
|
19
19
|
"watched_runtime_files": [
|
|
20
20
|
{
|
|
21
21
|
"path": "bin/agentplane.js",
|
|
@@ -539,13 +539,13 @@
|
|
|
539
539
|
},
|
|
540
540
|
{
|
|
541
541
|
"path": "src/cli/run-cli/commands/init/orchestrate-v2.ts",
|
|
542
|
-
"sha256": "
|
|
543
|
-
"size_bytes":
|
|
542
|
+
"sha256": "b92df05a96c58d97904dbe9232d8df1aef00b23385c6ae3ac8564c243280a47e",
|
|
543
|
+
"size_bytes": 12335
|
|
544
544
|
},
|
|
545
545
|
{
|
|
546
546
|
"path": "src/cli/run-cli/commands/init/orchestrate.ts",
|
|
547
|
-
"sha256": "
|
|
548
|
-
"size_bytes":
|
|
547
|
+
"sha256": "78e53025c8380b0f452d9be9c395b98f803bb7010eaf77567a19f493df96070b",
|
|
548
|
+
"size_bytes": 15378
|
|
549
549
|
},
|
|
550
550
|
{
|
|
551
551
|
"path": "src/cli/run-cli/commands/init/parsers.ts",
|
|
@@ -564,8 +564,8 @@
|
|
|
564
564
|
},
|
|
565
565
|
{
|
|
566
566
|
"path": "src/cli/run-cli/commands/init/recipes.ts",
|
|
567
|
-
"sha256": "
|
|
568
|
-
"size_bytes":
|
|
567
|
+
"sha256": "5be2675d5f6a6b2a7b7748e62c1150ce5fcf4489c65554ab0f8c50b2311d996d",
|
|
568
|
+
"size_bytes": 1949
|
|
569
569
|
},
|
|
570
570
|
{
|
|
571
571
|
"path": "src/cli/run-cli/commands/init/spec.ts",
|
|
@@ -1024,8 +1024,8 @@
|
|
|
1024
1024
|
},
|
|
1025
1025
|
{
|
|
1026
1026
|
"path": "src/commands/hooks/install.ts",
|
|
1027
|
-
"sha256": "
|
|
1028
|
-
"size_bytes":
|
|
1027
|
+
"sha256": "3685c30eaeff154d66c59510a9e9aafed66db5b27884ed1c807b0894136b0788",
|
|
1028
|
+
"size_bytes": 6493
|
|
1029
1029
|
},
|
|
1030
1030
|
{
|
|
1031
1031
|
"path": "src/commands/hooks/run.command.ts",
|
|
@@ -1049,8 +1049,8 @@
|
|
|
1049
1049
|
},
|
|
1050
1050
|
{
|
|
1051
1051
|
"path": "src/commands/hooks/run.pre-push.ts",
|
|
1052
|
-
"sha256": "
|
|
1053
|
-
"size_bytes":
|
|
1052
|
+
"sha256": "eb1b5de8c4a547d092293aa00168f46937f056606eb9990ee5448320111c8814",
|
|
1053
|
+
"size_bytes": 11933
|
|
1054
1054
|
},
|
|
1055
1055
|
{
|
|
1056
1056
|
"path": "src/commands/hooks/run.ts",
|
|
@@ -1419,8 +1419,8 @@
|
|
|
1419
1419
|
},
|
|
1420
1420
|
{
|
|
1421
1421
|
"path": "src/commands/recipes/impl/installed-recipes.ts",
|
|
1422
|
-
"sha256": "
|
|
1423
|
-
"size_bytes":
|
|
1422
|
+
"sha256": "b195acddd79f73eb33ffefc87df8a90f868efb4aca664c37d1fbe06d43d58fd1",
|
|
1423
|
+
"size_bytes": 4633
|
|
1424
1424
|
},
|
|
1425
1425
|
{
|
|
1426
1426
|
"path": "src/commands/recipes/impl/mutation-transaction.ts",
|
|
@@ -1519,8 +1519,8 @@
|
|
|
1519
1519
|
},
|
|
1520
1520
|
{
|
|
1521
1521
|
"path": "src/commands/release/apply.mutation.ts",
|
|
1522
|
-
"sha256": "
|
|
1523
|
-
"size_bytes":
|
|
1522
|
+
"sha256": "ff24f1bf1f4725a468a7dffee4f56eeff8b8e1863eeaaa348988e0807deb0895",
|
|
1523
|
+
"size_bytes": 6281
|
|
1524
1524
|
},
|
|
1525
1525
|
{
|
|
1526
1526
|
"path": "src/commands/release/apply.pipeline.ts",
|
|
@@ -1534,8 +1534,8 @@
|
|
|
1534
1534
|
},
|
|
1535
1535
|
{
|
|
1536
1536
|
"path": "src/commands/release/apply.pipeline/mutation.ts",
|
|
1537
|
-
"sha256": "
|
|
1538
|
-
"size_bytes":
|
|
1537
|
+
"sha256": "4e0b6e850979170484f06bc762b3386b4dc0af3f7a0dc85fbe3f319e919ff1ca",
|
|
1538
|
+
"size_bytes": 4434
|
|
1539
1539
|
},
|
|
1540
1540
|
{
|
|
1541
1541
|
"path": "src/commands/release/apply.pipeline/preflight.ts",
|
|
@@ -1554,8 +1554,8 @@
|
|
|
1554
1554
|
},
|
|
1555
1555
|
{
|
|
1556
1556
|
"path": "src/commands/release/apply.preflight.ts",
|
|
1557
|
-
"sha256": "
|
|
1558
|
-
"size_bytes":
|
|
1557
|
+
"sha256": "f6ad3e35e53cdfa5878cea99a30f367e0a12224b5eb8036532500640d6c38b13",
|
|
1558
|
+
"size_bytes": 17348
|
|
1559
1559
|
},
|
|
1560
1560
|
{
|
|
1561
1561
|
"path": "src/commands/release/apply.reporting.ts",
|
|
@@ -2962,6 +2962,21 @@
|
|
|
2962
2962
|
"sha256": "7724861b7948e3b023166e592aae030d72a3312a8bb4941fc9781901cddd08be",
|
|
2963
2963
|
"size_bytes": 2207
|
|
2964
2964
|
},
|
|
2965
|
+
{
|
|
2966
|
+
"path": "src/runtime/prompt-modules/index.ts",
|
|
2967
|
+
"sha256": "e18470274cd5553af355ded4e9628b3262c06cbc36053d23be03393b21288059",
|
|
2968
|
+
"size_bytes": 1186
|
|
2969
|
+
},
|
|
2970
|
+
{
|
|
2971
|
+
"path": "src/runtime/prompt-modules/model.ts",
|
|
2972
|
+
"sha256": "28db918469eacd424b2f76a58b4a7f372aa4f80831acaa2aa0a0315447e2fe3a",
|
|
2973
|
+
"size_bytes": 3604
|
|
2974
|
+
},
|
|
2975
|
+
{
|
|
2976
|
+
"path": "src/runtime/prompt-modules/mutations.ts",
|
|
2977
|
+
"sha256": "490227260676592f03e82a32744607d8308986387c55af219691e082fd4cfd4d",
|
|
2978
|
+
"size_bytes": 3666
|
|
2979
|
+
},
|
|
2965
2980
|
{
|
|
2966
2981
|
"path": "src/runtime/protocol/index.ts",
|
|
2967
2982
|
"sha256": "7e34551db1b8ff2ce6d14a94d6f0345f9b2e6c35082cf5c0b0b3356d10564f59",
|
|
@@ -3047,6 +3062,11 @@
|
|
|
3047
3062
|
"sha256": "5fb86dfa71d8b1db11ff24e32cac43eb7ce2a3d7b0d7c084afb9aacd4160e2eb",
|
|
3048
3063
|
"size_bytes": 4218
|
|
3049
3064
|
},
|
|
3065
|
+
{
|
|
3066
|
+
"path": "src/shared/runtime-env.ts",
|
|
3067
|
+
"sha256": "9f15ef8762db4420e74c5c187cbfdc0ce930246633c67022332723b9625589c5",
|
|
3068
|
+
"size_bytes": 2406
|
|
3069
|
+
},
|
|
3050
3070
|
{
|
|
3051
3071
|
"path": "src/shared/strings.ts",
|
|
3052
3072
|
"sha256": "b266926e09aac485e48f559f81acce7cce89913426e322bc37ebf7d930a08961",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrate-v2.d.ts","sourceRoot":"","sources":["../../../../../src/cli/run-cli/commands/init/orchestrate-v2.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"orchestrate-v2.d.ts","sourceRoot":"","sources":["../../../../../src/cli/run-cli/commands/init/orchestrate-v2.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AASzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AA2D7C,wBAAsB,SAAS,CAAC,IAAI,EAAE;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;CAC/B,GAAG,OAAO,CAAC,MAAM,CAAC,CA6OlB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { buildExecutionProfile } from "@agentplaneorg/core/config";
|
|
3
3
|
import { setPinnedBaseBranch } from "@agentplaneorg/core/git";
|
|
4
|
+
import { collectHooksInstallConflicts } from "../../../../commands/hooks/install.js";
|
|
4
5
|
import { cmdHooksInstall, ensureInitCommit } from "../../../../commands/workflow.js";
|
|
5
6
|
import { getVersion } from "../../../../meta/version.js";
|
|
6
7
|
import { CliError } from "../../../../shared/errors.js";
|
|
@@ -108,10 +109,10 @@ export async function cmdInitV2(opts) {
|
|
|
108
109
|
path.join(resolved.agentplaneDir, "backends", backend.backend),
|
|
109
110
|
];
|
|
110
111
|
const initFiles = [configPath, backendPath];
|
|
111
|
-
const
|
|
112
|
+
const initConflicts = await collectInitConflicts({ initDirs, initFiles });
|
|
112
113
|
const gatewayPath = path.join(resolved.gitRoot, policyGatewayFileName(policy.policyGateway));
|
|
113
114
|
const agentsMissing = !(await fileExists(gatewayPath));
|
|
114
|
-
if (
|
|
115
|
+
if (initConflicts.length > 0 && agentsMissing) {
|
|
115
116
|
await ensureAgentplaneDirs(resolved.agentplaneDir, backend.backend);
|
|
116
117
|
await ensureAgentsFiles({
|
|
117
118
|
gitRoot: resolved.gitRoot,
|
|
@@ -122,6 +123,13 @@ export async function cmdInitV2(opts) {
|
|
|
122
123
|
backendPathAbs: backendPath,
|
|
123
124
|
});
|
|
124
125
|
}
|
|
126
|
+
const hookConflicts = advanced.hooks
|
|
127
|
+
? await collectHooksInstallConflicts({
|
|
128
|
+
gitRoot: resolved.gitRoot,
|
|
129
|
+
agentplaneDir: resolved.agentplaneDir,
|
|
130
|
+
})
|
|
131
|
+
: [];
|
|
132
|
+
const conflicts = [...new Set([...initConflicts, ...hookConflicts])];
|
|
125
133
|
const conflictChoice = opts.flags.force || opts.flags.backup
|
|
126
134
|
? null
|
|
127
135
|
: await promptConflictResolverStep({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrate.d.ts","sourceRoot":"","sources":["../../../../../src/cli/run-cli/commands/init/orchestrate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"orchestrate.d.ts","sourceRoot":"","sources":["../../../../../src/cli/run-cli/commands/init/orchestrate.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAazD,OAAO,KAAK,EAAsB,UAAU,EAAsB,MAAM,YAAY,CAAC;AAsCrF,wBAAsB,OAAO,CAAC,IAAI,EAAE;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;CAC/B,GAAG,OAAO,CAAC,MAAM,CAAC,CAsUlB"}
|
|
@@ -2,6 +2,7 @@ import path from "node:path";
|
|
|
2
2
|
import { buildExecutionProfile } from "@agentplaneorg/core/config";
|
|
3
3
|
import { setPinnedBaseBranch } from "@agentplaneorg/core/git";
|
|
4
4
|
import { cmdHooksInstall, ensureInitCommit } from "../../../../commands/workflow.js";
|
|
5
|
+
import { collectHooksInstallConflicts } from "../../../../commands/hooks/install.js";
|
|
5
6
|
import { getVersion } from "../../../../meta/version.js";
|
|
6
7
|
import { CliError } from "../../../../shared/errors.js";
|
|
7
8
|
import { policyGatewayFileName } from "../../../../shared/policy-gateway.js";
|
|
@@ -209,10 +210,10 @@ export async function cmdInit(opts) {
|
|
|
209
210
|
path.join(resolved.agentplaneDir, "backends", backend),
|
|
210
211
|
];
|
|
211
212
|
const initFiles = [configPath, backendPath];
|
|
212
|
-
const
|
|
213
|
+
const initConflicts = await collectInitConflicts({ initDirs, initFiles });
|
|
213
214
|
const gatewayPath = path.join(resolved.gitRoot, policyGatewayFileName(policyGateway));
|
|
214
215
|
const agentsMissing = !(await fileExists(gatewayPath));
|
|
215
|
-
if (
|
|
216
|
+
if (initConflicts.length > 0 && agentsMissing) {
|
|
216
217
|
await ensureAgentplaneDirs(resolved.agentplaneDir, backend);
|
|
217
218
|
await ensureAgentsFiles({
|
|
218
219
|
gitRoot: resolved.gitRoot,
|
|
@@ -223,6 +224,13 @@ export async function cmdInit(opts) {
|
|
|
223
224
|
backendPathAbs: backendPath,
|
|
224
225
|
});
|
|
225
226
|
}
|
|
227
|
+
const hookConflicts = hooks
|
|
228
|
+
? await collectHooksInstallConflicts({
|
|
229
|
+
gitRoot: resolved.gitRoot,
|
|
230
|
+
agentplaneDir: resolved.agentplaneDir,
|
|
231
|
+
})
|
|
232
|
+
: [];
|
|
233
|
+
const conflicts = [...new Set([...initConflicts, ...hookConflicts])];
|
|
226
234
|
await handleInitConflicts({
|
|
227
235
|
gitRoot: resolved.gitRoot,
|
|
228
236
|
conflicts,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipes.d.ts","sourceRoot":"","sources":["../../../../../src/cli/run-cli/commands/init/recipes.ts"],"names":[],"mappings":"AAKA,KAAK,gBAAgB,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"recipes.d.ts","sourceRoot":"","sources":["../../../../../src/cli/run-cli/commands/init/recipes.ts"],"names":[],"mappings":"AAKA,KAAK,gBAAgB,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC,CASrE;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAK3E;AAED,wBAAsB,8BAA8B,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAWrF;AAED,wBAAsB,qBAAqB,CAAC,IAAI,EAAE;IAChD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC,IAAI,CAAC,CAWhB"}
|
|
@@ -3,7 +3,9 @@ import { readAndMigrateInstalledRecipesFile } from "../../../../commands/recipes
|
|
|
3
3
|
import { resolveInstalledRecipesPath } from "../../../../commands/recipes/impl/paths.js";
|
|
4
4
|
import { CliError } from "../../../../shared/errors.js";
|
|
5
5
|
export async function listCachedRecipes() {
|
|
6
|
-
const cached = await readAndMigrateInstalledRecipesFile(resolveInstalledRecipesPath()
|
|
6
|
+
const cached = await readAndMigrateInstalledRecipesFile(resolveInstalledRecipesPath(), {
|
|
7
|
+
dropInvalidEntries: true,
|
|
8
|
+
});
|
|
7
9
|
return cached.recipes.map((recipe) => ({
|
|
8
10
|
id: recipe.id,
|
|
9
11
|
summary: recipe.manifest.summary,
|