dsh-ssh-tui 0.8.4-rc.1 → 0.8.4
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 +65 -13
- package/README.en.md +4 -3
- package/docs/release-notes-0.8.4-rc.2.md +72 -0
- package/docs/release-notes-0.8.4.md +129 -0
- package/lib/doctor.js +41 -4
- package/lib/doctor.js.map +1 -1
- package/lib/i18n/en.js +6 -1
- package/lib/i18n/en.js.map +1 -1
- package/lib/i18n/zh.js +6 -1
- package/lib/i18n/zh.js.map +1 -1
- package/lib/preset-rows.js +70 -19
- package/lib/preset-rows.js.map +1 -1
- package/lib/terminal-input.js +13 -3
- package/lib/terminal-input.js.map +1 -1
- package/lib/tui.js +160 -15
- package/lib/tui.js.map +1 -1
- package/lib/types/doctor.d.ts +13 -1
- package/lib/types/preset-rows.d.ts +22 -7
- package/lib/types/tui.d.ts +32 -4
- package/package.json +1 -1
package/lib/types/doctor.d.ts
CHANGED
|
@@ -30,7 +30,11 @@ export interface DoctorCheck {
|
|
|
30
30
|
export interface DoctorRouting {
|
|
31
31
|
provider?: string;
|
|
32
32
|
model?: string;
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Every route exposed by the live adapter directory or configured under
|
|
35
|
+
* `llm-pi-ai.providers`. Presence is registration/configuration evidence,
|
|
36
|
+
* not a network probe.
|
|
37
|
+
*/
|
|
34
38
|
routes: readonly string[];
|
|
35
39
|
/** Model ids the selected provider's route lists. */
|
|
36
40
|
routeModels: readonly string[];
|
|
@@ -50,6 +54,14 @@ export interface DoctorFacts {
|
|
|
50
54
|
roster: boolean;
|
|
51
55
|
/** `codeRuntime` — what the PTC preset mounts. */
|
|
52
56
|
codeRuntime: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* `tools.get('ask_user_question')` — the actual registration, not the row
|
|
59
|
+
* text. Absent on snapshots taken before this field existed, where the
|
|
60
|
+
* textual check remains the fallback.
|
|
61
|
+
*/
|
|
62
|
+
askUserTool?: boolean;
|
|
63
|
+
/** `tools.get('present')` — the other half of the 0.1.7 agent plane. */
|
|
64
|
+
presentTool?: boolean;
|
|
53
65
|
};
|
|
54
66
|
/** The profile patch. `readable` is false when it does not exist yet. */
|
|
55
67
|
patch: {
|
|
@@ -133,7 +133,14 @@ export declare function analyzePatch(text: string): PatchAnalysis;
|
|
|
133
133
|
* @returns the later occurrences, in file order.
|
|
134
134
|
*/
|
|
135
135
|
export declare function duplicatePatchRows(rows: readonly PatchRowRef[]): PatchRowRef[];
|
|
136
|
-
/**
|
|
136
|
+
/**
|
|
137
|
+
* Whether a patch already addresses one roster row, by id or by module name.
|
|
138
|
+
*
|
|
139
|
+
* Every kind counts: an override or a disable targets the row just as an insert
|
|
140
|
+
* does. A repair must leave an intentional `- id: present` / `disabled: true`
|
|
141
|
+
* alone instead of mounting the same id a second time; the later entry would
|
|
142
|
+
* either collide with it or silently undo the user's choice.
|
|
143
|
+
*/
|
|
137
144
|
export declare function patchNamesRow(rows: readonly PatchRowRef[], row: RosterRow): boolean;
|
|
138
145
|
/** The roster rows a patch does not declare yet. */
|
|
139
146
|
export declare function missingRosterRows(rows: readonly PatchRowRef[], candidates?: readonly RosterRow[]): RosterRow[];
|
|
@@ -159,6 +166,8 @@ export interface PatchRepair {
|
|
|
159
166
|
* @param missing - the roster rows to mount; defaults to the 0.1.5 set.
|
|
160
167
|
* @param generation - which host line the profile boots on.
|
|
161
168
|
* @returns the new text, or `undefined` when nothing has to change.
|
|
169
|
+
* @throws when `existing` is not valid YAML; appending to a broken patch would
|
|
170
|
+
* make it longer without making it bootable.
|
|
162
171
|
*/
|
|
163
172
|
export declare function planRosterRepair(existing: string, missing?: readonly RosterRow[], generation?: HostGeneration): PatchRepair | undefined;
|
|
164
173
|
/**
|
|
@@ -175,26 +184,32 @@ export declare function planDuplicateRepair(existing: string): PatchRepair | und
|
|
|
175
184
|
/**
|
|
176
185
|
* Mount the roster in one profile, unless it is already composed.
|
|
177
186
|
*
|
|
178
|
-
* Idempotent: a profile whose patch already
|
|
179
|
-
* `@deepseek-ai/dsh-web-app`, for example) is left untouched.
|
|
180
|
-
*
|
|
187
|
+
* Idempotent: a profile whose patch already addresses the roster row (one
|
|
188
|
+
* bundling `@deepseek-ai/dsh-web-app`, for example) is left untouched. An
|
|
189
|
+
* existing file is backed up before the small whole-file replace; a
|
|
181
190
|
* half-written patch would only be seen by the next launch.
|
|
182
191
|
* @param home - the harness home carrying `profiles/`.
|
|
183
192
|
* @param profile - the profile to patch.
|
|
184
193
|
* @param missing - the rows to mount; defaults to the 0.1.5 set.
|
|
185
194
|
* @param generation - which host line the profile boots on.
|
|
195
|
+
* @param stamp - filename-safe backups stamp, injectable for tests.
|
|
186
196
|
* @returns `present` when the row already exists, else `written`.
|
|
197
|
+
* @throws when the existing patch cannot be read, is not valid YAML, or cannot
|
|
198
|
+
* be backed up; a file that cannot be preserved is not overwritten.
|
|
187
199
|
*/
|
|
188
|
-
export declare function ensureRosterRows(home: string, profile: string, missing?: readonly RosterRow[], generation?: HostGeneration): Promise<'present' | 'written'>;
|
|
200
|
+
export declare function ensureRosterRows(home: string, profile: string, missing?: readonly RosterRow[], generation?: HostGeneration, stamp?: string): Promise<'present' | 'written'>;
|
|
189
201
|
/**
|
|
190
202
|
* Write a repaired patch next to a copy of the previous content.
|
|
191
203
|
*
|
|
192
|
-
* `/doctor`
|
|
193
|
-
* before anything is replaced. A
|
|
204
|
+
* `/doctor` and the automatic repair change a file the user owns, so the old
|
|
205
|
+
* text is kept beside it before anything is replaced. A source that vanished
|
|
206
|
+
* between the read and the copy needs no backup; any other backup failure
|
|
207
|
+
* aborts before the write, leaving the original untouched.
|
|
194
208
|
* @param path - the patch file to replace.
|
|
195
209
|
* @param text - the new content.
|
|
196
210
|
* @param stamp - filename-safe timestamp for the backup, injectable for tests.
|
|
197
211
|
* @returns the backup path, or `undefined` when there was nothing to back up.
|
|
212
|
+
* @throws when the backup cannot be written; the destination is not touched.
|
|
198
213
|
*/
|
|
199
214
|
export declare function writePatchWithBackup(path: string, text: string, stamp?: string): Promise<string | undefined>;
|
|
200
215
|
/** The patch text the roster block would produce on its own, for callers that report it. */
|
package/lib/types/tui.d.ts
CHANGED
|
@@ -2096,12 +2096,32 @@ export declare class SshTui {
|
|
|
2096
2096
|
/** /mode: pick an agent preset (standard / minimal / ptc / cordis / routing-suite / ...). */
|
|
2097
2097
|
private runModeCommand;
|
|
2098
2098
|
/**
|
|
2099
|
-
*
|
|
2099
|
+
* The two tools a 0.1.7 terminal profile mounts itself, read from the running
|
|
2100
|
+
* composition. The profile patch is only the instruction; this is the answer
|
|
2101
|
+
* to whether the instruction actually produced a tool.
|
|
2102
|
+
*/
|
|
2103
|
+
private agentPlaneTools;
|
|
2104
|
+
/** Whether this process's agent plane has both tools. */
|
|
2105
|
+
private agentPlaneReady;
|
|
2106
|
+
/**
|
|
2107
|
+
* Repair an already-configured profile at boot and say a restart is needed.
|
|
2100
2108
|
*
|
|
2101
|
-
*
|
|
2102
|
-
*
|
|
2103
|
-
*
|
|
2109
|
+
* A first run deliberately does not call this: its wizard save is the point
|
|
2110
|
+
* where settings and credentials exist, and `onboardDone` repairs immediately
|
|
2111
|
+
* after that write. This method serves the old/partial profile upgrade path,
|
|
2112
|
+
* where there is no wizard to wait for.
|
|
2113
|
+
*/
|
|
2114
|
+
private repairAgentPlaneAtBoot;
|
|
2115
|
+
/**
|
|
2116
|
+
* Add only the profile rows whose tools are missing from this composition.
|
|
2117
|
+
*
|
|
2118
|
+
* A row that is already present in the patch is never written again, even if
|
|
2119
|
+
* its service failed to activate: the planner sees overrides and disables by
|
|
2120
|
+
* id or module name, and `ensureRosterRows` creates a backup first. This is
|
|
2121
|
+
* the first-run/upgrade repair, not an install-hook claim: it changes what
|
|
2122
|
+
* the next boot composes, not what this process has already composed.
|
|
2104
2123
|
*/
|
|
2124
|
+
private ensureProfileAgentPlane;
|
|
2105
2125
|
/** Re-read the roster fact this process was composed with (cheap, no IO). */
|
|
2106
2126
|
private refreshRosterHealth;
|
|
2107
2127
|
/** Which settings protocol this host speaks; decides what "missing" means. */
|
|
@@ -2114,6 +2134,14 @@ export declare class SshTui {
|
|
|
2114
2134
|
* all — the repair there is the agent-plane rows, not a roster.
|
|
2115
2135
|
*/
|
|
2116
2136
|
private missingPresetService;
|
|
2137
|
+
/**
|
|
2138
|
+
* `/mode fix`: write the missing profile rows into the user patch layer.
|
|
2139
|
+
*
|
|
2140
|
+
* The write only takes effect on the next launch — the loader composes the
|
|
2141
|
+
* patch tree once at boot — so the report says so instead of pretending the
|
|
2142
|
+
* running session gained a roster. The helper consults the actual tools, so
|
|
2143
|
+
* a row a bundle already supplies is not mounted a second time.
|
|
2144
|
+
*/
|
|
2117
2145
|
private repairRoster;
|
|
2118
2146
|
/** Current provider route selected for the running agent. */
|
|
2119
2147
|
private currentProvider;
|
package/package.json
CHANGED