@xmoon76/dsh-pi-tui 0.5.7 → 0.5.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.
Files changed (33) hide show
  1. package/README.en.md +13 -11
  2. package/README.md +13 -11
  3. package/dist/{bootstrap-C9nl6e13.mjs → bootstrap-CMIjGyuk.mjs} +532 -416
  4. package/dist/builtins.mjs +2 -2
  5. package/dist/{client-bootstrap-CGezi85O.mjs → client-bootstrap-BjGPc-DM.mjs} +826 -3
  6. package/dist/{daemon-launcher-H_1r5Cqs.mjs → daemon-launcher-Dult7Jxv.mjs} +121 -4
  7. package/dist/daemon-launcher.mjs +1 -1
  8. package/dist/{entry-control-jBfKn1qO.mjs → entry-control-DjNsE3I0.mjs} +1 -1
  9. package/dist/{extensions-6a5vvJUT.mjs → extensions-B4uLpSTv.mjs} +1 -4
  10. package/dist/extensions.mjs +1 -1
  11. package/dist/{host-foundation-probe-DK7n5jDu.mjs → host-foundation-probe-DMNTmNrH.mjs} +1 -1
  12. package/dist/index.mjs +532 -298
  13. package/dist/{local-acp-listener-CNkguN5-.mjs → local-acp-listener-B65J0Bx4.mjs} +561 -12
  14. package/dist/local-client.mjs +442 -45
  15. package/dist/{local-daemon-control-Cu_4FIdd.mjs → local-daemon-control-C14q9KnD.mjs} +5 -2
  16. package/dist/{local-daemon-control-Bg9s2aYi.mjs → local-daemon-control-TCnERL7n.mjs} +3 -3
  17. package/dist/{local-discovery-Bq3jLAn1.mjs → local-discovery-DOSsCh9q.mjs} +1 -1
  18. package/dist/{local-discovery-BMoNXZjJ.mjs → local-discovery-egN4_gsQ.mjs} +1 -1
  19. package/dist/{local-discovery-BPZw1wEd.mjs → local-discovery-uOBfFq5j.mjs} +1 -1
  20. package/dist/local-host.mjs +24 -6
  21. package/dist/local-profile-daemon-admin-BmQSdzT0.mjs +210 -0
  22. package/dist/{local-scope-DEuGAy8l.mjs → local-scope-DamiMqPd.mjs} +118 -1
  23. package/dist/{local-transport-X4ZCe2uE.mjs → local-transport-Iwo0mtu3.mjs} +2 -2
  24. package/dist/{local-web-control-DKWtXIkr.mjs → local-web-control-DMrjwCkl.mjs} +2 -2
  25. package/dist/{session-DC0XQr5O.mjs → session-C6tSs86s.mjs} +2 -2
  26. package/dist/{session-Cihe8PPS.mjs → session-CstInGIA.mjs} +1 -1
  27. package/dist/{startup-CARqn3kV.mjs → startup-EG5UqIcd.mjs} +3 -3
  28. package/dist/startup.mjs +1 -1
  29. package/dist/{terminal-progress-source-D4DHyXDo.mjs → terminal-progress-source-CpfpQO_h.mjs} +3 -6
  30. package/dist/{transcript-view-hvNVkPtv.mjs → transcript-view-C1YtJ49Y.mjs} +191 -192
  31. package/dist/{transcript-view-a7cROAaI.mjs → transcript-view-CuJYWkhp.mjs} +190 -191
  32. package/package.json +6 -6
  33. package/dist/local-profile-daemon-admin-AXgVH-6y.mjs +0 -91
@@ -11,9 +11,9 @@ import { parseExitStatus } from "@deepseek-ai/dsh-shell";
11
11
  import { ToolCallId, expandAssistantStream as expandAssistantStream$1 } from "@deepseek-ai/dsh-llm";
12
12
  import { open, readdir, stat } from "node:fs/promises";
13
13
  import { formatFileMention } from "@deepseek-ai/dsh-file-reference/grammar";
14
- import { Chalk } from "chalk";
15
14
  import { Marked } from "marked";
16
15
  import { eastAsianWidth } from "get-east-asian-width";
16
+ import { Chalk } from "chalk";
17
17
  import { SaxesParser } from "saxes";
18
18
  import { html, ui } from "@stencil-hq/tern";
19
19
  //#region src/client/history/store.ts
@@ -8207,193 +8207,6 @@ async function suggestPathArgument(argumentText, cwd, localFdPath = void 0) {
8207
8207
  * AND get the matching `getArgumentCompletions` wiring. */
8208
8208
  const FILE_ARGUMENT_COMMANDS = /* @__PURE__ */ new Set(["attach", "image"]);
8209
8209
  //#endregion
8210
- //#region src/tui/theme/runtime.ts
8211
- /**
8212
- * The live terminal palette + ANSI/TUI theme objects (TS8-E): the ONE owner
8213
- * of the mutable current palette and of the chalk-backed style helpers,
8214
- * searchable-picker/settings-list/editor/markdown themes and the host
8215
- * markdown options. Every TUI renderer and every terminal-rendering
8216
- * extension adapter (`extension/internal/component-compiler.ts`,
8217
- * `slot-outlet.ts`) consumes this owner; the neutral palette vocabulary and
8218
- * built-in palettes live in `domain/display/theme.ts`.
8219
- * @module @xmoon76/dsh-pi-tui/tui/theme/runtime
8220
- */
8221
- /** The active palette; style helpers read it on every call, so swapping is live. */
8222
- let currentPalette = darkColors;
8223
- /**
8224
- * Switch the active palette; callers must invalidate rendered components.
8225
- * `custom` uses the full palette in `customPalette`, or falls back to dark.
8226
- * @param theme - the palette family.
8227
- * @param custom - the resolved custom palette when `theme` is `custom`.
8228
- */
8229
- function setTheme(theme, custom) {
8230
- if (theme === "custom" && custom !== void 0) currentPalette = withSearchCurrentTokens(custom);
8231
- else currentPalette = theme === "light" ? lightColors : darkColors;
8232
- }
8233
- const chalk = new Chalk({ level: 3 });
8234
- const hex = (token) => chalk.hex(currentPalette[token] ?? currentPalette.text);
8235
- /** Paint text with an explicit hex colour. Brand assets (the welcome whale
8236
- * gradient) use a fixed ramp that is NOT a semantic token: it must not
8237
- * follow the active palette, and custom themes do not override it. */
8238
- const hexPaint = (hexValue, text) => chalk.hex(hexValue)(text);
8239
- /** Style helpers by token name. The strong/dim/italic helpers accept an
8240
- * optional TONE OVERRIDE (the footer layout's semantic tone override):
8241
- * the override replaces the token, the style stays. */
8242
- const color = {
8243
- primary: (text) => hex("primary")(text),
8244
- accent: (text) => hex("accent")(text),
8245
- text: (text) => hex("text")(text),
8246
- textStrong: (text, tone) => chalk.bold.hex(currentPalette[tone ?? "textStrong"] ?? currentPalette.textStrong)(text),
8247
- textDim: (text, tone) => hex(tone ?? "textDim")(text),
8248
- textMuted: (text) => hex("textMuted")(text),
8249
- border: (text) => hex("border")(text),
8250
- borderFocus: (text) => hex("borderFocus")(text),
8251
- success: (text) => hex("success")(text),
8252
- warning: (text) => hex("warning")(text),
8253
- error: (text) => hex("error")(text),
8254
- diffAdded: (text) => hex("diffAdded")(text),
8255
- diffRemoved: (text) => hex("diffRemoved")(text),
8256
- diffAddedStrong: (text) => chalk.bold.hex(currentPalette.diffAddedStrong)(text),
8257
- diffRemovedStrong: (text) => chalk.bold.hex(currentPalette.diffRemovedStrong)(text),
8258
- diffGutter: (text) => hex("diffGutter")(text),
8259
- diffMeta: (text) => hex("diffMeta")(text),
8260
- roleUser: (text) => hex("roleUser")(text),
8261
- /** User-bubble background paint (dsh-web `--dsw-specific-bubble`
8262
- * parity): the whole user row reads as a floating block. The token is
8263
- * optional — an absent `roleUserBg` makes this an identity function. */
8264
- roleUserBg: (text) => currentPalette.roleUserBg === void 0 ? text : chalk.bgHex(currentPalette.roleUserBg)(text),
8265
- shellMode: (text) => hex("shellMode")(text),
8266
- /** Ordinary visible transcript-search occurrence: explicit themed ink on a
8267
- * yellow block, separate from the current occurrence. */
8268
- searchMatch: (text) => chalk.hex(currentPalette.searchMatchFg ?? currentPalette.text).bgHex(currentPalette.searchMatchBg ?? currentPalette.warning)(text),
8269
- /** The current card's REAL visible title/anchor when the exact source cells
8270
- * cannot be proven. Same orange role as the current block but deliberately not
8271
- * bold: the bold current style is reserved for a Full source-proven cell or
8272
- * View's current mounted rendered occurrence. */
8273
- searchCardAnchor: (text) => chalk.hex(currentPalette.searchCurrentFg ?? currentPalette.textStrong).bgHex(currentPalette.searchCurrentBg ?? currentPalette.primary)(text),
8274
- /** The current search occurrence (Full source-proven, or View's current
8275
- * mounted rendered occurrence): bold with an explicit themed
8276
- * foreground AND background. NEVER the terminal's inverse attribute — a
8277
- * palette that omits the tokens has them filled at apply time
8278
- * ({@link withSearchCurrentTokens}), and this helper's own derivation stays
8279
- * inside the palette. */
8280
- searchCurrent: (text) => chalk.bold.hex(currentPalette.searchCurrentFg ?? currentPalette.textStrong).bgHex(currentPalette.searchCurrentBg ?? currentPalette.primary)(text),
8281
- /** The LEGACY anchor-only ROW wash used when no visible card-anchor geometry
8282
- * (header or first visible non-image text row) is available: it marks only the
8283
- * owning row, never a proven occurrence, and ordinary query words on that row
8284
- * keep their yellow block. A card with visible anchor geometry uses
8285
- * {@link searchCardAnchor} instead. */
8286
- searchAnchorBg: (text) => chalk.bgHex(currentPalette.searchAnchorBg ?? currentPalette.border)(text),
8287
- /** Plain italics (kimi thinking parity); an optional tone override
8288
- * colors the italic run. */
8289
- italic: (text, tone) => tone === void 0 ? chalk.italic(text) : chalk.italic.hex(currentPalette[tone] ?? currentPalette.text)(text),
8290
- /** Dim + italic for reasoning: intermediate thinking never reads like output. */
8291
- textDimItalic: (text) => chalk.italic.hex(currentPalette.textDim)(text)
8292
- };
8293
- /** SearchablePicker palette from the semantic tokens (a structural
8294
- * superset of the upstream SelectListTheme, so it still satisfies the
8295
- * Editor's autocomplete theme slot). */
8296
- const selectListTheme = {
8297
- selectedPrefix: (text) => color.primary(text),
8298
- selectedText: (text) => chalk.bold.hex(currentPalette.textStrong)(text),
8299
- description: (text) => color.textDim(text),
8300
- scrollInfo: (text) => color.textMuted(text),
8301
- noMatch: (text) => color.textMuted(text),
8302
- groupHeader: (text) => color.textDim(text)
8303
- };
8304
- /**
8305
- * The readable half of a task/job state: the Title Case status WORD that
8306
- * carries the shared `‣` marker (design language `docs/architecture/design-language.md`
8307
- * §3.2 role 9 — colour is never the only signal, §3.3.3). The word is paired
8308
- * with {@link taskStatusColor}'s token; the two must stay one vocabulary, so
8309
- * this map lives beside the colour map (`docs/architecture/design-language.md` §10) and
8310
- * is never forked.
8311
- *
8312
- * A status the map does not name is Title-cased verbatim: the surface may not
8313
- * rename a real state it does not know, and a future wire status must still
8314
- * paint a readable word.
8315
- */
8316
- function taskStatusWord(status) {
8317
- switch (status) {
8318
- case "running": return "Running";
8319
- case "stopping": return "Stopping";
8320
- case "completed": return "Completed";
8321
- case "failed": return "Failed";
8322
- case "killed": return "Killed";
8323
- case "timed_out": return "Timed out";
8324
- case "lost": return "Lost";
8325
- case "inactive": return "Inactive";
8326
- case "awaiting answer": return "Awaiting answer";
8327
- default: return status.charAt(0).toUpperCase() + status.slice(1);
8328
- }
8329
- }
8330
- /**
8331
- * Status-dot colour for a job status (dsh-web StateDot parity:
8332
- * running = ongoing/primary, stopping/killed = warning, completed = done/dim,
8333
- * failed/timed-out/lost = error). Unknown statuses fall back to the
8334
- * muted token so a future wire status never crashes the renderer.
8335
- */
8336
- function taskStatusColor(status) {
8337
- switch (status) {
8338
- case "running": return color.primary;
8339
- case "stopping": return color.warning;
8340
- case "completed": return color.textDim;
8341
- case "failed":
8342
- case "killed": return color.warning;
8343
- case "timed_out":
8344
- case "lost": return color.error;
8345
- default: return color.textMuted;
8346
- }
8347
- }
8348
- /**
8349
- * SettingsList palette from the semantic tokens. A FUNCTION, not a
8350
- * module-level constant: `cursor` is a pre-rendered ANSI string, so a
8351
- * constant would freeze the cursor colour at module load and never follow
8352
- * a live theme switch. Call it fresh for every overlay/settings open.
8353
- */
8354
- function settingsListTheme() {
8355
- return {
8356
- label: (text, selected) => selected ? chalk.bold.hex(currentPalette.textStrong)(text) : color.text(text),
8357
- value: (text, selected) => selected ? color.primary(text) : color.textDim(text),
8358
- description: (text) => color.textDim(text),
8359
- cursor: color.primary("> "),
8360
- hint: (text) => color.textMuted(text)
8361
- };
8362
- }
8363
- /** Editor palette: focused border uses the brand token. */
8364
- const editorTheme = {
8365
- borderColor: (text) => color.border(text),
8366
- selectList: selectListTheme
8367
- };
8368
- /**
8369
- * Markdown rendering options shared by EVERY host transcript renderer
8370
- * (assistant cards, thinking blocks, plugin component compilation).
8371
- * LaTeX-to-Unicode rendering is deliberately OFF (the kimi-host parity
8372
- * choice): the Earendil 0.84.4 re-vendor introduced `renderLatex`
8373
- * defaulting to true, which silently changed how `$...$`/`$$...$$`
8374
- * segments in assistant output render. Keep the pre-re-vendor rendering;
8375
- * revisit as an explicit setting if LaTeX output ever becomes a product
8376
- * requirement.
8377
- */
8378
- const HOST_MARKDOWN_OPTIONS = { renderLatex: false };
8379
- /** Markdown palette for assistant messages. */
8380
- const markdownTheme = {
8381
- heading: (text) => chalk.bold.hex(currentPalette.textStrong)(text),
8382
- link: (text) => color.primary(text),
8383
- linkUrl: (text) => color.textMuted(text),
8384
- code: (text) => color.primary(text),
8385
- codeBlock: (text) => text,
8386
- codeBlockBorder: (text) => color.textMuted(text),
8387
- quote: (text) => color.textDim(text),
8388
- quoteBorder: (text) => color.textDim(text),
8389
- hr: (text) => color.border(text),
8390
- listBullet: (text) => color.text(text.replace(/^-/, "•")),
8391
- bold: (text) => chalk.bold(text),
8392
- italic: (text) => chalk.italic(text),
8393
- strikethrough: (text) => chalk.strikethrough(text),
8394
- underline: (text) => chalk.underline(text)
8395
- };
8396
- //#endregion
8397
8210
  //#region src/tui/presentation/terminal-text.ts
8398
8211
  /**
8399
8212
  * Untrusted-text projections for terminal-bound presentation.
@@ -8711,6 +8524,193 @@ function sanitizedPhysicalLine(text) {
8711
8524
  return sanitizeDisplayText(text).replace(/[\t\r\n]+/g, " ");
8712
8525
  }
8713
8526
  //#endregion
8527
+ //#region src/tui/theme/runtime.ts
8528
+ /**
8529
+ * The live terminal palette + ANSI/TUI theme objects (TS8-E): the ONE owner
8530
+ * of the mutable current palette and of the chalk-backed style helpers,
8531
+ * searchable-picker/settings-list/editor/markdown themes and the host
8532
+ * markdown options. Every TUI renderer and every terminal-rendering
8533
+ * extension adapter (`extension/internal/component-compiler.ts`,
8534
+ * `slot-outlet.ts`) consumes this owner; the neutral palette vocabulary and
8535
+ * built-in palettes live in `domain/display/theme.ts`.
8536
+ * @module @xmoon76/dsh-pi-tui/tui/theme/runtime
8537
+ */
8538
+ /** The active palette; style helpers read it on every call, so swapping is live. */
8539
+ let currentPalette = darkColors;
8540
+ /**
8541
+ * Switch the active palette; callers must invalidate rendered components.
8542
+ * `custom` uses the full palette in `customPalette`, or falls back to dark.
8543
+ * @param theme - the palette family.
8544
+ * @param custom - the resolved custom palette when `theme` is `custom`.
8545
+ */
8546
+ function setTheme(theme, custom) {
8547
+ if (theme === "custom" && custom !== void 0) currentPalette = withSearchCurrentTokens(custom);
8548
+ else currentPalette = theme === "light" ? lightColors : darkColors;
8549
+ }
8550
+ const chalk = new Chalk({ level: 3 });
8551
+ const hex = (token) => chalk.hex(currentPalette[token] ?? currentPalette.text);
8552
+ /** Paint text with an explicit hex colour. Brand assets (the welcome whale
8553
+ * gradient) use a fixed ramp that is NOT a semantic token: it must not
8554
+ * follow the active palette, and custom themes do not override it. */
8555
+ const hexPaint = (hexValue, text) => chalk.hex(hexValue)(text);
8556
+ /** Style helpers by token name. The strong/dim/italic helpers accept an
8557
+ * optional TONE OVERRIDE (the footer layout's semantic tone override):
8558
+ * the override replaces the token, the style stays. */
8559
+ const color = {
8560
+ primary: (text) => hex("primary")(text),
8561
+ accent: (text) => hex("accent")(text),
8562
+ text: (text) => hex("text")(text),
8563
+ textStrong: (text, tone) => chalk.bold.hex(currentPalette[tone ?? "textStrong"] ?? currentPalette.textStrong)(text),
8564
+ textDim: (text, tone) => hex(tone ?? "textDim")(text),
8565
+ textMuted: (text) => hex("textMuted")(text),
8566
+ border: (text) => hex("border")(text),
8567
+ borderFocus: (text) => hex("borderFocus")(text),
8568
+ success: (text) => hex("success")(text),
8569
+ warning: (text) => hex("warning")(text),
8570
+ error: (text) => hex("error")(text),
8571
+ diffAdded: (text) => hex("diffAdded")(text),
8572
+ diffRemoved: (text) => hex("diffRemoved")(text),
8573
+ diffAddedStrong: (text) => chalk.bold.hex(currentPalette.diffAddedStrong)(text),
8574
+ diffRemovedStrong: (text) => chalk.bold.hex(currentPalette.diffRemovedStrong)(text),
8575
+ diffGutter: (text) => hex("diffGutter")(text),
8576
+ diffMeta: (text) => hex("diffMeta")(text),
8577
+ roleUser: (text) => hex("roleUser")(text),
8578
+ /** User-bubble background paint (dsh-web `--dsw-specific-bubble`
8579
+ * parity): the whole user row reads as a floating block. The token is
8580
+ * optional — an absent `roleUserBg` makes this an identity function. */
8581
+ roleUserBg: (text) => currentPalette.roleUserBg === void 0 ? text : chalk.bgHex(currentPalette.roleUserBg)(text),
8582
+ shellMode: (text) => hex("shellMode")(text),
8583
+ /** Ordinary visible transcript-search occurrence: explicit themed ink on a
8584
+ * yellow block, separate from the current occurrence. */
8585
+ searchMatch: (text) => chalk.hex(currentPalette.searchMatchFg ?? currentPalette.text).bgHex(currentPalette.searchMatchBg ?? currentPalette.warning)(text),
8586
+ /** The current card's REAL visible title/anchor when the exact source cells
8587
+ * cannot be proven. Same orange role as the current block but deliberately not
8588
+ * bold: the bold current style is reserved for a Full source-proven cell or
8589
+ * View's current mounted rendered occurrence. */
8590
+ searchCardAnchor: (text) => chalk.hex(currentPalette.searchCurrentFg ?? currentPalette.textStrong).bgHex(currentPalette.searchCurrentBg ?? currentPalette.primary)(text),
8591
+ /** The current search occurrence (Full source-proven, or View's current
8592
+ * mounted rendered occurrence): bold with an explicit themed
8593
+ * foreground AND background. NEVER the terminal's inverse attribute — a
8594
+ * palette that omits the tokens has them filled at apply time
8595
+ * ({@link withSearchCurrentTokens}), and this helper's own derivation stays
8596
+ * inside the palette. */
8597
+ searchCurrent: (text) => chalk.bold.hex(currentPalette.searchCurrentFg ?? currentPalette.textStrong).bgHex(currentPalette.searchCurrentBg ?? currentPalette.primary)(text),
8598
+ /** The LEGACY anchor-only ROW wash used when no visible card-anchor geometry
8599
+ * (header or first visible non-image text row) is available: it marks only the
8600
+ * owning row, never a proven occurrence, and ordinary query words on that row
8601
+ * keep their yellow block. A card with visible anchor geometry uses
8602
+ * {@link searchCardAnchor} instead. */
8603
+ searchAnchorBg: (text) => chalk.bgHex(currentPalette.searchAnchorBg ?? currentPalette.border)(text),
8604
+ /** Plain italics (kimi thinking parity); an optional tone override
8605
+ * colors the italic run. */
8606
+ italic: (text, tone) => tone === void 0 ? chalk.italic(text) : chalk.italic.hex(currentPalette[tone] ?? currentPalette.text)(text),
8607
+ /** Dim + italic for reasoning: intermediate thinking never reads like output. */
8608
+ textDimItalic: (text) => chalk.italic.hex(currentPalette.textDim)(text)
8609
+ };
8610
+ /** SearchablePicker palette from the semantic tokens (a structural
8611
+ * superset of the upstream SelectListTheme, so it still satisfies the
8612
+ * Editor's autocomplete theme slot). */
8613
+ const selectListTheme = {
8614
+ selectedPrefix: (text) => color.primary(text),
8615
+ selectedText: (text) => chalk.bold.hex(currentPalette.textStrong)(text),
8616
+ description: (text) => color.textDim(text),
8617
+ scrollInfo: (text) => color.textMuted(text),
8618
+ noMatch: (text) => color.textMuted(text),
8619
+ groupHeader: (text) => color.textDim(text)
8620
+ };
8621
+ /**
8622
+ * The readable half of a task/job state: the Title Case status WORD that
8623
+ * carries the shared `‣` marker (design language `docs/architecture/design-language.md`
8624
+ * §3.2 role 9 — colour is never the only signal, §3.3.3). The word is paired
8625
+ * with {@link taskStatusColor}'s token; the two must stay one vocabulary, so
8626
+ * this map lives beside the colour map (`docs/architecture/design-language.md` §10) and
8627
+ * is never forked.
8628
+ *
8629
+ * A status the map does not name is Title-cased verbatim: the surface may not
8630
+ * rename a real state it does not know, and a future wire status must still
8631
+ * paint a readable word.
8632
+ */
8633
+ function taskStatusWord(status) {
8634
+ switch (status) {
8635
+ case "running": return "Running";
8636
+ case "stopping": return "Stopping";
8637
+ case "completed": return "Completed";
8638
+ case "failed": return "Failed";
8639
+ case "killed": return "Killed";
8640
+ case "timed_out": return "Timed out";
8641
+ case "lost": return "Lost";
8642
+ case "inactive": return "Inactive";
8643
+ case "awaiting answer": return "Awaiting answer";
8644
+ default: return status.charAt(0).toUpperCase() + status.slice(1);
8645
+ }
8646
+ }
8647
+ /**
8648
+ * Status-dot colour for a job status (dsh-web StateDot parity:
8649
+ * running = ongoing/primary, stopping/killed = warning, completed = done/dim,
8650
+ * failed/timed-out/lost = error). Unknown statuses fall back to the
8651
+ * muted token so a future wire status never crashes the renderer.
8652
+ */
8653
+ function taskStatusColor(status) {
8654
+ switch (status) {
8655
+ case "running": return color.primary;
8656
+ case "stopping": return color.warning;
8657
+ case "completed": return color.textDim;
8658
+ case "failed":
8659
+ case "killed": return color.warning;
8660
+ case "timed_out":
8661
+ case "lost": return color.error;
8662
+ default: return color.textMuted;
8663
+ }
8664
+ }
8665
+ /**
8666
+ * SettingsList palette from the semantic tokens. A FUNCTION, not a
8667
+ * module-level constant: `cursor` is a pre-rendered ANSI string, so a
8668
+ * constant would freeze the cursor colour at module load and never follow
8669
+ * a live theme switch. Call it fresh for every overlay/settings open.
8670
+ */
8671
+ function settingsListTheme() {
8672
+ return {
8673
+ label: (text, selected) => selected ? chalk.bold.hex(currentPalette.textStrong)(text) : color.text(text),
8674
+ value: (text, selected) => selected ? color.primary(text) : color.textDim(text),
8675
+ description: (text) => color.textDim(text),
8676
+ cursor: color.primary("> "),
8677
+ hint: (text) => color.textMuted(text)
8678
+ };
8679
+ }
8680
+ /** Editor palette: focused border uses the brand token. */
8681
+ const editorTheme = {
8682
+ borderColor: (text) => color.border(text),
8683
+ selectList: selectListTheme
8684
+ };
8685
+ /**
8686
+ * Markdown rendering options shared by EVERY host transcript renderer
8687
+ * (assistant cards, thinking blocks, plugin component compilation).
8688
+ * LaTeX-to-Unicode rendering is deliberately OFF (the kimi-host parity
8689
+ * choice): the Earendil 0.84.4 re-vendor introduced `renderLatex`
8690
+ * defaulting to true, which silently changed how `$...$`/`$$...$$`
8691
+ * segments in assistant output render. Keep the pre-re-vendor rendering;
8692
+ * revisit as an explicit setting if LaTeX output ever becomes a product
8693
+ * requirement.
8694
+ */
8695
+ const HOST_MARKDOWN_OPTIONS = { renderLatex: false };
8696
+ /** Markdown palette for assistant messages. */
8697
+ const markdownTheme = {
8698
+ heading: (text) => chalk.bold.hex(currentPalette.textStrong)(text),
8699
+ link: (text) => color.primary(text),
8700
+ linkUrl: (text) => color.textMuted(text),
8701
+ code: (text) => color.primary(text),
8702
+ codeBlock: (text) => text,
8703
+ codeBlockBorder: (text) => color.textMuted(text),
8704
+ quote: (text) => color.textDim(text),
8705
+ quoteBorder: (text) => color.textDim(text),
8706
+ hr: (text) => color.border(text),
8707
+ listBullet: (text) => color.text(text.replace(/^-/, "•")),
8708
+ bold: (text) => chalk.bold(text),
8709
+ italic: (text) => chalk.italic(text),
8710
+ strikethrough: (text) => chalk.strikethrough(text),
8711
+ underline: (text) => chalk.underline(text)
8712
+ };
8713
+ //#endregion
8714
8714
  //#region src/tui/pickers/model-directory.ts
8715
8715
  const IDENTITY_SEP = "\0";
8716
8716
  const PROVIDER_DEFAULT = `${IDENTITY_SEP}provider-default`;
@@ -10739,8 +10739,7 @@ function sanitizeTerminalText(value) {
10739
10739
  function sessionBrowserErrorNotice(kind, message) {
10740
10740
  const safe = sanitizeTerminalText(message).replace(/\s+\(raw log: .*\)$/u, "");
10741
10741
  const unknownEvent = /contains event type "([^"]+)"/u.exec(safe)?.[1];
10742
- const text = unknownEvent === void 0 ? `${kind === "search" ? "Search failed" : "Session details unavailable"}: ${safe}` : `unknown event ${unknownEvent}`;
10743
- return truncateToWidth(text, 40, "…");
10742
+ return unknownEvent === void 0 ? `${kind === "search" ? "Search failed" : "Session details unavailable"}: ${safe}` : `unknown event ${unknownEvent}`;
10744
10743
  }
10745
10744
  //#endregion
10746
10745
  //#region src/tui/icons.ts
@@ -22881,4 +22880,4 @@ const EMPTY_TURN_SET = /* @__PURE__ */ new Set();
22881
22880
  const EMPTY_TURN_ACTIVITIES = /* @__PURE__ */ new Map();
22882
22881
  const EMPTY_ASSISTANT_STATS = /* @__PURE__ */ new Map();
22883
22882
  //#endregion
22884
- export { effectiveWorkflowRunOpen as $, welcomeWhaleGradientColors as $n, createBoundedFinderCandidateCollector as $r, askAnswersLines as $t, summarizeWorkSpan as A, SVG_TOOL_NAME as Ai, admitSvg as An, modelIdentity as Ar, authorizeSvg as At, FocusActivityComponent as B, userBlocksVisibleNow as Bi, formatSessionAge as Bn, markdownTheme as Br, workspaceRowStatusLabel as Bt, proveCaretEdit as C, textOf as Ci, toolIconSemantic as Cn, matchesKeyId as Cr, setAssistantVisualPresentation as Ct, contextClusterSummaryParts as D, transcriptSearchSourceKey as Di, webCardLines as Dn, PROVIDER_DEFAULT as Dr, visualFactLine as Dt, FocusTimingStore as E, transcriptSearchMatchKey as Ei, toolTitle as En, presetDisplayText as Er, isModelOnlyReplacement as Et, clusterByMemberOf as F, isSurfacedInteractionTool as Fi, imageProtocolPreference as Fn, sanitizeDisplaySegment as Fr, SESSION_PENDING_LABEL as Ft, compactActionSlotLine as G, historyFilePath as Gi, chooseListedSession as Gn, taskStatusWord as Gr, subagentJobTranscriptId as Gt, formatCompactDuration as H, isAssistantTokenDelta as Hi, sessionBrowserErrorNotice as Hn, setTheme as Hr, isTaskItemFailure as Ht, isFoldableWorkContext as I, latestLine as Ii, thinkingPreviewTail as In, sanitizeDisplayText as Ir, SESSION_SOURCE_LABEL as It, compactSlotLine as J, sessionRowMatchesQuery as Jn, ClientLocalDiscoveryDriver as Jr, taskRowSelectionDisposition as Jt, compactActionStatsSignature as K, loadHistoryFile as Ki, findSessionMatch as Kn, FILE_ARGUMENT_COMMANDS as Kr, subagentJobViewHint as Kt, projectTranscriptStructure as L, finalizedBlockFallbackText as Li, iconFor as Ln, HOST_MARKDOWN_OPTIONS as Lr, buildSessionWorkspaceView as Lt, consecutiveTurnGroup as M, isVisualToolName as Mi, SVG_MAX_RASTER_PIXELS as Mn, sanitizedPhysicalLine as Mr, svgDigest as Mt, focusProjectionTurnOf as N, recentTurnThreshold as Ni, SVG_MAX_RASTER_SIDE as Nn, singlePhysicalLine as Nr, chartDisplayTitle as Nt, activityClockOf as O, workflowReadablePhase as Oi, writeFoldedPreview as On, effortChoicesOf as Or, visualPartsForStatus as Ot, projectFocus as P, isSurfacedContext as Pi, SVG_RASTER_TIMEOUT_MS as Pn, sanitizeDisplayLog as Pr, chartTextRows as Pt, effectiveWorkflowPhaseOpen as Q, renderWelcomeWhaleLines as Qn, escapeFinderRegex as Qr, GOAL_TOOL_NAMES as Qt, workByMemberOf as R, openOpaqueBlockFallbackText as Ri, iconLead as Rn, color as Rr, currentWorkspaceOf as Rt, pastedBodySpan as S, subCallDisplayStatus as Si, toolCardHeader as Sn, formatLeaderSequence as Sr, clearAssistantVisualPresentation as St, isLocalShellCard as T, rawSourceRangeForNormalizedMatch as Ti, toolSummaryKeys as Tn, isBuiltInPresetRow as Tr, collectPublishedVisuals as Tt, compactActionPresentation as U, usageFromAssistantSettlement as Ui, workspaceKey as Un, settingsListTheme as Ur, projectTaskItems as Ut, compactActionStatParts as V, StepUsageAccumulator as Vi, sanitizeTerminalText as Vn, selectListTheme as Vr, isTaskItemActive as Vt, compactActionSignature as W, appendHistoryRecord as Wi, canonicalFullSessionId as Wn, taskStatusColor as Wr, rowGroup as Wt, createDisplayProjection as X, WELCOME_WHALE_WIDTH as Xn, createFinderRecordStream as Xr, viewerAccessHint as Xt, compactThinkSlotLine as Y, shortSessionId as Yn, clientPathQueryEnvironment as Yr, taskTreePrefix as Yt, advanceWorkflowDisclosureState as Z, pickWelcomeWhaleVariant as Zn, discoverForQuery as Zr, FOLDED_JSON_RESULT_TOOLS as Zt, VISUAL_COPY_ROLE as _, resolveTspNativeFooterConfig as _i, relativizeToCwd as _n, TSP_VISUAL_CHORDS as _r, FileHistorySearchSource as _t, dockDraftImageNodes as a, attachmentCountLabel as ai, foldedResultSummaryFor as an, FooterItemRegistry as ar, eligibleFinalAssistant as at, publishedVisualTitle as b, assistantStepOf as bi, subagentModelDisplay as bn, formatHintKeys as br, assistantVisualPresentation as bt, imageRefProblem as c, SessionOperationBarrier as ci, goalResultSummary as cn, HISTORY_CHORDS as cr, stripAtQuotes as ct, visibleTranscriptMembers as d, createSessionScopeAuthority as di, parseCallPreview as dn, SESSION_WORKSPACE_CHORDS as dr, splitTokenRemainder as dt, rankPathCandidates as ei, askAnswersSummary as en, welcomeWhalePlainLines as er, workflowCountsText as et, TSP_WORKFLOW_BROWSE_ACTION as f, darkColors as fi, parseImageEnvelope as fn, SVG_VIEWER_CHORDS as fr, extractInlineSkillPrefix as ft, VISUAL_COPY_KEY as g, TSP_FOOTER_NOTICES as gi, readFoldedPreview as gn, TSP_SEARCH_CHORD_LABEL as gr, shellPrefixForMode as gt, VISUAL_COPY_ACTION as h, withSearchCurrentTokens as hi, parseWriteEnvelope as hn, TSP_SEARCH_CHORD as hr, serializedDraftHasPayload as ht, describeTranscriptMainBlocksForPreset as i, QueueManagerController as ii, foldedCallPreview as in, tasksItem as ir, workflowStatusCounts as it, projectCompact as j, humanFacingVisualResult as ji, SVG_MAX_PNG_BYTES as jn, projectModelDirectory as jr, svgDetailRows as jt, resolveWorkLifetimes as k, PRESENT_VISUAL_TOOL_NAME as ki, fileAttachmentSummary as kn, initialEffortOf as kr, visualPartsFromText as kt, toolRowImageBlocks as l, TransitionInProgressError as li, imageFoldedPreview as ln, JOB_LOCAL_KEYS as lr, isOpenQuotedToken as lt, transcriptCopyPayload as m, lightColors as mi, parseSkillEnvelope as mn, TSP_CONTINUED_INSPECTION_LABEL as mr, serializeEditorInput as mt, TranscriptNodeKeys as n, resolvePathQuery as ni, compactToolPresentation as nn, createBuiltinFooterRegistry as nr, workflowRunSummaryText as nt, imageDisplayName as o, queueManagerCommandResult as oi, genericRawInputLines as on, shortCwd as or, createInstalledAutocompleteProvider as ot, TRANSCRIPT_COPY_ACTION as p, detectThemeFromBackground as pi, parseReadEnvelopes as pn, SVG_VIEWER_SCROLL_LABEL as pr, editorModeFromHistoryEntry as pt, compactPreparingSummary as q, loadHistoryRecords as qi, sanitizeSessionSearchInput as qn, suggestPathArgument as qr, taskRowLabel as qt, describeTranscriptMainBlocks as r, separatorOfRaw as ri, firstLine as rn, modelItem as rr, workflowRunViewAllVisible as rt, imageIdentityText as s, formatBytes as si, goalResultLines as sn, DELIVERED_FILES_CHORDS as sr, classifyFileCompletionContext as st, MAX_IMAGE_BLOB_BYTES as t, reattachDisplayBase as ti, compactToolExpandedLines as tn, FooterCustomItemCatalog as tr, workflowPhasePresentations as tt, toolRowProjectsImages as u, SessionScopeSupersededError as ui, isCompactActionTool as un, QUEUE_CHORDS as ur, splitQueryRemainder as ut, VISUAL_FIGURE_KEY_PREFIX as v, TranscriptFolder as vi, resultTextLines as vn, TSP_VISUAL_COPY_LABEL as vr, createHistoryRecallScope as vt, candidateImagePathFromPaste as w, TranscriptWindowController as wi, toolPresenterFrom as wn, parseShellWords as wr, asVisualSessionEvents as wt, PasteRangeTracker as x, childOwnEvents as xi, systemContextBody as xn, formatKeyId as xr, assistantVisualPresentationRevision as xt, VISUAL_FIGURE_ROLE as y, assistantPresentationRevision as yi, skillFoldedPreview as yn, TSP_VISUAL_SELECT_LABEL as yr, planVisualPlacement as yt, contextPresentationKind as z, textWithAttachmentMarkers as zi, iconPrefix as zn, editorTheme as zr, visibleWorkspaceBrowserRows as zt };
22883
+ export { effectiveWorkflowRunOpen as $, welcomeWhaleGradientColors as $n, createBoundedFinderCandidateCollector as $r, askAnswersLines as $t, summarizeWorkSpan as A, SVG_TOOL_NAME as Ai, admitSvg as An, modelIdentity as Ar, authorizeSvg as At, FocusActivityComponent as B, userBlocksVisibleNow as Bi, formatSessionAge as Bn, taskStatusWord as Br, workspaceRowStatusLabel as Bt, proveCaretEdit as C, textOf as Ci, toolIconSemantic as Cn, matchesKeyId as Cr, setAssistantVisualPresentation as Ct, contextClusterSummaryParts as D, transcriptSearchSourceKey as Di, webCardLines as Dn, PROVIDER_DEFAULT as Dr, visualFactLine as Dt, FocusTimingStore as E, transcriptSearchMatchKey as Ei, toolTitle as En, presetDisplayText as Er, isModelOnlyReplacement as Et, clusterByMemberOf as F, isSurfacedInteractionTool as Fi, imageProtocolPreference as Fn, markdownTheme as Fr, SESSION_PENDING_LABEL as Ft, compactActionSlotLine as G, historyFilePath as Gi, chooseListedSession as Gn, sanitizeDisplayText as Gr, subagentJobTranscriptId as Gt, formatCompactDuration as H, isAssistantTokenDelta as Hi, sessionBrowserErrorNotice as Hn, singlePhysicalLine as Hr, isTaskItemFailure as Ht, isFoldableWorkContext as I, latestLine as Ii, thinkingPreviewTail as In, selectListTheme as Ir, SESSION_SOURCE_LABEL as It, compactSlotLine as J, sessionRowMatchesQuery as Jn, ClientLocalDiscoveryDriver as Jr, taskRowSelectionDisposition as Jt, compactActionStatsSignature as K, loadHistoryFile as Ki, findSessionMatch as Kn, FILE_ARGUMENT_COMMANDS as Kr, subagentJobViewHint as Kt, projectTranscriptStructure as L, finalizedBlockFallbackText as Li, iconFor as Ln, setTheme as Lr, buildSessionWorkspaceView as Lt, consecutiveTurnGroup as M, isVisualToolName as Mi, SVG_MAX_RASTER_PIXELS as Mn, HOST_MARKDOWN_OPTIONS as Mr, svgDigest as Mt, focusProjectionTurnOf as N, recentTurnThreshold as Ni, SVG_MAX_RASTER_SIDE as Nn, color as Nr, chartDisplayTitle as Nt, activityClockOf as O, workflowReadablePhase as Oi, writeFoldedPreview as On, effortChoicesOf as Or, visualPartsForStatus as Ot, projectFocus as P, isSurfacedContext as Pi, SVG_RASTER_TIMEOUT_MS as Pn, editorTheme as Pr, chartTextRows as Pt, effectiveWorkflowPhaseOpen as Q, renderWelcomeWhaleLines as Qn, escapeFinderRegex as Qr, GOAL_TOOL_NAMES as Qt, workByMemberOf as R, openOpaqueBlockFallbackText as Ri, iconLead as Rn, settingsListTheme as Rr, currentWorkspaceOf as Rt, pastedBodySpan as S, subCallDisplayStatus as Si, toolCardHeader as Sn, formatLeaderSequence as Sr, clearAssistantVisualPresentation as St, isLocalShellCard as T, rawSourceRangeForNormalizedMatch as Ti, toolSummaryKeys as Tn, isBuiltInPresetRow as Tr, collectPublishedVisuals as Tt, compactActionPresentation as U, usageFromAssistantSettlement as Ui, workspaceKey as Un, sanitizeDisplayLog as Ur, projectTaskItems as Ut, compactActionStatParts as V, StepUsageAccumulator as Vi, sanitizeTerminalText as Vn, sanitizedPhysicalLine as Vr, isTaskItemActive as Vt, compactActionSignature as W, appendHistoryRecord as Wi, canonicalFullSessionId as Wn, sanitizeDisplaySegment as Wr, rowGroup as Wt, createDisplayProjection as X, WELCOME_WHALE_WIDTH as Xn, createFinderRecordStream as Xr, viewerAccessHint as Xt, compactThinkSlotLine as Y, shortSessionId as Yn, clientPathQueryEnvironment as Yr, taskTreePrefix as Yt, advanceWorkflowDisclosureState as Z, pickWelcomeWhaleVariant as Zn, discoverForQuery as Zr, FOLDED_JSON_RESULT_TOOLS as Zt, VISUAL_COPY_ROLE as _, resolveTspNativeFooterConfig as _i, relativizeToCwd as _n, TSP_VISUAL_CHORDS as _r, FileHistorySearchSource as _t, dockDraftImageNodes as a, attachmentCountLabel as ai, foldedResultSummaryFor as an, FooterItemRegistry as ar, eligibleFinalAssistant as at, publishedVisualTitle as b, assistantStepOf as bi, subagentModelDisplay as bn, formatHintKeys as br, assistantVisualPresentation as bt, imageRefProblem as c, SessionOperationBarrier as ci, goalResultSummary as cn, HISTORY_CHORDS as cr, stripAtQuotes as ct, visibleTranscriptMembers as d, createSessionScopeAuthority as di, parseCallPreview as dn, SESSION_WORKSPACE_CHORDS as dr, splitTokenRemainder as dt, rankPathCandidates as ei, askAnswersSummary as en, welcomeWhalePlainLines as er, workflowCountsText as et, TSP_WORKFLOW_BROWSE_ACTION as f, darkColors as fi, parseImageEnvelope as fn, SVG_VIEWER_CHORDS as fr, extractInlineSkillPrefix as ft, VISUAL_COPY_KEY as g, TSP_FOOTER_NOTICES as gi, readFoldedPreview as gn, TSP_SEARCH_CHORD_LABEL as gr, shellPrefixForMode as gt, VISUAL_COPY_ACTION as h, withSearchCurrentTokens as hi, parseWriteEnvelope as hn, TSP_SEARCH_CHORD as hr, serializedDraftHasPayload as ht, describeTranscriptMainBlocksForPreset as i, QueueManagerController as ii, foldedCallPreview as in, tasksItem as ir, workflowStatusCounts as it, projectCompact as j, humanFacingVisualResult as ji, SVG_MAX_PNG_BYTES as jn, projectModelDirectory as jr, svgDetailRows as jt, resolveWorkLifetimes as k, PRESENT_VISUAL_TOOL_NAME as ki, fileAttachmentSummary as kn, initialEffortOf as kr, visualPartsFromText as kt, toolRowImageBlocks as l, TransitionInProgressError as li, imageFoldedPreview as ln, JOB_LOCAL_KEYS as lr, isOpenQuotedToken as lt, transcriptCopyPayload as m, lightColors as mi, parseSkillEnvelope as mn, TSP_CONTINUED_INSPECTION_LABEL as mr, serializeEditorInput as mt, TranscriptNodeKeys as n, resolvePathQuery as ni, compactToolPresentation as nn, createBuiltinFooterRegistry as nr, workflowRunSummaryText as nt, imageDisplayName as o, queueManagerCommandResult as oi, genericRawInputLines as on, shortCwd as or, createInstalledAutocompleteProvider as ot, TRANSCRIPT_COPY_ACTION as p, detectThemeFromBackground as pi, parseReadEnvelopes as pn, SVG_VIEWER_SCROLL_LABEL as pr, editorModeFromHistoryEntry as pt, compactPreparingSummary as q, loadHistoryRecords as qi, sanitizeSessionSearchInput as qn, suggestPathArgument as qr, taskRowLabel as qt, describeTranscriptMainBlocks as r, separatorOfRaw as ri, firstLine as rn, modelItem as rr, workflowRunViewAllVisible as rt, imageIdentityText as s, formatBytes as si, goalResultLines as sn, DELIVERED_FILES_CHORDS as sr, classifyFileCompletionContext as st, MAX_IMAGE_BLOB_BYTES as t, reattachDisplayBase as ti, compactToolExpandedLines as tn, FooterCustomItemCatalog as tr, workflowPhasePresentations as tt, toolRowProjectsImages as u, SessionScopeSupersededError as ui, isCompactActionTool as un, QUEUE_CHORDS as ur, splitQueryRemainder as ut, VISUAL_FIGURE_KEY_PREFIX as v, TranscriptFolder as vi, resultTextLines as vn, TSP_VISUAL_COPY_LABEL as vr, createHistoryRecallScope as vt, candidateImagePathFromPaste as w, TranscriptWindowController as wi, toolPresenterFrom as wn, parseShellWords as wr, asVisualSessionEvents as wt, PasteRangeTracker as x, childOwnEvents as xi, systemContextBody as xn, formatKeyId as xr, assistantVisualPresentationRevision as xt, VISUAL_FIGURE_ROLE as y, assistantPresentationRevision as yi, skillFoldedPreview as yn, TSP_VISUAL_SELECT_LABEL as yr, planVisualPlacement as yt, contextPresentationKind as z, textWithAttachmentMarkers as zi, iconPrefix as zn, taskStatusColor as zr, visibleWorkspaceBrowserRows as zt };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xmoon76/dsh-pi-tui",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "The dsh-pi-tui bundle: a TUI surface for DeepSeek Harness profiles (dsh --profile pi-tui)",
5
5
  "license": "MIT",
6
6
  "author": "XMoon <xmoonox@gmail.com>",
@@ -114,7 +114,6 @@
114
114
  "commander": "^15.0.0",
115
115
  "diff": "^9.0.0",
116
116
  "get-east-asian-width": "1.6.0",
117
- "koffi": "3.3.8",
118
117
  "marked": "18.0.5",
119
118
  "marked-cjk-friendly": "0.1.2",
120
119
  "saxes": "6.0.0",
@@ -141,7 +140,6 @@
141
140
  "@deepseek-ai/dsh-authorization": ">=0.2.2-rc.3",
142
141
  "@deepseek-ai/dsh-client-connection": ">=0.2.2-rc.3",
143
142
  "@deepseek-ai/dsh-client-file-upload": ">=0.2.2-rc.3",
144
- "@deepseek-ai/dsh-client-store": ">=0.2.2-rc.3",
145
143
  "@deepseek-ai/dsh-cmdline": ">=0.2.2-rc.3",
146
144
  "@deepseek-ai/dsh-commands": ">=0.2.2-rc.3",
147
145
  "@deepseek-ai/dsh-credentials": ">=0.2.2-rc.3",
@@ -320,13 +318,14 @@
320
318
  "@types/ws": "8.18.1",
321
319
  "@xmoon76/pi-tui": "^1.1.0",
322
320
  "@xterm/headless": "5.5.0",
323
- "immer": "^10.1.1",
321
+ "immer": "10.2.0",
322
+ "koffi": "3.1.1",
324
323
  "semver": "7.8.5",
325
324
  "tar": "7.5.23",
326
325
  "tsdown": "0.22.0",
327
326
  "tsx": "^4.23.12",
328
327
  "typescript": "^5.9.0",
329
- "zustand": "~4.4.7"
328
+ "zustand": "4.5.7"
330
329
  },
331
330
  "engines": {
332
331
  "node": ">=24.9.0",
@@ -367,6 +366,7 @@
367
366
  "smoke:remote-session-lifecycle-parity": "node scripts/dsh-remote-session-lifecycle-parity-smoke.mjs",
368
367
  "smoke:boundary": "node scripts/dsh-runtime-boundary-smoke.mjs",
369
368
  "smoke:split-process": "node scripts/split-process-smoke.mjs",
369
+ "smoke:fresh-profile": "node scripts/fresh-profile-install-smoke.mjs",
370
370
  "smoke:macos-split": "node scripts/smoke/macos-split-parity.mjs",
371
371
  "smoke:split-upgrade": "node scripts/split-process-upgrade-smoke.mjs",
372
372
  "smoke:startup-strictness": "node scripts/startup-strictness-smoke.mjs",
@@ -409,7 +409,7 @@
409
409
  "smoke:direct-empty-retirement": "node scripts/direct-empty-session-retirement-smoke.mjs",
410
410
  "pack:artifact": "rm -f xmoon76-dsh-pi-tui-*.tgz && pnpm pack --config.ignore-scripts=true --pack-destination .",
411
411
  "smoke:release": "node scripts/qualify-tarball.mjs",
412
- "pack:release": "pnpm clean && pnpm clean:fork && pnpm build && pnpm typecheck:bundle && pnpm test:product && pnpm pack:artifact && pnpm smoke:release",
412
+ "pack:release": "pnpm clean && pnpm clean:fork && pnpm build && pnpm typecheck:bundle && pnpm test:product && pnpm pack:artifact && pnpm smoke:release && pnpm smoke:fresh-profile",
413
413
  "check:gates": "node scripts/run-quality-gates.mjs",
414
414
  "check": "pnpm build:fork && pnpm typecheck && pnpm test:tooling && pnpm check:gates",
415
415
  "verify:release": "pnpm typecheck:fork && pnpm typecheck:bench && pnpm test:fork && pnpm test:tmux && pnpm test:tooling && pnpm check:gates -- --skip gate:pi-surface-compat && pnpm audit --prod --audit-level high && pnpm pack:release",
@@ -1,91 +0,0 @@
1
- import { d as readInstalledDshVersion } from "./local-scope-DEuGAy8l.mjs";
2
- import "./entry-control-jBfKn1qO.mjs";
3
- import { createRequire } from "node:module";
4
- import { readFileSync, realpathSync } from "node:fs";
5
- import { dirname, join } from "node:path";
6
- import "node:url";
7
- import "node:os";
8
- import "node:child_process";
9
- //#region src/app/remote-process/daemon-launcher.ts
10
- /**
11
- * Resolve this installed bundle's package root through the OFFICIAL profile
12
- * resolution. The launcher module itself may be reached through a symlinked
13
- * `dist`, so its own module URL is not a reliable package-root locator.
14
- * Exported for the M6 UX PR2 Direct-side admin port, which must reuse the SAME
15
- * official Profile resolution as this CLI path — never a second copy.
16
- */
17
- function resolveProfilePackageRoot(profileDir) {
18
- let manifestPath;
19
- try {
20
- manifestPath = createRequire(join(profileDir, "package.json")).resolve("@xmoon76/dsh-pi-tui/package.json");
21
- } catch (error) {
22
- throw new Error("pi-tui daemon launcher: the official profile does not resolve the installed @xmoon76/dsh-pi-tui", { cause: error });
23
- }
24
- const root = realpathSync(dirname(manifestPath));
25
- let manifest;
26
- try {
27
- manifest = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
28
- } catch (error) {
29
- throw new Error("pi-tui daemon launcher: the installed package manifest is not readable", { cause: error });
30
- }
31
- if (manifest === null || typeof manifest !== "object" || manifest.name !== "@xmoon76/dsh-pi-tui") throw new Error("pi-tui daemon launcher: the official profile resolves a different package");
32
- return root;
33
- }
34
- //#endregion
35
- //#region src/app/remote-process/local-profile-daemon-admin.ts
36
- /**
37
- * Bind the EXACT official Profile facts to the existing control plane.
38
- *
39
- * The profile is captured by value here: callers pass the profile their process
40
- * composition already verified (the Host `profileContext` on Direct, the split
41
- * Client entry's official `profileDir`/`dshHome`/`packageRoot`/anchor facts on
42
- * Daemon). Nothing is re-resolved from argv, cwd or an environment guess later.
43
- * @param profile - the official Profile facts this process belongs to.
44
- * @param deps - the bound run seam.
45
- * @returns the port the Settings follow-up and the final exit root consume.
46
- */
47
- function createProfileDaemonAdmin(profile, deps) {
48
- const bound = Object.freeze({ ...profile });
49
- return Object.freeze({
50
- profile: bound.name,
51
- run: (verb) => deps.run(verb)
52
- });
53
- }
54
- /**
55
- * The production run seam for ONE official Profile. The existing
56
- * `local-daemon-control` module is imported lazily so that neither a cold
57
- * launch nor a Settings read pulls the OS managers into the process graph; it
58
- * also keeps `src/app/bootstrap.ts` free of a static manager dependency.
59
- * @param profile - the official Profile facts.
60
- * @returns the unbound run function the port is built over.
61
- */
62
- function profileDaemonAdminRun(profile, deps = {}) {
63
- return async (verb) => {
64
- const { runDaemonControl } = await import("./local-daemon-control-Bg9s2aYi.mjs");
65
- return await runDaemonControl({ verb }, profile, deps);
66
- };
67
- }
68
- /**
69
- * Resolve the Direct-side admin Profile from the SAME official Host
70
- * `profileContext` the CLI cold-control path consumes, with the SAME
71
- * installed-package resolution (`daemon-launcher.resolveProfilePackageRoot` +
72
- * `readInstalledDshVersion`). This proves the local install capability WITHOUT
73
- * loading the OS managers: it reads the profile manifest and the installed DSH
74
- * version only, never a Host/manager probe.
75
- * @param profileContext - the official Host profile facts.
76
- * @returns the bound Profile facts, or `undefined` when the installed profile
77
- * cannot be proven — the caller then offers no install/stop action (fail
78
- * closed) instead of falling back to a guessed identity.
79
- */ function resolveDirectDaemonAdminProfile(profileContext) {
80
- const packageRoot = resolveProfilePackageRoot(profileContext.dir);
81
- return {
82
- name: profileContext.name,
83
- dir: profileContext.dir,
84
- home: profileContext.home,
85
- installAnchor: profileContext.installAnchor,
86
- packageRoot,
87
- dshVersion: readInstalledDshVersion(profileContext.installAnchor)
88
- };
89
- }
90
- //#endregion
91
- export { profileDaemonAdminRun as n, resolveDirectDaemonAdminProfile as r, createProfileDaemonAdmin as t };