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

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