dsh-compact-pi 0.2.3-b5 → 0.2.3-b6
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 +6 -0
- package/README.md +28 -5
- package/bin/dcp-session.ts +4 -1
- package/dist/dcp-session.mjs +611 -157
- package/dist/dcp.mjs +23 -18
- package/dist/index.js +70 -15
- package/docs/compatibility.md +1 -1
- package/docs/help.md +21 -2
- package/docs/publishing.md +4 -4
- package/docs/testing.md +2 -0
- package/package.json +2 -2
- package/scripts/smoke-package.mjs +4 -0
- package/scripts/test-resume.mjs +1 -1
- package/skills/dcp-import-from-dsh/SKILL.md +17 -0
- package/src/bridge.ts +2 -1
- package/src/config.ts +61 -4
- package/src/dsh/convert.ts +14 -14
- package/src/dsh/engine.ts +3 -1
- package/src/dsh/llm.ts +29 -4
- package/src/dsh/migration.ts +4 -4
- package/src/dsh/pi-destination.ts +75 -0
- package/src/dsh/reverse-migration-cli.ts +71 -0
- package/src/dsh/reverse-migration.ts +244 -0
- package/src/dsh/store.ts +14 -8
- package/src/index.ts +2 -2
- package/test/cancellation.test.ts +1 -0
- package/test/config.test.ts +33 -0
- package/test/host.test.ts +56 -0
- package/test/integration.test.ts +2 -0
- package/test/migration.test.ts +73 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.3-b6]
|
|
4
|
+
|
|
5
|
+
- Configure the DCP summary instruction with native, override, or append mode. Set a user default in the Pi agent directory and override it per project.
|
|
6
|
+
- Add the DSH-to-Pi import skill and CLI workflow. Validate a local DSH store, list its sessions, confirm the target Pi workspace and exact path, and verify the imported history in Pi's session list.
|
|
7
|
+
- Remove legacy project-local comparison packages and load the installed DCP release in this workspace. Use Pi's explicit extension option to run the development checkout.
|
|
8
|
+
|
|
3
9
|
## [0.2.3-b5]
|
|
4
10
|
|
|
5
11
|
- Guide session migration one decision at a time. Confirm the target, resolve conflicts individually, and approve the exact output path before writing.
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
An installable pi extension hosting **unmodified DeepSeek Harness compaction plugins in real Cordis**. DCP adapts a defined common subset of pi and DSH; its source updater copies upstream files without rewriting imports or patching the compression algorithm.
|
|
4
4
|
|
|
5
|
-
Tested with pi 1.5.2 and 1.6.1. Node.js must satisfy `^24.22.3 || >=26.13.1`. DCP **0.2.
|
|
5
|
+
Tested with pi 1.5.2 and 1.6.1. Node.js must satisfy `^24.22.3 || >=26.13.1`. DCP **0.2.3b6** uses DeepSeek Harness **0.2.3-alpha.2**. `/dcp-status` shows both versions and the upstream commit recorded in [vendor/manifest.json](vendor/manifest.json). The Git tag and npm version use the SemVer spelling `0.2.3-b6`. The source snapshot is included in the package.
|
|
6
6
|
|
|
7
7
|
## Install and use
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@ pi install npm:dsh-compact-pi@latest
|
|
|
15
15
|
The explicit tag selects the currently published prerelease. To pin the GitHub release, use:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
pi install git:github.com/HanqingTony/dsh-compact-pi@v0.2.3-
|
|
18
|
+
pi install git:github.com/HanqingTony/dsh-compact-pi@v0.2.3-b6
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Restart pi or `/reload`, then `/dcp-status`. The Git tag pins this release. To follow future releases on the default branch, use `pi install git:github.com/HanqingTony/dsh-compact-pi`. Before switching from a local DCP installation, use `pi list` and `pi remove <old-source>` to remove the old package entry and avoid loading DCP twice. To install a development checkout, use `pi install /absolute/path/to/dsh-compact-pi`. For one run:
|
|
@@ -42,14 +42,14 @@ In pi 1.5.2, `pi update` alone updates **pi itself**. Use `pi update --extension
|
|
|
42
42
|
|
|
43
43
|
| Installed source | Update behavior |
|
|
44
44
|
|---|---|
|
|
45
|
-
| `git:github.com/HanqingTony/dsh-compact-pi@v0.2.3-
|
|
45
|
+
| `git:github.com/HanqingTony/dsh-compact-pi@v0.2.3-b6` | Stays on this tag until you install a different tag |
|
|
46
46
|
| `git:github.com/HanqingTony/dsh-compact-pi` | Follows the default branch (`main`), including changes between tagged releases |
|
|
47
47
|
| Local checkout | Uses local files; pi does not fetch a new release for that path |
|
|
48
48
|
|
|
49
49
|
To upgrade a pinned 0.2.2 installation, install the new tag on the machine where pi runs.
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
|
-
pi install git:github.com/HanqingTony/dsh-compact-pi@v0.2.3-
|
|
52
|
+
pi install git:github.com/HanqingTony/dsh-compact-pi@v0.2.3-b6
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
To follow `main` instead, replace the pinned source once, then update packages as needed:
|
|
@@ -125,6 +125,27 @@ Small-window models need an explicit policy that fits their model budget. For ex
|
|
|
125
125
|
|
|
126
126
|
Retention settings apply to automatic pressure. Manual compaction follows upstream's zero-retention-budget selection, preserving only the last balanced tail. `audit: false` omits detailed DSH events but retains checkpoint replay/provenance. Reload after configuration changes.
|
|
127
127
|
|
|
128
|
+
### Custom compaction prompt
|
|
129
|
+
|
|
130
|
+
Set the optional top-level `summaryPrompt` in the project's `.pi/dcp.json`. For a user-wide default, set it in `~/.pi/agent/dcp.json` or `$PI_CODING_AGENT_DIR/dcp.json`. A project setting takes precedence, including an explicit `native` mode. For example, to keep the upstream summary structure and add guidance about decision scope:
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
{
|
|
134
|
+
"summaryPrompt": {
|
|
135
|
+
"mode": "append",
|
|
136
|
+
"text": "Record factual information needed to resume work. For each decision, include the task, circumstances and scope in which it applies."
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
| Mode | Instruction sent to the summary model |
|
|
142
|
+
| --- | --- |
|
|
143
|
+
| `native` | Uses the upstream DSH instruction. This is the default when neither configuration defines `summaryPrompt`. Specify only `"mode": "native"`. |
|
|
144
|
+
| `override` | Replaces the entire upstream summary instruction with `text`. Include any required structure and output rules in your text. |
|
|
145
|
+
| `append` | Adds `text` after the upstream summary instruction, separated by a blank line. |
|
|
146
|
+
|
|
147
|
+
`override` and `append` require non-empty text. The setting applies to new DCP summaries in both manual and automatic compaction. The conversation's system prompt, replayed messages and checkpoint framing stay the same. Run `/reload` while idle and check the active mode with `/dcp-status`.
|
|
148
|
+
|
|
128
149
|
## Updating upstream
|
|
129
150
|
|
|
130
151
|
```bash
|
|
@@ -148,7 +169,7 @@ npm run test:package # package, isolated install, copied-source rebuild, pi in
|
|
|
148
169
|
|
|
149
170
|
Differential tests compare the adapter with direct upstream Cordis plugin execution: summary input/budget, logical selected spans, prune/replace events, final surfaces, no-op/failure results, flush checkpoints and retry decisions. Runtime IDs/timestamps and host-specific seed offsets are excluded. Other tests cover real TypeBox tool schemas, usage pricing, durability, branches, Ctrl+O, cancellation, scope rejection and input rejection. Provider replies are deterministic stubs; paid live-model fidelity benchmarks are not implied.
|
|
150
171
|
|
|
151
|
-
The distributable is `dsh-compact-pi-0.2.3-
|
|
172
|
+
The distributable is `dsh-compact-pi-0.2.3-b6.tgz`. It can be installed with `npm install ./dsh-compact-pi-0.2.3-b6.tgz`, followed by `pi install /absolute/path/to/node_modules/dsh-compact-pi`. It contains the copied source closure and built extension.
|
|
152
173
|
|
|
153
174
|
See [testing](docs/testing.md), [publishing](docs/publishing.md), and [release notes](CHANGELOG.md).
|
|
154
175
|
|
|
@@ -158,6 +179,8 @@ See [usage and troubleshooting](docs/help.md) for configuration examples, migrat
|
|
|
158
179
|
|
|
159
180
|
Run `dcp-session migrate` or invoke the [dcp-migrate-to-dsh skill](skills/dcp-migrate-to-dsh/SKILL.md) for a guided portable export or an import to a confirmed Windows Desktop, Linux desktop client, Web, or TUI backend. The preview shows the host, output, and attachment paths before apply.
|
|
160
181
|
|
|
182
|
+
For DSH → Pi, ask Pi to import a DSH session or use the [dcp-import-from-dsh skill](skills/dcp-import-from-dsh/SKILL.md). It uses `dcp-session import-dsh` to check local backends, list sessions, confirm the Pi workspace and output, and verify that Pi can list and open the result. See [the backend configuration example](docs/help.md#import-from-dsh-into-pi).
|
|
183
|
+
|
|
161
184
|
```bash
|
|
162
185
|
dcp-session dsh2pi old.dsh.jsonl imported.pi.jsonl
|
|
163
186
|
pi --session imported.pi.jsonl
|
package/bin/dcp-session.ts
CHANGED
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
import { dshToPi, piToDsh } from '../src/dsh/convert.ts'
|
|
4
4
|
import { importPiToDsh } from '../src/dsh/import.ts'
|
|
5
5
|
import { runMigration } from '../src/dsh/migration-cli.ts'
|
|
6
|
+
import { runReverseMigration } from '../src/dsh/reverse-migration-cli.ts'
|
|
6
7
|
|
|
7
8
|
const help = `Usage:
|
|
8
9
|
dcp-session migrate --help
|
|
10
|
+
dcp-session import-dsh --help
|
|
9
11
|
dcp-session pi2dsh <pi-session.jsonl> <out.dsh.jsonl>
|
|
10
12
|
dcp-session pi2dsh-import <pi-session.jsonl> [dsh-session-root] [--plain]
|
|
11
13
|
dcp-session dsh2pi <dsh-session.jsonl> <out.pi.jsonl>
|
|
@@ -18,7 +20,7 @@ configured with plaintext session storage.
|
|
|
18
20
|
dsh2pi restores those entries from an unchanged export. For a native or
|
|
19
21
|
continued DSH session it imports the active DSH context.
|
|
20
22
|
|
|
21
|
-
Use a separate output path. DSH input may be .jsonl or .zstd
|
|
23
|
+
Use a separate output path. DSH input may be .jsonl or .zstd.
|
|
22
24
|
Image references are resolved under DSH_HOME (default ~/.dsh).`
|
|
23
25
|
|
|
24
26
|
async function main([command, input, ...args]: string[]) {
|
|
@@ -27,6 +29,7 @@ async function main([command, input, ...args]: string[]) {
|
|
|
27
29
|
return
|
|
28
30
|
}
|
|
29
31
|
if (command === 'migrate') return runMigration(input === undefined ? [] : [input, ...args])
|
|
32
|
+
if (command === 'import-dsh') return runReverseMigration(input === undefined ? [] : [input, ...args])
|
|
30
33
|
const importing = command === 'pi2dsh-import'
|
|
31
34
|
const plain = importing && args.at(-1) === '--plain'
|
|
32
35
|
if (plain) args.pop()
|