/** * Response shapes for the `/api/v1/error-watchers` REST routes consumed by the * `hula error-watcher` command. * * These mirror the server's `toPublicWatcher()` output and include ONLY the * fields the API actually returns — in particular NO `tokenHash`, * `secretEncrypted`, `githubTokenEncrypted`, or `execParamsEncrypted`. * `errorEnvVars` and `secrets` live inside the encrypted exec params and are * likewise never echoed back, so they are write-only from the CLI's side. * * Note on credentials: the watcher no longer carries the credential the * reporting app presents. Ingest authenticates on a PROJECT ingest key * (`hik_…`) with its own signing secret (`his_…`), managed over tRPC from the * dashboard settings page. The `hew_`/`hes_` pair the create endpoint still * returns verifies nothing, so no type here models it. */ /** The disposition of a single ingested error event. */ export type ErrorEventStatus = 'pending' | 'launched' | 'deduped' | 'skipped_environment' | 'skipped_budget' | 'skipped_credits' | 'skipped_open_pr' | 'failed'; export type ErrorWatcherOutcomeType = 'pr' | 'plan' | 'feedback'; export type ErrorWatcherPrPolicy = 'always' | 'skip-if-open' | 'close-previous'; export interface ErrorWatcher { id: string; projectId: string; name: string; /** * First 8 chars of the vestigial watcher token. Retained because the server * still returns it, but it identifies nothing — ingest resolves the watcher * from the API key's project. Not displayed by the CLI. */ tokenPrefix?: string; dedupeWindowSeconds: number; maxFixesPerDay: number; environments: string[]; outcomeType: ErrorWatcherOutcomeType; prPolicy: ErrorWatcherPrPolicy; enabled: boolean; /** * Trusted guidance rendered into the fix agent's brief. Set only through the * authenticated CRUD API, never from a webhook body — which is exactly why * the agent is permitted to follow it. */ instructions?: string | null; createdAt: string; lastEventAt?: string | null; } /** * Write-only watcher fields. Both are encrypted at rest and absent from every * read response, and each PATCH replaces the stored value wholesale. */ export interface ErrorWatcherWriteOnlyFields { /** Env vars injected into the fix sandbox. Separate from launch `extraEnv`. */ errorEnvVars?: Record; /** Extra literal values redacted from every payload for this watcher. */ secrets?: string[]; } export interface ErrorEvent { id: string; fingerprint: string; dedupeKey?: string | null; environment: string; release?: string | null; occurrenceCount: number; redactionCount: number; status: ErrorEventStatus; skipReason?: string | null; actionRunId?: string | null; createdAt: string; launchedAt?: string | null; /** Attached client-side when `--events` fans out across several watchers. */ watcherName?: string; } //# sourceMappingURL=errorWatcher.schema.d.ts.map