@deepseek-ai/dsh-agent-presets 0.1.1-rc.2 → 0.1.2-alpha.2
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/README.i18n.yaml +2 -2
- package/README.md +127 -88
- package/README.zh.md +131 -92
- package/lib/index.js +1096 -451
- package/lib/invariant.js +1095 -432
- package/lib/typert.host.d.ts +3 -0
- package/lib/typert.host.js +845 -0
- package/lib/typert.remote-client.d.ts +34 -0
- package/lib/typert.remote-client.js +194 -0
- package/lib/types/authoring.d.ts +10 -25
- package/lib/types/authoring.js +32 -39
- package/lib/types/composition-inventory.d.ts +81 -0
- package/lib/types/composition-inventory.js +127 -0
- package/lib/types/discovery.d.ts +39 -6
- package/lib/types/discovery.js +157 -12
- package/lib/types/display.d.ts +36 -0
- package/lib/types/display.js +30 -0
- package/lib/types/index.d.ts +113 -16
- package/lib/types/index.js +702 -426
- package/lib/types/mount.d.ts +10 -2
- package/lib/types/mount.js +61 -16
- package/lib/types/preset.d.ts +9 -31
- package/lib/types/preset.js +0 -34
- package/lib/types/session.d.ts +15 -20
- package/lib/types/session.js +15 -19
- package/lib/types/specifier.d.ts +51 -0
- package/lib/types/specifier.js +41 -0
- package/lib/types/types.d.ts +74 -1
- package/package.json +53 -29
- package/presets/cordis/agent.cordis.yml +268 -0
- package/presets/cordis/preset.yml +3 -0
- package/presets/cordis/skills/cordis-plugin-development/SKILL.md +420 -0
- package/presets/cordis/skills/editing-cordis-compositions/SKILL.md +165 -0
- package/presets/minimal/agent.cordis.yml +88 -0
- package/presets/minimal/preset.yml +3 -0
- package/presets/ptc/agent.cordis.yml +268 -0
- package/presets/ptc/preset.yml +3 -0
- package/presets/standard/agent.cordis.yml +257 -0
- package/presets/standard/preset.yml +3 -0
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/preset/agent-presets/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 5ddc40cc28a28429522ed324e114134cb59210ff
|
|
6
|
+
README.zh.md: bdb187e7f7aeb9c529bc073de85ec1bb2d3b463a
|
package/README.md
CHANGED
|
@@ -1,142 +1,162 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: "Per-session agent composition from preset cordis.yml files, for users and maintainers choosing, configuring, or debugging agent presets."
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @deepseek-ai/dsh-agent-presets
|
|
2
7
|
|
|
3
8
|
English | [中文](README.zh.md)
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
## Summary
|
|
6
11
|
|
|
7
|
-
|
|
12
|
+
`dsh-agent-presets` composes each agent session from one preset: a directory holding a single `agent.cordis.yml` that names the plugins the session runs with. A session that names a preset gets that preset's tools, prompt sections, and skills, while every other session keeps its own, so one process can run several differently composed agents at once. The package maintains the preset roster: it lists every preset the configured roots supply — shipped ones and your own under `<dshHome>/.agent-presets` — shows a reason when a preset cannot start a session, and lets you create new presets by copying existing ones. The default preset is a setting you can override per deployment or per user, and a session can switch to a different preset only while it has produced nothing. A preset is as privileged as the plugins it names, so a preset you author carries the same trust as shell access.
|
|
8
13
|
|
|
9
|
-
##
|
|
14
|
+
## Table of Contents
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
- [Use this package](#use-this-package)
|
|
17
|
+
- [Understand the implementation](#understand-the-implementation)
|
|
18
|
+
- [Further Exploration](#further-exploration)
|
|
19
|
+
- [Model Experience](#model-experience)
|
|
20
|
+
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
|
21
|
+
- [Dev Note](#dev-note)
|
|
12
22
|
|
|
13
|
-
|
|
14
|
-
- `ctx.agentPresets.list(): Promise<AgentPreset[]>` Every preset the configured roots currently supply, earlier root winning a duplicate id; broken presets included, each carrying its reason.
|
|
15
|
-
- `ctx.agentPresets.resolve(id?): Promise<AgentPreset>` One preset by id, defaulting to `defaultId`. Throws naming the available ids when no root supplies it. A broken preset resolves — deleting, reading, and reporting one all need the row.
|
|
16
|
-
- `ctx.agentPresets.mount(agentCtx, id?): Promise<AgentPreset>` Compose one agent from a preset — ensure its standing mount (single-flight) and parent the agent's scope key to it — returning the preset for the caller to record. Refuses a broken preset up front with its discovery-reported reason, so every unloadable shape fails the same way before the loader is involved.
|
|
17
|
-
- `ctx.agentPresets.composeFrom(agentCtx, parentCtx): string | undefined` Join one agent to the standing composition another already runs on, returning the preset id joined — `undefined` when the parent joined none, which is the rosterless deployment and not an error. A bind rather than a mount, so it is synchronous and has no composition failure mode; it still rejects a caller error (an unscoped context, or an agent that already joined).
|
|
18
|
-
- `ctx.agentPresets.composedPreset(agentCtx): string | undefined` The preset one LIVE agent runs on, read from its scope chain rather than from its session — the only answer available for an agent whose durable header is still being built.
|
|
19
|
-
- `ctx.agentPresets.recompose(agentCtx, id): Promise<AgentPreset>` Re-link one agent to a different preset's standing composition. Valid only while the agent has produced nothing — **the caller owns that check**; the new mount is ensured before the link moves, so a failure leaves the agent as it was. Refuses a broken preset like `mount()`.
|
|
20
|
-
- `ctx.agentPresets.standingKeyFor(id?): Promise<ScopeKey>` The standing scope key a host reader with no agent (a cold transcript read) resolves preset registrations in; ensures the mount without starting an agent, session, or turn. Refuses a broken preset like `mount()`.
|
|
21
|
-
- `ctx.agentPresets.roots: readonly PresetRoot[]` The roots this roster scans — every configured root in order, then the derived harness-home root. Not `config.roots`: read this to answer whether a roster is composed at all, so one derivation decides it.
|
|
22
|
-
- `ctx.agentPresets.authorable: boolean` Whether any of those roots has `user` trust, and therefore whether a preset can be created at all.
|
|
23
|
-
- `ctx.agentPresets.read(id): Promise<string>` One preset's composition text, exactly as stored.
|
|
24
|
-
- `ctx.agentPresets.copy(from, id, name?): Promise<void>` Create a locally authored preset by copying an existing one's whole directory — the only authoring write. No composition text crosses this seam, so a copy is exactly as loadable as its source; the copied metadata keeps the source's description but never its name or roster order, and `name` (or the id fallback) is what distinguishes the rows.
|
|
25
|
-
- `ctx.agentPresets.remove(id): Promise<void>` Delete a locally authored preset; joined sessions keep their standing mount. Clears the user default when it named the preset just deleted: storing a default that does not exist yet is deliberate, but one this call removed will never be supplied again and would fail every session created without an explicit pick.
|
|
23
|
+
-----
|
|
26
24
|
|
|
27
|
-
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## Use this package
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
Mount this package in a composition that should give each agent session its own tools, prompt sections, and skills from a preset file. Every session names a preset — explicitly or through the configured default — and is composed from it; without the package, sessions fall back to whatever the host composition mounts.
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
### What a preset gives a session
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
A session composed from a preset runs the plugins that preset's `agent.cordis.yml` names: its tools, prompt sections, and skills. Sessions joined to the same preset share one installed composition, and each session's state stays separate. A child agent (subagent) joins its parent's composition, so it sees the same tools and prompt sections as the agent that spawned it.
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
The presets you can choose from come from two places: the presets shipped inside this package under `presets/`, and your own presets under `<dshHome>/.agent-presets`. The picker shows each preset's display name and description; a preset whose composition cannot load is listed with the reason rather than hidden, so you can see what to fix or delete.
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
### Minimal configuration
|
|
38
37
|
|
|
39
|
-
The
|
|
38
|
+
The plugin needs a `default` preset id and scans `roots` for presets:
|
|
40
39
|
|
|
41
|
-
|
|
40
|
+
```yaml
|
|
41
|
+
- name: '@deepseek-ai/dsh-agent-presets'
|
|
42
|
+
config:
|
|
43
|
+
default: standard
|
|
44
|
+
roots:
|
|
45
|
+
- path: ~/company-presets
|
|
46
|
+
trust: system
|
|
47
|
+
```
|
|
42
48
|
|
|
43
|
-
|
|
49
|
+
| Field | Default | Meaning |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| `default` | required | Preset id composed when a session names none |
|
|
52
|
+
| `roots` | `[]` | Scanned directories in precedence order; each supplies `path` (a leading `~` expands) and `trust` (defaults to `user`) |
|
|
53
|
+
| `includeShippedRoot` | `true` | Prepend the package's bundled presets as a `system` root before every configured root |
|
|
54
|
+
| `includeUserRoot` | `true` | Append `<dshHome>/.agent-presets` as a `user` root, after every configured root |
|
|
44
55
|
|
|
45
|
-
The
|
|
56
|
+
The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-agent-presets) is the exhaustive source for every accepted field and its JSDoc.
|
|
46
57
|
|
|
47
|
-
|
|
58
|
+
The shipped root is prepended before every configured root, so the built-in set remains available and wins duplicate ids even when a patch replaces the roster configuration. `includeShippedRoot: false` drops that built-in set for deployments that supply all presets themselves. `includeUserRoot: false` drops the derived writable root; tests that pin an exact roster disable both derived roots.
|
|
48
59
|
|
|
49
|
-
|
|
60
|
+
### Choosing the default preset
|
|
50
61
|
|
|
51
|
-
The
|
|
62
|
+
The `default` config sets the deployment default. When a settings provider is composed, this plugin registers the `agent-presets` namespace with `config.default` as its base, so a user document layers a per-user default over the deployment's:
|
|
52
63
|
|
|
53
|
-
|
|
64
|
+
```yaml
|
|
65
|
+
agent-presets:
|
|
66
|
+
default: minimal
|
|
67
|
+
```
|
|
54
68
|
|
|
55
|
-
|
|
69
|
+
The value is read when a session is created, so a changed default affects only sessions created afterwards; running sessions stay on the preset they were composed from. Clearing the user field re-inherits the composition default.
|
|
56
70
|
|
|
57
|
-
|
|
58
|
-
- **An id that is already taken.** A copy never overwrites: any root supplying the id refuses it (a user directory named like a shipped preset would be shadowed by it), and a directory occupying the name on disk refuses it too. Discovery lists such a directory as a broken preset, so the refusal's way out — delete it — is on the same page that reported it.
|
|
59
|
-
- **An unknown source.** The source may be any trust — copying a shipped preset is the primary case — but it must exist; a failed copy rolls its half-made directory back rather than leaving one discovery cannot see.
|
|
71
|
+
### Authoring presets
|
|
60
72
|
|
|
61
|
-
|
|
73
|
+
Authoring is copy-only: creating a preset copies an existing preset's whole directory — composition, display metadata, skill directories, assets — into the first `user` root. The copy keeps the source's description but gets its own id and an optional display name, so no caller supplies composition text and a copy grants nothing the roster did not already carry. After creation, everything happens in the preset's own files.
|
|
62
74
|
|
|
63
|
-
|
|
75
|
+
A copy is refused when the id is not `[a-z0-9][a-z0-9-]*` (the id becomes a directory name), when the id is already taken (a copy never overwrites), or when the source is unknown. Deleting removes only locally authored presets; presets that ship with the deployment are not removable. A session already running on a deleted preset keeps running on it.
|
|
64
76
|
|
|
65
|
-
|
|
77
|
+
### Switching a session's preset
|
|
66
78
|
|
|
67
|
-
A
|
|
79
|
+
A session can switch to a different preset only while it has produced nothing — no messages or tool calls. After that, the composition is fixed for the session's life, because swapping tools mid-conversation would leave logged tool calls the new composition cannot make. A committed switch emits `tools/change` because the resolved tool set changed without a registry edit. The switch is also recorded in the session log, so a resumed or forked session rebuilds under the composition it ran.
|
|
68
80
|
|
|
69
|
-
|
|
81
|
+
### Failures and recovery
|
|
70
82
|
|
|
71
|
-
|
|
83
|
+
A preset whose composition is missing, unparsable, not a list of named plugin rows, or naming a module that cannot be resolved is listed as broken with a reason naming the rows at fault; composing such a preset is refused up front, so a session never starts half-composed. What survives to session creation is a row whose module loads and then refuses — a plugin that throws, or one waiting for a service the composition never supplies — which fails the creation and rolls it back, naming every failed row including those inside a group. Fix the preset's file or delete it, then retry.
|
|
72
84
|
|
|
73
|
-
|
|
85
|
+
-----
|
|
74
86
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
description: 仅提供持久 bash 与 str_replace_editor 的双工具编码 Agent。
|
|
78
|
-
```
|
|
87
|
+
<a id="understand-the-implementation"></a>
|
|
88
|
+
## Understand the implementation
|
|
79
89
|
|
|
80
|
-
|
|
90
|
+
<details>
|
|
91
|
+
<summary>Implementation internals — click to expand</summary>
|
|
81
92
|
|
|
82
|
-
|
|
93
|
+
This section explains the design behind the roster and the standing mount; observable behavior is fully covered in [Use this package](#use-this-package).
|
|
83
94
|
|
|
84
|
-
|
|
95
|
+
### Design philosophy
|
|
85
96
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
| `includeUserRoot` | `true` | Append `<dshHome>/.agent-presets` as a `user` root, after every configured root |
|
|
97
|
+
- **One standing composition per preset.** A preset is mounted once per process under a standing scope; agents join by parenting their scope key to the mount, so the mount's registrations and listeners cover every joined agent and no sibling preset's.
|
|
98
|
+
- **Generations keyed on the composition file.** The mount records the composition file's stamp (mtime and size); a session that finds the stamp stale starts the next generation, while sessions already joined keep the generation they run on — a running session outlives its file changing or disappearing.
|
|
99
|
+
- **The preset file is an input, never a persistence target.** The mounted subtree overrides `write()` as a no-op, so a loader-initiated write-back never rewrites a shared preset file.
|
|
100
|
+
- **Discovery owns health.** A directory whose composition is missing or unloadable is a broken roster row with a reason, not a skip — a skipped directory would still occupy its id while no surface shows anything to delete.
|
|
91
101
|
|
|
92
|
-
|
|
102
|
+
### Source map
|
|
93
103
|
|
|
94
|
-
|
|
104
|
+
| File | Role |
|
|
105
|
+
|---|---|
|
|
106
|
+
| [`src/index.ts`](src/index.ts) | Service entry: `Config` schema, settings namespace, roster API, standing-mount coordination |
|
|
107
|
+
| [`src/discovery.ts`](src/discovery.ts) | Filesystem discovery: root scanning, health checks, id validation, ordering |
|
|
108
|
+
| [`src/composition-inventory.ts`](src/composition-inventory.ts) | Flattened composition rows for plugin-listing surfaces: file reads with evaluated disabled gates, mount reads with fiber states |
|
|
109
|
+
| [`src/preset.ts`](src/preset.ts) | Vocabulary: preset id rule, `AgentPreset` and `PresetRoot`, error types |
|
|
110
|
+
| [`src/mount.ts`](src/mount.ts) | Subtree mounting, host base-URL handling, mount audit, `write()` suppression |
|
|
111
|
+
| [`src/authoring.ts`](src/authoring.ts) | Copy/delete/read of locally authored presets, permission tightening |
|
|
112
|
+
| [`src/metadata.ts`](src/metadata.ts) | `preset.yml` display metadata |
|
|
113
|
+
| [`src/session.ts`](src/session.ts) | `agent-preset/selected` event and the `agentPreset` Session projection |
|
|
114
|
+
| [`src/types.ts`](src/types.ts) | Client-safe wire payloads and cordis event declaration |
|
|
115
|
+
| [`src/invariant.ts`](src/invariant.ts) | Invariant companion: post-mount service-leak recheck, unjoined-agent failure |
|
|
95
116
|
|
|
96
|
-
|
|
117
|
+
### The standing mount
|
|
97
118
|
|
|
98
|
-
|
|
119
|
+
`ensureStanding` keeps one pending promise per preset id, single-flight, so two agents racing the first use of a preset share one composition. A settled failure is removed so a later session retries a preset whose file has been fixed. The mount runs in the roster service's own untraced context — a subtree minted from a traced context would resolve services through the caller's shadow fiber — so it survives every agent and unwinds only with whole-tree teardown. `serviceForAgent` reads an agent's instance of a service its preset mounted behind an `isolate` realm, which is otherwise invisible outside the group.
|
|
99
120
|
|
|
100
|
-
|
|
121
|
+
### The composition inventory
|
|
101
122
|
|
|
102
|
-
|
|
123
|
+
`compositionInventory()` answers plugin-listing surfaces with each preset's flattened rows beside its roster identity (id, trust, display name, default marking): a preset with a live standing mount — matched within this runtime's own root, so a second Cordis runtime in the same process never answers for it — answers from its newest generation's Loader entries, even when its file has since broken, because the mount is what sessions run and the broken verdict applies only to a preset nothing composed; one never composed since boot answers from its composition file with `!!js` disabled gates evaluated against the Loader context, so both answers reflect the same host. Reading never mounts a preset — a settings page listing every composition activates none of them. A gate the evaluator refuses stays `'conditional'`, and a file that stopped reading as a composition between discovery's health verdict and the row read is reported broken with the raced reason rather than dropped. The `./display` subpath exports the `presetDisplayText` fold mapping shipped preset ids to their dictionary copy keys; it has no imports, browser bundles inline it, and it is the one home for which shipped id carries which copy.
|
|
103
124
|
|
|
104
|
-
### The
|
|
125
|
+
### The mount audit
|
|
105
126
|
|
|
106
|
-
|
|
127
|
+
A directly-plugged subtree is absent from `ctx.loader.entries()`, so no boot audit covers it; `mountPreset` proves the result usable itself and rejects three shapes: an unscoped target (the preset's tools would register globally), a row still waiting for a service the composition never supplies, and a row that published a service into the root realm (process-global, so the second preset publishing the same name collides). The invariant companion re-checks the last rule on every service notification, because a row publishing from a timer or an asynchronous continuation would escape the one-shot audit.
|
|
107
128
|
|
|
108
|
-
|
|
109
|
-
agent-presets:
|
|
110
|
-
default: minimal
|
|
111
|
-
```
|
|
129
|
+
### Authoring mechanics
|
|
112
130
|
|
|
113
|
-
|
|
131
|
+
A copy dereferences symlinks so it is self-contained, re-tightens the tree to owner-only (`0o600` files keeping their owner-execute bit, `0o700` directories), and creates the root on first copy. The copied `preset.yml` is rewritten: the source's description is kept for the author to edit, its name and roster `order` dropped, so the roster keeps distinguishing the copy from its source. Removal refuses presets that ship with the deployment and clears a user default that named the preset just deleted.
|
|
114
132
|
|
|
115
|
-
|
|
133
|
+
### The session record
|
|
116
134
|
|
|
117
|
-
|
|
135
|
+
The creation header names the preset a session started with; the `agentPreset` Session projection names the preset it runs. A switch appends an `agent-preset/selected` event after the swap commits because the preset decides the tool schemas and prompt sections the model sees. The service re-emits that committed fact as the unscoped cordis event `agent-preset/selected(sessionId, agentPreset)`. Reconstruction consumes the projection, which starts from the creation header and applies the newest selection; it never folds the log independently.
|
|
118
136
|
|
|
119
|
-
|
|
137
|
+
</details>
|
|
120
138
|
|
|
121
|
-
|
|
139
|
+
-----
|
|
122
140
|
|
|
123
|
-
|
|
141
|
+
<a id="further-exploration"></a>
|
|
142
|
+
## Further Exploration
|
|
124
143
|
|
|
125
|
-
|
|
144
|
+
Read these pages when the package-level contract is not enough; they move from the composition model to the scope and prompt mechanics the mount relies on, and to the decision evidence.
|
|
126
145
|
|
|
127
|
-
|
|
146
|
+
- [persona package](../persona/README.md) — the composable row a preset mounts to give a session its own persona.
|
|
147
|
+
- [Scope subsystem](../../../docs/subsystems/scope.md) — scope keys and the parent chain agents join through.
|
|
148
|
+
- [System prompt subsystem](../../../docs/subsystems/system-prompt.md) — how preset prompt sections register and assemble.
|
|
149
|
+
- [Session package map](../../session/README.md) — the durable session record a preset switch appends to.
|
|
150
|
+
- [Generated configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-agent-presets) — every accepted config field and its source declaration.
|
|
151
|
+
- [Per-session agent presets note](../../../.agents/notes/implemented/architecture/2026-08-03-per-session-agent-presets.md) — design rationale and alternatives.
|
|
152
|
+
- [Per-preset standing mounts note](../../../.agents/notes/implemented/architecture/2026-08-08-per-preset-standing-mounts.md) — why the mount is standing and shared.
|
|
128
153
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
The mounted subtree therefore overrides `write()` as a no-op. Nothing in this package writes a composition; authoring one is a separate, explicit operation.
|
|
132
|
-
|
|
133
|
-
## Trust
|
|
134
|
-
|
|
135
|
-
Presets are compositions, so a preset is exactly as privileged as the plugins it names. A `user` preset — authored by a person or by an agent — carries the same trust as shell access; the `trust` field exists so consumers can present that difference, not to enforce it.
|
|
154
|
+
-----
|
|
136
155
|
|
|
156
|
+
<a id="model-experience"></a>
|
|
137
157
|
## Model Experience
|
|
138
158
|
|
|
139
|
-
Indirectly, through the plugins a standing composition
|
|
159
|
+
Indirectly, through the plugins a preset's standing composition installs, which own every tool schema, prompt section, and skill the preset makes visible to the agents joined to it.
|
|
140
160
|
|
|
141
161
|
#### KV Cache effect
|
|
142
162
|
|
|
@@ -144,11 +164,30 @@ Prefix-stable for the life of an agent: a composition is installed once, before
|
|
|
144
164
|
|
|
145
165
|
## Known Limitations and Deferred Work
|
|
146
166
|
|
|
147
|
-
|
|
148
|
-
|
|
167
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
These limits define when the roster is a poor fit or needs special operational care. They are current package constraints, not a general composition comparison or a task backlog.
|
|
171
|
+
|
|
172
|
+
- **A preset outside the writable root is discoverable but not deletable** — `remove()` refuses anything that does not live under the first `user` root, so a deployment that configures its own writable root while leaving `includeUserRoot` on lists the harness-home presets, mounts them, and answers "it does not live under the writable preset root" for every delete. A deployment that wants only its own presets sets `includeUserRoot: false`.
|
|
173
|
+
- **A session cannot change preset once it has produced anything** — switching re-links a blank session's parent scope to another standing mount, and only a blank one: swapping tools mid-conversation would strand tools the model has called.
|
|
149
174
|
- **A generation is keyed on the composition file alone** — the stamp check notices `agent.cordis.yml` changing, not an edit to a skill file or asset beside it; those reach new sessions only once the composition file itself moves or the process restarts.
|
|
150
|
-
- **A superseded generation is never reclaimed** — sessions already joined keep the generation they run on, and the roster holds no join count that could tell when the last one left, so the whole subtree stays mounted until the process ends. The cost is per generation rather than per session, but it is not free: `dsh-skill-filesystem` watches its roots by default, so each edit-then-create cycle adds a live watcher set.
|
|
175
|
+
- **A superseded generation is never reclaimed** — sessions already joined keep the generation they run on, and the roster holds no join count that could tell when the last one left, so the whole subtree stays mounted until the process ends. The cost is per generation rather than per session, but it is not free: `dsh-skill-filesystem` watches its roots by default, so each edit-then-create cycle adds a live watcher set.
|
|
151
176
|
- **A copy is never mounted to validate** — it is byte-identical to its source, so a source broken on disk yields a copy exactly as broken as the source; discovery's health check marks both rows on the next roster read rather than deferring the failure to a session start.
|
|
152
|
-
- **Health
|
|
153
|
-
- **A copy is a snapshot that drifts** — upgrading the deployment does not update copies of shipped presets, and there is no patch semantics at this layer to express "standard plus one change"
|
|
177
|
+
- **Health asks what is installed, not what would import** — discovery proves the composition parses in the loader dialect, holds named rows, and that each row it can prove will start names a package present above the harness base or a file that exists; it never imports one, so a package whose own entry file is missing, a plugin that throws on apply, and one waiting forever for a service all still fail at the first session. `disabled` is the one entry field the Loader interpolates, so a row carrying an expression there is left unchecked rather than judged from the file.
|
|
178
|
+
- **A copy is a snapshot that drifts** — upgrading the deployment does not update copies of shipped presets, and there is no patch semantics at this layer to express "standard plus one change"; the shipped set itself accepts the same cost — `cordis` and `code` each duplicate `standard`'s full assembly and then edit it — so the whole assembly stays readable in one file.
|
|
154
179
|
- **Root scans are not watched** — every read hits the filesystem instead, which keeps the roster fresh but puts one `readdir` per root on each `list()`.
|
|
180
|
+
|
|
181
|
+
<a id="dev-note"></a>
|
|
182
|
+
### Dev Note
|
|
183
|
+
|
|
184
|
+
<details>
|
|
185
|
+
<summary>Working context for maintainers — click to expand</summary>
|
|
186
|
+
|
|
187
|
+
This Dev Note is working context for maintainers: open design questions and directions that are not decided. It is explicitly non-authoritative — shipped behavior, limits, and accepted rationale live in the sections above, the package code, and the linked Agent Notes.
|
|
188
|
+
|
|
189
|
+
#### Future: reclaiming superseded generations
|
|
190
|
+
|
|
191
|
+
Reclaiming a superseded standing mount needs a joined-agent count on `StandingMount`, incremented in `mount`/`composeFrom`/`recompose` and decremented when the agent's scope key dies — the `TODO` at `ensureStanding`. The subtree is not inert: `dsh-skill-filesystem` watches its roots, so an unreclaimed generation keeps a live watcher set alive until the process ends.
|
|
192
|
+
|
|
193
|
+
</details>
|