dsh-lowtide 0.2.2 → 0.2.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/lib/index.js CHANGED
@@ -5,7 +5,7 @@ import { execFile } from "node:child_process";
5
5
  import { homedir } from "node:os";
6
6
  import { installModelSelection } from "@deepseek-ai/dsh-agent";
7
7
  import { ReasoningEffortId, createUserMessage } from "@deepseek-ai/dsh-llm";
8
- import { SessionId } from "@deepseek-ai/dsh-session";
8
+ import { SessionId, SessionLogOffset } from "@deepseek-ai/dsh-session";
9
9
  //#region ../core/src/windows.ts
10
10
  const DEFAULT_MULTIPLIER = {
11
11
  peak: 2,
@@ -5736,22 +5736,40 @@ async function executeTurns(ctx, task, nextMessage, timeoutMs, reasoning, resume
5736
5736
  const reason = error instanceof Error ? error.message : String(error);
5737
5737
  console.error(`[lowtide] resume ${resumeSessionId} failed (${reason}) — trying fork-style continuation`);
5738
5738
  const live = ctx.sessions.get(SessionId(resumeSessionId));
5739
- const cut = live === void 0 ? null : forkSeedBoundary(live.events);
5740
- if (live !== void 0 && cut !== null) {
5741
- const seed = live.events.slice(0, cut);
5742
- handle = await ctx.agents.create({
5743
- sessionId: SessionId(`lt-${task.id}-${Date.now()}`),
5739
+ const liveCompat = live;
5740
+ const newSessionApi = typeof liveCompat?.snapshotEvents === "function";
5741
+ const liveEvents = liveCompat === void 0 ? void 0 : newSessionApi ? liveCompat.snapshotEvents() : liveCompat.events;
5742
+ const cut = liveEvents === void 0 ? null : forkSeedBoundary(liveEvents);
5743
+ if (live !== void 0 && liveEvents !== void 0 && cut !== null) {
5744
+ const seed = liveEvents.slice(0, cut);
5745
+ const sessionId = SessionId(`lt-${task.id}-${Date.now()}`);
5746
+ const agentOptions = {
5747
+ provider: selection.provider,
5748
+ model: selection.model
5749
+ };
5750
+ const preset = live.header.agentPreset !== void 0 ? { agentPreset: live.header.agentPreset } : {};
5751
+ handle = await ctx.agents.create(newSessionApi ? {
5752
+ sessionId,
5744
5753
  seed,
5754
+ inheritedEventCount: SessionLogOffset(cut),
5745
5755
  meta: {
5746
5756
  cwd: workspacePath,
5747
5757
  parentSession: SessionId(resumeSessionId),
5748
- seedLength: cut,
5749
- ...live.header.agentPreset !== void 0 ? { agentPreset: live.header.agentPreset } : {}
5758
+ isSeeded: true,
5759
+ ...preset
5750
5760
  },
5751
- agentOptions: {
5752
- provider: selection.provider,
5753
- model: selection.model
5761
+ agentOptions,
5762
+ setup
5763
+ } : {
5764
+ sessionId,
5765
+ seed,
5766
+ meta: {
5767
+ cwd: workspacePath,
5768
+ parentSession: SessionId(resumeSessionId),
5769
+ seedLength: cut,
5770
+ ...preset
5754
5771
  },
5772
+ agentOptions,
5755
5773
  setup
5756
5774
  });
5757
5775
  forked = true;
@@ -109,6 +109,7 @@ declare const zh: {
109
109
  'modal.editDesc': string;
110
110
  'modal.saveEdit': string;
111
111
  'modal.cancel': string;
112
+ 'modal.close': string;
112
113
  'modal.submit': string;
113
114
  'modal.promptPlaceholderSingle': string;
114
115
  'modal.promptPlaceholderIterative': string;
@@ -9,7 +9,7 @@
9
9
  * the host locale service; every slot entry declares `locale: NS` so the
10
10
  * framework injects the typed `t` seat into component props.
11
11
  */
12
- import type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client';
12
+ import type { Context as ClientContext } from '@deepseek-ai/cordis';
13
13
  /** Required services before this client module materializes. */
14
14
  export declare const inject: string[];
15
15
  export declare function apply(ctx: ClientContext): void;
@@ -204,7 +204,7 @@ export interface ClientUiState {
204
204
  /** False while the live push is silent/absent and polling carries the UI. */
205
205
  sseHealthy: boolean;
206
206
  }
207
- export declare const lowtideStore: import("@deepseek-ai/dsh-client-runtime/client").SnapshotStore<ClientUiState>;
207
+ export declare const lowtideStore: import("@deepseek-ai/dsh-client-store").SnapshotStore<ClientUiState>;
208
208
  export declare function showToast(text: string): void;
209
209
  export declare function clearToast(): void;
210
210
  /** Reset the UI slice (plugin unload) — the full field list lives here so a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-lowtide",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "lowtide: human-adjudicated off-peak batch task pipeline for dsh (peak/valley pricing aware)",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -23,11 +23,8 @@
23
23
  "client": {
24
24
  "inject": [
25
25
  "@deepseek-ai/dsh-client-locale",
26
- "@deepseek-ai/dsh-client-runtime",
27
26
  "@deepseek-ai/dsh-client-ui-conversation",
28
- "@deepseek-ai/dsh-client-ui-primitives",
29
27
  "@deepseek-ai/dsh-client-ui-settings",
30
- "@deepseek-ai/dsh-client-ui-slots",
31
28
  "@deepseek-ai/dsh-client-connection"
32
29
  ],
33
30
  "platform": "web"
@@ -58,42 +55,44 @@
58
55
  "directory": "packages/dsh-lowtide"
59
56
  },
60
57
  "peerDependencies": {
61
- "@deepseek-ai/dsh-agent": "^0.1.0-rc.7",
62
- "@deepseek-ai/dsh-llm": "^0.1.0-rc.7",
63
- "@deepseek-ai/dsh-session": "^0.1.0-rc.7",
64
- "@deepseek-ai/dsh-settings": "^0.1.0-rc.7",
65
- "@deepseek-ai/dsh-storage-domain": "^0.1.0-rc.7"
58
+ "@deepseek-ai/dsh-agent": "^0.1.5-rc.1",
59
+ "@deepseek-ai/dsh-llm": "^0.1.5-rc.1",
60
+ "@deepseek-ai/dsh-session": "^0.1.5-rc.1",
61
+ "@deepseek-ai/dsh-settings": "^0.1.5-rc.1",
62
+ "@deepseek-ai/dsh-storage-domain": "^0.1.5-rc.1"
66
63
  },
67
64
  "devDependencies": {
68
65
  "@deepseek-ai/cordis": "^4.0.1",
69
- "@deepseek-ai/dsh-agent": "^0.1.0-rc.7",
70
- "@deepseek-ai/dsh-agent-default-model": "^0.1.0-rc.7",
71
- "@deepseek-ai/dsh-agent-presets": "0.1.0-rc.7",
72
- "@deepseek-ai/dsh-client-connection": "^0.1.0-rc.7",
73
- "@deepseek-ai/dsh-client-locale": "^0.1.0-rc.7",
74
- "@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.7",
75
- "@deepseek-ai/dsh-client-ui-conversation": "^0.1.0-rc.7",
76
- "@deepseek-ai/dsh-client-ui-layout": "0.1.0-rc.7",
77
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.7",
78
- "@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.7",
79
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.7",
80
- "@deepseek-ai/dsh-host-apiproxy": "^0.1.0-rc.7",
81
- "@deepseek-ai/dsh-host-webserver": "^0.1.0-rc.7",
82
- "@deepseek-ai/dsh-llm": "^0.1.0-rc.7",
83
- "@deepseek-ai/dsh-permission-presets": "^0.1.0-rc.7",
84
- "@deepseek-ai/dsh-session": "^0.1.0-rc.7",
85
- "@deepseek-ai/dsh-settings": "^0.1.0-rc.7",
86
- "@deepseek-ai/dsh-storage-domain": "^0.1.0-rc.7",
66
+ "@deepseek-ai/dsh-agent": "^0.1.5-rc.1",
67
+ "@deepseek-ai/dsh-agent-default-model": "^0.1.5-rc.1",
68
+ "@deepseek-ai/dsh-agent-presets": "^0.1.5-rc.1",
69
+ "@deepseek-ai/dsh-client-connection": "^0.1.5-rc.1",
70
+ "@deepseek-ai/dsh-client-locale": "^0.1.5-rc.1",
71
+ "@deepseek-ai/dsh-client-store": "^0.1.5-rc.1",
72
+ "@deepseek-ai/dsh-client-ui-conversation": "^0.1.5-rc.1",
73
+ "@deepseek-ai/dsh-client-ui-layout": "^0.1.5-rc.1",
74
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.1.5-rc.1",
75
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.1.5-rc.1",
76
+ "@deepseek-ai/dsh-client-ui-settings": "^0.1.5-rc.1",
77
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.5-rc.1",
78
+ "@deepseek-ai/dsh-host-webserver": "^0.1.5-rc.1",
79
+ "@deepseek-ai/dsh-llm": "^0.1.5-rc.1",
80
+ "@deepseek-ai/dsh-permission-presets": "^0.1.5-rc.1",
81
+ "@deepseek-ai/dsh-session": "^0.1.5-rc.1",
82
+ "@deepseek-ai/dsh-settings": "^0.1.5-rc.1",
83
+ "@deepseek-ai/dsh-storage-domain": "^0.1.5-rc.1",
87
84
  "@playwright/test": "^1.62.1",
88
85
  "@types/node": "^22.20.0",
89
86
  "@types/react": "~18.3.1",
87
+ "immer": "^10.1.1",
90
88
  "lightningcss": "^1.32.0",
91
89
  "react": "^18.2.0",
92
90
  "tsdown": "^0.22.2",
93
91
  "typescript": "^6.0.3",
94
92
  "vitest": "^4.1.8",
95
93
  "zod": "^4.4.3",
96
- "lowtide-core": "0.2.2"
94
+ "zustand": "~4.4.7",
95
+ "lowtide-core": "0.2.3"
97
96
  },
98
97
  "scripts": {
99
98
  "bundle": "tsdown && tsc -p tsconfig.build.json",