/** * crew#899: a chat reads the REGISTERED checkout, and nothing refreshed it — runs base on the * fetched `origin/`, so a run saw current code while an Ask about the same repo searched a * tree 174 commits behind and timed out. When a chat opens, each repository in its scope is brought * to its upstream the way `git pull --ff-only` would, and only when that is safe: the root is the * checkout's own top level, the branch tracks an upstream, the working tree has no tracked changes * and the branch has no commits of its own. Anything else is left exactly as it is and DISCLOSED in * the scope statement (how far behind, and why it was not refreshed), so an answer is never * silently stale. */ import type { ChatCheckoutFreshness } from '../core/types.js'; /** What opening a chat found (and did) for one repository's checkout. */ export type CheckoutFreshness = ChatCheckoutFreshness /** Not a git checkout we can judge (no upstream, not the top level, git missing): nothing said. */ | { state: 'unknown'; }; export type FreshenCheckout = (root: string) => Promise; /** A fetch per repository, bounded: a chat open must not hang on a slow remote. */ export declare const CHAT_FETCH_TIMEOUT_MS = 20000; type Git = (root: string, args: string[], timeoutMs?: number) => Promise; /** * The env a chat-open git call runs with: it must never ask anyone anything (codex retro on * crew#902). `GIT_TERMINAL_PROMPT=0` stops only the terminal prompt; an inherited `GIT_ASKPASS`, a * GUI credential manager or an ssh passphrase prompt could still pop up on the operator's desktop * and hold the chat open until the fetch timeout. So askpass answers nothing (`true`), Git * Credential Manager is told never to interact, and ssh runs in batch mode, keeping an operator's * own `GIT_SSH_COMMAND` and adding the option to it. A fetch that needs a credential then fails at * once, and the chat says the checkout could not be fetched. */ export declare function nonInteractiveGitEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv; /** Bring one clean checkout to its upstream, or say why not. Never throws. */ export declare function freshenCheckout(root: string, git?: Git): Promise; /** The scope-statement clause for a repository's freshness; `''` when there is nothing to say. */ export declare function freshnessClause(f: CheckoutFreshness | undefined): string; export {}; //# sourceMappingURL=chat-freshness.d.ts.map