dsh-cliworker-now 0.7.6 → 0.7.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.
- package/README.en.md +53 -11
- package/README.md +56 -11
- package/lib/account-models.mjs +49 -18
- package/lib/client.js +1221 -151
- package/lib/client.js.map +1 -1
- package/lib/grok-catalog.mjs +2 -2
- package/lib/hermes-native-entry.py +48 -13
- package/lib/hermes-nous-refresh.py +331 -0
- package/lib/index.js +9469 -6030
- package/lib/index.js.map +1 -1
- package/lib/native-launch.mjs +62 -7
- package/lib/native-spawn.mjs +32 -0
- package/lib/pi-installation.mjs +27 -3
- package/lib/pi-native-catalog.mjs +17 -7
- package/lib/pi-omp-bridge.mjs +2 -2
- package/lib/pi-omp-refresh.mjs +3 -3
- package/lib/private-launch.mjs +6 -2
- package/lib/terminal-bridge.mjs +2 -2
- package/lib/typert.host.js +265 -25
- package/lib/typert.remote-client.d.ts +8 -0
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +241 -25
- package/lib/types/client/account-query-queue.d.ts +16 -0
- package/lib/types/client/account-query-queue.js +61 -0
- package/lib/types/client/account-query-queue.js.map +1 -0
- package/lib/types/client/account-terminal.d.ts +6 -2
- package/lib/types/client/account-terminal.js +260 -31
- package/lib/types/client/account-terminal.js.map +1 -1
- package/lib/types/client/cli-executable-settings.d.ts +13 -0
- package/lib/types/client/cli-executable-settings.js +128 -0
- package/lib/types/client/cli-executable-settings.js.map +1 -0
- package/lib/types/client/management-styles.d.ts +1 -1
- package/lib/types/client/management-styles.js +4 -0
- package/lib/types/client/management-styles.js.map +1 -1
- package/lib/types/client/settings-dialog.js +196 -80
- package/lib/types/client/settings-dialog.js.map +1 -1
- package/lib/types/client/styles.d.ts +1 -1
- package/lib/types/client/styles.js +18 -16
- package/lib/types/client/styles.js.map +1 -1
- package/lib/types/client/zcode-login-link-provider.d.ts +9 -0
- package/lib/types/client/zcode-login-link-provider.js +105 -0
- package/lib/types/client/zcode-login-link-provider.js.map +1 -0
- package/lib/types/client/zcode-login-link.d.ts +16 -0
- package/lib/types/client/zcode-login-link.js +194 -0
- package/lib/types/client/zcode-login-link.js.map +1 -0
- package/lib/types/host/account-models.d.mts +10 -2
- package/lib/types/host/account-models.mjs +49 -18
- package/lib/types/host/accounts.d.ts +3 -2
- package/lib/types/host/accounts.js +168 -29
- package/lib/types/host/accounts.js.map +1 -1
- package/lib/types/host/adapters.d.ts +3 -1
- package/lib/types/host/adapters.js +138 -11
- package/lib/types/host/adapters.js.map +1 -1
- package/lib/types/host/agy-background-environment.d.ts +2 -0
- package/lib/types/host/agy-background-environment.js +7 -0
- package/lib/types/host/agy-background-environment.js.map +1 -0
- package/lib/types/host/agy-models.d.ts +2 -1
- package/lib/types/host/agy-models.js +6 -6
- package/lib/types/host/agy-models.js.map +1 -1
- package/lib/types/host/agy-windows-account.d.ts +14 -0
- package/lib/types/host/agy-windows-account.js +104 -0
- package/lib/types/host/agy-windows-account.js.map +1 -0
- package/lib/types/host/authorized-catalog.js +13 -4
- package/lib/types/host/authorized-catalog.js.map +1 -1
- package/lib/types/host/claude-native-oauth.d.ts +17 -0
- package/lib/types/host/claude-native-oauth.js +274 -0
- package/lib/types/host/claude-native-oauth.js.map +1 -0
- package/lib/types/host/claude-own-route.d.ts +45 -0
- package/lib/types/host/claude-own-route.js +375 -0
- package/lib/types/host/claude-own-route.js.map +1 -0
- package/lib/types/host/cli-account-binding.d.ts +2 -1
- package/lib/types/host/cli-account-binding.js +64 -21
- package/lib/types/host/cli-account-binding.js.map +1 -1
- package/lib/types/host/cli-executable-paths.d.ts +30 -0
- package/lib/types/host/cli-executable-paths.js +272 -0
- package/lib/types/host/cli-executable-paths.js.map +1 -0
- package/lib/types/host/codex-models.d.ts +3 -1
- package/lib/types/host/codex-models.js +41 -4
- package/lib/types/host/codex-models.js.map +1 -1
- package/lib/types/host/extended-adapters.d.ts +3 -2
- package/lib/types/host/extended-adapters.js +9 -7
- package/lib/types/host/extended-adapters.js.map +1 -1
- package/lib/types/host/first-party-models.d.ts +5 -0
- package/lib/types/host/first-party-models.js +173 -50
- package/lib/types/host/first-party-models.js.map +1 -1
- package/lib/types/host/hermes-accounts.js +68 -9
- package/lib/types/host/hermes-accounts.js.map +1 -1
- package/lib/types/host/hermes-adapter.d.ts +3 -0
- package/lib/types/host/hermes-adapter.js +13 -4
- package/lib/types/host/hermes-adapter.js.map +1 -1
- package/lib/types/host/hermes-installation.js +54 -35
- package/lib/types/host/hermes-installation.js.map +1 -1
- package/lib/types/host/hermes-models.js +21 -2
- package/lib/types/host/hermes-models.js.map +1 -1
- package/lib/types/host/hermes-native-entry.py +48 -13
- package/lib/types/host/hermes-nous-refresh.py +331 -0
- package/lib/types/host/hermes-nous.d.ts +5 -1
- package/lib/types/host/hermes-nous.js +5 -5
- package/lib/types/host/hermes-nous.js.map +1 -1
- package/lib/types/host/hermes-renewal.d.ts +27 -0
- package/lib/types/host/hermes-renewal.js +292 -0
- package/lib/types/host/hermes-renewal.js.map +1 -0
- package/lib/types/host/hermes-windows-installation.d.ts +5 -0
- package/lib/types/host/hermes-windows-installation.js +91 -0
- package/lib/types/host/hermes-windows-installation.js.map +1 -0
- package/lib/types/host/index.d.ts +12 -0
- package/lib/types/host/index.js +138 -8
- package/lib/types/host/index.js.map +1 -1
- package/lib/types/host/kimi-accounts.d.ts +2 -0
- package/lib/types/host/kimi-accounts.js +4 -2
- package/lib/types/host/kimi-accounts.js.map +1 -1
- package/lib/types/host/kimi-oauth-models.d.ts +14 -0
- package/lib/types/host/kimi-oauth-models.js +246 -0
- package/lib/types/host/kimi-oauth-models.js.map +1 -0
- package/lib/types/host/mimo-metadata-cache.d.ts +22 -0
- package/lib/types/host/mimo-metadata-cache.js +121 -0
- package/lib/types/host/mimo-metadata-cache.js.map +1 -0
- package/lib/types/host/native-capability-cache.d.ts +11 -0
- package/lib/types/host/native-capability-cache.js +94 -0
- package/lib/types/host/native-capability-cache.js.map +1 -0
- package/lib/types/host/native-launch.mjs +62 -7
- package/lib/types/host/native-process.d.ts +3 -1
- package/lib/types/host/native-process.js +30 -5
- package/lib/types/host/native-process.js.map +1 -1
- package/lib/types/host/native-spawn.mjs +32 -0
- package/lib/types/host/opencode-native.js +13 -0
- package/lib/types/host/opencode-native.js.map +1 -1
- package/lib/types/host/pi-installation.d.mts +1 -1
- package/lib/types/host/pi-installation.mjs +27 -3
- package/lib/types/host/pi-omp-adapter.js +17 -3
- package/lib/types/host/pi-omp-adapter.js.map +1 -1
- package/lib/types/host/pi-omp-native.js +5 -3
- package/lib/types/host/pi-omp-native.js.map +1 -1
- package/lib/types/host/pi-omp-refresh.mjs +3 -3
- package/lib/types/host/private-launch.mjs +23 -0
- package/lib/types/host/process.d.ts +3 -0
- package/lib/types/host/process.js +3 -1
- package/lib/types/host/process.js.map +1 -1
- package/lib/types/host/routing.js +25 -2
- package/lib/types/host/routing.js.map +1 -1
- package/lib/types/host/runtime.js +21 -5
- package/lib/types/host/runtime.js.map +1 -1
- package/lib/types/host/settings-catalog-cache.d.ts +28 -0
- package/lib/types/host/settings-catalog-cache.js +189 -0
- package/lib/types/host/settings-catalog-cache.js.map +1 -0
- package/lib/types/host/windows-account-bootstrap.ps1 +44 -0
- package/lib/types/host/windows-account-launch.mjs +47 -0
- package/lib/types/host/windows-account-owner.ps1 +137 -0
- package/lib/types/host/windows-account-stdio.mjs +19 -0
- package/lib/types/host/windows-account-terminal.d.ts +17 -0
- package/lib/types/host/windows-account-terminal.js +208 -0
- package/lib/types/host/windows-account-terminal.js.map +1 -0
- package/lib/types/host/windows-agy-account.ps1 +81 -0
- package/lib/types/host/windows-cli-installation.d.ts +35 -0
- package/lib/types/host/windows-cli-installation.js +164 -0
- package/lib/types/host/windows-cli-installation.js.map +1 -0
- package/lib/types/host/windows-codex-launch.d.ts +9 -0
- package/lib/types/host/windows-codex-launch.js +216 -0
- package/lib/types/host/windows-codex-launch.js.map +1 -0
- package/lib/types/host/windows-desktop-cli-installation.d.ts +20 -0
- package/lib/types/host/windows-desktop-cli-installation.js +420 -0
- package/lib/types/host/windows-desktop-cli-installation.js.map +1 -0
- package/lib/types/host/windows-hidden-launch.mjs +51 -0
- package/lib/types/host/windows-hidden-process.d.ts +12 -0
- package/lib/types/host/windows-hidden-process.js +116 -0
- package/lib/types/host/windows-hidden-process.js.map +1 -0
- package/lib/types/host/zcode-adapter.js +5 -1
- package/lib/types/host/zcode-adapter.js.map +1 -1
- package/lib/types/host/zcode-grok-accounts.d.ts +3 -1
- package/lib/types/host/zcode-grok-accounts.js +60 -11
- package/lib/types/host/zcode-grok-accounts.js.map +1 -1
- package/lib/types/shared/accounts.d.ts +4 -0
- package/lib/types/shared/cli-settings.d.ts +8 -0
- package/lib/windows-account-bootstrap.ps1 +44 -0
- package/lib/windows-account-launch.mjs +47 -0
- package/lib/windows-account-owner.ps1 +137 -0
- package/lib/windows-account-stdio.mjs +19 -0
- package/lib/windows-agy-account.ps1 +81 -0
- package/lib/windows-hidden-launch.mjs +51 -0
- package/lib/zcode-resume.mjs +2 -2
- package/package.json +2 -2
|
@@ -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
|
|
@@ -65,6 +75,12 @@ let dsh_cliworker_now_cliworker_catalogForCli_parameter_1$schema$value
|
|
|
65
75
|
const dsh_cliworker_now_cliworker_catalogForCli_parameter_1$schema = () => (dsh_cliworker_now_cliworker_catalogForCli_parameter_1$schema$value ??= z.string())
|
|
66
76
|
let dsh_cliworker_now_cliworker_catalogForCli_result$schema$value
|
|
67
77
|
const dsh_cliworker_now_cliworker_catalogForCli_result$schema = () => (dsh_cliworker_now_cliworker_catalogForCli_result$schema$value ??= z.string())
|
|
78
|
+
let dsh_cliworker_now_cliworker_cliExecutablePath_parameter_0$schema$value
|
|
79
|
+
const dsh_cliworker_now_cliworker_cliExecutablePath_parameter_0$schema = () => (dsh_cliworker_now_cliworker_cliExecutablePath_parameter_0$schema$value ??= z.string())
|
|
80
|
+
let dsh_cliworker_now_cliworker_cliExecutablePath_parameter_1$schema$value
|
|
81
|
+
const dsh_cliworker_now_cliworker_cliExecutablePath_parameter_1$schema = () => (dsh_cliworker_now_cliworker_cliExecutablePath_parameter_1$schema$value ??= z.string())
|
|
82
|
+
let dsh_cliworker_now_cliworker_cliExecutablePath_result$schema$value
|
|
83
|
+
const dsh_cliworker_now_cliworker_cliExecutablePath_result$schema = () => (dsh_cliworker_now_cliworker_cliExecutablePath_result$schema$value ??= z.string())
|
|
68
84
|
let dsh_cliworker_now_cliworker_cliSettings_parameter_0$schema$value
|
|
69
85
|
const dsh_cliworker_now_cliworker_cliSettings_parameter_0$schema = () => (dsh_cliworker_now_cliworker_cliSettings_parameter_0$schema$value ??= z.string())
|
|
70
86
|
let dsh_cliworker_now_cliworker_cliSettings_result$schema$value
|
|
@@ -113,6 +129,22 @@ let dsh_cliworker_now_cliworker_history_parameter_3$schema$value
|
|
|
113
129
|
const dsh_cliworker_now_cliworker_history_parameter_3$schema = () => (dsh_cliworker_now_cliworker_history_parameter_3$schema$value ??= z.string())
|
|
114
130
|
let dsh_cliworker_now_cliworker_history_result$schema$value
|
|
115
131
|
const dsh_cliworker_now_cliworker_history_result$schema = () => (dsh_cliworker_now_cliworker_history_result$schema$value ??= z.string())
|
|
132
|
+
let dsh_cliworker_now_cliworker_refreshCatalogForCli_parameter_0$schema$value
|
|
133
|
+
const dsh_cliworker_now_cliworker_refreshCatalogForCli_parameter_0$schema = () => (dsh_cliworker_now_cliworker_refreshCatalogForCli_parameter_0$schema$value ??= z.string())
|
|
134
|
+
let dsh_cliworker_now_cliworker_refreshCatalogForCli_parameter_1$schema$value
|
|
135
|
+
const dsh_cliworker_now_cliworker_refreshCatalogForCli_parameter_1$schema = () => (dsh_cliworker_now_cliworker_refreshCatalogForCli_parameter_1$schema$value ??= z.string())
|
|
136
|
+
let dsh_cliworker_now_cliworker_refreshCatalogForCli_result$schema$value
|
|
137
|
+
const dsh_cliworker_now_cliworker_refreshCatalogForCli_result$schema = () => (dsh_cliworker_now_cliworker_refreshCatalogForCli_result$schema$value ??= z.string())
|
|
138
|
+
let dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_0$schema$value
|
|
139
|
+
const dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_0$schema = () => (dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_0$schema$value ??= z.string())
|
|
140
|
+
let dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_1$schema$value
|
|
141
|
+
const dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_1$schema = () => (dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_1$schema$value ??= z.string())
|
|
142
|
+
let dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_2$schema$value
|
|
143
|
+
const dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_2$schema = () => (dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_2$schema$value ??= z.string())
|
|
144
|
+
let dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_3$schema$value
|
|
145
|
+
const dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_3$schema = () => (dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_3$schema$value ??= z.string())
|
|
146
|
+
let dsh_cliworker_now_cliworker_refreshCliExecutablePath_result$schema$value
|
|
147
|
+
const dsh_cliworker_now_cliworker_refreshCliExecutablePath_result$schema = () => (dsh_cliworker_now_cliworker_refreshCliExecutablePath_result$schema$value ??= z.string())
|
|
116
148
|
let dsh_cliworker_now_cliworker_renameWorker_parameter_0$schema$value
|
|
117
149
|
const dsh_cliworker_now_cliworker_renameWorker_parameter_0$schema = () => (dsh_cliworker_now_cliworker_renameWorker_parameter_0$schema$value ??= z.string())
|
|
118
150
|
let dsh_cliworker_now_cliworker_renameWorker_parameter_1$schema$value
|
|
@@ -230,7 +262,7 @@ export const TYPERT_REMOTE = {
|
|
|
230
262
|
typeSymbol: 'dsh-cliworker-now#cliworker/accountResize:result',
|
|
231
263
|
create: dsh_cliworker_now_cliworker_accountResize_result$schema,
|
|
232
264
|
},
|
|
233
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
265
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1035,"column":9},
|
|
234
266
|
},
|
|
235
267
|
{
|
|
236
268
|
id: 'dsh-cliworker-now#cliworker/accountStart',
|
|
@@ -276,7 +308,63 @@ export const TYPERT_REMOTE = {
|
|
|
276
308
|
typeSymbol: 'dsh-cliworker-now#cliworker/accountStart:result',
|
|
277
309
|
create: dsh_cliworker_now_cliworker_accountStart_result$schema,
|
|
278
310
|
},
|
|
279
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
311
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":930,"column":9},
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
id: 'dsh-cliworker-now#cliworker/accountStartForProvider',
|
|
315
|
+
service: 'cliworker',
|
|
316
|
+
namespace: 'cliworker',
|
|
317
|
+
method: 'accountStartForProvider',
|
|
318
|
+
invocation: { kind: 'direct' },
|
|
319
|
+
parameters: [
|
|
320
|
+
{
|
|
321
|
+
name: 'parentSessionId',
|
|
322
|
+
wire: 'parentSessionId',
|
|
323
|
+
source: 'json',
|
|
324
|
+
codec: {
|
|
325
|
+
mode: 'strict',
|
|
326
|
+
typeSymbol: 'dsh-cliworker-now#cliworker/accountStartForProvider:parentSessionId',
|
|
327
|
+
create: dsh_cliworker_now_cliworker_accountStartForProvider_parameter_0$schema,
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
name: 'cli',
|
|
332
|
+
wire: 'cli',
|
|
333
|
+
source: 'json',
|
|
334
|
+
codec: {
|
|
335
|
+
mode: 'strict',
|
|
336
|
+
typeSymbol: 'dsh-cliworker-now#cliworker/accountStartForProvider:cli',
|
|
337
|
+
create: dsh_cliworker_now_cliworker_accountStartForProvider_parameter_1$schema,
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
name: 'action',
|
|
342
|
+
wire: 'action',
|
|
343
|
+
source: 'json',
|
|
344
|
+
codec: {
|
|
345
|
+
mode: 'strict',
|
|
346
|
+
typeSymbol: 'dsh-cliworker-now#cliworker/accountStartForProvider:action',
|
|
347
|
+
create: dsh_cliworker_now_cliworker_accountStartForProvider_parameter_2$schema,
|
|
348
|
+
},
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
name: 'provider',
|
|
352
|
+
wire: 'provider',
|
|
353
|
+
source: 'json',
|
|
354
|
+
codec: {
|
|
355
|
+
mode: 'strict',
|
|
356
|
+
typeSymbol: 'dsh-cliworker-now#cliworker/accountStartForProvider:provider',
|
|
357
|
+
create: dsh_cliworker_now_cliworker_accountStartForProvider_parameter_3$schema,
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
],
|
|
361
|
+
cancellation: { parameter: 'signal' },
|
|
362
|
+
result: {
|
|
363
|
+
mode: 'strict',
|
|
364
|
+
typeSymbol: 'dsh-cliworker-now#cliworker/accountStartForProvider:result',
|
|
365
|
+
create: dsh_cliworker_now_cliworker_accountStartForProvider_result$schema,
|
|
366
|
+
},
|
|
367
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":958,"column":9},
|
|
280
368
|
},
|
|
281
369
|
{
|
|
282
370
|
id: 'dsh-cliworker-now#cliworker/accountStartForSource',
|
|
@@ -332,7 +420,7 @@ export const TYPERT_REMOTE = {
|
|
|
332
420
|
typeSymbol: 'dsh-cliworker-now#cliworker/accountStartForSource:result',
|
|
333
421
|
create: dsh_cliworker_now_cliworker_accountStartForSource_result$schema,
|
|
334
422
|
},
|
|
335
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
423
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":941,"column":9},
|
|
336
424
|
},
|
|
337
425
|
{
|
|
338
426
|
id: 'dsh-cliworker-now#cliworker/accountStatus',
|
|
@@ -368,7 +456,7 @@ export const TYPERT_REMOTE = {
|
|
|
368
456
|
typeSymbol: 'dsh-cliworker-now#cliworker/accountStatus:result',
|
|
369
457
|
create: dsh_cliworker_now_cliworker_accountStatus_result$schema,
|
|
370
458
|
},
|
|
371
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
459
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":831,"column":9},
|
|
372
460
|
},
|
|
373
461
|
{
|
|
374
462
|
id: 'dsh-cliworker-now#cliworker/accountStop',
|
|
@@ -403,7 +491,7 @@ export const TYPERT_REMOTE = {
|
|
|
403
491
|
typeSymbol: 'dsh-cliworker-now#cliworker/accountStop:result',
|
|
404
492
|
create: dsh_cliworker_now_cliworker_accountStop_result$schema,
|
|
405
493
|
},
|
|
406
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
494
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1051,"column":9},
|
|
407
495
|
},
|
|
408
496
|
{
|
|
409
497
|
id: 'dsh-cliworker-now#cliworker/accountWatch',
|
|
@@ -440,7 +528,7 @@ export const TYPERT_REMOTE = {
|
|
|
440
528
|
typeSymbol: 'dsh-cliworker-now#cliworker/accountWatch:result',
|
|
441
529
|
create: dsh_cliworker_now_cliworker_accountWatch_result$schema,
|
|
442
530
|
},
|
|
443
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
531
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1009,"column":10},
|
|
444
532
|
},
|
|
445
533
|
{
|
|
446
534
|
id: 'dsh-cliworker-now#cliworker/accountWrite',
|
|
@@ -485,7 +573,7 @@ export const TYPERT_REMOTE = {
|
|
|
485
573
|
typeSymbol: 'dsh-cliworker-now#cliworker/accountWrite:result',
|
|
486
574
|
create: dsh_cliworker_now_cliworker_accountWrite_result$schema,
|
|
487
575
|
},
|
|
488
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
576
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1024,"column":9},
|
|
489
577
|
},
|
|
490
578
|
{
|
|
491
579
|
id: 'dsh-cliworker-now#cliworker/catalog',
|
|
@@ -511,7 +599,7 @@ export const TYPERT_REMOTE = {
|
|
|
511
599
|
typeSymbol: 'dsh-cliworker-now#cliworker/catalog:result',
|
|
512
600
|
create: dsh_cliworker_now_cliworker_catalog_result$schema,
|
|
513
601
|
},
|
|
514
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
602
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1061,"column":9},
|
|
515
603
|
},
|
|
516
604
|
{
|
|
517
605
|
id: 'dsh-cliworker-now#cliworker/catalogForCli',
|
|
@@ -547,7 +635,43 @@ export const TYPERT_REMOTE = {
|
|
|
547
635
|
typeSymbol: 'dsh-cliworker-now#cliworker/catalogForCli:result',
|
|
548
636
|
create: dsh_cliworker_now_cliworker_catalogForCli_result$schema,
|
|
549
637
|
},
|
|
550
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
638
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1066,"column":9},
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
id: 'dsh-cliworker-now#cliworker/cliExecutablePath',
|
|
642
|
+
service: 'cliworker',
|
|
643
|
+
namespace: 'cliworker',
|
|
644
|
+
method: 'cliExecutablePath',
|
|
645
|
+
invocation: { kind: 'direct' },
|
|
646
|
+
parameters: [
|
|
647
|
+
{
|
|
648
|
+
name: 'parentSessionId',
|
|
649
|
+
wire: 'parentSessionId',
|
|
650
|
+
source: 'json',
|
|
651
|
+
codec: {
|
|
652
|
+
mode: 'strict',
|
|
653
|
+
typeSymbol: 'dsh-cliworker-now#cliworker/cliExecutablePath:parentSessionId',
|
|
654
|
+
create: dsh_cliworker_now_cliworker_cliExecutablePath_parameter_0$schema,
|
|
655
|
+
},
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
name: 'cli',
|
|
659
|
+
wire: 'cli',
|
|
660
|
+
source: 'json',
|
|
661
|
+
codec: {
|
|
662
|
+
mode: 'strict',
|
|
663
|
+
typeSymbol: 'dsh-cliworker-now#cliworker/cliExecutablePath:cli',
|
|
664
|
+
create: dsh_cliworker_now_cliworker_cliExecutablePath_parameter_1$schema,
|
|
665
|
+
},
|
|
666
|
+
},
|
|
667
|
+
],
|
|
668
|
+
cancellation: { parameter: 'signal' },
|
|
669
|
+
result: {
|
|
670
|
+
mode: 'strict',
|
|
671
|
+
typeSymbol: 'dsh-cliworker-now#cliworker/cliExecutablePath:result',
|
|
672
|
+
create: dsh_cliworker_now_cliworker_cliExecutablePath_result$schema,
|
|
673
|
+
},
|
|
674
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":880,"column":9},
|
|
551
675
|
},
|
|
552
676
|
{
|
|
553
677
|
id: 'dsh-cliworker-now#cliworker/cliSettings',
|
|
@@ -573,7 +697,7 @@ export const TYPERT_REMOTE = {
|
|
|
573
697
|
typeSymbol: 'dsh-cliworker-now#cliworker/cliSettings:result',
|
|
574
698
|
create: dsh_cliworker_now_cliworker_cliSettings_result$schema,
|
|
575
699
|
},
|
|
576
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
700
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":707,"column":9},
|
|
577
701
|
},
|
|
578
702
|
{
|
|
579
703
|
id: 'dsh-cliworker-now#cliworker/configure',
|
|
@@ -609,7 +733,7 @@ export const TYPERT_REMOTE = {
|
|
|
609
733
|
typeSymbol: 'dsh-cliworker-now#cliworker/configure:result',
|
|
610
734
|
create: dsh_cliworker_now_cliworker_configure_result$schema,
|
|
611
735
|
},
|
|
612
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
736
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1105,"column":9},
|
|
613
737
|
},
|
|
614
738
|
{
|
|
615
739
|
id: 'dsh-cliworker-now#cliworker/configureWorker',
|
|
@@ -655,7 +779,7 @@ export const TYPERT_REMOTE = {
|
|
|
655
779
|
typeSymbol: 'dsh-cliworker-now#cliworker/configureWorker:result',
|
|
656
780
|
create: dsh_cliworker_now_cliworker_configureWorker_result$schema,
|
|
657
781
|
},
|
|
658
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
782
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1132,"column":9},
|
|
659
783
|
},
|
|
660
784
|
{
|
|
661
785
|
id: 'dsh-cliworker-now#cliworker/deleteRolePreset',
|
|
@@ -691,7 +815,7 @@ export const TYPERT_REMOTE = {
|
|
|
691
815
|
typeSymbol: 'dsh-cliworker-now#cliworker/deleteRolePreset:result',
|
|
692
816
|
create: dsh_cliworker_now_cliworker_deleteRolePreset_result$schema,
|
|
693
817
|
},
|
|
694
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
818
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":742,"column":9},
|
|
695
819
|
},
|
|
696
820
|
{
|
|
697
821
|
id: 'dsh-cliworker-now#cliworker/deleteWorker',
|
|
@@ -727,7 +851,7 @@ export const TYPERT_REMOTE = {
|
|
|
727
851
|
typeSymbol: 'dsh-cliworker-now#cliworker/deleteWorker:result',
|
|
728
852
|
create: dsh_cliworker_now_cliworker_deleteWorker_result$schema,
|
|
729
853
|
},
|
|
730
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
854
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":786,"column":9},
|
|
731
855
|
},
|
|
732
856
|
{
|
|
733
857
|
id: 'dsh-cliworker-now#cliworker/followup',
|
|
@@ -773,7 +897,7 @@ export const TYPERT_REMOTE = {
|
|
|
773
897
|
typeSymbol: 'dsh-cliworker-now#cliworker/followup:result',
|
|
774
898
|
create: dsh_cliworker_now_cliworker_followup_result$schema,
|
|
775
899
|
},
|
|
776
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
900
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1166,"column":9},
|
|
777
901
|
},
|
|
778
902
|
{
|
|
779
903
|
id: 'dsh-cliworker-now#cliworker/history',
|
|
@@ -828,7 +952,99 @@ export const TYPERT_REMOTE = {
|
|
|
828
952
|
typeSymbol: 'dsh-cliworker-now#cliworker/history:result',
|
|
829
953
|
create: dsh_cliworker_now_cliworker_history_result$schema,
|
|
830
954
|
},
|
|
831
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
955
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":693,"column":9},
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
id: 'dsh-cliworker-now#cliworker/refreshCatalogForCli',
|
|
959
|
+
service: 'cliworker',
|
|
960
|
+
namespace: 'cliworker',
|
|
961
|
+
method: 'refreshCatalogForCli',
|
|
962
|
+
invocation: { kind: 'direct' },
|
|
963
|
+
parameters: [
|
|
964
|
+
{
|
|
965
|
+
name: 'parentSessionId',
|
|
966
|
+
wire: 'parentSessionId',
|
|
967
|
+
source: 'json',
|
|
968
|
+
codec: {
|
|
969
|
+
mode: 'strict',
|
|
970
|
+
typeSymbol: 'dsh-cliworker-now#cliworker/refreshCatalogForCli:parentSessionId',
|
|
971
|
+
create: dsh_cliworker_now_cliworker_refreshCatalogForCli_parameter_0$schema,
|
|
972
|
+
},
|
|
973
|
+
},
|
|
974
|
+
{
|
|
975
|
+
name: 'cli',
|
|
976
|
+
wire: 'cli',
|
|
977
|
+
source: 'json',
|
|
978
|
+
codec: {
|
|
979
|
+
mode: 'strict',
|
|
980
|
+
typeSymbol: 'dsh-cliworker-now#cliworker/refreshCatalogForCli:cli',
|
|
981
|
+
create: dsh_cliworker_now_cliworker_refreshCatalogForCli_parameter_1$schema,
|
|
982
|
+
},
|
|
983
|
+
},
|
|
984
|
+
],
|
|
985
|
+
cancellation: { parameter: 'signal' },
|
|
986
|
+
result: {
|
|
987
|
+
mode: 'strict',
|
|
988
|
+
typeSymbol: 'dsh-cliworker-now#cliworker/refreshCatalogForCli:result',
|
|
989
|
+
create: dsh_cliworker_now_cliworker_refreshCatalogForCli_result$schema,
|
|
990
|
+
},
|
|
991
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1071,"column":9},
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
id: 'dsh-cliworker-now#cliworker/refreshCliExecutablePath',
|
|
995
|
+
service: 'cliworker',
|
|
996
|
+
namespace: 'cliworker',
|
|
997
|
+
method: 'refreshCliExecutablePath',
|
|
998
|
+
invocation: { kind: 'direct' },
|
|
999
|
+
parameters: [
|
|
1000
|
+
{
|
|
1001
|
+
name: 'parentSessionId',
|
|
1002
|
+
wire: 'parentSessionId',
|
|
1003
|
+
source: 'json',
|
|
1004
|
+
codec: {
|
|
1005
|
+
mode: 'strict',
|
|
1006
|
+
typeSymbol: 'dsh-cliworker-now#cliworker/refreshCliExecutablePath:parentSessionId',
|
|
1007
|
+
create: dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_0$schema,
|
|
1008
|
+
},
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
name: 'cli',
|
|
1012
|
+
wire: 'cli',
|
|
1013
|
+
source: 'json',
|
|
1014
|
+
codec: {
|
|
1015
|
+
mode: 'strict',
|
|
1016
|
+
typeSymbol: 'dsh-cliworker-now#cliworker/refreshCliExecutablePath:cli',
|
|
1017
|
+
create: dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_1$schema,
|
|
1018
|
+
},
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
name: 'path',
|
|
1022
|
+
wire: 'path',
|
|
1023
|
+
source: 'json',
|
|
1024
|
+
codec: {
|
|
1025
|
+
mode: 'strict',
|
|
1026
|
+
typeSymbol: 'dsh-cliworker-now#cliworker/refreshCliExecutablePath:path',
|
|
1027
|
+
create: dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_2$schema,
|
|
1028
|
+
},
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
name: 'action',
|
|
1032
|
+
wire: 'action',
|
|
1033
|
+
source: 'json',
|
|
1034
|
+
codec: {
|
|
1035
|
+
mode: 'strict',
|
|
1036
|
+
typeSymbol: 'dsh-cliworker-now#cliworker/refreshCliExecutablePath:action',
|
|
1037
|
+
create: dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_3$schema,
|
|
1038
|
+
},
|
|
1039
|
+
},
|
|
1040
|
+
],
|
|
1041
|
+
cancellation: { parameter: 'signal' },
|
|
1042
|
+
result: {
|
|
1043
|
+
mode: 'strict',
|
|
1044
|
+
typeSymbol: 'dsh-cliworker-now#cliworker/refreshCliExecutablePath:result',
|
|
1045
|
+
create: dsh_cliworker_now_cliworker_refreshCliExecutablePath_result$schema,
|
|
1046
|
+
},
|
|
1047
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":901,"column":9},
|
|
832
1048
|
},
|
|
833
1049
|
{
|
|
834
1050
|
id: 'dsh-cliworker-now#cliworker/renameWorker',
|
|
@@ -874,7 +1090,7 @@ export const TYPERT_REMOTE = {
|
|
|
874
1090
|
typeSymbol: 'dsh-cliworker-now#cliworker/renameWorker:result',
|
|
875
1091
|
create: dsh_cliworker_now_cliworker_renameWorker_result$schema,
|
|
876
1092
|
},
|
|
877
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
1093
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":754,"column":9},
|
|
878
1094
|
},
|
|
879
1095
|
{
|
|
880
1096
|
id: 'dsh-cliworker-now#cliworker/renameWorkerTitle',
|
|
@@ -920,7 +1136,7 @@ export const TYPERT_REMOTE = {
|
|
|
920
1136
|
typeSymbol: 'dsh-cliworker-now#cliworker/renameWorkerTitle:result',
|
|
921
1137
|
create: dsh_cliworker_now_cliworker_renameWorkerTitle_result$schema,
|
|
922
1138
|
},
|
|
923
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
1139
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":770,"column":9},
|
|
924
1140
|
},
|
|
925
1141
|
{
|
|
926
1142
|
id: 'dsh-cliworker-now#cliworker/restartWorker',
|
|
@@ -966,7 +1182,7 @@ export const TYPERT_REMOTE = {
|
|
|
966
1182
|
typeSymbol: 'dsh-cliworker-now#cliworker/restartWorker:result',
|
|
967
1183
|
create: dsh_cliworker_now_cliworker_restartWorker_result$schema,
|
|
968
1184
|
},
|
|
969
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
1185
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1194,"column":9},
|
|
970
1186
|
},
|
|
971
1187
|
{
|
|
972
1188
|
id: 'dsh-cliworker-now#cliworker/restoreWorker',
|
|
@@ -1002,7 +1218,7 @@ export const TYPERT_REMOTE = {
|
|
|
1002
1218
|
typeSymbol: 'dsh-cliworker-now#cliworker/restoreWorker:result',
|
|
1003
1219
|
create: dsh_cliworker_now_cliworker_restoreWorker_result$schema,
|
|
1004
1220
|
},
|
|
1005
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
1221
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":797,"column":9},
|
|
1006
1222
|
},
|
|
1007
1223
|
{
|
|
1008
1224
|
id: 'dsh-cliworker-now#cliworker/rolePresets',
|
|
@@ -1028,7 +1244,7 @@ export const TYPERT_REMOTE = {
|
|
|
1028
1244
|
typeSymbol: 'dsh-cliworker-now#cliworker/rolePresets:result',
|
|
1029
1245
|
create: dsh_cliworker_now_cliworker_rolePresets_result$schema,
|
|
1030
1246
|
},
|
|
1031
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
1247
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":718,"column":9},
|
|
1032
1248
|
},
|
|
1033
1249
|
{
|
|
1034
1250
|
id: 'dsh-cliworker-now#cliworker/saveRolePreset',
|
|
@@ -1064,7 +1280,7 @@ export const TYPERT_REMOTE = {
|
|
|
1064
1280
|
typeSymbol: 'dsh-cliworker-now#cliworker/saveRolePreset:result',
|
|
1065
1281
|
create: dsh_cliworker_now_cliworker_saveRolePreset_result$schema,
|
|
1066
1282
|
},
|
|
1067
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
1283
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":729,"column":9},
|
|
1068
1284
|
},
|
|
1069
1285
|
{
|
|
1070
1286
|
id: 'dsh-cliworker-now#cliworker/setCliEnabled',
|
|
@@ -1110,7 +1326,7 @@ export const TYPERT_REMOTE = {
|
|
|
1110
1326
|
typeSymbol: 'dsh-cliworker-now#cliworker/setCliEnabled:result',
|
|
1111
1327
|
create: dsh_cliworker_now_cliworker_setCliEnabled_result$schema,
|
|
1112
1328
|
},
|
|
1113
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
1329
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":808,"column":9},
|
|
1114
1330
|
},
|
|
1115
1331
|
{
|
|
1116
1332
|
id: 'dsh-cliworker-now#cliworker/stop',
|
|
@@ -1145,7 +1361,7 @@ export const TYPERT_REMOTE = {
|
|
|
1145
1361
|
typeSymbol: 'dsh-cliworker-now#cliworker/stop:result',
|
|
1146
1362
|
create: dsh_cliworker_now_cliworker_stop_result$schema,
|
|
1147
1363
|
},
|
|
1148
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
1364
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":1223,"column":9},
|
|
1149
1365
|
},
|
|
1150
1366
|
{
|
|
1151
1367
|
id: 'dsh-cliworker-now#cliworker/watch',
|
|
@@ -1182,7 +1398,7 @@ export const TYPERT_REMOTE = {
|
|
|
1182
1398
|
typeSymbol: 'dsh-cliworker-now#cliworker/watch:result',
|
|
1183
1399
|
create: dsh_cliworker_now_cliworker_watch_result$schema,
|
|
1184
1400
|
},
|
|
1185
|
-
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":
|
|
1401
|
+
sourceLocation: {"file":"packages/cliworker/src/host/index.ts","line":662,"column":10},
|
|
1186
1402
|
},
|
|
1187
1403
|
],
|
|
1188
1404
|
}
|
|
@@ -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":"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"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import
|
|
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;
|