@openclawbrain/openclaw 0.3.6 → 0.4.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.
Files changed (62) hide show
  1. package/README.md +23 -228
  2. package/dist/extension/index.js +3 -2
  3. package/dist/extension/index.js.map +1 -1
  4. package/dist/extension/runtime-guard.js +1 -1
  5. package/dist/extension/runtime-guard.js.map +1 -1
  6. package/dist/src/attachment-truth.d.ts +32 -22
  7. package/dist/src/attachment-truth.js +338 -186
  8. package/dist/src/index.d.ts +75 -1719
  9. package/dist/src/index.js +7 -6882
  10. package/dist/src/runtime-core.js +574 -0
  11. package/extension/index.ts +3 -2
  12. package/extension/runtime-guard.ts +1 -1
  13. package/openclaw.plugin.json +1 -1
  14. package/package.json +17 -17
  15. package/dist/src/attachment-truth.js.map +0 -1
  16. package/dist/src/cli.d.ts +0 -170
  17. package/dist/src/cli.js +0 -5583
  18. package/dist/src/cli.js.map +0 -1
  19. package/dist/src/daemon.d.ts +0 -70
  20. package/dist/src/daemon.js +0 -955
  21. package/dist/src/daemon.js.map +0 -1
  22. package/dist/src/import-export.d.ts +0 -36
  23. package/dist/src/import-export.js +0 -171
  24. package/dist/src/import-export.js.map +0 -1
  25. package/dist/src/index.js.map +0 -1
  26. package/dist/src/learning-spine.d.ts +0 -50
  27. package/dist/src/learning-spine.js.map +0 -1
  28. package/dist/src/local-session-passive-learning.d.ts +0 -61
  29. package/dist/src/local-session-passive-learning.js +0 -454
  30. package/dist/src/local-session-passive-learning.js.map +0 -1
  31. package/dist/src/ollama-client.d.ts +0 -46
  32. package/dist/src/ollama-client.js +0 -231
  33. package/dist/src/ollama-client.js.map +0 -1
  34. package/dist/src/openclaw-home-layout.d.ts +0 -17
  35. package/dist/src/openclaw-home-layout.js +0 -182
  36. package/dist/src/openclaw-home-layout.js.map +0 -1
  37. package/dist/src/openclaw-hook-truth.d.ts +0 -33
  38. package/dist/src/openclaw-hook-truth.js +0 -260
  39. package/dist/src/openclaw-hook-truth.js.map +0 -1
  40. package/dist/src/openclaw-plugin-install.d.ts +0 -40
  41. package/dist/src/openclaw-plugin-install.js +0 -282
  42. package/dist/src/provider-config.d.ts +0 -64
  43. package/dist/src/provider-config.js +0 -306
  44. package/dist/src/provider-config.js.map +0 -1
  45. package/dist/src/resolve-activation-root.d.ts +0 -27
  46. package/dist/src/resolve-activation-root.js +0 -190
  47. package/dist/src/resolve-activation-root.js.map +0 -1
  48. package/dist/src/semantic-metadata.d.ts +0 -5
  49. package/dist/src/semantic-metadata.js +0 -70
  50. package/dist/src/semantic-metadata.js.map +0 -1
  51. package/dist/src/session-store.d.ts +0 -168
  52. package/dist/src/session-store.js +0 -250
  53. package/dist/src/session-store.js.map +0 -1
  54. package/dist/src/session-tail.d.ts +0 -73
  55. package/dist/src/session-tail.js +0 -602
  56. package/dist/src/session-tail.js.map +0 -1
  57. package/dist/src/shadow-extension-proof.d.ts +0 -43
  58. package/dist/src/shadow-extension-proof.js +0 -218
  59. package/dist/src/shadow-extension-proof.js.map +0 -1
  60. package/dist/src/teacher-labeler.d.ts +0 -50
  61. package/dist/src/teacher-labeler.js +0 -424
  62. package/dist/src/teacher-labeler.js.map +0 -1
@@ -1,1730 +1,86 @@
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 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
- import { type EventExportLaneV1 } from "@openclawbrain/event-export";
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
- export { clearOpenClawProfileRuntimeLoadProof, listOpenClawProfileRuntimeLoadProofs, recordOpenClawProfileRuntimeLoadProof, resolveAttachmentRuntimeLoadProofsPath, type OpenClawProfileRuntimeLoadProofRecordV1, type OpenClawProfileRuntimeLoadProofSetV1, type OpenClawProfileRuntimeLoadProofsV1 } from "./attachment-truth.js";
7
- import { type AsyncTeacherLabelerConfigV1 } from "./teacher-labeler.js";
8
- export { createHttpOllamaTeacherLabelerClient, createOllamaTeacherLabeler, createTeacherLabeler, type AsyncTeacherLabelerConfigV1, type AsyncTeacherNoopLabelerConfigV1, type AsyncTeacherOllamaLabelerConfigV1, type OllamaTeacherLabelerClient, type TeacherLabeler, type TeacherLabelerResultV1, type TeacherLabelerRunInputV1 } from "./teacher-labeler.js";
9
- export declare const DEFAULT_ASYNC_TEACHER_QUEUE_CAPACITY = 8;
10
- declare const RECORDED_SESSION_TRACE_CONTRACT: "recorded_session_trace.v1";
11
- declare const RECORDED_SESSION_FIXTURE_CONTRACT: "recorded_session_replay_fixture.v1";
12
- declare const RECORDED_SESSION_BUNDLE_CONTRACT: "recorded_session_replay_bundle.v1";
13
- declare const RUNTIME_EVENT_EXPORT_BUNDLE_CONTRACT: "normalized_event_export_bundle.v1";
14
- export declare const RUNTIME_EVENT_EXPORT_BUNDLE_LAYOUT: {
15
- readonly manifest: "manifest.json";
16
- readonly payload: "normalized-event-export.json";
17
- };
1
+ import type { CompileSelectionMode } from "@openclawbrain/compiler";
2
+ import type {
3
+ ActivationPointerRecordV1,
4
+ BrainServeHotPathTimingV1,
5
+ ContextCompactionMode,
6
+ RouteMode,
7
+ RuntimeCompileResponseV1,
8
+ } from "@openclawbrain/contracts";
9
+ import type { ActivationSlotInspection } from "@openclawbrain/pack-format";
10
+
11
+ export {
12
+ clearOpenClawProfileRuntimeLoadProof,
13
+ listOpenClawProfileRuntimeLoadProofs,
14
+ recordOpenClawProfileRuntimeLoadProof,
15
+ resolveAttachmentRuntimeLoadProofsPath,
16
+ type OpenClawHomeProfileSource,
17
+ type OpenClawProfileRuntimeLoadProofRecordV1,
18
+ type OpenClawProfileRuntimeLoadProofSetV1,
19
+ type OpenClawProfileRuntimeLoadProofsV1,
20
+ } from "./attachment-truth.js";
21
+
18
22
  export interface CompileServeRouteBreadcrumbInput {
19
- invocationSurface: LearningSpineServeRouteBreadcrumbsV1["invocationSurface"];
20
- hostEvent: LearningSpineServeRouteBreadcrumbsV1["hostEvent"];
21
- installedEntryPath?: string | null;
23
+ invocationSurface: "direct_compile_call" | "installed_extension_before_prompt_build" | "runtime_turn_helper";
24
+ hostEvent: "before_prompt_build" | null;
25
+ installedEntryPath?: string | null;
22
26
  }
23
- export interface RuntimeEventExportBundleSummaryV1 {
24
- runtimeOwner: "openclaw";
25
- sessionId: string | null;
26
- channel: string | null;
27
- eventRange: Pick<NormalizedEventExportV1["range"], "start" | "end" | "count">;
28
- interactionCount: number;
29
- feedbackCount: number;
30
- sourceStreams: string[];
31
- contracts: NormalizedEventExportV1["provenance"]["contracts"];
32
- semanticSurface?: EventSemanticSurfaceV1;
33
- }
34
- export type ScannerExportStatusV1 = "complete" | "partial" | "failed";
35
- export interface ScannerExportManifestV1 {
36
- scannerId: string;
37
- lane: string;
38
- status: ScannerExportStatusV1;
39
- producedAt: string;
40
- sourceManifestPath: string | null;
41
- sourceManifestDigest: string | null;
42
- warnings: string[];
43
- failures: string[];
44
- }
45
- export interface ScannedEventExportInputV1 {
46
- interactionEvents: readonly InteractionEventV1[];
47
- feedbackEvents: readonly FeedbackEventV1[];
48
- scanner: ScannerExportManifestV1;
49
- }
50
- export type ScannedEventExportNoopReasonV1 = "scan_failed" | "no_events" | "invalid_scanner_manifest";
51
- export interface ScannedEventExportBuildSuccessV1 {
52
- ok: true;
53
- normalizedEventExport: NormalizedEventExportV1;
54
- scanner: ScannerExportManifestV1;
55
- warnings: string[];
56
- }
57
- export interface ScannedEventExportBuildFailureV1 {
58
- ok: false;
59
- normalizedEventExport: null;
60
- scanner: ScannerExportManifestV1;
61
- warnings: string[];
62
- reason: ScannedEventExportNoopReasonV1;
63
- error: string;
64
- }
65
- export type ScannedEventExportBuildResultV1 = ScannedEventExportBuildSuccessV1 | ScannedEventExportBuildFailureV1;
66
- export interface RuntimeEventExportBundleManifestV1 {
67
- contract: typeof RUNTIME_EVENT_EXPORT_BUNDLE_CONTRACT;
68
- exportName: string;
69
- exportedAt: string;
70
- payloadPath: string;
71
- payloadDigest: string;
72
- summary: RuntimeEventExportBundleSummaryV1;
73
- scanner?: ScannerExportManifestV1 | null;
74
- }
75
- export interface RuntimeEventExportBundleDescriptor {
76
- rootDir: string;
77
- manifestPath: string;
78
- payloadPath: string;
79
- manifest: RuntimeEventExportBundleManifestV1;
80
- normalizedEventExport: NormalizedEventExportV1;
81
- }
82
- export type CompileRuntimeBudgetStrategy = "fixed_v1" | "empirical_v1";
27
+
83
28
  export interface CompileRuntimeContextInput {
84
- activationRoot: string;
85
- message: string;
86
- agentId?: string;
87
- maxContextBlocks?: number;
88
- budgetStrategy?: CompileRuntimeBudgetStrategy;
89
- maxContextChars?: number;
90
- mode?: RouteMode;
91
- selectionMode?: CompileSelectionMode;
92
- compactionMode?: ContextCompactionMode;
93
- runtimeHints?: readonly string[];
94
- /** Optional session ID for serve-time route decision logging (extension callers). */
95
- sessionId?: string;
96
- /** Optional channel identifier for serve-time route decision logging (extension callers). */
97
- channel?: string;
98
- /** @internal Suppress serve-time logging inside compileRuntimeContext when called from runRuntimeTurn (which logs separately). */
99
- _suppressServeLog?: boolean;
100
- /** @internal Preserve explicit serve-route breadcrumbs for installed/runtime hook paths. */
101
- _serveRouteBreadcrumbs?: CompileServeRouteBreadcrumbInput;
102
- }
29
+ activationRoot: string;
30
+ message: string;
31
+ agentId?: string;
32
+ maxContextBlocks?: number;
33
+ budgetStrategy?: "fixed_v1" | "empirical_v1";
34
+ maxContextChars?: number;
35
+ mode?: RouteMode;
36
+ selectionMode?: CompileSelectionMode;
37
+ compactionMode?: ContextCompactionMode;
38
+ runtimeHints?: readonly string[];
39
+ sessionId?: string;
40
+ channel?: string;
41
+ _suppressServeLog?: boolean;
42
+ _serveRouteBreadcrumbs?: CompileServeRouteBreadcrumbInput;
43
+ }
44
+
103
45
  export interface ActiveCompileTarget {
104
- activationRoot: string;
105
- activePointer: ActivationPointerRecordV1;
106
- inspection: ActivationSlotInspection;
46
+ activationRoot: string;
47
+ activePointer: ActivationPointerRecordV1;
48
+ inspection: ActivationSlotInspection;
107
49
  }
50
+
108
51
  export interface RuntimeCompileSuccess {
109
- ok: true;
110
- fallbackToStaticContext: false;
111
- hardRequirementViolated: false;
112
- activationRoot: string;
113
- activePackId: string;
114
- packRootDir: string;
115
- compileResponse: RuntimeCompileResponseV1;
116
- brainContext: string;
117
- timing: BrainServeHotPathTimingV1;
118
- }
52
+ ok: true;
53
+ fallbackToStaticContext: false;
54
+ hardRequirementViolated: false;
55
+ activationRoot: string;
56
+ activePackId: string;
57
+ packRootDir: string;
58
+ compileResponse: RuntimeCompileResponseV1;
59
+ brainContext: string;
60
+ timing: BrainServeHotPathTimingV1;
61
+ }
62
+
119
63
  export interface RuntimeCompileFailOpenFailure {
120
- ok: false;
121
- fallbackToStaticContext: true;
122
- hardRequirementViolated: false;
123
- activationRoot: string;
124
- error: string;
125
- brainContext: string;
126
- timing: BrainServeHotPathTimingV1;
127
- }
64
+ ok: false;
65
+ fallbackToStaticContext: true;
66
+ hardRequirementViolated: false;
67
+ activationRoot: string;
68
+ error: string;
69
+ brainContext: string;
70
+ timing: BrainServeHotPathTimingV1;
71
+ }
72
+
128
73
  export interface RuntimeCompileHardFailure {
129
- ok: false;
130
- fallbackToStaticContext: false;
131
- hardRequirementViolated: true;
132
- activationRoot: string;
133
- error: string;
134
- brainContext: string;
135
- timing: BrainServeHotPathTimingV1;
136
- }
74
+ ok: false;
75
+ fallbackToStaticContext: false;
76
+ hardRequirementViolated: true;
77
+ activationRoot: string;
78
+ error: string;
79
+ brainContext: string;
80
+ timing: BrainServeHotPathTimingV1;
81
+ }
82
+
137
83
  export type RuntimeCompileFailure = RuntimeCompileFailOpenFailure | RuntimeCompileHardFailure;
138
84
  export type RuntimeCompileResult = RuntimeCompileSuccess | RuntimeCompileFailure;
139
- export interface AttachStatusInput {
140
- activationRoot: string;
141
- compile?: false | Omit<CompileRuntimeContextInput, "activationRoot">;
142
- }
143
- export type ContextContributionEvidenceState = ContextContributionEvidenceStateV1;
144
- export interface ContextAttributionSummaryV1 {
145
- selectedContextCount: number;
146
- stableKernelBlockCount: number;
147
- brainCompiledBlockCount: number;
148
- stableKernelSources: string[];
149
- brainCompiledSources: string[];
150
- selectionTiers: string | null;
151
- evidence: ContextContributionEvidenceState;
152
- detail: string;
153
- }
154
- export interface AttachCompileStatusV1 {
155
- ok: boolean;
156
- fallbackToStaticContext: boolean;
157
- hardRequirementViolated: boolean;
158
- activePackId: string | null;
159
- usedLearnedRouteFn: boolean | null;
160
- routerIdentity: string | null;
161
- selectionDigest: string | null;
162
- initMode: string | null;
163
- handoffState: string | null;
164
- seedSources: string[];
165
- contextAttribution: ContextAttributionSummaryV1;
166
- timing: BrainServeHotPathTimingV1;
167
- notes: string[];
168
- error: string | null;
169
- }
170
- export interface OpenClawCompileBoundaryV1 {
171
- contract: typeof CONTRACT_IDS.runtimeCompile;
172
- activationSlot: "active";
173
- entrypoint: "compileRuntimeContext";
174
- servedFromCandidateBeforePromotion: false;
175
- learnedRouteEvidenceRequiredWhenManifestRequiresIt: true;
176
- }
177
- export interface OpenClawEventExportBoundaryV1 {
178
- emittedContracts: readonly [typeof CONTRACT_IDS.interactionEvents, typeof CONTRACT_IDS.feedbackEvents];
179
- entrypoint: "runRuntimeTurn";
180
- bundleWriteOptional: true;
181
- writeFailuresEraseSuccessfulCompile: false;
182
- learningHandoffStaysOffHotPath: true;
183
- }
184
- export interface OpenClawActivePackBoundaryV1 {
185
- servingSlot: "active";
186
- inspectableSlots: readonly ActivationPointerSlot[];
187
- candidateServedBeforePromotion: false;
188
- previousSlotUsedForRollback: true;
189
- }
190
- export interface OpenClawPromotionBoundaryV1 {
191
- candidateSlot: "candidate";
192
- activeSlot: "active";
193
- previousSlot: "previous";
194
- requiresActivationReadyCandidate: true;
195
- compileSeesCandidateOnlyAfterPromotion: true;
196
- promotionHappensOffHotPath: true;
197
- }
198
- export interface OpenClawFailOpenSemanticsV1 {
199
- missingActivePackFallsBackToStaticContext: true;
200
- learnedRequiredRouteArtifactDriftHardFails: true;
201
- hardFailuresDisableStaticFallback: true;
202
- eventExportWriteFailurePreservesCompile: true;
203
- }
204
- export interface OpenClawLandingBoundariesV1 {
205
- compileBoundary: OpenClawCompileBoundaryV1;
206
- eventExportBoundary: OpenClawEventExportBoundaryV1;
207
- activePackBoundary: OpenClawActivePackBoundaryV1;
208
- promotionBoundary: OpenClawPromotionBoundaryV1;
209
- failOpenSemantics: OpenClawFailOpenSemanticsV1;
210
- runtimeResponsibilities: string[];
211
- brainResponsibilities: string[];
212
- }
213
- export interface AttachStatusSnapshotV1 {
214
- runtimeOwner: "openclaw";
215
- activationRoot: string;
216
- inspection: ActivationInspection;
217
- activeObservability: ActivationObservabilityReport | null;
218
- compile: AttachCompileStatusV1 | null;
219
- landingBoundaries: OpenClawLandingBoundariesV1;
220
- successSignals: string[];
221
- }
222
- export interface RollbackRuntimeAttachInput {
223
- activationRoot: string;
224
- updatedAt?: string;
225
- dryRun?: boolean;
226
- }
227
- export interface RollbackRuntimeAttachResult {
228
- runtimeOwner: "openclaw";
229
- activationRoot: string;
230
- updatedAt: string;
231
- dryRun: boolean;
232
- allowed: boolean;
233
- findings: string[];
234
- before: {
235
- activePackId: string | null;
236
- candidatePackId: string | null;
237
- previousPackId: string | null;
238
- };
239
- after: {
240
- activePackId: string | null;
241
- candidatePackId: string | null;
242
- previousPackId: string | null;
243
- } | null;
244
- restoredPackId: string | null;
245
- parkedCandidatePackId: string | null;
246
- }
247
- export interface BootstrapRuntimeAttachInput {
248
- profileSelector?: string | null;
249
- profileId?: string | null;
250
- brainAttachmentPolicy?: RuntimeTurnBrainAttachmentPolicyV1 | null;
251
- activationRoot: string;
252
- packRoot: string;
253
- packLabel: string;
254
- workspace: AdvanceAlwaysOnLearningRuntimeInput["workspace"];
255
- normalizedEventExport?: NormalizedEventExportV1;
256
- interactionEvents?: readonly InteractionEventV1[];
257
- feedbackEvents?: readonly FeedbackEventV1[];
258
- learnedRouting?: boolean;
259
- builtAt?: string;
260
- activatedAt?: string;
261
- offlineArtifacts?: string[];
262
- structuralOps?: Partial<ArtifactManifestV1["graphDynamics"]["structuralOps"]>;
263
- sparseFeedback?: Partial<SparseFeedbackPolicyV1>;
264
- compile?: false | Omit<CompileRuntimeContextInput, "activationRoot">;
265
- }
266
- export interface BootstrapRuntimeAttachNextStepV1 {
267
- id: "inspect_current_profile_status" | "preview_rollback_readiness" | "record_next_current_profile_turn" | "continue_current_profile_learning_loop";
268
- detail: string;
269
- command: string | null;
270
- }
271
- export interface BootstrapRuntimeAttachResult {
272
- runtimeOwner: "openclaw";
273
- profileSelector: string;
274
- operatorReadScope: "current_profile_only";
275
- activationRoot: string;
276
- packRoot: string;
277
- packId: string;
278
- normalizedEventExport: NormalizedEventExportV1;
279
- status: AttachStatusSnapshotV1;
280
- currentProfile: CurrentProfileBrainStatusV1;
281
- nextSteps: BootstrapRuntimeAttachNextStepV1[];
282
- }
283
- export declare function formatBootstrapRuntimeAttachReport(result: BootstrapRuntimeAttachResult): string;
284
- export interface RuntimeTurnCompileInput {
285
- createdAt?: string | null;
286
- sequence?: number | null;
287
- eventId?: string | null;
288
- }
289
- export interface RuntimeTurnDeliveryInput {
290
- createdAt?: string | null;
291
- sequence?: number | null;
292
- eventId?: string | null;
293
- messageId?: string | null;
294
- }
295
- export interface RuntimeTurnFeedbackInput {
296
- content: string;
297
- createdAt?: string | null;
298
- sequence?: number | null;
299
- eventId?: string | null;
300
- kind?: FeedbackEventKind | null;
301
- messageId?: string | null;
302
- relatedInteractionId?: string | null;
303
- actorName?: string | null;
304
- priorityHint?: PrincipalPriorityClassV1 | null;
305
- }
306
- export interface RuntimeTurnExportInput {
307
- rootDir: string;
308
- exportName?: string | null;
309
- exportedAt?: string | null;
310
- }
311
- export interface RuntimeTurnContextFingerprintInputV1 {
312
- promptContextFingerprints?: readonly string[] | null;
313
- workspaceInjectionSurface?: WorkspaceInjectionSurfaceV1 | null;
314
- profileLineage?: readonly string[] | null;
315
- sessionLineage?: readonly string[] | null;
316
- }
317
- export interface OpenClawRuntimeTurnInput {
318
- activationRoot?: string | null;
319
- agentId?: string | null;
320
- profileSelector?: string | null;
321
- profileId?: string | null;
322
- sessionId: string;
323
- channel: string;
324
- userId?: string | null;
325
- sourceStream?: string | null;
326
- userMessage: string;
327
- createdAt?: string | null;
328
- sequenceStart?: number | null;
329
- maxContextBlocks?: number;
330
- budgetStrategy?: CompileRuntimeBudgetStrategy;
331
- mode?: RouteMode;
332
- selectionMode?: CompileSelectionMode;
333
- runtimeHints?: readonly string[];
334
- brainAttachmentPolicy?: RuntimeTurnBrainAttachmentPolicyV1 | null;
335
- contextFingerprint?: RuntimeTurnContextFingerprintInputV1 | null;
336
- compile?: RuntimeTurnCompileInput | null;
337
- delivery?: boolean | RuntimeTurnDeliveryInput | null;
338
- feedback?: readonly (RuntimeTurnFeedbackInput | null)[] | null;
339
- export?: RuntimeTurnExportInput | null;
340
- }
341
- export interface RuntimeEventExportNoWrite {
342
- ok: true;
343
- wroteBundle: false;
344
- normalizedEventExport: NormalizedEventExportV1;
345
- }
346
- export interface RuntimeEventExportWriteSuccess {
347
- ok: true;
348
- wroteBundle: true;
349
- normalizedEventExport: NormalizedEventExportV1;
350
- rootDir: string;
351
- manifestPath: string;
352
- payloadPath: string;
353
- manifest: RuntimeEventExportBundleManifestV1;
354
- }
355
- export interface RuntimeEventExportFailure {
356
- ok: false;
357
- wroteBundle: false;
358
- error: string;
359
- }
360
- export type RuntimeEventExportResult = RuntimeEventExportNoWrite | RuntimeEventExportWriteSuccess | RuntimeEventExportFailure;
361
- export interface RunRuntimeTurnOptions {
362
- activationRoot?: string;
363
- failOpen?: boolean;
364
- }
365
- export type RuntimeTurnResult = RuntimeCompileResult & {
366
- eventExport: RuntimeEventExportResult;
367
- warnings: string[];
368
- };
369
- export type TeacherLoopNoOpReason = "none" | "duplicate_export" | "queue_full" | "no_teacher_artifacts" | "empty_scan";
370
- export interface AsyncTeacherLiveLoopInput extends Pick<AdvanceAlwaysOnLearningRuntimeInput, "packLabel" | "workspace" | "learnedRouting" | "builtAt" | "offlineArtifacts" | "structuralOps" | "sparseFeedback" | "liveSliceSize" | "backfillSliceSize" | "cadence"> {
371
- maxQueuedExports?: number;
372
- staleAfterMs?: number;
373
- resumeFromSnapshot?: AsyncTeacherLiveLoopSnapshotV1 | null;
374
- resolveLearnedRoutingState?: () => {
375
- pgVersion?: AdvanceAlwaysOnLearningRuntimeInput["pgVersion"];
376
- serveTimeDecisions?: LearningSpineServeRouteDecisionLogEntryV1[];
377
- baselineState?: BaselineStateV1;
378
- };
379
- persistUpdatedBaseline?: (state: BaselineStateV1) => void;
380
- teacherLabeler?: AsyncTeacherLabelerConfigV1 | null;
381
- }
382
- export interface AsyncTeacherQueuedExportJobV1 {
383
- jobId: string;
384
- exportDigest: string;
385
- observedAt: string;
386
- normalizedEventExport: NormalizedEventExportV1;
387
- }
388
- export interface AsyncTeacherLiveLoopDiagnosticsV1 {
389
- acceptedExportCount: number;
390
- processedExportCount: number;
391
- duplicateExportCount: number;
392
- droppedExportCount: number;
393
- emittedArtifactCount: number;
394
- dedupedArtifactCount: number;
395
- lastProcessedAt: string | null;
396
- latestFreshness: TeacherSupervisionArtifactV1["freshness"]["status"] | "none";
397
- lastNoOpReason: TeacherLoopNoOpReason;
398
- notes: string[];
399
- }
400
- export interface AsyncTeacherLiveLoopSnapshotV1 {
401
- runtimeOwner: "openclaw";
402
- queue: {
403
- capacity: number;
404
- depth: number;
405
- running: boolean;
406
- };
407
- teacher: {
408
- artifactCount: number;
409
- artifacts: TeacherSupervisionArtifactV1[];
410
- latestFreshness: TeacherSupervisionArtifactV1["freshness"]["status"] | "none";
411
- };
412
- learner: {
413
- state: AlwaysOnLearningRuntimeStateV1;
414
- lastMaterialization: AlwaysOnLearningMaterializationJobV1 | null;
415
- };
416
- diagnostics: AsyncTeacherLiveLoopDiagnosticsV1;
417
- state?: {
418
- interactionEvents: InteractionEventV1[];
419
- feedbackEvents: FeedbackEventV1[];
420
- seenExportDigests: string[];
421
- };
422
- runtime?: {
423
- startedAt: string | null;
424
- lastHeartbeatAt: string | null;
425
- lastScanAt: string | null;
426
- scanRoot: string | null;
427
- lastAppliedMaterializationJobId: string | null;
428
- };
429
- }
430
- export interface AsyncTeacherEnqueueResultV1 {
431
- accepted: boolean;
432
- exportDigest: string;
433
- queueDepth: number;
434
- notes: string[];
435
- reason: Exclude<TeacherLoopNoOpReason, "none"> | null;
436
- }
437
- export interface AsyncTeacherScannedEnqueueResultV1 {
438
- accepted: boolean;
439
- exportDigest: string | null;
440
- queueDepth: number;
441
- notes: string[];
442
- reason: Exclude<TeacherLoopNoOpReason, "none"> | ScannedEventExportNoopReasonV1 | null;
443
- warnings: string[];
444
- error: string | null;
445
- scanner: ScannerExportManifestV1;
446
- }
447
- export type AsyncTeacherScannerScanNoOpReasonV1 = "none" | "empty_scan" | "duplicate_exports" | "queue_full";
448
- export interface AsyncTeacherScannerScanHitResultV1 {
449
- lane: EventExportLaneV1;
450
- exportDigest: string;
451
- exportName: string;
452
- exportedAt: string;
453
- eventRange: Pick<NormalizedEventExportV1["range"], "start" | "end" | "count">;
454
- accepted: boolean;
455
- queueDepth: number;
456
- reason: AsyncTeacherEnqueueResultV1["reason"];
457
- }
458
- export interface AsyncTeacherScannerScanResultV1 {
459
- runtimeOwner: "openclaw";
460
- scanRoot: string;
461
- scannedAt: string;
462
- selectedCount: number;
463
- acceptedCount: number;
464
- duplicateCount: number;
465
- droppedCount: number;
466
- liveAcceptedCount: number;
467
- backfillAcceptedCount: number;
468
- duplicateScannerDigestCount: number;
469
- staleSkippedCount: number;
470
- invalidBundleCount: number;
471
- noOpReason: AsyncTeacherScannerScanNoOpReasonV1;
472
- notes: string[];
473
- results: AsyncTeacherScannerScanHitResultV1[];
474
- snapshot: AsyncTeacherLiveLoopSnapshotV1;
475
- }
476
- export interface CanonicalSupervisionFeedbackRecordV1 {
477
- eventId: string;
478
- kind: FeedbackEventKind;
479
- sequence: number;
480
- createdAt: string;
481
- content: string;
482
- relatedInteractionId: string | null;
483
- }
484
- export interface CanonicalSupervisionV1 {
485
- runtimeOwner: "openclaw";
486
- exportDigest: string;
487
- supervisionDigest: string;
488
- sessionId: string | null;
489
- channel: string | null;
490
- eventRange: Pick<NormalizedEventExportV1["range"], "start" | "end" | "count">;
491
- sourceStreams: string[];
492
- humanLabelCount: number;
493
- selfLabelCount: number;
494
- feedbackCounts: {
495
- corrections: number;
496
- teachings: number;
497
- approvals: number;
498
- suppressions: number;
499
- };
500
- compilePackIds: string[];
501
- relatedInteractionIds: string[];
502
- feedback: CanonicalSupervisionFeedbackRecordV1[];
503
- }
504
- export interface ContinuousProductLoopPackVersionV1 {
505
- version: number;
506
- packId: string;
507
- routePolicy: RuntimeCompileTargetV1["routePolicy"];
508
- routerIdentity: string | null;
509
- workspaceSnapshot: string;
510
- workspaceRevision: string | null;
511
- eventRange: RuntimeCompileTargetV1["eventRange"];
512
- eventExportDigest: string | null;
513
- builtAt: string;
514
- }
515
- export interface ContinuousProductLoopStateV1 {
516
- runtimeOwner: "openclaw";
517
- activationRoot: string;
518
- loopRoot: string;
519
- interactionEvents: InteractionEventV1[];
520
- feedbackEvents: FeedbackEventV1[];
521
- learner: AlwaysOnLearningRuntimeStateV1;
522
- runtimePlasticity: RuntimeGraphPlasticityStateV1 | null;
523
- activePackVersion: number;
524
- currentActivePack: ContinuousProductLoopPackVersionV1 | null;
525
- candidatePack: ContinuousProductLoopPackVersionV1 | null;
526
- packLineage: ContinuousProductLoopPackVersionV1[];
527
- nextPackVersion: number;
528
- promotionCount: number;
529
- lastSupervision: CanonicalSupervisionV1 | null;
530
- }
531
- export interface ContinuousProductLoopLearningUpdateV1 {
532
- warnings: string[];
533
- supervisionDigest: string | null;
534
- bridgeDigest: string | null;
535
- selectedSliceIds: string[];
536
- materializationJobId: string | null;
537
- materializationReason: AlwaysOnLearningMaterializationJobV1["reason"] | null;
538
- materializationLane: AlwaysOnLearningMaterializationJobV1["lane"] | null;
539
- candidateRootDir: string | null;
540
- candidatePack: ContinuousProductLoopPackVersionV1 | null;
541
- runtimePlasticity: RuntimeGraphPlasticityStateV1 | null;
542
- promotionAllowed: boolean;
543
- promotionFindings: string[];
544
- promoted: boolean;
545
- }
546
- export interface RunContinuousProductLoopTurnInput {
547
- activationRoot: string;
548
- loopRoot: string;
549
- packLabel: string;
550
- workspace: AdvanceAlwaysOnLearningRuntimeInput["workspace"];
551
- turn: OpenClawRuntimeTurnInput;
552
- state?: ContinuousProductLoopStateV1;
553
- learnedRouting?: boolean;
554
- failOpen?: boolean;
555
- autoPromote?: boolean;
556
- candidateBuiltAt?: string | null;
557
- stageUpdatedAt?: string | null;
558
- promoteUpdatedAt?: string | null;
559
- offlineArtifacts?: string[];
560
- structuralOps?: Partial<ArtifactManifestV1["graphDynamics"]["structuralOps"]>;
561
- sparseFeedback?: Partial<SparseFeedbackPolicyV1>;
562
- liveSliceSize?: number;
563
- backfillSliceSize?: number;
564
- cadence?: Partial<AlwaysOnLearningCadenceV1>;
565
- }
566
- export interface ContinuousProductLoopTurnResultV1 {
567
- runtimeOwner: "openclaw";
568
- compileActiveVersion: number;
569
- compileActivePackId: string | null;
570
- turn: RuntimeTurnResult;
571
- supervision: CanonicalSupervisionV1 | null;
572
- learning: ContinuousProductLoopLearningUpdateV1;
573
- state: ContinuousProductLoopStateV1;
574
- }
575
- export declare function buildCanonicalSupervision(normalizedEventExport: NormalizedEventExportV1): CanonicalSupervisionV1;
576
- export declare function createContinuousProductLoopState(input: {
577
- activationRoot: string;
578
- loopRoot: string;
579
- }): ContinuousProductLoopStateV1;
580
- export declare class AsyncTeacherLiveLoop {
581
- private readonly input;
582
- private readonly queueCapacity;
583
- private readonly staleAfterMs;
584
- private readonly teacherLabeler;
585
- private readonly queuedExportDigests;
586
- private readonly seenExportDigests;
587
- private queue;
588
- private drainPromise;
589
- private interactionEvents;
590
- private feedbackEvents;
591
- private teacherArtifacts;
592
- private learnerState;
593
- private lastMaterialization;
594
- private lastTeacherLabelerResult;
595
- private diagnostics;
596
- constructor(input: AsyncTeacherLiveLoopInput);
597
- enqueueNormalizedEventExport(normalizedEventExport: NormalizedEventExportV1, options?: {
598
- observedAt?: string;
599
- }): AsyncTeacherEnqueueResultV1;
600
- enqueueScannedEventExport(scannedEventExport: ScannedEventExportInputV1, options?: {
601
- observedAt?: string;
602
- }): AsyncTeacherScannedEnqueueResultV1;
603
- ingestRuntimeEventExportScannerScan(scan: RuntimeEventExportScannerScanResultV1): Promise<AsyncTeacherScannerScanResultV1>;
604
- flush(): Promise<AsyncTeacherLiveLoopSnapshotV1>;
605
- snapshot(): AsyncTeacherLiveLoopSnapshotV1;
606
- private ensureDrain;
607
- private drain;
608
- private refreshNotes;
609
- }
610
- export declare function createAsyncTeacherLiveLoop(input: AsyncTeacherLiveLoopInput): AsyncTeacherLiveLoop;
611
- export interface ScannerLiveWorkspaceInputV1 {
612
- workspaceId: string;
613
- snapshotId: string;
614
- capturedAt: string;
615
- rootDir: string;
616
- branch?: string | null;
617
- revision?: string | null;
618
- dirty?: boolean;
619
- manifestDigest?: string | null;
620
- labels?: readonly string[];
621
- files?: readonly string[];
622
- }
623
- export interface ScanRecordedSessionInputV1 {
624
- rootDir: string;
625
- trace: RecordedSessionTraceV1;
626
- }
627
- export interface ScanRecordedSessionResultV1 {
628
- runtimeOwner: "openclaw";
629
- scanMode: "session";
630
- rootDir: string;
631
- fixtureHash: string;
632
- bundle: RecordedSessionReplayBundleV1;
633
- }
634
- export interface ScanLiveEventExportInputV1 {
635
- normalizedEventExport: NormalizedEventExportV1;
636
- workspace: ScannerLiveWorkspaceInputV1;
637
- packLabel?: string | null;
638
- observedAt?: string | null;
639
- builtAt?: string | null;
640
- learnedRouting?: boolean;
641
- staleAfterMs?: number;
642
- liveSliceSize?: number;
643
- backfillSliceSize?: number;
644
- }
645
- export interface ScanLiveEventExportResultV1 {
646
- runtimeOwner: "openclaw";
647
- scanMode: "live";
648
- observedAt: string;
649
- packLabel: string;
650
- supervision: CanonicalSupervisionV1;
651
- snapshot: AsyncTeacherLiveLoopSnapshotV1;
652
- labelFlow: OperatorLabelFlowSummary;
653
- learningPath: OperatorLearningPathSummary;
654
- }
655
- export declare function scanRecordedSession(input: ScanRecordedSessionInputV1): ScanRecordedSessionResultV1;
656
- export declare function scanLiveEventExport(input: ScanLiveEventExportInputV1): ScanLiveEventExportResultV1;
657
- export declare function resolveAsyncTeacherLiveLoopSnapshotPath(activationRoot: string): string;
658
- export declare const WATCH_STATE_DIRNAME = "watch";
659
- export declare const WATCH_SESSION_TAIL_CURSOR_BASENAME = "session-tail-cursor.json";
660
- export declare const WATCH_TEACHER_SNAPSHOT_BASENAME = "teacher-snapshot.json";
661
- export declare const DEFAULT_WATCH_POLL_INTERVAL_SECONDS = 30;
662
- export interface WatchTeacherSnapshotFailureV1 {
663
- mode: "materialization_failed" | "teacher_fail_open";
664
- detail: string;
665
- at: string;
666
- }
667
- export interface WatchTeacherSnapshotTeacherSummaryV1 {
668
- artifactCount: number;
669
- latestFreshness: AsyncTeacherLiveLoopDiagnosticsV1["latestFreshness"] | "unavailable";
670
- acceptedExportCount: number;
671
- processedExportCount: number;
672
- duplicateExportCount: number;
673
- droppedExportCount: number;
674
- emittedArtifactCount: number;
675
- dedupedArtifactCount: number;
676
- lastProcessedAt: string | null;
677
- lastNoOpReason: TeacherLoopNoOpReason;
678
- queueDepth: number;
679
- queueCapacity: number;
680
- running: boolean;
681
- lastAppliedMaterializationJobId: string | null;
682
- lastMaterializedPackId: string | null;
683
- }
684
- export interface WatchTeacherSnapshotLearningSummaryV1 {
685
- bootstrapped: boolean;
686
- mode: AlwaysOnLearningRuntimePlanV1["mode"];
687
- nextPriorityLane: AlwaysOnLearningRuntimePlanV1["nextPriorityLane"];
688
- nextPriorityBucket: AlwaysOnLearningRuntimePlanV1["nextPriorityBucket"];
689
- pendingLive: number;
690
- pendingBackfill: number;
691
- pendingTotal: number;
692
- pendingByBucket: AlwaysOnLearningRuntimePlanV1["pending"]["byBucket"];
693
- materializationCount: number;
694
- lastMaterializedAt: string | null;
695
- lastMaterializationReason: AlwaysOnLearningMaterializationJobV1["reason"] | null;
696
- lastMaterializationLane: AlwaysOnLearningMaterializationJobV1["lane"] | null;
697
- lastMaterializedPackId: string | null;
698
- lastHandledMaterializationPackId: string | null;
699
- }
700
- export interface WatchTeacherSnapshotLabelingSummaryV1 {
701
- learningCadence: LearningCadence;
702
- scanPolicy: LearningScanPolicy;
703
- liveSlicesPerCycle: number;
704
- backfillSlicesPerCycle: number;
705
- teacherBudget: number;
706
- teacherDelayMs: number;
707
- backgroundLabelAmplification: number;
708
- }
709
- export interface WatchEmbedInstrumentationPointV1 {
710
- slot: "candidate" | "active" | null;
711
- packId: string | null;
712
- runtimeEmbedderPresent: boolean;
713
- runtimeEmbedderModel: string | null;
714
- vectorEntryCount: number | null;
715
- numericEmbeddingEntryCount: number | null;
716
- embeddingModels: string[];
717
- error: string | null;
718
- }
719
- export interface WatchEmbedInstrumentationTraceV1 {
720
- observedAt: string;
721
- candidatePackId: string | null;
722
- promotionAllowed: boolean | null;
723
- promotionFindings: string[];
724
- beforeCandidateMaterialization: WatchEmbedInstrumentationPointV1;
725
- afterCandidateMaterialization: WatchEmbedInstrumentationPointV1 | null;
726
- afterStage: WatchEmbedInstrumentationPointV1 | null;
727
- afterPromote: WatchEmbedInstrumentationPointV1 | null;
728
- }
729
- export interface WatchTeacherSnapshotFileV1 {
730
- contract: "openclaw_watch_teacher_snapshot.v1";
731
- runtimeOwner: "openclaw";
732
- updatedAt: string;
733
- lastRunAt: string;
734
- pollIntervalSeconds: number;
735
- scanRoot: string;
736
- sessionTailCursorPath: string;
737
- sessionTailCursorUpdatedAt: string;
738
- sessionTailSessionsTracked: number;
739
- sessionTailBridgedEventCount: number;
740
- scannerCheckpointPath: string;
741
- scannerCheckpoint: RuntimeEventExportScannerCheckpointV1;
742
- replayedBundleCount: number;
743
- replayedEventCount: number;
744
- exportedBundleCount: number;
745
- exportedEventCount: number;
746
- startupWarnings: string[];
747
- lastTeacherError: string | null;
748
- localSessionTailNoopReason: string | null;
749
- lastHandledMaterializationPackId: string | null;
750
- teacher: WatchTeacherSnapshotTeacherSummaryV1;
751
- learning: WatchTeacherSnapshotLearningSummaryV1;
752
- labeling: WatchTeacherSnapshotLabelingSummaryV1;
753
- lastObservedDelta: CurrentProfilePassiveLearningDeltaSummaryV1;
754
- embedInstrumentation: WatchEmbedInstrumentationTraceV1 | null;
755
- failure: WatchTeacherSnapshotFailureV1 | null;
756
- snapshot: AsyncTeacherLiveLoopSnapshotV1;
757
- }
758
- export interface LoadedTeacherSurfaceV1 {
759
- sourcePath: string;
760
- sourceKind: "watch_snapshot" | "async_snapshot";
761
- snapshot: AsyncTeacherLiveLoopSnapshotV1;
762
- watchSnapshot: WatchTeacherSnapshotFileV1 | null;
763
- }
764
- export declare function resolveWatchStateRoot(activationRoot: string): string;
765
- export declare function resolveWatchSessionTailCursorPath(activationRoot: string): string;
766
- export declare function resolveWatchTeacherSnapshotPath(activationRoot: string): string;
767
- export declare function resolveOperatorTeacherSnapshotPath(activationRoot: string, explicitPath: string | null | undefined): string | null;
768
- export declare function loadTeacherSurface(snapshotPath: string): LoadedTeacherSurfaceV1 | null;
769
- export declare function loadWatchTeacherSnapshotState(snapshotPath: string): {
770
- lastHandledMaterializationPackId: string | null;
771
- lastObservedDelta: CurrentProfilePassiveLearningDeltaSummaryV1;
772
- embedInstrumentation: WatchEmbedInstrumentationTraceV1 | null;
773
- snapshot: AsyncTeacherLiveLoopSnapshotV1 | null;
774
- error: string | null;
775
- };
776
- export declare function persistWatchTeacherSnapshot(snapshotPath: string, input: {
777
- lastRunAt: string;
778
- pollIntervalSeconds: number;
779
- scanRoot: string;
780
- sessionTailCursorPath: string;
781
- sessionTailCursorUpdatedAt: string;
782
- sessionTailSessionsTracked: number;
783
- sessionTailBridgedEventCount: number;
784
- scannerCheckpointPath: string;
785
- scannerCheckpoint: RuntimeEventExportScannerCheckpointV1;
786
- replayedBundleCount: number;
787
- replayedEventCount: number;
788
- exportedBundleCount: number;
789
- exportedEventCount: number;
790
- startupWarnings: readonly string[];
791
- lastTeacherError: string | null;
792
- localSessionTailNoopReason: string | null;
793
- lastHandledMaterializationPackId: string | null;
794
- lastObservedDelta: CurrentProfilePassiveLearningDeltaSummaryV1;
795
- embedInstrumentation?: WatchEmbedInstrumentationTraceV1 | null;
796
- failure: WatchTeacherSnapshotFailureV1 | null;
797
- snapshot: AsyncTeacherLiveLoopSnapshotV1;
798
- }): WatchTeacherSnapshotFileV1;
799
- export declare function loadAsyncTeacherLiveLoopSnapshot(snapshotPath: string): AsyncTeacherLiveLoopSnapshotV1;
800
- export declare function buildRuntimeEventExportBundleManifest(input: {
801
- exportName: string;
802
- exportedAt: string;
803
- payloadPath: string;
804
- normalizedEventExport: NormalizedEventExportV1;
805
- scanner?: ScannerExportManifestV1 | null;
806
- }): RuntimeEventExportBundleManifestV1;
807
- export declare function validateRuntimeEventExportBundleManifest(value: RuntimeEventExportBundleManifestV1, normalizedEventExport?: NormalizedEventExportV1): string[];
808
- export declare function loadRuntimeEventExportBundle(rootDir: string): RuntimeEventExportBundleDescriptor;
809
- export declare function buildNormalizedEventExportFromScannedEvents(input: ScannedEventExportInputV1): ScannedEventExportBuildResultV1;
810
- declare const RUNTIME_EVENT_EXPORT_SCANNER_CHECKPOINT_CONTRACT: "runtime_event_export_scanner_checkpoint.v1";
811
- export declare const DEFAULT_RUNTIME_EVENT_EXPORT_SCANNER_LIVE_TAIL_BUNDLES = 2;
812
- export declare const DEFAULT_RUNTIME_EVENT_EXPORT_SCANNER_BACKFILL_BUNDLES_PER_PASS = 1;
813
- export declare const DEFAULT_RUNTIME_EVENT_EXPORT_SCANNER_STALE_HISTORY_MS: number;
814
- export declare const DEFAULT_RUNTIME_EVENT_EXPORT_SCANNER_CHECKPOINT_BASENAME = ".openclawbrain-scanner-checkpoint.json";
815
- export interface RuntimeEventExportScannerBundleCursorV1 {
816
- exportDigest: string;
817
- exportName: string;
818
- exportedAt: string;
819
- eventRange: Pick<NormalizedEventExportV1["range"], "start" | "end" | "count">;
820
- }
821
- export interface RuntimeEventExportScannerCheckpointV1 {
822
- contract: typeof RUNTIME_EVENT_EXPORT_SCANNER_CHECKPOINT_CONTRACT;
823
- runtimeOwner: "openclaw";
824
- scanRoot: string;
825
- updatedAt: string;
826
- live: {
827
- after: RuntimeEventExportScannerBundleCursorV1 | null;
828
- };
829
- backfill: {
830
- before: RuntimeEventExportScannerBundleCursorV1 | null;
831
- exhausted: boolean;
832
- staleBefore: string | null;
833
- };
834
- processedExportDigests: string[];
835
- stats: {
836
- scanPasses: number;
837
- liveBundlesScanned: number;
838
- backfillBundlesScanned: number;
839
- duplicateBundlesSkipped: number;
840
- staleBundlesSkipped: number;
841
- invalidBundlesSkipped: number;
842
- };
843
- }
844
- export interface RuntimeEventExportScannerInput {
845
- scanRoot: string;
846
- checkpointPath?: string;
847
- liveTailBundles?: number;
848
- backfillBundlesPerPass?: number;
849
- staleHistoryMs?: number;
850
- }
851
- export interface RuntimeEventExportScannerInvalidBundleV1 {
852
- rootDir: string;
853
- error: string;
854
- }
855
- export type RuntimeEventExportScannerPriorityBucketV1 = "live" | "principal_backfill" | "backfill" | "stale_history";
856
- export interface RuntimeEventExportScannerQueueEntryV1 {
857
- lane: EventExportLaneV1;
858
- rootDir: string;
859
- exportDigest: string;
860
- exportName: string;
861
- exportedAt: string;
862
- eventRange: Pick<NormalizedEventExportV1["range"], "start" | "end" | "count">;
863
- priorityBucket: RuntimeEventExportScannerPriorityBucketV1;
864
- priorityScore: number;
865
- priorityReasons: string[];
866
- humanLabelCount: number;
867
- feedbackCount: number;
868
- teacherRoles: PrincipalRoleV1[];
869
- teacherAuthorities: TeacherAuthorityV1[];
870
- priorityClasses: PrincipalPriorityClassV1[];
871
- scopedPrincipalEventCount: number;
872
- supersedingPrincipalEventCount: number;
873
- staleHistory: boolean;
874
- ageMsFromLatest: number | null;
875
- }
876
- export interface RuntimeEventExportScannerHitV1 {
877
- lane: EventExportLaneV1;
878
- rootDir: string;
879
- exportDigest: string;
880
- exportName: string;
881
- exportedAt: string;
882
- eventRange: Pick<NormalizedEventExportV1["range"], "start" | "end" | "count">;
883
- priorityBucket: RuntimeEventExportScannerPriorityBucketV1;
884
- priorityScore: number;
885
- priorityReasons: string[];
886
- humanLabelCount: number;
887
- feedbackCount: number;
888
- teacherRoles: PrincipalRoleV1[];
889
- teacherAuthorities: TeacherAuthorityV1[];
890
- priorityClasses: PrincipalPriorityClassV1[];
891
- scopedPrincipalEventCount: number;
892
- supersedingPrincipalEventCount: number;
893
- staleHistory: boolean;
894
- ageMsFromLatest: number | null;
895
- normalizedEventExport: NormalizedEventExportV1;
896
- }
897
- export interface RuntimeEventExportScannerQueueV1 {
898
- ageFloor: {
899
- newestExportedAt: string | null;
900
- staleBefore: string | null;
901
- staleHistoryMs: number;
902
- };
903
- live: RuntimeEventExportScannerQueueEntryV1[];
904
- backfill: RuntimeEventExportScannerQueueEntryV1[];
905
- staleHistory: RuntimeEventExportScannerQueueEntryV1[];
906
- }
907
- export interface RuntimeEventExportScannerScanResultV1 {
908
- runtimeOwner: "openclaw";
909
- scanRoot: string;
910
- checkpointPath: string;
911
- scannedAt: string;
912
- live: RuntimeEventExportScannerHitV1[];
913
- backfill: RuntimeEventExportScannerHitV1[];
914
- selected: RuntimeEventExportScannerHitV1[];
915
- queue: RuntimeEventExportScannerQueueV1;
916
- duplicateExportDigests: string[];
917
- staleSkippedExportDigests: string[];
918
- invalidBundles: RuntimeEventExportScannerInvalidBundleV1[];
919
- idle: boolean;
920
- checkpoint: RuntimeEventExportScannerCheckpointV1;
921
- }
922
- export interface RuntimeEventExportScannerLoopOptionsV1 {
923
- pollIntervalMs?: number;
924
- maxPasses?: number;
925
- stopWhenIdle?: boolean;
926
- signal?: AbortSignal;
927
- onPass?: (result: RuntimeEventExportScannerScanResultV1) => void | Promise<void>;
928
- }
929
- export interface RuntimeEventExportScannerLoopResultV1 {
930
- runtimeOwner: "openclaw";
931
- passCount: number;
932
- liveBundlesScanned: number;
933
- backfillBundlesScanned: number;
934
- stoppedReason: "idle" | "max_passes" | "aborted";
935
- lastScan: RuntimeEventExportScannerScanResultV1 | null;
936
- checkpoint: RuntimeEventExportScannerCheckpointV1;
937
- }
938
- export declare function createRuntimeEventExportScannerCheckpoint(input: {
939
- scanRoot: string;
940
- updatedAt?: string;
941
- }): RuntimeEventExportScannerCheckpointV1;
942
- export declare function validateRuntimeEventExportScannerCheckpoint(value: RuntimeEventExportScannerCheckpointV1): string[];
943
- export declare function loadRuntimeEventExportScannerCheckpoint(checkpointPath: string): RuntimeEventExportScannerCheckpointV1;
944
- export declare class RuntimeEventExportScanner {
945
- readonly scanRoot: string;
946
- readonly checkpointPath: string;
947
- readonly liveTailBundles: number;
948
- readonly backfillBundlesPerPass: number;
949
- readonly staleHistoryMs: number;
950
- private checkpoint;
951
- constructor(input: RuntimeEventExportScannerInput);
952
- snapshot(): RuntimeEventExportScannerCheckpointV1;
953
- restoreCheckpoint(checkpoint: RuntimeEventExportScannerCheckpointV1): void;
954
- scanOnce(options?: {
955
- scannedAt?: string;
956
- }): RuntimeEventExportScannerScanResultV1;
957
- runLoop(options?: RuntimeEventExportScannerLoopOptionsV1): Promise<RuntimeEventExportScannerLoopResultV1>;
958
- }
959
- export declare function createRuntimeEventExportScanner(input: RuntimeEventExportScannerInput): RuntimeEventExportScanner;
960
- export declare function classifyFeedbackKind(content: string): FeedbackEventKind;
961
- export declare function formatPromptContext(compileResponse: RuntimeCompileResponseV1): string;
962
- export interface EmpiricalStructuralBudgetEvidenceV1 {
963
- split: number;
964
- merge: number;
965
- prune: number;
966
- connect: number;
967
- }
968
- export interface ResolvedCompileBudgetV1 {
969
- requestedStrategy: CompileRuntimeBudgetStrategy;
970
- effectiveStrategy: CompileRuntimeBudgetStrategy;
971
- maxContextBlocks: number;
972
- defaultMaxContextBlocks: number;
973
- evidence: EmpiricalStructuralBudgetEvidenceV1;
974
- evidenceTotal: number;
975
- tendencies: EmpiricalStructuralBudgetEvidenceV1;
976
- notes: string[];
977
- }
978
- export interface CompileStructuralBudgetSignalEvidenceV1 {
979
- expansionCandidates: number;
980
- traversalActivations: number;
981
- overlapPruned: number;
982
- }
983
- export declare function deriveEmpiricalStructuralBudget(input: {
984
- requestedStrategy?: CompileRuntimeBudgetStrategy;
985
- requestedMaxContextBlocks?: number;
986
- evolution?: Pick<PackGraphEvolutionV1, "structuralOps" | "prunedBlockIds"> | null;
987
- defaultMaxContextBlocks?: number;
988
- minimumMaxContextBlocks?: number;
989
- maximumMaxContextBlocks?: number;
990
- }): ResolvedCompileBudgetV1;
991
- export declare function deriveEmpiricalStructuralBudgetFromCompileSignals(input: {
992
- requestedStrategy?: CompileRuntimeBudgetStrategy;
993
- requestedMaxContextBlocks?: number;
994
- structuralSignals?: Pick<RuntimeCompileStructuralSignalsV1, "matchedCandidateCount" | "selectedMatchedCount" | "overlapPrunedCount" | "traversalActivatedCount"> | null;
995
- defaultMaxContextBlocks?: number;
996
- minimumMaxContextBlocks?: number;
997
- maximumMaxContextBlocks?: number;
998
- }): ResolvedCompileBudgetV1;
999
- export declare function resolveActivePackForCompile(activationRoot: string): ActiveCompileTarget;
85
+
1000
86
  export declare function compileRuntimeContext(input: CompileRuntimeContextInput): RuntimeCompileResult;
1001
- export declare function describeAttachStatus(input: AttachStatusInput): AttachStatusSnapshotV1;
1002
- export declare function rollbackRuntimeAttach(input: RollbackRuntimeAttachInput): RollbackRuntimeAttachResult;
1003
- export declare function bootstrapRuntimeAttach(input: BootstrapRuntimeAttachInput): BootstrapRuntimeAttachResult;
1004
- export declare function buildNormalizedRuntimeEventExport(turn: OpenClawRuntimeTurnInput, compileResult: RuntimeCompileResult): NormalizedEventExportV1;
1005
- export interface WriteScannedEventExportBundleInputV1 {
1006
- rootDir: string;
1007
- exportName?: string | null;
1008
- exportedAt?: string | null;
1009
- scannedEventExport: ScannedEventExportInputV1;
1010
- }
1011
- export type WriteScannedEventExportBundleResultV1 = RuntimeEventExportWriteSuccess | ScannedEventExportBuildFailureV1;
1012
- export declare function writeRuntimeEventExportBundle(turn: OpenClawRuntimeTurnInput, normalizedEventExport: NormalizedEventExportV1): RuntimeEventExportNoWrite | RuntimeEventExportWriteSuccess;
1013
- export declare function writeScannedEventExportBundle(input: WriteScannedEventExportBundleInputV1): WriteScannedEventExportBundleResultV1;
1014
- export declare function runRuntimeTurn(turn: OpenClawRuntimeTurnInput, options?: RunRuntimeTurnOptions): RuntimeTurnResult;
1015
- export declare function runContinuousProductLoopTurn(input: RunContinuousProductLoopTurnInput): ContinuousProductLoopTurnResultV1;
1016
- export type RecordedSessionReplayMode = "no_brain" | "seed_pack" | "learned_replay";
1017
- export interface RecordedSessionReplayWorkspaceV1 {
1018
- workspaceId: string;
1019
- snapshotId: string;
1020
- capturedAt: string;
1021
- rootDir: string;
1022
- branch?: string;
1023
- revision: string;
1024
- labels?: string[];
1025
- }
1026
- export interface RecordedSessionSeedCueV1 {
1027
- cueId: string;
1028
- createdAt: string;
1029
- content: string;
1030
- kind?: FeedbackEventKind;
1031
- }
1032
- export interface RecordedSessionTraceFeedbackV1 {
1033
- createdAt: string;
1034
- content: string;
1035
- kind?: FeedbackEventKind | null;
1036
- }
1037
- export interface RecordedSessionTraceTurnV1 {
1038
- turnId?: string;
1039
- createdAt: string;
1040
- deliveredAt?: string | null;
1041
- userMessage: string;
1042
- runtimeHints?: readonly string[];
1043
- feedback?: readonly RecordedSessionTraceFeedbackV1[];
1044
- expectedContextPhrases: readonly string[];
1045
- minimumPhraseHits?: number;
1046
- }
1047
- export interface RecordedSessionTraceV1 {
1048
- contract: typeof RECORDED_SESSION_TRACE_CONTRACT;
1049
- traceId: string;
1050
- source: "sanitized_recorded_session";
1051
- recordedAt: string;
1052
- bundleBuiltAt: string;
1053
- agentId?: string | null;
1054
- sessionId: string;
1055
- channel: string;
1056
- sourceStream: string;
1057
- privacy: {
1058
- sanitized: true;
1059
- notes: string[];
1060
- };
1061
- workspace: RecordedSessionReplayWorkspaceV1;
1062
- seedBuiltAt: string;
1063
- seedActivatedAt: string;
1064
- seedCues: readonly RecordedSessionSeedCueV1[];
1065
- turns: readonly RecordedSessionTraceTurnV1[];
1066
- }
1067
- export interface RecordedSessionReplayTurnFixtureV1 {
1068
- turnId: string;
1069
- turn: OpenClawRuntimeTurnInput;
1070
- expectedContextPhrases: string[];
1071
- minimumPhraseHits: number;
1072
- }
1073
- export interface RecordedSessionReplayFixtureV1 {
1074
- contract: typeof RECORDED_SESSION_FIXTURE_CONTRACT;
1075
- traceId: string;
1076
- source: RecordedSessionTraceV1["source"];
1077
- recordedAt: string;
1078
- bundleBuiltAt: string;
1079
- traceHash: string;
1080
- fixtureHash: string;
1081
- privacy: RecordedSessionTraceV1["privacy"];
1082
- workspace: RecordedSessionReplayWorkspaceV1;
1083
- seedBuiltAt: string;
1084
- seedActivatedAt: string;
1085
- seedExport: NormalizedEventExportV1;
1086
- turns: RecordedSessionReplayTurnFixtureV1[];
1087
- }
1088
- export interface RecordedSessionReplayTurnReportV1 {
1089
- turnId: string;
1090
- compileOk: boolean;
1091
- fallbackToStaticContext: boolean;
1092
- hardRequirementViolated: boolean;
1093
- activePackId: string | null;
1094
- usedLearnedRouteFn: boolean;
1095
- routerIdentity: string | null;
1096
- selectionDigest: string | null;
1097
- selectedContextIds: string[];
1098
- selectedContextTexts: string[];
1099
- eventExportDigest: string | null;
1100
- expectedContextPhrases: string[];
1101
- minimumPhraseHits: number;
1102
- phraseHits: string[];
1103
- missedPhrases: string[];
1104
- qualityScore: number;
1105
- compileActiveVersion: number | null;
1106
- promoted: boolean;
1107
- observability: {
1108
- scanPolicy: LearningScanPolicy | null;
1109
- scanSurfaces: string[];
1110
- humanLabelCount: number;
1111
- selfLabelCount: number;
1112
- totalEventCount: number;
1113
- attributedEventCount: number;
1114
- selectionDigestCount: number;
1115
- freshestSourceStream: string | null;
1116
- freshestCreatedAt: string | null;
1117
- };
1118
- warnings: string[];
1119
- }
1120
- export interface RecordedSessionReplayScannerEvidenceV1 {
1121
- exportTurnCount: number;
1122
- scanPolicy: LearningScanPolicy | null;
1123
- scanSurfaceCount: number;
1124
- scanSurfaces: string[];
1125
- humanLabelCount: number;
1126
- selfLabelCount: number;
1127
- totalEventCount: number;
1128
- attributedEventCount: number;
1129
- attributedTurnCount: number;
1130
- selectionDigestCount: number;
1131
- selectionDigestTurnCount: number;
1132
- activePackChangeCount: number;
1133
- freshestSourceStream: string | null;
1134
- freshestCreatedAt: string | null;
1135
- warnings: string[];
1136
- }
1137
- export interface RecordedSessionReplayModeSummaryV1 {
1138
- mode: RecordedSessionReplayMode;
1139
- qualityScore: number;
1140
- compileOkCount: number;
1141
- phraseHitCount: number;
1142
- phraseCount: number;
1143
- usedLearnedRouteTurnCount: number;
1144
- promotionCount: number;
1145
- packIds: string[];
1146
- scannerEvidence: RecordedSessionReplayScannerEvidenceV1;
1147
- scoreHash: string;
1148
- }
1149
- export interface RecordedSessionReplayModeReportV1 {
1150
- mode: RecordedSessionReplayMode;
1151
- summary: RecordedSessionReplayModeSummaryV1;
1152
- turns: RecordedSessionReplayTurnReportV1[];
1153
- }
1154
- export interface RecordedSessionReplayBundleV1 {
1155
- contract: typeof RECORDED_SESSION_BUNDLE_CONTRACT;
1156
- traceId: string;
1157
- source: RecordedSessionReplayFixtureV1["source"];
1158
- recordedAt: string;
1159
- generatedAt: string;
1160
- traceHash: string;
1161
- fixtureHash: string;
1162
- scoreHash: string;
1163
- bundleHash: string;
1164
- privacy: RecordedSessionReplayFixtureV1["privacy"];
1165
- modes: RecordedSessionReplayModeReportV1[];
1166
- summary: {
1167
- winnerMode: RecordedSessionReplayMode | null;
1168
- ranking: Array<{
1169
- mode: RecordedSessionReplayMode;
1170
- qualityScore: number;
1171
- }>;
1172
- };
1173
- }
1174
- export interface RecordedSessionReplayRescoreReportV1 {
1175
- scoreHash: string;
1176
- modes: Array<{
1177
- mode: RecordedSessionReplayMode;
1178
- qualityScore: number;
1179
- scoreHash: string;
1180
- }>;
1181
- }
1182
- export interface RecordedSessionReplayBundleHashVerificationV1 {
1183
- bundleHashMatches: boolean;
1184
- scoreHashMatches: boolean;
1185
- }
1186
- export declare function buildRecordedSessionReplayFixture(trace: RecordedSessionTraceV1): RecordedSessionReplayFixtureV1;
1187
- export declare function runRecordedSessionReplay(rootDir: string, fixture: RecordedSessionReplayFixtureV1): RecordedSessionReplayBundleV1;
1188
- export declare function rescoreRecordedSessionReplayBundle(bundle: RecordedSessionReplayBundleV1): RecordedSessionReplayRescoreReportV1;
1189
- export declare function verifyRecordedSessionReplayBundleHashes(bundle: RecordedSessionReplayBundleV1): RecordedSessionReplayBundleHashVerificationV1;
1190
- export type OperatorSurfaceStatus = "ok" | "warn" | "fail";
1191
- export type OperatorFindingSeverity = "pass" | "warn" | "fail";
1192
- export type OperatorLastPromotionConfidence = "proven_from_previous_pointer" | "unknown_from_local_pointers" | "no_active_pack";
1193
- export declare const OPERATOR_API_CONTRACT_ID: "openclaw_operator_api.v1";
1194
- export declare const SUPPORTED_OPERATOR_API_FAMILIES: readonly ["bootstrap_attach", "status", "export", "refresh", "promote", "rollback", "proof_observability"];
1195
- export type SupportedOperatorApiFamily = (typeof SUPPORTED_OPERATOR_API_FAMILIES)[number];
1196
- export type OperatorApiRouteScope = "cli" | "programmatic" | "proof_lane";
1197
- export interface OperatorApiRouteDescriptor {
1198
- family: SupportedOperatorApiFamily;
1199
- scope: OperatorApiRouteScope;
1200
- packageName: string;
1201
- entrypoints: readonly string[];
1202
- summary: string;
1203
- notes: readonly string[];
1204
- }
1205
- export interface OperatorApiContractV1 {
1206
- contract: typeof OPERATOR_API_CONTRACT_ID;
1207
- runtimeOwner: "openclaw";
1208
- scope: "narrow_supported_operator_surface";
1209
- families: readonly SupportedOperatorApiFamily[];
1210
- routes: readonly OperatorApiRouteDescriptor[];
1211
- quarantinedSurface: readonly string[];
1212
- }
1213
- export declare const OPERATOR_API_CONTRACT_V1: {
1214
- readonly contract: "openclaw_operator_api.v1";
1215
- readonly runtimeOwner: "openclaw";
1216
- readonly scope: "narrow_supported_operator_surface";
1217
- readonly families: readonly ["bootstrap_attach", "status", "export", "refresh", "promote", "rollback", "proof_observability"];
1218
- readonly routes: readonly [{
1219
- readonly family: "bootstrap_attach";
1220
- readonly scope: "programmatic";
1221
- readonly packageName: "@openclawbrain/openclaw";
1222
- readonly entrypoints: readonly ["bootstrapRuntimeAttach", "formatBootstrapRuntimeAttachReport", "describeAttachStatus"];
1223
- readonly summary: "Bootstrap the first current-profile attach, print the next operator step cleanly, and prove the initial handoff state without pretending live learning has already run.";
1224
- readonly notes: readonly ["Zero-event bootstrap is supported and stays explicit through awaiting_first_export.", "Attach serves only from activation's active slot after bootstrap completes.", "bootstrapRuntimeAttach() returns the canonical current-profile answer plus copy-paste-ready next-step output for the resolved activation root."];
1225
- }, {
1226
- readonly family: "status";
1227
- readonly scope: "cli";
1228
- readonly packageName: "@openclawbrain/openclaw";
1229
- readonly entrypoints: readonly ["openclawbrain status", "describeCurrentProfileBrainStatus"];
1230
- readonly summary: "Read the canonical current-profile brain-status object for the active Host/Profile/Brain/Attachment boundary.";
1231
- readonly notes: readonly ["Status is the first operator read path.", "describeCurrentProfileBrainStatus() freezes the supported Host/Profile/Brain/Attachment answer shape for the current profile.", "Use activation and export observability proof helpers when you need candidate/previous or export-freshness detail."];
1232
- }, {
1233
- readonly family: "export";
1234
- readonly scope: "programmatic";
1235
- readonly packageName: "@openclawbrain/openclaw";
1236
- readonly entrypoints: readonly ["buildNormalizedRuntimeEventExport", "writeRuntimeEventExportBundle", "loadRuntimeEventExportBundle"];
1237
- readonly summary: "Emit the deterministic learner handoff artifact explicitly instead of folding export into a larger implicit runtime loop.";
1238
- readonly notes: readonly ["Export is an off-hot-path operator handoff artifact, not proof of immediate active-pack mutation.", "Bundle roots and normalized payloads are both accepted downstream by observability surfaces."];
1239
- }, {
1240
- readonly family: "refresh";
1241
- readonly scope: "programmatic";
1242
- readonly packageName: "@openclawbrain/learner";
1243
- readonly entrypoints: readonly ["createAlwaysOnLearningRuntimeState", "advanceAlwaysOnLearningRuntime", "materializeAlwaysOnLearningCandidatePack"];
1244
- readonly summary: "Refresh candidate learning state explicitly through the learner boundary before any activation-pointer move happens.";
1245
- readonly notes: readonly ["Refresh is PG-only candidate-pack materialization in this repo.", "Refresh does not mutate the currently served active pack in place."];
1246
- }, {
1247
- readonly family: "promote";
1248
- readonly scope: "programmatic";
1249
- readonly packageName: "@openclawbrain/pack-format";
1250
- readonly entrypoints: readonly ["stageCandidatePack", "promoteCandidatePack"];
1251
- readonly summary: "Stage and promote activation-ready candidate packs through explicit pointer changes.";
1252
- readonly notes: readonly ["Promotion is the only path that changes which pack is served.", "Candidate and previous remain inspectable around the pointer move."];
1253
- }, {
1254
- readonly family: "rollback";
1255
- readonly scope: "cli";
1256
- readonly packageName: "@openclawbrain/openclaw";
1257
- readonly entrypoints: readonly ["openclawbrain rollback", "rollbackRuntimeAttach", "formatOperatorRollbackReport"];
1258
- readonly summary: "Preview and apply the explicit active<-previous / active->candidate rollback move.";
1259
- readonly notes: readonly ["Rollback is blocked when the previous pointer is unavailable.", "Dry-run is the required first read path for safe operator rollback."];
1260
- }, {
1261
- readonly family: "proof_observability";
1262
- readonly scope: "programmatic";
1263
- readonly packageName: "@openclawbrain/openclaw";
1264
- readonly entrypoints: readonly ["describeAttachStatus", "describeKernelBrainBoundary"];
1265
- readonly summary: "Prove the local attach and kernel-vs-brain boundary from the shipped bridge surface.";
1266
- readonly notes: readonly ["Use these for repo-local or installed-package operator proof reads.", "These surfaces report the promoted artifact boundary, not full live runtime plasticity."];
1267
- }, {
1268
- readonly family: "proof_observability";
1269
- readonly scope: "programmatic";
1270
- readonly packageName: "@openclawbrain/pack-format";
1271
- readonly entrypoints: readonly ["describeActivationObservability"];
1272
- readonly summary: "Inspect activation health, freshness, route artifacts, rollback lineage, and slot readiness.";
1273
- readonly notes: readonly ["Activation observability is the ground truth for active/candidate/previous slot inspection."];
1274
- }, {
1275
- readonly family: "proof_observability";
1276
- readonly scope: "programmatic";
1277
- readonly packageName: "@openclawbrain/event-export";
1278
- readonly entrypoints: readonly ["describeNormalizedEventExportObservability"];
1279
- readonly summary: "Inspect supervision freshness and teacher freshness from the exported learner handoff artifact.";
1280
- readonly notes: readonly ["Export observability is local-to-export proof only."];
1281
- }, {
1282
- readonly family: "proof_observability";
1283
- readonly scope: "proof_lane";
1284
- readonly packageName: "workspace";
1285
- readonly entrypoints: readonly ["pnpm current-profile-lifecycle:smoke", "pnpm observability:smoke"];
1286
- readonly summary: "Run the repo-local proof lanes that derive operator truth from the canonical current-profile status object plus activation observability.";
1287
- readonly notes: readonly ["These lanes are proof machinery, not a second semver-stable API."];
1288
- }];
1289
- readonly quarantinedSurface: readonly ["openclawbrain-ops doctor was deleted; use the canonical current-profile status object plus proof helpers instead of a parallel troubleshooting surface.", "buildOperatorSurfaceReport / formatOperatorStatusReport / formatOperatorDoctorReport were historical parallel status surfaces and are not the supported operator API.", "runContinuousProductLoopTurn collapses export/refresh/promote into one proof helper and is not the supported operator API.", "runRecordedSessionReplay and recorded-session fixtures are proof helpers, not operator API.", "release scripts, root smoke plumbing, and workspace layout are proof-and-build machinery, not operator API.", "runRuntimeTurn is a runtime convenience wrapper and not the narrow operator export contract.", "createAsyncTeacherLiveLoop is supporting internals for refresh/teacher snapshots, not the narrow operator contract."];
1290
- };
1291
- export declare const OPENCLAW_OPERATOR_NOUNS_V1: readonly ["Host", "Profile", "Brain", "Attachment"];
1292
- export declare const CURRENT_PROFILE_BRAIN_STATUS_CONTRACT: "current_profile_brain_status.v1";
1293
- export declare const BRAIN_ATTACHMENT_POLICY_SEMANTICS_V1: {
1294
- readonly undeclared: "The Host has not declared whether the current Profile's Brain attachment policy is shared or dedicated; do not infer profile exclusivity from activation state alone.";
1295
- readonly dedicated: "The Host declares a dedicated Brain attachment policy: one Profile is intentionally attached to one Brain activation root, and operators may treat the served Brain state as profile-specific until the attachment changes.";
1296
- readonly shared: "The Host declares a shared Brain attachment policy: multiple Profiles may intentionally attach to the same Brain activation root, attribution must stay current-profile explicit, and operators must not treat later served context as profile-exclusive.";
1297
- };
1298
- export type OperatorBrainState = InitHandoffState | "no_active_pack";
1299
- export type OperatorServePathState = "serving_active_pack" | "fail_open_static_context" | "hard_fail" | "unprobed";
1300
- export interface OperatorSurfaceInput {
1301
- activationRoot: string;
1302
- openclawHome?: string | null;
1303
- updatedAt?: string | null;
1304
- eventExportPath?: string | null;
1305
- teacherSnapshotPath?: string | null;
1306
- brainAttachmentPolicy?: RuntimeTurnBrainAttachmentPolicyV1 | null;
1307
- }
1308
- export interface OperatorSurfaceSlotSummary {
1309
- slot: ActivationPointerSlot;
1310
- packId: string;
1311
- activationReady: boolean;
1312
- routePolicy: RuntimeCompileTargetV1["routePolicy"];
1313
- routerIdentity: string | null;
1314
- workspaceSnapshot: string;
1315
- workspaceRevision: string | null;
1316
- eventRange: RuntimeCompileTargetV1["eventRange"];
1317
- eventExportDigest: string | null;
1318
- builtAt: string;
1319
- updatedAt: string | null;
1320
- findings: string[];
1321
- }
1322
- export interface OperatorLastPromotionSummary {
1323
- known: boolean;
1324
- at: string | null;
1325
- confidence: OperatorLastPromotionConfidence;
1326
- note: string;
1327
- }
1328
- export interface OperatorBrainStateSummary {
1329
- state: OperatorBrainState;
1330
- initMode: LearningBootProfile | null;
1331
- runtimePlasticitySource: RuntimePlasticitySourceV1 | null;
1332
- seedStateVisible: boolean;
1333
- seedBlockCount: number;
1334
- activePackId: string | null;
1335
- activeWorkspaceSnapshot: string | null;
1336
- activeEventExportDigest: string | null;
1337
- detail: string;
1338
- }
1339
- export interface OperatorActivationStateSummary {
1340
- state: CurrentProfileActivationStateV1;
1341
- detail: string;
1342
- inspectionError: string | null;
1343
- }
1344
- export interface OperatorGraphSummary {
1345
- available: boolean;
1346
- runtimePlasticitySource: RuntimePlasticitySourceV1 | null;
1347
- structuralOps: GraphEvolutionLogV1["structuralOps"] | null;
1348
- connectDiagnostics: PackGraphConnectDiagnosticsV1 | null;
1349
- changed: boolean | null;
1350
- blockCount: number | null;
1351
- operationsApplied: GraphEvolutionLogV1["structuralEvolutionSummary"]["operationsApplied"];
1352
- liveBlockCount: number | null;
1353
- prunedBlockCount: number | null;
1354
- prePruneBlockCount: number | null;
1355
- strongestBlockId: string | null;
1356
- operatorSummary: string | null;
1357
- latestMaterialization: {
1358
- known: boolean;
1359
- packId: string | null;
1360
- changed: boolean | null;
1361
- connectDiagnostics: PackGraphConnectDiagnosticsV1 | null;
1362
- operatorSummary: string | null;
1363
- detail: string;
1364
- };
1365
- detail: string;
1366
- }
1367
- export type OperatorObservabilitySource = "active_pack" | "event_export" | "materialized_candidate" | "missing";
1368
- export type OperatorPolicyGradientVersion = "v1" | "v2" | "unavailable";
1369
- export interface OperatorLabelFlowSummary {
1370
- source: OperatorObservabilitySource;
1371
- humanLabelCount: number | null;
1372
- selfLabelCount: number | null;
1373
- asyncTeacherArtifactCount: number | null;
1374
- implicitPositiveCount: number | null;
1375
- detail: string;
1376
- }
1377
- export interface OperatorLearningPathSummary {
1378
- available: boolean;
1379
- source: OperatorObservabilitySource;
1380
- policyGradientVersion: OperatorPolicyGradientVersion;
1381
- policyGradientMethod: string | null;
1382
- objective: string | null;
1383
- targetConstruction: string | null;
1384
- connectOpsFired: number | null;
1385
- reconstructedTrajectoryCount: number | null;
1386
- detail: string;
1387
- }
1388
- export interface OperatorServePathSummary {
1389
- state: OperatorServePathState;
1390
- fallbackToStaticContext: boolean;
1391
- hardRequirementViolated: boolean;
1392
- activePackId: string | null;
1393
- usedLearnedRouteFn: boolean | null;
1394
- routerIdentity: string | null;
1395
- selectionMode: string | null;
1396
- selectionDigest: string | null;
1397
- refreshStatus: string | null;
1398
- freshnessChecksum: string | null;
1399
- requestedBudgetStrategy: string | null;
1400
- resolvedBudgetStrategy: string | null;
1401
- resolvedMaxContextBlocks: number | null;
1402
- structuralBudgetSource: string | null;
1403
- structuralBudgetEvidence: string | null;
1404
- structuralBudgetPressures: string | null;
1405
- structuralDecision: CurrentProfileStructuralDecisionV1;
1406
- contextAttribution: ContextAttributionSummaryV1;
1407
- timing: BrainServeHotPathTimingV1;
1408
- error: string | null;
1409
- }
1410
- export interface OperatorDoctorFinding {
1411
- severity: OperatorFindingSeverity;
1412
- code: string;
1413
- summary: string;
1414
- detail: string;
1415
- }
1416
- export interface OperatorSupervisionSummary {
1417
- available: boolean;
1418
- sourcePath: string | null;
1419
- sourceKind: "bundle_root" | "payload" | "missing";
1420
- exportDigest: string | null;
1421
- exportedAt: string | null;
1422
- flowing: boolean | null;
1423
- scanPolicy: LearningScanPolicy | null;
1424
- scanSurfaceCount: number;
1425
- scanSurfaces: string[];
1426
- sourceCount: number;
1427
- freshestSourceStream: string | null;
1428
- freshestCreatedAt: string | null;
1429
- freshestKind: string | null;
1430
- humanLabelCount: number | null;
1431
- selfLabelCount: number | null;
1432
- attributedEventCount: number | null;
1433
- totalEventCount: number | null;
1434
- selectionDigestCount: number | null;
1435
- sources: string[];
1436
- detail: string;
1437
- }
1438
- export interface OperatorTeacherLoopSummary {
1439
- available: boolean;
1440
- sourcePath: string | null;
1441
- sourceKind: "watch_snapshot" | "async_snapshot" | "missing";
1442
- snapshotUpdatedAt: string | null;
1443
- lastRunAt: string | null;
1444
- lastNoOpReason: TeacherLoopNoOpReason | "unavailable";
1445
- latestFreshness: AsyncTeacherLiveLoopDiagnosticsV1["latestFreshness"] | "unavailable";
1446
- startedAt: string | null;
1447
- lastHeartbeatAt: string | null;
1448
- lastScanAt: string | null;
1449
- pollIntervalSeconds: number | null;
1450
- watchState: CurrentProfilePassiveLearningWatchStateV1;
1451
- lastProcessedAt: string | null;
1452
- artifactCount: number | null;
1453
- queueDepth: number | null;
1454
- queueCapacity: number | null;
1455
- running: boolean | null;
1456
- replayedBundleCount: number | null;
1457
- replayedEventCount: number | null;
1458
- exportedBundleCount: number | null;
1459
- exportedEventCount: number | null;
1460
- sessionTailSessionsTracked: number | null;
1461
- sessionTailBridgedEventCount: number | null;
1462
- localSessionTailNoopReason: string | null;
1463
- learningCadence: LearningCadence | "unavailable";
1464
- scanPolicy: LearningScanPolicy | "unavailable";
1465
- liveSlicesPerCycle: number | null;
1466
- backfillSlicesPerCycle: number | null;
1467
- failureMode: WatchTeacherSnapshotFailureV1["mode"] | "none" | "unavailable";
1468
- failureDetail: string | null;
1469
- lastAppliedMaterializationJobId: string | null;
1470
- lastMaterializedPackId: string | null;
1471
- lastObservedDelta: CurrentProfilePassiveLearningDeltaSummaryV1;
1472
- notes: string[];
1473
- detail: string;
1474
- }
1475
- export type OperatorLearningBacklogState = "unavailable" | "awaiting_first_export" | "principal_live_priority" | "principal_backfill_priority" | "live_priority" | "backfill_only" | "caught_up";
1476
- export type OperatorLearningWarningState = "teacher_snapshot_unavailable" | "awaiting_first_export" | "principal_live_backlog" | "principal_backfill_pending" | "active_pack_behind_latest_principal" | "passive_backfill_pending" | "teacher_queue_full" | "teacher_labels_stale" | "teacher_no_artifacts";
1477
- export interface OperatorLearningSummary {
1478
- available: boolean;
1479
- sourcePath: string | null;
1480
- bootstrapped: boolean | null;
1481
- mode: AlwaysOnLearningRuntimePlanV1["mode"] | "unavailable";
1482
- nextPriorityLane: AlwaysOnLearningRuntimePlanV1["nextPriorityLane"] | "unavailable";
1483
- nextPriorityBucket: AlwaysOnLearningRuntimePlanV1["nextPriorityBucket"] | "unavailable";
1484
- backlogState: OperatorLearningBacklogState;
1485
- pendingLive: number | null;
1486
- pendingBackfill: number | null;
1487
- pendingTotal: number | null;
1488
- pendingByBucket: AlwaysOnLearningRuntimePlanV1["pending"]["byBucket"] | null;
1489
- freshLivePriority: boolean | null;
1490
- principalCheckpointCount: number | null;
1491
- pendingPrincipalCount: number | null;
1492
- oldestUnlearnedPrincipalEvent: PendingPrincipalEventV1 | null;
1493
- newestPendingPrincipalEvent: PendingPrincipalEventV1 | null;
1494
- leadingPrincipalCheckpoint: PrincipalLearningCheckpointV1 | null;
1495
- principalCheckpoints: PrincipalLearningCheckpointV1[];
1496
- principalLagToPromotion: {
1497
- activeEventRangeEnd: number | null;
1498
- latestPrincipalSequence: number | null;
1499
- sequenceLag: number | null;
1500
- status: "unavailable" | "caught_up" | "pending_promotion";
1501
- };
1502
- warningStates: OperatorLearningWarningState[];
1503
- learnedRange: RuntimeCompileTargetV1["eventRange"] | null;
1504
- materializationCount: number | null;
1505
- lastMaterializedAt: string | null;
1506
- lastMaterializationReason: AlwaysOnLearningMaterializationJobV1["reason"] | null;
1507
- lastMaterializationLane: AlwaysOnLearningMaterializationJobV1["lane"] | null;
1508
- lastMaterializationPriority: AlwaysOnLearningMaterializationJobV1["priority"] | null;
1509
- lastMaterializedPackId: string | null;
1510
- detail: string;
1511
- }
1512
- export interface OperatorPrincipalItemSummary {
1513
- eventId: string;
1514
- contract: NormalizedEventV1["contract"];
1515
- kind: NormalizedEventV1["kind"];
1516
- sequence: number;
1517
- createdAt: string;
1518
- teacherIdentity: string;
1519
- teacherAuthority: NonNullable<NormalizedEventV1["principal"]>["teacherAuthority"];
1520
- priorityClass: NonNullable<NormalizedEventV1["principal"]>["priorityClass"];
1521
- scopeKind: NonNullable<NormalizedEventV1["principal"]>["principalScope"]["kind"];
1522
- supersedes: string[];
1523
- }
1524
- export interface OperatorPrincipalFeedbackSummary extends OperatorPrincipalItemSummary {
1525
- content: string;
1526
- relatedInteractionId: string | null;
1527
- }
1528
- export interface OperatorPrincipalPromotionSummary {
1529
- known: boolean;
1530
- at: string | null;
1531
- activePackId: string | null;
1532
- activeEventRangeEnd: number | null;
1533
- includesLatestFeedback: boolean | null;
1534
- includesLatestCorrection: boolean | null;
1535
- note: string;
1536
- }
1537
- export interface OperatorPrincipalObservabilitySummary {
1538
- available: boolean;
1539
- sourcePath: string | null;
1540
- sourceKind: "bundle_root" | "payload" | "missing";
1541
- latestFeedback: OperatorPrincipalFeedbackSummary | null;
1542
- latestCorrection: OperatorPrincipalFeedbackSummary | null;
1543
- pendingCount: number | null;
1544
- pendingItems: OperatorPrincipalItemSummary[];
1545
- latestPromotion: OperatorPrincipalPromotionSummary;
1546
- servingDownstreamOfLatestCorrection: boolean | null;
1547
- detail: string;
1548
- }
1549
- export interface OperatorRouteFnFreshnessSummary {
1550
- available: boolean;
1551
- activePackId: string | null;
1552
- routerIdentity: string | null;
1553
- routerChecksum: string | null;
1554
- trainedAt: string | null;
1555
- updatedAt: string | null;
1556
- usedAt: string | null;
1557
- lastDecisionAt: string | null;
1558
- lastDecisionUsedLearnedRouteFn: boolean | null;
1559
- detail: string;
1560
- }
1561
- interface OperatorHookSummary {
1562
- scope: "exact_openclaw_home" | "activation_root_only";
1563
- openclawHome: string | null;
1564
- extensionDir: string | null;
1565
- hookPath: string | null;
1566
- runtimeGuardPath: string | null;
1567
- manifestPath: string | null;
1568
- packageJsonPath: string | null;
1569
- manifestId: string | null;
1570
- installId: string | null;
1571
- packageName: string | null;
1572
- installLayout: import("./openclaw-plugin-install.js").OpenClawBrainInstallLayout | null;
1573
- additionalInstallCount: number;
1574
- installState: CurrentProfileHookInstallStateV1;
1575
- loadability: CurrentProfileHookLoadabilityV1;
1576
- loadProof: CurrentProfileHookLoadProofV1;
1577
- desynced: boolean;
1578
- detail: string;
1579
- }
1580
- interface OperatorAttachmentTruthSummary {
1581
- state: CurrentProfileAttachmentStateV1;
1582
- proofState: CurrentProfileAttachmentProofStateV1;
1583
- watchOnly: boolean;
1584
- activationRoot: string | null;
1585
- servingSlot: "active" | "none";
1586
- detail: string;
1587
- }
1588
- interface OperatorManyProfileSupportSummary {
1589
- operatorSurface: "current_profile_only";
1590
- declaredAttachmentPolicy: RuntimeTurnBrainAttachmentPolicyV1;
1591
- sameGatewayIntent: "undeclared" | "dedicated_current_profile_boundary" | "shared_attachment_declared";
1592
- checkedInProofTopology: "two_local_gateways_dedicated_only";
1593
- sameGatewayProof: false;
1594
- sharedWriteSafetyProof: false;
1595
- detail: string;
1596
- }
1597
- interface OperatorSurfaceReport {
1598
- generatedAt: string;
1599
- activationRoot: string;
1600
- status: OperatorSurfaceStatus;
1601
- activation: OperatorActivationStateSummary;
1602
- active: OperatorSurfaceSlotSummary | null;
1603
- candidate: OperatorSurfaceSlotSummary | null;
1604
- previous: OperatorSurfaceSlotSummary | null;
1605
- freshness: {
1606
- activeBehindPromotionReadyCandidate: boolean;
1607
- candidateAheadBy: string[];
1608
- };
1609
- brain: OperatorBrainStateSummary;
1610
- graph: OperatorGraphSummary;
1611
- labelFlow: OperatorLabelFlowSummary;
1612
- learningPath: OperatorLearningPathSummary;
1613
- learnedRouting: {
1614
- required: boolean;
1615
- available: boolean;
1616
- routerIdentity: string | null;
1617
- routeFnVersion: string | null;
1618
- trainingMethod: string | null;
1619
- routerTrainedAt: string | null;
1620
- objective: string | null;
1621
- pgProfile: ActivationObservabilityReport["learnedRouteFn"]["pgProfile"];
1622
- routerChecksum: string | null;
1623
- objectiveChecksum: string | null;
1624
- updateMechanism: string | null;
1625
- updateVersion: string | null;
1626
- updateCount: number | null;
1627
- supervisionCount: number | null;
1628
- collectedLabelsTotal: number | null;
1629
- freshnessChecksum: string | null;
1630
- handoffState: InitHandoffState;
1631
- initMode: LearningBootProfile | null;
1632
- seedStateVisible: boolean;
1633
- };
1634
- servePath: OperatorServePathSummary;
1635
- promotion: {
1636
- allowed: boolean;
1637
- findings: string[];
1638
- lastPromotion: OperatorLastPromotionSummary;
1639
- activeUpdatedAt: string | null;
1640
- candidateUpdatedAt: string | null;
1641
- previousUpdatedAt: string | null;
1642
- };
1643
- rollback: {
1644
- allowed: boolean;
1645
- findings: string[];
1646
- previousPackId: string | null;
1647
- state: "ready" | "blocked" | "unknown";
1648
- };
1649
- supervision: OperatorSupervisionSummary;
1650
- learning: OperatorLearningSummary;
1651
- teacherLoop: OperatorTeacherLoopSummary;
1652
- routeFn: OperatorRouteFnFreshnessSummary;
1653
- hook: OperatorHookSummary;
1654
- attachmentTruth: OperatorAttachmentTruthSummary;
1655
- principal: OperatorPrincipalObservabilitySummary;
1656
- manyProfile: OperatorManyProfileSupportSummary;
1657
- findings: OperatorDoctorFinding[];
1658
- }
1659
- export interface CurrentProfileBrainStatusInput extends OperatorSurfaceInput {
1660
- brainAttachmentPolicy?: RuntimeTurnBrainAttachmentPolicyV1 | null;
1661
- profileId?: string | null;
1662
- }
1663
- export type CurrentProfileBrainStatusV1 = CurrentProfileBrainStatusAnswerV1;
1664
- export declare function summarizeNormalizedEventExportLabelFlow(normalizedEventExport: NormalizedEventExportV1, asyncTeacherArtifactCount?: number): OperatorLabelFlowSummary;
1665
- export declare function summarizeLearningPathFromMaterialization(materialization: AlwaysOnLearningMaterializationJobV1 | null): OperatorLearningPathSummary;
1666
- export declare function buildOperatorSurfaceReport(input: OperatorSurfaceInput): OperatorSurfaceReport;
1667
- export declare function describeCurrentProfileBrainStatus(input: CurrentProfileBrainStatusInput): CurrentProfileBrainStatusV1;
1668
- export declare function formatOperatorRollbackReport(result: RollbackRuntimeAttachResult): string;
1669
- /**
1670
- * A per-turn summary of what was kernel-injected vs brain-compiled in a given
1671
- * compile response. Useful for operator observability and debugging.
1672
- *
1673
- * "Kernel" content is whatever the operator injected directly in the system
1674
- * prompt — this function cannot observe it, only describe the brain side.
1675
- * The `kernelSurface` field is present only when the caller supplies a surface
1676
- * descriptor (from `WorkspaceInjectionSurfaceV1`) alongside the compile
1677
- * response; otherwise it is null.
1678
- */
1679
- export interface KernelBrainBoundaryDescriptionV1 {
1680
- /**
1681
- * Summary of what the brain compiler contributed to this turn.
1682
- */
1683
- brain: {
1684
- packId: string;
1685
- mode: "learned" | "heuristic";
1686
- selectedBlockCount: number;
1687
- /** Roles of the selected blocks, deduplicated. */
1688
- selectedRoles: string[];
1689
- /** Whether the learned route_fn ran (true means learned routing was used). */
1690
- usedLearnedRouteFn: boolean;
1691
- /** Whether context was compacted due to char budget pressure. */
1692
- compactionApplied: boolean;
1693
- };
1694
- /**
1695
- * Validation result for the operator-supplied kernel surface descriptor.
1696
- * Null when no surface descriptor was supplied.
1697
- */
1698
- kernelValidation: KernelSurfaceValidationResultV1 | null;
1699
- /**
1700
- * Advisory: based on the compile diagnostics, is the brain context likely
1701
- * covering the query well, or should the operator investigate pack freshness?
1702
- *
1703
- * - `"likely_covered"` — learned routing ran and found token-matched blocks.
1704
- * - `"partial"` — some token matches, but mode was heuristic or routing gap.
1705
- * - `"likely_gap"` — no token matches or heuristic-only; pack may need refresh.
1706
- */
1707
- brainCoverageAdvisory: "likely_covered" | "partial" | "likely_gap";
1708
- }
1709
- /**
1710
- * Describes the kernel/brain boundary for a single compile response.
1711
- *
1712
- * Combines:
1713
- * - Brain context summary (from the compile response diagnostics)
1714
- * - Kernel surface validation (if a surface descriptor is supplied)
1715
- * - A coverage advisory based on routing signals
1716
- *
1717
- * See `docs/kernel-brain-boundary.md` for the full decision framework.
1718
- */
1719
- export declare function describeKernelBrainBoundary(compileResponse: RuntimeCompileResponseV1, surface?: WorkspaceInjectionSurfaceV1): KernelBrainBoundaryDescriptionV1;
1720
- export type { BrainEligibleContentKind, KernelContentKind, KernelSurfaceValidationResultV1, WorkspaceInjectionSurfaceV1 } from "@openclawbrain/contracts";
1721
- export { CONTRACT_IDS, buildNormalizedEventExport, createFeedbackEvent, createInteractionEvent, validateRuntimeCompileRequest } from "@openclawbrain/contracts";
1722
- export { describeNormalizedEventExportObservability } from "@openclawbrain/event-export";
1723
- export { describeCompileFallbackUsage } from "@openclawbrain/compiler";
1724
- export { describeActivationObservability, inspectActivationState, rollbackActivePack } from "@openclawbrain/pack-format";
1725
- export { createOpenClawLocalSessionTail, OpenClawLocalSessionTail, type OpenClawLocalSessionTailChangeKindV1, type OpenClawLocalSessionTailChangeV1, type OpenClawLocalSessionTailCursorV1, type OpenClawLocalSessionTailInput, type OpenClawLocalSessionTailLoopOptionsV1, type OpenClawLocalSessionTailLoopResultV1, type OpenClawLocalSessionTailNoopReasonV1, type OpenClawLocalSessionTailPollResultV1 } from "./session-tail.js";
1726
- 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";
1727
- export { buildPassiveLearningSessionExportFromOpenClawSessionStore, buildPassiveLearningStoreExportFromOpenClawSessionIndex, type OpenClawPassiveLearningPrivacySummaryV1, type OpenClawPassiveLearningSessionEvidenceV1, type OpenClawPassiveLearningSessionExportV1, type OpenClawPassiveLearningStoreExportV1 } from "./local-session-passive-learning.js";
1728
- 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";
1729
- export { resolveActivationRoot, type ResolveActivationRootOptions } from "./resolve-activation-root.js";
1730
- export { runDaemonCommand, type DaemonCliArgs, type DaemonSubcommand, parseDaemonArgs } from "./daemon.js";