@songsid/agend 2.3.5-alpha.2 → 2.3.5-alpha.4

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 (279) hide show
  1. package/dist/agend-home.d.ts +13 -0
  2. package/dist/agend-home.js +42 -0
  3. package/dist/agend-home.js.map +1 -1
  4. package/dist/agent-runtime-api.d.ts +4 -0
  5. package/dist/agent-runtime-api.js +59 -0
  6. package/dist/agent-runtime-api.js.map +1 -0
  7. package/dist/agent-runtime-change.d.ts +74 -0
  8. package/dist/agent-runtime-change.js +102 -0
  9. package/dist/agent-runtime-change.js.map +1 -0
  10. package/dist/auth-api.d.ts +21 -0
  11. package/dist/auth-api.js +95 -4
  12. package/dist/auth-api.js.map +1 -1
  13. package/dist/authority/web-authority.d.ts +12 -2
  14. package/dist/authority/web-authority.js +25 -4
  15. package/dist/authority/web-authority.js.map +1 -1
  16. package/dist/backend/claude-code.js +16 -1
  17. package/dist/backend/claude-code.js.map +1 -1
  18. package/dist/backend/codex-footer-hints.d.ts +4 -0
  19. package/dist/backend/codex-footer-hints.js +27 -0
  20. package/dist/backend/codex-footer-hints.js.map +1 -0
  21. package/dist/backend/codex.js +19 -11
  22. package/dist/backend/codex.js.map +1 -1
  23. package/dist/backend/kiro-identity.d.ts +2 -0
  24. package/dist/backend/kiro-identity.js +13 -6
  25. package/dist/backend/kiro-identity.js.map +1 -1
  26. package/dist/backend/kiro.js +18 -3
  27. package/dist/backend/kiro.js.map +1 -1
  28. package/dist/backend-availability.d.ts +6 -0
  29. package/dist/backend-availability.js +13 -5
  30. package/dist/backend-availability.js.map +1 -1
  31. package/dist/channel/mcp-tools.js +1 -1
  32. package/dist/channel/mcp-tools.js.map +1 -1
  33. package/dist/cli.js +6 -9
  34. package/dist/cli.js.map +1 -1
  35. package/dist/config-validator.js +12 -1
  36. package/dist/config-validator.js.map +1 -1
  37. package/dist/daemon.d.ts +5 -0
  38. package/dist/daemon.js +107 -30
  39. package/dist/daemon.js.map +1 -1
  40. package/dist/fleet-manager.d.ts +146 -8
  41. package/dist/fleet-manager.js +1030 -166
  42. package/dist/fleet-manager.js.map +1 -1
  43. package/dist/fleet-windows-runtime.d.ts +6 -1
  44. package/dist/fleet-windows-runtime.js +77 -1
  45. package/dist/fleet-windows-runtime.js.map +1 -1
  46. package/dist/fleet-yaml-patch.d.ts +3 -0
  47. package/dist/fleet-yaml-patch.js +103 -0
  48. package/dist/fleet-yaml-patch.js.map +1 -0
  49. package/dist/general-binding.d.ts +85 -0
  50. package/dist/general-binding.js +298 -0
  51. package/dist/general-binding.js.map +1 -0
  52. package/dist/general-host-owner.d.ts +8 -0
  53. package/dist/general-host-owner.js +26 -0
  54. package/dist/general-host-owner.js.map +1 -0
  55. package/dist/general-instance.d.ts +7 -0
  56. package/dist/general-instance.js +20 -3
  57. package/dist/general-instance.js.map +1 -1
  58. package/dist/general-knowledge/skills/model-discovery/SKILL.md +2 -0
  59. package/dist/general-role.d.ts +5 -0
  60. package/dist/general-role.js +26 -0
  61. package/dist/general-role.js.map +1 -0
  62. package/dist/instance-lifecycle.d.ts +1 -0
  63. package/dist/instance-lifecycle.js +26 -4
  64. package/dist/instance-lifecycle.js.map +1 -1
  65. package/dist/instructions.d.ts +2 -0
  66. package/dist/instructions.js +6 -0
  67. package/dist/instructions.js.map +1 -1
  68. package/dist/kiro-resume-summary.d.ts +37 -0
  69. package/dist/kiro-resume-summary.js +85 -0
  70. package/dist/kiro-resume-summary.js.map +1 -0
  71. package/dist/locale.js +59 -0
  72. package/dist/locale.js.map +1 -1
  73. package/dist/login-controller.js +9 -1
  74. package/dist/login-controller.js.map +1 -1
  75. package/dist/native-pane-lifecycle.js +4 -1
  76. package/dist/native-pane-lifecycle.js.map +1 -1
  77. package/dist/native-pane-manager.d.ts +1 -0
  78. package/dist/native-pane-manager.js +23 -2
  79. package/dist/native-pane-manager.js.map +1 -1
  80. package/dist/needs-you-hub.js +1 -1
  81. package/dist/needs-you-hub.js.map +1 -1
  82. package/dist/needs-you.d.ts +8 -1
  83. package/dist/needs-you.js +5 -2
  84. package/dist/needs-you.js.map +1 -1
  85. package/dist/office-share-page.js +1 -1
  86. package/dist/office-share-page.js.map +1 -1
  87. package/dist/package-preimage.js +27 -2
  88. package/dist/package-preimage.js.map +1 -1
  89. package/dist/pane-port.d.ts +11 -0
  90. package/dist/public-web-gateway.js +9 -0
  91. package/dist/public-web-gateway.js.map +1 -1
  92. package/dist/public-web-link.d.ts +11 -0
  93. package/dist/public-web-link.js +13 -0
  94. package/dist/public-web-link.js.map +1 -1
  95. package/dist/quickstart-api.js +9 -5
  96. package/dist/quickstart-api.js.map +1 -1
  97. package/dist/quickstart.d.ts +1 -0
  98. package/dist/quickstart.js +4 -1
  99. package/dist/quickstart.js.map +1 -1
  100. package/dist/reply-buttons-controller.js +10 -0
  101. package/dist/reply-buttons-controller.js.map +1 -1
  102. package/dist/runtime-api.js +84 -9
  103. package/dist/runtime-api.js.map +1 -1
  104. package/dist/runtime-build-info.d.ts +9 -0
  105. package/dist/runtime-build-info.js +57 -0
  106. package/dist/runtime-build-info.js.map +1 -0
  107. package/dist/runtime-bundle.d.ts +3 -1
  108. package/dist/runtime-bundle.js +17 -8
  109. package/dist/runtime-bundle.js.map +1 -1
  110. package/dist/runtime-cli.d.ts +6 -1
  111. package/dist/runtime-cli.js +46 -11
  112. package/dist/runtime-cli.js.map +1 -1
  113. package/dist/runtime-client-store.d.ts +20 -1
  114. package/dist/runtime-client-store.js +56 -4
  115. package/dist/runtime-client-store.js.map +1 -1
  116. package/dist/runtime-client.d.ts +12 -0
  117. package/dist/runtime-client.js +43 -7
  118. package/dist/runtime-client.js.map +1 -1
  119. package/dist/runtime-connection.d.ts +22 -0
  120. package/dist/runtime-connection.js +93 -0
  121. package/dist/runtime-connection.js.map +1 -0
  122. package/dist/runtime-coordinator.d.ts +9 -0
  123. package/dist/runtime-coordinator.js +81 -34
  124. package/dist/runtime-coordinator.js.map +1 -1
  125. package/dist/runtime-general-protocol.d.ts +22 -0
  126. package/dist/runtime-general-protocol.js +57 -0
  127. package/dist/runtime-general-protocol.js.map +1 -0
  128. package/dist/runtime-general-workspace.d.ts +17 -0
  129. package/dist/runtime-general-workspace.js +213 -0
  130. package/dist/runtime-general-workspace.js.map +1 -0
  131. package/dist/runtime-pane-assets.d.ts +1 -1
  132. package/dist/runtime-pane-assets.js +1 -1
  133. package/dist/runtime-pane-assets.js.map +1 -1
  134. package/dist/runtime-pane-boot.d.ts +7 -0
  135. package/dist/runtime-pane-boot.js +23 -0
  136. package/dist/runtime-pane-boot.js.map +1 -1
  137. package/dist/runtime-pane-host.d.ts +1 -0
  138. package/dist/runtime-pane-host.js +22 -1
  139. package/dist/runtime-pane-host.js.map +1 -1
  140. package/dist/runtime-pane-mcp.d.ts +8 -0
  141. package/dist/runtime-pane-mcp.js +15 -2
  142. package/dist/runtime-pane-mcp.js.map +1 -1
  143. package/dist/runtime-pane-port.d.ts +6 -1
  144. package/dist/runtime-pane-port.js +21 -0
  145. package/dist/runtime-pane-port.js.map +1 -1
  146. package/dist/runtime-pane-protocol.d.ts +4 -1
  147. package/dist/runtime-pane-protocol.js +7 -1
  148. package/dist/runtime-pane-protocol.js.map +1 -1
  149. package/dist/runtime-protocol.d.ts +13 -0
  150. package/dist/runtime-protocol.js +18 -0
  151. package/dist/runtime-protocol.js.map +1 -1
  152. package/dist/settings-api.d.ts +5 -0
  153. package/dist/settings-api.js +37 -1
  154. package/dist/settings-api.js.map +1 -1
  155. package/dist/settings-baseline.d.ts +1 -0
  156. package/dist/settings-baseline.js +1 -1
  157. package/dist/settings-baseline.js.map +1 -1
  158. package/dist/settings-confirmation.d.ts +1 -0
  159. package/dist/settings-confirmation.js +1 -0
  160. package/dist/settings-confirmation.js.map +1 -1
  161. package/dist/settings-effect.d.ts +4 -0
  162. package/dist/settings-effect.js +36 -1
  163. package/dist/settings-effect.js.map +1 -1
  164. package/dist/settings-http-confirmation.d.ts +4 -0
  165. package/dist/settings-http-confirmation.js +20 -1
  166. package/dist/settings-http-confirmation.js.map +1 -1
  167. package/dist/settings-request-capability.d.ts +2 -0
  168. package/dist/settings-request-capability.js +4 -0
  169. package/dist/settings-request-capability.js.map +1 -1
  170. package/dist/settings-route-lifetime.d.ts +14 -0
  171. package/dist/settings-route-lifetime.js +48 -0
  172. package/dist/settings-route-lifetime.js.map +1 -0
  173. package/dist/settings-transaction.d.ts +4 -0
  174. package/dist/settings-transaction.js +9 -0
  175. package/dist/settings-transaction.js.map +1 -1
  176. package/dist/setup-form.js +6 -3
  177. package/dist/setup-form.js.map +1 -1
  178. package/dist/setup-i18n.js +3 -0
  179. package/dist/setup-i18n.js.map +1 -1
  180. package/dist/stall-reporter.d.ts +21 -0
  181. package/dist/stall-reporter.js +82 -0
  182. package/dist/stall-reporter.js.map +1 -0
  183. package/dist/tmux-control.d.ts +2 -2
  184. package/dist/tmux-control.js +4 -2
  185. package/dist/tmux-control.js.map +1 -1
  186. package/dist/tmux-exec-helper.d.ts +6 -3
  187. package/dist/tmux-exec-helper.js +115 -53
  188. package/dist/tmux-exec-helper.js.map +1 -1
  189. package/dist/tool-permissions.js +2 -1
  190. package/dist/tool-permissions.js.map +1 -1
  191. package/dist/tunnel/cloudflared-install.d.ts +4 -0
  192. package/dist/tunnel/cloudflared-install.js +20 -1
  193. package/dist/tunnel/cloudflared-install.js.map +1 -1
  194. package/dist/tunnel/cloudflared.d.ts +8 -1
  195. package/dist/tunnel/cloudflared.js +34 -6
  196. package/dist/tunnel/cloudflared.js.map +1 -1
  197. package/dist/tunnel/lease.d.ts +3 -3
  198. package/dist/tunnel/lease.js +23 -19
  199. package/dist/tunnel/lease.js.map +1 -1
  200. package/dist/tunnel/manager.js +6 -7
  201. package/dist/tunnel/manager.js.map +1 -1
  202. package/dist/types.d.ts +2 -0
  203. package/dist/ui/agent-proposals.js +2 -2
  204. package/dist/ui/agent-runtime-settings.js +67 -0
  205. package/dist/ui/agent-runtime.js +20 -2
  206. package/dist/ui/backend-signin.js +36 -21
  207. package/dist/ui/general-location.js +71 -0
  208. package/dist/ui/native-instance-settings.js +5 -8
  209. package/dist/ui/native-pane-recovery.js +1 -1
  210. package/dist/ui/panel-chat.js +5 -2
  211. package/dist/ui/panel-fleet.js +4 -2
  212. package/dist/ui/panel-needs.js +2 -0
  213. package/dist/ui/panel-runtimes.js +136 -33
  214. package/dist/ui/panel-settings.js +227 -138
  215. package/dist/ui/panel-windows-cli.js +77 -41
  216. package/dist/ui/settings-agent-filters.js +94 -0
  217. package/dist/ui/settings-appearance.js +122 -23
  218. package/dist/ui/settings-dialogs.js +13 -7
  219. package/dist/ui/settings-guests.js +25 -11
  220. package/dist/ui/settings-layout.js +245 -0
  221. package/dist/ui/settings-model.js +10 -1
  222. package/dist/ui/settings-outside.js +176 -0
  223. package/dist/ui/settings-registry.js +6 -3
  224. package/dist/ui/settings-shortcuts.js +65 -0
  225. package/dist/ui/settings-strings.js +95 -0
  226. package/dist/ui/settings-web-authority.js +14 -11
  227. package/dist/ui/shared/app-i18n.js +2 -2
  228. package/dist/ui/shared/app-shell.js +17 -7
  229. package/dist/ui/shared/app.css +1038 -13
  230. package/dist/ui/shared/instance-nav.js +16 -5
  231. package/dist/ui/shared/machine-name.js +13 -0
  232. package/dist/ui/shared/panel-view.js +266 -17
  233. package/dist/ui/shared/qrcode.module.js +2237 -0
  234. package/dist/ui/shared/settings-width.js +31 -0
  235. package/dist/ui/shared/signin.js +39 -5
  236. package/dist/ui/shared/tokens.css +1 -0
  237. package/dist/ui/shared/ui-dialog.js +2 -2
  238. package/dist/ui/shared/ui-menu.js +3 -3
  239. package/dist/ui/shared/vendor/qrcode-generator.LICENSE +27 -0
  240. package/dist/ui/shared/vendor/vendor.json +19 -2
  241. package/dist/ui/shared/view-strings.js +28 -0
  242. package/dist/ui/windows-cli-catalog.js +41 -12
  243. package/dist/unattended-install.d.ts +1 -1
  244. package/dist/unattended-install.js +19 -5
  245. package/dist/unattended-install.js.map +1 -1
  246. package/dist/update-check.d.ts +2 -8
  247. package/dist/update-check.js +2 -5
  248. package/dist/update-check.js.map +1 -1
  249. package/dist/view-api.d.ts +15 -0
  250. package/dist/view-api.js +94 -33
  251. package/dist/view-api.js.map +1 -1
  252. package/dist/web-api.d.ts +13 -0
  253. package/dist/web-api.js +80 -0
  254. package/dist/web-api.js.map +1 -1
  255. package/dist/web-login.d.ts +4 -3
  256. package/dist/web-login.js +23 -14
  257. package/dist/web-login.js.map +1 -1
  258. package/dist/web-only-fleet.d.ts +20 -0
  259. package/dist/web-only-fleet.js +21 -0
  260. package/dist/web-only-fleet.js.map +1 -1
  261. package/dist/web-remote-access.d.ts +152 -0
  262. package/dist/web-remote-access.js +368 -0
  263. package/dist/web-remote-access.js.map +1 -0
  264. package/dist/web-session.d.ts +12 -0
  265. package/dist/web-session.js +22 -8
  266. package/dist/web-session.js.map +1 -1
  267. package/dist/windows-agents.d.ts +15 -1
  268. package/dist/windows-agents.js +37 -10
  269. package/dist/windows-agents.js.map +1 -1
  270. package/dist/windows-cli-api.js +2 -1
  271. package/dist/windows-cli-api.js.map +1 -1
  272. package/dist/windows-cli-worker.d.ts +1 -0
  273. package/dist/windows-cli-worker.js +2 -2
  274. package/dist/windows-cli-worker.js.map +1 -1
  275. package/dist/windows-cli.d.ts +1 -0
  276. package/dist/windows-cli.js +7 -2
  277. package/dist/windows-cli.js.map +1 -1
  278. package/launcher/agend-install.cjs +16 -2
  279. package/package.json +1 -1
@@ -1,5 +1,7 @@
1
+ import { AgentRuntimeChanges } from "./agent-runtime-change.js";
1
2
  import { type HumanOrigin } from "./human-delivery-receipts.js";
2
3
  import { type SettingsPendingView } from "./settings-confirmation.js";
4
+ import { type GeneralSwitchInput } from "./general-binding.js";
3
5
  import { SettingsExecution } from "./settings-transaction.js";
4
6
  import { AppIconStore } from "./web-app-icon.js";
5
7
  import { type NamedTestResult } from "./tunnel/named-link-test.js";
@@ -107,6 +109,7 @@ import { type CacheReport } from "./cache-service.js";
107
109
  import { type WebCommandResult } from "./web-commands.js";
108
110
  import { type SessionRecord } from "./web-session.js";
109
111
  import { WebNotices } from "./web-notices.js";
112
+ import { WebRemoteAccess } from "./web-remote-access.js";
110
113
  import { VERIFIED_SESSION_HOURS, type HumanAuthority, type WebAuthorityRefusal, type WebAuthorityResult, type WebPeer } from "./authority/web-authority.js";
111
114
  import { type AuthorityState } from "./authority/authority-state.js";
112
115
  import { type SessionAuthorization } from "./authority/session-authorizations.js";
@@ -172,6 +175,11 @@ export interface RestartOpts {
172
175
  sessionOomRetry?: SessionOomRetry;
173
176
  /** Internal pre-invalidation owner fence for an unclear-OOM action. */
174
177
  recoveryCurrent?: () => boolean;
178
+ /**
179
+ * #1490 row 27: the lifecycle the caller acts for (lifecyclePin), asked before anything is invalidated. A button or
180
+ * menu offered for one instance never restarts a later one of the same name, or one restarted since.
181
+ */
182
+ ownerCurrent?: () => boolean;
175
183
  carry?: {
176
184
  backend: string;
177
185
  from: string | null;
@@ -281,6 +289,11 @@ export type GuestAuditEntry = {
281
289
  name: string;
282
290
  outcome: string;
283
291
  };
292
+ /** #1490 row 27: a restart asked for one lifecycle of an instance after it was stopped, restarted or replaced. */
293
+ export declare class RestartSupersededError extends Error {
294
+ /** `shown`: the instance as the chat list names it (shownInstanceName). */
295
+ constructor(shown: string);
296
+ }
284
297
  export declare class FleetManager implements FleetContext, LifecycleContext, ArchiverContext, StatuslineWatcherContext, OutboundContext, AgentEndpointContext {
285
298
  dataDir: string;
286
299
  private static signalTarget;
@@ -338,6 +351,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
338
351
  nativeMcpSessions(): NativeMcpSessions;
339
352
  /** The same instance registry and delivery entry point, with a native Windows execution adapter. */
340
353
  nativeInstanceRuntime(): FleetWindowsRuntime;
354
+ private agentRuntimeChangeService?;
355
+ agentRuntimeChanges(): AgentRuntimeChanges;
341
356
  /** Explicit dashboard opt-in, with the same General confirmation and ordinary topic/Daemon routing. */
342
357
  createNativePaneInstance(profile: Record<string, unknown>, channelId: string | undefined, authorized: () => boolean, execution: SettingsExecution): Promise<{
343
358
  name: string;
@@ -349,6 +364,29 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
349
364
  private localNativePaneEndpoint;
350
365
  /** Persistent ownership is independent of the exec worker's per-turn capabilities. */
351
366
  private nativePanes;
367
+ /** Prepare only bundled role files; this neither switches General nor starts a provider process. */
368
+ prepareWindowsGeneralWorkspace(name: string, machineId: string, cli: "codex" | "claude-code", bindingId: string, authorized: () => boolean): Promise<import("./runtime-general-protocol.js").GeneralWorkspaceReceipt>;
369
+ private readonly generalLocationFlights;
370
+ private readonly generalAttentionEpisodes;
371
+ private generalBindings;
372
+ generalLocations(): unknown;
373
+ /** Pure preflight for the confirmation diff and stale-tab refusal; never prepares files or starts a CLI. */
374
+ previewGeneralLocation(raw: unknown): {
375
+ input: GeneralSwitchInput;
376
+ summary: string[];
377
+ connections: string[];
378
+ };
379
+ /** All entry points, including automatic native recovery, must respect an interrupted binding switch. */
380
+ assertGeneralBindingStart(name: string, config: InstanceConfig): void;
381
+ /** Only the Settings replay's confirmed admin can enter; the whole switch owns one lifecycle transition. */
382
+ switchGeneralLocation(raw: unknown, authorized: () => boolean, execution: SettingsExecution): Promise<{
383
+ started: boolean;
384
+ message: string;
385
+ }>;
386
+ /** An offline PC or a confirmed binding boundary holds old waiting input; it never becomes another conversation's queue. */
387
+ private holdGeneralOldDeliveries;
388
+ generalLocationDeliveryHold(name: string): string | null;
389
+ private generalLocationAttention;
352
390
  nativePaneFor(name: string, config: InstanceConfig, assertCurrent: () => void): Promise<import("./native-pane-lifecycle.js").NativePaneLifecycle>;
353
391
  recoverNativePane(name: string, launchId: string, authorized: () => boolean): Promise<void>;
354
392
  holdNativePaneRecovery(name: string, error: unknown): boolean;
@@ -648,6 +686,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
648
686
  private watchdogTimer;
649
687
  private startupMemoryDeadline;
650
688
  private eventLoopWatch;
689
+ private stallReporter;
651
690
  private startedAt;
652
691
  private stormOpenNotifyTimer;
653
692
  private memoryLogAt;
@@ -688,6 +727,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
688
727
  private readonly webChatRemovals;
689
728
  /** #1774: a removal under way — its replies' fate waits for its outcome (success: theirs no more; failure: theirs). */
690
729
  private readonly webChatRemovalsPending;
730
+ /**
731
+ * #1490 row 27: "still the same lifecycle of `name`" — its lifecycle epoch, moved on synchronously by every stop,
732
+ * restart and removal (the map is never pruned, so a same-name replacement has a later one). Taken when a button
733
+ * or menu is claimed or offered, asked after every await before acting by name.
734
+ */
735
+ /** #1490 row 27: an instance as the chat list names it — its display name where it has one, else its name. */
736
+ private shownInstanceName;
737
+ private lifecyclePin;
691
738
  private webChatGeneration;
692
739
  /** #1774: who an instance's reply is from, taken when it is sent: the name's generation and its daemon then. */
693
740
  private webChatIdentity;
@@ -883,7 +930,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
883
930
  status: number;
884
931
  body: Record<string, unknown>;
885
932
  }>;
886
- /** #2170: the Generals a chat card could be posted in (promptSettingsChange's rule): connected, on the platform, unaffected. */
933
+ /** A confirmation belongs to the server route/lifetime, not the availability of General's model. */
934
+ private settingsGeneralRoute;
935
+ /** Connected, same-platform, unaffected server routes can post cards even while the model is offline. */
887
936
  private settingsNoticeGenerals;
888
937
  /**
889
938
  * #2170: General's notice of a change confirmed from the web — the first General a chat card could have been posted
@@ -1804,6 +1853,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1804
1853
  /** #1742: `/start web` from a fleet admin: the /web menu right here in the DM, for the General this bot serves. */
1805
1854
  private startWebInDm;
1806
1855
  private getPublicWebLink;
1856
+ /** The public link's wiring to this fleet (a test builds one with the tunnel itself stubbed: `ensure`, `provider`). */
1857
+ private publicWebLinkDeps;
1807
1858
  private publicLinkAutoOpen;
1808
1859
  /**
1809
1860
  * #named-link-ttl: the admin who last opened a named-tunnel link from /web, with the live binding — only while they
@@ -3288,6 +3339,89 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3288
3339
  * again. A fleet with a chat connection, another session, or another peer: nothing (§3 as before).
3289
3340
  */
3290
3341
  authorizeHostSession(session: SessionRecord, peer: WebPeer): void;
3342
+ private webRemoteAccessState;
3343
+ /** The authenticator, the outside switch and the wrong-code limiter (web-remote-access.json), read on first use. */
3344
+ webRemoteAccess(): WebRemoteAccess | null;
3345
+ /** "Allow connections from outside" is on (an app set up) and this is a web-only fleet. */
3346
+ private outsideOn;
3347
+ /** The link connections from outside opened, while it is open and still theirs: its exposure. Else null. */
3348
+ private outsideLink;
3349
+ /**
3350
+ * The request's live session, asked again each time `current()` is called (its own cookie authenticated anew, the same
3351
+ * handle): this web-only fleet's owner — this computer's admin, on this computer (`hostOnly`), or also signed in from
3352
+ * outside — and web-verified now. Null when it is not (a guest, a LAN session, a chat fleet's admin, nobody).
3353
+ */
3354
+ private liveOwner;
3355
+ /** Every session signed in from outside ends (and the authorizations kept for them). */
3356
+ private endOutsideSessions;
3357
+ /**
3358
+ * #1939 §10 / #3008: a stored receipt's authority as it reads now — the web authority state, and for this computer's
3359
+ * admin from outside the switch and the last revocation of remote authority (Prism P2 2).
3360
+ */
3361
+ receiptAuthorityNow(stored: HumanAuthority, state?: AuthorityState): HumanAuthority;
3362
+ /** #3008 (the sign-in page): this exposure is the outside link, open now. */
3363
+ isOutsideLink(exposureId: string): boolean;
3364
+ /** What Settings shows: set up or not, the switch, a wait in force, the link — its address only to this computer. */
3365
+ webOutsideStatus(req: IncomingMessage): {
3366
+ webOnly: boolean;
3367
+ here: boolean;
3368
+ enrolled: boolean;
3369
+ enrolledAt: number | null;
3370
+ outside: boolean;
3371
+ pausedForMs: number;
3372
+ link: {
3373
+ state: string;
3374
+ url?: string;
3375
+ expiresAt?: number;
3376
+ noExpiry?: true;
3377
+ quick: boolean;
3378
+ } | null;
3379
+ };
3380
+ /** Set up (or set up again): a new secret, shown once to this computer's admin. Null: not them. */
3381
+ webOutsideBeginEnrollment(req: IncomingMessage): {
3382
+ secret: string;
3383
+ uri: string;
3384
+ expiresInMs: number;
3385
+ } | null;
3386
+ /** The new app's first code: on "ok" it replaces the old one, whose sessions from outside end. */
3387
+ webOutsideConfirmEnrollment(req: IncomingMessage, code: string): "ok" | "wrong" | "expired" | "unsaved" | "not_here";
3388
+ /** Forget the app: the switch goes off, the link closes, every session from outside ends. */
3389
+ webOutsideRemove(req: IncomingMessage): "ok" | "unsaved" | "not_here";
3390
+ /** The switch. On: needs an app set up; the link opens. Off: it closes and every session from outside ends. */
3391
+ webOutsideSwitch(req: IncomingMessage, on: boolean): "ok" | "not_enrolled" | "not_here" | "not_allowed" | "unsaved";
3392
+ private outsideAttempt;
3393
+ private outsideOpening;
3394
+ /**
3395
+ * Open the outside link: an attempt after each delay in turn until one opens (#3008 B: twice more at most — the quick
3396
+ * link's address service limits how often it may be asked). Every attempt asks again: the switch still on, the fleet
3397
+ * running. A final failure: one Notice; the switch stays on, so the next start tries again.
3398
+ */
3399
+ private openOutsideLink;
3400
+ private closeOutsideLink;
3401
+ /** PublicWebLink.onClose for the outside link: what closed it decides what happens next (#3008 B). */
3402
+ private outsideLinkClosed;
3403
+ /**
3404
+ * #3008 (auth-api POST /auth/totp): a sign-in through the outside link with the authenticator's code. "ok": the caller
3405
+ * makes the session (SessionRecord.remote) and then calls authorizeOutsideSession. Each wrong code counts; a wait that
3406
+ * starts is a Notice; a code that matches a step just outside the window logs how far this clock seems to be off.
3407
+ */
3408
+ outsideSignIn(exposureId: string | undefined, code: string): {
3409
+ kind: "ok";
3410
+ } | {
3411
+ kind: "wrong";
3412
+ } | {
3413
+ kind: "paused";
3414
+ retryAfterMs: number;
3415
+ } | {
3416
+ kind: "closed";
3417
+ } | {
3418
+ kind: "unavailable";
3419
+ };
3420
+ /**
3421
+ * #3008: a session just made by outsideSignIn's "ok" is this computer's admin for its authorization's life. False: it
3422
+ * could not be admitted (its handle not saved, #3015 review r3) — the caller ends it.
3423
+ */
3424
+ authorizeOutsideSession(session: SessionRecord, peer: WebPeer, label: string): boolean;
3291
3425
  private authorityStateStore;
3292
3426
  /**
3293
3427
  * #1939 §10: the switch, "Only this computer can authorize" and the revocation epoch in force for the configuration as
@@ -3787,12 +3921,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3787
3921
  */
3788
3922
  private locateBinaryOnLoginShell;
3789
3923
  /**
3790
- * #1092: the binary in one of the directories its own installer installs to,
3791
- * when no login shell can see it (the installer recorded its PATH in an
3792
- * interactive-only rc file). The same executable-file check as the login
3793
- * shell lookup; a symlink to an executable counts, as codex's launcher is one.
3924
+ * #1092: the binary in one of the directories its own installer installs to, when no login shell can see it (the
3925
+ * installer recorded its PATH in an interactive-only rc file) — only those directories (#1092). #3009: through
3926
+ * backend-availability's install-directory check (the one resolveBackendBinary uses): one killable child, never
3927
+ * accessSync/statSync on the fleet's thread. An executable file counts, a symlink to one too (codex's launcher is one).
3794
3928
  */
3795
- private locateInInstallerBinDirs;
3929
+ private locateInstalledBackend;
3796
3930
  /** Put an installed binary's directory on the fleet's PATH (#1059), once. */
3797
3931
  private adoptBinaryDirectory;
3798
3932
  /** Discord native `/login` slash — shared by every adapter dispatch block. */
@@ -4125,8 +4259,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
4125
4259
  * restart backends only read it at launch, so it is persisted and the
4126
4260
  * instance respawns.
4127
4261
  */
4128
- applyEffort(instanceName: string, requested: string): Promise<string>;
4129
- applyModel(instanceName: string, model: string): Promise<string>;
4262
+ applyEffort(instanceName: string, requested: string, opts?: {
4263
+ current?: () => boolean;
4264
+ }): Promise<string>;
4265
+ applyModel(instanceName: string, model: string, opts?: {
4266
+ current?: () => boolean;
4267
+ }): Promise<string>;
4130
4268
  /** Save an instance's model (fleet.yaml, or its ClassicBot channel). False when neither holds it. */
4131
4269
  private persistInstanceModel;
4132
4270
  /**