@openclawbrain/openclaw 0.3.2 → 0.3.3
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/README.md +0 -1
- package/dist/extension/index.js +17 -1
- package/dist/extension/index.js.map +1 -1
- package/dist/src/attachment-truth.d.ts +34 -0
- package/dist/src/attachment-truth.js +215 -0
- package/dist/src/attachment-truth.js.map +1 -0
- package/dist/src/cli.js +428 -42
- package/dist/src/cli.js.map +1 -1
- package/dist/src/index.d.ts +25 -1
- package/dist/src/index.js +138 -50
- package/dist/src/index.js.map +1 -1
- package/dist/src/openclaw-hook-truth.d.ts +25 -0
- package/dist/src/openclaw-hook-truth.js +154 -0
- package/dist/src/openclaw-hook-truth.js.map +1 -0
- package/extension/index.ts +19 -1
- package/package.json +7 -7
package/dist/src/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type CompileSelectionMode } from "@openclawbrain/compiler";
|
|
2
|
-
import { CONTRACT_IDS, type ArtifactManifestV1, type ActivationPointerRecordV1, type ActivationPointerSlot, type RuntimeTurnBrainAttachmentPolicyV1, type ContextCompactionMode, type ContextContributionEvidenceStateV1, type CurrentProfileBrainStatusAnswerV1, type CurrentProfileActivationStateV1, type CurrentProfilePassiveLearningDeltaSummaryV1, type CurrentProfilePassiveLearningWatchStateV1, type BrainServeHotPathTimingV1, type CurrentProfileStructuralDecisionV1, type FeedbackEventKind, type PackGraphConnectDiagnosticsV1, type PackGraphEvolutionV1, type EventSemanticSurfaceV1, type FeedbackEventV1, type KernelSurfaceValidationResultV1, type LearningBootProfile, type LearningCadence, type LearningScanPolicy, type InteractionEventV1, type NormalizedEventExportV1, type NormalizedEventV1, type PrincipalPriorityClassV1, type PrincipalRoleV1, type RouteMode, type RuntimeCompileResponseV1, type RuntimeCompileStructuralSignalsV1, type RuntimeCompileTargetV1, type RuntimeGraphPlasticityStateV1, type RuntimePlasticitySourceV1, type SparseFeedbackPolicyV1, type TeacherAuthorityV1, type TeacherSupervisionArtifactV1, type WorkspaceInjectionSurfaceV1 } from "@openclawbrain/contracts";
|
|
2
|
+
import { CONTRACT_IDS, type ArtifactManifestV1, type ActivationPointerRecordV1, type ActivationPointerSlot, type RuntimeTurnBrainAttachmentPolicyV1, type ContextCompactionMode, type ContextContributionEvidenceStateV1, type CurrentProfileBrainStatusAnswerV1, type CurrentProfileActivationStateV1, type CurrentProfilePassiveLearningDeltaSummaryV1, type CurrentProfilePassiveLearningWatchStateV1, type CurrentProfileAttachmentStateV1, type CurrentProfileAttachmentProofStateV1, type CurrentProfileHookInstallStateV1, type CurrentProfileHookLoadabilityV1, type CurrentProfileHookLoadProofV1, type BrainServeHotPathTimingV1, type CurrentProfileStructuralDecisionV1, type FeedbackEventKind, type PackGraphConnectDiagnosticsV1, type PackGraphEvolutionV1, type EventSemanticSurfaceV1, type FeedbackEventV1, type KernelSurfaceValidationResultV1, type LearningBootProfile, type LearningCadence, type LearningScanPolicy, type InteractionEventV1, type NormalizedEventExportV1, type NormalizedEventV1, type PrincipalPriorityClassV1, type PrincipalRoleV1, type RouteMode, type RuntimeCompileResponseV1, type RuntimeCompileStructuralSignalsV1, type RuntimeCompileTargetV1, type RuntimeGraphPlasticityStateV1, type RuntimePlasticitySourceV1, type SparseFeedbackPolicyV1, type TeacherAuthorityV1, type TeacherSupervisionArtifactV1, type WorkspaceInjectionSurfaceV1 } from "@openclawbrain/contracts";
|
|
3
3
|
import { type EventExportLaneV1 } from "@openclawbrain/event-export";
|
|
4
4
|
import { type AdvanceAlwaysOnLearningRuntimeInput, type AlwaysOnLearningCadenceV1, type AlwaysOnLearningMaterializationJobV1, type AlwaysOnLearningRuntimePlanV1, type AlwaysOnLearningRuntimeStateV1, type BaselineStateV1, type PendingPrincipalEventV1, type PrincipalLearningCheckpointV1 } from "@openclawbrain/learner";
|
|
5
5
|
import { type ActivationInspection, type ActivationObservabilityReport, type GraphEvolutionLogV1, type LearningSpineServeRouteBreadcrumbsV1, type ActivationSlotInspection, type InitHandoffState, type LearningSpineServeRouteDecisionLogEntryV1 } from "@openclawbrain/pack-format";
|
|
6
|
+
export { clearOpenClawProfileRuntimeLoadProof, listOpenClawProfileRuntimeLoadProofs, recordOpenClawProfileRuntimeLoadProof, resolveAttachmentRuntimeLoadProofsPath, type OpenClawProfileRuntimeLoadProofRecordV1, type OpenClawProfileRuntimeLoadProofSetV1, type OpenClawProfileRuntimeLoadProofsV1 } from "./attachment-truth.js";
|
|
6
7
|
import { type AsyncTeacherLabelerConfigV1 } from "./teacher-labeler.js";
|
|
7
8
|
export { createHttpOllamaTeacherLabelerClient, createOllamaTeacherLabeler, createTeacherLabeler, type AsyncTeacherLabelerConfigV1, type AsyncTeacherNoopLabelerConfigV1, type AsyncTeacherOllamaLabelerConfigV1, type OllamaTeacherLabelerClient, type TeacherLabeler, type TeacherLabelerResultV1, type TeacherLabelerRunInputV1 } from "./teacher-labeler.js";
|
|
8
9
|
export declare const DEFAULT_ASYNC_TEACHER_QUEUE_CAPACITY = 8;
|
|
@@ -1298,6 +1299,7 @@ export type OperatorBrainState = InitHandoffState | "no_active_pack";
|
|
|
1298
1299
|
export type OperatorServePathState = "serving_active_pack" | "fail_open_static_context" | "hard_fail" | "unprobed";
|
|
1299
1300
|
export interface OperatorSurfaceInput {
|
|
1300
1301
|
activationRoot: string;
|
|
1302
|
+
openclawHome?: string | null;
|
|
1301
1303
|
updatedAt?: string | null;
|
|
1302
1304
|
eventExportPath?: string | null;
|
|
1303
1305
|
teacherSnapshotPath?: string | null;
|
|
@@ -1556,6 +1558,26 @@ export interface OperatorRouteFnFreshnessSummary {
|
|
|
1556
1558
|
lastDecisionUsedLearnedRouteFn: boolean | null;
|
|
1557
1559
|
detail: string;
|
|
1558
1560
|
}
|
|
1561
|
+
interface OperatorHookSummary {
|
|
1562
|
+
scope: "exact_openclaw_home" | "activation_root_only";
|
|
1563
|
+
openclawHome: string | null;
|
|
1564
|
+
hookPath: string | null;
|
|
1565
|
+
runtimeGuardPath: string | null;
|
|
1566
|
+
manifestPath: string | null;
|
|
1567
|
+
installState: CurrentProfileHookInstallStateV1;
|
|
1568
|
+
loadability: CurrentProfileHookLoadabilityV1;
|
|
1569
|
+
loadProof: CurrentProfileHookLoadProofV1;
|
|
1570
|
+
desynced: boolean;
|
|
1571
|
+
detail: string;
|
|
1572
|
+
}
|
|
1573
|
+
interface OperatorAttachmentTruthSummary {
|
|
1574
|
+
state: CurrentProfileAttachmentStateV1;
|
|
1575
|
+
proofState: CurrentProfileAttachmentProofStateV1;
|
|
1576
|
+
watchOnly: boolean;
|
|
1577
|
+
activationRoot: string | null;
|
|
1578
|
+
servingSlot: "active" | "none";
|
|
1579
|
+
detail: string;
|
|
1580
|
+
}
|
|
1559
1581
|
interface OperatorManyProfileSupportSummary {
|
|
1560
1582
|
operatorSurface: "current_profile_only";
|
|
1561
1583
|
declaredAttachmentPolicy: RuntimeTurnBrainAttachmentPolicyV1;
|
|
@@ -1621,6 +1643,8 @@ interface OperatorSurfaceReport {
|
|
|
1621
1643
|
learning: OperatorLearningSummary;
|
|
1622
1644
|
teacherLoop: OperatorTeacherLoopSummary;
|
|
1623
1645
|
routeFn: OperatorRouteFnFreshnessSummary;
|
|
1646
|
+
hook: OperatorHookSummary;
|
|
1647
|
+
attachmentTruth: OperatorAttachmentTruthSummary;
|
|
1624
1648
|
principal: OperatorPrincipalObservabilitySummary;
|
|
1625
1649
|
manyProfile: OperatorManyProfileSupportSummary;
|
|
1626
1650
|
findings: OperatorDoctorFinding[];
|
package/dist/src/index.js
CHANGED
|
@@ -7,8 +7,10 @@ import { CONTRACT_IDS, buildEventSemanticSurface, buildNormalizedEventExport, ca
|
|
|
7
7
|
import { classifyFeedbackSignalContent, describeNormalizedEventExportObservability } from "@openclawbrain/event-export";
|
|
8
8
|
import { DEFAULT_TEACHER_SUPERVISION_STALE_AFTER_MS, advanceAlwaysOnLearningRuntime, buildTeacherSupervisionArtifactsFromNormalizedEventExport, createAlwaysOnLearningRuntimeState, describeAlwaysOnLearningRuntimeState, materializeAlwaysOnLearningCandidatePack, materializeCandidatePackFromNormalizedEventExport } from "@openclawbrain/learner";
|
|
9
9
|
import { LEARNING_SPINE_LOG_LAYOUT, activatePack, describeActivationObservability, describeActivationTarget, describePackCompileTarget, inspectActivationState, loadPackFromActivation, promoteCandidatePack, readLearningSpineLogEntries, rollbackActivePack, stageCandidatePack } from "@openclawbrain/pack-format";
|
|
10
|
+
import { inspectOpenClawBrainHookStatus, summarizeOpenClawBrainHookLoad } from "./openclaw-hook-truth.js";
|
|
10
11
|
import { appendLearningUpdateLogs, appendServeTimeRouteDecisionLog } from "./learning-spine.js";
|
|
11
12
|
import { buildFeedbackSemanticMetadata, buildInteractionSemanticMetadata } from "./semantic-metadata.js";
|
|
13
|
+
export { clearOpenClawProfileRuntimeLoadProof, listOpenClawProfileRuntimeLoadProofs, recordOpenClawProfileRuntimeLoadProof, resolveAttachmentRuntimeLoadProofsPath } from "./attachment-truth.js";
|
|
12
14
|
import { createTeacherLabeler } from "./teacher-labeler.js";
|
|
13
15
|
export { createHttpOllamaTeacherLabelerClient, createOllamaTeacherLabeler, createTeacherLabeler } from "./teacher-labeler.js";
|
|
14
16
|
const DEFAULT_AGENT_ID = "openclaw-runtime";
|
|
@@ -6128,6 +6130,18 @@ function buildOperatorFindings(report) {
|
|
|
6128
6130
|
const push = (severity, code, summary, detail) => {
|
|
6129
6131
|
findings.push({ severity, code, summary, detail });
|
|
6130
6132
|
};
|
|
6133
|
+
if (report.hook.desynced) {
|
|
6134
|
+
push("fail", "hook_desynced", "profile hook is blocked by OpenClaw config desync", report.hook.detail);
|
|
6135
|
+
}
|
|
6136
|
+
else if (report.attachmentTruth.state === "not_attached") {
|
|
6137
|
+
push("fail", "current_profile_not_attached", "current profile is not attached", report.attachmentTruth.detail);
|
|
6138
|
+
}
|
|
6139
|
+
else if (report.attachmentTruth.state === "unknown") {
|
|
6140
|
+
push("warn", "attachment_scope_partial", "current-profile attachment is not self-proven", report.attachmentTruth.detail);
|
|
6141
|
+
}
|
|
6142
|
+
else {
|
|
6143
|
+
push("pass", "current_profile_attached", "current profile hook is present", report.attachmentTruth.detail);
|
|
6144
|
+
}
|
|
6131
6145
|
if (report.activation.state === "broken_install") {
|
|
6132
6146
|
push("fail", "activation_broken_install", "activation root is broken", report.activation.detail);
|
|
6133
6147
|
}
|
|
@@ -6338,6 +6352,46 @@ function summarizeCurrentProfilePassiveLearning(report, activePackId) {
|
|
|
6338
6352
|
detail
|
|
6339
6353
|
};
|
|
6340
6354
|
}
|
|
6355
|
+
function summarizeOperatorHook(report) {
|
|
6356
|
+
return summarizeOpenClawBrainHookLoad(inspectOpenClawBrainHookStatus(report.openclawHome ?? null), report.servePath.state === "serving_active_pack");
|
|
6357
|
+
}
|
|
6358
|
+
function summarizeOperatorAttachmentTruth(report) {
|
|
6359
|
+
const watchOnly = report.active !== null || report.teacherLoop.watchState !== "not_visible";
|
|
6360
|
+
if (report.hook.scope === "exact_openclaw_home") {
|
|
6361
|
+
if (report.hook.installState === "not_installed") {
|
|
6362
|
+
return {
|
|
6363
|
+
state: "not_attached",
|
|
6364
|
+
proofState: "self_proving",
|
|
6365
|
+
watchOnly,
|
|
6366
|
+
activationRoot: null,
|
|
6367
|
+
servingSlot: "none",
|
|
6368
|
+
detail: watchOnly
|
|
6369
|
+
? "the selected OpenClaw home has no OpenClawBrain hook, even though this activation root still shows serve/watch activity"
|
|
6370
|
+
: "the selected OpenClaw home has no OpenClawBrain hook"
|
|
6371
|
+
};
|
|
6372
|
+
}
|
|
6373
|
+
return {
|
|
6374
|
+
state: "attached",
|
|
6375
|
+
proofState: "self_proving",
|
|
6376
|
+
watchOnly: false,
|
|
6377
|
+
activationRoot: report.activationRoot,
|
|
6378
|
+
servingSlot: report.active === null ? "none" : "active",
|
|
6379
|
+
detail: report.hook.installState === "blocked_by_allowlist"
|
|
6380
|
+
? "current profile hook files exist, but OpenClaw will not load them until the plugin allowlist/config desync is repaired"
|
|
6381
|
+
: "current profile hook is present on the selected OpenClaw home"
|
|
6382
|
+
};
|
|
6383
|
+
}
|
|
6384
|
+
return {
|
|
6385
|
+
state: "unknown",
|
|
6386
|
+
proofState: "activation_root_only",
|
|
6387
|
+
watchOnly,
|
|
6388
|
+
activationRoot: watchOnly ? report.activationRoot : null,
|
|
6389
|
+
servingSlot: report.active === null ? "none" : "active",
|
|
6390
|
+
detail: watchOnly
|
|
6391
|
+
? "activation-root-only status can see this root serving and/or being watched, but it does not prove that the current profile is attached"
|
|
6392
|
+
: "activation-root-only status cannot prove whether the current profile is attached"
|
|
6393
|
+
};
|
|
6394
|
+
}
|
|
6341
6395
|
function summarizeCurrentProfileBrainSummary(input) {
|
|
6342
6396
|
const packId = input.activePackId ?? "unknown";
|
|
6343
6397
|
if (input.activationState === "broken_install") {
|
|
@@ -6346,9 +6400,17 @@ function summarizeCurrentProfileBrainSummary(input) {
|
|
|
6346
6400
|
if (input.activationState === "stale_incomplete") {
|
|
6347
6401
|
return "Brain activation has retained stale/incomplete state and no serving active pack.";
|
|
6348
6402
|
}
|
|
6349
|
-
if (
|
|
6403
|
+
if (input.attachmentState === "not_attached") {
|
|
6350
6404
|
return "Brain is not attached to the current Profile.";
|
|
6351
6405
|
}
|
|
6406
|
+
if (input.hookDesynced) {
|
|
6407
|
+
return "Brain hook files exist, but OpenClaw config currently blocks them from loading.";
|
|
6408
|
+
}
|
|
6409
|
+
if (input.attachmentState === "unknown") {
|
|
6410
|
+
return input.watchOnly
|
|
6411
|
+
? "This activation root is visible, but current-profile attachment is only watch/serve scoped and not self-proven."
|
|
6412
|
+
: "Current-profile attachment is unknown because this read is activation-root-only.";
|
|
6413
|
+
}
|
|
6352
6414
|
if (input.serveState === "fail_open_static_context") {
|
|
6353
6415
|
return "Brain is attached but would fail open to static context.";
|
|
6354
6416
|
}
|
|
@@ -6367,19 +6429,19 @@ function summarizeCurrentProfileBrainSummary(input) {
|
|
|
6367
6429
|
return "Brain is attached but has not been compile-probed yet.";
|
|
6368
6430
|
}
|
|
6369
6431
|
function summarizeCurrentProfileBrainStatusLevel(input) {
|
|
6370
|
-
if (
|
|
6432
|
+
if (input.hookDesynced || input.attachmentState === "not_attached") {
|
|
6371
6433
|
return "fail";
|
|
6372
6434
|
}
|
|
6373
6435
|
if (input.serveState === "fail_open_static_context" || input.serveState === "hard_fail") {
|
|
6374
6436
|
return "fail";
|
|
6375
6437
|
}
|
|
6376
|
-
if (input.awaitingFirstExport || input.serveState === "unprobed") {
|
|
6438
|
+
if (input.attachmentState === "unknown" || input.awaitingFirstExport || input.serveState === "unprobed") {
|
|
6377
6439
|
return "warn";
|
|
6378
6440
|
}
|
|
6379
6441
|
return input.routeFreshness === "updated" ? "ok" : "warn";
|
|
6380
6442
|
}
|
|
6381
6443
|
function buildCurrentProfileTurnAttributionFromReport(report, policyMode, profileId) {
|
|
6382
|
-
if (report.servePath.state === "unprobed") {
|
|
6444
|
+
if (report.servePath.state === "unprobed" || report.attachmentTruth.state !== "attached") {
|
|
6383
6445
|
return null;
|
|
6384
6446
|
}
|
|
6385
6447
|
const brainStatus = report.servePath.state;
|
|
@@ -6458,7 +6520,7 @@ function buildCurrentProfileTurnAttributionFromReport(report, policyMode, profil
|
|
|
6458
6520
|
};
|
|
6459
6521
|
}
|
|
6460
6522
|
function buildCurrentProfileBrainStatusFromReport(report, policyMode, profileId) {
|
|
6461
|
-
const
|
|
6523
|
+
const attachmentState = report.attachmentTruth.state;
|
|
6462
6524
|
const awaitingFirstExport = isAwaitingFirstExportSlot(report.active);
|
|
6463
6525
|
const activationState = report.activation.state;
|
|
6464
6526
|
const routerIdentity = report.servePath.routerIdentity ?? report.learnedRouting.routerIdentity ?? report.active?.routerIdentity ?? null;
|
|
@@ -6468,7 +6530,8 @@ function buildCurrentProfileBrainStatusFromReport(report, policyMode, profileId)
|
|
|
6468
6530
|
const activePackId = report.brain.activePackId ?? report.servePath.activePackId ?? report.active?.packId ?? null;
|
|
6469
6531
|
const passiveLearning = summarizeCurrentProfilePassiveLearning(report, activePackId);
|
|
6470
6532
|
const status = summarizeCurrentProfileBrainStatusLevel({
|
|
6471
|
-
|
|
6533
|
+
attachmentState,
|
|
6534
|
+
hookDesynced: report.hook.desynced,
|
|
6472
6535
|
serveState: report.servePath.state,
|
|
6473
6536
|
routeFreshness,
|
|
6474
6537
|
awaitingFirstExport
|
|
@@ -6485,13 +6548,15 @@ function buildCurrentProfileBrainStatusFromReport(report, policyMode, profileId)
|
|
|
6485
6548
|
noun: "Profile",
|
|
6486
6549
|
selector: "current_profile",
|
|
6487
6550
|
profileId,
|
|
6488
|
-
detail: attached
|
|
6489
|
-
? "The Host resolves the current Profile through the active Attachment boundary
|
|
6490
|
-
:
|
|
6551
|
+
detail: attachmentState === "attached"
|
|
6552
|
+
? "The Host resolves the current Profile through the selected OpenClaw home and its active Attachment boundary."
|
|
6553
|
+
: attachmentState === "not_attached"
|
|
6554
|
+
? "The selected OpenClaw home has no OpenClawBrain hook for the current Profile."
|
|
6555
|
+
: "This read is activation-root-only, so current-profile attachment is not self-proven."
|
|
6491
6556
|
},
|
|
6492
6557
|
brain: {
|
|
6493
6558
|
noun: "Brain",
|
|
6494
|
-
activationRoot:
|
|
6559
|
+
activationRoot: attachmentState === "not_attached" ? null : report.activationRoot,
|
|
6495
6560
|
logRoot: summarizeCurrentProfileLogRoot(report.activationRoot),
|
|
6496
6561
|
activePackId,
|
|
6497
6562
|
initMode: report.learnedRouting.initMode,
|
|
@@ -6504,7 +6569,9 @@ function buildCurrentProfileBrainStatusFromReport(report, policyMode, profileId)
|
|
|
6504
6569
|
lastPromotionAt: report.promotion.lastPromotion.at,
|
|
6505
6570
|
summary: summarizeCurrentProfileBrainSummary({
|
|
6506
6571
|
activationState,
|
|
6507
|
-
|
|
6572
|
+
attachmentState,
|
|
6573
|
+
watchOnly: report.attachmentTruth.watchOnly,
|
|
6574
|
+
hookDesynced: report.hook.desynced,
|
|
6508
6575
|
serveState: report.servePath.state,
|
|
6509
6576
|
brainState: report.brain.state,
|
|
6510
6577
|
awaitingFirstExport,
|
|
@@ -6515,29 +6582,30 @@ function buildCurrentProfileBrainStatusFromReport(report, policyMode, profileId)
|
|
|
6515
6582
|
? report.activation.detail
|
|
6516
6583
|
: report.brain.detail
|
|
6517
6584
|
},
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
:
|
|
6533
|
-
|
|
6534
|
-
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6585
|
+
hook: {
|
|
6586
|
+
noun: "Hook",
|
|
6587
|
+
scope: report.hook.scope,
|
|
6588
|
+
openclawHome: report.hook.openclawHome,
|
|
6589
|
+
hookPath: report.hook.hookPath,
|
|
6590
|
+
runtimeGuardPath: report.hook.runtimeGuardPath,
|
|
6591
|
+
manifestPath: report.hook.manifestPath,
|
|
6592
|
+
installState: report.hook.installState,
|
|
6593
|
+
loadability: report.hook.loadability,
|
|
6594
|
+
loadProof: report.hook.loadProof,
|
|
6595
|
+
desynced: report.hook.desynced,
|
|
6596
|
+
detail: report.hook.detail
|
|
6597
|
+
},
|
|
6598
|
+
attachment: {
|
|
6599
|
+
noun: "Attachment",
|
|
6600
|
+
state: attachmentState,
|
|
6601
|
+
activationRoot: report.attachmentTruth.activationRoot,
|
|
6602
|
+
servingSlot: report.attachmentTruth.servingSlot,
|
|
6603
|
+
policyMode,
|
|
6604
|
+
policy: buildCurrentProfileAttachmentPolicy(policyMode),
|
|
6605
|
+
proofState: report.attachmentTruth.proofState,
|
|
6606
|
+
watchOnly: report.attachmentTruth.watchOnly,
|
|
6607
|
+
detail: report.attachmentTruth.detail
|
|
6608
|
+
},
|
|
6541
6609
|
brainStatus: {
|
|
6542
6610
|
status,
|
|
6543
6611
|
brainState: report.brain.state,
|
|
@@ -6550,21 +6618,27 @@ function buildCurrentProfileBrainStatusFromReport(report, policyMode, profileId)
|
|
|
6550
6618
|
timing: report.servePath.timing,
|
|
6551
6619
|
detail: activationState === "broken_install"
|
|
6552
6620
|
? `current profile activation is broken: ${report.activation.detail}`
|
|
6553
|
-
:
|
|
6554
|
-
? `current profile
|
|
6555
|
-
: activationState === "
|
|
6556
|
-
?
|
|
6557
|
-
:
|
|
6558
|
-
?
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6621
|
+
: report.hook.desynced
|
|
6622
|
+
? `current profile hook is blocked: ${report.hook.detail}`
|
|
6623
|
+
: activationState === "stale_incomplete"
|
|
6624
|
+
? `current profile activation is stale/incomplete: ${report.activation.detail}`
|
|
6625
|
+
: attachmentState === "not_attached"
|
|
6626
|
+
? "current profile is not attached to this Brain activation root"
|
|
6627
|
+
: attachmentState === "unknown"
|
|
6628
|
+
? "current profile attachment is not self-proven from this activation-root-only read"
|
|
6629
|
+
: activationState === "detached"
|
|
6630
|
+
? "current profile has no attached active pack at the activation boundary"
|
|
6631
|
+
: report.servePath.state === "serving_active_pack"
|
|
6632
|
+
? awaitingFirstExport
|
|
6633
|
+
? `current profile is serving seed-state pack ${activePackId ?? "unknown"} while awaiting the first exported turn`
|
|
6634
|
+
: report.brain.state === "pg_promoted_pack_authoritative"
|
|
6635
|
+
? `current profile is serving promoted pack ${activePackId ?? "unknown"}; serve-visible change came from activation promotion, not hot-path mutation`
|
|
6636
|
+
: `current profile is serving active pack ${activePackId ?? "unknown"}; learned routing is active, but authority is still seed-state`
|
|
6637
|
+
: report.servePath.state === "fail_open_static_context"
|
|
6638
|
+
? "current profile would fail open to static context because no serving pack is available"
|
|
6639
|
+
: report.servePath.state === "hard_fail"
|
|
6640
|
+
? "current profile cannot serve because the learned-route or activation requirement hard-failed"
|
|
6641
|
+
: "current profile serve state has not been compile-probed yet"
|
|
6568
6642
|
},
|
|
6569
6643
|
passiveLearning,
|
|
6570
6644
|
currentTurnAttribution: buildCurrentProfileTurnAttributionFromReport(report, policyMode, profileId)
|
|
@@ -6639,6 +6713,18 @@ export function buildOperatorSurfaceReport(input) {
|
|
|
6639
6713
|
activePackId: active?.packId ?? null,
|
|
6640
6714
|
learnedRouting
|
|
6641
6715
|
});
|
|
6716
|
+
const teacherLoop = summarizeTeacherLoop(input);
|
|
6717
|
+
const hook = summarizeOperatorHook({
|
|
6718
|
+
activationRoot,
|
|
6719
|
+
openclawHome: normalizeOptionalString(input.openclawHome) ?? null,
|
|
6720
|
+
servePath
|
|
6721
|
+
});
|
|
6722
|
+
const attachmentTruth = summarizeOperatorAttachmentTruth({
|
|
6723
|
+
activationRoot,
|
|
6724
|
+
active,
|
|
6725
|
+
teacherLoop,
|
|
6726
|
+
hook
|
|
6727
|
+
});
|
|
6642
6728
|
const reportBase = {
|
|
6643
6729
|
generatedAt: updatedAt,
|
|
6644
6730
|
activationRoot,
|
|
@@ -6679,8 +6765,10 @@ export function buildOperatorSurfaceReport(input) {
|
|
|
6679
6765
|
},
|
|
6680
6766
|
supervision: summarizeSupervision(input),
|
|
6681
6767
|
learning: summarizeAlwaysOnLearning(input, active),
|
|
6682
|
-
teacherLoop
|
|
6768
|
+
teacherLoop,
|
|
6683
6769
|
routeFn,
|
|
6770
|
+
hook,
|
|
6771
|
+
attachmentTruth,
|
|
6684
6772
|
principal: summarizePrincipalObservability(input, active),
|
|
6685
6773
|
manyProfile: summarizeManyProfileSupport(brainAttachmentPolicy)
|
|
6686
6774
|
};
|