omnius 1.0.965 → 1.0.966

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -82,8 +82,12 @@ export interface CommandEvidenceReceipt {
82
82
  stdoutSha256: string;
83
83
  stderrSha256: string;
84
84
  passedTests: number;
85
+ /** Physical launcher resolved in the effective execution environment. */
86
+ executablePath?: string;
85
87
  /** Present when scoped verifier inputs were captured unchanged before and after execution. */
86
88
  testedRevision?: string;
89
+ /** Authenticated direct invocation with a framework-identified outcome. */
90
+ orderedOutcome?: "assertion_failure" | "pass";
87
91
  };
88
92
  /** Exact explicit task artifacts observed by this local command, when the
89
93
  * controller can attest the relationship. This is never inferred from
@@ -257,6 +261,16 @@ export interface ToolInvocationContext {
257
261
  cwd: string;
258
262
  testedRevision: string;
259
263
  }>;
264
+ /** Exact ordinary verifier declared by the authenticated routine task. */
265
+ routineVerifier?: Readonly<{
266
+ command: string;
267
+ cwd: string;
268
+ }>;
269
+ /** Host-selected literal command and original invocation directory. */
270
+ orderedVerifier?: Readonly<{
271
+ command: string;
272
+ invocationCwd: string;
273
+ }>;
260
274
  /** Current runner-owned task context for bounded UI policy requests. Never tool/page input. */
261
275
  uiTaskContext?: {
262
276
  goal: string;
@@ -1,5 +1,6 @@
1
1
  import type { NativeMemoryViewBinding } from "../execution/native-memory-view-provider.js";
2
2
  import { type HostToolCompositionPolicy } from "./brokered-tool-composition.js";
3
+ import { projectAppendOnlyOutbound } from "./append-only-outbound.js";
3
4
  import { type InferenceRouteLifecycleReceipt, type InferenceFallbackApprovalReceipt, type PreparedInferenceContextCapacity } from "./remote-inference-fallback.js";
4
5
  import { type ForcedUpdateRequirementRecovery, type ForcedUpdateRequirementRecoveryResult, type ForcedUpdateRequirementRecoveryHandler } from "./forced-update-requirement-recovery.js";
5
6
  export type { ForcedUpdateRequirementRecovery, ForcedUpdateRequirementRecoveryReceipt, ForcedUpdateRequirementRecoveryResult, ForcedUpdateRequirementRecoveryHandler } from "./forced-update-requirement-recovery.js";
@@ -9,6 +10,7 @@ import { type DocumentPersistenceReviewEvidenceV1 } from "./document-persistence
9
10
  import { type TaskWorkDelegationV1, type TaskWorkDelegationParentV1, type TaskDocumentSourceV1, type TaskDocumentWorkerResultV1, type TaskWorkDelegationReceiptV1 } from "./taskWorkDelegation.js";
10
11
  import { type OwnedInferenceDispatchFailureV1, type OwnedInferenceWaitContext, type OwnedInferenceWaitObserveOptions, type OwnedInferenceWaitReceiptV1 } from "./owned-inference-wait.js";
11
12
  import type { SpanMeta } from "./types.js";
13
+ import { type RoutineCodingAdmissionV1 } from "./routine-coding-admission.js";
12
14
  import { type InferencePressureCoordinator } from "./inference-pressure.js";
13
15
  import { type InterruptionLifecycleMode, type InterruptionOperationKind, type InterruptionEffectClass, type InterruptionSnapshot, type InterruptionTransitionReceipt } from "./interruption-lifecycle.js";
14
16
  import { type OwnedModelBlocker, type OwnedModelWaitCheckpointV1 } from "./owned-model-wait.js";
@@ -20,7 +22,7 @@ import { type ExternalEffectIntentV1, type ExternalEffectReceiptV1, type NeedsIn
20
22
  import { PROMPT_CONTEXT_SELECTION, PROVIDER_RESPONSE_PARSER, REQUIRED_PROVIDER_SOURCES, type RequiredProviderSource, type PromptContextSelection, type ProviderContextAudit } from "./provider-context-contract.js";
21
23
  import { type TerminalTaskReport } from "./terminalTaskReport.js";
22
24
  import { type NativePendingProviderDeliveryV1, type NativeProviderDeliveryAckV1 } from "./native-provider-delivery.js";
23
- import { type CompletionFinalizationRecord, type TerminalRuntimeFailure } from "./completionFinalization.js";
25
+ import { type CompletionFinalizationRecord, type DecisionStopReason, type TerminalRuntimeFailure } from "./completionFinalization.js";
24
26
  import { type CompletionReadinessSnapshot } from "./completionReadiness.js";
25
27
  import { type CompletionDeliveryReceipt, type ExpectedOutcomeAssessmentV1, type ExpectedOutcomeContractV1, type ExpectedOutcomeRequiredEffectV1 } from "./expectedOutcomeContract.js";
26
28
  import { type TodoSnapshot } from "./todoObservability.js";
@@ -433,6 +435,10 @@ export interface NativeInteractiveDecisionV1 {
433
435
  readonly disposition: 'independent_reply' | 'steer' | 'pause' | 'resume' | 'replace' | 'stop' | 'unresolved';
434
436
  }
435
437
  export interface AgenticRunnerOptions {
438
+ /** Trusted standalone terminal entry may independently review an exact local work draft. */
439
+ standaloneLocalDraftCloseout?: boolean;
440
+ /** Opaque authority from the standalone local CLI's fully specified routine input. */
441
+ routineCodingAdmission?: RoutineCodingAdmissionV1;
436
442
  /** Pinned native issuer reader. Copied decisions and checkpoint JSON grant nothing. */
437
443
  readNativeInteractiveDecision?: (original: unknown) => Readonly<NativeInteractiveDecisionV1> | undefined;
438
444
  /** Pinned original host ACK reader; JSON or a surface flag never supplies delivery authority. */
@@ -533,6 +539,8 @@ export interface AgenticRunnerOptions {
533
539
  temperature?: number;
534
540
  /** Per-request timeout in ms (default: 300_000). Set 0 to wait until explicit abort. */
535
541
  requestTimeoutMs?: number;
542
+ /** Absolute host deadline, when a launcher owns a real wall-clock budget. Advisory only. */
543
+ taskWallDeadlineMs?: number;
536
544
  /**
537
545
  * Legacy progress health-check interval in ms. This is never a terminal task
538
546
  * timeout; agent runs end by completion, turn budget, explicit abort, or
@@ -565,7 +573,7 @@ export interface AgenticRunnerOptions {
565
573
  ownedInferenceWaitRuntimeFingerprint?: string;
566
574
  /** Total body-free observation budget. A zero or omitted value uses the runtime default. */
567
575
  ownedInferenceWaitObservationBudgetMs?: number;
568
- /** Bound each body-free status request without renewing the original generation. */
576
+ /** Initial readiness and semantic idle interval for a body-free observation of the original generation. */
569
577
  ownedInferenceWaitObservationTimeoutMs?: number;
570
578
  /** End an unattended caller at a model blocker while preserving the paused checkpoint. */
571
579
  returnWhenOwnedModelBlocked?: boolean;
@@ -1103,6 +1111,7 @@ export interface AgenticEvent {
1103
1111
  inferenceWaiting?: boolean;
1104
1112
  /** A settled local wait with an explicit operator prerequisite. */
1105
1113
  ownedModelBlocker?: OwnedModelBlocker | null;
1114
+ inferenceObservationRouteUnavailable?: boolean;
1106
1115
  /** Fresh host-observed effect for advisory lifecycle; never goal acceptance. */
1107
1116
  effectObserved?: boolean;
1108
1117
  turn?: number;
@@ -1117,6 +1126,13 @@ export interface AgenticEvent {
1117
1126
  shellMutationObservation?: ShellMutationObservation;
1118
1127
  /** Metadata-only transport and normalized response counts; never completion authority. */
1119
1128
  responseDiagnostics?: ModelResponseDiagnosticReceipt;
1129
+ /** Host projection receipt for correlating lowered requests with cache observations. */
1130
+ providerProjection?: {
1131
+ logicalRequestId: string;
1132
+ mode: "full" | "extended";
1133
+ reason: string;
1134
+ rebase?: NonNullable<ReturnType<typeof projectAppendOnlyOutbound>["rebase"]>;
1135
+ };
1120
1136
  /** Host-owned effective inference route and sanitized attempt outcome. */
1121
1137
  inferenceRoute?: InferenceRouteLifecycleReceipt;
1122
1138
  /** For stream_token events: what kind of content is being streamed */
@@ -1415,6 +1431,7 @@ export interface AgenticResult {
1415
1431
  /** The run ended at a saved local pause, with no terminal completion. */
1416
1432
  ownedModelBlocker?: Readonly<OwnedModelBlocker>;
1417
1433
  runtimeFailure?: TerminalRuntimeFailure;
1434
+ decisionStopReason?: DecisionStopReason;
1418
1435
  /** A user answer owned by the exact task_complete call whose success was
1419
1436
  * admitted and committed. The text is either that call's explicit user_reply
1420
1437
  * or a fresh model-visible response bound to the same run, task epoch, and
@@ -1766,6 +1783,7 @@ export declare class AgenticRunner {
1766
1783
  /** First tool-log turn belonging to the active task epoch. */
1767
1784
  private _taskEpochStartTurn;
1768
1785
  private _activeRunId;
1786
+ private _routineCodingOwner?;
1769
1787
  private _featureWorkflow;
1770
1788
  private _featureWorkflowBindings;
1771
1789
  private _featureWorkflowSchemaDirty;
@@ -1801,11 +1819,7 @@ export declare class AgenticRunner {
1801
1819
  private _appendOnlyOutbound?;
1802
1820
  private _appendOnlyRequiredAuxiliaryHandoff?;
1803
1821
  /** Per primary turn: whether the request extended the previous one, and why not when it did not. */
1804
- readonly appendOnlyOutboundDecisions: Array<{
1805
- logicalRequestId: string;
1806
- mode: "full" | "extended";
1807
- reason: string;
1808
- }>;
1822
+ readonly appendOnlyOutboundDecisions: NonNullable<AgenticEvent["providerProjection"]>[];
1809
1823
  /** Selected method definition only; observation/status counters do not change schemas. */
1810
1824
  private _selectedWorkToolExposureKey;
1811
1825
  private pendingRuntimeGuidanceMessages;
@@ -2097,8 +2111,10 @@ export declare class AgenticRunner {
2097
2111
  /** Frontier feedback is a live snapshot, never terminal summary text. */
2098
2112
  private _completionFrontierFeedbackCount;
2099
2113
  private _completionLedger;
2114
+ private _taskNativeChecks?;
2100
2115
  private _nativeShellVerificationEvidence;
2101
2116
  private _nativeShellVerificationReceipts;
2117
+ private _standaloneDraftVerifierRevisions;
2102
2118
  private readonly _nativeFileWriteCallProofs;
2103
2119
  private readonly _consumedFileWriteObservations;
2104
2120
  private _consumedShellVerificationObservations;
@@ -2174,6 +2190,7 @@ export declare class AgenticRunner {
2174
2190
  private _ownedInferenceWaitCheckpoint?;
2175
2191
  private _restoredOwnedInferenceWait;
2176
2192
  private _ownedModelBlocker?;
2193
+ private _ownedObservationResumeOperationId?;
2177
2194
  private _ownedModelBlockerSuperseded;
2178
2195
  private _retiredOwnedInferenceWaits;
2179
2196
  private _ownedInferenceWaitReceipt?;
@@ -2216,6 +2233,7 @@ export declare class AgenticRunner {
2216
2233
  private _lastCanonicalToolProjection;
2217
2234
  private _lastCanonicalContextSignals;
2218
2235
  private _canonicalAcceptedReceipts;
2236
+ private _restoredDecisionObservations;
2219
2237
  private _canonicalExactSourceCarriers;
2220
2238
  /** Process-local successful observation qualification; never hydrated from JSON. */
2221
2239
  private _historyObservations;
@@ -2240,8 +2258,8 @@ export declare class AgenticRunner {
2240
2258
  private _sourceExtractionResumeReads;
2241
2259
  private _reviewedInterpretationProjectionBlocked;
2242
2260
  private _taskExecutionSnapshot;
2243
- private _taskExecutionSnapshotCarriers;
2244
- private _taskExecutionControllerProjection?;
2261
+ private _taskExecutionSnapshotByRequest;
2262
+ private _runObservationByRequest;
2245
2263
  private _pendingNativeRequirementAmendments;
2246
2264
  private _nativeRequirementInterpretationHolds;
2247
2265
  private _taskObjectiveContinuationRecord;
@@ -2422,6 +2440,9 @@ export declare class AgenticRunner {
2422
2440
  private _saveWorkboard;
2423
2441
  private _observeExpectedOutcomeEffect;
2424
2442
  private _initializeTaskObjective;
2443
+ private _taskNativeCheckScope;
2444
+ private _taskNativeCheckDeficits;
2445
+ private _taskNativeCompletionDeficit;
2425
2446
  private _reconcileObjectiveFrontier;
2426
2447
  private _durableWorkPreparation;
2427
2448
  private _objectivePreparationFromToolResult;
@@ -2459,6 +2480,12 @@ export declare class AgenticRunner {
2459
2480
  private _completionReadinessDeliveryAuthority;
2460
2481
  private _readCurrentNativeCompletionDeficit;
2461
2482
  private _currentFactualCompletionDeficit;
2483
+ private _currentRoutineCodingAdmission;
2484
+ private _standaloneLocalDraftTaskIsCurrent;
2485
+ private _standaloneDraftWorkspaceRevision;
2486
+ private _standaloneDraftVerification;
2487
+ private _retainStandaloneDraftReview;
2488
+ private _routineCodingCloseout;
2462
2489
  private _completionReadinessSnapshot;
2463
2490
  /**
2464
2491
  * Commit one authoritative terminal receipt before emitting a result to the
@@ -2635,6 +2662,7 @@ export declare class AgenticRunner {
2635
2662
  private _pendingNativeControlCustodyIsCurrent;
2636
2663
  private _persistOwnedModelWait;
2637
2664
  private _ownedModelWaitTicket;
2665
+ private _restorableBlockedModelObservation;
2638
2666
  private _blockOwnedModelWait;
2639
2667
  private _ownedModelBlockerSummary;
2640
2668
  private _observeOwnedModelWait;
@@ -2683,6 +2711,9 @@ export declare class AgenticRunner {
2683
2711
  };
2684
2712
  private _registerToolComposition;
2685
2713
  private readonly _responseToolCapabilities;
2714
+ private readonly _recoveryRequestCapabilities;
2715
+ private readonly _compactRecoveryRequests;
2716
+ private readonly _materializedCompactRecoveries;
2686
2717
  private readonly _unfilteredResponseBodies;
2687
2718
  private _lastBuiltToolCapabilities;
2688
2719
  private _lastBuiltTextToolDefinitions;
@@ -2733,7 +2764,10 @@ export declare class AgenticRunner {
2733
2764
  * input pressure can exchange only our owned bodies for their verified
2734
2765
  * bounded native projection and durable full-source retrieval handle. */
2735
2766
  private _applyTaskObjectiveContinuationSourceProjection;
2767
+ private _taskExecutionCarrierOwner;
2768
+ private _runObservationCarrierOwner;
2736
2769
  private _injectTaskExecutionSnapshotContext;
2770
+ private _applyCompactRecovery;
2737
2771
  private _recordContextWindowDump;
2738
2772
  /** Refresh exact transport fields after validated memory materialization. */
2739
2773
  private _refreshCanonicalTransportTrace;
@@ -2769,6 +2803,10 @@ export declare class AgenticRunner {
2769
2803
  */
2770
2804
  private _recordContextMemoryToolTransaction;
2771
2805
  private _sourceBodyProjectionScope;
2806
+ private _decisionObservationScope;
2807
+ private _decisionObservationState;
2808
+ private _sameTaskDecisionObservations;
2809
+ private _currentRecoveryObservation;
2772
2810
  /**
2773
2811
  * Materialize a successful result once so historical raw protocol messages
2774
2812
  * can be replaced by an accepted receipt without losing reopenability.
@@ -3669,21 +3707,8 @@ export declare class AgenticRunner {
3669
3707
  private _memoryHelperWantsConsolidation;
3670
3708
  private _maybeRunDynamicContextConsolidation;
3671
3709
  private _buildTurnContextFrame;
3672
- /**
3673
- * Feed the ContextTree one tool call, detect phase transitions, and — on a
3674
- * transition — capture the outgoing phase's message slice, contract inactive
3675
- * phases (LLM-summarized via makePhaseSummarizer, anchors retained), and
3676
- * archive the full message bodies to `.omnius/phases/<phase>-<id>-turnN.jsonl`,
3677
- * leaving only a pointer + high-signal summary in the working context. This is
3678
- * the core "offload large block → disk pointer + searchable signature"
3679
- * mechanism; `contextTree.expand(phase)` re-hydrates on demand.
3680
- *
3681
- * Wired into BOTH the primary loop and the brute-force loop. The brute-force
3682
- * path is the ACTIVE main-agent path on live 35B runs; omitting the feed here
3683
- * is why the context tree "never kicked off" — it rendered an empty phase
3684
- * status every turn while the raw history grew unbounded. Returns the
3685
- * transition (so the primary loop can reset per-phase tool budgets) or null.
3686
- */
3710
+ private _phaseVerificationPending;
3711
+ /** Record the phase proposal and archive an outgoing phase at its boundary. */
3687
3712
  private _advanceContextTreeOnToolCall;
3688
3713
  private makePhaseSummarizer;
3689
3714
  private _settleOptionalPhaseSummaries;
@@ -4803,6 +4828,7 @@ export declare class AgenticRunner {
4803
4828
  */
4804
4829
  private _buildRecentActionGroundTruth;
4805
4830
  private _nativeShellProgressIsCurrent;
4831
+ private _modelFacingVerifierCheck;
4806
4832
  private _nativeOperationProgressIsCurrent;
4807
4833
  private _nativeOperationRepetitions;
4808
4834
  private _equivalentNativeObservations;
@@ -0,0 +1,142 @@
1
+ import type { ChatMessage } from "./agenticRunner.js";
2
+ import { type TaskExecutionSnapshotV1 } from "./taskExecutionSnapshot.js";
3
+ export interface AppendOnlyReceiptCustody {
4
+ toolName: string;
5
+ artifactLocator: string;
6
+ argumentsSha256?: string;
7
+ members?: Array<{
8
+ transactionId: string;
9
+ toolName: string;
10
+ artifactLocator: string;
11
+ argumentsSha256: string;
12
+ }>;
13
+ }
14
+ /** A qualified source block and the exact native read result carrying its body. */
15
+ export interface AppendOnlyExactSourceCarrier {
16
+ sourceContent: string;
17
+ sourceBody: string;
18
+ message: ChatMessage;
19
+ }
20
+ /**
21
+ * Hybrid and recurrent models (Qwen3.x with linear-attention layers, SWA) cannot roll their state
22
+ * back to an arbitrary token. llama.cpp keeps a few checkpoints, saved near the end of each prompt,
23
+ * and re-processes the whole prompt when the new one diverges before the last checkpoint. The
24
+ * runner rebuilds its per-turn projections (the canonical task frame, passive chat history) at the
25
+ * tail of every request, so each turn diverged where the old frame began and every turn re-read
26
+ * 20-30k tokens. A live hosting run spent 190 of its 270 seconds re-reading prompts.
27
+ *
28
+ * This projection sends the previous request verbatim, then the turn's new history, then a compact
29
+ * factual snapshot of each changed projection. Nothing earlier changes, so the server resumes
30
+ * from its last checkpoint.
31
+ *
32
+ * The update is a host-labelled message in the conversation, not a system message. Some renderers
33
+ * (the local Ollama/llama.cpp chatml path among them) gather every system message into one block
34
+ * at the top of the prompt, so any added or changed system message, wherever it sits in the list,
35
+ * rewrites the top of the prompt and forces a full re-read. Measured live: an added system update
36
+ * cut the cache match from 27,279 to 24,510 tokens and cost a 23.7 s re-read; the same update in the
37
+ * conversation reused the whole previous prompt. When durable history was rewritten
38
+ * or the accumulated updates grow past a bound, the full fresh request is sent instead, which
39
+ * costs one cache miss and starts a new chain.
40
+ */
41
+ export declare const APPEND_ONLY_FRAME_UPDATE_MARKER = "[ACTIVE TASK FRAME UPDATE v1]";
42
+ export declare const APPEND_ONLY_OBSERVATION_SNAPSHOT_MARKER = "[HOST OBSERVATION SNAPSHOT v1]";
43
+ /** Prefix for a runtime system message added mid-run and sent in the conversation (see below). */
44
+ export declare const APPEND_ONLY_HOST_MESSAGE_MARKER = "[HOST RUNTIME MESSAGE v1: host-authored, not from the user]";
45
+ export interface AppendOnlyHostObservationMessage extends ChatMessage {
46
+ policyScope: "runtime";
47
+ runtimeOrigin: {
48
+ schema: "omnius.append-only-host-origin.v1";
49
+ producer: "append-only-outbound";
50
+ kind: "projection_snapshot" | "exact_source" | "runtime_message";
51
+ };
52
+ }
53
+ export declare function isIssuedRunObservationCarrier(message: ChatMessage, owner: string): boolean;
54
+ /** Only the runner's exact structured system frame can seed partial updates. */
55
+ export declare function issueRunObservationCarrier(message: ChatMessage, owner: string): ChatMessage;
56
+ export declare function isIssuedTaskExecutionSnapshotCarrier(message: ChatMessage): boolean;
57
+ export declare function issueTaskExecutionSnapshotCarrier(snapshot: TaskExecutionSnapshotV1, ownerSha256: string): ChatMessage;
58
+ /** Original producer identity only. JSON and marker text are not host issuance. */
59
+ export declare function readIssuedAppendOnlyHostObservation(value: unknown): Readonly<{
60
+ kind: AppendOnlyHostObservationMessage["runtimeOrigin"]["kind"];
61
+ content: string;
62
+ projections: readonly Readonly<ProjectionObservation>[];
63
+ }> | undefined;
64
+ interface ProjectionObservation {
65
+ marker: string;
66
+ label: string;
67
+ content: string | null;
68
+ }
69
+ /** How a per-turn projection is recognized: a system message that starts with its marker. */
70
+ export interface AppendOnlyProjectionKind {
71
+ marker: string;
72
+ label: string;
73
+ }
74
+ export interface AppendOnlyOutboundState {
75
+ key: string;
76
+ /** Exactly what the previous request sent. */
77
+ sent: ChatMessage[];
78
+ /** The previous request's durable history, without projections. */
79
+ base: ChatMessage[];
80
+ /** Latest full content of each projection kind, by marker. */
81
+ projections: Map<string, string>;
82
+ /** Immutable custody identities at the time this packet was built. */
83
+ acceptedReceipts?: ReadonlyMap<string, AppendOnlyReceiptCustody>;
84
+ /** Exact producer-selected source blocks, keyed by immutable range/revision identity. */
85
+ exactSources?: ReadonlyMap<string, string>;
86
+ /** Source blocks proved resident in this immutable sent prefix, including raw reads. */
87
+ residentExactSources?: ReadonlyMap<string, string>;
88
+ /** Characters of updates sent since the last full request. */
89
+ updateChars: number;
90
+ /** Historical frame-control churn only; exact source bodies are accounted separately. */
91
+ frameUpdateChars?: number;
92
+ frameUpdateCount?: number;
93
+ /** Exact issued baseline or most recent update present in sent. */
94
+ taskExecutionCarrier?: ChatMessage;
95
+ runObservationCarrier?: ChatMessage;
96
+ }
97
+ export interface AppendOnlyOutboundResult {
98
+ messages: ChatMessage[];
99
+ state: AppendOnlyOutboundState;
100
+ mode: "full" | "extended";
101
+ reason: string;
102
+ /** Observed control churn at a fresh-canonical rebase, before counters reset. */
103
+ rebase?: {
104
+ frameUpdateChars: number;
105
+ frameUpdateCount: number;
106
+ maxFrameUpdateChars: number;
107
+ maxFrameUpdates: number;
108
+ };
109
+ }
110
+ /** Accumulated update characters (~6k tokens) after which a fresh full request is cheaper and clearer. */
111
+ export declare const APPEND_ONLY_MAX_UPDATE_CHARS = 24000;
112
+ /** Separate from model capacity and evidence size: occasionally replace obsolete frame deltas. */
113
+ export declare const APPEND_ONLY_MAX_FRAME_UPDATE_CHARS = 24000;
114
+ export declare const APPEND_ONLY_MAX_FRAME_UPDATES = 8;
115
+ /** Line diff of `before` → `after` as compact hunks: "@@ after: <context>", then "-"/"+" lines. */
116
+ export declare function renderProjectionLineDiff(before: string, after: string): string;
117
+ /**
118
+ * Build this turn's outbound messages. `key` identifies the run; a different key, a rewritten
119
+ * history starts a new chain with the full request. Host projections may appear anywhere in
120
+ * the history: world-state regeneration and resumed Telegram observations are not always at
121
+ * the tail. Repeated messages of one kind form one ordered projection; none is discarded.
122
+ */
123
+ export declare function projectAppendOnlyOutbound(input: {
124
+ key: string;
125
+ messages: ChatMessage[];
126
+ previous?: AppendOnlyOutboundState;
127
+ kinds: readonly AppendOnlyProjectionKind[];
128
+ maxUpdateChars?: number;
129
+ maxFrameUpdateChars?: number;
130
+ maxFrameUpdates?: number;
131
+ /** Issued by the runner, never inferred from quoted/tool-authored receipt text. */
132
+ acceptedReceipts?: ReadonlyMap<string, AppendOnlyReceiptCustody>;
133
+ /** Producer-owned exact source blocks; quoted markers inside source cannot create these. */
134
+ exactSources?: ReadonlyMap<string, string>;
135
+ /** Independently qualified native read carriers, including sources omitted from the frame. */
136
+ exactSourceCarriers?: ReadonlyMap<string, AppendOnlyExactSourceCarrier>;
137
+ /** Current execution authority. Lookalike text or serialized copies cannot establish identity. */
138
+ taskExecutionOwner?: string;
139
+ /** Exact request-local runner-issued run observations. */
140
+ runObservationCarrier?: ChatMessage;
141
+ }): AppendOnlyOutboundResult;
142
+ export {};
@@ -10,11 +10,19 @@
10
10
  */
11
11
  import type { CompletionLedger, CompletionLedgerStatus } from "./completionLedger.js";
12
12
  import type { CompletionReadinessSnapshot } from "./completionReadiness.js";
13
+ import type { RoutineCodingCloseoutReceiptV1 } from "./routine-coding-admission.js";
13
14
  import type { ContextAdmissionReceipt } from "./context-admission.js";
14
15
  import type { TerminalTaskReport } from "./terminalTaskReport.js";
15
16
  import type { CompletionDeliveryReceipt, ExpectedOutcomeAssessmentV1, ExpectedOutcomeContractV1 } from "./expectedOutcomeContract.js";
16
17
  import type { ExternalEffectReceiptV1, NeedsInputContractV1, ObjectiveFrontierSnapshotV1, RunConvergenceStateV1, TaskObjectiveContractV1, VerificationReceiptV1 } from "./taskObjective.js";
17
18
  export type TerminalRunStatus = "completed" | "incomplete_verification" | "incomplete" | "awaiting_input";
19
+ declare const decisionStopReasons: readonly [
20
+ "output_limit_recovery_exhausted",
21
+ "no_progress_recovery_exhausted",
22
+ "no_action",
23
+ "turn_budget_exhausted"
24
+ ];
25
+ export type DecisionStopReason = typeof decisionStopReasons[number];
18
26
  /** Host runtime evidence, independent of model text or tool output. */
19
27
  interface TerminalRuntimeFailureScope {
20
28
  schema: "omnius.terminal-runtime-failure.v1";
@@ -121,6 +129,8 @@ export interface CompletionFinalizationRecord {
121
129
  };
122
130
  summary: string;
123
131
  runtimeFailure?: TerminalRuntimeFailure;
132
+ /** Why the host stopped making decisions. This grants no completion authority. */
133
+ decisionStopReason?: DecisionStopReason;
124
134
  /** User report frozen with the committed evidence snapshot; absent on legacy/prepared records. */
125
135
  terminalReport?: TerminalTaskReport;
126
136
  /** Exact immutable report-only evidence for a conversation; never a task authority ledger. */
@@ -137,6 +147,8 @@ export interface CompletionFinalizationRecord {
137
147
  objectiveLedgerPath?: string;
138
148
  /** Deterministic host authority used to accept or reject terminal success. */
139
149
  completionReadiness?: CompletionReadinessSnapshot;
150
+ /** Final current host proof for an exact standalone routine edit request. */
151
+ routineCodingCloseout?: RoutineCodingCloseoutReceiptV1;
140
152
  readinessHash?: string;
141
153
  boardHash?: string;
142
154
  workboardRevision?: string;
@@ -210,6 +222,7 @@ export declare function buildCompletionFinalizationRecord(input: {
210
222
  status: TerminalRunStatus;
211
223
  summary: string;
212
224
  runtimeFailure?: TerminalRuntimeFailure;
225
+ decisionStopReason?: DecisionStopReason;
213
226
  expectedOutcomeContract?: ExpectedOutcomeContractV1;
214
227
  expectedOutcomeAssessment?: ExpectedOutcomeAssessmentV1;
215
228
  taskObjectiveContract?: TaskObjectiveContractV1;
@@ -220,6 +233,7 @@ export declare function buildCompletionFinalizationRecord(input: {
220
233
  needsInput?: NeedsInputContractV1;
221
234
  objectiveLedgerPath?: string;
222
235
  completionReadiness?: CompletionReadinessSnapshot;
236
+ routineCodingCloseout?: RoutineCodingCloseoutReceiptV1;
223
237
  deliveryReceipts?: CompletionDeliveryReceipt[];
224
238
  ledger?: CompletionLedger | null;
225
239
  workboardPresent?: boolean;
@@ -43,6 +43,30 @@ export declare class ConvergenceProgressTracker {
43
43
  hasRecentProgress(turn: number, windowTurns: number): boolean;
44
44
  snapshot(turn: number): ConvergenceProgressSnapshot;
45
45
  }
46
+ export interface DecisionEvidence {
47
+ tool: string;
48
+ /** Stable identity of the executed operation and its returned evidence. */
49
+ identity?: string;
50
+ /** Current executor-owned call whose observation can explain this decision. */
51
+ observationCallId?: string;
52
+ noEffect: boolean;
53
+ material: boolean;
54
+ }
55
+ /** A proposal never reaches this tracker. Evidence can advance discovery or
56
+ * diagnosis without certifying completion. Only the current decision scope
57
+ * gets to reuse a finding or compare it to a previous execution. */
58
+ export declare class DecisionProgressTracker {
59
+ private scope?;
60
+ private turn;
61
+ private seen;
62
+ private advanced;
63
+ private repeated?;
64
+ observe(scope: string, turn: number, evidence: DecisionEvidence): void;
65
+ outcome(scope: string, turn: number): {
66
+ advanced: boolean;
67
+ repeated?: DecisionEvidence;
68
+ };
69
+ }
46
70
  export interface VerificationDiagnostic {
47
71
  id: string;
48
72
  file?: string;
@@ -1,5 +1,6 @@
1
1
  import { type CanonicalEvidenceReceiptInput, type CanonicalTaskFrameProjection } from "./canonical-context-projection.js";
2
2
  import type { NativeMemoryReadFacts } from "../execution/native-memory-operation-observation.js";
3
+ import type { DecisionObservationView } from "./observationLedger.js";
3
4
  export interface ModelFacingCanonicalMetadataProjection {
4
5
  content: string | null;
5
6
  audit: {
@@ -115,8 +116,45 @@ export interface ModelFacingChildCoverage {
115
116
  maxWorkers: number;
116
117
  omittedObservations: number;
117
118
  }
119
+ export interface ModelFacingVerifierCheck {
120
+ evidence: string;
121
+ command: string;
122
+ outcome: "exit_zero" | "nonzero_exit";
123
+ cwd?: string;
124
+ testedRevision?: string;
125
+ artifactHashes?: Array<{
126
+ path: string;
127
+ sha256: string;
128
+ }>;
129
+ outputRef?: string;
130
+ failureExcerpt?: string;
131
+ }
132
+ export interface ModelFacingCodingCheck {
133
+ action: "diagnose" | "alternate_action" | "bounded_review" | "verify_due";
134
+ finding?: {
135
+ observationEvidence: string;
136
+ artifact: string;
137
+ times: number;
138
+ };
139
+ changes?: Array<{
140
+ evidence: string;
141
+ paths: string[];
142
+ }>;
143
+ priorFailedCheck?: ModelFacingVerifierCheck;
144
+ postChangeChecks?: ModelFacingVerifierCheck[];
145
+ open: Array<{
146
+ id: string;
147
+ description: string;
148
+ }>;
149
+ covered: string[];
150
+ instruction: string;
151
+ remainingDecisionTurns?: number;
152
+ remainingWallMs?: number;
153
+ }
118
154
  /** Full exact accepted source, separate from changing execution observations. */
119
155
  export declare const MODEL_FACING_ACCEPTED_GOAL_MARKER = "[ACCEPTED NATIVE GOAL v1]";
156
+ export declare const MODEL_FACING_RUN_OBSERVATIONS_MARKER = "[RUN OBSERVATIONS v1]";
157
+ export declare const MODEL_FACING_RUN_OBSERVATION_FIELDS_MARKER = "[RUN OBSERVATION FIELD UPDATE v1]";
120
158
  export declare function renderModelFacingAcceptedGoal(acceptedGoal: string): string;
121
159
  /** Explicit producer fields only; no recursive key/text stripping of source data. */
122
160
  export declare function renderModelFacingRunObservations(input: {
@@ -127,6 +165,8 @@ export declare function renderModelFacingRunObservations(input: {
127
165
  }[];
128
166
  equivalentObservations?: readonly ModelFacingEquivalentObservationFacts[];
129
167
  operationRepetitions?: readonly ModelFacingOperationRepetitionFacts[];
168
+ decisionObservations?: DecisionObservationView | null;
169
+ codingCheck?: ModelFacingCodingCheck;
130
170
  operationObservationCoverage?: {
131
171
  window: string;
132
172
  qualifiedReturns: number;