create-principles-disciple 1.145.32 → 1.145.33
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/_release/product-identity.json +1 -1
- package/codex-adapter/dist/ingestion/ingestion.js +3 -1
- package/codex-adapter/package.json +1 -1
- package/console/dist/server/models/ActivationsConsoleModel.d.ts +19 -2
- package/console/dist/server/models/ActivationsConsoleModel.js +124 -10
- package/console/dist/server/models/OwnerDecisionConsoleModel.d.ts +3 -1
- package/console/dist/server/models/OwnerDecisionConsoleModel.js +6 -2
- package/console/dist/server/routes/activations.js +7 -2
- package/console/dist/server/routes/owner-decisions.js +1 -1
- package/core/dist/runtime-v2/activation/index.d.ts +6 -0
- package/core/dist/runtime-v2/activation/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/index.js +3 -0
- package/core/dist/runtime-v2/activation/index.js.map +1 -1
- package/core/dist/runtime-v2/activation/openclaw-promotion-checks.d.ts +75 -0
- package/core/dist/runtime-v2/activation/openclaw-promotion-checks.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/openclaw-promotion-checks.js +131 -37
- package/core/dist/runtime-v2/activation/openclaw-promotion-checks.js.map +1 -1
- package/core/dist/runtime-v2/activation/production-gate-deps.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/production-gate-deps.js +7 -3
- package/core/dist/runtime-v2/activation/production-gate-deps.js.map +1 -1
- package/core/dist/runtime-v2/activation/recovery-composition.d.ts +54 -0
- package/core/dist/runtime-v2/activation/recovery-composition.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/recovery-composition.js +129 -0
- package/core/dist/runtime-v2/activation/recovery-composition.js.map +1 -0
- package/core/dist/runtime-v2/activation/recovery-control-surfaces.d.ts +62 -0
- package/core/dist/runtime-v2/activation/recovery-control-surfaces.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/recovery-control-surfaces.js +84 -0
- package/core/dist/runtime-v2/activation/recovery-control-surfaces.js.map +1 -0
- package/core/dist/runtime-v2/activation/rulecode-shadow-summary.d.ts +13 -1
- package/core/dist/runtime-v2/activation/rulecode-shadow-summary.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/rulecode-shadow-summary.js +24 -1
- package/core/dist/runtime-v2/activation/rulecode-shadow-summary.js.map +1 -1
- package/core/dist/runtime-v2/index.d.ts +2 -2
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +1 -1
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/trajectory-schema.d.ts.map +1 -1
- package/core/dist/runtime-v2/trajectory-schema.js +12 -1
- package/core/dist/runtime-v2/trajectory-schema.js.map +1 -1
- package/core/dist/runtime-v2/types/event-types.d.ts +10 -0
- package/core/dist/runtime-v2/types/event-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/event-types.js +1 -0
- package/core/dist/runtime-v2/types/event-types.js.map +1 -1
- package/core/package.json +1 -1
- package/host-runtime/dist/cli-recovery-probe.d.ts +30 -0
- package/host-runtime/dist/cli-recovery-probe.js +169 -0
- package/host-runtime/dist/governance-signal-admission.js +22 -5
- package/host-runtime/dist/host-liveness-contract.d.ts +51 -28
- package/host-runtime/dist/host-liveness-contract.js +143 -46
- package/host-runtime/dist/index.d.ts +2 -0
- package/host-runtime/dist/index.js +2 -0
- package/host-runtime/dist/production-pain-evidence.d.ts +2 -0
- package/host-runtime/dist/production-pain-evidence.js +46 -8
- package/host-runtime/dist/production-rulehost-gate.js +24 -6
- package/host-runtime/dist/workbuddy-rule-context-provider.d.ts +33 -0
- package/host-runtime/dist/workbuddy-rule-context-provider.js +126 -0
- package/host-runtime/dist/workspace-behavior-evidence.d.ts +22 -5
- package/host-runtime/dist/workspace-behavior-evidence.js +41 -11
- package/host-runtime/package.json +1 -1
- package/package.json +2 -2
- package/pd-cli/dist/commands/recovery-reachability-probe.d.ts +25 -0
- package/pd-cli/dist/commands/recovery-reachability-probe.d.ts.map +1 -0
- package/pd-cli/dist/commands/recovery-reachability-probe.js +50 -0
- package/pd-cli/dist/commands/recovery-reachability-probe.js.map +1 -0
- package/pd-cli/dist/commands/runtime-activation.d.ts +10 -1
- package/pd-cli/dist/commands/runtime-activation.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-activation.js +81 -3
- package/pd-cli/dist/commands/runtime-activation.js.map +1 -1
- package/pd-cli/package.json +1 -1
- package/plugin/dist/bundle.js +385 -385
- package/plugin/dist/governance-audit.js +1 -1
- package/plugin/dist/openclaw.plugin.json +1 -1
- package/plugin/dist/rulehost-evidence.js +1 -1
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +1 -1
- package/release-manager/package.json +2 -2
- package/workbuddy-adapter/dist/codec/input-decoder.d.ts +14 -11
- package/workbuddy-adapter/dist/codec/input-decoder.js +28 -14
- package/workbuddy-adapter/dist/pd-hook.js +31 -12
- package/workbuddy-adapter/package.json +1 -1
|
@@ -1,16 +1,68 @@
|
|
|
1
|
+
import { validateRecoveryControlSurfaces, RECOVERY_CONTROL_SURFACES } from './recovery-control-surfaces.js';
|
|
2
|
+
import { verifyRecoveryProbeComposition } from './recovery-composition.js';
|
|
3
|
+
/**
|
|
4
|
+
* Review R4/P1: validate the per-capability evidence matrix against the
|
|
5
|
+
* recovery-control registry. Required: every registry capability present
|
|
6
|
+
* EXACTLY once, channel matching the registry, ok AND workspace-matched.
|
|
7
|
+
* Duplicates, unknown ids, missing entries, or channel mismatches are
|
|
8
|
+
* coverage failures; entries that ran but failed (or targeted another
|
|
9
|
+
* workspace) are reachability failures. Never cached — the caller produces
|
|
10
|
+
* this evidence fresh for every readiness evaluation.
|
|
11
|
+
*/
|
|
12
|
+
export function validateRecoveryCapabilityCoverage(capabilities) {
|
|
13
|
+
if (capabilities === undefined || capabilities.length === 0) {
|
|
14
|
+
return { ok: false, reason: 'recovery_capability_evidence_incomplete', detail: 'no per-capability reachability evidence supplied' };
|
|
15
|
+
}
|
|
16
|
+
const byId = new Map();
|
|
17
|
+
for (const entry of capabilities) {
|
|
18
|
+
if (byId.has(entry.capabilityId)) {
|
|
19
|
+
return { ok: false, reason: 'recovery_capability_evidence_incomplete', detail: `duplicate evidence for ${entry.capabilityId}` };
|
|
20
|
+
}
|
|
21
|
+
byId.set(entry.capabilityId, entry);
|
|
22
|
+
}
|
|
23
|
+
const problems = [];
|
|
24
|
+
for (const surface of RECOVERY_CONTROL_SURFACES) {
|
|
25
|
+
const entry = byId.get(surface.capabilityId);
|
|
26
|
+
if (entry === undefined) {
|
|
27
|
+
problems.push(`${surface.capabilityId}: no evidence`);
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
if (entry.channel !== surface.channel) {
|
|
31
|
+
problems.push(`${surface.capabilityId}: evidence channel ${entry.channel} does not match the registry channel ${surface.channel}`);
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
if (!entry.ok) {
|
|
35
|
+
problems.push(`${surface.capabilityId}: not reachable${entry.detail !== undefined ? ` (${entry.detail})` : ''}`);
|
|
36
|
+
}
|
|
37
|
+
else if (!entry.workspaceMatched) {
|
|
38
|
+
problems.push(`${surface.capabilityId}: evidence does not target the governed workspace${entry.detail !== undefined ? ` (${entry.detail})` : ''}`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
for (const [capabilityId] of byId) {
|
|
42
|
+
if (!RECOVERY_CONTROL_SURFACES.some(surface => surface.capabilityId === capabilityId)) {
|
|
43
|
+
problems.push(`${capabilityId}: evidence for an unknown capability (not in the recovery-control registry)`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (problems.length > 0) {
|
|
47
|
+
const incomplete = problems.some(problem => problem.includes('no evidence') || problem.includes('unknown capability') || problem.includes('does not match the registry channel'));
|
|
48
|
+
return { ok: false, reason: incomplete ? 'recovery_capability_evidence_incomplete' : 'recovery_reachability_unverified', detail: problems.join('; ') };
|
|
49
|
+
}
|
|
50
|
+
return { ok: true };
|
|
51
|
+
}
|
|
1
52
|
function isRecord(value) {
|
|
2
53
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
3
54
|
}
|
|
4
55
|
function isNonEmptyString(value) {
|
|
5
56
|
return typeof value === 'string' && value.trim().length > 0;
|
|
6
57
|
}
|
|
7
|
-
|
|
58
|
+
const DEFAULT_HOST_CONTRACT_VERSION = 'openclaw-legacy@1';
|
|
59
|
+
function validateHostContract(value, expectedVersion) {
|
|
8
60
|
if (!isRecord(value))
|
|
9
61
|
return null;
|
|
10
62
|
const { outOfBandControls } = value;
|
|
11
63
|
const { protectedCapabilities } = value;
|
|
12
64
|
const { neutralProbes } = value;
|
|
13
|
-
if (value.version !==
|
|
65
|
+
if (value.version !== expectedVersion
|
|
14
66
|
|| value.supportsShadowEvidence !== true
|
|
15
67
|
|| !Array.isArray(outOfBandControls)
|
|
16
68
|
|| !Array.isArray(protectedCapabilities)
|
|
@@ -48,10 +100,18 @@ function validateHostContract(value) {
|
|
|
48
100
|
expectedDecision: 'allow',
|
|
49
101
|
});
|
|
50
102
|
}
|
|
51
|
-
|
|
103
|
+
// Review R3/P1: probe coverage is required for the RULE-INTERCEPTABLE
|
|
104
|
+
// capabilities only (registry CLI channel). Console-channel recovery never
|
|
105
|
+
// passes through the RuleHost gate, so its verification is not a rule
|
|
106
|
+
// replay — probes for those capabilities are rejected by the registry
|
|
107
|
+
// validator instead of demanded here.
|
|
108
|
+
const cliProbeCapabilities = RECOVERY_CONTROL_SURFACES
|
|
109
|
+
.filter(surface => surface.channel === 'cli')
|
|
110
|
+
.map(surface => surface.capabilityId);
|
|
111
|
+
if (!cliProbeCapabilities.every(capability => neutralProbeList.some(probe => probe.capabilityId === capability)))
|
|
52
112
|
return null;
|
|
53
113
|
return {
|
|
54
|
-
version:
|
|
114
|
+
version: expectedVersion,
|
|
55
115
|
supportsShadowEvidence: true,
|
|
56
116
|
outOfBandControls: requiredControls,
|
|
57
117
|
protectedCapabilities: protectedCapabilityList,
|
|
@@ -67,26 +127,6 @@ function parseArtifactContent(artifact) {
|
|
|
67
127
|
return null;
|
|
68
128
|
}
|
|
69
129
|
}
|
|
70
|
-
function artifactWithNeutralProbes(artifact, contract) {
|
|
71
|
-
const content = parseArtifactContent(artifact);
|
|
72
|
-
if (!content || !isRecord(content.goldenTrace) || !Array.isArray(content.goldenTrace.cases))
|
|
73
|
-
return null;
|
|
74
|
-
const cases = contract.neutralProbes.map(probe => ({
|
|
75
|
-
caseId: `host-liveness:${probe.probeId}`,
|
|
76
|
-
kind: 'positive',
|
|
77
|
-
toolName: probe.toolName,
|
|
78
|
-
params: { ...probe.params },
|
|
79
|
-
expectedDecision: 'allow',
|
|
80
|
-
}));
|
|
81
|
-
const trace = {
|
|
82
|
-
traceId: `${String(content.goldenTrace.traceId)}:host-liveness`,
|
|
83
|
-
sourcePainId: String(content.goldenTrace.sourcePainId),
|
|
84
|
-
cases: [...content.goldenTrace.cases, ...cases],
|
|
85
|
-
createdAt: String(content.goldenTrace.createdAt),
|
|
86
|
-
version: 1,
|
|
87
|
-
};
|
|
88
|
-
return { ...artifact, contentJson: JSON.stringify({ ...content, goldenTrace: trace }) };
|
|
89
|
-
}
|
|
90
130
|
export async function collectOpenClawPromotionChecks(artifact, input) {
|
|
91
131
|
const content = parseArtifactContent(artifact);
|
|
92
132
|
const affectedTools = content && Array.isArray(content.affectedTools)
|
|
@@ -99,24 +139,78 @@ export async function collectOpenClawPromotionChecks(artifact, input) {
|
|
|
99
139
|
]);
|
|
100
140
|
const scopeAvoidsProtectedCapabilities = bounded
|
|
101
141
|
&& affectedTools.every(value => !protectedCapabilityIds.has(value));
|
|
102
|
-
const contract = validateHostContract(input.hostContract);
|
|
103
|
-
|
|
142
|
+
const contract = validateHostContract(input.hostContract, input.expectedHostContractVersion ?? DEFAULT_HOST_CONTRACT_VERSION);
|
|
143
|
+
// Review R1 (SPEC-RULECODE-HOST-PROMOTION-001): the contract SHAPE alone
|
|
144
|
+
// never certifies control health. Validate its recovery entries against the
|
|
145
|
+
// real-surface registry (command/route registrations proven by the
|
|
146
|
+
// cross-package contract tests that import it).
|
|
147
|
+
const recoverySurfaces = contract !== null ? validateRecoveryControlSurfaces(contract) : null;
|
|
148
|
+
// Review R3/P1: composition verification runs through the PRODUCTION
|
|
149
|
+
// composition boundary — every rule of the composed set compiled by the
|
|
150
|
+
// same hardened evaluator production replay uses, evaluated on each
|
|
151
|
+
// rule-interceptable probe input, merged by the same mergeDecisions the
|
|
152
|
+
// shared gate uses. Per-artifact golden-trace replay alone is NOT
|
|
153
|
+
// "composition verification" and is no longer described or used as one.
|
|
154
|
+
let composition;
|
|
104
155
|
if (contract && scopeAvoidsProtectedCapabilities) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
156
|
+
composition = verifyRecoveryProbeComposition({
|
|
157
|
+
artifacts: [artifact, ...input.existingLiveArtifacts],
|
|
158
|
+
probes: contract.neutralProbes.map(probe => ({ probeId: probe.probeId, toolName: probe.toolName, params: probe.params })),
|
|
159
|
+
projectDir: input.projectDir ?? '.',
|
|
160
|
+
...(input.toolSemantics !== undefined ? { toolSemantics: input.toolSemantics } : {}),
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
else if (contract) {
|
|
164
|
+
composition = { ok: false, probeId: '__scope__', reason: 'artifact scope overlaps protected capabilities' };
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
// No validated contract → no verified composition (parity with the
|
|
168
|
+
// pre-R3 probesPassed contract requirement).
|
|
169
|
+
composition = { ok: false, probeId: '__contract__', reason: 'no validated host contract' };
|
|
113
170
|
}
|
|
114
|
-
|
|
171
|
+
// Review R3/P1: emergency controls are healthy only when ALL of the
|
|
172
|
+
// following hold — the contract shape-bound to the resolver's version, the
|
|
173
|
+
// safety flag on, every recovery entry verified against the REAL surface
|
|
174
|
+
// registry, TARGET-ENVIRONMENT reachability evidence produced by this very
|
|
175
|
+
// readiness evaluation (no cached "verified once" state), AND the composed
|
|
176
|
+
// rule set (candidate + existing live) allows the rule-interceptable
|
|
177
|
+
// recovery probes through the production merge boundary. Console-channel
|
|
178
|
+
// controls are covered by registry + reachability + structural
|
|
179
|
+
// independence (they never pass through the RuleHost gate; isolated-env
|
|
180
|
+
// route tests prove the pause path and its effect on the gate).
|
|
181
|
+
const reachability = input.recoveryReachability;
|
|
182
|
+
// Review R4/P1: PER-CAPABILITY coverage — the aggregate verdict alone is
|
|
183
|
+
// never accepted. Every registry capability needs its own current,
|
|
184
|
+
// workspace-matched evidence entry (no evidence reuse across capabilities,
|
|
185
|
+
// no caching across evaluations).
|
|
186
|
+
const capabilityCoverage = contract !== null
|
|
187
|
+
? validateRecoveryCapabilityCoverage(reachability?.capabilities)
|
|
188
|
+
: { ok: true };
|
|
189
|
+
const emergencyControlsHealthy = contract !== null
|
|
190
|
+
&& input.safetyControlsEnabled
|
|
191
|
+
&& recoverySurfaces !== null
|
|
192
|
+
&& recoverySurfaces.ok
|
|
193
|
+
&& reachability !== undefined
|
|
194
|
+
&& reachability.ok
|
|
195
|
+
&& reachability.workspaceMatched
|
|
196
|
+
&& capabilityCoverage.ok
|
|
197
|
+
&& composition.ok;
|
|
198
|
+
const emergencyReason = contract === null
|
|
199
|
+
? 'out_of_band_controls_unavailable'
|
|
200
|
+
: !input.safetyControlsEnabled
|
|
201
|
+
? 'safety_controls_disabled'
|
|
202
|
+
: recoverySurfaces !== null && !recoverySurfaces.ok
|
|
203
|
+
? recoverySurfaces.reason
|
|
204
|
+
: reachability === undefined || !reachability.ok || !reachability.workspaceMatched
|
|
205
|
+
? 'recovery_reachability_unverified'
|
|
206
|
+
: !capabilityCoverage.ok
|
|
207
|
+
? capabilityCoverage.reason
|
|
208
|
+
: 'control_probe_composition_failed';
|
|
115
209
|
return [
|
|
116
210
|
{ checkId: 'bounded_scope', status: bounded ? 'passed' : 'failed', ...(!bounded ? { reasonCode: 'explicit_affected_tools_required' } : {}) },
|
|
117
211
|
{ checkId: 'runtime_compatibility', status: contract ? 'passed' : 'failed', ...(!contract ? { reasonCode: 'host_liveness_contract_missing_invalid_or_unsupported' } : {}) },
|
|
118
|
-
{ checkId: 'host_liveness_composition', status:
|
|
119
|
-
{ checkId: 'emergency_controls', status: emergencyControlsHealthy ? 'passed' : 'failed', ...(!emergencyControlsHealthy ? { reasonCode:
|
|
212
|
+
{ checkId: 'host_liveness_composition', status: composition.ok ? 'passed' : 'failed', ...(!composition.ok ? { reasonCode: composition.probeId.startsWith('__') ? `recovery_composition_${composition.probeId.slice(2)}` : 'recovery_probe_composition_blocked' } : {}) },
|
|
213
|
+
{ checkId: 'emergency_controls', status: emergencyControlsHealthy ? 'passed' : 'failed', ...(!emergencyControlsHealthy ? { reasonCode: emergencyReason } : {}) },
|
|
120
214
|
{ checkId: 'runtime_shadow_evidence', status: contract?.supportsShadowEvidence === true ? 'passed' : 'failed', ...(contract?.supportsShadowEvidence === true ? {} : { reasonCode: 'runtime_shadow_evidence_unsupported' }) },
|
|
121
215
|
{ checkId: 'owner_identity_configuration', status: input.ownerIdentityConfigured ? 'passed' : 'failed', ...(!input.ownerIdentityConfigured ? { reasonCode: 'configured_owner_missing' } : {}) },
|
|
122
216
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openclaw-promotion-checks.js","sourceRoot":"","sources":["../../../src/runtime-v2/activation/openclaw-promotion-checks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"openclaw-promotion-checks.js","sourceRoot":"","sources":["../../../src/runtime-v2/activation/openclaw-promotion-checks.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,+BAA+B,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC5G,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AA0F3E;;;;;;;;GAQG;AACH,MAAM,UAAU,kCAAkC,CAChD,YAA+D;IAE/D,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;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CAAC,CAAC,CAAC,EAAE,CAAC,EAAE;QACxQ,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,wBAAwB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE;QAChK,EAAE,OAAO,EAAE,yBAAyB,EAAE,MAAM,EAAE,QAAQ,EAAE,sBAAsB,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,sBAAsB,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,qCAAqC,EAAE,CAAC,EAAE;QAC5N,EAAE,OAAO,EAAE,8BAA8B,EAAE,MAAM,EAAE,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,0BAA0B,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE;KAChM,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"production-gate-deps.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/activation/production-gate-deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAKH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,KAAK,EACV,uBAAuB,EACxB,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;
|
|
1
|
+
{"version":3,"file":"production-gate-deps.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/activation/production-gate-deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAKH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,KAAK,EACV,uBAAuB,EACxB,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AA8EzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,gBAAgB,CAgFhG;AAED,MAAM,WAAW,yBAAyB;IACxC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,GAAE,yBAA8B,GAAG,uBAAuB,CAwFzG"}
|
|
@@ -58,10 +58,13 @@ function isValidRuleHostResult(value) {
|
|
|
58
58
|
* Untrusted input crosses as DATA (a string), never as code or objects.
|
|
59
59
|
*/
|
|
60
60
|
function normalizeSource(sourceCode) {
|
|
61
|
-
|
|
61
|
+
return sourceCode
|
|
62
62
|
.replace(/export\s+const\s+meta\s*=/, 'const meta =')
|
|
63
63
|
.replace(/export\s+function\s+evaluate\s*\(/, 'function evaluate(');
|
|
64
|
-
|
|
64
|
+
}
|
|
65
|
+
// Compile the intentionally executable RuleCode separately from this fixed
|
|
66
|
+
// data bridge. Untrusted source never becomes part of the bridge's code text.
|
|
67
|
+
const RULE_MODULE_BRIDGE = `
|
|
65
68
|
globalThis.__pdRuleModule = {
|
|
66
69
|
meta: typeof meta === 'undefined' ? undefined : meta,
|
|
67
70
|
evaluate: typeof evaluate === 'undefined' ? undefined : function (__pdJsonBridge) {
|
|
@@ -76,7 +79,6 @@ globalThis.__pdRuleModule = {
|
|
|
76
79
|
return evaluate(__pdCallInput, __pdCallHelpers);
|
|
77
80
|
},
|
|
78
81
|
};`;
|
|
79
|
-
}
|
|
80
82
|
/**
|
|
81
83
|
* Type guard: validate that a value from the untrusted vm sandbox has the
|
|
82
84
|
* expected CompiledModuleExports shape. Treats all sandbox output as unknown.
|
|
@@ -131,6 +133,8 @@ export function compileHardenedRuleEvaluator(code, sourceLabel) {
|
|
|
131
133
|
const context = vm.createContext(Object.create(null), { microtaskMode: 'afterEvaluate' });
|
|
132
134
|
const script = new vm.Script(normalizeSource(code), { filename: sourceLabel });
|
|
133
135
|
script.runInContext(context, { timeout: 1000, displayErrors: true });
|
|
136
|
+
new vm.Script(RULE_MODULE_BRIDGE, { filename: `${sourceLabel}#bridge` })
|
|
137
|
+
.runInContext(context, { timeout: 1000, displayErrors: true });
|
|
134
138
|
// Treat sandbox output as untrusted — use Reflect.get + type guard, not `as`.
|
|
135
139
|
const moduleExportsUnknown = Reflect.get(context, '__pdRuleModule');
|
|
136
140
|
if (!isCompiledModuleExports(moduleExportsUnknown)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"production-gate-deps.js","sourceRoot":"","sources":["../../../src/runtime-v2/activation/production-gate-deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAU9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAE,kCAAkC,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACnJ,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,+BAA+B,GAAG,KAAK,CAAC;AAE9C;;;;;;;GAOG;AACH,SAAS,qBAAqB,CAAC,KAAc;IAC3C,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC;AAC7C,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,SAAS,eAAe,CAAC,UAAkB;IACzC,
|
|
1
|
+
{"version":3,"file":"production-gate-deps.js","sourceRoot":"","sources":["../../../src/runtime-v2/activation/production-gate-deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAU9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAE,kCAAkC,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACnJ,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,+BAA+B,GAAG,KAAK,CAAC;AAE9C;;;;;;;GAOG;AACH,SAAS,qBAAqB,CAAC,KAAc;IAC3C,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC;AAC7C,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,SAAS,eAAe,CAAC,UAAkB;IACzC,OAAO,UAAU;SACd,OAAO,CAAC,2BAA2B,EAAE,cAAc,CAAC;SACpD,OAAO,CAAC,mCAAmC,EAAE,oBAAoB,CAAC,CAAC;AACxE,CAAC;AAED,2EAA2E;AAC3E,8EAA8E;AAC9E,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;GAcxB,CAAC;AAOJ;;;GAGG;AACH,SAAS,uBAAuB,CAAC,KAAc;IAC7C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AACrD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,UAAU,4BAA4B,CAAC,IAAY,EAAE,WAAmB;IAC5E,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,I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Aa,IAAI,OAAO,CAAC,aAAa;gBAC3D,UAAU,EAAE,IAAI,EAAE,UAAU,IAAI,OAAO,CAAC,UAAU;aACnD,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { ToolSemanticRegistry } from '../internalization/tool-semantic-registry.js';
|
|
2
|
+
/**
|
|
3
|
+
* SPEC-RULECODE-HOST-PROMOTION-001 review round 3 (P1): "composition
|
|
4
|
+
* verification" must execute through the PRODUCTION composition boundary —
|
|
5
|
+
* every rule of the composed set (candidate + existing live) compiled by the
|
|
6
|
+
* same hardened evaluator production replay uses, evaluated against the same
|
|
7
|
+
* synthetic-input builder, and merged by the same `mergeDecisions` the
|
|
8
|
+
* shared gate uses at runtime (any block / requireApproval / auto_correct
|
|
9
|
+
* from ANY rule wins over allow). The previous approximation appended probe
|
|
10
|
+
* cases to each artifact's own golden trace and validated artifacts one by
|
|
11
|
+
* one — decision-equivalent for blockers, but it never exercised a merged
|
|
12
|
+
* multi-rule execution; this module does.
|
|
13
|
+
*
|
|
14
|
+
* Evidence-layer boundary (do not blur): this is RULE-side verification for
|
|
15
|
+
* the rule-interceptable (CLI/shell-channel) recovery probes ONLY. Console-
|
|
16
|
+
* channel recovery controls never pass through the RuleHost gate — their
|
|
17
|
+
* independence is structural and their real-world reachability is supplied
|
|
18
|
+
* separately as target-environment evidence by the readiness caller.
|
|
19
|
+
*/
|
|
20
|
+
export interface RecoveryCompositionArtifact {
|
|
21
|
+
artifactId: string;
|
|
22
|
+
/** Direct source when the caller already parsed the artifact content. */
|
|
23
|
+
implementationCode?: string;
|
|
24
|
+
/** Raw artifact content; parsed here when implementationCode is absent. */
|
|
25
|
+
contentJson?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface RecoveryCompositionProbe {
|
|
28
|
+
probeId: string;
|
|
29
|
+
toolName: string;
|
|
30
|
+
params: Readonly<Record<string, unknown>>;
|
|
31
|
+
}
|
|
32
|
+
export interface RecoveryCompositionInput {
|
|
33
|
+
/** Candidate first, then existing live artifacts, in activation order. */
|
|
34
|
+
artifacts: readonly RecoveryCompositionArtifact[];
|
|
35
|
+
probes: readonly RecoveryCompositionProbe[];
|
|
36
|
+
projectDir: string;
|
|
37
|
+
toolSemantics?: ToolSemanticRegistry;
|
|
38
|
+
}
|
|
39
|
+
export type RecoveryCompositionResult = {
|
|
40
|
+
ok: true;
|
|
41
|
+
} | {
|
|
42
|
+
ok: false;
|
|
43
|
+
probeId: string;
|
|
44
|
+
blockerArtifactId?: string;
|
|
45
|
+
reason: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Verify that the COMPOSED rule set (candidate + existing live) allows every
|
|
49
|
+
* rule-interceptable recovery probe. Any rule that blocks (or escalates) a
|
|
50
|
+
* probe fails the check with the blocking artifact identified — a rule
|
|
51
|
+
* combination that blocks an official recovery entry can never be promoted.
|
|
52
|
+
*/
|
|
53
|
+
export declare function verifyRecoveryProbeComposition(input: RecoveryCompositionInput): RecoveryCompositionResult;
|
|
54
|
+
//# sourceMappingURL=recovery-composition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recovery-composition.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/activation/recovery-composition.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AAEzF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,2BAA2B;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,wBAAwB;IACvC,0EAA0E;IAC1E,SAAS,EAAE,SAAS,2BAA2B,EAAE,CAAC;IAClD,MAAM,EAAE,SAAS,wBAAwB,EAAE,CAAC;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,oBAAoB,CAAC;CACtC;AAED,MAAM,MAAM,yBAAyB,GACjC;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GACZ;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AA2D/E;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,wBAAwB,GAAG,yBAAyB,CA6DzG"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { compileHardenedRuleEvaluator } from './production-gate-deps.js';
|
|
2
|
+
import { createSyntheticRuleHostInput } from '../golden-trace.js';
|
|
3
|
+
import { mergeDecisions } from '../internalization/rule-host-evaluator.js';
|
|
4
|
+
import { validateRuleHostResult } from '../internalization/rule-host-validator.js';
|
|
5
|
+
import { createRuleHostHelpers } from '../internalization/rule-host-helpers.js';
|
|
6
|
+
import { computeBehaviorFacts, UNAVAILABLE_RULE_CONTEXT } from '../internalization/rule-context-v2.js';
|
|
7
|
+
function isRecord(value) {
|
|
8
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
9
|
+
}
|
|
10
|
+
function parseImplementationCode(artifact) {
|
|
11
|
+
if (typeof artifact.implementationCode === 'string' && artifact.implementationCode.trim().length > 0)
|
|
12
|
+
return artifact.implementationCode;
|
|
13
|
+
if (typeof artifact.contentJson === 'string') {
|
|
14
|
+
try {
|
|
15
|
+
const parsed = JSON.parse(artifact.contentJson);
|
|
16
|
+
if (isRecord(parsed) && typeof parsed.implementationCode === 'string') {
|
|
17
|
+
return parsed.implementationCode;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
/** Synthetic control-safety scenarios, never production or historical approvals. */
|
|
27
|
+
function recoveryContexts(probeInput) {
|
|
28
|
+
const target = probeInput.action.normalizedPath;
|
|
29
|
+
const histories = [
|
|
30
|
+
{ name: 'empty', history: { status: 'available', truncated: false, calls: [] } },
|
|
31
|
+
{ name: 'observed', history: { status: 'available', truncated: false, calls: [
|
|
32
|
+
{ sequenceId: 1, toolName: 'read_file', canonicalKind: 'read', normalizedPath: target, paramsSummary: {}, outcome: 'success' },
|
|
33
|
+
{ sequenceId: 2, toolName: 'write_file', canonicalKind: 'write', normalizedPath: target, paramsSummary: {}, outcome: 'success' },
|
|
34
|
+
{ sequenceId: 3, toolName: probeInput.action.toolName, canonicalKind: probeInput.action.canonicalKind ?? 'other', normalizedPath: target, paramsSummary: {}, outcome: 'blocked' },
|
|
35
|
+
] } },
|
|
36
|
+
{ name: 'unavailable', history: UNAVAILABLE_RULE_CONTEXT.history },
|
|
37
|
+
];
|
|
38
|
+
const base = {
|
|
39
|
+
version: 1, sourceRef: 'system-counterfactual:recovery-control', revision: 1,
|
|
40
|
+
requiresApproval: true, taskRef: 'recovery-task', specDigest: 'recovery-spec', scopeRef: 'recovery-scope',
|
|
41
|
+
decisionTaskRef: 'recovery-task', decisionSpecDigest: 'recovery-spec', decisionScopeRef: 'recovery-scope',
|
|
42
|
+
resolution: 'not_approved', revoked: false,
|
|
43
|
+
};
|
|
44
|
+
const facts = [
|
|
45
|
+
{ name: 'missing' },
|
|
46
|
+
{ name: 'unknown', fact: { ...base, resolution: 'unknown', invalidationReason: 'source_unavailable' } },
|
|
47
|
+
{ name: 'not-approved', fact: base },
|
|
48
|
+
{ name: 'approved', fact: { ...base, resolution: 'approved' } },
|
|
49
|
+
{ name: 'not-required', fact: { ...base, requiresApproval: false, resolution: 'not_required' } },
|
|
50
|
+
{ name: 'revoked', fact: { ...base, revoked: true, invalidationReason: 'declaration_revoked' } },
|
|
51
|
+
];
|
|
52
|
+
return [
|
|
53
|
+
{ name: 'no-context' },
|
|
54
|
+
...histories.flatMap(({ name, history }) => facts.map(variant => ({
|
|
55
|
+
name: `${name}:${variant.name}`,
|
|
56
|
+
context: {
|
|
57
|
+
version: 2, history,
|
|
58
|
+
facts: { ...computeBehaviorFacts(history, target, history.status === 'unavailable' ? null : name === 'observed' ? 1 : 0), ...(variant.fact ? { designGate: variant.fact } : {}) },
|
|
59
|
+
},
|
|
60
|
+
}))),
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Verify that the COMPOSED rule set (candidate + existing live) allows every
|
|
65
|
+
* rule-interceptable recovery probe. Any rule that blocks (or escalates) a
|
|
66
|
+
* probe fails the check with the blocking artifact identified — a rule
|
|
67
|
+
* combination that blocks an official recovery entry can never be promoted.
|
|
68
|
+
*/
|
|
69
|
+
export function verifyRecoveryProbeComposition(input) {
|
|
70
|
+
const compiled = [];
|
|
71
|
+
for (const artifact of input.artifacts) {
|
|
72
|
+
const code = parseImplementationCode(artifact);
|
|
73
|
+
if (code === null || code.trim().length === 0) {
|
|
74
|
+
return { ok: false, probeId: '__compile__', blockerArtifactId: artifact.artifactId, reason: `artifact ${artifact.artifactId} carries no implementationCode` };
|
|
75
|
+
}
|
|
76
|
+
try {
|
|
77
|
+
const evaluator = compileHardenedRuleEvaluator(code, `recovery-composition:${artifact.artifactId}`);
|
|
78
|
+
compiled.push({ artifactId: artifact.artifactId, implId: artifact.artifactId, evaluate: probeInput => evaluator(probeInput, createRuleHostHelpers(probeInput)) });
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
return { ok: false, probeId: '__compile__', blockerArtifactId: artifact.artifactId, reason: `artifact ${artifact.artifactId} failed to compile: ${error instanceof Error ? error.message : String(error)}` };
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (compiled.length === 0)
|
|
85
|
+
return { ok: true };
|
|
86
|
+
for (const probe of input.probes) {
|
|
87
|
+
const baseInput = createSyntheticRuleHostInput({ toolName: probe.toolName, params: { ...probe.params } }, {}, { projectDir: input.projectDir, ...(input.toolSemantics !== undefined ? { toolSemantics: input.toolSemantics } : {}) });
|
|
88
|
+
// A missing context alone exercises only neutral passthrough in V2 rules.
|
|
89
|
+
// Recovery must remain usable under actionable facts and observed history too.
|
|
90
|
+
for (const variant of recoveryContexts(baseInput)) {
|
|
91
|
+
const probeInput = { ...baseInput, ...(variant.context ? { context: variant.context } : {}) };
|
|
92
|
+
const results = [];
|
|
93
|
+
for (const entry of compiled) {
|
|
94
|
+
let result;
|
|
95
|
+
try {
|
|
96
|
+
result = entry.evaluate(probeInput);
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
return { ok: false, probeId: probe.probeId, blockerArtifactId: entry.artifactId, reason: `rule threw during recovery probe ${probe.probeId}: ${error instanceof Error ? error.message : String(error)}` };
|
|
100
|
+
}
|
|
101
|
+
const validation = validateRuleHostResult(result);
|
|
102
|
+
if (!validation.valid) {
|
|
103
|
+
return { ok: false, probeId: probe.probeId, blockerArtifactId: entry.artifactId, reason: `rule returned an invalid result on recovery probe ${probe.probeId}: ${validation.errors.join('; ')}` };
|
|
104
|
+
}
|
|
105
|
+
results.push({ artifactId: entry.artifactId, result });
|
|
106
|
+
}
|
|
107
|
+
const implementations = results.map((entry) => ({
|
|
108
|
+
implId: entry.artifactId,
|
|
109
|
+
ruleId: entry.artifactId,
|
|
110
|
+
meta: { name: entry.artifactId, version: '1', ruleId: entry.artifactId, coversCondition: 'all' },
|
|
111
|
+
evaluate: () => entry.result,
|
|
112
|
+
}));
|
|
113
|
+
const merged = mergeDecisions(implementations, probeInput);
|
|
114
|
+
if (merged !== undefined && merged.decision !== 'allow') {
|
|
115
|
+
// Attribute the winning decision back to its artifact by reference
|
|
116
|
+
// identity (the merge returns the winning rule's own result object).
|
|
117
|
+
const winner = results.find(entry => entry.result === merged);
|
|
118
|
+
return {
|
|
119
|
+
ok: false,
|
|
120
|
+
probeId: probe.probeId,
|
|
121
|
+
...(winner !== undefined ? { blockerArtifactId: winner.artifactId } : {}),
|
|
122
|
+
reason: `recovery probe ${probe.probeId} would be ${merged.decision === 'block' ? 'blocked' : merged.decision} under the composed rule set (${variant.name})`,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return { ok: true };
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=recovery-composition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recovery-composition.js","sourceRoot":"","sources":["../../../src/runtime-v2/activation/recovery-composition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAEhF,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAA8C,MAAM,uCAAuC,CAAC;AAgDnJ,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,uBAAuB,CAAC,QAAqC;IACpE,IAAI,OAAO,QAAQ,CAAC,kBAAkB,KAAK,QAAQ,IAAI,QAAQ,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,QAAQ,CAAC,kBAAkB,CAAC;IACzI,IAAI,OAAO,QAAQ,CAAC,WAAW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;gBACxB,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,UAAU,EAAE,eAAe,EAAE,KAAK,EAAE;gBAChG,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM;aAC7B,CAAC,CAAC,CAAC;YACJ,MAAM,MAAM,GAAG,cAAc,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;YAC3D,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;gBACxD,mEAAmE;gBACnE,qEAAqE;gBACrE,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;gBAC9D,OAAO;oBACL,EAAE,EAAE,KAAK;oBACT,OAAO,EAAE,KAAK,CAAC,OAAO;oBACtB,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBACzE,MAAM,EAAE,kBAAkB,KAAK,CAAC,OAAO,aAAa,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,iCAAiC,OAAO,CAAC,IAAI,GAAG;iBAC9J,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { HostLivenessContract } from './openclaw-promotion-checks.js';
|
|
2
|
+
/**
|
|
3
|
+
* SPEC-RULECODE-HOST-PROMOTION-001 review finding 1 (P1): a capability
|
|
4
|
+
* CONTRACT declares mappings; it must never by itself certify that the
|
|
5
|
+
* out-of-band recovery controls are REAL. This registry is the core-owned
|
|
6
|
+
* inventory of each recovery control's ACTUAL, currently-registered entry
|
|
7
|
+
* surface — verified against the real command/route registrations by the
|
|
8
|
+
* cross-package contract tests that import it (pd-cli proves every `cli`
|
|
9
|
+
* entry parses against the real Commander tree; pd-console proves every
|
|
10
|
+
* `console` entry dispatches to its model handler). Readiness validates
|
|
11
|
+
* every host contract's probes against THIS table before
|
|
12
|
+
* `emergency_controls` may pass: a probe naming a command or route that is
|
|
13
|
+
* not registered here (or anywhere) is a fabricated recovery entry and
|
|
14
|
+
* fails the check.
|
|
15
|
+
*
|
|
16
|
+
* Inventory basis (2026-10-29 audit of this repository):
|
|
17
|
+
* - `pd activation list --json` — registered (pd-cli runtime-activation.ts,
|
|
18
|
+
* read-only RuleCode status surface);
|
|
19
|
+
* - `pd activation deactivate --activation-id <id>` — registered
|
|
20
|
+
* (pd-cli runtime-activation.ts, idempotent rollback);
|
|
21
|
+
* - global emergency pause — NO pd CLI command exists; the real surface is
|
|
22
|
+
* the authenticated Owner Console route POST /api/v1/activations/
|
|
23
|
+
* emergency-pause (server/routes/activations.ts → pauseAllRuleCode →
|
|
24
|
+
* SqliteActivationSafetyStore.pauseAllLive, honored by the shared gate's
|
|
25
|
+
* global_rulecode_pauses read);
|
|
26
|
+
* - Owner review — Console owner-review route (e2e-proven).
|
|
27
|
+
* A capability whose real surface is missing from this registry must stay
|
|
28
|
+
* unsupported — never papered over with a constant or a stub probe.
|
|
29
|
+
*/
|
|
30
|
+
export type RecoveryControlCapability = 'pd_status' | 'rulecode_deactivate' | 'rulecode_global_pause' | 'owner_review_access';
|
|
31
|
+
export interface RecoveryControlSurface {
|
|
32
|
+
readonly capabilityId: RecoveryControlCapability;
|
|
33
|
+
readonly channel: 'cli' | 'console';
|
|
34
|
+
/** channel 'cli': the exact canonical probe command (never executed by readiness — replay-only). */
|
|
35
|
+
readonly cliCommand?: string;
|
|
36
|
+
/** channel 'console': the console route backing the control. */
|
|
37
|
+
readonly consoleRoute?: string;
|
|
38
|
+
}
|
|
39
|
+
export declare const RECOVERY_CONTROL_SURFACES: readonly RecoveryControlSurface[];
|
|
40
|
+
export type RecoveryControlValidation = {
|
|
41
|
+
ok: true;
|
|
42
|
+
} | {
|
|
43
|
+
ok: false;
|
|
44
|
+
reason: 'recovery_control_surface_unregistered' | 'recovery_control_probe_mismatch';
|
|
45
|
+
capabilityId: string;
|
|
46
|
+
nextAction: string;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Validate a host contract's recovery-control declaration against the real
|
|
50
|
+
* surface registry:
|
|
51
|
+
* - every registry capability must be declared as a protected capability;
|
|
52
|
+
* - every neutral probe for a CLI-channel capability must replay EXACTLY the
|
|
53
|
+
* registry's canonical command (no invented `pd status`,
|
|
54
|
+
* no non-existent `pd activation emergency-pause`);
|
|
55
|
+
* - console-channel capabilities must carry NO probe: their recovery path
|
|
56
|
+
* never passes through the RuleHost gate, so a virtual-tool allow replay
|
|
57
|
+
* would misrepresent rule-side verification as control verification
|
|
58
|
+
* (review R3/P1 — their independence is structural and their real-world
|
|
59
|
+
* reachability is supplied as target-environment evidence instead).
|
|
60
|
+
*/
|
|
61
|
+
export declare function validateRecoveryControlSurfaces(contract: HostLivenessContract): RecoveryControlValidation;
|
|
62
|
+
//# sourceMappingURL=recovery-control-surfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recovery-control-surfaces.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/activation/recovery-control-surfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,yBAAyB,GACjC,WAAW,GACX,qBAAqB,GACrB,uBAAuB,GACvB,qBAAqB,CAAC;AAE1B,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,YAAY,EAAE,yBAAyB,CAAC;IACjD,QAAQ,CAAC,OAAO,EAAE,KAAK,GAAG,SAAS,CAAC;IACpC,oGAAoG;IACpG,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,gEAAgE;IAChE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,eAAO,MAAM,yBAAyB,EAAE,SAAS,sBAAsB,EAqBrE,CAAC;AAEH,MAAM,MAAM,yBAAyB,GACjC;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GACZ;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,uCAAuC,GAAG,iCAAiC,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAMjJ;;;;;;;;;;;;GAYG;AACH,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,oBAAoB,GAAG,yBAAyB,CA2CzG"}
|