dsh-completion-guard 0.3.2 → 0.4.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.
- package/CHANGELOG.md +21 -3
- package/CHANGELOG.zh-CN.md +21 -3
- package/README.md +21 -6
- package/README.zh-CN.md +21 -6
- package/dist/domain/index.d.ts +2 -2
- package/dist/domain/index.js +2 -2
- package/dist/{domain-DPPFAcbF.js → domain-CHTQFIT8.js} +630 -213
- package/dist/{index-CTFLYvNL.d.ts → index-AtjJOrK8.d.ts} +76 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/docs/COMPATIBILITY.md +144 -11
- package/docs/LOCAL_ACCEPTANCE.md +69 -5
- package/docs/PORTING_NOTES.md +13 -3
- package/docs/SEMANTIC_COMPATIBILITY.md +20 -16
- package/docs/UPSTREAM_BASE.md +8 -1
- package/docs/distribution.md +18 -2
- package/docs/upstream-deltas.json +3 -3
- package/manifests/supported-host.v1.json +418 -0
- package/package.json +9 -9
|
@@ -253,6 +253,8 @@ interface GuardProjection {
|
|
|
253
253
|
hostLockDigest: string;
|
|
254
254
|
hostStatus: HostStatus;
|
|
255
255
|
hostReasonCode?: string;
|
|
256
|
+
/** Readback of the audited cohort bound into `hostLockDigest`. */
|
|
257
|
+
hostCohortId?: string;
|
|
256
258
|
currentGoalRef?: GoalRef;
|
|
257
259
|
currentGoalPhase?: "active" | "paused" | "blocked" | "complete";
|
|
258
260
|
currentGoalActivation?: "armed" | "disarmed";
|
|
@@ -470,12 +472,29 @@ interface HostCohort {
|
|
|
470
472
|
capabilities: CapabilityRow[];
|
|
471
473
|
}
|
|
472
474
|
/**
|
|
475
|
+
* alpha.2 audited package identities (second registry cohort), hoisted so the
|
|
476
|
+
* alpha.2 + dshmarket 1.39.0 cohort can reuse the exact natively audited rows
|
|
477
|
+
* with only the dshmarket identity substituted.
|
|
478
|
+
*/
|
|
479
|
+
declare const ALPHA2_HOST_PACKAGES: PackageRow[];
|
|
480
|
+
/**
|
|
481
|
+
* The exact graph the Windows daily runtime realized when it upgraded
|
|
482
|
+
* dshmarket to 1.39.0 on an otherwise alpha.2 install — the combination whose
|
|
483
|
+
* rejection was Guard 0.3.2's real web_control failure. It is one audited
|
|
484
|
+
* whole-graph cohort: alpha.2 rows keep their native macOS/Windows audit
|
|
485
|
+
* identities and the dshmarket 1.39.0 identity is the authoritative row from
|
|
486
|
+
* the 2026-09-01 alpha.3 annex audit. Guard 0.4.0 supports this combination.
|
|
487
|
+
*/
|
|
488
|
+
declare const ALPHA2_DSHMARKET_139_HOST_PACKAGES: PackageRow[];
|
|
489
|
+
/**
|
|
473
490
|
* Audited host cohort registry. The rc.2 cohort keeps the exact identities
|
|
474
491
|
* audited for 0.3.0/0.3.1 on macOS and Windows. The alpha.2 cohort carries the
|
|
475
492
|
* exact package graph extracted from native macOS and Windows DSH
|
|
476
|
-
* `0.1.2-alpha.2` / dshmarket `1.38.1` runtimes.
|
|
477
|
-
*
|
|
478
|
-
*
|
|
493
|
+
* `0.1.2-alpha.2` / dshmarket `1.38.1` runtimes. The alpha.2+dshmarket-1.39.0
|
|
494
|
+
* cohort carries the exact upgraded-Windows graph. The alpha.3 cohort carries
|
|
495
|
+
* the graph audited in the 2026-09-01 annex. Graphs that mix cohorts, lack
|
|
496
|
+
* rows, duplicate rows, or use identities outside every registered cohort
|
|
497
|
+
* fail closed.
|
|
479
498
|
*/
|
|
480
499
|
declare const HOST_COHORTS: readonly HostCohort[];
|
|
481
500
|
/**
|
|
@@ -944,6 +963,59 @@ declare function evidenceMatchesItem(item: GuardItem, evidence: GuardEvidence):
|
|
|
944
963
|
*/
|
|
945
964
|
declare function bindingSatisfies(projection: GuardProjection, item: GuardItem, evidenceIds: string[]): boolean;
|
|
946
965
|
//#endregion
|
|
966
|
+
//#region src/domain/proof.d.ts
|
|
967
|
+
declare const PROOF_PROTOCOL_VERSION = "0.4.0";
|
|
968
|
+
declare const PROOF_KINDS: readonly ["subject_readback", "scope_coverage", "state_verification"];
|
|
969
|
+
type ProofKind = (typeof PROOF_KINDS)[number];
|
|
970
|
+
type ProofSurface = "artifact" | "ui" | "visual" | "scope";
|
|
971
|
+
interface ProofObligation {
|
|
972
|
+
obligationId: string;
|
|
973
|
+
kind: ProofKind;
|
|
974
|
+
surface: ProofSurface;
|
|
975
|
+
subjectIds: string[];
|
|
976
|
+
evidenceIds: string[];
|
|
977
|
+
expectedScopeDigest?: string;
|
|
978
|
+
observedScopeDigest?: string;
|
|
979
|
+
}
|
|
980
|
+
interface ProofManifest {
|
|
981
|
+
proofProtocolVersion: typeof PROOF_PROTOCOL_VERSION;
|
|
982
|
+
obligations: ProofObligation[];
|
|
983
|
+
proofSha256: string;
|
|
984
|
+
assetSetSha256?: string;
|
|
985
|
+
}
|
|
986
|
+
interface SessionQuery {
|
|
987
|
+
sessionRefDigest: string;
|
|
988
|
+
epoch: number;
|
|
989
|
+
contractRevision: number;
|
|
990
|
+
state: "valid" | "unknown" | "corrupt";
|
|
991
|
+
proof?: ProofManifest;
|
|
992
|
+
cohortId?: string;
|
|
993
|
+
/** Set only when a presented proof made the query unverifiable. */
|
|
994
|
+
reasonCode?: "proof_invalid" | "proof_unbound";
|
|
995
|
+
}
|
|
996
|
+
/**
|
|
997
|
+
* The manifest digest root includes every integrity-bearing field, so a
|
|
998
|
+
* tampered asset-set digest is exactly as detectable as a tampered obligation.
|
|
999
|
+
*/
|
|
1000
|
+
declare function proofDigest(obligations: readonly ProofObligation[], assetSetSha256?: string): string;
|
|
1001
|
+
declare function validateProofManifest(manifest: unknown): string[];
|
|
1002
|
+
declare function createProofManifest(obligations: readonly ProofObligation[], assetSetSha256?: string): ProofManifest;
|
|
1003
|
+
/**
|
|
1004
|
+
* Bind a structurally valid proof to the actual replayed projection: every
|
|
1005
|
+
* obligation must name a pending item, every evidence id must exist in the
|
|
1006
|
+
* projection, and every bound evidence must satisfy the obligation's kind,
|
|
1007
|
+
* surface, subject, and outcome constraints. An empty projection therefore
|
|
1008
|
+
* rejects any proof, and cross-item or foreign evidence can never bind.
|
|
1009
|
+
*/
|
|
1010
|
+
declare function bindProofToProjection(projection: GuardProjection, proof: ProofManifest): string[];
|
|
1011
|
+
declare function canonicalProjection(projection: GuardProjection): Record<string, unknown>;
|
|
1012
|
+
declare function sessionQuery(projection: GuardProjection, proof?: ProofManifest): SessionQuery;
|
|
1013
|
+
declare function proofEvidenceConstraints(evidence: GuardEvidence, obligation: ProofObligation): boolean;
|
|
1014
|
+
//#endregion
|
|
1015
|
+
//#region src/domain/alpha3-host.d.ts
|
|
1016
|
+
/** Exact 34-row alpha.3 runtime/web graph from the 2026-09-01 annex audit. */
|
|
1017
|
+
declare const ALPHA3_HOST_PACKAGES: PackageRow[];
|
|
1018
|
+
//#endregion
|
|
947
1019
|
//#region src/domain/recovery.d.ts
|
|
948
1020
|
interface RecoveryOptions {
|
|
949
1021
|
rejectedBindings?: Array<{
|
|
@@ -1004,4 +1076,4 @@ declare function latestAssistantText(events: readonly {
|
|
|
1004
1076
|
//#region src/domain/supersession.d.ts
|
|
1005
1077
|
declare function supersedeItem(items: Map<string, GuardItem>, oldId: string, replacement: GuardItem): boolean;
|
|
1006
1078
|
//#endregion
|
|
1007
|
-
export {
|
|
1079
|
+
export { GitAdapterAction as $, EvidenceOutcome as $n, HostCohortSelection as $t, sessionQuery as A, classifyClause as An, STATEFUL_ACTIONS as Ar, ToolSubject as At, OperationVerbEntry as B, GoalBoundaryAccess as Bn, semanticActionFromText as Br, AuditedExecutable as Bt, ProofSurface as C, RejectedBinding as Cn, PackageRow as Cr, isRunExecutable as Ct, createProofManifest as D, ClauseSegment as Dn, ActionSpec as Dr, hasCurrentCertificate as Dt, canonicalProjection as E, ClassifiedClause as En, ActionManifest as Er, goalCompletionDenial as Et, evidenceMatchesItem as F, segmentClauses as Fn, actionCompatible as Fr, withDurability as Ft, hostLockRowsFromComposedDump as G, BoundaryDisposition as Gn, normalizeClause as Gr, ExecutableIdentityBinding as Gt, ActiveProfileHostLock as H, effectuateBoundary as Hn, validateActionTarget as Hr, DEFAULT_HOST_LOCK as Ht, isVerifyingCapability as I, BoundaryEffectuation as In, isStatefulAction as Ir, PROTOCOL_V3_NOTICE as It, packageRowsFromPnpmLock as J, DeriveConfig as Jn, sha256 as Jr, HOST_COHORTS as Jt, injectActiveProfileHostLock as K, BoundaryQualificationKind as Kn, sanitizeClauseText as Kr, GOAL_HOST_PACKAGES as Kt, COMMAND_SURFACE_MANIFEST as L, BoundaryQualification as Ln, requestedTargetAuthorizesMutation as Lr, deriveProjection as Lt, EvidenceFacetCoverage as M, extractMethod as Mn, SUPPORTED_EVIDENCE_ADAPTERS as Mr, extractTextContent as Mt, bindingSatisfies as N, extractOperation as Nn, SemanticAction as Nr, extractToolSubject as Nt, proofDigest as O, captureClause as On, CERTIFICATE_VERSION as Or, ToolCallInput as Ot, evidenceCoverage as P, isInformationalMessage as Pn, StatefulAction as Pr, isDeterministicCheck as Pt, GIT_COMMAND_MANIFEST_IDS as Q, EvidenceBinding as Qn, HostCohort as Qt, CommandSurfaceManifest as R, BoundaryRequest as Rn, requestedTargetMatchesResolved as Rr, ALPHA2_DSHMARKET_139_HOST_PACKAGES as Rt, ProofObligation as S, CheckpointResult as Sn, createProjection as Sr, canonicalArgvFromCommand as St, bindProofToProjection as T, CaptureScope as Tn, ACTION_MANIFEST_VERSION as Tr, parseShellCommand as Tt, HostProfileError as U, isCurrentAcceptedBoundary as Un, canonicalizePath as Ur, EXPECTED_HOST_PACKAGES as Ut, validateManifest as V, availableBoundaryQualifications as Vn, validateActionManifest as Vr, BASE_HOST_PACKAGES as Vt, hostLockContextFromComposedDump as W, qualifyBoundary as Wn, digestStrings as Wr, ExecutableIdentity as Wt, resolveInstalledHostLock as X, DeriveScope as Xn, HostCapabilityId as Xt, resolveActiveProfileHostLock as Y, DeriveResult as Yn, HostCapabilityEvaluation as Yt, verifyComposedHostLockDump as Z, DerivedEnvelope as Zn, HostCapabilityRequest as Zt, ALPHA3_HOST_PACKAGES as _, AuthorityKind as _n, TargetCaptureStatus as _r, verifiedLinearCommitReadback as _t, classifyCompletionClaim as a, HostProfileKind as an, GuardBoundary as ar, GitEffectRunner as at, ProofKind as b, UserInteractionKind as bn, VerificationContract as br, ParsedShell as bt, isWholeTaskCompletionClaim as c, bindLiveGoalCapability as cn, GuardIntegrity as cr, GitTargetIdentity as ct, DEFAULT_RECOVERY_CHAR_BUDGET as d, evaluateHostLock as dn, GuardItemStatus as dr, commitTreeSnapshotDigest as dt, HostCohortSelectionReason as en, EvidenceParseStatus as er, GitCommandAccepted as et, RecoveryOptions as f, evaluateToolSurfaceCapability as fn, GuardOperation as fr, createGitPrestateEnvelope as ft, renderRecoveryPacket as g, AuthorityBlockKind as gn, TargetCaptureReasonCode as gr, revalidateGitPrestate as gt, recoveryDigest as h, AuthorityBlock as hn, PersistenceAuthorization as hr, parseGitCommandManifest as ht, TurnStoppingDecision as i, HostPlatform as in, GoalRef as ir, GitEffectExecution as it, validateProofManifest as j, extractArtifactPaths as jn, STOP_PROTOCOL_VERSION as jr, evidenceFromPersistedToolResult as jt, proofEvidenceConstraints as k, captureItem as kn, SEMANTIC_ACTIONS as kr, ToolResultInput as kt, latestAssistantText as l, evaluateExternalWaitCapability as ln, GuardItem as lr, LinearCommitReadback as lt, openItems as m, currentContractDigest as mn, HostStatus as mr, gitCommandMatchesTarget as mt, AssistantOutcomeObservation as n, HostLockEvaluation as nn, ExpectedTransition as nr, GitCommandParseResult as nt, decideTurnBoundary as o, HostToolSurface as on, GuardCheckpoint as or, GitPrestateCheck as ot, closingHint as p, selectHostCohort as pn, GuardProjection as pr, executeRevalidatedGitEffect as pt, packageRowsFromActiveGraph as q, DeferAuthorization as qn, sanitizeUrl as qr, HOST_CAPABILITY_PACKAGE_GROUPS as qt, CompletionDisposition as r, HostLockStatus as rn, ExternalOperation as rr, GitCommandRejected as rt, decideTurnStopping as s, bindExecutableIdentity as sn, GuardEvidence as sr, GitPrestateEnvelope as st, supersedeItem as t, HostLockContext as tn, EvidenceRole as tr, GitCommandManifest as tt, observeAssistantOutcome as u, evaluateHostCapability as un, GuardItemKind as ur, commitIndexSnapshotDigest as ut, PROOF_KINDS as v, authorityCaptureCounts as vn, TargetTuple as vr, CanonicalArgv as vt, SessionQuery as w, certifyCheckpoint as wn, ACTION_MANIFEST as wr, parsePwshCommand as wt, ProofManifest as x, classifyUserInteraction as xn, WaitAuthorization as xr, ShellParseStatus as xt, PROOF_PROTOCOL_VERSION as y, segmentAuthorityBlocks as yn, TargetValue as yr, CanonicalCommandSurface as yt, ManifestIssue as z, GoalActivationState as zn, semanticActionFromCommand as zr, ALPHA2_HOST_PACKAGES as zt };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as GitAdapterAction, $n as EvidenceOutcome, $t as HostCohortSelection, A as sessionQuery, An as classifyClause, Ar as STATEFUL_ACTIONS, At as ToolSubject, B as OperationVerbEntry, Bn as GoalBoundaryAccess, Br as semanticActionFromText, Bt as AuditedExecutable, C as ProofSurface, Cn as RejectedBinding, Cr as PackageRow, Ct as isRunExecutable, D as createProofManifest, Dn as ClauseSegment, Dr as ActionSpec, Dt as hasCurrentCertificate, E as canonicalProjection, En as ClassifiedClause, Er as ActionManifest, Et as goalCompletionDenial, F as evidenceMatchesItem, Fn as segmentClauses, Fr as actionCompatible, Ft as withDurability, G as hostLockRowsFromComposedDump, Gn as BoundaryDisposition, Gr as normalizeClause, Gt as ExecutableIdentityBinding, H as ActiveProfileHostLock, Hn as effectuateBoundary, Hr as validateActionTarget, Ht as DEFAULT_HOST_LOCK, I as isVerifyingCapability, In as BoundaryEffectuation, Ir as isStatefulAction, It as PROTOCOL_V3_NOTICE, J as packageRowsFromPnpmLock, Jn as DeriveConfig, Jr as sha256, Jt as HOST_COHORTS, K as injectActiveProfileHostLock, Kn as BoundaryQualificationKind, Kr as sanitizeClauseText, Kt as GOAL_HOST_PACKAGES, L as COMMAND_SURFACE_MANIFEST, Ln as BoundaryQualification, Lr as requestedTargetAuthorizesMutation, Lt as deriveProjection, M as EvidenceFacetCoverage, Mn as extractMethod, Mr as SUPPORTED_EVIDENCE_ADAPTERS, Mt as extractTextContent, N as bindingSatisfies, Nn as extractOperation, Nr as SemanticAction, Nt as extractToolSubject, O as proofDigest, On as captureClause, Or as CERTIFICATE_VERSION, Ot as ToolCallInput, P as evidenceCoverage, Pn as isInformationalMessage, Pr as StatefulAction, Pt as isDeterministicCheck, Q as GIT_COMMAND_MANIFEST_IDS, Qn as EvidenceBinding, Qt as HostCohort, R as CommandSurfaceManifest, Rn as BoundaryRequest, Rr as requestedTargetMatchesResolved, Rt as ALPHA2_DSHMARKET_139_HOST_PACKAGES, S as ProofObligation, Sn as CheckpointResult, Sr as createProjection, St as canonicalArgvFromCommand, T as bindProofToProjection, Tn as CaptureScope, Tr as ACTION_MANIFEST_VERSION, Tt as parseShellCommand, U as HostProfileError, Un as isCurrentAcceptedBoundary, Ur as canonicalizePath, Ut as EXPECTED_HOST_PACKAGES, V as validateManifest, Vn as availableBoundaryQualifications, Vr as validateActionManifest, Vt as BASE_HOST_PACKAGES, W as hostLockContextFromComposedDump, Wn as qualifyBoundary, Wr as digestStrings, Wt as ExecutableIdentity, X as resolveInstalledHostLock, Xn as DeriveScope, Xt as HostCapabilityId, Y as resolveActiveProfileHostLock, Yn as DeriveResult, Yt as HostCapabilityEvaluation, Z as verifyComposedHostLockDump, Zn as DerivedEnvelope, Zt as HostCapabilityRequest, _ as ALPHA3_HOST_PACKAGES, _n as AuthorityKind, _r as TargetCaptureStatus, _t as verifiedLinearCommitReadback, a as classifyCompletionClaim, an as HostProfileKind, ar as GuardBoundary, at as GitEffectRunner, b as ProofKind, bn as UserInteractionKind, br as VerificationContract, bt as ParsedShell, c as isWholeTaskCompletionClaim, cn as bindLiveGoalCapability, cr as GuardIntegrity, ct as GitTargetIdentity, d as DEFAULT_RECOVERY_CHAR_BUDGET, dn as evaluateHostLock, dr as GuardItemStatus, dt as commitTreeSnapshotDigest, en as HostCohortSelectionReason, er as EvidenceParseStatus, et as GitCommandAccepted, f as RecoveryOptions, fn as evaluateToolSurfaceCapability, fr as GuardOperation, ft as createGitPrestateEnvelope, g as renderRecoveryPacket, gn as AuthorityBlockKind, gr as TargetCaptureReasonCode, gt as revalidateGitPrestate, h as recoveryDigest, hn as AuthorityBlock, hr as PersistenceAuthorization, ht as parseGitCommandManifest, i as TurnStoppingDecision, in as HostPlatform, ir as GoalRef, it as GitEffectExecution, j as validateProofManifest, jn as extractArtifactPaths, jr as STOP_PROTOCOL_VERSION, jt as evidenceFromPersistedToolResult, k as proofEvidenceConstraints, kn as captureItem, kr as SEMANTIC_ACTIONS, kt as ToolResultInput, l as latestAssistantText, ln as evaluateExternalWaitCapability, lr as GuardItem, lt as LinearCommitReadback, m as openItems, mn as currentContractDigest, mr as HostStatus, mt as gitCommandMatchesTarget, n as AssistantOutcomeObservation, nn as HostLockEvaluation, nr as ExpectedTransition, nt as GitCommandParseResult, o as decideTurnBoundary, on as HostToolSurface, or as GuardCheckpoint, ot as GitPrestateCheck, p as closingHint, pn as selectHostCohort, pr as GuardProjection, pt as executeRevalidatedGitEffect, q as packageRowsFromActiveGraph, qn as DeferAuthorization, qr as sanitizeUrl, qt as HOST_CAPABILITY_PACKAGE_GROUPS, r as CompletionDisposition, rn as HostLockStatus, rr as ExternalOperation, rt as GitCommandRejected, s as decideTurnStopping, sn as bindExecutableIdentity, sr as GuardEvidence, st as GitPrestateEnvelope, t as supersedeItem, tn as HostLockContext, tr as EvidenceRole, tt as GitCommandManifest, u as observeAssistantOutcome, un as evaluateHostCapability, ur as GuardItemKind, ut as commitIndexSnapshotDigest, v as PROOF_KINDS, vn as authorityCaptureCounts, vr as TargetTuple, vt as CanonicalArgv, w as SessionQuery, wn as certifyCheckpoint, wr as ACTION_MANIFEST, wt as parsePwshCommand, x as ProofManifest, xn as classifyUserInteraction, xr as WaitAuthorization, xt as ShellParseStatus, y as PROOF_PROTOCOL_VERSION, yn as segmentAuthorityBlocks, yr as TargetValue, yt as CanonicalCommandSurface, z as ManifestIssue, zn as GoalActivationState, zr as semanticActionFromCommand, zt as ALPHA2_HOST_PACKAGES } from "./index-AtjJOrK8.js";
|
|
2
2
|
import "@deepseek-ai/dsh-tools";
|
|
3
3
|
import { Context } from "@deepseek-ai/cordis";
|
|
4
4
|
import z from "@deepseek-ai/schemastery";
|
|
@@ -21,4 +21,4 @@ declare function apply(ctx: Context, rawConfig?: {
|
|
|
21
21
|
hostLockProfile?: unknown;
|
|
22
22
|
}): void;
|
|
23
23
|
//#endregion
|
|
24
|
-
export { ACTION_MANIFEST, ACTION_MANIFEST_VERSION, ActionManifest, ActionSpec, ActiveProfileHostLock, AssistantOutcomeObservation, AuditedExecutable, AuthorityBlock, AuthorityBlockKind, AuthorityKind, BASE_HOST_PACKAGES, BoundaryDisposition, BoundaryEffectuation, BoundaryQualification, BoundaryQualificationKind, BoundaryRequest, CERTIFICATE_VERSION, COMMAND_SURFACE_MANIFEST, CanonicalArgv, CanonicalCommandSurface, CaptureScope, CheckpointResult, ClassifiedClause, ClauseSegment, CommandSurfaceManifest, CompletionDisposition, Config, DEFAULT_HOST_LOCK, DEFAULT_RECOVERY_CHAR_BUDGET, DeferAuthorization, DeriveConfig, DeriveResult, DeriveScope, DerivedEnvelope, EXPECTED_HOST_PACKAGES, EvidenceBinding, EvidenceFacetCoverage, EvidenceOutcome, EvidenceParseStatus, EvidenceRole, ExecutableIdentity, ExecutableIdentityBinding, ExpectedTransition, ExternalOperation, GIT_COMMAND_MANIFEST_IDS, GOAL_HOST_PACKAGES, GitAdapterAction, GitCommandAccepted, GitCommandManifest, GitCommandParseResult, GitCommandRejected, GitEffectExecution, GitEffectRunner, GitPrestateCheck, GitPrestateEnvelope, GitTargetIdentity, GoalActivationState, GoalBoundaryAccess, GoalRef, GuardBoundary, GuardCheckpoint, GuardEvidence, GuardIntegrity, GuardItem, GuardItemKind, GuardItemStatus, GuardOperation, GuardProjection, HOST_CAPABILITY_PACKAGE_GROUPS, HOST_COHORTS, HostCapabilityEvaluation, HostCapabilityId, HostCapabilityRequest, HostCohort, HostCohortSelection, HostCohortSelectionReason, HostLockContext, HostLockEvaluation, HostLockStatus, HostPlatform, HostProfileError, HostProfileKind, HostStatus, HostToolSurface, LinearCommitReadback, ManifestIssue, OperationVerbEntry, PROTOCOL_V3_NOTICE, ParsedShell, PersistenceAuthorization, RecoveryOptions, RejectedBinding, SEMANTIC_ACTIONS, STATEFUL_ACTIONS, STOP_PROTOCOL_VERSION, SUPPORTED_EVIDENCE_ADAPTERS, SemanticAction, ShellParseStatus, StatefulAction, TargetCaptureReasonCode, TargetCaptureStatus, TargetTuple, TargetValue, ToolCallInput, ToolResultInput, ToolSubject, TurnStoppingDecision, UserInteractionKind, VerificationContract, WaitAuthorization, actionCompatible, apply, authorityCaptureCounts, availableBoundaryQualifications, bindExecutableIdentity, bindLiveGoalCapability, bindingSatisfies, canonicalArgvFromCommand, canonicalizePath, captureClause, captureItem, certifyCheckpoint, classifyClause, classifyCompletionClaim, classifyUserInteraction, closingHint, commitIndexSnapshotDigest, commitTreeSnapshotDigest, createGitPrestateEnvelope, createProjection, currentContractDigest, decideTurnBoundary, decideTurnStopping, deriveProjection, digestStrings, effectuateBoundary, evaluateExternalWaitCapability, evaluateHostCapability, evaluateHostLock, evaluateToolSurfaceCapability, evidenceCoverage, evidenceFromPersistedToolResult, evidenceMatchesItem, executeRevalidatedGitEffect, extractArtifactPaths, extractMethod, extractOperation, extractTextContent, extractToolSubject, gitCommandMatchesTarget, goalCompletionDenial, hasCurrentCertificate, hostLockContextFromComposedDump, hostLockRowsFromComposedDump, inject, injectActiveProfileHostLock, isCurrentAcceptedBoundary, isDeterministicCheck, isInformationalMessage, isRunExecutable, isStatefulAction, isVerifyingCapability, isWholeTaskCompletionClaim, latestAssistantText, name, normalizeClause, observeAssistantOutcome, openItems, packageRowsFromActiveGraph, packageRowsFromPnpmLock, parseGitCommandManifest, parsePwshCommand, parseShellCommand, qualifyBoundary, recoveryDigest, renderRecoveryPacket, requestedTargetAuthorizesMutation, requestedTargetMatchesResolved, resolveActiveProfileHostLock, resolveInstalledHostLock, revalidateGitPrestate, sanitizeClauseText, sanitizeUrl, segmentAuthorityBlocks, segmentClauses, selectHostCohort, semanticActionFromCommand, semanticActionFromText, sha256, supersedeItem, validateActionManifest, validateActionTarget, validateManifest, verifiedLinearCommitReadback, verifyComposedHostLockDump, withDurability };
|
|
24
|
+
export { ACTION_MANIFEST, ACTION_MANIFEST_VERSION, ALPHA2_DSHMARKET_139_HOST_PACKAGES, ALPHA2_HOST_PACKAGES, ALPHA3_HOST_PACKAGES, ActionManifest, ActionSpec, ActiveProfileHostLock, AssistantOutcomeObservation, AuditedExecutable, AuthorityBlock, AuthorityBlockKind, AuthorityKind, BASE_HOST_PACKAGES, BoundaryDisposition, BoundaryEffectuation, BoundaryQualification, BoundaryQualificationKind, BoundaryRequest, CERTIFICATE_VERSION, COMMAND_SURFACE_MANIFEST, CanonicalArgv, CanonicalCommandSurface, CaptureScope, CheckpointResult, ClassifiedClause, ClauseSegment, CommandSurfaceManifest, CompletionDisposition, Config, DEFAULT_HOST_LOCK, DEFAULT_RECOVERY_CHAR_BUDGET, DeferAuthorization, DeriveConfig, DeriveResult, DeriveScope, DerivedEnvelope, EXPECTED_HOST_PACKAGES, EvidenceBinding, EvidenceFacetCoverage, EvidenceOutcome, EvidenceParseStatus, EvidenceRole, ExecutableIdentity, ExecutableIdentityBinding, ExpectedTransition, ExternalOperation, GIT_COMMAND_MANIFEST_IDS, GOAL_HOST_PACKAGES, GitAdapterAction, GitCommandAccepted, GitCommandManifest, GitCommandParseResult, GitCommandRejected, GitEffectExecution, GitEffectRunner, GitPrestateCheck, GitPrestateEnvelope, GitTargetIdentity, GoalActivationState, GoalBoundaryAccess, GoalRef, GuardBoundary, GuardCheckpoint, GuardEvidence, GuardIntegrity, GuardItem, GuardItemKind, GuardItemStatus, GuardOperation, GuardProjection, HOST_CAPABILITY_PACKAGE_GROUPS, HOST_COHORTS, HostCapabilityEvaluation, HostCapabilityId, HostCapabilityRequest, HostCohort, HostCohortSelection, HostCohortSelectionReason, HostLockContext, HostLockEvaluation, HostLockStatus, HostPlatform, HostProfileError, HostProfileKind, HostStatus, HostToolSurface, LinearCommitReadback, ManifestIssue, OperationVerbEntry, PROOF_KINDS, PROOF_PROTOCOL_VERSION, PROTOCOL_V3_NOTICE, ParsedShell, PersistenceAuthorization, ProofKind, ProofManifest, ProofObligation, ProofSurface, RecoveryOptions, RejectedBinding, SEMANTIC_ACTIONS, STATEFUL_ACTIONS, STOP_PROTOCOL_VERSION, SUPPORTED_EVIDENCE_ADAPTERS, SemanticAction, SessionQuery, ShellParseStatus, StatefulAction, TargetCaptureReasonCode, TargetCaptureStatus, TargetTuple, TargetValue, ToolCallInput, ToolResultInput, ToolSubject, TurnStoppingDecision, UserInteractionKind, VerificationContract, WaitAuthorization, actionCompatible, apply, authorityCaptureCounts, availableBoundaryQualifications, bindExecutableIdentity, bindLiveGoalCapability, bindProofToProjection, bindingSatisfies, canonicalArgvFromCommand, canonicalProjection, canonicalizePath, captureClause, captureItem, certifyCheckpoint, classifyClause, classifyCompletionClaim, classifyUserInteraction, closingHint, commitIndexSnapshotDigest, commitTreeSnapshotDigest, createGitPrestateEnvelope, createProjection, createProofManifest, currentContractDigest, decideTurnBoundary, decideTurnStopping, deriveProjection, digestStrings, effectuateBoundary, evaluateExternalWaitCapability, evaluateHostCapability, evaluateHostLock, evaluateToolSurfaceCapability, evidenceCoverage, evidenceFromPersistedToolResult, evidenceMatchesItem, executeRevalidatedGitEffect, extractArtifactPaths, extractMethod, extractOperation, extractTextContent, extractToolSubject, gitCommandMatchesTarget, goalCompletionDenial, hasCurrentCertificate, hostLockContextFromComposedDump, hostLockRowsFromComposedDump, inject, injectActiveProfileHostLock, isCurrentAcceptedBoundary, isDeterministicCheck, isInformationalMessage, isRunExecutable, isStatefulAction, isVerifyingCapability, isWholeTaskCompletionClaim, latestAssistantText, name, normalizeClause, observeAssistantOutcome, openItems, packageRowsFromActiveGraph, packageRowsFromPnpmLock, parseGitCommandManifest, parsePwshCommand, parseShellCommand, proofDigest, proofEvidenceConstraints, qualifyBoundary, recoveryDigest, renderRecoveryPacket, requestedTargetAuthorizesMutation, requestedTargetMatchesResolved, resolveActiveProfileHostLock, resolveInstalledHostLock, revalidateGitPrestate, sanitizeClauseText, sanitizeUrl, segmentAuthorityBlocks, segmentClauses, selectHostCohort, semanticActionFromCommand, semanticActionFromText, sessionQuery, sha256, supersedeItem, validateActionManifest, validateActionTarget, validateManifest, validateProofManifest, verifiedLinearCommitReadback, verifyComposedHostLockDump, withDurability };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as GOAL_HOST_PACKAGES, $t as COMMAND_SURFACE_MANIFEST, A as decideTurnStopping, At as classifyClause, B as isDeterministicCheck, Bt as CERTIFICATE_VERSION, C as executeRevalidatedGitEffect, Ct as bindingSatisfies, D as verifiedLinearCommitReadback, Dt as currentContractDigest, E as revalidateGitPrestate, Et as isVerifyingCapability, F as deriveProjection, Ft as segmentClauses, G as parseShellCommand, Gt as actionCompatible, H as canonicalArgvFromCommand, Ht as STATEFUL_ACTIONS, I as supersedeItem, It as canonicalRegistryBase, J as ALPHA2_DSHMARKET_139_HOST_PACKAGES, Jt as requestedTargetMatchesResolved, K as goalCompletionDenial, Kt as isStatefulAction, L as evidenceFromPersistedToolResult, Lt as npmEscapedPackageName, M as latestAssistantText, Mt as extractMethod, N as observeAssistantOutcome, Nt as extractOperation, O as classifyCompletionClaim, Ot as captureClause, P as PROTOCOL_V3_NOTICE, Pt as isInformationalMessage, Q as EXPECTED_HOST_PACKAGES, Qt as validateActionTarget, R as extractTextContent, Rt as ACTION_MANIFEST, S as createGitPrestateEnvelope, St as renderRecoveryPacket, T as parseGitCommandManifest, Tt as evidenceMatchesItem, U as isRunExecutable, Ut as STOP_PROTOCOL_VERSION, V as withDurability, Vt as SEMANTIC_ACTIONS, W as parsePwshCommand, Wt as SUPPORTED_EVIDENCE_ADAPTERS, X as BASE_HOST_PACKAGES, Xt as semanticActionFromText, Y as ALPHA2_HOST_PACKAGES, Yt as semanticActionFromCommand, Z as DEFAULT_HOST_LOCK, Zt as validateActionManifest, _ as resolveInstalledHostLock, _t as certifyCheckpoint, a as createProofManifest, an as sanitizeUrl, at as evaluateHostCapability, b as commitIndexSnapshotDigest, bt as openItems, c as sessionQuery, ct as selectHostCohort, d as hostLockContextFromComposedDump, dt as segmentAuthorityBlocks, en as validateManifest, et as HOST_CAPABILITY_PACKAGE_GROUPS, f as hostLockRowsFromComposedDump, ft as classifyUserInteraction, g as resolveActiveProfileHostLock, gt as qualifyBoundary, h as packageRowsFromPnpmLock, ht as isCurrentAcceptedBoundary, i as canonicalProjection, in as sanitizeClauseText, it as evaluateExternalWaitCapability, j as isWholeTaskCompletionClaim, jt as extractArtifactPaths, k as decideTurnBoundary, kt as captureItem, l as validateProofManifest, lt as ALPHA3_HOST_PACKAGES, m as packageRowsFromActiveGraph, mt as effectuateBoundary, n as PROOF_PROTOCOL_VERSION, nn as digestStrings, nt as bindExecutableIdentity, o as proofDigest, on as sha256, ot as evaluateHostLock, p as injectActiveProfileHostLock, pt as availableBoundaryQualifications, q as hasCurrentCertificate, qt as requestedTargetAuthorizesMutation, r as bindProofToProjection, rn as normalizeClause, rt as bindLiveGoalCapability, s as proofEvidenceConstraints, sn as createProjection, st as evaluateToolSurfaceCapability, t as PROOF_KINDS, tn as canonicalizePath, tt as HOST_COHORTS, u as HostProfileError, ut as authorityCaptureCounts, v as verifyComposedHostLockDump, vt as DEFAULT_RECOVERY_CHAR_BUDGET, w as gitCommandMatchesTarget, wt as evidenceCoverage, x as commitTreeSnapshotDigest, xt as recoveryDigest, y as GIT_COMMAND_MANIFEST_IDS, yt as closingHint, z as extractToolSubject, zt as ACTION_MANIFEST_VERSION } from "./domain-CHTQFIT8.js";
|
|
2
2
|
import { boundContextSummary, createUserMessage } from "@deepseek-ai/dsh-llm";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { basename, delimiter, dirname, isAbsolute, join, resolve } from "node:path";
|
|
@@ -3466,4 +3466,4 @@ function normalizeGoalState(value) {
|
|
|
3466
3466
|
}
|
|
3467
3467
|
|
|
3468
3468
|
//#endregion
|
|
3469
|
-
export { ACTION_MANIFEST, ACTION_MANIFEST_VERSION, BASE_HOST_PACKAGES, CERTIFICATE_VERSION, COMMAND_SURFACE_MANIFEST, Config, DEFAULT_HOST_LOCK, DEFAULT_RECOVERY_CHAR_BUDGET, EXPECTED_HOST_PACKAGES, GIT_COMMAND_MANIFEST_IDS, GOAL_HOST_PACKAGES, HOST_CAPABILITY_PACKAGE_GROUPS, HOST_COHORTS, HostProfileError, PROTOCOL_V3_NOTICE, SEMANTIC_ACTIONS, STATEFUL_ACTIONS, STOP_PROTOCOL_VERSION, SUPPORTED_EVIDENCE_ADAPTERS, actionCompatible, apply, authorityCaptureCounts, availableBoundaryQualifications, bindExecutableIdentity, bindLiveGoalCapability, bindingSatisfies, canonicalArgvFromCommand, canonicalizePath, captureClause, captureItem, certifyCheckpoint, classifyClause, classifyCompletionClaim, classifyUserInteraction, closingHint, commitIndexSnapshotDigest, commitTreeSnapshotDigest, createGitPrestateEnvelope, createProjection, currentContractDigest, decideTurnBoundary, decideTurnStopping, deriveProjection, digestStrings, effectuateBoundary, evaluateExternalWaitCapability, evaluateHostCapability, evaluateHostLock, evaluateToolSurfaceCapability, evidenceCoverage, evidenceFromPersistedToolResult, evidenceMatchesItem, executeRevalidatedGitEffect, extractArtifactPaths, extractMethod, extractOperation, extractTextContent, extractToolSubject, gitCommandMatchesTarget, goalCompletionDenial, hasCurrentCertificate, hostLockContextFromComposedDump, hostLockRowsFromComposedDump, inject, injectActiveProfileHostLock, isCurrentAcceptedBoundary, isDeterministicCheck, isInformationalMessage, isRunExecutable, isStatefulAction, isVerifyingCapability, isWholeTaskCompletionClaim, latestAssistantText, name, normalizeClause, observeAssistantOutcome, openItems, packageRowsFromActiveGraph, packageRowsFromPnpmLock, parseGitCommandManifest, parsePwshCommand, parseShellCommand, qualifyBoundary, recoveryDigest, renderRecoveryPacket, requestedTargetAuthorizesMutation, requestedTargetMatchesResolved, resolveActiveProfileHostLock, resolveInstalledHostLock, revalidateGitPrestate, sanitizeClauseText, sanitizeUrl, segmentAuthorityBlocks, segmentClauses, selectHostCohort, semanticActionFromCommand, semanticActionFromText, sha256, supersedeItem, validateActionManifest, validateActionTarget, validateManifest, verifiedLinearCommitReadback, verifyComposedHostLockDump, withDurability };
|
|
3469
|
+
export { ACTION_MANIFEST, ACTION_MANIFEST_VERSION, ALPHA2_DSHMARKET_139_HOST_PACKAGES, ALPHA2_HOST_PACKAGES, ALPHA3_HOST_PACKAGES, BASE_HOST_PACKAGES, CERTIFICATE_VERSION, COMMAND_SURFACE_MANIFEST, Config, DEFAULT_HOST_LOCK, DEFAULT_RECOVERY_CHAR_BUDGET, EXPECTED_HOST_PACKAGES, GIT_COMMAND_MANIFEST_IDS, GOAL_HOST_PACKAGES, HOST_CAPABILITY_PACKAGE_GROUPS, HOST_COHORTS, HostProfileError, PROOF_KINDS, PROOF_PROTOCOL_VERSION, PROTOCOL_V3_NOTICE, SEMANTIC_ACTIONS, STATEFUL_ACTIONS, STOP_PROTOCOL_VERSION, SUPPORTED_EVIDENCE_ADAPTERS, actionCompatible, apply, authorityCaptureCounts, availableBoundaryQualifications, bindExecutableIdentity, bindLiveGoalCapability, bindProofToProjection, bindingSatisfies, canonicalArgvFromCommand, canonicalProjection, canonicalizePath, captureClause, captureItem, certifyCheckpoint, classifyClause, classifyCompletionClaim, classifyUserInteraction, closingHint, commitIndexSnapshotDigest, commitTreeSnapshotDigest, createGitPrestateEnvelope, createProjection, createProofManifest, currentContractDigest, decideTurnBoundary, decideTurnStopping, deriveProjection, digestStrings, effectuateBoundary, evaluateExternalWaitCapability, evaluateHostCapability, evaluateHostLock, evaluateToolSurfaceCapability, evidenceCoverage, evidenceFromPersistedToolResult, evidenceMatchesItem, executeRevalidatedGitEffect, extractArtifactPaths, extractMethod, extractOperation, extractTextContent, extractToolSubject, gitCommandMatchesTarget, goalCompletionDenial, hasCurrentCertificate, hostLockContextFromComposedDump, hostLockRowsFromComposedDump, inject, injectActiveProfileHostLock, isCurrentAcceptedBoundary, isDeterministicCheck, isInformationalMessage, isRunExecutable, isStatefulAction, isVerifyingCapability, isWholeTaskCompletionClaim, latestAssistantText, name, normalizeClause, observeAssistantOutcome, openItems, packageRowsFromActiveGraph, packageRowsFromPnpmLock, parseGitCommandManifest, parsePwshCommand, parseShellCommand, proofDigest, proofEvidenceConstraints, qualifyBoundary, recoveryDigest, renderRecoveryPacket, requestedTargetAuthorizesMutation, requestedTargetMatchesResolved, resolveActiveProfileHostLock, resolveInstalledHostLock, revalidateGitPrestate, sanitizeClauseText, sanitizeUrl, segmentAuthorityBlocks, segmentClauses, selectHostCohort, semanticActionFromCommand, semanticActionFromText, sessionQuery, sha256, supersedeItem, validateActionManifest, validateActionTarget, validateManifest, validateProofManifest, verifiedLinearCommitReadback, verifyComposedHostLockDump, withDurability };
|
package/docs/COMPATIBILITY.md
CHANGED
|
@@ -1,15 +1,49 @@
|
|
|
1
1
|
# Compatibility
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Compatibility is pinned to exact host package sets. A nearby version or a partial package match is not treated as supported.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Current 0.4.0 release baseline
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
7
|
+
- Plugin: `dsh-completion-guard` `0.4.0`
|
|
8
|
+
- DeepSeek Harness: `0.1.2-alpha.3`
|
|
9
|
+
- dshmarket: `1.39.0`
|
|
10
|
+
- Cordis: `4.0.2`
|
|
9
11
|
- Node: `>= 22`
|
|
10
12
|
- pnpm: `>= 11`
|
|
11
13
|
|
|
12
|
-
DSH is still a developer preview and may make breaking changes.
|
|
14
|
+
DSH is still a developer preview and may make breaking changes. Version 0.4.0 therefore makes no floating alpha compatibility claim.
|
|
15
|
+
|
|
16
|
+
## Upstream adaptation policy
|
|
17
|
+
|
|
18
|
+
Version 0.4.0 remains frozen on the alpha.3 setup above. Alpha.4 and later alpha releases are not new adaptation targets. Compatibility work resumes with the first DeepSeek Harness RC published after alpha.3; follow the upstream [tags page](https://github.com/deepseek-ai/deepseek-harness/tags) for that milestone.
|
|
19
|
+
|
|
20
|
+
## Platform and release evidence
|
|
21
|
+
|
|
22
|
+
- **Source and CI:** the release commit must pass the repository matrix and the Ubuntu, macOS, and Windows Node.js 22/24 CI jobs.
|
|
23
|
+
- **Exact package:** the repository packer emits one deterministic 26-file tgz with its full source commit in `gitHead`. That same SHA-256 must be used on both native platforms and published to npm without repacking.
|
|
24
|
+
- **Native scope:** macOS and Windows acceptance separately cover isolated Web and Headless installation, complete host-lock readback, repeated injection, Web restart and recovery, intentional Headless credential failure, daily-profile preservation, and scoped cleanup.
|
|
25
|
+
- **Public identity:** the annotated tag, npm manifest and downloaded tgz, GitHub Release target, checksum, and platform annexes must all resolve to the same release commit and package bytes.
|
|
26
|
+
- **Daily profiles:** upgrading a user's daily DSH profile is a separate action and is not implied by release acceptance.
|
|
27
|
+
|
|
28
|
+
## Historical compatibility cohorts
|
|
29
|
+
|
|
30
|
+
- DSH `0.1.1-rc.2` + dshmarket `1.36.0` + Cordis `4.0.1` is a retained, published-line cohort.
|
|
31
|
+
- DSH `0.1.2-alpha.2` + dshmarket `1.38.1` + Cordis `4.0.2` is the published 0.3.2 cohort checked natively on macOS and Windows.
|
|
32
|
+
- DSH `0.1.2-alpha.2` + dshmarket `1.39.0` + Cordis `4.0.2` remains a deterministic compatibility cohort. It is no longer a native 0.4.0 release blocker.
|
|
33
|
+
|
|
34
|
+
## Rejection rules
|
|
35
|
+
|
|
36
|
+
The four exact host sets are recorded in [`../manifests/supported-host.v1.json`](../manifests/supported-host.v1.json). Each set is a complete list of required packages and versions. Every row must match one set.
|
|
37
|
+
|
|
38
|
+
Missing, mixed, duplicate, unidentified, unknown, or integrity-drifted rows leave the Guard unavailable. Unregistered substitutions such as alpha.3 with dshmarket `1.38.1` are rejected as mixed graphs. dshmarket is an authoritative lock input; skin-center is not.
|
|
39
|
+
|
|
40
|
+
The selected set is part of the host-lock digest. Changing sets invalidates earlier certificates, and a platform is marked supported only after its complete set passes native checks there.
|
|
41
|
+
|
|
42
|
+
## Evidence links
|
|
43
|
+
|
|
44
|
+
- Candidate and historical-artifact evidence: [`LOCAL_ACCEPTANCE.md`](LOCAL_ACCEPTANCE.md)
|
|
45
|
+
- Shared Codex/DSH semantic scope: [`SEMANTIC_COMPATIBILITY.md`](SEMANTIC_COMPATIBILITY.md)
|
|
46
|
+
- Exact host identities: [`../manifests/supported-host.v1.json`](../manifests/supported-host.v1.json)
|
|
13
47
|
|
|
14
48
|
## Loader contract
|
|
15
49
|
|
|
@@ -17,11 +51,43 @@ The package exposes a named `apply(ctx)` function and a named `inject` array (`[
|
|
|
17
51
|
|
|
18
52
|
The plugin accepts an `activation` configuration value of `opt-in` or `always`. The default is `opt-in`; `always` initializes the projection as enabled before the persisted session log is replayed. Invalid values fail during plugin configuration instead of silently falling back. A DSH profile can select `always` with an ID-targeted `config` override in its `cordis.patch.yml`; see the README quick start for the complete example and the replay implications for existing sessions.
|
|
19
53
|
|
|
20
|
-
|
|
54
|
+
### Host-lock setup
|
|
55
|
+
|
|
56
|
+
Before the Guard can certify work, generate and verify the host lock from the active DSH runtime and profile. Use the packaged `dsh-completion-guard-host-lock inspect|inject|verify-dump` flow in the README. The default patch has no `hostLockPackages`, so the Guard fails closed until this flow succeeds.
|
|
57
|
+
|
|
58
|
+
Version 0.3 accepts the generated `hostLockPackages`, `hostLockPlatform`, and `hostLockProfile` values. Each critical package row records the exact resolved version and registry tarball integrity. The Guard does not infer a missing identity from a nearby lockfile: missing, duplicate, multi-version, or drifted rows fail closed. The audited identities are defined in [`../manifests/supported-host.v1.json`](../manifests/supported-host.v1.json).
|
|
59
|
+
|
|
60
|
+
### Capability groups
|
|
61
|
+
|
|
62
|
+
The host lock evaluates these groups independently:
|
|
63
|
+
|
|
64
|
+
- base and Goal;
|
|
65
|
+
- agent loop;
|
|
66
|
+
- POSIX or Windows terminal;
|
|
67
|
+
- filesystem tools;
|
|
68
|
+
- DSH CLI;
|
|
69
|
+
- plugin inventory;
|
|
70
|
+
- Web control; and
|
|
71
|
+
- jobs.
|
|
72
|
+
|
|
73
|
+
A missing platform- or action-specific group disables only the path that depends on it. For example, a valid terminal or jobs group remains usable when the filesystem group is unavailable.
|
|
74
|
+
|
|
75
|
+
The filesystem group has a narrower contract of its own. It freezes the registered `read`, `write`, and `edit` tools; their closed result and presentation shapes; the local or sandbox `ctx.fs` implementation; the read-before-mutation observation policy; the sandbox policy; and the approval provider. A missing or drifted filesystem row disables `create`, `modify`, and ordinary filesystem facts without disabling unrelated capability groups.
|
|
21
76
|
|
|
22
77
|
## Peer dependencies
|
|
23
78
|
|
|
24
|
-
|
|
79
|
+
The ordinary runtime packages are host-provided peers:
|
|
80
|
+
|
|
81
|
+
- `@deepseek-ai/cordis`;
|
|
82
|
+
- `@deepseek-ai/dsh-agent`;
|
|
83
|
+
- `@deepseek-ai/dsh-commands`;
|
|
84
|
+
- `@deepseek-ai/dsh-llm`;
|
|
85
|
+
- `@deepseek-ai/dsh-session`; and
|
|
86
|
+
- `@deepseek-ai/dsh-tools`.
|
|
87
|
+
|
|
88
|
+
Goal support uses two exact optional peers as one capability. `@deepseek-ai/dsh-goal` owns Goal state, while `@deepseek-ai/dsh-tool-goal` owns the audited `update_goal` name, schema, and arguments. Both host-graph rows and the live Goal service and tool must agree. A profile without this complete pair can still load, but Goal-dependent integration stays inactive.
|
|
89
|
+
|
|
90
|
+
Peer ranges accept only the registered DSH version lines: `0.1.1-rc.2 || 0.1.2-alpha.2 || 0.1.2-alpha.3`, with Cordis `4.0.1 || 4.0.2`. These are not floating support claims. Runtime acceptance still requires an exact injected host lock and atomic selection of one complete cohort.
|
|
25
91
|
|
|
26
92
|
## Terminal outcome contract
|
|
27
93
|
|
|
@@ -51,10 +117,25 @@ certifying capability, and has unknown outcome.
|
|
|
51
117
|
|
|
52
118
|
## Verified surfaces
|
|
53
119
|
|
|
120
|
+
### Current visible behavior
|
|
121
|
+
|
|
54
122
|
- `dsh --profile web --dump-config` and `--profile headless --dump-config` both include `context-guard`.
|
|
55
|
-
- A real
|
|
123
|
+
- A real Headless boot loads the plugin: `apply`, `ctx.sessions` access, and listener registration succeed before the run reaches the intentional missing-provider-credentials boundary.
|
|
124
|
+
- The slash command appears in the Web command directory. Its `on`, `off`, `clear`, `status`, and `diagnose` subcommands produce the expected `command/run` and `command/done` events.
|
|
125
|
+
|
|
126
|
+
`inspect` reports whether the active package graph matches a supported cohort, so it can correctly return `supported` before injection. Pre-injection failure is established by reading the composed configuration and by `verify-dump`, which rejects missing or mismatched injected host-lock data.
|
|
127
|
+
|
|
128
|
+
Evidence and certificates are session-scoped. A later DSH session cannot import or certify evidence IDs from an earlier session. Any workflow that needs a certificate must therefore produce its evidence and checkpoint in the same session.
|
|
129
|
+
|
|
130
|
+
### Historical 0.3.x evidence
|
|
56
131
|
|
|
57
|
-
|
|
132
|
+
- **0.3.0 runtime baseline:** 20 files exercise 360 deterministic tests, including all 37 mirrored portable semantic cases and all 29 digest vectors. macOS passed 359 tests with one Windows-only shim test capability-skipped; native Windows passed all 352 tests in the earlier 19-file baseline with no skips.
|
|
133
|
+
- **0.3.0 native and CI evidence:** the same canonical pre-release tgz passed isolated Web and Headless installation, host-lock inspect/inject/dump/verify, real dshmarket restart readback, HTTP recovery, and cleanup on native macOS and Windows. Headless reached the intentional missing-credential boundary. CI covered Ubuntu, macOS, and Windows on Node.js 22 and 24.
|
|
134
|
+
- **0.3.0 model-session evidence:** a credentialed session verified one accepted evidence binding and persisted typed-boundary/disarm path. A deliberately over-broad prompt remained incomplete and received no false certificate.
|
|
135
|
+
- **0.3.1 provenance repair:** 0.3.1 preserves the 0.3.0 runtime bytes and repairs only the frozen-package provenance path after the 0.3.0 registry entry omitted `gitHead`. Its final tgz is separately bound to native-platform and public-registry readback.
|
|
136
|
+
- **0.3.2 completed release:** the frozen package from commit `22cde610` passed the same-byte isolated lifecycle on native macOS and Windows. Its tag, npm publication, GitHub Release, and public downloads resolve to the same commit and bytes.
|
|
137
|
+
|
|
138
|
+
Exact commands, artifact identities, and platform limits for these releases are recorded in [`LOCAL_ACCEPTANCE.md`](LOCAL_ACCEPTANCE.md). The published 0.1.x and 0.2.x lines retain their own historical evidence there. The fail-closed invariants below remain covered as regressions.
|
|
58
139
|
|
|
59
140
|
## Session-layer capture filter and goal completion (v0.2.1)
|
|
60
141
|
|
|
@@ -88,9 +169,61 @@ new evidence, or a new contract revision always re-remind.
|
|
|
88
169
|
|
|
89
170
|
The full `STATEFUL_ACTIONS` set is `install | apply | create | modify | restart | commit | push | publish | pull | fetch`. Each requires distinct resolution/effect/state evidence IDs, exact same-target closure, independent state readback, and a versioned expected-transition payload. An effect-only success is incomplete. Old v0.2 scope-run certificates are retained as `legacy_generic_run` audit facts and do not become current v0.3 authority; unprovable legacy authority is also non-certifiable.
|
|
90
171
|
|
|
91
|
-
|
|
172
|
+
### Read-only resolution and explicit mutation
|
|
173
|
+
|
|
174
|
+
`context_guard_evidence` is read-only. It resolves the current target, checks a persisted effect, and reads the resulting state. `context_guard_action` is the explicitly mutating surface for exact-tgz install, apply, and publish; two-phase dshmarket restart; and exact Git commit, push, pull, and fetch.
|
|
175
|
+
|
|
176
|
+
The normal flow is: resolve the current target, match that resolution to one authorized pending requirement, perform the exact action, and independently read the state back. A successful effect without matching state evidence remains incomplete.
|
|
177
|
+
|
|
178
|
+
### Authorization and early rejection
|
|
179
|
+
|
|
180
|
+
Before mutation, `context_guard_action` flushes and replays the resolution and contract chain. It then requires the exact target digest plus the id and revision of one current pending `root_instruction` or `root_adoption` requirement. The requirement's action and complete requested identity must match the resolution.
|
|
181
|
+
|
|
182
|
+
A matching pending root prohibition denies the mutation regardless of message order. Prohibitions and acceptance clauses never grant authority.
|
|
183
|
+
|
|
184
|
+
The action is rejected before executable inspection, command execution, HTTP, or intent persistence when the requirement is disabled, integrity-unknown, stale-host, missing, already passed, superseded, clarification-required, incomplete-target, action-swapped, target-swapped, or an unrebound legacy item. Unknown selector, command-manifest, or Git argument keys are also rejected.
|
|
185
|
+
|
|
186
|
+
### Package operations
|
|
187
|
+
|
|
188
|
+
- `install` requires the exact package id, version, and profile, and the package must be absent.
|
|
189
|
+
- `apply` requires the exact package id, version, and profile, plus an existing package with a changed version or integrity.
|
|
190
|
+
- `publish` requires the exact artifact id, version, and canonical registry. Version 0.3 does not authorize `latest` or a version range.
|
|
191
|
+
|
|
192
|
+
Publish executes the exact resolved tgz with `--ignore-scripts`. Capture, argv, and standard packument readback use the same canonical HTTPS registry base. Registries containing credentials, a query, fragment, encoded separator, control character, or ambiguous path segment are rejected.
|
|
193
|
+
|
|
194
|
+
The resolution and effect bind the same canonical executable realpath and version.
|
|
195
|
+
|
|
196
|
+
### Git operations
|
|
197
|
+
|
|
198
|
+
Push, pull, and fetch require the exact repository, remote, and canonical explicit full ref or refspec. Git aliases, implicit refs, deletion refs, wildcards, force refs, target substitution, and prestate drift are rejected.
|
|
199
|
+
|
|
200
|
+
Commit certification additionally rejects root commits, merge commits, and substituted parents. Fetch certification requires its resolved pre-HEAD, post-HEAD readback, and predicate parameter to be equal.
|
|
201
|
+
|
|
202
|
+
### File creation and modification
|
|
203
|
+
|
|
204
|
+
Create and modify bind to the frozen target and expected transition described below. For modify, the Guard re-hashes the source bytes against the frozen pre-digest before deriving the unique UTF-8 replacement post-digest.
|
|
205
|
+
|
|
206
|
+
### Restart
|
|
207
|
+
|
|
208
|
+
Restart requires the exact service id. It persists an intent before POST and closes only after the restored process reports a changed boot ID.
|
|
209
|
+
|
|
210
|
+
### Windows command shims
|
|
211
|
+
|
|
212
|
+
Windows `.cmd` and `.bat` actions also bind the canonical `SystemRoot\\System32\\cmd.exe` realpath and version. Arguments containing shell control, expansion, quotes, NUL, or newline characters are unsupported. Execution never performs a second `PATH` search or trusts a changed `ComSpec`.
|
|
213
|
+
|
|
214
|
+
### Concurrency limit
|
|
215
|
+
|
|
216
|
+
Pre-execute revalidation is a correctness check, not isolation from another process running as the same user. Any divergent post-action readback is not certified.
|
|
217
|
+
|
|
218
|
+
### Expected transitions and readback
|
|
219
|
+
|
|
220
|
+
Every stateful resolution freezes its expected transition before the effect and binds a stable digest of that payload. Checkpoint diagnostics copy the immutable payload from the resolution fact. Callers cannot construct create or modify predicates from post-effect state.
|
|
221
|
+
|
|
222
|
+
- **Create:** hash the exact UTF-8 content from the closed write manifest.
|
|
223
|
+
- **Modify:** read the original bytes, require valid UTF-8 and exactly one `old_string` match, apply the pinned single replacement in memory, and hash the resulting bytes.
|
|
224
|
+
- **Restart:** freeze `health=healthy` as a manifest constant.
|
|
92
225
|
|
|
93
|
-
|
|
226
|
+
After the action, independent state readback must match the frozen transition. A successful effect with different state remains incomplete.
|
|
94
227
|
|
|
95
228
|
## Legacy v0.2 command parsing subset
|
|
96
229
|
|
package/docs/LOCAL_ACCEPTANCE.md
CHANGED
|
@@ -2,7 +2,73 @@
|
|
|
2
2
|
|
|
3
3
|
Each section names its evidence boundary. Deterministic checks, isolated DSH_HOME composition, native-platform lifecycle runs, model sessions, CI, and public release readback are separate claims; none substitutes for another.
|
|
4
4
|
|
|
5
|
-
## v0.
|
|
5
|
+
## v0.4.0 release contract and pre-release history (2026-09-02)
|
|
6
|
+
|
|
7
|
+
Version 0.4.0 targets DSH `0.1.2-alpha.3` with dshmarket `1.39.0` and Cordis `4.0.2`. The repository does not place a candidate's own commit, checksum, or public status inside that candidate's packaged documentation: those facts are generated after the package bytes are frozen and are attached to the GitHub Release.
|
|
8
|
+
|
|
9
|
+
| Gate | Required evidence and location |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| Source and CI | one clean release commit; repository matrix plus Ubuntu, macOS, and Windows Node.js 22/24 CI |
|
|
12
|
+
| Exact artifact | one deterministic 26-file tgz; full `gitHead`, SHA-256, npm shasum, integrity, size, and file count in `release-artifact.json` and `SHA256SUMS.txt` |
|
|
13
|
+
| Native macOS and Windows | the same tgz on both platforms; separate machine-readable annexes covering isolated Web and Headless lifecycle, host-lock, restart, daily-profile preservation, and cleanup |
|
|
14
|
+
| Tag, npm, and GitHub Release | annotated tag, npm manifest and downloaded package, Release target and assets, and anonymous public readback all resolve to the same commit and bytes |
|
|
15
|
+
| Daily-profile upgrade | separate from release acceptance; never implied by a passing artifact run |
|
|
16
|
+
|
|
17
|
+
### Superseded pre-release artifacts
|
|
18
|
+
|
|
19
|
+
The first 26-file candidate, SHA-256 `33757ce11633ac167fa9c5a6fdb7a8938578fcb871edd9afdb2f89dcb51b4316`, was built from implementation baseline `ffc6fe9e1246a815f0bb630943c59d14b6505716`. Native macOS passed. Native Windows reached the restart endpoint but did not prove a changed boot ID, so its Headless phase correctly remained unrun. That candidate was superseded when packaged documentation changed.
|
|
20
|
+
|
|
21
|
+
The next 26-file candidate, SHA-256 `f3489e0f1edbb81e0ebdbd33e43a14e46913496cb3e1c799115143a70d2ab4c9`, was built from `ae20bffd06af45d4a0c60519f5ab7a7af6076ec8`. Its exact bytes passed isolated native macOS and Windows Web and Headless acceptance; the Windows R2 record contained 25 passing gates. Publication was still rejected because the package itself repeated the superseded candidate's blocked status and said another package still had to be built. That documentation defect is why a later release candidate is required; the native results remain valid only for `f3489e0f...`.
|
|
22
|
+
|
|
23
|
+
## v0.3.2 release gates (2026-09-01, passed)
|
|
24
|
+
|
|
25
|
+
The release candidate is commit
|
|
26
|
+
`22cde6106cdca511265bb4103375a263a0762b9c`. Its frozen
|
|
27
|
+
`dsh-completion-guard-0.3.2.tgz` contains 26 files, is 181157 bytes, and has
|
|
28
|
+
SHA-256
|
|
29
|
+
`feb7fc29799820e08dfe6d2bdb94823e745df9b5aa7c34d46262e5df30dabac4`.
|
|
30
|
+
The package manifest carries the same full commit as `gitHead`. Candidate CI
|
|
31
|
+
run 33461879125 passed Ubuntu, macOS, and Windows on Node.js 22 and 24.
|
|
32
|
+
|
|
33
|
+
Those exact package bytes passed the required isolated Web and Headless
|
|
34
|
+
lifecycle on native Windows and macOS: artifact and commit parity, clean
|
|
35
|
+
install, strict Web reinstall no-op, installed-file parity, complete 34-row
|
|
36
|
+
host checks, plugin load and configuration readback, real Web restart with
|
|
37
|
+
403 rejection and 202 acceptance, changed boot ID, HTTP recovery, intentional
|
|
38
|
+
Headless `MISSING_CREDENTIAL`, and scoped cleanup. The platform-specific host
|
|
39
|
+
digests differ because platform identity is part of the lock; both match their
|
|
40
|
+
own complete checked package graph. The optional credentialed model-session
|
|
41
|
+
gate was not run and is not claimed.
|
|
42
|
+
|
|
43
|
+
`inspect` and `verify-dump` answer different questions. `inspect` reports
|
|
44
|
+
whether the active runtime and profile package graph is a supported complete
|
|
45
|
+
set, so it can correctly return `supported` before injection. The pre-injection
|
|
46
|
+
fail-closed check comes from reading the composed config and from
|
|
47
|
+
`verify-dump`, which rejects missing or mismatched injected host-lock data.
|
|
48
|
+
|
|
49
|
+
The annotated `v0.3.2` tag has tag-object SHA
|
|
50
|
+
`753fd9625c58c03de2660464c7f7c86462a42eb1` and peels to the release commit
|
|
51
|
+
above. Tag CI run 33474979019 passed the same six Ubuntu, macOS, and Windows
|
|
52
|
+
Node.js 22/24 combinations. npm published this exact tgz at
|
|
53
|
+
`2026-09-01T05:54:28.309Z`; anonymous registry readback returned
|
|
54
|
+
`latest=0.3.2`, the expected `gitHead`, shasum and integrity, and a fresh
|
|
55
|
+
download was byte-identical to the frozen file.
|
|
56
|
+
|
|
57
|
+
The non-draft, non-prerelease
|
|
58
|
+
[`v0.3.2` GitHub Release](https://github.com/GreenLv/dsh-completion-guard/releases/tag/v0.3.2)
|
|
59
|
+
was published at `2026-09-01T05:56:24Z`. Its 181157-byte tgz and 97-byte
|
|
60
|
+
`SHA256SUMS.txt` have GitHub asset digests
|
|
61
|
+
`sha256:feb7fc29799820e08dfe6d2bdb94823e745df9b5aa7c34d46262e5df30dabac4`
|
|
62
|
+
and
|
|
63
|
+
`sha256:82f839d3ccf5f429b10ae18cc54350379097f0f59b01a462ed222a869886a451`.
|
|
64
|
+
Anonymous downloads of both assets were byte-identical to the frozen files.
|
|
65
|
+
|
|
66
|
+
This section is a post-candidate evidence record and is not part of the
|
|
67
|
+
accepted tgz. Changing the package bytes or release commit would still require
|
|
68
|
+
new artifact and native-platform acceptance. Consumer pin and managed runtime
|
|
69
|
+
installation remain separate actions.
|
|
70
|
+
|
|
71
|
+
### Earlier source and host-cohort gates
|
|
6
72
|
|
|
7
73
|
Version 0.3.2 lets the Guard recognize either of two complete DSH package sets. It never combines packages from different sets, and a missing or mismatched package leaves the whole host unavailable. The initial host-cohort checks below were run on macOS from a working tree based on `844b62848c1e2685e0574b660dc4546b6bf6dbac`, which was `origin/main` when implementation began. They cover source behavior, not a release artifact.
|
|
8
74
|
|
|
@@ -25,10 +91,8 @@ Native Windows source evidence (2026-09-01, PowerShell 5.1):
|
|
|
25
91
|
- Fresh checkout `a3e77de6d8260f16f0723491495cacab57b9f62d` passed install, build, release-pack (2/2), and `git diff --check`.
|
|
26
92
|
- The active DSH `0.1.2-alpha.2` / dshmarket `1.38.1` graph matched all 34 candidate rows; missing, extra, and duplicate counts were zero. This authorizes the Windows cohort registration, but it is source/host evidence rather than final package evidence.
|
|
27
93
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- A frozen package from a clean committed tree, followed by isolated Web and Headless install, no-op, package comparison, host check, restart, cleanup, and native macOS/Windows acceptance of those same bytes.
|
|
31
|
-
- Final documentation-inclusive candidate CI, release readback, tag, npm publication, GitHub Release, and consumer pin updates.
|
|
94
|
+
The frozen artifact above closes the package and native-platform lifecycle
|
|
95
|
+
gates. Release mutation and public readback remain separate.
|
|
32
96
|
|
|
33
97
|
## v0.3.1 release-repair gates
|
|
34
98
|
|
package/docs/PORTING_NOTES.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# Porting Notes
|
|
2
2
|
|
|
3
|
-
The DSH implementation
|
|
3
|
+
The DSH implementation started from `GreenLv/codex-context-guard` v0.8.8 and
|
|
4
|
+
replaced the Codex platform layer. That version is provenance, not the current
|
|
5
|
+
compatibility claim. Shared behavior now advances through pinned conformance
|
|
6
|
+
fixtures and an explicit delta ledger.
|
|
4
7
|
|
|
5
8
|
| Area | Treatment |
|
|
6
9
|
| --- | --- |
|
|
@@ -9,6 +12,13 @@ The DSH implementation ports deterministic Context Guard semantics from `GreenLv
|
|
|
9
12
|
| evidence and proof binding | Adapt to DSH durable tool-result events |
|
|
10
13
|
| recovery and stop policy | Adapt to DSH agent lifecycle |
|
|
11
14
|
| Codex hooks, cache manager, Python runtime | Delete from DSH runtime |
|
|
12
|
-
|
|
|
15
|
+
| portable protocol and digest fixtures | Mirror exact upstream bytes and verify their hashes |
|
|
16
|
+
| product-specific or newer Codex behavior | Record explicitly in the delta ledger before porting |
|
|
13
17
|
|
|
14
|
-
The DSH port derives
|
|
18
|
+
The DSH port derives guard state from native DSH session events, connects the
|
|
19
|
+
completion gate to Goal handling, and fails closed when it cannot verify the
|
|
20
|
+
host or evidence. Version 0.3.2 has passed same-package Web and Headless
|
|
21
|
+
lifecycle checks on macOS and Windows. This does not make the two products
|
|
22
|
+
interchangeable or imply full parity with Codex 0.9.5; current gaps are listed
|
|
23
|
+
in [`SEMANTIC_COMPATIBILITY.md`](SEMANTIC_COMPATIBILITY.md) and
|
|
24
|
+
[`upstream-deltas.json`](upstream-deltas.json).
|