dsh-completion-guard 0.6.2 → 0.7.0

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.
@@ -140,12 +140,25 @@ interface ScopeInterpretation {
140
140
  /** True only for an explicit, agent-owned, unconditional instruction. */
141
141
  immediatelyExecutable: boolean;
142
142
  authorityDisposition: AuthorityDisposition;
143
+ /** The 0.6.3 execution qualification this reading establishes. */
144
+ qualification: ExecutionQualification;
143
145
  /** Explicitly named tool/method, when the scope names one. */
144
146
  method?: string;
145
147
  /** Stable identity of this interpretation, reproducible from the same bytes. */
146
148
  fingerprint: string;
147
149
  }
148
150
  /**
151
+ * 0.6.3 K1 regression probe: the 0.6.2 question rule, kept SOLELY so the fixed
152
+ * defect has a test that fails against the old reading.
153
+ *
154
+ * 0.6.2 declared a clause information as soon as a question marker appeared
155
+ * anywhere inside it (`QUESTION_SCOPE.test(masked)`). This function is that
156
+ * rule, verbatim. It is not used by any production path — the current reading
157
+ * is {@link hasQuestionScope} — and its only caller is the regression test that
158
+ * pins the difference between the two readings on the recorded defect input.
159
+ */
160
+ declare function legacyQuestionReadingIsInformational(masked: string): boolean;
161
+ /**
149
162
  * The contract kind a scope maps to. A prohibition and an acceptance keep their
150
163
  * own lanes; everything else is a requirement. Acceptance is decided from the
151
164
  * clause's own head verb, so "确保构建通过" stays an acceptance while a
@@ -153,6 +166,196 @@ interface ScopeInterpretation {
153
166
  */
154
167
  declare function kindOfScope(directive: DirectiveClass, body?: string): GuardItemKind;
155
168
  declare function maskCodeSpans(text: string): string;
169
+ /**
170
+ * A present explanation speech act can have a time/scope frame before its
171
+ * matrix verb. This only identifies the head; the v6 capture path still checks
172
+ * the complete complement and keeps an independent action or unknown residue.
173
+ * In particular, a quoted or reported head and a future-time frame do not
174
+ * match, so this predicate never grants execution authority.
175
+ */
176
+ declare function presentExplanationHead(text: string): {
177
+ end: number;
178
+ } | undefined;
179
+ /** A sourced clause-level condition can govern the next comma-linked matrix. */
180
+ declare function opensConditionLead(text: string): boolean;
181
+ /** Work named inside a governed explanation complement needs its own reading. */
182
+ declare function hasWorkPredicate(text: string): boolean;
183
+ /**
184
+ * Whether a clause asks for information rather than ordering work (0.6.3 K1).
185
+ *
186
+ * 0.6.2 treated the mere presence of a question marker anywhere in a clause as
187
+ * "the whole clause is a question", so one 是否 inside a comma-run of
188
+ * instructions ("更新插件,检查是否存在更新,安装新主题,记录变更。") turned
189
+ * every execution obligation beside it into closable information. The reading
190
+ * is now grammatical — head verb, interrogative position, negation — so a
191
+ * relative or purpose clause inside an order ("Create a file where logs are
192
+ * stored", "更新皮肤中心,看看为什么失败") is never a question, while a real
193
+ * request for an answer ("How do I install this?", "检查是否有更新吗?",
194
+ * "check whether the remote has new commits") still is.
195
+ */
196
+ declare function hasQuestionScope(masked: string): boolean;
197
+ /**
198
+ * Whether an explanation head GOVERNS its sentence.
199
+ *
200
+ * Everything coordinated inside the sentence the explanation heads is the OBJECT
201
+ * of the explanation, however it is phrased and however long it is: a finite
202
+ * complement ("how I can install …"), a `whether` complement, an infinitive, a
203
+ * list with a long object — all of it is what the root asked to have explained.
204
+ * The scope is therefore structural: it is the SENTENCE, bounded by the sentence
205
+ * splitter, not a pattern with a window. A sentence break ends the governance, so
206
+ * a following sentence can be a real instruction ("Explain the deploy. Then
207
+ * restart service api." stays authorizable), and a question that merely stands
208
+ * beside an order ("What changed and archive the logs?") has no explanation head
209
+ * and keeps its order.
210
+ */
211
+ declare function reportingHeadGoverns(masked: string): boolean;
212
+ /**
213
+ * Whether a clause is the scope of a QUESTION — any question, not only a reported
214
+ * one: a question word ("How do I install …"), an interrogative auxiliary
215
+ * ("Can you …"), an investigation ("Check whether …") or an explanation
216
+ * ("Explain how …").
217
+ *
218
+ * A question head GOVERNS its clause: everything coordinated inside it is part of
219
+ * what the root asked, so the clause must not be split into an executable child.
220
+ * When such a clause ALSO carries an action of its own it is undecided — the
221
+ * action may be exactly what the question is about — so nothing in it is
222
+ * authority. Exported so the mutation gate and preparation consume the SAME
223
+ * qualification the reading produced instead of re-guessing scope from the split
224
+ * text, and so the rule is testable on its own.
225
+ */
226
+ declare function isQuestionScopeNeedingReview(text: string): boolean;
227
+ /**
228
+ * 0.6.3 (narrowed contract): the execution qualification of one reading.
229
+ *
230
+ * Recognising an ACTION and holding AUTHORITY to run it are separate facts. The
231
+ * reader decides, ONCE per clause and BEFORE any partition, whether the clause is
232
+ * a `granted` plain instruction or a `restricted` governed scope (a question, an
233
+ * explanation, an investigation, a reported question, or a quote). Every child the
234
+ * partition later produces INHERITS that decision; nothing downstream — not the
235
+ * projection, not recovery, not preparation — may upgrade a child to executable by
236
+ * re-reading its own words (the earlier rounds' fail-open direction).
237
+ *
238
+ * `restricted` is not "no work": a restricted clause that names an action keeps it
239
+ * as an undecided obligation ({@link AuthorityDisposition} `unresolved`) which no
240
+ * answer closes and no certificate covers.
241
+ */
242
+ type QualificationStatus = "granted" | "restricted";
243
+ type QualificationReason = "plain_instruction" | "governed_scope" | "unproven_scope" | "inherited_restriction" | "legacy_missing_qualification";
244
+ interface ExecutionQualification {
245
+ status: QualificationStatus;
246
+ reason: QualificationReason;
247
+ /** The governing head that restricted the clause, when one exists. */
248
+ governedBy?: string;
249
+ }
250
+ /** Blank out every quoted span of the text. */
251
+ declare function maskQuotedSpans(text: string): string;
252
+ /**
253
+ * Whether the clause's OWN span asks something, even when no governed head was
254
+ * recognised. This is the fail-closed half of the qualification: a clause whose
255
+ * question content the reader could not classify (`I wonder whether …`, a
256
+ * postposed 是否可行, a stray question mark) is still a scope that cannot host
257
+ * execution authority. Code spans, quotes and subordinate spans do not count:
258
+ * their content belongs to them, not to the clause.
259
+ */
260
+ declare function clauseAsksOwnQuestion(text: string): boolean;
261
+ /**
262
+ * Whether the clause is a DIRECTIVE: an imperative in the root's voice. The action
263
+ * must OPEN the clause once the request preface is consumed ("重启 api 服务。",
264
+ * "Then restart service api.", "请更新插件"), and the clause must not be a report
265
+ * or a third-party statement ("The technicians restart service api every night.",
266
+ * "日志显示运维人员重启 api 服务。").
267
+ */
268
+ declare function opensWithDirective(masked: string): boolean;
269
+ /**
270
+ * The content a restatement introduces: the Y of "把 X 明确为 Y" / "record X as Y".
271
+ * Everything the restatement AUTHORIZES comes from this span, and nothing else.
272
+ */
273
+ declare function restatedContentOf(text: string): string | undefined;
274
+ /** The span a restatement CLARIFIES: everything before its marker. */
275
+ declare function clarifiedSpanOf(text: string): string | undefined;
276
+ /** Whether the clause is an explicit re-statement of what an obligation means. */
277
+ declare function isRestatement(text: string): boolean;
278
+ /**
279
+ * Whether the clause is a PROTECTED scope: a question, an explanation, an
280
+ * investigation, a reported question, a quote, or any span whose own question
281
+ * content the head reader could not classify. A protected scope is indivisible —
282
+ * no separator opens a child of it — and nothing inside it is execution authority.
283
+ */
284
+ declare function clauseIsProtected(text: string): boolean;
285
+ /** A clause nobody has questioned: its own reading is the authorization. */
286
+ declare const GRANTED_QUALIFICATION: ExecutionQualification;
287
+ /** A record captured before the qualification existed: never granted by default. */
288
+ declare const LEGACY_QUALIFICATION: ExecutionQualification;
289
+ /**
290
+ * Whether a QUESTION/EXPLANATION/INVESTIGATION head governs the clause: the one
291
+ * governance predicate every layer consumes (the partitioner, the classifier, the
292
+ * reading, and — through the stored qualification — the gate and preparation).
293
+ */
294
+ declare function questionHeadsClause(masked: string): boolean;
295
+ /** Whether the clause's own reading is a governed scope. */
296
+ declare function clauseIsGoverned(masked: string): boolean;
297
+ /** The qualification the reader records for one clause. */
298
+ declare function qualificationOfClause(text: string): ExecutionQualification;
299
+ /**
300
+ * Whether a GOVERNED clause carries work that its own question does not bound, so
301
+ * that the clause must stay undecided rather than enter the answer lane.
302
+ *
303
+ * The test is structural and vocabulary-free in the direction that matters:
304
+ *
305
+ * - a coordination AFTER the clause's own question word puts the coordinated part
306
+ * inside the question's scope ("…是否安装 foo 并重启 api 服务"), so the whole
307
+ * clause is undecided whatever the verbs are;
308
+ * - material BEFORE the question word that carries an action is the questioned
309
+ * span itself ("检查一下[安装 foo 并重启 api 服务]是否安全"), so it is undecided;
310
+ * - a governed head with no question word of its own is undecided as soon as it
311
+ * names an action ("Check the safety of installing foo and restart service
312
+ * api.", "Explain the incident, rotate every credential").
313
+ *
314
+ * A pure question — the object list of "检查一下本地插件和皮肤是否有更新", a state
315
+ * question like "检查是否有新版本。" — carries none of these and stays answerable.
316
+ */
317
+ declare function governedClauseRestrictsExecution(text: string): boolean;
318
+ declare function hasOrderedCoordination(masked: string): boolean;
319
+ /** @deprecated Use {@link isQuestionScopeNeedingReview}: the rule is not limited to explanations. */
320
+ declare const isExplanationScope: (text: string) => boolean;
321
+ /**
322
+ * Whether a coordinated part of the explanation's sentence opens with an action
323
+ * of its own. Those are exactly the parts whose membership in the explanation
324
+ * cannot be decided from the surface, so they make the sentence undecided instead
325
+ * of answerable or executable. `masked` has code spans blanked, so an action that
326
+ * only appears inside backticks contributes nothing.
327
+ */
328
+ declare function explanationHasActionResidue(masked: string): boolean;
329
+ declare function isInformationalFragment(masked: string): boolean;
330
+ declare function splitTextFragments(text: string, from?: number): Array<{
331
+ text: string;
332
+ offset: number;
333
+ }>;
334
+ /**
335
+ * Whether the text after a coordinating conjunction opens a DISTINCT
336
+ * instruction: its own action head, optionally behind a connector and an
337
+ * actor. This is the rule the sentence splitter already used to decide that a
338
+ * conjunction joins two instructions rather than two objects, exposed so the
339
+ * fragment splitter cannot contradict it.
340
+ */
341
+ declare function introducesActionClause(text: string): boolean;
342
+ /**
343
+ * Every action word in `[offset, before)`, ordered by position, with the words
344
+ * that are only a prefix of a longer action removed (the 升 of 升级, the 然 of
345
+ * 然后). The remaining candidates are the verbs an instruction can be about.
346
+ */
347
+ declare function actionVerbMatches(text: string, offset?: number, before?: number): Array<{
348
+ index: number;
349
+ length: number;
350
+ }>;
351
+ /**
352
+ * True when a negator's scope covers the verb starting at `index`.
353
+ *
354
+ * The negator has to be phrase-initial, so the 不 of 手动 and the 无 of 无论 are
355
+ * not read as bans; a contrast or list separator between the negator and the
356
+ * verb ends its scope ("不仅…而且运行" keeps the run positive).
357
+ */
358
+ declare function verbIsNegated(text: string, index: number): boolean;
156
359
  /** Interpret one already-segmented clause. */
157
360
  declare function interpretClause(text: string, options?: InterpretOptions): ScopeInterpretation;
158
361
  /** Interpret a whole message into independent scopes, in source order. */
@@ -172,6 +375,23 @@ declare function isExecutableItem(item: {
172
375
  authorityDisposition?: AuthorityDisposition;
173
376
  waitAuthorization?: unknown;
174
377
  }): boolean;
378
+ /**
379
+ * The ONE authority predicate the mutation gate and preparation both consume.
380
+ *
381
+ * A record holds execution authority only when the reader GRANTED it a
382
+ * qualification: a record with no qualification at all (captured before the
383
+ * qualification existed) is refused rather than read from its stored
384
+ * disposition, and a restricted record — anything a question, explanation,
385
+ * investigation, reported question or quote governs — keeps its work as an
386
+ * undecided obligation that authorizes nothing. Within a granted reading, the
387
+ * disposition still decides: a prohibition, a wait, a human actor, a condition or
388
+ * an information range is never a mutation. An `unresolved` GRANTED reading keeps
389
+ * the historical path documented for unrecognised instruction forms.
390
+ */
391
+ declare function itemHoldsExecutionAuthority(item: {
392
+ executionQualification?: ExecutionQualification;
393
+ authorityDisposition?: AuthorityDisposition;
394
+ }): boolean;
175
395
  /** Whether an item is an open obligation for certification purposes. */
176
396
  declare function isOpenObligation(item: GuardItem): boolean;
177
397
  /**
@@ -255,7 +475,7 @@ type ProcessExitStatus = number | "unknown";
255
475
  * Why `outcome` says what it says, so a display or a consumer never reads more
256
476
  * than the source supports.
257
477
  */
258
- type ProcessOutcomeReason = "declared_exit_code" | "declared_negative_marker" | "host_error_flag" | "unmarked_renderer_success" | "marker_unclassified" | "backgrounded" | "text_scan_inconclusive";
478
+ type ProcessOutcomeReason = "declared_exit_code" | "declared_negative_marker" | "host_error_flag" | "host_result_untrusted" | "unmarked_renderer_success" | "marker_unclassified" | "backgrounded" | "text_scan_inconclusive";
259
479
  /**
260
480
  * How far the console let the guard attribute effects to the obligation's own
261
481
  * operation. `unknown` is the honest answer for every opaque compound runner:
@@ -484,6 +704,8 @@ interface ReleaseReservation {
484
704
  operation: ReleaseOperation;
485
705
  callId: string;
486
706
  startedAtSeq: number;
707
+ /** Present instead of a Session sequence for provider-invisible sidecar records. */
708
+ ledgerPosition?: number;
487
709
  status: "in_flight";
488
710
  /**
489
711
  * The npm SRI the trusted producer read when the reservation was written.
@@ -499,6 +721,8 @@ interface ReleaseSettlement {
499
721
  operation: ReleaseOperation;
500
722
  callId: string;
501
723
  settledAtSeq: number;
724
+ /** Present instead of a Session sequence for provider-invisible sidecar records. */
725
+ ledgerPosition?: number;
502
726
  /** A trusted readback identity, or the reason no producer exists. */
503
727
  readback: {
504
728
  kind: "npm_integrity" | "git_ref" | "github_release";
@@ -621,6 +845,21 @@ type GuardItemStatus = "pending" | "answered" | "passed" | "superseded";
621
845
  type GuardIntegrity = "valid" | "unknown" | "corrupt";
622
846
  type EvidenceOutcome = "success" | "failure" | "unknown" | "durability-unknown";
623
847
  type GuardOperation = "create" | "write" | "modify" | "read" | "run" | "verify";
848
+ /**
849
+ * 0.6.3 K2: where an obligation's requested target came from. A target is a
850
+ * user SELECTION only when the root named it or a trusted host selection made
851
+ * it; an environment default (the session working directory, a recent tool
852
+ * path, a model-supplied selector) resolves and corroborates a target the root
853
+ * already allowed, and never manufactures root authority. An inherited target
854
+ * comes from another obligation of the same work unit whose own source is
855
+ * auditable.
856
+ */
857
+ type TargetSourceKind = "explicit_label" | "explicit_path" | "explicit_current_repository" | "host_selection" | "unit_inherited" | "environment_default";
858
+ interface TargetSource {
859
+ kind: TargetSourceKind;
860
+ /** Source message id of the obligation a `unit_inherited` target came from. */
861
+ inheritedFrom?: string;
862
+ }
624
863
  type TargetValue = boolean | number | string | {
625
864
  k: "b" | "i" | "s" | "e" | "x";
626
865
  v: unknown;
@@ -630,7 +869,25 @@ type EvidenceRole = "resolution" | "effect" | "state";
630
869
  type EvidenceParseStatus = "supported" | "unsupported_statement_operator" | "unsupported_command" | "malformed_quote" | "adapter_unavailable";
631
870
  type HostStatus = "supported" | "unsupported" | "unavailable";
632
871
  type TargetCaptureStatus = "resolved" | "clarification_required";
633
- type TargetCaptureReasonCode = "requested_target_package_id_missing" | "requested_target_artifact_id_missing" | "requested_target_repository_missing" | "requested_target_service_id_missing" | "requested_target_registry_missing_or_invalid";
872
+ /**
873
+ * 0.6.3 K4: why a record captured under the rules of an EARLIER release can no
874
+ * longer be reused as a current pass. The record itself is never rewritten —
875
+ * its historical status (including `answered`) stays the historical fact it
876
+ * was — but the current eligibility layer refuses to inherit it and the
877
+ * obstruction blocks new certificates and Goal completion until the root
878
+ * resolves it. It is deliberately a hard block, not a warning: 0.6.2 published
879
+ * a mixed request as answered, and a warning would have left exactly that
880
+ * misreading in force.
881
+ */
882
+ type NeedsReviewReason = "legacy_mixed_information_scope" | "legacy_environment_default_target" | "unknown_state_version" | "legacy_missing_execution_qualification" | "legacy_v6_generic_action" | "legacy_v6_ordinary_certification" | "legacy_v6_text_wait";
883
+ interface NeedsReviewFact {
884
+ reason: NeedsReviewReason;
885
+ /** Stable identity of the eligibility check that raised it. */
886
+ checkId: string;
887
+ /** When the check was applied: this is an upgrade fact, not a birth fact. */
888
+ recordedAtRevision: number;
889
+ }
890
+ type TargetCaptureReasonCode = "requested_target_package_id_missing" | "requested_target_artifact_id_missing" | "requested_target_repository_missing" | "requested_target_repository_invalid" | "requested_target_repository_ambiguous" | "requested_target_field_ambiguous" | "requested_target_service_id_missing" | "requested_target_registry_missing_or_invalid";
634
891
  interface GoalRef {
635
892
  id: string;
636
893
  revision: number;
@@ -733,10 +990,27 @@ interface GuardItem {
733
990
  requestedTarget?: TargetTuple;
734
991
  targetCaptureStatus?: TargetCaptureStatus;
735
992
  targetCaptureReasonCode?: TargetCaptureReasonCode;
993
+ /**
994
+ * 0.6.3 K2 provenance of {@link requestedTarget}. Absent on items captured by
995
+ * 0.6.2 and earlier, whose target reading is historical and evaluated by the
996
+ * upgrade eligibility check rather than re-interpreted.
997
+ */
998
+ targetSource?: TargetSource;
999
+ /**
1000
+ * 0.6.3 K4: set by the upgrade eligibility check when this record cannot be
1001
+ * inherited as a current pass. It never overwrites the historical status.
1002
+ */
1003
+ needsReview?: NeedsReviewFact;
736
1004
  authority?: "root_instruction" | "root_adoption" | "legacy_authority_unclassified";
737
1005
  legacyFlags?: Array<"legacy_generic_run" | "legacy_authority_unclassified">;
738
1006
  /** v0.5 intent layer: inquiries keep the obligation but are not machine certifiable. */
739
- taskKind?: "inquiry" | "action";
1007
+ taskKind?: "inquiry" | "action" | "context";
1008
+ /** V6 root-sourced read-only method, bound to the unique earlier obligation
1009
+ * in this same root. A tool name alone is never an execution authority. */
1010
+ observerMethod?: {
1011
+ tools: Array<"context_guard_observe_file" | "context_guard_observe_test_readiness">;
1012
+ targetItemIds: string[];
1013
+ };
740
1014
  /**
741
1015
  * v0.5.1 interpretation layer, derived from the same source bytes as
742
1016
  * {@link normalizedText} by `domain/semantics.ts`. These fields record what
@@ -747,6 +1021,14 @@ interface GuardItem {
747
1021
  directive?: DirectiveClass;
748
1022
  executee?: Executee;
749
1023
  authorityDisposition?: AuthorityDisposition;
1024
+ /**
1025
+ * 0.6.3 (narrowed contract): whether this reading may host execution authority.
1026
+ * Established ONCE by the reader, before any partition, and inherited by every
1027
+ * child the partition produces. Absent on records captured before the
1028
+ * qualification existed: the gate and preparation refuse those rather than
1029
+ * reading their stored disposition as permission.
1030
+ */
1031
+ executionQualification?: ExecutionQualification;
750
1032
  /** The unresolved condition guarding a `conditional_wait` item. */
751
1033
  condition?: string;
752
1034
  /** The event that ends a human wait, when the source names one. */
@@ -775,6 +1057,13 @@ interface GuardItem {
775
1057
  */
776
1058
  rawTextSha256?: string;
777
1059
  spans?: SourceSpan[];
1060
+ /** V6 only: a required child relation captured from direct coordination in
1061
+ * the original root, never inferred from a later control or old state. */
1062
+ rootDependency?: {
1063
+ parentItemId: string;
1064
+ rawTextSha256: string;
1065
+ sourceSpan: SourceSpan;
1066
+ };
778
1067
  /**
779
1068
  * 0.6.0 work-unit assignment (C04), present only for obligations captured
780
1069
  * after a v5 protocol boundary in a non-delegated session. Legacy items keep
@@ -850,6 +1139,19 @@ interface GuardEvidence {
850
1139
  reasonCode?: string;
851
1140
  adapterId?: string;
852
1141
  adapterVersion?: string;
1142
+ /** Current-version native readback is causally tied to a persisted host effect call. */
1143
+ causedByCallId?: string;
1144
+ nativeCanonicalPath?: string;
1145
+ nativeCanonicalBase?: string;
1146
+ nativeGitTreeOid?: string;
1147
+ nativeGitParentOid?: string;
1148
+ readinessForItemId?: string;
1149
+ readinessPredicate?: string;
1150
+ readinessManifestSha256?: string;
1151
+ readinessEffectCallId?: string;
1152
+ readinessSelectedPath?: string;
1153
+ readinessScriptName?: string;
1154
+ readinessInputSha256?: string;
853
1155
  externalOperationRef?: ExternalOperation;
854
1156
  /**
855
1157
  * 0.6.2 D062-02: the LAYERED reading of a shell result, kept beside — never
@@ -916,10 +1218,19 @@ interface GuardCheckpoint {
916
1218
  openDigest: string;
917
1219
  evidenceSha256: string;
918
1220
  bindingDigest: string;
1221
+ /** v3 DSH-native certificate extension; older certificate bytes stay intact. */
1222
+ nativeObservations?: {
1223
+ schema: "dsh.native-observation/v1" | "dsh.native-observation/v2";
1224
+ digests: string[];
1225
+ };
1226
+ /** V6-only, root-time Session locator identity; outside historical digest_v3. */
1227
+ rootLocatorIdentity?: string;
919
1228
  bindings: EvidenceBinding[];
920
1229
  goalRef?: GoalRef;
921
1230
  certificationDigest: string;
922
1231
  result: "certified" | "incomplete" | "unknown";
1232
+ /** Derived persisted result watermark; excluded from historical certificate bytes. */
1233
+ recordedAtSeq?: number;
923
1234
  /**
924
1235
  * 0.6.0 v2 certificate (v5 sessions only): the unit whose closure was
925
1236
  * certified. Version-1 certificates keep the whole-session contract and
@@ -998,6 +1309,8 @@ interface ExternalOperation {
998
1309
  }
999
1310
  interface GuardProjection {
1000
1311
  enabled: boolean;
1312
+ /** Explicit root /context-guard on adoption, never inferred from installation or always observation. */
1313
+ goalCompletionAdopted: boolean;
1001
1314
  epoch: number;
1002
1315
  contractRevision: number;
1003
1316
  rebindProposals: Map<string, RebindProposal>;
@@ -1017,7 +1330,29 @@ interface GuardProjection {
1017
1330
  * `undefined` (legacy) before it. Determines certificate version, closure
1018
1331
  * scope, and whether delivery/unit semantics are active.
1019
1332
  */
1020
- boundaryProtocol?: 5;
1333
+ boundaryProtocol?: 5 | 6;
1334
+ v6BoundarySeq?: number;
1335
+ /** Root-time locator bases from the durable Session header, never a later tool cwd. Windows relative resolution remains unavailable. */
1336
+ rootLocatorContexts: Map<number, {
1337
+ base: string;
1338
+ flavor: "posix" | "windows";
1339
+ sha256: string;
1340
+ }>;
1341
+ /** V6 identity domain binds root bytes, original locator base and Session identity. */
1342
+ rootLocatorIdentity?: string;
1343
+ /** Shared core/v2 projection from confirmed Session sources; absent when the adapter lacks exact source coverage. */
1344
+ coreV2?: Record<string, unknown>;
1345
+ /** Display-only producer relation for derived core requirements (for example
1346
+ * one observer method split into separately sourced tool predicates). It is
1347
+ * rebuilt with coreV2 from the same Session snapshot and is never authority. */
1348
+ coreV2RequirementOrigins?: Map<string, {
1349
+ itemId: string;
1350
+ action: string;
1351
+ target: string;
1352
+ sourceStart: number;
1353
+ sourceEnd: number;
1354
+ }>;
1355
+ coreV2Reason?: "source_not_projectable" | "projection_failed";
1021
1356
  /** 0.6.0 responsibility tier (C06), from the effective configuration. */
1022
1357
  policy: "standard" | "strict" | "release";
1023
1358
  /** 0.6.0 C01 coverage summaries, one per captured root message (last 16). */
@@ -1069,6 +1404,9 @@ interface GuardProjection {
1069
1404
  }>;
1070
1405
  sessionRefDigest: string;
1071
1406
  hostLockDigest: string;
1407
+ /** Runtime-only active renderer byte attestation. Never inferred from text
1408
+ * or a package version, and rebound on every projection/reload. */
1409
+ auditedForegroundRenderers?: Array<"bash" | "pwsh">;
1072
1410
  hostStatus: HostStatus;
1073
1411
  hostReasonCode?: string;
1074
1412
  /** Readback of the audited cohort bound into `hostLockDigest`. */
@@ -1162,6 +1500,7 @@ interface DeriveResult {
1162
1500
  protocolV4Present: boolean;
1163
1501
  /** True when the durable log carries the 0.6 first-step protocol boundary. */
1164
1502
  boundaryV5: boolean;
1503
+ boundaryV6: boolean;
1165
1504
  }
1166
1505
  interface DerivedEnvelope {
1167
1506
  seq: number;
@@ -1249,6 +1588,13 @@ interface CaptureScope {
1249
1588
  /** Session working directory; used as the scope subject when no artifact path is named. */
1250
1589
  cwd?: string;
1251
1590
  }
1591
+ /**
1592
+ * The repository an obligation resolves to when the root wrote no repository
1593
+ * at all (0.6.3 K2). The environment default is preserved so a later
1594
+ * work-unit inheritance decision can evaluate it, but it is never reported as
1595
+ * a resolved user selection.
1596
+ */
1597
+ declare function environmentDefaultRepositoryTarget(action: SemanticAction, subject: string): TargetTuple | undefined;
1252
1598
  declare function extractArtifactPaths(text: string): string[];
1253
1599
  /**
1254
1600
  * Split a single human message into independently tracked clauses. Sentence
@@ -1341,18 +1687,6 @@ declare function isFrozenV042RebindResponse(recorded: unknown): boolean;
1341
1687
  //#endregion
1342
1688
  //#region src/domain/conversation.d.ts
1343
1689
  type UserInteractionKind = "instruction" | "conversational";
1344
- /**
1345
- * Classify a direct user message (or one clause of it) as an actionable
1346
- * `instruction` or a session-layer `conversational` utterance. Only
1347
- * conversational results drop capture, so the classifier fails closed:
1348
- * everything it cannot confidently recognize as session-layer talk stays an
1349
- * instruction and is captured exactly as before.
1350
- *
1351
- * Order matters: progression and prohibition leads first, then strong task
1352
- * features (artifact path, explicit method, or a non-negated operation verb
1353
- * outside progression/meta spans), then the meta-question and meta-comment
1354
- * forms, and finally a progression lead over a featureless remainder.
1355
- */
1356
1690
  declare function classifyUserInteraction(text: string): UserInteractionKind;
1357
1691
  type TaskIntent = "inquiry" | "action";
1358
1692
  /**
@@ -1536,6 +1870,10 @@ interface HostCapabilityEvaluation {
1536
1870
  interface HostLockEvaluation {
1537
1871
  status: HostLockStatus;
1538
1872
  digest: string;
1873
+ /** Read-only byte attestation of the active foreground shell renderer and
1874
+ * its shared terminal decoder. Set only by production active-graph readback;
1875
+ * the package version/SRI graph alone does not establish renderer behavior. */
1876
+ auditedForegroundRenderers?: Array<"bash" | "pwsh">;
1539
1877
  goalAvailable: boolean;
1540
1878
  reasonCode?: "host_lock_migration_required" | "host_lock_installed_graph_drift" | "host_lock_missing" | "host_lock_version_mismatch" | "host_lock_version_below_minimum" | "host_lock_version_unparseable" | "host_lock_integrity_mismatch" | "host_lock_unknown_package" | "host_lock_duplicate_package" | "host_lock_goal_graph_incomplete" | "host_lock_goal_capability_mismatch" | "host_lock_cohort_mixed_graph" | "host_lock_cohort_unbound_identity" | "host_lock_cohort_platform_not_audited";
1541
1879
  packages: PackageRow[];
@@ -1681,6 +2019,27 @@ declare const PROTOCOL_V4_NOTICE = "Context Guard protocol boundary: v4.0.0";
1681
2019
  * fail direction on rollback is closed, never a misread.
1682
2020
  */
1683
2021
  declare const PROTOCOL_V5_NOTICE = "Context Guard protocol boundary: v5.0.0";
2022
+ declare const PROTOCOL_V6_NOTICE = "Context Guard protocol boundary: v6.0.0";
2023
+ /**
2024
+ * The pure upgrade-eligibility predicate: the records in the current closure
2025
+ * scope that may NOT be inherited as a current pass, with the reason that
2026
+ * disqualifies each. Exported so the rule can be tested and read back directly,
2027
+ * never to let a caller skip it.
2028
+ */
2029
+ declare function legacyRecordsNeedingReview(projection: GuardProjection): Array<{
2030
+ itemId: string;
2031
+ reason: NeedsReviewReason;
2032
+ }>;
2033
+ /**
2034
+ * Apply the 0.6.3 eligibility pass to an already-derived projection.
2035
+ *
2036
+ * This is the upgrade entry: it re-checks the records a session already holds
2037
+ * after an EVENT-SOURCED reading has been applied to them. It is idempotent —
2038
+ * a project already marked keeps its original reason and revision — and it is
2039
+ * the same function the derivation runs, so a replay and an in-place upgrade
2040
+ * cannot disagree.
2041
+ */
2042
+ declare function applyUpgradeEligibility(projection: GuardProjection): void;
1684
2043
  /**
1685
2044
  * Pure, deterministic re-derivation of the guard projection from the DSH
1686
2045
  * native event log. Context Guard never writes custom session events, so every
@@ -1688,6 +2047,7 @@ declare const PROTOCOL_V5_NOTICE = "Context Guard protocol boundary: v5.0.0";
1688
2047
  * `tool/result`, `tool/ptc-dispatch-start`, `tool/ptc-dispatch`, and
1689
2048
  * `compaction/summary`.
1690
2049
  */
2050
+ declare function rootLocatorFlavor(cwd: string): "posix" | "windows" | undefined;
1691
2051
  declare function deriveProjection(sourceEvents: readonly DerivedEnvelope[], config: DeriveConfig, scope: DeriveScope, durableConfirmed: boolean, hostLock?: HostLockEvaluation): DeriveResult;
1692
2052
  //#endregion
1693
2053
  //#region src/domain/reason-class.d.ts
@@ -1785,10 +2145,20 @@ interface ToolCallInput {
1785
2145
  interface ToolResultInput {
1786
2146
  seq: number;
1787
2147
  error?: unknown;
2148
+ /** A persisted return exists but its tool-result identity or status is not trustworthy. */
2149
+ untrusted?: boolean;
1788
2150
  meta?: unknown;
1789
2151
  textContent: string;
1790
2152
  }
1791
2153
  declare function extractTextContent(content: readonly unknown[]): string;
2154
+ /**
2155
+ * DSH persists the host return flag on a nested `tool-result` block. The
2156
+ * surrounding message or event need not carry an `error` field (approval and
2157
+ * sandbox denials are examples). Never let a renderer's missing exit marker
2158
+ * override that structured return, or accept an ambiguous nested return as
2159
+ * a clean result for another call.
2160
+ */
2161
+ declare function persistedToolResultStatus(data: unknown, callId: string, kind?: "tool/result" | "tool/ptc-dispatch", matchedStart?: boolean): "clean" | "failure" | "unknown";
1792
2162
  interface ToolOperation {
1793
2163
  op: GuardOperation;
1794
2164
  path?: string;
@@ -1811,6 +2181,18 @@ interface ToolSubject {
1811
2181
  reasonCode?: string;
1812
2182
  adapterId?: string;
1813
2183
  adapterVersion?: string;
2184
+ causedByCallId?: string;
2185
+ nativeCanonicalPath?: string;
2186
+ nativeCanonicalBase?: string;
2187
+ nativeGitTreeOid?: string;
2188
+ nativeGitParentOid?: string;
2189
+ readinessForItemId?: string;
2190
+ readinessPredicate?: string;
2191
+ readinessManifestSha256?: string;
2192
+ readinessEffectCallId?: string;
2193
+ readinessSelectedPath?: string;
2194
+ readinessScriptName?: string;
2195
+ readinessInputSha256?: string;
1814
2196
  /** 0.6.2 D062-02: the layered shell reading, present only for shell tools. */
1815
2197
  processFacts?: DerivedProcessFacts;
1816
2198
  externalOperationRef?: ExternalOperation;
@@ -1820,7 +2202,7 @@ declare function evidenceFromPersistedToolResult(call: ToolCallInput, result: To
1820
2202
  declare function withDurability(evidence: GuardEvidence, confirmed: boolean): GuardEvidence;
1821
2203
  //#endregion
1822
2204
  //#region src/domain/goal-gate.d.ts
1823
- declare function hasCurrentCertificate(projection: GuardProjection): boolean;
2205
+ declare function hasCurrentCertificate(projection: GuardProjection, historicalReplay?: boolean): boolean;
1824
2206
  /**
1825
2207
  * Denies `update_goal(action=complete)` while the guard is enabled and no
1826
2208
  * current completion certificate exists. The gate itself has no bypass; a
@@ -2049,6 +2431,22 @@ interface ActiveProfileHostLock {
2049
2431
  * Used by target preflight before a legacy profile can be migrated.
2050
2432
  */
2051
2433
  declare function readActiveHostGraph(runtimeRoot: string, profileRoot: string): PackageRow[];
2434
+ declare function activeRendererModule(nodeModulesRoot: string, name: string): {
2435
+ bytes: string;
2436
+ path: string;
2437
+ } | undefined;
2438
+ /** Verify active, reachable producer bytes without reading credentials or
2439
+ * accepting historical package-map entries. Missing/ambiguous paths fail
2440
+ * closed for the ordinary markerless-test shortcut. */
2441
+ declare function auditedForegroundRenderers(runtimeRoot: string, profileRoot: string): Array<"bash" | "pwsh">;
2442
+ /** Exact active implementation route for call-time omitted-workdir evidence. */
2443
+ declare function auditedDefaultWorkdirHost(runtimeRoot: string, profileRoot: string, tool: "bash" | "pwsh"): boolean;
2444
+ /**
2445
+ * The active graph alone does not prove which shell service this Agent uses.
2446
+ * Match the scoped service's exact constructor to the audited active module,
2447
+ * rejecting another provider with the same public service interface/name.
2448
+ */
2449
+ declare function auditedDefaultWorkdirProvider(runtimeRoot: string, profileRoot: string, tool: "bash" | "pwsh", provider: unknown, policyProvider?: unknown): Promise<boolean>;
2052
2450
  interface TargetHostGraph {
2053
2451
  packages: PackageRow[];
2054
2452
  profileGraph: {
@@ -2115,6 +2513,8 @@ interface FirstStepPreviewInput {
2115
2513
  enabled: boolean;
2116
2514
  /** The durable log already contains a v5 (0.6) Guard boundary. */
2117
2515
  boundaryV5Present?: boolean;
2516
+ boundaryV6Present?: boolean;
2517
+ targetProtocol?: 5 | 6;
2118
2518
  /** The durable log already contains a v4 (or newer) Guard boundary. */
2119
2519
  boundaryPresent: boolean;
2120
2520
  /** The session is a delegated/subagent session, never a root conversation. */
@@ -2146,6 +2546,7 @@ declare function previewFirstStepInjection(input: FirstStepPreviewInput, claimed
2146
2546
  */
2147
2547
  declare function firstStepGuidance(policy?: "standard" | "strict" | "release"): string;
2148
2548
  declare const FIRST_STEP_GUIDANCE: string;
2549
+ declare function firstStepGuidanceV6(policy?: "standard" | "strict" | "release"): string;
2149
2550
  /**
2150
2551
  * Lifecycle phase derived from durable facts. `enabled` is the log-derived
2151
2552
  * enablement (`always`, or the explicit `on`/`off` command sequence), and
@@ -2588,6 +2989,25 @@ interface AssistantOutcomeObservation {
2588
2989
  kind: "completion_claim" | "user_wait_claim" | "external_wait_claim" | "report";
2589
2990
  reasonCode: string;
2590
2991
  }
2992
+ interface CurrentActionBasis {
2993
+ itemId: string;
2994
+ action: string;
2995
+ sourceMessageId: string;
2996
+ unmetPredicate: string;
2997
+ owner: "assistant";
2998
+ readiness: "ready";
2999
+ asOf: number;
3000
+ }
3001
+ /** A concrete, current root-owned action, with host capability and no pending
3002
+ * condition. Historical generic text and old qualifications are not upgraded. */
3003
+ declare function testOutcomePredicate(text: string): string;
3004
+ /** v6 root outcome intent: running and reporting a named test is distinct
3005
+ * from an explicit request to make it pass. A failed run can finish the first
3006
+ * duty, while the second remains unmet; neither reading grants repair scope. */
3007
+ declare function v6TestPredicate(text: string): "test_run_completed" | "test_passed";
3008
+ declare function assessmentOutcomePredicate(text: string): string;
3009
+ declare function assessmentAction(text: string): string;
3010
+ declare function currentActionBases(projection: GuardProjection, enforceCore?: boolean): CurrentActionBasis[];
2591
3011
  /** Assistant prose is retained only as a bounded diagnostic observation. */
2592
3012
  declare function observeAssistantOutcome(text: string): AssistantOutcomeObservation;
2593
3013
  /**
@@ -2597,7 +3017,7 @@ declare function observeAssistantOutcome(text: string): AssistantOutcomeObservat
2597
3017
  * one fallback correction; subsequent attempts safe-yield. An active, armed
2598
3018
  * Goal remains exclusively owned by the host Goal Round Driver.
2599
3019
  */
2600
- declare function decideTurnBoundary(projection: GuardProjection): TurnStoppingDecision;
3020
+ declare function decideTurnBoundary(projection: GuardProjection, latestRootText?: string): TurnStoppingDecision;
2601
3021
  declare function decideTurnStopping(projection: GuardProjection, _assistantText: string, _turn: number, _maxAttempts: number): TurnStoppingDecision;
2602
3022
  /**
2603
3023
  * Whether the last trusted ROOT instruction asked to pause.
@@ -2628,4 +3048,12 @@ declare function latestAssistantText(events: readonly {
2628
3048
  //#region src/domain/supersession.d.ts
2629
3049
  declare function supersedeItem(items: Map<string, GuardItem>, oldId: string, replacement: GuardItem): boolean;
2630
3050
  //#endregion
2631
- export { ProofSurface as $, ScopeInterpretation as $a, GuardItemStatus as $i, deriveProjection as $n, TaskIntent as $r, GIT_COMMAND_MANIFEST_IDS as $t, MIN_RECOVERY_CHAR_BUDGET as A, CapabilityFact as Aa, AssetObligation as Ai, ToolCallInput as An, semanticActionFromText as Ao, evaluateExternalWaitCapability as Ar, ClaimedMessage as At, PROOF_KINDS as B, ProcessOutcomeReason as Ba, EvidenceBinding as Bi, Repairability as Bn, ParsedHostVersion as Br, HostProfileError as Bt, RC015_RC2_HOST_PACKAGES as C, confirmRebind as Ca, GoalActivationState as Ci, ShellParseStatus as Cn, actionCompatible as Co, HostLockStatus as Cr, evidenceMatchesItem as Ct, CLEANUP_CONDITION_RULE_COMPACT as D, rebindAttemptKey as Da, isCurrentAcceptedBoundary as Di, parseShellCommand as Dn, requestedTargetAuthorizesMutation as Do, LEGACY_HOST_COHORTS as Dr, ManifestIssue as Dt, CLEANUP_CONDITION_RULE as E, proposeRebindV042 as Ea, effectuateBoundary as Ei, parsePwshCommand as En, requestedIdentityKey as Eo, HostToolSurface as Er, CommandSurfaceManifest as Et, openItems as F, DependencyStatus as Fa, DelegationRef as Fi, extractToolSubject as Fn, normalizeClause as Fo, selectHostCohort as Fr, claimedBatchHasRealRootInput as Ft, ProofHostSurface as G, capabilityFactOf as Ga, ExternalOperation as Gi, evidenceAvailabilityReason as Gn, parseHostVersion as Gr, injectActiveProfileHostLock as Gt, PROOF_MANIFEST_DOMAIN_V2 as H, actionHasCertificationPath as Ha, EvidenceParseStatus as Hi, UnifiedItemDiagnosis as Hn, SUPPORTED_HOST_VERSIONS as Hr, combineHostPolicy as Ht, recoveryDigest as I, DerivedProcessFacts as Ia, DeriveConfig as Ii, isDeterministicCheck as In, sanitizeClauseText as Io, HostVersionDecision as Ir, firstStepGuidance as It, ProofKindV2 as J, removalIsPartiallyKnown as Ja, GuardCheckpoint as Ji, CAPTURE_V042_NOTICE as Jn, AuthorityBlock as Jr, packageRowsFromPnpmLock as Jt, ProofKind as K, partialFailureOf as Ka, GoalRef as Ki, itemDiagnosis as Kn, satisfiesSupportedHostRange as Kr, inspectTargetHostGraph as Kt, renderRecoveryPacket as L, OperationAttribution as La, DeriveResult as Li, withDurability as Ln, sanitizeUrl as Lo, HostVersionStatus as Lr, lifecyclePhase as Lt, carriesCleanupCondition as M, CapabilityRemedy as Ma, BoundaryDisposition as Mi, ToolSubject as Mn, validateActionTarget as Mo, evaluateHostLock as Mr, FirstStepInjection as Mt, cleanupConditionFor as N, DEPENDENCY_FREE_ONLY_CONDITION as Na, BoundaryQualificationKind as Ni, evidenceFromPersistedToolResult as Nn, canonicalizePath as No, evaluateToolSurfaceCapability as Nr, FirstStepPreviewInput as Nt, CLEANUP_CONDITION_RULE_SHORT as O, rebindResponse as Oa, qualifyBoundary as Oi, goalCompletionDenial as On, requestedTargetMatchesResolved as Oo, bindExecutableIdentity as Or, OperationVerbEntry as Ot, closingHint as P, DeclaredOperationResult as Pa, DeferAuthorization as Pi, extractTextContent as Pn, digestStrings as Po, hostVersionFromPackages as Pr, LifecyclePhase as Pt, ProofObligationV2 as Q, InterpretOptions as Qa, GuardItemKind as Qi, PROTOCOL_V5_NOTICE as Qn, segmentAuthorityBlocks as Qr, verifyComposedHostLockDump as Qt, ALPHA3_HOST_PACKAGES as R, ProcessExitStatus as Ra, DeriveScope as Ri, CertificationSupport as Rn, sha256 as Ro, LATEST_SUPPORTED_HOST_VERSION as Rr, previewFirstStepInjection as Rt, snapshotSessionEvents as S, RebindProposal as Sa, BoundaryRequest as Si, ParsedShell as Sn, StatefulAction as So, HostLockEvaluation as Sr, evidenceCoverage as St, RC1_HOST_PACKAGES as T, proposeRebindOutcome as Ta, availableBoundaryQualifications as Ti, isRunExecutable as Tn, isStatefulAction as To, HostProfileKind as Tr, COMMAND_SURFACE_MANIFEST as Tt, PROOF_PROTOCOL_VERSION as U, admissibleForRemoval as Ua, EvidenceRole as Ui, capabilityRemedyPhrase as Un, compareHostVersions as Ur, hostLockContextFromComposedDump as Ut, PROOF_KINDS_V2 as V, RemovalOutcomeReport as Va, EvidenceOutcome as Vi, TaskKind as Vn, SUPPORTED_HOST_RANGE as Vr, TargetHostGraph as Vt, PROOF_PROTOCOL_VERSION_V2 as W, capabilityConsequence as Wa, ExpectedTransition as Wi, deriveItemDiagnosis as Wn, evaluateMinimumHostVersion as Wr, hostLockRowsFromComposedDump as Wt, ProofManifestV2 as X, DirectiveClass as Xa, GuardIntegrity as Xi, PROTOCOL_V3_NOTICE as Xn, AuthorityKind as Xr, resolveActiveProfileHostLock as Xt, ProofManifest as Y, AuthorityDisposition as Ya, GuardEvidence as Yi, DEFAULT_DELEGATION_TOOL_NAMES as Yn, AuthorityBlockKind as Yr, readActiveHostGraph as Yt, ProofObligation as Z, Executee as Za, GuardItem as Zi, PROTOCOL_V4_NOTICE as Zn, authorityCaptureCounts as Zr, resolveInstalledHostLock as Zt, progressFingerprint as _, ReleaseOperation as _a, extractOperation as _i, parseGitCommandManifest as _n, STATEFUL_ACTIONS as _o, HostCapabilityRequest as _r, sessionQueryV2 as _t, NO_PROGRESS_RECORD_PREFIX as a, SourceSpan as aa, isFrozenV042RebindResponse as ai, GitCommandRejected as an, maskCodeSpans as ao, AuditedExecutable as ar, createProofManifest as at, SessionApiError as b, ProposeOutcome as ba, BoundaryEffectuation as bi, CanonicalArgv as bn, SUPPORTED_EVIDENCE_ADAPTERS as bo, HostCohortSelectionReason as br, EvidenceFacetCoverage as bt, classifyCompletionClaim as c, TargetTuple as ca, RejectedBinding as ci, GitPrestateCheck as cn, statefulActionsOfScope as co, EXPECTED_HOST_PACKAGES as cr, proofDigest as ct, decisionBoundaryKey as d, WaitAuthorization as da, ClauseSegment as di, LinearCommitReadback as dn, ActionManifest as do, GOAL_HOST_PACKAGES as dr, proofHostSurfacesOf as dt, GuardOperation as ea, UserInteractionKind as ei, GIT_COMMAND_TEMPLATES as en, interpretClause as eo, ACTIVE_HOST_COHORT_ID as er, SessionQuery as et, isRootPauseRequest as f, WorkUnit as fa, captureClause as fi, commitIndexSnapshotDigest as fn, ActionSpec as fo, HOST_CAPABILITY_PACKAGE_GROUPS as fr, proofOperationMatches as ft, observeAssistantOutcome as g, ReleaseObservedIdentity as ga, extractMethod as gi, gitCommandMatchesTarget as gn, SEMANTIC_ACTIONS as go, HostCapabilityId as gr, sessionQuery as gt, latestRootInstruction as h, ReleaseGateDecision as ha, extractArtifactPaths as hi, executeRevalidatedGitEffect as hn, CERTIFICATE_VERSION_V2 as ho, HostCapabilityEvaluation as hr, scopeCoverageDigest as ht, CompletionDisposition as i, PersistenceAuthorization as ia, ParsedConfirmation as ii, GitCommandParseResult as in, kindOfScope as io, ALPHA2_HOST_PACKAGES as ir, canonicalProjection as it, RecoveryOptions as j, CapabilityGap as ja, BindingActionClosure as ji, ToolResultInput as jn, validateActionManifest as jo, evaluateHostCapability as jr, FIRST_STEP_GUIDANCE as jt, DEFAULT_RECOVERY_CHAR_BUDGET as k, replayRebindResult as ka, AssetInterpretationFact as ki, hasCurrentCertificate as kn, semanticActionFromCommand as ko, bindLiveGoalCapability as kr, validateManifest as kt, decideTurnBoundary as l, TargetValue as la, certifyCheckpoint as li, GitPrestateEnvelope as ln, ACTION_MANIFEST as lo, ExecutableIdentity as lr, proofDigestV2 as lt, latestAssistantText as m, PackageRow as ma, classifyClause as mi, createGitPrestateEnvelope as mn, CERTIFICATE_VERSION as mo, HostAuditProvenance as mr, requiredSubjectsOf as mt, AssistantOutcomeObservation as n, HostStatus as na, classifyUserInteraction as ni, GitCommandAccepted as nn, isExecutableItem as no, ACTIVE_HOST_LAUNCHER_VERSION as nr, bindProofToProjection as nt, NO_PROGRESS_TURNS_BEFORE_STOP as o, TargetCaptureReasonCode as oa, parseConfirmationMessage as oi, GitEffectExecution as on, namedActions as oo, BASE_HOST_PACKAGES as or, createProofManifestV2 as ot, isWholeTaskCompletionClaim as p, createProjection as pa, captureItem as pi, commitTreeSnapshotDigest as pn, BOUNDED_ARTIFACT_TYPES as po, HOST_COHORTS as pr, proofV2Rejection as pt, ProofKindCapability as q, removalIsComplete as qa, GuardBoundary as qi, relevantEvidence as qn, currentContractDigest as qr, packageRowsFromActiveGraph as qt, CONTROL_RECORD_PREFIX as r, MessageCoverage as ra, CONFIRM_LINE_PATTERN as ri, GitCommandManifest as rn, isOpenObligation as ro, ALPHA2_DSHMARKET_139_HOST_PACKAGES as rr, bindProofV2ToProjection as rt, TurnStoppingDecision as s, TargetCaptureStatus as sa, CheckpointResult as si, GitEffectRunner as sn, semanticActionOfScope as so, DEFAULT_HOST_LOCK as sr, proofCapabilityReport as st, supersedeItem as t, GuardProjection as ta, classifyTaskIntent as ti, GitAdapterAction as tn, interpretMessage as to, ACTIVE_HOST_COHORT_IDS as tr, SessionQueryV2 as tt, decideTurnStopping as u, VerificationContract as ua, CaptureScope as ui, GitTargetIdentity as un, ACTION_MANIFEST_VERSION as uo, ExecutableIdentityBinding as ur, proofEvidenceConstraints as ut, SESSION_API_UNSUPPORTED as v, ReleaseSettlement as va, isInformationalMessage as vi, revalidateGitPrestate as vn, STOP_PROTOCOL_VERSION as vo, HostCohort as vr, validateProofManifest as vt, RC015_HOST_PACKAGES as w, proposeRebind as wa, GoalBoundaryAccess as wi, canonicalArgvFromCommand as wn, boundedArtifactChoiceMatches as wo, HostPlatform as wr, isVerifyingCapability as wt, V3SessionLike as x, RebindArgs as xa, BoundaryQualification as xi, CanonicalCommandSurface as xn, SemanticAction as xo, HostLockContext as xr, bindingSatisfies as xt, SESSION_EVENT_ENVELOPE_INVALID as y, BoundedSource as ya, segmentClauses as yi, verifiedLinearCommitReadback as yn, STOP_PROTOCOL_VERSION_V2 as yo, HostCohortSelection as yr, validateProofManifestV2 as yt, PROOF_CAPABILITY_MATRIX as z, ProcessFactSource as za, DerivedEnvelope as zi, DiagnosisNextAction as zn, MIN_SUPPORTED_HOST_VERSION as zr, ActiveProfileHostLock as zt };
3051
+ //#region src/core-v2/project.d.ts
3052
+ type Row = Record<string, any>;
3053
+ /** Pure, host-neutral core/v2 projection. The adapter owns event trust and durability. */
3054
+ declare function projectCoreV2(snapshot: Row): Row;
3055
+ //#endregion
3056
+ //#region src/core-v2/session.d.ts
3057
+ declare function projectSessionCoreV2(events: DerivedEnvelope[], projection: GuardProjection, displayOrigins?: NonNullable<GuardProjection["coreV2RequirementOrigins"]>): Record<string, unknown> | undefined;
3058
+ //#endregion
3059
+ export { ProofHostSurface as $, CapabilityFact as $a, DeferAuthorization as $i, DiagnosisNextAction as $n, opensConditionLead as $o, selectHostCohort as $r, auditedDefaultWorkdirProvider as $t, snapshotSessionEvents as A, TargetSourceKind as Aa, captureClause as Ai, parseGitCommandManifest as An, clauseAsksOwnQuestion as Ao, HOST_CAPABILITY_PACKAGE_GROUPS as Ar, semanticActionFromCommand as As, evidenceCoverage as At, carriesCleanupCondition as B, ReleaseOperation as Ba, BoundaryQualification as Bi, parseShellCommand as Bn, introducesActionClause as Bo, HostLockEvaluation as Br, FirstStepInjection as Bt, progressFingerprint as C, NeedsReviewFact as Ca, isFrozenV042RebindResponse as Ci, GitTargetIdentity as Cn, InterpretOptions as Co, AuditedExecutable as Cr, StatefulAction as Cs, scopeCoverageDigest as Ct, SESSION_EVENT_ENVELOPE_INVALID as D, TargetCaptureReasonCode as Da, certifyCheckpoint as Di, createGitPrestateEnvelope as Dn, ScopeInterpretation as Do, ExecutableIdentity as Dr, requestedIdentityKey as Ds, validateProofManifestV2 as Dt, SESSION_API_UNSUPPORTED as E, SourceSpan as Ea, RejectedBinding as Ei, commitTreeSnapshotDigest as En, QualificationStatus as Eo, EXPECTED_HOST_PACKAGES as Er, isStatefulAction as Es, validateProofManifest as Et, CLEANUP_CONDITION_RULE_COMPACT as F, WorkUnit as Fa, extractMethod as Fi, ParsedShell as Fn, hasOrderedCoordination as Fo, HostCapabilityRequest as Fr, digestStrings as Fs, ManifestIssue as Ft, renderRecoveryPacket as G, RebindProposal as Ga, effectuateBoundary as Gi, ToolSubject as Gn, isQuestionScopeNeedingReview as Go, LEGACY_HOST_COHORTS as Gr, firstStepGuidanceV6 as Gt, closingHint as H, BoundedSource as Ha, GoalActivationState as Hi, hasCurrentCertificate as Hn, isExplanationScope as Ho, HostPlatform as Hr, LifecyclePhase as Ht, CLEANUP_CONDITION_RULE_SHORT as I, createProjection as Ia, extractOperation as Ii, ShellParseStatus as In, hasQuestionScope as Io, HostCohort as Ir, normalizeClause as Is, OperationVerbEntry as It, PROOF_KINDS as J, proposeRebindOutcome as Ja, AssetInterpretationFact as Ji, extractToolSubject as Jn, kindOfScope as Jo, evaluateExternalWaitCapability as Jr, ActiveProfileHostLock as Jt, ALPHA3_HOST_PACKAGES as K, confirmRebind as Ka, isCurrentAcceptedBoundary as Ki, evidenceFromPersistedToolResult as Kn, isRestatement as Ko, bindExecutableIdentity as Kr, lifecyclePhase as Kt, DEFAULT_RECOVERY_CHAR_BUDGET as L, PackageRow as La, isInformationalMessage as Li, canonicalArgvFromCommand as Ln, hasWorkPredicate as Lo, HostCohortSelection as Lr, sanitizeClauseText as Ls, validateManifest as Lt, RC015_HOST_PACKAGES as M, TargetValue as Ma, classifyClause as Mi, verifiedLinearCommitReadback as Mn, clauseIsProtected as Mo, HostAuditProvenance as Mr, validateActionManifest as Ms, isVerifyingCapability as Mt, RC1_HOST_PACKAGES as N, VerificationContract as Na, environmentDefaultRepositoryTarget as Ni, CanonicalArgv as Nn, explanationHasActionResidue as No, HostCapabilityEvaluation as Nr, validateActionTarget as Ns, COMMAND_SURFACE_MANIFEST as Nt, SessionApiError as O, TargetCaptureStatus as Oa, CaptureScope as Oi, executeRevalidatedGitEffect as On, actionVerbMatches as Oo, ExecutableIdentityBinding as Or, requestedTargetAuthorizesMutation as Os, EvidenceFacetCoverage as Ot, CLEANUP_CONDITION_RULE as P, WaitAuthorization as Pa, extractArtifactPaths as Pi, CanonicalCommandSurface as Pn, governedClauseRestrictsExecution as Po, HostCapabilityId as Pr, canonicalizePath as Ps, CommandSurfaceManifest as Pt, PROOF_PROTOCOL_VERSION_V2 as Q, replayRebindResult as Qa, BoundaryQualificationKind as Qi, CertificationSupport as Qn, namedActions as Qo, hostVersionFromPackages as Qr, auditedDefaultWorkdirHost as Qt, MIN_RECOVERY_CHAR_BUDGET as R, ReleaseGateDecision as Ra, segmentClauses as Ri, isRunExecutable as Rn, interpretClause as Ro, HostCohortSelectionReason as Rr, sanitizeUrl as Rs, ClaimedMessage as Rt, observeAssistantOutcome as S, MessageCoverage as Sa, ParsedConfirmation as Si, GitPrestateEnvelope as Sn, GRANTED_QUALIFICATION as So, ALPHA2_HOST_PACKAGES as Sr, SemanticAction as Ss, requiredSubjectsOf as St, v6TestPredicate as T, PersistenceAuthorization as Ta, CheckpointResult as Ti, commitIndexSnapshotDigest as Tn, QualificationReason as To, DEFAULT_HOST_LOCK as Tr, boundedArtifactChoiceMatches as Ts, sessionQueryV2 as Tt, openItems as U, ProposeOutcome as Ua, GoalBoundaryAccess as Ui, ToolCallInput as Un, isInformationalFragment as Uo, HostProfileKind as Ur, claimedBatchHasRealRootInput as Ut, cleanupConditionFor as V, ReleaseSettlement as Va, BoundaryRequest as Vi, goalCompletionDenial as Vn, isExecutableItem as Vo, HostLockStatus as Vr, FirstStepPreviewInput as Vt, recoveryDigest as W, RebindArgs as Wa, availableBoundaryQualifications as Wi, ToolResultInput as Wn, isOpenObligation as Wo, HostToolSurface as Wr, firstStepGuidance as Wt, PROOF_MANIFEST_DOMAIN_V2 as X, rebindAttemptKey as Xa, BindingActionClosure as Xi, persistedToolResultStatus as Xn, maskCodeSpans as Xo, evaluateHostLock as Xr, TargetHostGraph as Xt, PROOF_KINDS_V2 as Y, proposeRebindV042 as Ya, AssetObligation as Yi, isDeterministicCheck as Yn, legacyQuestionReadingIsInformational as Yo, evaluateHostCapability as Yr, HostProfileError as Yt, PROOF_PROTOCOL_VERSION as Z, rebindResponse as Za, BoundaryDisposition as Zi, withDurability as Zn, maskQuotedSpans as Zo, evaluateToolSurfaceCapability as Zr, activeRendererModule as Zt, decisionBoundaryKey as _, GuardItemKind as _a, TaskIntent as _i, GitCommandParseResult as _n, removalIsPartiallyKnown as _o, rootLocatorFlavor as _r, SEMANTIC_ACTIONS as _s, proofDigestV2 as _t, CONTROL_RECORD_PREFIX as a, EvidenceBinding as aa, SUPPORTED_HOST_RANGE as ai, inspectTargetHostGraph as an, DerivedProcessFacts as ao, evidenceAvailabilityReason as ar, restatedContentOf as as, ProofObligation as at, latestAssistantText as b, GuardProjection as ba, classifyUserInteraction as bi, GitEffectRunner as bn, Executee as bo, ACTIVE_HOST_LAUNCHER_VERSION as br, STOP_PROTOCOL_VERSION_V2 as bs, proofOperationMatches as bt, NO_PROGRESS_RECORD_PREFIX as c, EvidenceRole as ca, evaluateMinimumHostVersion as ci, readActiveHostGraph as cn, ProcessFactSource as co, CAPTURE_V042_NOTICE as cr, statefulActionsOfScope as cs, SessionQuery as ct, assessmentAction as d, GoalRef as da, currentContractDigest as di, verifyComposedHostLockDump as dn, actionHasCertificationPath as do, PROTOCOL_V4_NOTICE as dr, ACTION_MANIFEST_VERSION as ds, bindProofV2ToProjection as dt, DelegationRef as ea, HostVersionDecision as ei, auditedForegroundRenderers as en, CapabilityGap as eo, Repairability as er, opensWithDirective as es, ProofKind as et, assessmentOutcomePredicate as f, GuardBoundary as fa, AuthorityBlock as fi, GIT_COMMAND_MANIFEST_IDS as fn, admissibleForRemoval as fo, PROTOCOL_V5_NOTICE as fr, ActionManifest as fs, canonicalProjection as ft, decideTurnStopping as g, GuardItem as ga, segmentAuthorityBlocks as gi, GitCommandManifest as gn, removalIsComplete as go, legacyRecordsNeedingReview as gr, CERTIFICATE_VERSION_V2 as gs, proofDigest as gt, decideTurnBoundary as h, GuardIntegrity as ha, authorityCaptureCounts as hi, GitCommandAccepted as hn, partialFailureOf as ho, deriveProjection as hr, CERTIFICATE_VERSION as hs, proofCapabilityReport as ht, AssistantOutcomeObservation as i, DerivedEnvelope as ia, ParsedHostVersion as ii, injectActiveProfileHostLock as in, DependencyStatus as io, deriveItemDiagnosis as ir, reportingHeadGoverns as is, ProofManifestV2 as it, RC015_RC2_HOST_PACKAGES as j, TargetTuple as ja, captureItem as ji, revalidateGitPrestate as jn, clauseIsGoverned as jo, HOST_COHORTS as jr, semanticActionFromText as js, evidenceMatchesItem as jt, V3SessionLike as k, TargetSource as ka, ClauseSegment as ki, gitCommandMatchesTarget as kn, clarifiedSpanOf as ko, GOAL_HOST_PACKAGES as kr, requestedTargetMatchesResolved as ks, bindingSatisfies as kt, NO_PROGRESS_TURNS_BEFORE_STOP as l, ExpectedTransition as la, parseHostVersion as li, resolveActiveProfileHostLock as ln, ProcessOutcomeReason as lo, DEFAULT_DELEGATION_TOOL_NAMES as lr, verbIsNegated as ls, SessionQueryV2 as lt, currentActionBases as m, GuardEvidence as ma, AuthorityKind as mi, GitAdapterAction as mn, capabilityFactOf as mo, applyUpgradeEligibility as mr, BOUNDED_ARTIFACT_TYPES as ms, createProofManifestV2 as mt, projectCoreV2 as n, DeriveResult as na, LATEST_SUPPORTED_HOST_VERSION as ni, hostLockContextFromComposedDump as nn, DEPENDENCY_FREE_ONLY_CONDITION as no, UnifiedItemDiagnosis as nr, qualificationOfClause as ns, ProofKindV2 as nt, CompletionDisposition as o, EvidenceOutcome as oa, SUPPORTED_HOST_VERSIONS as oi, packageRowsFromActiveGraph as on, OperationAttribution as oo, itemDiagnosis as or, semanticActionOfScope as os, ProofObligationV2 as ot, classifyCompletionClaim as p, GuardCheckpoint as pa, AuthorityBlockKind as pi, GIT_COMMAND_TEMPLATES as pn, capabilityConsequence as po, PROTOCOL_V6_NOTICE as pr, ActionSpec as ps, createProofManifest as pt, PROOF_CAPABILITY_MATRIX as q, proposeRebind as qa, qualifyBoundary as qi, extractTextContent as qn, itemHoldsExecutionAuthority as qo, bindLiveGoalCapability as qr, previewFirstStepInjection as qt, supersedeItem as r, DeriveScope as ra, MIN_SUPPORTED_HOST_VERSION as ri, hostLockRowsFromComposedDump as rn, DeclaredOperationResult as ro, capabilityRemedyPhrase as rr, questionHeadsClause as rs, ProofManifest as rt, CurrentActionBasis as s, EvidenceParseStatus as sa, compareHostVersions as si, packageRowsFromPnpmLock as sn, ProcessExitStatus as so, relevantEvidence as sr, splitTextFragments as ss, ProofSurface as st, projectSessionCoreV2 as t, DeriveConfig as ta, HostVersionStatus as ti, combineHostPolicy as tn, CapabilityRemedy as to, TaskKind as tr, presentExplanationHead as ts, ProofKindCapability as tt, TurnStoppingDecision as u, ExternalOperation as ua, satisfiesSupportedHostRange as ui, resolveInstalledHostLock as un, RemovalOutcomeReport as uo, PROTOCOL_V3_NOTICE as ur, ACTION_MANIFEST as us, bindProofToProjection as ut, isRootPauseRequest as v, GuardItemStatus as va, UserInteractionKind as vi, GitCommandRejected as vn, AuthorityDisposition as vo, ACTIVE_HOST_COHORT_ID as vr, STATEFUL_ACTIONS as vs, proofEvidenceConstraints as vt, testOutcomePredicate as w, NeedsReviewReason as wa, parseConfirmationMessage as wi, LinearCommitReadback as wn, LEGACY_QUALIFICATION as wo, BASE_HOST_PACKAGES as wr, actionCompatible as ws, sessionQuery as wt, latestRootInstruction as x, HostStatus as xa, CONFIRM_LINE_PATTERN as xi, GitPrestateCheck as xn, ExecutionQualification as xo, ALPHA2_DSHMARKET_139_HOST_PACKAGES as xr, SUPPORTED_EVIDENCE_ADAPTERS as xs, proofV2Rejection as xt, isWholeTaskCompletionClaim as y, GuardOperation as ya, classifyTaskIntent as yi, GitEffectExecution as yn, DirectiveClass as yo, ACTIVE_HOST_COHORT_IDS as yr, STOP_PROTOCOL_VERSION as ys, proofHostSurfacesOf as yt, RecoveryOptions as z, ReleaseObservedIdentity as za, BoundaryEffectuation as zi, parsePwshCommand as zn, interpretMessage as zo, HostLockContext as zr, sha256 as zs, FIRST_STEP_GUIDANCE as zt };