agentplane 0.3.2 → 0.3.4
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/AGENTS.md +4 -4
- package/assets/agents/CODER.json +14 -10
- package/assets/agents/CREATOR.json +8 -6
- package/assets/agents/DOCS.json +9 -6
- package/assets/agents/INTEGRATOR.json +9 -6
- package/assets/agents/ORCHESTRATOR.json +8 -6
- package/assets/agents/PLANNER.json +8 -5
- package/assets/agents/REDMINE.json +6 -3
- package/assets/agents/REVIEWER.json +8 -6
- package/assets/agents/TESTER.json +8 -4
- package/assets/agents/UPDATER.json +6 -4
- package/assets/agents/UPGRADER.json +7 -6
- package/assets/policy/dod.code.md +2 -2
- package/assets/policy/dod.core.md +16 -2
- package/assets/policy/dod.docs.md +2 -2
- package/assets/policy/incidents.md +44 -1
- package/assets/policy/workflow.direct.md +8 -4
- package/bin/agentplane.js +59 -9
- package/bin/dist-guard.js +78 -10
- package/bin/runtime-context.d.ts +3 -0
- package/bin/runtime-context.js +13 -0
- package/bin/runtime-watch.d.ts +26 -0
- package/bin/runtime-watch.js +116 -0
- package/bin/stale-dist-policy.d.ts +6 -0
- package/bin/stale-dist-policy.js +44 -0
- package/dist/.build-manifest.json +2485 -5
- package/dist/backends/task-backend/local-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/local-backend.js +9 -12
- package/dist/backends/task-backend/redmine-backend.d.ts.map +1 -1
- package/dist/backends/task-backend/redmine-backend.js +23 -18
- package/dist/backends/task-backend/shared/constants.d.ts +1 -0
- package/dist/backends/task-backend/shared/constants.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/constants.js +1 -0
- package/dist/backends/task-backend/shared/doc.d.ts +1 -0
- package/dist/backends/task-backend/shared/doc.d.ts.map +1 -1
- package/dist/backends/task-backend/shared/doc.js +4 -1
- package/dist/backends/task-backend/shared/export.js +3 -3
- package/dist/cli/bootstrap-guide.d.ts +2 -3
- package/dist/cli/bootstrap-guide.d.ts.map +1 -1
- package/dist/cli/bootstrap-guide.js +16 -35
- package/dist/cli/command-guide.d.ts +14 -1
- package/dist/cli/command-guide.d.ts.map +1 -1
- package/dist/cli/command-guide.js +71 -47
- package/dist/cli/run-cli/catalog.d.ts +7 -0
- package/dist/cli/run-cli/catalog.d.ts.map +1 -0
- package/dist/cli/run-cli/catalog.js +22 -0
- package/dist/cli/run-cli/command-catalog.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog.js +11 -0
- package/dist/cli/run-cli/commands/core.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/core.js +37 -29
- package/dist/cli/run-cli/commands/init/write-config.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/write-config.js +2 -0
- package/dist/cli/run-cli/commands/init/write-workflow.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/write-workflow.js +6 -55
- package/dist/cli/run-cli/commands/init.js +5 -14
- package/dist/cli/run-cli/error-guidance.d.ts +9 -0
- package/dist/cli/run-cli/error-guidance.d.ts.map +1 -0
- package/dist/cli/run-cli/error-guidance.js +180 -0
- package/dist/cli/run-cli/globals.d.ts +22 -0
- package/dist/cli/run-cli/globals.d.ts.map +1 -0
- package/dist/cli/run-cli/globals.js +197 -0
- package/dist/cli/run-cli/update-warning.d.ts +6 -0
- package/dist/cli/run-cli/update-warning.d.ts.map +1 -0
- package/dist/cli/run-cli/update-warning.js +64 -0
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +5 -476
- package/dist/cli/spec/docs-render.d.ts.map +1 -1
- package/dist/cli/spec/docs-render.js +14 -1
- package/dist/commands/doctor/archive.d.ts +4 -0
- package/dist/commands/doctor/archive.d.ts.map +1 -0
- package/dist/commands/doctor/archive.js +211 -0
- package/dist/commands/doctor/fixes.d.ts +9 -0
- package/dist/commands/doctor/fixes.d.ts.map +1 -0
- package/dist/commands/doctor/fixes.js +40 -0
- package/dist/commands/doctor/layering.d.ts +2 -0
- package/dist/commands/doctor/layering.d.ts.map +1 -0
- package/dist/commands/doctor/layering.js +87 -0
- package/dist/commands/doctor/runtime.d.ts +4 -0
- package/dist/commands/doctor/runtime.d.ts.map +1 -0
- package/dist/commands/doctor/runtime.js +56 -0
- package/dist/commands/doctor/workflow.d.ts +6 -0
- package/dist/commands/doctor/workflow.d.ts.map +1 -0
- package/dist/commands/doctor/workflow.js +62 -0
- package/dist/commands/doctor/workspace.d.ts +2 -0
- package/dist/commands/doctor/workspace.d.ts.map +1 -0
- package/dist/commands/doctor/workspace.js +165 -0
- package/dist/commands/doctor.run.d.ts.map +1 -1
- package/dist/commands/doctor.run.js +16 -342
- package/dist/commands/doctor.spec.d.ts +1 -0
- package/dist/commands/doctor.spec.d.ts.map +1 -1
- package/dist/commands/doctor.spec.js +15 -1
- package/dist/commands/guard/impl/commands.d.ts.map +1 -1
- package/dist/commands/guard/impl/commands.js +19 -0
- package/dist/commands/release/apply.command.d.ts +2 -8
- package/dist/commands/release/apply.command.d.ts.map +1 -1
- package/dist/commands/release/apply.command.js +158 -387
- package/dist/commands/release/apply.mutation.d.ts +7 -0
- package/dist/commands/release/apply.mutation.d.ts.map +1 -0
- package/dist/commands/release/apply.mutation.js +107 -0
- package/dist/commands/release/apply.preflight.d.ts +25 -0
- package/dist/commands/release/apply.preflight.d.ts.map +1 -0
- package/dist/commands/release/apply.preflight.js +338 -0
- package/dist/commands/release/apply.reporting.d.ts +4 -0
- package/dist/commands/release/apply.reporting.d.ts.map +1 -0
- package/dist/commands/release/apply.reporting.js +24 -0
- package/dist/commands/release/apply.types.d.ts +46 -0
- package/dist/commands/release/apply.types.d.ts.map +1 -0
- package/dist/commands/release/apply.types.js +1 -0
- package/dist/commands/runtime.command.d.ts +28 -0
- package/dist/commands/runtime.command.d.ts.map +1 -0
- package/dist/commands/runtime.command.js +169 -0
- package/dist/commands/shared/task-store.d.ts.map +1 -1
- package/dist/commands/shared/task-store.js +7 -3
- package/dist/commands/task/add.d.ts.map +1 -1
- package/dist/commands/task/add.js +3 -33
- package/dist/commands/task/block.d.ts.map +1 -1
- package/dist/commands/task/block.js +2 -2
- package/dist/commands/task/close-duplicate.d.ts.map +1 -1
- package/dist/commands/task/close-duplicate.js +2 -2
- package/dist/commands/task/close-noop.d.ts.map +1 -1
- package/dist/commands/task/close-noop.js +2 -2
- package/dist/commands/task/comment.js +2 -2
- package/dist/commands/task/derive.d.ts.map +1 -1
- package/dist/commands/task/derive.js +3 -3
- package/dist/commands/task/doc-template.d.ts +10 -0
- package/dist/commands/task/doc-template.d.ts.map +1 -0
- package/dist/commands/task/doc-template.js +104 -0
- package/dist/commands/task/doc.d.ts.map +1 -1
- package/dist/commands/task/doc.js +36 -1
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +7 -4
- package/dist/commands/task/migrate-doc.command.d.ts.map +1 -1
- package/dist/commands/task/migrate-doc.command.js +5 -1
- package/dist/commands/task/migrate-doc.d.ts.map +1 -1
- package/dist/commands/task/migrate-doc.js +136 -2
- package/dist/commands/task/new.d.ts.map +1 -1
- package/dist/commands/task/new.js +4 -110
- package/dist/commands/task/new.spec.js +3 -3
- package/dist/commands/task/plan.d.ts.map +1 -1
- package/dist/commands/task/plan.js +5 -4
- package/dist/commands/task/scaffold.d.ts.map +1 -1
- package/dist/commands/task/scaffold.js +7 -52
- package/dist/commands/task/set-status.d.ts.map +1 -1
- package/dist/commands/task/set-status.js +2 -2
- package/dist/commands/task/shared/dependencies.d.ts +15 -0
- package/dist/commands/task/shared/dependencies.d.ts.map +1 -0
- package/dist/commands/task/shared/dependencies.js +143 -0
- package/dist/commands/task/shared/docs.d.ts +21 -0
- package/dist/commands/task/shared/docs.d.ts.map +1 -0
- package/dist/commands/task/shared/docs.js +121 -0
- package/dist/commands/task/shared/listing.d.ts +20 -0
- package/dist/commands/task/shared/listing.d.ts.map +1 -0
- package/dist/commands/task/shared/listing.js +127 -0
- package/dist/commands/task/shared/tags.d.ts +24 -0
- package/dist/commands/task/shared/tags.d.ts.map +1 -0
- package/dist/commands/task/shared/tags.js +177 -0
- package/dist/commands/task/shared/transitions.d.ts +42 -0
- package/dist/commands/task/shared/transitions.d.ts.map +1 -0
- package/dist/commands/task/shared/transitions.js +175 -0
- package/dist/commands/task/shared.d.ts +5 -106
- package/dist/commands/task/shared.d.ts.map +1 -1
- package/dist/commands/task/shared.js +5 -681
- package/dist/commands/task/start.d.ts.map +1 -1
- package/dist/commands/task/start.js +7 -5
- package/dist/commands/task/verify-record.d.ts.map +1 -1
- package/dist/commands/task/verify-record.js +9 -25
- package/dist/commands/task/verify-show.command.d.ts.map +1 -1
- package/dist/commands/task/verify-show.command.js +5 -1
- package/dist/commands/upgrade/apply.d.ts +44 -0
- package/dist/commands/upgrade/apply.d.ts.map +1 -0
- package/dist/commands/upgrade/apply.js +180 -0
- package/dist/commands/upgrade/report.d.ts +21 -0
- package/dist/commands/upgrade/report.d.ts.map +1 -0
- package/dist/commands/upgrade/report.js +81 -0
- package/dist/commands/upgrade/source.d.ts +35 -0
- package/dist/commands/upgrade/source.d.ts.map +1 -0
- package/dist/commands/upgrade/source.js +109 -0
- package/dist/commands/upgrade/types.d.ts +31 -0
- package/dist/commands/upgrade/types.d.ts.map +1 -0
- package/dist/commands/upgrade/types.js +1 -0
- package/dist/commands/upgrade.d.ts +1 -35
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +68 -332
- package/dist/commands/workflow-build.command.d.ts.map +1 -1
- package/dist/commands/workflow-build.command.js +9 -15
- package/dist/shared/diagnostics.d.ts +23 -0
- package/dist/shared/diagnostics.d.ts.map +1 -0
- package/dist/shared/diagnostics.js +57 -0
- package/dist/shared/errors.d.ts +2 -0
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/errors.js +2 -0
- package/dist/shared/repo-cli-version.d.ts +13 -0
- package/dist/shared/repo-cli-version.d.ts.map +1 -0
- package/dist/shared/repo-cli-version.js +63 -0
- package/dist/shared/runtime-source.d.ts +33 -0
- package/dist/shared/runtime-source.d.ts.map +1 -0
- package/dist/shared/runtime-source.js +156 -0
- package/dist/shared/version-compare.d.ts +7 -0
- package/dist/shared/version-compare.d.ts.map +1 -0
- package/dist/shared/version-compare.js +30 -0
- package/dist/shared/workflow-artifacts.d.ts +37 -0
- package/dist/shared/workflow-artifacts.d.ts.map +1 -0
- package/dist/shared/workflow-artifacts.js +97 -0
- package/package.json +2 -2
package/dist/shared/errors.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/shared/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,cAAc,GACd,MAAM,GACN,OAAO,GACP,WAAW,GACX,WAAW,GACX,YAAY,CAAC;AAEjB,qBAAa,QAAS,SAAQ,KAAK;IACjC,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,IAAI,EAAE,SAAS,CAAC;IAChC,SAAgB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAEtC,IAAI,EAAE;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,SAAS,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnC;CAMF;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,YAAY,CAAC,EAAE;QACb,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH,CAAC;AAEF,wBAAgB,eAAe,CAAC,GAAG,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,iBAAiB,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/shared/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,cAAc,GACd,MAAM,GACN,OAAO,GACP,WAAW,GACX,WAAW,GACX,YAAY,CAAC;AAEjB,qBAAa,QAAS,SAAQ,KAAK;IACjC,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,IAAI,EAAE,SAAS,CAAC;IAChC,SAAgB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAEtC,IAAI,EAAE;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,SAAS,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnC;CAMF;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,YAAY,CAAC,EAAE;QACb,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH,CAAC;AAEF,wBAAgB,eAAe,CAAC,GAAG,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAiBnF"}
|
package/dist/shared/errors.js
CHANGED
|
@@ -15,6 +15,8 @@ export function formatJsonError(err, guidance) {
|
|
|
15
15
|
code: err.code,
|
|
16
16
|
message: err.message,
|
|
17
17
|
context: err.context ?? undefined,
|
|
18
|
+
state: guidance?.state,
|
|
19
|
+
likely_cause: guidance?.likelyCause,
|
|
18
20
|
hint: guidance?.hint,
|
|
19
21
|
next_action: guidance?.nextAction,
|
|
20
22
|
reason_decode: guidance?.reasonDecode,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AgentplaneConfig } from "@agentplaneorg/core";
|
|
2
|
+
import type { RuntimeSourceInfo } from "./runtime-source.js";
|
|
3
|
+
export type RepoCliVersionState = "unconfigured" | "satisfied" | "older_than_expected" | "active_version_unresolved";
|
|
4
|
+
export type RepoCliVersionExpectation = {
|
|
5
|
+
expectedVersion: string | null;
|
|
6
|
+
activeVersion: string | null;
|
|
7
|
+
state: RepoCliVersionState;
|
|
8
|
+
summary: string | null;
|
|
9
|
+
recovery: string | null;
|
|
10
|
+
};
|
|
11
|
+
export declare function getRepoExpectedCliVersion(config: AgentplaneConfig): string | null;
|
|
12
|
+
export declare function evaluateRepoCliVersionExpectation(config: AgentplaneConfig, runtime: RuntimeSourceInfo): RepoCliVersionExpectation;
|
|
13
|
+
//# sourceMappingURL=repo-cli-version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo-cli-version.d.ts","sourceRoot":"","sources":["../../src/shared/repo-cli-version.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG7D,MAAM,MAAM,mBAAmB,GAC3B,cAAc,GACd,WAAW,GACX,qBAAqB,GACrB,2BAA2B,CAAC;AAEhC,MAAM,MAAM,yBAAyB,GAAG;IACtC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAKjF;AAqBD,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,iBAAiB,GACzB,yBAAyB,CAuC3B"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { compareVersions } from "./version-compare.js";
|
|
2
|
+
export function getRepoExpectedCliVersion(config) {
|
|
3
|
+
const raw = config.framework.cli.expected_version;
|
|
4
|
+
if (typeof raw !== "string")
|
|
5
|
+
return null;
|
|
6
|
+
const trimmed = raw.trim();
|
|
7
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
8
|
+
}
|
|
9
|
+
function buildRecovery(runtime, expectedVersion) {
|
|
10
|
+
switch (runtime.mode) {
|
|
11
|
+
case "global-installed": {
|
|
12
|
+
return `Run: npm i -g agentplane@${expectedVersion}`;
|
|
13
|
+
}
|
|
14
|
+
case "global-in-framework":
|
|
15
|
+
case "global-forced-in-framework": {
|
|
16
|
+
return "Run: scripts/reinstall-global-agentplane.sh";
|
|
17
|
+
}
|
|
18
|
+
case "repo-local":
|
|
19
|
+
case "repo-local-handoff": {
|
|
20
|
+
return (`Sync this framework checkout to agentplane ${expectedVersion} or lower ` +
|
|
21
|
+
"framework.cli.expected_version if the repository intentionally targets an older CLI.");
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export function evaluateRepoCliVersionExpectation(config, runtime) {
|
|
26
|
+
const expectedVersion = getRepoExpectedCliVersion(config);
|
|
27
|
+
const activeVersion = runtime.agentplane.version?.trim() ?? null;
|
|
28
|
+
if (!expectedVersion) {
|
|
29
|
+
return {
|
|
30
|
+
expectedVersion: null,
|
|
31
|
+
activeVersion,
|
|
32
|
+
state: "unconfigured",
|
|
33
|
+
summary: null,
|
|
34
|
+
recovery: null,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
if (!activeVersion) {
|
|
38
|
+
return {
|
|
39
|
+
expectedVersion,
|
|
40
|
+
activeVersion: null,
|
|
41
|
+
state: "active_version_unresolved",
|
|
42
|
+
summary: `Repository expects agentplane ${expectedVersion}, but the active runtime version could not be resolved.`,
|
|
43
|
+
recovery: buildRecovery(runtime, expectedVersion),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
if (compareVersions(activeVersion, expectedVersion) < 0) {
|
|
47
|
+
return {
|
|
48
|
+
expectedVersion,
|
|
49
|
+
activeVersion,
|
|
50
|
+
state: "older_than_expected",
|
|
51
|
+
summary: `Repository expects agentplane ${expectedVersion}, but the active runtime resolves ${activeVersion}.`,
|
|
52
|
+
recovery: buildRecovery(runtime, expectedVersion),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const relation = compareVersions(activeVersion, expectedVersion) === 0 ? "matches" : "is newer than";
|
|
56
|
+
return {
|
|
57
|
+
expectedVersion,
|
|
58
|
+
activeVersion,
|
|
59
|
+
state: "satisfied",
|
|
60
|
+
summary: `Active runtime ${activeVersion} ${relation} the repository expectation ${expectedVersion}.`,
|
|
61
|
+
recovery: null,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type FrameworkBinaryContext } from "../../bin/runtime-context.js";
|
|
2
|
+
export type RuntimeMode = "global-installed" | "global-in-framework" | "global-forced-in-framework" | "repo-local" | "repo-local-handoff";
|
|
3
|
+
export type ResolvedPackageInfo = {
|
|
4
|
+
name: string;
|
|
5
|
+
version: string | null;
|
|
6
|
+
packageRoot: string | null;
|
|
7
|
+
packageJsonPath: string | null;
|
|
8
|
+
};
|
|
9
|
+
export type RuntimeSourceInfo = {
|
|
10
|
+
cwd: string;
|
|
11
|
+
activeBinaryPath: string | null;
|
|
12
|
+
handoffFromBinaryPath: string | null;
|
|
13
|
+
mode: RuntimeMode;
|
|
14
|
+
framework: FrameworkBinaryContext;
|
|
15
|
+
frameworkSources: {
|
|
16
|
+
repoRoot: string | null;
|
|
17
|
+
agentplaneRoot: string | null;
|
|
18
|
+
coreRoot: string | null;
|
|
19
|
+
};
|
|
20
|
+
agentplane: ResolvedPackageInfo;
|
|
21
|
+
core: ResolvedPackageInfo;
|
|
22
|
+
};
|
|
23
|
+
export type ResolveRuntimeSourceInfoOptions = {
|
|
24
|
+
cwd?: string;
|
|
25
|
+
env?: NodeJS.ProcessEnv;
|
|
26
|
+
activeBinaryPath?: string | null;
|
|
27
|
+
entryModuleUrl?: string;
|
|
28
|
+
agentplanePackageRoot?: string | null;
|
|
29
|
+
corePackageJsonPath?: string | null;
|
|
30
|
+
};
|
|
31
|
+
export declare function describeRuntimeMode(mode: RuntimeMode): string;
|
|
32
|
+
export declare function resolveRuntimeSourceInfo(options?: ResolveRuntimeSourceInfoOptions): RuntimeSourceInfo;
|
|
33
|
+
//# sourceMappingURL=runtime-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-source.d.ts","sourceRoot":"","sources":["../../src/shared/runtime-source.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,8BAA8B,CAAC;AAOtC,MAAM,MAAM,WAAW,GACnB,kBAAkB,GAClB,qBAAqB,GACrB,4BAA4B,GAC5B,YAAY,GACZ,oBAAoB,CAAC;AAEzB,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,sBAAsB,CAAC;IAClC,gBAAgB,EAAE;QAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB,CAAC;IACF,UAAU,EAAE,mBAAmB,CAAC;IAChC,IAAI,EAAE,mBAAmB,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC,CAAC;AAuHF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAQ7D;AAED,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,+BAAoC,GAC5C,iBAAiB,CAiCnB"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { resolveFrameworkBinaryContext, } from "../../bin/runtime-context.js";
|
|
6
|
+
const ACTIVE_BIN_ENV = "AGENTPLANE_RUNTIME_ACTIVE_BIN";
|
|
7
|
+
const HANDOFF_FROM_ENV = "AGENTPLANE_RUNTIME_HANDOFF_FROM";
|
|
8
|
+
const HANDOFF_FLAG_ENV = "AGENTPLANE_REPO_LOCAL_HANDOFF";
|
|
9
|
+
const FORCE_GLOBAL_ENV = "AGENTPLANE_USE_GLOBAL_IN_FRAMEWORK";
|
|
10
|
+
function pathExists(absPath) {
|
|
11
|
+
try {
|
|
12
|
+
fs.accessSync(absPath);
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function readJsonFile(absPath) {
|
|
20
|
+
try {
|
|
21
|
+
return JSON.parse(fs.readFileSync(absPath, "utf8"));
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function resolvePackageInfo(packageJsonPath) {
|
|
28
|
+
if (!packageJsonPath) {
|
|
29
|
+
return {
|
|
30
|
+
name: "unknown",
|
|
31
|
+
version: null,
|
|
32
|
+
packageRoot: null,
|
|
33
|
+
packageJsonPath: null,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
const parsed = readJsonFile(packageJsonPath);
|
|
37
|
+
return {
|
|
38
|
+
name: typeof parsed?.name === "string" ? parsed.name : path.basename(path.dirname(packageJsonPath)),
|
|
39
|
+
version: typeof parsed?.version === "string" ? parsed.version : null,
|
|
40
|
+
packageRoot: path.dirname(packageJsonPath),
|
|
41
|
+
packageJsonPath,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function findPackageRoot(startPath, expectedName) {
|
|
45
|
+
let dir = path.resolve(startPath);
|
|
46
|
+
if (path.extname(dir))
|
|
47
|
+
dir = path.dirname(dir);
|
|
48
|
+
for (;;) {
|
|
49
|
+
const packageJsonPath = path.join(dir, "package.json");
|
|
50
|
+
if (pathExists(packageJsonPath)) {
|
|
51
|
+
if (!expectedName)
|
|
52
|
+
return dir;
|
|
53
|
+
const parsed = readJsonFile(packageJsonPath);
|
|
54
|
+
if (parsed?.name === expectedName)
|
|
55
|
+
return dir;
|
|
56
|
+
}
|
|
57
|
+
const parent = path.dirname(dir);
|
|
58
|
+
if (parent === dir)
|
|
59
|
+
return null;
|
|
60
|
+
dir = parent;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function resolveAgentplanePackageInfo(options) {
|
|
64
|
+
const explicitRoot = options.agentplanePackageRoot
|
|
65
|
+
? path.resolve(options.agentplanePackageRoot)
|
|
66
|
+
: null;
|
|
67
|
+
const entryModuleUrl = options.entryModuleUrl ?? import.meta.url;
|
|
68
|
+
const inferredRoot = explicitRoot ??
|
|
69
|
+
findPackageRoot(fileURLToPath(entryModuleUrl), "agentplane") ??
|
|
70
|
+
findPackageRoot(fileURLToPath(entryModuleUrl));
|
|
71
|
+
if (!inferredRoot) {
|
|
72
|
+
return { name: "agentplane", version: null, packageRoot: null, packageJsonPath: null };
|
|
73
|
+
}
|
|
74
|
+
return resolvePackageInfo(path.join(inferredRoot, "package.json"));
|
|
75
|
+
}
|
|
76
|
+
function resolveCorePackageInfo(options) {
|
|
77
|
+
if (options.corePackageJsonPath) {
|
|
78
|
+
return resolvePackageInfo(path.resolve(options.corePackageJsonPath));
|
|
79
|
+
}
|
|
80
|
+
try {
|
|
81
|
+
const req = createRequire(options.entryModuleUrl ?? import.meta.url);
|
|
82
|
+
const entryPath = req.resolve("@agentplaneorg/core");
|
|
83
|
+
const packageRoot = findPackageRoot(entryPath, "@agentplaneorg/core");
|
|
84
|
+
return resolvePackageInfo(packageRoot ? path.join(packageRoot, "package.json") : null);
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
return { name: "@agentplaneorg/core", version: null, packageRoot: null, packageJsonPath: null };
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function normalizePath(value) {
|
|
91
|
+
const trimmed = String(value ?? "").trim();
|
|
92
|
+
return trimmed.length > 0 ? path.resolve(trimmed) : null;
|
|
93
|
+
}
|
|
94
|
+
function inferRuntimeMode(context, env) {
|
|
95
|
+
const handoff = (env[HANDOFF_FLAG_ENV] ?? "").trim() === "1";
|
|
96
|
+
const handoffFrom = normalizePath(env[HANDOFF_FROM_ENV]);
|
|
97
|
+
if (handoff && handoffFrom && context.inFrameworkCheckout && context.isRepoLocalRuntime) {
|
|
98
|
+
return "repo-local-handoff";
|
|
99
|
+
}
|
|
100
|
+
if (context.inFrameworkCheckout && context.isRepoLocalRuntime) {
|
|
101
|
+
return "repo-local";
|
|
102
|
+
}
|
|
103
|
+
if (context.inFrameworkCheckout && (env[FORCE_GLOBAL_ENV] ?? "").trim() === "1") {
|
|
104
|
+
return "global-forced-in-framework";
|
|
105
|
+
}
|
|
106
|
+
if (context.inFrameworkCheckout) {
|
|
107
|
+
return "global-in-framework";
|
|
108
|
+
}
|
|
109
|
+
return "global-installed";
|
|
110
|
+
}
|
|
111
|
+
function resolveFrameworkCoreRoot(repoRoot) {
|
|
112
|
+
if (!repoRoot)
|
|
113
|
+
return null;
|
|
114
|
+
const coreRoot = path.join(repoRoot, "packages", "core");
|
|
115
|
+
return pathExists(path.join(coreRoot, "package.json")) ? coreRoot : null;
|
|
116
|
+
}
|
|
117
|
+
export function describeRuntimeMode(mode) {
|
|
118
|
+
return {
|
|
119
|
+
"repo-local-handoff": "repo-local binary reached via handoff from a global install",
|
|
120
|
+
"repo-local": "repo-local framework binary",
|
|
121
|
+
"global-forced-in-framework": "global installed binary forced inside a framework checkout",
|
|
122
|
+
"global-in-framework": "global installed binary running inside a framework checkout",
|
|
123
|
+
"global-installed": "global installed binary",
|
|
124
|
+
}[mode];
|
|
125
|
+
}
|
|
126
|
+
export function resolveRuntimeSourceInfo(options = {}) {
|
|
127
|
+
const cwd = path.resolve(options.cwd ?? process.cwd());
|
|
128
|
+
const env = options.env ?? process.env;
|
|
129
|
+
const agentplane = resolveAgentplanePackageInfo(options);
|
|
130
|
+
const core = resolveCorePackageInfo(options);
|
|
131
|
+
const fallbackBin = agentplane.packageRoot === null
|
|
132
|
+
? null
|
|
133
|
+
: path.join(agentplane.packageRoot, "bin", "agentplane.js");
|
|
134
|
+
const activeBinaryPath = normalizePath(options.activeBinaryPath) ??
|
|
135
|
+
normalizePath(env[ACTIVE_BIN_ENV]) ??
|
|
136
|
+
normalizePath(process.argv[1]) ??
|
|
137
|
+
normalizePath(fallbackBin);
|
|
138
|
+
const framework = resolveFrameworkBinaryContext({
|
|
139
|
+
cwd,
|
|
140
|
+
thisBin: activeBinaryPath ?? fallbackBin ?? cwd,
|
|
141
|
+
});
|
|
142
|
+
return {
|
|
143
|
+
cwd,
|
|
144
|
+
activeBinaryPath,
|
|
145
|
+
handoffFromBinaryPath: normalizePath(env[HANDOFF_FROM_ENV]),
|
|
146
|
+
mode: inferRuntimeMode(framework, env),
|
|
147
|
+
framework,
|
|
148
|
+
frameworkSources: {
|
|
149
|
+
repoRoot: framework.checkout?.repoRoot ?? null,
|
|
150
|
+
agentplaneRoot: framework.checkout?.packageRoot ?? agentplane.packageRoot,
|
|
151
|
+
coreRoot: resolveFrameworkCoreRoot(framework.checkout?.repoRoot ?? null),
|
|
152
|
+
},
|
|
153
|
+
agentplane,
|
|
154
|
+
core,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type ParsedVersionParts = {
|
|
2
|
+
main: number[];
|
|
3
|
+
prerelease: string | null;
|
|
4
|
+
};
|
|
5
|
+
export declare function parseVersionParts(version: string): ParsedVersionParts;
|
|
6
|
+
export declare function compareVersions(left: string, right: string): number;
|
|
7
|
+
//# sourceMappingURL=version-compare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-compare.d.ts","sourceRoot":"","sources":["../../src/shared/version-compare.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB,CAWrE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAanE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export function parseVersionParts(version) {
|
|
2
|
+
const cleaned = version.trim().replace(/^v/i, "").split("+")[0] ?? "";
|
|
3
|
+
const [mainRaw, prereleaseRaw] = cleaned.split("-", 2);
|
|
4
|
+
const main = (mainRaw ?? "")
|
|
5
|
+
.split(".")
|
|
6
|
+
.filter((part) => part.length > 0)
|
|
7
|
+
.map((part) => {
|
|
8
|
+
const parsed = Number.parseInt(part, 10);
|
|
9
|
+
return Number.isFinite(parsed) ? parsed : 0;
|
|
10
|
+
});
|
|
11
|
+
return { main, prerelease: prereleaseRaw ? prereleaseRaw.trim() : null };
|
|
12
|
+
}
|
|
13
|
+
export function compareVersions(left, right) {
|
|
14
|
+
const a = parseVersionParts(left);
|
|
15
|
+
const b = parseVersionParts(right);
|
|
16
|
+
const length = Math.max(a.main.length, b.main.length);
|
|
17
|
+
for (let i = 0; i < length; i++) {
|
|
18
|
+
const partA = a.main[i] ?? 0;
|
|
19
|
+
const partB = b.main[i] ?? 0;
|
|
20
|
+
if (partA !== partB)
|
|
21
|
+
return partA > partB ? 1 : -1;
|
|
22
|
+
}
|
|
23
|
+
if (a.prerelease === b.prerelease)
|
|
24
|
+
return 0;
|
|
25
|
+
if (a.prerelease === null)
|
|
26
|
+
return 1;
|
|
27
|
+
if (b.prerelease === null)
|
|
28
|
+
return -1;
|
|
29
|
+
return a.prerelease.localeCompare(b.prerelease);
|
|
30
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type WorkflowArtifactApprovals = {
|
|
2
|
+
requirePlanApproval: boolean;
|
|
3
|
+
requireVerifyApproval: boolean;
|
|
4
|
+
requireNetworkApproval: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function buildWorkflowRuntimeContext(opts: {
|
|
7
|
+
gitRoot: string;
|
|
8
|
+
workflowMode: "direct" | "branch_pr";
|
|
9
|
+
approvals: WorkflowArtifactApprovals;
|
|
10
|
+
timestamp?: string;
|
|
11
|
+
}): {
|
|
12
|
+
workflow: {
|
|
13
|
+
mode: "direct" | "branch_pr";
|
|
14
|
+
version: number;
|
|
15
|
+
approvals: {
|
|
16
|
+
require_plan: boolean;
|
|
17
|
+
require_verify: boolean;
|
|
18
|
+
require_network: boolean;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
runtime: {
|
|
22
|
+
repo_name: string;
|
|
23
|
+
repo_root: string;
|
|
24
|
+
timestamp: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare function ensureWorkflowArtifacts(opts: {
|
|
28
|
+
gitRoot: string;
|
|
29
|
+
workflowMode: "direct" | "branch_pr";
|
|
30
|
+
approvals: WorkflowArtifactApprovals;
|
|
31
|
+
projectOverrideTemplate?: string;
|
|
32
|
+
}): Promise<{
|
|
33
|
+
installPaths: string[];
|
|
34
|
+
commitPaths: string[];
|
|
35
|
+
changedPaths: string[];
|
|
36
|
+
}>;
|
|
37
|
+
//# sourceMappingURL=workflow-artifacts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-artifacts.d.ts","sourceRoot":"","sources":["../../src/shared/workflow-artifacts.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,yBAAyB,GAAG;IACtC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,sBAAsB,EAAE,OAAO,CAAC;CACjC,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,IAAI,EAAE;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,QAAQ,GAAG,WAAW,CAAC;IACrC,SAAS,EAAE,yBAAyB,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;;;;;;;;;;;;;;;EAiBA;AAUD,wBAAsB,uBAAuB,CAAC,IAAI,EAAE;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,QAAQ,GAAG,WAAW,CAAC;IACrC,SAAS,EAAE,yBAAyB,CAAC;IACrC,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC,GAAG,OAAO,CAAC;IAAE,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAwErF"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { DEFAULT_WORKFLOW_TEMPLATE, buildWorkflowFromTemplates, diagnosticsSummary, publishWorkflowCandidate, resolveWorkflowPaths, } from "../workflow-runtime/index.js";
|
|
4
|
+
import { CliError } from "./errors.js";
|
|
5
|
+
export function buildWorkflowRuntimeContext(opts) {
|
|
6
|
+
return {
|
|
7
|
+
workflow: {
|
|
8
|
+
mode: opts.workflowMode,
|
|
9
|
+
version: 1,
|
|
10
|
+
approvals: {
|
|
11
|
+
require_plan: opts.approvals.requirePlanApproval,
|
|
12
|
+
require_verify: opts.approvals.requireVerifyApproval,
|
|
13
|
+
require_network: opts.approvals.requireNetworkApproval,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
runtime: {
|
|
17
|
+
repo_name: path.basename(opts.gitRoot) || "repo",
|
|
18
|
+
repo_root: opts.gitRoot,
|
|
19
|
+
timestamp: opts.timestamp ?? new Date().toISOString(),
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
async function readIfPresent(absPath) {
|
|
24
|
+
try {
|
|
25
|
+
return await readFile(absPath, "utf8");
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export async function ensureWorkflowArtifacts(opts) {
|
|
32
|
+
const workflowPaths = resolveWorkflowPaths(opts.gitRoot);
|
|
33
|
+
const [beforeWorkflow, beforeLastKnownGood, beforeLegacyWorkflow] = await Promise.all([
|
|
34
|
+
readIfPresent(workflowPaths.workflowPath),
|
|
35
|
+
readIfPresent(workflowPaths.lastKnownGoodPath),
|
|
36
|
+
workflowPaths.legacyWorkflowPath === workflowPaths.workflowPath
|
|
37
|
+
? Promise.resolve(null)
|
|
38
|
+
: readIfPresent(workflowPaths.legacyWorkflowPath),
|
|
39
|
+
]);
|
|
40
|
+
const built = buildWorkflowFromTemplates({
|
|
41
|
+
baseTemplate: DEFAULT_WORKFLOW_TEMPLATE,
|
|
42
|
+
projectOverrideTemplate: opts.projectOverrideTemplate,
|
|
43
|
+
runtimeContext: buildWorkflowRuntimeContext({
|
|
44
|
+
gitRoot: opts.gitRoot,
|
|
45
|
+
workflowMode: opts.workflowMode,
|
|
46
|
+
approvals: opts.approvals,
|
|
47
|
+
}),
|
|
48
|
+
});
|
|
49
|
+
if (built.diagnostics.some((diagnostic) => diagnostic.severity === "ERROR")) {
|
|
50
|
+
throw new CliError({
|
|
51
|
+
exitCode: 3,
|
|
52
|
+
code: "E_VALIDATION",
|
|
53
|
+
message: `Failed to generate WORKFLOW.md: ${diagnosticsSummary(built.diagnostics)}`,
|
|
54
|
+
context: {
|
|
55
|
+
diagnostics: built.diagnostics.map((diagnostic) => ({
|
|
56
|
+
severity: diagnostic.severity,
|
|
57
|
+
code: diagnostic.code,
|
|
58
|
+
path: diagnostic.path,
|
|
59
|
+
message: diagnostic.message,
|
|
60
|
+
})),
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
const published = await publishWorkflowCandidate(opts.gitRoot, built.text);
|
|
65
|
+
if (!published.ok) {
|
|
66
|
+
throw new CliError({
|
|
67
|
+
exitCode: 3,
|
|
68
|
+
code: "E_VALIDATION",
|
|
69
|
+
message: `Failed to publish WORKFLOW.md: ${diagnosticsSummary(published.diagnostics)}`,
|
|
70
|
+
context: {
|
|
71
|
+
diagnostics: published.diagnostics.map((diagnostic) => ({
|
|
72
|
+
severity: diagnostic.severity,
|
|
73
|
+
code: diagnostic.code,
|
|
74
|
+
path: diagnostic.path,
|
|
75
|
+
message: diagnostic.message,
|
|
76
|
+
})),
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
const changedPaths = [];
|
|
81
|
+
if (beforeWorkflow !== built.text)
|
|
82
|
+
changedPaths.push(workflowPaths.workflowPath);
|
|
83
|
+
if (beforeLastKnownGood !== built.text)
|
|
84
|
+
changedPaths.push(workflowPaths.lastKnownGoodPath);
|
|
85
|
+
if (workflowPaths.legacyWorkflowPath !== workflowPaths.workflowPath &&
|
|
86
|
+
beforeLegacyWorkflow !== null) {
|
|
87
|
+
changedPaths.push(workflowPaths.legacyWorkflowPath);
|
|
88
|
+
}
|
|
89
|
+
const commitPaths = [
|
|
90
|
+
...new Set(changedPaths.map((absPath) => path.relative(opts.gitRoot, absPath))),
|
|
91
|
+
];
|
|
92
|
+
return {
|
|
93
|
+
installPaths: [workflowPaths.workflowPath, workflowPaths.lastKnownGoodPath],
|
|
94
|
+
commitPaths,
|
|
95
|
+
changedPaths,
|
|
96
|
+
};
|
|
97
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentplane",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Agent Plane CLI for task workflows, recipes, and project automation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentplane",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"prepublishOnly": "node ../../scripts/enforce-github-publish.mjs && npm run prepack"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@agentplaneorg/core": "0.3.
|
|
58
|
+
"@agentplaneorg/core": "0.3.4",
|
|
59
59
|
"yauzl": "^2.10.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|