@principles/host-runtime 4.7.2 → 4.8.1
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/codex-worker-status.d.ts +6 -4
- package/dist/codex-worker-status.js +7 -5
- package/dist/diagnostician-auto-run.js +2 -2
- package/dist/governance-signal-admission.d.ts +2 -1
- package/dist/governance-signal-admission.js +2 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +6 -2
- package/dist/internalization-consumer-cycle.d.ts +13 -106
- package/dist/internalization-consumer-cycle.js +21 -99
- package/dist/internalization-consumer-governance.d.ts +3 -3
- package/dist/internalization-consumer-governance.js +17 -96
- package/dist/internalization-task-executor.d.ts +127 -0
- package/dist/internalization-task-executor.js +121 -0
- package/dist/workbuddy-worker-status.d.ts +6 -3
- package/dist/workbuddy-worker-status.js +7 -4
- package/dist/workspace-telemetry-emitter.js +1 -1
- package/package.json +4 -4
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
* manifest registration). codex-adapter re-exports it for compatibility.
|
|
7
7
|
*
|
|
8
8
|
* SPEC §15 worker mode, evaluated WITHOUT executing anything (no lease, no
|
|
9
|
-
* LLM, no transcript I/O). `manual_action_required` means
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* LLM, no transcript I/O). `manual_action_required` means this workspace is
|
|
10
|
+
* not registered in the canonical install manifest, so the PD Service Host —
|
|
11
|
+
* the only background runtime, triggered by the OS scheduler — never
|
|
12
|
+
* discovers it and no automatic worker cycles run for it. The manual CLI
|
|
13
|
+
* path (catch-up / diagnose / run-once) is the recovery route. 'ready' here
|
|
14
|
+
* means "an automatic worker would run and hold the workspace task leases";
|
|
13
15
|
* live-worker liveness surfacing belongs to the Slice D health surface.
|
|
14
16
|
*/
|
|
15
17
|
export type CodexWorkerMode = 'ready' | 'manual_action_required' | 'paused' | 'degraded';
|
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
* manifest registration). codex-adapter re-exports it for compatibility.
|
|
7
7
|
*
|
|
8
8
|
* SPEC §15 worker mode, evaluated WITHOUT executing anything (no lease, no
|
|
9
|
-
* LLM, no transcript I/O). `manual_action_required` means
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* LLM, no transcript I/O). `manual_action_required` means this workspace is
|
|
10
|
+
* not registered in the canonical install manifest, so the PD Service Host —
|
|
11
|
+
* the only background runtime, triggered by the OS scheduler — never
|
|
12
|
+
* discovers it and no automatic worker cycles run for it. The manual CLI
|
|
13
|
+
* path (catch-up / diagnose / run-once) is the recovery route. 'ready' here
|
|
14
|
+
* means "an automatic worker would run and hold the workspace task leases";
|
|
13
15
|
* live-worker liveness surfacing belongs to the Slice D health surface.
|
|
14
16
|
*/
|
|
15
17
|
import * as fs from 'node:fs';
|
|
@@ -45,7 +47,7 @@ export function computeCodexWorkerStatusMode(input) {
|
|
|
45
47
|
return {
|
|
46
48
|
mode: 'manual_action_required',
|
|
47
49
|
reason: 'workspace_not_in_install_manifest',
|
|
48
|
-
nextAction: `
|
|
50
|
+
nextAction: `This workspace is not registered in the canonical install manifest, so the PD Service Host does not manage automatic worker cycles for it. Re-run the Codex setup flow to register it. Manual path: pd codex ingest catch-up --workspace "${workspaceDir}", then pd diagnose / pd runtime internalization run-once.`,
|
|
49
51
|
};
|
|
50
52
|
}
|
|
51
53
|
return { mode: 'ready' };
|
|
@@ -53,8 +53,8 @@ export async function runPendingDiagnosticianOnce(options) {
|
|
|
53
53
|
return {
|
|
54
54
|
served: false,
|
|
55
55
|
reason: 'service_not_running',
|
|
56
|
-
message: 'the
|
|
57
|
-
nextAction: '
|
|
56
|
+
message: 'the internalization consumer cycle is not running in this workspace',
|
|
57
|
+
nextAction: 'Verify the PD Service Host is enabled (pd service status), or diagnose from Console (L2) which does not need a worker cycle.',
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
const config = loadPdConfigForPlugin(options.workspaceDir);
|
|
@@ -463,7 +463,8 @@ export interface ReconcileGovernanceContinuationResult {
|
|
|
463
463
|
* while conversation-ingestion consent is enabled;
|
|
464
464
|
* - Case D: promotion started → pending tail → retry completion once; stale
|
|
465
465
|
* tails are reported (never silently dropped).
|
|
466
|
-
* Not a background worker —
|
|
466
|
+
* Not a background worker — the Service-Host-spawned workspace workers and
|
|
467
|
+
* the CLI call this.
|
|
467
468
|
*/
|
|
468
469
|
export declare function reconcileGovernanceContinuation(input: ReconcileGovernanceContinuationInput): Promise<ReconcileGovernanceContinuationResult>;
|
|
469
470
|
export interface GovernanceAdmissionCounts {
|
|
@@ -2278,7 +2278,8 @@ export async function ensureGovernanceContinuation(input) {
|
|
|
2278
2278
|
* while conversation-ingestion consent is enabled;
|
|
2279
2279
|
* - Case D: promotion started → pending tail → retry completion once; stale
|
|
2280
2280
|
* tails are reported (never silently dropped).
|
|
2281
|
-
* Not a background worker —
|
|
2281
|
+
* Not a background worker — the Service-Host-spawned workspace workers and
|
|
2282
|
+
* the CLI call this.
|
|
2282
2283
|
*/
|
|
2283
2284
|
export async function reconcileGovernanceContinuation(input) {
|
|
2284
2285
|
const workspaceDir = path.resolve(input.workspaceDir);
|
package/dist/index.d.ts
CHANGED
|
@@ -32,8 +32,10 @@ export * from './adaptive-background-append.js';
|
|
|
32
32
|
export * from './signal-stage2-cycle.js';
|
|
33
33
|
export * from './host-liveness-contract.js';
|
|
34
34
|
export * from './internalization-consumer-governance.js';
|
|
35
|
-
export { INTERNALIZATION_AUTO_CONSUMER_FLAG_ID, orderKindsByOldestReadyStage, oldestReadyAgeMs,
|
|
36
|
-
export type { ConsumerCycleLogger, ConsumerHostToolCatalog, InternalizationConsumerCyclePorts, InternalizationConsumerCycleOutcome, InternalizationConsumerCycleSignals,
|
|
35
|
+
export { INTERNALIZATION_AUTO_CONSUMER_FLAG_ID, orderKindsByOldestReadyStage, oldestReadyAgeMs, runInternalizationConsumerCycle, } from './internalization-consumer-cycle.js';
|
|
36
|
+
export type { ConsumerCycleLogger, ConsumerHostToolCatalog, InternalizationConsumerCyclePorts, InternalizationConsumerCycleOutcome, InternalizationConsumerCycleSignals, } from './internalization-consumer-cycle.js';
|
|
37
|
+
export { executeSelectedInternalizationTask, } from './internalization-task-executor.js';
|
|
38
|
+
export type { ExecuteSelectedInternalizationTaskInput, SelectedInternalizationTaskRunResult, SelectedInternalizationTaskRunnerOptions, } from './internalization-task-executor.js';
|
|
37
39
|
export * from './adaptive-consumer-schedule.js';
|
|
38
40
|
export * from './diagnostician-auto-run.js';
|
|
39
41
|
export * from './workspace-pipeline-host-deps.js';
|
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ export * from './adaptive-background-append.js';
|
|
|
62
62
|
export * from './signal-stage2-cycle.js';
|
|
63
63
|
export * from './host-liveness-contract.js';
|
|
64
64
|
// PRI-624 Slice C: shared internalization consumer execution (OpenClaw
|
|
65
|
-
// auto-consumer +
|
|
65
|
+
// auto-consumer + Service-Host-spawned workspace workers call the same cycle).
|
|
66
66
|
export * from './internalization-consumer-governance.js';
|
|
67
67
|
// PRI-1293 R3 (export surface tightening): explicit whitelist instead of
|
|
68
68
|
// `export *` — the public API is the consumer cycle entry, the selected-task
|
|
@@ -74,7 +74,11 @@ export * from './internalization-consumer-governance.js';
|
|
|
74
74
|
// of the input union, and callers construct them structurally.
|
|
75
75
|
// SelectedInternalizationTaskRunnerOptions IS public — pd-cli run-once
|
|
76
76
|
// constructs it directly (verified cross-package consumer).
|
|
77
|
-
|
|
77
|
+
// PRI-1301: the executor entries re-export from the executor module
|
|
78
|
+
// (pure move — identical symbol names/types; the cycle entries stay
|
|
79
|
+
// sourced from the consumer cycle module).
|
|
80
|
+
export { INTERNALIZATION_AUTO_CONSUMER_FLAG_ID, orderKindsByOldestReadyStage, oldestReadyAgeMs, runInternalizationConsumerCycle, } from './internalization-consumer-cycle.js';
|
|
81
|
+
export { executeSelectedInternalizationTask, } from './internalization-task-executor.js';
|
|
78
82
|
// SPEC-PD-PIPELINE-RELIABILITY-AND-EFFICIENCY-001 §4: pure adaptive schedule
|
|
79
83
|
// policy for the existing consumer timer chain (no new background service).
|
|
80
84
|
export * from './adaptive-consumer-schedule.js';
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extracted verbatim from openclaw-plugin's
|
|
5
5
|
* `internalization-auto-consumer-service.ts` `runConsumerCycle` so that the
|
|
6
|
-
* OpenClaw auto-consumer scheduler and the
|
|
6
|
+
* OpenClaw auto-consumer scheduler and the Service-Host-spawned workspace
|
|
7
|
+
* workers call
|
|
7
8
|
* ONE downstream execution implementation (SPEC §13: "reusing existing
|
|
8
|
-
* downstream consumer logic" —
|
|
9
|
+
* downstream consumer logic" — no host worker may copy it):
|
|
9
10
|
*
|
|
10
11
|
* flag gate → config/runtime config → state handle → orchestrator(dryRun)
|
|
11
12
|
* → queue read model → consumer decision → wakeOnce loop → adapter
|
|
@@ -14,13 +15,14 @@
|
|
|
14
15
|
*
|
|
15
16
|
* The lease is acquired INSIDE runner.run by the Runtime lease manager
|
|
16
17
|
* (persisted in `<workspace>/.pd/state.db`, cross-process safe) — this cycle
|
|
17
|
-
* never leases by itself, so two schedulers (OpenClaw +
|
|
18
|
+
* never leases by itself, so two schedulers (OpenClaw + Service Host worker)
|
|
19
|
+
* racing on
|
|
18
20
|
* one workspace converge to exactly-once execution via lease_conflict.
|
|
19
21
|
*
|
|
20
22
|
* Hosts inject: a logger, a structured-event sink, their tool catalog, and an
|
|
21
23
|
* env getter. Everything else is the existing production path.
|
|
22
24
|
*/
|
|
23
|
-
import { type
|
|
25
|
+
import { type ToolSemanticRegistry, type BehaviorEvidencePort, type ArtificerTrustedFactsPort } from '@principles/core/runtime';
|
|
24
26
|
import { type ConsumerGovernanceLogger } from './internalization-consumer-governance.js';
|
|
25
27
|
export declare const INTERNALIZATION_AUTO_CONSUMER_FLAG_ID = "internalization_auto_consumer";
|
|
26
28
|
/** Structural logger port — OpenClaw PluginLogger and worker loggers satisfy this. */
|
|
@@ -34,7 +36,13 @@ export interface ConsumerHostToolCatalog {
|
|
|
34
36
|
readonly writeTools: readonly string[];
|
|
35
37
|
}
|
|
36
38
|
export interface InternalizationConsumerCyclePorts {
|
|
37
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Runner-owner label recorded on leases ('auto-consumer' |
|
|
41
|
+
* 'service-host-worker' | …). PRI-1278 Phase 5: 'service-host-worker' is
|
|
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.
|
|
45
|
+
*/
|
|
38
46
|
readonly owner: string;
|
|
39
47
|
readonly logger: ConsumerCycleLogger;
|
|
40
48
|
/** Structured event sink (OpenClaw: SystemLogger.log; worker: its own log). */
|
|
@@ -133,107 +141,6 @@ export declare function orderKindsByOldestReadyStage<T extends string>(runnerKin
|
|
|
133
141
|
export declare function oldestReadyAgeMs(readyTasks: readonly {
|
|
134
142
|
createdAt?: string;
|
|
135
143
|
}[], nowMs: number): number | null;
|
|
136
|
-
/**
|
|
137
|
-
* Runner 遥测窄端口 — 与 core `PeerRunnerTelemetryEmitter` 结构等价
|
|
138
|
-
* (该类型不在 core 冻结 barrel 上,此处按结构声明,零新增导出)。
|
|
139
|
-
* StoreEventEmitter 与 WorkspaceTelemetryEmitter 均满足。
|
|
140
|
-
*/
|
|
141
|
-
export interface SelectedTaskTelemetryEmitter {
|
|
142
|
-
readonly emitTelemetry: (event: TelemetryEvent) => unknown;
|
|
143
|
-
}
|
|
144
|
-
/** 全部 kind 共享的调用方依赖。 */
|
|
145
|
-
export interface SelectedInternalizationTaskBaseDeps {
|
|
146
|
-
/** 要执行的已**选中**任务 — 执行租约由 Runner 在 run() 内自行获取, 调用方不在本层租约。 */
|
|
147
|
-
readonly taskId: string;
|
|
148
|
-
readonly stateManager: RuntimeStateManager;
|
|
149
|
-
/** 入口自建的 runtime adapter (含 L2 / test-double 路由决策)。 */
|
|
150
|
-
readonly runtimeAdapter: PDRuntimeAdapter;
|
|
151
|
-
/** 入口选择的遥测口 (consumer evaluator 用 workspace-scoped emitter)。 */
|
|
152
|
-
readonly eventEmitter: SelectedTaskTelemetryEmitter;
|
|
153
|
-
readonly artifactStore: PIArtifactStore;
|
|
154
|
-
/** Workspace 根 — ledgerIdentity 装配的唯一事实来源。 */
|
|
155
|
-
readonly workspaceDir: string;
|
|
156
|
-
}
|
|
157
|
-
/** Runner 构造/执行选项 — 原样转发 (各入口既有语义保持)。 */
|
|
158
|
-
export interface SelectedInternalizationTaskRunnerOptions {
|
|
159
|
-
readonly owner: string;
|
|
160
|
-
readonly runtimeKind: string;
|
|
161
|
-
readonly timeoutMs: number;
|
|
162
|
-
readonly effectiveConfig?: EffectivePdConfig;
|
|
163
|
-
readonly outputLanguage?: OutputLanguage;
|
|
164
|
-
readonly pollIntervalMs?: number;
|
|
165
|
-
}
|
|
166
|
-
/** Evaluator repair 轮的宿主接线 (来自既有 governance deps 工厂,不造第三套)。 */
|
|
167
|
-
export interface SelectedEvaluatorRepairDeps {
|
|
168
|
-
readonly isRepairLoopEnabled: () => boolean;
|
|
169
|
-
readonly seedArtificerRepairTask: (params: SeedArtificerRepairParams) => Promise<string>;
|
|
170
|
-
}
|
|
171
|
-
/** rollout 治理接线 (来自 createRolloutGovernanceDeps)。 */
|
|
172
|
-
export interface SelectedRolloutGovernanceDeps {
|
|
173
|
-
readonly dispatchActivation: (input: RolloutAutoDispatchInput) => Promise<RolloutAutoDispatchOutcome>;
|
|
174
|
-
readonly reopenRevisionTarget: (input: RolloutRevisionRoutingInput) => Promise<{
|
|
175
|
-
ok: boolean;
|
|
176
|
-
reason: string;
|
|
177
|
-
reopenedTaskId?: string;
|
|
178
|
-
}>;
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* 按 taskKind 收窄的判别联合输入 — 必需依赖在类型层面不可缺失;
|
|
182
|
-
* optional 仅限两个入口现状真实可选的字段 (artificer 的 evidence pack /
|
|
183
|
-
* trustedFacts / hostSemanticContext、evaluator 的宿主目录与语义投影)。
|
|
184
|
-
*/
|
|
185
|
-
export type ExecuteSelectedInternalizationTaskInput = ({
|
|
186
|
-
readonly taskKind: 'dreamer';
|
|
187
|
-
} & SelectedInternalizationTaskBaseDeps & {
|
|
188
|
-
readonly runnerOptions: SelectedInternalizationTaskRunnerOptions;
|
|
189
|
-
}) | ({
|
|
190
|
-
readonly taskKind: 'philosopher';
|
|
191
|
-
} & SelectedInternalizationTaskBaseDeps & {
|
|
192
|
-
readonly runnerOptions: SelectedInternalizationTaskRunnerOptions;
|
|
193
|
-
}) | ({
|
|
194
|
-
readonly taskKind: 'scribe';
|
|
195
|
-
} & SelectedInternalizationTaskBaseDeps & {
|
|
196
|
-
readonly runnerOptions: SelectedInternalizationTaskRunnerOptions;
|
|
197
|
-
}) | ({
|
|
198
|
-
readonly taskKind: 'artificer';
|
|
199
|
-
/** 仅 preflight 通过的入口传入 (consumer evidence ready);run-once 无此能力则缺省。 */
|
|
200
|
-
readonly behaviorExamplePack?: BehaviorExamplePack;
|
|
201
|
-
/** 仅 consumer 传入 — 与 intent preflight 同源的 trusted-facts 端口。 */
|
|
202
|
-
readonly trustedFacts?: ArtificerTrustedFactsPort;
|
|
203
|
-
readonly hostSemanticContext?: ArtificerHostSemanticContext;
|
|
204
|
-
} & SelectedInternalizationTaskBaseDeps & {
|
|
205
|
-
readonly runnerOptions: SelectedInternalizationTaskRunnerOptions;
|
|
206
|
-
}) | ({
|
|
207
|
-
readonly taskKind: 'evaluator';
|
|
208
|
-
/** repair 轮宿主接线 — 缺失即是装配错误,不允许缺省掩盖。 */
|
|
209
|
-
readonly repairDeps: SelectedEvaluatorRepairDeps;
|
|
210
|
-
/** 对抗重放 gate — 两个入口都必须显式提供各自权威解析结果。 */
|
|
211
|
-
readonly gateDeps: RefinerRuleHostGateDeps;
|
|
212
|
-
readonly hostToolCatalog?: ConsumerHostToolCatalog;
|
|
213
|
-
readonly hostSemanticContext?: ArtificerHostSemanticContext;
|
|
214
|
-
} & SelectedInternalizationTaskBaseDeps & {
|
|
215
|
-
readonly runnerOptions: SelectedInternalizationTaskRunnerOptions;
|
|
216
|
-
}) | ({
|
|
217
|
-
readonly taskKind: 'rollout_reviewer';
|
|
218
|
-
readonly governanceDeps: SelectedRolloutGovernanceDeps;
|
|
219
|
-
} & SelectedInternalizationTaskBaseDeps & {
|
|
220
|
-
readonly runnerOptions: SelectedInternalizationTaskRunnerOptions;
|
|
221
|
-
});
|
|
222
|
-
export type SelectedInternalizationTaskRunResult = DreamerRunnerResult | PhilosopherRunnerResult | ScribeRunnerResult | ArtificerRunnerResult | EvaluatorRunnerResult | RolloutReviewerRunnerResult;
|
|
223
|
-
/**
|
|
224
|
-
* Execute ONE selected internalization task with the kind-selected runner.
|
|
225
|
-
* Constructs the runner from the typed input and returns the raw run result.
|
|
226
|
-
*
|
|
227
|
-
* Lease ownership contract (CodeRabbit review fix): the caller is responsible
|
|
228
|
-
* for SELECTING the task (e.g. a dry-run `wakeOnce` `would_lease` candidate);
|
|
229
|
-
* the runner itself acquires the execution lease inside `run()` — callers must
|
|
230
|
-
* NOT lease at this layer. The doc previously demanded an already-leased task,
|
|
231
|
-
* which would lead new callers to acquire the lease at the wrong layer.
|
|
232
|
-
*
|
|
233
|
-
* Runner crashes propagate to the caller (each entry keeps its own crash
|
|
234
|
-
* semantics: consumer rethrows without state writes; run-once logs + rethrows).
|
|
235
|
-
*/
|
|
236
|
-
export declare function executeSelectedInternalizationTask(input: ExecuteSelectedInternalizationTaskInput): Promise<SelectedInternalizationTaskRunResult>;
|
|
237
144
|
/**
|
|
238
145
|
* Run ONE bounded consumer cycle for a workspace. At most one downstream task
|
|
239
146
|
* is leased and executed per cycle (DEFAULT_CONSUMER_MAX_TASKS_PER_CYCLE=1);
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extracted verbatim from openclaw-plugin's
|
|
5
5
|
* `internalization-auto-consumer-service.ts` `runConsumerCycle` so that the
|
|
6
|
-
* OpenClaw auto-consumer scheduler and the
|
|
6
|
+
* OpenClaw auto-consumer scheduler and the Service-Host-spawned workspace
|
|
7
|
+
* workers call
|
|
7
8
|
* ONE downstream execution implementation (SPEC §13: "reusing existing
|
|
8
|
-
* downstream consumer logic" —
|
|
9
|
+
* downstream consumer logic" — no host worker may copy it):
|
|
9
10
|
*
|
|
10
11
|
* flag gate → config/runtime config → state handle → orchestrator(dryRun)
|
|
11
12
|
* → queue read model → consumer decision → wakeOnce loop → adapter
|
|
@@ -14,19 +15,27 @@
|
|
|
14
15
|
*
|
|
15
16
|
* The lease is acquired INSIDE runner.run by the Runtime lease manager
|
|
16
17
|
* (persisted in `<workspace>/.pd/state.db`, cross-process safe) — this cycle
|
|
17
|
-
* never leases by itself, so two schedulers (OpenClaw +
|
|
18
|
+
* never leases by itself, so two schedulers (OpenClaw + Service Host worker)
|
|
19
|
+
* racing on
|
|
18
20
|
* one workspace converge to exactly-once execution via lease_conflict.
|
|
19
21
|
*
|
|
20
22
|
* Hosts inject: a logger, a structured-event sink, their tool catalog, and an
|
|
21
23
|
* env getter. Everything else is the existing production path.
|
|
22
24
|
*/
|
|
23
|
-
import { createRuntimeStateHandle, InternalizationOrchestrator,
|
|
25
|
+
import { createRuntimeStateHandle, InternalizationOrchestrator, buildArtificerHostSemanticContext,
|
|
26
|
+
// PRI-1301: 六种 Peer Runner 与 Default<X>Validator 的 executor 专用导入
|
|
27
|
+
// 已随执行器本体迁往 ./internalization-task-executor.js — 本文件只保留
|
|
28
|
+
// ArtificerL2Adapter 装配自用的 DefaultArtificerValidator。
|
|
29
|
+
DefaultArtificerValidator, PiAiRuntimeAdapter, L2AgentLoopAdapter, ArtificerL2Adapter, buildL2PrincipleReaderFromLedger, storeEmitter, createProductionGateDeps, resolveRuntimeConfigFromPdConfig, resolveRuntimeConfigForAgent, AGENT_NAME_FOR_TASK_KIND, isRuntimeConfigError, computeConsumerDecision, FULL_CHAIN_CONSUMER_RUNNER_KINDS, DEFAULT_CONSUMER_RUNNER_KINDS, InternalizationQueueReadModel, MVP_CORE_TASK_KINDS, SqliteConnection, SqliteReconciliationCursorStore, SUCCEEDED_TRANSITIONS_SCOPE,
|
|
24
30
|
// PRI-714: resolve outputLanguage from the same effective config the
|
|
25
31
|
// runners already receive (EP-07: canonical resolved value, not raw input).
|
|
26
32
|
resolveOutputLanguage, hydratePITaskRecord, preflightArtificerOwnerEvidence, preflightArtificerIntentBasis, consumeSourceFaultBackoffSkip, advanceSourceFaultBackoff, } from '@principles/core/runtime';
|
|
27
33
|
import { loadLedger } from '@principles/core/principle-tree-ledger';
|
|
28
34
|
import { loadPdConfigForPlugin, loadFeatureFlagFromConfig } from './pd-config.js';
|
|
29
35
|
import { createEvaluatorRepairDeps, createRolloutGovernanceDeps } from './internalization-consumer-governance.js';
|
|
36
|
+
// PRI-1301: 单步 Runner 执行器唯一权威实现 (PRI-1293 Phase 2B 收编本体)
|
|
37
|
+
// 独立成模块 — 本 cycle 只做选择/调度/装配, 构造执行经同一入口。
|
|
38
|
+
import { executeSelectedInternalizationTask } from './internalization-task-executor.js';
|
|
30
39
|
import { WorkspaceTelemetryEmitter } from './workspace-telemetry-emitter.js';
|
|
31
40
|
import { createConsentLedgerSourceMaterialAuthorization } from './source-material-authorization.js';
|
|
32
41
|
export const INTERNALIZATION_AUTO_CONSUMER_FLAG_ID = 'internalization_auto_consumer';
|
|
@@ -195,101 +204,14 @@ async function runReconciliationBudget(workspaceDir, orchestrator, ports) {
|
|
|
195
204
|
logger.warn(`[PD:${logLabel}] Succeeded-transition reconciliation failed: ${String(reconErr)}`);
|
|
196
205
|
}
|
|
197
206
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
const candidate = await stateManager.getCandidate(candidateId);
|
|
207
|
-
return ledger().resolveCandidatePrincipleIdentity(candidateId, candidate?.rawRecommendationKind);
|
|
208
|
-
},
|
|
209
|
-
// PRI-915: availability first — an unreadable ledger must not read as an
|
|
210
|
-
// unresolved chain.
|
|
211
|
-
isAvailable: () => ledger().isAvailable(),
|
|
212
|
-
listForCandidate: (candidateId) => ledger().listForCandidate(candidateId),
|
|
213
|
-
hasPrinciple: (principleId) => ledger().hasPrinciple(principleId),
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* Execute ONE selected internalization task with the kind-selected runner.
|
|
218
|
-
* Constructs the runner from the typed input and returns the raw run result.
|
|
219
|
-
*
|
|
220
|
-
* Lease ownership contract (CodeRabbit review fix): the caller is responsible
|
|
221
|
-
* for SELECTING the task (e.g. a dry-run `wakeOnce` `would_lease` candidate);
|
|
222
|
-
* the runner itself acquires the execution lease inside `run()` — callers must
|
|
223
|
-
* NOT lease at this layer. The doc previously demanded an already-leased task,
|
|
224
|
-
* which would lead new callers to acquire the lease at the wrong layer.
|
|
225
|
-
*
|
|
226
|
-
* Runner crashes propagate to the caller (each entry keeps its own crash
|
|
227
|
-
* semantics: consumer rethrows without state writes; run-once logs + rethrows).
|
|
228
|
-
*/
|
|
229
|
-
export async function executeSelectedInternalizationTask(input) {
|
|
230
|
-
const { taskId, stateManager, runtimeAdapter, eventEmitter, artifactStore, workspaceDir } = input;
|
|
231
|
-
const { runnerOptions } = input;
|
|
232
|
-
// Evaluator 的身份装配含 hasPrinciple (PRI-911A writer boundary);
|
|
233
|
-
// Scribe 另需 listForCandidate (chain stamping);Artificer 只读解析。
|
|
234
|
-
// 一次装配、按 kind 结构化满足各自 deps 形状。
|
|
235
|
-
const ledgerIdentity = buildWorkspaceLedgerIdentity(workspaceDir, stateManager);
|
|
236
|
-
switch (input.taskKind) {
|
|
237
|
-
case 'dreamer':
|
|
238
|
-
return new DreamerRunner({ stateManager, runtimeAdapter, eventEmitter, artifactStore, validator: new DefaultDreamerValidator() }, runnerOptions).run(taskId);
|
|
239
|
-
case 'philosopher':
|
|
240
|
-
return new PhilosopherRunner({ stateManager, runtimeAdapter, eventEmitter, artifactStore, validator: new DefaultPhilosopherValidator() }, runnerOptions).run(taskId);
|
|
241
|
-
case 'scribe':
|
|
242
|
-
return new ScribeRunner({
|
|
243
|
-
stateManager, runtimeAdapter, eventEmitter, artifactStore,
|
|
244
|
-
validator: new DefaultScribeValidator({ requireRuleCodeContracts: true }),
|
|
245
|
-
// I2 — CHAIN STAMPING (Owner review of PR #1856, P1): 完整三元身份
|
|
246
|
-
// (resolveForCandidate / isAvailable / listForCandidate)。
|
|
247
|
-
ledgerIdentity,
|
|
248
|
-
}, runnerOptions).run(taskId);
|
|
249
|
-
case 'artificer':
|
|
250
|
-
return new ArtificerRunner({
|
|
251
|
-
stateManager, runtimeAdapter, eventEmitter, artifactStore,
|
|
252
|
-
validator: new DefaultArtificerValidator(),
|
|
253
|
-
ledgerIdentity,
|
|
254
|
-
...(input.behaviorExamplePack !== undefined ? { behaviorExamplePack: input.behaviorExamplePack } : {}),
|
|
255
|
-
...(input.trustedFacts !== undefined ? { trustedFacts: input.trustedFacts } : {}),
|
|
256
|
-
}, {
|
|
257
|
-
...runnerOptions,
|
|
258
|
-
...(input.hostSemanticContext !== undefined ? { hostSemanticContext: input.hostSemanticContext } : {}),
|
|
259
|
-
}).run(taskId);
|
|
260
|
-
case 'evaluator': {
|
|
261
|
-
const evaluatorLedgerIdentity = {
|
|
262
|
-
resolveForCandidate: ledgerIdentity.resolveForCandidate,
|
|
263
|
-
isAvailable: ledgerIdentity.isAvailable,
|
|
264
|
-
hasPrinciple: ledgerIdentity.hasPrinciple,
|
|
265
|
-
};
|
|
266
|
-
return new EvaluatorRunner({
|
|
267
|
-
stateManager,
|
|
268
|
-
runtimeAdapter,
|
|
269
|
-
eventEmitter,
|
|
270
|
-
artifactStore,
|
|
271
|
-
validator: new DefaultEvaluatorValidator(),
|
|
272
|
-
ledgerIdentity: evaluatorLedgerIdentity,
|
|
273
|
-
isRepairLoopEnabled: input.repairDeps.isRepairLoopEnabled,
|
|
274
|
-
seedArtificerRepairTask: input.repairDeps.seedArtificerRepairTask,
|
|
275
|
-
}, {
|
|
276
|
-
...runnerOptions,
|
|
277
|
-
gateDeps: input.gateDeps,
|
|
278
|
-
...(input.hostToolCatalog !== undefined
|
|
279
|
-
? { hostToolCatalog: { readOnlyTools: [...input.hostToolCatalog.readOnlyTools], writeTools: [...input.hostToolCatalog.writeTools] } }
|
|
280
|
-
: {}),
|
|
281
|
-
...(input.hostSemanticContext !== undefined ? { hostSemanticContext: input.hostSemanticContext } : {}),
|
|
282
|
-
}).run(taskId);
|
|
283
|
-
}
|
|
284
|
-
case 'rollout_reviewer':
|
|
285
|
-
return new RolloutReviewerRunner({
|
|
286
|
-
stateManager, runtimeAdapter, eventEmitter, artifactStore,
|
|
287
|
-
validator: new DefaultRolloutReviewerValidator(),
|
|
288
|
-
dispatchActivation: input.governanceDeps.dispatchActivation,
|
|
289
|
-
reopenRevisionTarget: input.governanceDeps.reopenRevisionTarget,
|
|
290
|
-
}, runnerOptions).run(taskId);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
207
|
+
// ════════════════════════════════════════════════════════════════════════════
|
|
208
|
+
// PRI-1293 Phase 2B / PRI-1301 — 共享单步 Runner 执行器已独立成模块
|
|
209
|
+
// (SPEC-PD-PIPELINE-SPINE-001 §3.5): 六种 Peer Runner 构造+执行的唯一权威
|
|
210
|
+
// 实现见 `./internalization-task-executor.js` (纯移动, 逐字等价)。
|
|
211
|
+
// 本文件保留 consumer cycle 职责 — 任务发现/选择/调度、per-kind runtime
|
|
212
|
+
// profile 解析、adapter/L2 路由、preflight、输入装配、后继提交、恢复
|
|
213
|
+
// sweep 与 reconciliation 预算; Runner 构造本体不在这里。
|
|
214
|
+
// ════════════════════════════════════════════════════════════════════════════
|
|
293
215
|
/**
|
|
294
216
|
* Run ONE bounded consumer cycle for a workspace. At most one downstream task
|
|
295
217
|
* is leased and executed per cycle (DEFAULT_CONSUMER_MAX_TASKS_PER_CYCLE=1);
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Internalization consumer governance wiring (host-neutral, PRI-624).
|
|
3
3
|
*
|
|
4
4
|
* Ported verbatim from openclaw-plugin `auto-consumer-governance-wiring.ts`
|
|
5
|
-
* (P0-D/E/F 生产接线) so the OpenClaw auto-consumer and the
|
|
6
|
-
* workspace
|
|
5
|
+
* (P0-D/E/F 生产接线) so the OpenClaw auto-consumer and the Service-Host-spawned
|
|
6
|
+
* workspace workers share ONE wiring implementation instead of copying it:
|
|
7
7
|
* - evaluator: isRepairLoopEnabled + seedArtificerRepairTask (bounded repair)
|
|
8
8
|
* - rollout_reviewer: dispatchActivation (approve_rollout → ActivationDispatcher;
|
|
9
9
|
* PRI-811 Phase B: 一律入 approvals.pending,Owner 批准后才激活) +
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* orchestrator.reopenTaskForRevision.
|
|
16
16
|
*/
|
|
17
17
|
import { type RolloutAutoDispatchInput, type RolloutAutoDispatchOutcome, type RolloutRevisionRoutingInput, type SeedArtificerRepairParams, type RuntimeStateManager, type ToolSemanticRegistry } from '@principles/core/runtime';
|
|
18
|
-
import { InternalizationOrchestrator } from '@principles/core/runtime';
|
|
18
|
+
import type { InternalizationOrchestrator } from '@principles/core/runtime';
|
|
19
19
|
/** Structural logger port — PluginLogger satisfies this without adaptation. */
|
|
20
20
|
export interface ConsumerGovernanceLogger {
|
|
21
21
|
info?: (msg: string) => void;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Internalization consumer governance wiring (host-neutral, PRI-624).
|
|
3
3
|
*
|
|
4
4
|
* Ported verbatim from openclaw-plugin `auto-consumer-governance-wiring.ts`
|
|
5
|
-
* (P0-D/E/F 生产接线) so the OpenClaw auto-consumer and the
|
|
6
|
-
* workspace
|
|
5
|
+
* (P0-D/E/F 生产接线) so the OpenClaw auto-consumer and the Service-Host-spawned
|
|
6
|
+
* workspace workers share ONE wiring implementation instead of copying it:
|
|
7
7
|
* - evaluator: isRepairLoopEnabled + seedArtificerRepairTask (bounded repair)
|
|
8
8
|
* - rollout_reviewer: dispatchActivation (approve_rollout → ActivationDispatcher;
|
|
9
9
|
* PRI-811 Phase B: 一律入 approvals.pending,Owner 批准后才激活) +
|
|
@@ -14,10 +14,7 @@
|
|
|
14
14
|
* dedupes by `${artifactId}::${channel}`; reopen idempotency is owned by
|
|
15
15
|
* orchestrator.reopenTaskForRevision.
|
|
16
16
|
*/
|
|
17
|
-
import { ActivationDispatcher, PromptWriter, DeferArchiveWriter, RuleHostWriter, SqliteConnection, SqliteActivationStateStore, SqliteApprovalQueueStore, SqlitePIArtifactStore, PrincipleTreeLedgerAdapter, createProductionGateDeps,
|
|
18
|
-
// PRI-1293 Phase 3: InternalizationOrchestrator.resolveAuthoritativeCorrelationId
|
|
19
|
-
// 静态只读包装 — 跨包访问唯一血缘权威的授权通道 (core 内部模块不进 barrel)。
|
|
20
|
-
import { InternalizationOrchestrator } from '@principles/core/runtime';
|
|
17
|
+
import { ActivationDispatcher, PromptWriter, DeferArchiveWriter, RuleHostWriter, SqliteConnection, SqliteActivationStateStore, SqliteApprovalQueueStore, SqlitePIArtifactStore, PrincipleTreeLedgerAdapter, createProductionGateDeps, createRepairTask, repairSeedErrorMessage, computeFeatureFlagsFromConfig, isFeatureEnabled, } from '@principles/core/runtime';
|
|
21
18
|
import { loadPdConfigForPlugin } from './pd-config.js';
|
|
22
19
|
function normalizeDecision(decision) {
|
|
23
20
|
if (decision.decision === 'activated') {
|
|
@@ -145,98 +142,22 @@ export function createEvaluatorRepairDeps(workspaceDir, stateManager, logger) {
|
|
|
145
142
|
return isFeatureEnabled(flags, 'evaluator_artificer_repair_loop');
|
|
146
143
|
},
|
|
147
144
|
seedArtificerRepairTask: async (params) => {
|
|
148
|
-
//
|
|
149
|
-
//
|
|
150
|
-
//
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
// corrective work, not a vehicle for new corrective work. Returning
|
|
156
|
-
// it here made the evaluator re-run against a superseded artifact
|
|
157
|
-
// forever (EP002-R2: same-artifact score oscillation, one LLM call
|
|
158
|
-
// per cycle, no new repair). New work requires a new revision epoch
|
|
159
|
-
// (Owner revise_once) — surface as a seed failure so the evaluator
|
|
160
|
-
// degrades to needs_human_review instead of looping.
|
|
161
|
-
if (existing.status === 'succeeded' || existing.status === 'failed' || existing.status === 'needs_human_review') {
|
|
162
|
-
throw new Error(`repair task ${repairTaskId} already reached terminal status ${existing.status}; refusing to reuse it as new corrective work (PRI-718 revise-ne-resume)`);
|
|
163
|
-
}
|
|
164
|
-
// PRI-1293 R7 (P1-1): 复用前完整身份验证 — 共享 core 唯一实现
|
|
165
|
-
// (verifyRepairTaskIdentity), 与 pd-cli seeder / orchestrator 完成
|
|
166
|
-
// 路径同一规则: payload 存在+来源/iteration 一致+taskId 互证+来源
|
|
167
|
-
// evaluator 真实+parent/correlation 一致+channel 一致。缺失亲缘字段
|
|
168
|
-
// 可 CAS 回填, payload 身份不符一律 fail-closed。
|
|
169
|
-
const identity = await verifyRepairTaskIdentity(existing, params.repairPayload.sourceEvaluatorTaskId, params.repairPayload.repairIteration, stateManager);
|
|
170
|
-
if (!identity.ok) {
|
|
171
|
-
throw new Error(`evaluator_repair_seed_lineage_refused:${identity.reason}:${identity.detail}`);
|
|
172
|
-
}
|
|
173
|
-
const existingPi = hydratePITaskRecord(existing);
|
|
174
|
-
if (!existingPi) {
|
|
175
|
-
throw new Error(`evaluator_repair_seed_lineage_refused:invalid_task_metadata:repair task ${repairTaskId} diagnosticJson unreadable`);
|
|
176
|
-
}
|
|
177
|
-
if (identity.needsLineageBackfill) {
|
|
178
|
-
// 旧任务缺亲缘字段 — 按权威来源补齐 ( merge 保持其余 28 字段 ),
|
|
179
|
-
// CAS 断言读取时的完整状态; 并发被触碰则放弃并结构化抛出, 下一轮
|
|
180
|
-
// seed 重试 (播种幂等, 重试安全)。
|
|
181
|
-
const merged = mergePITaskMetadata(existingPi, {
|
|
182
|
-
parentTaskId: params.repairPayload.sourceEvaluatorTaskId,
|
|
183
|
-
correlationId: identity.authoritativeCorrelationId,
|
|
184
|
-
});
|
|
185
|
-
const casResult = await stateManager.updateTaskIfDiagnosticJsonUnchanged(repairTaskId, existing.diagnosticJson ?? null, { diagnosticJson: createPITaskDiagnosticJson(merged) }, {
|
|
186
|
-
expectedStatus: existing.status,
|
|
187
|
-
expectedAttemptCount: existing.attemptCount,
|
|
188
|
-
expectedMaxAttempts: existing.maxAttempts,
|
|
189
|
-
expectedLeaseOwner: existing.leaseOwner ?? null,
|
|
190
|
-
expectedLeaseExpiresAt: existing.leaseExpiresAt ?? null,
|
|
191
|
-
expectedLeaseGeneration: existing.leaseGeneration ?? 0,
|
|
192
|
-
});
|
|
193
|
-
if (casResult === null) {
|
|
194
|
-
throw new Error(`evaluator_repair_seed_concurrent_modification: repair task ${repairTaskId} changed during lineage backfill — seed NOT applied, safe to retry`);
|
|
195
|
-
}
|
|
196
|
-
logger?.info?.(`[PD:Consumer] repair task ${repairTaskId} lineage backfilled (parentTaskId + correlationId ${identity.authoritativeCorrelationId}) before reuse`);
|
|
197
|
-
}
|
|
198
|
-
logger?.info?.(`[PD:Consumer] repair task ${repairTaskId} already exists (in-flight ${existing.status}); reusing (idempotent seed)`);
|
|
199
|
-
return repairTaskId;
|
|
145
|
+
// PRI-1299 Phase 1: 宿主层只做参数转发与既有错误语义映射; identity、
|
|
146
|
+
// reuse、payload/channel adjudication、lineage proof、insert 与 UNIQUE
|
|
147
|
+
// race re-arbitration 全部由 principles-core 的唯一 RepairCreationAuthority 执行。
|
|
148
|
+
const result = await createRepairTask(stateManager, params);
|
|
149
|
+
if (result.outcome === 'created') {
|
|
150
|
+
logger?.info?.(`[PD:Consumer] seeded artificer repair task ${result.task.taskId} (iteration ${params.repairPayload.repairIteration})`);
|
|
151
|
+
return result.task.taskId;
|
|
200
152
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
// runner 调用方传入的任何 candidateId (SeedArtificerRepairParams 本就
|
|
208
|
-
// 无此字段)。
|
|
209
|
-
const sourceEvaluatorTask = await stateManager.getTask(params.repairPayload.sourceEvaluatorTaskId);
|
|
210
|
-
if (!sourceEvaluatorTask) {
|
|
211
|
-
throw new Error(`evaluator_repair_seed_lineage_refused: source evaluator task ${params.repairPayload.sourceEvaluatorTaskId} not found`);
|
|
212
|
-
}
|
|
213
|
-
const lineage = await InternalizationOrchestrator.resolveAuthoritativeCorrelationId(sourceEvaluatorTask, (taskId) => stateManager.getTask(taskId));
|
|
214
|
-
if (!lineage.ok) {
|
|
215
|
-
throw new Error(`evaluator_repair_seed_lineage_refused:${lineage.reason}:${lineage.detail}`);
|
|
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
|
+
logger?.info?.(`[PD:Consumer] repair task ${result.task.taskId} already exists (in-flight ${result.task.status}); reusing (idempotent seed)`);
|
|
158
|
+
return result.task.taskId;
|
|
216
159
|
}
|
|
217
|
-
|
|
218
|
-
taskId: repairTaskId,
|
|
219
|
-
taskKind: 'artificer',
|
|
220
|
-
status: 'pending',
|
|
221
|
-
attemptCount: 0,
|
|
222
|
-
maxAttempts: 3,
|
|
223
|
-
diagnosticJson: createPITaskDiagnosticJson({
|
|
224
|
-
dependencyTaskIds: [...params.inheritedDependencyTaskIds],
|
|
225
|
-
channel: params.inheritedChannel,
|
|
226
|
-
pipelineMode: params.inheritedPipelineMode,
|
|
227
|
-
timeoutMs: params.inheritedTimeoutMs,
|
|
228
|
-
inputArtifactRefs: [...params.inheritedInputArtifactRefs],
|
|
229
|
-
outputArtifactRefs: [],
|
|
230
|
-
parentTaskId: params.repairPayload.sourceEvaluatorTaskId,
|
|
231
|
-
correlationId: lineage.correlationId,
|
|
232
|
-
...(params.ownerEvidenceSelection !== undefined
|
|
233
|
-
? { ownerEvidenceSelection: params.ownerEvidenceSelection }
|
|
234
|
-
: {}),
|
|
235
|
-
repairPayload: params.repairPayload,
|
|
236
|
-
}),
|
|
237
|
-
});
|
|
238
|
-
logger?.info?.(`[PD:Consumer] seeded artificer repair task ${repairTaskId} (iteration ${params.repairPayload.repairIteration}, correlationId ${lineage.correlationId}${lineage.recoveredFromLegacyRoot ? ', recovered from legacy root' : ''})`);
|
|
239
|
-
return repairTaskId;
|
|
160
|
+
throw new Error(repairSeedErrorMessage(result));
|
|
240
161
|
},
|
|
241
162
|
};
|
|
242
163
|
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PRI-1301 / PRI-1293 Phase 2B — 共享单步 Runner 执行器 (SPEC-PD-PIPELINE-SPINE-001 §3.5)
|
|
3
|
+
* (PRI-1301: 从 internalization-consumer-cycle.ts 独立成模块 — 纯移动,
|
|
4
|
+
* 执行器本体逐字等价; 周期调度/选择/lease/恢复/reconciliation 留在 cycle)。
|
|
5
|
+
*
|
|
6
|
+
* `executeSelectedInternalizationTask` 是六种 Peer Runner 构造+执行的唯一权威
|
|
7
|
+
* 实现。收编对象:consumer cycle 分支 + pd-cli
|
|
8
|
+
* `runtime-internalization-run-once` 的 6 分支手搓构造。`rulehost-pipeline-
|
|
9
|
+
* runner` 是显式同步对抗算子 (非租约编排),按 SPEC §3.5.2 白名单保留独立构造。
|
|
10
|
+
*
|
|
11
|
+
* 职责边界 (统一 Runner 执行,不统一所有宿主行为):
|
|
12
|
+
* 只负责 — kind→Runner 映射、按判别联合的类型化依赖装配、执行指定 taskId、
|
|
13
|
+
* 返回原始执行结果。
|
|
14
|
+
* 不进入 — 任务发现/选择/wake/lease (orchestrator)、Runtime Profile 解析、
|
|
15
|
+
* Adapter/L2 路由 (各入口自建 adapter 传入)、Owner Evidence Preflight
|
|
16
|
+
* (auto consumer)、repair 任务创建 (两个 governance deps 工厂)、后继提交、
|
|
17
|
+
* 周期调度、Workspace Telemetry 归属 (eventEmitter 由入口选择)。
|
|
18
|
+
*
|
|
19
|
+
* Scribe/Artificer/Evaluator 的 ledgerIdentity 从 (workspaceDir, stateManager)
|
|
20
|
+
* 以同一装配导出 — 此前 consumer 与 run-once 各自内联同一段闭包 (重复实现)。
|
|
21
|
+
* 两个入口的有意差异 (§2.5) 由输入类型表达:artificer 的 evidence pack /
|
|
22
|
+
* trustedFacts 仅由具备 preflight 能力的入口传入;evaluator 的 repair deps /
|
|
23
|
+
* gateDeps / hostToolCatalog / hostSemanticContext 必需显式提供,不存在缺省
|
|
24
|
+
* 掩盖 (类型层面不可缺失)。
|
|
25
|
+
*/
|
|
26
|
+
import { type PDRuntimeAdapter, type RuntimeStateManager, type TelemetryEvent, type PIArtifactStore, type EffectivePdConfig, type OutputLanguage, type RefinerRuleHostGateDeps, type RolloutAutoDispatchInput, type RolloutAutoDispatchOutcome, type RolloutRevisionRoutingInput, type SeedArtificerRepairParams, type BehaviorExamplePack, type ArtificerTrustedFactsPort, type ArtificerHostSemanticContext, type DreamerRunnerResult, type PhilosopherRunnerResult, type ScribeRunnerResult, type ArtificerRunnerResult, type EvaluatorRunnerResult, type EvaluatorRunnerOptions, type RolloutReviewerRunnerResult } from '@principles/core/runtime';
|
|
27
|
+
/**
|
|
28
|
+
* Runner 遥测窄端口 — 与 core `PeerRunnerTelemetryEmitter` 结构等价
|
|
29
|
+
* (该类型不在 core 冻结 barrel 上,此处按结构声明,零新增导出)。
|
|
30
|
+
* StoreEventEmitter 与 WorkspaceTelemetryEmitter 均满足。
|
|
31
|
+
*/
|
|
32
|
+
export interface SelectedTaskTelemetryEmitter {
|
|
33
|
+
readonly emitTelemetry: (event: TelemetryEvent) => unknown;
|
|
34
|
+
}
|
|
35
|
+
/** 全部 kind 共享的调用方依赖。 */
|
|
36
|
+
export interface SelectedInternalizationTaskBaseDeps {
|
|
37
|
+
/** 要执行的已**选中**任务 — 执行租约由 Runner 在 run() 内自行获取, 调用方不在本层租约。 */
|
|
38
|
+
readonly taskId: string;
|
|
39
|
+
readonly stateManager: RuntimeStateManager;
|
|
40
|
+
/** 入口自建的 runtime adapter (含 L2 / test-double 路由决策)。 */
|
|
41
|
+
readonly runtimeAdapter: PDRuntimeAdapter;
|
|
42
|
+
/** 入口选择的遥测口 (consumer evaluator 用 workspace-scoped emitter)。 */
|
|
43
|
+
readonly eventEmitter: SelectedTaskTelemetryEmitter;
|
|
44
|
+
readonly artifactStore: PIArtifactStore;
|
|
45
|
+
/** Workspace 根 — ledgerIdentity 装配的唯一事实来源。 */
|
|
46
|
+
readonly workspaceDir: string;
|
|
47
|
+
}
|
|
48
|
+
/** Runner 构造/执行选项 — 原样转发 (各入口既有语义保持)。 */
|
|
49
|
+
export interface SelectedInternalizationTaskRunnerOptions {
|
|
50
|
+
readonly owner: string;
|
|
51
|
+
readonly runtimeKind: string;
|
|
52
|
+
readonly timeoutMs: number;
|
|
53
|
+
readonly effectiveConfig?: EffectivePdConfig;
|
|
54
|
+
readonly outputLanguage?: OutputLanguage;
|
|
55
|
+
readonly pollIntervalMs?: number;
|
|
56
|
+
}
|
|
57
|
+
/** Evaluator repair 轮的宿主接线 (来自既有 governance deps 工厂,不造第三套)。 */
|
|
58
|
+
export interface SelectedEvaluatorRepairDeps {
|
|
59
|
+
readonly isRepairLoopEnabled: () => boolean;
|
|
60
|
+
readonly seedArtificerRepairTask: (params: SeedArtificerRepairParams) => Promise<string>;
|
|
61
|
+
}
|
|
62
|
+
/** rollout 治理接线 (来自 createRolloutGovernanceDeps)。 */
|
|
63
|
+
export interface SelectedRolloutGovernanceDeps {
|
|
64
|
+
readonly dispatchActivation: (input: RolloutAutoDispatchInput) => Promise<RolloutAutoDispatchOutcome>;
|
|
65
|
+
readonly reopenRevisionTarget: (input: RolloutRevisionRoutingInput) => Promise<{
|
|
66
|
+
ok: boolean;
|
|
67
|
+
reason: string;
|
|
68
|
+
reopenedTaskId?: string;
|
|
69
|
+
}>;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* 按 taskKind 收窄的判别联合输入 — 必需依赖在类型层面不可缺失;
|
|
73
|
+
* optional 仅限两个入口现状真实可选的字段 (artificer 的 evidence pack /
|
|
74
|
+
* trustedFacts / hostSemanticContext、evaluator 的宿主目录与语义投影)。
|
|
75
|
+
*/
|
|
76
|
+
export type ExecuteSelectedInternalizationTaskInput = ({
|
|
77
|
+
readonly taskKind: 'dreamer';
|
|
78
|
+
} & SelectedInternalizationTaskBaseDeps & {
|
|
79
|
+
readonly runnerOptions: SelectedInternalizationTaskRunnerOptions;
|
|
80
|
+
}) | ({
|
|
81
|
+
readonly taskKind: 'philosopher';
|
|
82
|
+
} & SelectedInternalizationTaskBaseDeps & {
|
|
83
|
+
readonly runnerOptions: SelectedInternalizationTaskRunnerOptions;
|
|
84
|
+
}) | ({
|
|
85
|
+
readonly taskKind: 'scribe';
|
|
86
|
+
} & SelectedInternalizationTaskBaseDeps & {
|
|
87
|
+
readonly runnerOptions: SelectedInternalizationTaskRunnerOptions;
|
|
88
|
+
}) | ({
|
|
89
|
+
readonly taskKind: 'artificer';
|
|
90
|
+
/** 仅 preflight 通过的入口传入 (consumer evidence ready);run-once 无此能力则缺省。 */
|
|
91
|
+
readonly behaviorExamplePack?: BehaviorExamplePack;
|
|
92
|
+
/** 仅 consumer 传入 — 与 intent preflight 同源的 trusted-facts 端口。 */
|
|
93
|
+
readonly trustedFacts?: ArtificerTrustedFactsPort;
|
|
94
|
+
readonly hostSemanticContext?: ArtificerHostSemanticContext;
|
|
95
|
+
} & SelectedInternalizationTaskBaseDeps & {
|
|
96
|
+
readonly runnerOptions: SelectedInternalizationTaskRunnerOptions;
|
|
97
|
+
}) | ({
|
|
98
|
+
readonly taskKind: 'evaluator';
|
|
99
|
+
/** repair 轮宿主接线 — 缺失即是装配错误,不允许缺省掩盖。 */
|
|
100
|
+
readonly repairDeps: SelectedEvaluatorRepairDeps;
|
|
101
|
+
/** 对抗重放 gate — 两个入口都必须显式提供各自权威解析结果。 */
|
|
102
|
+
readonly gateDeps: RefinerRuleHostGateDeps;
|
|
103
|
+
readonly hostToolCatalog?: EvaluatorRunnerOptions['hostToolCatalog'];
|
|
104
|
+
readonly hostSemanticContext?: ArtificerHostSemanticContext;
|
|
105
|
+
} & SelectedInternalizationTaskBaseDeps & {
|
|
106
|
+
readonly runnerOptions: SelectedInternalizationTaskRunnerOptions;
|
|
107
|
+
}) | ({
|
|
108
|
+
readonly taskKind: 'rollout_reviewer';
|
|
109
|
+
readonly governanceDeps: SelectedRolloutGovernanceDeps;
|
|
110
|
+
} & SelectedInternalizationTaskBaseDeps & {
|
|
111
|
+
readonly runnerOptions: SelectedInternalizationTaskRunnerOptions;
|
|
112
|
+
});
|
|
113
|
+
export type SelectedInternalizationTaskRunResult = DreamerRunnerResult | PhilosopherRunnerResult | ScribeRunnerResult | ArtificerRunnerResult | EvaluatorRunnerResult | RolloutReviewerRunnerResult;
|
|
114
|
+
/**
|
|
115
|
+
* Execute ONE selected internalization task with the kind-selected runner.
|
|
116
|
+
* Constructs the runner from the typed input and returns the raw run result.
|
|
117
|
+
*
|
|
118
|
+
* Lease ownership contract (CodeRabbit review fix): the caller is responsible
|
|
119
|
+
* for SELECTING the task (e.g. a dry-run `wakeOnce` `would_lease` candidate);
|
|
120
|
+
* the runner itself acquires the execution lease inside `run()` — callers must
|
|
121
|
+
* NOT lease at this layer. The doc previously demanded an already-leased task,
|
|
122
|
+
* which would lead new callers to acquire the lease at the wrong layer.
|
|
123
|
+
*
|
|
124
|
+
* Runner crashes propagate to the caller (each entry keeps its own crash
|
|
125
|
+
* semantics: consumer rethrows without state writes; run-once logs + rethrows).
|
|
126
|
+
*/
|
|
127
|
+
export declare function executeSelectedInternalizationTask(input: ExecuteSelectedInternalizationTaskInput): Promise<SelectedInternalizationTaskRunResult>;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PRI-1301 / PRI-1293 Phase 2B — 共享单步 Runner 执行器 (SPEC-PD-PIPELINE-SPINE-001 §3.5)
|
|
3
|
+
* (PRI-1301: 从 internalization-consumer-cycle.ts 独立成模块 — 纯移动,
|
|
4
|
+
* 执行器本体逐字等价; 周期调度/选择/lease/恢复/reconciliation 留在 cycle)。
|
|
5
|
+
*
|
|
6
|
+
* `executeSelectedInternalizationTask` 是六种 Peer Runner 构造+执行的唯一权威
|
|
7
|
+
* 实现。收编对象:consumer cycle 分支 + pd-cli
|
|
8
|
+
* `runtime-internalization-run-once` 的 6 分支手搓构造。`rulehost-pipeline-
|
|
9
|
+
* runner` 是显式同步对抗算子 (非租约编排),按 SPEC §3.5.2 白名单保留独立构造。
|
|
10
|
+
*
|
|
11
|
+
* 职责边界 (统一 Runner 执行,不统一所有宿主行为):
|
|
12
|
+
* 只负责 — kind→Runner 映射、按判别联合的类型化依赖装配、执行指定 taskId、
|
|
13
|
+
* 返回原始执行结果。
|
|
14
|
+
* 不进入 — 任务发现/选择/wake/lease (orchestrator)、Runtime Profile 解析、
|
|
15
|
+
* Adapter/L2 路由 (各入口自建 adapter 传入)、Owner Evidence Preflight
|
|
16
|
+
* (auto consumer)、repair 任务创建 (两个 governance deps 工厂)、后继提交、
|
|
17
|
+
* 周期调度、Workspace Telemetry 归属 (eventEmitter 由入口选择)。
|
|
18
|
+
*
|
|
19
|
+
* Scribe/Artificer/Evaluator 的 ledgerIdentity 从 (workspaceDir, stateManager)
|
|
20
|
+
* 以同一装配导出 — 此前 consumer 与 run-once 各自内联同一段闭包 (重复实现)。
|
|
21
|
+
* 两个入口的有意差异 (§2.5) 由输入类型表达:artificer 的 evidence pack /
|
|
22
|
+
* trustedFacts 仅由具备 preflight 能力的入口传入;evaluator 的 repair deps /
|
|
23
|
+
* gateDeps / hostToolCatalog / hostSemanticContext 必需显式提供,不存在缺省
|
|
24
|
+
* 掩盖 (类型层面不可缺失)。
|
|
25
|
+
*/
|
|
26
|
+
import { DreamerRunner, PhilosopherRunner, ScribeRunner, ArtificerRunner, EvaluatorRunner, RolloutReviewerRunner, DefaultDreamerValidator, DefaultPhilosopherValidator, DefaultScribeValidator, DefaultArtificerValidator, DefaultEvaluatorValidator, DefaultRolloutReviewerValidator, PrincipleTreeLedgerAdapter, } from '@principles/core/runtime';
|
|
27
|
+
/**
|
|
28
|
+
* Scribe/Artificer/Evaluator 共用的 ledger 身份装配 — 与两个入口此前内联的
|
|
29
|
+
* 闭包逐字等价 (每次调用新开 PrincipleTreeLedgerAdapter 读盘,无跨周期缓存)。
|
|
30
|
+
*/
|
|
31
|
+
function buildWorkspaceLedgerIdentity(workspaceDir, stateManager) {
|
|
32
|
+
const ledger = () => new PrincipleTreeLedgerAdapter({ stateDir: `${workspaceDir}/.state` });
|
|
33
|
+
return {
|
|
34
|
+
resolveForCandidate: async (candidateId) => {
|
|
35
|
+
const candidate = await stateManager.getCandidate(candidateId);
|
|
36
|
+
return ledger().resolveCandidatePrincipleIdentity(candidateId, candidate?.rawRecommendationKind);
|
|
37
|
+
},
|
|
38
|
+
// PRI-915: availability first — an unreadable ledger must not read as an
|
|
39
|
+
// unresolved chain.
|
|
40
|
+
isAvailable: () => ledger().isAvailable(),
|
|
41
|
+
listForCandidate: (candidateId) => ledger().listForCandidate(candidateId),
|
|
42
|
+
hasPrinciple: (principleId) => ledger().hasPrinciple(principleId),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Execute ONE selected internalization task with the kind-selected runner.
|
|
47
|
+
* Constructs the runner from the typed input and returns the raw run result.
|
|
48
|
+
*
|
|
49
|
+
* Lease ownership contract (CodeRabbit review fix): the caller is responsible
|
|
50
|
+
* for SELECTING the task (e.g. a dry-run `wakeOnce` `would_lease` candidate);
|
|
51
|
+
* the runner itself acquires the execution lease inside `run()` — callers must
|
|
52
|
+
* NOT lease at this layer. The doc previously demanded an already-leased task,
|
|
53
|
+
* which would lead new callers to acquire the lease at the wrong layer.
|
|
54
|
+
*
|
|
55
|
+
* Runner crashes propagate to the caller (each entry keeps its own crash
|
|
56
|
+
* semantics: consumer rethrows without state writes; run-once logs + rethrows).
|
|
57
|
+
*/
|
|
58
|
+
export async function executeSelectedInternalizationTask(input) {
|
|
59
|
+
const { taskId, stateManager, runtimeAdapter, eventEmitter, artifactStore, workspaceDir } = input;
|
|
60
|
+
const { runnerOptions } = input;
|
|
61
|
+
// Evaluator 的身份装配含 hasPrinciple (PRI-911A writer boundary);
|
|
62
|
+
// Scribe 另需 listForCandidate (chain stamping);Artificer 只读解析。
|
|
63
|
+
// 一次装配、按 kind 结构化满足各自 deps 形状。
|
|
64
|
+
const ledgerIdentity = buildWorkspaceLedgerIdentity(workspaceDir, stateManager);
|
|
65
|
+
switch (input.taskKind) {
|
|
66
|
+
case 'dreamer':
|
|
67
|
+
return new DreamerRunner({ stateManager, runtimeAdapter, eventEmitter, artifactStore, validator: new DefaultDreamerValidator() }, runnerOptions).run(taskId);
|
|
68
|
+
case 'philosopher':
|
|
69
|
+
return new PhilosopherRunner({ stateManager, runtimeAdapter, eventEmitter, artifactStore, validator: new DefaultPhilosopherValidator() }, runnerOptions).run(taskId);
|
|
70
|
+
case 'scribe':
|
|
71
|
+
return new ScribeRunner({
|
|
72
|
+
stateManager, runtimeAdapter, eventEmitter, artifactStore,
|
|
73
|
+
validator: new DefaultScribeValidator({ requireRuleCodeContracts: true }),
|
|
74
|
+
// I2 — CHAIN STAMPING (Owner review of PR #1856, P1): 完整三元身份
|
|
75
|
+
// (resolveForCandidate / isAvailable / listForCandidate)。
|
|
76
|
+
ledgerIdentity,
|
|
77
|
+
}, runnerOptions).run(taskId);
|
|
78
|
+
case 'artificer':
|
|
79
|
+
return new ArtificerRunner({
|
|
80
|
+
stateManager, runtimeAdapter, eventEmitter, artifactStore,
|
|
81
|
+
validator: new DefaultArtificerValidator(),
|
|
82
|
+
ledgerIdentity,
|
|
83
|
+
...(input.behaviorExamplePack !== undefined ? { behaviorExamplePack: input.behaviorExamplePack } : {}),
|
|
84
|
+
...(input.trustedFacts !== undefined ? { trustedFacts: input.trustedFacts } : {}),
|
|
85
|
+
}, {
|
|
86
|
+
...runnerOptions,
|
|
87
|
+
...(input.hostSemanticContext !== undefined ? { hostSemanticContext: input.hostSemanticContext } : {}),
|
|
88
|
+
}).run(taskId);
|
|
89
|
+
case 'evaluator': {
|
|
90
|
+
const evaluatorLedgerIdentity = {
|
|
91
|
+
resolveForCandidate: ledgerIdentity.resolveForCandidate,
|
|
92
|
+
isAvailable: ledgerIdentity.isAvailable,
|
|
93
|
+
hasPrinciple: ledgerIdentity.hasPrinciple,
|
|
94
|
+
};
|
|
95
|
+
return new EvaluatorRunner({
|
|
96
|
+
stateManager,
|
|
97
|
+
runtimeAdapter,
|
|
98
|
+
eventEmitter,
|
|
99
|
+
artifactStore,
|
|
100
|
+
validator: new DefaultEvaluatorValidator(),
|
|
101
|
+
ledgerIdentity: evaluatorLedgerIdentity,
|
|
102
|
+
isRepairLoopEnabled: input.repairDeps.isRepairLoopEnabled,
|
|
103
|
+
seedArtificerRepairTask: input.repairDeps.seedArtificerRepairTask,
|
|
104
|
+
}, {
|
|
105
|
+
...runnerOptions,
|
|
106
|
+
gateDeps: input.gateDeps,
|
|
107
|
+
...(input.hostToolCatalog !== undefined
|
|
108
|
+
? { hostToolCatalog: { readOnlyTools: [...input.hostToolCatalog.readOnlyTools], writeTools: [...input.hostToolCatalog.writeTools] } }
|
|
109
|
+
: {}),
|
|
110
|
+
...(input.hostSemanticContext !== undefined ? { hostSemanticContext: input.hostSemanticContext } : {}),
|
|
111
|
+
}).run(taskId);
|
|
112
|
+
}
|
|
113
|
+
case 'rollout_reviewer':
|
|
114
|
+
return new RolloutReviewerRunner({
|
|
115
|
+
stateManager, runtimeAdapter, eventEmitter, artifactStore,
|
|
116
|
+
validator: new DefaultRolloutReviewerValidator(),
|
|
117
|
+
dispatchActivation: input.governanceDeps.dispatchActivation,
|
|
118
|
+
reopenRevisionTarget: input.governanceDeps.reopenRevisionTarget,
|
|
119
|
+
}, runnerOptions).run(taskId);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -8,9 +8,12 @@
|
|
|
8
8
|
* (SPEC workbuddy-host-adapter §1 Excluded: no transcript reads).
|
|
9
9
|
*
|
|
10
10
|
* SPEC §15 worker mode, evaluated WITHOUT executing anything (no lease, no
|
|
11
|
-
* LLM). `manual_action_required` means
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* LLM). `manual_action_required` means this governance workspace is not
|
|
12
|
+
* registered in the canonical install manifest, so the PD Service Host —
|
|
13
|
+
* the only background runtime, triggered by the OS scheduler — never
|
|
14
|
+
* discovers it and no automatic worker cycles run for it. Manual
|
|
15
|
+
* `pd diagnose` / `pd runtime internalization run-once` is the recovery
|
|
16
|
+
* route.
|
|
14
17
|
*/
|
|
15
18
|
export type WorkbuddyWorkerMode = 'ready' | 'manual_action_required' | 'paused' | 'degraded';
|
|
16
19
|
export interface WorkbuddyWorkerStatusEvaluation {
|
|
@@ -8,9 +8,12 @@
|
|
|
8
8
|
* (SPEC workbuddy-host-adapter §1 Excluded: no transcript reads).
|
|
9
9
|
*
|
|
10
10
|
* SPEC §15 worker mode, evaluated WITHOUT executing anything (no lease, no
|
|
11
|
-
* LLM). `manual_action_required` means
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* LLM). `manual_action_required` means this governance workspace is not
|
|
12
|
+
* registered in the canonical install manifest, so the PD Service Host —
|
|
13
|
+
* the only background runtime, triggered by the OS scheduler — never
|
|
14
|
+
* discovers it and no automatic worker cycles run for it. Manual
|
|
15
|
+
* `pd diagnose` / `pd runtime internalization run-once` is the recovery
|
|
16
|
+
* route.
|
|
14
17
|
*/
|
|
15
18
|
import * as fs from 'node:fs';
|
|
16
19
|
import * as path from 'node:path';
|
|
@@ -48,7 +51,7 @@ export function computeWorkbuddyWorkerStatusMode(input) {
|
|
|
48
51
|
return {
|
|
49
52
|
mode: 'manual_action_required',
|
|
50
53
|
reason: 'workspace_not_in_install_manifest',
|
|
51
|
-
nextAction: `
|
|
54
|
+
nextAction: `This governance workspace is not registered in the canonical install manifest, so the PD Service Host does not manage automatic worker cycles for it. Repair the registration with the PD installer (npx create-principles-disciple). Manual path: pd diagnose --workspace "${workspaceDir}", then pd runtime internalization run-once.`,
|
|
52
55
|
};
|
|
53
56
|
}
|
|
54
57
|
return { mode: 'ready' };
|
|
@@ -52,7 +52,7 @@ import { StoreEventEmitter } from '@principles/core/runtime';
|
|
|
52
52
|
* 事件,含完整 TelemetryEvent)。同步 append:事件量小(allowlist 限流),
|
|
53
53
|
* 换取 crash 前落盘的 durable 语义。写失败绝不影响 runner —— 降级为
|
|
54
54
|
* `onPersistFailure` 回调(宿主注入的结构化告警口;OpenClaw 是
|
|
55
|
-
* SystemLogger,
|
|
55
|
+
* SystemLogger,Service-Host 派生的 workspace worker 是自己的事件口)。
|
|
56
56
|
*/
|
|
57
57
|
const CRITICAL_EVENT_ALLOWLIST = new Set([
|
|
58
58
|
'evaluator_adversarial_replay_skipped',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@principles/host-runtime",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.1",
|
|
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,8 +39,8 @@
|
|
|
39
39
|
"lint": "eslint \"src/**/*.ts\""
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@principles/core": "^8.
|
|
43
|
-
"@principles/install-layout": "^0.
|
|
42
|
+
"@principles/core": "^8.4.1",
|
|
43
|
+
"@principles/install-layout": "^0.12.0",
|
|
44
44
|
"better-sqlite3": "^13.0.3",
|
|
45
45
|
"js-yaml": "^5.4.3"
|
|
46
46
|
},
|
|
@@ -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": "ff62137821c993773cc7df104a01625310776c51"
|
|
61
61
|
}
|