@xmoon76/dsh-pi-tui 0.5.8 → 0.5.9

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 (77) hide show
  1. package/README.en.md +61 -25
  2. package/README.md +61 -25
  3. package/cordis.patch.yml +13 -0
  4. package/dist/acp-stdio.mjs +151 -0
  5. package/dist/{bootstrap-CMIjGyuk.mjs → bootstrap-CVyHGQDX.mjs} +21901 -6575
  6. package/dist/browser-CDUSHIIr.mjs +76 -0
  7. package/dist/builtins.mjs +2 -2
  8. package/dist/{client-bootstrap-BjGPc-DM.mjs → client-bootstrap-4UoeVIHE.mjs} +2488 -2734
  9. package/dist/client-runtime-BHBlVUf5.mjs +1376 -0
  10. package/dist/{daemon-launcher-Dult7Jxv.mjs → daemon-launcher-DxIgjBHW.mjs} +1549 -172
  11. package/dist/daemon-launcher.d.mts +85 -14
  12. package/dist/daemon-launcher.mjs +2 -2
  13. package/dist/{local-profile-daemon-admin-BmQSdzT0.mjs → diagnostics-Db5iVcuJ.mjs} +3 -90
  14. package/dist/{entry-control-DjNsE3I0.mjs → entry-control-BDLZgg4m.mjs} +1 -1
  15. package/dist/{extensions-B4uLpSTv.mjs → extensions-Dx7ncPNA.mjs} +1 -1
  16. package/dist/extensions.mjs +1 -1
  17. package/dist/handoff-BjoEy3f8.mjs +106 -0
  18. package/dist/history-search-limits-Cx2UvRC2.mjs +16 -0
  19. package/dist/history-search-remote-BHuoellG.mjs +113 -0
  20. package/dist/history-search-remote-BzXdvrxk.mjs +26 -0
  21. package/dist/history-search-seat-BcHJTpeB.mjs +639 -0
  22. package/dist/history-search-seat-rZcq0XV6.mjs +639 -0
  23. package/dist/{host-bootstrap-MVxks641.mjs → host-bootstrap-BfnufpnW.mjs} +37 -72
  24. package/dist/{host-foundation-probe-DMNTmNrH.mjs → host-foundation-probe-DlD8-N_Q.mjs} +2 -2
  25. package/dist/host-runtime.mjs +5611 -290
  26. package/dist/index.d.mts +13 -6
  27. package/dist/index.mjs +22334 -6695
  28. package/dist/installed-dsh-BjUiJSwR.mjs +142 -0
  29. package/dist/interaction-port-D1Yv9zgu.mjs +45 -0
  30. package/dist/local-acp-control-CC5z4Xbq.mjs +304 -0
  31. package/dist/local-acp-endpoint-D1jYdJdv.mjs +41 -0
  32. package/dist/local-acp-listener-Cmgb5M0H.mjs +9493 -0
  33. package/dist/local-acp-status-B_25Q6kU.mjs +101 -0
  34. package/dist/local-client.mjs +292 -63
  35. package/dist/local-daemon-control-BFJAC8Kg.mjs +2199 -0
  36. package/dist/local-daemon-control-Bm3imctD.mjs +2101 -0
  37. package/dist/{local-discovery-uOBfFq5j.mjs → local-discovery-BMhaGIiJ.mjs} +254 -544
  38. package/dist/{local-discovery-egN4_gsQ.mjs → local-discovery-Ba7_-NNC.mjs} +1 -1
  39. package/dist/{local-discovery-DOSsCh9q.mjs → local-discovery-QSbFpjK2.mjs} +301 -544
  40. package/dist/local-host.mjs +952 -501
  41. package/dist/local-profile-daemon-admin-otpm69R6.mjs +469 -0
  42. package/dist/{local-scope-DamiMqPd.mjs → local-scope-5DEKA_lW.mjs} +1023 -96
  43. package/dist/{local-transport-Iwo0mtu3.mjs → local-transport-DeWmdZ5E.mjs} +14 -3
  44. package/dist/{local-web-control-DMrjwCkl.mjs → local-web-control-Dny93N-r.mjs} +10 -7
  45. package/dist/{local-workspace-object-D06GL0UO.mjs → local-workspace-object-D0RVQt8U.mjs} +33 -9
  46. package/dist/model-selection-CYlqg2DV.mjs +83 -0
  47. package/dist/native-client-domains-Dg4srzYt.mjs +2 -0
  48. package/dist/native-client.d.mts +735 -0
  49. package/dist/native-client.mjs +3534 -0
  50. package/dist/{open-CmOBxSjN.mjs → open-QQva8-ar.mjs} +24 -20
  51. package/dist/{pi-tui-remote-contribution-Do8ECrUy.mjs → pi-tui-remote-contribution-565wiLWp.mjs} +741 -150
  52. package/dist/preferences.mjs +1 -1
  53. package/dist/{profile-preferences-migration-CThz4rHH.mjs → profile-preferences-migration-CNOWIdnr.mjs} +1 -1
  54. package/dist/{profile-preferences-migration-BfUGdPZx.mjs → profile-preferences-migration-IrnXcJWK.mjs} +10 -8
  55. package/dist/{prompt-sections-DXmjB58H.mjs → prompt-sections-Bi-9_Gr_.mjs} +28 -10
  56. package/dist/{prompt-sections-DUKmWb8g.mjs → prompt-sections-DFS1dqsY.mjs} +342 -56
  57. package/dist/{dist-BFgC-5tL.mjs → recall-scope-9Nuoto_i.mjs} +353 -1
  58. package/dist/rolldown-runtime-8H4AJuhK.mjs +14 -0
  59. package/dist/schema-CCLvDa7Q.mjs +177 -0
  60. package/dist/{schema-qE_P09zJ.mjs → schema-t97l3aK8.mjs} +56 -3
  61. package/dist/{session-C6tSs86s.mjs → session-Cs8iLCEx.mjs} +784 -342
  62. package/dist/{session-CstInGIA.mjs → session-EBRZF6Ow.mjs} +783 -341
  63. package/dist/session-create-facts-CkfG5DpQ.mjs +20 -0
  64. package/dist/{startup-CarQxWwi.d.mts → startup-Dti3Udne.d.mts} +30 -3
  65. package/dist/{startup-EG5UqIcd.mjs → startup-UtFQSDe_.mjs} +90 -15
  66. package/dist/startup.d.mts +2 -2
  67. package/dist/startup.mjs +1 -1
  68. package/dist/task-read-remote-DRtkXDrZ.mjs +1083 -0
  69. package/dist/{terminal-progress-source-CpfpQO_h.mjs → terminal-progress-source-VsczdXA-.mjs} +610 -332
  70. package/dist/{transcript-view-CuJYWkhp.mjs → transcript-view-B6vCnukn.mjs} +2096 -977
  71. package/dist/{transcript-view-C1YtJ49Y.mjs → transcript-view-DSSdE2vK.mjs} +2078 -651
  72. package/dist/write-failure-xNKczXH7.mjs +189 -0
  73. package/package.json +20 -3
  74. package/dist/local-acp-listener-B65J0Bx4.mjs +0 -3115
  75. package/dist/local-daemon-control-C14q9KnD.mjs +0 -1588
  76. package/dist/local-daemon-control-TCnERL7n.mjs +0 -1424
  77. package/dist/preset-BcWqOtY7.mjs +0 -46
@@ -0,0 +1,20 @@
1
+ //#region src/app/remote-process/session-create-facts.ts
2
+ /**
3
+ * The one official Session-create fact shared by the Native and ACP ingress
4
+ * mappings: a `session/workspace-attach-failed` RemoteError carrying the actual
5
+ * non-empty published Session id in its `details`.
6
+ *
7
+ * This decoder only recognizes the official error record. It has no Host
8
+ * imports, state or fallback: a missing code, malformed details or empty id is
9
+ * not a published Session.
10
+ */
11
+ function publishedSessionIdOfCreateError(error) {
12
+ if (typeof error !== "object" || error === null) return void 0;
13
+ const record = error;
14
+ if (record.code !== "session/workspace-attach-failed") return void 0;
15
+ if (typeof record.details !== "object" || record.details === null) return void 0;
16
+ const sessionId = record.details.sessionId;
17
+ return typeof sessionId === "string" && sessionId !== "" ? sessionId : void 0;
18
+ }
19
+ //#endregion
20
+ export { publishedSessionIdOfCreateError as t };
@@ -132,12 +132,20 @@ declare const TUI_DAEMON_STARTUP_SERVICE = "tuiDaemonStartup";
132
132
  */
133
133
  type PublicBackend = 'direct' | 'daemon';
134
134
  /** The public daemon management verbs (M6-2C). */
135
- type DaemonControlVerb = 'status' | 'start' | 'stop' | 'restart' | 'logs' | 'install' | 'uninstall';
135
+ type DaemonControlVerb = 'status' | 'start' | 'stop' | 'restart' | 'logs' | 'install' | 'uninstall' | 'enable' | 'disable';
136
136
  /** One immutable daemon management intent parsed by the nested CLI grammar. */
137
137
  interface DaemonControlIntent {
138
138
  readonly verb: DaemonControlVerb;
139
139
  /** `logs` only: a validated integer in 1..1000. */
140
140
  readonly lines?: number;
141
+ /**
142
+ * `install` only: opt a FRESH platform-specific login-startup definition in.
143
+ * macOS launchd starts the Host at login and restarts it after a failure;
144
+ * Windows registers one login-only Scheduled Task. It is a single
145
+ * installation intent, never a start request or a persisted preference, and
146
+ * it never changes an existing user definition.
147
+ */
148
+ readonly autostart?: boolean;
141
149
  }
142
150
  /** The client-launch arm of {@link TuiDaemonStartupValues}. */
143
151
  interface TuiDaemonClientStartup {
@@ -185,8 +193,27 @@ interface TuiWebControlStartup {
185
193
  /** Same one-shot cold-ready handshake as the client arm. */
186
194
  markCoordinatorMounted?(): void;
187
195
  }
196
+ /** The public headless ACP control CLI verbs (PR-C ACP headless CLI). */
197
+ type AcpControlVerb = 'status' | 'enable' | 'disable';
198
+ /** One immutable headless ACP control intent parsed by the nested CLI grammar. */
199
+ interface AcpControlIntent {
200
+ readonly verb: AcpControlVerb;
201
+ }
202
+ /** The headless ACP control CLI arm: no TUI, no Client, no Host start. */
203
+ interface TuiAcpControlStartup {
204
+ readonly kind: 'acp-control';
205
+ readonly control: AcpControlIntent;
206
+ /** Same one-shot cold-ready handshake as the client arm. */
207
+ markCoordinatorMounted?(): void;
208
+ }
209
+ /** The trusted-profile ACP stdio arm: one internal stdio Adapter child, no TUI. */
210
+ interface TuiAcpStdioStartup {
211
+ readonly kind: 'acp-stdio';
212
+ /** Same one-shot cold-ready handshake as the client arm. */
213
+ markCoordinatorMounted?(): void;
214
+ }
188
215
  /** What the daemon-launcher row reads from {@link TUI_DAEMON_STARTUP_SERVICE}. */
189
- type TuiDaemonStartupValues = TuiDaemonClientStartup | TuiDaemonControlStartup | TuiWebControlStartup;
216
+ type TuiDaemonStartupValues = TuiDaemonClientStartup | TuiDaemonControlStartup | TuiWebControlStartup | TuiAcpControlStartup | TuiAcpStdioStartup;
190
217
  /**
191
218
  * The row's Profile Config: the persisted backend selector. `.volatile()`
192
219
  * projects the field into the official Settings form and keeps it live-editable
@@ -210,4 +237,4 @@ declare const Config: z<Config>;
210
237
  */
211
238
  declare function apply(ctx: Context, config?: Config): void;
212
239
  //#endregion
213
- export { name as S, apply as _, HARNESS_COMPAT as a, incompatibleHarnessMessage as b, TUI_DAEMON_STARTUP_SERVICE as c, TuiDaemonControlStartup as d, TuiDaemonStartupValues as f, WebControlVerb as g, WebControlIntent as h, DaemonControlVerb as i, TUI_STARTUP_SERVICE as l, TuiWebControlStartup as m, Config as n, HarnessCompatEntry as o, TuiStartupValues as p, DaemonControlIntent as r, PublicBackend as s, CliSessionLaunchIntent as t, TuiDaemonClientStartup as u, bundleVersionLabel as v, inject as x, harnessCompatEntryFor as y };
240
+ export { harnessCompatEntryFor as C, name as E, bundleVersionLabel as S, inject as T, TuiStartupValues as _, DaemonControlIntent as a, WebControlVerb as b, HarnessCompatEntry as c, TUI_STARTUP_SERVICE as d, TuiAcpControlStartup as f, TuiDaemonStartupValues as g, TuiDaemonControlStartup as h, Config as i, PublicBackend as l, TuiDaemonClientStartup as m, AcpControlVerb as n, DaemonControlVerb as o, TuiAcpStdioStartup as p, CliSessionLaunchIntent as r, HARNESS_COMPAT as s, AcpControlIntent as t, TUI_DAEMON_STARTUP_SERVICE as u, TuiWebControlStartup as v, incompatibleHarnessMessage as w, apply as x, WebControlIntent as y };
@@ -34,11 +34,11 @@ var dsh_compat_matrix_default = {
34
34
  "not by itself qualify every such prerelease."
35
35
  ],
36
36
  current: {
37
- "since": "0.5.8",
37
+ "since": "0.5.9",
38
38
  "requires": "DeepSeek Harness 0.2.2-rc.3 or later",
39
39
  "upgradeDsh": "0.2.2-rc.5",
40
40
  "upgradeCommand": "npm install -g --allow-scripts=@deepseek-ai/dsh-subprocess-local,koffi,node-pty @deepseek-ai/dsh@0.2.2-rc.5",
41
- "guidance": "The 0.5.8 release requires DeepSeek Harness 0.2.2-rc.3 or later; this checkout validates that runtime floor and targets 0.2.2-rc.5 (validated pairing; on Hosts older than rc.5 the automatic web-search routing decision may differ). The previous 0.2.2-rc.2 and 0.2.2-rc.1 pairings are no longer claimed by this release, so finish in-flight turns and background jobs before upgrading. See README.en.md for the DSH/TUI pairing table, and docs/guides/dsh-compatibility.md for compatibility/recovery rules."
41
+ "guidance": "The 0.5.9 release requires DeepSeek Harness 0.2.2-rc.3 or later; this checkout validates that runtime floor and targets 0.2.2-rc.5 (validated pairing; on Hosts older than rc.5 the automatic web-search routing decision may differ). The previous 0.2.2-rc.2 and 0.2.2-rc.1 pairings are no longer claimed by this release, so finish in-flight turns and background jobs before upgrading. See README.en.md for the DSH/TUI pairing table, and docs/guides/dsh-compatibility.md for compatibility/recovery rules."
42
42
  },
43
43
  floor: {
44
44
  "below": "0.1.0-rc.8",
@@ -142,7 +142,7 @@ var dsh_compat_matrix_default = {
142
142
  },
143
143
  {
144
144
  "dshFrom": "0.2.2-rc.3",
145
- "tui": "0.5.8",
145
+ "tui": "0.5.9",
146
146
  "versions": [
147
147
  "0.2.2-rc.3",
148
148
  "0.2.2-rc.4",
@@ -306,6 +306,21 @@ function shellQuoteProfile(profile) {
306
306
  if (/^[A-Za-z0-9_@%+=:,./-]+$/u.test(profile)) return profile;
307
307
  return `'${profile.replace(/'/gu, `'\\''`)}'`;
308
308
  }
309
+ /** The same profile literal for the TARGET shell: PowerShell doubles an
310
+ * embedded single quote instead of the POSIX close-reopen sequence. */
311
+ function shellQuoteProfileFor(profile, platform) {
312
+ if (platform !== "win32") return shellQuoteProfile(profile);
313
+ if (/^[A-Za-z0-9_@%+=:,./-]+$/u.test(profile)) return profile;
314
+ return `'${profile.replace(/['\u2018\u2019\u201a\u201b]/gu, (character) => character + character)}'`;
315
+ }
316
+ /** The one re-run hint for a failed daemon launch: Windows gets the
317
+ * PowerShell-equivalent environment form; POSIX keeps the assignment form.
318
+ * `startup.ts` stays dependency-free, so this tiny hint is local rather than
319
+ * imported from the launcher module. */
320
+ function daemonRerunHint(profile) {
321
+ const profileArg = shellQuoteProfileFor(profile, process.platform);
322
+ return process.platform === "win32" ? `$env:DSH_PI_TUI_BACKEND='daemon'; dsh --profile ${profileArg}` : `DSH_PI_TUI_BACKEND=daemon dsh --profile ${profileArg}`;
323
+ }
309
324
  /** The actionable compatibility notice printed when the installed harness
310
325
  * falls in an incompatible range. `entry` MUST be the entry
311
326
  * {@link harnessCompatEntryFor} matched for `installed`. The notice is
@@ -341,14 +356,15 @@ const TUI_DAEMON_STARTUP_SERVICE = "tuiDaemonStartup";
341
356
  const BACKEND_ENV = "DSH_PI_TUI_BACKEND";
342
357
  const Config = z.object({ backend: z.string().default("direct").volatile() });
343
358
  /** Resolve the daemon platform/tty prerequisite, or undefined when satisfiable.
344
- * Daemon is a local Linux/macOS foreground process that owns a real
359
+ * Daemon is a local Linux/macOS/Windows foreground process that owns a real
345
360
  * interactive TTY; any other OS or a non-interactive launch must fail closed
346
- * with a reason. The Host process itself is not launched here. */
361
+ * with a reason. The Host process itself is not launched here; the supported
362
+ * Windows filesystem/account domain is enforced by the existing scope. */
347
363
  function daemonPrerequisiteError() {
348
- if (process.platform !== "linux" && process.platform !== "darwin") return {
364
+ if (process.platform !== "linux" && process.platform !== "darwin" && process.platform !== "win32") return {
349
365
  kind: "error",
350
366
  code: "unsupported-platform",
351
- message: `the daemon backend is only supported on Linux and macOS (this is ${process.platform}); use DSH_PI_TUI_BACKEND=direct or unset it`
367
+ message: `the daemon backend is only supported on Linux, macOS and Windows (this is ${process.platform}); use DSH_PI_TUI_BACKEND=direct or unset it`
352
368
  };
353
369
  if (process.stdin.isTTY !== true || process.stdout.isTTY !== true) return {
354
370
  kind: "error",
@@ -418,7 +434,7 @@ function coordinatorNotMountedMessage(profile) {
418
434
  return [
419
435
  `dsh-pi-tui ${bundleVersionLabel(CURRENT_DSH_REQUIREMENT.since)} was invoked for the daemon backend, but the daemon launcher row did not mount.`,
420
436
  "The pi-tui-daemon-launcher row failed to import/apply or stayed pending on tuiDaemonStartup (see the loader warnings above); DSH app-boot treats that as an optional plugin failure.",
421
- `This installation cannot start the daemon TUI; reinstall the profile or fix its composition, then re-run: DSH_PI_TUI_BACKEND=daemon dsh --profile ${shellQuoteProfile(profile)}`
437
+ `This installation cannot start the daemon TUI; reinstall the profile or fix its composition, then re-run: ${daemonRerunHint(profile)}`
422
438
  ].join("\n");
423
439
  }
424
440
  /**
@@ -457,7 +473,7 @@ function tuiCommand(ctx) {
457
473
  const program = new Command().name("dsh --profile pi-tui").description("Run the DeepSeek Harness terminal UI.").helpOption("-h, --help", "show this help").option("--session [id-or-query]", "open the session browser; a full session id or a listed unique prefix resumes it").option("-c, --continue", "continue the most recent session in the confirmed workspace").option("--preset <id>", "agent preset for a fresh session (falls back to $DSH_PI_TUI_PRESET, then the saved default)");
458
474
  const daemon = withUsageExitCode(program.command("daemon").description("Manage the local daemon Host for this profile."));
459
475
  daemon.action(() => {
460
- daemon.error("error: a daemon command is required (status, start, stop, restart, logs, install or uninstall)");
476
+ daemon.error("error: a daemon command is required (status, start, stop, restart, logs, install, uninstall, enable or disable)");
461
477
  });
462
478
  const addControlVerb = (name, description, configure) => {
463
479
  const command = withUsageExitCode(daemon.command(name).description(description));
@@ -474,7 +490,8 @@ function tuiCommand(ctx) {
474
490
  }
475
491
  publishDaemonControl(ctx, {
476
492
  verb: name,
477
- ...lines === void 0 ? {} : { lines }
493
+ ...lines === void 0 ? {} : { lines },
494
+ ...options.autostart === true ? { autostart: true } : {}
478
495
  });
479
496
  });
480
497
  return command;
@@ -483,11 +500,15 @@ function tuiCommand(ctx) {
483
500
  addControlVerb("start", "start the profile Host and wait until it is authenticated");
484
501
  addControlVerb("stop", "stop this profile Host through its verified supervision owner");
485
502
  addControlVerb("restart", "stop the profile Host, confirm its exit, then start a new instance");
486
- addControlVerb("logs", "show the current Host log source (systemd journal, launchd logs or the scope host.log)", (command) => {
487
- command.option("--lines <count>", "number of log lines to show (1-1000, default 100)");
503
+ addControlVerb("logs", "show available source-labelled Host logs without requiring a running Host", (command) => {
504
+ command.option("--lines <count>", "number of log lines per source (1-1000, default 100)");
488
505
  });
489
- addControlVerb("install", "install this profile service definition (systemd unit or launchd plist) without starting it");
490
- addControlVerb("uninstall", "remove only this profile managed service definition");
506
+ addControlVerb("install", "install this profile service definition (systemd unit, launchd plist or Windows login task) without starting it", (command) => {
507
+ command.option("--autostart", "start the profile Host at login (macOS fresh installs: also restart after a failure; Windows fresh installs: login-only; Linux: use install + enable)");
508
+ });
509
+ addControlVerb("uninstall", "remove only this profile managed service definition or Windows login task");
510
+ addControlVerb("enable", "enable this profile systemd unit at login (Linux only); does not start or stop the Host");
511
+ addControlVerb("disable", "disable this profile systemd unit at login (Linux only); does not start or stop the Host");
491
512
  daemon.addHelpText("after", `
492
513
  Examples:
493
514
  dsh --profile pi-tui daemon status
@@ -496,7 +517,10 @@ Examples:
496
517
  dsh --profile pi-tui daemon restart
497
518
  dsh --profile pi-tui daemon logs --lines 200
498
519
  dsh --profile pi-tui daemon install
520
+ dsh --profile pi-tui daemon install --autostart
499
521
  dsh --profile pi-tui daemon uninstall
522
+ dsh --profile pi-tui daemon enable
523
+ dsh --profile pi-tui daemon disable
500
524
  `);
501
525
  const web = withUsageExitCode(program.command("web").description("Inspect or control the running Host's official Web frontend."));
502
526
  web.action(() => {
@@ -526,6 +550,38 @@ Examples:
526
550
  dsh --profile pi-tui web disable
527
551
  dsh --profile pi-tui web url
528
552
  dsh --profile pi-tui web open
553
+ `);
554
+ const acp = withUsageExitCode(program.command("acp").description("Run the local ACP front door."));
555
+ acp.action(() => {
556
+ acp.error("error: an acp command is required (stdio, status, enable or disable)");
557
+ });
558
+ const acpStdio = withUsageExitCode(acp.command("stdio").description("bridge ACP v1 bytes over stdio to the running Host listener"));
559
+ acpStdio.action(() => {
560
+ rejectSessionFlags(program, acpStdio, "acp");
561
+ if (isHostOnlyRole()) acpStdio.error("error: acp commands are not available in a Host-only process");
562
+ publishDaemonService(ctx, { kind: "acp-stdio" });
563
+ });
564
+ const addAcpControlVerb = (name, description) => {
565
+ const command = withUsageExitCode(acp.command(name).description(description));
566
+ command.action(() => {
567
+ rejectSessionFlags(program, command, "acp");
568
+ if (isHostOnlyRole()) command.error("error: acp commands are not available in a Host-only process");
569
+ publishDaemonService(ctx, {
570
+ kind: "acp-control",
571
+ control: { verb: name }
572
+ });
573
+ });
574
+ return command;
575
+ };
576
+ addAcpControlVerb("status", "show the running Host's local ACP listener state");
577
+ addAcpControlVerb("enable", "enable the running Host's local ACP listener");
578
+ addAcpControlVerb("disable", "disable the running Host's local ACP listener");
579
+ acp.addHelpText("after", `
580
+ Examples:
581
+ dsh --profile pi-tui acp stdio
582
+ dsh --profile pi-tui acp status
583
+ dsh --profile pi-tui acp enable
584
+ dsh --profile pi-tui acp disable
529
585
  `);
530
586
  program.addHelpText("after", `
531
587
  Examples:
@@ -538,6 +594,8 @@ Examples:
538
594
  dsh --profile pi-tui daemon status inspect the local daemon Host
539
595
  dsh --profile pi-tui web status inspect the Host's Web frontend
540
596
  dsh --profile pi-tui web url print the authenticated Web URL
597
+ dsh --profile pi-tui acp stdio bridge an external ACP v1 client to the local Host
598
+ dsh --profile pi-tui acp status inspect the Host's local ACP listener
541
599
  `);
542
600
  return program;
543
601
  }
@@ -656,6 +714,8 @@ function installModelListingLogInterceptor() {
656
714
  * @param ctx - plugin context carrying the command line.
657
715
  */
658
716
  function apply(ctx, config) {
717
+ delete process.env.OSC7577_TOKEN;
718
+ delete process.env.SPLIT_PROCESS_OSC7577_V1;
659
719
  const program = tuiCommand(ctx);
660
720
  program.action(() => {
661
721
  const options = program.opts();
@@ -736,6 +796,21 @@ function webControlNotMountedMessage(profile) {
736
796
  `This installation cannot run the web CLI; reinstall the profile or fix its composition, then re-run: dsh --profile ${shellQuoteProfile(profile)} web status`
737
797
  ].join("\n");
738
798
  }
799
+ /** A committed ACP stdio startup whose launcher row never mounted must print
800
+ * one stable code instead of silently looking like a successful command. */
801
+ function acpStdioNotMountedMessage() {
802
+ return "dsh-pi-tui acp stdio: ACP_STDIO_LAUNCHER_UNAVAILABLE";
803
+ }
804
+ /** The actionable error for a committed ACP management startup whose launcher
805
+ * row never mounted. It must never carry the stdio bridge's code, because the
806
+ * requested command is not the byte relay. */
807
+ function acpControlNotMountedMessage(profile) {
808
+ return [
809
+ `dsh-pi-tui ${bundleVersionLabel(CURRENT_DSH_REQUIREMENT.since)} was invoked for an acp CLI command, but the daemon launcher row did not mount.`,
810
+ "The pi-tui-daemon-launcher row failed to import/apply or stayed pending on tuiDaemonStartup (see the loader warnings above); DSH app-boot treats that as an optional plugin failure.",
811
+ `This installation cannot run the acp CLI; reinstall the profile or fix its composition, then re-run: dsh --profile ${shellQuoteProfileFor(profile, process.platform)} acp status`
812
+ ].join("\n");
813
+ }
739
814
  /**
740
815
  * Publish the daemon startup service. The daemon-launcher row injects it,
741
816
  * spawns exactly ONE foreground Client OS process and waits for its real exit.
@@ -759,7 +834,7 @@ function publishDaemonService(ctx, values) {
759
834
  const cancel = ready.onReady(() => {
760
835
  if (!registrationReturned) return;
761
836
  if (coordinatorMounted) return;
762
- const message = values.kind === "control" ? controlNotMountedMessage() : values.kind === "web-control" ? webControlNotMountedMessage(runningProfileName(ctx)) : coordinatorNotMountedMessage(runningProfileName(ctx));
837
+ const message = values.kind === "control" ? controlNotMountedMessage() : values.kind === "web-control" ? webControlNotMountedMessage(runningProfileName(ctx)) : values.kind === "acp-control" ? acpControlNotMountedMessage(runningProfileName(ctx)) : values.kind === "acp-stdio" ? acpStdioNotMountedMessage() : coordinatorNotMountedMessage(runningProfileName(ctx));
763
838
  process.stderr.write(`\n${message}\n\n`);
764
839
  ctx.get("appExit")?.(1);
765
840
  });
@@ -1,2 +1,2 @@
1
- import { S as name, _ as apply, a as HARNESS_COMPAT, b as incompatibleHarnessMessage, c as TUI_DAEMON_STARTUP_SERVICE, d as TuiDaemonControlStartup, f as TuiDaemonStartupValues, g as WebControlVerb, h as WebControlIntent, i as DaemonControlVerb, l as TUI_STARTUP_SERVICE, m as TuiWebControlStartup, n as Config, o as HarnessCompatEntry, p as TuiStartupValues, r as DaemonControlIntent, s as PublicBackend, t as CliSessionLaunchIntent, u as TuiDaemonClientStartup, v as bundleVersionLabel, x as inject, y as harnessCompatEntryFor } from "./startup-CarQxWwi.mjs";
2
- export { CliSessionLaunchIntent, Config, DaemonControlIntent, DaemonControlVerb, HARNESS_COMPAT, HarnessCompatEntry, PublicBackend, TUI_DAEMON_STARTUP_SERVICE, TUI_STARTUP_SERVICE, TuiDaemonClientStartup, TuiDaemonControlStartup, TuiDaemonStartupValues, TuiStartupValues, TuiWebControlStartup, WebControlIntent, WebControlVerb, apply, bundleVersionLabel, harnessCompatEntryFor, incompatibleHarnessMessage, inject, name };
1
+ import { C as harnessCompatEntryFor, E as name, S as bundleVersionLabel, T as inject, _ as TuiStartupValues, a as DaemonControlIntent, b as WebControlVerb, c as HarnessCompatEntry, d as TUI_STARTUP_SERVICE, f as TuiAcpControlStartup, g as TuiDaemonStartupValues, h as TuiDaemonControlStartup, i as Config, l as PublicBackend, m as TuiDaemonClientStartup, n as AcpControlVerb, o as DaemonControlVerb, p as TuiAcpStdioStartup, r as CliSessionLaunchIntent, s as HARNESS_COMPAT, t as AcpControlIntent, u as TUI_DAEMON_STARTUP_SERVICE, v as TuiWebControlStartup, w as incompatibleHarnessMessage, x as apply, y as WebControlIntent } from "./startup-Dti3Udne.mjs";
2
+ export { AcpControlIntent, AcpControlVerb, CliSessionLaunchIntent, Config, DaemonControlIntent, DaemonControlVerb, HARNESS_COMPAT, HarnessCompatEntry, PublicBackend, TUI_DAEMON_STARTUP_SERVICE, TUI_STARTUP_SERVICE, TuiAcpControlStartup, TuiAcpStdioStartup, TuiDaemonClientStartup, TuiDaemonControlStartup, TuiDaemonStartupValues, TuiStartupValues, TuiWebControlStartup, WebControlIntent, WebControlVerb, apply, bundleVersionLabel, harnessCompatEntryFor, incompatibleHarnessMessage, inject, name };
package/dist/startup.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as apply, c as incompatibleHarnessMessage, i as TUI_STARTUP_SERVICE, l as inject, n as HARNESS_COMPAT, o as bundleVersionLabel, r as TUI_DAEMON_STARTUP_SERVICE, s as harnessCompatEntryFor, t as Config, u as name } from "./startup-EG5UqIcd.mjs";
1
+ import { a as apply, c as incompatibleHarnessMessage, i as TUI_STARTUP_SERVICE, l as inject, n as HARNESS_COMPAT, o as bundleVersionLabel, r as TUI_DAEMON_STARTUP_SERVICE, s as harnessCompatEntryFor, t as Config, u as name } from "./startup-UtFQSDe_.mjs";
2
2
  export { Config, HARNESS_COMPAT, TUI_DAEMON_STARTUP_SERVICE, TUI_STARTUP_SERVICE, apply, bundleVersionLabel, harnessCompatEntryFor, incompatibleHarnessMessage, inject, name };