@holmes-lab/holmes-kit 0.40.0 → 0.41.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 +312 -0
- package/README.md +79 -5
- package/dist/.build-id +1 -1
- package/dist/holmes/cli/approve-context.js +4 -3
- package/dist/holmes/cli/approve.js +22 -12
- package/dist/holmes/cli/autonomy.d.ts +21 -0
- package/dist/holmes/cli/autonomy.js +35 -5
- package/dist/holmes/cli/doctor.js +58 -6
- package/dist/holmes/cli/index.js +394 -267
- package/dist/holmes/cli/init.js +17 -6
- package/dist/holmes/cli/interactive-prompt.d.ts +39 -2
- package/dist/holmes/cli/interactive-prompt.js +98 -16
- package/dist/holmes/cli/ledger-witness.d.ts +61 -0
- package/dist/holmes/cli/ledger-witness.js +212 -0
- package/dist/holmes/cli/playbook-skills.d.ts +3 -56
- package/dist/holmes/cli/playbook-skills.js +26 -349
- package/dist/holmes/config/config.d.ts +21 -0
- package/dist/holmes/config/config.js +22 -3
- package/dist/holmes/governance/approval-queue.d.ts +65 -1
- package/dist/holmes/governance/approval-queue.js +279 -9
- package/dist/holmes/governance/autonomous-shell.d.ts +13 -1
- package/dist/holmes/governance/autonomous-shell.js +157 -4
- package/dist/holmes/governance/autonomy.d.ts +216 -0
- package/dist/holmes/governance/autonomy.js +1162 -10
- package/dist/holmes/governance/install-manifest.d.ts +7 -4
- package/dist/holmes/governance/install-manifest.js +144 -14
- package/dist/holmes/governance/ledger-witness.d.ts +63 -0
- package/dist/holmes/governance/ledger-witness.js +296 -0
- package/dist/holmes/governance/provenance-chain.d.ts +8 -1
- package/dist/holmes/governance/provenance-chain.js +23 -4
- package/dist/holmes/governance/push-gate-runner.d.ts +2 -0
- package/dist/holmes/governance/push-gate-runner.js +40 -3
- package/dist/holmes/governance/push-gate.d.ts +13 -2
- package/dist/holmes/governance/push-gate.js +106 -14
- package/dist/holmes/governance/recorded-pairs.d.ts +4 -0
- package/dist/holmes/governance/recorded-pairs.js +25 -1
- package/dist/holmes/governance/session-context.d.ts +7 -0
- package/dist/holmes/governance/session-context.js +34 -6
- package/dist/holmes/guardrail/advisory-line.d.ts +102 -0
- package/dist/holmes/guardrail/advisory-line.js +718 -0
- package/dist/holmes/guardrail/anchor-scope-text.d.ts +9 -0
- package/dist/holmes/guardrail/anchor-scope-text.js +7 -0
- package/dist/holmes/guardrail/command-traits.d.ts +102 -0
- package/dist/holmes/guardrail/command-traits.js +379 -0
- package/dist/holmes/guardrail/fixtures/manager-builtins.json +23 -0
- package/dist/holmes/guardrail/fixtures/npm-commands.json +7 -0
- package/dist/holmes/guardrail/impact-gate.d.ts +6 -0
- package/dist/holmes/guardrail/impact-gate.js +32 -5
- package/dist/holmes/guardrail/outward-acts.d.ts +47 -0
- package/dist/holmes/guardrail/outward-acts.js +1102 -0
- package/dist/holmes/guardrail/refusal-codes.js +8 -1
- package/dist/holmes/guardrail/refusal-templates.d.ts +15 -0
- package/dist/holmes/guardrail/refusal-templates.js +71 -0
- package/dist/holmes/guardrail/risk-classifier.d.ts +22 -6
- package/dist/holmes/guardrail/risk-classifier.js +12 -118
- package/dist/holmes/guardrail/shell-lexer.d.ts +69 -0
- package/dist/holmes/guardrail/shell-lexer.js +567 -0
- package/dist/holmes/guardrail/write-target.js +7 -1
- package/dist/holmes/hooks/pre-tool-use.d.ts +71 -0
- package/dist/holmes/hooks/pre-tool-use.js +1466 -14
- package/dist/holmes/hooks/session-start.js +27 -1
- package/dist/holmes/hooks/stop.d.ts +7 -0
- package/dist/holmes/hooks/stop.js +39 -2
- package/dist/holmes/mcp/elicit-approval.d.ts +0 -21
- package/dist/holmes/mcp/elicit-approval.js +5 -2
- package/dist/holmes/mcp/handlers/approval-ask.js +3 -2
- package/dist/holmes/mcp/handlers/entity-integration.d.ts +1 -1
- package/dist/holmes/mcp/handlers/entity-integration.js +9 -6
- package/dist/holmes/mcp/handlers/entity-renumber.js +2 -1
- package/dist/holmes/mcp/handlers/entity-store.js +7 -2
- package/dist/holmes/mcp/handlers/maintenance-analysis.d.ts +13 -0
- package/dist/holmes/mcp/handlers/maintenance-analysis.js +59 -2
- package/dist/holmes/mcp/handlers/operator-inspection.d.ts +2 -0
- package/dist/holmes/mcp/handlers/operator-inspection.js +25 -4
- package/dist/holmes/mcp/handlers/spec-approval.d.ts +3 -1
- package/dist/holmes/mcp/handlers/spec-approval.js +28 -10
- package/dist/holmes/mcp/handlers/spec-lifecycle.js +10 -7
- package/dist/holmes/mcp/handlers/test-execution.d.ts +470 -3
- package/dist/holmes/mcp/handlers/test-execution.js +201 -21
- package/dist/holmes/mcp/handlers.d.ts +473 -8
- package/dist/holmes/mcp/handlers.js +6 -1
- package/dist/holmes/mcp/maintenance-analyze.d.ts +5 -0
- package/dist/holmes/mcp/maintenance-analyze.js +4 -2
- package/dist/holmes/mcp/maintenance-evidence.d.ts +9 -0
- package/dist/holmes/mcp/maintenance-evidence.js +4 -1
- package/dist/holmes/mcp/tool-schemas.js +16 -10
- package/dist/holmes/project/baseline.d.ts +15 -2
- package/dist/holmes/project/baseline.js +11 -6
- package/dist/holmes/project/bounded-io.d.ts +1 -0
- package/dist/holmes/project/bounded-io.js +4 -2
- package/dist/holmes/project/change-source.d.ts +4 -0
- package/dist/holmes/project/change-source.js +13 -5
- package/dist/holmes/project/playbook-reference.d.ts +50 -0
- package/dist/holmes/project/playbook-reference.js +259 -0
- package/dist/holmes/project/playbook-skill-states.d.ts +94 -0
- package/dist/holmes/project/playbook-skill-states.js +396 -0
- package/dist/holmes/project/root.d.ts +9 -1
- package/dist/holmes/project/root.js +26 -3
- package/dist/holmes/project/running-package.d.ts +15 -0
- package/dist/holmes/project/running-package.js +87 -0
- package/dist/holmes/review/evidence-mode.d.ts +21 -0
- package/dist/holmes/review/evidence-mode.js +33 -0
- package/dist/holmes/review/head-worktree.d.ts +55 -0
- package/dist/holmes/review/head-worktree.js +329 -0
- package/dist/holmes/review/mrp.js +13 -3
- package/dist/holmes/review/run-provenance.d.ts +45 -0
- package/dist/holmes/review/run-provenance.js +314 -0
- package/dist/holmes/review/test-evidence.d.ts +174 -0
- package/dist/holmes/review/test-evidence.js +330 -2
- package/dist/holmes/review/test-reports.d.ts +94 -0
- package/dist/holmes/review/test-reports.js +382 -0
- package/dist/holmes/review/test-runner.d.ts +178 -65
- package/dist/holmes/review/test-runner.js +551 -319
- package/dist/holmes/review/test-units.d.ts +159 -0
- package/dist/holmes/review/test-units.js +814 -0
- package/dist/holmes/spec/entity-integration-transaction.d.ts +19 -2
- package/dist/holmes/spec/entity-integration-transaction.js +68 -7
- package/package.json +5 -2
- package/playbooks/publish/PLAYBOOK.md +2 -1
|
@@ -35,7 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.createSpecApprovalHandlers = createSpecApprovalHandlers;
|
|
37
37
|
exports.readProjectFile = readProjectFile;
|
|
38
|
-
// @implements A-SPEC-182.3, A-SPEC-718.3, A-SPEC-770.6, A-SPEC-718.1,A-SPEC-718.2, A-SPEC-718, A-SPEC-551.1, A-SPEC-551.2, A-SPEC-627.1, A-SPEC-622, A-SPEC-100.2, A-SPEC-128, A-SPEC-132, A-SPEC-133, A-SPEC-151, A-SPEC-188, A-SPEC-189, A-SPEC-244, A-SPEC-245, A-SPEC-729, A-SPEC-532.7, A-SPEC-792.1, A-SPEC-792.4
|
|
38
|
+
// @implements A-SPEC-794.95, A-SPEC-794.88, A-SPEC-794.85, A-SPEC-794.81, A-SPEC-182.3, A-SPEC-718.3, A-SPEC-770.6, A-SPEC-718.1,A-SPEC-718.2, A-SPEC-718, A-SPEC-551.1, A-SPEC-551.2, A-SPEC-627.1, A-SPEC-622, A-SPEC-100.2, A-SPEC-128, A-SPEC-132, A-SPEC-133, A-SPEC-151, A-SPEC-188, A-SPEC-189, A-SPEC-244, A-SPEC-245, A-SPEC-729, A-SPEC-532.7, A-SPEC-792.1, A-SPEC-792.4
|
|
39
39
|
// @implements A-SPEC-631, A-SPEC-733, A-SPEC-245.9, A-SPEC-245.15
|
|
40
40
|
const fs = __importStar(require("node:fs"));
|
|
41
41
|
const compat_impact_1 = require("../../spec/compat-impact");
|
|
@@ -54,11 +54,13 @@ const approval_grants_1 = require("../../governance/approval-grants");
|
|
|
54
54
|
const spec_digest_1 = require("../../spec/spec-digest");
|
|
55
55
|
const version_conflict_1 = require("../../spec/version-conflict");
|
|
56
56
|
const ledger_store_1 = require("../../governance/ledger-store");
|
|
57
|
+
const approval_queue_1 = require("../../governance/approval-queue"); // @implements A-SPEC-794.85
|
|
57
58
|
const provenance_chain_1 = require("../../governance/provenance-chain");
|
|
58
59
|
const review_targets_1 = require("../../review/review-targets");
|
|
59
60
|
const requirement_triage_evidence_1 = require("../requirement-triage-evidence");
|
|
60
61
|
const approval_policy_1 = require("../approval-policy");
|
|
61
62
|
const approval_blockers_1 = require("../../spec/approval-blockers");
|
|
63
|
+
const human_channel_1 = require("../../governance/human-channel"); // @implements A-SPEC-794.95
|
|
62
64
|
function createSpecApprovalHandlers(context) {
|
|
63
65
|
const { store, resolver, projectRootOf, cachedScan, tryElicit, elicitApproval, autonomousApproval } = context;
|
|
64
66
|
return {
|
|
@@ -86,7 +88,7 @@ function createSpecApprovalHandlers(context) {
|
|
|
86
88
|
// grant is checked against the ONE versioned read the seal uses (below), never against an
|
|
87
89
|
// extra read — an extra read moved the optimistic-write window and let an external edit be
|
|
88
90
|
// sealed (measured by the A-SPEC-188 TOCTOU pin).
|
|
89
|
-
const action = { kind:
|
|
91
|
+
const action = { kind: approval_queue_1.SPEC_TRANSITION_KIND.seal, target: a.id };
|
|
90
92
|
let approveResolved = context.resolveHandlerApproval(a.root, approval, action, new Date().toISOString());
|
|
91
93
|
// @implements A-SPEC-263.1 — asked ONLY after the existing channels failed to cover (an open
|
|
92
94
|
// door never summons a human), and only about a spec that exists (a question about a missing
|
|
@@ -217,7 +219,10 @@ function createSpecApprovalHandlers(context) {
|
|
|
217
219
|
}
|
|
218
220
|
else if (autonomyOn && risk === 'hitl') {
|
|
219
221
|
const rule = noIntake ? 'requirement-without-intake' : (0, autonomy_1.specApprovalAutonomyReason)(target.spec, resolver([target.spec]), below);
|
|
220
|
-
|
|
222
|
+
// @implements A-SPEC-794.88 — principle 7: a spec whose scope names the gate and approval-processing category is
|
|
223
|
+
// sealed by a person only: the full profile does not seal it and a run delegation does not cover it
|
|
224
|
+
const category = (0, autonomy_1.principle7Category)(target.spec, below);
|
|
225
|
+
if (rule !== null && fullEntry !== null && category === null) {
|
|
221
226
|
// @implements A-SPEC-792.4 — sealed as full-autonomy, or refused with the self-serve route; never asked.
|
|
222
227
|
const verdict = (0, full_autonomy_1.fullSealVerdict)(rule, fullEntry.flags);
|
|
223
228
|
if (verdict.outcome === 'refuse') {
|
|
@@ -235,7 +240,9 @@ function createSpecApprovalHandlers(context) {
|
|
|
235
240
|
// is unchanged — only its consumer learned a third envelope (A-SPEC-552.1 project default, A-SPEC-553.1
|
|
236
241
|
// session marker, and this).
|
|
237
242
|
const delegation = autonomyRoot === undefined ? { active: false, why: 'none' } : (0, delegation_1.readDelegation)(autonomyRoot, new Date().toISOString());
|
|
238
|
-
if (
|
|
243
|
+
if (category !== null)
|
|
244
|
+
autonomyNote += `\n[principle 7: ${category} is in the gate and approval-processing category — a person seals this spec]`;
|
|
245
|
+
if (delegation.active && category === null && (0, delegation_1.delegationCovers)(delegation.delegation, rule)) {
|
|
239
246
|
const base = autonomousApproval(below?.map((s) => s.id));
|
|
240
247
|
approveResolved = { approval: { ...base, actor: base.actor.replace(/^autonomous:/, 'delegated:'), rationale: `delegated grant (run ${delegation.delegation.run}, rule ${rule})` }, source: 'delegated' };
|
|
241
248
|
decidedSubject = targetSubject;
|
|
@@ -265,7 +272,7 @@ function createSpecApprovalHandlers(context) {
|
|
|
265
272
|
// The MODEL text is capped BEFORE the server markers are appended (round-2): a ~185+ char
|
|
266
273
|
// title pushed '(재봉인)' past the dialog's 200-char summary cap, dressing a re-seal (the
|
|
267
274
|
// more consequential act) as a first approval. The cap cuts the title, never the marker.
|
|
268
|
-
const out = await tryElicit(
|
|
275
|
+
const out = await tryElicit(approval_queue_1.SPEC_TRANSITION_KIND.seal, a.id, `${a.id} — ${target.spec.title.slice(0, 120)}${resealing ? ' (재봉인)' : ''}${noIntake ? ' (triage 기록 없음)' : ''}`);
|
|
269
276
|
const presentation = out.kind === 'answered'
|
|
270
277
|
? (out.decision.granted ? { kind: 'approve', reason: out.decision.reason } : { kind: 'deny', reason: out.decision.reason })
|
|
271
278
|
: out.kind === 'expired' ? { kind: 'timeout' } : { kind: 'unavailable' };
|
|
@@ -312,8 +319,8 @@ function createSpecApprovalHandlers(context) {
|
|
|
312
319
|
refusedGrants = '';
|
|
313
320
|
}
|
|
314
321
|
return { ok: false, reason: (elicitExpiredMs !== undefined ? (0, elicit_approval_1.expiredNotice)(elicitExpiredMs) : '') + refusedGrants + (context.approvalRouteNote?.() ?? '') + autonomyNote
|
|
315
|
-
+ 'spec_approve requires an out-of-band HOLMES_APPROVAL that COVERS this act — a request-payload approval is not a channel, and an expired or elsewhere-scoped token does not open this door (scoped approvals need kind "
|
|
316
|
-
+ context.refusalQueueHint(a.root, { kind:
|
|
322
|
+
+ 'spec_approve requires an out-of-band HOLMES_APPROVAL that COVERS this act — a request-payload approval is not a channel, and an expired or elsewhere-scoped token does not open this door (scoped approvals need kind "' + approval_queue_1.SPEC_TRANSITION_KIND.seal + '"). (fail-closed)'
|
|
323
|
+
+ context.refusalQueueHint(a.root, { kind: approval_queue_1.SPEC_TRANSITION_KIND.seal, target: a.id, why: '스펙 봉인 승인', ...(subject ? { subject } : {}), ...(risk ? { risk } : {}), ...(title ? { title } : {}) }) };
|
|
317
324
|
}
|
|
318
325
|
// @implements A-SPEC-188 — destination BEFORE seal.
|
|
319
326
|
// The old order (seal at :481, resolve the ledger at :483) produced both measured harms: a
|
|
@@ -396,14 +403,14 @@ function createSpecApprovalHandlers(context) {
|
|
|
396
403
|
// Measured 2026-09-14: a grant read against "Original title" sealed "CHANGED after the grant".
|
|
397
404
|
if (cur && decidedSubject !== undefined && (0, spec_digest_1.specDigest)(cur.spec) !== decidedSubject) {
|
|
398
405
|
return { ok: false, reason: `spec_approve: ${a.id} changed after the decision was made — the content decided on is not the content that would be sealed. Nothing was sealed; ask again.`
|
|
399
|
-
+ context.refusalQueueHint(a.root, { kind:
|
|
406
|
+
+ context.refusalQueueHint(a.root, { kind: approval_queue_1.SPEC_TRANSITION_KIND.seal, target: a.id, why: '스펙 봉인 승인', subject: (0, spec_digest_1.specDigest)(cur.spec), title: cur.spec.title }) };
|
|
400
407
|
}
|
|
401
408
|
if (cur && approveResolved.source === 'grant') {
|
|
402
409
|
const bound = approveResolved.approval;
|
|
403
410
|
if (typeof bound.subject === 'string' && bound.subject !== '' && bound.subject !== (0, spec_digest_1.specDigest)(cur.spec)) {
|
|
404
411
|
const current = (0, spec_digest_1.specDigest)(cur.spec);
|
|
405
412
|
return { ok: false, reason: `[grant ${bound.nonce ?? '?'} refused: stale-subject] the grant was minted for another content of ${a.id}; the person reads the current content and decides again in the session form (approval_ask with the id below); the new grant replaces the stale one.` // A-SPEC-792.1
|
|
406
|
-
+ context.refusalQueueHint(a.root, { kind:
|
|
413
|
+
+ context.refusalQueueHint(a.root, { kind: approval_queue_1.SPEC_TRANSITION_KIND.seal, target: a.id, why: '스펙 봉인 승인', subject: current, title: cur.spec.title }) };
|
|
407
414
|
}
|
|
408
415
|
}
|
|
409
416
|
// @implements A-SPEC-536.1 — BUG-1: a spec whose YAML is broken is dropped by read()/list(),
|
|
@@ -491,12 +498,23 @@ function createSpecApprovalHandlers(context) {
|
|
|
491
498
|
}
|
|
492
499
|
// @implements A-SPEC-148 — writes go to THIS replica's chain; the legacy file is read-only now.
|
|
493
500
|
const chain = new ledger_store_1.FileLedgerStore(path.join(ledgerRoot, '.ax', 'ledger'));
|
|
501
|
+
// A-SPEC-794.81 — the MCP server instance that sealed it, last, so id and digest keep their places (R8's "this session")
|
|
502
|
+
const sealingSession = context.serverInstance?.(); // A-SPEC-794.85 — injected, not the module-global
|
|
503
|
+
// @implements A-SPEC-794.95 — a seal by a grant the person minted at the terminal (holmes-kit approve, after
|
|
504
|
+
// operatorActGuard) records its channel and the grant's nonce, so the seal counts as a person's (isPersonSealRow);
|
|
505
|
+
// the server writes these from the resolved grant file, never from a tool input. A person-channel actor needs neither.
|
|
506
|
+
// (round-2 review A, L1: a grant the session form minted spends as `grant:<id>` and is not the terminal's)
|
|
507
|
+
const grantNonce = approveResolved.source === 'grant' && !(0, human_channel_1.isHumanChannelActor)(approveResolved.approval.actor)
|
|
508
|
+
&& !String(approveResolved.approval.actor).startsWith('grant:')
|
|
509
|
+
&& typeof approveResolved.approval.nonce === 'string' && /^[A-Za-z0-9_-]{8,}$/.test(approveResolved.approval.nonce)
|
|
510
|
+
? approveResolved.approval.nonce : undefined;
|
|
494
511
|
chain.append({
|
|
495
512
|
ts: new Date().toISOString(),
|
|
496
513
|
actor: approveResolved.approval.actor,
|
|
497
514
|
kind: 'spec-approved',
|
|
498
515
|
summary: `approved ${a.id} sealing ${digest}${sealedDirection}`,
|
|
499
|
-
inputs: [a.id, digest],
|
|
516
|
+
inputs: [a.id, digest, ...(sealingSession === undefined ? [] : [`session:${sealingSession}`]),
|
|
517
|
+
...(grantNonce === undefined ? [] : ['channel:cli-terminal', `grant-nonce:${grantNonce}`])],
|
|
500
518
|
rationale: approveResolved.approval.rationale,
|
|
501
519
|
authorization: (0, provenance_chain_1.authorizationRef)(approveResolved.approval.actor, approveResolved.approval.token),
|
|
502
520
|
});
|
|
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.createSpecLifecycleHandlers = createSpecLifecycleHandlers;
|
|
37
|
-
// @implements A-SPEC-770.12, A-SPEC-628, A-SPEC-627.1, A-SPEC-621, A-SPEC-100.2, A-SPEC-128, A-SPEC-151, A-SPEC-222, A-SPEC-538.1, A-SPEC-255, A-SPEC-133, A-SPEC-188, A-SPEC-189, A-SPEC-244, A-SPEC-245
|
|
37
|
+
// @implements A-SPEC-794.85, A-SPEC-794.81, A-SPEC-770.12, A-SPEC-628, A-SPEC-627.1, A-SPEC-621, A-SPEC-100.2, A-SPEC-128, A-SPEC-151, A-SPEC-222, A-SPEC-538.1, A-SPEC-255, A-SPEC-133, A-SPEC-188, A-SPEC-189, A-SPEC-244, A-SPEC-245
|
|
38
38
|
// @implements A-SPEC-638, A-SPEC-222.3, A-SPEC-222.5, A-SPEC-245.9, A-SPEC-245.15
|
|
39
39
|
const fs = __importStar(require("node:fs"));
|
|
40
40
|
const os = __importStar(require("node:os"));
|
|
@@ -57,6 +57,7 @@ const approval_grants_1 = require("../../governance/approval-grants");
|
|
|
57
57
|
const renumber_1 = require("../../spec/renumber");
|
|
58
58
|
const id_collision_1 = require("../../spec/id-collision");
|
|
59
59
|
const remote_spec_refs_1 = require("../../spec/remote-spec-refs");
|
|
60
|
+
const approval_queue_1 = require("../../governance/approval-queue"); // @implements A-SPEC-794.85
|
|
60
61
|
/**
|
|
61
62
|
* @implements A-SPEC-222.5 — the machine conditions that stand in for a person when a sealed spec is retired in favour
|
|
62
63
|
* of a sealed successor (AU1-a). Every spec of the chain is judged; the first failed condition is the answer.
|
|
@@ -466,7 +467,8 @@ function createSpecLifecycleHandlers(context) {
|
|
|
466
467
|
catch {
|
|
467
468
|
approval = undefined;
|
|
468
469
|
}
|
|
469
|
-
|
|
470
|
+
// A-SPEC-794.81 — retiring a sealed spec is its own kind: a seal's grant does not cover it
|
|
471
|
+
const retireResolved = context.resolveHandlerApproval(a.root, approval, { kind: approval_queue_1.SPEC_TRANSITION_KIND.retire, target: a.id }, new Date().toISOString());
|
|
470
472
|
const covered = retireResolved !== undefined;
|
|
471
473
|
const sealed = typeof spec.frontmatter.approved_digest === 'string';
|
|
472
474
|
// @implements A-SPEC-222.5 — under a full profile, a directive and a sealed successor stand in for the person
|
|
@@ -559,8 +561,8 @@ function createSpecLifecycleHandlers(context) {
|
|
|
559
561
|
reason: (autonomousRefused ? `자율 폐기 조건 불충족(${autonomousRefused}) — ` : '')
|
|
560
562
|
+ `${a.id}은(는) 봉인된 문서입니다 — 폐기는 이 행위를 덮는 유효한 대역외 HOLMES_APPROVAL 이 필요합니다.`
|
|
561
563
|
+ ' 코드 게이트를 막고 있는 approved T-SPEC 을 폐기하면 그 게이트가 열리므로, 폐기가 승인 우회 경로가 되지 않도록 fail-closed 로 막습니다.'
|
|
562
|
-
+
|
|
563
|
-
+ context.refusalQueueHint(a.root, { kind:
|
|
564
|
+
+ ` (범위를 쓰면 kind "${approval_queue_1.SPEC_TRANSITION_KIND.retire}")`
|
|
565
|
+
+ context.refusalQueueHint(a.root, { kind: approval_queue_1.SPEC_TRANSITION_KIND.retire, target: a.id, why: '봉인된 스펙의 폐기', title: spec.title }),
|
|
564
566
|
};
|
|
565
567
|
}
|
|
566
568
|
// @implements A-SPEC-245, A-SPEC-245.1, A-SPEC-245.2 — a grant that authorized breaking a seal is claimed for the act
|
|
@@ -819,14 +821,15 @@ function createSpecLifecycleHandlers(context) {
|
|
|
819
821
|
catch {
|
|
820
822
|
approval = undefined;
|
|
821
823
|
}
|
|
822
|
-
|
|
824
|
+
// A-SPEC-794.81 — un-sealing is its own kind: a seal's grant does not cover it
|
|
825
|
+
const resolved = context.resolveHandlerApproval(a.root, approval, { kind: approval_queue_1.SPEC_TRANSITION_KIND.unseal, target: a.id }, new Date().toISOString());
|
|
823
826
|
if (resolved === undefined) {
|
|
824
827
|
return {
|
|
825
828
|
ok: false,
|
|
826
829
|
reason: `${a.id}은(는) 봉인된 문서입니다 — 봉인 해제는 이 행위를 덮는 유효한 대역외 HOLMES_APPROVAL 이 필요합니다.`
|
|
827
830
|
+ ' 봉인을 해제하면 코드 게이트가 요구하던 approved 스펙의 봉인이 사라지므로, 해제가 승인 우회 경로가 되지 않도록 fail-closed 로 막습니다.'
|
|
828
|
-
+
|
|
829
|
-
+ context.refusalQueueHint(a.root, { kind:
|
|
831
|
+
+ ` (범위를 쓰면 kind "${approval_queue_1.SPEC_TRANSITION_KIND.unseal}")`
|
|
832
|
+
+ context.refusalQueueHint(a.root, { kind: approval_queue_1.SPEC_TRANSITION_KIND.unseal, target: a.id, why: '봉인된 스펙의 해제', title: spec.title }),
|
|
830
833
|
};
|
|
831
834
|
}
|
|
832
835
|
// @implements A-SPEC-245, A-SPEC-245.1, A-SPEC-245.2 — the act runs inside the grant's claim: spent by the write it
|