@principles/host-runtime 4.9.3 → 4.9.4
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/dist/index.d.ts
CHANGED
|
@@ -53,7 +53,6 @@ export * from './codex-disclosure.js';
|
|
|
53
53
|
export * from './codex-ingestion-consent.js';
|
|
54
54
|
export * from './codex-worker-status.js';
|
|
55
55
|
export * from './workbuddy-worker-status.js';
|
|
56
|
-
export * from './codex-legacy-registration.js';
|
|
57
56
|
export * from './codex-transcript-locate.js';
|
|
58
57
|
export * from './intervention-evidence-ingress.js';
|
|
59
58
|
export * from './degraded-enforcement-marker.js';
|
package/dist/index.js
CHANGED
|
@@ -119,9 +119,6 @@ export * from './codex-worker-status.js';
|
|
|
119
119
|
// authority for the WorkBuddy governance workspace — same one-semantics
|
|
120
120
|
// placement as the Codex evaluation above, no ingestion step to gate.
|
|
121
121
|
export * from './workbuddy-worker-status.js';
|
|
122
|
-
// PRI-625 Slice D: ONE legacy-registration predicate (installer refusal,
|
|
123
|
-
// health dualRegistration, and future setup flows all read the same fact).
|
|
124
|
-
export * from './codex-legacy-registration.js';
|
|
125
122
|
// PRI-625 Slice D: transcript locator moved here so the §15 health service
|
|
126
123
|
// computes per-rollout lag with the SAME locator the catch-up path uses.
|
|
127
124
|
export * from './codex-transcript-locate.js';
|
|
@@ -37,11 +37,8 @@ export interface ConsumerHostToolCatalog {
|
|
|
37
37
|
}
|
|
38
38
|
export interface InternalizationConsumerCyclePorts {
|
|
39
39
|
/**
|
|
40
|
-
* Runner-owner label recorded on leases
|
|
41
|
-
*
|
|
42
|
-
* the current workspace-worker identity; leases persisted before the
|
|
43
|
-
* Companion-runtime removal may still carry the retired 'companion-worker'
|
|
44
|
-
* label — historical records are never migrated.
|
|
40
|
+
* Runner-owner label recorded on leases. The current workspace-worker
|
|
41
|
+
* identity is 'service-host-worker'.
|
|
45
42
|
*/
|
|
46
43
|
readonly owner: string;
|
|
47
44
|
readonly logger: ConsumerCycleLogger;
|
|
@@ -151,9 +151,6 @@ export function createEvaluatorRepairDeps(workspaceDir, stateManager, logger) {
|
|
|
151
151
|
return result.task.taskId;
|
|
152
152
|
}
|
|
153
153
|
if (result.outcome === 'adopted_existing') {
|
|
154
|
-
if (result.backfilled) {
|
|
155
|
-
logger?.info?.(`[PD:Consumer] repair task ${result.task.taskId} lineage backfilled before reuse`);
|
|
156
|
-
}
|
|
157
154
|
logger?.info?.(`[PD:Consumer] repair task ${result.task.taskId} already exists (in-flight ${result.task.status}); reusing (idempotent seed)`);
|
|
158
155
|
return result.task.taskId;
|
|
159
156
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@principles/host-runtime",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.4",
|
|
4
4
|
"description": "Shared host-neutral orchestration for Principles Disciple MVP-Core hook paths.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"lint": "eslint \"src/**/*.ts\""
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@principles/core": "^8.
|
|
42
|
+
"@principles/core": "^8.6.0",
|
|
43
43
|
"@principles/install-layout": "^0.12.0",
|
|
44
44
|
"better-sqlite3": "^13.0.3",
|
|
45
45
|
"js-yaml": "^5.4.3"
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"url": "git+https://github.com/csuzngjh/principles.git"
|
|
58
58
|
},
|
|
59
59
|
"license": "Apache-2.0",
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "2d34c8c2614e1b84e4ea2b4c0bb56bab173da97c"
|
|
61
61
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Legacy Codex global-hook registration detection — Codex Governance Closure
|
|
3
|
-
* Slice D (PRI-625; SPEC rev 2 §17 legacy-installer retirement).
|
|
4
|
-
*
|
|
5
|
-
* ONE authority for the "is a PD-owned legacy global registration present"
|
|
6
|
-
* fact: the pure parser lives in @principles/core/host
|
|
7
|
-
* (parseLegacyCodexHooksRegistration); this wrapper is the FS edge for
|
|
8
|
-
* host-runtime consumers (health/setup surfaces). The retired installer uses
|
|
9
|
-
* the same core parser at its own edge.
|
|
10
|
-
*/
|
|
11
|
-
import { type LegacyCodexRegistration } from '@principles/core/host';
|
|
12
|
-
/**
|
|
13
|
-
* Detect a PD-owned legacy global hook registration in ~/.codex/hooks.json.
|
|
14
|
-
* Unreadable/malformed/absent ⇒ detected:false (nothing provably ours to
|
|
15
|
-
* migrate); the health surface reports the unreadable state separately via
|
|
16
|
-
* its own hooks.json presence check.
|
|
17
|
-
*/
|
|
18
|
-
export declare function detectLegacyCodexHookRegistration(hooksJsonPathOverride?: string): LegacyCodexRegistration;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Legacy Codex global-hook registration detection — Codex Governance Closure
|
|
3
|
-
* Slice D (PRI-625; SPEC rev 2 §17 legacy-installer retirement).
|
|
4
|
-
*
|
|
5
|
-
* ONE authority for the "is a PD-owned legacy global registration present"
|
|
6
|
-
* fact: the pure parser lives in @principles/core/host
|
|
7
|
-
* (parseLegacyCodexHooksRegistration); this wrapper is the FS edge for
|
|
8
|
-
* host-runtime consumers (health/setup surfaces). The retired installer uses
|
|
9
|
-
* the same core parser at its own edge.
|
|
10
|
-
*/
|
|
11
|
-
import fs from 'node:fs';
|
|
12
|
-
import * as path from 'node:path';
|
|
13
|
-
import { parseLegacyCodexHooksRegistration } from '@principles/core/host';
|
|
14
|
-
import { resolvePdHome } from '@principles/install-layout';
|
|
15
|
-
function getCodexHooksJsonPath() {
|
|
16
|
-
// The Codex home follows the shared PD Home authority (CODEX_HOME override,
|
|
17
|
-
// PD_EXPERIMENT_ROOT isolation). A refused resolution fails loud — reading a
|
|
18
|
-
// production hooks.json from inside a misconfigured lab would silently
|
|
19
|
-
// report foreign governance state.
|
|
20
|
-
const home = resolvePdHome();
|
|
21
|
-
if (!home.ok) {
|
|
22
|
-
throw new Error(`PD home resolution refused (${home.reason}): ${home.message} Next action: ${home.nextAction}`);
|
|
23
|
-
}
|
|
24
|
-
return path.join(home.codexHome, 'hooks.json');
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Detect a PD-owned legacy global hook registration in ~/.codex/hooks.json.
|
|
28
|
-
* Unreadable/malformed/absent ⇒ detected:false (nothing provably ours to
|
|
29
|
-
* migrate); the health surface reports the unreadable state separately via
|
|
30
|
-
* its own hooks.json presence check.
|
|
31
|
-
*/
|
|
32
|
-
export function detectLegacyCodexHookRegistration(hooksJsonPathOverride) {
|
|
33
|
-
const hooksJsonPath = hooksJsonPathOverride ?? getCodexHooksJsonPath();
|
|
34
|
-
let parsed;
|
|
35
|
-
try {
|
|
36
|
-
parsed = JSON.parse(fs.readFileSync(hooksJsonPath, 'utf8'));
|
|
37
|
-
}
|
|
38
|
-
catch {
|
|
39
|
-
return { detected: false, legacyAsyncPostToolUse: false };
|
|
40
|
-
}
|
|
41
|
-
return parseLegacyCodexHooksRegistration(parsed);
|
|
42
|
-
}
|