@adhdev/daemon-core 0.9.82-rc.340 → 0.9.82-rc.341

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.9.82-rc.340",
3
+ "version": "0.9.82-rc.341",
4
4
  "description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -46,7 +46,7 @@
46
46
  "author": "vilmire",
47
47
  "license": "AGPL-3.0-or-later",
48
48
  "dependencies": {
49
- "@adhdev/mesh-shared": "0.9.82-rc.340",
49
+ "@adhdev/mesh-shared": "0.9.82-rc.341",
50
50
  "@adhdev/session-host-core": "*",
51
51
  "@agentclientprotocol/sdk": "^0.16.1",
52
52
  "ajv": "^8.20.0",
@@ -831,6 +831,28 @@ export class FsmDriver implements ISpecDriver {
831
831
  const sm = this.spec.send_message;
832
832
  const perChar = sm.delay_ms_per_char ?? 0;
833
833
  const beforeSubmit = resolveSubmitDelayMs(sm.delay_ms_before_submit, text);
834
+
835
+ // win32 ConPTY swallows a lone submit key (CR) that arrives in its own
836
+ // PTY chunk after a delay: ConPTY does not treat a delayed, standalone
837
+ // CR as a submit, so the prompt sits typed-but-unsent until the user
838
+ // hits Enter manually. mac/linux PTYs do recognise the split write, so
839
+ // this asymmetry is win32-only. The fix mirrors the legacy
840
+ // ProviderCliAdapter.forceSendMessage fix: honour the settle delay so
841
+ // the TUI input handler is ready, then write `text + submit_key` as ONE
842
+ // PTY write — keeping the submit key in the same write unit as the text
843
+ // is the invariant ConPTY needs to recognise the submit. perChar typing
844
+ // simulation is skipped on win32 (a per-char loop necessarily ends with a
845
+ // separate trailing CR); correctness of submission wins over the typing
846
+ // visual there.
847
+ if (process.platform === 'win32') {
848
+ if (beforeSubmit > 0) {
849
+ setTimeout(() => this.adapter.send_keys(text + sm.submit_key), beforeSubmit);
850
+ } else {
851
+ this.adapter.send_keys(text + sm.submit_key);
852
+ }
853
+ return;
854
+ }
855
+
834
856
  if (perChar === 0) {
835
857
  this.adapter.send_keys(text);
836
858
  if (beforeSubmit > 0) setTimeout(() => this.adapter.send_keys(sm.submit_key), beforeSubmit);