@principles/host-runtime 0.8.0 → 0.8.2

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.
@@ -468,6 +468,9 @@ export async function runInternalizationConsumerCycle(workspaceDir, ports) {
468
468
  // identity on the live production chain. listForCandidate reads
469
469
  // the ledger from disk per call — no cross-cycle staleness.
470
470
  ledgerIdentity: {
471
+ // PRI-915: availability first — an unreadable ledger must not
472
+ // read as an unresolved chain.
473
+ isAvailable: () => new PrincipleTreeLedgerAdapter({ stateDir: `${workspaceDir}/.state` }).isAvailable(),
471
474
  listForCandidate: (candidateId) => new PrincipleTreeLedgerAdapter({ stateDir: `${workspaceDir}/.state` }).listForCandidate(candidateId),
472
475
  },
473
476
  }, runnerOptions);
@@ -499,7 +502,10 @@ export async function runInternalizationConsumerCycle(workspaceDir, ports) {
499
502
  // "UUID the ledger actually mints", so a shaped-but-unknown id is
500
503
  // refused as invalid_identity instead of being carried forward.
501
504
  // Same per-call disk read as the scribe wiring above.
505
+ // PRI-915: availability first — an unreadable ledger must surface
506
+ // as identity_source_unavailable, not as invalid_identity drift.
502
507
  ledgerIdentity: {
508
+ isAvailable: () => new PrincipleTreeLedgerAdapter({ stateDir: `${workspaceDir}/.state` }).isAvailable(),
503
509
  hasPrinciple: (principleId) => new PrincipleTreeLedgerAdapter({ stateDir: `${workspaceDir}/.state` }).hasPrinciple(principleId),
504
510
  },
505
511
  ...createEvaluatorRepairDeps(workspaceDir, stateManager, logger),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@principles/host-runtime",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Shared host-neutral orchestration for Principles Disciple MVP-Core hook paths.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -21,7 +21,7 @@
21
21
  "lint": "eslint \"src/**/*.ts\""
22
22
  },
23
23
  "dependencies": {
24
- "@principles/core": "^1.290.0",
24
+ "@principles/core": "^1.291.3",
25
25
  "@principles/install-layout": "^0.2.7",
26
26
  "better-sqlite3": "^13.0.3",
27
27
  "js-yaml": "^5.4.1"