@oh-story/dsh 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.
- package/README.md +3 -3
- package/lib/client.js +390 -144
- package/lib/client.js.map +4 -4
- package/lib/index.js +14742 -167
- package/lib/index.js.map +4 -4
- package/lib/types/client/file-activity.d.ts +8 -6
- package/lib/types/client/file-activity.d.ts.map +1 -1
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/file-activity-projection-types.d.ts +11 -0
- package/lib/types/file-activity-projection-types.d.ts.map +1 -0
- package/lib/types/file-activity-projection.d.ts +24 -0
- package/lib/types/file-activity-projection.d.ts.map +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/workspace-route.d.ts +1 -2
- package/lib/types/workspace-route.d.ts.map +1 -1
- package/package.json +16 -3
- package/lib/types/workspace-security.d.ts +0 -9
- package/lib/types/workspace-security.d.ts.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RunningToolCall } from "@deepseek-ai/dsh-client-runtime/client";
|
|
2
|
+
import type { ProjectedFileCall } from "../file-activity-projection-types.js";
|
|
2
3
|
export type MutationToolName = "write" | "edit" | "str_replace_editor";
|
|
3
4
|
export interface FileMutationActivity {
|
|
4
5
|
readonly callId: string;
|
|
@@ -9,6 +10,7 @@ export interface FileMutationActivity {
|
|
|
9
10
|
readonly operation: "replace-file" | "replace-text" | "insert-text" | undefined;
|
|
10
11
|
readonly oldText: string | undefined;
|
|
11
12
|
readonly newText: string | undefined;
|
|
13
|
+
readonly replaceAll: boolean;
|
|
12
14
|
}
|
|
13
15
|
interface JsonStringPrefix {
|
|
14
16
|
readonly value: string;
|
|
@@ -17,14 +19,14 @@ interface JsonStringPrefix {
|
|
|
17
19
|
export type WorkbenchMode = "story" | "drama";
|
|
18
20
|
/** Read a JSON string even while the model is still streaming its closing quote. */
|
|
19
21
|
export declare function jsonStringPrefix(raw: string, key: string): JsonStringPrefix | undefined;
|
|
20
|
-
/**
|
|
21
|
-
export declare function
|
|
22
|
+
/** Return every active file mutation in official DSH dispatch order, including nested Code Mode calls. */
|
|
23
|
+
export declare function fileMutations(runningCalls: readonly RunningToolCall[], projectedCalls?: readonly ProjectedFileCall[]): FileMutationActivity[];
|
|
24
|
+
/** Running calls whose settlement may have changed creative files. */
|
|
25
|
+
export declare function mutatingCallIds(runningCalls: readonly RunningToolCall[]): ReadonlySet<string>;
|
|
22
26
|
/** Convert a DSH tool path to the creative-relative path accepted by the narrow route. */
|
|
23
27
|
export declare function creativeRelativePath(path: string | undefined, cwd: string | undefined): string | undefined;
|
|
24
28
|
export declare function workbenchModeForPath(path: string | undefined): WorkbenchMode | undefined;
|
|
25
|
-
/**
|
|
26
|
-
export declare function storyRelativePath(path: string | undefined, cwd: string | undefined): string | undefined;
|
|
27
|
-
/** Project a streamed mutation over the last authoritative disk content. */
|
|
29
|
+
/** Project one streamed mutation over its immediate predecessor. */
|
|
28
30
|
export declare function previewMutation(activity: FileMutationActivity, base: string): string | undefined;
|
|
29
31
|
export {};
|
|
30
32
|
//# sourceMappingURL=file-activity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-activity.d.ts","sourceRoot":"","sources":["../../../src/client/file-activity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"file-activity.d.ts","sourceRoot":"","sources":["../../../src/client/file-activity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,wCAAwC,CAAC;AAC7F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,MAAM,GAAG,oBAAoB,CAAC;AAEvE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,gBAA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,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAmBhG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAoD,MAAM,wCAAwC,CAAC;AAuB9H,eAAO,MAAM,IAAI,aAAa,CAAC;AAC/B,eAAO,MAAM,MAAM,UAAwB,CAAC;AA8tB5C,iFAAiF;AACjF,wBAAgB,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAUlD;;;;;;AAED,wBAAuC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const FILE_ACTIVITY_PROJECTION_KEY = "ohStoryFileActivity";
|
|
2
|
+
export interface ProjectedFileCall {
|
|
3
|
+
readonly callId: string;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly argsRaw: string;
|
|
6
|
+
readonly slot: string;
|
|
7
|
+
}
|
|
8
|
+
export interface FileActivityProjection {
|
|
9
|
+
readonly calls: readonly ProjectedFileCall[];
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=file-activity-projection-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-activity-projection-types.d.ts","sourceRoot":"","sources":["../../src/file-activity-projection-types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,wBAAwB,CAAC;AAElE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAC9C"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { SessionEvent } from "@deepseek-ai/dsh-session";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { type FileActivityProjection } from "./file-activity-projection-types.js";
|
|
4
|
+
declare module "@deepseek-ai/dsh-session-projection/types" {
|
|
5
|
+
interface SessionProjectionStateMap {
|
|
6
|
+
ohStoryFileActivity: FileActivityProjection;
|
|
7
|
+
}
|
|
8
|
+
interface SessionProjectionMap {
|
|
9
|
+
ohStoryFileActivity: FileActivityProjection;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
/** Publish only in-progress model tool arguments; settled file truth still comes from DSH FS. */
|
|
13
|
+
export declare const fileActivityProjectionDefinition: {
|
|
14
|
+
key: "ohStoryFileActivity";
|
|
15
|
+
stateSchema: z.ZodType<FileActivityProjection, unknown, z.core.$ZodTypeInternals<FileActivityProjection, unknown>>;
|
|
16
|
+
init: () => FileActivityProjection;
|
|
17
|
+
apply: (state: FileActivityProjection, event: SessionEvent) => FileActivityProjection;
|
|
18
|
+
wire: {
|
|
19
|
+
viewSchema: z.ZodType<FileActivityProjection, unknown, z.core.$ZodTypeInternals<FileActivityProjection, unknown>>;
|
|
20
|
+
view: (state: FileActivityProjection) => FileActivityProjection;
|
|
21
|
+
};
|
|
22
|
+
stateVersion: number;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=file-activity-projection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-activity-projection.d.ts","sourceRoot":"","sources":["../../src/file-activity-projection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,KAAK,sBAAsB,EAE5B,MAAM,qCAAqC,CAAC;AAW7C,OAAO,QAAQ,2CAA2C,CAAC;IACzD,UAAU,yBAAyB;QACjC,mBAAmB,EAAE,sBAAsB,CAAC;KAC7C;IACD,UAAU,oBAAoB;QAC5B,mBAAmB,EAAE,sBAAsB,CAAC;KAC7C;CACF;AAWD,iGAAiG;AACjG,eAAO,MAAM,gCAAgC;;;gBAGjC,sBAAsB;mBACjB,sBAAsB,SAAS,YAAY,KAAG,sBAAsB;;;sBAsC/B,sBAAsB;;;CAEiB,CAAC"}
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAOnD,OAAO,CAAC,MAAM,0BAA0B,CAAC;AAQzC,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC9G,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACzH,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,eAAO,MAAM,IAAI,aAAa,CAAC;AAC/B,eAAO,MAAM,MAAM,UAAmH,CAAC;AAEvI,mFAAmF;AACnF,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CAClC;AAED,eAAO,MAAM,MAAM,EAGb,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhB,oEAAoE;AACpE,wBAAsB,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAShF;;;;;;;AAED,wBAA+C"}
|
|
@@ -3,8 +3,7 @@ interface WorkspaceRouteOptions {
|
|
|
3
3
|
readonly maxBytes: number;
|
|
4
4
|
readonly trustedHosts?: readonly string[];
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
/** This narrow route never starts agents, runs, streams, or models. */
|
|
6
|
+
/** Mount the narrow editor API on DSH's official web-server extension seam. */
|
|
8
7
|
export declare function registerWorkspaceRoute(context: Context, options: WorkspaceRouteOptions): void;
|
|
9
8
|
export {};
|
|
10
9
|
//# sourceMappingURL=workspace-route.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-route.d.ts","sourceRoot":"","sources":["../../src/workspace-route.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workspace-route.d.ts","sourceRoot":"","sources":["../../src/workspace-route.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAgBnD,UAAU,qBAAqB;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C;AAkOD,+EAA+E;AAC/E,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAM7F"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-story/dsh",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "A DSH plugin for fiction and short-drama production",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"inject": [
|
|
51
51
|
"@deepseek-ai/dsh-client-runtime",
|
|
52
52
|
"@deepseek-ai/dsh-client-ui-conversation",
|
|
53
|
+
"@deepseek-ai/dsh-client-ui-layout",
|
|
53
54
|
"@deepseek-ai/dsh-client-ui-tool"
|
|
54
55
|
],
|
|
55
56
|
"platform": "web"
|
|
@@ -67,37 +68,49 @@
|
|
|
67
68
|
"@deepseek-ai/dsh-agent": "^0.1.1-rc.1",
|
|
68
69
|
"@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.1",
|
|
69
70
|
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.1-rc.1",
|
|
71
|
+
"@deepseek-ai/dsh-client-ui-layout": "^0.1.1-rc.1",
|
|
70
72
|
"@deepseek-ai/dsh-client-ui-slots": "^0.1.1-rc.1",
|
|
71
73
|
"@deepseek-ai/dsh-client-ui-tool": "^0.1.1-rc.1",
|
|
74
|
+
"@deepseek-ai/dsh-fs": "^0.1.1-rc.1",
|
|
72
75
|
"@deepseek-ai/dsh-host-webserver": "^0.1.1-rc.1",
|
|
73
76
|
"@deepseek-ai/dsh-llm": "^0.1.1-rc.1",
|
|
74
77
|
"@deepseek-ai/dsh-session": "^0.1.1-rc.1",
|
|
78
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.1-rc.1",
|
|
79
|
+
"@deepseek-ai/dsh-sandbox-policy": "^0.1.1-rc.1",
|
|
75
80
|
"@deepseek-ai/dsh-skill": "^0.1.1-rc.1",
|
|
76
81
|
"@deepseek-ai/dsh-subagent": "^0.1.1-rc.1",
|
|
77
82
|
"@deepseek-ai/dsh-tools": "^0.1.1-rc.1",
|
|
83
|
+
"@deepseek-ai/dsh-typert-registry": "^0.1.1-rc.1",
|
|
78
84
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
79
85
|
"react": "^18.3.1",
|
|
80
|
-
"react-dom": "^18.3.1"
|
|
86
|
+
"react-dom": "^18.3.1",
|
|
87
|
+
"zod": "^4.4.3"
|
|
81
88
|
},
|
|
82
89
|
"devDependencies": {
|
|
83
90
|
"@deepseek-ai/cordis": "4.0.1",
|
|
84
91
|
"@deepseek-ai/dsh-agent": "0.1.1-rc.1",
|
|
85
92
|
"@deepseek-ai/dsh-client-runtime": "0.1.1-rc.1",
|
|
86
93
|
"@deepseek-ai/dsh-client-ui-conversation": "0.1.1-rc.1",
|
|
94
|
+
"@deepseek-ai/dsh-client-ui-layout": "0.1.1-rc.1",
|
|
87
95
|
"@deepseek-ai/dsh-client-ui-slots": "0.1.1-rc.1",
|
|
88
96
|
"@deepseek-ai/dsh-client-ui-tool": "0.1.1-rc.1",
|
|
97
|
+
"@deepseek-ai/dsh-fs": "0.1.1-rc.1",
|
|
89
98
|
"@deepseek-ai/dsh-host-webserver": "0.1.1-rc.1",
|
|
90
99
|
"@deepseek-ai/dsh-llm": "0.1.1-rc.1",
|
|
91
100
|
"@deepseek-ai/dsh-session": "0.1.1-rc.1",
|
|
101
|
+
"@deepseek-ai/dsh-session-projection": "0.1.1-rc.1",
|
|
102
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.1.1-rc.1",
|
|
92
103
|
"@deepseek-ai/dsh-skill": "0.1.1-rc.1",
|
|
93
104
|
"@deepseek-ai/dsh-subagent": "0.1.1-rc.1",
|
|
94
105
|
"@deepseek-ai/dsh-tools": "0.1.1-rc.1",
|
|
106
|
+
"@deepseek-ai/dsh-typert-registry": "0.1.1-rc.1",
|
|
95
107
|
"@deepseek-ai/schemastery": "3.18.1",
|
|
96
108
|
"@types/react": "18.3.28",
|
|
97
109
|
"@types/react-dom": "18.3.7",
|
|
98
110
|
"react": "18.3.1",
|
|
99
111
|
"react-dom": "18.3.1",
|
|
100
|
-
"typescript": "6.0.3"
|
|
112
|
+
"typescript": "6.0.3",
|
|
113
|
+
"zod": "4.4.3"
|
|
101
114
|
},
|
|
102
115
|
"scripts": {
|
|
103
116
|
"build": "tsx ../../scripts/build-dsh-plugin.ts && tsc -p tsconfig.build.json",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare class PathSecurityError extends Error {
|
|
2
|
-
constructor(message: string);
|
|
3
|
-
}
|
|
4
|
-
export declare function canonicalWorkspaceRoot(root: string): Promise<string>;
|
|
5
|
-
export declare function resolveWorkspacePath(root: string, relativePath: string, options?: {
|
|
6
|
-
readonly allowMissing?: boolean;
|
|
7
|
-
readonly expect?: "file" | "directory";
|
|
8
|
-
}): Promise<string>;
|
|
9
|
-
//# sourceMappingURL=workspace-security.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-security.d.ts","sourceRoot":"","sources":["../../src/workspace-security.ts"],"names":[],"mappings":"AAGA,qBAAa,iBAAkB,SAAQ,KAAK;gBACvB,OAAO,EAAE,MAAM;CAInC;AAOD,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAK1E;AAED,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE;IAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;CAAO,GACxF,OAAO,CAAC,MAAM,CAAC,CAqCjB"}
|