Complete six-command Epiphany operator surface

This commit is contained in:
Meta Vens 2026-07-19 15:01:28 +01:00
commit 329e33bda0
6 changed files with 173 additions and 12 deletions

View file

@ -155,6 +155,21 @@ export const commandDefinitions = [
.setRequired(true)
.setMaxLength(2000),
),
)
.addSubcommand((command) =>
command.setName("reviews").setDescription("List bounded identities of current Mind review candidates."),
)
.addSubcommand((command) =>
command
.setName("review")
.setDescription("Commit a disposition for one exact current Mind candidate.")
.addStringOption((option) => option.setName("mind-request-id").setDescription("Exact Mind request identity.").setRequired(true).setMaxLength(256))
.addStringOption((option) => option.setName("candidate-id").setDescription("Exact candidate identity.").setRequired(true).setMaxLength(256))
.addStringOption((option) => option.setName("candidate-sha256").setDescription("Exact candidate SHA-256 hex digest.").setRequired(true).setMinLength(64).setMaxLength(64))
.addIntegerOption((option) => option.setName("model-revision").setDescription("Expected canonical model revision.").setRequired(true).setMinValue(0))
.addStringOption((option) => option.setName("model-hash").setDescription("Expected canonical model SHA-256 hex hash.").setRequired(true).setMinLength(64).setMaxLength(64))
.addStringOption((option) => option.setName("decision").setDescription("Mind disposition.").setRequired(true)
.addChoices({ name: "Adopt", value: "adopt" }, { name: "Refuse", value: "refuse" }, { name: "Hold", value: "hold" })),
),
];
@ -170,6 +185,18 @@ export function epiphanyOperatorCommandFromInteraction(
return { kind: "wake" };
case "direct":
return { kind: "directive", objective: interaction.options.getString("objective", true) };
case "reviews":
return { kind: "reviews" };
case "review":
return {
kind: "review",
mindRequestId: interaction.options.getString("mind-request-id", true),
candidateId: interaction.options.getString("candidate-id", true),
candidateSha256: interaction.options.getString("candidate-sha256", true),
expectedModelRevision: interaction.options.getInteger("model-revision", true),
expectedModelHash: interaction.options.getString("model-hash", true),
decision: interaction.options.getString("decision", true) as "adopt" | "refuse" | "hold",
};
default:
throw new Error("Unsupported Epiphany operator subcommand.");
}