coderifts 8.1.0 → 8.2.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 +6 -0
- package/dist/cli.js +16 -5
- package/package.json +2 -2
- package/scripts/assert-guard-major.js +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 8.2.0 - 2026-09-05
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- `@coderifts/agent-guard` range raised to `^17.0.0` (MIN_GUARD_MAJOR 17). Guard 17 blocks a raw shell carrying a mutation by default (a host-declared mutating_shell now reaches the UNGUARDED_MUTATION decision instead of slipping through). The CLI range must match so `npm i -g coderifts` installs the guard whose default the docs describe. No CLI behaviour change beyond the installed guard major.
|
|
7
|
+
|
|
8
|
+
|
|
3
9
|
## 8.1.0 - 2026-09-05
|
|
4
10
|
|
|
5
11
|
### Changed
|
package/dist/cli.js
CHANGED
|
@@ -3028,7 +3028,7 @@ var require_package = __commonJS({
|
|
|
3028
3028
|
"package.json"(exports2, module2) {
|
|
3029
3029
|
module2.exports = {
|
|
3030
3030
|
name: "coderifts",
|
|
3031
|
-
version: "8.
|
|
3031
|
+
version: "8.2.0",
|
|
3032
3032
|
description: "Detect breaking API changes from the command line. Works locally or with the CodeRifts cloud API.",
|
|
3033
3033
|
author: "CodeRifts <hello@coderifts.com>",
|
|
3034
3034
|
license: "MIT",
|
|
@@ -3074,7 +3074,7 @@ var require_package = __commonJS({
|
|
|
3074
3074
|
test: "node --test test/*.test.js"
|
|
3075
3075
|
},
|
|
3076
3076
|
dependencies: {
|
|
3077
|
-
"@coderifts/agent-guard": "^
|
|
3077
|
+
"@coderifts/agent-guard": "^17.0.0",
|
|
3078
3078
|
chalk: "^4.1.2",
|
|
3079
3079
|
"cli-table3": "^0.6.4",
|
|
3080
3080
|
commander: "^12.0.0",
|
|
@@ -66622,10 +66622,14 @@ var require_unguarded_mutation = __commonJS({
|
|
|
66622
66622
|
"use strict";
|
|
66623
66623
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
66624
66624
|
exports2.ADVISORY_ENV_VAR = void 0;
|
|
66625
|
+
exports2.isDeclaredMutatingClass = isDeclaredMutatingClass;
|
|
66625
66626
|
exports2.decideUnguardedMutation = decideUnguardedMutation;
|
|
66626
66627
|
var ADVISORY_TRUE = /* @__PURE__ */ new Set(["1", "true", "yes", "on"]);
|
|
66627
66628
|
exports2.ADVISORY_ENV_VAR = "CODERIFTS_ADVISORY";
|
|
66628
66629
|
var RISK = 'A mutating tool call reached the guard with no verified receipt: the detector did not recognise a contract artifact, so nothing was preflighted and nothing was signed. "Not a contract change" describes the artifact, not the action \u2014 the write still happens.';
|
|
66630
|
+
function isDeclaredMutatingClass(cls) {
|
|
66631
|
+
return typeof cls === "string" && cls.startsWith("mutating");
|
|
66632
|
+
}
|
|
66629
66633
|
function decideUnguardedMutation(mutating, policy, env) {
|
|
66630
66634
|
if (!mutating)
|
|
66631
66635
|
return { stop: false };
|
|
@@ -71819,7 +71823,8 @@ var require_guard = __commonJS({
|
|
|
71819
71823
|
const suppressedByStrict = config.requireExplicitArtifacts === true && redacted.nonContract === true && (!detection.artifacts || detection.artifacts.length === 0) && detection.confident && !detection.trigger;
|
|
71820
71824
|
if (!detection.trigger || suppressedByStrict) {
|
|
71821
71825
|
emit(config, { type: "detection_skip", at: iso(), signals: detection.signals, detectorVersion: detector.version });
|
|
71822
|
-
const
|
|
71826
|
+
const declaredMutating = (0, unguarded_mutation_js_1.isDeclaredMutatingClass)(redacted.mutationClass);
|
|
71827
|
+
const um = (0, unguarded_mutation_js_1.decideUnguardedMutation)((0, freshness_js_1.isMutatingCall)(redacted) || declaredMutating, config.requireGuardedMutation, process.env);
|
|
71823
71828
|
if (um.stop) {
|
|
71824
71829
|
emit(config, { type: "unguarded_mutation_blocked", at: iso(), cause: um.detail });
|
|
71825
71830
|
breakerRecord(config);
|
|
@@ -74423,7 +74428,10 @@ var require_tool_registry = __commonJS({
|
|
|
74423
74428
|
meta: tool.meta,
|
|
74424
74429
|
execute: async (args) => {
|
|
74425
74430
|
const deriveCfg = (0, auto_derive_js_1.normalizeAutoDerive)(guardCfg.autoDerive);
|
|
74426
|
-
const rebindRaw = () =>
|
|
74431
|
+
const rebindRaw = () => {
|
|
74432
|
+
const c = binder(tool, args, cls);
|
|
74433
|
+
return c && c.mutationClass === void 0 ? { ...c, mutationClass: cls } : c;
|
|
74434
|
+
};
|
|
74427
74435
|
let lastDerivation = null;
|
|
74428
74436
|
const rebind = async () => {
|
|
74429
74437
|
const c = rebindRaw();
|
|
@@ -77491,7 +77499,7 @@ var require_cjs4 = __commonJS({
|
|
|
77491
77499
|
exports2.createDbVersionToken = exports2.API_ABSENT_TOKEN = exports2.API_VERSION_TOKEN_PREFIX = exports2.apiTokenRaw = exports2.writeApiIfUnchanged = exports2.createApiVersionToken = exports2.identitiesEqual = exports2.fsObjectIdentity = exports2.UnsafeCasPathError = exports2.assertSafeCasPath = exports2.FS_ABSENT_TOKEN = exports2.FS_VERSION_TOKEN_PREFIX = exports2.fsTokenContentHash = exports2.createFsPriorContentResolver = exports2.writeFileIfUnchanged = exports2.readVersionedFile = exports2.createFsVersionToken = exports2.StaleVersionTokenAbort = exports2.executeIfUnchanged = exports2.RESIDUAL_UNCONDITIONAL_WRITE = exports2.conditionalWriteResidual = exports2.tokensEqual = exports2.buildConditionalWriteBasis = exports2.buildFreshnessBasis = exports2.collectFreshnessCallContext = exports2.artifactIdsForResolve = exports2.isMutatingCall = exports2.isWriteStyleCall = exports2.freshnessAllowsEnforce = exports2.computePathSetTreeHash = exports2.contentByteIdentical = exports2.assessWriteStylePrior = exports2.assessFreshness = exports2.deriveProofBanner = exports2.attachProofToAgentResponse = exports2.renderFinalAnswerProof = exports2.EXECUTION_PROOF_SPEC = exports2.assertEnforcedReceiptInvariant = exports2.hashExecutionResult = exports2.buildExecutionProof = exports2.COVERAGE_ATTEST_ENVELOPE_TAG = exports2.COVERAGE_ATTEST_SIGNING_PREFIX = exports2.COVERAGE_ATTEST_VERSION = exports2.coverageAttestSigningInput = exports2.kidFromCoverageAttestation = exports2.tryIssueCoverageAttestation = exports2.MONITOR_ATTEST_ENVELOPE_TAG = exports2.MONITOR_ATTEST_SIGNING_PREFIX = exports2.MONITOR_ATTEST_VERSION = exports2.receiptDigestOfToken = void 0;
|
|
77492
77500
|
exports2.AUTO_DERIVE_READ_TIMEOUT_MS = exports2.AUTO_DERIVE_SOURCE = exports2.defaultFsReader = exports2.normalizeAutoDerive = exports2.runAutoDerive = exports2.AUTO_RECHECK_MAX_CAP = exports2.clampMaxAttempts = exports2.normalizeAutoRecheck = exports2.runAutoRecheckLoop = exports2.coverageReport = exports2.DEPLOY_REPAIRABLE_REASONS = exports2.bindDeploy = exports2.NEXT_STEP_NOTE = exports2.NEXT_AGENT_ACTIONS = exports2.readNextAgentStep = exports2.verifyDeployReceiptToken = exports2.DEPLOY_RECEIPT_VIEW_SPEC = exports2.isVerifiedDeployReceiptView = exports2.asVerifiedDeployReceiptView = exports2.deployGate = exports2.gateDecision = exports2.RegistryConstructionError = exports2.guardToolRegistry = exports2.globToRegExp = exports2.matchGlob = exports2.blobMapKey = exports2.classifyByName = exports2.resolveArtifacts = exports2.REMEDIATION_LOOP_ATTESTATION_SPEC = exports2.isCasAttestation = exports2.readPriorBlockRemediation = exports2.readRemediationTransaction = exports2.buildRemediationLoopAttestation = exports2.COMMIT_EVIDENCE_MISSING = exports2.CAS_ATTESTATION_SPEC = exports2.strictCommitObservation = exports2.extractExecutorAttestationToken = exports2.evaluateCasEvidence = exports2.isExecuteIfUnchangedOutcome = exports2.isGuardExecutionProof = exports2.buildCasAttestation = exports2.REGISTRY_ABSENT_TOKEN = exports2.REGISTRY_VERSION_TOKEN_PREFIX = exports2.registryTokenRaw = exports2.writeRegistryIfUnchanged = exports2.createRegistryVersionToken = exports2.DB_ABSENT_TOKEN = exports2.DB_VERSION_TOKEN_PREFIX = exports2.dbTokenRaw = exports2.writeDbIfUnchanged = void 0;
|
|
77493
77501
|
exports2.inferFsPathFromArgs = exports2.FRESHNESS_RESOLVER_FIX = exports2.freshnessRefusalTeaching = exports2.formatGateRefusalBody = exports2.defaultSerializeLangGraphToolResult = exports2.bindLangGraphGuardOutcome = exports2.LangGraphToolsNotStructuredError = exports2.isLangGraphReactAgentTool = exports2.bindLangGraphTools = exports2.protectedToolToLangGraph = exports2.toLangGraphTools = exports2.langGraphToolAdapter = exports2.withCodeRiftsLangGraph = exports2.defaultSerializeAnthropicToolResult = exports2.bindAnthropicGuardOutcome = exports2.protectedToolToAnthropic = exports2.toAnthropicTools = exports2.anthropicToolAdapter = exports2.withCodeRiftsAnthropic = exports2.defaultSerializeOpenAIToolResult = exports2.bindOpenAIGuardOutcome = exports2.protectedToolToOpenAI = exports2.toOpenAITools = exports2.openAIToolAdapter = exports2.withCodeRiftsOpenAI = exports2.formatCoverageObservedLine = exports2.freezeCoverageObserved = exports2.createCoverageObserver = exports2.readExecutionGrantToken = exports2.isExecutionGrantEnabled = exports2.POSTURE_CLOCK_SKEW_TOLERANCE_MS = exports2.POSTURE_RECEIPT_V = exports2.verifyPostureReceipt = exports2.ATOMIC_V2_MAX_AGE_MS_CAP = exports2.CREDENTIAL_BOUNDARY_BARE_REJECTED = exports2.atomicConstructionProblems = exports2.isEnforcingAtomicV2 = exports2.PROFILE_ENFORCING_ATOMIC_V2 = exports2.isEnforcingAtomic = exports2.atomicOutcome = exports2.ATOMIC_PROFILE_UNSATISFIED = exports2.ATOMIC_INVARIANTS = exports2.createMutatorRegister = exports2._resetUnversionedProfileNoticeForTest = exports2.UNVERSIONED_PROFILE_NOTICE = exports2.PROFILE_ENFORCING_ATOMIC_V1 = exports2.PROFILE_ENFORCING_STRICT_V1 = exports2.guardedFractionAmongRoutes = exports2.foldTableSettledCalls = exports2.withCodeRifts = void 0;
|
|
77494
|
-
exports2.ADVISORY_ENV_VAR = exports2.decideUnguardedMutation = exports2.missingReceiptDecision = exports2.offlineReceiptVerifier = exports2.kidFromToolsetAttestation = exports2.tryIssueToolsetAttestation = exports2.toolsetAttestSigningInput = exports2.declarationEntriesFromTools = exports2.computeToolsetDigest = exports2.TOOLSET_ATTEST_STATEMENT = exports2.TOOLSET_ATTEST_ENVELOPE_TAG = exports2.TOOLSET_ATTEST_SIGNING_PREFIX = exports2.TOOLSET_ATTEST_VERSION = exports2.surfaceEnvelopeFields = exports2.isGuardOutcome = exports2.executeVercelToolCall = exports2.executeLangGraphToolCall = exports2.executeGeminiToolCall = exports2.executeAnthropicToolCall = exports2.executeOpenAIToolCall = exports2.executeProtectedTool = exports2.defaultSerializeVercelToolResult = exports2.bindVercelGuardOutcome = exports2.protectedToolToVercel = exports2.toVercelTools = exports2.vercelToolAdapter = exports2.withCodeRiftsVercel = exports2.defaultSerializeCrewAIToolResult = exports2.bindCrewAIToolOutcome = exports2.LANGCHAIN_ARTIFACT_SPEC = exports2.defaultSerializeLangChainToolResult = exports2.bindLangChainToolOutcome = exports2.defaultSerializeGeminiToolResult = exports2.bindGeminiGuardOutcome = exports2.protectedToolToFunctionDeclaration = exports2.toGeminiTools = exports2.geminiToolAdapter = exports2.withCodeRiftsGemini = exports2.measureFsAuthorizationToken = exports2.measureFsAuthorization = exports2.wrapWriteWithFsCas = exports2.inferFullFileWriteContent = void 0;
|
|
77502
|
+
exports2.ADVISORY_ENV_VAR = exports2.isDeclaredMutatingClass = exports2.decideUnguardedMutation = exports2.missingReceiptDecision = exports2.offlineReceiptVerifier = exports2.kidFromToolsetAttestation = exports2.tryIssueToolsetAttestation = exports2.toolsetAttestSigningInput = exports2.declarationEntriesFromTools = exports2.computeToolsetDigest = exports2.TOOLSET_ATTEST_STATEMENT = exports2.TOOLSET_ATTEST_ENVELOPE_TAG = exports2.TOOLSET_ATTEST_SIGNING_PREFIX = exports2.TOOLSET_ATTEST_VERSION = exports2.surfaceEnvelopeFields = exports2.isGuardOutcome = exports2.executeVercelToolCall = exports2.executeLangGraphToolCall = exports2.executeGeminiToolCall = exports2.executeAnthropicToolCall = exports2.executeOpenAIToolCall = exports2.executeProtectedTool = exports2.defaultSerializeVercelToolResult = exports2.bindVercelGuardOutcome = exports2.protectedToolToVercel = exports2.toVercelTools = exports2.vercelToolAdapter = exports2.withCodeRiftsVercel = exports2.defaultSerializeCrewAIToolResult = exports2.bindCrewAIToolOutcome = exports2.LANGCHAIN_ARTIFACT_SPEC = exports2.defaultSerializeLangChainToolResult = exports2.bindLangChainToolOutcome = exports2.defaultSerializeGeminiToolResult = exports2.bindGeminiGuardOutcome = exports2.protectedToolToFunctionDeclaration = exports2.toGeminiTools = exports2.geminiToolAdapter = exports2.withCodeRiftsGemini = exports2.measureFsAuthorizationToken = exports2.measureFsAuthorization = exports2.wrapWriteWithFsCas = exports2.inferFullFileWriteContent = void 0;
|
|
77495
77503
|
var guard_js_1 = require_guard();
|
|
77496
77504
|
Object.defineProperty(exports2, "guardToolCall", { enumerable: true, get: function() {
|
|
77497
77505
|
return guard_js_1.guardToolCall;
|
|
@@ -78267,6 +78275,9 @@ var require_cjs4 = __commonJS({
|
|
|
78267
78275
|
Object.defineProperty(exports2, "decideUnguardedMutation", { enumerable: true, get: function() {
|
|
78268
78276
|
return unguarded_mutation_js_1.decideUnguardedMutation;
|
|
78269
78277
|
} });
|
|
78278
|
+
Object.defineProperty(exports2, "isDeclaredMutatingClass", { enumerable: true, get: function() {
|
|
78279
|
+
return unguarded_mutation_js_1.isDeclaredMutatingClass;
|
|
78280
|
+
} });
|
|
78270
78281
|
Object.defineProperty(exports2, "ADVISORY_ENV_VAR", { enumerable: true, get: function() {
|
|
78271
78282
|
return unguarded_mutation_js_1.ADVISORY_ENV_VAR;
|
|
78272
78283
|
} });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coderifts",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"description": "Detect breaking API changes from the command line. Works locally or with the CodeRifts cloud API.",
|
|
5
5
|
"author": "CodeRifts <hello@coderifts.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"test": "node --test test/*.test.js"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@coderifts/agent-guard": "^
|
|
49
|
+
"@coderifts/agent-guard": "^17.0.0",
|
|
50
50
|
"chalk": "^4.1.2",
|
|
51
51
|
"cli-table3": "^0.6.4",
|
|
52
52
|
"commander": "^12.0.0",
|
|
@@ -73,6 +73,10 @@
|
|
|
73
73
|
* asVerifiedDeployReceiptView, DEPLOY_RECEIPT_VIEW_SPEC and matchGlob — no DeployGateReason
|
|
74
74
|
* exhaustive switch, no V2 config-conflict throw. The raise is installer-facing: the range
|
|
75
75
|
* is what `npm i -g coderifts` resolves.)
|
|
76
|
+
* 8.2.0: floor raised to 17 (published guard 17.0.0 is on npm; 17 blocks raw shell carrying a
|
|
77
|
+
* mutation by default — a host-declared mutating_shell now reaches the block instead of dying at
|
|
78
|
+
* the descriptor boundary. The CLI range must match so a fresh install gets the guard whose
|
|
79
|
+
* default the docs describe.)
|
|
76
80
|
* 8.1.0: floor raised to 16 (published guard 16.0.0 is on npm; 16 makes UNGUARDED_MUTATION
|
|
77
81
|
* fail-closed the default. The CLI range must match so `npm i -g coderifts` installs the guard
|
|
78
82
|
* whose default the docs describe, not the 15.x advisory-default it shipped alongside before.)
|
|
@@ -82,7 +86,7 @@ const fs = require('fs');
|
|
|
82
86
|
const path = require('path');
|
|
83
87
|
|
|
84
88
|
/** Minimum acceptable major for @coderifts/agent-guard in THIS package (the CLI). */
|
|
85
|
-
const MIN_GUARD_MAJOR =
|
|
89
|
+
const MIN_GUARD_MAJOR = 17;
|
|
86
90
|
const DEP = '@coderifts/agent-guard';
|
|
87
91
|
|
|
88
92
|
/**
|