@lmzhen/dsh-evolution-feedback 0.21.0 → 0.23.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 (2) hide show
  1. package/lib/index.js +3 -5
  2. package/package.json +7 -7
package/lib/index.js CHANGED
@@ -1,5 +1,6 @@
1
+ import { EVENT_LOG_VERSION, appendEvolutionEvent, clampedNumber, eventsFile, evolutionEventPayloadIssue, evolutionIoAdapter, evolutionRoot, isPresent, isRecord, isUnknown, listEventArchives, parseEvolutionEvents, probeText, readEvolutionTimeline, transactIo } from "@lmzhen/dsh-evolution-core";
1
2
  import z from "@deepseek-ai/schemastery";
2
- import { EVENT_LOG_VERSION, appendEvolutionEvent, clampedNumber, eventsFile, evolutionEventPayloadIssue, evolutionIoAdapter, evolutionRoot, isPresent, isUnknown, listEventArchives, parseEvolutionEvents, probeText, readEvolutionTimeline, transactIo } from "@lmzhen/dsh-evolution-core";
3
+ import { preferProvider } from "@lmzhen/dsh-evolution-io";
3
4
  import { join } from "node:path";
4
5
  //#region lib/types/index.js
5
6
  /**
@@ -539,9 +540,6 @@ function sanitizeFeedbackRecord(value, target, kind, warn) {
539
540
  ...note !== void 0 ? { lastNote: note } : {}
540
541
  };
541
542
  }
542
- function isRecord(value) {
543
- return typeof value === "object" && value !== null && !Array.isArray(value);
544
- }
545
543
  /** Fold all feedback events from zero (the truth view). */
546
544
  function foldFeedbackState(events, warn = () => {}) {
547
545
  const state = {
@@ -651,7 +649,7 @@ function apply(ctx, rawConfig = {}) {
651
649
  ctx.provide("evolutionFeedback", feedback);
652
650
  ctx.inject(["evolutionIo"], (ioCtx) => {
653
651
  const ioRegistry = ioCtx.evolutionIo;
654
- const io = evolutionIoAdapter(() => ioRegistry.provider());
652
+ const io = evolutionIoAdapter(() => preferProvider(ioRegistry, ["fs"]));
655
653
  feedback.attachIo(io);
656
654
  feedback.restore(io).catch((error) => {
657
655
  ioCtx.logger.warn(error);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-feedback",
3
3
  "description": "Feedback-to-quality scoring for self-evolution (community build)",
4
- "version": "0.21.0",
4
+ "version": "0.23.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,16 +27,16 @@
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
29
  "@deepseek-ai/schemastery": "^3.18.4",
30
- "@lmzhen/dsh-evolution-core": "^0.21.0"
30
+ "@lmzhen/dsh-evolution-core": "^0.23.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@deepseek-ai/cordis": "^4.0.1",
34
- "@lmzhen/dsh-evolution-io": "^0.21.0",
35
- "@lmzhen/dsh-skill-usage": "^0.21.0"
34
+ "@lmzhen/dsh-evolution-io": "^0.23.0",
35
+ "@lmzhen/dsh-skill-usage": "^0.23.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@lmzhen/dsh-evolution-io": "^0.21.0",
39
- "@lmzhen/dsh-evolution-io-node": "^0.21.0",
40
- "@lmzhen/dsh-skill-usage": "^0.21.0"
38
+ "@lmzhen/dsh-evolution-io": "^0.23.0",
39
+ "@lmzhen/dsh-evolution-io-node": "^0.23.0",
40
+ "@lmzhen/dsh-skill-usage": "^0.23.0"
41
41
  }
42
42
  }