assistme 0.8.7 → 0.8.8
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/dist/index.js
CHANGED
package/dist/workers/entry.js
CHANGED
|
@@ -18,8 +18,9 @@ import {
|
|
|
18
18
|
getNextRunTime,
|
|
19
19
|
pollActionResponse,
|
|
20
20
|
resetEventSequence,
|
|
21
|
-
setActionRequest
|
|
22
|
-
|
|
21
|
+
setActionRequest,
|
|
22
|
+
upsertAgentSkill
|
|
23
|
+
} from "../chunk-T3DBLWUW.js";
|
|
23
24
|
import {
|
|
24
25
|
EDSGER_PRODUCT_SLUG,
|
|
25
26
|
JobRunner,
|
|
@@ -1778,25 +1779,27 @@ function createAgentToolsServer(deps) {
|
|
|
1778
1779
|
description: z2.string().optional().describe("Updated description (optional)")
|
|
1779
1780
|
},
|
|
1780
1781
|
async (args) => {
|
|
1781
|
-
|
|
1782
|
-
if (
|
|
1783
|
-
|
|
1782
|
+
await skillManager.ensureLoaded();
|
|
1783
|
+
if (skillManager.update(args.name, args.improved_instructions, args.description)) {
|
|
1784
|
+
log.success(`Self-improvement: improved skill "${args.name}"`);
|
|
1784
1785
|
return {
|
|
1785
1786
|
content: [
|
|
1786
1787
|
{
|
|
1787
1788
|
type: "text",
|
|
1788
|
-
text: `Skill "${args.name}"
|
|
1789
|
+
text: `Skill "${args.name}" improved and version bumped.`
|
|
1789
1790
|
}
|
|
1790
1791
|
]
|
|
1791
1792
|
};
|
|
1792
1793
|
}
|
|
1793
|
-
const
|
|
1794
|
-
args.name,
|
|
1795
|
-
args.
|
|
1796
|
-
args.
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1794
|
+
const result = await upsertAgentSkill({
|
|
1795
|
+
name: args.name,
|
|
1796
|
+
description: args.description || "",
|
|
1797
|
+
content: args.improved_instructions,
|
|
1798
|
+
version: "1.0.1",
|
|
1799
|
+
source: "auto_improved"
|
|
1800
|
+
});
|
|
1801
|
+
if (result) {
|
|
1802
|
+
log.success(`Self-improvement: improved skill "${args.name}" (direct DB)`);
|
|
1800
1803
|
return {
|
|
1801
1804
|
content: [
|
|
1802
1805
|
{
|
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@ import type { SkillManager } from "../agent/skills.js";
|
|
|
10
10
|
import { substituteArguments, preprocessDynamicContext } from "../agent/skill-utils.js";
|
|
11
11
|
import { validateSkillName } from "../agent/skill-utils.js";
|
|
12
12
|
import { callMcpHandler } from "../db/api-client.js";
|
|
13
|
+
import { upsertAgentSkill } from "../agent/skill-db.js";
|
|
13
14
|
import { JobRunner } from "../agent/job-runner.js";
|
|
14
15
|
import { createScheduledTask, getNextRunTime } from "../agent/scheduler.js";
|
|
15
16
|
import { getCredentialStore, type CredentialType } from "../credentials/index.js";
|
|
@@ -173,30 +174,32 @@ export function createAgentToolsServer(deps: AgentToolsDeps): McpSdkServerConfig
|
|
|
173
174
|
description: z.string().optional().describe("Updated description (optional)"),
|
|
174
175
|
},
|
|
175
176
|
async (args) => {
|
|
176
|
-
//
|
|
177
|
-
|
|
178
|
-
if (
|
|
179
|
-
|
|
180
|
-
.getAll()
|
|
181
|
-
.map((s) => s.name)
|
|
182
|
-
.join(", ");
|
|
177
|
+
// Fast path: skill is in memory → update in-memory + DB
|
|
178
|
+
await skillManager.ensureLoaded();
|
|
179
|
+
if (skillManager.update(args.name, args.improved_instructions, args.description)) {
|
|
180
|
+
log.success(`Self-improvement: improved skill "${args.name}"`);
|
|
183
181
|
return {
|
|
184
182
|
content: [
|
|
185
183
|
{
|
|
186
184
|
type: "text",
|
|
187
|
-
text: `Skill "${args.name}"
|
|
185
|
+
text: `Skill "${args.name}" improved and version bumped.`,
|
|
188
186
|
},
|
|
189
187
|
],
|
|
190
188
|
};
|
|
191
189
|
}
|
|
192
190
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
191
|
+
// Fallback: skill not in memory (e.g. loadFromDb failed, race condition,
|
|
192
|
+
// or invoked from detail page where prompt already contains full content).
|
|
193
|
+
// Write directly to agent_skills — the tool params already have everything needed.
|
|
194
|
+
const result = await upsertAgentSkill({
|
|
195
|
+
name: args.name,
|
|
196
|
+
description: args.description || "",
|
|
197
|
+
content: args.improved_instructions,
|
|
198
|
+
version: "1.0.1",
|
|
199
|
+
source: "auto_improved",
|
|
200
|
+
});
|
|
201
|
+
if (result) {
|
|
202
|
+
log.success(`Self-improvement: improved skill "${args.name}" (direct DB)`);
|
|
200
203
|
return {
|
|
201
204
|
content: [
|
|
202
205
|
{
|