@lmzhen/dsh-evolution-skill-history 0.11.1 → 0.11.2
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 +18 -13
- package/lib/types/index.d.ts +10 -5
- package/package.json +7 -7
package/lib/index.js
CHANGED
|
@@ -247,23 +247,28 @@ function makeSkillHistoryRoutes(services) {
|
|
|
247
247
|
* @module @lmzhen/dsh-evolution-skill-history
|
|
248
248
|
*/
|
|
249
249
|
const name = "evolution-skill-history";
|
|
250
|
-
/** No declared service:
|
|
251
|
-
*
|
|
252
|
-
* service is missing — the platform rule for optional services is ctx.get, not a waited-on inject. */
|
|
250
|
+
/** No declared service: a headless profile must not leave a pending row, and the curator is resolved
|
|
251
|
+
* per request. The web server is waited on INSIDE apply (see below), not declared here. */
|
|
253
252
|
const inject = [];
|
|
254
253
|
/**
|
|
255
|
-
*
|
|
256
|
-
*
|
|
254
|
+
* Wait for the web server, then mount the routes as ONE effect (disposers run on unload and on HMR).
|
|
255
|
+
*
|
|
256
|
+
* **Why `ctx.inject` and not `ctx.get`**: profile rows apply in file order, so at this row's apply time
|
|
257
|
+
* the web server may not exist yet — `ctx.get('webServer')` returning undefined is a TIMING fact, not a
|
|
258
|
+
* verdict, and acting on it (0.11.1 shipped that way) left the routes permanently unregistered while the
|
|
259
|
+
* panel rendered and every call answered HTTP 404. Waiting on the service mounts the routes whenever it
|
|
260
|
+
* arrives, and a profile that never gets one simply never runs this callback — inert, never pending.
|
|
261
|
+
* @param ctx - the host context; the web server and curator arrive through it.
|
|
257
262
|
*/
|
|
258
263
|
function apply(ctx) {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
};
|
|
266
|
-
}
|
|
264
|
+
ctx.inject(["webServer"], (scope) => {
|
|
265
|
+
scope.effect(() => {
|
|
266
|
+
const disposers = makeSkillHistoryRoutes({ getCurator: () => scope.get("evolutionCurator") }).map((route) => scope.webServer.register(route));
|
|
267
|
+
return () => {
|
|
268
|
+
for (const dispose of disposers) dispose();
|
|
269
|
+
};
|
|
270
|
+
}, "evolution-skill-history: routes");
|
|
271
|
+
});
|
|
267
272
|
}
|
|
268
273
|
//#endregion
|
|
269
274
|
export { apply, inject, name };
|
package/lib/types/index.d.ts
CHANGED
|
@@ -9,13 +9,18 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { Context } from '@deepseek-ai/cordis';
|
|
11
11
|
export declare const name = "evolution-skill-history";
|
|
12
|
-
/** No declared service:
|
|
13
|
-
*
|
|
14
|
-
* service is missing — the platform rule for optional services is ctx.get, not a waited-on inject. */
|
|
12
|
+
/** No declared service: a headless profile must not leave a pending row, and the curator is resolved
|
|
13
|
+
* per request. The web server is waited on INSIDE apply (see below), not declared here. */
|
|
15
14
|
export declare const inject: string[];
|
|
16
15
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* Wait for the web server, then mount the routes as ONE effect (disposers run on unload and on HMR).
|
|
17
|
+
*
|
|
18
|
+
* **Why `ctx.inject` and not `ctx.get`**: profile rows apply in file order, so at this row's apply time
|
|
19
|
+
* the web server may not exist yet — `ctx.get('webServer')` returning undefined is a TIMING fact, not a
|
|
20
|
+
* verdict, and acting on it (0.11.1 shipped that way) left the routes permanently unregistered while the
|
|
21
|
+
* panel rendered and every call answered HTTP 404. Waiting on the service mounts the routes whenever it
|
|
22
|
+
* arrives, and a profile that never gets one simply never runs this callback — inert, never pending.
|
|
23
|
+
* @param ctx - the host context; the web server and curator arrive through it.
|
|
19
24
|
*/
|
|
20
25
|
export declare function apply(ctx: Context): void;
|
|
21
26
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-skill-history",
|
|
3
3
|
"description": "Web surface for skill content history: loopback host routes plus the sidebar panel (community build)",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -30,21 +30,21 @@
|
|
|
30
30
|
],
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@lmzhen/dsh-evolution-core": "^0.11.
|
|
33
|
+
"@lmzhen/dsh-evolution-core": "^0.11.2"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
37
37
|
"@deepseek-ai/dsh-host-webserver": "^0.1.5-rc.2",
|
|
38
38
|
"react": "^18.2.0",
|
|
39
|
-
"@lmzhen/dsh-evolution-curator": "^0.11.
|
|
39
|
+
"@lmzhen/dsh-evolution-curator": "^0.11.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
43
43
|
"@deepseek-ai/dsh-host-webserver": "^0.1.5-rc.2",
|
|
44
|
-
"@lmzhen/dsh-evolution-core": "^0.11.
|
|
45
|
-
"@lmzhen/dsh-evolution-curator": "^0.11.
|
|
46
|
-
"@lmzhen/dsh-evolution-io": "^0.11.
|
|
47
|
-
"@lmzhen/dsh-evolution-io-node": "^0.11.
|
|
44
|
+
"@lmzhen/dsh-evolution-core": "^0.11.2",
|
|
45
|
+
"@lmzhen/dsh-evolution-curator": "^0.11.2",
|
|
46
|
+
"@lmzhen/dsh-evolution-io": "^0.11.2",
|
|
47
|
+
"@lmzhen/dsh-evolution-io-node": "^0.11.2"
|
|
48
48
|
},
|
|
49
49
|
"dsh": {
|
|
50
50
|
"client": {
|