@deepseek-ai/dsh-webhook 0.2.0-rc.1 → 0.2.1-alpha.1

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-webhook",
3
3
  "description": "Fire-and-forget webhook rule runtime that creates Workspace-backed DeepSeek Harness Sessions",
4
- "version": "0.2.0-rc.1",
4
+ "version": "0.2.1-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -22,48 +22,41 @@
22
22
  "types": "./lib/types/types.d.ts",
23
23
  "default": "./lib/types/types.js"
24
24
  },
25
- "./invariant": {
26
- "types": "./lib/types/invariant.d.ts",
27
- "default": "./lib/invariant.js"
28
- },
29
25
  "./src/*": "./src/*",
30
26
  "./package.json": "./package.json"
31
27
  },
32
28
  "files": [
33
29
  "lib/index.js",
34
- "lib/invariant.js",
35
30
  "lib/types/**/*.js",
36
31
  "lib/types/**/*.d.ts"
37
32
  ],
38
33
  "license": "MIT",
39
34
  "peerDependencies": {
40
- "@deepseek-ai/dsh-agent-default-model": "0.2.0-rc.1",
41
- "@deepseek-ai/dsh-agent-preset-registry": "0.2.0-rc.1",
42
- "@deepseek-ai/dsh-invariants": "0.2.0-rc.1",
43
- "@deepseek-ai/dsh-llm": "0.2.0-rc.1",
44
- "@deepseek-ai/cordis": "~4.0.4",
45
- "@deepseek-ai/dsh-session": "0.2.0-rc.1",
46
- "@deepseek-ai/dsh-session-title": "0.2.0-rc.1",
47
- "@deepseek-ai/dsh-permission-presets": "0.2.0-rc.1",
48
- "@deepseek-ai/dsh-workspace": "0.2.0-rc.1",
49
- "@deepseek-ai/dsh-agent": "0.2.0-rc.1"
35
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.1",
36
+ "@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
37
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1",
38
+ "@deepseek-ai/dsh-agent-default-model": "0.2.1-alpha.1",
39
+ "@deepseek-ai/dsh-permission-presets": "0.2.1-alpha.1",
40
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.1-alpha.1",
41
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.1",
42
+ "@deepseek-ai/dsh-workspace": "0.2.1-alpha.1",
43
+ "@deepseek-ai/dsh-session-title": "0.2.1-alpha.1"
50
44
  },
51
45
  "devDependencies": {
52
- "@deepseek-ai/cordis": "~4.0.4",
53
- "@deepseek-ai/cordis-plugin-include": "~1.0.9",
54
- "@deepseek-ai/cordis-plugin-loader": "~1.0.5",
55
- "@deepseek-ai/dsh-agent": "0.2.0-rc.1",
56
- "@deepseek-ai/dsh-agent-preset-registry": "0.2.0-rc.1",
57
- "@deepseek-ai/dsh-agent-default-model": "0.2.0-rc.1",
58
- "@deepseek-ai/dsh-llm": "0.2.0-rc.1",
59
- "@deepseek-ai/dsh-permission-presets": "0.2.0-rc.1",
60
- "@deepseek-ai/dsh-session": "0.2.0-rc.1",
61
- "@deepseek-ai/dsh-session-title": "0.2.0-rc.1",
62
- "@deepseek-ai/dsh-workspace": "0.2.0-rc.1",
63
- "@deepseek-ai/dsh-invariants": "0.2.0-rc.1"
46
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1",
47
+ "@deepseek-ai/cordis-plugin-include": "~1.0.10-alpha.1",
48
+ "@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.1",
49
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.1",
50
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.1-alpha.1",
51
+ "@deepseek-ai/dsh-agent-default-model": "0.2.1-alpha.1",
52
+ "@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
53
+ "@deepseek-ai/dsh-permission-presets": "0.2.1-alpha.1",
54
+ "@deepseek-ai/dsh-session-title": "0.2.1-alpha.1",
55
+ "@deepseek-ai/dsh-workspace": "0.2.1-alpha.1",
56
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.1"
64
57
  },
65
58
  "dependencies": {
66
- "@deepseek-ai/dsh-brand": "0.2.0-rc.1",
67
- "@deepseek-ai/dsh-util-values": "0.2.0-rc.1"
59
+ "@deepseek-ai/dsh-brand": "0.2.1-alpha.1",
60
+ "@deepseek-ai/dsh-util-values": "0.2.1-alpha.1"
68
61
  }
69
62
  }
package/lib/invariant.js DELETED
@@ -1,29 +0,0 @@
1
- //#region lib/types/invariant.js
2
- /** Package-owned relationship invariant for webhook-origin prompt admission. */
3
- const PACKAGE_NAME = "@deepseek-ai/dsh-webhook";
4
- /** Cordis invariant-companion plugin name. */
5
- const name = "webhook-invariant";
6
- /** Registry required before reserving this package's invariant ownership. */
7
- const inject = ["invariants"];
8
- /** Verify that one webhook-origin message already belongs to its cwd Workspace. */
9
- const install = Object.assign(function installWebhookMessages(ctx, fail) {
10
- ctx.on("internal/dispatch", (_mode, eventName, args) => {
11
- if (eventName !== "session/event") return;
12
- const [session, event] = args;
13
- if (event.type !== "agent/inbox/spliced") return;
14
- if (event.data.inserted.filter((message) => message.source.kind === "webhook").length === 0) return;
15
- const cwd = session.header.cwd;
16
- if (cwd === void 0) return fail(`webhook Session "${session.id}" has no cwd`);
17
- const owners = ctx.workspaceRegistry.list().filter((workspace) => workspace.sessionIds.includes(session.id));
18
- if (owners.length !== 1) return fail(`webhook Session "${session.id}" belongs to ${owners.length} Workspaces at prompt admission`);
19
- if (owners[0]?.path !== cwd) fail(`webhook Session "${session.id}" cwd ${JSON.stringify(cwd)} differs from its Workspace path`);
20
- }, { global: true });
21
- }, { inject: ["workspaceRegistry"] });
22
- /**
23
- * Register this package's relationship invariant.
24
- * @param ctx - Cordis context carrying the invariant registry.
25
- * @returns the invariant registration disposer.
26
- */
27
- const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
28
- //#endregion
29
- export { apply, inject, name };
@@ -1,13 +0,0 @@
1
- /** Package-owned relationship invariant for webhook-origin prompt admission. */
2
- import type { Context } from '@deepseek-ai/cordis';
3
- /** Cordis invariant-companion plugin name. */
4
- export declare const name = "webhook-invariant";
5
- /** Registry required before reserving this package's invariant ownership. */
6
- export declare const inject: string[];
7
- /**
8
- * Register this package's relationship invariant.
9
- * @param ctx - Cordis context carrying the invariant registry.
10
- * @returns the invariant registration disposer.
11
- */
12
- export declare const apply: (ctx: Context) => Promise<() => void>;
13
- //# sourceMappingURL=invariant.d.ts.map
@@ -1,38 +0,0 @@
1
- /** Package-owned relationship invariant for webhook-origin prompt admission. */
2
- const PACKAGE_NAME = '@deepseek-ai/dsh-webhook';
3
- /** Cordis invariant-companion plugin name. */
4
- export const name = 'webhook-invariant';
5
- /** Registry required before reserving this package's invariant ownership. */
6
- export const inject = ['invariants'];
7
- /** Verify that one webhook-origin message already belongs to its cwd Workspace. */
8
- const install = Object.assign(function installWebhookMessages(ctx, fail) {
9
- ctx.on('internal/dispatch', (_mode, eventName, args) => {
10
- if (eventName !== 'session/event')
11
- return;
12
- const [session, event] = args;
13
- if (event.type !== 'agent/inbox/spliced')
14
- return;
15
- const webhookMessages = event.data.inserted.filter(message => message.source.kind === 'webhook');
16
- if (webhookMessages.length === 0)
17
- return;
18
- const cwd = session.header.cwd;
19
- if (cwd === undefined)
20
- return fail(`webhook Session "${session.id}" has no cwd`);
21
- const owners = ctx.workspaceRegistry.list().filter(workspace => workspace.sessionIds.includes(session.id));
22
- if (owners.length !== 1) {
23
- return fail(`webhook Session "${session.id}" belongs to ${owners.length} Workspaces at prompt admission`);
24
- }
25
- if (owners[0]?.path !== cwd) {
26
- fail(`webhook Session "${session.id}" cwd ${JSON.stringify(cwd)} differs from its Workspace path`);
27
- }
28
- }, { global: true });
29
- }, {
30
- inject: ['workspaceRegistry'],
31
- });
32
- /**
33
- * Register this package's relationship invariant.
34
- * @param ctx - Cordis context carrying the invariant registry.
35
- * @returns the invariant registration disposer.
36
- */
37
- export const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
38
- //# sourceMappingURL=invariant.js.map