@astrosheep/keiyaku 4.6.3 → 4.6.6
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/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-akuma/SKILL.md +47 -11
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-akuma/references/automation.md +2 -2
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-babysit/SKILL.md +1 -1
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-bind/SKILL.md +8 -9
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-workflow/SKILL.md +37 -25
- package/build/src/akuma/akuma-observe.d.ts +18 -15
- package/build/src/akuma/akuma-observe.js +75 -16
- package/build/src/akuma/akuma-wait.d.ts +4 -3
- package/build/src/akuma/akuma-wait.js +75 -53
- package/build/src/akuma/akuma.d.ts +6 -4
- package/build/src/akuma/akuma.js +4 -0
- package/build/src/akuma/call-initial-tell.d.ts +2 -2
- package/build/src/akuma/call-initial-tell.js +1 -1
- package/build/src/akuma/call-request.d.ts +2 -2
- package/build/src/akuma/heart/index.d.ts +7 -2
- package/build/src/akuma/heart/index.js +50 -5
- package/build/src/akuma/heart/tells.d.ts +33 -2
- package/build/src/akuma/heart/tells.js +24 -18
- package/build/src/akuma/heart/timeline.d.ts +23 -1
- package/build/src/akuma/heart/timeline.js +28 -21
- package/build/src/akuma/projection.d.ts +10 -10
- package/build/src/akuma/providers/pi/index.js +72 -39
- package/build/src/akuma/selection-observation.d.ts +20 -20
- package/build/src/akuma-body.js +1 -0
- package/build/src/alias/index.d.ts +0 -1
- package/build/src/alias/index.js +0 -4
- package/build/src/body/amend.d.ts +0 -4
- package/build/src/body/amend.js +0 -3
- package/build/src/body/region.d.ts +0 -1
- package/build/src/body/region.js +0 -3
- package/build/src/body/verification.d.ts +0 -1
- package/build/src/cli/commands/akuma-grammar.js +23 -66
- package/build/src/cli/commands/akuma.js +17 -30
- package/build/src/cli/commands/contract-grammar.d.ts +14 -1
- package/build/src/cli/commands/contract-grammar.js +54 -21
- package/build/src/cli/commands/contract-help.d.ts +9 -8
- package/build/src/cli/commands/contract-help.js +14 -7
- package/build/src/cli/commands/contract.js +57 -117
- package/build/src/cli/commands/install.d.ts +5 -5
- package/build/src/cli/commands/install.js +1 -4
- package/build/src/cli/commands/task-grammar.js +10 -66
- package/build/src/cli/commands/task.d.ts +0 -1
- package/build/src/cli/commands/task.js +34 -53
- package/build/src/cli/coordinates.d.ts +1 -2
- package/build/src/cli/coordinates.js +1 -4
- package/build/src/cli/parse.d.ts +2 -3
- package/build/src/cli/parse.js +24 -66
- package/build/src/cli/render/akuma.d.ts +3 -16
- package/build/src/cli/render/akuma.js +1 -13
- package/build/src/cli/render/audit.js +1 -1
- package/build/src/cli/render/contract.js +34 -32
- package/build/src/cli/render/kanshi-akuma.d.ts +8 -2
- package/build/src/cli/render/kanshi-akuma.js +14 -7
- package/build/src/cli/render/kanshi.d.ts +3 -1
- package/build/src/cli/render/kanshi.js +44 -32
- package/build/src/cli/render/receipt.js +6 -1
- package/build/src/cli/render/task.d.ts +1 -1
- package/build/src/cli/render/task.js +3 -27
- package/build/src/cli/render/terminal.d.ts +6 -2
- package/build/src/cli/render/terminal.js +8 -2
- package/build/src/cli/runtime.js +3 -16
- package/build/src/cli/scan.d.ts +26 -0
- package/build/src/cli/scan.js +82 -0
- package/build/src/cli/streams.d.ts +5 -0
- package/build/src/cli/streams.js +11 -0
- package/build/src/contract-worktree.js +38 -21
- package/build/src/core/facts/codec.d.ts +1 -2
- package/build/src/core/facts/codec.js +5 -11
- package/build/src/core/facts/types.d.ts +16 -2
- package/build/src/core/facts/types.js +15 -0
- package/build/src/core/verbs/abandon.js +3 -9
- package/build/src/core/verbs/amend.js +2 -9
- package/build/src/core/verbs/arc.js +6 -13
- package/build/src/core/verbs/attestation.js +2 -9
- package/build/src/core/verbs/bind.js +2 -9
- package/build/src/core/verbs/deliver.js +2 -9
- package/build/src/core/verbs/placement.d.ts +1 -1
- package/build/src/core/verbs/placement.js +2 -9
- package/build/src/core/verbs/reintegrate.d.ts +1 -1
- package/build/src/core/verbs/reintegrate.js +2 -9
- package/build/src/dispatch/index.d.ts +2 -2
- package/build/src/dispatch/index.js +33 -11
- package/build/src/git/hooks.d.ts +2 -4
- package/build/src/git/hooks.js +0 -12
- package/build/src/git/integration.d.ts +5 -3
- package/build/src/git/integration.js +36 -25
- package/build/src/git/nuke.js +4 -4
- package/build/src/git/observe.d.ts +4 -4
- package/build/src/git/observe.js +5 -5
- package/build/src/git/process.d.ts +1 -4
- package/build/src/git/process.js +1 -11
- package/build/src/git/read-observation.js +1 -1
- package/build/src/git/reconcile.d.ts +1 -1
- package/build/src/git/reconcile.js +15 -13
- package/build/src/git/repository.d.ts +2 -6
- package/build/src/git/repository.js +18 -31
- package/build/src/git/scratch.d.ts +6 -6
- package/build/src/git/scratch.js +110 -46
- package/build/src/git/target-placement.d.ts +5 -5
- package/build/src/git/target-placement.js +18 -33
- package/build/src/git/tender.d.ts +6 -2
- package/build/src/git/tender.js +19 -12
- package/build/src/git/terminal-reconcile.js +24 -13
- package/build/src/git/terminal-seal.d.ts +2 -5
- package/build/src/git/terminal-seal.js +5 -3
- package/build/src/git/workspace.d.ts +17 -13
- package/build/src/git/workspace.js +58 -41
- package/build/src/kanshi/index.d.ts +2 -2
- package/build/src/kanshi/index.js +1 -1
- package/build/src/kanshi/read.d.ts +8 -1
- package/build/src/kanshi/read.js +72 -7
- package/build/src/kanshi/report.d.ts +12 -0
- package/build/src/library/akuma-creation.d.ts +4 -4
- package/build/src/library/bind.d.ts +1 -63
- package/build/src/library/bind.js +3 -9
- package/build/src/library/contract-creation.js +2 -30
- package/build/src/library/contract-execution.d.ts +0 -1
- package/build/src/library/contract-execution.js +9 -34
- package/build/src/library/contract-operations.d.ts +5 -1
- package/build/src/library/contract-operations.js +7 -3
- package/build/src/library/contract-types.d.ts +1 -1
- package/build/src/library/delivery.d.ts +91 -93
- package/build/src/library/delivery.js +2 -1
- package/build/src/library/input.d.ts +0 -2
- package/build/src/library/input.js +0 -4
- package/build/src/library/invocation.d.ts +0 -1
- package/build/src/library/invocation.js +3 -25
- package/build/src/library/outcome.d.ts +651 -602
- package/build/src/library/outcome.js +4 -4
- package/build/src/library/reconcile.d.ts +6 -0
- package/build/src/library/reconcile.js +31 -1
- package/build/src/library/repo.d.ts +0 -1
- package/build/src/library/selection.d.ts +1 -10
- package/build/src/library/selection.js +14 -15
- package/build/src/protocol/abandon.d.ts +1 -1
- package/build/src/protocol/abandon.js +3 -10
- package/build/src/protocol/amend.js +2 -5
- package/build/src/protocol/arc.d.ts +1 -1
- package/build/src/protocol/arc.js +2 -9
- package/build/src/protocol/attempt.d.ts +3 -20
- package/build/src/protocol/attempt.js +6 -5
- package/build/src/protocol/audit.d.ts +1 -0
- package/build/src/protocol/audit.js +10 -11
- package/build/src/protocol/completion.d.ts +129 -55
- package/build/src/protocol/completion.js +62 -73
- package/build/src/protocol/deliver.d.ts +7 -5
- package/build/src/protocol/deliver.js +74 -44
- package/build/src/protocol/execution-observation.d.ts +2 -4
- package/build/src/protocol/execution-observation.js +3 -7
- package/build/src/protocol/intent.d.ts +1 -1
- package/build/src/protocol/intent.js +1 -0
- package/build/src/protocol/operations.d.ts +24 -12
- package/build/src/protocol/operations.js +36 -15
- package/build/src/protocol/placement.d.ts +2 -1
- package/build/src/protocol/placement.js +21 -5
- package/build/src/protocol/progress.d.ts +1 -1
- package/build/src/protocol/read/status.js +58 -41
- package/build/src/protocol/reintegrate.d.ts +1 -1
- package/build/src/protocol/reintegrate.js +10 -19
- package/build/src/protocol/review.d.ts +3 -28
- package/build/src/protocol/review.js +10 -37
- package/build/src/protocol/run.d.ts +19 -7
- package/build/src/protocol/run.js +19 -9
- package/build/src/runtime/proc/windows-launch.exe +0 -0
- package/build/src/settlement/holder.d.ts +2 -4
- package/build/src/settlement/holder.js +3 -6
- package/build/src/task/board.d.ts +6 -0
- package/build/src/task/board.js +30 -1
- package/build/src/task/catalog.js +1 -4
- package/build/src/task/compose.d.ts +0 -1
- package/build/src/task/compose.js +0 -1
- package/build/src/task/context.d.ts +0 -1
- package/build/src/task/context.js +0 -3
- package/build/src/task/created-observation.d.ts +5 -1
- package/build/src/task/created-observation.js +12 -5
- package/build/src/task/index.d.ts +1 -1
- package/build/src/task/index.js +7 -6
- package/build/src/task/input.d.ts +0 -6
- package/build/src/task/input.js +2 -14
- package/build/src/task/mutation.d.ts +3 -4
- package/build/src/task/mutation.js +11 -39
- package/build/src/task/operations.d.ts +2 -7
- package/build/src/task/operations.js +37 -49
- package/build/src/task/query.d.ts +0 -1
- package/build/src/task/query.js +1 -4
- package/build/src/task/store.d.ts +0 -2
- package/build/src/task/store.js +27 -11
- package/build/src/verification/declaration.js +3 -2
- package/build/src/verification/execution.d.ts +3 -2
- package/build/src/verification/execution.js +10 -6
- package/build/src/workspace-place.d.ts +0 -1
- package/build/src/workspace-place.js +0 -11
- package/package.json +7 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { dirname, resolve } from "node:path";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
3
|
import { CliUsageError, commandGuide, usageLine } from "../usage.js";
|
|
4
|
-
|
|
4
|
+
const HARNESS_NAMES = ["codex", "claude", "opencode", "pi"];
|
|
5
5
|
export const INSTALL_USAGE = "install <codex|claude|opencode|pi>\ninstall --all";
|
|
6
6
|
export const INSTALL_ROOT_PURPOSE = "Install the Keiyaku plugin into a supported coding harness.";
|
|
7
7
|
function isHarness(value) {
|
|
@@ -83,9 +83,6 @@ function diagnostic(argv, outcome) {
|
|
|
83
83
|
const detail = outcome.stderr.trim() || outcome.stdout.trim();
|
|
84
84
|
return `${argv[0]} exited ${outcome.code}${detail.length === 0 ? "" : `: ${detail}`}`;
|
|
85
85
|
}
|
|
86
|
-
export function installAssetsRoot() {
|
|
87
|
-
return ASSET_ROOT;
|
|
88
|
-
}
|
|
89
86
|
export async function installHarnesses(harnesses, environment, runner) {
|
|
90
87
|
const run = runner ?? (await import("../../runtime/proc/run.js")).runCrossPlatformProcess;
|
|
91
88
|
const results = [];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { CliUsageError,
|
|
1
|
+
import { CliUsageError, TASK_FAMILY_USAGE_GUIDE, unknownCommandGuide } from "../usage.js";
|
|
2
|
+
import { scanArgs } from "../scan.js";
|
|
2
3
|
import { parseTaskNamespaceSelector } from "../../task/catalog.js";
|
|
3
4
|
import { parseTaskId } from "../../task/identity.js";
|
|
4
5
|
import { parseTaskQueryExpression, validateTaskLimit, validateTaskParent, } from "./task-query.js";
|
|
@@ -241,73 +242,16 @@ export function taskUsageGuide(action) {
|
|
|
241
242
|
help: `keiyaku task ${action} --help`,
|
|
242
243
|
};
|
|
243
244
|
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
fail(`duplicate option: --${name}`);
|
|
247
|
-
if (kind === "boolean") {
|
|
248
|
-
flags[name] = true;
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
if (value === undefined)
|
|
252
|
-
fail(`--${name} requires a value`);
|
|
253
|
-
if (isBlankInput(value))
|
|
254
|
-
fail(`--${name} requires a nonblank value`);
|
|
255
|
-
if (kind === "repeat") {
|
|
256
|
-
const current = flags[name];
|
|
257
|
-
flags[name] = [...(Array.isArray(current) ? current : []), value];
|
|
258
|
-
}
|
|
259
|
-
else
|
|
260
|
-
flags[name] = value;
|
|
261
|
-
}
|
|
262
|
-
function scanTaskOption(input, fail) {
|
|
263
|
-
const token = input.argv[input.index], name = token.slice(2), kind = input.spec.flags[name];
|
|
264
|
-
if (kind === undefined)
|
|
265
|
-
fail(`option ${token} is not valid for task ${input.action}`);
|
|
266
|
-
const next = kind === "boolean" ? undefined : input.argv[input.index + 1];
|
|
267
|
-
if (next === "-" && input.action === "update" && name === "body") {
|
|
268
|
-
if (input.stdin !== undefined)
|
|
269
|
-
fail("stdin marker '-' may appear only once");
|
|
270
|
-
input.flags[name] = "";
|
|
271
|
-
return { index: input.index + 1, stdin: name };
|
|
272
|
-
}
|
|
273
|
-
if (kind !== "boolean" && (next === undefined || next.startsWith("--") || next === "-"))
|
|
274
|
-
fail(`--${name} requires a value`);
|
|
275
|
-
setFlag(input.flags, name, kind, next, fail);
|
|
245
|
+
/** One scan spec per Task action: `-` reads the document, or `--body -` replaces an update body. */
|
|
246
|
+
function scanSpec(action, spec) {
|
|
276
247
|
return {
|
|
277
|
-
|
|
278
|
-
|
|
248
|
+
subject: `task ${action}`,
|
|
249
|
+
flags: spec.flags,
|
|
250
|
+
...(spec.stdin === undefined ? {} : { stdin: spec.stdin }),
|
|
251
|
+
stdinRefusal: "stdin marker '-' is not valid here",
|
|
252
|
+
...(action === "update" ? { stdinValue: "body" } : {}),
|
|
279
253
|
};
|
|
280
254
|
}
|
|
281
|
-
function scanTaskArgv(action, argv, fail) {
|
|
282
|
-
const spec = TASK_COMMAND_SPECS[action], positionals = [], flags = {};
|
|
283
|
-
let stdin;
|
|
284
|
-
let positionalOnly = false;
|
|
285
|
-
for (let index = 1; index < argv.length; index += 1) {
|
|
286
|
-
const token = argv[index];
|
|
287
|
-
if (!positionalOnly && token === "--") {
|
|
288
|
-
positionalOnly = true;
|
|
289
|
-
continue;
|
|
290
|
-
}
|
|
291
|
-
if (!positionalOnly && token === "-") {
|
|
292
|
-
if (spec.stdin === undefined)
|
|
293
|
-
fail("stdin marker '-' is not valid here");
|
|
294
|
-
if (stdin !== undefined)
|
|
295
|
-
fail("stdin marker '-' may appear only once");
|
|
296
|
-
stdin = spec.stdin;
|
|
297
|
-
continue;
|
|
298
|
-
}
|
|
299
|
-
if (positionalOnly || !token.startsWith("--")) {
|
|
300
|
-
if (isBlankInput(token))
|
|
301
|
-
fail(`task ${action} requires a nonblank value`);
|
|
302
|
-
positionals.push(token);
|
|
303
|
-
continue;
|
|
304
|
-
}
|
|
305
|
-
const scanned = scanTaskOption({ action, spec, argv, index, flags, ...(stdin === undefined ? {} : { stdin }) }, fail);
|
|
306
|
-
index = scanned.index;
|
|
307
|
-
stdin = scanned.stdin;
|
|
308
|
-
}
|
|
309
|
-
return { positionals, flags, ...(stdin === undefined ? {} : { stdin }) };
|
|
310
|
-
}
|
|
311
255
|
function validateUpdate(scanned, fail) {
|
|
312
256
|
const flags = scanned.flags;
|
|
313
257
|
if (flags.body !== undefined && flags.append !== undefined)
|
|
@@ -419,7 +363,7 @@ export function parseTaskCommand(argv) {
|
|
|
419
363
|
const fail = (message) => {
|
|
420
364
|
throw new CliUsageError(message, taskUsageGuide(action));
|
|
421
365
|
};
|
|
422
|
-
const scanned =
|
|
366
|
+
const scanned = scanArgs(argv, scanSpec(action, TASK_COMMAND_SPECS[action]), fail);
|
|
423
367
|
validateTaskScan(action, scanned, fail);
|
|
424
368
|
let where;
|
|
425
369
|
if (action === "query" && typeof scanned.flags.where === "string") {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ParsedTaskCommand } from "./task-grammar.js";
|
|
2
2
|
import type { CliRuntime } from "../runtime.js";
|
|
3
3
|
import type { CliCoordinates } from "../coordinates.js";
|
|
4
|
-
export { renderTaskHelp } from "./task-grammar.js";
|
|
5
4
|
export declare function runTaskCommand(command: ParsedTaskCommand, coordinates: CliCoordinates, runtime: CliRuntime): Promise<number>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { CliUsageError, isBlankInput } from "../usage.js";
|
|
2
2
|
import { parseTaskNamespaceSelector } from "../../task/catalog.js";
|
|
3
|
-
import {
|
|
3
|
+
import { tasksWithExecution, taskRowViewLimit, } from "../../task/index.js";
|
|
4
4
|
import { taskCompositionNamespaceHeader } from "../../task/compose-language.js";
|
|
5
|
-
import {
|
|
6
|
-
import { displayContext, writeJson, writeStderr, writeStdout } from "../streams.js";
|
|
7
|
-
import { renderTaskCompose, renderTaskContext,
|
|
5
|
+
import { installNamespaceContext, resolveTaskNamespaceContext } from "../../task/context.js";
|
|
6
|
+
import { displayContext, emit, writeJson, writeStderr, writeStdout } from "../streams.js";
|
|
7
|
+
import { renderDoctor, renderTaskCompose, renderTaskContext, renderTaskFailure, renderTaskIncompleteDiagnostic, renderTaskLifecycle, renderTaskList, renderTaskMutation, renderTaskShow, renderTaskTree, renderTaskUpdate, taskExitCode, } from "../render/task.js";
|
|
8
8
|
import { actorFromEdge } from "../actor.js";
|
|
9
9
|
import { taskQuerySelection } from "../../task/query.js";
|
|
10
|
-
export { renderTaskHelp } from "./task-grammar.js";
|
|
11
10
|
function value(command, name) {
|
|
12
11
|
const item = command.flags[name];
|
|
13
12
|
return typeof item === "string" ? item : undefined;
|
|
@@ -59,17 +58,6 @@ function taskStdinDiagnostic(command) {
|
|
|
59
58
|
return undefined;
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
|
-
/**
|
|
63
|
-
* The shared output primitive: one native answer, its matching rendered text, and the native exit
|
|
64
|
-
* classifier's verdict. JSON writes the untouched native value; text writes the rendered lines.
|
|
65
|
-
*/
|
|
66
|
-
function emitTask(output, result, project, code) {
|
|
67
|
-
if (output === "json")
|
|
68
|
-
writeJson(result);
|
|
69
|
-
else
|
|
70
|
-
writeStdout(project());
|
|
71
|
-
return code;
|
|
72
|
-
}
|
|
73
61
|
async function invokeAdd(input) {
|
|
74
62
|
const { tasks, command, current = [] } = input;
|
|
75
63
|
const selectedNamespace = namespace(value(command, "namespace")) ?? current;
|
|
@@ -137,17 +125,14 @@ async function runShow(command, tasks) {
|
|
|
137
125
|
details.push(await tasks.task({ id }).read());
|
|
138
126
|
const missing = details.findIndex((detail) => detail === null);
|
|
139
127
|
const code = missing >= 0 ? 1 : 0;
|
|
140
|
-
|
|
141
|
-
writeJson(handles.length === 1 ? details[0] : details);
|
|
142
|
-
return code;
|
|
143
|
-
}
|
|
128
|
+
const projected = handles.length === 1 ? details[0] : details;
|
|
144
129
|
if (missing >= 0) {
|
|
145
130
|
const refusal = { kind: "refused", refusal: { kind: "task-missing", taskId: handles[missing] } };
|
|
146
|
-
return
|
|
131
|
+
return emit(command.output, projected, () => renderTaskShow(refusal, displayContext()), code);
|
|
147
132
|
}
|
|
148
133
|
const found = details.filter((detail) => detail !== null);
|
|
149
134
|
const result = found.length === 1 ? found[0] : found;
|
|
150
|
-
return
|
|
135
|
+
return emit(command.output, projected, () => renderTaskShow(result, displayContext()), code);
|
|
151
136
|
}
|
|
152
137
|
/** Presentation-only list scope the leaf acquired, never part of the native answer. */
|
|
153
138
|
function listPresentation(command) {
|
|
@@ -169,7 +154,7 @@ async function runRead(input) {
|
|
|
169
154
|
: { namespace: explicitListNamespace(command) }),
|
|
170
155
|
...(limit(command) === undefined ? {} : { limit: limit(command) }),
|
|
171
156
|
});
|
|
172
|
-
return
|
|
157
|
+
return emit(command.output, result, () => renderTaskList("ls", scope, result, displayContext()), taskExitCode(result));
|
|
173
158
|
}
|
|
174
159
|
case "ready": {
|
|
175
160
|
const result = await tasks.ready({
|
|
@@ -177,7 +162,7 @@ async function runRead(input) {
|
|
|
177
162
|
...(value(command, "parent") === undefined ? {} : { parent: value(command, "parent") }),
|
|
178
163
|
...(limit(command) === undefined ? {} : { limit: limit(command) }),
|
|
179
164
|
});
|
|
180
|
-
return
|
|
165
|
+
return emit(command.output, result, () => renderTaskList("ready", scope, result, displayContext()), taskExitCode(result));
|
|
181
166
|
}
|
|
182
167
|
case "blocked": {
|
|
183
168
|
const result = await tasks.blocked({
|
|
@@ -185,7 +170,7 @@ async function runRead(input) {
|
|
|
185
170
|
...(value(command, "parent") === undefined ? {} : { parent: value(command, "parent") }),
|
|
186
171
|
...(limit(command) === undefined ? {} : { limit: limit(command) }),
|
|
187
172
|
});
|
|
188
|
-
return
|
|
173
|
+
return emit(command.output, result, () => renderTaskList("blocked", scope, result, displayContext()), taskExitCode(result));
|
|
189
174
|
}
|
|
190
175
|
case "query": {
|
|
191
176
|
const result = await tasks.query({
|
|
@@ -194,15 +179,15 @@ async function runRead(input) {
|
|
|
194
179
|
...(value(command, "sort") === undefined ? {} : { sort: value(command, "sort") }),
|
|
195
180
|
...(limit(command) === undefined ? {} : { limit: limit(command) }),
|
|
196
181
|
});
|
|
197
|
-
return
|
|
182
|
+
return emit(command.output, result, () => renderTaskList("query", scope, result, displayContext()), taskExitCode(result));
|
|
198
183
|
}
|
|
199
184
|
case "tree": {
|
|
200
185
|
const result = await tasks.task({ id }).tree();
|
|
201
|
-
return
|
|
186
|
+
return emit(command.output, result, () => renderTaskTree(result, displayContext()), taskExitCode(result));
|
|
202
187
|
}
|
|
203
188
|
case "doctor": {
|
|
204
189
|
const result = await tasks.doctor();
|
|
205
|
-
return
|
|
190
|
+
return emit(command.output, result, () => renderDoctor(result), taskExitCode(result));
|
|
206
191
|
}
|
|
207
192
|
default:
|
|
208
193
|
throw new Error(`task action is not a read: ${command.action}`);
|
|
@@ -231,26 +216,22 @@ function missingWorld(command) {
|
|
|
231
216
|
return 1;
|
|
232
217
|
}
|
|
233
218
|
const refusal = missingTask(command.positionals[0]);
|
|
234
|
-
return
|
|
219
|
+
return emit(output, refusal, () => renderTaskShow(refusal, displayContext()), 1);
|
|
235
220
|
}
|
|
236
221
|
if (isWorldObservationAction(command) || (command.action === "compose" && command.flags.plan === true)) {
|
|
237
|
-
|
|
238
|
-
writeJson({ kind: "absent" });
|
|
239
|
-
else
|
|
240
|
-
writeStdout("task world absent");
|
|
241
|
-
return 1;
|
|
222
|
+
return emit(output, { kind: "absent" }, () => "task world absent", 1);
|
|
242
223
|
}
|
|
243
224
|
if (command.action === "context") {
|
|
244
225
|
const result = { kind: "accepted", value: { namespace: [], source: "default-root" } };
|
|
245
|
-
return
|
|
226
|
+
return emit(output, result, () => renderTaskContext(result, displayContext()), taskExitCode(result));
|
|
246
227
|
}
|
|
247
228
|
if (command.action === "tree") {
|
|
248
229
|
const result = missingTask(command.positionals[0]);
|
|
249
|
-
return
|
|
230
|
+
return emit(output, result, () => renderTaskTree(result, displayContext()), taskExitCode(result));
|
|
250
231
|
}
|
|
251
232
|
if (command.action === "update") {
|
|
252
233
|
const result = missingTask(command.positionals[0]);
|
|
253
|
-
return
|
|
234
|
+
return emit(output, result, () => renderTaskUpdate(result, displayContext()), taskExitCode(result));
|
|
254
235
|
}
|
|
255
236
|
if (command.action === "start" ||
|
|
256
237
|
command.action === "stop" ||
|
|
@@ -258,18 +239,18 @@ function missingWorld(command) {
|
|
|
258
239
|
command.action === "resume") {
|
|
259
240
|
if (command.positionals.length === 1) {
|
|
260
241
|
const result = missingTask(command.positionals[0]);
|
|
261
|
-
return
|
|
242
|
+
return emit(output, result, () => renderTaskMutation(command.action, result, displayContext()), taskExitCode(result));
|
|
262
243
|
}
|
|
263
244
|
const result = {
|
|
264
245
|
items: command.positionals.map((id) => ({ id: id, outcome: missingTask(id) })),
|
|
265
246
|
};
|
|
266
|
-
return
|
|
247
|
+
return emit(output, result, () => renderTaskLifecycle(command.action, result, displayContext()), taskExitCode(result));
|
|
267
248
|
}
|
|
268
249
|
if (command.action === "done" || command.action === "drop") {
|
|
269
250
|
const result = {
|
|
270
251
|
items: command.positionals.map((id) => ({ id: id, outcome: missingTask(id) })),
|
|
271
252
|
};
|
|
272
|
-
return
|
|
253
|
+
return emit(output, result, () => renderTaskLifecycle(command.action, result, displayContext()), taskExitCode(result));
|
|
273
254
|
}
|
|
274
255
|
throw new Error(`task action has no missing-world answer: ${command.action}`);
|
|
275
256
|
}
|
|
@@ -300,7 +281,7 @@ async function runBatchLifecycle(tasks, command, verb) {
|
|
|
300
281
|
ids: command.positionals,
|
|
301
282
|
...(note === undefined ? {} : { note }),
|
|
302
283
|
});
|
|
303
|
-
return
|
|
284
|
+
return emit(command.output, result, () => renderTaskLifecycle(verb, result, displayContext()), taskExitCode(result));
|
|
304
285
|
}
|
|
305
286
|
async function runMutation(input) {
|
|
306
287
|
const { tasks, command, current, stdin, composeMarkdown, composeNamespace } = input;
|
|
@@ -309,17 +290,17 @@ async function runMutation(input) {
|
|
|
309
290
|
switch (command.action) {
|
|
310
291
|
case "add": {
|
|
311
292
|
const result = await invokeAdd(input);
|
|
312
|
-
return
|
|
293
|
+
return emit(command.output, result, () => renderTaskMutation("add", result, displayContext()), taskExitCode(result));
|
|
313
294
|
}
|
|
314
295
|
case "update": {
|
|
315
296
|
const result = await invokeUpdate(input);
|
|
316
|
-
return
|
|
297
|
+
return emit(command.output, result, () => renderTaskUpdate(result, displayContext()), taskExitCode(result));
|
|
317
298
|
}
|
|
318
299
|
case "start":
|
|
319
300
|
case "stop":
|
|
320
301
|
case "resume": {
|
|
321
302
|
const result = await invokeLifecycle(tasks, command.positionals, command.positionals[0], command.action);
|
|
322
|
-
return
|
|
303
|
+
return emit(command.output, result, () => renderTaskLifecycle(command.action, result, displayContext()), taskExitCode(result));
|
|
323
304
|
}
|
|
324
305
|
case "hold":
|
|
325
306
|
case "done":
|
|
@@ -328,20 +309,20 @@ async function runMutation(input) {
|
|
|
328
309
|
case "context": {
|
|
329
310
|
const selected = namespace(command.positionals[0]);
|
|
330
311
|
if (selected !== undefined) {
|
|
331
|
-
await
|
|
312
|
+
await installNamespaceContext(input.context.writeRoot ?? input.context.directory, selected);
|
|
332
313
|
const resolved = await resolveTaskNamespaceContext(input.context);
|
|
333
314
|
if (typeof resolved === "object" && "kind" in resolved) {
|
|
334
315
|
const result = { kind: "refused", refusal: resolved };
|
|
335
|
-
return
|
|
316
|
+
return emit(command.output, result, () => renderTaskContext(result, displayContext()), taskExitCode(result));
|
|
336
317
|
}
|
|
337
318
|
const result = { kind: "accepted", value: resolved };
|
|
338
|
-
return
|
|
319
|
+
return emit(command.output, result, () => renderTaskContext(result, displayContext()), taskExitCode(result));
|
|
339
320
|
}
|
|
340
321
|
const result = {
|
|
341
322
|
kind: "accepted",
|
|
342
323
|
value: { namespace: current ?? [], source: "default-root" },
|
|
343
324
|
};
|
|
344
|
-
return
|
|
325
|
+
return emit(command.output, result, () => renderTaskContext(result, displayContext()), taskExitCode(result));
|
|
345
326
|
}
|
|
346
327
|
case "compose": {
|
|
347
328
|
const result = await tasks.compose({
|
|
@@ -376,14 +357,14 @@ function refuseNamespace(command, refusal) {
|
|
|
376
357
|
case "blocked":
|
|
377
358
|
case "query": {
|
|
378
359
|
const action = command.action;
|
|
379
|
-
return
|
|
360
|
+
return emit(command.output, result, () => renderTaskList(action, listPresentation(command), result, displayContext()), taskExitCode(result));
|
|
380
361
|
}
|
|
381
362
|
case "add":
|
|
382
|
-
return
|
|
363
|
+
return emit(command.output, result, () => renderTaskMutation("add", result, displayContext()), taskExitCode(result));
|
|
383
364
|
case "context":
|
|
384
|
-
return
|
|
365
|
+
return emit(command.output, result, () => renderTaskContext(result, displayContext()), taskExitCode(result));
|
|
385
366
|
case "compose":
|
|
386
|
-
return
|
|
367
|
+
return emit(command.output, result, () => renderTaskFailure("compose", result, displayContext()), taskExitCode(result));
|
|
387
368
|
default:
|
|
388
369
|
throw new Error(`task action has no namespace refusal: ${command.action}`);
|
|
389
370
|
}
|
|
@@ -425,7 +406,7 @@ export async function runTaskCommand(command, coordinates, runtime) {
|
|
|
425
406
|
current = resolved.namespace;
|
|
426
407
|
if (command.action === "context" && command.positionals.length === 0) {
|
|
427
408
|
const result = { kind: "accepted", value: resolved };
|
|
428
|
-
return
|
|
409
|
+
return emit(command.output, result, () => renderTaskContext(result, displayContext()), taskExitCode(result));
|
|
429
410
|
}
|
|
430
411
|
}
|
|
431
412
|
if (command.action === "show")
|
|
@@ -15,7 +15,7 @@ export type CliCoordinates = Readonly<{
|
|
|
15
15
|
}>;
|
|
16
16
|
establishWorld: () => Promise<WorldRoot>;
|
|
17
17
|
}>;
|
|
18
|
-
|
|
18
|
+
type CliCoordinateInput = Readonly<{
|
|
19
19
|
processCwd?: string;
|
|
20
20
|
cwd?: string;
|
|
21
21
|
repo?: string;
|
|
@@ -35,7 +35,6 @@ export declare const cliCoordinateDiscovery: {
|
|
|
35
35
|
}>>;
|
|
36
36
|
resolve(input: CliCoordinateInput): Promise<CliCoordinates>;
|
|
37
37
|
};
|
|
38
|
-
export declare function resolveCliCoordinates(input: CliCoordinateInput): Promise<CliCoordinates>;
|
|
39
38
|
type InvocationCoordinatesInput = Readonly<{
|
|
40
39
|
processCwd?: string;
|
|
41
40
|
cwd?: string;
|
|
@@ -103,9 +103,6 @@ async function resolveWorld(cwd, repo) {
|
|
|
103
103
|
throw error;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
export async function resolveCliCoordinates(input) {
|
|
107
|
-
return cliCoordinateDiscovery.resolve(input);
|
|
108
|
-
}
|
|
109
106
|
/** One explicit Git executable override from the process edge; a blank value is usage, not absence. */
|
|
110
107
|
function gitPathFromEdge(environment) {
|
|
111
108
|
const value = environment.KEIYAKU_GIT_PATH;
|
|
@@ -118,7 +115,7 @@ function gitPathFromEdge(environment) {
|
|
|
118
115
|
/** The one process-edge coordinate resolution: explicit filesystem inputs plus the command's Repo policy. */
|
|
119
116
|
export async function resolveInvocationCoordinates(invocation, environment) {
|
|
120
117
|
const gitPath = gitPathFromEdge(environment);
|
|
121
|
-
return
|
|
118
|
+
return cliCoordinateDiscovery.resolve({
|
|
122
119
|
...(invocation.processCwd === undefined ? {} : { processCwd: invocation.processCwd }),
|
|
123
120
|
...(invocation.cwd === undefined ? {} : { cwd: invocation.cwd }),
|
|
124
121
|
...(invocation.repo === undefined ? {} : { repo: invocation.repo }),
|
package/build/src/cli/parse.d.ts
CHANGED
|
@@ -6,13 +6,12 @@ import { type ContractCommand as Command } from "./commands/contract-help.js";
|
|
|
6
6
|
import { type CliUsageGuide } from "./usage.js";
|
|
7
7
|
export { CliUsageError } from "./usage.js";
|
|
8
8
|
export type { CliUsageGuide } from "./usage.js";
|
|
9
|
-
export { renderContractHelp } from "./commands/contract-help.js";
|
|
10
9
|
export type { Command };
|
|
11
10
|
export declare function renderRootHelp(columns?: number): string;
|
|
12
11
|
export declare function usageGuideForCommand(command: ParsedCommand): CliUsageGuide;
|
|
13
12
|
export declare function renderHelp(coordinate: CliHelpCoordinate, columns?: number): string;
|
|
14
13
|
export type ParsedCommand = ParsedBind | ParsedAmend | ParsedDeliver | ParsedReview | ParsedArc | ParsedAbandon | ParsedStatus | ParsedLs | ParsedAudit | ParsedReconcile | ParsedNuke | ParsedSettings | ParsedRegion | ParsedInstallCommand | ParsedAkumaCommand | ParsedTaskCommand;
|
|
15
|
-
|
|
14
|
+
type CliHelpCoordinate = Readonly<{
|
|
16
15
|
kind: "root";
|
|
17
16
|
}> | Readonly<{
|
|
18
17
|
kind: "contract";
|
|
@@ -37,7 +36,7 @@ export type ParsedInvocation = Readonly<{
|
|
|
37
36
|
version: true;
|
|
38
37
|
}>;
|
|
39
38
|
type RepoUse = "none" | "optional" | "required";
|
|
40
|
-
|
|
39
|
+
type CommandRepoPolicy = Readonly<{
|
|
41
40
|
use: RepoUse;
|
|
42
41
|
acceptsExplicit: boolean;
|
|
43
42
|
}>;
|
package/build/src/cli/parse.js
CHANGED
|
@@ -4,9 +4,9 @@ import { INSTALL_ROOT_PURPOSE, INSTALL_USAGE, parseInstallCommand, renderInstall
|
|
|
4
4
|
import { parseContractCommand, } from "./commands/contract-grammar.js";
|
|
5
5
|
import { CONTRACT_COMMAND_SPECS, renderContractHelp as renderContractHelpForOwner, } from "./commands/contract-help.js";
|
|
6
6
|
import { renderOpaqueBlock, renderTextBlock } from "./render/terminal.js";
|
|
7
|
+
import { scanArgs } from "./scan.js";
|
|
7
8
|
import { CliUsageError, commandGuide, isBlankInput, ROOT_USAGE_GUIDE, unknownCommandGuide, } from "./usage.js";
|
|
8
9
|
export { CliUsageError } from "./usage.js";
|
|
9
|
-
export { renderContractHelp } from "./commands/contract-help.js";
|
|
10
10
|
const ROOT_USAGE = [
|
|
11
11
|
"usage keiyaku <command> [options]",
|
|
12
12
|
" keiyaku <command> --help shows that command's complete usage",
|
|
@@ -140,63 +140,14 @@ export function assertExplicitRepoUse(command, repo) {
|
|
|
140
140
|
function refuse(command, message) {
|
|
141
141
|
throw new CliUsageError(message, commandGuide(command, CONTRACT_COMMAND_SPECS[command].usage));
|
|
142
142
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
const token = argv[index];
|
|
152
|
-
const name = token.slice(2);
|
|
153
|
-
const spec = CONTRACT_COMMAND_SPECS[command];
|
|
154
|
-
const kind = spec.flags[name];
|
|
155
|
-
if (kind === undefined)
|
|
156
|
-
refuse(command, `option ${token} is not valid for ${command}`);
|
|
157
|
-
if (state.flags[name] !== undefined && kind !== "repeat-value")
|
|
158
|
-
refuse(command, `duplicate option: ${token}`);
|
|
159
|
-
if (kind === "boolean") {
|
|
160
|
-
state.flags[name] = true;
|
|
161
|
-
return index;
|
|
162
|
-
}
|
|
163
|
-
const value = argv[index + 1];
|
|
164
|
-
if (value === undefined || value.startsWith("--"))
|
|
165
|
-
refuse(command, `${token} requires a value`);
|
|
166
|
-
if (kind !== "raw-value" && value === "-") {
|
|
167
|
-
refuse(command, `${token} requires a value`);
|
|
168
|
-
}
|
|
169
|
-
if (kind !== "raw-value" && isBlankInput(value))
|
|
170
|
-
refuse(command, `${token} requires a nonblank value`);
|
|
171
|
-
if (kind === "repeat-value") {
|
|
172
|
-
const values = state.flags[name];
|
|
173
|
-
state.flags[name] = [...(Array.isArray(values) ? values : values === undefined ? [] : [values]), value];
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
state.flags[name] = value;
|
|
177
|
-
}
|
|
178
|
-
return index + 1;
|
|
179
|
-
}
|
|
180
|
-
function scanContractTokens(command, argv, state) {
|
|
181
|
-
let positionalOnly = false;
|
|
182
|
-
for (let index = 1; index < argv.length; index += 1) {
|
|
183
|
-
const token = argv[index];
|
|
184
|
-
if (!positionalOnly && token === "--") {
|
|
185
|
-
positionalOnly = true;
|
|
186
|
-
continue;
|
|
187
|
-
}
|
|
188
|
-
if (!positionalOnly && token === "-") {
|
|
189
|
-
scanStdin(command, state);
|
|
190
|
-
continue;
|
|
191
|
-
}
|
|
192
|
-
if (!positionalOnly && token.startsWith("--")) {
|
|
193
|
-
index = scanOption(command, argv, state, index);
|
|
194
|
-
continue;
|
|
195
|
-
}
|
|
196
|
-
if (isBlankInput(token))
|
|
197
|
-
refuse(command, `${command} requires a nonblank value`);
|
|
198
|
-
state.positionals.push(token);
|
|
199
|
-
}
|
|
143
|
+
/** The contract surfaces' one scan spec: `-` carries the edge's own stdin input. */
|
|
144
|
+
function contractScanSpec(command, spec) {
|
|
145
|
+
return {
|
|
146
|
+
subject: command,
|
|
147
|
+
flags: spec.flags,
|
|
148
|
+
...(spec.stdin === "none" ? {} : { stdin: "input" }),
|
|
149
|
+
stdinRefusal: `${command} reads no stdin`,
|
|
150
|
+
};
|
|
200
151
|
}
|
|
201
152
|
function scanArgv(argv) {
|
|
202
153
|
const candidate = argv[0];
|
|
@@ -205,20 +156,27 @@ function scanArgv(argv) {
|
|
|
205
156
|
}
|
|
206
157
|
const command = candidate;
|
|
207
158
|
const spec = CONTRACT_COMMAND_SPECS[command];
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
if (spec.positional === "none" &&
|
|
159
|
+
const scanned = scanArgs(argv, contractScanSpec(command, spec), (message) => refuse(command, message));
|
|
160
|
+
const stdin = scanned.stdin !== undefined;
|
|
161
|
+
if (spec.positional === "none" && scanned.positionals.length > 0) {
|
|
211
162
|
refuse(command, `${command} accepts no contract`);
|
|
212
163
|
}
|
|
213
|
-
if (spec.positional === "optional" &&
|
|
164
|
+
if (spec.positional === "optional" && scanned.positionals.length > 1 && command !== "status") {
|
|
214
165
|
refuse(command, `${command} accepts at most one contract`);
|
|
215
166
|
}
|
|
216
|
-
if (spec.stdin === "required" && !
|
|
167
|
+
if (spec.stdin === "required" && !stdin) {
|
|
217
168
|
refuse(command, `${command} requires stdin`);
|
|
218
169
|
}
|
|
219
|
-
const output =
|
|
220
|
-
const actor = typeof
|
|
221
|
-
return {
|
|
170
|
+
const output = scanned.flags.json === true ? "json" : "text";
|
|
171
|
+
const actor = typeof scanned.flags.actor === "string" ? scanned.flags.actor : undefined;
|
|
172
|
+
return {
|
|
173
|
+
command,
|
|
174
|
+
flags: scanned.flags,
|
|
175
|
+
positionals: scanned.positionals,
|
|
176
|
+
stdin,
|
|
177
|
+
output,
|
|
178
|
+
...(actor === undefined ? {} : { actor }),
|
|
179
|
+
};
|
|
222
180
|
}
|
|
223
181
|
function invocationOptions(argv) {
|
|
224
182
|
let cwd;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { LiveStatusObservation } from "../../akuma/akuma-observe.js";
|
|
2
2
|
import type { TellResult } from "../../akuma/body.js";
|
|
3
3
|
import type { AkuId } from "../../akuma/identity.js";
|
|
4
|
-
import type { AkumaAskResult, AkumaKillResult,
|
|
4
|
+
import type { AkumaAskResult, AkumaKillResult, AkumaTellResult } from "../../akuma/selection-observation.js";
|
|
5
5
|
import type { CallWaitHead, ForkResult } from "../../index.js";
|
|
6
6
|
import type { CallResult } from "../../library/akuma-creation.js";
|
|
7
7
|
import type { AkumaHistoryResult } from "../../library/selection.js";
|
|
8
8
|
import { type ObservedCallHead } from "./akuma-activity.js";
|
|
9
9
|
import { type TextRenderContext } from "./terminal.js";
|
|
10
|
-
|
|
10
|
+
type AskProgress = Readonly<{
|
|
11
11
|
admitted: (tell: TellResult, id: AkuId) => readonly string[];
|
|
12
12
|
observe: (observation: LiveStatusObservation) => readonly string[];
|
|
13
13
|
frame: () => readonly string[];
|
|
@@ -21,20 +21,6 @@ export declare function callObservationHead(input: Readonly<{
|
|
|
21
21
|
akuma: string;
|
|
22
22
|
}> & CallWaitHead): ObservedCallHead;
|
|
23
23
|
export declare function renderCallText(result: CallResult, streamed: boolean, context: TextRenderContext): string;
|
|
24
|
-
export declare function renderWaitText(result: AkumaWaitResult, presentation: Readonly<{
|
|
25
|
-
alias?: string;
|
|
26
|
-
startedAt?: number;
|
|
27
|
-
selection?: readonly import("./akuma-activity.js").WaitSelectedIdentity[];
|
|
28
|
-
}>, context?: TextRenderContext): string;
|
|
29
|
-
export declare function renderStatusText(status: AkumaObservation, alias: string | undefined, context?: TextRenderContext): string;
|
|
30
|
-
export declare function renderTellText(result: AkumaTellResult, alias: string | undefined, context?: TextRenderContext, options?: Readonly<{
|
|
31
|
-
identity?: boolean;
|
|
32
|
-
}>): string;
|
|
33
|
-
export declare function renderHistoryText(result: AkumaHistoryResult, presentation: Readonly<{
|
|
34
|
-
alias?: string;
|
|
35
|
-
id?: string;
|
|
36
|
-
last?: boolean;
|
|
37
|
-
}>, context?: TextRenderContext): string;
|
|
38
24
|
export declare function renderForkText(receipt: ForkResult): string;
|
|
39
25
|
export declare function renderKillText(result: AkumaKillResult, alias: string | undefined, context: TextRenderContext): string;
|
|
40
26
|
export declare function callExitCode(result: CallResult): number;
|
|
@@ -43,3 +29,4 @@ export declare function tellExitCode(result: AkumaTellResult): number;
|
|
|
43
29
|
export declare function askExitCode(result: AkumaAskResult): number;
|
|
44
30
|
export declare function forkExitCode(receipt: ForkResult): number;
|
|
45
31
|
export declare function historyExitCode(result: AkumaHistoryResult, id: string | undefined): number;
|
|
32
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { associatedIdentity, inputWaitStream, killResultText, snapshotHeading, tellText, } from "./akuma-activity.js";
|
|
2
2
|
import { safeText } from "./terminal.js";
|
|
3
3
|
export function askProgressStream(akuma, alias, context) {
|
|
4
4
|
let target = akuma;
|
|
@@ -94,18 +94,6 @@ export function renderCallText(result, streamed, context) {
|
|
|
94
94
|
...(inputObservation.completedAt === undefined ? {} : { completedAt: inputObservation.completedAt }),
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
export function renderWaitText(result, presentation, context = DEFAULT_CONTEXT) {
|
|
98
|
-
return waitText(result, presentation, context);
|
|
99
|
-
}
|
|
100
|
-
export function renderStatusText(status, alias, context = DEFAULT_CONTEXT) {
|
|
101
|
-
return snapshotText(status, context, ...(alias === undefined ? [{}] : [{ alias }]));
|
|
102
|
-
}
|
|
103
|
-
export function renderTellText(result, alias, context = DEFAULT_CONTEXT, options = {}) {
|
|
104
|
-
return tellText(result, alias, context, options);
|
|
105
|
-
}
|
|
106
|
-
export function renderHistoryText(result, presentation, context = DEFAULT_CONTEXT) {
|
|
107
|
-
return historyText(result, presentation, context);
|
|
108
|
-
}
|
|
109
97
|
export function renderForkText(receipt) {
|
|
110
98
|
if (receipt.kind !== "forked") {
|
|
111
99
|
if (receipt.kind === "unknown-history")
|
|
@@ -110,7 +110,7 @@ function targetLines(report, columns, addressed, abbreviations) {
|
|
|
110
110
|
}
|
|
111
111
|
function obligationLines(result, columns) {
|
|
112
112
|
return [
|
|
113
|
-
...executionCleanupLines(effectCleanup(result.effects)
|
|
113
|
+
...executionCleanupLines(effectCleanup(result.effects), columns, result.contract),
|
|
114
114
|
...executionStopLines(effectExecutionStops(result.effects), columns),
|
|
115
115
|
];
|
|
116
116
|
}
|