@remnic/plugin-openclaw 1.0.5 → 1.0.6

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.
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  buildExtensionsBlockForConsolidation,
3
3
  runPostConsolidationMaterialize
4
- } from "./chunk-J2FCINY7.js";
5
- import "./chunk-5VTGFKKU.js";
4
+ } from "./chunk-QHMR3D7U.js";
5
+ import "./chunk-KPMXWORS.js";
6
6
  import {
7
7
  readChainIndex,
8
8
  resolveChainsDir
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  searchCausalTrajectories
3
- } from "./chunk-RMFPW4VK.js";
3
+ } from "./chunk-LN5UZQVG.js";
4
4
  import {
5
5
  readChainIndex,
6
6
  resolveChainsDir
@@ -3,7 +3,7 @@ import {
3
3
  parseContinuityImprovementLoops,
4
4
  parseContinuityIncident,
5
5
  sanitizeMemoryContent
6
- } from "./chunk-5VTGFKKU.js";
6
+ } from "./chunk-KPMXWORS.js";
7
7
  import {
8
8
  log
9
9
  } from "./chunk-UFU5GGGA.js";
@@ -4881,7 +4881,7 @@ var CompoundingEngine = class {
4881
4881
  let promotionCandidates = this.config.compoundingSemanticEnabled ? this.derivePromotionCandidates(outcomeSummary, mistakes.registry, rubrics) : [];
4882
4882
  if (this.config.cmcConsolidationEnabled) {
4883
4883
  try {
4884
- const { deriveCausalPromotionCandidates, materializeAfterCausalConsolidation } = await import("./causal-consolidation-Z3PHIFTL.js");
4884
+ const { deriveCausalPromotionCandidates, materializeAfterCausalConsolidation } = await import("./causal-consolidation-EBLROS42.js");
4885
4885
  const causalCandidates = await deriveCausalPromotionCandidates({
4886
4886
  memoryDir: this.config.memoryDir,
4887
4887
  causalTrajectoryStoreDir: this.config.causalTrajectoryStoreDir,
@@ -3038,6 +3038,9 @@ var StorageManager = class _StorageManager {
3038
3038
  get correctionsDir() {
3039
3039
  return path5.join(this.baseDir, "corrections");
3040
3040
  }
3041
+ get proceduresDir() {
3042
+ return path5.join(this.baseDir, "procedures");
3043
+ }
3041
3044
  get entitiesDir() {
3042
3045
  return path5.join(this.baseDir, "entities");
3043
3046
  }
@@ -3194,6 +3197,7 @@ var StorageManager = class _StorageManager {
3194
3197
  async ensureDirectories() {
3195
3198
  const today = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
3196
3199
  await mkdir3(path5.join(this.factsDir, today), { recursive: true });
3200
+ await mkdir3(path5.join(this.proceduresDir, today), { recursive: true });
3197
3201
  await mkdir3(this.correctionsDir, { recursive: true });
3198
3202
  await mkdir3(this.entitiesDir, { recursive: true });
3199
3203
  await mkdir3(this.stateDir, { recursive: true });
@@ -3243,6 +3247,9 @@ var StorageManager = class _StorageManager {
3243
3247
  memoryKind: options.memoryKind,
3244
3248
  structuredAttributes: options.structuredAttributes
3245
3249
  };
3250
+ if (options.status !== void 0) {
3251
+ fm.status = options.status;
3252
+ }
3246
3253
  let enrichedContent = content;
3247
3254
  if (options.structuredAttributes && Object.keys(options.structuredAttributes).length > 0) {
3248
3255
  enrichedContent = `${content}
@@ -3263,6 +3270,9 @@ ${sanitized.text}
3263
3270
  let filePath;
3264
3271
  if (category === "correction") {
3265
3272
  filePath = path5.join(this.correctionsDir, `${id}.md`);
3273
+ } else if (category === "procedure") {
3274
+ await mkdir3(path5.join(this.proceduresDir, today), { recursive: true });
3275
+ filePath = path5.join(this.proceduresDir, today, `${id}.md`);
3266
3276
  } else {
3267
3277
  filePath = path5.join(this.factsDir, today, `${id}.md`);
3268
3278
  }
@@ -3682,6 +3692,7 @@ ${sanitized.text}
3682
3692
  }
3683
3693
  };
3684
3694
  await collectPaths(this.factsDir);
3695
+ await collectPaths(this.proceduresDir);
3685
3696
  await collectPaths(this.correctionsDir);
3686
3697
  return filePaths;
3687
3698
  }
@@ -3989,6 +4000,9 @@ ${sanitized.text}
3989
4000
  if (memory.frontmatter.category === "correction") {
3990
4001
  return path5.join(root, "corrections", `${memory.frontmatter.id}.md`);
3991
4002
  }
4003
+ if (memory.frontmatter.category === "procedure") {
4004
+ return path5.join(root, "procedures", this.resolveMemoryDateDir(memory), `${memory.frontmatter.id}.md`);
4005
+ }
3992
4006
  return path5.join(root, "facts", this.resolveMemoryDateDir(memory), `${memory.frontmatter.id}.md`);
3993
4007
  }
3994
4008
  async writeMemoryFileAtomic(targetPath, memory) {
@@ -5687,6 +5701,9 @@ ${sanitized.text}
5687
5701
  let filePath;
5688
5702
  if (category === "correction") {
5689
5703
  filePath = path5.join(this.correctionsDir, `${id}.md`);
5704
+ } else if (category === "procedure") {
5705
+ await mkdir3(path5.join(this.proceduresDir, today), { recursive: true });
5706
+ filePath = path5.join(this.proceduresDir, today, `${id}.md`);
5690
5707
  } else {
5691
5708
  filePath = path5.join(this.factsDir, today, `${id}.md`);
5692
5709
  }
@@ -67,6 +67,14 @@ async function readCausalTrajectoryRecords(options) {
67
67
  }
68
68
  return { files, trajectories, invalidTrajectories };
69
69
  }
70
+ function filterTrajectoriesByLookbackDays(trajectories, lookbackDays, nowMs = Date.now()) {
71
+ const days = Math.max(1, Math.floor(lookbackDays));
72
+ const cutoff = nowMs - days * 864e5;
73
+ return trajectories.filter((t) => {
74
+ const ms = Date.parse(t.recordedAt);
75
+ return Number.isFinite(ms) && ms >= cutoff;
76
+ });
77
+ }
70
78
  async function getCausalTrajectoryStoreStatus(options) {
71
79
  const rootDir = resolveCausalTrajectoryStoreDir(options.memoryDir, options.causalTrajectoryStoreDir);
72
80
  const trajectoriesDir = path.join(rootDir, "trajectories");
@@ -153,6 +161,8 @@ async function searchCausalTrajectories(options) {
153
161
  }
154
162
 
155
163
  export {
164
+ readCausalTrajectoryRecords,
165
+ filterTrajectoriesByLookbackDays,
156
166
  getCausalTrajectoryStoreStatus,
157
167
  searchCausalTrajectories
158
168
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-5VTGFKKU.js";
3
+ } from "./chunk-KPMXWORS.js";
4
4
  import {
5
5
  countRecallTokenOverlap,
6
6
  normalizeRecallTokens
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  CompoundingEngine,
3
3
  defaultTierMigrationCycleBudget
4
- } from "./chunk-Y65XJVI3.js";
5
- import "./chunk-5VTGFKKU.js";
4
+ } from "./chunk-GUKYM4XZ.js";
5
+ import "./chunk-KPMXWORS.js";
6
6
  import "./chunk-UFU5GGGA.js";
7
7
  import "./chunk-MLKGABMK.js";
8
8
  export {