@max-null/dsh-achievements 0.1.3 → 0.1.4

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/engine.js CHANGED
@@ -297,13 +297,13 @@ function agentKeyOf(exec) {
297
297
  /** HTTP 路由(/achievements/api,POST)——仿 dsh-memory 的 /memory/api 信任围栏。 */
298
298
  export function registerRoutes(ctx, engine) {
299
299
  const webServer = ctx.webServer;
300
- const webRuntime = ctx.webRuntime;
300
+ const webStartup = ctx.webStartup;
301
301
  ctx.effect(() => webServer.register({
302
302
  kind: 'prefix',
303
303
  path: '/achievements/api',
304
304
  handler: async (req, res) => {
305
305
  const request = req;
306
- if (!isTrusted(request, webRuntime.trustedHosts)) {
306
+ if (!isTrusted(request, webStartup.trustedHosts)) {
307
307
  writeJson(res, 403, { ok: false, error: { code: 'forbidden', message: 'forbidden' } });
308
308
  return;
309
309
  }
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AchievementsEngine, attachListeners, registerRoutes, registerTool } from "./engine.js";
2
2
  export const name = '@max-null/dsh-achievements';
3
- export const inject = ['tools', 'webServer', 'webRuntime'];
3
+ export const inject = ['tools', 'webServer', 'webStartup'];
4
4
  export function apply(ctx) {
5
5
  const engine = new AchievementsEngine();
6
6
  attachListeners(ctx, engine);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@max-null/dsh-achievements",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "SSiD family progress achievements — listens to session/tool events, folds activity into durable counters, unlocks trophies with toasts and an achievements page; the GenUI category merges the genui plugin's own counter data.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -21,7 +21,9 @@
21
21
  "dist",
22
22
  "client.js",
23
23
  "cordis.patch.yml",
24
- "README.md", "docs/shots"],
24
+ "README.md",
25
+ "docs/shots"
26
+ ],
25
27
  "dsh": {
26
28
  "bundle": {
27
29
  "patch": "./cordis.patch.yml"
@@ -58,5 +60,9 @@
58
60
  "tsx": "^4.0.0",
59
61
  "typescript": "^5.5.0",
60
62
  "vitest": "^2.1.0"
63
+ },
64
+ "repository": {
65
+ "type": "git",
66
+ "url": "git+https://github.com/Max-Null/dsh-achievements.git"
61
67
  }
62
68
  }