Add full shell, replaceable Omics adapter and bilingual interaction
Implement approved specification #32 and tickets #33-#37. Keep host authentication server-verified and pin session interaction language. Compile scoped base selectors for browser compatibility and retain full gutters during CSS pruning.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Type } from "typebox";
|
||||
|
||||
export function installRepairGate(pi, { workflow, memory, waitForReviewer, toTextResult }) {
|
||||
export function installRepairGate(pi, { workflow, memory, waitForReviewer, toTextResult, languageFor, gateText }) {
|
||||
pi.registerTool({
|
||||
name: "reviewer_archive_repair",
|
||||
label: "Resolve Memory / Evidence conflict",
|
||||
@@ -26,6 +26,7 @@ export function installRepairGate(pi, { workflow, memory, waitForReviewer, toTex
|
||||
try {
|
||||
if (!!params.repair_id === !!params.proposal)
|
||||
return toTextResult("Supply either a new proposal or an existing repair_id.");
|
||||
const locale = languageFor(ctx, params.session);
|
||||
const run = args => JSON.parse(memory.execute(ctx,
|
||||
[...args, "--session", params.session, "--json"]));
|
||||
let repair = params.repair_id
|
||||
@@ -36,7 +37,9 @@ export function installRepairGate(pi, { workflow, memory, waitForReviewer, toTex
|
||||
const response = await waitForReviewer(ctx, {
|
||||
id: `u${Date.now()}`, schema_version: 1,
|
||||
phase: workflow.phase(ctx, params.session).id,
|
||||
widget: "archive-repair", title: "Resolve archive conflict",
|
||||
widget: "archive-repair", title: gateText(locale, "archiveRepair"),
|
||||
title_i18n: gateText("en", "archiveRepair"),
|
||||
...(error ? { error_i18n: gateText("en", "repairError") } : {}),
|
||||
repair, error, reserved: ["other", "back", "exit"],
|
||||
});
|
||||
if (response.control) return toTextResult(response.control === "freetext"
|
||||
@@ -62,7 +65,7 @@ export function installRepairGate(pi, { workflow, memory, waitForReviewer, toTex
|
||||
return toTextResult("All repair proposals were rejected as inadequate. " +
|
||||
"No archive was changed. Reformulate the options for the reviewer.");
|
||||
} catch (failure) {
|
||||
error = "The correction could not complete. Review the current archive state before retrying.";
|
||||
error = gateText(locale, "repairError");
|
||||
repair = run(["repair-show", "--repair-id", repair.repair_id]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user