mirror of
https://github.com/morluto/rea.git
synced 2026-12-03 13:41:17 -05:00
a989c0e458
Declare logical Evidence sources once and resolve exact retained inputs through shared application workflows across 20 composition tools. Preserve domain-owned authentication, source closure, caller choices, coverage and resource admission. Validation includes public CLI/MCP regressions, local Codex terra/high trials and fresh-import real-artifact workflows. Measurements, failed attempts and coverage limits are recorded in docs/verification/evidence-input-composition-2026-10-31.md. Fixes #8293. Fixes #8281. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
54 lines
1.9 KiB
TypeScript
54 lines
1.9 KiB
TypeScript
import { z } from "incur";
|
|
|
|
import { projectManagedApplicationGraphEvidence } from "../application/managed/ManagedApplicationGraphService.js";
|
|
import { CLI_COMMANDS } from "../cliCommandNames.js";
|
|
import { parseCliJsonInput } from "../cliJsonInput.js";
|
|
import { logCliCommand } from "../cliLogging.js";
|
|
import { projectCliAnalysisResult } from "./projectCliAnalysisResult.js";
|
|
import { withCommandCancellation } from "./commandCancellation.js";
|
|
import {
|
|
evidenceBundleOption,
|
|
runEvidenceInputCommand,
|
|
} from "./evidenceInputCommand.js";
|
|
import type { Logger } from "pino";
|
|
import type { CliInstance } from "./types.js";
|
|
|
|
/** Register managed static-Evidence application graph projection. */
|
|
export const registerProjectManagedApplicationGraph = (
|
|
cli: CliInstance,
|
|
logger: Logger,
|
|
): void => {
|
|
cli.command(CLI_COMMANDS.projectManagedApplicationGraph, {
|
|
description:
|
|
"Project authenticated managed static Evidence into an application graph",
|
|
args: z.object({
|
|
inputJson: z
|
|
.string()
|
|
.describe("Inline managed application graph JSON or JSON file path"),
|
|
}),
|
|
options: z.object({ evidenceBundle: evidenceBundleOption }),
|
|
run: ({ args, options }) =>
|
|
withCommandCancellation((signal) =>
|
|
logCliCommand(logger, "project-managed-application-graph", async () => {
|
|
const input = await parseCliJsonInput(
|
|
args.inputJson,
|
|
"project-managed-application-graph",
|
|
signal,
|
|
);
|
|
if (!input.ok) return input.error;
|
|
return runEvidenceInputCommand(
|
|
"project_managed_application_graph",
|
|
options.evidenceBundle,
|
|
signal,
|
|
(lookup) =>
|
|
Promise.resolve(
|
|
projectManagedApplicationGraphEvidence(input.value, lookup, {
|
|
signal,
|
|
}),
|
|
),
|
|
).then(projectCliAnalysisResult);
|
|
}),
|
|
),
|
|
});
|
|
};
|