Skip to content

Commit 5e37de0

Browse files
Andrey Cheptsovclaude
andcommitted
Split the preset agent module by concern
agent.py had grown to 1591 lines mixing six concerns. Split it, moving every symbol verbatim: - session.py: on-disk session state, loaders, ownership claims, liveness - workspace.py: the agent working directory, aliasing, wrappers, skills - tail.py: offset-persistent tailers over stream and record files - redaction.py: secret redaction shared by the tailers and verify - agent.py: the Claude subprocess lifecycle (600 lines) Imports follow one direction: session <- workspace <- (tail, redaction) <- agent. No behavior change; all symbol bodies are byte-identical to before. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent e84c22a commit 5e37de0

11 files changed

Lines changed: 1176 additions & 1066 deletions

File tree

src/dstack/_internal/cli/commands/preset.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@
1313
PresetListOutput,
1414
)
1515
from dstack._internal.cli.services.completion import ProjectNameCompleter
16-
from dstack._internal.cli.services.presets.agent import (
17-
find_session_name_claims,
18-
get_presets_dir,
19-
list_agent_sessions,
20-
load_resumable_agent_session,
21-
)
2216
from dstack._internal.cli.services.presets.apply import apply_preset
2317
from dstack._internal.cli.services.presets.create import (
2418
create_preset,
@@ -28,6 +22,12 @@
2822
stop_preset_session,
2923
)
3024
from dstack._internal.cli.services.presets.output import print_presets
25+
from dstack._internal.cli.services.presets.session import (
26+
find_session_name_claims,
27+
get_presets_dir,
28+
list_agent_sessions,
29+
load_resumable_agent_session,
30+
)
3131
from dstack._internal.cli.services.presets.store import (
3232
PresetStore,
3333
load_preset_configuration,

0 commit comments

Comments
 (0)