t3code-cli 0.2.0 → 0.4.0

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 (101) hide show
  1. package/README.md +1 -1
  2. package/dist/bin.js +412 -87
  3. package/dist/index.js +1 -1
  4. package/dist/{runtime-CMPZpQaG.js → runtime-Cq64iuZr.js} +4768 -2040
  5. package/dist/src/application/error.d.ts +3 -0
  6. package/dist/src/application/layer.d.ts +776 -0
  7. package/dist/src/application/model-selection.d.ts +19 -0
  8. package/dist/src/application/models.d.ts +93 -0
  9. package/dist/src/application/project-commands.d.ts +15 -0
  10. package/dist/src/application/projects.d.ts +136 -0
  11. package/dist/src/application/service.d.ts +72 -0
  12. package/dist/src/application/shell-sequence.d.ts +91 -0
  13. package/dist/src/application/thread-commands.d.ts +84 -0
  14. package/dist/src/application/thread-wait.d.ts +104 -0
  15. package/dist/src/application/threads.d.ts +563 -0
  16. package/dist/src/auth/error.d.ts +50 -0
  17. package/dist/src/auth/layer.d.ts +23 -0
  18. package/dist/src/auth/local.d.ts +27 -0
  19. package/dist/src/auth/pairing.d.ts +22 -0
  20. package/dist/src/auth/schema.d.ts +58 -0
  21. package/dist/src/auth/service.d.ts +14 -0
  22. package/dist/src/auth/transport.d.ts +19 -0
  23. package/dist/src/auth/type.d.ts +25 -0
  24. package/dist/src/config/error.d.ts +18 -0
  25. package/dist/src/config/layer.d.ts +20 -0
  26. package/dist/src/config/service.d.ts +20 -0
  27. package/dist/src/config/url.d.ts +6 -0
  28. package/dist/src/domain/error.d.ts +31 -0
  29. package/dist/src/domain/helpers.d.ts +38 -0
  30. package/dist/src/domain/model-config.d.ts +293 -0
  31. package/dist/src/domain/thread-lifecycle.d.ts +114 -0
  32. package/dist/src/environment/layer.d.ts +3 -0
  33. package/dist/src/environment/service.d.ts +12 -0
  34. package/dist/src/index.d.ts +6 -0
  35. package/dist/src/orchestration/layer.d.ts +2128 -0
  36. package/dist/src/orchestration/service.d.ts +27 -0
  37. package/dist/src/rpc/error.d.ts +15 -0
  38. package/dist/src/rpc/layer.d.ts +4678 -0
  39. package/dist/src/rpc/service.d.ts +15 -0
  40. package/dist/src/rpc/ws-group.d.ts +2238 -0
  41. package/dist/src/runtime.d.ts +3 -0
  42. package/dist/src/sql/node-sqlite-client.d.ts +10 -0
  43. package/dist/src/sql/service.d.ts +17 -0
  44. package/dist/upstream-t3code/packages/contracts/src/auth.d.ts +441 -0
  45. package/dist/upstream-t3code/packages/contracts/src/baseSchemas.d.ts +38 -0
  46. package/dist/upstream-t3code/packages/contracts/src/desktopBootstrap.d.ts +14 -0
  47. package/dist/upstream-t3code/packages/contracts/src/editor.d.ts +124 -0
  48. package/dist/upstream-t3code/packages/contracts/src/environment.d.ts +64 -0
  49. package/dist/upstream-t3code/packages/contracts/src/environmentHttp.d.ts +762 -0
  50. package/dist/upstream-t3code/packages/contracts/src/filesystem.d.ts +26 -0
  51. package/dist/upstream-t3code/packages/contracts/src/git.d.ts +500 -0
  52. package/dist/upstream-t3code/packages/contracts/src/index.d.ts +25 -0
  53. package/dist/upstream-t3code/packages/contracts/src/ipc.d.ts +490 -0
  54. package/dist/upstream-t3code/packages/contracts/src/keybindings.d.ts +133 -0
  55. package/dist/upstream-t3code/packages/contracts/src/model.d.ts +112 -0
  56. package/dist/upstream-t3code/packages/contracts/src/orchestration.d.ts +6682 -0
  57. package/dist/upstream-t3code/packages/contracts/src/project.d.ts +45 -0
  58. package/dist/upstream-t3code/packages/contracts/src/provider.d.ts +116 -0
  59. package/dist/upstream-t3code/packages/contracts/src/providerInstance.d.ts +99 -0
  60. package/dist/upstream-t3code/packages/contracts/src/providerRuntime.d.ts +4276 -0
  61. package/dist/upstream-t3code/packages/contracts/src/relay.d.ts +1262 -0
  62. package/dist/upstream-t3code/packages/contracts/src/relayClient.d.ts +48 -0
  63. package/dist/upstream-t3code/packages/contracts/src/remoteAccess.d.ts +45 -0
  64. package/dist/upstream-t3code/packages/contracts/src/review.d.ts +37 -0
  65. package/dist/upstream-t3code/packages/contracts/src/rpc.d.ts +8218 -0
  66. package/dist/upstream-t3code/packages/contracts/src/server.d.ts +2291 -0
  67. package/dist/upstream-t3code/packages/contracts/src/settings.d.ts +271 -0
  68. package/dist/upstream-t3code/packages/contracts/src/sourceControl.d.ts +177 -0
  69. package/dist/upstream-t3code/packages/contracts/src/terminal.d.ts +330 -0
  70. package/dist/upstream-t3code/packages/contracts/src/vcs.d.ts +148 -0
  71. package/package.json +15 -7
  72. package/src/application/model-selection.ts +2 -2
  73. package/src/application/project-commands.ts +1 -1
  74. package/src/application/service.ts +1 -1
  75. package/src/application/shell-sequence.ts +1 -1
  76. package/src/application/thread-commands.ts +1 -1
  77. package/src/application/thread-wait.ts +1 -1
  78. package/src/auth/error.ts +33 -1
  79. package/src/auth/layer.ts +11 -76
  80. package/src/auth/local.ts +342 -208
  81. package/src/auth/pairing.ts +44 -2
  82. package/src/auth/schema.ts +21 -28
  83. package/src/auth/service.ts +2 -2
  84. package/src/auth/transport.ts +59 -22
  85. package/src/auth/type.ts +0 -1
  86. package/src/cli/auth.ts +1 -3
  87. package/src/cli/model-format.ts +1 -1
  88. package/src/cli/project-format.ts +1 -1
  89. package/src/cli/thread-format.ts +1 -1
  90. package/src/domain/helpers.ts +1 -1
  91. package/src/domain/model-config.ts +1 -1
  92. package/src/domain/thread-lifecycle.ts +1 -1
  93. package/src/index.ts +3 -3
  94. package/src/orchestration/layer.ts +1 -1
  95. package/src/orchestration/service.ts +1 -1
  96. package/src/rpc/error.ts +1 -1
  97. package/src/rpc/layer.ts +2 -2
  98. package/src/rpc/ws-group.ts +1 -1
  99. package/src/runtime.ts +14 -1
  100. package/src/sql/node-sqlite-client.ts +141 -0
  101. package/src/sql/service.ts +21 -0
package/dist/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { $ as fromIterable, $n as isNotNull, $t as scoped, A as Crypto, An as map$3, At as catchTags, B as make$8, Bn as getOrElse, Bt as ignore, C as decodeUnknownEffect, Cn as doneUnsafe, Ct as acquireRelease, D as optionalKey, Dn as succeed$1, Dt as asVoid, E as optional$3, En as isSuccess, Et as as, F as make$7, Fn as empty$1, Ft as fn, G as FileSystem, Gn as match, Gt as mapError, H as Path$1, Hn as isNone, Ht as isEffect, I as parseFdName, In as make$13, It as fnUntraced, J as WatchBackend, Jn as Prototype, Jt as provide$1, K as FileTypeId, Kn as none, Kt as matchEffect, L as ChildProcessSpawner, Ln as flatMap$1, Lt as forEach, M as fromReadable, Mn as succeed$3, Mt as effectify, N as fromWritable, Nn as Reference, Nt as fail, O as tag, On as ConsoleRef, Ot as callback, P as fdName, Pn as Service, Pt as flatMap, Q as empty, Qn as hasProperty, Qt as runFork, R as ExitCode, Rn as fromNullishOr, Rt as forkScoped, S as decodeTo, Sn as _await, St as transform$1, T as is, Tn as makeUnsafe, Tt as andThen, U as TypeId$6, Un as isSome, Ut as logError, V as makeHandle, Vn as getOrUndefined, Vt as interrupt, W as FileDescriptor, Wn as map$4, Wt as map$2, X as callback$1, Xn as withFiber, Xt as provideService, Y as make$10, Yn as PipeInspectableProto, Yt as provideContext, Z as decodeText, Zn as format, Zt as result, _ as Literals, _n as provide, _t as offer, a as latestAssistantMessage, an as tapError, ar as identity, at as runLast, b as TaggedErrorClass, bn as sync$2, bt as badArgument, c as Environment, cn as try_, cr as __commonJSMin, ct as transduce, d as ArraySchema, dn as TaggedError, dt as make$11, en as serviceOption, er as isNotUndefined, et as isStream, f as Boolean$2, fn as fail$1, ft as drain, g as Literal, gn as mergeAll, gt as make$12, h as Int, hn as effect, ht as failCauseUnsafe, i as ThreadSessionError, in as tapCause, ir as dual, it as runFold, j as make$9, jn as fail$2, jt as catch_, k as toCodecStringTree, kn as sync$1, kt as catchFilter, l as T3Config, ln as uninterruptible, lr as __require, lt as unwrap, m as ErrorClass, mn as squash, mt as endUnsafe, nn as suspend, nr as isUndefined, nt as run$1, o as threadStatus, on as timeoutOrElse, or as pipe, ot as succeed$4, p as Defect, pn as hasInterruptsOnly, pt as isSink, q as Size, qn as some, qt as orDie, r as NodeEnvironmentLive, rn as sync, rr as constVoid, rt as runDrain, s as T3Application, sn as tryPromise, sr as pipeArguments, st as tap, t as AppLayer, tn as succeed, tr as isNullish, tt as merge, u as T3Auth, un as void_, ut as get, v as String$1, vn as provideMerge, vt as offerUnsafe, w as fromJsonString, wn as isDone, wt as addFinalizer, x as Union, xn as MinimumLogLevel, xt as systemError, y as Struct, yn as succeed$2, yt as BadArgument, z as ProcessId, zn as fromUndefinedOr, zt as gen } from "./runtime-CMPZpQaG.js";
2
+ import { $ as runLast, $n as isNullish, $t as sync, A as Crypto, An as Service, At as flatMap, B as WatchBackend, Bn as isSome, Bt as map$2, C as decodeUnknownEffect, Cn as succeed$1, Ct as asVoid, D as optionalKey, Dn as fail$2, Dt as catch_, E as optional$3, En as map$3, Et as catchTags, F as TypeId$7, Fn as fromNullishOr, Ft as gen, G as fromIterable, Gn as Prototype, Gt as provideContext, H as callback$1, Hn as match, Ht as matchEffect, I as FileDescriptor, In as fromUndefinedOr, It as ignore, J as mkString, Jn as BaseProto, Jt as runFork, K as isStream, Kn as PipeInspectableProto, Kt as provideService, L as FileSystem, Ln as getOrElse, Lt as interrupt, M as fromReadable, Mn as getUnsafe, Mt as fnUntraced, N as fromWritable, Nn as make$13, Nt as forEach, O as tag, On as succeed$3, Ot as effectify, P as Path$1, Pn as flatMap$1, Pt as forkScoped, Q as runFold, Qn as isNotUndefined, Qt as suspend, R as FileTypeId, Rn as getOrUndefined, Rt as isEffect, S as decodeTo, Sn as isSuccess, St as as, T as is, Tn as sync$1, Tt as catchFilter, U as decodeText, Un as none, Ut as orDie, V as make$10, Vn as map$4, Vt as mapError, W as empty, Wn as some, Wt as provide$1, X as runCollect, Xn as hasProperty, Xt as serviceOption, Y as run$1, Yn as format, Yt as scoped, Z as runDrain, Zn as isNotNull, Zt as succeed, _ as Literals, _n as MinimumLogLevel, _t as nominal, a as latestAssistantMessage, an as uninterruptible, ar as pipeArguments, at as get, b as TaggedErrorClass, bn as isDone, bt as addFinalizer, c as Environment, cn as fail$1, ct as isSink, d as ArraySchema, dn as effect, dt as make$12, en as tapCause, er as isUndefined, et as splitLines, f as Boolean$2, fn as mergeAll, ft as offer, g as Literal, gn as sync$2, gt as systemError, h as Int, hn as succeed$2, ht as badArgument, i as ThreadSessionError, in as try_, ir as pipe, it as unwrap, j as make$9, jn as empty$1, jt as fn, k as toCodecStringTree, kn as Reference, kt as fail, l as T3Config, ln as hasInterruptsOnly, lt as endUnsafe, m as ErrorClass, mn as provideMerge, mt as BadArgument, nn as timeoutOrElse, nr as dual, nt as tap, o as threadStatus, on as void_, or as __commonJSMin, ot as make$11, p as Defect, pn as provide, pt as offerUnsafe, q as merge, qn as withFiber, qt as result, r as NodeEnvironmentLive, rn as tryPromise, rr as identity, rt as transduce, s as T3Application, sn as TaggedError, sr as __require, st as drain, t as AppLayer, tn as tapError, tr as constVoid, tt as succeed$4, u as T3Auth, un as squash, ut as failCauseUnsafe, v as String$1, vn as _await, vt as transform$1, w as fromJsonString, wn as ConsoleRef, wt as callback, x as Union, xn as makeUnsafe, xt as andThen, y as Struct, yn as doneUnsafe, yt as acquireRelease, z as Size, zn as isNone, zt as logError } from "./runtime-Cq64iuZr.js";
3
3
  import * as NodeChildProcess from "node:child_process";
4
4
  import * as NodeCrypto from "node:crypto";
5
5
  import * as NFS from "node:fs";
@@ -8,7 +8,7 @@ import * as Path from "node:path";
8
8
  import * as NodeUrl from "node:url";
9
9
  import { fileURLToPath } from "node:url";
10
10
  import * as readline from "node:readline";
11
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/Runtime.js
11
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/Runtime.js
12
12
  /**
13
13
  * Runtime helpers for turning an `Effect` program into a host application's
14
14
  * main entry point.
@@ -73,8 +73,8 @@ import * as readline from "node:readline";
73
73
  *
74
74
  * **When to use**
75
75
  *
76
- * Use as the standard teardown for main programs when you want conventional
77
- * process exit codes and support for {@link errorExitCode}.
76
+ * Use as the standard teardown for main programs with conventional process
77
+ * exit codes and support for {@link errorExitCode}.
78
78
  *
79
79
  * **Details**
80
80
  *
@@ -127,13 +127,16 @@ const defaultTeardown = (exit, onExit) => {
127
127
  *
128
128
  * **When to use**
129
129
  *
130
- * Use when building a runtime adapter for a host platform. Most applications
131
- * should use a platform-provided runner, such as `NodeRuntime.runMain`, rather
132
- * than constructing one directly.
130
+ * Use when building a runtime adapter for a host platform.
133
131
  *
134
132
  * **Details**
135
133
  *
136
- * The runner executes Effect programs as main entry points. The provided function receives a forked fiber and a teardown callback so it can install platform-specific signal handling, fiber observers, and final exit behavior.
134
+ * The runner executes Effect programs as main entry points. The provided
135
+ * function receives a forked fiber and a teardown callback so it can install
136
+ * platform-specific signal handling, fiber observers, and final exit behavior.
137
+ *
138
+ * Most applications should use a platform-provided runner, such as
139
+ * `NodeRuntime.runMain`, rather than constructing one directly.
137
140
  *
138
141
  * `disableErrorReporting` disables the automatic log emitted for unreported
139
142
  * non-interruption failures. It does not change exit-code calculation or the
@@ -288,8 +291,8 @@ const getErrorExitCode = (u) => {
288
291
  *
289
292
  * **When to use**
290
293
  *
291
- * Use when error classes are already reported by application code and should
292
- * not be logged again by the default main runner.
294
+ * Use when you need error classes reported by application code to avoid being
295
+ * logged again by the default main runner.
293
296
  *
294
297
  * **Details**
295
298
  *
@@ -358,7 +361,7 @@ const getErrorReported = (u) => {
358
361
  return true;
359
362
  };
360
363
  //#endregion
361
- //#region node_modules/.pnpm/@effect+platform-node@4.0.0-beta.74_effect@4.0.0-beta.74_ioredis@5.10.1/node_modules/@effect/platform-node/dist/NodeRuntime.js
364
+ //#region node_modules/.pnpm/@effect+platform-node@4.0.0-beta.78_effect@4.0.0-beta.78_ioredis@5.10.1/node_modules/@effect/platform-node/dist/NodeRuntime.js
362
365
  /**
363
366
  * Node.js process runner for starting an Effect program at the application
364
367
  * edge.
@@ -395,9 +398,9 @@ const getErrorReported = (u) => {
395
398
  *
396
399
  * **When to use**
397
400
  *
398
- * Use to run an Effect as your application's main program, especially
399
- * when you need structured error handling, log management, interrupt support,
400
- * or advanced teardown capabilities.
401
+ * Use to run a Node.js application's main Effect with structured error
402
+ * handling, log management, interrupt support, or advanced teardown
403
+ * capabilities.
401
404
  *
402
405
  * **Details**
403
406
  *
@@ -431,7 +434,325 @@ const runMain = /* @__PURE__ */ makeRunMain(({ fiber, teardown }) => {
431
434
  process.on("SIGTERM", onSigint);
432
435
  });
433
436
  //#endregion
434
- //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.74_effect@4.0.0-beta.74/node_modules/@effect/platform-node-shared/dist/internal/utils.js
437
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/process/ChildProcessSpawner.js
438
+ /**
439
+ * Service contract and helpers for running child processes through Effect.
440
+ *
441
+ * This module defines the {@link ChildProcessSpawner} service used by child
442
+ * process commands to start operating-system processes. A spawner turns a
443
+ * command description into a {@link ChildProcessHandle}, which exposes scoped
444
+ * lifecycle operations: write to stdin, stream stdout and stderr, wait for the
445
+ * exit code, kill the process, inspect whether it is still running, and
446
+ * temporarily unreference it from the parent process.
447
+ *
448
+ * Use this module when implementing a platform-specific process backend or
449
+ * when code needs direct access to the process service. Most applications build
450
+ * commands with the `ChildProcess` module; this service is the lower-level
451
+ * execution boundary and also provides convenience methods for collecting exit
452
+ * codes, strings, and output lines. The {@link make} constructor derives those
453
+ * helpers from one primitive `spawn` implementation, so adapters only need to
454
+ * supply process creation.
455
+ *
456
+ * @since 4.0.0
457
+ */
458
+ /**
459
+ * Constructs branded child process `ExitCode` values.
460
+ *
461
+ * @category constructors
462
+ * @since 4.0.0
463
+ */
464
+ const ExitCode = /*#__PURE__*/ nominal();
465
+ /**
466
+ * Constructs branded child process `ProcessId` values.
467
+ *
468
+ * @category constructors
469
+ * @since 4.0.0
470
+ */
471
+ const ProcessId = /*#__PURE__*/ nominal();
472
+ const HandleTypeId = "~effect/ChildProcessSpawner/ChildProcessHandle";
473
+ const HandleProto = {
474
+ [HandleTypeId]: HandleTypeId,
475
+ ...BaseProto,
476
+ toJSON() {
477
+ return {
478
+ _id: "ChildProcessHandle",
479
+ pid: this.pid
480
+ };
481
+ }
482
+ };
483
+ /**
484
+ * Constructs a new `ChildProcessHandle`.
485
+ *
486
+ * @category constructors
487
+ * @since 4.0.0
488
+ */
489
+ const makeHandle = (params) => Object.assign(Object.create(HandleProto), params);
490
+ /**
491
+ * Creates a `ChildProcessSpawner` service from a `spawn` function, deriving
492
+ * helpers for exit codes and output collection from that implementation.
493
+ *
494
+ * @category models
495
+ * @since 4.0.0
496
+ */
497
+ const make$8 = (spawn) => {
498
+ const streamString = (command, options) => spawn(command).pipe(map$2((handle) => decodeText(options?.includeStderr === true ? handle.all : handle.stdout)), unwrap);
499
+ const streamLines = (command, options) => splitLines(streamString(command, options));
500
+ return ChildProcessSpawner.of({
501
+ spawn,
502
+ exitCode: (command) => scoped(flatMap(spawn(command), (handle) => handle.exitCode)),
503
+ streamString,
504
+ streamLines,
505
+ lines: (command, options) => runCollect(streamLines(command, options)),
506
+ string: (command, options) => mkString(streamString(command, options))
507
+ });
508
+ };
509
+ /**
510
+ * Service tag for child process spawning.
511
+ *
512
+ * @category services
513
+ * @since 4.0.0
514
+ */
515
+ var ChildProcessSpawner = class extends Service()("effect/process/ChildProcessSpawner") {};
516
+ //#endregion
517
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/process/ChildProcess.js
518
+ /**
519
+ * An Effect-native module for working with child processes.
520
+ *
521
+ * This module uses an AST-based approach where commands are built first
522
+ * using `make` and `pipeTo`, then executed using `spawn`.
523
+ *
524
+ * **Example** (Spawning and piping commands)
525
+ *
526
+ * ```ts
527
+ * import { Effect, Stream } from "effect"
528
+ * import { NodeServices } from "@effect/platform-node"
529
+ * import { ChildProcess } from "effect/unstable/process"
530
+ *
531
+ * // Build a command
532
+ * const command = ChildProcess.make`echo "hello world"`
533
+ *
534
+ * // Spawn and collect output
535
+ * const program = Effect.gen(function*() {
536
+ * // You can `yield*` a command, which calls `ChildProcess.spawn`
537
+ * const handle = yield* command
538
+ * const chunks = yield* Stream.runCollect(handle.stdout)
539
+ * const exitCode = yield* handle.exitCode
540
+ * return { chunks, exitCode }
541
+ * }).pipe(Effect.scoped, Effect.provide(NodeServices.layer))
542
+ *
543
+ * // With options
544
+ * const withOptions = ChildProcess.make({ cwd: "/tmp" })`ls -la`
545
+ *
546
+ * // Piping commands
547
+ * const pipeline = ChildProcess.make`cat package.json`.pipe(
548
+ * ChildProcess.pipeTo(ChildProcess.make`grep name`)
549
+ * )
550
+ *
551
+ * // Spawn the pipeline
552
+ * const pipelineProgram = Effect.gen(function*() {
553
+ * const handle = yield* pipeline
554
+ * const chunks = yield* Stream.runCollect(handle.stdout)
555
+ * return chunks
556
+ * }).pipe(Effect.scoped, Effect.provide(NodeServices.layer))
557
+ * ```
558
+ *
559
+ * @since 4.0.0
560
+ */
561
+ const TypeId$6 = "~effect/unstable/process/ChildProcess";
562
+ const Proto$5 = {
563
+ .../*#__PURE__*/ Prototype({
564
+ label: "Command",
565
+ evaluate(fiber) {
566
+ return getUnsafe(fiber.context, ChildProcessSpawner).spawn(this);
567
+ }
568
+ }),
569
+ [TypeId$6]: TypeId$6
570
+ };
571
+ const makeStandardCommand = (command, args, options) => Object.assign(Object.create(Proto$5), {
572
+ _tag: "StandardCommand",
573
+ command,
574
+ args,
575
+ options
576
+ });
577
+ /**
578
+ * Create a command from a template literal, options + template, or array form.
579
+ *
580
+ * **Details**
581
+ *
582
+ * This function supports three calling conventions:
583
+ * 1. Template literal: `make\`npm run build\``
584
+ * 2. Options + template literal: `make({ cwd: "/app" })\`npm run build\``
585
+ * 3. Array form: `make("npm", ["run", "build"], options?)`
586
+ *
587
+ * Template literals are not parsed until execution time, allowing parsing
588
+ * errors to flow through Effect's error channel.
589
+ *
590
+ * **Example** (Creating commands)
591
+ *
592
+ * ```ts
593
+ * import { ChildProcess } from "effect/unstable/process"
594
+ *
595
+ * // Template literal form
596
+ * const cmd1 = ChildProcess.make`echo "hello"`
597
+ *
598
+ * // With options
599
+ * const cmd2 = ChildProcess.make({ cwd: "/tmp" })`ls -la`
600
+ *
601
+ * // Array form
602
+ * const cmd3 = ChildProcess.make("git", ["status"])
603
+ * ```
604
+ *
605
+ * @category constructors
606
+ * @since 4.0.0
607
+ */
608
+ const make$7 = function make(...args) {
609
+ if (isTemplateString(args[0])) {
610
+ const [templates, ...expressions] = args;
611
+ const tokens = parseTemplates(templates, expressions);
612
+ return makeStandardCommand(tokens[0] ?? "", tokens.slice(1), {});
613
+ }
614
+ if (typeof args[0] === "object" && !Array.isArray(args[0]) && !isTemplateString(args[0])) {
615
+ const options = args[0];
616
+ return function(templates, ...expressions) {
617
+ const tokens = parseTemplates(templates, expressions);
618
+ return makeStandardCommand(tokens[0] ?? "", tokens.slice(1), options);
619
+ };
620
+ }
621
+ if (typeof args[0] === "string" && !Array.isArray(args[1])) {
622
+ const [command, options = {}] = args;
623
+ return makeStandardCommand(command, [], options);
624
+ }
625
+ const [command, cmdArgs = [], options = {}] = args;
626
+ return makeStandardCommand(command, cmdArgs, options);
627
+ };
628
+ const isTemplateString = (u) => Array.isArray(u) && "raw" in u && Array.isArray(u.raw);
629
+ /**
630
+ * Parses an fd name like "fd3" to its numeric index.
631
+ * Returns undefined if the name is invalid.
632
+ *
633
+ * @category converting
634
+ * @since 4.0.0
635
+ */
636
+ const parseFdName = (name) => {
637
+ const match = /^fd(\d+)$/.exec(name);
638
+ if (match === null) return void 0;
639
+ const fd = parseInt(match[1], 10);
640
+ return fd >= 3 ? fd : void 0;
641
+ };
642
+ /**
643
+ * Create an fd name from its numeric index.
644
+ *
645
+ * @category converting
646
+ * @since 4.0.0
647
+ */
648
+ const fdName = (fd) => `fd${fd}`;
649
+ const parseTemplates = (templates, expressions) => {
650
+ let tokens = [];
651
+ for (const [index, template] of templates.entries()) tokens = parseTemplate(templates, expressions, tokens, template, index);
652
+ return tokens;
653
+ };
654
+ const parseTemplate = (templates, expressions, prevTokens, template, index) => {
655
+ const rawTemplate = templates.raw[index];
656
+ if (rawTemplate === void 0) throw new Error(`Invalid backslash sequence: ${templates.raw[index]}`);
657
+ const { hasLeadingWhitespace, hasTrailingWhitespace, tokens } = splitByWhitespaces(template, rawTemplate);
658
+ const nextTokens = concatTokens(prevTokens, tokens, hasLeadingWhitespace);
659
+ if (index === expressions.length) return nextTokens;
660
+ const expression = expressions[index];
661
+ return concatTokens(nextTokens, Array.isArray(expression) ? expression.map((expression) => parseExpression(expression)) : [parseExpression(expression)], hasTrailingWhitespace);
662
+ };
663
+ /**
664
+ * Convert valid expressions defined in a template string command (i.e. using
665
+ * `${expression}` into strings.
666
+ */
667
+ const parseExpression = (expression) => {
668
+ if (typeof expression === "string") return expression;
669
+ return String(expression);
670
+ };
671
+ const DELIMITERS = /*#__PURE__*/ new Set([
672
+ " ",
673
+ " ",
674
+ "\r",
675
+ "\n"
676
+ ]);
677
+ /**
678
+ * Number of characters in backslash escape sequences: \0 \xXX or \uXXXX
679
+ * \cX is allowed in RegExps but not in strings
680
+ * Octal sequences are not allowed in strict mode
681
+ */
682
+ const ESCAPE_LENGTH = {
683
+ x: 3,
684
+ u: 5
685
+ };
686
+ /**
687
+ * Splits a template string by whitespace while also properly handling escape
688
+ * sequences.
689
+ *
690
+ * As an example, let's review the following valid commands:
691
+ *
692
+ * ```ts
693
+ * ChildProcess.exec`echo foo\n bar`
694
+ * // We should run `["echo", "foo\n", "bar"]`
695
+ *
696
+ * ChildProcess.exec`echo foo
697
+ * bar`
698
+ * // We should run `["echo", "foo", "bar]`
699
+ * ```
700
+ *
701
+ * The problem is that when we evaluate the template string for both of the above
702
+ * commands, we will end up with the same string "echo foo\n bar".
703
+ *
704
+ * What we really want is to include the escaped character in the arguments for
705
+ * the first command, since it was written explicitly by the user.
706
+ *
707
+ * This is why also having access to the raw template string is useful - in a
708
+ * template string, there are two representations of the same string:
709
+ * 1. `template` - The processed string (escape sequences are evaluated).
710
+ * 2. `template.raw` - The raw string (escape sequences are literal).
711
+ */
712
+ const splitByWhitespaces = (template, rawTemplate) => {
713
+ if (rawTemplate.length === 0) return {
714
+ tokens: [],
715
+ hasLeadingWhitespace: false,
716
+ hasTrailingWhitespace: false
717
+ };
718
+ const hasLeadingWhitespace = DELIMITERS.has(rawTemplate[0]);
719
+ const tokens = [];
720
+ let templateCursor = 0;
721
+ for (let templateIndex = 0, rawIndex = 0; templateIndex < template.length; templateIndex += 1, rawIndex += 1) {
722
+ const rawCharacter = rawTemplate[rawIndex];
723
+ if (DELIMITERS.has(rawCharacter)) {
724
+ if (templateCursor !== templateIndex) tokens.push(template.slice(templateCursor, templateIndex));
725
+ templateCursor = templateIndex + 1;
726
+ } else if (rawCharacter === "\\") {
727
+ const nextRawCharacter = rawTemplate[rawIndex + 1];
728
+ if (nextRawCharacter === "\n") {
729
+ templateIndex -= 1;
730
+ rawIndex += 1;
731
+ } else if (nextRawCharacter === "u" && rawTemplate[rawIndex + 2] === "{") rawIndex = rawTemplate.indexOf("}", rawIndex + 3);
732
+ else rawIndex += ESCAPE_LENGTH[nextRawCharacter] ?? 1;
733
+ }
734
+ }
735
+ const hasTrailingWhitespace = templateCursor === template.length;
736
+ if (!hasTrailingWhitespace) tokens.push(template.slice(templateCursor));
737
+ return {
738
+ tokens,
739
+ hasLeadingWhitespace,
740
+ hasTrailingWhitespace
741
+ };
742
+ };
743
+ /**
744
+ * Concatenates two separate sets of string tokens together.
745
+ *
746
+ * If either set is empty or `isSeparated=false`, the last element of `prevTokens`
747
+ * and the first element of `nextTokens` will be joined into a single token.
748
+ */
749
+ const concatTokens = (prevTokens, nextTokens, isSeparated) => isSeparated || prevTokens.length === 0 || nextTokens.length === 0 ? [...prevTokens, ...nextTokens] : [
750
+ ...prevTokens.slice(0, -1),
751
+ `${prevTokens.at(-1)}${nextTokens.at(0)}`,
752
+ ...nextTokens.slice(1)
753
+ ];
754
+ //#endregion
755
+ //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.78_effect@4.0.0-beta.78/node_modules/@effect/platform-node-shared/dist/internal/utils.js
435
756
  /** @internal */
436
757
  const handleErrnoException = (module, method) => (err, [path]) => {
437
758
  let reason = "Unknown";
@@ -468,7 +789,7 @@ const handleErrnoException = (module, method) => (err, [path]) => {
468
789
  });
469
790
  };
470
791
  //#endregion
471
- //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.74_effect@4.0.0-beta.74/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
792
+ //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.78_effect@4.0.0-beta.78/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
472
793
  const toError = (error) => error instanceof globalThis.Error ? error : new globalThis.Error(String(error));
473
794
  const toPlatformError = (method, error, command) => {
474
795
  const { commands } = flattenCommand(command);
@@ -851,7 +1172,7 @@ const flattenCommand = (command) => {
851
1172
  };
852
1173
  };
853
1174
  //#endregion
854
- //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.74_effect@4.0.0-beta.74/node_modules/@effect/platform-node-shared/dist/NodeCrypto.js
1175
+ //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.78_effect@4.0.0-beta.78/node_modules/@effect/platform-node-shared/dist/NodeCrypto.js
855
1176
  /**
856
1177
  * The `NodeCrypto` module implements Effect's `Crypto` service with
857
1178
  * Node-compatible `node:crypto` APIs. It exports {@link make} as the concrete
@@ -896,7 +1217,7 @@ const digest = (algorithm, data) => try_({
896
1217
  })
897
1218
  });
898
1219
  //#endregion
899
- //#region node_modules/.pnpm/@effect+platform-node@4.0.0-beta.74_effect@4.0.0-beta.74_ioredis@5.10.1/node_modules/@effect/platform-node/dist/NodeCrypto.js
1220
+ //#region node_modules/.pnpm/@effect+platform-node@4.0.0-beta.78_effect@4.0.0-beta.78_ioredis@5.10.1/node_modules/@effect/platform-node/dist/NodeCrypto.js
900
1221
  /**
901
1222
  * The `NodeCrypto` module provides the Node.js `Crypto` service layer for
902
1223
  * Effect programs. Provide {@link layer} at the edge of a Node application,
@@ -921,7 +1242,7 @@ const layer$9 = /* @__PURE__ */ succeed$2(Crypto, /* @__PURE__ */ make$9({
921
1242
  digest
922
1243
  }));
923
1244
  //#endregion
924
- //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.74_effect@4.0.0-beta.74/node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js
1245
+ //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.78_effect@4.0.0-beta.78/node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js
925
1246
  /**
926
1247
  * Shared Node-compatible implementation of Effect's `FileSystem` service.
927
1248
  *
@@ -1290,7 +1611,7 @@ const makeFileSystem = /*#__PURE__*/ map$2(/*#__PURE__*/ serviceOption(WatchBack
1290
1611
  writeFile
1291
1612
  }));
1292
1613
  //#endregion
1293
- //#region node_modules/.pnpm/@effect+platform-node@4.0.0-beta.74_effect@4.0.0-beta.74_ioredis@5.10.1/node_modules/@effect/platform-node/dist/NodeFileSystem.js
1614
+ //#region node_modules/.pnpm/@effect+platform-node@4.0.0-beta.78_effect@4.0.0-beta.78_ioredis@5.10.1/node_modules/@effect/platform-node/dist/NodeFileSystem.js
1294
1615
  /**
1295
1616
  * Node.js `FileSystem` layer for programs that perform real filesystem I/O.
1296
1617
  *
@@ -1327,7 +1648,7 @@ const makeFileSystem = /*#__PURE__*/ map$2(/*#__PURE__*/ serviceOption(WatchBack
1327
1648
  */
1328
1649
  const layer$7 = /* @__PURE__ */ effect(FileSystem)(makeFileSystem);
1329
1650
  //#endregion
1330
- //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.74_effect@4.0.0-beta.74/node_modules/@effect/platform-node-shared/dist/NodePath.js
1651
+ //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.78_effect@4.0.0-beta.78/node_modules/@effect/platform-node-shared/dist/NodePath.js
1331
1652
  /**
1332
1653
  * Node-backed provider for Effect's `Path` service.
1333
1654
  *
@@ -1373,7 +1694,7 @@ const toFileUrl = (path) => try_({
1373
1694
  ({ ...Path.posix });
1374
1695
  ({ ...Path.win32 });
1375
1696
  //#endregion
1376
- //#region node_modules/.pnpm/@effect+platform-node@4.0.0-beta.74_effect@4.0.0-beta.74_ioredis@5.10.1/node_modules/@effect/platform-node/dist/NodePath.js
1697
+ //#region node_modules/.pnpm/@effect+platform-node@4.0.0-beta.78_effect@4.0.0-beta.78_ioredis@5.10.1/node_modules/@effect/platform-node/dist/NodePath.js
1377
1698
  /**
1378
1699
  * Node.js layers for Effect's `Path` service.
1379
1700
  *
@@ -1412,13 +1733,13 @@ const toFileUrl = (path) => try_({
1412
1733
  * @since 4.0.0
1413
1734
  */
1414
1735
  const layer$5 = /* @__PURE__ */ succeed$2(Path$1)({
1415
- [TypeId$6]: TypeId$6,
1736
+ [TypeId$7]: TypeId$7,
1416
1737
  ...Path,
1417
1738
  fromFileUrl,
1418
1739
  toFileUrl
1419
1740
  });
1420
1741
  //#endregion
1421
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/Stdio.js
1742
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/Stdio.js
1422
1743
  /**
1423
1744
  * Service contract for process standard input, output, error output, and
1424
1745
  * command-line arguments.
@@ -1468,8 +1789,8 @@ const TypeId$5 = "~effect/Stdio";
1468
1789
  *
1469
1790
  * **When to use**
1470
1791
  *
1471
- * Use when an effect needs command-line arguments or standard I/O streams
1472
- * supplied by its environment.
1792
+ * Use when you need command-line arguments or standard I/O streams supplied by
1793
+ * an effect's environment.
1473
1794
  *
1474
1795
  * @see {@link make} for constructing a `Stdio` service directly
1475
1796
  * @see {@link layerTest} for a test layer with defaults and overrides
@@ -1484,9 +1805,8 @@ const Stdio = /*#__PURE__*/ Service(TypeId$5);
1484
1805
  *
1485
1806
  * **When to use**
1486
1807
  *
1487
- * Use to assemble a concrete `Stdio` service when you already have
1488
- * implementations for command-line arguments, standard output, standard error,
1489
- * and standard input.
1808
+ * Use when you need to assemble a concrete `Stdio` service from command-line
1809
+ * arguments and standard I/O implementations.
1490
1810
  *
1491
1811
  * **Details**
1492
1812
  *
@@ -1503,7 +1823,7 @@ const make$4 = (options) => ({
1503
1823
  ...options
1504
1824
  });
1505
1825
  //#endregion
1506
- //#region node_modules/.pnpm/@effect+platform-node@4.0.0-beta.74_effect@4.0.0-beta.74_ioredis@5.10.1/node_modules/@effect/platform-node/dist/NodeStdio.js
1826
+ //#region node_modules/.pnpm/@effect+platform-node@4.0.0-beta.78_effect@4.0.0-beta.78_ioredis@5.10.1/node_modules/@effect/platform-node/dist/NodeStdio.js
1507
1827
  /**
1508
1828
  * Node.js `Stdio` layer for the current process.
1509
1829
  *
@@ -1572,7 +1892,7 @@ const layer$3 = /* @__PURE__ */ succeed$2(Stdio, /*#__PURE__*/ make$4({
1572
1892
  })
1573
1893
  }));
1574
1894
  //#endregion
1575
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/Terminal.js
1895
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/Terminal.js
1576
1896
  const TypeId$4 = "~effect/platform/Terminal";
1577
1897
  const QuitErrorTypeId = "effect/platform/Terminal/QuitError";
1578
1898
  ErrorClass("QuitError")({ _tag: /*#__PURE__*/ tag("QuitError") });
@@ -1698,7 +2018,7 @@ function defaultShouldQuit(input) {
1698
2018
  return input.key.ctrl && (input.key.name === "c" || input.key.name === "d");
1699
2019
  }
1700
2020
  //#endregion
1701
- //#region node_modules/.pnpm/@effect+platform-node@4.0.0-beta.74_effect@4.0.0-beta.74_ioredis@5.10.1/node_modules/@effect/platform-node/dist/NodeServices.js
2021
+ //#region node_modules/.pnpm/@effect+platform-node@4.0.0-beta.78_effect@4.0.0-beta.78_ioredis@5.10.1/node_modules/@effect/platform-node/dist/NodeServices.js
1702
2022
  /**
1703
2023
  * Provides the default Node implementations for child process spawning,
1704
2024
  * filesystem, path, stdio, and terminal services.
@@ -1708,7 +2028,7 @@ function defaultShouldQuit(input) {
1708
2028
  */
1709
2029
  const layer = /*#__PURE__*/ provideMerge(layer$11, /*#__PURE__*/ mergeAll(layer$7, layer$9, layer$5, layer$3, layer$2));
1710
2030
  //#endregion
1711
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/ConfigProvider.js
2031
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/ConfigProvider.js
1712
2032
  /**
1713
2033
  * Provides the data source layer for the `Config` module. A `ConfigProvider`
1714
2034
  * knows how to load raw configuration nodes from a backing store (environment
@@ -1827,7 +2147,7 @@ function makeValue(value) {
1827
2147
  *
1828
2148
  * **When to use**
1829
2149
  *
1830
- * Use when describing a directory or JSON object inside a custom
2150
+ * Use when you need to describe a directory or JSON object inside a custom
1831
2151
  * provider.
1832
2152
  *
1833
2153
  * **Details**
@@ -1864,8 +2184,8 @@ function makeRecord(keys, value) {
1864
2184
  *
1865
2185
  * **When to use**
1866
2186
  *
1867
- * Use when describing a JSON array or a set of numerically-indexed env
1868
- * vars inside a custom provider.
2187
+ * Use when you need to describe a JSON array or numerically indexed env vars
2188
+ * inside a custom provider.
1869
2189
  *
1870
2190
  * **Details**
1871
2191
  *
@@ -1903,10 +2223,8 @@ TaggedError("SourceError");
1903
2223
  *
1904
2224
  * **When to use**
1905
2225
  *
1906
- * Use to override the provider for an entire program via
1907
- * `Effect.provideService(ConfigProvider.ConfigProvider, myProvider)`, or to
1908
- * retrieve the current provider inside an Effect with
1909
- * `yield* ConfigProvider.ConfigProvider`.
2226
+ * Use to override the active raw configuration provider for an entire program,
2227
+ * or retrieve the current provider inside an Effect.
1910
2228
  *
1911
2229
  * **Example** (Providing a custom provider)
1912
2230
  *
@@ -1996,8 +2314,8 @@ function make$1(get, mapInput, prefix) {
1996
2314
  *
1997
2315
  * **When to use**
1998
2316
  *
1999
- * Use to read configuration from `process.env`, which is the default when
2000
- * no provider is explicitly set, or to pass a custom env record for testing or
2317
+ * Use to read configuration from `process.env`, which is the default when no
2318
+ * provider is explicitly set, or pass a custom env record for testing or
2001
2319
  * non-Node runtimes.
2002
2320
  *
2003
2321
  * **Details**
@@ -2106,8 +2424,8 @@ const FalseValues = /*#__PURE__*/ Literals([
2106
2424
  *
2107
2425
  * **When to use**
2108
2426
  *
2109
- * Use when passing to {@link schema} for custom paths, or use the
2110
- * {@link boolean} convenience constructor.
2427
+ * Use when you need the reusable boolean schema value for `Config.schema` with
2428
+ * custom paths.
2111
2429
  *
2112
2430
  * **Details**
2113
2431
  *
@@ -2124,7 +2442,7 @@ const Boolean$1 = /*#__PURE__*/ Literals([...TrueValues.literals, ...FalseValues
2124
2442
  encode: (value) => value ? "true" : "false"
2125
2443
  })));
2126
2444
  //#endregion
2127
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/CliError.js
2445
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/CliError.js
2128
2446
  /**
2129
2447
  * The `CliError` module defines the structured error model used by the
2130
2448
  * unstable CLI parser and runner. It distinguishes command-line parse failures,
@@ -2536,7 +2854,7 @@ var UnknownSubcommand = class extends ErrorClass(`${TypeId$2}/UnknownSubcommand`
2536
2854
  */
2537
2855
  var UserError = class extends ErrorClass(`${TypeId$2}/UserError`)({
2538
2856
  _tag: /*#__PURE__*/ tag("UserError"),
2539
- cause: Defect
2857
+ cause: /*#__PURE__*/ Defect()
2540
2858
  }) {
2541
2859
  /**
2542
2860
  * Marks this value as a user handler error for runtime guards.
@@ -13710,7 +14028,8 @@ const keyValuePair$2 = /*#__PURE__*/ makePrimitive("KeyValuePair", /*#__PURE__*/
13710
14028
  *
13711
14029
  * **When to use**
13712
14030
  *
13713
- * Use when you need generating help documentation.
14031
+ * Use when you need the display type name for a `Primitive`, such as when
14032
+ * generating CLI help documentation.
13714
14033
  *
13715
14034
  * **Example** (Getting primitive type names)
13716
14035
  *
@@ -13754,7 +14073,7 @@ const getTypeName = (primitive) => {
13754
14073
  /** @internal */
13755
14074
  const getChoiceKeys = (primitive) => primitive._tag === "Choice" ? primitive.choiceKeys : void 0;
13756
14075
  //#endregion
13757
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/Param.js
14076
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/Param.js
13758
14077
  const TypeId$1 = "~effect/cli/Param";
13759
14078
  /**
13760
14079
  * Defines the kind discriminator for positional argument parameters.
@@ -13988,7 +14307,8 @@ const choice$1 = (kind, name, choices) => {
13988
14307
  *
13989
14308
  * **When to use**
13990
14309
  *
13991
- * Use when you use it for options that accept configuration values.
14310
+ * Use when you need command-line options or arguments that collect `key=value`
14311
+ * configuration entries.
13992
14312
  *
13993
14313
  * **Details**
13994
14314
  *
@@ -14023,8 +14343,8 @@ const FLAG_DASH_REGEXP = /^-+/;
14023
14343
  *
14024
14344
  * **When to use**
14025
14345
  *
14026
- * Use when aliases allow params to be specified with alternative names,
14027
- * typically single-character shortcuts like "-f" for "--force".
14346
+ * Use when you need a CLI parameter to accept an alternate name, such as "-f"
14347
+ * for "--force".
14028
14348
  *
14029
14349
  * **Details**
14030
14350
  *
@@ -14238,8 +14558,8 @@ const withDefault$1 = /*#__PURE__*/ dual(2, (self, defaultValue) => {
14238
14558
  * **Details**
14239
14559
  *
14240
14560
  * This is the base combinator for creating parameters that accept multiple values.
14241
- * The min and max parameters are optional - if not provided, the parameter can be
14242
- * specified any number of times (0 to infinity).
14561
+ * The `min` and `max` parameters are optional. When they are not provided, the
14562
+ * parameter can be specified any number of times, from 0 to infinity.
14243
14563
  *
14244
14564
  * **Example** (Accepting multiple values)
14245
14565
  *
@@ -14436,7 +14756,7 @@ const getParamMetadata = (param) => {
14436
14756
  });
14437
14757
  };
14438
14758
  //#endregion
14439
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/Argument.js
14759
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/Argument.js
14440
14760
  /**
14441
14761
  * Creates a positional string argument.
14442
14762
  *
@@ -14468,7 +14788,7 @@ const string$1 = (name) => string$2(argumentKind, name);
14468
14788
  */
14469
14789
  const optional$1 = (arg) => optional$2(arg);
14470
14790
  //#endregion
14471
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/CliOutput.js
14791
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/CliOutput.js
14472
14792
  /**
14473
14793
  * The `CliOutput` module provides the formatting service used by Effect CLI
14474
14794
  * applications to turn parsed CLI metadata and failures into terminal text.
@@ -14737,14 +15057,14 @@ const formatHelpDocImpl = (doc, colors) => {
14737
15057
  return sections.join("\n");
14738
15058
  };
14739
15059
  //#endregion
14740
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/Console.js
15060
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/Console.js
14741
15061
  /**
14742
15062
  * Context reference for the current console service in the Effect system, allowing access to the active console implementation from within the Effect context.
14743
15063
  *
14744
15064
  * **When to use**
14745
15065
  *
14746
- * Use when an Effect program needs the current console service as a context
14747
- * reference, such as when providing or overriding a console implementation.
15066
+ * Use when you need an effect to run against a provided console implementation,
15067
+ * such as tests or alternate runtimes, rather than the default console.
14748
15068
  *
14749
15069
  * **Details**
14750
15070
  *
@@ -14834,7 +15154,7 @@ const log = (...args) => consoleWith((console) => sync$1(() => {
14834
15154
  console.log(...args);
14835
15155
  }));
14836
15156
  //#endregion
14837
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/internal/completions/bash.js
15157
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/internal/completions/bash.js
14838
15158
  const escapeForBash = (s) => s.replace(/'/g, "'\\''");
14839
15159
  const sanitizeFunctionName = (s) => s.replace(/[^a-zA-Z0-9_]/g, "_");
14840
15160
  const flagNamesForWordlist = (flag) => {
@@ -14985,7 +15305,7 @@ const generate$3 = (executableName, descriptor) => {
14985
15305
  return lines.join("\n");
14986
15306
  };
14987
15307
  //#endregion
14988
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/internal/completions/fish.js
15308
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/internal/completions/fish.js
14989
15309
  const escapeFishString = (s) => s.replace(/'/g, "\\'");
14990
15310
  /**
14991
15311
  * Build a Fish condition that checks the current subcommand context.
@@ -15123,7 +15443,7 @@ const generate$2 = (executableName, descriptor) => {
15123
15443
  return lines.join("\n");
15124
15444
  };
15125
15445
  //#endregion
15126
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/internal/completions/zsh.js
15446
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/internal/completions/zsh.js
15127
15447
  const escapeZsh = (s) => s.replace(/\\/g, "\\\\").replace(/'/g, "'\\''").replace(/:/g, "\\:");
15128
15448
  const sanitize = (s) => s.replace(/[^a-zA-Z0-9_]/g, "_");
15129
15449
  /**
@@ -15260,7 +15580,7 @@ const generate$1 = (executableName, descriptor) => {
15260
15580
  return lines.join("\n");
15261
15581
  };
15262
15582
  //#endregion
15263
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/Completions.js
15583
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/Completions.js
15264
15584
  /**
15265
15585
  * The `Completions` module turns a plain description of an Effect CLI command
15266
15586
  * tree into shell completion scripts for Bash, Zsh, and Fish. It is the
@@ -15298,7 +15618,7 @@ const generate$1 = (executableName, descriptor) => {
15298
15618
  *
15299
15619
  * **When to use**
15300
15620
  *
15301
- * Use to produce an installable completion script when you already have a
15621
+ * Use when you need an installable completion script from an existing
15302
15622
  * `CommandDescriptor`.
15303
15623
  *
15304
15624
  * **Details**
@@ -15320,7 +15640,7 @@ const generate = (executableName, shell, descriptor) => {
15320
15640
  }
15321
15641
  };
15322
15642
  //#endregion
15323
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/Flag.js
15643
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/Flag.js
15324
15644
  /**
15325
15645
  * Creates a string flag that accepts text input.
15326
15646
  *
@@ -15399,8 +15719,8 @@ const choiceWithValue = (name, choices) => choiceWithValue$1(flagKind, name, cho
15399
15719
  *
15400
15720
  * **When to use**
15401
15721
  *
15402
- * Use when a named option must be restricted to a fixed set of string values
15403
- * and no custom value mapping is needed.
15722
+ * Use when you need to define a named CLI flag with fixed string choices and no
15723
+ * custom value mapping.
15404
15724
  *
15405
15725
  * **Gotchas**
15406
15726
  *
@@ -15417,7 +15737,8 @@ const choice = (name, choices) => choice$1(flagKind, name, choices);
15417
15737
  *
15418
15738
  * **When to use**
15419
15739
  *
15420
- * Use when you use this for options that accept configuration values.
15740
+ * Use when you need a CLI flag that accepts one or more `key=value`
15741
+ * configuration entries.
15421
15742
  *
15422
15743
  * **Details**
15423
15744
  *
@@ -15557,7 +15878,7 @@ const withDefault = withDefault$1;
15557
15878
  */
15558
15879
  const map = /*#__PURE__*/ dual(2, (self, f) => map$1(self, f));
15559
15880
  //#endregion
15560
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/internal/config.js
15881
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/internal/config.js
15561
15882
  const ConfigInternalTypeId = "~effect/cli/Command/Config/Internal";
15562
15883
  /**
15563
15884
  * Parses a Command.Config into a ConfigInternal.
@@ -15628,7 +15949,7 @@ const reconstructTree = (tree, results) => {
15628
15949
  }
15629
15950
  };
15630
15951
  //#endregion
15631
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/internal/command.js
15952
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/internal/command.js
15632
15953
  /**
15633
15954
  * Command Implementation
15634
15955
  * ======================
@@ -15817,7 +16138,7 @@ const checkForDuplicateFlags = (parent, subcommands, options) => {
15817
16138
  }
15818
16139
  };
15819
16140
  //#endregion
15820
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/internal/completions/descriptor.js
16141
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/internal/completions/descriptor.js
15821
16142
  /**
15822
16143
  * CommandDescriptor — pure-data representation of a command tree for
15823
16144
  * shell completion generation.
@@ -15909,7 +16230,7 @@ const fromCommand = (cmd) => {
15909
16230
  };
15910
16231
  };
15911
16232
  //#endregion
15912
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/internal/help.js
16233
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/internal/help.js
15913
16234
  /**
15914
16235
  * Help Documentation
15915
16236
  * ================
@@ -16016,7 +16337,7 @@ const getHelpForCommandPath = (command, commandPath, builtIns) => gen(function*
16016
16337
  };
16017
16338
  });
16018
16339
  //#endregion
16019
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/GlobalFlag.js
16340
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/GlobalFlag.js
16020
16341
  /**
16021
16342
  * The `GlobalFlag` module defines flags that are available to every command in
16022
16343
  * an Effect CLI application. Global flags are useful for cross-cutting command
@@ -16093,13 +16414,13 @@ const Help = /*#__PURE__*/ action({
16093
16414
  *
16094
16415
  * **When to use**
16095
16416
  *
16096
- * Use to add a built-in `--version` flag to a command runner.
16417
+ * Use to add a built-in `--version / -v` flag to a command runner.
16097
16418
  *
16098
16419
  * @category references
16099
16420
  * @since 4.0.0
16100
16421
  */
16101
16422
  const Version = /*#__PURE__*/ action({
16102
- flag: /*#__PURE__*/ boolean("version").pipe(/*#__PURE__*/ withDescription$1("Show version information")),
16423
+ flag: /*#__PURE__*/ boolean("version").pipe(/*#__PURE__*/ withAlias("v"), /*#__PURE__*/ withDescription$1("Show version information")),
16103
16424
  run: (_, { command, version }) => gen(function* () {
16104
16425
  yield* log((yield* Formatter).formatVersion(command.name, version));
16105
16426
  })
@@ -16154,6 +16475,11 @@ const LogLevel = /*#__PURE__*/ setting("log-level")({ flag: /*#__PURE__*/ choice
16154
16475
  /**
16155
16476
  * Built-in global flags in default precedence order.
16156
16477
  *
16478
+ * **When to use**
16479
+ *
16480
+ * Use when extending or inspecting the default global-flag set that
16481
+ * `Command.runWith` prepends before user-defined global flags.
16482
+ *
16157
16483
  * **Details**
16158
16484
  *
16159
16485
  * The built-ins are `Help`, `Version`, `Completions`, and `LogLevel`.
@@ -16180,7 +16506,7 @@ const BuiltIns = [
16180
16506
  LogLevel
16181
16507
  ];
16182
16508
  //#endregion
16183
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/internal/lexer.js
16509
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/internal/lexer.js
16184
16510
  /** @internal */
16185
16511
  function lex(argv) {
16186
16512
  const endIndex = argv.indexOf("--");
@@ -16231,7 +16557,7 @@ const lexTokens = (args) => {
16231
16557
  return tokens;
16232
16558
  };
16233
16559
  //#endregion
16234
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/internal/auto-suggest.js
16560
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/internal/auto-suggest.js
16235
16561
  /**
16236
16562
  * Simple Levenshtein distance implementation (small N, no perf worries)
16237
16563
  */
@@ -16259,7 +16585,7 @@ const suggest = (input, candidates) => {
16259
16585
  return distances.filter(([d]) => d === minDistance).map(([, c]) => c);
16260
16586
  };
16261
16587
  //#endregion
16262
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/internal/parser.js
16588
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/internal/parser.js
16263
16589
  /**
16264
16590
  * Parsing Pipeline for CLI Commands
16265
16591
  * ==================================
@@ -16776,7 +17102,7 @@ const scanCommandLevel = (tokens, context) => {
16776
17102
  return toLeafResult(state);
16777
17103
  };
16778
17104
  //#endregion
16779
- //#region node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/cli/Command.js
17105
+ //#region node_modules/.pnpm/effect@4.0.0-beta.78/node_modules/effect/dist/unstable/cli/Command.js
16780
17106
  /**
16781
17107
  * Returns `true` if the provided value is a `Command`.
16782
17108
  *
@@ -17038,9 +17364,8 @@ const showHelp = (command, error$1) => gen(function* () {
17038
17364
  *
17039
17365
  * **When to use**
17040
17366
  *
17041
- * Use when you use `run` at an application entry point when arguments should come from
17042
- * `Stdio`; use `runWith` when you need an explicit argument array, such as in
17043
- * tests.
17367
+ * Use when command-line arguments should come from `Stdio` at the application
17368
+ * entry point.
17044
17369
  *
17045
17370
  * **Example** (Running commands with standard input)
17046
17371
  *
@@ -17061,6 +17386,8 @@ const showHelp = (command, error$1) => gen(function* () {
17061
17386
  * })
17062
17387
  * ```
17063
17388
  *
17389
+ * @see {@link runWith} for running a command with an explicit argument array
17390
+ *
17064
17391
  * @category command execution
17065
17392
  * @since 4.0.0
17066
17393
  */
@@ -17070,8 +17397,8 @@ const run = /*#__PURE__*/ dual(2, (command, config) => Stdio.use(({ args }) => f
17070
17397
  *
17071
17398
  * **When to use**
17072
17399
  *
17073
- * Use when you use this function for testing CLI applications or when you want to
17074
- * programmatically execute commands with specific arguments.
17400
+ * Use when you need to test CLI applications or programmatically execute
17401
+ * commands with specific arguments.
17075
17402
  *
17076
17403
  * **Example** (Running commands with explicit arguments)
17077
17404
  *
@@ -17262,13 +17589,12 @@ const pairCommand = make("pair", {
17262
17589
  })).pipe(withDescription("pair with t3code server"));
17263
17590
  const localCommand = make("local", {
17264
17591
  baseDir: string("base-dir").pipe(optional),
17265
- t3Command: string("t3-command").pipe(optional),
17266
17592
  origin: string("origin").pipe(optional),
17267
17593
  role: choice("role", ["owner", "client"]).pipe(withDefault("owner")),
17268
17594
  label: string("label").pipe(withDefault("t3cli")),
17269
17595
  subject: string("subject").pipe(withDefault("t3cli-local")),
17270
17596
  format: choice("format", humanJsonFormatChoices).pipe(withDefault("auto"))
17271
- }, ({ baseDir, t3Command, origin, role, label, subject, format }) => gen(function* () {
17597
+ }, ({ baseDir, origin, role, label, subject, format }) => gen(function* () {
17272
17598
  const auth = yield* T3Auth;
17273
17599
  const environment = yield* Environment;
17274
17600
  const output = yield* T3Output;
@@ -17277,7 +17603,6 @@ const localCommand = make("local", {
17277
17603
  role,
17278
17604
  label,
17279
17605
  subject,
17280
- ...isSome(t3Command) ? { t3Command: t3Command.value } : {},
17281
17606
  ...isSome(baseDir) ? { baseDir: baseDir.value } : {},
17282
17607
  ...isSome(origin) ? { origin: origin.value } : {}
17283
17608
  });
@@ -17822,7 +18147,7 @@ var T3Version = class extends Service()("t3cli/T3Version") {};
17822
18147
  //#endregion
17823
18148
  //#region src/version/layer.ts
17824
18149
  const PackageJsonSchema = fromJsonString(Struct({ version: String$1 }));
17825
- const T3VersionBundledLive = sync$2(T3Version, () => ({ version: "0.2.0" }));
18150
+ const T3VersionBundledLive = sync$2(T3Version, () => ({ version: "0.4.0" }));
17826
18151
  effect(T3Version, gen(function* () {
17827
18152
  const packageJson = yield* (yield* FileSystem).readFileString(fileURLToPath(new URL("../../package.json", import.meta.url)));
17828
18153
  return { version: (yield* decodeUnknownEffect(PackageJsonSchema)(packageJson)).version };