dsh-plugin-external-session-sync 0.0.0-stage → 1.10.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/CHANGELOG.md +192 -0
- package/LICENSE +21 -0
- package/README.md +131 -3
- package/client.js +389 -0
- package/cordis.patch.yml +6 -0
- package/discovery.js +43 -0
- package/engine.js +505 -0
- package/icon.svg +1 -0
- package/index.js +465 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/native.js +168 -0
- package/package.json +55 -6
- package/readers-antigravity.js +306 -0
- package/readers.js +1449 -0
- package/reverse.js +451 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.9.2 — 2026-11-30
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **One Antigravity chat no longer appears as a dozen entries.** Antigravity creates a separate
|
|
8
|
+
cascade database for parallel branches of the same request, so one conversation surfaced as many
|
|
9
|
+
rows sharing a title. Discovery now groups databases that share the workspace, the first user
|
|
10
|
+
prompt and a ten-minute window into one entry (`variants` records how many branches existed), and
|
|
11
|
+
reading imports the most complete branch once instead of concatenating duplicated prompts.
|
|
12
|
+
On the development machine the list dropped from 96 rows to 81, with the review conversation's
|
|
13
|
+
twelve rows collapsing to its two real sessions.
|
|
14
|
+
|
|
15
|
+
All notable changes to `dsh-plugin-external-session-sync`.
|
|
16
|
+
|
|
17
|
+
## 1.10.0 — 2026-11-30
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- **Antigravity imports now include the real assistant replies**, not just reasoning. The reader
|
|
22
|
+
uses the same verified path as `dsh-conversation-sync`: `brain/<session>/.system_generated/
|
|
23
|
+
logs/transcript.jsonl`, where `USER_INPUT` / `PLANNER_RESPONSE` records carry the visible
|
|
24
|
+
dialogue. The old path read `conversations/<id>.db`'s `steps` table, which only stores reasoning.
|
|
25
|
+
- Sessions with `<USER_REQUEST>` wrappers are unwrapped; `CHECKPOINT`, `GENERIC`, `SYSTEM` and our
|
|
26
|
+
own `dshSyncId` lines are filtered, so a write-back never echoes into a later import.
|
|
27
|
+
- Workspace (`cwd`) is recovered from the paired cascade database's `trajectory_metadata_blob`:
|
|
28
|
+
84 of 92 sessions now show their project.
|
|
29
|
+
- Tool results are sanitized to lossless JSON (non-finite numbers dropped), fixing
|
|
30
|
+
`value is not lossless JSON` on `/status` and `/conversation`.
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
|
|
34
|
+
- `appendAntigravityTurns()` in `readers-antigravity.js`: append-only write-back to the transcript
|
|
35
|
+
with a byte backup (`*.dsh-sync-backup-<epoch>`), a re-read verification and `dshSyncId` markers.
|
|
36
|
+
|
|
37
|
+
## 1.9.0 — 2026-11-29
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- **Antigravity support.** A third source joins Codex and Claude Code in the picker. Each Antigravity
|
|
42
|
+
conversation is one SQLite database under `~/.gemini/antigravity{,-ide}/conversations/<cascade-id>.db`;
|
|
43
|
+
the reader walks `steps.step_payload` (protobuf) for the user prompt (`step_type 14`), the model's
|
|
44
|
+
reasoning (`15`), the turn summary (`23`) and the event time (field `5`), and recovers the project
|
|
45
|
+
from the `file://` root stored in `trajectory_metadata_blob`. Opened with SQLite's read-only flag;
|
|
46
|
+
listing is cached by file size + mtime, so a refresh costs ~10 ms warm.
|
|
47
|
+
- Both Antigravity profiles are scanned: the desktop IDE and the standalone agent.
|
|
48
|
+
|
|
49
|
+
### Verified
|
|
50
|
+
|
|
51
|
+
- 96 stored conversations discovered on the development machine (87 agent + 9 IDE) with titles,
|
|
52
|
+
projects and timestamps.
|
|
53
|
+
- One conversation imported end to end: 4 messages, workspace `e:\HS——ocean` attached, `/validate` OK.
|
|
54
|
+
- Four new tests cover title selection, markdown-structure rejection and `file://` workspace recovery
|
|
55
|
+
(32 total).
|
|
56
|
+
|
|
57
|
+
### Known limitation
|
|
58
|
+
|
|
59
|
+
- Antigravity does not persist the assistant reply it renders; the sidecar `.pb` files are encrypted
|
|
60
|
+
(8.00 bits/byte). Imports carry prompts plus the `【思考】` reasoning trace, not final answers.
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## 1.8.0 — 2026-11-10
|
|
65
|
+
|
|
66
|
+
### Changed
|
|
67
|
+
|
|
68
|
+
- Session reads go through DSH's supported API first: `sessionPersistence.open(id, 'read')`
|
|
69
|
+
returns the validated header and events, so the plugin no longer depends on
|
|
70
|
+
`sessionController.inspect` (removed upstream) or on decoding the log format itself.
|
|
71
|
+
- The raw-log decoder stays as a fallback for logs the current build refuses to restore,
|
|
72
|
+
and a missing or failing `open()` degrades instead of throwing.
|
|
73
|
+
- Fork ancestry reads the header through the same API-first path (`readHeaderAny`).
|
|
74
|
+
|
|
75
|
+
### Verified
|
|
76
|
+
|
|
77
|
+
- `readSessionAny` closes every handle it opens, falls back when the service refuses a log,
|
|
78
|
+
and tolerates a service without `open()` — covered by three new tests (28 total).
|
|
79
|
+
- Test fixtures now expose `open()` so the suite exercises the same path as production.
|
|
80
|
+
|
|
81
|
+
### Credits
|
|
82
|
+
|
|
83
|
+
- **Thanks to [@rumeng2580](https://github.com/rumeng2580)** — PR
|
|
84
|
+
[#1](https://github.com/s17765152890-gif/dsh-plugin-external-session-sync/pull/1) identified
|
|
85
|
+
that `sessionController.inspect` had been removed upstream and that reading through
|
|
86
|
+
`sessionPersistence.open(id, 'read')` is the supported replacement. This feature branch now
|
|
87
|
+
uses the same API-first path, with the decoded log demoted to a fallback.
|
|
88
|
+
|
|
89
|
+
## 1.2.0 — 2026-11-06
|
|
90
|
+
|
|
91
|
+
### Added
|
|
92
|
+
|
|
93
|
+
- Reverse sync (`POST /external-session-sync/reverse`, dry run by default): appends the
|
|
94
|
+
turns that exist only inside a DSH session back into the Codex conversation it was
|
|
95
|
+
imported from. Codex rollout files are append-only, each write is preceded by a byte
|
|
96
|
+
backup (`*.reverse-sync-backup-<epoch>`) and followed by a re-read that must show the new
|
|
97
|
+
records, and the payloads mirror what Codex itself writes.
|
|
98
|
+
- Fork resolution: a DSH "fork conversation" copies its parent and records `parentSession`
|
|
99
|
+
in the session header. The fork's seeded prefix is proved equal to the parent before any
|
|
100
|
+
write, and the Codex thread is taken from the imported ancestor's mapping, so a fork syncs
|
|
101
|
+
back to the same "main" conversation.
|
|
102
|
+
- DSH runtime context (`<system-reminder>`, the runtime snapshot, the skill catalog, the
|
|
103
|
+
turn timestamp) is filtered out of user messages: it is not user speech and must never be
|
|
104
|
+
written into another tool's history.
|
|
105
|
+
|
|
106
|
+
### Safety
|
|
107
|
+
|
|
108
|
+
- An unscoped request is refused (HTTP 400): reverse sync only ever touches the sessions
|
|
109
|
+
named in `sessionIds`.
|
|
110
|
+
- Threads whose rollout file no longer exists are reported instead of being recreated.
|
|
111
|
+
- `entry.reversed` records what was written, so a repeated request does not duplicate turns.
|
|
112
|
+
|
|
113
|
+
## 1.1.1 — 2026-11-02
|
|
114
|
+
|
|
115
|
+
### Added
|
|
116
|
+
|
|
117
|
+
- `POST /external-session-sync/unarchive`: the reverse of `/archive`, so a migration or an
|
|
118
|
+
over-eager archive run can be undone per session without touching logs.
|
|
119
|
+
|
|
120
|
+
### Changed
|
|
121
|
+
|
|
122
|
+
- Migration guidance: run `migrate-heads` in small batches. Importing hundreds of large
|
|
123
|
+
histories in one pass is memory-heavy and can restart the DSH process mid-run; a restart
|
|
124
|
+
aborts the in-flight batch with `cannot get required service ... in inactive context`.
|
|
125
|
+
Archive-then-import is idempotent, so recovering means re-running `sync` for the archived
|
|
126
|
+
conversations whose `newSessionId` is missing from the migration journal.
|
|
127
|
+
|
|
128
|
+
## 1.1.0 — 2026-11-02
|
|
129
|
+
|
|
130
|
+
### Added
|
|
131
|
+
|
|
132
|
+
- `GET /external-session-sync/legacy-imports` and `POST /external-session-sync/migrate-heads`:
|
|
133
|
+
detect sessions imported before the protected head, archive them, and re-import the same
|
|
134
|
+
source conversation under a fresh identity. Reversible: old logs are archived, never
|
|
135
|
+
deleted, so `workspaceRegistry.unarchiveSession` restores them. Every run writes
|
|
136
|
+
`$DSH_HOME/external-session-sync/migration-<timestamp>.json` as a rollback journal.
|
|
137
|
+
- `POST /external-session-sync/self-check`: pushes the generated event shape through DSH's
|
|
138
|
+
own session validator, once as written and once with the system message the runtime
|
|
139
|
+
appends when a conversation continues. Nothing is persisted.
|
|
140
|
+
|
|
141
|
+
### Changed
|
|
142
|
+
|
|
143
|
+
- Native session ids carry an importer format version (`dsh-sync-native-2:`), so a migrated
|
|
144
|
+
import never reuses the identity of the archived log it replaces. Existing mappings keep
|
|
145
|
+
their recorded ids because re-syncing a known revision goes through the stored entry.
|
|
146
|
+
|
|
147
|
+
## 1.0.2 — 2026-11-02
|
|
148
|
+
|
|
149
|
+
### Fixed
|
|
150
|
+
|
|
151
|
+
- Imported sessions now open with a protected system head. DSH records the protected head
|
|
152
|
+
only when a `system/message` is the first surface event, and that event must sit inside an
|
|
153
|
+
open turn and step and be an identified message. Continuing an imported chat previously
|
|
154
|
+
made the runtime append its own system message, which `session-format` rejects with
|
|
155
|
+
`system/message requires a protected first surface head`, corrupting the whole log on the
|
|
156
|
+
first continued turn.
|
|
157
|
+
- The canonical turn/step structure: the first assistant reply of a turn shares the turn's
|
|
158
|
+
opening step, later replies open their own step.
|
|
159
|
+
|
|
160
|
+
### Added
|
|
161
|
+
|
|
162
|
+
- `tests/native-format.test.mjs` mirrors the V4 relations keeper, reproduces the reported
|
|
163
|
+
failure for the previous shape, and proves the new shape survives continuation.
|
|
164
|
+
|
|
165
|
+
## 1.0.1 — 2026-11-02
|
|
166
|
+
|
|
167
|
+
### Fixed
|
|
168
|
+
|
|
169
|
+
- The `/sync` route had been dropped from the route table, so the panel's sync buttons hit
|
|
170
|
+
the server fallback and reported a non-JSON response.
|
|
171
|
+
- A non-user `session/title` now always cites a message sequence; with no user message to
|
|
172
|
+
anchor, the event is omitted instead of being written invalid.
|
|
173
|
+
- An unreadable stored log is detected, left untouched, and the conversation is re-imported
|
|
174
|
+
under a deterministic `recovered` identity instead of failing forever (reported in
|
|
175
|
+
`recovered[]`).
|
|
176
|
+
- The client separates request timeouts from body-read aborts and reports the HTTP status
|
|
177
|
+
plus a body excerpt instead of a generic "invalid response".
|
|
178
|
+
|
|
179
|
+
## 1.0.0 — 2026-11-01
|
|
180
|
+
|
|
181
|
+
### Added
|
|
182
|
+
|
|
183
|
+
- Discover Codex threads from `state_5.sqlite` and merge every `rollout-*.jsonl` segment of a
|
|
184
|
+
thread, including rollouts that exist on disk before Codex indexes them.
|
|
185
|
+
- Import Codex and Claude Code history into native DSH sessions through the Session,
|
|
186
|
+
Session Persistence, Session Controller and Workspace Registry APIs.
|
|
187
|
+
- Verify an import: body readable, original session id resumed, project registered.
|
|
188
|
+
Repeated syncs repair a missing registration without rewriting history.
|
|
189
|
+
- Web panel with source picker, search, per-session and bulk sync, and "continue in DSH".
|
|
190
|
+
- Bulk archival for old sessions (1 / 3 / 6 / 12 months), pinned sessions never archived,
|
|
191
|
+
empty projects unregistered only after a real archive in the same request.
|
|
192
|
+
- Three agent tools: `codex_sync_status`, `codex_sync_import`, `codex_read_conversation`.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 s17765152890-gif
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,131 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# dsh-plugin-external-session-sync
|
|
4
|
+
|
|
5
|
+
A standard DSH (DeepSeek Harness) plugin bundle that imports **Codex** and **Claude Code** conversation history into **native DSH sessions**, verifies that each imported chat is registered in its project, and lets you continue the work inside DSH. It also ships **bulk archival** for old sessions.
|
|
6
|
+
|
|
7
|
+
> DSH plugin, not a standalone app. It runs inside a DSH profile: one Host row (routes + agent tools) and one browser bundle (the panel and the sidebar actions).
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **Three sources in one list: Codex, Claude Code and Antigravity.** Codex rollouts, Claude Code JSONL and Antigravity's per-conversation SQLite databases are all read directly and read-only.
|
|
12
|
+
- **Honest Antigravity fidelity.** Antigravity stores the user prompt, the model's reasoning and a turn summary in `~/.gemini/antigravity{,-ide}/conversations/<id>.db`; the assistant reply the UI renders is not persisted (the sidecar `.pb` files are encrypted, 8.00 bits/byte). Antigravity imports therefore carry the prompts plus the reasoning trace, marked `【思考】`, and the project comes from the `file://` root recorded in `trajectory_metadata_blob`.
|
|
13
|
+
- **Complete Codex history.** A single Codex thread is often split across many `rollout-*.jsonl` files; the reader merges every segment of the thread and sorts by timestamp, so an import contains the newest turns instead of only the first rollout.
|
|
14
|
+
- **Uses Codex's own thread index.** Discovery reads `state_5.sqlite` so archived and continuation threads are not silently dropped, and it also finds a rollout that exists on disk before Codex indexes it.
|
|
15
|
+
- **Native imports only.** Each chat is created through DSH's Session, Session Persistence, Session Controller and Workspace Registry APIs. No hand-written session log, no edited workspace index.
|
|
16
|
+
- **Verified project membership.** "Synced" means the body is readable, the **original session id** resumed, and the chat is registered in its project. Re-running sync repairs a missing registration without rewriting history.
|
|
17
|
+
- **Work handoff.** From the panel you can open the imported native session and keep working in it with DSH's own composer.
|
|
18
|
+
- **Idempotent snapshots.** Same source revision → skip. New source revision → a new native session, so a chat you already continued is never overwritten.
|
|
19
|
+
- **Bulk archival.** Archive old sessions by age (1 / 3 / 6 / 12 months), pinned sessions are never archived, and a project whose members are all archived can be unregistered so the sidebar has no empty projects. Chat bodies, session logs and directories are kept.
|
|
20
|
+
- **Agent tools.** `codex_sync_status`, `codex_sync_import`, `codex_read_conversation`.
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
Install the directory as a DSH bundle (Plugin Manager → install bundle from a local package directory), or add the row by hand to your profile patch:
|
|
25
|
+
|
|
26
|
+
```yaml
|
|
27
|
+
- insert:
|
|
28
|
+
- id: external-session-sync-native
|
|
29
|
+
name: dsh-plugin-external-session-sync
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Requirements: DSH with the Web client, Node.js 22.5+ (the readers use the built-in `node:sqlite`, and degrade to filesystem-only discovery when it is unavailable).
|
|
33
|
+
|
|
34
|
+
## Use
|
|
35
|
+
|
|
36
|
+
1. Click **Codex 同步 / External Sync** in the left sidebar, or **会话同步** in a chat header.
|
|
37
|
+
2. Pick **Codex** or **Claude**, search by title or project directory.
|
|
38
|
+
3. **同步所选** imports the selected conversation, **同步全部** imports every normal conversation of that source.
|
|
39
|
+
4. The result line reports `新增 / 已同步 / 修复项目关联 / 失败`.
|
|
40
|
+
5. **在 DSH 继续** opens the imported native session and hands the work over to DSH.
|
|
41
|
+
|
|
42
|
+
Archive buttons:
|
|
43
|
+
|
|
44
|
+
- Panel row: month selector (**1 month** by default) + **归档旧会话** — archives synced conversations of the current source.
|
|
45
|
+
- Sidebar footer: **旧会话归档** — archives **native DSH sessions only**, older than 1 month, with a confirmation dialog.
|
|
46
|
+
|
|
47
|
+
## Where data lives
|
|
48
|
+
|
|
49
|
+
| Path | Purpose |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| `$DSH_HOME/storages/external-session-sync-v1.json` | external id → native session id map |
|
|
52
|
+
| `$DSH_HOME/external-session-sync/archives/<session-id>.json` | plain-text archive of the imported messages |
|
|
53
|
+
| `$DSH_HOME/external-session-sync/runtime.log` | runtime log |
|
|
54
|
+
|
|
55
|
+
Source history is never modified: `.codex/` and `.claude/` are opened read-only.
|
|
56
|
+
|
|
57
|
+
## What is imported
|
|
58
|
+
|
|
59
|
+
Visible user and assistant text, title, and working directory. Tool calls, hidden reasoning and binary attachments are **not** replayed as actions. Only text is imported, so a chat with paths or secrets inside its transcript carries that text with it — remember that when you publish or share a synced profile.
|
|
60
|
+
|
|
61
|
+
## Security notes
|
|
62
|
+
|
|
63
|
+
- HTTP routes are bound to the local DSH web server and reject non-loopback `Origin`s and POSTs without the `x-dsh-sync` header.
|
|
64
|
+
- The plugin never stores credentials. It does not read provider configuration.
|
|
65
|
+
- Archiving uses DSH's registry, so it is reversible with `workspaceRegistry.unarchiveSession`.
|
|
66
|
+
- `deleteEmptyWorkspaces` only runs after a real archive in the same request; an empty request can never unregister projects.
|
|
67
|
+
|
|
68
|
+
## Session format compatibility
|
|
69
|
+
|
|
70
|
+
DSH records the first surface event of a session as its **protected system head** and rejects
|
|
71
|
+
any later `system/message` when no head was recorded
|
|
72
|
+
(`system/message requires a protected first surface head`). Continuing an imported chat makes
|
|
73
|
+
the runtime append its own system message, so an import that starts with a user message
|
|
74
|
+
corrupts the log on the first continued turn.
|
|
75
|
+
|
|
76
|
+
Imports therefore open with `turn/start -> step/start -> system/message` (role `system`,
|
|
77
|
+
source `system-prompt`, carrying an id) and only then the transcript.
|
|
78
|
+
|
|
79
|
+
`POST /external-session-sync/self-check` runs the generated shape through DSH's own session
|
|
80
|
+
validator, once as written and once with the appended runtime system message, so a profile
|
|
81
|
+
upgrade cannot silently break imports.
|
|
82
|
+
|
|
83
|
+
Sessions imported by versions before 1.0.2 lack that head and can still corrupt when continued.
|
|
84
|
+
|
|
85
|
+
### Migrating older imports
|
|
86
|
+
|
|
87
|
+
`GET /external-session-sync/legacy-imports` lists every mapping whose log has no protected
|
|
88
|
+
head, split into re-importable and no-longer-recoverable ones. `POST
|
|
89
|
+
/external-session-sync/migrate-heads` archives the old session and re-imports the same source
|
|
90
|
+
conversation under a new identity, in batches:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
curl -s -XPOST -H 'x-dsh-sync: 1' -H 'content-type: application/json' \
|
|
94
|
+
-d '{"dryRun":true}' http://127.0.0.1:<port>/external-session-sync/migrate-heads
|
|
95
|
+
curl -s -XPOST -H 'x-dsh-sync: 1' -H 'content-type: application/json' \
|
|
96
|
+
-d '{"dryRun":false,"limit":30}' http://127.0.0.1:<port>/external-session-sync/migrate-heads
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Repeat until `remaining` reaches 0 or a batch reports no progress. Mappings whose source
|
|
100
|
+
history is gone are never touched. Archiving is reversible with
|
|
101
|
+
`workspaceRegistry.unarchiveSession(oldSessionId)`, and each run appends a rollback journal at
|
|
102
|
+
`$DSH_HOME/external-session-sync/migration-<timestamp>.json`.
|
|
103
|
+
|
|
104
|
+
## Known limitations
|
|
105
|
+
|
|
106
|
+
- Codex `state_5.sqlite` may lag behind the newest rollout; discovery compensates by scanning rollouts, but a thread whose files are all gone cannot be imported.
|
|
107
|
+
- A conversation whose original working directory no longer exists is imported into the plugin checkout's parent directory and flagged with a warning.
|
|
108
|
+
- Imported sessions are snapshots: continuing inside DSH does not write back to Codex or Claude Code.
|
|
109
|
+
- Codex reasoning items and tool payloads are intentionally dropped.
|
|
110
|
+
- Antigravity imports use `brain/<session>/.system_generated/logs/transcript.jsonl` (the same path as the official client), so prompts and final assistant replies are preserved. Tool calls and system step logs are dropped.
|
|
111
|
+
|
|
112
|
+
## Tests
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
node --test test/
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
The suite covers thread-index discovery, multi-rollout merging, snapshot stability, missing-project repair, idempotent re-sync, dry runs, attachment failures, and the panel/footer archive selection logic. It uses temporary fixtures only — no personal data.
|
|
119
|
+
|
|
120
|
+
## 中文速览
|
|
121
|
+
|
|
122
|
+
这是一个标准 DSH 插件包:把 Codex / Claude Code 的历史会话导入为 DSH 原生会话,校验项目归属后可继续对话,并支持按时间批量归档旧会话。
|
|
123
|
+
|
|
124
|
+
- 左侧「Codex 同步」打开同步页;聊天标题旁「会话同步」打开右侧上下文面板。
|
|
125
|
+
- 同步完成需同时满足:正文可读、原会话 id 恢复成功、已登记到对应项目。
|
|
126
|
+
- 同一版本重复同步会跳过;源会话更新则创建新快照,保护你已经接手过的会话。
|
|
127
|
+
- 右侧面板可选择 1 / 3 / 6 / 12 个月并「归档旧会话」;左下角「旧会话归档」只作用于 DSH 原生会话。
|
|
128
|
+
- 置顶会话永不归档;归档保留正文与文件;某项目成员全部归档后会移除该空项目注册。
|
|
129
|
+
- 只导入可见的用户/助手文本,不回放工具调用与隐藏推理,也不修改 `.codex` / `.claude` 原始文件。
|
|
130
|
+
|
|
131
|
+
MIT License.
|