import type { RuntimeAction } from '../engine/runtime-action.js'; export declare const NATIVE_PORTABLE_STATE_SCHEMA: "comet.native.v4"; export declare const NATIVE_PORTABLE_HISTORY_LIMIT: 50; export type NativePortablePhase = 'shape' | 'build' | 'verify' | 'archive'; export type NativePortableStatus = 'active' | 'await-user' | 'blocked' | 'done'; export declare const NATIVE_SUPERVISOR_COORDINATION_MODES: readonly ["multi-session", "single-session"]; export type NativeSupervisorCoordinationMode = (typeof NATIVE_SUPERVISOR_COORDINATION_MODES)[number]; export type NativePortableVerificationResult = 'pending' | 'pass' | 'fail' | 'blocked'; export type NativePortableLoopStopReason = 'budget' | 'stalled'; export type NativePortableVerificationAssurance = 'host-attested' | 'self-reviewed' | 'skill-coordinated' | 'semantic-verification-unavailable' | 'user-confirmed-degraded'; export type NativePortableAcceptanceResult = 'pending' | 'passed' | 'failed' | 'blocked'; export type NativePortableHistoryOutcome = 'pass' | 'fail' | 'blocked' | 'execution-error' | 'recovery'; export interface NativePortableText { text: string; truncated: boolean; } export interface NativePortableSpecChange { capability: string; operation: 'create' | 'modify' | 'remove'; source: string | null; /** Optional v1 delta manifest for cumulative capability Specs. */ delta_source?: string; /** The canonical total-Spec hash bound by the delta manifest at Shape. */ base_hash?: string | null; } export interface NativePortableWorkspace { isolation: 'current' | 'branch' | 'worktree'; change_branch: string | null; target_branch: string | null; finish: 'merge' | 'push' | 'pull-request' | 'keep' | null; } export interface NativePortableLoopState { stage: 'shape' | 'building' | 'verify-ready' | 'repairing' | 'archive-ready' | 'await-user' | 'blocked' | 'done'; goal_cycle: number; iteration: number; attempt: number; retry_epoch: number; failed_iteration_count: number; no_progress_count: number; /** Set only when the Runtime pauses the repair loop for a bounded stop. */ stop_reason?: NativePortableLoopStopReason; execution_failure_count: number; previous_unresolved_ids: string[]; next_action: string | null; } export interface NativePortableAcceptanceState { id: string; source: string; text: string; result: NativePortableAcceptanceResult; reason: NativePortableText | null; } export interface NativeBuilderCheckSummary { name: NativePortableText; result: (typeof import('./native-input-enum.js').NATIVE_REPORTED_CHECK_RESULTS)[number]; note: NativePortableText | null; acceptance_ids?: string[]; reason?: NativePortableText; } export interface NativeBuilderHandoff { candidate_id: string; identity_provider: string; builder_execution_ref: string; iteration: number; summary: NativePortableText; addressed_acceptance_ids: string[]; acceptance_review?: import('./native-builder-acceptance-review.js').NativeBuilderAcceptanceReview[]; checks: NativeBuilderCheckSummary[]; checks_truncated: boolean; known_limits: NativePortableText[]; known_limits_truncated: boolean; review: { status: 'passed'; summary: NativePortableText; reviewer_execution_ref: string; } | null; submitted_at: string; /** Compat 由 Runtime 在真实交接时建立的原始输入引用。 */ raw_input_ref?: string; } export interface NativePortableBlockerState { owner: 'builder' | 'runtime' | 'verifier' | 'user' | 'external'; reason: NativePortableText; acceptance_ids: string[]; resolution_action: 'return-build' | 'retry-verifier' | 'resolve-verifier-blocker' | 'confirm-verifier-unavailable' | 'await-user' | 'wait-external'; } export interface NativePortableCheckSummary { id: string; name: NativePortableText; argv_display: NativePortableText[]; argv_truncated: boolean; cwd_ref: string; status: 'passed' | 'failed' | 'interrupted'; exit_code: number | null; duration_ms: number; } export interface NativePortableVerificationState { candidate_id: string; identity_provider: string; verifier_execution_ref: string; iteration: number; attempt: number; assurance: NativePortableVerificationAssurance; verdict: 'pass' | 'fail' | 'blocked'; checks: NativePortableCheckSummary[]; reported_checks?: NativeBuilderCheckSummary[]; summary: NativePortableText; risks: NativePortableText[]; risks_truncated: boolean; completed_at: string; } export interface NativePortableHistoryEntry { goal_cycle: number; iteration: number; attempt: number; outcome: NativePortableHistoryOutcome; unresolved_ids: string[]; summary: NativePortableText; completed_at: string; } export interface NativePortableHistoryOverflow { dropped_entries: number; first_dropped_at: string | null; last_dropped_at: string | null; outcome_counts: Record; } export interface NativePortableState { schema: typeof NATIVE_PORTABLE_STATE_SCHEMA; name: string; language: 'en' | 'zh-CN'; phase: NativePortablePhase; status: NativePortableStatus; state_version: number; brief: 'brief.md'; /** Set on changes created or returned to Shape after the document contract was introduced. */ document_constraints_version?: 1 | 2 | 3; shape_confirmation_hash?: string; /** Approved contract and explicit auxiliary fields; absent on hash-only legacy states. */ children_contract_ref?: string; /** 仅保留旧 Run 原有方案引用,供已领取任务回报兼容。 */ children_contract_hash?: string; children_contract?: import('./native-children-contract.js').NativeChildrenContract; coordination_mode?: NativeSupervisorCoordinationMode; spec_changes: NativePortableSpecChange[]; workspace: NativePortableWorkspace; loop: NativePortableLoopState; acceptance: NativePortableAcceptanceState[]; builder_handoff: NativeBuilderHandoff | null; /** Durable external execution identity and result; absent on legacy states. */ verifier_action?: RuntimeAction; blockers: NativePortableBlockerState[]; verification: NativePortableVerificationState | null; history: NativePortableHistoryEntry[]; history_overflow: NativePortableHistoryOverflow; verification_result: NativePortableVerificationResult; verification_report: 'verification.md' | null; archived: boolean; created_at: string; } export declare function emptyNativePortableHistoryOverflow(): NativePortableHistoryOverflow; //# sourceMappingURL=native-portable-types.d.ts.map