akm-cli 0.9.0-rc.13 → 0.9.0-rc.14
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/CHANGELOG.md +117 -23
- package/dist/akm-migrate +3 -1
- package/dist/assets/hints/cli-hints-full.md +3 -4
- package/dist/assets/hints/cli-hints-short.md +5 -5
- package/dist/assets/workflows/workflow-template.md +4 -3
- package/dist/cli/invocation.js +3 -2
- package/dist/cli/retired-commands.js +3 -0
- package/dist/cli/unknown-flags.js +226 -0
- package/dist/cli.js +19 -35
- package/dist/commands/agent/contribute-cli.js +15 -3
- package/dist/commands/feedback-cli.js +6 -3
- package/dist/commands/improve/collapse-detector.js +2 -3
- package/dist/commands/lint/base-linter.js +4 -16
- package/dist/commands/lint/index.js +13 -13
- package/dist/commands/log.js +6 -1
- package/dist/commands/migration-tool.js +4 -5
- package/dist/commands/observability-cli.js +1 -1
- package/dist/commands/proposal/repository.js +5 -5
- package/dist/commands/read/knowledge.js +2 -0
- package/dist/commands/registry-cli.js +5 -3
- package/dist/commands/sources/add-cli.js +6 -6
- package/dist/commands/sources/self-update.js +30 -7
- package/dist/commands/sources/source-add.js +17 -2
- package/dist/commands/tasks/tasks.js +8 -3
- package/dist/commands/workflow-cli.js +142 -119
- package/dist/core/adapter/adapters/akm-lint.js +17 -13
- package/dist/core/adapter/adapters/akm-task-adapter.js +14 -11
- package/dist/core/asset/akm-markdown.js +41 -8
- package/dist/core/asset/frontmatter.js +22 -0
- package/dist/core/asset/resolve-ref.js +23 -3
- package/dist/core/common.js +45 -2
- package/dist/core/config/config-schema.js +8 -0
- package/dist/core/config/schema/experimental.js +5 -13
- package/dist/core/config/schema/sources-bundles.js +11 -0
- package/dist/core/config/schema/workflow.js +3 -1
- package/dist/core/errors.js +5 -0
- package/dist/core/logs-db.js +2 -1
- package/dist/core/parse.js +4 -1
- package/dist/core/state/migrations.js +11 -14
- package/dist/core/state-db.js +4 -6
- package/dist/core/subprocess.js +6 -4
- package/dist/core/type-presentation.js +1 -1
- package/dist/indexer/indexer.js +16 -1
- package/dist/indexer/search/search-source.js +1 -1
- package/dist/indexer/walk/matchers.js +3 -1
- package/dist/integrations/agent/config.js +2 -2
- package/dist/integrations/agent/detect.js +49 -19
- package/dist/integrations/agent/profiles.js +10 -0
- package/dist/integrations/agent/spawn.js +1 -2
- package/dist/integrations/harnesses/opencode-sdk/sdk-runner.js +7 -3
- package/dist/integrations/lockfile.js +11 -56
- package/dist/output/shapes/passthrough.js +0 -4
- package/dist/output/text/command-format.js +3 -3
- package/dist/output/text/helpers.js +1 -1
- package/dist/output/text/show-directives.js +4 -6
- package/dist/output/text/workflow-format.js +7 -62
- package/dist/output/text/workflow.js +1 -5
- package/dist/scripts/akm-migrate-node.js +58773 -0
- package/dist/scripts/akm-migrate.js +33976 -11391
- package/dist/setup/detect.js +40 -15
- package/dist/setup/setup.js +1 -1
- package/dist/sources/providers/git-stash.js +4 -2
- package/dist/sources/providers/website.js +5 -0
- package/dist/sources/snapshot-fetchers/bluesky.js +146 -0
- package/dist/sources/snapshot-fetchers/content-extract.js +370 -0
- package/dist/sources/snapshot-fetchers/fetcher-util.js +40 -0
- package/dist/sources/snapshot-fetchers/host-guard.js +199 -0
- package/dist/sources/snapshot-fetchers/registry.js +10 -1
- package/dist/sources/snapshot-fetchers/robots.js +348 -0
- package/dist/sources/snapshot-fetchers/rss.js +279 -0
- package/dist/sources/snapshot-fetchers/secret-seam.js +42 -0
- package/dist/sources/snapshot-fetchers/website-ingest.js +488 -257
- package/dist/sources/snapshot-fetchers/x.js +193 -0
- package/dist/storage/engines/sqlite-migrations.js +22 -107
- package/dist/tasks/runner.js +19 -16
- package/dist/tasks/schema.js +24 -1
- package/dist/workflows/exec/brief.js +1 -1
- package/dist/workflows/exec/frozen-judge.js +28 -2
- package/dist/workflows/exec/native-executor.js +18 -1
- package/dist/workflows/exec/report.js +11 -4
- package/dist/workflows/exec/run-workflow.js +103 -44
- package/dist/workflows/exec/step-work.js +19 -18
- package/dist/workflows/exec/unit-dispatch.js +4 -0
- package/dist/workflows/exec/workflow-engine-gate.js +11 -13
- package/dist/workflows/ir/compile.js +2 -2
- package/dist/workflows/ir/freeze.js +16 -8
- package/dist/workflows/ir/params.js +134 -10
- package/dist/workflows/ir/plan-hash.js +1 -1
- package/dist/workflows/ir/schema.js +6 -2
- package/dist/workflows/renderer.js +2 -2
- package/dist/workflows/runtime/checkin.js +3 -3
- package/dist/workflows/runtime/runs.js +50 -29
- package/dist/workflows/validate-summary.js +30 -14
- package/docs/migration/release-notes/0.9.0.md +31 -4
- package/docs/migration/v0.8-to-v0.9.md +69 -100
- package/docs/reference/data-and-telemetry.md +5 -5
- package/package.json +6 -2
- package/schemas/akm-config.json +24 -0
- package/schemas/akm-workflow.json +1 -1
- package/dist/workflows/cli.js +0 -33
|
@@ -9,29 +9,10 @@
|
|
|
9
9
|
* cohesive, self-contained cluster (they call only each other, never
|
|
10
10
|
* formatters from other domains).
|
|
11
11
|
*/
|
|
12
|
-
/**
|
|
13
|
-
* Plain-text rendering for a step-completion that was rejected by the
|
|
14
|
-
* summary-validation gate (#506): the step stays pending and the agent gets
|
|
15
|
-
* corrective feedback on what to finish/fix.
|
|
16
|
-
*/
|
|
17
|
-
export function formatWorkflowCompleteRejectedPlain(r) {
|
|
18
|
-
const stepId = String(r.stepId ?? "?");
|
|
19
|
-
const feedback = typeof r.feedback === "string" ? r.feedback : "";
|
|
20
|
-
const missing = Array.isArray(r.missing) ? r.missing.map((m) => String(m)) : [];
|
|
21
|
-
const lines = [`workflow complete: rejected — step "${stepId}" does not meet its completion criteria`];
|
|
22
|
-
if (feedback)
|
|
23
|
-
lines.push(` feedback: ${feedback}`);
|
|
24
|
-
if (missing.length > 0) {
|
|
25
|
-
lines.push(" outstanding:");
|
|
26
|
-
for (const m of missing)
|
|
27
|
-
lines.push(` - ${m}`);
|
|
28
|
-
}
|
|
29
|
-
return lines.join("\n");
|
|
30
|
-
}
|
|
31
12
|
export function formatWorkflowListPlain(result) {
|
|
32
13
|
const runs = Array.isArray(result.runs) ? result.runs : [];
|
|
33
14
|
if (runs.length === 0) {
|
|
34
|
-
return "No workflow runs in the current working scope. Start one with `akm workflow
|
|
15
|
+
return "No workflow runs in the current working scope. Start one with `akm workflow run workflows/<name>` or author one with `akm workflow create <name>`.";
|
|
35
16
|
}
|
|
36
17
|
return runs
|
|
37
18
|
.map((run) => {
|
|
@@ -117,7 +98,7 @@ export function formatWorkflowStatusPlain(result) {
|
|
|
117
98
|
}
|
|
118
99
|
/**
|
|
119
100
|
* Render the stalled-run check-in directive (#506) when present on a
|
|
120
|
-
* workflow-
|
|
101
|
+
* workflow-status result. Returns null when the run is healthy.
|
|
121
102
|
*/
|
|
122
103
|
function formatWorkflowCheckinLine(result) {
|
|
123
104
|
const checkin = typeof result.checkin === "object" && result.checkin !== null
|
|
@@ -127,47 +108,6 @@ function formatWorkflowCheckinLine(result) {
|
|
|
127
108
|
return null;
|
|
128
109
|
return checkin.directive.trim();
|
|
129
110
|
}
|
|
130
|
-
export function formatWorkflowNextPlain(result) {
|
|
131
|
-
const base = formatWorkflowStatusPlain(result);
|
|
132
|
-
const step = typeof result.step === "object" && result.step !== null ? result.step : undefined;
|
|
133
|
-
if (!step)
|
|
134
|
-
return base;
|
|
135
|
-
const lines = base ? [base, "", "next:"] : ["next:"];
|
|
136
|
-
lines.push(` ${String(step.title ?? "Untitled step")} [${String(step.id ?? "unknown")}]`);
|
|
137
|
-
if (typeof step.instructions === "string" && step.instructions.trim()) {
|
|
138
|
-
const instrLines = step.instructions.trim().split("\n");
|
|
139
|
-
lines.push(` instructions: ${instrLines[0]}`);
|
|
140
|
-
for (const instrLine of instrLines.slice(1))
|
|
141
|
-
lines.push(` ${instrLine}`);
|
|
142
|
-
}
|
|
143
|
-
const completion = Array.isArray(step.completionCriteria) ? step.completionCriteria : [];
|
|
144
|
-
if (completion.length > 0) {
|
|
145
|
-
lines.push(" completion:");
|
|
146
|
-
for (const criterion of completion) {
|
|
147
|
-
lines.push(` - ${String(criterion)}`);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
// T2-3: surface run-id as labeled field
|
|
151
|
-
const run = typeof result.run === "object" && result.run !== null ? result.run : undefined;
|
|
152
|
-
const runId = typeof run?.id === "string" ? run.id : null;
|
|
153
|
-
const stepId = typeof step?.id === "string" ? step.id : null;
|
|
154
|
-
if (runId) {
|
|
155
|
-
lines.push("");
|
|
156
|
-
lines.push(`runId: ${runId}`);
|
|
157
|
-
}
|
|
158
|
-
// T1-6: complete command
|
|
159
|
-
if (runId && stepId) {
|
|
160
|
-
lines.push("");
|
|
161
|
-
lines.push("COMPLETE THIS STEP:");
|
|
162
|
-
lines.push(` akm workflow complete '${runId}' --step '${stepId}'`);
|
|
163
|
-
}
|
|
164
|
-
else if (runId) {
|
|
165
|
-
lines.push("");
|
|
166
|
-
lines.push("COMPLETE THIS STEP:");
|
|
167
|
-
lines.push(` akm workflow complete '${runId}' --step '<step-id>'`);
|
|
168
|
-
}
|
|
169
|
-
return lines.join("\n");
|
|
170
|
-
}
|
|
171
111
|
export function formatWorkflowRunPlain(result) {
|
|
172
112
|
const run = typeof result.run === "object" && result.run !== null ? result.run : undefined;
|
|
173
113
|
if (!run)
|
|
@@ -197,6 +137,11 @@ export function formatWorkflowRunPlain(result) {
|
|
|
197
137
|
for (const item of missing)
|
|
198
138
|
lines.push(` missing: ${String(item)}`);
|
|
199
139
|
}
|
|
140
|
+
if (result.aborted === true) {
|
|
141
|
+
lines.push(result.timedOut === true
|
|
142
|
+
? "workflow timed out; the run remains resumable."
|
|
143
|
+
: "workflow interrupted; the run remains resumable.");
|
|
144
|
+
}
|
|
200
145
|
if (result.done === true)
|
|
201
146
|
lines.push("workflow completed.");
|
|
202
147
|
return lines.join("\n");
|
|
@@ -2,13 +2,9 @@
|
|
|
2
2
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
3
|
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
4
4
|
// Output text formatters for all `akm workflow *` commands.
|
|
5
|
-
import { formatWorkflowBriefPlain,
|
|
5
|
+
import { formatWorkflowBriefPlain, formatWorkflowCreatePlain, formatWorkflowListPlain, formatWorkflowResumePlain, formatWorkflowRunPlain, formatWorkflowStatusPlain, } from "./helpers.js";
|
|
6
6
|
export const workflowFormatters = [
|
|
7
|
-
{ command: "workflow-start", handler: (r) => formatWorkflowStatusPlain(r) },
|
|
8
7
|
{ command: "workflow-status", handler: (r) => formatWorkflowStatusPlain(r) },
|
|
9
|
-
{ command: "workflow-complete", handler: (r) => formatWorkflowStatusPlain(r) },
|
|
10
|
-
{ command: "workflow-complete-rejected", handler: (r) => formatWorkflowCompleteRejectedPlain(r) },
|
|
11
|
-
{ command: "workflow-next", handler: (r) => formatWorkflowNextPlain(r) },
|
|
12
8
|
{ command: "workflow-list", handler: (r) => formatWorkflowListPlain(r) },
|
|
13
9
|
{ command: "workflow-create", handler: (r) => formatWorkflowCreatePlain(r) },
|
|
14
10
|
{ command: "workflow-resume", handler: (r) => formatWorkflowResumePlain(r) },
|