mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
fix(cli): default session root in shipped config
This commit is contained in:
@@ -16,7 +16,7 @@ import type { FiberState } from 'cordis'
|
||||
import type { PatchOptions } from '@cordisjs/plugin-include'
|
||||
import yaml from 'js-yaml'
|
||||
import { boot, installFailLoud, loadEnv, loadOverlayPatches, loadPersonalPatches } from '@deepseek-ai/dsh-app-boot'
|
||||
import { resolveDshHome, resolveSessionsRoot } from '@deepseek-ai/dsh-paths'
|
||||
import { resolveDshHome } from '@deepseek-ai/dsh-paths'
|
||||
// Empty type import carries the httpServer Context merge for the port read below.
|
||||
import type {} from '@deepseek-ai/dsh-host-webserver'
|
||||
|
||||
@@ -189,11 +189,6 @@ export class AppCLIEntry {
|
||||
overrides.set(entryId, bag)
|
||||
}
|
||||
|
||||
// Source 0: computed engineering defaults. The session store is the one
|
||||
// shared root every dsh surface resolves, so history follows the user across
|
||||
// working directories instead of splitting per project. The profile
|
||||
// (Source 1) overwrites this same field via last-write-wins in put().
|
||||
put('session-persistence-jsonl', 'root', resolveSessionsRoot())
|
||||
|
||||
// Source 1: profile json (missing file = empty; unmapped key = loud).
|
||||
for (const [key, value] of Object.entries(this.readProfile())) {
|
||||
|
||||
@@ -31,7 +31,7 @@ import {
|
||||
loadPersonalPatches,
|
||||
resolveConfigPath,
|
||||
} from '@deepseek-ai/dsh-app-boot'
|
||||
import { resolveDshHome, resolveSessionsRoot } from '@deepseek-ai/dsh-paths'
|
||||
import { resolveDshHome } from '@deepseek-ai/dsh-paths'
|
||||
import { SessionId } from '@deepseek-ai/dsh-session'
|
||||
import { SESSION_QUERY_SQLITE_PATH_KEY } from '@deepseek-ai/dsh-session-query-sqlite'
|
||||
import { CONFIGURED_AGENT_IDENTITIES_KEY } from '@deepseek-ai/dsh-agent-loop'
|
||||
@@ -39,7 +39,6 @@ import type { Context } from 'cordis'
|
||||
import {
|
||||
INITIAL_SKILL_KEY,
|
||||
MAIN_SESSION_ID_KEY,
|
||||
SESSIONS_ROOT_KEY,
|
||||
TUI_GOODBYE_MESSAGE_KEY,
|
||||
type MainSessionIdentity,
|
||||
type TuiResumeHost,
|
||||
@@ -65,18 +64,6 @@ const SESSION_QUERY_DB = `session-query-${String(process.pid)}-${randomUUID()}.d
|
||||
// symlink, an arbitrary cwd). The agent is told where its own source lives.
|
||||
const SOURCE_ROOT = fileURLToPath(new URL('../../..', import.meta.url))
|
||||
|
||||
/**
|
||||
* The value `dsh` provides on the {@link SESSIONS_ROOT_KEY} boot slot: its
|
||||
* shared session-store root, `sessions` under the Harness home. Shared-store
|
||||
* policy is the launcher's alone — the app bundle treats the slot as opaque and
|
||||
* keeps a project-local fallback, so only `dsh` decides that sessions are
|
||||
* shared across working directories (making `/resume` span every workspace).
|
||||
* @returns the absolute session-store root this launcher shares.
|
||||
*/
|
||||
export function launcherSessionsRoot(): string {
|
||||
return resolveSessionsRoot()
|
||||
}
|
||||
|
||||
/* v8 ignore start -- composition over the unit-tested dsh-app-boot helpers;
|
||||
the CLI PTY smoke drives this path end to end, personal overlay included */
|
||||
/**
|
||||
@@ -238,7 +225,6 @@ export async function runTui(
|
||||
// Shared-store policy is the launcher's: sessions live in one root under
|
||||
// the Harness home across every cwd, so /resume sees every workspace.
|
||||
// The bundle treats the slot as opaque.
|
||||
hostCtx.provide(SESSIONS_ROOT_KEY, launcherSessionsRoot())
|
||||
// The agent-loop row reads this to bind `main`, and the tui row reads the
|
||||
// same id, so a personal overlay repointing the model route cannot drop
|
||||
// the session identity or desynchronise the two.
|
||||
|
||||
Reference in New Issue
Block a user