// Generated MSP wire declarations, bundled into the published package. // // Copied verbatim from `schema/msp/msp.d.ts` at pack time by // `scripts/bundle-msp-types.mjs`. Do not edit, and do not commit: this file // exists only in build output, so the repo keeps one copy of the generated // artifact (spec 14990 INV-008) while the tarball stays self-contained. // Muse Session Protocol (MSP) v1 TypeScript declarations. // STABLE surface only; experimental twin: experimental/msp.d.ts. // Generated by tbh-protocol (spec 206) from the same schema model as // the JSON Schema bundle (INV-017). Do not edit by hand. /** The policy rule a decision created, in display form; the full rule is not included. */ export interface ApprovalAmendment { /** How long the rule lasts: `session` or `localPersistent`. */ durability: ApprovalAmendmentDurability; /** A human-readable preview of the rule, for display. */ rulePreview: string; } /** How long a rule created by an approval decision lasts. The set is open, so newer hosts may send other values. */ export type ApprovalAmendmentDurability = "session" | "localPersistent" | (string & {}); /** The change an `approval/updated` event reports. `kind` says what happened, and only the fields for that kind are present. */ export interface ApprovalChange { /** The `choiceId` that satisfied the stage. Present only when `kind` is `stageResolved`. */ choiceId?: string; /** The decision the chosen option applied to the stage. Present only when `kind` is `stageResolved`. */ decision?: ApprovalDecision; /** A recovery detail: whether the action could run without a new decision. Present only when `kind` is `restartRecovered`. */ executable?: boolean; /** What happened: for example `stageResolved` (a shell stage was satisfied), `policyPersistence` (saving a rule succeeded or failed), `reviewStarted` or `reviewCompleted` (the automated LLM judge started or finished reviewing), `restartRecovered` (a host restart recovered this approval: either the host first resolves it `abort` and a re-ask comes as a new approval with a new `approvalId`, or it stays pending under the same `approvalId` with refreshed choices) or `alreadyTerminal` (recovery found it already decided). The set is open, so newer hosts may add kinds. */ kind: string; /** Why saving the policy rule failed, as human-readable text. Present only when `kind` is `policyPersistence` and `status` is `failed`. */ reason?: string; /** A recovery detail: whether the command was re-parsed during recovery. Present only when `kind` is `restartRecovered`. */ reparsed?: boolean; /** The stage requirement that was satisfied. Present only when `kind` is `stageResolved`. */ requirementId?: ApprovalRequirementRef; /** Whether saving the policy rule succeeded or failed; present only when `kind` is `policyPersistence`. A failure does not undo the decision; only the saved rule is missing. */ status?: ApprovalPersistenceStatus; } /** One option the server offers for deciding an approval. Clients pick one and send its `choiceId` in `approval/decide`; they never build their own. */ export interface ApprovalChoice { /** `true` when this choice takes optional `feedback` text in `approval/decide`, which reaches the model as guidance. Omitted when `false`. */ acceptsFeedback?: boolean; /** The id to send as `choiceId` in `approval/decide`. The set of ids is open, so show `label` and do not base behavior on specific ids. */ choiceId: string; /** The decision this choice applies, so a client can act on approve or reject without knowing choice ids. */ decision: ApprovalDecision; /** The human-readable label to show for this choice. */ label: string; /** A human-readable preview of what this choice grants, such as the policy rule it would create; show it exactly as given. */ rulePreview?: string; /** The grant duration this choice declares: `once` (this request only), `session` (the rest of the session) or `localPersistent` (saved in the local policy store). */ scope: ApprovalChoiceScope; } /** How long a grant made by a choice lasts. The set is open, so newer hosts may send other values. */ export type ApprovalChoiceScope = "once" | "session" | "localPersistent" | (string & {}); /** One Computer Use card's facts. Empty collections and absent rows are omitted, never `null`. */ export interface ApprovalCuaCardFacts { /** For a browser, the host of the window's current page. */ page?: ApprovalCuaPage; /** Only the consequential steps, in call order. */ steps?: ApprovalCuaStep[]; /** The target window's title: the app's own text, which a page can set; a client shows it quoted and as plain text, never as markup or a choice, and may cap it. */ windowTitle?: string; } /** The page's full host, no path or query. */ export interface ApprovalCuaPage { /** The host in Unicode. */ host: string; /** The host's `xn--` form; equal to `host` when they don't differ. */ hostAscii: string; } /** A point in the model's 0–1000 coordinates. */ export interface ApprovalCuaPoint { x: number; y: number; } /** One consequential step. A client renders "Step N: "