@openclawbrain/openclaw 0.2.2 → 0.3.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/LICENSE +201 -0
- package/README.md +10 -0
- package/dist/extension/index.d.ts +1 -0
- package/dist/extension/index.js +73 -0
- package/dist/extension/index.js.map +1 -0
- package/dist/extension/runtime-guard.d.ts +61 -0
- package/dist/extension/runtime-guard.js +230 -0
- package/dist/extension/runtime-guard.js.map +1 -0
- package/dist/src/cli.d.ts +66 -4
- package/dist/src/cli.js +1845 -241
- package/dist/src/cli.js.map +1 -1
- package/dist/src/daemon.d.ts +7 -4
- package/dist/src/daemon.js +311 -28
- package/dist/src/daemon.js.map +1 -1
- package/dist/src/index.d.ts +213 -4
- package/dist/src/index.js +1151 -157
- package/dist/src/index.js.map +1 -1
- package/dist/src/learning-spine.d.ts +2 -1
- package/dist/src/learning-spine.js +8 -0
- package/dist/src/learning-spine.js.map +1 -1
- package/dist/src/local-session-passive-learning.d.ts +1 -0
- package/dist/src/local-session-passive-learning.js +97 -7
- package/dist/src/local-session-passive-learning.js.map +1 -1
- package/dist/src/ollama-client.d.ts +46 -0
- package/dist/src/ollama-client.js +231 -0
- package/dist/src/ollama-client.js.map +1 -0
- package/dist/src/provider-config.d.ts +28 -0
- package/dist/src/provider-config.js +150 -0
- package/dist/src/provider-config.js.map +1 -0
- package/dist/src/resolve-activation-root.d.ts +3 -3
- package/dist/src/resolve-activation-root.js +105 -35
- package/dist/src/resolve-activation-root.js.map +1 -1
- package/dist/src/session-store.d.ts +18 -0
- package/dist/src/session-store.js +40 -0
- package/dist/src/session-store.js.map +1 -1
- package/dist/src/session-tail.d.ts +6 -3
- package/dist/src/session-tail.js +35 -4
- package/dist/src/session-tail.js.map +1 -1
- package/dist/src/shadow-extension-proof.d.ts +40 -0
- package/dist/src/shadow-extension-proof.js +214 -0
- package/dist/src/shadow-extension-proof.js.map +1 -0
- package/dist/src/teacher-labeler.d.ts +50 -0
- package/dist/src/teacher-labeler.js +424 -0
- package/dist/src/teacher-labeler.js.map +1 -0
- package/extension/index.ts +74 -35
- package/extension/runtime-guard.ts +353 -0
- package/package.json +13 -13
package/dist/src/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import {
|
|
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 CurrentProfileStructuralDecisionV1, type FeedbackEventKind, type PackGraphEvolutionV1, 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
3
|
import { type EventExportLaneV1 } from "@openclawbrain/event-export";
|
|
3
|
-
import { type AdvanceAlwaysOnLearningRuntimeInput, type AlwaysOnLearningCadenceV1, type AlwaysOnLearningMaterializationJobV1, type AlwaysOnLearningRuntimePlanV1, type AlwaysOnLearningRuntimeStateV1, type PendingPrincipalEventV1, type PrincipalLearningCheckpointV1 } from "@openclawbrain/learner";
|
|
4
|
-
import { type ActivationInspection, type ActivationObservabilityReport, type GraphEvolutionLogV1, type ActivationSlotInspection, type InitHandoffState } from "@openclawbrain/pack-format";
|
|
4
|
+
import { type AdvanceAlwaysOnLearningRuntimeInput, type AlwaysOnLearningCadenceV1, type AlwaysOnLearningMaterializationJobV1, type AlwaysOnLearningRuntimePlanV1, type AlwaysOnLearningRuntimeStateV1, type BaselineStateV1, type PendingPrincipalEventV1, type PrincipalLearningCheckpointV1 } from "@openclawbrain/learner";
|
|
5
|
+
import { type ActivationInspection, type ActivationObservabilityReport, type GraphEvolutionLogV1, type LearningSpineServeRouteBreadcrumbsV1, type ActivationSlotInspection, type InitHandoffState, type LearningSpineServeRouteDecisionLogEntryV1 } from "@openclawbrain/pack-format";
|
|
6
|
+
import { type AsyncTeacherLabelerConfigV1 } from "./teacher-labeler.js";
|
|
7
|
+
export { createHttpOllamaTeacherLabelerClient, createOllamaTeacherLabeler, createTeacherLabeler, type AsyncTeacherLabelerConfigV1, type AsyncTeacherNoopLabelerConfigV1, type AsyncTeacherOllamaLabelerConfigV1, type OllamaTeacherLabelerClient, type TeacherLabeler, type TeacherLabelerResultV1, type TeacherLabelerRunInputV1 } from "./teacher-labeler.js";
|
|
5
8
|
export declare const DEFAULT_ASYNC_TEACHER_QUEUE_CAPACITY = 8;
|
|
6
9
|
declare const RECORDED_SESSION_TRACE_CONTRACT: "recorded_session_trace.v1";
|
|
7
10
|
declare const RECORDED_SESSION_FIXTURE_CONTRACT: "recorded_session_replay_fixture.v1";
|
|
@@ -11,6 +14,11 @@ export declare const RUNTIME_EVENT_EXPORT_BUNDLE_LAYOUT: {
|
|
|
11
14
|
readonly manifest: "manifest.json";
|
|
12
15
|
readonly payload: "normalized-event-export.json";
|
|
13
16
|
};
|
|
17
|
+
export interface CompileServeRouteBreadcrumbInput {
|
|
18
|
+
invocationSurface: LearningSpineServeRouteBreadcrumbsV1["invocationSurface"];
|
|
19
|
+
hostEvent: LearningSpineServeRouteBreadcrumbsV1["hostEvent"];
|
|
20
|
+
installedEntryPath?: string | null;
|
|
21
|
+
}
|
|
14
22
|
export interface RuntimeEventExportBundleSummaryV1 {
|
|
15
23
|
runtimeOwner: "openclaw";
|
|
16
24
|
sessionId: string | null;
|
|
@@ -78,8 +86,17 @@ export interface CompileRuntimeContextInput {
|
|
|
78
86
|
budgetStrategy?: CompileRuntimeBudgetStrategy;
|
|
79
87
|
maxContextChars?: number;
|
|
80
88
|
mode?: RouteMode;
|
|
89
|
+
selectionMode?: CompileSelectionMode;
|
|
81
90
|
compactionMode?: ContextCompactionMode;
|
|
82
91
|
runtimeHints?: readonly string[];
|
|
92
|
+
/** Optional session ID for serve-time route decision logging (extension callers). */
|
|
93
|
+
sessionId?: string;
|
|
94
|
+
/** Optional channel identifier for serve-time route decision logging (extension callers). */
|
|
95
|
+
channel?: string;
|
|
96
|
+
/** @internal Suppress serve-time logging inside compileRuntimeContext when called from runRuntimeTurn (which logs separately). */
|
|
97
|
+
_suppressServeLog?: boolean;
|
|
98
|
+
/** @internal Preserve explicit serve-route breadcrumbs for installed/runtime hook paths. */
|
|
99
|
+
_serveRouteBreadcrumbs?: CompileServeRouteBreadcrumbInput;
|
|
83
100
|
}
|
|
84
101
|
export interface ActiveCompileTarget {
|
|
85
102
|
activationRoot: string;
|
|
@@ -305,6 +322,7 @@ export interface OpenClawRuntimeTurnInput {
|
|
|
305
322
|
maxContextBlocks?: number;
|
|
306
323
|
budgetStrategy?: CompileRuntimeBudgetStrategy;
|
|
307
324
|
mode?: RouteMode;
|
|
325
|
+
selectionMode?: CompileSelectionMode;
|
|
308
326
|
runtimeHints?: readonly string[];
|
|
309
327
|
brainAttachmentPolicy?: RuntimeTurnBrainAttachmentPolicyV1 | null;
|
|
310
328
|
contextFingerprint?: RuntimeTurnContextFingerprintInputV1 | null;
|
|
@@ -345,6 +363,14 @@ export type TeacherLoopNoOpReason = "none" | "duplicate_export" | "queue_full" |
|
|
|
345
363
|
export interface AsyncTeacherLiveLoopInput extends Pick<AdvanceAlwaysOnLearningRuntimeInput, "packLabel" | "workspace" | "learnedRouting" | "builtAt" | "offlineArtifacts" | "structuralOps" | "sparseFeedback" | "liveSliceSize" | "backfillSliceSize" | "cadence"> {
|
|
346
364
|
maxQueuedExports?: number;
|
|
347
365
|
staleAfterMs?: number;
|
|
366
|
+
resumeFromSnapshot?: AsyncTeacherLiveLoopSnapshotV1 | null;
|
|
367
|
+
resolveLearnedRoutingState?: () => {
|
|
368
|
+
pgVersion?: AdvanceAlwaysOnLearningRuntimeInput["pgVersion"];
|
|
369
|
+
serveTimeDecisions?: LearningSpineServeRouteDecisionLogEntryV1[];
|
|
370
|
+
baselineState?: BaselineStateV1;
|
|
371
|
+
};
|
|
372
|
+
persistUpdatedBaseline?: (state: BaselineStateV1) => void;
|
|
373
|
+
teacherLabeler?: AsyncTeacherLabelerConfigV1 | null;
|
|
348
374
|
}
|
|
349
375
|
export interface AsyncTeacherQueuedExportJobV1 {
|
|
350
376
|
jobId: string;
|
|
@@ -381,6 +407,18 @@ export interface AsyncTeacherLiveLoopSnapshotV1 {
|
|
|
381
407
|
lastMaterialization: AlwaysOnLearningMaterializationJobV1 | null;
|
|
382
408
|
};
|
|
383
409
|
diagnostics: AsyncTeacherLiveLoopDiagnosticsV1;
|
|
410
|
+
state?: {
|
|
411
|
+
interactionEvents: InteractionEventV1[];
|
|
412
|
+
feedbackEvents: FeedbackEventV1[];
|
|
413
|
+
seenExportDigests: string[];
|
|
414
|
+
};
|
|
415
|
+
runtime?: {
|
|
416
|
+
startedAt: string | null;
|
|
417
|
+
lastHeartbeatAt: string | null;
|
|
418
|
+
lastScanAt: string | null;
|
|
419
|
+
scanRoot: string | null;
|
|
420
|
+
lastAppliedMaterializationJobId: string | null;
|
|
421
|
+
};
|
|
384
422
|
}
|
|
385
423
|
export interface AsyncTeacherEnqueueResultV1 {
|
|
386
424
|
accepted: boolean;
|
|
@@ -536,6 +574,7 @@ export declare class AsyncTeacherLiveLoop {
|
|
|
536
574
|
private readonly input;
|
|
537
575
|
private readonly queueCapacity;
|
|
538
576
|
private readonly staleAfterMs;
|
|
577
|
+
private readonly teacherLabeler;
|
|
539
578
|
private readonly queuedExportDigests;
|
|
540
579
|
private readonly seenExportDigests;
|
|
541
580
|
private queue;
|
|
@@ -545,6 +584,7 @@ export declare class AsyncTeacherLiveLoop {
|
|
|
545
584
|
private teacherArtifacts;
|
|
546
585
|
private learnerState;
|
|
547
586
|
private lastMaterialization;
|
|
587
|
+
private lastTeacherLabelerResult;
|
|
548
588
|
private diagnostics;
|
|
549
589
|
constructor(input: AsyncTeacherLiveLoopInput);
|
|
550
590
|
enqueueNormalizedEventExport(normalizedEventExport: NormalizedEventExportV1, options?: {
|
|
@@ -602,9 +642,125 @@ export interface ScanLiveEventExportResultV1 {
|
|
|
602
642
|
packLabel: string;
|
|
603
643
|
supervision: CanonicalSupervisionV1;
|
|
604
644
|
snapshot: AsyncTeacherLiveLoopSnapshotV1;
|
|
645
|
+
labelFlow: OperatorLabelFlowSummary;
|
|
646
|
+
learningPath: OperatorLearningPathSummary;
|
|
605
647
|
}
|
|
606
648
|
export declare function scanRecordedSession(input: ScanRecordedSessionInputV1): ScanRecordedSessionResultV1;
|
|
607
649
|
export declare function scanLiveEventExport(input: ScanLiveEventExportInputV1): ScanLiveEventExportResultV1;
|
|
650
|
+
export declare function resolveAsyncTeacherLiveLoopSnapshotPath(activationRoot: string): string;
|
|
651
|
+
export declare const WATCH_STATE_DIRNAME = "watch";
|
|
652
|
+
export declare const WATCH_SESSION_TAIL_CURSOR_BASENAME = "session-tail-cursor.json";
|
|
653
|
+
export declare const WATCH_TEACHER_SNAPSHOT_BASENAME = "teacher-snapshot.json";
|
|
654
|
+
export interface WatchTeacherSnapshotFailureV1 {
|
|
655
|
+
mode: "materialization_failed" | "teacher_fail_open";
|
|
656
|
+
detail: string;
|
|
657
|
+
at: string;
|
|
658
|
+
}
|
|
659
|
+
export interface WatchTeacherSnapshotTeacherSummaryV1 {
|
|
660
|
+
artifactCount: number;
|
|
661
|
+
latestFreshness: AsyncTeacherLiveLoopDiagnosticsV1["latestFreshness"] | "unavailable";
|
|
662
|
+
acceptedExportCount: number;
|
|
663
|
+
processedExportCount: number;
|
|
664
|
+
duplicateExportCount: number;
|
|
665
|
+
droppedExportCount: number;
|
|
666
|
+
emittedArtifactCount: number;
|
|
667
|
+
dedupedArtifactCount: number;
|
|
668
|
+
lastProcessedAt: string | null;
|
|
669
|
+
lastNoOpReason: TeacherLoopNoOpReason;
|
|
670
|
+
queueDepth: number;
|
|
671
|
+
queueCapacity: number;
|
|
672
|
+
running: boolean;
|
|
673
|
+
lastAppliedMaterializationJobId: string | null;
|
|
674
|
+
lastMaterializedPackId: string | null;
|
|
675
|
+
}
|
|
676
|
+
export interface WatchTeacherSnapshotLearningSummaryV1 {
|
|
677
|
+
bootstrapped: boolean;
|
|
678
|
+
mode: AlwaysOnLearningRuntimePlanV1["mode"];
|
|
679
|
+
nextPriorityLane: AlwaysOnLearningRuntimePlanV1["nextPriorityLane"];
|
|
680
|
+
nextPriorityBucket: AlwaysOnLearningRuntimePlanV1["nextPriorityBucket"];
|
|
681
|
+
pendingLive: number;
|
|
682
|
+
pendingBackfill: number;
|
|
683
|
+
pendingTotal: number;
|
|
684
|
+
pendingByBucket: AlwaysOnLearningRuntimePlanV1["pending"]["byBucket"];
|
|
685
|
+
materializationCount: number;
|
|
686
|
+
lastMaterializedAt: string | null;
|
|
687
|
+
lastMaterializationReason: AlwaysOnLearningMaterializationJobV1["reason"] | null;
|
|
688
|
+
lastMaterializationLane: AlwaysOnLearningMaterializationJobV1["lane"] | null;
|
|
689
|
+
lastMaterializedPackId: string | null;
|
|
690
|
+
lastHandledMaterializationPackId: string | null;
|
|
691
|
+
}
|
|
692
|
+
export interface WatchTeacherSnapshotLabelingSummaryV1 {
|
|
693
|
+
learningCadence: LearningCadence;
|
|
694
|
+
scanPolicy: LearningScanPolicy;
|
|
695
|
+
liveSlicesPerCycle: number;
|
|
696
|
+
backfillSlicesPerCycle: number;
|
|
697
|
+
teacherBudget: number;
|
|
698
|
+
teacherDelayMs: number;
|
|
699
|
+
backgroundLabelAmplification: number;
|
|
700
|
+
}
|
|
701
|
+
export interface WatchTeacherSnapshotFileV1 {
|
|
702
|
+
contract: "openclaw_watch_teacher_snapshot.v1";
|
|
703
|
+
runtimeOwner: "openclaw";
|
|
704
|
+
updatedAt: string;
|
|
705
|
+
lastRunAt: string;
|
|
706
|
+
scanRoot: string;
|
|
707
|
+
sessionTailCursorPath: string;
|
|
708
|
+
sessionTailCursorUpdatedAt: string;
|
|
709
|
+
sessionTailSessionsTracked: number;
|
|
710
|
+
sessionTailBridgedEventCount: number;
|
|
711
|
+
scannerCheckpointPath: string;
|
|
712
|
+
scannerCheckpoint: RuntimeEventExportScannerCheckpointV1;
|
|
713
|
+
replayedBundleCount: number;
|
|
714
|
+
replayedEventCount: number;
|
|
715
|
+
exportedBundleCount: number;
|
|
716
|
+
exportedEventCount: number;
|
|
717
|
+
startupWarnings: string[];
|
|
718
|
+
lastTeacherError: string | null;
|
|
719
|
+
localSessionTailNoopReason: string | null;
|
|
720
|
+
lastHandledMaterializationPackId: string | null;
|
|
721
|
+
teacher: WatchTeacherSnapshotTeacherSummaryV1;
|
|
722
|
+
learning: WatchTeacherSnapshotLearningSummaryV1;
|
|
723
|
+
labeling: WatchTeacherSnapshotLabelingSummaryV1;
|
|
724
|
+
failure: WatchTeacherSnapshotFailureV1 | null;
|
|
725
|
+
snapshot: AsyncTeacherLiveLoopSnapshotV1;
|
|
726
|
+
}
|
|
727
|
+
export interface LoadedTeacherSurfaceV1 {
|
|
728
|
+
sourcePath: string;
|
|
729
|
+
sourceKind: "watch_snapshot" | "async_snapshot";
|
|
730
|
+
snapshot: AsyncTeacherLiveLoopSnapshotV1;
|
|
731
|
+
watchSnapshot: WatchTeacherSnapshotFileV1 | null;
|
|
732
|
+
}
|
|
733
|
+
export declare function resolveWatchStateRoot(activationRoot: string): string;
|
|
734
|
+
export declare function resolveWatchSessionTailCursorPath(activationRoot: string): string;
|
|
735
|
+
export declare function resolveWatchTeacherSnapshotPath(activationRoot: string): string;
|
|
736
|
+
export declare function resolveOperatorTeacherSnapshotPath(activationRoot: string, explicitPath: string | null | undefined): string | null;
|
|
737
|
+
export declare function loadTeacherSurface(snapshotPath: string): LoadedTeacherSurfaceV1 | null;
|
|
738
|
+
export declare function loadWatchTeacherSnapshotState(snapshotPath: string): {
|
|
739
|
+
lastHandledMaterializationPackId: string | null;
|
|
740
|
+
snapshot: AsyncTeacherLiveLoopSnapshotV1 | null;
|
|
741
|
+
error: string | null;
|
|
742
|
+
};
|
|
743
|
+
export declare function persistWatchTeacherSnapshot(snapshotPath: string, input: {
|
|
744
|
+
lastRunAt: string;
|
|
745
|
+
scanRoot: string;
|
|
746
|
+
sessionTailCursorPath: string;
|
|
747
|
+
sessionTailCursorUpdatedAt: string;
|
|
748
|
+
sessionTailSessionsTracked: number;
|
|
749
|
+
sessionTailBridgedEventCount: number;
|
|
750
|
+
scannerCheckpointPath: string;
|
|
751
|
+
scannerCheckpoint: RuntimeEventExportScannerCheckpointV1;
|
|
752
|
+
replayedBundleCount: number;
|
|
753
|
+
replayedEventCount: number;
|
|
754
|
+
exportedBundleCount: number;
|
|
755
|
+
exportedEventCount: number;
|
|
756
|
+
startupWarnings: readonly string[];
|
|
757
|
+
lastTeacherError: string | null;
|
|
758
|
+
localSessionTailNoopReason: string | null;
|
|
759
|
+
lastHandledMaterializationPackId: string | null;
|
|
760
|
+
failure: WatchTeacherSnapshotFailureV1 | null;
|
|
761
|
+
snapshot: AsyncTeacherLiveLoopSnapshotV1;
|
|
762
|
+
}): WatchTeacherSnapshotFileV1;
|
|
763
|
+
export declare function loadAsyncTeacherLiveLoopSnapshot(snapshotPath: string): AsyncTeacherLiveLoopSnapshotV1;
|
|
608
764
|
export declare function buildRuntimeEventExportBundleManifest(input: {
|
|
609
765
|
exportName: string;
|
|
610
766
|
exportedAt: string;
|
|
@@ -758,6 +914,7 @@ export declare class RuntimeEventExportScanner {
|
|
|
758
914
|
private checkpoint;
|
|
759
915
|
constructor(input: RuntimeEventExportScannerInput);
|
|
760
916
|
snapshot(): RuntimeEventExportScannerCheckpointV1;
|
|
917
|
+
restoreCheckpoint(checkpoint: RuntimeEventExportScannerCheckpointV1): void;
|
|
761
918
|
scanOnce(options?: {
|
|
762
919
|
scannedAt?: string;
|
|
763
920
|
}): RuntimeEventExportScannerScanResultV1;
|
|
@@ -1142,6 +1299,11 @@ export interface OperatorBrainStateSummary {
|
|
|
1142
1299
|
activeEventExportDigest: string | null;
|
|
1143
1300
|
detail: string;
|
|
1144
1301
|
}
|
|
1302
|
+
export interface OperatorActivationStateSummary {
|
|
1303
|
+
state: CurrentProfileActivationStateV1;
|
|
1304
|
+
detail: string;
|
|
1305
|
+
inspectionError: string | null;
|
|
1306
|
+
}
|
|
1145
1307
|
export interface OperatorGraphSummary {
|
|
1146
1308
|
available: boolean;
|
|
1147
1309
|
runtimePlasticitySource: RuntimePlasticitySourceV1 | null;
|
|
@@ -1155,6 +1317,27 @@ export interface OperatorGraphSummary {
|
|
|
1155
1317
|
operatorSummary: string | null;
|
|
1156
1318
|
detail: string;
|
|
1157
1319
|
}
|
|
1320
|
+
export type OperatorObservabilitySource = "active_pack" | "event_export" | "materialized_candidate" | "missing";
|
|
1321
|
+
export type OperatorPolicyGradientVersion = "v1" | "v2" | "unavailable";
|
|
1322
|
+
export interface OperatorLabelFlowSummary {
|
|
1323
|
+
source: OperatorObservabilitySource;
|
|
1324
|
+
humanLabelCount: number | null;
|
|
1325
|
+
selfLabelCount: number | null;
|
|
1326
|
+
asyncTeacherArtifactCount: number | null;
|
|
1327
|
+
implicitPositiveCount: number | null;
|
|
1328
|
+
detail: string;
|
|
1329
|
+
}
|
|
1330
|
+
export interface OperatorLearningPathSummary {
|
|
1331
|
+
available: boolean;
|
|
1332
|
+
source: OperatorObservabilitySource;
|
|
1333
|
+
policyGradientVersion: OperatorPolicyGradientVersion;
|
|
1334
|
+
policyGradientMethod: string | null;
|
|
1335
|
+
objective: string | null;
|
|
1336
|
+
targetConstruction: string | null;
|
|
1337
|
+
connectOpsFired: number | null;
|
|
1338
|
+
reconstructedTrajectoryCount: number | null;
|
|
1339
|
+
detail: string;
|
|
1340
|
+
}
|
|
1158
1341
|
export interface OperatorServePathSummary {
|
|
1159
1342
|
state: OperatorServePathState;
|
|
1160
1343
|
fallbackToStaticContext: boolean;
|
|
@@ -1206,12 +1389,32 @@ export interface OperatorSupervisionSummary {
|
|
|
1206
1389
|
export interface OperatorTeacherLoopSummary {
|
|
1207
1390
|
available: boolean;
|
|
1208
1391
|
sourcePath: string | null;
|
|
1392
|
+
sourceKind: "watch_snapshot" | "async_snapshot" | "missing";
|
|
1393
|
+
lastRunAt: string | null;
|
|
1209
1394
|
lastNoOpReason: TeacherLoopNoOpReason | "unavailable";
|
|
1210
1395
|
latestFreshness: AsyncTeacherLiveLoopDiagnosticsV1["latestFreshness"] | "unavailable";
|
|
1396
|
+
startedAt: string | null;
|
|
1397
|
+
lastHeartbeatAt: string | null;
|
|
1398
|
+
lastScanAt: string | null;
|
|
1211
1399
|
lastProcessedAt: string | null;
|
|
1400
|
+
artifactCount: number | null;
|
|
1212
1401
|
queueDepth: number | null;
|
|
1213
1402
|
queueCapacity: number | null;
|
|
1214
1403
|
running: boolean | null;
|
|
1404
|
+
replayedBundleCount: number | null;
|
|
1405
|
+
replayedEventCount: number | null;
|
|
1406
|
+
exportedBundleCount: number | null;
|
|
1407
|
+
exportedEventCount: number | null;
|
|
1408
|
+
sessionTailSessionsTracked: number | null;
|
|
1409
|
+
sessionTailBridgedEventCount: number | null;
|
|
1410
|
+
localSessionTailNoopReason: string | null;
|
|
1411
|
+
learningCadence: LearningCadence | "unavailable";
|
|
1412
|
+
scanPolicy: LearningScanPolicy | "unavailable";
|
|
1413
|
+
liveSlicesPerCycle: number | null;
|
|
1414
|
+
backfillSlicesPerCycle: number | null;
|
|
1415
|
+
failureMode: WatchTeacherSnapshotFailureV1["mode"] | "none" | "unavailable";
|
|
1416
|
+
failureDetail: string | null;
|
|
1417
|
+
lastAppliedMaterializationJobId: string | null;
|
|
1215
1418
|
lastMaterializedPackId: string | null;
|
|
1216
1419
|
notes: string[];
|
|
1217
1420
|
detail: string;
|
|
@@ -1303,6 +1506,7 @@ interface OperatorSurfaceReport {
|
|
|
1303
1506
|
generatedAt: string;
|
|
1304
1507
|
activationRoot: string;
|
|
1305
1508
|
status: OperatorSurfaceStatus;
|
|
1509
|
+
activation: OperatorActivationStateSummary;
|
|
1306
1510
|
active: OperatorSurfaceSlotSummary | null;
|
|
1307
1511
|
candidate: OperatorSurfaceSlotSummary | null;
|
|
1308
1512
|
previous: OperatorSurfaceSlotSummary | null;
|
|
@@ -1312,6 +1516,8 @@ interface OperatorSurfaceReport {
|
|
|
1312
1516
|
};
|
|
1313
1517
|
brain: OperatorBrainStateSummary;
|
|
1314
1518
|
graph: OperatorGraphSummary;
|
|
1519
|
+
labelFlow: OperatorLabelFlowSummary;
|
|
1520
|
+
learningPath: OperatorLearningPathSummary;
|
|
1315
1521
|
learnedRouting: {
|
|
1316
1522
|
required: boolean;
|
|
1317
1523
|
available: boolean;
|
|
@@ -1360,6 +1566,8 @@ export interface CurrentProfileBrainStatusInput extends OperatorSurfaceInput {
|
|
|
1360
1566
|
profileId?: string | null;
|
|
1361
1567
|
}
|
|
1362
1568
|
export type CurrentProfileBrainStatusV1 = CurrentProfileBrainStatusAnswerV1;
|
|
1569
|
+
export declare function summarizeNormalizedEventExportLabelFlow(normalizedEventExport: NormalizedEventExportV1, asyncTeacherArtifactCount?: number): OperatorLabelFlowSummary;
|
|
1570
|
+
export declare function summarizeLearningPathFromMaterialization(materialization: AlwaysOnLearningMaterializationJobV1 | null): OperatorLearningPathSummary;
|
|
1363
1571
|
export declare function buildOperatorSurfaceReport(input: OperatorSurfaceInput): OperatorSurfaceReport;
|
|
1364
1572
|
export declare function describeCurrentProfileBrainStatus(input: CurrentProfileBrainStatusInput): CurrentProfileBrainStatusV1;
|
|
1365
1573
|
export declare function formatOperatorRollbackReport(result: RollbackRuntimeAttachResult): string;
|
|
@@ -1420,7 +1628,8 @@ export { describeNormalizedEventExportObservability } from "@openclawbrain/event
|
|
|
1420
1628
|
export { describeCompileFallbackUsage } from "@openclawbrain/compiler";
|
|
1421
1629
|
export { describeActivationObservability, inspectActivationState, rollbackActivePack } from "@openclawbrain/pack-format";
|
|
1422
1630
|
export { createOpenClawLocalSessionTail, OpenClawLocalSessionTail, type OpenClawLocalSessionTailChangeKindV1, type OpenClawLocalSessionTailChangeV1, type OpenClawLocalSessionTailCursorV1, type OpenClawLocalSessionTailInput, type OpenClawLocalSessionTailLoopOptionsV1, type OpenClawLocalSessionTailLoopResultV1, type OpenClawLocalSessionTailNoopReasonV1, type OpenClawLocalSessionTailPollResultV1 } from "./session-tail.js";
|
|
1423
|
-
export { discoverOpenClawMainSessionStores, loadOpenClawSessionIndex, readOpenClawAcpStreamFile, readOpenClawSessionFile, type OpenClawMainSessionStoreV1, type OpenClawAcpStreamRecord, type OpenClawInjectedWorkspaceFile, type OpenClawSessionContentPart, type OpenClawSessionCustomRecord, type OpenClawSessionHeaderRecord, type OpenClawSessionIndex, type OpenClawSessionIndexEntry, type OpenClawSessionMessagePayload, type OpenClawSessionMessageRecord, type OpenClawSessionModelChangeRecord, type OpenClawSessionRecord, type OpenClawSessionTextPart, type OpenClawSessionThinkingLevelChangeRecord, type OpenClawSessionThinkingPart, type OpenClawSessionToolCallPart, type OpenClawSystemPromptReport, type OpenClawToolSurfaceEntry } from "./session-store.js";
|
|
1631
|
+
export { discoverOpenClawMainSessionStores, discoverOpenClawSessionStores, loadOpenClawSessionIndex, readOpenClawAcpStreamFile, readOpenClawSessionFile, type OpenClawMainSessionStoreV1, type OpenClawSessionStoreV1, type OpenClawAcpStreamRecord, type OpenClawInjectedWorkspaceFile, type OpenClawSessionContentPart, type OpenClawSessionCustomRecord, type OpenClawSessionHeaderRecord, type OpenClawSessionIndex, type OpenClawSessionIndexEntry, type OpenClawSessionMessagePayload, type OpenClawSessionMessageRecord, type OpenClawSessionModelChangeRecord, type OpenClawSessionRecord, type OpenClawSessionTextPart, type OpenClawSessionThinkingLevelChangeRecord, type OpenClawSessionThinkingPart, type OpenClawSessionToolCallPart, type OpenClawSystemPromptReport, type OpenClawToolSurfaceEntry } from "./session-store.js";
|
|
1424
1632
|
export { buildPassiveLearningSessionExportFromOpenClawSessionStore, buildPassiveLearningStoreExportFromOpenClawSessionIndex, type OpenClawPassiveLearningPrivacySummaryV1, type OpenClawPassiveLearningSessionEvidenceV1, type OpenClawPassiveLearningSessionExportV1, type OpenClawPassiveLearningStoreExportV1 } from "./local-session-passive-learning.js";
|
|
1633
|
+
export { DEFAULT_OLLAMA_BASE_URL, DEFAULT_OLLAMA_TIMEOUT_MS, OllamaClient, OllamaClientError, createOllamaClient, type OllamaChatMessage, type OllamaClientOptions, type OllamaFetch, type OllamaFetchRequestInit, type OllamaFetchResponse, type OllamaRequestOptions } from "./ollama-client.js";
|
|
1425
1634
|
export { resolveActivationRoot, type ResolveActivationRootOptions } from "./resolve-activation-root.js";
|
|
1426
1635
|
export { runDaemonCommand, type DaemonCliArgs, type DaemonSubcommand, parseDaemonArgs } from "./daemon.js";
|