@oh-story/dsh 0.1.1 → 0.1.3
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 +2 -2
- package/lib/client.js +292 -135
- package/lib/client.js.map +3 -3
- package/lib/index.js +120 -14677
- package/lib/index.js.map +4 -4
- package/lib/types/client/file-activity.d.ts +6 -3
- package/lib/types/client/file-activity.d.ts.map +1 -1
- package/lib/types/client/index.d.ts +9 -1
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/native-hooks.d.ts +4 -1
- package/lib/types/native-hooks.d.ts.map +1 -1
- package/package.json +1 -3
- package/lib/types/file-activity-projection-types.d.ts +0 -11
- package/lib/types/file-activity-projection-types.d.ts.map +0 -1
- package/lib/types/file-activity-projection.d.ts +0 -24
- package/lib/types/file-activity-projection.d.ts.map +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { RunningToolCall } from "@deepseek-ai/dsh-client-runtime/client";
|
|
2
|
-
import type { ProjectedFileCall } from "../file-activity-projection-types.js";
|
|
1
|
+
import type { ChatSnapshot, ConversationTimelineSnapshot, PartialAssistant, RunningToolCall } from "@deepseek-ai/dsh-client-runtime/client";
|
|
3
2
|
export type MutationToolName = "write" | "edit" | "str_replace_editor";
|
|
4
3
|
export interface FileMutationActivity {
|
|
5
4
|
readonly callId: string;
|
|
@@ -17,12 +16,16 @@ interface JsonStringPrefix {
|
|
|
17
16
|
readonly complete: boolean;
|
|
18
17
|
}
|
|
19
18
|
export type WorkbenchMode = "story" | "drama";
|
|
19
|
+
/** Read the latest running Assistant step, including tool-only steps hidden from the Chat list. */
|
|
20
|
+
export declare function streamingAssistant(timeline: ConversationTimelineSnapshot): PartialAssistant | null;
|
|
20
21
|
/** Read a JSON string even while the model is still streaming its closing quote. */
|
|
21
22
|
export declare function jsonStringPrefix(raw: string, key: string): JsonStringPrefix | undefined;
|
|
22
23
|
/** Return every active file mutation in official DSH dispatch order, including nested Code Mode calls. */
|
|
23
|
-
export declare function fileMutations(runningCalls: readonly RunningToolCall[],
|
|
24
|
+
export declare function fileMutations(runningCalls: readonly RunningToolCall[], partial?: PartialAssistant | null): FileMutationActivity[];
|
|
24
25
|
/** Running calls whose settlement may have changed creative files. */
|
|
25
26
|
export declare function mutatingCallIds(runningCalls: readonly RunningToolCall[]): ReadonlySet<string>;
|
|
27
|
+
/** Latest durable successful mutation, used when a fast call skips the live render window. */
|
|
28
|
+
export declare function latestSettledMutation(chat: ChatSnapshot): string | undefined;
|
|
26
29
|
/** Convert a DSH tool path to the creative-relative path accepted by the narrow route. */
|
|
27
30
|
export declare function creativeRelativePath(path: string | undefined, cwd: string | undefined): string | undefined;
|
|
28
31
|
export declare function workbenchModeForPath(path: string | undefined): WorkbenchMode | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-activity.d.ts","sourceRoot":"","sources":["../../../src/client/file-activity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"file-activity.d.ts","sourceRoot":"","sources":["../../../src/client/file-activity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,4BAA4B,EAC5B,gBAAgB,EAChB,eAAe,EAEhB,MAAM,wCAAwC,CAAC;AAGhD,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,gBAAgB,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,cAAc,GAAG,cAAc,GAAG,aAAa,GAAG,SAAS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SAAS,CAmBhG"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ClientContext } from "@deepseek-ai/dsh-client-runtime/client";
|
|
2
2
|
export declare const name = "oh-story";
|
|
3
3
|
export declare const inject: string[];
|
|
4
|
+
declare module "@deepseek-ai/dsh-client-ui-slots" {
|
|
5
|
+
interface SlotMap {
|
|
6
|
+
"oh-story.workspace": {
|
|
7
|
+
kind: "single";
|
|
8
|
+
scope: "session";
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
}
|
|
4
12
|
/** Register only official DSH surfaces; the split bridge never replaces Chat. */
|
|
5
13
|
export declare function apply(context: ClientContext): void;
|
|
6
14
|
declare const _default: {
|
|
@@ -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,EAAe,KAAK,aAAa,EAA+C,MAAM,wCAAwC,CAAC;AAqBtI,eAAO,MAAM,IAAI,aAAa,CAAC;AAC/B,eAAO,MAAM,MAAM,UAAY,CAAC;AAEhC,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,OAAO;QACf,oBAAoB,EAAE;YAAE,IAAI,EAAE,QAAQ,CAAC;YAAC,KAAK,EAAE,SAAS,CAAA;SAAE,CAAC;KAC5D;CACF;AA21BD,iFAAiF;AACjF,wBAAgB,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAkBlD;;;;;;AAED,wBAAuC"}
|
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;AAKnD,OAAO,CAAC,MAAM,0BAA0B,CAAC;AAOzC,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,UAA0D,CAAC;AAE9E,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,CAQhF;;;;;;;AAED,wBAA+C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
import type { FileSystem } from "@deepseek-ai/dsh-fs";
|
|
2
3
|
import type { PreToolDecision, ToolExecution } from "@deepseek-ai/dsh-tools";
|
|
3
4
|
export interface StoryMutation {
|
|
4
5
|
readonly root: string;
|
|
@@ -6,11 +7,13 @@ export interface StoryMutation {
|
|
|
6
7
|
readonly chapter?: number;
|
|
7
8
|
}
|
|
8
9
|
export declare function detectStoryMutation(name: string, args: unknown, cwd: string | undefined): StoryMutation | undefined;
|
|
9
|
-
|
|
10
|
+
type StoryFileSystem = Pick<FileSystem, "resolve" | "contains" | "stat" | "listDir">;
|
|
11
|
+
export declare function validateStoryMutation(fs: StoryFileSystem, mutation: StoryMutation, signal?: AbortSignal): Promise<string | undefined>;
|
|
10
12
|
export declare function decideStoryMutation(exec: ToolExecution, next: () => Promise<PreToolDecision>): Promise<PreToolDecision>;
|
|
11
13
|
/**
|
|
12
14
|
* Native DSH equivalents of the upstream prose guards. They join DSH's typed
|
|
13
15
|
* tool waterfall, so decisions remain visible in the official approval/tool UI.
|
|
14
16
|
*/
|
|
15
17
|
export declare function registerOhStoryHooks(context: Context): void;
|
|
18
|
+
export {};
|
|
16
19
|
//# sourceMappingURL=native-hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-hooks.d.ts","sourceRoot":"","sources":["../../src/native-hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"native-hooks.d.ts","sourceRoot":"","sources":["../../src/native-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAY,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK,EAAoB,eAAe,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAI/F,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAwBD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAenH;AAED,KAAK,eAAe,GAAG,IAAI,CAAC,UAAU,EAAE,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;AAkCrF,wBAAsB,qBAAqB,CACzC,EAAE,EAAE,eAAe,EACnB,QAAQ,EAAE,aAAa,EACvB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAc7B;AAED,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,aAAa,EACnB,IAAI,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,GACnC,OAAO,CAAC,eAAe,CAAC,CAQ1B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqB3D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-story/dsh",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "A DSH plugin for fiction and short-drama production",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -75,7 +75,6 @@
|
|
|
75
75
|
"@deepseek-ai/dsh-host-webserver": "^0.1.1-rc.1",
|
|
76
76
|
"@deepseek-ai/dsh-llm": "^0.1.1-rc.1",
|
|
77
77
|
"@deepseek-ai/dsh-session": "^0.1.1-rc.1",
|
|
78
|
-
"@deepseek-ai/dsh-session-projection": "^0.1.1-rc.1",
|
|
79
78
|
"@deepseek-ai/dsh-sandbox-policy": "^0.1.1-rc.1",
|
|
80
79
|
"@deepseek-ai/dsh-skill": "^0.1.1-rc.1",
|
|
81
80
|
"@deepseek-ai/dsh-subagent": "^0.1.1-rc.1",
|
|
@@ -98,7 +97,6 @@
|
|
|
98
97
|
"@deepseek-ai/dsh-host-webserver": "0.1.1-rc.1",
|
|
99
98
|
"@deepseek-ai/dsh-llm": "0.1.1-rc.1",
|
|
100
99
|
"@deepseek-ai/dsh-session": "0.1.1-rc.1",
|
|
101
|
-
"@deepseek-ai/dsh-session-projection": "0.1.1-rc.1",
|
|
102
100
|
"@deepseek-ai/dsh-sandbox-policy": "0.1.1-rc.1",
|
|
103
101
|
"@deepseek-ai/dsh-skill": "0.1.1-rc.1",
|
|
104
102
|
"@deepseek-ai/dsh-subagent": "0.1.1-rc.1",
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|