@lmzhen/dsh-evolution-activity 0.37.1 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,7 @@ Internal plugin that persists evolution process events into `$DSH_HOME/evolution
5
5
  ## What it records
6
6
 
7
7
  - `evolution/plan-applied`: accepted, rejected, skipped, and failed operation counts for a reviewed plan.
8
- - `evolution/review-completed`: the review status, trigger, text, actions, timing, and model usage when supplied.
8
+ - `evolution/review-completed`: the review status, trigger, bounded text preview, actions, timing, and model usage when supplied. `finalText` is capped at 2000 characters and `finalTextChars` keeps the full length; prompts and tool results are not persisted.
9
9
 
10
10
  The versioned sidecar contains separate `items` and `reviews` arrays. `maxItems` bounds each array and defaults to 200; values below 1 are rejected by the loader.
11
11
 
package/lib/index.js CHANGED
@@ -24,6 +24,8 @@ const ACTIVITY_FILE_VERSION = 2;
24
24
  /** Default bound on the retained sidecar (S6.4: also the fallback for a
25
25
  * non-finite `maxItems`). */
26
26
  const DEFAULT_MAX_ITEMS = 200;
27
+ /** Bound on the retained final review text; the full length stays in finalTextChars. */
28
+ const REVIEW_TEXT_PREVIEW_CHARS = 2e3;
27
29
  function activityFile(root) {
28
30
  return join(root, "activity.json");
29
31
  }
@@ -56,7 +58,8 @@ function applyReviewActivityEvent(reviews, event, maxItems, at = Date.now()) {
56
58
  kind: event.kind,
57
59
  status: event.status,
58
60
  trigger: event.trigger,
59
- finalText: event.finalText,
61
+ finalText: event.finalText.length <= 2e3 ? event.finalText : event.finalText.slice(0, REVIEW_TEXT_PREVIEW_CHARS),
62
+ finalTextChars: event.finalText.length,
60
63
  actions: event.actions,
61
64
  ...event.usage === void 0 ? {} : { usage: event.usage },
62
65
  startedAt: event.startedAt,
@@ -226,4 +229,4 @@ function apply(ctx, rawConfig = {}) {
226
229
  });
227
230
  }
228
231
  //#endregion
229
- export { ACTIVITY_FILE_VERSION, Config, DEFAULT_MAX_ITEMS, activityFile, apply, applyActivityEvent, applyReviewActivityEvent, isCorruptActivity, loadActivity, loadActivityState, loadReviewActivity, name, parseActivityContent, parseActivityReviews, serializeActivity };
232
+ export { ACTIVITY_FILE_VERSION, Config, DEFAULT_MAX_ITEMS, REVIEW_TEXT_PREVIEW_CHARS, activityFile, apply, applyActivityEvent, applyReviewActivityEvent, isCorruptActivity, loadActivity, loadActivityState, loadReviewActivity, name, parseActivityContent, parseActivityReviews, serializeActivity };
@@ -51,6 +51,8 @@ export interface EvolutionReviewActivityRecord {
51
51
  status: EvolutionReviewCompletedEvent['status'];
52
52
  trigger: EvolutionReviewCompletedEvent['trigger'];
53
53
  finalText: string;
54
+ /** Full final-text length before the review preview was bounded. */
55
+ finalTextChars?: number | undefined;
54
56
  actions: EvolutionReviewCompletedEvent['actions'];
55
57
  usage?: EvolutionReviewCompletedEvent['usage'];
56
58
  startedAt: number;
@@ -65,6 +67,8 @@ export declare const ACTIVITY_FILE_VERSION = 2;
65
67
  /** Default bound on the retained sidecar (S6.4: also the fallback for a
66
68
  * non-finite `maxItems`). */
67
69
  export declare const DEFAULT_MAX_ITEMS = 200;
70
+ /** Bound on the retained final review text; the full length stays in finalTextChars. */
71
+ export declare const REVIEW_TEXT_PREVIEW_CHARS = 2000;
68
72
  export declare function activityFile(root: string): string;
69
73
  /** Fold one plan-applied payload into a bounded record list (pure). */
70
74
  export declare function applyActivityEvent(items: EvolutionActivityRecord[], event: EvolutionPlanAppliedEvent, maxItems: number, at?: number): EvolutionActivityRecord[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-activity",
3
3
  "description": "Durable activity store for self-evolution plan outcomes (community build)",
4
- "version": "0.37.1",
4
+ "version": "0.39.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,18 +27,18 @@
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
29
  "@deepseek-ai/schemastery": "^3.18.5",
30
- "@lmzhen/dsh-evolution-core": "^0.37.1"
30
+ "@lmzhen/dsh-evolution-core": "^0.39.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@deepseek-ai/cordis": "^4.0.5"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@deepseek-ai/cordis": "^4.0.5",
37
- "@lmzhen/dsh-evolution-core": "^0.37.1",
38
- "@lmzhen/dsh-evolution-io": "^0.37.1",
39
- "@lmzhen/dsh-evolution-io-node": "^0.37.1"
37
+ "@lmzhen/dsh-evolution-core": "^0.39.0",
38
+ "@lmzhen/dsh-evolution-io": "^0.39.0",
39
+ "@lmzhen/dsh-evolution-io-node": "^0.39.0"
40
40
  },
41
41
  "engines": {
42
- "dsh": ">=0.2.1-rc.2 <0.2.2-0"
42
+ "dsh": ">=0.2.2-rc.0 <0.2.3-0"
43
43
  }
44
44
  }