@lmzhen/dsh-evolution-commands 0.1.0-rc.69 → 0.1.0-rc.70

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 -3
  2. package/package.json +3 -2
package/lib/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { createUserMessage } from "@deepseek-ai/dsh-llm";
1
2
  import { appendEvolutionEvent, buildLearnPrompt, eventsFile } from "@lmzhen/dsh-evolution-core";
2
3
  import { homedir } from "node:os";
3
4
  import { join } from "node:path";
@@ -134,7 +135,7 @@ function apply(ctx) {
134
135
  }
135
136
  if (input === "learn" || input.startsWith("learn ")) {
136
137
  const request = input === "learn" ? "" : input.slice(6).trim();
137
- invocation.agent.inject({
138
+ invocation.agent.inject(createUserMessage({
138
139
  content: [{
139
140
  type: "text",
140
141
  text: buildLearnPrompt(request)
@@ -145,13 +146,15 @@ function apply(ctx) {
145
146
  form: "notice",
146
147
  summary: "learn request"
147
148
  }
148
- });
149
+ }));
149
150
  const eventIo = ctx.get("evolutionIo")?.provider();
150
151
  if (eventIo) appendEvolutionEvent(eventIo, eventsFile(process.env.DSH_HOME ?? join(homedir(), ".dsh")), {
151
152
  type: "learn",
152
153
  source: "manual",
153
154
  ...request ? { request } : {}
154
- }).catch((error) => {});
155
+ }).catch((error) => {
156
+ ctx.logger.warn(`evolution-commands: failed to record learn event: ${String(error)}`);
157
+ });
155
158
  return ok("Learning request sent to this session. Follow it now.");
156
159
  }
157
160
  if (input === "replay") {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-commands",
3
3
  "description": "Human commands for the evolution family (community build)",
4
- "version": "0.1.0-rc.69",
4
+ "version": "0.1.0-rc.70",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -32,8 +32,9 @@
32
32
  ],
33
33
  "license": "MIT",
34
34
  "dependencies": {
35
+ "@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
35
36
  "@deepseek-ai/schemastery": "^3.18.1",
36
- "@lmzhen/dsh-evolution-core": "^0.1.0-rc.69"
37
+ "@lmzhen/dsh-evolution-core": "^0.1.0-rc.70"
37
38
  },
38
39
  "peerDependencies": {
39
40
  "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",