/** * One clear attempt's terminal answer: `cleared` (the durable slot no longer * carries an execution binding), `no-binding` (nothing to clear — the session * holds no adopted execution binding), or `refused` with the store's own * reason (an unreadable/cwd-mismatched record or a refused write is never * reported as a clear). */ export type ExecutionClearOutcome = { kind: 'cleared'; } | { kind: 'no-binding'; } | { kind: 'refused'; reason: string; }; /** * Clear the calling session's own durable execution binding — the validation * and adoption internals the native `mstar_execution_clear` tool imports, * replacing the removed slash command's `clear` arm. The order replicates the * slash clear, with one explicit no-op guard the tool turns into its named * refusal: * * 1. the durable record must be READABLE for this exact `(sessionId, cwd)` — * an unreadable or cwd-mismatched record is a refusal, never a blind write * against an untrusted slot; * 2. a record WITHOUT a durable `executionBinding` has nothing to clear — * reported instead of writing an empty row; * 3. the active-set source read supplies the optional `selectedGeneration` * (the observed store id + epoch) exactly as the slash arm computed it — * absent when the source read is unavailable — so the durable-selection * rung validates the clear against the generation this call observed. * * `clearExecutionBinding` itself preserves the user selection and merges the * exclusion floor by max; a refused write comes back as `refused` with the * store's reason. */ export declare function clearExecutionSessionBinding(harnessDir: string, sessionId: string, cwd: string): Promise;