dsh-seal-scripts 0.0.0-stage → 0.4.8
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/LICENSE +21 -0
- package/README.en.md +318 -0
- package/README.md +342 -2
- package/cordis.patch.yml +6 -0
- package/index.js +12 -0
- package/lib/client.js +1465 -0
- package/lib/core/assembly.js +321 -0
- package/lib/core/catalog-snapshot.js +78 -0
- package/lib/core/diary.js +100 -0
- package/lib/core/health.js +72 -0
- package/lib/core/index.js +491 -0
- package/lib/core/inject.js +146 -0
- package/lib/core/lang.js +251 -0
- package/lib/core/locale.js +56 -0
- package/lib/core/memory-file.js +214 -0
- package/lib/core/migrate.js +97 -0
- package/lib/core/path-guard.js +43 -0
- package/lib/core/project-key.js +52 -0
- package/lib/core/render.js +228 -0
- package/lib/core/schema-runner.js +281 -0
- package/lib/core/schema-tools.js +794 -0
- package/lib/core/schema.js +493 -0
- package/lib/core/search.js +254 -0
- package/lib/core/settings.js +158 -0
- package/lib/core/store.js +408 -0
- package/lib/core/tool-transfer.js +249 -0
- package/lib/core/tool.js +602 -0
- package/lib/core/zip.js +226 -0
- package/lib/core/zstd-js.js +705 -0
- package/lib/core/zstd.js +103 -0
- package/lib/host/api.js +9 -0
- package/lib/host/capabilities.js +155 -0
- package/lib/host/compact-delete.js +76 -0
- package/lib/host/delete.js +136 -0
- package/lib/host/host-contract.js +73 -0
- package/lib/host/http-util.js +82 -0
- package/lib/host/lifecycle.js +66 -0
- package/lib/host/register.js +63 -0
- package/lib/host/routes/memories.js +102 -0
- package/lib/host/routes/options.js +46 -0
- package/lib/host/routes/sessions.js +194 -0
- package/lib/host/routes/tools.js +103 -0
- package/lib/host/summary.js +71 -0
- package/package.json +71 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dsh-seal-scripts contributors
|
|
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.en.md
ADDED
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
# dsh-seal-scripts
|
|
2
|
+
|
|
3
|
+
[简体中文](./README.md) | **English**
|
|
4
|
+
|
|
5
|
+
> Seal the scripts that worked. Keep what compaction threw away.
|
|
6
|
+
|
|
7
|
+
[](https://github.com/gosutry/dsh-seal-scripts)
|
|
8
|
+
[](./LICENSE)
|
|
9
|
+
[](https://nodejs.org)
|
|
10
|
+
[](https://github.com/deepseek-ai/dsh)
|
|
11
|
+
[](./package.json)
|
|
12
|
+
|
|
13
|
+
**Sealed scripts are the point of this plugin.** A command chain that just worked is sealed on the spot into an executable tool script: a directory, a manifest, one line in the system prompt. Next time it runs with a single sentence — no re-deriving commands, no rewriting the script, no asking you to repeat yourself.
|
|
14
|
+
|
|
15
|
+
**Reviews are the base layer.** When DSH compacts the context, the shadowed transcript is written to disk as a review file, decays by calendar day, and is injected into context; when details matter, the model reads the original back from a clue. Reviews are also the raw material for sealing a workflow from an earlier session.
|
|
16
|
+
|
|
17
|
+
## Contents
|
|
18
|
+
|
|
19
|
+
- [Features](#features)
|
|
20
|
+
- [Install](#install)
|
|
21
|
+
- [Quick start](#quick-start)
|
|
22
|
+
- [Sealed scripts](#sealed-scripts)
|
|
23
|
+
- [Reviews](#reviews-and-context-memory)
|
|
24
|
+
- [Configuration](#configuration)
|
|
25
|
+
- [Settings page](#settings-page)
|
|
26
|
+
- [Data and backup](#data-and-backup)
|
|
27
|
+
- [Compatibility](#compatibility-and-degradation)
|
|
28
|
+
- [Known limitations](#known-limitations)
|
|
29
|
+
- [Development](#development)
|
|
30
|
+
|
|
31
|
+
## Features
|
|
32
|
+
|
|
33
|
+
**Sealed scripts**
|
|
34
|
+
|
|
35
|
+
- **One working chain → one tool script**: full script text, entry, args, steps, provenance and a per-file sha256, written in one go.
|
|
36
|
+
- **Present in the system prompt**: the tool list sits at the end of the prompt every turn (up to 24 entries), so the model knows what it can run.
|
|
37
|
+
- **Runs as written**: arguments travel as an argv array and never pass through a shell; the interpreter comes from the run field (bash / node / powershell / cmd).
|
|
38
|
+
- **Verifiable**: per-file sha256 is compared before running; a hand-edited script is refused unless you explicitly allow it.
|
|
39
|
+
- **Portable**: the whole set packs into a store-only zip; import previews before writing and rebuilds the index from the files on disk.
|
|
40
|
+
|
|
41
|
+
**Context reviews**
|
|
42
|
+
|
|
43
|
+
- **Written on compaction**: pure code, no model call; tool calls and their arguments are kept verbatim.
|
|
44
|
+
- **Four-level decay**: today original → next-day summary → diary → keyword index; reading it bumps one level and pins it.
|
|
45
|
+
- **Cross-workspace search**: this workspace → children → siblings → parents; outer rings need explicit permission.
|
|
46
|
+
- **Diary nudges**: while keywords or the diary are still empty the model is asked to finish them in one call; the nudge disappears once they are written.
|
|
47
|
+
|
|
48
|
+
**Engineering**
|
|
49
|
+
|
|
50
|
+
- Zero runtime dependencies, Node built-ins only. Chinese and English UI.
|
|
51
|
+
- A missing host capability disables that block only — no crash, no blank settings page.
|
|
52
|
+
- Plain-text data: copy `session-memory/` and you have a backup.
|
|
53
|
+
|
|
54
|
+
## Install
|
|
55
|
+
|
|
56
|
+
Add the package in the DSH plugin manager (package name, absolute local path, tarball, or Git URL):
|
|
57
|
+
|
|
58
|
+
~~~bash
|
|
59
|
+
# --profile is required (otherwise: required option "--profile" not specified)
|
|
60
|
+
dsh plugin --profile web add dsh-seal-scripts
|
|
61
|
+
|
|
62
|
+
# local directory: pnpm records it as a link dependency in that profile
|
|
63
|
+
dsh plugin --profile web add /path/to/dsh-seal-scripts
|
|
64
|
+
~~~
|
|
65
|
+
|
|
66
|
+
Or use Settings → Plugins → Add with a package name, absolute path, tarball, or Git URL. Restart the profile after installing.
|
|
67
|
+
|
|
68
|
+
Requirements:
|
|
69
|
+
|
|
70
|
+
- host `@deepseek-ai/dsh` `>=0.2.1-rc.2`, `<1.0.0` (peer dependency, not forced)
|
|
71
|
+
- Node `>=18` (without native zstd the built-in decoder takes over; functionality is unchanged)
|
|
72
|
+
|
|
73
|
+
After the restart, Settings shows **Tool (script) manager**.
|
|
74
|
+
|
|
75
|
+
## Quick start
|
|
76
|
+
|
|
77
|
+
1. **Open the master switch**: Settings → Tool (script) manager → Options → turn on **Auto review**. It is off by default; without it no review is created and cross-session sealing has no raw material.
|
|
78
|
+
2. **Run a chain end to end**: scrape a page, transcode, pack, connect over SSH — anything that really worked and that you will need again.
|
|
79
|
+
3. **Seal it**: ask the model to turn the steps above into a tool.
|
|
80
|
+
4. **Reuse it**: ask it to run `<id>`; add show me the commands first, do not run to preview.
|
|
81
|
+
|
|
82
|
+
A sample session (output is illustrative):
|
|
83
|
+
|
|
84
|
+
~~~text
|
|
85
|
+
You: turn that packaging flow into a tool
|
|
86
|
+
Model: (calls session_tool_create_write) installed tool script dsh-plugin-pack at .../toolSequence/dsh-plugin-pack
|
|
87
|
+
entry pack.sh, params source_dir out_dir; it enters the system prompt on the next assembly.
|
|
88
|
+
|
|
89
|
+
(new session)
|
|
90
|
+
You: run dsh-plugin-pack, the source dir is /sdcard/Download/dsh-seal-scripts-0.4.6
|
|
91
|
+
Model: (calls session_tool_call) exit 0, N files, sha256 matches the manifest
|
|
92
|
+
~~~
|
|
93
|
+
|
|
94
|
+
## Sealed scripts
|
|
95
|
+
|
|
96
|
+
### Why this is not a note
|
|
97
|
+
|
|
98
|
+
Models are good at writing markdown about a method, and the note cannot run. They are also good at rebuilding commands on the spot, slightly differently each time. The artifact here is the script itself: the lines that worked, stored byte for byte, argument order included.
|
|
99
|
+
|
|
100
|
+
### How to trigger it
|
|
101
|
+
|
|
102
|
+
| What you say | What happens | When to use |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| turn the steps above into a tool | seals the steps that just ran | same session, commands still in context |
|
|
105
|
+
| turn the workflow from an earlier session into a tool | reads review originals first with `session_tool_create_read` (every tool call and its arguments), then seals | new session, new machine, old history |
|
|
106
|
+
|
|
107
|
+
The chain must have worked. What gets stored is the version that ran, not a draft — editing after installing means re-sending the whole context.
|
|
108
|
+
|
|
109
|
+
### What gets created
|
|
110
|
+
|
|
111
|
+
~~~
|
|
112
|
+
$DSH_HOME/session-memory/toolSequence/
|
|
113
|
+
_index.json registry: id, title, purpose, entry, args, steps, per-file sha256
|
|
114
|
+
<id>/
|
|
115
|
+
toolScript.json manifest: full script text, docs, hashes, provenance (review file + line)
|
|
116
|
+
<script> the file that actually runs (.sh / .js .mjs .cjs / .ps1 / .bat .cmd)
|
|
117
|
+
README.md generated from the manifest at install time, for humans
|
|
118
|
+
<notes>.md read-only notes: pitfalls, paths, benchmarks (never executed)
|
|
119
|
+
_runs/ full logs of output that exceeded the cap
|
|
120
|
+
<id>.bak-<timestamp>/ previous directory kept on reinstall or import
|
|
121
|
+
~~~
|
|
122
|
+
|
|
123
|
+
### How the model learns about it
|
|
124
|
+
|
|
125
|
+
The end of the system prompt gains a toolSequence block: at most 24 entries, and the whole block (header + guide + entries) is capped at 1600 characters, one line each — `· id (title): purpose|entry <entry>|args <p1> <p2>`. After sealing you never have to remind the model that the tool exists.
|
|
126
|
+
|
|
127
|
+
When that list refreshes (option **When the list is refreshed**):
|
|
128
|
+
|
|
129
|
+
| Mode | Behaviour | Cost |
|
|
130
|
+
|---|---|---|
|
|
131
|
+
| Before a new session (default) | computed once at the first assembly, then fixed until the session ends | installing or removing a tool mid-session leaves the prompt unchanged |
|
|
132
|
+
| Live per session | computed every turn | one cache miss on the next message (the whole session is resent) |
|
|
133
|
+
|
|
134
|
+
Changing that mode refreshes every remembered session to the current list — so there is a defined way out of the current session does not see the new tool case.
|
|
135
|
+
|
|
136
|
+
### The three tools
|
|
137
|
+
|
|
138
|
+
| Tool | Purpose | Key arguments |
|
|
139
|
+
|---|---|---|
|
|
140
|
+
| `session_tool_create_write` | seal a chain | `toolScript{ id, title, purpose, entry, scripts[], docs[], params, steps, timeoutMs }`; `replace` overwrites |
|
|
141
|
+
| `session_tool_create_read` | read review originals (tool calls and results included), read-only | `file` or `date`+`nth`; `mode` = outline / raw / block; `cursor`, `chars` paging; `line`, `span` for one call |
|
|
142
|
+
| `session_tool_call` | run as written | `toolScript`, `step`, `args`, `stdin`, `cwd`, `dryRun`, `calls`, `stopOnError`, `allowDrift`, `timeoutMs`, `maxOutputBytes` |
|
|
143
|
+
|
|
144
|
+
- Calling `session_tool_call` without arguments lists every tool script.
|
|
145
|
+
- `dryRun: true` echoes the arguments and cwd without running.
|
|
146
|
+
- `calls: []` runs up to 20 entries in order, reporting exit code, duration, stdout and stderr per entry.
|
|
147
|
+
|
|
148
|
+
### Validation when sealing
|
|
149
|
+
|
|
150
|
+
| Item | Rule |
|
|
151
|
+
|---|---|
|
|
152
|
+
| `id` | starts with a lowercase letter, 2–41 chars, only `a-z0-9-` |
|
|
153
|
+
| file name | starts alphanumeric, no leading dot, no path separators, up to 61 chars |
|
|
154
|
+
| `run` vs extension | bash→`.sh`; node→`.js/.mjs/.cjs`; ps1→`.ps1`; cmd→`.bat/.cmd` |
|
|
155
|
+
| size | one script ≤ 64 KB; one tool script (scripts + docs) ≤ 512 KB |
|
|
156
|
+
| `title` / `purpose` | non-empty; purpose ≤ 600 bytes (it enters the prompt; display truncates at 80 chars) |
|
|
157
|
+
| `entry` / `steps` | must name files in `scripts`; entry defaults to the first script |
|
|
158
|
+
| `timeoutMs` | 1000–600000, default 120000 |
|
|
159
|
+
| docs | must be `.md`, may not be called `README.md`, no duplicates |
|
|
160
|
+
| script body | non-empty; must not contain `<!--ovr:` (it would break review markers) |
|
|
161
|
+
| same id exists | refused without `replace`; the error quotes the first 12 hex chars of the manifest sha256 |
|
|
162
|
+
|
|
163
|
+
`steps` only declares pipeline order and never runs anything by itself; `params` only declares argv order and names are not validated.
|
|
164
|
+
|
|
165
|
+
### Execution semantics
|
|
166
|
+
|
|
167
|
+
| Item | Value |
|
|
168
|
+
|---|---|
|
|
169
|
+
| interpreter | bash→`bash` from PATH; node→current `process.execPath`; ps1→Windows PowerShell (or `pwsh` elsewhere); cmd→`%ComSpec% /d /c` (falls back to `sh` off Windows) |
|
|
170
|
+
| argv | interpreter arguments + absolute script path + your args, passed as an array, never through a shell |
|
|
171
|
+
| cwd | `workspace` (session workspace), `toolScript` (the script directory), or an absolute path inside either |
|
|
172
|
+
| environment | inherits `process.env`, plus `TOOL_NAME`, `TOOL_SCRIPT`, `TOOL_ROOT`, `DSH_HOME` |
|
|
173
|
+
| timeout | 120 s by default, 600 s maximum; SIGTERM → 2 s → SIGKILL; process group on POSIX, `taskkill /T /F` on Windows |
|
|
174
|
+
| output | 64 KB default, 1 MB maximum, stdout and stderr share the budget; overflow goes in full to `_runs/` and the reply carries the head plus the file path |
|
|
175
|
+
| result | `{ exitCode, signal, timedOut, stdout, stderr, truncated, spill }`; success is not judged for the caller |
|
|
176
|
+
| argument count | more arguments than `params` declares fails before running (they would shift); fewer is fine |
|
|
177
|
+
| drift | sha256 is compared first; mismatch refuses, `allowDrift: true` allows it and marks the result |
|
|
178
|
+
| containment | only files inside the tool script directory run; a script name missing from the manifest is refused |
|
|
179
|
+
|
|
180
|
+
### Import / export
|
|
181
|
+
|
|
182
|
+
- **Export**: Sealed tools tab → Export. Packs `toolSequence.zip` (store, no compression) straight into the current session workspace and returns the real path — no browser download. Over 24 MB is refused.
|
|
183
|
+
- **Import**: pick a zip → `dryRun` preview of what will be installed, overwritten and skipped → confirm to write. An existing directory is kept as `.bak-<timestamp>`.
|
|
184
|
+
- `_index.json` inside the package is not trusted; the index is rebuilt from the files on disk. `_runs`, backup directories, escaping paths and invalid ids are skipped.
|
|
185
|
+
- Limits: 64 MB per entry, 128 MB total; zip64 and encrypted archives are not supported.
|
|
186
|
+
|
|
187
|
+
## Reviews and context memory
|
|
188
|
+
|
|
189
|
+
The problem reviews solve: after compaction the earlier detail is normally gone. Now the shadowed transcript is kept as a file and can be read back when it matters.
|
|
190
|
+
|
|
191
|
+
### When a review is created
|
|
192
|
+
|
|
193
|
+
- Only on **compaction**: when DSH compacts, the shadowed events are written as one review file (summary + original + an empty diary section).
|
|
194
|
+
- Tool calls and their arguments are kept verbatim, never truncated — once the log is gone, this copy is the only original.
|
|
195
|
+
- Spawned subagent sessions produce nothing; with Auto review off, not even detection happens.
|
|
196
|
+
- Delete + review in the Sessions tab triggers one on purpose: compact, wait for the review to land, confirm a new one appeared, and only then delete. Any failed step aborts the deletion.
|
|
197
|
+
|
|
198
|
+
### Four levels
|
|
199
|
+
|
|
200
|
+
| Day | Level | What the model sees |
|
|
201
|
+
|---|---|---|
|
|
202
|
+
| the day of compaction | 3 | the original dialogue (tool calls and errors filtered out) |
|
|
203
|
+
| day 2 | 2 | the compaction summary |
|
|
204
|
+
| days 3–28 | 1 | the diary (written by the model) |
|
|
205
|
+
| day 29 and later | 0 | keywords plus the file name, as an index |
|
|
206
|
+
|
|
207
|
+
Days are local calendar days; the hour does not matter. When you point out a misremembered detail, the model reads the original back; only reading the workspace own copy bumps and pins the level (0→1, 1→2), and a pinned review stops decaying. Reviews of child, sibling and parent workspaces are read-only and do not change levels.
|
|
208
|
+
|
|
209
|
+
### Cross-workspace search
|
|
210
|
+
|
|
211
|
+
The unit is a workspace review folder, not a filesystem walk. Order: this workspace → its children (deepest first) → siblings (deepest first) → the parent → the parent siblings → their level-1, level-2 children, and so on. Outer rings are only read when `allowOuter` is true; otherwise the count is reported.
|
|
212
|
+
|
|
213
|
+
Granularity: keywords first, then summary, then original; the block that matches is returned whole. Within a workspace, hits sort by level, then matched terms, then compaction time.
|
|
214
|
+
|
|
215
|
+
### Diary nudges
|
|
216
|
+
|
|
217
|
+
At level 1 or 0 the model sees the diary or the keywords — both written by the model itself. While either is empty it is asked to finish, in one of two places:
|
|
218
|
+
|
|
219
|
+
- **In context** (default): appended to the review text in the same message; once written the text changes, the message is replaced and the nudge disappears.
|
|
220
|
+
- **In the system prompt**: supplied as a trailing prompt section. Compliance differs between the two; pick the one that works for you.
|
|
221
|
+
|
|
222
|
+
### Injection and preview
|
|
223
|
+
|
|
224
|
+
- Reviews enter the context every turn, oldest first.
|
|
225
|
+
- The preview box on the Reviews tab runs the same assembly function as the real injection: what you see is what that turn receives (selecting one review shows only that one).
|
|
226
|
+
- If assembly fails (a review too large) it does not silently become no reviews; the model gets a diagnostic: how many, total size, the largest file, what to do.
|
|
227
|
+
|
|
228
|
+
### How it relates to sealing
|
|
229
|
+
|
|
230
|
+
In one line: reviews are the raw-material store for sealing. Across sessions and machines the model uses `session_tool_create_read` to find the original commands and arguments, then `session_tool_create_write` to seal them. You do not need to tune the review side — turn on Auto review and keep the defaults.
|
|
231
|
+
|
|
232
|
+
## Configuration
|
|
233
|
+
|
|
234
|
+
Stored in `$DSH_HOME/session-memory/_options.json`; changes apply immediately and are shared by all workspaces.
|
|
235
|
+
|
|
236
|
+
| Field | Values | Default | Meaning |
|
|
237
|
+
|---|---|---|---|
|
|
238
|
+
| `autoReviewEnabled` | bool | `false` | master switch: no reviews, no injection, no review tools when off |
|
|
239
|
+
| `injectEnabled` | bool | `true` | recall injection and diary nudges (does not cover the tool list) |
|
|
240
|
+
| `toolListEnabled` | bool | `true` | inject the toolSequence block and install/remove the three `session_tool_*` tools |
|
|
241
|
+
| `toolListRefresh` | `newSession` / `realtime` | `newSession` | when the list is recomputed |
|
|
242
|
+
| `fullLoad` | bool | `false` | keep tool calls and errors at level 3 (warned: full re-injection after every compaction) |
|
|
243
|
+
| `reminderChannel` | `context` / `system` | `context` | diary nudge inside the review text or as a prompt section |
|
|
244
|
+
| `stopLowering` | bool | `false` | every review keeps its recorded level; no daily decay |
|
|
245
|
+
| `loadLevel` | `follow` / 0–3 | `follow` | force a level at load time (does not change the recorded depth) |
|
|
246
|
+
|
|
247
|
+
Two couplings: with Auto review off, the effective `injectEnabled` is always false (the stored value is untouched); with Stop lowering on, Load level falls back to follow.
|
|
248
|
+
|
|
249
|
+
## Settings page
|
|
250
|
+
|
|
251
|
+
Settings → **Tool (script) manager**, four tabs:
|
|
252
|
+
|
|
253
|
+
| Tab | Contents |
|
|
254
|
+
|---|---|
|
|
255
|
+
| Sealed tools (shown as `toolList` in the English UI) | tool path, the prompt text about to be injected, "Inject toolSequence list" toggle and refresh mode, import / export |
|
|
256
|
+
| Sessions | sessions grouped by workspace (title, archived badge), Delete / Delete + review, both confirmed |
|
|
257
|
+
| Reviews | calendar range filter, review list with depth badges, injection preview, delete one review |
|
|
258
|
+
| Options | four groups: Sealed tools, Recall injection, Review content, Review depth |
|
|
259
|
+
|
|
260
|
+
## Data and backup
|
|
261
|
+
|
|
262
|
+
~~~
|
|
263
|
+
$DSH_HOME/session-memory/
|
|
264
|
+
_options.json options
|
|
265
|
+
_locale.json language (zh / en)
|
|
266
|
+
_health.json last success/failure per workspace
|
|
267
|
+
<workspace key>/
|
|
268
|
+
<stamp>-<id>.md review text (the single source of truth, plain text, readable and searchable)
|
|
269
|
+
<same name>.json load cache for that review (rebuilt from file time if lost)
|
|
270
|
+
_assembly.json.migrated-* leftover of the old single-file index (never auto-deleted)
|
|
271
|
+
toolSequence/ tool scripts (machine level, shared by all workspaces)
|
|
272
|
+
~~~
|
|
273
|
+
|
|
274
|
+
- The workspace key uses the same encoding as the host `sessions/` folders: `/` becomes `-`, non-ASCII becomes `~XXXX`.
|
|
275
|
+
- Backup: copy the whole `session-memory/`. Migration: put it at the same place on the new machine and install the same plugin.
|
|
276
|
+
- Uninstalling the plugin deletes no data.
|
|
277
|
+
|
|
278
|
+
## Compatibility and degradation
|
|
279
|
+
|
|
280
|
+
Missing host capabilities disable the matching block; everything else keeps working (the settings page lists what is missing):
|
|
281
|
+
|
|
282
|
+
| Missing | Effect |
|
|
283
|
+
|---|---|
|
|
284
|
+
| `systemPrompt.context` | recall injection off |
|
|
285
|
+
| `systemPrompt.section` | diary nudge section and toolSequence block do not appear |
|
|
286
|
+
| `tools.register` | none of the five tools is installed |
|
|
287
|
+
| `webServer.register` | the settings endpoints are not installed |
|
|
288
|
+
| `agents.create` / `resume` | only Delete live session / Delete + review are off |
|
|
289
|
+
|
|
290
|
+
Session logs are multi-frame zstd and are split by frame header before decoding; when `zlib.zstdDecompressSync` is absent the built-in decoder takes over, so Node 18 still reads titles.
|
|
291
|
+
|
|
292
|
+
## Known limitations
|
|
293
|
+
|
|
294
|
+
- Tool scripts have **no delete or edit in the UI**: delete by reinstalling (a `.bak-` is kept) or by removing the directory — the registry keeps the entry and later runs report that the directory is missing.
|
|
295
|
+
- `steps` do not chain automatically; use `calls` for a sequence.
|
|
296
|
+
- Reviews are created on compaction only; the Reviews tab has a calendar filter and no full-text search.
|
|
297
|
+
- Subagent sessions produce no reviews and no diary nudges.
|
|
298
|
+
- Import and export cover tool scripts only, not reviews; copy `session-memory/` for those.
|
|
299
|
+
|
|
300
|
+
## Development
|
|
301
|
+
|
|
302
|
+
~~~
|
|
303
|
+
index.js plugin entry (exports name / apply / inject only)
|
|
304
|
+
cordis.patch.yml inserts the plugin into the host loader
|
|
305
|
+
lib/core/ host-side logic: storage, decay, tool definitions, script runner
|
|
306
|
+
lib/host/ host service adapters: 12 HTTP endpoints, capability probe, session delete
|
|
307
|
+
lib/client.js settings page (React, registered at settings.section)
|
|
308
|
+
~~~
|
|
309
|
+
|
|
310
|
+
- Zero runtime dependencies, ESM, Node `>=18`.
|
|
311
|
+
- Tests: `node --test test/*.test.mjs` (the test directory is not part of the published package).
|
|
312
|
+
- Packaging: `npm pack`; the publish whitelist is the `files` field of `package.json`.
|
|
313
|
+
|
|
314
|
+
## License
|
|
315
|
+
|
|
316
|
+
[MIT](./LICENSE) © dsh-seal-scripts contributors
|
|
317
|
+
|
|
318
|
+
Repository: <https://github.com/gosutry/dsh-seal-scripts> · Issues: <https://github.com/gosutry/dsh-seal-scripts/issues>
|