agl 43.3.2 → 43.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 (76) hide show
  1. package/changelog.md +12 -0
  2. package/dist_serve/bundle.js +1377 -1375
  3. package/dist_serve/bundle.js.map +2 -2
  4. package/dist_ts/00_commitinfo_data.js +1 -1
  5. package/dist_ts/aglapi/interfaces.d.ts +5 -0
  6. package/dist_ts/aglapi/interfaces.js +2 -1
  7. package/dist_ts/classes.authstore.js +5 -2
  8. package/dist_ts/classes.claudeharness.js +4 -3
  9. package/dist_ts/classes.codexclientadapter.d.ts +5 -0
  10. package/dist_ts/classes.codexclientadapter.js +12 -6
  11. package/dist_ts/classes.controller.d.ts +22 -5
  12. package/dist_ts/classes.controller.js +149 -61
  13. package/dist_ts/classes.mcpclient.d.ts +2 -2
  14. package/dist_ts/classes.mcpclient.js +14 -9
  15. package/dist_ts/classes.mcptools.d.ts +1 -1
  16. package/dist_ts/classes.mcptools.js +2 -1
  17. package/dist_ts/classes.opencodeclient.js +20 -4
  18. package/dist_ts/driver/functions.driverinstructions.d.ts +1 -1
  19. package/dist_ts/driver/functions.driverinstructions.js +2 -1
  20. package/dist_ts/fleet/classes.deploymodels.d.ts +58 -1
  21. package/dist_ts/fleet/classes.deploymodels.js +121 -2
  22. package/dist_ts/fleet/classes.deploymonitor.d.ts +193 -47
  23. package/dist_ts/fleet/classes.deploymonitor.js +548 -180
  24. package/dist_ts/fleet/classes.gitfacts.d.ts +4 -1
  25. package/dist_ts/fleet/classes.gitfacts.js +13 -10
  26. package/dist_ts/fleet/classes.service.d.ts +2 -0
  27. package/dist_ts/fleet/classes.service.js +6 -3
  28. package/dist_ts/fleet/functions.deployprobes.js +21 -2
  29. package/dist_ts/fleet/functions.deploystatus.d.ts +26 -0
  30. package/dist_ts/fleet/functions.deploystatus.js +33 -0
  31. package/dist_ts/fleet/functions.deployvalidation.d.ts +1 -0
  32. package/dist_ts/fleet/functions.deployvalidation.js +5 -2
  33. package/dist_ts/functions.deploycli.js +3 -2
  34. package/dist_ts/functions.deviceapi.d.ts +7 -6
  35. package/dist_ts/functions.deviceapi.js +13 -5
  36. package/dist_ts/functions.mcpdeploytools.js +3 -1
  37. package/dist_ts/functions.promptreply.d.ts +13 -0
  38. package/dist_ts/functions.promptreply.js +17 -0
  39. package/dist_ts_interfaces/deployments.d.ts +38 -6
  40. package/dist_ts_interfaces/deployments.js +7 -3
  41. package/dist_ts_interfaces/devices.d.ts +2 -1
  42. package/dist_ts_interfaces/devices.js +1 -1
  43. package/dist_ts_interfaces/inbox.d.ts +10 -1
  44. package/dist_ts_interfaces/inbox.js +1 -1
  45. package/dist_ts_interfaces/mcprequests.d.ts +1 -1
  46. package/package.json +1 -1
  47. package/readme.md +29 -11
  48. package/ts/00_commitinfo_data.ts +1 -1
  49. package/ts/aglapi/interfaces.ts +1 -0
  50. package/ts/classes.authstore.ts +4 -1
  51. package/ts/classes.claudeharness.ts +3 -2
  52. package/ts/classes.codexclientadapter.ts +11 -5
  53. package/ts/classes.controller.ts +161 -72
  54. package/ts/classes.mcpclient.ts +14 -5
  55. package/ts/classes.mcptools.ts +1 -0
  56. package/ts/classes.opencodeclient.ts +23 -3
  57. package/ts/driver/functions.driverinstructions.ts +1 -0
  58. package/ts/fleet/classes.deploymodels.ts +113 -1
  59. package/ts/fleet/classes.deploymonitor.ts +565 -179
  60. package/ts/fleet/classes.gitfacts.ts +10 -8
  61. package/ts/fleet/classes.service.ts +7 -1
  62. package/ts/fleet/functions.deployprobes.ts +16 -1
  63. package/ts/fleet/functions.deploystatus.ts +56 -0
  64. package/ts/fleet/functions.deployvalidation.ts +4 -1
  65. package/ts/functions.deploycli.ts +2 -1
  66. package/ts/functions.deviceapi.ts +19 -9
  67. package/ts/functions.mcpdeploytools.ts +2 -0
  68. package/ts/functions.promptreply.ts +20 -0
  69. package/ts_interfaces/deployments.ts +39 -6
  70. package/ts_interfaces/devices.schema.json +1 -1
  71. package/ts_interfaces/devices.ts +2 -1
  72. package/ts_interfaces/inbox.ts +8 -1
  73. package/ts_web/00_commitinfo_data.ts +1 -1
  74. package/ts_web/elements.deployments.ts +20 -4
  75. package/ts_web/elements.harnesscontrollerapp.ts +43 -13
  76. package/ts_web/elements.inbox.ts +3 -3
@@ -3,7 +3,9 @@ import type { ITicketReleasePlan, TTicketColumn, TTicketPriority } from './ticke
3
3
  /**
4
4
  * Deployments (AGL-909): what runs where, observed rather than claimed. A release is the repository's tag `v<version>`;
5
5
  * what a target runs is what its probe answers, recorded as an observation whenever it changes. Everything else (what a
6
- * release holds, how far a target is behind, open bugs on the running version) is computed when it is read.
6
+ * release holds, how far a target is behind, open bugs on the running version) is computed by the controller in the
7
+ * background and stored as its deploy status (AGL-1704), which the views read; what depends on the clock or the busy
8
+ * sessions is applied when it is read.
7
9
  */
8
10
  /**
9
11
  * How a target tells what it runs. `controller` is the AGL controller itself (its package version and start time);
@@ -104,7 +106,7 @@ export interface IFleetDeployObservation {
104
106
  */
105
107
  artifacts: IFleetDeployArtifact[];
106
108
  }
107
- /** What the last probe of a target found; held by the controller, never stored. */
109
+ /** What the last probe of a target found, as the controller's last computation of the deploy status holds it. */
108
110
  export interface IFleetDeployProbeState {
109
111
  state: 'up' | 'down' | 'unknown';
110
112
  checkedAt?: string;
@@ -178,7 +180,7 @@ export interface IFleetDeployBug extends IFleetDeployTicket {
178
180
  /** The first release holding that commit. */
179
181
  fixedIn?: string;
180
182
  }
181
- /** One target as `agl deploy status` and the Deployments view show it, computed when it is read. */
183
+ /** One target as `agl deploy status` and the Deployments view show it, from the stored deploy status. */
182
184
  export interface IFleetDeployTargetStatus {
183
185
  target: IFleetDeployTarget & {
184
186
  builtIn?: true;
@@ -220,11 +222,23 @@ export interface IFleetDeployTargetStatus {
220
222
  /** Its deploy plans whose ticket is not done. */
221
223
  deployPlans: IFleetDeployPlan[];
222
224
  }
225
+ /**
226
+ * The newest computation of the deploy status, when it failed (AGL-1704): when, why in AGL's own words (naming the
227
+ * repository it could not read), and the failure journal reference its cause is kept under.
228
+ */
229
+ export interface IFleetDeployStatusFailure {
230
+ at: string;
231
+ message: string;
232
+ reference: string;
233
+ }
223
234
  export interface IFleetDeployStatus {
235
+ /** When the stored status was computed: at least once per pass, so when the targets were last checked. */
224
236
  checkedAt: string;
225
237
  targets: IFleetDeployTargetStatus[];
226
238
  /** Every maintenance window on a ticket that is not done, scheduled, active or done, the earliest first. */
227
239
  windows: IFleetDeployWindow[];
240
+ /** While the newest computation failed: that failure. The status is the last one computed, from `checkedAt`. */
241
+ failure?: IFleetDeployStatusFailure;
228
242
  }
229
243
  /** A repository's release state, as `agl release status` shows it. */
230
244
  export interface IFleetRepositoryReleaseStatus {
@@ -279,6 +293,19 @@ export interface IFleetDeployTicketPlacement {
279
293
  deployWhen: TFleetDeployCondition;
280
294
  };
281
295
  }
296
+ /** How long `refresh` waits for its check before it answers `refreshing`; the check goes on, and `deployments.changed` tells of it. */
297
+ export declare const fleetDeployRefreshWaitMs = 60000;
298
+ /** How much longer than `fleetDeployRefreshWaitMs` a caller waits for a `refresh` answer, so the controller's own bound answers first. */
299
+ export declare const fleetDeployRefreshClientMarginMs = 15000;
300
+ /**
301
+ * A `refresh` answer: `refreshed` once a full check that started after the request (fetch, probes, computation) ended
302
+ * within `fleetDeployRefreshWaitMs`, `refreshing` while it still runs. `checkedAt` is the stored status's, absent only
303
+ * while none is stored yet.
304
+ */
305
+ export interface IFleetDeployRefreshResult {
306
+ state: 'refreshed' | 'refreshing';
307
+ checkedAt?: string;
308
+ }
282
309
  /** Every request of the deploy views; the browser sends the `controller.deploy.*` ones, `agl deploy` the `agl.mcp.deploy.*` ones. */
283
310
  export interface IFleetDeployOperations {
284
311
  status: {
@@ -315,12 +342,17 @@ export interface IFleetDeployOperations {
315
342
  };
316
343
  response: IFleetDeployTicketPlacement;
317
344
  };
345
+ refresh: {
346
+ request: Record<never, never>;
347
+ response: IFleetDeployRefreshResult;
348
+ };
318
349
  }
319
350
  export type TFleetDeployOperation = keyof IFleetDeployOperations;
320
- export declare const fleetDeployOperations: readonly ["status", "history", "probe", "release", "ticket"];
351
+ export declare const fleetDeployOperations: readonly ["status", "history", "probe", "release", "ticket", "refresh"];
321
352
  /**
322
353
  * The deploy views in the browser. `status` and `history` read; `probe` asks for a probe of one target now and claims
323
- * nothing (a deploy path calls it after a deploy); `release` reads a repository's release state.
354
+ * nothing (a deploy path calls it after a deploy); `release` reads a repository's release state; `refresh` asks for one
355
+ * full check now and waits for it, at most `fleetDeployRefreshWaitMs` (AGL-1704).
324
356
  */
325
357
  export type TControllerDeployRequest<TOperation extends TFleetDeployOperation> = {
326
358
  method: `controller.deploy.${TOperation}`;
@@ -331,7 +363,7 @@ export type TControllerDeployTypedRequest = {
331
363
  [TOperation in TFleetDeployOperation]: TControllerDeployRequest<TOperation>;
332
364
  }[TFleetDeployOperation];
333
365
  /** The same through the controller's private channel, for `agl deploy` and `agl release status`: the local owner capability. */
334
- export declare const controllerMcpDeployMethods: readonly ['agl.mcp.deploy.status', 'agl.mcp.deploy.history', 'agl.mcp.deploy.probe', 'agl.mcp.deploy.release', 'agl.mcp.deploy.ticket'];
366
+ export declare const controllerMcpDeployMethods: readonly ['agl.mcp.deploy.status', 'agl.mcp.deploy.history', 'agl.mcp.deploy.probe', 'agl.mcp.deploy.release', 'agl.mcp.deploy.ticket', 'agl.mcp.deploy.refresh'];
335
367
  export type TControllerMcpDeployMethod = (typeof controllerMcpDeployMethods)[number];
336
368
  export type TControllerMcpDeployRequest<TOperation extends TFleetDeployOperation> = {
337
369
  method: `agl.mcp.deploy.${TOperation}`;
@@ -1,7 +1,11 @@
1
1
  /** A deploy target id: lowercase letters, digits, `.`, `_` and `-`, at most 64. */
2
2
  export const fleetDeployTargetIdPattern = /^[a-z0-9][a-z0-9._-]{0,63}$/u;
3
- export const fleetDeployOperations = ['status', 'history', 'probe', 'release', 'ticket'];
3
+ /** How long `refresh` waits for its check before it answers `refreshing`; the check goes on, and `deployments.changed` tells of it. */
4
+ export const fleetDeployRefreshWaitMs = 60_000;
5
+ /** How much longer than `fleetDeployRefreshWaitMs` a caller waits for a `refresh` answer, so the controller's own bound answers first. */
6
+ export const fleetDeployRefreshClientMarginMs = 15_000;
7
+ export const fleetDeployOperations = ['status', 'history', 'probe', 'release', 'ticket', 'refresh'];
4
8
  /** The same through the controller's private channel, for `agl deploy` and `agl release status`: the local owner capability. */
5
9
  export const controllerMcpDeployMethods = ['agl.mcp.deploy.status', 'agl.mcp.deploy.history', 'agl.mcp.deploy.probe', 'agl.mcp.deploy.release',
6
- 'agl.mcp.deploy.ticket'];
7
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVwbG95bWVudHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c19pbnRlcmZhY2VzL2RlcGxveW1lbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCQSxtRkFBbUY7QUFDbkYsTUFBTSxDQUFDLE1BQU0sMEJBQTBCLEdBQUcsOEJBQThCLENBQUM7QUFtUHpFLE1BQU0sQ0FBQyxNQUFNLHFCQUFxQixHQUFHLENBQUMsUUFBUSxFQUFFLFNBQVMsRUFBRSxPQUFPLEVBQUUsU0FBUyxFQUFFLFFBQVEsQ0FBcUQsQ0FBQztBQWE3SSxnSUFBZ0k7QUFDaEksTUFBTSxDQUFDLE1BQU0sMEJBQTBCLEdBQUcsQ0FBQyx1QkFBdUIsRUFBRSx3QkFBd0IsRUFBRSxzQkFBc0IsRUFBRSx3QkFBd0I7SUFDNUksdUJBQXVCLENBQVUsQ0FBQyJ9
10
+ 'agl.mcp.deploy.ticket', 'agl.mcp.deploy.refresh'];
11
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVwbG95bWVudHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c19pbnRlcmZhY2VzL2RlcGxveW1lbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTJCQSxtRkFBbUY7QUFDbkYsTUFBTSxDQUFDLE1BQU0sMEJBQTBCLEdBQUcsOEJBQThCLENBQUM7QUF1UHpFLHVJQUF1STtBQUN2SSxNQUFNLENBQUMsTUFBTSx3QkFBd0IsR0FBRyxNQUFNLENBQUM7QUFFL0MsMElBQTBJO0FBQzFJLE1BQU0sQ0FBQyxNQUFNLGdDQUFnQyxHQUFHLE1BQU0sQ0FBQztBQXNCdkQsTUFBTSxDQUFDLE1BQU0scUJBQXFCLEdBQUcsQ0FBQyxRQUFRLEVBQUUsU0FBUyxFQUFFLE9BQU8sRUFBRSxTQUFTLEVBQUUsUUFBUSxFQUFFLFNBQVMsQ0FBcUQsQ0FBQztBQWN4SixnSUFBZ0k7QUFDaEksTUFBTSxDQUFDLE1BQU0sMEJBQTBCLEdBQUcsQ0FBQyx1QkFBdUIsRUFBRSx3QkFBd0IsRUFBRSxzQkFBc0IsRUFBRSx3QkFBd0I7SUFDNUksdUJBQXVCLEVBQUUsd0JBQXdCLENBQVUsQ0FBQyJ9
@@ -350,7 +350,8 @@ export type TDeviceInboxWhere = {
350
350
  };
351
351
  /**
352
352
  * How a device answers an item: `session` with `device.permission.reply`, `device.question.reply` or
353
- * `device.elicitation.reply` for the session; `child` with the same replies and the child's `childSessionId`; `ticket`
353
+ * `device.elicitation.reply` for the session; `child`, only ever a permission or a question, with
354
+ * `device.permission.reply` or `device.question.reply` for the session and the child's `childSessionId`; `ticket`
354
355
  * with `device.ticket.answer`; `none` not on a device (the driver's turn, the driver's own prompts, a native wait, an
355
356
  * item whose payload was left out, or a session the feed does not list).
356
357
  */
@@ -98,4 +98,4 @@ export const deviceMethods = [
98
98
  'device.ticket.ask',
99
99
  'device.ticket.move',
100
100
  ];
101
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGV2aWNlcy5qcyIsInNvdXJjZVJvb3Q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152
152
  kind: 'conversation' | 'child' | 'native' | 'driver';
153
153
  }>;
154
+ /**
155
+ * Where an MCP form lives: never a direct child, whose harness (OpenCode) hands AGL no MCP forms, so no child reply
156
+ * answers one (AGL-1701).
157
+ */
158
+ type TElicitationWhere = Extract<TControllerInboxWhere, {
159
+ kind: 'conversation' | 'native' | 'driver';
160
+ }>;
154
161
  export interface IControllerInboxPermissionItem extends IControllerInboxItemBase<'permission', TSessionWhere> {
155
162
  permission?: IControllerPermission;
156
163
  }
157
164
  export interface IControllerInboxQuestionItem extends IControllerInboxItemBase<'question', TSessionWhere> {
158
165
  question?: IControllerQuestion;
159
166
  }
160
- export interface IControllerInboxElicitationItem extends IControllerInboxItemBase<'elicitation', TSessionWhere> {
167
+ export interface IControllerInboxElicitationItem extends IControllerInboxItemBase<'elicitation', TElicitationWhere> {
168
+ /** Never `child`: no child holds an MCP form. */
169
+ answer: Exclude<TControllerInboxAnswer, 'child'>;
161
170
  elicitation?: TControllerElicitation;
162
171
  }
163
172
  /** A wait the harness shows in its own client: AGL holds no request for it, so it is answered there (`answer: 'none'`). */
@@ -98,4 +98,4 @@ export const controllerInboxItemShown = (itemArg, chipArg, queryArg = '') => {
98
98
  const text = controllerInboxSearchText(itemArg);
99
99
  return words.every((wordArg) => text.includes(wordArg));
100
100
  };
101
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5ib3guanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c19pbnRlcmZhY2VzL2luYm94LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWFBOzs7OztHQUtHO0FBRUgsZ0NBQWdDO0FBQ2hDLE1BQU0sQ0FBQyxNQUFNLG9CQUFvQixHQUFHO0lBQ2xDLFlBQVk7SUFDWixVQUFVO0lBQ1YsYUFBYTtJQUNiLGFBQWE7SUFDYixRQUFRO0lBQ1IsV0FBVztJQUNYLFdBQVc7SUFDWCxpQkFBaUI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BSyxDQUFDLE1BQU0sQ0FBQyxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQztJQUNuRSxJQUFJLEtBQUssQ0FBQyxNQUFNLEtBQUssQ0FBQztRQUFFLE9BQU8sSUFBSSxDQUFDO0lBQ3BDLE1BQU0sSUFBSSxHQUFHLHlCQUF5QixDQUFDLE9BQU8sQ0FBQyxDQUFDO0lBQ2hELE9BQU8sS0FBSyxDQUFDLEtBQUssQ0FBQyxDQUFDLE9BQU8sRUFBRSxFQUFFLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDO0FBQzFELENBQUMsQ0FBQyJ9
@@ -18,7 +18,7 @@ export declare const controllerMcpTypedRequestMaximumBodyBytes: number;
18
18
  /** Admits a master configuration document or a harness review with its before and after texts. */
19
19
  export declare const controllerMcpTypedResponseMaximumBytes: number;
20
20
  export declare const controllerMcpToolMaximumOutputBytes: number;
21
- export declare const controllerMcpMethods: readonly ["agl.mcp.controller.status", "agl.mcp.projects.list", "agl.mcp.sessions.list", "agl.mcp.session.read", "agl.mcp.session.send", "agl.mcp.session.scratchpad.read", "agl.mcp.session.scratchpad.update", "agl.mcp.session.message", "agl.mcp.proxy.capacity", "agl.mcp.browser.action", "agl.mcp.project.create", "agl.mcp.model.list", "agl.mcp.session.create", "agl.mcp.session.model.update", "agl.mcp.session.rename", "agl.mcp.session.archive", "agl.mcp.session.abort", "agl.mcp.resource.list", "agl.mcp.resource.create", "agl.mcp.resource.rename", "agl.mcp.resource.attach", "agl.mcp.resource.detach", "agl.mcp.resource.start", "agl.mcp.resource.stop", "agl.mcp.resource.retire", "agl.mcp.workspace.reveal", "agl.mcp.context.resolve", "agl.mcp.job.start", "agl.mcp.job.status", "agl.mcp.job.tail", "agl.mcp.job.wait", "agl.mcp.job.stop", "agl.mcp.job.list", "agl.mcp.controller.settings.get", "agl.mcp.controller.settings.update", "agl.mcp.configuration.state", "agl.mcp.configuration.master.get", "agl.mcp.configuration.master.save", "agl.mcp.configuration.project", "agl.mcp.configuration.review", "agl.mcp.configuration.apply", "agl.mcp.configuration.restore.review", "agl.mcp.configuration.restore", "agl.mcp.configuration.operation.retry", "agl.mcp.configuration.operation.recover", "agl.mcp.configuration.operation.abandon", "agl.mcp.ticket.list", "agl.mcp.ticket.board", "agl.mcp.ticket.search", "agl.mcp.ticket.get", "agl.mcp.ticket.comments", "agl.mcp.ticket.create", "agl.mcp.ticket.update", "agl.mcp.ticket.move", "agl.mcp.ticket.comment", "agl.mcp.ticket.link", "agl.mcp.ticket.unlink", "agl.mcp.ticket.ask", "agl.mcp.ticket.answer", "agl.mcp.fleet.land", "agl.mcp.fleet.release", "agl.mcp.fleet.tooling", "agl.mcp.fleet.audit", "agl.mcp.fleet.reconcile", "agl.mcp.fleet.status", ...("agl.mcp.fleet.worker.adopt" | "agl.mcp.fleet.worker.archive" | "agl.mcp.fleet.worker.get" | "agl.mcp.fleet.worker.job-wait" | "agl.mcp.fleet.worker.list" | "agl.mcp.fleet.worker.move" | "agl.mcp.fleet.worker.native-message" | "agl.mcp.fleet.worker.reconfirm" | "agl.mcp.fleet.worker.refresh" | "agl.mcp.fleet.worker.report" | "agl.mcp.fleet.worker.resolve-lost" | "agl.mcp.fleet.worker.start" | "agl.mcp.fleet.worker.status" | "agl.mcp.fleet.worker.steer" | "agl.mcp.fleet.worker.stop" | "agl.mcp.fleet.worker.watch")[], "agl.mcp.sessionfeed.list", "agl.mcp.sessionfeed.acknowledge", "agl.mcp.deploy.status", "agl.mcp.deploy.history", "agl.mcp.deploy.probe", "agl.mcp.deploy.release", "agl.mcp.deploy.ticket", "agl.mcp.worker.enroll"];
21
+ export declare const controllerMcpMethods: readonly ["agl.mcp.controller.status", "agl.mcp.projects.list", "agl.mcp.sessions.list", "agl.mcp.session.read", "agl.mcp.session.send", "agl.mcp.session.scratchpad.read", "agl.mcp.session.scratchpad.update", "agl.mcp.session.message", "agl.mcp.proxy.capacity", "agl.mcp.browser.action", "agl.mcp.project.create", "agl.mcp.model.list", "agl.mcp.session.create", "agl.mcp.session.model.update", "agl.mcp.session.rename", "agl.mcp.session.archive", "agl.mcp.session.abort", "agl.mcp.resource.list", "agl.mcp.resource.create", "agl.mcp.resource.rename", "agl.mcp.resource.attach", "agl.mcp.resource.detach", "agl.mcp.resource.start", "agl.mcp.resource.stop", "agl.mcp.resource.retire", "agl.mcp.workspace.reveal", "agl.mcp.context.resolve", "agl.mcp.job.start", "agl.mcp.job.status", "agl.mcp.job.tail", "agl.mcp.job.wait", "agl.mcp.job.stop", "agl.mcp.job.list", "agl.mcp.controller.settings.get", "agl.mcp.controller.settings.update", "agl.mcp.configuration.state", "agl.mcp.configuration.master.get", "agl.mcp.configuration.master.save", "agl.mcp.configuration.project", "agl.mcp.configuration.review", "agl.mcp.configuration.apply", "agl.mcp.configuration.restore.review", "agl.mcp.configuration.restore", "agl.mcp.configuration.operation.retry", "agl.mcp.configuration.operation.recover", "agl.mcp.configuration.operation.abandon", "agl.mcp.ticket.list", "agl.mcp.ticket.board", "agl.mcp.ticket.search", "agl.mcp.ticket.get", "agl.mcp.ticket.comments", "agl.mcp.ticket.create", "agl.mcp.ticket.update", "agl.mcp.ticket.move", "agl.mcp.ticket.comment", "agl.mcp.ticket.link", "agl.mcp.ticket.unlink", "agl.mcp.ticket.ask", "agl.mcp.ticket.answer", "agl.mcp.fleet.land", "agl.mcp.fleet.release", "agl.mcp.fleet.tooling", "agl.mcp.fleet.audit", "agl.mcp.fleet.reconcile", "agl.mcp.fleet.status", ...("agl.mcp.fleet.worker.adopt" | "agl.mcp.fleet.worker.archive" | "agl.mcp.fleet.worker.get" | "agl.mcp.fleet.worker.job-wait" | "agl.mcp.fleet.worker.list" | "agl.mcp.fleet.worker.move" | "agl.mcp.fleet.worker.native-message" | "agl.mcp.fleet.worker.reconfirm" | "agl.mcp.fleet.worker.refresh" | "agl.mcp.fleet.worker.report" | "agl.mcp.fleet.worker.resolve-lost" | "agl.mcp.fleet.worker.start" | "agl.mcp.fleet.worker.status" | "agl.mcp.fleet.worker.steer" | "agl.mcp.fleet.worker.stop" | "agl.mcp.fleet.worker.watch")[], "agl.mcp.sessionfeed.list", "agl.mcp.sessionfeed.acknowledge", "agl.mcp.deploy.status", "agl.mcp.deploy.history", "agl.mcp.deploy.probe", "agl.mcp.deploy.release", "agl.mcp.deploy.ticket", "agl.mcp.deploy.refresh", "agl.mcp.worker.enroll"];
22
22
  export type TControllerMcpMethod = (typeof controllerMcpMethods)[number];
23
23
  export type TControllerOperationPrincipal = 'browser' | 'mcp' | 'device';
24
24
  /** JSON kind of one top-level field in a private MCP response. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agl",
3
- "version": "43.3.2",
3
+ "version": "43.4.0",
4
4
  "controllerUpgradeManagementVersion": 2,
5
5
  "controllerManagementProtocolVersion": 1,
6
6
  "controllerGatewaySourcesVersion": 1,
package/readme.md CHANGED
@@ -2038,7 +2038,7 @@ and clears a deadline already set. Known limits:
2038
2038
  - Each warm-up turn makes the controller read the driver session once more, although nothing
2039
2039
  it shows changed.
2040
2040
 
2041
- The driver's tools are the fleet, worker and ticket tools of the MCP server, under the same
2041
+ The driver's tools are the fleet, worker, ticket and deploy tools of the MCP server, under the same
2042
2042
  names and schemas, plus `ticket_question_answer`, the direct report tools, `driver_notes_read`
2043
2043
  and `driver_notes_update`, the shell and file tools
2044
2044
  every Flex session has, and the [AGL API](#agl-api-for-flex-sessions) without its ticket methods. The controller runs each of these tool calls as the driver: actor
@@ -2684,8 +2684,21 @@ first release tag holding that commit by the deploy monitor's release reconciler
2684
2684
  release is known to have published, those a fleet release published and saw at every registry;
2685
2685
  for a tag cut elsewhere it names the repository and version alone. The first such tag moves the
2686
2686
  ticket to Released; the release of each other repository is linked as its tag appears, where the
2687
- ticket stands. A fleet release asks for a pass when it is done. Everything else is computed when
2688
- it is read:
2687
+ ticket stands. A fleet release or landing asks for a pass when it is done. The controller computes
2688
+ the deploy status after every pass and once board changes settle, keeps it in its database and
2689
+ answers `deploy status` and `release status` from it at once, also right after a restart; when its
2690
+ newest computation failed, the status carries that `failure` (when, why and the failure journal
2691
+ reference) beside the last one computed. A release status of one repository, the history and where
2692
+ a ticket runs are read when asked.
2693
+
2694
+ A full check now is `refresh` (`controller.deploy.refresh`, `agl.mcp.deploy.refresh` with the
2695
+ local owner capability, the tool `deploy_refresh`): it asks for a pass, which follows the pass in
2696
+ progress if one runs and which every refresh until it starts shares, waits for it up to 60 s and
2697
+ answers `{ state: 'refreshed' | 'refreshing', checkedAt }` (`refreshing` while the pass runs on).
2698
+ Its end tells the views, also when nothing changed, so they show when the targets were checked; a
2699
+ failed pass is refused as `deploy_unavailable` with the failure's reference. Opening the
2700
+ Deployments view shows the stored status at once and asks for a refresh in the background, and
2701
+ **Probe all** is one refresh. `agl deploy` has no `refresh` verb: its verbs are written by hand.
2689
2702
 
2690
2703
  ```sh
2691
2704
  agl deploy status [TARGET] [--json] # running version and commit, since when, probe, newest tag, what does not run yet, open bugs, deploys, plans, windows
@@ -2694,8 +2707,9 @@ agl deploy probe TARGET [--json] # ask a target now; deploy scripts call
2694
2707
  agl release status [REPO] [--json] # newest tag, release plans, and the landed tickets the next release would ship
2695
2708
  ```
2696
2709
 
2697
- The MCP and driver tools are `deploy_status`, `deploy_history`, `deploy_probe` and
2698
- `release_status`. "Open bugs on the running version" are tickets not closed that were found in
2710
+ The MCP and driver tools are `deploy_status`, `deploy_history`, `deploy_probe`, `deploy_refresh`
2711
+ and `release_status`; `deploy_refresh` changes nothing but asks for work, so it is not read-only
2712
+ (Flex asks the `agl.driver` permission for it once per session). "Open bugs on the running version" are tickets not closed that were found in
2699
2713
  the version a target runs or an earlier one (an `affects` link whose tag the running tag holds;
2700
2714
  by version order where either has no tag on the remote), and whose fix does not run there: no
2701
2715
  fix landed, or the running tag does not hold the commit it landed as. A released ticket is not running yet while
@@ -2743,9 +2757,10 @@ The controller keeps one list of what waits for the owner, and the browser and p
2743
2757
  list: an answer in any of them removes the item everywhere, because every item is read from the component that
2744
2758
  owns it and nothing about the Inbox is stored. It holds, in this order, the oldest first within each kind:
2745
2759
 
2746
- - session prompts: a permission, a question or an MCP form a harness holds for a conversation, for a direct child
2747
- (an OpenCode subagent) of one, for a native session AGL runs a turn in, or for the driver's own session; a
2748
- permission the owner's auto-accept answers waits for nobody and is not listed;
2760
+ - session prompts: a permission, a question or an MCP form a harness holds for a conversation, for a native session
2761
+ AGL runs a turn in, or for the driver's own session, and a permission or a question for a direct child (an
2762
+ OpenCode subagent) of a conversation, which holds no MCP forms; a permission the owner's auto-accept answers waits
2763
+ for nobody and is not listed;
2749
2764
  - a wait a harness shows in its own client (Codex's approval, Claude Code's `requires_action`), listed as
2750
2765
  information only: it names the session and the host, and is answered in that client;
2751
2766
  - the driver's `needs input:` turn: the line and the transcript entry it ends, answered in the Driver view;
@@ -2783,8 +2798,11 @@ from another browser or the phone takes the item out at once (`inbox.changed`).
2783
2798
  shows its `needs input:` line with **Open Driver**; a wait a harness shows in its own client says
2784
2799
  where it waits and that it is answered there; an item listed without its payload is answered in
2785
2800
  its session view or ticket. A question takes one answer: when another client answered first, the
2786
- card keeps what the owner chose and shows the answer that stands until the owner moves on. An
2787
- answer whose outcome is unknown (a lost connection, a time-out, the controller's `outcome_unknown`)
2801
+ card keeps what the owner chose and shows the answer that stands until the owner moves on. A
2802
+ permission or question that was answered elsewhere or went with its turn before the answer arrived
2803
+ is refused as answered or changed meanwhile (`concurrent_change`, nothing was sent): the card says
2804
+ so and the Inbox lists again; in a conversation the composer says so and the conversation is read
2805
+ again. An answer whose outcome is unknown (a lost connection, a time-out, the controller's `outcome_unknown`)
2788
2806
  keeps the card locked with the owner's draft, says so, and is never sent again on its own;
2789
2807
  **Check again** lists the Inbox again (and reads a ticket's question), and an item that still waits
2790
2808
  at its owner says so and takes an answer again; a check that cannot be made (the connection is down
@@ -3827,7 +3845,7 @@ The device API is its own contract, separate from the browser's: `ts_interfaces/
3827
3845
  - `device.directreports.list` lists the active direct reports as the Driver view does, each by its name, with its session as the feed names it, status, projects, ticket, newest `result:` line, open questions and the fleet workers that report to it (name, harness, status, ticket; no directories or profiles), and whether it takes a message. `device.directreport.message` sends one the owner's message as the Driver view does: a fleet worker report is steered through its ticket and answers `fleet` once the steer succeeded (a steer the fleet refused before its dispatch is refused with `direct_report_failed` and the fleet's own text, such as "Worker is archived.", or "The controller operation failed." with the failure journal's reference where a harness's own text failed it; a steer that failed after its dispatch, or whose job does not prove it sent nothing (`errorOutcome` other than `refused`), may have delivered the message and is `outcome_unknown`, "The request may have taken effect. Read again to learn whether it did before sending it again." with the failure journal's reference, which a client never sends again on its own); a Codex thread takes it as the owner's agent message, `steer` into the turn AGL runs or `next-turn`. A turn another Codex client runs is refused with `direct_report_busy` (nothing was sent), a Claude Code session the fleet does not run with `direct_report_failed`, and messages to a report faster than its agent message rate with `rate_limited`. Messages are audited as `session.message` from `Owner` for the device.
3828
3846
  - The Host view is read-only (AGL-824): a device changes nothing on the host (no deploy or deploy probe, account, setting, upgrade or pairing). `device.host.get` answers what runs (`agl`: the AGL release, its start, its public origin, and whether a device reaches it through the gateway AGL keeps its route on, with where that route's sync stands, or through the owner's own reverse proxy; never the gateway's address, the client or the route's target), the device itself as the controller keeps it (`device`: name, model, when it paired and when it last connected; a device neither renames nor unpairs itself), the deploy targets (`deploys`: what each runs and since when, whether its probe answers, its newest release, the released versions it does not run (`undeployed`, newest first), and its planned deploys (`plans`: the ticket, the version, the owner's go and, for one queued into a maintenance window, the window's times); never a probe's address, the owner's notes on how it deploys and what a deploy interrupts, a failed probe's text, a plan's question or who deploys it, and the read runs no probe), the inference proxy's account pools (`pools`: each pool's verdict and room, and its accounts by plan and then the most used first, each only as its plan, state and the usage window it is bound by: no account id, and no order that stands in for one) and the API keys (`apiKeys`: per provider, how many keys are under their monthly spend limit, held at it, without one, or not read, judged by the rule AGL's inference proxy places by; no label, email, id or dollar amount). `deploys`, `pools` and `apiKeys` each answer `ready` or `unavailable` on their own, with the reason (`not_running`, `outdated`, or `failed` with the failure journal's `reference`), and the request still answers the others. `host.changed` (no payload) says when to read it again: the deploy targets, their planned deploys (tickets) or the accounts changed. Usage moves without an event, so a client reads it again when the Host view is opened or refreshed.
3829
3847
  - The shared board on a device is the browser's board (AGL-1637). `device.board.list` answers one column at a time, as the browser shows its cards (the tasks; an epic and a subtask open with `device.ticket.get`), in the column's order, `limit` (1 to 100, default 50) from `offset`, filtered as the browser filters: `text` (1 to 200 characters, in the key, title, description and source words), `project`, `epic` (the epic's own tasks), `assignee` (`{ kind: 'owner' }`, `{ kind: 'unassigned' }` or a session as the feed names it) and an AutoLabel (`openQuestion`, `planned`, `undeployed`). Every column's count under the same filters comes from the same read as the page, with `total`, the projects the board's tickets name, the epics a filter may choose and the board's `revision`: when a later page answers another revision, or `tickets.changed` arrives, a client reads the board again from offset 0. `device.ticket.get` answers a ticket with its description, source words, links and parent, one page of its discussion (comments and questions together in the order they were written, newest page first, at most `limit` of 1 to 50 and 256 KiB, `before` for the next older page), where it runs (`placement`, from the deploy monitor, `unavailable` on its own as a section of `device.host.get` is) and what it plans (`plans`: the release plan, the maintenance window and the deploy plan, with where the window stands and the owner's go while the monitor answers); no history of its other changes, no source attachments, no plan's question and nothing that names who deploys it. People appear by name: the owner as `kind: 'owner'`, never the owner's account, a person's id or a session the feed does not list (the driver's own session included). `device.ticket.comment` (Markdown, at most 64 KiB as the store keeps it), `device.ticket.ask` (text alone, at most 16 KiB, answered with text) and `device.ticket.move` (to the end of a column; "Move to…" stands in for the browser's drag) run the browser board's own function as the owner, audited as `ticket.comment`, `ticket.ask` and `ticket.move` for the device; `device.ticket.answer` answers a question. The controller decides every change: a refusal changes nothing and carries the ticket store's own code (`deviceTicketRefusalCodes`, such as `ticket_review_branch_required` for a move to review without a branch) and its reason. The app then keeps the owner's draft, reads the ticket again and shows the reason; it never sends a refused change again on its own. A change whose outcome AGL cannot tell is refused as `outcome_unknown` and stays fenced: the app reads the ticket again to learn whether it happened before the owner decides, and never sends it again on its own. Creating, editing and assigning tickets stay in the browser.
3830
- - Every refusal of every device method carries one code of `TDeviceRefusalCode` as `error.data.code` and a message to show, whatever the controller refused it with (AGL-1670): the set is closed, and within a major it only grows. The pairing and the connection: `device_unknown` (forget the pairing), `device_pairing_invalid`, `device_pairing_unavailable`, `device_limit`, `device_already_paired`, `device_proof_invalid`, `device_challenge_invalid` and `device_authentication_required`. What the request names is gone: `session_not_found` (list the feed again), `driver_absent`, and the ticket store's `ticket_not_found` and `ticket_question_not_found`. Nothing was done because something else changed meanwhile, so read again, then decide: `concurrent_change`, `ticket_revision_conflict` and `direct_report_busy`. Refused by a rule, with the reason: `session_read_only` (including a session whose model or stopped message the owner resolves in the browser first), `invalid_request`, `direct_report_failed` and the ticket store's other codes (`deviceTicketRefusalCodes`). Limits: `rate_limited`, final as every refusal, and `operation_limit`. The controller: `controller_unavailable` (not ready: starting, stopping, or a harness or the Flex child not running) and `controller_failed` (a fault, always "The controller operation failed."; `error.data.reference` names the failure journal entry the owner's browser shows, and no message to a device carries a raw cause such as a socket path or a spawn error). `outcome_unknown` means the request may have happened: AGL dispatched it, or may have, and cannot tell whether it took effect. A client never resends it on its own; it keeps the owner's text, reads the session, the driver or the ticket again to learn the outcome, and the owner decides.
3848
+ - Every refusal of every device method carries one code of `TDeviceRefusalCode` as `error.data.code` and a message to show, whatever the controller refused it with (AGL-1670): the set is closed, and within a major it only grows. The pairing and the connection: `device_unknown` (forget the pairing), `device_pairing_invalid`, `device_pairing_unavailable`, `device_limit`, `device_already_paired`, `device_proof_invalid`, `device_challenge_invalid` and `device_authentication_required`. What the request names is gone: `session_not_found` (list the feed again), `driver_absent`, and the ticket store's `ticket_not_found` and `ticket_question_not_found`. Nothing was done because something else changed meanwhile, so read again, then decide: `concurrent_change` (among others an answer to a permission or question the session no longer holds, AGL-1687), `ticket_revision_conflict` and `direct_report_busy`. Refused by a rule, with the reason: `session_read_only` (including a session whose model or stopped message the owner resolves in the browser first), `invalid_request`, `direct_report_failed` and the ticket store's other codes (`deviceTicketRefusalCodes`). Limits: `rate_limited`, final as every refusal, and `operation_limit`. The controller: `controller_unavailable` (not ready: starting, stopping, or a harness or the Flex child not running) and `controller_failed` (a fault, always "The controller operation failed."; `error.data.reference` names the failure journal entry the owner's browser shows, and no message to a device carries a raw cause such as a socket path or a spawn error). `outcome_unknown` means the request may have happened: AGL dispatched it, or may have, and cannot tell whether it took effect. A client never resends it on its own; it keeps the owner's text, reads the session, the driver or the ticket again to learn the outcome, and the owner decides.
3831
3849
  - The controller pushes a device an allowlist of events in their own shape: feed changes, a session's change, its streaming text (snapshots and exact deltas), Inbox changes, the driver's changes (`driver.changed` with its status, also when its transcript or prompts changed, never its streaming text), the direct reports' changes (`directreports.changed`, with no payload, also when fleet workers or tickets changed), the host's changes (`host.changed`, with no payload, when the deploy targets or the accounts changed), the board's changes (`tickets.changed`, with no ticket key and with the board's revision when it moved, followed by `directreports.changed` and `host.changed`, since tickets hold the reports' questions and the planned deploys) and a resynchronization request. Every other event, and every event about a session the feed does not list, stays on the controller. A device that falls behind by 256 events or 4 MiB is resynchronized alone: on `sessions.changed` it lists the feed and reads the open session again, an open Driver view included (the driver's own changes may have folded into it).
3832
3850
  - Through the gateway, a device's WebSocket upgrade carries the public origin as `Origin`, like a browser's (Admission).
3833
3851
 
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: 'agl',
6
- version: '43.3.2',
6
+ version: '43.4.0',
7
7
  description: 'Agent Gateway Layer for OpenCode, FlexHarness, and Codex sessions'
8
8
  }
@@ -154,6 +154,7 @@ export const aglApiMethods = {
154
154
  'agl.mcp.deploy.probe': { use: 'excluded', exclusion: 'person', reason: ownerToken },
155
155
  'agl.mcp.deploy.release': { use: 'excluded', exclusion: 'person', reason: ownerToken },
156
156
  'agl.mcp.deploy.ticket': { use: 'excluded', exclusion: 'person', reason: ownerToken },
157
+ 'agl.mcp.deploy.refresh': { use: 'excluded', exclusion: 'person', reason: ownerToken },
157
158
  'agl.mcp.worker.enroll': { use: 'excluded', exclusion: 'transport',
158
159
  reason: 'It enrols the caller credential of a launched worker: the MCP channel itself.' },
159
160
  } as const satisfies Record<TControllerMcpMethod, TAglApiMethodUse>;
@@ -3,7 +3,7 @@ import { DriverModel } from './driver/classes.driverstore.js';
3
3
  import { DirectReportModel } from './driver/classes.directreportstore.js';
4
4
  import { SessionFeedAcknowledgementModel } from './classes.sessionfeedacknowledgements.js';
5
5
  import { HarnessReleaseModel } from './classes.harnessreleases.js';
6
- import { DeployObservationModel } from './fleet/classes.deploymodels.js';
6
+ import { DeployObservationModel, DeployStatusModel } from './fleet/classes.deploymodels.js';
7
7
  import { TicketMigrationMarkerModel } from '../ts_migration/v41_ticketmigrationmarkers.js';
8
8
  import { WorkerCallerBindingModel } from './classes.workercallerbindings.js';
9
9
  import { FleetTicketEffectModel } from './fleet/classes.ticketeffects.js';
@@ -790,6 +790,7 @@ const setAuthStoreModelManager = (
790
790
  plugins.nosqldb.setDefaultManagerForDoc(managerArg, FleetTicketEffectModel);
791
791
  plugins.nosqldb.setDefaultManagerForDoc(managerArg, HarnessReleaseModel);
792
792
  plugins.nosqldb.setDefaultManagerForDoc(managerArg, DeployObservationModel);
793
+ plugins.nosqldb.setDefaultManagerForDoc(managerArg, DeployStatusModel);
793
794
  plugins.nosqldb.setDefaultManagerForDoc(managerArg, TicketMigrationMarkerModel);
794
795
  plugins.nosqldb.setDefaultManagerForDoc(managerArg, WorkerCallerBindingModel);
795
796
  plugins.nosqldb.setDefaultManagerForDoc(managerArg, TicketModel);
@@ -1070,6 +1071,8 @@ export class SmartDataAuthStore implements IAuthStore, IAuthStoreSessionIdentity
1070
1071
  await HarnessReleaseModel.exact.prepare();
1071
1072
  await DeployObservationModel.init();
1072
1073
  await DeployObservationModel.exact.prepare();
1074
+ await DeployStatusModel.init();
1075
+ await DeployStatusModel.exact.prepare();
1073
1076
  await TicketMigrationMarkerModel.init();
1074
1077
  await TicketMigrationMarkerModel.exact.prepare();
1075
1078
  await WorkerCallerBindingModel.init();
@@ -13,6 +13,7 @@ import {
13
13
  } from './classes.claudeprojection.js';
14
14
  import { isClaudeSessionNativeId, type IControllerClaudeSessionDocument } from './classes.claudesessionmodels.js';
15
15
  import { ControllerElicitationReplyError, controllerElicitation, controllerElicitationAnswer } from './functions.elicitation.js';
16
+ import { promptNoLongerPending } from './functions.promptreply.js';
16
17
 
17
18
  /** The SDK calls the harness makes; tests hand in a fake. */
18
19
  export type TClaudeSdk = Pick<typeof plugins.claudeAgentSdk, 'query' | 'getSessionMessages' | 'getSessionInfo' | 'deleteSession'>;
@@ -539,7 +540,7 @@ export class ClaudeHarness {
539
540
 
540
541
  public replyPermission(nativeIdArg: string, idArg: string, replyArg: 'once' | 'reject'): void {
541
542
  const request = this.pending.get(idArg);
542
- if (!request?.permission || request.nativeId !== nativeIdArg) throw new Error('Claude Code approval is no longer pending in this conversation.');
543
+ if (!request?.permission || request.nativeId !== nativeIdArg) throw promptNoLongerPending('permission');
543
544
  this.answer(request, replyArg === 'once'
544
545
  ? { behavior: 'allow', updatedInput: request.input }
545
546
  : { behavior: 'deny', message: 'The user rejected this tool call.' });
@@ -547,7 +548,7 @@ export class ClaudeHarness {
547
548
 
548
549
  public replyQuestion(nativeIdArg: string, idArg: string, answersArg: string[][] | null): void {
549
550
  const request = this.pending.get(idArg);
550
- if (!request?.question || !request.questionTexts || request.nativeId !== nativeIdArg) throw new Error('Claude Code question is no longer pending in this conversation.');
551
+ if (!request?.question || !request.questionTexts || request.nativeId !== nativeIdArg) throw promptNoLongerPending('question');
551
552
  if (answersArg === null) {
552
553
  this.answer(request, { behavior: 'deny', message: 'The user dismissed the question.' });
553
554
  return;
@@ -5,6 +5,7 @@ import { CodexSupervisor } from './classes.codexsupervisor.js';
5
5
  import { codexArray, codexBoundedText, codexNativeWait, codexNonnegativeInteger, codexItemBundle, codexRecord, codexRuntimeId, codexSession, codexSessionId, codexString, codexText, codexThreadId, codexTurnError, codexTurnErrorBundle, codexTurnUsage, codexUsageTotal, isCodexTerminalItemStatus, type ICodexUsageTotal, type TCodexAnswerMeta, type TCodexTerminalTurnStatus } from './classes.codexprojection.js';
6
6
  import { codexPublicThreadId, codexQualifiedIdentity } from './functions.codexidentity.js';
7
7
  import { ControllerElicitationReplyError, controllerElicitation, controllerElicitationAnswer } from './functions.elicitation.js';
8
+ import { promptNoLongerPending } from './functions.promptreply.js';
8
9
  import { maxCodexTurnPartialReplyBytes, maxCodexTurnRecordsPerSession, maxCodexTurnStopAnchors, type ICodexTurnRecord, type ICodexTurnRecordStore, type ICodexTurnStop } from './classes.codexturnstore.js';
9
10
 
10
11
  interface ICodexSessionScope { projectId: string; directory: string; session: IControllerSession; revision: number; statusRevision: number; closedRevision: number }
@@ -1916,29 +1917,34 @@ export class CodexClientAdapter {
1916
1917
  } catch { client.rejectRequest(requestArg.id, -32602, 'The Codex request cannot be handled in this managed AGL scope.'); }
1917
1918
  }
1918
1919
 
1920
+ /**
1921
+ * Answers a pending approval; one this connection no longer holds is refused `promptNoLongerPending`, nothing sent.
1922
+ * `respond` answers false, before it writes anything, only when the connection no longer holds the server request:
1923
+ * Codex resolved it (`serverRequest/resolved`), or the connection closed, which `requireClient` rules out just before.
1924
+ */
1919
1925
  public replyPermission(threadIdArg: string, idArg: string, replyArg: 'once' | 'reject'): void {
1920
1926
  this.scope(threadIdArg);
1921
1927
  const pending = this.pending.get(idArg);
1922
- if (!pending?.permission || pending.request.params.threadId !== threadIdArg) throw new Error('Codex approval is no longer pending in this conversation.');
1928
+ if (!pending?.permission || pending.request.params.threadId !== threadIdArg) throw promptNoLongerPending('permission');
1923
1929
  let result: Record<string, unknown> = { decision: replyArg === 'once' ? 'accept' : 'decline' };
1924
1930
  if (pending.request.method === 'item/permissions/requestApproval') {
1925
1931
  const requested = codexRecord(pending.request.params.permissions);
1926
1932
  result = { scope: 'turn', permissions: replyArg === 'reject' ? {} : Object.fromEntries(['network', 'fileSystem'].filter((key) => requested[key] !== null && requested[key] !== undefined).map((key) => [key, requested[key]])) };
1927
1933
  }
1928
- if (!this.supervisor.requireClient().respond(pending.request.id, result)) throw new Error('Codex approval expired before the reply.');
1934
+ if (!this.supervisor.requireClient().respond(pending.request.id, result)) throw promptNoLongerPending('permission');
1929
1935
  }
1930
1936
 
1931
1937
  public replyQuestion(threadIdArg: string, idArg: string, answersArg: string[][] | null): void {
1932
1938
  this.scope(threadIdArg);
1933
1939
  const pending = this.pending.get(idArg);
1934
- if (!pending?.question || !pending.questionIds || pending.request.params.threadId !== threadIdArg) throw new Error('Codex question is no longer pending in this conversation.');
1940
+ if (!pending?.question || !pending.questionIds || pending.request.params.threadId !== threadIdArg) throw promptNoLongerPending('question');
1935
1941
  if (answersArg === null) {
1936
- if (!this.supervisor.requireClient().respond(pending.request.id, { answers: {} })) throw new Error('Codex question expired before dismissal.');
1942
+ if (!this.supervisor.requireClient().respond(pending.request.id, { answers: {} })) throw promptNoLongerPending('question');
1937
1943
  return;
1938
1944
  }
1939
1945
  if (answersArg.length !== pending.questionIds.length) throw new Error('Codex question answer count does not match.');
1940
1946
  const answers = Object.fromEntries(pending.questionIds.map((id, index) => [id, { answers: answersArg[index] }]));
1941
- if (!this.supervisor.requireClient().respond(pending.request.id, { answers })) throw new Error('Codex question expired before the reply.');
1947
+ if (!this.supervisor.requireClient().respond(pending.request.id, { answers })) throw promptNoLongerPending('question');
1942
1948
  }
1943
1949
 
1944
1950
  /**