dsh-submodel 0.3.0 → 0.4.1
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.en.md +94 -96
- package/README.md +87 -79
- package/client.js +474 -0
- package/docs/plugin-detail.md +5 -0
- package/lib/config.js +164 -0
- package/lib/delegation.js +49 -51
- package/lib/index.js +42 -131
- package/lib/policy.js +110 -43
- package/lib/setup.js +95 -184
- package/lib/watchdog.js +577 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +19 -4
package/README.en.md
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
# dsh-submodel
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Two-way cross-model delegation policy for the official subagent.** A strong main model hands routine execution down to a cheaper model; a cheap main model escalates architecture-level problems to a strong one — routine token spend stays cheap, hard problems still get a strong model.
|
|
4
|
+
|
|
5
|
+
> **What it solves**
|
|
6
|
+
> - **Routine execution and retrieval** stay on a cheap model (e.g. DeepSeek Flash), so expensive models stay out of routine work.
|
|
7
|
+
> - **Architecture and complex code or logic** escalate to a strong expert model (e.g. Claude).
|
|
8
|
+
> - **Both directions**: whichever model is the main one, work goes to the right tier; delegated subagents cannot delegate further.
|
|
9
|
+
> - You configure the provider/model behind each route; the policy text ships with no provider or model names.
|
|
4
10
|
|
|
5
11
|

|
|
6
12
|
|
|
7
13
|
[](https://www.npmjs.com/package/dsh-submodel)
|
|
8
14
|
[](https://www.npmjs.com/package/dsh-submodel)
|
|
9
15
|
[](https://github.com/angel291592/dsh-submodel/blob/main/LICENSE)
|
|
10
|
-
[](https://github.com/ylwl1997/dshbase/issues/221)
|
|
16
|
+
[](https://github.com/angel291592/dsh-submodel)
|
|
12
17
|
|
|
13
18
|
[中文](README.md) | **English**
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
profile, writes a delegation policy into the system prompt, and adds one unified entry point
|
|
17
|
-
(`delegate_task`) on top of the official `subagent`. Since 0.2.0 the mode is decided by **route** (no model
|
|
18
|
-
naming convention required), and there is a first-run setup wizard plus `economyRoutes`. Since 0.3.0 you can
|
|
19
|
-
optionally enable the **team formation self-check**: with Agent Teams enabled, the top-level main model declares
|
|
20
|
-
whether to parallelise, how many teammates to start, and which model each one uses before the first real task
|
|
21
|
-
(off by default). Requires DSH `0.2.2-rc.1` (`0.2.1` and older are not compatible).
|
|
20
|
+
Open **Plugins → Subagent model settings** to order the cost-effective and expert model groups and add a note about what each model is good for. The main model can choose where to start. With automatic switching enabled, eligible failures move forward from that choice. DSH manages providers, credentials, and model permissions. Version `0.4.1` requires DSH `>=0.2.2-rc.5` with no upper bound, so later DSH releases install and run by default.
|
|
22
21
|
|
|
23
22
|
## Install
|
|
24
23
|
|
|
@@ -30,20 +29,19 @@ dsh --profile <your-profile> # 2. start (restart the p
|
|
|
30
29
|
|
|
31
30
|
## Configuration (two steps)
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
Delegating to a different model requires choosing preferences and allowing that model in DSH:
|
|
34
33
|
|
|
35
34
|
| Layer | What it controls | If missing |
|
|
36
35
|
|---|---|---|
|
|
37
|
-
| ① Host authorization |
|
|
38
|
-
| ② Plugin
|
|
36
|
+
| ① Host authorization | Which models new conversations may delegate to | The current conversation cannot delegate to a different, unauthorized model |
|
|
37
|
+
| ② Plugin preferences | The default execution model and the expert models to choose from | A strong main agent without an execution model cannot select a default for routine delegation |
|
|
39
38
|
|
|
40
39
|
### ① Host authorization (required)
|
|
41
40
|
|
|
42
41
|
By default the native `subagent` only lets a child inherit the parent session's route. To let a child switch
|
|
43
42
|
to an execution/expert route, authorize it in the host first:
|
|
44
43
|
|
|
45
|
-
- **
|
|
46
|
-
turn it on, and add the execution route and expert routes to the allow-list one by one.
|
|
44
|
+
- **UI:** open **Subagent** settings under Plugins, turn on model selection, and allow each execution, expert, and fallback model you intend to use.
|
|
47
45
|
- **Or write the profile patch YAML** (`~/.dsh/profiles/<your-profile>/cordis.patch.yml`; the file is an empty
|
|
48
46
|
array `[]` by default — append the entry to that array):
|
|
49
47
|
|
|
@@ -56,42 +54,30 @@ to an execution/expert route, authorize it in the host first:
|
|
|
56
54
|
model: your-model
|
|
57
55
|
- provider: your-provider
|
|
58
56
|
model: your-strong-model
|
|
57
|
+
- provider: your-other-provider
|
|
58
|
+
model: your-backup-model
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
Note: `allowedModels` must not be empty when `enabled: true`; host authorization only applies to **new
|
|
62
62
|
sessions**, so open a new session (or restart the profile) after writing it.
|
|
63
63
|
|
|
64
|
-
### ② Plugin configuration
|
|
65
|
-
|
|
66
|
-
**Option A (recommended): call `configure_submodel` on the first session — it writes both places**
|
|
67
|
-
|
|
68
|
-
No YAML by hand. As long as you are the top-level agent, `autoConfigure` keeps its default `true`, and
|
|
69
|
-
`executor` is not configured yet, the `configure_submodel` tool appears on the first session:
|
|
70
|
-
|
|
71
|
-
1. Call it. It asks three questions — **execution route** (where verifiable execution blocks go; single
|
|
72
|
-
choice), **expert routes** (models you may name when escalating; multi-choice), and **whether to write the
|
|
73
|
-
host authorization row too** (recommended: yes);
|
|
74
|
-
2. On confirmation it uses the official `configEditor` to write **host authorization first, then plugin
|
|
75
|
-
config** (the plugin config's `executor`, `experts` and `economyRoutes` all reflect your choices), so both
|
|
76
|
-
take effect together;
|
|
77
|
-
3. It takes effect on the next session. Writing the plugin config reloads this plugin and the tool
|
|
78
|
-
disappears afterwards — that is expected, not an error.
|
|
64
|
+
### ② Plugin configuration
|
|
79
65
|
|
|
80
|
-
|
|
81
|
-
shown: the tool returns copyable manual YAML instead and **writes nothing**.
|
|
66
|
+
**Settings page:** open **Plugins → Subagent model settings**. Add models to either group, change the order, and enter short notes such as “Prefer for code”. The first model in each group is the usual starting point; the main model can use the notes to pick another one. Allow each model separately in Subagent settings. If another page saves first, your draft is kept. Load the saved settings and review the draft before saving it. Reload the page if the connection changes.
|
|
82
67
|
|
|
83
|
-
**
|
|
68
|
+
**First-run wizard:** call `configure_submodel` from a top-level agent with `autoConfigure` on and no execution model configured. It asks for execution and expert models first, then asks separately whether to add host authorization. The two writes are separate; the wizard reports which succeeded. Saving an execution model hides the wizard.
|
|
84
69
|
|
|
85
|
-
|
|
86
|
-
The file is an empty array `[]` by default: **replace `[]` with the entry below**; if it already has entries,
|
|
87
|
-
append this one to the array.
|
|
70
|
+
**Without the settings page:** add or update the `submodel` entry in your profile patch. Keep any other fields in that entry. If the host cannot show question cards, the wizard explains how to configure preferences and authorization manually.
|
|
88
71
|
|
|
89
72
|
```yaml
|
|
90
73
|
- id: submodel
|
|
91
74
|
config:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
75
|
+
modelGroups:
|
|
76
|
+
executors:
|
|
77
|
+
- { provider: your-provider, model: your-model, note: Prefer for code }
|
|
78
|
+
- { provider: your-other-provider, model: your-backup-model }
|
|
79
|
+
experts:
|
|
80
|
+
- { provider: your-provider, model: your-strong-model, note: Architecture decisions }
|
|
95
81
|
```
|
|
96
82
|
|
|
97
83
|
Note: a profile patch **replaces the whole `config` block** of an entry — fields you leave out fall back to
|
|
@@ -105,21 +91,34 @@ Full field reference:
|
|
|
105
91
|
| `autoConfigure` | `true` | Whether to register the `configure_submodel` wizard for first-run setup (visible only for a top-level agent whose `executor` is not configured); turn it off to configure everything manually |
|
|
106
92
|
| `preset` | `standard` | Only applies to that composition |
|
|
107
93
|
| `teamFit.enabled` | `false` | Team formation self-check section (0.3.0+): needs the master `enabled` switch to be `true` as well, plus the official Agent Teams plugin; visible only to the top-level main model of the target preset — see below. Off by default, which is the rollback state |
|
|
108
|
-
| `
|
|
109
|
-
| `executor
|
|
110
|
-
| `economyRoutes` | `[]` | Extra
|
|
111
|
-
| `experts` | `[]` | Expert routes you may name explicitly when escalating, each `{label, provider, model, reasoningEffort?}`; `reasoningEffort` is reserved for now and does not affect delegation |
|
|
94
|
+
| `modelGroups` | `legacy` (use previous settings) | Ordered `executors` and `experts` lists. Each entry is `{provider, model, note?, reasoningEffort?}`. Pairs may not repeat within a group. Every model can have a default reasoning effort: it applies when a delegation names no effort and when switching lands on that model; empty leaves it to the model, and an effort named in the call wins |
|
|
95
|
+
| `executor`, `experts` | Unset | Used only before saving the group lists. Omitting the old executor's `reasoningEffort` keeps `max`; `""` leaves it to the model |
|
|
96
|
+
| `economyRoutes` | `[]` | Extra cost-effective routes, each `{provider?, model}`. Omit `provider` to match on `model` alone. When non-empty, the legacy `flash` suffix rule no longer applies |
|
|
112
97
|
| `texts.economize` / `texts.boss` / `texts.child` | empty | When non-empty, replaces the built-in prompt section verbatim (no interpolation afterwards) |
|
|
113
98
|
| `toolName` | `list_subagent_models` | Tool name used as the capability gate for the policy section |
|
|
114
99
|
| `order` | `2850` | Order of the policy section in the system prompt |
|
|
115
|
-
| `guardNativeSubagent` | `true` |
|
|
100
|
+
| `guardNativeSubagent` | `true` | Requires a complete provider and model pair when a strong main agent calls the native `subagent` directly |
|
|
101
|
+
| `fallbacks` | `[]` | Legacy only. Entries are `{primary: {provider, model}, alternatives: [...]}`. Saving the new groups switches to their order |
|
|
102
|
+
| `watchdog.mode` | `off` | `off` disables monitoring, `notify` reminds the child to finish, `stop` prompts for a manual stop after the grace period, and `retry` retries eligible failures |
|
|
103
|
+
| `watchdog.tiers` | `[expert]` | Monitor `expert` and/or `executor` |
|
|
104
|
+
| `watchdog.warnTokens` | `100000` | Threshold for cumulative reported token usage (a positive integer) |
|
|
105
|
+
| `watchdog.graceMs` | `60000` | `1000`–`600000` milliseconds after the finish-up reminder is delivered |
|
|
106
|
+
| `watchdog.maxRetries` | `1` | Maximum number of automatic retries per task, `0`–`2` |
|
|
107
|
+
|
|
108
|
+
## Usage reminders and automatic switching
|
|
109
|
+
|
|
110
|
+
**Usage reminders** are off by default. They apply to selected groups of local subagents started through `delegate_task`. Usage comes from the reported totals; a single request can go over the reminder amount. Missing and explicitly zero usage are indistinguishable in the current host, so both count as unknown. The page shows the wait in seconds. At the end of that wait, it prompts you to stop the task yourself.
|
|
111
|
+
|
|
112
|
+
**Try the next model after failure** uses the next entry in the same group only when the current model has exhausted the host's bounded retries (five after the first failure by default, and no switch if it ran fewer than five). The task needs known usage below the reminder amount, with no partial output, tool calls, manual stop, or outside follow-up. The order starts at the chosen model and moves forward without wrapping or skipping unavailable entries. The switched-to model uses its own configured default effort (unset leaves it to the model); the failed model's effort is not carried over. The next model must be allowed by both the current settings and the original conversation. It can be on a different provider, which receives the same task and may charge for it. Turning monitoring off cancels pending actions without stopping tasks the host has already accepted.
|
|
113
|
+
|
|
114
|
+
Each request needs a verifiable usage sample for automatic switching. A later report cannot fill in an earlier missing or zero sample. Existing settings keep their behavior until you save the groups. To carry forward old backup models, add them to the relevant group. If a provider/model pair is in both groups, naming it explicitly uses the expert group.
|
|
116
115
|
|
|
117
116
|
## How it decides who does what (route-based since 0.2.0)
|
|
118
117
|
|
|
119
118
|
There are two modes, and the decision looks only at the **route of the current request** (`provider` +
|
|
120
119
|
`model`) — no model-name suffix is required:
|
|
121
120
|
|
|
122
|
-
1.
|
|
121
|
+
1. The current request matches the cost-effective group (or the old `executor` if no groups are saved) → **Flash (`economize`) mode**;
|
|
123
122
|
2. The request matches any route in **`economyRoutes`** → **Flash (`economize`) mode** (for multiple cheap routes);
|
|
124
123
|
3. When `economyRoutes` is empty, the legacy rule still applies: a model name ending in `flash` → **Flash
|
|
125
124
|
(`economize`) mode**;
|
|
@@ -128,19 +127,17 @@ There are two modes, and the decision looks only at the **route of the current r
|
|
|
128
127
|
Built-in behaviour:
|
|
129
128
|
|
|
130
129
|
- **Flash mode**: do the work yourself by default; ordinary subtasks go through `delegate_task` (no
|
|
131
|
-
provider/model
|
|
132
|
-
|
|
133
|
-
- **Boss mode**: understanding, judgement and writing stay with the main model; verifiable execution blocks
|
|
134
|
-
default to the configured `executor` route.
|
|
130
|
+
provider/model means the child inherits the current route). Escalate only for complex problems or tasks beyond your execution limits, choosing an expert by order and note.
|
|
131
|
+
- **Boss mode**: understanding, judgment, and writing stay with the main model. Verifiable tasks use the first cost-effective model by default. The main model can name another model based on its note.
|
|
135
132
|
- **Children**: hard boundary — `delegate_task` / `subagent` / `subagent_fork` / `workflow` / `spawn_teammate`
|
|
136
133
|
are unavailable to a child, preventing recursive delegation.
|
|
137
134
|
- **`delegate_task`**: same parameters as the native `subagent` (`description`, `prompt`, and optional
|
|
138
135
|
`provider` / `model` / `reasoning_effort`; `provider` and `model` must be supplied **together** — one alone
|
|
139
|
-
fails immediately).
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
136
|
+
fails immediately). When a call names no reasoning effort, the model's configured default from the two
|
|
137
|
+
groups applies; unset leaves it to the model. It goes through `ctx.tools.execute` and raises a real native call, so the host's
|
|
138
|
+
allowlist, preflight, and permissions still apply. On success it returns the native receipt `{kind: 'activation', name}`.
|
|
139
|
+
Use the name to look up or message the subagent. The runtime delivers a separate completion notice.
|
|
140
|
+
Call `list_subagent_models` first if you are unsure which routes are authorized.
|
|
144
141
|
|
|
145
142
|
Two typical calls:
|
|
146
143
|
|
|
@@ -204,45 +201,36 @@ does not affect other prompt sections.
|
|
|
204
201
|
|
|
205
202
|
| Capability | Provided by |
|
|
206
203
|
|---|---|
|
|
207
|
-
|
|
|
208
|
-
|
|
|
209
|
-
| Model
|
|
204
|
+
| Discovery, messaging, waiting, and stopping | The host provides `list_agents`, `send_message`, `wait_agent`, and optional `interrupt_agent` |
|
|
205
|
+
| Routing policy, `delegate_task`, settings page, wizard, and usage monitoring | This package |
|
|
206
|
+
| Model authorization and task board | The host manages both. Agent Teams controls task board availability |
|
|
207
|
+
|
|
208
|
+
`list_agents` shows the subagent tree. `send_message` confirms delivery. `wait_agent` waits for inbox input or a completion notice, and a timeout lets you return to other work. The Standard preset disables `interrupt_agent` by default. Enable it using the host's configuration guide, or stop tasks in the Subagent panel. Check the task's terminal record to confirm it stopped.
|
|
210
209
|
|
|
211
210
|
## Compatibility
|
|
212
211
|
|
|
213
|
-
| DSH version |
|
|
212
|
+
| DSH version | Verification |
|
|
214
213
|
|---|---|
|
|
215
|
-
| `0.2.2-rc.
|
|
216
|
-
| `0.2.
|
|
217
|
-
| Other
|
|
214
|
+
| `0.2.2-rc.5` | An isolated Web instance started with the installed CLI verified settings, delegation, and control tools. Desktop trial and the npm-distributed CLI remain to be verified |
|
|
215
|
+
| `0.2.3-alpha.2` (latest desktop nightly at the time) | Every host and browser-side interface this package uses was checked against it; the isolated CLI installed the candidate and started the Web surface. The settings page and real delegation have not been exercised in a GUI |
|
|
216
|
+
| Other versions above `0.2.2-rc.5` (including 0.3.x and later) | Declared compatible with **no upper bound**; newer releases are allowed and install by default. Not verified release by release; tighten only if a host interface actually breaks |
|
|
217
|
+
| `0.2.2-rc.1`–`rc.4` | Below the minimum: install `dsh-submodel@0.3.0` for these hosts, or upgrade DSH |
|
|
218
218
|
|
|
219
219
|
## Troubleshooting
|
|
220
220
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
|
224
|
-
|
|
225
|
-
|
|
|
226
|
-
|
|
|
227
|
-
|
|
|
228
|
-
| `configure_submodel` returns no question card | — | The client has no GUI (headless / plain CLI), so there is nobody to ask; the tool returns manual YAML and writes nothing — use Option B above |
|
|
229
|
-
| `当前 profile 无 agentPresets 服务,策略不生效` | `warn` | This profile has no agentPresets service; use a profile that supports compositions |
|
|
230
|
-
| `原生 subagent 未暴露 provider/model,delegate_task 不安装` | `warn` | The native `subagent` in this session exposes no model-selection parameters: the whole install (policy section / guard / tools) is skipped and retried automatically once the capability appears |
|
|
231
|
-
| `本会话未启用官方 subagent 模型选择,策略段不渲染` | `info` | Enable `subagent-model-selection-settings` in Settings (host authorization applies to new sessions only); tools are still installed subject to their own gate |
|
|
221
|
+
| Symptom | What to do |
|
|
222
|
+
|---|---|
|
|
223
|
+
| No default execution model | Pick one in plugin details or use the first-run wizard |
|
|
224
|
+
| The current conversation cannot use the chosen model | Allow it in Subagent settings and start a new conversation |
|
|
225
|
+
| The model list fails to load | Select **Reload model list**. You can keep or remove any saved choice that is currently unavailable |
|
|
226
|
+
| The wizard is missing | It appears for a top-level agent in the target preset when no execution model is configured and native model selection is available |
|
|
227
|
+
| No settings page or question card is available | Use the profile patch under Configuration (two steps) |
|
|
232
228
|
|
|
233
229
|
## Known limitations
|
|
234
230
|
|
|
235
|
-
-
|
|
236
|
-
|
|
237
|
-
-
|
|
238
|
-
- No budget guard / nudging / failure re-routing (watchdog).
|
|
239
|
-
- `configure_submodel` writes exactly two places — this package's config row and the host authorization row
|
|
240
|
-
(`subagent-model-selection-settings`); it does not create channels or credentials and does not touch other
|
|
241
|
-
plugins.
|
|
242
|
-
- Model metadata has no price field, so which routes count as "cheap" is up to your configuration (the wizard
|
|
243
|
-
only pre-fills candidates; it does not decide for you).
|
|
244
|
-
- Non-GUI clients have no question card, so use Option B (manual YAML).
|
|
245
|
-
- The team formation self-check is a **prompt-level constraint**: whether to parallelise and how many teammates to start is still the main model's decision, not enforced; it does not enable Agent Teams for you.
|
|
231
|
+
- `preset` selects where the policy applies. Live agents keep their preferences from activation. New activations read the saved preferences. The host records model authorization when a conversation is created.
|
|
232
|
+
- `texts.*` preserves custom guidance. Check it for calls to retired control tools when upgrading.
|
|
233
|
+
- Team formation guidance is a prompt. The main model decides whether and how to act on it.
|
|
246
234
|
|
|
247
235
|
## Rollback
|
|
248
236
|
|
|
@@ -250,8 +238,7 @@ Fail-fast: startup warnings are logged only and never thrown; errors only surfac
|
|
|
250
238
|
dsh plugin --profile <your-profile> remove dsh-submodel
|
|
251
239
|
```
|
|
252
240
|
|
|
253
|
-
|
|
254
|
-
`subagent-model-selection-settings` entry manually.
|
|
241
|
+
Disabling or removing the plugin does not revoke host authorization. Restore the previous list in Subagent settings if needed. When switching back to a previous plugin, disable the new one first, restore the backed-up entry and profile settings, then restart and open a new conversation to confirm only one delegation policy is active.
|
|
255
242
|
|
|
256
243
|
To turn off only the team formation self-check while keeping everything else, set `teamFit.enabled` to `false`
|
|
257
244
|
and restart the profile (no plugin removal needed).
|
|
@@ -271,15 +258,11 @@ Current verification counts (CI runs the same commands on every push / PR, see `
|
|
|
271
258
|
|
|
272
259
|
| Check | Result |
|
|
273
260
|
|---|---|
|
|
274
|
-
| fixture | **
|
|
261
|
+
| fixture | **141** assertions, `failed: 0` |
|
|
275
262
|
| Python driver | **7** test cases, `OK` |
|
|
276
263
|
| Public-profile smoke | **8** assertions, `failed: 0` |
|
|
277
264
|
|
|
278
|
-
|
|
279
|
-
main model to the execution route to enter economize mode) must be accepted by the user in a restarted real
|
|
280
|
-
GUI session and is **not verified yet**. For the team formation self-check, the deterministic parts (the three
|
|
281
|
-
leading lines, identity/preset/team-state gating, off-by-default rollback) are covered by the fixture; the
|
|
282
|
-
actual first-turn reply and teammate count in a real GUI conversation still need acceptance in a new session.
|
|
265
|
+
Isolated Web verification used local synthetic models. It covered save and reopen, conflicting drafts, model-list recovery, reconnects, light and dark themes, keyboard interaction, native control tools, and usage monitoring. It did not exercise a personal Desktop profile or paid models. The team-formation prompt cannot guarantee verbatim compliance by a model.
|
|
283
266
|
|
|
284
267
|
## Contributing
|
|
285
268
|
|
|
@@ -290,14 +273,29 @@ actual first-turn reply and teammate count in a real GUI conversation still need
|
|
|
290
273
|
|
|
291
274
|
## Releasing (maintainers)
|
|
292
275
|
|
|
276
|
+
### One development and release source
|
|
277
|
+
|
|
278
|
+
Maintain features, fixes, and packaged documentation in this repository. Try candidate packages in
|
|
279
|
+
an isolated DSH profile. For every validated plugin update, maintainers must publish the corresponding
|
|
280
|
+
open-source version with a changelog entry, a Git tag, and an npm release. Use that same validated
|
|
281
|
+
release for day-to-day local use.
|
|
282
|
+
|
|
283
|
+
Keep provider and model choices, budget settings, and credentials in the user's own DSH profile or
|
|
284
|
+
credential store. Use placeholders in public examples. Before pushing, review the commits, the
|
|
285
|
+
`npm pack --dry-run` file list, and the contents that will ship. Keep real provider and model mappings,
|
|
286
|
+
local paths, profile backups, credentials, and run records out of Git and the published package.
|
|
287
|
+
Local material in `reference/` and private plans under `docs/plans/` stay on the maintainer's machine.
|
|
288
|
+
Changes to a personal profile do not require a package release.
|
|
289
|
+
|
|
290
|
+
### Release steps
|
|
291
|
+
|
|
293
292
|
Releases go through GitHub Actions + npm **Trusted Publishing (OIDC)**; no npm token is stored on this
|
|
294
293
|
machine or in the repository:
|
|
295
294
|
|
|
296
|
-
1.
|
|
297
|
-
2.
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
push and publishes with `npm publish`; the script tries to create the GitHub Release once npm confirms.
|
|
295
|
+
1. Review the version in `package.json` and its [changelog](CHANGELOG.md) entry. Run `pwsh scripts/release.ps1 <version> -FromIndex` to prepare a **local-only** candidate from staged files. The script does not bump the version, commit, or tag.
|
|
296
|
+
2. Review the archive's contents, its `tarball-sha256` (the whole archive), and its `pack-content-sha256` (the files inside). Try that candidate in an isolated profile and in a Desktop trial with rollback prepared.
|
|
297
|
+
3. For an approved release, use a clean `main` with the reviewed commit. Run `pwsh scripts/release.ps1 <version> -ExpectedContentSha256 <content digest> -Publish` to check the content and push only that commit and an annotated tag carrying the digest.
|
|
298
|
+
4. The [release workflow](.github/workflows/release.yml) repacks the pinned commit, verifies the same content digest, and publishes the checked archive. It then downloads the exact version to verify it and updates the GitHub Release.
|
|
301
299
|
|
|
302
300
|
One-time setup: configure a Trusted Publisher in the npm package settings (repository
|
|
303
301
|
`angel291592/dsh-submodel`, workflow `release.yml`, allow Direct publish). After that, releasing needs no
|