@remnic/plugin-openclaw 9.69.41 → 9.69.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +141 -223
- package/openclaw.plugin.json +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -13,30 +13,16 @@ import {
|
|
|
13
13
|
__reExport
|
|
14
14
|
} from "./chunk-I2KLQ2HA.js";
|
|
15
15
|
|
|
16
|
-
// ../../src/day-summary.ts
|
|
17
|
-
var day_summary_exports = {};
|
|
18
|
-
__reExport(day_summary_exports, day_summary_star);
|
|
19
|
-
import * as day_summary_star from "@remnic/core/day-summary";
|
|
20
|
-
|
|
21
16
|
// ../../src/index.ts
|
|
17
|
+
import { loadDaySummaryPrompt } from "@remnic/core/day-summary";
|
|
22
18
|
import OpenAI from "openai";
|
|
23
19
|
import { createRequire } from "module";
|
|
24
20
|
import { createHash as createHash4 } from "crypto";
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
// ../../src/logger.ts
|
|
32
|
-
var logger_exports = {};
|
|
33
|
-
__reExport(logger_exports, logger_star);
|
|
34
|
-
import * as logger_star from "@remnic/core/logger";
|
|
35
|
-
|
|
36
|
-
// ../../src/sdk-compat.ts
|
|
37
|
-
import { detectSdkCapabilities } from "@remnic/core/sdk-compat";
|
|
38
|
-
|
|
39
|
-
// ../../src/index.ts
|
|
21
|
+
import { parseConfig } from "@remnic/core/config";
|
|
22
|
+
import { initLogger, log as log8 } from "@remnic/core/logger";
|
|
23
|
+
import {
|
|
24
|
+
detectSdkCapabilities
|
|
25
|
+
} from "@remnic/core/sdk-compat";
|
|
40
26
|
import {
|
|
41
27
|
Orchestrator,
|
|
42
28
|
sanitizeSessionKeyForFilename,
|
|
@@ -47,49 +33,7 @@ import { beginCodexSubscriptionShutdown, getCodexSubscriptionRunnerForOwner, ter
|
|
|
47
33
|
// ../../src/tools.ts
|
|
48
34
|
import { createHash as createHash2 } from "crypto";
|
|
49
35
|
import { Type as Type2 } from "@sinclair/typebox";
|
|
50
|
-
|
|
51
|
-
// ../../src/temporal-index.ts
|
|
52
|
-
var temporal_index_exports = {};
|
|
53
|
-
__export(temporal_index_exports, {
|
|
54
|
-
clearIndexes: () => clearIndexes,
|
|
55
|
-
clearIndexesAsync: () => clearIndexesAsync,
|
|
56
|
-
deindexMemory: () => deindexMemory,
|
|
57
|
-
deindexMemoryAsync: () => deindexMemoryAsync,
|
|
58
|
-
extractTagsFromPrompt: () => extractTagsFromPrompt,
|
|
59
|
-
indexMemoriesBatch: () => indexMemoriesBatch,
|
|
60
|
-
indexMemoriesBatchAsync: () => indexMemoriesBatchAsync,
|
|
61
|
-
indexMemory: () => indexMemory,
|
|
62
|
-
indexMemoryAsync: () => indexMemoryAsync,
|
|
63
|
-
indexesExist: () => indexesExist,
|
|
64
|
-
indexesExistAsync: () => indexesExistAsync,
|
|
65
|
-
isTemporalQuery: () => isTemporalQuery,
|
|
66
|
-
queryByDateRangeAsync: () => queryByDateRangeAsync,
|
|
67
|
-
queryByTagsAsync: () => queryByTagsAsync,
|
|
68
|
-
recencyWindowBoundsFromPrompt: () => recencyWindowBoundsFromPrompt,
|
|
69
|
-
recencyWindowFromPrompt: () => recencyWindowFromPrompt,
|
|
70
|
-
resolvePromptTagPrefilterAsync: () => resolvePromptTagPrefilterAsync
|
|
71
|
-
});
|
|
72
|
-
__reExport(temporal_index_exports, temporal_index_star);
|
|
73
|
-
import {
|
|
74
|
-
clearIndexes,
|
|
75
|
-
clearIndexesAsync,
|
|
76
|
-
deindexMemory,
|
|
77
|
-
deindexMemoryAsync,
|
|
78
|
-
extractTagsFromPrompt,
|
|
79
|
-
indexMemoriesBatch,
|
|
80
|
-
indexMemoriesBatchAsync,
|
|
81
|
-
indexMemory,
|
|
82
|
-
indexMemoryAsync,
|
|
83
|
-
indexesExist,
|
|
84
|
-
indexesExistAsync,
|
|
85
|
-
isTemporalQuery,
|
|
86
|
-
queryByDateRangeAsync,
|
|
87
|
-
queryByTagsAsync,
|
|
88
|
-
recencyWindowBoundsFromPrompt,
|
|
89
|
-
recencyWindowFromPrompt,
|
|
90
|
-
resolvePromptTagPrefilterAsync
|
|
91
|
-
} from "@remnic/core/temporal-index";
|
|
92
|
-
import * as temporal_index_star from "@remnic/core/temporal-index";
|
|
36
|
+
import { indexMemoryAsync as indexMemoryAsync2, indexesExistAsync as indexesExistAsync2 } from "@remnic/core/temporal-index";
|
|
93
37
|
|
|
94
38
|
// ../../src/explicit-capture.ts
|
|
95
39
|
import {
|
|
@@ -114,6 +58,7 @@ function mergeInlineCaptureDedupeKeys(messageKeys, fallbackDedupeKeys = []) {
|
|
|
114
58
|
}
|
|
115
59
|
|
|
116
60
|
// ../../src/tools.ts
|
|
61
|
+
import { log } from "@remnic/core/logger";
|
|
117
62
|
import { composeSalvagedEnvelope as composeSalvagedEnvelope2 } from "@remnic/core/salvage-envelope";
|
|
118
63
|
|
|
119
64
|
// ../../src/memory-promote.ts
|
|
@@ -127,6 +72,7 @@ import { stripAttributesSuffix } from "@remnic/core/storage";
|
|
|
127
72
|
import { isSupportPassportPrivateMemory } from "@remnic/core/support-passport";
|
|
128
73
|
import { displayErrorDetail } from "@remnic/core/runtime/better-sqlite";
|
|
129
74
|
import { isSafeRouteNamespace } from "@remnic/core/routing/engine";
|
|
75
|
+
import { indexMemoryAsync, indexesExistAsync } from "@remnic/core/temporal-index";
|
|
130
76
|
function buildPromotionOrigin(srcNamespace, memoryId) {
|
|
131
77
|
const memoryIdHash = createHash("sha256").update(memoryId).digest("hex");
|
|
132
78
|
const fullTag = `promotedFrom:${srcNamespace}:${memoryId}`;
|
|
@@ -423,14 +369,8 @@ function registerSharedContextTools(api, orchestrator, hostRuntimeAgentId) {
|
|
|
423
369
|
import { WorkStorage } from "@remnic/core/work/storage";
|
|
424
370
|
import { exportWorkBoardMarkdown, exportWorkBoardSnapshot, importWorkBoardSnapshot } from "@remnic/core/work/board";
|
|
425
371
|
import { wrapWorkLayerContext } from "@remnic/core/work/boundary";
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
import {
|
|
429
|
-
formatProfileTraceAscii,
|
|
430
|
-
ProfilingCollector
|
|
431
|
-
} from "@remnic/core/profiling";
|
|
432
|
-
|
|
433
|
-
// ../../src/tools.ts
|
|
372
|
+
import { VALID_MEMORY_CATEGORIES } from "@remnic/core/config";
|
|
373
|
+
import { formatProfileTraceAscii } from "@remnic/core/profiling";
|
|
434
374
|
import { runMemoryGovernance } from "@remnic/core/maintenance/memory-governance";
|
|
435
375
|
|
|
436
376
|
// ../../src/memory-action-target.ts
|
|
@@ -664,7 +604,7 @@ function registerTools(api, orchestrator, hostRuntimeAgentId) {
|
|
|
664
604
|
function normalizeMemoryCategory(value, fallback) {
|
|
665
605
|
const normalized = asNonEmptyString(value);
|
|
666
606
|
if (!normalized) return fallback;
|
|
667
|
-
if (!
|
|
607
|
+
if (!VALID_MEMORY_CATEGORIES.has(normalized)) return void 0;
|
|
668
608
|
return normalized;
|
|
669
609
|
}
|
|
670
610
|
function isKnownMemoryActionType(value) {
|
|
@@ -714,11 +654,11 @@ function registerTools(api, orchestrator, hostRuntimeAgentId) {
|
|
|
714
654
|
Content: ${candidate.content}`
|
|
715
655
|
);
|
|
716
656
|
}
|
|
717
|
-
if (!result.duplicateOf && orchestrator.config.queryAwareIndexingEnabled && await
|
|
657
|
+
if (!result.duplicateOf && orchestrator.config.queryAwareIndexingEnabled && await indexesExistAsync2(orchestrator.config.memoryDir)) {
|
|
718
658
|
const storage = await orchestrator.getStorage(candidate.namespace);
|
|
719
659
|
const mem = await storage.getMemoryById(result.id).catch(() => null);
|
|
720
660
|
if (mem?.path && mem.frontmatter?.created) {
|
|
721
|
-
await
|
|
661
|
+
await indexMemoryAsync2(orchestrator.config.memoryDir, mem.path, mem.frontmatter.created, mem.frontmatter.tags ?? []);
|
|
722
662
|
}
|
|
723
663
|
}
|
|
724
664
|
orchestrator.requestQmdMaintenanceForTool(maintenanceReason);
|
|
@@ -741,7 +681,7 @@ Content: ${content}` : `Memory queued for review: ${queued.id}${namespace ? ` (n
|
|
|
741
681
|
Content: ${content}`
|
|
742
682
|
);
|
|
743
683
|
} catch (queueError) {
|
|
744
|
-
|
|
684
|
+
log.warn(`explicit tool capture rejected: ${error}; review queue fallback failed: ${queueError}`);
|
|
745
685
|
return toolResult2(`Memory capture failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
746
686
|
}
|
|
747
687
|
}
|
|
@@ -943,7 +883,7 @@ report: ${audit.reportPath}`
|
|
|
943
883
|
triggerWindow: typeof params.triggerWindow === "string" ? params.triggerWindow : void 0,
|
|
944
884
|
suspectedCause: typeof params.suspectedCause === "string" ? params.suspectedCause : void 0
|
|
945
885
|
});
|
|
946
|
-
|
|
886
|
+
log.info(`continuity-incident open id=${created.id}`);
|
|
947
887
|
return toolResult2(`Continuity incident opened.
|
|
948
888
|
|
|
949
889
|
${formatContinuityIncidentSummary(created)}`);
|
|
@@ -1004,7 +944,7 @@ ${formatContinuityIncidentSummary(created)}`);
|
|
|
1004
944
|
preventiveRule
|
|
1005
945
|
});
|
|
1006
946
|
if (!closed) return toolResult2(`Incident not found: ${id}`);
|
|
1007
|
-
|
|
947
|
+
log.info(`continuity-incident close id=${id}`);
|
|
1008
948
|
return toolResult2(`Continuity incident closed.
|
|
1009
949
|
|
|
1010
950
|
${formatContinuityIncidentSummary(closed)}`);
|
|
@@ -1119,7 +1059,7 @@ ${body}`);
|
|
|
1119
1059
|
lastReviewed: typeof params.lastReviewed === "string" ? params.lastReviewed : void 0,
|
|
1120
1060
|
notes: typeof params.notes === "string" ? params.notes : void 0
|
|
1121
1061
|
});
|
|
1122
|
-
|
|
1062
|
+
log.info(`continuity-loop upsert id=${loop.id} status=${loop.status}`);
|
|
1123
1063
|
return toolResult2(`Continuity loop saved.
|
|
1124
1064
|
|
|
1125
1065
|
${formatContinuityLoopSummary(loop)}`);
|
|
@@ -1179,7 +1119,7 @@ ${formatContinuityLoopSummary(loop)}`);
|
|
|
1179
1119
|
reviewedAt: typeof params.reviewedAt === "string" ? params.reviewedAt : void 0
|
|
1180
1120
|
});
|
|
1181
1121
|
if (!reviewed) return toolResult2(`Continuity loop not found: ${id}`);
|
|
1182
|
-
|
|
1122
|
+
log.info(`continuity-loop review id=${id} status=${reviewed.status}`);
|
|
1183
1123
|
return toolResult2(`Continuity loop reviewed.
|
|
1184
1124
|
|
|
1185
1125
|
${formatContinuityLoopSummary(reviewed)}`);
|
|
@@ -1283,7 +1223,7 @@ ${anchor}`);
|
|
|
1283
1223
|
const merged = mergeIdentityAnchor(existing, updates);
|
|
1284
1224
|
await storage.writeIdentityAnchor(merged);
|
|
1285
1225
|
const updatedSections = Object.entries(updates).filter(([, value]) => typeof value === "string" && value.trim().length > 0).map(([name]) => name);
|
|
1286
|
-
|
|
1226
|
+
log.info(
|
|
1287
1227
|
`identity-anchor update sections=${updatedSections.join(",")} chars=${merged.length}`
|
|
1288
1228
|
);
|
|
1289
1229
|
return toolResult2(
|
|
@@ -3169,16 +3109,8 @@ import {
|
|
|
3169
3109
|
FallbackLlmClient as FallbackLlmClient2,
|
|
3170
3110
|
fallbackLlmRuntimeContextFromConfig as fallbackLlmRuntimeContextFromConfig2
|
|
3171
3111
|
} from "@remnic/core/fallback-llm";
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
var objective_state_exports = {};
|
|
3175
|
-
__reExport(objective_state_exports, objective_state_star);
|
|
3176
|
-
import * as objective_state_star from "@remnic/core/objective-state";
|
|
3177
|
-
|
|
3178
|
-
// ../../src/objective-state-writers.ts
|
|
3179
|
-
var objective_state_writers_exports = {};
|
|
3180
|
-
__reExport(objective_state_writers_exports, objective_state_writers_star);
|
|
3181
|
-
import * as objective_state_writers_star from "@remnic/core/objective-state-writers";
|
|
3112
|
+
import { objectiveStateStoreOverrideForNamespace } from "@remnic/core/objective-state";
|
|
3113
|
+
import { recordObjectiveStateSnapshotsFromAgentMessages } from "@remnic/core/objective-state-writers";
|
|
3182
3114
|
|
|
3183
3115
|
// ../../src/qmd-availability-probe.ts
|
|
3184
3116
|
async function probeQmdAvailability(host) {
|
|
@@ -3227,27 +3159,14 @@ var EngramAccessService = class extends CoreEngramAccessService {
|
|
|
3227
3159
|
}
|
|
3228
3160
|
};
|
|
3229
3161
|
|
|
3230
|
-
// ../../src/access-http.ts
|
|
3231
|
-
var access_http_exports = {};
|
|
3232
|
-
__reExport(access_http_exports, access_http_star);
|
|
3233
|
-
import * as access_http_star from "@remnic/core/access-http";
|
|
3234
|
-
|
|
3235
3162
|
// ../../src/index.ts
|
|
3163
|
+
import { EngramAccessHttpServer } from "@remnic/core/access-http";
|
|
3236
3164
|
import path11 from "path";
|
|
3237
3165
|
import os from "os";
|
|
3238
|
-
|
|
3239
|
-
// ../../src/opik-exporter.ts
|
|
3240
|
-
import { createOpikExporter, OpikExporter } from "@remnic/core/opik-exporter";
|
|
3241
|
-
|
|
3242
|
-
// ../../src/index.ts
|
|
3166
|
+
import { createOpikExporter } from "@remnic/core/opik-exporter";
|
|
3243
3167
|
import { readEnvVar, resolveHomeDir as resolveHomeDir3 } from "@remnic/core/runtime/env";
|
|
3244
3168
|
import { displayErrorDetail as displayErrorDetail2 } from "@remnic/core/runtime/better-sqlite";
|
|
3245
|
-
|
|
3246
|
-
// ../../src/migrate/from-engram.ts
|
|
3247
|
-
import {
|
|
3248
|
-
migrateFromEngram,
|
|
3249
|
-
rollbackFromEngramMigration
|
|
3250
|
-
} from "@remnic/core/migrate/from-engram";
|
|
3169
|
+
import { migrateFromEngram } from "@remnic/core/migrate/from-engram";
|
|
3251
3170
|
|
|
3252
3171
|
// ../../src/user-message-cleaning.ts
|
|
3253
3172
|
import { cleanUserMessageWithPattern } from "@remnic/core/user-message-cleaning";
|
|
@@ -9294,7 +9213,7 @@ async function loadOpenClawProviderAuthRuntimeModule() {
|
|
|
9294
9213
|
if (typeof mod.resolveApiKeyForProvider === "function" || typeof mod.getRuntimeAuthForModel === "function") {
|
|
9295
9214
|
providerAuthRuntimeModule = mod;
|
|
9296
9215
|
providerAuthRuntimeLoaded = true;
|
|
9297
|
-
|
|
9216
|
+
log8.debug("loaded OpenClaw provider auth runtime module");
|
|
9298
9217
|
return providerAuthRuntimeModule;
|
|
9299
9218
|
}
|
|
9300
9219
|
} catch {
|
|
@@ -9303,7 +9222,7 @@ async function loadOpenClawProviderAuthRuntimeModule() {
|
|
|
9303
9222
|
} catch {
|
|
9304
9223
|
}
|
|
9305
9224
|
providerAuthRuntimeNextRetryAt = Date.now() + SECRET_REF_RESOLVER_RETRY_BACKOFF_MS;
|
|
9306
|
-
|
|
9225
|
+
log8.debug(
|
|
9307
9226
|
`OpenClaw provider auth runtime not available \u2014 will retry after ${SECRET_REF_RESOLVER_RETRY_BACKOFF_MS / 1e3}s`
|
|
9308
9227
|
);
|
|
9309
9228
|
return null;
|
|
@@ -9342,7 +9261,7 @@ async function loadOpenClawSecretRefResolver() {
|
|
|
9342
9261
|
if (typeof fn === "function") {
|
|
9343
9262
|
secretRefResolver = fn;
|
|
9344
9263
|
secretRefResolverLoaded = true;
|
|
9345
|
-
|
|
9264
|
+
log8.debug(
|
|
9346
9265
|
`loaded OpenClaw SecretRef resolver "${exportName}" from ${prefix}*.js`
|
|
9347
9266
|
);
|
|
9348
9267
|
return secretRefResolver;
|
|
@@ -9355,7 +9274,7 @@ async function loadOpenClawSecretRefResolver() {
|
|
|
9355
9274
|
} catch {
|
|
9356
9275
|
}
|
|
9357
9276
|
secretRefResolverNextRetryAt = Date.now() + SECRET_REF_RESOLVER_RETRY_BACKOFF_MS;
|
|
9358
|
-
|
|
9277
|
+
log8.debug(
|
|
9359
9278
|
`OpenClaw SecretRef resolver not available \u2014 will retry after ${SECRET_REF_RESOLVER_RETRY_BACKOFF_MS / 1e3}s`
|
|
9360
9279
|
);
|
|
9361
9280
|
return null;
|
|
@@ -9398,7 +9317,7 @@ function loadPluginEntryFromFile(pluginId) {
|
|
|
9398
9317
|
const config = JSON.parse(content);
|
|
9399
9318
|
return resolveRemnicPluginEntry(config, pluginId);
|
|
9400
9319
|
} catch (err) {
|
|
9401
|
-
|
|
9320
|
+
log8.warn(`Failed to load config from file: ${err}`);
|
|
9402
9321
|
return void 0;
|
|
9403
9322
|
}
|
|
9404
9323
|
}
|
|
@@ -9416,7 +9335,7 @@ function loadRawConfigFromFile() {
|
|
|
9416
9335
|
const config = JSON.parse(content);
|
|
9417
9336
|
return config && typeof config === "object" ? config : void 0;
|
|
9418
9337
|
} catch (err) {
|
|
9419
|
-
|
|
9338
|
+
log8.warn(`Failed to load raw OpenClaw config from file: ${err}`);
|
|
9420
9339
|
return void 0;
|
|
9421
9340
|
}
|
|
9422
9341
|
}
|
|
@@ -9431,7 +9350,7 @@ async function maybeRegisterLiveConnectorCron(orchestrator) {
|
|
|
9431
9350
|
const jobsPath = path11.join(resolveHomeDir3(), ".openclaw", "cron", "jobs.json");
|
|
9432
9351
|
try {
|
|
9433
9352
|
if (!fileExistsNow(jobsPath)) {
|
|
9434
|
-
|
|
9353
|
+
log8.debug("live connectors cron: jobs.json not found, skipping auto-register");
|
|
9435
9354
|
return;
|
|
9436
9355
|
}
|
|
9437
9356
|
const result = await ensureLiveConnectorCron(jobsPath, {
|
|
@@ -9439,12 +9358,12 @@ async function maybeRegisterLiveConnectorCron(orchestrator) {
|
|
|
9439
9358
|
connectors: orchestrator.config.connectors
|
|
9440
9359
|
});
|
|
9441
9360
|
if (result.created || result.updated) {
|
|
9442
|
-
|
|
9361
|
+
log8.info(`live connectors cron ${result.created ? "auto-registered" : "reconciled"} (${result.jobId})`);
|
|
9443
9362
|
} else {
|
|
9444
|
-
|
|
9363
|
+
log8.debug("live connectors cron already exists, skipping auto-register");
|
|
9445
9364
|
}
|
|
9446
9365
|
} catch (err) {
|
|
9447
|
-
|
|
9366
|
+
log8.debug(`live connectors cron auto-register error: ${err}`);
|
|
9448
9367
|
}
|
|
9449
9368
|
}
|
|
9450
9369
|
function isBundledActiveMemoryEnabledForAgent(runtimeConfig, fileBackedRuntimeConfig, agentId) {
|
|
@@ -9613,13 +9532,13 @@ function registerOpenClawHostEmbeddingProvider(params) {
|
|
|
9613
9532
|
}).then((result) => {
|
|
9614
9533
|
providerInstance = result && typeof result === "object" ? result.provider ?? null : null;
|
|
9615
9534
|
if (!providerInstance) {
|
|
9616
|
-
|
|
9535
|
+
log8.debug(
|
|
9617
9536
|
`OpenClaw host embedding provider ${selected.adapter.id} did not create a provider; using Remnic fallback embeddings`
|
|
9618
9537
|
);
|
|
9619
9538
|
}
|
|
9620
9539
|
return providerInstance;
|
|
9621
9540
|
}).catch((error) => {
|
|
9622
|
-
|
|
9541
|
+
log8.debug(
|
|
9623
9542
|
`OpenClaw host embedding provider ${selected.adapter.id} unavailable: ${error}`
|
|
9624
9543
|
);
|
|
9625
9544
|
return null;
|
|
@@ -9651,7 +9570,7 @@ function registerOpenClawHostEmbeddingProvider(params) {
|
|
|
9651
9570
|
}
|
|
9652
9571
|
};
|
|
9653
9572
|
const unregister = registerHostEmbeddingProvider(cfg.memoryDir, hostProvider);
|
|
9654
|
-
|
|
9573
|
+
log8.info(
|
|
9655
9574
|
`registered OpenClaw host embedding provider bridge (${selected.adapter.id}) for ${serviceId}`
|
|
9656
9575
|
);
|
|
9657
9576
|
return unregister;
|
|
@@ -9804,13 +9723,13 @@ var pluginDefinition = {
|
|
|
9804
9723
|
const registerThis = typeof this === "object" && this !== null ? this : void 0;
|
|
9805
9724
|
const serviceId = typeof registerThis?.id === "string" && registerThis.id.trim().length > 0 ? registerThis.id : REMNIC_OPENCLAW_PLUGIN_ID;
|
|
9806
9725
|
const keys = buildServiceKeys(serviceId);
|
|
9807
|
-
|
|
9726
|
+
initLogger(api.logger, false);
|
|
9808
9727
|
sdkCaps = detectSdkCapabilities(api);
|
|
9809
|
-
|
|
9728
|
+
log8.info(
|
|
9810
9729
|
`SDK detection: version=${sdkCaps.sdkVersion}, beforePromptBuild=${sdkCaps.hasBeforePromptBuild}, memoryPromptSection=${sdkCaps.hasRegisterMemoryPromptSection}, memoryCapability=${sdkCaps.hasRegisterMemoryCapability}, typedHooks=${sdkCaps.hasTypedHooks}`
|
|
9811
9730
|
);
|
|
9812
9731
|
if (isNonRuntimeRegistrationMode(sdkCaps.registrationMode)) {
|
|
9813
|
-
|
|
9732
|
+
log8.info(
|
|
9814
9733
|
`registrationMode=${sdkCaps.registrationMode} \u2014 skipping runtime initialization`
|
|
9815
9734
|
);
|
|
9816
9735
|
return;
|
|
@@ -9819,9 +9738,9 @@ var pluginDefinition = {
|
|
|
9819
9738
|
if (!disableRegisterMigration) {
|
|
9820
9739
|
const migrationPromise = globalThis[ENGRAM_MIGRATION_PROMISE] ??= migrateFromEngram({
|
|
9821
9740
|
quiet: true,
|
|
9822
|
-
logger: (message) =>
|
|
9741
|
+
logger: (message) => log8.info(message)
|
|
9823
9742
|
}).catch((error) => {
|
|
9824
|
-
|
|
9743
|
+
log8.warn(`register migration failed: ${error}`);
|
|
9825
9744
|
});
|
|
9826
9745
|
void migrationPromise;
|
|
9827
9746
|
}
|
|
@@ -9832,7 +9751,7 @@ var pluginDefinition = {
|
|
|
9832
9751
|
...fileConfig,
|
|
9833
9752
|
...api.pluginConfig
|
|
9834
9753
|
};
|
|
9835
|
-
const cfg =
|
|
9754
|
+
const cfg = parseConfig(
|
|
9836
9755
|
{
|
|
9837
9756
|
...rawPluginConfig,
|
|
9838
9757
|
gatewayConfig: api.config
|
|
@@ -9854,11 +9773,11 @@ var pluginDefinition = {
|
|
|
9854
9773
|
);
|
|
9855
9774
|
cfg.providerApiKeyResolver = resolveOpenClawProviderApiKey;
|
|
9856
9775
|
cfg.runtimeAuthForModelResolver = getOpenClawRuntimeAuthForModel;
|
|
9857
|
-
|
|
9858
|
-
|
|
9776
|
+
initLogger(api.logger, cfg.debug);
|
|
9777
|
+
log8.info(
|
|
9859
9778
|
`initialized (debug=${cfg.debug}, qmdEnabled=${cfg.qmdEnabled}, transcriptEnabled=${cfg.transcriptEnabled}, hourlySummariesEnabled=${cfg.hourlySummariesEnabled})`
|
|
9860
9779
|
);
|
|
9861
|
-
|
|
9780
|
+
log8.debug(
|
|
9862
9781
|
`init llm routing (modelSource=${cfg.modelSource}, localLlmEnabled=${cfg.localLlmEnabled}${cfg.localLlmFastEnabled ? `, fastLlm=${cfg.localLlmFastModel || "(primary)"}` : ""})`
|
|
9863
9782
|
);
|
|
9864
9783
|
const fileBackedRawRuntimeConfig = loadRawConfigFromFile();
|
|
@@ -9872,7 +9791,7 @@ var pluginDefinition = {
|
|
|
9872
9791
|
});
|
|
9873
9792
|
const passiveMode = slotValidationMode === "passive";
|
|
9874
9793
|
if (passiveMode) {
|
|
9875
|
-
|
|
9794
|
+
log8.info(
|
|
9876
9795
|
`[remnic] memory slot not assigned to ${serviceId}; running passively`
|
|
9877
9796
|
);
|
|
9878
9797
|
}
|
|
@@ -9954,14 +9873,14 @@ var pluginDefinition = {
|
|
|
9954
9873
|
}
|
|
9955
9874
|
const hookApis = globalThis[keys.HOOK_APIS] ??= /* @__PURE__ */ new WeakSet();
|
|
9956
9875
|
if (hookApis.has(api)) {
|
|
9957
|
-
|
|
9876
|
+
log8.debug(
|
|
9958
9877
|
"register: this api already has hooks bound \u2014 skipping duplicate hook registration"
|
|
9959
9878
|
);
|
|
9960
9879
|
return;
|
|
9961
9880
|
}
|
|
9962
9881
|
hookApis.add(api);
|
|
9963
9882
|
if (!isFirstRegistration) {
|
|
9964
|
-
|
|
9883
|
+
log8.debug(
|
|
9965
9884
|
"register called again (new registry); re-registering hooks with shared orchestrator"
|
|
9966
9885
|
);
|
|
9967
9886
|
}
|
|
@@ -9982,7 +9901,7 @@ var pluginDefinition = {
|
|
|
9982
9901
|
};
|
|
9983
9902
|
const authTokensFromSecretRef = () => accessHttpAuthState.resolvedSecretRefAuthToken ? [accessHttpAuthState.resolvedSecretRefAuthToken] : [];
|
|
9984
9903
|
const existingAccessHttpServer = globalThis[keys.ACCESS_HTTP_SERVER];
|
|
9985
|
-
const accessHttpServer = existingAccessHttpServer && existingAccessHttpServer ? existingAccessHttpServer : new
|
|
9904
|
+
const accessHttpServer = existingAccessHttpServer && existingAccessHttpServer ? existingAccessHttpServer : new EngramAccessHttpServer({
|
|
9986
9905
|
service: accessService,
|
|
9987
9906
|
host: cfg.agentAccessHttp.host,
|
|
9988
9907
|
port: cfg.agentAccessHttp.port,
|
|
@@ -10045,7 +9964,7 @@ var pluginDefinition = {
|
|
|
10045
9964
|
}
|
|
10046
9965
|
const remainingMs = Math.max(0, deadlineMs - Date.now());
|
|
10047
9966
|
if (remainingMs === 0) {
|
|
10048
|
-
|
|
9967
|
+
log8.warn(
|
|
10049
9968
|
`OpenClaw flush-plan processing timed out before queue wait for ${reason}`
|
|
10050
9969
|
);
|
|
10051
9970
|
return Promise.resolve();
|
|
@@ -10055,7 +9974,7 @@ var pluginDefinition = {
|
|
|
10055
9974
|
task,
|
|
10056
9975
|
new Promise((resolve) => {
|
|
10057
9976
|
timeout = setTimeout(() => {
|
|
10058
|
-
|
|
9977
|
+
log8.warn(
|
|
10059
9978
|
`OpenClaw flush-plan processing timed out while waiting for ${reason}; current drain remains fenced until it settles`
|
|
10060
9979
|
);
|
|
10061
9980
|
resolve();
|
|
@@ -10067,7 +9986,7 @@ var pluginDefinition = {
|
|
|
10067
9986
|
}
|
|
10068
9987
|
async function runOpenClawFlushPlanProcessing(reason, workspaceRoot, deadlineMs) {
|
|
10069
9988
|
if (typeof deadlineMs === "number" && Date.now() >= deadlineMs) {
|
|
10070
|
-
|
|
9989
|
+
log8.warn(
|
|
10071
9990
|
`OpenClaw flush-plan processing timed out before starting for ${reason}`
|
|
10072
9991
|
);
|
|
10073
9992
|
return;
|
|
@@ -10079,26 +9998,26 @@ var pluginDefinition = {
|
|
|
10079
9998
|
serviceId,
|
|
10080
9999
|
ingestor: orchestrator,
|
|
10081
10000
|
logger: {
|
|
10082
|
-
debug: (message) =>
|
|
10083
|
-
info: (message) =>
|
|
10084
|
-
warn: (message) =>
|
|
10001
|
+
debug: (message) => log8.debug(message),
|
|
10002
|
+
info: (message) => log8.info(message),
|
|
10003
|
+
warn: (message) => log8.warn(message)
|
|
10085
10004
|
},
|
|
10086
10005
|
reason,
|
|
10087
10006
|
deadlineMs,
|
|
10088
10007
|
maxTurnChars: cfg.extractionMaxTurnChars
|
|
10089
10008
|
});
|
|
10090
10009
|
if (result.status === "processed" || result.status === "processed_preserved_tail" || result.status === "processed_marker_recovered" || result.status === "processed_marker_recovered_tail" || result.status === "processed_cleanup_deferred") {
|
|
10091
|
-
|
|
10010
|
+
log8.info(
|
|
10092
10011
|
`OpenClaw flush-plan ${result.status}: ${result.bytesProcessed ?? 0} bytes` + (result.preservedBytes ? ` (${result.preservedBytes} bytes preserved)` : "")
|
|
10093
10012
|
);
|
|
10094
10013
|
} else if (result.status === "skipped") {
|
|
10095
|
-
|
|
10014
|
+
log8.warn(
|
|
10096
10015
|
`OpenClaw flush-plan processing skipped: ${result.reason ?? "unknown reason"}`
|
|
10097
10016
|
);
|
|
10098
10017
|
}
|
|
10099
10018
|
} catch (error) {
|
|
10100
10019
|
const detail = displayErrorDetail2(error) || "unknown error";
|
|
10101
|
-
|
|
10020
|
+
log8.warn(`OpenClaw flush-plan processing failed: ${detail}`);
|
|
10102
10021
|
}
|
|
10103
10022
|
}
|
|
10104
10023
|
async function queueOpenClawFlushPlanProcessing(reason, runtimeWorkspaceDir, options = {}) {
|
|
@@ -10179,7 +10098,7 @@ var pluginDefinition = {
|
|
|
10179
10098
|
});
|
|
10180
10099
|
},
|
|
10181
10100
|
logger: {
|
|
10182
|
-
debug: (message) =>
|
|
10101
|
+
debug: (message) => log8.debug(message)
|
|
10183
10102
|
}
|
|
10184
10103
|
});
|
|
10185
10104
|
}
|
|
@@ -10191,7 +10110,7 @@ var pluginDefinition = {
|
|
|
10191
10110
|
if (!cfg.dreaming.enabled) return;
|
|
10192
10111
|
const route = resolveDreamNarrativeRoute(cfg, !!dreamNarrativeClient);
|
|
10193
10112
|
if (route.kind === "skip") {
|
|
10194
|
-
|
|
10113
|
+
log8.debug(
|
|
10195
10114
|
"dreaming narrative skipped: no LLM available (set openaiApiKey or use modelSource=gateway)"
|
|
10196
10115
|
);
|
|
10197
10116
|
return;
|
|
@@ -10222,7 +10141,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
10222
10141
|
fallbackLlmRuntimeContextFromConfig2(cfg)
|
|
10223
10142
|
);
|
|
10224
10143
|
if (!route.hasExplicitModel && !llm.isAvailable(route.options)) {
|
|
10225
|
-
|
|
10144
|
+
log8.debug(
|
|
10226
10145
|
"dreaming narrative skipped: no gateway model configured (set dreaming.narrativeModel or taskModelChain)"
|
|
10227
10146
|
);
|
|
10228
10147
|
return;
|
|
@@ -10246,7 +10165,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
10246
10165
|
rawNarrative = typeof response.output_text === "string" ? response.output_text : JSON.stringify(response.output_text ?? "");
|
|
10247
10166
|
}
|
|
10248
10167
|
} catch (error) {
|
|
10249
|
-
|
|
10168
|
+
log8.warn(`dreaming narrative generation failed: ${String(error)}`);
|
|
10250
10169
|
return;
|
|
10251
10170
|
}
|
|
10252
10171
|
const parsed = parseDreamNarrativeResponse(
|
|
@@ -10266,7 +10185,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
10266
10185
|
recallAuditDir,
|
|
10267
10186
|
cfg.recallTranscriptRetentionDays
|
|
10268
10187
|
).catch((error) => {
|
|
10269
|
-
|
|
10188
|
+
log8.debug(`recall audit prune failed: ${String(error)}`);
|
|
10270
10189
|
});
|
|
10271
10190
|
const sessionCommandDescriptors = buildSessionCommandDescriptors(serviceId, {
|
|
10272
10191
|
toggles: sessionToggleStore,
|
|
@@ -10713,7 +10632,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
10713
10632
|
return;
|
|
10714
10633
|
}
|
|
10715
10634
|
if (typeof orchestrator.flushSession !== "function") {
|
|
10716
|
-
|
|
10635
|
+
log8.warn("codexCompat provider-switch flush unavailable; preserving binding");
|
|
10717
10636
|
return;
|
|
10718
10637
|
}
|
|
10719
10638
|
try {
|
|
@@ -10723,7 +10642,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
10723
10642
|
});
|
|
10724
10643
|
forgetCodexThread2(sessionKey, sessionIdentity.previousCodexThreadId);
|
|
10725
10644
|
} catch (error) {
|
|
10726
|
-
|
|
10645
|
+
log8.warn(`codexCompat provider-switch flush failed: ${String(error)}`);
|
|
10727
10646
|
}
|
|
10728
10647
|
}
|
|
10729
10648
|
async function flushAndForgetRememberedCodexThreadOnMetadataLoss(sessionKey, sessionIdentity) {
|
|
@@ -10741,7 +10660,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
10741
10660
|
return;
|
|
10742
10661
|
}
|
|
10743
10662
|
if (typeof orchestrator.flushSession !== "function") {
|
|
10744
|
-
|
|
10663
|
+
log8.warn("codexCompat metadata-loss flush unavailable; preserving binding");
|
|
10745
10664
|
return;
|
|
10746
10665
|
}
|
|
10747
10666
|
try {
|
|
@@ -10751,7 +10670,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
10751
10670
|
});
|
|
10752
10671
|
forgetCodexThread2(sessionKey, rememberedThreadId);
|
|
10753
10672
|
} catch (error) {
|
|
10754
|
-
|
|
10673
|
+
log8.warn(`codexCompat metadata-loss flush failed: ${String(error)}`);
|
|
10755
10674
|
}
|
|
10756
10675
|
}
|
|
10757
10676
|
async function resolveBeforeResetBufferKeys(sessionKey, sessionIdentity) {
|
|
@@ -10879,7 +10798,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
10879
10798
|
rememberCodexThread2(sessionKey, sessionIdentity.providerThreadId);
|
|
10880
10799
|
if (sessionIdentity.isCodex && !codexCompactionModeLogged) {
|
|
10881
10800
|
const mode = cfg.codexCompat.compactionFlushMode === "auto" ? "auto compaction flush mode (signal + heuristic)" : `${cfg.codexCompat.compactionFlushMode} compaction flush mode`;
|
|
10882
|
-
|
|
10801
|
+
log8.info(
|
|
10883
10802
|
`codexCompat enabled: using ${mode} for bundled Codex sessions`
|
|
10884
10803
|
);
|
|
10885
10804
|
codexCompactionModeLogged = true;
|
|
@@ -10903,12 +10822,12 @@ Keep the reflection grounded in the evidence below.
|
|
|
10903
10822
|
});
|
|
10904
10823
|
clearCodexCompatCaches2(sessionKey, sessionIdentity.providerThreadId);
|
|
10905
10824
|
rememberCodexThread2(sessionKey, sessionIdentity.providerThreadId);
|
|
10906
|
-
|
|
10825
|
+
log8.info(
|
|
10907
10826
|
`codexCompat heuristic flush: thread=${sessionIdentity.providerThreadId} messages ${previousCount} -> ${currentCount}`
|
|
10908
10827
|
);
|
|
10909
10828
|
} catch (error) {
|
|
10910
10829
|
shouldPersistMessageCount = false;
|
|
10911
|
-
|
|
10830
|
+
log8.warn(`codexCompat heuristic flush failed: ${String(error)}`);
|
|
10912
10831
|
}
|
|
10913
10832
|
}
|
|
10914
10833
|
if (typeof currentCount === "number" && shouldPersistMessageCount && codexBaselineKey) {
|
|
@@ -10919,10 +10838,10 @@ Keep the reflection grounded in the evidence below.
|
|
|
10919
10838
|
const runtimeAgent = ctx.runtime?.agent;
|
|
10920
10839
|
const agentId = ctx?.agentId ?? runtimeAgent?.id ?? "main";
|
|
10921
10840
|
const verboseRequested = cfg.verboseRecallVisibility !== false && isVerboseRecallRequested(event, ctx);
|
|
10922
|
-
|
|
10841
|
+
log8.debug(
|
|
10923
10842
|
`${hookLabel}: sessionKey=${sessionKey}, promptLen=${prompt.length}`
|
|
10924
10843
|
);
|
|
10925
|
-
|
|
10844
|
+
log8.debug(
|
|
10926
10845
|
`${hookLabel}: cronRecallMode=${cfg.cronRecallMode}, allowlistCount=${cfg.cronRecallAllowlist.length}`
|
|
10927
10846
|
);
|
|
10928
10847
|
if (sessionKey.includes(":cron:") && cfg.cronRecallMode === "allowlist") {
|
|
@@ -10930,12 +10849,12 @@ Keep the reflection grounded in the evidence below.
|
|
|
10930
10849
|
const re = wildcardToRegExp(pattern);
|
|
10931
10850
|
return re.test(sessionKey);
|
|
10932
10851
|
});
|
|
10933
|
-
|
|
10852
|
+
log8.debug(
|
|
10934
10853
|
`${hookLabel}: cron allowlist match=${matchedPattern ? "yes" : "no"} pattern=${matchedPattern ?? "none"}`
|
|
10935
10854
|
);
|
|
10936
10855
|
}
|
|
10937
10856
|
if (shouldSkipRecallForSession(sessionKey, cfg)) {
|
|
10938
|
-
|
|
10857
|
+
log8.debug(
|
|
10939
10858
|
`${hookLabel}: skip recall for cron session ${sessionKey} (mode=${cfg.cronRecallMode})`
|
|
10940
10859
|
);
|
|
10941
10860
|
return;
|
|
@@ -10959,7 +10878,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
10959
10878
|
injectedChars: 0,
|
|
10960
10879
|
toggleState: auditToggleState
|
|
10961
10880
|
}).catch((error) => {
|
|
10962
|
-
|
|
10881
|
+
log8.debug(`recall audit append failed: ${String(error)}`);
|
|
10963
10882
|
});
|
|
10964
10883
|
}
|
|
10965
10884
|
if (!verboseRequested) return;
|
|
@@ -11013,7 +10932,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
11013
10932
|
const shouldWarnAndSuppressBundledActiveMemoryCollision = cfg.activeRecallEnabled && !cfg.activeRecallAllowChainedActiveMemory && bundledActiveMemoryEnabledForAgent;
|
|
11014
10933
|
if (shouldWarnAndSuppressBundledActiveMemoryCollision && !warnedBundledActiveMemoryCollisionAgents.has(agentId)) {
|
|
11015
10934
|
warnedBundledActiveMemoryCollisionAgents.add(agentId);
|
|
11016
|
-
|
|
10935
|
+
log8.warn(
|
|
11017
10936
|
`active recall suppressed because bundled active-memory plugin is enabled for agent "${agentId}" while activeRecallAllowChainedActiveMemory=false`
|
|
11018
10937
|
);
|
|
11019
10938
|
}
|
|
@@ -11027,7 +10946,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
11027
10946
|
),
|
|
11028
10947
|
currentMessage: prompt
|
|
11029
10948
|
}).catch((error) => {
|
|
11030
|
-
|
|
10949
|
+
log8.debug(`active recall fallback failed: ${String(error)}`);
|
|
11031
10950
|
return null;
|
|
11032
10951
|
});
|
|
11033
10952
|
const activeRecallLines = activeRecallResult?.summary && activeRecallResult.summary.length > 0 ? ["## Active Recall (Remnic)", "", activeRecallResult.summary, ""] : [];
|
|
@@ -11042,7 +10961,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
11042
10961
|
}
|
|
11043
10962
|
});
|
|
11044
10963
|
recallComposition ??= { context };
|
|
11045
|
-
|
|
10964
|
+
log8.debug(
|
|
11046
10965
|
`${hookLabel}: recall returned ${context?.length ?? 0} chars`
|
|
11047
10966
|
);
|
|
11048
10967
|
const lastRecall = orchestrator.getLastRecall(sessionKey);
|
|
@@ -11089,7 +11008,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
11089
11008
|
requestedMode: lastRecall?.requestedMode,
|
|
11090
11009
|
fallbackUsed: lastRecall?.fallbackUsed
|
|
11091
11010
|
}).catch((error) => {
|
|
11092
|
-
|
|
11011
|
+
log8.debug(`recall audit append failed: ${String(error)}`);
|
|
11093
11012
|
});
|
|
11094
11013
|
}
|
|
11095
11014
|
if (mergedLines.length === 0) return;
|
|
@@ -11116,7 +11035,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
11116
11035
|
requestedMode: lastRecall?.requestedMode,
|
|
11117
11036
|
fallbackUsed: lastRecall?.fallbackUsed
|
|
11118
11037
|
}).catch((error) => {
|
|
11119
|
-
|
|
11038
|
+
log8.debug(`recall audit append failed: ${String(error)}`);
|
|
11120
11039
|
});
|
|
11121
11040
|
}
|
|
11122
11041
|
const verboseLines = verboseRequested ? buildVerboseRecallHeader({
|
|
@@ -11136,12 +11055,12 @@ Keep the reflection grounded in the evidence below.
|
|
|
11136
11055
|
const memorySectionLines = memoryContext.lines;
|
|
11137
11056
|
const memoryLines = useMemoryPromptSection ? memorySectionLines : [...auxiliaryLines, ...memorySectionLines];
|
|
11138
11057
|
const promptWithVerbose = useMemoryPromptSection ? auxiliaryLines.length > 0 ? auxiliaryLines.join("\n").replace(/\n$/, "") : void 0 : auxiliaryLines.length > 0 ? [...auxiliaryLines, ...memorySectionLines].join("\n").replace(/\n$/, "") : memoryContext.prompt;
|
|
11139
|
-
|
|
11058
|
+
log8.debug(
|
|
11140
11059
|
`${hookLabel}: returning memory context with ${trimmed.length} chars`
|
|
11141
11060
|
);
|
|
11142
11061
|
return promptWithVerbose ? { prependSystemContext: promptWithVerbose, memoryLines } : { memoryLines };
|
|
11143
11062
|
} catch (err) {
|
|
11144
|
-
|
|
11063
|
+
log8.error("recall failed", err);
|
|
11145
11064
|
lastRecallSummaryBySession.set(sessionKey, null);
|
|
11146
11065
|
clearCodexCompatCaches2(sessionKey, void 0, {
|
|
11147
11066
|
preserveMessageCount: true,
|
|
@@ -11192,7 +11111,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
11192
11111
|
if (useMemoryPromptSection && api.registerMemoryPromptSection) {
|
|
11193
11112
|
if (cfg.activeRecallEnabled && !globalThis[ACTIVE_RECALL_OVERLAP_WARNED]) {
|
|
11194
11113
|
globalThis[ACTIVE_RECALL_OVERLAP_WARNED] = true;
|
|
11195
|
-
|
|
11114
|
+
log8.warn(
|
|
11196
11115
|
"activeRecallEnabled=true while memory-slot prompt injection is active (registerMemoryPromptSection). Prompt injection does NOT require active recall; this runs a second blocking retrieval per turn. Disable activeRecallEnabled unless the secondary pre-reply summary block is intentional (issue #1550)."
|
|
11197
11116
|
);
|
|
11198
11117
|
}
|
|
@@ -11403,7 +11322,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
11403
11322
|
agentIds: capabilityAgentIds
|
|
11404
11323
|
});
|
|
11405
11324
|
} catch (err) {
|
|
11406
|
-
|
|
11325
|
+
log8.error("publicArtifacts.listArtifacts failed", err);
|
|
11407
11326
|
return [];
|
|
11408
11327
|
}
|
|
11409
11328
|
}
|
|
@@ -11420,14 +11339,14 @@ Keep the reflection grounded in the evidence below.
|
|
|
11420
11339
|
}
|
|
11421
11340
|
const builderDesc = !promptInjectionAllowed ? " (promptBuilder omitted \u2014 injection disabled by policy)" : memoryPromptBuilder ? " and promptBuilder (from registerMemoryPromptSection)" : " and promptBuilder (capability-only fallback)";
|
|
11422
11341
|
const capabilityDesc = typeof api.registerMemoryCapability === "function" ? `memory capability with publicArtifacts provider${builderDesc}` : "split memory runtime/flush-plan surfaces";
|
|
11423
|
-
|
|
11342
|
+
log8.info(`registered ${capabilityDesc}`);
|
|
11424
11343
|
}
|
|
11425
11344
|
if (cfg.openclawMessageReceivedCaptureEnabled) {
|
|
11426
11345
|
api.on(
|
|
11427
11346
|
"message_received",
|
|
11428
11347
|
async (event, ctx) => {
|
|
11429
11348
|
if (cfg.heartbeat.enabled && cfg.heartbeat.gateExtractionDuringHeartbeat && isHeartbeatTrigger2(event, ctx)) {
|
|
11430
|
-
|
|
11349
|
+
log8.debug(
|
|
11431
11350
|
`message_received: skipping transcript capture during heartbeat run for ${ctx?.sessionKey ?? "default"}`
|
|
11432
11351
|
);
|
|
11433
11352
|
return;
|
|
@@ -11515,7 +11434,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
11515
11434
|
rememberPendingSparseInboundContentFingerprint2(sparseInboundContentFingerprint);
|
|
11516
11435
|
}
|
|
11517
11436
|
} catch (err) {
|
|
11518
|
-
|
|
11437
|
+
log8.debug(`message_received transcript append failed: ${err}`);
|
|
11519
11438
|
}
|
|
11520
11439
|
}
|
|
11521
11440
|
);
|
|
@@ -11526,7 +11445,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
11526
11445
|
if (!event.success || !Array.isArray(event.messages)) return;
|
|
11527
11446
|
if (event.messages.length === 0) return;
|
|
11528
11447
|
if (cfg.heartbeat.enabled && cfg.heartbeat.gateExtractionDuringHeartbeat && isHeartbeatTrigger2(event, ctx)) {
|
|
11529
|
-
|
|
11448
|
+
log8.debug(
|
|
11530
11449
|
`agent_end: skipping transcript/extraction buffering during heartbeat run for ${ctx?.sessionKey ?? "default"}`
|
|
11531
11450
|
);
|
|
11532
11451
|
return;
|
|
@@ -11574,9 +11493,9 @@ Keep the reflection grounded in the evidence below.
|
|
|
11574
11493
|
try {
|
|
11575
11494
|
const objectiveStateNamespace = orchestrator.config.namespacesEnabled && typeof orchestrator.resolveSelfNamespace === "function" ? orchestrator.resolveSelfNamespace(sessionKey) : orchestrator.config.defaultNamespace;
|
|
11576
11495
|
const objectiveStateStorage = orchestrator.config.namespacesEnabled && typeof orchestrator.getStorageForNamespace === "function" ? await orchestrator.getStorageForNamespace(objectiveStateNamespace) : null;
|
|
11577
|
-
await
|
|
11496
|
+
await recordObjectiveStateSnapshotsFromAgentMessages({
|
|
11578
11497
|
memoryDir: objectiveStateStorage?.dir ?? orchestrator.config.memoryDir,
|
|
11579
|
-
objectiveStateStoreDir:
|
|
11498
|
+
objectiveStateStoreDir: objectiveStateStoreOverrideForNamespace({
|
|
11580
11499
|
memoryDir: orchestrator.config.memoryDir,
|
|
11581
11500
|
configuredStoreDir: orchestrator.config.objectiveStateStoreDir,
|
|
11582
11501
|
namespacesEnabled: orchestrator.config.namespacesEnabled,
|
|
@@ -11589,7 +11508,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
11589
11508
|
messages
|
|
11590
11509
|
});
|
|
11591
11510
|
} catch (error) {
|
|
11592
|
-
|
|
11511
|
+
log8.debug(
|
|
11593
11512
|
`agent_end objective-state writer skipped due to error: ${error}`
|
|
11594
11513
|
);
|
|
11595
11514
|
}
|
|
@@ -11707,11 +11626,11 @@ Keep the reflection grounded in the evidence below.
|
|
|
11707
11626
|
);
|
|
11708
11627
|
}
|
|
11709
11628
|
} catch (lcmErr) {
|
|
11710
|
-
|
|
11629
|
+
log8.debug(`LCM agent_end indexing error: ${lcmErr}`);
|
|
11711
11630
|
}
|
|
11712
11631
|
}
|
|
11713
11632
|
} catch (err) {
|
|
11714
|
-
|
|
11633
|
+
log8.error("agent_end processing failed", err);
|
|
11715
11634
|
}
|
|
11716
11635
|
}
|
|
11717
11636
|
);
|
|
@@ -11737,7 +11656,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
11737
11656
|
clearCodexCompatCaches2(sessionKey, signalThreadId);
|
|
11738
11657
|
rememberCodexThread2(sessionKey, signalThreadId);
|
|
11739
11658
|
} catch (error) {
|
|
11740
|
-
|
|
11659
|
+
log8.warn(`codexCompat signal flush failed: ${String(error)}`);
|
|
11741
11660
|
}
|
|
11742
11661
|
}
|
|
11743
11662
|
if (orchestrator.lcmEngine?.enabled) {
|
|
@@ -11765,7 +11684,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
11765
11684
|
);
|
|
11766
11685
|
await orchestrator.lcmEngine.preCompactionFlush(sessionKey);
|
|
11767
11686
|
} catch (lcmErr) {
|
|
11768
|
-
|
|
11687
|
+
log8.debug(`LCM before_compaction error: ${lcmErr}`);
|
|
11769
11688
|
}
|
|
11770
11689
|
}
|
|
11771
11690
|
if (!orchestrator.config.checkpointEnabled) {
|
|
@@ -11785,10 +11704,10 @@ Keep the reflection grounded in the evidence below.
|
|
|
11785
11704
|
turns: checkpointTurns,
|
|
11786
11705
|
ttl: new Date(Date.now() + 24 * 60 * 60 * 1e3).toISOString()
|
|
11787
11706
|
});
|
|
11788
|
-
|
|
11707
|
+
log8.info(`saved checkpoint for ${sessionKey} before compaction`);
|
|
11789
11708
|
}
|
|
11790
11709
|
} catch (err) {
|
|
11791
|
-
|
|
11710
|
+
log8.error("before_compaction hook failed", err);
|
|
11792
11711
|
}
|
|
11793
11712
|
}
|
|
11794
11713
|
);
|
|
@@ -11828,24 +11747,24 @@ Keep the reflection grounded in the evidence below.
|
|
|
11828
11747
|
);
|
|
11829
11748
|
await orchestrator.lcmEngine.verifyPostCompaction(sessionKey);
|
|
11830
11749
|
} catch (lcmErr) {
|
|
11831
|
-
|
|
11750
|
+
log8.debug(`LCM after_compaction error: ${lcmErr}`);
|
|
11832
11751
|
}
|
|
11833
11752
|
}
|
|
11834
11753
|
void queueOpenClawFlushPlanProcessing("after_compaction", workspaceDir);
|
|
11835
11754
|
if (!orchestrator.config.compactionResetEnabled) {
|
|
11836
|
-
|
|
11755
|
+
log8.debug(
|
|
11837
11756
|
`compaction completed for ${sessionKey}, reset disabled \u2014 skipping`
|
|
11838
11757
|
);
|
|
11839
11758
|
return;
|
|
11840
11759
|
}
|
|
11841
|
-
|
|
11760
|
+
log8.info(
|
|
11842
11761
|
`compaction completed for ${sessionKey}, triggering session reset`
|
|
11843
11762
|
);
|
|
11844
11763
|
const apiAny = api;
|
|
11845
11764
|
if (typeof apiAny.resetSession === "function") {
|
|
11846
11765
|
const result = await apiAny.resetSession(sessionKey, "new");
|
|
11847
11766
|
if (result?.ok === true) {
|
|
11848
|
-
|
|
11767
|
+
log8.info(
|
|
11849
11768
|
`session reset via API for ${sessionKey}, new sessionId=${result.sessionId}`
|
|
11850
11769
|
);
|
|
11851
11770
|
const safeSessionKey = sanitizeSessionKeyForFilename(sessionKey);
|
|
@@ -11865,17 +11784,17 @@ Keep the reflection grounded in the evidence below.
|
|
|
11865
11784
|
const errorDetail = result && typeof result === "object" && "error" in result ? String(
|
|
11866
11785
|
result.error ?? "unknown error"
|
|
11867
11786
|
) : `invalid result: ${JSON.stringify(result)}`;
|
|
11868
|
-
|
|
11787
|
+
log8.error(
|
|
11869
11788
|
`api.resetSession failed for ${sessionKey}: ${errorDetail}`
|
|
11870
11789
|
);
|
|
11871
11790
|
}
|
|
11872
11791
|
} else {
|
|
11873
|
-
|
|
11792
|
+
log8.error(
|
|
11874
11793
|
`api.resetSession not available \u2014 compaction reset requires OC fork with PR #29985. Session ${sessionKey} will continue without reset.`
|
|
11875
11794
|
);
|
|
11876
11795
|
}
|
|
11877
11796
|
} catch (err) {
|
|
11878
|
-
|
|
11797
|
+
log8.error("after_compaction reset failed", err);
|
|
11879
11798
|
}
|
|
11880
11799
|
}
|
|
11881
11800
|
);
|
|
@@ -11908,7 +11827,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
11908
11827
|
).catch((error) => {
|
|
11909
11828
|
if (!flushAbort.signal.aborted) {
|
|
11910
11829
|
flushFailed = true;
|
|
11911
|
-
|
|
11830
|
+
log8.warn(
|
|
11912
11831
|
`before_reset flush failed for ${bufferKey}: ${String(error)}`
|
|
11913
11832
|
);
|
|
11914
11833
|
}
|
|
@@ -11941,7 +11860,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
11941
11860
|
);
|
|
11942
11861
|
}
|
|
11943
11862
|
if (flushTimedOut) {
|
|
11944
|
-
|
|
11863
|
+
log8.warn(
|
|
11945
11864
|
`before_reset flush timed out after ${cfg.beforeResetTimeoutMs}ms`
|
|
11946
11865
|
);
|
|
11947
11866
|
}
|
|
@@ -11956,18 +11875,18 @@ Keep the reflection grounded in the evidence below.
|
|
|
11956
11875
|
}
|
|
11957
11876
|
);
|
|
11958
11877
|
} catch (error) {
|
|
11959
|
-
|
|
11878
|
+
log8.debug(`before_reset hook unavailable on this runtime: ${String(error)}`);
|
|
11960
11879
|
}
|
|
11961
11880
|
if (!passiveMode && sdkCaps.hasBeforePromptBuild) {
|
|
11962
11881
|
api.on(
|
|
11963
11882
|
"session_start",
|
|
11964
11883
|
async (event, ctx) => {
|
|
11965
11884
|
const sessionKey = event.sessionKey ?? "default";
|
|
11966
|
-
|
|
11885
|
+
log8.debug(`session_start: ${sessionKey}`);
|
|
11967
11886
|
try {
|
|
11968
11887
|
await orchestrator.maybeRunFileHygiene().catch(() => void 0);
|
|
11969
11888
|
} catch (err) {
|
|
11970
|
-
|
|
11889
|
+
log8.debug(`session_start file hygiene failed: ${err}`);
|
|
11971
11890
|
}
|
|
11972
11891
|
void queueOpenClawFlushPlanProcessing(
|
|
11973
11892
|
"session_start",
|
|
@@ -11980,7 +11899,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
11980
11899
|
"session_end",
|
|
11981
11900
|
async (event, ctx) => {
|
|
11982
11901
|
const sessionKey = event.sessionKey ?? ctx.sessionKey ?? "default";
|
|
11983
|
-
|
|
11902
|
+
log8.debug(`session_end: ${sessionKey}`);
|
|
11984
11903
|
const sessionIdentity = resolveSessionIdentity2(sessionKey, event, ctx);
|
|
11985
11904
|
const rememberedThreadId = sessionIdentity.providerThreadId ?? resolveStoredCodexThreadId2(sessionKey);
|
|
11986
11905
|
const bufferKeys = await resolveBeforeResetBufferKeys(sessionKey, {
|
|
@@ -11998,7 +11917,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
11998
11917
|
});
|
|
11999
11918
|
} catch (error) {
|
|
12000
11919
|
flushFailed = true;
|
|
12001
|
-
|
|
11920
|
+
log8.warn(
|
|
12002
11921
|
`session_end flush failed for ${bufferKey}: ${String(error)}`
|
|
12003
11922
|
);
|
|
12004
11923
|
}
|
|
@@ -12023,7 +11942,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12023
11942
|
"before_tool_call",
|
|
12024
11943
|
async (event, _ctx) => {
|
|
12025
11944
|
if (event.toolName) {
|
|
12026
|
-
|
|
11945
|
+
log8.debug(`before_tool_call: ${event.toolName}`);
|
|
12027
11946
|
}
|
|
12028
11947
|
}
|
|
12029
11948
|
);
|
|
@@ -12031,7 +11950,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12031
11950
|
"after_tool_call",
|
|
12032
11951
|
async (event, _ctx) => {
|
|
12033
11952
|
if (event.toolName) {
|
|
12034
|
-
|
|
11953
|
+
log8.debug(
|
|
12035
11954
|
`after_tool_call: ${event.toolName} (${event.durationMs ?? "?"}ms)`
|
|
12036
11955
|
);
|
|
12037
11956
|
}
|
|
@@ -12042,7 +11961,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12042
11961
|
async (event, ctx) => {
|
|
12043
11962
|
const sessionKey = ctx?.sessionKey ?? "default";
|
|
12044
11963
|
if (event.tokenUsage) {
|
|
12045
|
-
|
|
11964
|
+
log8.debug(
|
|
12046
11965
|
`llm_output: model=${event.model ?? "?"}, tokens=${event.tokenUsage.input ?? 0}/${event.tokenUsage.output ?? 0}, ${event.durationMs ?? "?"}ms, session=${sessionKey}`
|
|
12047
11966
|
);
|
|
12048
11967
|
}
|
|
@@ -12051,7 +11970,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12051
11970
|
api.on(
|
|
12052
11971
|
"subagent_spawned",
|
|
12053
11972
|
async (event, _ctx) => {
|
|
12054
|
-
|
|
11973
|
+
log8.debug(
|
|
12055
11974
|
`subagent_spawned: ${event.subagentId ?? "?"} purpose=${event.purpose ?? "?"} parent=${event.parentSessionKey ?? "?"}`
|
|
12056
11975
|
);
|
|
12057
11976
|
}
|
|
@@ -12059,7 +11978,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12059
11978
|
api.on(
|
|
12060
11979
|
"subagent_ended",
|
|
12061
11980
|
async (event, _ctx) => {
|
|
12062
|
-
|
|
11981
|
+
log8.debug(
|
|
12063
11982
|
`subagent_ended: ${event.subagentId ?? "?"} success=${event.success ?? "?"} ${event.durationMs ?? "?"}ms`
|
|
12064
11983
|
);
|
|
12065
11984
|
}
|
|
@@ -12077,7 +11996,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12077
11996
|
try {
|
|
12078
11997
|
const loadedJobs = await loadHourlySummaryCronJobsData(cronFilePath);
|
|
12079
11998
|
if (loadedJobs.status === "invalid") {
|
|
12080
|
-
|
|
11999
|
+
log8.error(
|
|
12081
12000
|
`hourly summary cron auto-registration skipped: existing jobs file is invalid at ${cronFilePath}`,
|
|
12082
12001
|
loadedJobs.error
|
|
12083
12002
|
);
|
|
@@ -12092,7 +12011,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12092
12011
|
{ nowMs: Date.now() }
|
|
12093
12012
|
);
|
|
12094
12013
|
if (!changed) {
|
|
12095
|
-
|
|
12014
|
+
log8.debug("hourly summary cron job already up to date");
|
|
12096
12015
|
return;
|
|
12097
12016
|
}
|
|
12098
12017
|
jobsData.jobs[existingIndex] = job;
|
|
@@ -12100,7 +12019,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12100
12019
|
cronFilePath,
|
|
12101
12020
|
JSON.stringify(jobsData, null, 2)
|
|
12102
12021
|
);
|
|
12103
|
-
|
|
12022
|
+
log8.info("reconciled hourly summary cron job routing to configured task model");
|
|
12104
12023
|
return;
|
|
12105
12024
|
}
|
|
12106
12025
|
const randomMinute = Math.floor(Math.random() * 59) + 1;
|
|
@@ -12114,9 +12033,9 @@ Keep the reflection grounded in the evidence below.
|
|
|
12114
12033
|
cronFilePath,
|
|
12115
12034
|
JSON.stringify(jobsData, null, 2)
|
|
12116
12035
|
);
|
|
12117
|
-
|
|
12036
|
+
log8.info("auto-registered hourly summary cron job");
|
|
12118
12037
|
} catch (err) {
|
|
12119
|
-
|
|
12038
|
+
log8.error("failed to auto-register hourly summary cron job:", err);
|
|
12120
12039
|
}
|
|
12121
12040
|
}
|
|
12122
12041
|
if (typeof api.registerMemoryCorpusSupplement === "function") {
|
|
@@ -12226,7 +12145,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12226
12145
|
};
|
|
12227
12146
|
});
|
|
12228
12147
|
} catch (err) {
|
|
12229
|
-
|
|
12148
|
+
log8.warn(`memory corpus search failed: ${err}`);
|
|
12230
12149
|
throw corpusBackendError("search", err);
|
|
12231
12150
|
}
|
|
12232
12151
|
},
|
|
@@ -12262,7 +12181,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12262
12181
|
updatedAt: memory.frontmatter.updated
|
|
12263
12182
|
};
|
|
12264
12183
|
} catch (err) {
|
|
12265
|
-
|
|
12184
|
+
log8.warn(`memory corpus get failed: ${err}`);
|
|
12266
12185
|
throw corpusBackendError("get", err);
|
|
12267
12186
|
}
|
|
12268
12187
|
}
|
|
@@ -12285,7 +12204,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12285
12204
|
commandApi.registerCommand(descriptor);
|
|
12286
12205
|
}
|
|
12287
12206
|
} else if (typeof commandApi.registerCommand !== "function") {
|
|
12288
|
-
|
|
12207
|
+
log8.debug(
|
|
12289
12208
|
"registerCommand unavailable on this runtime; skipping Remnic session command descriptors because commands.list is a gateway RPC surface, not a typed plugin hook"
|
|
12290
12209
|
);
|
|
12291
12210
|
}
|
|
@@ -12324,7 +12243,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12324
12243
|
if (globalThis[keys.SERVICE_STARTED]) return;
|
|
12325
12244
|
}
|
|
12326
12245
|
if (globalThis[keys.SERVICE_STARTED]) {
|
|
12327
|
-
|
|
12246
|
+
log8.debug(
|
|
12328
12247
|
`${serviceId}: service.start() called again \u2014 skipping duplicate init`
|
|
12329
12248
|
);
|
|
12330
12249
|
return;
|
|
@@ -12337,10 +12256,10 @@ Keep the reflection grounded in the evidence below.
|
|
|
12337
12256
|
globalThis[keys.ORCHESTRATOR] = orchestrator;
|
|
12338
12257
|
const initPromise = (async () => {
|
|
12339
12258
|
try {
|
|
12340
|
-
|
|
12259
|
+
log8.info("initializing engram memory system...");
|
|
12341
12260
|
await orchestrator.initialize();
|
|
12342
12261
|
if (!didCountStart) return;
|
|
12343
|
-
activeOpikExporter = createOpikExporter({},
|
|
12262
|
+
activeOpikExporter = createOpikExporter({}, log8);
|
|
12344
12263
|
if (activeOpikExporter) activeOpikExporter.subscribe();
|
|
12345
12264
|
if (orchestrator.config.transcriptEnabled) {
|
|
12346
12265
|
await orchestrator.transcript.cleanup(
|
|
@@ -12352,7 +12271,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12352
12271
|
await ensureHourlySummaryCron(api);
|
|
12353
12272
|
if (!didCountStart) return;
|
|
12354
12273
|
} else if (orchestrator.config.hourlySummariesEnabled) {
|
|
12355
|
-
|
|
12274
|
+
log8.info(
|
|
12356
12275
|
"hourly summaries enabled; cron auto-register is disabled. To schedule summaries, create an isolated/agentTurn cron job that calls `memory_summarize_hourly`."
|
|
12357
12276
|
);
|
|
12358
12277
|
}
|
|
@@ -12368,7 +12287,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12368
12287
|
resolveDreamJournalPath(),
|
|
12369
12288
|
() => {
|
|
12370
12289
|
void queueDreamSurfaceSync().catch((error) => {
|
|
12371
|
-
|
|
12290
|
+
log8.debug(`dream surface watch sync failed: ${String(error)}`);
|
|
12372
12291
|
});
|
|
12373
12292
|
}
|
|
12374
12293
|
);
|
|
@@ -12388,7 +12307,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12388
12307
|
resolveHeartbeatJournalPath(),
|
|
12389
12308
|
() => {
|
|
12390
12309
|
void queueHeartbeatSurfaceSync().catch((error) => {
|
|
12391
|
-
|
|
12310
|
+
log8.debug(`heartbeat surface watch sync failed: ${String(error)}`);
|
|
12392
12311
|
});
|
|
12393
12312
|
}
|
|
12394
12313
|
);
|
|
@@ -12409,17 +12328,17 @@ Keep the reflection grounded in the evidence below.
|
|
|
12409
12328
|
}
|
|
12410
12329
|
try {
|
|
12411
12330
|
const status = await accessHttpServer.start();
|
|
12412
|
-
|
|
12331
|
+
log8.info(
|
|
12413
12332
|
`engram access HTTP ready at http://${status.host}:${status.port}`
|
|
12414
12333
|
);
|
|
12415
12334
|
} catch (err) {
|
|
12416
|
-
|
|
12335
|
+
log8.error("failed to start engram access HTTP server", err);
|
|
12417
12336
|
}
|
|
12418
12337
|
}
|
|
12419
12338
|
if (!didCountStart) return;
|
|
12420
12339
|
globalThis[keys.SERVICE_STARTED] = true;
|
|
12421
|
-
|
|
12422
|
-
|
|
12340
|
+
log8.info("engram memory system ready");
|
|
12341
|
+
log8.info(
|
|
12423
12342
|
`gateway_start fired \u2014 Remnic memory plugin is active (id=${pluginDefinition.id}, memoryDir=${cfg.memoryDir})`
|
|
12424
12343
|
);
|
|
12425
12344
|
void queueOpenClawFlushPlanProcessing(
|
|
@@ -12493,7 +12412,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12493
12412
|
try {
|
|
12494
12413
|
activeOpikExporter?.unsubscribe();
|
|
12495
12414
|
} catch (err) {
|
|
12496
|
-
|
|
12415
|
+
log8.debug(`engram opik exporter unsubscribe failed: ${err}`);
|
|
12497
12416
|
}
|
|
12498
12417
|
activeOpikExporter = null;
|
|
12499
12418
|
const finishCodex = beginCodexSubscriptionShutdown(getCodexSubscriptionRunnerForOwner(cfg));
|
|
@@ -12501,7 +12420,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12501
12420
|
try {
|
|
12502
12421
|
await accessHttpServer.stop();
|
|
12503
12422
|
} catch (err) {
|
|
12504
|
-
|
|
12423
|
+
log8.debug(`engram access HTTP stop failed: ${err}`);
|
|
12505
12424
|
}
|
|
12506
12425
|
stopDreamWatcher?.();
|
|
12507
12426
|
stopDreamWatcher = null;
|
|
@@ -12512,7 +12431,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12512
12431
|
try {
|
|
12513
12432
|
await orchestrator.destroy();
|
|
12514
12433
|
} catch (err) {
|
|
12515
|
-
|
|
12434
|
+
log8.debug(`engram orchestrator destroy on stop failed: ${err}`);
|
|
12516
12435
|
}
|
|
12517
12436
|
} finally {
|
|
12518
12437
|
finishCodex();
|
|
@@ -12538,7 +12457,7 @@ Keep the reflection grounded in the evidence below.
|
|
|
12538
12457
|
if (!secondaryTookOver) {
|
|
12539
12458
|
globalThis[keys.SERVICE_STARTED] = false;
|
|
12540
12459
|
}
|
|
12541
|
-
|
|
12460
|
+
log8.info("stopped");
|
|
12542
12461
|
}
|
|
12543
12462
|
});
|
|
12544
12463
|
}
|
|
@@ -12681,7 +12600,6 @@ async function resolveFlushPlanProcessingChainKey(workspaceRoot) {
|
|
|
12681
12600
|
return lexicalRoot;
|
|
12682
12601
|
}
|
|
12683
12602
|
}
|
|
12684
|
-
var export_loadDaySummaryPrompt = day_summary_exports.loadDaySummaryPrompt;
|
|
12685
12603
|
export {
|
|
12686
12604
|
buildHourlySummaryCronJob,
|
|
12687
12605
|
checkDaemonHealth,
|
|
@@ -12691,7 +12609,7 @@ export {
|
|
|
12691
12609
|
detectDaemonBridgeMode,
|
|
12692
12610
|
embedWithOpenClawProvider,
|
|
12693
12611
|
listRemnicPublicArtifacts,
|
|
12694
|
-
|
|
12612
|
+
loadDaySummaryPrompt,
|
|
12695
12613
|
loadHourlySummaryCronJobsData,
|
|
12696
12614
|
loadOpenClawMemoryEmbeddingSdk,
|
|
12697
12615
|
parseHourlySummaryCronJobsData,
|