@lmzhen/dsh-evolution-learning-graph 0.3.63 → 0.3.65
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/lib/index.js +11 -9
- package/lib/types/index.d.ts +6 -0
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -183,14 +183,13 @@ async function resolveGraphNode(parsed, repository) {
|
|
|
183
183
|
message: content
|
|
184
184
|
};
|
|
185
185
|
}
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
return entry === void 0 ? {
|
|
189
|
-
ok: false,
|
|
190
|
-
message: `Memory ${parsed.source}[${parsed.index}] does not exist (${entries.length} entries).`
|
|
191
|
-
} : {
|
|
186
|
+
const check = readMemoryIndex(parsed, await repository.readMemory(parsed.source));
|
|
187
|
+
return check.ok ? {
|
|
192
188
|
ok: true,
|
|
193
|
-
message: entry
|
|
189
|
+
message: check.entry ?? ""
|
|
190
|
+
} : {
|
|
191
|
+
ok: false,
|
|
192
|
+
message: check.message ?? `Memory ${parsed.source}[${parsed.index}] is not available.`
|
|
194
193
|
};
|
|
195
194
|
}
|
|
196
195
|
/**
|
|
@@ -200,7 +199,10 @@ async function resolveGraphNode(parsed, repository) {
|
|
|
200
199
|
* manage registers for `kind: 'skill'` replays them on approve.
|
|
201
200
|
*/
|
|
202
201
|
const name = "evolution-learning-graph";
|
|
203
|
-
const Config = z.object({
|
|
202
|
+
const Config = z.object({
|
|
203
|
+
root: z.string().default(""),
|
|
204
|
+
threatExemptLabels: z.array(z.string()).default([])
|
|
205
|
+
});
|
|
204
206
|
/**
|
|
205
207
|
* F-10: rendered-line cap for the `/graph` directory — nodes span the
|
|
206
208
|
* whole usage set plus every memory entry and the edge list is a full join, so
|
|
@@ -273,7 +275,7 @@ function apply(ctx, rawConfig = {}) {
|
|
|
273
275
|
function withSkills() {
|
|
274
276
|
return new SkillLibrary(graphSkillsRoot, evolutionIoAdapter(() => io.provider()), void 0, (event) => {
|
|
275
277
|
ctx.emit("evolution/skill-mutated", event);
|
|
276
|
-
});
|
|
278
|
+
}, void 0, [...rawConfig.threatExemptLabels ?? []]);
|
|
277
279
|
}
|
|
278
280
|
async function nodeDetail(id) {
|
|
279
281
|
const parsed = parseGraphNodeId(id);
|
package/lib/types/index.d.ts
CHANGED
|
@@ -150,6 +150,12 @@ export interface Config {
|
|
|
150
150
|
* the graph on the SAME skills tree the tools/catalog read under a
|
|
151
151
|
* custom-root deployment (previously the default root was hardcoded). */
|
|
152
152
|
root?: string;
|
|
153
|
+
/** P2-26 (v19): the deployment's benign threat labels. The graph edit/delete
|
|
154
|
+
* channel writes skill content through the same SkillLibrary as the tools,
|
|
155
|
+
* so it must honour the same exemption list — without it a label allowed on
|
|
156
|
+
* the tool channel was refused here, and the refusal named a config key this
|
|
157
|
+
* channel could not reach. */
|
|
158
|
+
threatExemptLabels?: string[];
|
|
153
159
|
}
|
|
154
160
|
export declare const Config: z<Config>;
|
|
155
161
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-learning-graph",
|
|
3
3
|
"description": "Learning graph over skills and memory (community build)",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.65",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
34
|
-
"@lmzhen/dsh-evolution-approval": "^0.3.
|
|
35
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
34
|
+
"@lmzhen/dsh-evolution-approval": "^0.3.65",
|
|
35
|
+
"@lmzhen/dsh-evolution-core": "^0.3.65"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|