/** * Why an auto-answer was withheld. * * `deny-pattern-unusable` is the fail-closed case: a deny pattern that cannot be * evaluated (unsafe, unparseable, or over-long) suppresses instead of being * skipped. Ignoring it would silently drop the protection the contract author * asked for, which is the more dangerous of the two directions. Issue #3881: * also when the patterns could only be run against part of the request — the * approval target was cut at its line cap, or at the top of a capture that * filled its window (`approvalTargetCompleteness`), and none matched the part * that was read; that case carries no `pattern`. */ export type AutoYesSuppressionReason = 'mode-off' | 'deny-pattern' | 'deny-pattern-unusable' | 'type-not-allowed' /** * Issue #3822: the contract governing the instance could not be read (the * database lookup threw), so nothing it says was evaluated. Not "no contract": * a contract stating `off` or deny patterns may be there, so the answer is * withheld — the poller sends no key and the `PermissionRequest` hook does not * allow. Re-evaluated on every tick (the failure is not cached), so it clears * once the lookup succeeds. */ | 'policy-lookup-failed' /** * Issue #1829: not a policy verdict at all, but the same outcome recorded * through the same channel. The prompt on screen is a CLI-lifecycle dialog * whose answer belongs to the tool's own launch sequence, so the poller * withheld one. Listed here so `capture --json` / `cmate wait` can name it * instead of showing a session that has silently gone quiet. */ | 'agent-launch-dialog' /** * Issue #1924 (§4 D1 decision 4): the generic estimator read a numbered list * on the frame and the tool's own dialog detector did not vouch for it, so * nothing was sent. * * Also not a policy verdict. It is the reason code for the one position that * can stop #1896 — an agent quoting a numbered list in its *answer* and * Auto-Yes replying `1` to the prose. `detectPrompt`'s generic estimate is * true on that frame and the tool-specific `detectDialog` is false, and this * names the gap instead of letting the session go quiet with no record. * * Declared in Phase 1 (Issue #1924) and recorded from Phase 3, when the * tool-specific detectors that can disagree with the estimator exist. */ | 'unclassified-frame' /** * Issue #3706: Auto-Yes stopped an answer after some of its keys reached the * pane (a `y` whose Enter was withheld), and leaves the prompt to a human * rather than type over what is in the input. Recorded through the same * `lastSuppression` channel so the prompt Push and `cmate wait` read "withheld" * instead of "Auto-Yes is answering". Not a policy verdict either: the * resolver and the hooks never produce it, only the poller does (Issue #3713 * made it a member, with its own wording in `cmate wait`'s `SUPPRESSION_CAUSE`). */ | 'partial-answer' /** * Issue #3757: agy's startup folder-trust screen (`Do you trust the contents * of this project?`) is on the pane. It belongs to the launch sequence — * `AntigravityTool.waitForReady` confirms it, or, when agy drew it after that * window ended, the next send's readiness wait does — and it is unnumbered, so * the poller cannot read it as a prompt at all. Recorded so the prompt Push * does not hold the wait as "Auto-Yes is answering" and `cmate wait` names * the screen instead of a session that has gone quiet. */ | 'startup-trust-unhandled' /** * Issue #3748: an `AskUserQuestion` confirm page (`1. Submit` / `2. Cancel` * on Command Code, `1. Submit answers` / `2. Cancel` on Claude) is on the * pane. `Submit` picks nothing — it commits whatever stands as the answers — * so Auto-Yes leaves it to a human (`polling/auto-yes-confirm-page`). Until * #3748 Command Code's page (#3497) was recorded as `unclassified-frame`, * whose wording in `cmate wait` says no detector recognised the frame — the * opposite of what happened. */ | 'question-confirm-page' /** * Issue #4313: Command Code's `AskUserQuestion` was declined in the turn on * screen (`└ User declined to answer questions`), and a prompt followed it. * The decline reaches the agent as "no answer", and it may go on with its own * recommendation; answering the permissions that follow would carry that * through as though the operator had approved it. So until the turn ends (a * later user row or the turn summary), Auto-Yes leaves every prompt to a * human. A decline in an earlier turn does not hold. */ | 'declined-question' /** * Issue #3822: a question the tool asks the operator (an `AskUserQuestion` * picker, OpenCode V2's question form) is on the pane. Auto-Yes answers * permissions only; the question is the human's, so nothing is sent. Not a * contract verdict — `allowPromptTypes` cannot bring it back. The confirm page * that follows a question keeps its own reason, `question-confirm-page`. */ | 'question-left-to-human' /** * Issue #3822: a permission dialog is on the pane, and no single row of it * reads as "allow this call once" (`polling/auto-yes-option-effect`): every * row saves a rule (`don't ask again`, `always allow`, `Persist to * settings.json`), changes the permission mode, or denies — or two rows read * as once. Auto-Yes answers the allow-once row only, by its number, so * nothing is sent. Returned by the resolver (the base rules, not the * contract), and re-evaluated on every tick. */ | 'allow-once-unidentified' /** * Issue #3863: a question is on the pane, Auto-Yes's answer mode is * `recommended` (answer questions with their recommended option), and which * option that is could not be told: an option whose title the reader could * not separate from its description, two or more options marked * `(Recommended)` / `(推奨)` / `(推奨)`, a chosen option that takes typed * text, or a multi-select question. Nothing is sent. Returned by the * resolver (the base rules, not the contract), and re-evaluated on every * tick. */ | 'recommended-option-unidentified' /** * Issue #3767: agy's approval dialog is on the pane but Auto-Yes has no * unused `PreToolUse` question to match it to (none ever, it appeared after * the window, it was already up, the hook stopped arriving, or — Issue #3789 — * the last one was spent on keys Auto-Yes sent — or, Issue #3796, began to * send and was cut short — and a dialog is still up past the grace), so it * is left to a human. Not a policy verdict; the poller * records it from the receipt gate. */ | 'no-hook-receipt'; /** * Issue #3796: the reasons `resolveAutoAnswerWithPolicy` returns — the contract's * verdict on the prompt as it is NOW, which a later tick re-evaluates, as * opposed to a reason that remembers an event (`partial-answer`). Issue #3822 * adds the base rules' one withholding, `allow-once-unidentified`, for the same * reason. */ export declare const CONTRACT_SUPPRESSION_REASONS: ReadonlySet; /** Issue #3822: the reason recorded when the contract lookup failed. */ export declare const POLICY_LOOKUP_FAILED_SUPPRESSION_REASON = "policy-lookup-failed"; /** Issue #3706: the reason the poller records for an answer stopped part-way. */ export declare const PARTIAL_ANSWER_SUPPRESSION_REASON = "partial-answer"; /** Issue #3757: the reason the poller records over agy's unanswered trust screen. */ export declare const STARTUP_TRUST_UNHANDLED_SUPPRESSION_REASON = "startup-trust-unhandled"; /** Issue #3748: the reason the poller records over an `AskUserQuestion` confirm page. */ export declare const QUESTION_CONFIRM_PAGE_SUPPRESSION_REASON = "question-confirm-page"; /** Issue #4313: the reason the poller records over a prompt that follows a question declined in the same turn. */ export declare const DECLINED_QUESTION_SUPPRESSION_REASON = "declined-question"; /** Issue #3822: the reason the poller records over a question the tool asks the operator. */ export declare const QUESTION_LEFT_TO_HUMAN_SUPPRESSION_REASON = "question-left-to-human"; /** * Issue #3822: the reasons `resolveAutoAnswerWithPolicy` returns from its base * rules, before the contract is read. Every other reason it returns is the * contract's verdict ({@link CONTRACT_SUPPRESSION_REASONS} holds both kinds: * both are verdicts on the prompt as it is now). A reader that tells the * operator what stopped the answer — the prompt observation, agy's withheld * log line — must not send them to the contract for one of these. */ export declare const BASE_RULE_SUPPRESSION_REASONS: ReadonlySet; /** Whether `reason` is the base rules' withholding rather than the contract's (Issue #3822). */ export declare function isBaseRuleSuppressionReason(reason: AutoYesSuppressionReason | string): boolean; /** Issue #3822: the reason the resolver returns over a permission dialog with no single allow-once row. */ export declare const ALLOW_ONCE_UNIDENTIFIED_SUPPRESSION_REASON = "allow-once-unidentified"; /** Issue #3863: the reason the resolver returns over a question whose recommended option could not be told. */ export declare const RECOMMENDED_OPTION_UNIDENTIFIED_SUPPRESSION_REASON = "recommended-option-unidentified"; /** Issue #3767: the reason the poller records over an agy dialog with no matching hook receipt. */ export declare const NO_HOOK_RECEIPT_SUPPRESSION_REASON = "no-hook-receipt"; //# sourceMappingURL=auto-yes-suppression-reason.d.ts.map