dsh-cliworker-now 0.7.6 → 0.7.7

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 (144) hide show
  1. package/README.en.md +29 -9
  2. package/README.md +31 -9
  3. package/lib/account-models.mjs +16 -13
  4. package/lib/client.js +658 -61
  5. package/lib/client.js.map +1 -1
  6. package/lib/grok-catalog.mjs +2 -2
  7. package/lib/hermes-native-entry.py +48 -13
  8. package/lib/hermes-nous-refresh.py +331 -0
  9. package/lib/index.js +3724 -1589
  10. package/lib/index.js.map +1 -1
  11. package/lib/native-launch.mjs +62 -7
  12. package/lib/native-spawn.mjs +32 -0
  13. package/lib/pi-installation.mjs +27 -3
  14. package/lib/pi-native-catalog.mjs +2 -2
  15. package/lib/pi-omp-bridge.mjs +2 -2
  16. package/lib/private-launch.mjs +6 -2
  17. package/lib/terminal-bridge.mjs +2 -2
  18. package/lib/typert.host.js +83 -11
  19. package/lib/typert.remote-client.d.ts +2 -0
  20. package/lib/typert.remote-client.d.ts.map +1 -1
  21. package/lib/typert.remote-client.js +77 -11
  22. package/lib/types/client/account-query-queue.d.ts +16 -0
  23. package/lib/types/client/account-query-queue.js +61 -0
  24. package/lib/types/client/account-query-queue.js.map +1 -0
  25. package/lib/types/client/account-terminal.d.ts +6 -2
  26. package/lib/types/client/account-terminal.js +260 -31
  27. package/lib/types/client/account-terminal.js.map +1 -1
  28. package/lib/types/client/settings-dialog.js +65 -38
  29. package/lib/types/client/settings-dialog.js.map +1 -1
  30. package/lib/types/client/zcode-login-link-provider.d.ts +9 -0
  31. package/lib/types/client/zcode-login-link-provider.js +105 -0
  32. package/lib/types/client/zcode-login-link-provider.js.map +1 -0
  33. package/lib/types/client/zcode-login-link.d.ts +16 -0
  34. package/lib/types/client/zcode-login-link.js +194 -0
  35. package/lib/types/client/zcode-login-link.js.map +1 -0
  36. package/lib/types/host/account-models.d.mts +3 -1
  37. package/lib/types/host/account-models.mjs +16 -13
  38. package/lib/types/host/accounts.d.ts +3 -2
  39. package/lib/types/host/accounts.js +129 -22
  40. package/lib/types/host/accounts.js.map +1 -1
  41. package/lib/types/host/adapters.d.ts +1 -1
  42. package/lib/types/host/adapters.js +60 -11
  43. package/lib/types/host/adapters.js.map +1 -1
  44. package/lib/types/host/agy-models.d.ts +2 -1
  45. package/lib/types/host/agy-models.js +6 -6
  46. package/lib/types/host/agy-models.js.map +1 -1
  47. package/lib/types/host/agy-windows-account.d.ts +14 -0
  48. package/lib/types/host/agy-windows-account.js +104 -0
  49. package/lib/types/host/agy-windows-account.js.map +1 -0
  50. package/lib/types/host/authorized-catalog.js +13 -4
  51. package/lib/types/host/authorized-catalog.js.map +1 -1
  52. package/lib/types/host/claude-native-oauth.d.ts +17 -0
  53. package/lib/types/host/claude-native-oauth.js +272 -0
  54. package/lib/types/host/claude-native-oauth.js.map +1 -0
  55. package/lib/types/host/claude-own-route.d.ts +33 -0
  56. package/lib/types/host/claude-own-route.js +250 -0
  57. package/lib/types/host/claude-own-route.js.map +1 -0
  58. package/lib/types/host/cli-account-binding.d.ts +2 -1
  59. package/lib/types/host/cli-account-binding.js +59 -21
  60. package/lib/types/host/cli-account-binding.js.map +1 -1
  61. package/lib/types/host/codex-models.js +4 -0
  62. package/lib/types/host/codex-models.js.map +1 -1
  63. package/lib/types/host/extended-adapters.d.ts +3 -2
  64. package/lib/types/host/extended-adapters.js +9 -7
  65. package/lib/types/host/extended-adapters.js.map +1 -1
  66. package/lib/types/host/first-party-models.d.ts +1 -0
  67. package/lib/types/host/first-party-models.js +136 -47
  68. package/lib/types/host/first-party-models.js.map +1 -1
  69. package/lib/types/host/hermes-accounts.js +15 -1
  70. package/lib/types/host/hermes-accounts.js.map +1 -1
  71. package/lib/types/host/hermes-adapter.d.ts +3 -0
  72. package/lib/types/host/hermes-adapter.js +13 -4
  73. package/lib/types/host/hermes-adapter.js.map +1 -1
  74. package/lib/types/host/hermes-installation.js +54 -35
  75. package/lib/types/host/hermes-installation.js.map +1 -1
  76. package/lib/types/host/hermes-native-entry.py +48 -13
  77. package/lib/types/host/hermes-nous-refresh.py +331 -0
  78. package/lib/types/host/hermes-nous.d.ts +5 -1
  79. package/lib/types/host/hermes-nous.js +5 -5
  80. package/lib/types/host/hermes-nous.js.map +1 -1
  81. package/lib/types/host/hermes-renewal.d.ts +27 -0
  82. package/lib/types/host/hermes-renewal.js +292 -0
  83. package/lib/types/host/hermes-renewal.js.map +1 -0
  84. package/lib/types/host/hermes-windows-installation.d.ts +5 -0
  85. package/lib/types/host/hermes-windows-installation.js +91 -0
  86. package/lib/types/host/hermes-windows-installation.js.map +1 -0
  87. package/lib/types/host/index.d.ts +2 -0
  88. package/lib/types/host/index.js +17 -2
  89. package/lib/types/host/index.js.map +1 -1
  90. package/lib/types/host/kimi-accounts.d.ts +2 -0
  91. package/lib/types/host/kimi-accounts.js +4 -2
  92. package/lib/types/host/kimi-accounts.js.map +1 -1
  93. package/lib/types/host/kimi-oauth-models.d.ts +14 -0
  94. package/lib/types/host/kimi-oauth-models.js +246 -0
  95. package/lib/types/host/kimi-oauth-models.js.map +1 -0
  96. package/lib/types/host/mimo-metadata-cache.d.ts +22 -0
  97. package/lib/types/host/mimo-metadata-cache.js +121 -0
  98. package/lib/types/host/mimo-metadata-cache.js.map +1 -0
  99. package/lib/types/host/native-capability-cache.d.ts +11 -0
  100. package/lib/types/host/native-capability-cache.js +94 -0
  101. package/lib/types/host/native-capability-cache.js.map +1 -0
  102. package/lib/types/host/native-launch.mjs +62 -7
  103. package/lib/types/host/native-process.d.ts +3 -1
  104. package/lib/types/host/native-process.js +18 -3
  105. package/lib/types/host/native-process.js.map +1 -1
  106. package/lib/types/host/native-spawn.mjs +32 -0
  107. package/lib/types/host/pi-installation.d.mts +1 -1
  108. package/lib/types/host/pi-installation.mjs +27 -3
  109. package/lib/types/host/pi-omp-adapter.js +15 -1
  110. package/lib/types/host/pi-omp-adapter.js.map +1 -1
  111. package/lib/types/host/private-launch.mjs +23 -0
  112. package/lib/types/host/routing.js +25 -2
  113. package/lib/types/host/routing.js.map +1 -1
  114. package/lib/types/host/runtime.js +17 -5
  115. package/lib/types/host/runtime.js.map +1 -1
  116. package/lib/types/host/windows-account-bootstrap.ps1 +44 -0
  117. package/lib/types/host/windows-account-launch.mjs +47 -0
  118. package/lib/types/host/windows-account-owner.ps1 +137 -0
  119. package/lib/types/host/windows-account-stdio.mjs +19 -0
  120. package/lib/types/host/windows-account-terminal.d.ts +17 -0
  121. package/lib/types/host/windows-account-terminal.js +208 -0
  122. package/lib/types/host/windows-account-terminal.js.map +1 -0
  123. package/lib/types/host/windows-agy-account.ps1 +81 -0
  124. package/lib/types/host/windows-cli-installation.d.ts +31 -0
  125. package/lib/types/host/windows-cli-installation.js +157 -0
  126. package/lib/types/host/windows-cli-installation.js.map +1 -0
  127. package/lib/types/host/windows-hidden-launch.mjs +49 -0
  128. package/lib/types/host/windows-hidden-process.d.ts +12 -0
  129. package/lib/types/host/windows-hidden-process.js +116 -0
  130. package/lib/types/host/windows-hidden-process.js.map +1 -0
  131. package/lib/types/host/zcode-adapter.js +5 -1
  132. package/lib/types/host/zcode-adapter.js.map +1 -1
  133. package/lib/types/host/zcode-grok-accounts.d.ts +3 -1
  134. package/lib/types/host/zcode-grok-accounts.js +60 -11
  135. package/lib/types/host/zcode-grok-accounts.js.map +1 -1
  136. package/lib/types/shared/accounts.d.ts +4 -0
  137. package/lib/windows-account-bootstrap.ps1 +44 -0
  138. package/lib/windows-account-launch.mjs +47 -0
  139. package/lib/windows-account-owner.ps1 +137 -0
  140. package/lib/windows-account-stdio.mjs +19 -0
  141. package/lib/windows-agy-account.ps1 +81 -0
  142. package/lib/windows-hidden-launch.mjs +49 -0
  143. package/lib/zcode-resume.mjs +2 -2
  144. package/package.json +1 -1
@@ -19,6 +19,16 @@ let dsh_cliworker_now_cliworker_accountStart_parameter_2$schema$value
19
19
  const dsh_cliworker_now_cliworker_accountStart_parameter_2$schema = () => (dsh_cliworker_now_cliworker_accountStart_parameter_2$schema$value ??= z.string())
20
20
  let dsh_cliworker_now_cliworker_accountStart_result$schema$value
21
21
  const dsh_cliworker_now_cliworker_accountStart_result$schema = () => (dsh_cliworker_now_cliworker_accountStart_result$schema$value ??= z.string())
22
+ let dsh_cliworker_now_cliworker_accountStartForProvider_parameter_0$schema$value
23
+ const dsh_cliworker_now_cliworker_accountStartForProvider_parameter_0$schema = () => (dsh_cliworker_now_cliworker_accountStartForProvider_parameter_0$schema$value ??= z.string())
24
+ let dsh_cliworker_now_cliworker_accountStartForProvider_parameter_1$schema$value
25
+ const dsh_cliworker_now_cliworker_accountStartForProvider_parameter_1$schema = () => (dsh_cliworker_now_cliworker_accountStartForProvider_parameter_1$schema$value ??= z.string())
26
+ let dsh_cliworker_now_cliworker_accountStartForProvider_parameter_2$schema$value
27
+ const dsh_cliworker_now_cliworker_accountStartForProvider_parameter_2$schema = () => (dsh_cliworker_now_cliworker_accountStartForProvider_parameter_2$schema$value ??= z.string())
28
+ let dsh_cliworker_now_cliworker_accountStartForProvider_parameter_3$schema$value
29
+ const dsh_cliworker_now_cliworker_accountStartForProvider_parameter_3$schema = () => (dsh_cliworker_now_cliworker_accountStartForProvider_parameter_3$schema$value ??= z.string())
30
+ let dsh_cliworker_now_cliworker_accountStartForProvider_result$schema$value
31
+ const dsh_cliworker_now_cliworker_accountStartForProvider_result$schema = () => (dsh_cliworker_now_cliworker_accountStartForProvider_result$schema$value ??= z.string())
22
32
  let dsh_cliworker_now_cliworker_accountStartForSource_parameter_0$schema$value
23
33
  const dsh_cliworker_now_cliworker_accountStartForSource_parameter_0$schema = () => (dsh_cliworker_now_cliworker_accountStartForSource_parameter_0$schema$value ??= z.string())
24
34
  let dsh_cliworker_now_cliworker_accountStartForSource_parameter_1$schema$value
@@ -230,7 +240,7 @@ export const TYPERT_REMOTE = {
230
240
  typeSymbol: 'dsh-cliworker-now#cliworker/accountResize:result',
231
241
  create: dsh_cliworker_now_cliworker_accountResize_result$schema,
232
242
  },
233
- sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":923,"column":9},
243
+ sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":942,"column":9},
234
244
  },
235
245
  {
236
246
  id: 'dsh-cliworker-now#cliworker/accountStart',
@@ -278,6 +288,62 @@ export const TYPERT_REMOTE = {
278
288
  },
279
289
  sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":838,"column":9},
280
290
  },
291
+ {
292
+ id: 'dsh-cliworker-now#cliworker/accountStartForProvider',
293
+ service: 'cliworker',
294
+ namespace: 'cliworker',
295
+ method: 'accountStartForProvider',
296
+ invocation: { kind: 'direct' },
297
+ parameters: [
298
+ {
299
+ name: 'parentSessionId',
300
+ wire: 'parentSessionId',
301
+ source: 'json',
302
+ codec: {
303
+ mode: 'strict',
304
+ typeSymbol: 'dsh-cliworker-now#cliworker/accountStartForProvider:parentSessionId',
305
+ create: dsh_cliworker_now_cliworker_accountStartForProvider_parameter_0$schema,
306
+ },
307
+ },
308
+ {
309
+ name: 'cli',
310
+ wire: 'cli',
311
+ source: 'json',
312
+ codec: {
313
+ mode: 'strict',
314
+ typeSymbol: 'dsh-cliworker-now#cliworker/accountStartForProvider:cli',
315
+ create: dsh_cliworker_now_cliworker_accountStartForProvider_parameter_1$schema,
316
+ },
317
+ },
318
+ {
319
+ name: 'action',
320
+ wire: 'action',
321
+ source: 'json',
322
+ codec: {
323
+ mode: 'strict',
324
+ typeSymbol: 'dsh-cliworker-now#cliworker/accountStartForProvider:action',
325
+ create: dsh_cliworker_now_cliworker_accountStartForProvider_parameter_2$schema,
326
+ },
327
+ },
328
+ {
329
+ name: 'provider',
330
+ wire: 'provider',
331
+ source: 'json',
332
+ codec: {
333
+ mode: 'strict',
334
+ typeSymbol: 'dsh-cliworker-now#cliworker/accountStartForProvider:provider',
335
+ create: dsh_cliworker_now_cliworker_accountStartForProvider_parameter_3$schema,
336
+ },
337
+ },
338
+ ],
339
+ cancellation: { parameter: 'signal' },
340
+ result: {
341
+ mode: 'strict',
342
+ typeSymbol: 'dsh-cliworker-now#cliworker/accountStartForProvider:result',
343
+ create: dsh_cliworker_now_cliworker_accountStartForProvider_result$schema,
344
+ },
345
+ sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":866,"column":9},
346
+ },
281
347
  {
282
348
  id: 'dsh-cliworker-now#cliworker/accountStartForSource',
283
349
  service: 'cliworker',
@@ -403,7 +469,7 @@ export const TYPERT_REMOTE = {
403
469
  typeSymbol: 'dsh-cliworker-now#cliworker/accountStop:result',
404
470
  create: dsh_cliworker_now_cliworker_accountStop_result$schema,
405
471
  },
406
- sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":939,"column":9},
472
+ sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":958,"column":9},
407
473
  },
408
474
  {
409
475
  id: 'dsh-cliworker-now#cliworker/accountWatch',
@@ -440,7 +506,7 @@ export const TYPERT_REMOTE = {
440
506
  typeSymbol: 'dsh-cliworker-now#cliworker/accountWatch:result',
441
507
  create: dsh_cliworker_now_cliworker_accountWatch_result$schema,
442
508
  },
443
- sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":897,"column":10},
509
+ sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":916,"column":10},
444
510
  },
445
511
  {
446
512
  id: 'dsh-cliworker-now#cliworker/accountWrite',
@@ -485,7 +551,7 @@ export const TYPERT_REMOTE = {
485
551
  typeSymbol: 'dsh-cliworker-now#cliworker/accountWrite:result',
486
552
  create: dsh_cliworker_now_cliworker_accountWrite_result$schema,
487
553
  },
488
- sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":912,"column":9},
554
+ sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":931,"column":9},
489
555
  },
490
556
  {
491
557
  id: 'dsh-cliworker-now#cliworker/catalog',
@@ -511,7 +577,7 @@ export const TYPERT_REMOTE = {
511
577
  typeSymbol: 'dsh-cliworker-now#cliworker/catalog:result',
512
578
  create: dsh_cliworker_now_cliworker_catalog_result$schema,
513
579
  },
514
- sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":949,"column":9},
580
+ sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":968,"column":9},
515
581
  },
516
582
  {
517
583
  id: 'dsh-cliworker-now#cliworker/catalogForCli',
@@ -547,7 +613,7 @@ export const TYPERT_REMOTE = {
547
613
  typeSymbol: 'dsh-cliworker-now#cliworker/catalogForCli:result',
548
614
  create: dsh_cliworker_now_cliworker_catalogForCli_result$schema,
549
615
  },
550
- sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":954,"column":9},
616
+ sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":973,"column":9},
551
617
  },
552
618
  {
553
619
  id: 'dsh-cliworker-now#cliworker/cliSettings',
@@ -609,7 +675,7 @@ export const TYPERT_REMOTE = {
609
675
  typeSymbol: 'dsh-cliworker-now#cliworker/configure:result',
610
676
  create: dsh_cliworker_now_cliworker_configure_result$schema,
611
677
  },
612
- sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":972,"column":9},
678
+ sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":991,"column":9},
613
679
  },
614
680
  {
615
681
  id: 'dsh-cliworker-now#cliworker/configureWorker',
@@ -655,7 +721,7 @@ export const TYPERT_REMOTE = {
655
721
  typeSymbol: 'dsh-cliworker-now#cliworker/configureWorker:result',
656
722
  create: dsh_cliworker_now_cliworker_configureWorker_result$schema,
657
723
  },
658
- sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":999,"column":9},
724
+ sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1018,"column":9},
659
725
  },
660
726
  {
661
727
  id: 'dsh-cliworker-now#cliworker/deleteRolePreset',
@@ -773,7 +839,7 @@ export const TYPERT_REMOTE = {
773
839
  typeSymbol: 'dsh-cliworker-now#cliworker/followup:result',
774
840
  create: dsh_cliworker_now_cliworker_followup_result$schema,
775
841
  },
776
- sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1033,"column":9},
842
+ sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1052,"column":9},
777
843
  },
778
844
  {
779
845
  id: 'dsh-cliworker-now#cliworker/history',
@@ -966,7 +1032,7 @@ export const TYPERT_REMOTE = {
966
1032
  typeSymbol: 'dsh-cliworker-now#cliworker/restartWorker:result',
967
1033
  create: dsh_cliworker_now_cliworker_restartWorker_result$schema,
968
1034
  },
969
- sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1061,"column":9},
1035
+ sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1080,"column":9},
970
1036
  },
971
1037
  {
972
1038
  id: 'dsh-cliworker-now#cliworker/restoreWorker',
@@ -1145,7 +1211,7 @@ export const TYPERT_REMOTE = {
1145
1211
  typeSymbol: 'dsh-cliworker-now#cliworker/stop:result',
1146
1212
  create: dsh_cliworker_now_cliworker_stop_result$schema,
1147
1213
  },
1148
- sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1090,"column":9},
1214
+ sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1109,"column":9},
1149
1215
  },
1150
1216
  {
1151
1217
  id: 'dsh-cliworker-now#cliworker/watch',
@@ -0,0 +1,16 @@
1
+ type Query = (signal: AbortSignal) => Promise<void>;
2
+ /** Bounds dialog requests. Host owns process cleanup, including after RPC cancellation. */
3
+ export declare class AccountQueryQueue<Key extends string> {
4
+ private readonly limit;
5
+ private readonly waiting;
6
+ private readonly running;
7
+ private priority?;
8
+ constructor(limit?: number);
9
+ has(key: Key): boolean;
10
+ enqueue(key: Key, query: Query, replace?: boolean): boolean;
11
+ prioritize(key: Key): void;
12
+ cancel(key: Key): void;
13
+ clear(): void;
14
+ private drain;
15
+ }
16
+ export {};
@@ -0,0 +1,61 @@
1
+ /** Bounds dialog requests. Host owns process cleanup, including after RPC cancellation. */
2
+ export class AccountQueryQueue {
3
+ limit;
4
+ waiting = new Map();
5
+ running = new Map();
6
+ priority;
7
+ constructor(limit = 2) {
8
+ this.limit = limit;
9
+ }
10
+ has(key) {
11
+ // A cancelled request can still occupy a slot while a fresh read waits behind it.
12
+ const current = this.running.get(key);
13
+ return this.waiting.has(key) || !!(current && !current.controller.signal.aborted);
14
+ }
15
+ enqueue(key, query, replace = false) {
16
+ if (this.has(key) && !replace)
17
+ return false;
18
+ if (replace)
19
+ this.running.get(key)?.controller.abort();
20
+ this.waiting.set(key, query);
21
+ this.drain();
22
+ return true;
23
+ }
24
+ prioritize(key) {
25
+ this.priority = key;
26
+ this.drain();
27
+ }
28
+ cancel(key) {
29
+ this.waiting.delete(key);
30
+ this.running.get(key)?.controller.abort();
31
+ }
32
+ clear() {
33
+ this.waiting.clear();
34
+ for (const current of this.running.values())
35
+ current.controller.abort();
36
+ }
37
+ drain() {
38
+ // Reprioritize queued reads without aborting in-flight work: Gateway
39
+ // cancellation is not an acknowledgement that Host process cleanup is done.
40
+ while (this.running.size < this.limit) {
41
+ const key = this.priority !== undefined && this.waiting.has(this.priority) && !this.running.has(this.priority)
42
+ ? this.priority
43
+ : [...this.waiting.keys()].find((candidate) => !this.running.has(candidate));
44
+ if (key === undefined)
45
+ return;
46
+ const query = this.waiting.get(key);
47
+ this.waiting.delete(key);
48
+ const current = { query, controller: new AbortController() };
49
+ this.running.set(key, current);
50
+ void Promise.resolve()
51
+ .then(() => (current.controller.signal.aborted ? undefined : query(current.controller.signal)))
52
+ .catch(() => undefined)
53
+ .finally(() => {
54
+ if (this.running.get(key) === current)
55
+ this.running.delete(key);
56
+ this.drain();
57
+ });
58
+ }
59
+ }
60
+ }
61
+ //# sourceMappingURL=account-query-queue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-query-queue.js","sourceRoot":"","sources":["../../../src/client/account-query-queue.ts"],"names":[],"mappings":"AAGA,2FAA2F;AAC3F,MAAM,OAAO,iBAAiB;IAKC;IAJZ,OAAO,GAAG,IAAI,GAAG,EAAc,CAAA;IAC/B,OAAO,GAAG,IAAI,GAAG,EAAgB,CAAA;IAC1C,QAAQ,CAAM;IAEtB,YAA6B,Q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C,GAAG,CAAC,KAAK,OAAO;oBAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;gBAC/D,IAAI,CAAC,KAAK,EAAE,CAAA;YACd,CAAC,CAAC,CAAA;QACN,CAAC;IACH,CAAC;CACF"}
@@ -1,13 +1,17 @@
1
- import type { AccountAction, AccountSource } from '../shared/accounts.ts';
1
+ import { type MutableRefObject } from 'react';
2
+ import type { AccountAction, AccountSource, ZCodeLoginProvider } from '../shared/accounts.ts';
2
3
  import { type CliId } from '../shared/types.ts';
3
4
  import { type API } from './workers.ts';
5
+ export type AccountCloseControl = MutableRefObject<(() => Promise<boolean>) | undefined>;
4
6
  /** Only mounted after a human selects an account action. No prompt is auto-entered. */
5
- export declare function AccountTerminal({ api, sessionId, cli, action, source, onClose, onFinished, }: {
7
+ export declare function AccountTerminal({ api, sessionId, cli, action, source, provider, onClose, onFinished, closeControl, }: {
6
8
  api: API;
7
9
  sessionId: string;
8
10
  cli: CliId;
9
11
  action: AccountAction;
10
12
  source?: AccountSource;
13
+ provider?: ZCodeLoginProvider;
11
14
  onClose: () => void;
12
15
  onFinished: () => void;
16
+ closeControl?: AccountCloseControl;
13
17
  }): import("react/jsx-runtime").JSX.Element;