@lmzhen/dsh-evolution-review 0.1.0-rc.45 → 0.1.0-rc.47

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 +6 -4
  2. package/package.json +7 -7
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { createHash, randomUUID } from "node:crypto";
2
2
  import z from "@deepseek-ai/schemastery";
3
3
  import { createUserMessage } from "@deepseek-ai/dsh-llm";
4
- import { COMPLETION_SKILL_REVIEW_PROMPT, DEFAULT_MAX_OPS_PER_PLAN, DEFAULT_MEMORY_CHAR_LIMIT, DEFAULT_REVIEW_MEMORY_INTERVAL, DEFAULT_REVIEW_SKILL_INTERVAL, DEFAULT_SKILL_CONTENT_CHARS, DEFAULT_SKILL_REVIEW_COMPLETION_MIN_TOOL_CALLS, DEFAULT_SKILL_REVIEW_TRIGGER, DEFAULT_USER_CHAR_LIMIT, PROMPT_BUNDLE, SkillLibrary, advanceReview, evolutionIoAdapter, foldTurn, reviewPrompt, verifyPromptBundle } from "@lmzhen/dsh-evolution-core";
4
+ import { COMPLETION_SKILL_REVIEW_PROMPT, DEFAULT_MAX_OPS_PER_PLAN, DEFAULT_MEMORY_CHAR_LIMIT, DEFAULT_REVIEW_MEMORY_INTERVAL, DEFAULT_REVIEW_SKILL_INTERVAL, DEFAULT_SKILL_CONTENT_CHARS, DEFAULT_SKILL_REVIEW_COMPLETION_MIN_TOOL_CALLS, DEFAULT_SKILL_REVIEW_TRIGGER, DEFAULT_USER_CHAR_LIMIT, PROMPT_BUNDLE, SkillLibrary, advanceReview, evolutionIoAdapter, foldTurn, resolveOrigins, reviewPrompt, verifyPromptBundle } from "@lmzhen/dsh-evolution-core";
5
5
  import { validateEvolutionPlan } from "@lmzhen/dsh-evolution-plan-validator";
6
6
  //#region lib/types/redact.js
7
7
  /**
@@ -238,6 +238,7 @@ function apply(ctx, rawConfig) {
238
238
  async function executePlan(plan) {
239
239
  const memory = ctx.get("memory");
240
240
  const approval = ctx.get("evolutionApproval");
241
+ const origins = resolveOrigins(void 0, true);
241
242
  const actions = [];
242
243
  for (const op of plan.memoryOps ?? []) {
243
244
  if (!Array.isArray(op.evidence) || op.evidence.length === 0) continue;
@@ -257,18 +258,19 @@ function apply(ctx, rawConfig) {
257
258
  };
258
259
  const runnerArgs = {
259
260
  operation: args,
260
- origin: "background_review"
261
+ origin: origins.library
261
262
  };
262
263
  if ((approval ? await runApproved("skill", `skill ${op.action ?? "patch"} ${op.name}`, runnerArgs, runnerArgs) : await executeSkillDirect(args))?.ok) actions.push(`Skill ${op.name} ${op.action ?? "patch"}`);
263
264
  }
264
265
  return actions;
265
266
  async function runApproved(kind, summary, stored, runnerArgs) {
266
267
  if (!approval) return void 0;
268
+ if (approval.isEnabled === true && !approval.hasRunner(kind)) return await runnerDirect(kind, runnerArgs);
267
269
  const decision = await approval.request({
268
270
  kind,
269
271
  summary,
270
272
  args: stored,
271
- origin: "background_review"
273
+ origin: origins.approval
272
274
  });
273
275
  if (decision.action === "staged") return {
274
276
  ok: false,
@@ -309,7 +311,7 @@ function apply(ctx, rawConfig) {
309
311
  const library = new SkillLibrary(void 0, evolutionIoAdapter(() => io.provider()));
310
312
  const op = skillArgs;
311
313
  const name = op.name ?? "";
312
- const origin = "background_review";
314
+ const origin = origins.library;
313
315
  if (op.action === "create") {
314
316
  const created = await library.create(name, op.content ?? "", origin);
315
317
  if (created.ok) await ctx.get("skillUsage")?.markAgentCreated?.(name);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-review",
3
3
  "description": "Background review orchestration (community build)",
4
- "version": "0.1.0-rc.45",
4
+ "version": "0.1.0-rc.47",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -33,8 +33,8 @@
33
33
  "license": "MIT",
34
34
  "dependencies": {
35
35
  "@deepseek-ai/schemastery": "^3.18.1",
36
- "@lmzhen/dsh-evolution-core": "^0.1.0-rc.45",
37
- "@lmzhen/dsh-evolution-plan-validator": "^0.1.0-rc.45"
36
+ "@lmzhen/dsh-evolution-core": "^0.1.0-rc.47",
37
+ "@lmzhen/dsh-evolution-plan-validator": "^0.1.0-rc.47"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@deepseek-ai/cordis": "^4.0.1",
@@ -43,7 +43,7 @@
43
43
  "@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
44
44
  "@deepseek-ai/dsh-session": "^0.1.0-rc.6",
45
45
  "@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
46
- "@lmzhen/dsh-evolution-state": "^0.1.0-rc.45"
46
+ "@lmzhen/dsh-evolution-state": "^0.1.0-rc.47"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@deepseek-ai/dsh-agent": "^0.1.0-rc.6",
@@ -54,8 +54,8 @@
54
54
  "@deepseek-ai/dsh-session-persistence": "^0.1.0-rc.6",
55
55
  "@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.0-rc.6",
56
56
  "@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
57
- "@lmzhen/dsh-evolution-core": "^0.1.0-rc.45",
58
- "@lmzhen/dsh-evolution-plan-validator": "^0.1.0-rc.45",
59
- "@lmzhen/dsh-evolution-state": "^0.1.0-rc.45"
57
+ "@lmzhen/dsh-evolution-core": "^0.1.0-rc.47",
58
+ "@lmzhen/dsh-evolution-plan-validator": "^0.1.0-rc.47",
59
+ "@lmzhen/dsh-evolution-state": "^0.1.0-rc.47"
60
60
  }
61
61
  }