agl 43.3.2 → 43.5.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 (110) hide show
  1. package/changelog.md +33 -0
  2. package/dist_serve/bundle.js +2248 -2236
  3. package/dist_serve/bundle.js.map +2 -2
  4. package/dist_serve/bundle.js.third-party-notices.json +29 -29
  5. package/dist_serve/bundle.js.third-party-notices.txt +29 -29
  6. package/dist_ts/00_commitinfo_data.js +1 -1
  7. package/dist_ts/aglapi/interfaces.d.ts +5 -0
  8. package/dist_ts/aglapi/interfaces.js +2 -1
  9. package/dist_ts/classes.authstore.js +5 -2
  10. package/dist_ts/classes.claudeharness.js +4 -3
  11. package/dist_ts/classes.codexclientadapter.d.ts +5 -0
  12. package/dist_ts/classes.codexclientadapter.js +12 -6
  13. package/dist_ts/classes.controller.d.ts +32 -6
  14. package/dist_ts/classes.controller.js +165 -62
  15. package/dist_ts/classes.inferencegateway.js +14 -2
  16. package/dist_ts/classes.inferencerouter.d.ts +9 -1
  17. package/dist_ts/classes.inferencerouter.js +68 -14
  18. package/dist_ts/classes.mcpclient.d.ts +2 -2
  19. package/dist_ts/classes.mcpclient.js +14 -9
  20. package/dist_ts/classes.mcptools.d.ts +1 -1
  21. package/dist_ts/classes.mcptools.js +2 -1
  22. package/dist_ts/classes.opencodeclient.js +20 -4
  23. package/dist_ts/driver/functions.driverinstructions.d.ts +1 -1
  24. package/dist_ts/driver/functions.driverinstructions.js +2 -1
  25. package/dist_ts/fleet/classes.claudeworkers.d.ts +8 -5
  26. package/dist_ts/fleet/classes.claudeworkers.js +13 -8
  27. package/dist_ts/fleet/classes.deploymodels.d.ts +58 -1
  28. package/dist_ts/fleet/classes.deploymodels.js +121 -2
  29. package/dist_ts/fleet/classes.deploymonitor.d.ts +193 -47
  30. package/dist_ts/fleet/classes.deploymonitor.js +548 -180
  31. package/dist_ts/fleet/classes.gitfacts.d.ts +4 -1
  32. package/dist_ts/fleet/classes.gitfacts.js +13 -10
  33. package/dist_ts/fleet/classes.service.d.ts +2 -0
  34. package/dist_ts/fleet/classes.service.js +6 -3
  35. package/dist_ts/fleet/functions.deployprobes.js +21 -2
  36. package/dist_ts/fleet/functions.deploystatus.d.ts +26 -0
  37. package/dist_ts/fleet/functions.deploystatus.js +33 -0
  38. package/dist_ts/fleet/functions.deployvalidation.d.ts +1 -0
  39. package/dist_ts/fleet/functions.deployvalidation.js +5 -2
  40. package/dist_ts/functions.claudecoderelease.d.ts +1 -1
  41. package/dist_ts/functions.claudecoderelease.js +1 -1
  42. package/dist_ts/functions.deploycli.js +3 -2
  43. package/dist_ts/functions.deviceapi.d.ts +7 -6
  44. package/dist_ts/functions.deviceapi.js +13 -5
  45. package/dist_ts/functions.inferencecli.js +10 -2
  46. package/dist_ts/functions.inferencelaunch.d.ts +19 -8
  47. package/dist_ts/functions.inferencelaunch.js +23 -12
  48. package/dist_ts/functions.mcpdeploytools.js +3 -1
  49. package/dist_ts/functions.promptreply.d.ts +13 -0
  50. package/dist_ts/functions.promptreply.js +17 -0
  51. package/dist_ts/functions.proxyharnessconfig.d.ts +18 -0
  52. package/dist_ts/functions.proxyharnessconfig.js +30 -1
  53. package/dist_ts_authswitch/authority-renewal.d.ts +12 -3
  54. package/dist_ts_authswitch/authority-renewal.js +14 -5
  55. package/dist_ts_authswitch/classes.claudenative.d.ts +8 -8
  56. package/dist_ts_authswitch/classes.claudenative.js +13 -13
  57. package/dist_ts_interfaces/deployments.d.ts +38 -6
  58. package/dist_ts_interfaces/deployments.js +7 -3
  59. package/dist_ts_interfaces/devices.d.ts +2 -1
  60. package/dist_ts_interfaces/devices.js +1 -1
  61. package/dist_ts_interfaces/inbox.d.ts +10 -1
  62. package/dist_ts_interfaces/inbox.js +1 -1
  63. package/dist_ts_interfaces/mcprequests.d.ts +1 -1
  64. package/dist_ts_interfaces/requests.accounts.d.ts +5 -0
  65. package/dist_ts_interfaces/requests.accounts.js +3 -1
  66. package/docs/authswitch.md +5 -4
  67. package/package.json +2 -2
  68. package/readme.md +49 -21
  69. package/ts/00_commitinfo_data.ts +1 -1
  70. package/ts/aglapi/interfaces.ts +1 -0
  71. package/ts/classes.authstore.ts +4 -1
  72. package/ts/classes.claudeharness.ts +3 -2
  73. package/ts/classes.codexclientadapter.ts +11 -5
  74. package/ts/classes.controller.ts +177 -73
  75. package/ts/classes.inferencegateway.ts +15 -1
  76. package/ts/classes.inferencerouter.ts +72 -13
  77. package/ts/classes.mcpclient.ts +14 -5
  78. package/ts/classes.mcptools.ts +1 -0
  79. package/ts/classes.opencodeclient.ts +23 -3
  80. package/ts/driver/functions.driverinstructions.ts +1 -0
  81. package/ts/fleet/classes.claudeworkers.ts +12 -7
  82. package/ts/fleet/classes.deploymodels.ts +113 -1
  83. package/ts/fleet/classes.deploymonitor.ts +565 -179
  84. package/ts/fleet/classes.gitfacts.ts +10 -8
  85. package/ts/fleet/classes.service.ts +7 -1
  86. package/ts/fleet/functions.deployprobes.ts +16 -1
  87. package/ts/fleet/functions.deploystatus.ts +56 -0
  88. package/ts/fleet/functions.deployvalidation.ts +4 -1
  89. package/ts/functions.claudecoderelease.ts +1 -1
  90. package/ts/functions.deploycli.ts +2 -1
  91. package/ts/functions.deviceapi.ts +19 -9
  92. package/ts/functions.inferencecli.ts +7 -1
  93. package/ts/functions.inferencelaunch.ts +35 -14
  94. package/ts/functions.mcpdeploytools.ts +2 -0
  95. package/ts/functions.promptreply.ts +20 -0
  96. package/ts/functions.proxyharnessconfig.ts +32 -0
  97. package/ts_authswitch/authority-renewal.ts +14 -4
  98. package/ts_authswitch/classes.claudenative.ts +12 -12
  99. package/ts_authswitch/native-contracts.md +250 -28
  100. package/ts_interfaces/deployments.ts +39 -6
  101. package/ts_interfaces/devices.schema.json +1 -1
  102. package/ts_interfaces/devices.ts +2 -1
  103. package/ts_interfaces/inbox.ts +8 -1
  104. package/ts_interfaces/requests.accounts.ts +2 -0
  105. package/ts_web/00_commitinfo_data.ts +1 -1
  106. package/ts_web/classes.accountsreadmodel.ts +19 -7
  107. package/ts_web/elements.accounts.ts +31 -18
  108. package/ts_web/elements.deployments.ts +20 -4
  109. package/ts_web/elements.harnesscontrollerapp.ts +43 -13
  110. package/ts_web/elements.inbox.ts +3 -3
@@ -32,6 +32,7 @@ import {
32
32
  maxUsageReason,
33
33
  recheckNotice,
34
34
  renewalFact,
35
+ renewalPickerBounds,
35
36
  renewalReason,
36
37
  renameReason,
37
38
  servicePanel,
@@ -139,8 +140,9 @@ const apiKeyProviderName = (providerIdArg: interfaces.TControllerApiKeyProvider)
139
140
  );
140
141
 
141
142
  /** What a renewal does, under its field. */
142
- const renewalDescription = 'Any date and time the subscription renewed or renews; it renews monthly from there. Usage a'
143
- + ' window would still hold at the next renewal is used first. Whether Claude resets usage at a renewal is not known.';
143
+ const renewalDescription = 'Any date and time the subscription renewed or renews, in your time zone; it renews monthly'
144
+ + ' from there. Usage a window would still hold at the next renewal is used first. Whether Claude resets usage at a'
145
+ + ' renewal is not known.';
144
146
 
145
147
  /** What a usage threshold does, under its field. */
146
148
  const maxUsageDescription = 'At this share of any usage window AGL places no new work on the account and moves its'
@@ -274,9 +276,13 @@ export class AglAccounts extends plugins.deesElement.DeesElement {
274
276
  @plugins.deesElement.state()
275
277
  private accessor maxUsageDraft: string | null = null;
276
278
 
277
- /** A Claude sign-in's renewal as the open page's field holds it while edited; `null` while it shows the saved one. */
279
+ /**
280
+ * A Claude sign-in's renewal as the open page's date picker holds it while edited: its value, the moment in UTC or
281
+ * `''` while it holds none, and what the picker says is wrong with its text, `''` while it says nothing. `null` while
282
+ * the picker shows the saved renewal unedited.
283
+ */
278
284
  @plugins.deesElement.state()
279
- private accessor renewalDraft: string | null = null;
285
+ private accessor renewalDraft: { value: string; fieldMessage: string } | null = null;
280
286
 
281
287
  /** A key's spend limit, in dollars, as the open page's field holds it while edited; `null` while it shows the saved one. */
282
288
  @plugins.deesElement.state()
@@ -579,6 +585,8 @@ export class AglAccounts extends plugins.deesElement.DeesElement {
579
585
  .statusText { font-size: var(--dees-font-footnote-size); line-height: 1.45; }
580
586
  .inline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--dees-spacing-sm); }
581
587
  .inline dees-input-text { width: 96px; }
588
+ /* Room for a date, a time and the picker's clear and calendar marks; a narrow column wraps the actions below. */
589
+ .inline dees-input-datepicker { width: 14rem; max-width: 100%; }
582
590
 
583
591
  .code {
584
592
  font-family: var(--dees-font-family-mono, monospace);
@@ -999,15 +1007,15 @@ export class AglAccounts extends plugins.deesElement.DeesElement {
999
1007
  }
1000
1008
 
1001
1009
  /**
1002
- * Sets a Claude sign-in's renewal from the field, or clears it with `null`. The field is read here, in the page's own
1003
- * time zone, and sent as its UTC instant, so the accounts service never reads a local time in its own zone.
1010
+ * Sets a Claude sign-in's renewal to the moment its date picker holds, or clears it with `null`. The picker takes the
1011
+ * date and time in the page's own time zone and holds their instant in UTC, so the accounts service never reads a
1012
+ * local time in its own zone.
1004
1013
  */
1005
- private async setRenewal(rowArg: IAccountRow, draftArg: string | null): Promise<void> {
1006
- const renewsAt = draftArg === null ? null : new Date(Date.parse(draftArg.trim())).toISOString();
1014
+ private async setRenewal(rowArg: IAccountRow, renewsAtArg: string | null): Promise<void> {
1007
1015
  await this.runAction(`renewal:${rowArg.accountId}`, async () => {
1008
1016
  const { answer } = await this.client!.fire<interfaces.IReq_ControllerAccountsRenewal>(
1009
1017
  'controller.accounts.renewal',
1010
- { accountId: rowArg.accountId, expectedRevision: rowArg.revision, renewsAt },
1018
+ { accountId: rowArg.accountId, expectedRevision: rowArg.revision, renewsAt: renewsAtArg },
1011
1019
  { maxRetries: 0 },
1012
1020
  );
1013
1021
  this.notice = answerNotice(answer);
@@ -1609,12 +1617,13 @@ export class AglAccounts extends plugins.deesElement.DeesElement {
1609
1617
  <div class="itemText">Not set. Set the date and time the subscription renews each month, and AGL uses first
1610
1618
  the usage that would still be left at the renewal.</div>
1611
1619
  </div>
1612
- ${this.slots([slotArg], () => { this.renewalDraft = ''; }, () => 'Set the renewal…')}
1620
+ ${this.slots([slotArg], () => { this.renewalDraft = { value: '', fieldMessage: '' }; },
1621
+ () => 'Set the renewal…')}
1613
1622
  </div>
1614
1623
  `;
1615
1624
  }
1616
- const draft = this.renewalDraft ?? saved!;
1617
- const reason = slotArg.reason || renewalReason(draft, saved);
1625
+ const draft = this.renewalDraft ?? { value: saved!, fieldMessage: '' };
1626
+ const reason = slotArg.reason || renewalReason(draft.value, draft.fieldMessage, saved);
1618
1627
  return plugins.deesElement.html`
1619
1628
  <div class="item stacked" data-renewal>
1620
1629
  <div>
@@ -1623,18 +1632,22 @@ export class AglAccounts extends plugins.deesElement.DeesElement {
1623
1632
  : ` Next: ${renewalFact(saved, Date.now())}.`}</div>
1624
1633
  </div>
1625
1634
  <div class="inline">
1626
- <dees-input-text .label=${'Renewal (date and time)'} .labelPosition=${'none'} .value=${draft}
1627
- @input=${(eventArg: Event) => {
1628
- const target = eventArg.currentTarget as HTMLElement & { value?: string };
1629
- this.renewalDraft = target.value ?? '';
1630
- }}></dees-input-text>
1635
+ <dees-input-datepicker .label=${'Renewal (date and time)'} .labelPosition=${'none'} .enableTime=${true}
1636
+ .minDate=${renewalPickerBounds.minDate} .maxDate=${renewalPickerBounds.maxDate} .value=${draft.value}
1637
+ @input=${(eventArg: CustomEvent<{ value: string }>) => {
1638
+ this.renewalDraft = { value: eventArg.detail.value, fieldMessage: this.renewalDraft?.fieldMessage ?? '' };
1639
+ }}
1640
+ @validation-change=${(eventArg: CustomEvent<{ valid: boolean; message: string }>) => {
1641
+ this.renewalDraft = { value: this.renewalDraft?.value ?? draft.value,
1642
+ fieldMessage: eventArg.detail.message };
1643
+ }}></dees-input-datepicker>
1631
1644
  <div>${this.slots(
1632
1645
  [
1633
1646
  { id: 'renewal', label: 'Save', icon: 'lucide:Check', reason },
1634
1647
  ...(saved === null ? []
1635
1648
  : [{ id: 'clearRenewal' as const, label: 'No renewal', icon: 'lucide:X', reason: slotArg.reason }]),
1636
1649
  ],
1637
- (runArg) => void this.setRenewal(rowArg, runArg.id === 'clearRenewal' ? null : draft),
1650
+ (runArg) => void this.setRenewal(rowArg, runArg.id === 'clearRenewal' ? null : draft.value),
1638
1651
  )}</div>
1639
1652
  ${saved === null
1640
1653
  ? plugins.deesElement.html`<dees-button size="sm" type="ghost" text="Keep it unset" data-action="keepRenewal"
@@ -12,15 +12,22 @@ export interface IDeploymentsSender {
12
12
  fire<TRequest extends interfaces.TControllerRequest>(
13
13
  methodArg: TRequest['method'],
14
14
  requestArg: TRequest['request'],
15
- optionsArg?: { abortSignal?: AbortSignal },
15
+ optionsArg?: { abortSignal?: AbortSignal; timeoutMs?: number; maxRetries?: number },
16
16
  ): Promise<TRequest['response']>;
17
17
  }
18
18
 
19
19
  const deploy = <TOperation extends interfaces.TFleetDeployOperation>(senderArg: IDeploymentsSender, operationArg: TOperation,
20
- requestArg: interfaces.IFleetDeployOperations[TOperation]['request']): Promise<interfaces.IFleetDeployOperations[TOperation]['response']> => (
21
- senderArg.fire<interfaces.TControllerDeployTypedRequest>(`controller.deploy.${operationArg}`, requestArg as never) as Promise<
20
+ requestArg: interfaces.IFleetDeployOperations[TOperation]['request'], optionsArg?: { timeoutMs?: number; maxRetries?: number },
21
+ ): Promise<interfaces.IFleetDeployOperations[TOperation]['response']> => (
22
+ senderArg.fire<interfaces.TControllerDeployTypedRequest>(`controller.deploy.${operationArg}`, requestArg as never, optionsArg) as Promise<
22
23
  interfaces.IFleetDeployOperations[TOperation]['response']>
23
24
  );
25
+ /** A full check now (`controller.deploy.refresh`): the controller answers within `fleetDeployRefreshWaitMs`, so the request waits longer, and it is never resent. */
26
+ const refreshDeployments = (senderArg: IDeploymentsSender): Promise<interfaces.IFleetDeployRefreshResult> => (
27
+ deploy(senderArg, 'refresh', {}, {
28
+ timeoutMs: interfaces.fleetDeployRefreshWaitMs + interfaces.fleetDeployRefreshClientMarginMs, maxRetries: 0,
29
+ })
30
+ );
24
31
  const ticket = <TMethod extends interfaces.TTicketOperation>(senderArg: IDeploymentsSender, operationArg: TMethod,
25
32
  requestArg: interfaces.TTicketRequest<TMethod>): Promise<interfaces.TTicketResponse<TMethod>> => (
26
33
  senderArg.fire<interfaces.TControllerTicketTypedRequest>(`controller.ticket.${operationArg}`, requestArg as never) as Promise<interfaces.TTicketResponse<TMethod>>
@@ -124,9 +131,15 @@ export class AglDeployments extends plugins.deesElement.DeesElement {
124
131
  `,
125
132
  ];
126
133
 
134
+ /**
135
+ * Opening the view shows the stored status at once and asks the controller for a full check in the background
136
+ * (AGL-1704); its end comes back as `deployments.changed`, which reads again. A failed check shows as the status's
137
+ * failure, so the request's own answer is not waited for.
138
+ */
127
139
  public async connectedCallback(): Promise<void> {
128
140
  await super.connectedCallback();
129
141
  void this.refresh();
142
+ if (this.sender) void refreshDeployments(this.sender).catch(() => undefined);
130
143
  }
131
144
 
132
145
  public async disconnectedCallback(): Promise<void> {
@@ -184,6 +197,8 @@ export class AglDeployments extends plugins.deesElement.DeesElement {
184
197
  </div>
185
198
  </div>
186
199
  ${this.error ? html`<p class="error" role="alert">${this.error}</p>` : ''}
200
+ ${status?.failure ? html`<p class="checkFailed error" role="status">The last check failed at ${deployClock(status.failure.at)}: ${status.failure.message}
201
+ What is shown is from ${deployClock(status.checkedAt)}. (ref ${status.failure.reference})</p>` : ''}
187
202
  <dees-statsgrid density="compact" .minTileWidth=${220} .tiles=${summary ? this.tiles(summary) : []}></dees-statsgrid>
188
203
  ${this.renderTargets(summary)}
189
204
  <div class="lower">
@@ -372,12 +387,13 @@ export class AglDeployments extends plugins.deesElement.DeesElement {
372
387
  this.dispatchEvent(new CustomEvent('deploy-open-ticket', { detail: { key: keyArg }, bubbles: true, composed: true }));
373
388
  }
374
389
 
390
+ /** "Probe all": one full check (`refresh`), waited for as long as the controller waits; then the view reads again. */
375
391
  private async probeAll(): Promise<void> {
376
392
  const sender = this.sender;
377
393
  if (!sender || !this.status) return;
378
394
  this.probing = true;
379
395
  try {
380
- for (const target of this.status.targets) await deploy(sender, 'probe', { targetId: target.target.id });
396
+ await refreshDeployments(sender);
381
397
  } catch (errorArg) {
382
398
  this.error = errorArg instanceof Error ? errorArg.message : String(errorArg);
383
399
  } finally {
@@ -1308,6 +1308,13 @@ const concatBytes = (chunksArg: readonly Uint8Array[]): Uint8Array => {
1308
1308
  const isElicitationRefusal = (errorArg: unknown): boolean => errorArg instanceof plugins.typedrequest.TypedResponseError
1309
1309
  && (errorArg.errorData?.code === 'invalid_request' || errorArg.errorData?.code === 'not_found');
1310
1310
 
1311
+ /**
1312
+ * The controller refused an answer because the permission or question was answered or changed meanwhile: nothing was
1313
+ * sent, and the conversation is read again.
1314
+ */
1315
+ const isConcurrentChange = (errorArg: unknown): boolean => errorArg instanceof plugins.typedrequest.TypedResponseError
1316
+ && errorArg.errorData?.code === 'concurrent_change';
1317
+
1311
1318
  const errorMessage = (errorArg: unknown): string => {
1312
1319
  if (errorArg instanceof Error && errorArg.message) {
1313
1320
  return errorArg.message;
@@ -5178,10 +5185,24 @@ export class HarnessControllerApp extends plugins.deesElement.DeesElement {
5178
5185
  }
5179
5186
  }
5180
5187
 
5188
+ /**
5189
+ * Loads the workspace after sign-in. Only the projects gate the conversations, terminals and
5190
+ * resources, which read the selected project; every other read runs beside them and holds
5191
+ * nothing back. It resolves once every read has settled.
5192
+ */
5181
5193
  private async loadWorkspaceData(): Promise<void> {
5182
5194
  this.scheduleSystemMetricsRefresh(0);
5183
5195
  await Promise.all([
5184
- this.refreshProjects(),
5196
+ this.refreshProjects().then(async () => {
5197
+ void this.retryStaleDraftSessionCleanup();
5198
+ void this.refreshModelCatalog();
5199
+ await this.refreshSessions();
5200
+ // A link to the Deployments view, as the board's "Open in Deployments" opens in a new tab, shows it once.
5201
+ if (globalThis.location?.hash === deploymentsHref) {
5202
+ globalThis.history.replaceState(globalThis.history.state, '', `${globalThis.location.pathname}${globalThis.location.search}`);
5203
+ await this.openDeployments();
5204
+ }
5205
+ }),
5185
5206
  this.refreshProviderManagement(),
5186
5207
  this.reconcileControllerStatus(),
5187
5208
  this.refreshDriverStatus(),
@@ -5190,14 +5211,6 @@ export class HarnessControllerApp extends plugins.deesElement.DeesElement {
5190
5211
  this.refreshSessionFeed(),
5191
5212
  this.inboxFeed.refresh(),
5192
5213
  ]);
5193
- void this.retryStaleDraftSessionCleanup();
5194
- void this.refreshModelCatalog();
5195
- await this.refreshSessions();
5196
- // A link to the Deployments view, as the board's "Open in Deployments" opens in a new tab, shows it once.
5197
- if (globalThis.location?.hash === deploymentsHref) {
5198
- globalThis.history.replaceState(globalThis.history.state, '', `${globalThis.location.pathname}${globalThis.location.search}`);
5199
- await this.openDeployments();
5200
- }
5201
5214
  }
5202
5215
 
5203
5216
  private scheduleSystemMetricsRefresh(delayMsArg: number): void {
@@ -13779,7 +13792,14 @@ ${entry.detail.stack}`}</pre>`}
13779
13792
  }
13780
13793
  } catch (error) {
13781
13794
  if (this.isCurrentMutation(mutationId, generation, sessionId)) {
13782
- this.reportWorkspaceError('Answer the permission request', error);
13795
+ if (isConcurrentChange(error) && sessionId) {
13796
+ // Nothing was sent: the card drops the answer it showed and the conversation is read again.
13797
+ this.answeredPermissionCards.delete(controllerRuntimeIdToUiKey(requestIdArg));
13798
+ this.noteComposer(errorMessage(error));
13799
+ await this.loadSessionDetail(sessionId);
13800
+ } else {
13801
+ this.reportWorkspaceError('Answer the permission request', error);
13802
+ }
13783
13803
  }
13784
13804
  } finally {
13785
13805
  this.finishMutation(mutationId);
@@ -14720,7 +14740,17 @@ ${entry.detail.stack}`}</pre>`}
14720
14740
  }
14721
14741
  } catch (error) {
14722
14742
  if (this.isCurrentMutation(mutationId, generation, sessionId)) {
14723
- this.reportWorkspaceError('Answer the question', error);
14743
+ if (isConcurrentChange(error) && sessionId) {
14744
+ // Nothing was sent: the cards drop the answers they showed and the conversation is read again.
14745
+ const requestKey = controllerRuntimeIdToUiKey(requestIdArg);
14746
+ answersArg.forEach((_answersArg, indexArg) => {
14747
+ this.answeredQuestionCards.delete(questionCardId(requestKey, answersArg.length, indexArg));
14748
+ });
14749
+ this.noteComposer(errorMessage(error));
14750
+ await this.loadSessionDetail(sessionId);
14751
+ } else {
14752
+ this.reportWorkspaceError('Answer the question', error);
14753
+ }
14724
14754
  }
14725
14755
  } finally {
14726
14756
  this.finishMutation(mutationId);
@@ -16992,10 +17022,10 @@ ${entry.detail.stack}`}</pre>`}
16992
17022
  }
16993
17023
  return;
16994
17024
  }
16995
- // Tickets change only an open board and the open questions of the direct reports the driver lists.
17025
+ // Tickets change only an open board and the open questions of the direct reports the driver lists. What a board
17026
+ // change does to the Deployments view the controller computes, and tells with `deployments.changed` (AGL-1704).
16996
17027
  if (eventArg.type === 'tickets.changed') {
16997
17028
  void this.ticketBoard()?.refresh();
16998
- void this.deploymentsView()?.refresh();
16999
17029
  if (this.driverShown()) void this.refreshDirectReports();
17000
17030
  return;
17001
17031
  }
@@ -49,7 +49,7 @@ const answeredHere = (itemArg: TInboxItem): boolean => {
49
49
  switch (itemArg.kind) {
50
50
  case 'permission': return itemArg.permission !== undefined;
51
51
  case 'question': return itemArg.question !== undefined;
52
- case 'elicitation': return itemArg.elicitation !== undefined && itemArg.answer !== 'child';
52
+ case 'elicitation': return itemArg.elicitation !== undefined;
53
53
  case 'ticket_question': case 'deploy_go': case 'window_go': return itemArg.question !== undefined;
54
54
  case 'native_wait': case 'driver': return false;
55
55
  }
@@ -607,8 +607,6 @@ export class AglInbox extends plugins.deesElement.DeesElement {
607
607
  await senderArg.fire<interfaces.IReq_ControllerNativeSessionElicitationReply>('controller.nativesession.elicitation.reply',
608
608
  { session: where.session, requestId: elicitation.id, reply });
609
609
  return;
610
- case 'child':
611
- throw new InboxNotSentError('A subagent\'s MCP form is answered in its session view, so nothing was sent.');
612
610
  }
613
611
  });
614
612
  }
@@ -691,6 +689,8 @@ export class AglInbox extends plugins.deesElement.DeesElement {
691
689
  return;
692
690
  }
693
691
  this.refuse(stateArg, failureArg.message);
692
+ // Answered or changed meanwhile: nothing was done, and the Inbox reads again.
693
+ if (failureArg.code === 'concurrent_change') void this.feed!.refresh();
694
694
  }
695
695
 
696
696
  /** A refusal: nothing was stored, and the card takes an answer again with the owner's draft. */