@songsid/agend 2.3.2-beta.1 → 2.3.2-beta.10
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.
- package/THIRD_PARTY_NOTICES.md +40 -0
- package/dist/agent-cli.js +21 -2
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.js +5 -0
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/antigravity-usage-scan.d.ts +58 -0
- package/dist/antigravity-usage-scan.js +257 -0
- package/dist/antigravity-usage-scan.js.map +1 -0
- package/dist/antigravity-usage-worker.d.ts +1 -0
- package/dist/antigravity-usage-worker.js +10 -0
- package/dist/antigravity-usage-worker.js.map +1 -0
- package/dist/auth-api.js +4 -0
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/kiro-identity.d.ts +64 -0
- package/dist/backend/kiro-identity.js +101 -0
- package/dist/backend/kiro-identity.js.map +1 -1
- package/dist/backend/kiro-retired-model.d.ts +62 -0
- package/dist/backend/kiro-retired-model.js +160 -0
- package/dist/backend/kiro-retired-model.js.map +1 -0
- package/dist/backend/kiro.d.ts +71 -2
- package/dist/backend/kiro.js +352 -11
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/types.d.ts +59 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-signin-guide.d.ts +1 -0
- package/dist/backend-signin-guide.js +9 -0
- package/dist/backend-signin-guide.js.map +1 -0
- package/dist/backend-signin-pending.d.ts +10 -0
- package/dist/backend-signin-pending.js +44 -0
- package/dist/backend-signin-pending.js.map +1 -0
- package/dist/browser-backend-signins.d.ts +56 -0
- package/dist/browser-backend-signins.js +189 -0
- package/dist/browser-backend-signins.js.map +1 -0
- package/dist/cache-ledger.d.ts +38 -2
- package/dist/cache-ledger.js +133 -8
- package/dist/cache-ledger.js.map +1 -1
- package/dist/cache-prices.d.ts +2 -1
- package/dist/cache-prices.js +5 -2
- package/dist/cache-prices.js.map +1 -1
- package/dist/cache-service.d.ts +68 -0
- package/dist/cache-service.js +355 -13
- package/dist/cache-service.js.map +1 -1
- package/dist/channel/adapters/discord.d.ts +11 -0
- package/dist/channel/adapters/discord.js +71 -14
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/mcp-tools.js +29 -2
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/tool-router.js +2 -1
- package/dist/channel/tool-router.js.map +1 -1
- package/dist/classic-channel-manager.d.ts +11 -0
- package/dist/classic-channel-manager.js +39 -1
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/cli.js +21 -2
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.d.ts +7 -1
- package/dist/config-validator.js +53 -10
- package/dist/config-validator.js.map +1 -1
- package/dist/config.d.ts +19 -0
- package/dist/config.js +31 -1
- package/dist/config.js.map +1 -1
- package/dist/cpu-quota.d.ts +23 -0
- package/dist/cpu-quota.js +86 -0
- package/dist/cpu-quota.js.map +1 -0
- package/dist/daemon.d.ts +23 -0
- package/dist/daemon.js +106 -7
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard-permissions.d.ts +20 -6
- package/dist/dashboard-permissions.js +58 -9
- package/dist/dashboard-permissions.js.map +1 -1
- package/dist/doctor.js +2 -1
- package/dist/doctor.js.map +1 -1
- package/dist/fleet-manager.d.ts +72 -0
- package/dist/fleet-manager.js +507 -89
- package/dist/fleet-manager.js.map +1 -1
- package/dist/forged-envelope-scan.d.ts +9 -0
- package/dist/forged-envelope-scan.js +30 -5
- package/dist/forged-envelope-scan.js.map +1 -1
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +5 -2
- package/dist/general-knowledge/skills/kiro-engine-migration/SKILL.md +14 -1
- package/dist/general-knowledge/skills/web-appearance/SKILL.canvas-worker-off.md +24 -1
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +24 -1
- package/dist/general-knowledge/skills/web-dashboard/SKILL.canvas-worker-off.md +37 -9
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +44 -11
- package/dist/instance-config-impact.js +10 -5
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +19 -0
- package/dist/instance-lifecycle.js +55 -12
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/kiro-db-reader.d.ts +5 -0
- package/dist/kiro-db-reader.js +18 -0
- package/dist/kiro-db-reader.js.map +1 -1
- package/dist/kiro-engine-status.d.ts +2 -0
- package/dist/kiro-engine-status.js +9 -0
- package/dist/kiro-engine-status.js.map +1 -1
- package/dist/kiro-migrate.d.ts +49 -0
- package/dist/kiro-migrate.js +105 -0
- package/dist/kiro-migrate.js.map +1 -0
- package/dist/kiro-transcript-lane.d.ts +2 -0
- package/dist/kiro-transcript-lane.js.map +1 -1
- package/dist/kiro-transcript-worker.js +1 -0
- package/dist/kiro-transcript-worker.js.map +1 -1
- package/dist/kiro-tui-forensic.d.ts +7 -0
- package/dist/kiro-tui-forensic.js +110 -0
- package/dist/kiro-tui-forensic.js.map +1 -0
- package/dist/kiro-usage-run.d.ts +7 -0
- package/dist/kiro-usage-run.js +39 -0
- package/dist/kiro-usage-run.js.map +1 -0
- package/dist/kiro-usage-scan.d.ts +49 -0
- package/dist/kiro-usage-scan.js +223 -0
- package/dist/kiro-usage-scan.js.map +1 -0
- package/dist/kiro-usage-worker.d.ts +1 -0
- package/dist/kiro-usage-worker.js +10 -0
- package/dist/kiro-usage-worker.js.map +1 -0
- package/dist/kiro-usage.d.ts +58 -0
- package/dist/kiro-usage.js +310 -0
- package/dist/kiro-usage.js.map +1 -0
- package/dist/locale.js +88 -8
- package/dist/locale.js.map +1 -1
- package/dist/log-service.js +1 -1
- package/dist/log-service.js.map +1 -1
- package/dist/login-url.d.ts +4 -0
- package/dist/login-url.js +22 -0
- package/dist/login-url.js.map +1 -0
- package/dist/needs-you-hub.d.ts +2 -1
- package/dist/needs-you-hub.js +1 -1
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +8 -2
- package/dist/needs-you.js +6 -0
- package/dist/needs-you.js.map +1 -1
- package/dist/notice-delivery.d.ts +16 -0
- package/dist/notice-delivery.js +35 -0
- package/dist/notice-delivery.js.map +1 -0
- package/dist/office-share-page.d.ts +16 -0
- package/dist/office-share-page.js +85 -0
- package/dist/office-share-page.js.map +1 -0
- package/dist/office-share-service.d.ts +91 -0
- package/dist/office-share-service.js +176 -0
- package/dist/office-share-service.js.map +1 -0
- package/dist/office-share.d.ts +258 -0
- package/dist/office-share.js +549 -0
- package/dist/office-share.js.map +1 -0
- package/dist/opencode-usage-scan.d.ts +28 -0
- package/dist/opencode-usage-scan.js +92 -0
- package/dist/opencode-usage-scan.js.map +1 -0
- package/dist/opencode-usage-worker.d.ts +1 -0
- package/dist/opencode-usage-worker.js +10 -0
- package/dist/opencode-usage-worker.js.map +1 -0
- package/dist/outbound-handlers.js +22 -2
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +26 -2
- package/dist/outbound-schemas.js +27 -2
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/public-web-gateway.js +7 -1
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/quickstart-api.js +13 -2
- package/dist/quickstart-api.js.map +1 -1
- package/dist/quickstart.js +2 -1
- package/dist/quickstart.js.map +1 -1
- package/dist/remote-card-answer.d.ts +83 -0
- package/dist/remote-card-answer.js +208 -0
- package/dist/remote-card-answer.js.map +1 -0
- package/dist/reply-triggers.d.ts +2 -0
- package/dist/reply-triggers.js +3 -0
- package/dist/reply-triggers.js.map +1 -0
- package/dist/settings-api.d.ts +2 -0
- package/dist/settings-api.js +41 -16
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +17 -14
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.js +7 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-instance-patch.js +4 -1
- package/dist/settings-instance-patch.js.map +1 -1
- package/dist/setup-form.d.ts +1 -1
- package/dist/setup-form.js +55 -6
- package/dist/setup-form.js.map +1 -1
- package/dist/setup-host.d.ts +9 -0
- package/dist/setup-host.js +127 -6
- package/dist/setup-host.js.map +1 -1
- package/dist/setup-signin-assets.d.ts +2 -0
- package/dist/setup-signin-assets.js +6 -0
- package/dist/setup-signin-assets.js.map +1 -0
- package/dist/setup-wizard.js +2 -0
- package/dist/setup-wizard.js.map +1 -1
- package/dist/structured-signin-transport.d.ts +8 -0
- package/dist/structured-signin-transport.js +79 -0
- package/dist/structured-signin-transport.js.map +1 -0
- package/dist/structured-signin.d.ts +131 -0
- package/dist/structured-signin.js +388 -0
- package/dist/structured-signin.js.map +1 -0
- package/dist/tool-permissions.js +12 -0
- package/dist/tool-permissions.js.map +1 -1
- package/dist/topic-commands.js +6 -2
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-sources.d.ts +26 -2
- package/dist/transcript-sources.js +103 -40
- package/dist/transcript-sources.js.map +1 -1
- package/dist/turn-reply-guard.d.ts +1 -1
- package/dist/turn-reply-guard.js +1 -1
- package/dist/turn-reply-guard.js.map +1 -1
- package/dist/types.d.ts +28 -8
- package/dist/ui/backend-signin.js +63 -10
- package/dist/ui/chat-strings.js +2 -2
- package/dist/ui/fleet-office-editor.js +14 -9
- package/dist/ui/fleet-office-layout.js +70 -32
- package/dist/ui/fleet-office-model.js +6 -3
- package/dist/ui/fleet-office-overview.js +167 -0
- package/dist/ui/fleet-office-pack.d.ts +7 -2
- package/dist/ui/fleet-office-pack.js +119 -15
- package/dist/ui/fleet-office-skin.js +98 -23
- package/dist/ui/fleet-office-store.js +39 -5
- package/dist/ui/fleet-office-view.js +5 -4
- package/dist/ui/fleet-office-zones.js +172 -12
- package/dist/ui/fleet-office.js +547 -186
- package/dist/ui/fleet-usage.js +19 -15
- package/dist/ui/office-share-dialog.js +145 -0
- package/dist/ui/office-share-page.js +164 -0
- package/dist/ui/panel-chat.js +8 -1
- package/dist/ui/panel-log.js +2 -2
- package/dist/ui/panel-needs.js +4 -4
- package/dist/ui/panel-settings.js +37 -11
- package/dist/ui/settings-dialogs.js +8 -1
- package/dist/ui/settings-guests.js +17 -7
- package/dist/ui/settings-model.js +14 -6
- package/dist/ui/settings-registry.js +4 -0
- package/dist/ui/settings-strings.js +16 -2
- package/dist/ui/shared/app-i18n.js +4 -2
- package/dist/ui/shared/app-shell.js +14 -6
- package/dist/ui/shared/app-stream.js +2 -1
- package/dist/ui/shared/app.css +67 -2
- package/dist/ui/shared/office/cozy.png +0 -0
- package/dist/ui/shared/side-panel.js +95 -0
- package/dist/ui/structured-signin.js +115 -0
- package/dist/usage-report.d.ts +20 -0
- package/dist/usage-report.js +54 -17
- package/dist/usage-report.js.map +1 -1
- package/dist/usage-rollup.d.ts +9 -1
- package/dist/usage-rollup.js +20 -4
- package/dist/usage-rollup.js.map +1 -1
- package/dist/web-api.d.ts +18 -0
- package/dist/web-api.js +201 -0
- package/dist/web-api.js.map +1 -1
- package/dist/web-auth.js +1 -1
- package/dist/web-auth.js.map +1 -1
- package/dist/web-backend-login.d.ts +1 -7
- package/dist/web-backend-login.js +2 -24
- package/dist/web-backend-login.js.map +1 -1
- package/dist/web-office-acts.d.ts +173 -0
- package/dist/web-office-acts.js +285 -0
- package/dist/web-office-acts.js.map +1 -0
- package/dist/web-office-skins.d.ts +3 -2
- package/dist/web-office-skins.js +3 -2
- package/dist/web-office-skins.js.map +1 -1
- package/dist/web-office-store.js +40 -7
- package/dist/web-office-store.js.map +1 -1
- package/dist/web-settings-patch.d.ts +2 -1
- package/dist/web-settings-patch.js +4 -1
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/working-recovery.d.ts +2 -2
- package/dist/working-recovery.js +43 -8
- package/dist/working-recovery.js.map +1 -1
- package/dist/working-state-journal.d.ts +2 -0
- package/dist/working-state-journal.js +16 -1
- package/dist/working-state-journal.js.map +1 -1
- package/package.json +3 -2
- package/templates/windows-shortcuts.ps1 +155 -140
|
@@ -18,7 +18,15 @@ import type { DeliveryOutbox } from "./delivery-outbox.js";
|
|
|
18
18
|
export { isFleetStartCommandLine } from "./fleet-lock.js";
|
|
19
19
|
export interface BackendInstallationInfo {
|
|
20
20
|
binary: string;
|
|
21
|
+
/** The install command shown to a person (to copy and run themselves). */
|
|
21
22
|
install: string;
|
|
23
|
+
/**
|
|
24
|
+
* The same install when AgEnD runs it with nobody at the terminal (`/login`'s install window). Codex's
|
|
25
|
+
* install.sh asks "Start Codex now? [y/N]" (and, on a conflict, whether to uninstall) on /dev/tty, so a
|
|
26
|
+
* window nobody types into waits until the install times out; CODEX_NON_INTERACTIVE=1 skips both questions.
|
|
27
|
+
* Omitted: `install` runs as it is.
|
|
28
|
+
*/
|
|
29
|
+
unattended?: string;
|
|
22
30
|
/**
|
|
23
31
|
* #1092: where this backend's own installer puts the binary, read from the
|
|
24
32
|
* installer script itself. `/login`'s install verifies on a fresh login shell
|
|
@@ -193,6 +201,8 @@ export interface IncidentEventSource {
|
|
|
193
201
|
isCodexLivePane?(): Promise<boolean>;
|
|
194
202
|
/** Existing occurrence count used to preserve Codex capacity history on restart. */
|
|
195
203
|
getErrorPatternOccurrenceCount?(type: "model_error", pattern: RegExp): number;
|
|
204
|
+
/** #2648: kiro only — what a model error on its current launch should do (restart once, say once, or nothing). */
|
|
205
|
+
kiroModelError?(): import("./backend/kiro-retired-model.js").KiroModelErrorVerdict | null;
|
|
196
206
|
/** Present on real daemons; hang buttons attach only when it returns one. */
|
|
197
207
|
getHangDetector?(): {
|
|
198
208
|
on(event: string, handler: (...args: any[]) => void): unknown;
|
|
@@ -435,6 +445,15 @@ export declare class InstanceLifecycle {
|
|
|
435
445
|
* up, and the operator needs to know which conversation each instance is in.
|
|
436
446
|
*/
|
|
437
447
|
attachLaunchWarningHandler(name: string, daemon: IncidentEventSource): void;
|
|
448
|
+
/**
|
|
449
|
+
* The daemon gave up resuming after repeated startup failures and started a
|
|
450
|
+
* fresh conversation (#737, #749). Without this the only trace was an error
|
|
451
|
+
* line in daemon.log. Attached before start, because the startup spawn is
|
|
452
|
+
* where it happens; and never suppressed for a planned restart, which is
|
|
453
|
+
* exactly when the user expects the conversation to carry on. A ClassicBot's
|
|
454
|
+
* channel is the end user's chat, so its notice goes to General only.
|
|
455
|
+
*/
|
|
456
|
+
attachContextLostHandler(name: string, daemon: IncidentEventSource): void;
|
|
438
457
|
/**
|
|
439
458
|
* Daemon delivery events → the status reaction on the inbound message. The
|
|
440
459
|
* emoji for each status comes from config (#1005); this only names it.
|
|
@@ -8,7 +8,7 @@ import { execFileSync } from "node:child_process";
|
|
|
8
8
|
import { join, basename, dirname, resolve, sep as pathSep } from "node:path";
|
|
9
9
|
import { access } from "node:fs/promises";
|
|
10
10
|
import { getAgendHome, ensureWorkspaceGit } from "./paths.js";
|
|
11
|
-
import { DEFAULT_INSTANCE_CONFIG, getEffectiveInstanceDefaults, getTmuxSession } from "./config.js";
|
|
11
|
+
import { DEFAULT_INSTANCE_CONFIG, getEffectiveInstanceDefaults, getTmuxSession, newInstanceKiroUi } from "./config.js";
|
|
12
12
|
import { readStatuslineModel, uniqueInstanceName } from "./topic-commands.js";
|
|
13
13
|
import { isModelCompatible } from "./backend/types.js";
|
|
14
14
|
import { safeHandler } from "./safe-async.js";
|
|
@@ -39,6 +39,7 @@ export const BACKEND_INSTALLATION_INFO = {
|
|
|
39
39
|
// a symlink into ~/.codex/packages/standalone/current/bin (#1092).
|
|
40
40
|
codex: {
|
|
41
41
|
binary: "codex", install: "curl -fsSL https://chatgpt.com/codex/install.sh | sh",
|
|
42
|
+
unattended: "curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_NON_INTERACTIVE=1 sh",
|
|
42
43
|
binDirs: (env, home) => [env.CODEX_INSTALL_DIR, localBin(home)].filter((d) => !!d),
|
|
43
44
|
},
|
|
44
45
|
opencode: { binary: "opencode", install: "curl -fsSL https://opencode.ai/install | bash", binDirs: (_env, home) => [join(home, ".opencode", "bin")] },
|
|
@@ -554,6 +555,27 @@ export class InstanceLifecycle {
|
|
|
554
555
|
this.ctx.notifyInstanceTopic(name, t("inst.backend_launch_warning", name, data.message));
|
|
555
556
|
}, this.ctx.logger, `daemon.backend_launch_warning[${name}]`));
|
|
556
557
|
}
|
|
558
|
+
/**
|
|
559
|
+
* The daemon gave up resuming after repeated startup failures and started a
|
|
560
|
+
* fresh conversation (#737, #749). Without this the only trace was an error
|
|
561
|
+
* line in daemon.log. Attached before start, because the startup spawn is
|
|
562
|
+
* where it happens; and never suppressed for a planned restart, which is
|
|
563
|
+
* exactly when the user expects the conversation to carry on. A ClassicBot's
|
|
564
|
+
* channel is the end user's chat, so its notice goes to General only.
|
|
565
|
+
*/
|
|
566
|
+
attachContextLostHandler(name, daemon) {
|
|
567
|
+
daemon.on("context_lost", safeHandler((_name, reason, attempts) => {
|
|
568
|
+
this.ctx.eventLog?.insert(name, "context_lost", { reason, ...(attempts != null ? { attempts } : {}) });
|
|
569
|
+
this.ctx.logger.warn({ name, reason, attempts }, "Instance started a fresh conversation — previous context lost");
|
|
570
|
+
const tries = attempts != null ? String(attempts) : "?";
|
|
571
|
+
if (!this.ctx.isClassicInstance?.(name))
|
|
572
|
+
this.ctx.notifyInstanceTopic(name, t("inst.context_lost", name, tries));
|
|
573
|
+
const general = this.findGeneralInstance();
|
|
574
|
+
if (general && general !== name)
|
|
575
|
+
this.ctx.notifyInstanceTopic(general, t("inst.context_lost_general", name, tries));
|
|
576
|
+
this.ctx.webhookEmit("context_lost", name, { reason, ...(attempts != null ? { attempts } : {}) });
|
|
577
|
+
}, this.ctx.logger, `daemon.context_lost[${name}]`));
|
|
578
|
+
}
|
|
557
579
|
/**
|
|
558
580
|
* Daemon delivery events → the status reaction on the inbound message. The
|
|
559
581
|
* emoji for each status comes from config (#1005); this only names it.
|
|
@@ -787,9 +809,8 @@ export class InstanceLifecycle {
|
|
|
787
809
|
recovered: data.recovered,
|
|
788
810
|
...(data.recoveryStarted ? { recoveryStarted: true } : {}),
|
|
789
811
|
});
|
|
790
|
-
// The reply guard
|
|
791
|
-
//
|
|
792
|
-
// instance-topic malformed-call notice.
|
|
812
|
+
// The reply guard owns recovery and log-only detection. Do not duplicate
|
|
813
|
+
// a possible false alarm with the older instance-topic malformed-call notice.
|
|
793
814
|
if (data.recoveryStarted)
|
|
794
815
|
return;
|
|
795
816
|
const notificationTarget = this.ptyErrorNotificationTarget(name);
|
|
@@ -803,6 +824,7 @@ export class InstanceLifecycle {
|
|
|
803
824
|
generation: data.generation,
|
|
804
825
|
reason: data.reason,
|
|
805
826
|
recoveryStarted: data.recoveryStarted,
|
|
827
|
+
...(data.message ? { message: data.message } : {}),
|
|
806
828
|
});
|
|
807
829
|
this.ctx.logger.warn(data, "Turn ended without an adapter-confirmed reply");
|
|
808
830
|
}, this.ctx.logger, `daemon.reply_drop_detected[${name}]`));
|
|
@@ -818,6 +840,7 @@ export class InstanceLifecycle {
|
|
|
818
840
|
correlationId: data.correlationId,
|
|
819
841
|
generation: data.generation,
|
|
820
842
|
reason: data.reason,
|
|
843
|
+
...(data.message ? { message: data.message } : {}),
|
|
821
844
|
});
|
|
822
845
|
this.ctx.logger.error(data, "Reply-drop recovery ended without a delivered reply");
|
|
823
846
|
}, this.ctx.logger, `daemon.reply_drop_unrecovered[${name}]`));
|
|
@@ -989,15 +1012,30 @@ export class InstanceLifecycle {
|
|
|
989
1012
|
return;
|
|
990
1013
|
}
|
|
991
1014
|
}
|
|
1015
|
+
// #2648: a kiro model error — the resumed conversation's saved model retired, or the instance's own model
|
|
1016
|
+
// unavailable. Restart once on kiro's default (no model of its own), else say it once; never on every start.
|
|
1017
|
+
const kiroVerdict = data.type === "model_error" && this.backendOf(name) === "kiro-cli" ? daemon.kiroModelError?.() ?? null : null;
|
|
1018
|
+
if (kiroVerdict?.kind === "restart") {
|
|
1019
|
+
this.ctx.logger.warn({ name, model: kiroVerdict.model }, "kiro model unavailable on a resumed conversation — restarting once on kiro's default model");
|
|
1020
|
+
this.ctx.clearCancelButton(name);
|
|
1021
|
+
this.ctx.restartSingleInstance(name).catch(err => this.ctx.logger.error({ err, name }, "kiro model-switch restart failed"));
|
|
1022
|
+
return;
|
|
1023
|
+
}
|
|
1024
|
+
if (kiroVerdict?.kind === "quiet") {
|
|
1025
|
+
this.ctx.logger.info({ name }, "kiro model unavailable — already said for this conversation and model");
|
|
1026
|
+
return;
|
|
1027
|
+
}
|
|
992
1028
|
const emoji = data.type === "rate_limit" || data.type === "timeout" ? "⏳" : data.type === "auth_error" ? "🔑" : "⚠️";
|
|
993
|
-
const incidentMessage =
|
|
994
|
-
? (()
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1029
|
+
const incidentMessage = kiroVerdict?.kind === "notify"
|
|
1030
|
+
? (kiroVerdict.configured ? t("kiro.model_unavailable_configured", name, kiroVerdict.configured) : t("kiro.model_unavailable_once", name))
|
|
1031
|
+
: data.type === "model_error" && this.backendOf(name) === "claude-code"
|
|
1032
|
+
? (() => {
|
|
1033
|
+
const liveModel = readStatuslineModel(this.ctx.dataDir, name);
|
|
1034
|
+
return liveModel
|
|
1035
|
+
? t("inst.claude_model_fallback", liveModel)
|
|
1036
|
+
: t("inst.claude_model_unavailable");
|
|
1037
|
+
})()
|
|
1038
|
+
: data.message;
|
|
1001
1039
|
const notificationTarget = this.ptyErrorNotificationTarget(name);
|
|
1002
1040
|
// Auth failures are a property of the BACKEND's shared credentials, not of
|
|
1003
1041
|
// one instance: every instance on that CLI fails at once, and one re-login
|
|
@@ -1363,6 +1401,7 @@ export class InstanceLifecycle {
|
|
|
1363
1401
|
// warning synchronously inside Daemon.start, long before
|
|
1364
1402
|
// attachIncidentHandlers runs (#984).
|
|
1365
1403
|
this.attachLaunchWarningHandler(name, daemon);
|
|
1404
|
+
this.attachContextLostHandler(name, daemon);
|
|
1366
1405
|
daemon.on("durable_delivery_deferred", (data) => {
|
|
1367
1406
|
// A daemon without its outbox port cannot update the row directly. The
|
|
1368
1407
|
// lifecycle owns the same-process store and records a bounded pre-write
|
|
@@ -2110,6 +2149,10 @@ export class InstanceLifecycle {
|
|
|
2110
2149
|
&& !isModelCompatible(instanceConfig.backend, instanceConfig.model)) {
|
|
2111
2150
|
delete instanceConfig.model;
|
|
2112
2151
|
}
|
|
2152
|
+
// #2598: a new kiro instance is written with the TUI engine, explicitly (an unset one is classic).
|
|
2153
|
+
const newKiroUi = newInstanceKiroUi(instanceConfig.backend, this.ctx.fleetConfig?.defaults);
|
|
2154
|
+
if (newKiroUi)
|
|
2155
|
+
instanceConfig.kiro_ui = newKiroUi;
|
|
2113
2156
|
createdConfig = instanceConfig;
|
|
2114
2157
|
const beforeCreate = structuredClone(this.ctx.fleetConfig);
|
|
2115
2158
|
const persist = () => {
|