dsh-message-rollback 0.1.0 → 0.1.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.
@@ -0,0 +1,7 @@
1
+ import { i as inject } from "./index-vsThIC1E.js";
2
+ import { Context } from "@deepseek-ai/cordis";
3
+
4
+ //#region src/client/index.d.ts
5
+ declare function apply(ctx: Context): void;
6
+ //#endregion
7
+ export { apply, inject };
@@ -0,0 +1,32 @@
1
+ import { Context } from "@deepseek-ai/cordis";
2
+
3
+ //#region src/index.d.ts
4
+ /** Host-side mutation capability consumed by the browser surface. */
5
+ interface MessageRollbackService {
6
+ rollback(input: {
7
+ sessionId: string;
8
+ messageId: string;
9
+ includeWorkspaceChanges: boolean;
10
+ }): Promise<{
11
+ sessionId?: string;
12
+ }>;
13
+ }
14
+ /** Optional Host capability for restoring the workspace snapshot for a turn. */
15
+ interface WorkspaceRollbackService {
16
+ rollbackTurn(input: {
17
+ sessionId: string;
18
+ eventSeq: number;
19
+ }): Promise<void>;
20
+ }
21
+ declare module '@deepseek-ai/cordis' {
22
+ interface Context {
23
+ messageRollback?: MessageRollbackService;
24
+ workspaceRollback?: WorkspaceRollbackService;
25
+ }
26
+ }
27
+ declare const name = "message-rollback";
28
+ declare const inject: string[];
29
+ /** The node half is intentionally small; rollback is a browser action. */
30
+ declare function apply(_ctx: Context): void;
31
+ //#endregion
32
+ export { name as a, inject as i, WorkspaceRollbackService as n, apply as r, MessageRollbackService as t };
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { a as name, i as inject, n as WorkspaceRollbackService, r as apply, t as MessageRollbackService } from "./index-vsThIC1E.js";
2
+ export { MessageRollbackService, WorkspaceRollbackService, apply, inject, name };
@@ -0,0 +1,8 @@
1
+ //#region src/index.ts
2
+ const name = "message-rollback";
3
+ const inject = ["@deepseek-ai/dsh-client-ui-renderer", "@deepseek-ai/dsh-api-session-controller"];
4
+ /** The node half is intentionally small; rollback is a browser action. */
5
+ function apply(_ctx) {}
6
+
7
+ //#endregion
8
+ export { inject as n, name as r, apply as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-message-rollback",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "DeepSeek Harness plugin that adds per-message rollback controls.",
5
5
  "keywords": ["dsh", "dsh-plugin", "deepseek-harness", "rollback"],
6
6
  "license": "MIT",
@@ -10,10 +10,10 @@
10
10
  },
11
11
  "type": "module",
12
12
  "main": "lib/index.js",
13
- "types": "lib/types/index.d.ts",
13
+ "types": "lib/index.d.ts",
14
14
  "exports": {
15
- ".": { "types": "./lib/types/index.d.ts", "default": "./lib/index.js" },
16
- "./client": { "types": "./lib/types/client/index.d.ts", "default": "./lib/client.js" }
15
+ ".": { "types": "./lib/index.d.ts", "default": "./lib/index.js" },
16
+ "./client": { "types": "./lib/client.d.ts", "default": "./lib/client.js" }
17
17
  },
18
18
  "dsh": {
19
19
  "bundle": {
@@ -50,7 +50,7 @@
50
50
  "tsdown": "^0.15.0",
51
51
  "typescript": "^5.6.0"
52
52
  },
53
- "files": ["lib/index.js", "lib/client.js", "lib/types/**/*.d.ts", "cordis.patch.yml", "README.md"],
53
+ "files": ["lib/*.js", "lib/*.d.ts", "lib/types/**/*.d.ts", "cordis.patch.yml", "README.md"],
54
54
  "publishConfig": {
55
55
  "access": "public",
56
56
  "registry": "https://registry.npmjs.org/"