@codetreker/daynight 0.29.0 → 0.32.1

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 (175) hide show
  1. package/README.md +173 -44
  2. package/config.example.yml +10 -3
  3. package/dist/api/index.d.ts +1 -1
  4. package/dist/api/index.js +1 -1
  5. package/dist/api/index.js.map +1 -1
  6. package/dist/api/task-properties.d.ts +1 -0
  7. package/dist/api/task-properties.js +5 -0
  8. package/dist/api/task-properties.js.map +1 -1
  9. package/dist/cli/agent-cli-aliases.d.ts +21 -0
  10. package/dist/cli/agent-cli-aliases.js +57 -0
  11. package/dist/cli/agent-cli-aliases.js.map +1 -0
  12. package/dist/cli/application.js +5 -0
  13. package/dist/cli/application.js.map +1 -1
  14. package/dist/cli/cancellation.d.ts +1 -1
  15. package/dist/cli/cancellation.js.map +1 -1
  16. package/dist/cli/codex-agent-environment.d.ts +5 -0
  17. package/dist/cli/codex-agent-environment.js +28 -0
  18. package/dist/cli/codex-agent-environment.js.map +1 -0
  19. package/dist/cli/commands.js +1 -0
  20. package/dist/cli/commands.js.map +1 -1
  21. package/dist/cli/schema.d.ts +5 -1
  22. package/dist/cli/schema.js.map +1 -1
  23. package/dist/commands/controller/archive-upload.d.ts +9 -0
  24. package/dist/commands/controller/archive-upload.js +137 -0
  25. package/dist/commands/controller/archive-upload.js.map +1 -0
  26. package/dist/commands/controller/definition.d.ts +1 -0
  27. package/dist/commands/controller/definition.js +9 -1
  28. package/dist/commands/controller/definition.js.map +1 -1
  29. package/dist/commands/controller/independent-archive.d.ts +7 -0
  30. package/dist/commands/controller/independent-archive.js +71 -0
  31. package/dist/commands/controller/independent-archive.js.map +1 -0
  32. package/dist/commands/controller/independent.js +51 -25
  33. package/dist/commands/controller/independent.js.map +1 -1
  34. package/dist/commands/controller/index.js +14 -1
  35. package/dist/commands/controller/index.js.map +1 -1
  36. package/dist/commands/controller/journal-format.d.ts +4 -0
  37. package/dist/commands/controller/journal-format.js +66 -0
  38. package/dist/commands/controller/journal-format.js.map +1 -0
  39. package/dist/commands/controller/launch-ticket.js +3 -2
  40. package/dist/commands/controller/launch-ticket.js.map +1 -1
  41. package/dist/commands/controller/lifecycle-store.d.ts +7 -5
  42. package/dist/commands/controller/lifecycle-store.js +132 -91
  43. package/dist/commands/controller/lifecycle-store.js.map +1 -1
  44. package/dist/commands/controller/local-content.d.ts +11 -6
  45. package/dist/commands/controller/local-content.js +29 -21
  46. package/dist/commands/controller/local-content.js.map +1 -1
  47. package/dist/commands/controller/paths.d.ts +2 -0
  48. package/dist/commands/controller/paths.js +34 -0
  49. package/dist/commands/controller/paths.js.map +1 -0
  50. package/dist/commands/controller/pending-content.d.ts +20 -0
  51. package/dist/commands/controller/pending-content.js +159 -0
  52. package/dist/commands/controller/pending-content.js.map +1 -0
  53. package/dist/commands/controller/providers/codex.js +5 -1
  54. package/dist/commands/controller/providers/codex.js.map +1 -1
  55. package/dist/commands/controller/providers/types.d.ts +4 -0
  56. package/dist/commands/controller/resume-lease-format.d.ts +4 -0
  57. package/dist/commands/controller/resume-lease-format.js +35 -0
  58. package/dist/commands/controller/resume-lease-format.js.map +1 -0
  59. package/dist/commands/controller/resume.js +88 -23
  60. package/dist/commands/controller/resume.js.map +1 -1
  61. package/dist/commands/controller/runtime.js +11 -1
  62. package/dist/commands/controller/runtime.js.map +1 -1
  63. package/dist/commands/controller/sqlite/journal/001-baseline.sql +17 -0
  64. package/dist/commands/controller/sqlite/journal/002-projection.sql +8 -0
  65. package/dist/commands/controller/sqlite/journal/003-operation-acknowledgements.sql +1 -0
  66. package/dist/commands/controller/sqlite/journal/004-projection-gap.sql +1 -0
  67. package/dist/commands/controller/sqlite/journal/005-resources.sql +7 -0
  68. package/dist/commands/controller/sqlite/journal/006-pending-content.sql +12 -0
  69. package/dist/commands/controller/sqlite/resume-lease/001-baseline.sql +7 -0
  70. package/dist/commands/project/definition.js +1 -1
  71. package/dist/commands/project/definition.js.map +1 -1
  72. package/dist/commands/review/definition.js +3 -3
  73. package/dist/commands/review/definition.js.map +1 -1
  74. package/dist/commands/review/listing.js +1 -1
  75. package/dist/commands/review/listing.js.map +1 -1
  76. package/dist/commands/review/runtime.js +3 -1
  77. package/dist/commands/review/runtime.js.map +1 -1
  78. package/dist/commands/review/sqlite/001-baseline.sql +65 -0
  79. package/dist/commands/review/sqlite/002-publications.sql +15 -0
  80. package/dist/commands/review/store-format.d.ts +2 -0
  81. package/dist/commands/review/store-format.js +35 -0
  82. package/dist/commands/review/store-format.js.map +1 -0
  83. package/dist/commands/review/store.d.ts +8 -1
  84. package/dist/commands/review/store.js +46 -176
  85. package/dist/commands/review/store.js.map +1 -1
  86. package/dist/commands/skill/read.d.ts +2 -0
  87. package/dist/commands/skill/read.js +36 -0
  88. package/dist/commands/skill/read.js.map +1 -0
  89. package/dist/commands/skill/skills/using-daynight/references/authorization.md +1 -0
  90. package/dist/commands/skill/skills/using-daynight/references/autopilot-managed-task.md +19 -7
  91. package/dist/commands/skill/skills/using-daynight/references/goal.md +33 -8
  92. package/dist/commands/skill/skills/using-daynight/references/run-task.md +1 -1
  93. package/dist/commands/skill/skills/using-daynight/references/task-content.md +1 -0
  94. package/dist/commands/skill/usage.md +162 -0
  95. package/dist/commands/task/definition.js +1 -1
  96. package/dist/commands/task/definition.js.map +1 -1
  97. package/dist/commands/worker/backends/sqlite/001-baseline.sql +4 -0
  98. package/dist/commands/worker/backends/web-process.js +11 -11
  99. package/dist/commands/worker/backends/web-process.js.map +1 -1
  100. package/dist/commands/worker/backends/web-record.d.ts +11 -0
  101. package/dist/commands/worker/backends/web-record.js +151 -0
  102. package/dist/commands/worker/backends/web-record.js.map +1 -0
  103. package/dist/commands/worker/backends/web-store-format.d.ts +2 -0
  104. package/dist/commands/worker/backends/web-store-format.js +33 -0
  105. package/dist/commands/worker/backends/web-store-format.js.map +1 -0
  106. package/dist/commands/worker/backends/web-store.d.ts +5 -1
  107. package/dist/commands/worker/backends/web-store.js +44 -170
  108. package/dist/commands/worker/backends/web-store.js.map +1 -1
  109. package/dist/commands/worker/backends/web.d.ts +1 -0
  110. package/dist/commands/worker/backends/web.js +13 -4
  111. package/dist/commands/worker/backends/web.js.map +1 -1
  112. package/dist/commands/worker/cleanup.d.ts +1 -1
  113. package/dist/commands/worker/cleanup.js.map +1 -1
  114. package/dist/commands/worker/coordinator.js +1 -1
  115. package/dist/commands/worker/coordinator.js.map +1 -1
  116. package/dist/commands/worker/definition.js +2 -2
  117. package/dist/commands/worker/definition.js.map +1 -1
  118. package/dist/commands/worker/diagnostics.d.ts +3 -0
  119. package/dist/commands/worker/diagnostics.js +15 -0
  120. package/dist/commands/worker/diagnostics.js.map +1 -1
  121. package/dist/commands/worker/execution.d.ts +2 -0
  122. package/dist/commands/worker/execution.js +17 -4
  123. package/dist/commands/worker/execution.js.map +1 -1
  124. package/dist/commands/worker/herdr/agents.d.ts +9 -1
  125. package/dist/commands/worker/herdr/agents.js +22 -6
  126. package/dist/commands/worker/herdr/agents.js.map +1 -1
  127. package/dist/commands/worker/herdr/arguments.d.ts +4 -0
  128. package/dist/commands/worker/herdr/arguments.js +17 -0
  129. package/dist/commands/worker/herdr/arguments.js.map +1 -1
  130. package/dist/commands/worker/herdr/codex-config.d.ts +8 -0
  131. package/dist/commands/worker/herdr/codex-config.js +75 -0
  132. package/dist/commands/worker/herdr/codex-config.js.map +1 -0
  133. package/dist/commands/worker/herdr/preflight.js +1 -18
  134. package/dist/commands/worker/herdr/preflight.js.map +1 -1
  135. package/dist/commands/worker/herdr.d.ts +6 -2
  136. package/dist/commands/worker/herdr.js +3 -2
  137. package/dist/commands/worker/herdr.js.map +1 -1
  138. package/dist/commands/worker/prompts.js +7 -2
  139. package/dist/commands/worker/prompts.js.map +1 -1
  140. package/dist/commands/worker/runtime.js +68 -7
  141. package/dist/commands/worker/runtime.js.map +1 -1
  142. package/dist/commands/worker/sqlite/005-baseline.sql +18 -0
  143. package/dist/commands/worker/store-format.d.ts +2 -0
  144. package/dist/commands/worker/store-format.js +35 -0
  145. package/dist/commands/worker/store-format.js.map +1 -0
  146. package/dist/commands/worker/store.d.ts +2 -0
  147. package/dist/commands/worker/store.js +36 -69
  148. package/dist/commands/worker/store.js.map +1 -1
  149. package/dist/config/agent-cli-aliases.d.ts +5 -0
  150. package/dist/config/agent-cli-aliases.js +37 -0
  151. package/dist/config/agent-cli-aliases.js.map +1 -0
  152. package/dist/config/paths.d.ts +1 -1
  153. package/dist/config/paths.js +6 -2
  154. package/dist/config/paths.js.map +1 -1
  155. package/dist/platform/diagnostics.js +3 -0
  156. package/dist/platform/diagnostics.js.map +1 -1
  157. package/dist/platform/instance-lock.d.ts +15 -0
  158. package/dist/platform/instance-lock.js +45 -3
  159. package/dist/platform/instance-lock.js.map +1 -1
  160. package/dist/platform/sqlite-access.d.ts +40 -0
  161. package/dist/platform/sqlite-access.js +333 -0
  162. package/dist/platform/sqlite-access.js.map +1 -0
  163. package/dist/platform/sqlite-error.d.ts +39 -0
  164. package/dist/platform/sqlite-error.js +36 -0
  165. package/dist/platform/sqlite-error.js.map +1 -0
  166. package/dist/platform/sqlite-format.d.ts +31 -0
  167. package/dist/platform/sqlite-format.js +98 -0
  168. package/dist/platform/sqlite-format.js.map +1 -0
  169. package/dist/platform/sqlite-sql.d.ts +12 -0
  170. package/dist/platform/sqlite-sql.js +61 -0
  171. package/dist/platform/sqlite-sql.js.map +1 -0
  172. package/dist/session/archive.d.ts +25 -0
  173. package/dist/session/archive.js +100 -0
  174. package/dist/session/archive.js.map +1 -0
  175. package/package.json +3 -3
package/README.md CHANGED
@@ -13,7 +13,9 @@ its exact usage. Review execution additionally requires Git, an authenticated
13
13
  GitHub CLI and Copilot CLI on `PATH`.
14
14
 
15
15
  - [Install and update](#install-and-update)
16
+ - [Configuration root](#configuration-root)
16
17
  - [Client commands](#client-commands)
18
+ - [CLI usage manual](#cli-usage-manual)
17
19
  - [Agent skill installation](#agent-skill-installation)
18
20
  - [Shell completion](#shell-completion)
19
21
  - [Configuration setup](#configuration-setup)
@@ -88,12 +90,35 @@ that file and cause the update to fail. The
88
90
  [self-update decision](../../.agents/notes/archived/feature/2026-10-20-cli-self-update.md)
89
91
  records installation ownership and verification requirements.
90
92
 
93
+ ## Configuration root
94
+
95
+ `DN_CONFIG_DIR` selects the absolute directory containing `config.yml` and all
96
+ Daynight user-local state. When unset, it remains `~/.daynight`. Empty or relative
97
+ values and paths containing control characters are rejected; use an expanded
98
+ absolute path such as `DN_CONFIG_DIR="$HOME/.daynight-test"`. Paths shown under
99
+ `~/.daynight` in this manual describe that default and follow the selected root.
100
+
101
+ The root includes credentials, worker identity, Worker/Review SQLite databases,
102
+ locks, logs, caches, Controller launch tickets, journals, content and resume leases.
103
+ Controller IPC identities are scoped to this root; long Unix socket paths use a
104
+ private owner-checked temporary directory. Herdr retains its native socket length
105
+ limit and reports an error for overly long roots; select a shorter root for
106
+ Herdr mode. Native home and Provider session directories remain unchanged.
107
+ Project `.daynight` bindings, Git worktrees, installed skills, npm installations
108
+ and remote service data are not isolated by this setting.
109
+
110
+ Top-level `agentCliAliases` optionally maps `daynight` and/or `dn` to another
111
+ executable for newly launched Worker/Controller Agents. It defaults to disabled.
112
+ The [development channel guide](../../docs/development.md#keep-the-skills-command-spelling)
113
+ explains the mapping, platform limits, fixed build lifetime and shell verification.
114
+
91
115
  ## Client commands
92
116
 
93
117
  ```text
94
118
  daynight # Show root help
95
119
  daynight --help # Also -h
96
120
  daynight --version # Also -v
121
+ daynight --skill # Print the project/task usage manual
97
122
  daynight update
98
123
  daynight login [--no-browser] # Authorize CLI access through the browser
99
124
  daynight logout # Revoke and remove the current CLI credential
@@ -138,8 +163,8 @@ daynight task attachment remove <task-id> <relative-path> [--project <project-id
138
163
  ```
139
164
 
140
165
  Groups and operations show help when `--help` or `-h` is their sole argument.
141
- Help, version and completion generation do not resolve the user home, load review
142
- configuration, open SQLite or require review tools. `review add-repo` accepts one
166
+ Help, version, usage-manual output and completion generation do not resolve the
167
+ user home, load review configuration, open SQLite or require review tools. `review add-repo` accepts one
143
168
  `--path <path>` before or after its remote; `--path=value` and `--` are invalid.
144
169
  Unknown commands and invalid arguments exit with status 2; operation failures
145
170
  exit with status 1 and retain their cause. The old `--daemon-review` and root
@@ -148,6 +173,31 @@ exit with status 1 and retain their cause. The old `--daemon-review` and root
148
173
  the [composition decision](../../.agents/notes/archived/architecture/2026-10-20-client-command-composition.md)
149
174
  records module ownership and the preserved data layout.
150
175
 
176
+ ## CLI usage manual
177
+
178
+ ```bash
179
+ daynight --skill
180
+ dn --skill
181
+ ```
182
+
183
+ `--skill` prints one standalone English project/task usage manual from the
184
+ current package. It covers project selection, task queries and writes,
185
+ dependencies, properties and attachments. Other capabilities are discovered
186
+ through `daynight --help`, with exact options in each subcommand's help. The
187
+ output preserves the manual's original bytes, including YAML
188
+ frontmatter and the final newline. The document has no package-relative
189
+ references to read separately.
190
+
191
+ The option must be the sole argument. Extra arguments or another option exit
192
+ with status 2 and empty stdout before the manual is read. A missing file, read
193
+ failure or invalid UTF-8 exits with status 1 and retains its cause. Reading and
194
+ validation complete before output; an output failure can leave partial stdout.
195
+ The command requires no login, Git repository, configuration, launcher or
196
+ interactive terminal, and creates no files.
197
+
198
+ The `using-daynight` skill owns task orchestration workflows and is installed
199
+ through the separate command below. The CLI manual explains command use.
200
+
151
201
  ## Agent skill installation
152
202
 
153
203
  The public `using-daynight` skill provides task creation, handoff review and
@@ -396,8 +446,8 @@ messages use stderr so stdout retains its normal text or JSON format.
396
446
  Noninteractive missing review configuration fails with a `review add-repo`
397
447
  command. Shared YAML/schema errors, invalid selected values, explicit empty
398
448
  review lists and read failures retain their errors. Unrelated capability values
399
- remain outside the current command's validation. Help, version, completion,
400
- update and invalid arguments do not prompt.
449
+ remain outside the current command's validation. Help, version, usage-manual
450
+ output, completion, update and invalid arguments do not prompt.
401
451
 
402
452
  Test services and noninteractive automation use the existing
403
453
  `~/.daynight/config.yml` fields. For a test service, provision its origin before
@@ -774,6 +824,18 @@ Generic commands do not introduce custom attributes or make worker publicly
774
824
  writable. To set PR references, supply the whole ordered array of url/title
775
825
  objects, preserving every entry still needed.
776
826
 
827
+ The writable boolean property `paused` controls periodic worker continuation
828
+ pings. Set it to `true` to suppress those pings, or set it to `false` or remove
829
+ it to restore the usual policy. An absent key remains absent in reads. The
830
+ property can change during an active claim without changing task status,
831
+ execution ownership or timing:
832
+
833
+ ```bash
834
+ daynight task set-property <task-id> paused true --if-version <observed-version>
835
+ daynight task set-property <task-id> paused false --if-version <observed-version>
836
+ daynight task remove-property <task-id> paused --if-version <observed-version>
837
+ ```
838
+
777
839
  The value positional argument can be empty. Use `--` before a positional
778
840
  argument beginning with a dash, with options before the terminator. For example,
779
841
  `task set-property <task-id> <property> -- -123` forwards the exact text to the
@@ -1108,7 +1170,7 @@ daynight worker run
1108
1170
  ```
1109
1171
 
1110
1172
  First use generates and atomically saves stable root workerId. One instance owns
1111
- fixed `~/.daynight/worker/` state, its SQLite, lock, logs, temporary resources and
1173
+ `worker/` state under the selected configuration root (default `~/.daynight/worker/`), its SQLite, lock, logs, temporary resources and
1112
1174
  private Herdr. Each task uses branch `daynight/<task-id>` and directory
1113
1175
  `<repository>/.worktrees/daynight/<task-id>`. Valid claims retain their dirty
1114
1176
  worktree; task branches and commits remain after terminal cleanup.
@@ -1142,7 +1204,7 @@ The local database has exactly these business fields:
1142
1204
 
1143
1205
  ```text
1144
1206
  projects(project_id, repo_url, local_path)
1145
- tasks(project_id, task_id, claim_id, status, agent, session_id)
1207
+ tasks(project_id, task_id, claim_id, status, agent, session_id, agent_control_mode)
1146
1208
  ```
1147
1209
 
1148
1210
  Status is pending, active or done. Pending is an actual acquired claim waiting
@@ -1156,9 +1218,15 @@ The state directory belongs to the configured single service, Daynight account
1156
1218
  and workerId. Finish old executions before changing those identities and
1157
1219
  rebuilding local state. The running process pins its startup authenticated user;
1158
1220
  the claim-index database does not retain prior-service or prior-account recovery
1159
- scopes. Existing detailed worker databases are not migrated: stop the old worker,
1160
- remove its old SQLite database yourself, and let the next run create the new
1161
- schema. The CLI never deletes it automatically. Keep workerId and native history.
1221
+ scopes. The claim index has its own `user_version=5`. All five business databases
1222
+ reset `user_version=0` after their ownership checks: the original schema and data
1223
+ are discarded, then the baseline and numbered upgrades rebuild the current
1224
+ format. This includes existing empty files and query access. Known valid nonzero
1225
+ migrations preserve data; detailed worker formats 1–4 remain unsupported and are
1226
+ retained on refusal. Stop the old worker and remove that unsupported database
1227
+ yourself before new-schema startup. Keep workerId and native history. Each business database owns
1228
+ its migration sequence; the [SQLite migration requirements](../../docs/spec/cli-sqlite-migrations.md)
1229
+ define atomicity, ownership blockers and supported starting formats.
1162
1230
 
1163
1231
  Each reconciliation obtains the complete own-claim inventory for configured and
1164
1232
  saved Projects. Still-owned local active tasks are queued for fresh target
@@ -1201,23 +1269,44 @@ The saved SQLite session_id still selects resume or fresh startup; an inactive
1201
1269
  pane's retained reference is not saved as a newly observed session ID. A live
1202
1270
  agent keeps its current connection.
1203
1271
 
1204
- Startup and recovery prompts identify the assignment as a background task: the
1205
- agent asks no questions and makes decisions within the task scope and existing
1206
- authorization. While waiting for review or CI, it waits, checks for results and
1207
- continues delivery without ending its execution turn. Fixed native full access
1208
- and folder trust apply to every fresh/resumed process; task delivery remains
1209
- within its existing business authorization.
1272
+ Startup, recovery and continuation prompts require autonomous decisions within
1273
+ the task scope and existing authorization. When human intervention is necessary,
1274
+ the managed agent sets its own task's `paused` property to true with an observed
1275
+ exact version and confirms the same assignment and pause before waiting. It
1276
+ reports the issue and retains session context; the user chooses how to respond.
1277
+ After verifying resolution, the original assignment and permission to resume,
1278
+ it clears the pause and confirms false or absence before continuing. Independent
1279
+ user restrictions still apply. The [managed workflow](src/commands/skill/skills/using-daynight/references/autopilot-managed-task.md#request-user-interaction)
1280
+ owns readback, failure and conflict handling.
1281
+
1282
+ Ordinary review and CI waits remain ongoing execution: the agent waits, checks
1283
+ results and continues delivery without ending its turn or setting a pause just
1284
+ because a poll times out. Fixed native full access and folder trust apply to
1285
+ every fresh/resumed process; task delivery remains within its business authorization.
1210
1286
 
1211
1287
  For a still-owned active claim, each patrol observes the live agent. An
1212
1288
  interactive-ready agent that is not launching and has no first input pending
1213
- receives a continuation ping when idle or done. Working, blocked, unknown and
1214
- not-ready agents remain under observation. The ping preserves the original task,
1215
- claim, worktree and authorization; idle or done does not complete the business
1216
- task. The driver retains the last input observation in memory and suppresses
1289
+ receives a continuation ping when idle or done and its task is not paused.
1290
+ Working, blocked, unknown and not-ready agents remain under observation. The
1291
+ entire ping is enclosed in literal `<system remider>` and `</system remider>`
1292
+ tags and preserves the original task, claim, worktree and authorization; idle or
1293
+ done does not complete the business task. The driver retains the last input observation in memory and suppresses
1217
1294
  repeated input while it is unchanged. Unknown submission results require
1218
1295
  observation before another decision, without blind replay. Terminal cleanup
1219
1296
  suppresses business pings.
1220
1297
 
1298
+ Before a periodic ping reaches the native agent, the worker rereads the task
1299
+ from the service after workspace serialization and native readiness checks,
1300
+ verifies the original active claim, worker and worktree, and checks
1301
+ `properties.paused`. A true value skips that input without advancing its
1302
+ submission baseline. Setting false or removing the property therefore permits
1303
+ a later ping even when native observation counters have not changed. Read
1304
+ failures remain visible and send no ping. The last service read and native
1305
+ submission are separate operations; pausing does not retract input already sent.
1306
+ This property controls only periodic continuation. It preserves current native
1307
+ execution, initial or deferred assignments, observation, recovery and cleanup.
1308
+ Web execution currently sends no such periodic pings.
1309
+
1221
1310
  A non-NULL saved session ID remains the recovery identity. A different native
1222
1311
  ID reported during startup, live reconnection or before deferred input is an
1223
1312
  error: the saved ID is retained and that input is not sent. A genuine live
@@ -1362,8 +1451,12 @@ resolved by matching historical text. Provider-specific runtime evidence is
1362
1451
  required separately from protocol tests.
1363
1452
 
1364
1453
  The primary worker database retains its claim and native-session index. Web
1365
- execution evidence lives separately in `~/.daynight/worker/web-executions.sqlite`;
1366
- private launch tickets and Controller journals live under `~/.daynight/controller/`.
1454
+ execution state lives separately in `~/.daynight/worker/web-executions.sqlite`
1455
+ with its own format version 1. Version 0 resets its schema and data through the
1456
+ common SQLite policy; current-version CRUD retains the existing JSON parser and
1457
+ default-field behavior. Private launch tickets and Controller
1458
+ journals live under `~/.daynight/controller/`; journals retain their independent
1459
+ format version 5. Both Worker stores must open successfully before scheduling.
1367
1460
  Web restart reconnects to a surviving Controller. Starting a new generation
1368
1461
  requires proof that the original native processes stopped and the exact native
1369
1462
  session ID. A missing journal or ID cannot authorize a replacement conversation.
@@ -1403,18 +1496,35 @@ for its supported options. These commands do not implement a native TUI or chang
1403
1496
  The command prints the Test Session URL and remains in the foreground. Sign in
1404
1497
  to Daynight as the account that started it; the URL itself grants no access.
1405
1498
  The service's `/test-sessions` page lists that account's online Test Sessions.
1406
- Archived history remains available through the original URL and local resume. Use the sidebar or the Session page's back link to
1407
- return to the list; session IDs do not need to be copied manually.
1499
+ Completed history is available through the original URL after its file archive
1500
+ is ready. Native resume creates a separate execution. Use the sidebar or the
1501
+ Session page's back link to return to the list; session IDs do not need to be
1502
+ copied manually.
1408
1503
  The page, history, resources, WebSocket and commands all enforce that ownership.
1409
1504
  An expired or revoked credential cannot continue authorizing access. Tokens stay
1410
1505
  in private local files and never appear in the URL.
1411
1506
 
1412
1507
  Task and Test pages share the same timeline, composer and interaction handling.
1413
1508
  Refreshing or closing a browser does not create or stop an Agent. Ctrl+C stops
1414
- the owned execution; the service retains its archived history as read-only when
1415
- shutdown registration succeeds. Service unavailability does not prevent local
1416
- process cleanup, but leaves remote archival unconfirmed. The current directory
1417
- and user files are never removed by the launcher.
1509
+ the owned execution. Once the service confirms shutdown, the launcher uploads
1510
+ its recorded timeline and resources to file storage for read-only access. The
1511
+ service database stores archive metadata, not conversation payloads. Service
1512
+ unavailability does not prevent local process cleanup; failed uploads retain
1513
+ their private local source. The current directory and user files are never
1514
+ removed by the launcher.
1515
+
1516
+ Retry a failed upload without starting or resuming the Agent:
1517
+
1518
+ ```sh
1519
+ daynight controller codex archive <test-session-id>
1520
+ ```
1521
+
1522
+ The same command supports `claude` and `copilot`. It verifies the original local
1523
+ execution and stop evidence, and does not require the old working directory to
1524
+ still exist. Use `-- archive` to send the literal word as an initial prompt.
1525
+ Archives are limited to 64 MiB including resource encoding, with at most 8 MiB
1526
+ per resource; incomplete or oversized archives fail explicitly and retain their
1527
+ source. Completed pages disable all Agent controls.
1418
1528
 
1419
1529
  Resume a stopped Test Session with its native context:
1420
1530
 
@@ -1516,8 +1626,7 @@ daynight review run
1516
1626
  ```
1517
1627
 
1518
1628
  For a local build, run `pnpm daynight review run` from the repository root.
1519
- These commands select `~/.daynight/config.yml` using the current OS user's home
1520
- directory. `review add-repo`
1629
+ These commands select `config.yml` under the [configuration root](#configuration-root). `review add-repo`
1521
1630
  creates the configuration when absent. It reads, validates and saves configuration;
1522
1631
  cloning, authentication checks, GitHub calls, SQLite initialization and PR boundary
1523
1632
  selection belong to review startup. An already running reviewer keeps its loaded
@@ -1600,7 +1709,7 @@ This observes actual case and Unicode rules. Validation removes only the
1600
1709
  directories it created, using nonrecursive removal. Probe permission, inspection,
1601
1710
  or cleanup failures stop validation with an error.
1602
1711
 
1603
- The selected retained-state location is `~/.daynight/` for SQLite, sessions,
1712
+ The selected retained-state location is `DN_CONFIG_DIR` (default `~/.daynight/`) for SQLite, sessions,
1604
1713
  locks, logs, cache, and temporary files. PR worktrees belong to each monitored
1605
1714
  repository root's `.worktrees/` directory. `maxConcurrentWorker` limits concurrent
1606
1715
  review preparation and execution. Startup acquires an exclusive instance lock,
@@ -1647,13 +1756,20 @@ With no current review, an open non-Draft row shows `Pending (cleanup blocked)`;
1647
1756
  Draft remains `Paused`. Older active reviews retain their separate details. The
1648
1757
  listing reports the barrier without attempting cleanup or recovery.
1649
1758
 
1650
- The command loads the current configuration and opens an existing SQLite database
1651
- read-only for one consistent transaction. It needs no Git, GitHub CLI or Copilot
1652
- execution, instance lock, clone or review startup. It does not create an absent
1653
- database, migrate a schema, recover interrupted work or update application state.
1654
- SQLite may create or update its WAL coordination sidecar files while reading an
1655
- existing database. Missing or invalid configuration, unreadable or corrupt state,
1656
- and unsupported schema versions fail visibly. The
1759
+ The command loads the current configuration and reads a consistent SQLite
1760
+ snapshot. A current-format database is opened read-only without an instance lock
1761
+ or additional migration write permission. If the existing database needs an
1762
+ upgrade, the command closes that read connection, obtains a maintenance permit,
1763
+ upgrades through a short writable connection, then reopens and checks the current
1764
+ read-only snapshot before querying. Any existing instance lock blocks this pure
1765
+ maintenance operation, including a dead or uncertain owner; it is retained.
1766
+
1767
+ Listing needs no Git, GitHub CLI or Copilot execution, clone or review startup.
1768
+ It does not create an absent database, recover interrupted work or change review
1769
+ business state. SQLite may create or update its WAL coordination sidecar files
1770
+ while reading an existing database. Missing or invalid configuration, unreadable
1771
+ or corrupt state, uninitialized existing files, unsupported versions and real
1772
+ upgrade blockers fail visibly. The
1657
1773
  [listing decision](../../.agents/notes/archived/feature/2026-10-18-review-status-listing.md)
1658
1774
  records status attribution and snapshot limits.
1659
1775
 
@@ -1663,8 +1779,9 @@ The command and source layout preserve existing YAML fields, retained-state
1663
1779
  locations and resource identities. Runtime opening explicitly migrates earlier
1664
1780
  SQLite state to retain verified review publications and conversation follow-ups;
1665
1781
  existing cutoffs, revision budgets, sessions, process evidence and worktrees remain
1666
- owned by their original records. Read-only listing does not migrate state. The
1667
- review module owns its domain types independently of its SQLite implementation.
1782
+ owned by their original records. Listing automatically migrates a supported older
1783
+ format before reading, while current version 2 remains read-only. The review
1784
+ module owns its domain types independently of its SQLite implementation.
1668
1785
 
1669
1786
  The SQLite module keeps repository identity, the permanent startup PR boundary,
1670
1787
  observed PRs, captured review targets, completion revisions, sessions, worktree
@@ -1679,16 +1796,28 @@ fresh snapshot confirming that exact remote review is still `APPROVED`, with the
1679
1796
  captured actor, commit and stable identity. A dismissed historical review cannot
1680
1797
  suppress that pending work.
1681
1798
 
1682
- Runtime database opening applies explicit schema migrations and enables WAL with
1683
- FULL synchronization and a bounded busy timeout. The listing reader checks the
1684
- existing schema, accepting versions 1 and 2 without applying migrations. The
1685
- instance lock checks whether its recorded CLI owner still exists; that check does not establish whether its agents
1799
+ Runtime database opening applies the database's independent 1→2 migration and
1800
+ enables WAL with FULL synchronization and a bounded busy timeout. Listing uses
1801
+ the same format definition, upgrades version 1 when permitted and reads current
1802
+ version 2 in one consistent snapshot. Query migration never takes over a retained
1803
+ instance lock. The ordinary runtime instance lock checks whether its recorded CLI
1804
+ owner still exists; that check does not establish whether its agents
1686
1805
  or tools have stopped. Interrupted reviews and pending cleanup remain blocked
1687
1806
  after automatic lock recovery until process exclusion is explicitly confirmed.
1688
1807
  Database state does not replace physical Git/worktree or session-history
1689
1808
  verification.
1690
1809
 
1691
- See the [review architecture](../../docs/design/daynight-review.md) for transitions and the
1810
+ Each store's baseline and SQL conversions ship as `.sql` resources with the
1811
+ installed dist tree. Top-level SQL files in that store's directory run in lexical
1812
+ filename order: the first is its baseline, and consecutive numeric prefixes set
1813
+ later versions. Five baselines and six upgrades form the current SQL inventory.
1814
+ TypeScript keeps JSON conversion, ownership checks and the atomic version-0 reset;
1815
+ ordinary non-SQL subdirectories do not enter the normal chain. Resource loading and
1816
+ sequence validation finish before user-database access; package checks compare
1817
+ source and installed resources. The shared
1818
+ [SQLite migration design](../../docs/design/cli-sqlite-migrations.md) explains
1819
+ per-store resources, versions, connection lifecycle and failure handling. See the
1820
+ [review architecture](../../docs/design/daynight-review.md) for transitions and the
1692
1821
  [state decision](../../.agents/notes/archived/architecture/2026-10-17-durable-review-state.md)
1693
1822
  for persistence choices. The coordinator opens this state before scheduling work
1694
1823
  and advances only the revision captured by each completed attempt.
@@ -1,4 +1,4 @@
1
- # Shared CLI configuration: ~/.daynight/config.yml.
1
+ # Shared CLI configuration: $DN_CONFIG_DIR/config.yml (default ~/.daynight/config.yml).
2
2
  # Select the sections needed for your commands and replace the example repositories
3
3
  # and local paths. Merge settings into an existing file to retain credentials and
4
4
  # other configuration; this file is a reference, not an automatically loaded config.
@@ -11,6 +11,13 @@ serverUrl: https://daynight.cc
11
11
  # Remove or replace an old token before changing serverUrl manually. Keep secrets
12
12
  # out of repositories and logs; files containing a token need POSIX mode 0600.
13
13
 
14
+ # Optional Agent-only CLI mappings (macOS/Linux), disabled when omitted or {}.
15
+ # Keys are commands the Agent uses; values are executable names or absolute paths.
16
+ # Only new Worker/Controller Agent environments receive these aliases.
17
+ # agentCliAliases:
18
+ # daynight: daynight-dev
19
+ # dn: daynight-dev
20
+
14
21
  # Review configuration. The numeric values below are the defaults; all are positive
15
22
  # integers, and fields ending in Ms use milliseconds.
16
23
  # Only repositoryRoot expands ~. It selects paths for future review add-repo calls
@@ -28,8 +35,8 @@ review:
28
35
  # copilotReasoningEffort: high
29
36
  repositories:
30
37
  - remote: https://github.com/OWNER/REPO.git
31
- # Repository paths are absolute or relative to ~/.daynight/, never the launch
32
- # directory, and do not expand ~. Keep review clones outside ~/.daynight/.
38
+ # Repository paths are absolute or relative to the selected config directory, never the launch
39
+ # directory, and do not expand ~. Keep review clones outside that directory.
33
40
  path: ../daynights/github.com/owner/repo
34
41
 
35
42
  # Worker configuration. Run daynight worker setup to inspect prerequisites,
@@ -5,4 +5,4 @@ export { createOperation, DEFAULT_OPERATION_LIMITS, OperationError } from "./ope
5
5
  export type { Operation, OperationLimits } from "./operation.js";
6
6
  export { canonicalId, ProtocolError, validateAttachmentPath } from "./parse.js";
7
7
  export type * from "./types.js";
8
- export { parseTaskProperties, parseTaskPropertyResource, parseTaskPropertySchema, readPullRequests, readWorkerClaim, sameTaskProperties } from "./task-properties.js";
8
+ export { parseTaskProperties, parseTaskPropertyResource, parseTaskPropertySchema, readPullRequests, readTaskPaused, readWorkerClaim, sameTaskProperties } from "./task-properties.js";
package/dist/api/index.js CHANGED
@@ -2,5 +2,5 @@ export { ApiError, createApiClient } from "./client.js";
2
2
  export { parseApiJson, parseVersionArgument, stringifyApiJson } from "./json.js";
3
3
  export { createOperation, DEFAULT_OPERATION_LIMITS, OperationError } from "./operation.js";
4
4
  export { canonicalId, ProtocolError, validateAttachmentPath } from "./parse.js";
5
- export { parseTaskProperties, parseTaskPropertyResource, parseTaskPropertySchema, readPullRequests, readWorkerClaim, sameTaskProperties } from "./task-properties.js";
5
+ export { parseTaskProperties, parseTaskPropertyResource, parseTaskPropertySchema, readPullRequests, readTaskPaused, readWorkerClaim, sameTaskProperties } from "./task-properties.js";
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE3F,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEhF,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE3F,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEhF,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import type { PullRequestProperty, TaskProperties, TaskPropertyResource, TaskPropertySchema, WorkerClaim } from "./types.js";
2
2
  export declare const parseTaskProperties: (value: unknown) => TaskProperties;
3
+ export declare const readTaskPaused: (properties: TaskProperties) => boolean | undefined;
3
4
  export declare const readPullRequests: (properties: TaskProperties) => readonly PullRequestProperty[] | undefined;
4
5
  export declare const readWorkerClaim: (properties: TaskProperties) => WorkerClaim | undefined;
5
6
  export declare const sameTaskProperties: (left: TaskProperties, right: TaskProperties) => boolean;
@@ -10,6 +10,11 @@ const jsonValue = (value) => {
10
10
  return Object.fromEntries(Object.entries(record(value)).map(([key, item]) => [key, jsonValue(item)]));
11
11
  };
12
12
  export const parseTaskProperties = (value) => Object.fromEntries(Object.entries(record(value)).map(([name, item]) => [name, jsonValue(item)]));
13
+ export const readTaskPaused = (properties) => {
14
+ if (!Object.hasOwn(properties, "paused"))
15
+ return undefined;
16
+ return typeof properties.paused === "boolean" ? properties.paused : malformed();
17
+ };
13
18
  export const readPullRequests = (properties) => {
14
19
  if (!Object.hasOwn(properties, "pullRequests"))
15
20
  return undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"task-properties.js","sourceRoot":"","sources":["../../src/api/task-properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGzG,MAAM,SAAS,GAAG,CAAC,KAAc,EAAa,EAAE;IAC9C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC5F,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SA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AK,SAAS;gBAAE,OAAO,SAAS,EAAE,CAAC;YAC/G,OAAO,CAAC,IAAI,EAAE,EAAE,GAAG,mBAAmB,CAAC,UAAU,CAAC,EAAE,WAAW,EAAE,UAAU,CAAC,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,mBAAmB,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAC5K,CAAC,CAAC,CAAC,EAAE,CAAC;AACR,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { AgentCliAliases, AgentCliAliasName } from "../config/agent-cli-aliases.js";
2
+ export type AgentCliAliasBinding = {
3
+ name: AgentCliAliasName;
4
+ target: string;
5
+ executable: string;
6
+ };
7
+ export type PreparedAgentCliAliases = {
8
+ environment: NodeJS.ProcessEnv;
9
+ bindings: readonly AgentCliAliasBinding[];
10
+ directory: string | null;
11
+ };
12
+ /**
13
+ * Prepare private command shims for a newly launched Agent. The caller retains
14
+ * the directory while any descendant can use it; successful preparation does
15
+ * not change process.env or remove another execution's shims.
16
+ */
17
+ export declare const prepareAgentCliAliases: (options: {
18
+ aliases: AgentCliAliases;
19
+ environment: NodeJS.ProcessEnv;
20
+ stateDirectory: string;
21
+ }) => Promise<PreparedAgentCliAliases>;
@@ -0,0 +1,57 @@
1
+ import { constants } from "node:fs";
2
+ import { access, chmod, mkdir, mkdtemp, realpath, rm, stat, writeFile } from "node:fs/promises";
3
+ import path from "node:path";
4
+ import which from "which";
5
+ const shellQuote = (value) => `'${value.replaceAll("'", "'\\''")}'`;
6
+ /**
7
+ * Prepare private command shims for a newly launched Agent. The caller retains
8
+ * the directory while any descendant can use it; successful preparation does
9
+ * not change process.env or remove another execution's shims.
10
+ */
11
+ export const prepareAgentCliAliases = async (options) => {
12
+ const entries = Object.entries(options.aliases);
13
+ if (entries.length === 0)
14
+ return { environment: options.environment, bindings: [], directory: null };
15
+ if (process.platform === "win32")
16
+ throw new Error("agentCliAliases is supported only on macOS and Linux; remove the setting to use the unchanged Agent environment on Windows.");
17
+ if (!path.isAbsolute(options.stateDirectory))
18
+ throw new TypeError("Agent CLI alias state directory must be absolute.");
19
+ if (options.stateDirectory.includes(path.delimiter))
20
+ throw new TypeError("agentCliAliases requires DN_CONFIG_DIR without the PATH delimiter; choose a state directory without colons.");
21
+ const bindings = [];
22
+ // Resolve every target against the original PATH before creating any alias.
23
+ // realpath pins a development entry's symlink to its immutable build snapshot.
24
+ for (const [name, target] of entries) {
25
+ let executable;
26
+ try {
27
+ const candidate = path.isAbsolute(target) ? target : await which(target, { path: options.environment.PATH ?? "", nothrow: false });
28
+ executable = await realpath(candidate);
29
+ if (!(await stat(executable)).isFile())
30
+ throw new Error("Target is not a regular file.");
31
+ await access(executable, constants.X_OK);
32
+ }
33
+ catch (cause) {
34
+ throw new Error(`Cannot resolve agentCliAliases.${name} to an executable; install its target or configure an absolute executable path.`, { cause });
35
+ }
36
+ bindings.push({ name, target, executable });
37
+ }
38
+ const parent = path.join(options.stateDirectory, "agent-cli-aliases");
39
+ await mkdir(parent, { recursive: true, mode: 0o700 });
40
+ const directory = await mkdtemp(path.join(parent, "execution-"));
41
+ try {
42
+ await chmod(directory, 0o700);
43
+ for (const binding of bindings) {
44
+ await writeFile(path.join(directory, binding.name), `#!/bin/sh\nexec ${shellQuote(binding.executable)} "$@"\n`, { flag: "wx", mode: 0o700 });
45
+ }
46
+ }
47
+ catch (cause) {
48
+ await rm(directory, { recursive: true, force: true });
49
+ throw cause;
50
+ }
51
+ return {
52
+ environment: { ...options.environment, DN_CONFIG_DIR: options.stateDirectory, PATH: [directory, options.environment.PATH].filter(value => value !== undefined).join(path.delimiter) },
53
+ bindings,
54
+ directory,
55
+ };
56
+ };
57
+ //# sourceMappingURL=agent-cli-aliases.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-cli-aliases.js","sourceRoot":"","sources":["../../src/cli/agent-cli-aliases.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,E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U,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QAC/I,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACtD,MAAM,KAAK,CAAC;IACd,CAAC;IACD,OAAO;QACL,WAAW,EAAE,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,aAAa,EAAE,OAAO,CAAC,cAAc,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;QACrL,QAAQ;QACR,SAAS;KACV,CAAC;AACJ,CAAC,CAAC"}
@@ -14,6 +14,11 @@ export const runCli = async (args, context, registry = commands) => {
14
14
  context.stdout(`${context.version}\n`);
15
15
  return 0;
16
16
  }
17
+ if (selection.kind === "skill") {
18
+ const { runSkillRead } = await import("../commands/skill/read.js");
19
+ await runSkillRead(context);
20
+ return 0;
21
+ }
17
22
  const registration = registry.find(({ name }) => name === selection.command.name);
18
23
  const command = await registration.load();
19
24
  await command.run(selection.remaining, context);
@@ -1 +1 @@
1
- {"version":3,"file":"application.js","sourceRoot":"","sources":["../../src/cli/application.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,EACzB,IAA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C,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,OAAO,CAAC,IAAI,CAAE,CAAC;QACnF,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,IAAI,EAAE,CAAC;QAC1C,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAChD,OAAO,CAAC,CAAC;IACX,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,UAAU,EAAE,CAAC;YAChC,OAAO,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,QAAQ,KAAK,CAAC,WAAW,eAAe,CAAC,CAAC;YAC9E,OAAO,CAAC,CAAC;QACX,CAAC;QACD,OAAO,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC1C,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC,CAAC"}
@@ -2,4 +2,4 @@ import type { CliContext } from "./context.js";
2
2
  export declare class CliCancelledError extends Error {
3
3
  constructor(message?: string, options?: ErrorOptions);
4
4
  }
5
- export declare const withCliCancellation: <Result>(context: CliContext, action: (signal: AbortSignal) => Promise<Result>, supplied?: AbortSignal, cancellation?: () => Error) => Promise<Result>;
5
+ export declare const withCliCancellation: <Result>(context: Pick<CliContext, "prompt">, action: (signal: AbortSignal) => Promise<Result>, supplied?: AbortSignal, cancellation?: () => Error) => Promise<Result>;
@@ -1 +1 @@
1
- {"version":3,"file":"cancellation.js","sourceRoot":"","sources":["../../src/cli/cancellation.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC1C,YAAY,OAAO,GAAG,sBAAsB,EAAE,OAAsB;QAClE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAED,MAAM,CAAC,M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MAAgD,EAChD,QAAsB,EACtB,YAAY,GAAgB,GAAG,EAAE,CAAC,IAAI,iBAAiB,EAAE,EACxC,EAAE;IACnB,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACzC,MAAM,OAAO,GAAqB,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC3H,MAAM,MAAM,GAAG,GAAS,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC;IAC5D,IAAI,QAAQ,KAAK,SAAS;QAAE,KAAK,MAAM,MAAM,IAAI,OAAO;YAAE,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrF,IAAI,CAAC;QAAC,OAAO,MAAM,MAAM,CAAC,QAAQ,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IAAC,CAAC;YACnD,CAAC;QACP,IAAI,QAAQ,KAAK,SAAS;YAAE,KAAK,MAAM,MAAM,IAAI,OAAO;gBAAE,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACtF,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC;IAC1B,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /** Preserve the native configuration's PATH while keeping opted-in aliases first. */
2
+ export declare const codexAgentCliOverrides: (environment: Readonly<{
3
+ PATH: string;
4
+ DN_CONFIG_DIR?: string;
5
+ }>, response: unknown) => Record<string, string>;