agl 43.0.4 → 43.1.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 (165) hide show
  1. package/changelog.md +25 -0
  2. package/dist_serve/bundle.js +5186 -4683
  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_serve/third-party-notices.md +1 -1
  7. package/dist_ts/00_commitinfo_data.js +1 -1
  8. package/dist_ts/aglapi/aglapisurface.document.js +475 -4
  9. package/dist_ts/aglapi/interfaces.d.ts +10 -0
  10. package/dist_ts/aglapi/interfaces.js +3 -1
  11. package/dist_ts/classes.claudeharness.d.ts +14 -5
  12. package/dist_ts/classes.claudeharness.js +62 -2
  13. package/dist_ts/classes.codexclientadapter.d.ts +7 -5
  14. package/dist_ts/classes.codexclientadapter.js +38 -3
  15. package/dist_ts/classes.controller.d.ts +9 -2
  16. package/dist_ts/classes.controller.js +116 -24
  17. package/dist_ts/classes.flexservice.d.ts +6 -7
  18. package/dist_ts/classes.flexservice.js +12 -45
  19. package/dist_ts/classes.flexsupervisor.d.ts +37 -3
  20. package/dist_ts/classes.flexsupervisor.js +164 -37
  21. package/dist_ts/classes.inferencegateway.d.ts +8 -5
  22. package/dist_ts/classes.inferencegateway.js +62 -19
  23. package/dist_ts/classes.inferencespend.d.ts +9 -3
  24. package/dist_ts/classes.inferencespend.js +44 -16
  25. package/dist_ts/classes.mcpclient.d.ts +6 -4
  26. package/dist_ts/classes.mcpclient.js +6 -2
  27. package/dist_ts/classes.mcpcontrollerhost.js +5 -1
  28. package/dist_ts/classes.mcptools.d.ts +1 -1
  29. package/dist_ts/classes.mcptools.js +17 -4
  30. package/dist_ts/classes.opencodeclient.js +3 -1
  31. package/dist_ts/classes.proxycontrol.d.ts +22 -11
  32. package/dist_ts/classes.proxycontrol.js +6 -3
  33. package/dist_ts/classes.proxycontrolclient.d.ts +6 -5
  34. package/dist_ts/classes.proxycontrolclient.js +8 -6
  35. package/dist_ts/classes.proxydaemon.d.ts +8 -6
  36. package/dist_ts/classes.proxydaemon.js +35 -21
  37. package/dist_ts/classes.proxyleaseholder.d.ts +12 -4
  38. package/dist_ts/classes.proxyleaseholder.js +39 -9
  39. package/dist_ts/classes.proxystore.d.ts +4 -3
  40. package/dist_ts/classes.proxystore.js +17 -7
  41. package/dist_ts/classes.sessionfeed.d.ts +1 -1
  42. package/dist_ts/classes.validation.d.ts +7 -0
  43. package/dist_ts/classes.validation.js +49 -2
  44. package/dist_ts/driver/functions.drivertools.js +2 -2
  45. package/dist_ts/fleet/classes.codexworkers.d.ts +4 -11
  46. package/dist_ts/fleet/classes.codexworkers.js +6 -3
  47. package/dist_ts/fleet/classes.workers.d.ts +25 -13
  48. package/dist_ts/fleet/classes.workers.js +105 -9
  49. package/dist_ts/fleet/functions.workervalidation.d.ts +26 -1
  50. package/dist_ts/fleet/functions.workervalidation.js +40 -11
  51. package/dist_ts/fleet/interfaces.workers.d.ts +17 -11
  52. package/dist_ts/fleet/interfaces.workers.js +10 -1
  53. package/dist_ts/flexharness.child.js +9 -4
  54. package/dist_ts/functions.confinedrelay.d.ts +21 -0
  55. package/dist_ts/functions.confinedrelay.js +65 -0
  56. package/dist_ts/functions.deviceapi.d.ts +4 -2
  57. package/dist_ts/functions.deviceapi.js +20 -2
  58. package/dist_ts/functions.elicitation.d.ts +49 -0
  59. package/dist_ts/functions.elicitation.js +418 -0
  60. package/dist_ts/functions.flexchildshutdown.d.ts +7 -0
  61. package/dist_ts/functions.flexchildshutdown.js +18 -1
  62. package/dist_ts/functions.inferencecli.d.ts +3 -3
  63. package/dist_ts/functions.inferencecli.js +33 -10
  64. package/dist_ts/functions.inferencecliarguments.d.ts +2 -1
  65. package/dist_ts/functions.inferencecliarguments.js +29 -8
  66. package/dist_ts/functions.inferencelaunch.d.ts +35 -7
  67. package/dist_ts/functions.inferencelaunch.js +143 -16
  68. package/dist_ts/functions.mcpfleetworkertools.d.ts +63 -70
  69. package/dist_ts/functions.mcpfleetworkertools.js +32 -4
  70. package/dist_ts/functions.proxycontract.d.ts +21 -4
  71. package/dist_ts/functions.proxycontract.js +12 -5
  72. package/dist_ts/functions.proxyharnessconfig.d.ts +7 -0
  73. package/dist_ts/functions.proxyharnessconfig.js +11 -1
  74. package/dist_ts/interfaces.auth.d.ts +1 -1
  75. package/dist_ts/interfaces.auth.js +2 -1
  76. package/dist_ts_interfaces/devices.d.ts +133 -3
  77. package/dist_ts_interfaces/devices.js +3 -2
  78. package/dist_ts_interfaces/elicitations.d.ts +125 -0
  79. package/dist_ts_interfaces/elicitations.js +7 -0
  80. package/dist_ts_interfaces/fleetworkers.d.ts +119 -5
  81. package/dist_ts_interfaces/fleetworkers.js +14 -2
  82. package/dist_ts_interfaces/index.d.ts +1 -0
  83. package/dist_ts_interfaces/index.js +2 -1
  84. package/dist_ts_interfaces/interfaces.d.ts +3 -1
  85. package/dist_ts_interfaces/interfaces.js +2 -2
  86. package/dist_ts_interfaces/mcprequests.d.ts +5 -1
  87. package/dist_ts_interfaces/mcprequests.js +2 -1
  88. package/dist_ts_interfaces/nativesessions.d.ts +14 -0
  89. package/dist_ts_interfaces/requests.d.ts +3 -3
  90. package/dist_ts_interfaces/requests.fleetworkers.js +2 -2
  91. package/dist_ts_interfaces/requests.js +1 -1
  92. package/dist_ts_interfaces/requests.promptreply.d.ts +18 -0
  93. package/dist_ts_interfaces/sessionfeed.d.ts +3 -2
  94. package/dist_ts_interfaces/sessionfeed.js +1 -1
  95. package/dist_ts_migration/index.d.ts +0 -2
  96. package/dist_ts_migration/index.js +1 -3
  97. package/dist_ts_migration/v43_flexpostharnessmigrationmarkers.d.ts +6 -17
  98. package/dist_ts_migration/v43_flexpostharnessmigrationmarkers.js +6 -36
  99. package/package.json +3 -3
  100. package/readme.md +191 -24
  101. package/third-party-notices.md +1 -1
  102. package/ts/00_commitinfo_data.ts +1 -1
  103. package/ts/aglapi/aglapisurface.document.ts +474 -3
  104. package/ts/aglapi/interfaces.ts +2 -0
  105. package/ts/classes.claudeharness.ts +80 -9
  106. package/ts/classes.codexclientadapter.ts +41 -5
  107. package/ts/classes.controller.ts +142 -29
  108. package/ts/classes.flexservice.ts +10 -66
  109. package/ts/classes.flexsupervisor.ts +214 -37
  110. package/ts/classes.inferencegateway.ts +69 -23
  111. package/ts/classes.inferencespend.ts +46 -13
  112. package/ts/classes.mcpclient.ts +8 -4
  113. package/ts/classes.mcpcontrollerhost.ts +4 -0
  114. package/ts/classes.mcptools.ts +17 -3
  115. package/ts/classes.opencodeclient.ts +2 -0
  116. package/ts/classes.proxycontrol.ts +27 -13
  117. package/ts/classes.proxycontrolclient.ts +9 -6
  118. package/ts/classes.proxydaemon.ts +49 -27
  119. package/ts/classes.proxyleaseholder.ts +43 -11
  120. package/ts/classes.proxystore.ts +21 -8
  121. package/ts/classes.sessionfeed.ts +1 -1
  122. package/ts/classes.validation.ts +52 -0
  123. package/ts/driver/functions.drivertools.ts +1 -1
  124. package/ts/fleet/classes.codexworkers.ts +8 -6
  125. package/ts/fleet/classes.workers.ts +101 -17
  126. package/ts/fleet/functions.workervalidation.ts +35 -9
  127. package/ts/fleet/interfaces.workers.ts +11 -4
  128. package/ts/flexharness.child.ts +8 -3
  129. package/ts/functions.confinedrelay.ts +65 -0
  130. package/ts/functions.deviceapi.ts +24 -1
  131. package/ts/functions.elicitation.ts +443 -0
  132. package/ts/functions.flexchildshutdown.ts +22 -0
  133. package/ts/functions.inferencecli.ts +38 -13
  134. package/ts/functions.inferencecliarguments.ts +26 -5
  135. package/ts/functions.inferencelaunch.ts +143 -16
  136. package/ts/functions.mcpfleetworkertools.ts +34 -4
  137. package/ts/functions.proxycontract.ts +17 -4
  138. package/ts/functions.proxyharnessconfig.ts +11 -0
  139. package/ts/interfaces.auth.ts +1 -0
  140. package/ts_interfaces/devices.schema.json +476 -2
  141. package/ts_interfaces/devices.ts +146 -2
  142. package/ts_interfaces/elicitations.ts +148 -0
  143. package/ts_interfaces/fleetworkers.ts +96 -4
  144. package/ts_interfaces/index.ts +1 -0
  145. package/ts_interfaces/interfaces.ts +3 -1
  146. package/ts_interfaces/mcprequests.ts +1 -0
  147. package/ts_interfaces/nativesessions.ts +16 -0
  148. package/ts_interfaces/requests.fleetworkers.ts +1 -1
  149. package/ts_interfaces/requests.promptreply.ts +22 -0
  150. package/ts_interfaces/requests.ts +4 -0
  151. package/ts_interfaces/sessionfeed.ts +3 -2
  152. package/ts_migration/index.ts +0 -2
  153. package/ts_migration/v43_flexpostharnessmigrationmarkers.ts +6 -49
  154. package/ts_web/00_commitinfo_data.ts +1 -1
  155. package/ts_web/classes.elicitationcards.ts +106 -0
  156. package/ts_web/classes.nativesessionstate.ts +38 -1
  157. package/ts_web/elements.fleetworker.ts +27 -2
  158. package/ts_web/elements.harnesscontrollerapp.ts +68 -1
  159. package/ts_web/functions.sessionchat.ts +5 -0
  160. package/dist_ts_migration/classes.flexpostharnessmigrationrunner.d.ts +0 -19
  161. package/dist_ts_migration/classes.flexpostharnessmigrationrunner.js +0 -34
  162. package/dist_ts_migration/v19_flexprojectmanagement.d.ts +0 -14
  163. package/dist_ts_migration/v19_flexprojectmanagement.js +0 -23
  164. package/ts_migration/classes.flexpostharnessmigrationrunner.ts +0 -54
  165. package/ts_migration/v19_flexprojectmanagement.ts +0 -32
@@ -1,5 +1,5 @@
1
1
  import { FlexIpcNotSentError } from './classes.flexframedtransport.js';
2
- import type { IFailureDescription } from './functions.failuredescription.js';
2
+ import { type IFailureDescription } from './functions.failuredescription.js';
3
3
  import { type IFlexServiceConfiguration, type IFlexServiceStatus, type TFlexChildEvent, type TFlexHostRequestMethod, type TFlexHostRequest, type TFlexHostResponse, type TFlexRequest, type TFlexRequestMethod, type TFlexResponse } from './interfaces.flexipc.js';
4
4
  export interface IFlexSupervisorStatus {
5
5
  state: IFlexServiceStatus['state'];
@@ -26,10 +26,18 @@ export interface IFlexSupervisorLogEntry {
26
26
  /** An error of a child's log pipe, or of a started child process, the supervisor recorded and ignored. */
27
27
  export interface IFlexSupervisorIgnoredError {
28
28
  source: 'stdout' | 'stderr' | 'process';
29
+ /** The child generation, counted from 1 per supervisor, whose pipe or process the error came from. */
30
+ generation: number;
29
31
  code?: string;
30
32
  timestamp: number;
31
33
  }
32
34
  export interface IFlexSupervisorOptions {
35
+ /**
36
+ * Writes one record to the controller log; the controller's stderr (`console.error`) unless a test
37
+ * captures it. Each child stdout and stderr line arrives here as it is read, tagged with its child
38
+ * generation, credential-redacted and bounded, and so does every abnormal child exit.
39
+ */
40
+ writeControllerLog?: (lineArg: string) => void;
33
41
  onChildExitObserved?: (exitArg: IFlexSupervisorExit) => void;
34
42
  onChildExit?: (exitArg: IFlexSupervisorExit) => void;
35
43
  cancellationGraceTimeoutMs?: number;
@@ -94,8 +102,9 @@ export declare class FlexSupervisor {
94
102
  private readonly eventListeners;
95
103
  private readonly logs;
96
104
  private readonly ignoredChildErrors;
97
- private readonly stdoutAccumulator;
98
- private readonly stderrAccumulator;
105
+ /** Child generations observed so far; the controller log names each child by its number. */
106
+ private childGenerations;
107
+ private readonly writeControllerLog;
99
108
  private readonly cancellationGraceTimeoutMs;
100
109
  private readonly childTaskDrainTimeoutMs;
101
110
  /** The writer identity of the current child generation, until its exit is confirmed. */
@@ -133,6 +142,13 @@ export declare class FlexSupervisor {
133
142
  private performStop;
134
143
  private terminateOwnedChild;
135
144
  private observeChild;
145
+ /**
146
+ * Writes an exit the supervisor did not ask for, or one with a failure code or a signal, to the
147
+ * controller log: the generation, its exit code and signal or why it never started, and the pipe
148
+ * and process errors of that generation the supervisor ignored so far.
149
+ */
150
+ private logAbnormalExit;
151
+ private describeChildGeneration;
136
152
  private recordIgnoredChildError;
137
153
  private reapOrphanedGroup;
138
154
  private reapRetainedProcessGroup;
@@ -154,6 +170,24 @@ export declare class FlexSupervisor {
154
170
  private rememberSettledHostRequest;
155
171
  private normalizeDeadline;
156
172
  private consumeLog;
173
+ private consumeLogText;
157
174
  private flushLog;
158
175
  private addLog;
176
+ /**
177
+ * Writes a child line to the controller log as it arrives, within the generation's rate window.
178
+ * Lines over the window's budget are counted and the last `supervisorControllerLogSuppressedTailLines`
179
+ * of each stream kept as buffered, not redacted; they are reported when the next window opens or
180
+ * the generation's pipes closed.
181
+ */
182
+ private writeChildLine;
183
+ /**
184
+ * Writes one child line to the controller log, live or from a suppression tail: at most
185
+ * `supervisorControllerLogLineBytes`, control characters spaced out and every credential hidden
186
+ * before the cut (`sanitizeFailureText`, then `redactAndBound`), so the cut never keeps part of a
187
+ * credential. The input is the buffered line, at most 8 KiB, whose unread rest lies far beyond the
188
+ * kept head.
189
+ */
190
+ private emitChildLine;
191
+ /** Writes the rate window's suppression record, then its stdout tail and its stderr tail, and empties them. */
192
+ private reportSuppressedLines;
159
193
  }