Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

fix(ok): "Open in Pi / OpenCode" falls back to a bare terminal (PRD-7968) (#3561)

serafin-garcia121a853c3b48
diff --git a/packages/app/src/components/TerminalCliMissingBanner.tsx b/packages/app/src/components/TerminalCliMissingBanner.tsx
index d35e24ee7..60173fc5b 100644
--- a/packages/app/src/components/TerminalCliMissingBanner.tsx
+++ b/packages/app/src/components/TerminalCliMissingBanner.tsx
@@ -35,6 +35,7 @@ export function TerminalCliMissingBanner({
return (
<div
role="status"
+ data-testid="terminal-cli-missing-banner"
className="flex shrink-0 items-center gap-3 border-border border-b bg-muted px-3 py-2 text-foreground text-xs"
>
<p className="min-w-0 flex-1">
diff --git a/packages/app/src/components/TerminalCliUnverifiedBanner.dom.test.tsx b/packages/app/src/components/TerminalCliUnverifiedBanner.dom.test.tsx
new file mode 100644
index 000000000..9421a8ca1
--- /dev/null
+++ b/packages/app/src/components/TerminalCliUnverifiedBanner.dom.test.tsx
@@ -0,0 +1,59 @@
+/**
+ * Behavioral tests for the docked-terminal unverified-CLI banner — the sibling
+ * of TerminalCliMissingBanner for the UNVERIFIED (probe failed / IPC rejected)
+ * verdict. Asserts the copy names the brand + binary without claiming absence,
+ * the strip carries the status role + testid the launch gate dispatches on, and
+ * the dismiss control fires `onDismiss`.
+ */
+
+import * as actualLinguiMacro from '@lingui/react/macro';
+import { cleanup, render, screen } from '@testing-library/react';
+import userEvent from '@testing-library/user-event';
+import type { ReactNode } from 'react';
+import { afterEach, describe, expect, test, vi } from 'vitest';
+
+vi.doMock('@lingui/react/macro', () => ({
+ ...actualLinguiMacro,
+ Trans: ({ children }: { children: ReactNode }) => <>{children}</>,
+ useLingui: () => ({
+ t: (strings: TemplateStringsArray, ...values: unknown[]) =>
+ strings.reduce((acc, part, index) => `${acc}${part}${values[index] ?? ''}`, ''),
+ }),
+}));
+
+const { TerminalCliUnverifiedBanner } = await import('./TerminalCliUnverifiedBanner');
+
+describe('TerminalCliUnverifiedBanner', () => {
+ afterEach(() => {
+ cleanup();
+ });
+
+ test('names the brand + binary without claiming absence, as an announced status strip', () => {
+ render(<TerminalCliUnverifiedBanner cli="codex" onDismiss={() => {}} />);
+
+ // Message names the brand + the actual binary so triage knows which probe
+ // degraded — but never the positive "isn't installed" claim (the verdict is
+ // unverified, not verified-absent).
+ expect(screen.getByText(/Couldn't verify that Codex \(codex\) is available/)).toBeTruthy();
+ expect(screen.queryByText(/isn't installed/)).toBeNull();
+
+ const banner = screen.getByTestId('terminal-cli-unverified-banner');
+ expect(banner.getAttribute('role')).toBe('status');
+ });
+
+ test('renders the registry binary for a CLI whose bin differs from its id', () => {
+ render(<TerminalCliUnverifiedBanner cli="cursor" onDismiss={() => {}} />);
+
+ expect(
+ screen.getByText(/Couldn't verify that Cursor \(cursor-agent\) is available/),
+ ).toBeTruthy();
+ });
+
+ test('the dismiss control fires onDismiss', async () => {
+ const onDismiss = vi.fn(() => {});
+ render(<TerminalCliUnverifiedBanner cli="claude" onDismiss={onDismiss} />);
+
+ await userEvent.click(screen.getByRole('button', { name: 'Dismiss' }));
+ expect(onDismiss).toHaveBeenCalledTimes(1);
+ });
+});
diff --git a/packages/app/src/components/TerminalCliUnverifiedBanner.tsx b/packages/app/src/components/TerminalCliUnverifiedBanner.tsx
new file mode 100644
index 000000000..8d2e5d9b8
--- /dev/null
+++ b/packages/app/src/components/TerminalCliUnverifiedBanner.tsx
@@ -0,0 +1,49 @@
+/**
+ * Unverified-CLI banner for the docked terminal. When an "Open in <Agent>"
+ * launch cannot VERIFY the CLI's presence (the login-shell probe timed out or
+ * failed, or the preflight IPC itself rejected), the panel suppresses the bake
+ * and renders this strip over the plain-shell fallback.
+ *
+ * Sibling of `TerminalCliMissingBanner`, which handles the verified `not-found`
+ * verdict. The two are deliberately distinct: the probe producer's contract
+ * (claude-readiness) forbids presenting an UNKNOWN as positive absence, so this
+ * copy makes no absence claim — the binary may well be installed while the
+ * probe flaked. Like its sibling it is `role="status"` (announced when it
+ * appears) and dismissible.
+ */
+import { TERMINAL_CLIS, type TerminalCli } from '@inkeep/open-knowledge-core';
+import { useLingui } from '@lingui/react/macro';
+import { X } from 'lucide-react';
+import { Button } from '@/components/ui/button';
+
+interface TerminalCliUnverifiedBannerProps {
+ readonly cli: TerminalCli;
+ /** Dismiss the banner for this panel session. */
+ readonly onDismiss: () => void;
+}
+
+export function TerminalCliUnverifiedBanner({ cli, onDismiss }: TerminalCliUnverifiedBannerProps) {
+ const { t } = useLingui();
+ const { bin, displayName } = TERMINAL_CLIS[cli];
+
+ return (
+ <div
+ role="status"
+ data-testid="terminal-cli-unverified-banner"
+ className="flex shrink-0 items-center gap-3 border-border border-b bg-muted px-3 py-2 text-foreground text-xs"
+ >
+ <p className="min-w-0 flex-1">
+ {t`Couldn't verify that ${displayName} (${bin}) is available, so this is a plain shell. You can still run ${bin} yourself.`}
+ </p>
+ <Button
+ size="icon"
+ variant="ghost"
+ aria-label={t`Dismiss`}
+ className="size-6 shrink-0"
+ onClick={onDismiss}
+ >
+ <X aria-hidden="true" className="size-4" />
+ </Button>
+ </div>
+ );
+}
diff --git a/packages/app/src/components/TerminalPanel.launch.dom.test.tsx b/packages/app/src/components/TerminalPanel.launch.dom.test.tsx
index 33dbc10a7..9aa02b83c 100644
--- a/packages/app/src/components/TerminalPanel.launch.dom.test.tsx
+++ b/packages/app/src/components/TerminalPanel.launch.dom.test.tsx
@@ -326,6 +326,9 @@ describe('TerminalPanel "Open in terminal" launch (baked into the PTY spawn)', (
expect(bakedLaunch(terminal.create)).toBeUndefined();
expect(launchInputWrites(terminal.input)).toEqual([]);
await screen.findByText(/Claude Code \(claude\) isn't installed/);
+ // Genuine absence is the verified state — the unverified presentation
+ // must not appear alongside (the two verdicts stay distinguishable).
+ expect(screen.queryByTestId('terminal-cli-unverified-banner')).toBeNull();
});
test('bakes a BARE claude command (no pre-approval) when claude is present but OK tools need a rewire', async () => {
@@ -362,10 +365,13 @@ describe('TerminalPanel "Open in terminal" launch (baked into the PTY spawn)', (
expect(terminal.claudePreflight).toHaveBeenCalled();
});
- test('a claude launch-preflight REJECTION spawns a plain shell + surfaces the banner (no command-not-found)', async () => {
- // If the launch-time preflight IPC throws, presence is unconfirmed — suppress
+ test('a claude launch-preflight REJECTION spawns a plain shell + surfaces the UNVERIFIED banner (never "isn\'t installed")', async () => {
+ // If the launch-time preflight IPC throws, presence is UNCONFIRMED — suppress
// the bake so the terminal can't show a raw `command not found`, and surface
- // the readiness banner so the user gets feedback rather than a silent no-op.
+ // feedback. But an unverified verdict must not be presented as positive
+ // absence (the probe's contract in claude-readiness.ts: the caller must not
+ // render a "not installed" message off an UNKNOWN) — the unverified state
+ // gets its own distinguishable presentation.
const { bridge, terminal } = makeBridge();
terminal.claudePreflight = vi.fn(async () => {
throw new Error('ipc boom');
@@ -375,14 +381,18 @@ describe('TerminalPanel "Open in terminal" launch (baked into the PTY spawn)', (
await waitFor(() => expect(terminal.create).toHaveBeenCalledTimes(1));
expect(bakedLaunch(terminal.create)).toBeUndefined();
expect(launchInputWrites(terminal.input)).toEqual([]);
- await screen.findByText(/Claude Code \(claude\) isn't installed/);
+ expect(screen.queryByText(/isn't installed/)).toBeNull();
+ const banner = await screen.findByTestId('terminal-cli-unverified-banner');
+ expect(banner.getAttribute('role')).toBe('status');
});
- test('claude launch-time verdict UNKNOWN spawns a plain shell + surfaces the banner (unknown→not-found for display)', async () => {
- // resolveLaunchCommand maps an `unknown` preflight to a not-found-for-display
- // banner and suppresses the bake (no raw command-not-found, never a silent
- // no-op). Guards the `fresh.claude === 'not-found' ? fresh : {...}` mapping —
- // an inverted/widened ternary would either show no banner or a false one.
+ test('claude launch-time verdict UNKNOWN spawns a plain shell + surfaces the UNVERIFIED banner (never "isn\'t installed")', async () => {
+ // An `unknown` preflight verdict (probe timed out / failed while claude may
+ // well be installed) must suppress the bake AND surface feedback — but as an
+ // unverified state distinguishable from a genuine not-found. Collapsing it
+ // into the "isn't installed" banner presents a false positive-absence claim
+ // off a flaky probe (the exact conflation the probe's producer contract in
+ // claude-readiness.ts forbids).
const { bridge, terminal } = makeBridge({
claude: 'unknown',
mcp: 'needs-rewire',
@@ -393,7 +403,9 @@ describe('TerminalPanel "Open in terminal" launch (baked into the PTY spawn)', (
await waitFor(() => expect(terminal.create).toHaveBeenCalledTimes(1));
expect(bakedLaunch(terminal.create)).toBeUndefined();
expect(launchInputWrites(terminal.input)).toEqual([]);
- await screen.findByText(/Claude Code \(claude\) isn't installed/);
+ expect(screen.queryByText(/isn't installed/)).toBeNull();
+ const banner = await screen.findByTestId('terminal-cli-unverified-banner');
+ expect(banner.getAttribute('role')).toBe('status');
});
test('codex launch probes cliPreflight and bakes the codex command', async () => {
@@ -475,10 +487,12 @@ describe('TerminalPanel "Open in terminal" launch (baked into the PTY spawn)', (
await waitFor(() => expect(terminal.create).toHaveBeenCalledTimes(1));
expect(bakedLaunch(terminal.create)).toBeUndefined();
await screen.findByText(/Codex \(codex\) isn't installed/);
+ // Verified absence renders the missing-CLI banner, not the unverified one.
+ expect(screen.queryByTestId('terminal-cli-unverified-banner')).toBeNull();
expect(launchInputWrites(terminal.input)).toEqual([]);
});
- test('cursor probe UNKNOWN re-probes once; still-unknown spawns plain + shows the banner', async () => {
+ test('cursor probe UNKNOWN re-probes once; still-unknown spawns plain + shows the UNVERIFIED banner (never "isn\'t installed")', async () => {
const { bridge, terminal } = makeBridge(WIRED, { onPath: 'unknown' });
render(<TerminalPanel bridge={bridge} launch={{ prompt: 'hi', cli: 'cursor', nonce: 1 }} />);
@@ -486,7 +500,13 @@ describe('TerminalPanel "Open in terminal" launch (baked into the PTY spawn)', (
// Probed twice (initial + one re-probe) before deciding to suppress.
expect(terminal.cliPreflight).toHaveBeenCalledTimes(2);
expect(bakedLaunch(terminal.create)).toBeUndefined();
- await screen.findByText(/Cursor \(cursor-agent\) isn't installed/);
+ // A still-unknown verdict is an UNVERIFIED state, not a verified absence:
+ // the binary may be present while the probe flaked. Feedback must appear,
+ // but the positive "isn't installed" claim is reserved for a genuine
+ // not-found (the probe's producer contract in claude-readiness.ts).
+ expect(screen.queryByText(/isn't installed/)).toBeNull();
+ const banner = await screen.findByTestId('terminal-cli-unverified-banner');
+ expect(banner.getAttribute('role')).toBe('status');
});
test('cursor probe UNKNOWN then PRESENT on re-probe: bakes the preserved prompt', async () => {
@@ -503,7 +523,9 @@ describe('TerminalPanel "Open in terminal" launch (baked into the PTY spawn)', (
expect(bakedLaunch(terminal.create)).toBe("cursor-agent 'hi'");
});
- test('cliPreflight IPC rejection spawns plain + surfaces the banner (no raw command-not-found)', async () => {
+ test('cliPreflight IPC rejection spawns plain + surfaces the UNVERIFIED banner (never "isn\'t installed")', async () => {
+ // An IPC failure means presence was never verified — same unverified state
+ // as a still-unknown probe, never the positive-absence banner.
const { bridge, terminal } = makeBridge(WIRED);
terminal.cliPreflight = vi.fn(async () => {
throw new Error('ipc channel closed');
@@ -512,7 +534,9 @@ describe('TerminalPanel "Open in terminal" launch (baked into the PTY spawn)', (
await waitFor(() => expect(terminal.create).toHaveBeenCalledTimes(1));
expect(bakedLaunch(terminal.create)).toBeUndefined();
- await screen.findByText(/Codex \(codex\) isn't installed/);
+ expect(screen.queryByText(/isn't installed/)).toBeNull();
+ const banner = await screen.findByTestId('terminal-cli-unverified-banner');
+ expect(banner.getAttribute('role')).toBe('status');
expect(launchInputWrites(terminal.input)).toEqual([]);
});
diff --git a/packages/app/src/components/TerminalPanel.tsx b/packages/app/src/components/TerminalPanel.tsx
index 34bca7e4d..82b82eaed 100644
--- a/packages/app/src/components/TerminalPanel.tsx
+++ b/packages/app/src/components/TerminalPanel.tsx
@@ -25,6 +25,7 @@ import type { TerminalLaunchIntent } from './EditorPane';
import { filesFromExternalDrop, isExternalFileDrag } from './file-tree-adapter';
import { type TerminalCommandId, terminalCommandFor } from './handoff/terminal-command-events';
import { TerminalCliMissingBanner } from './TerminalCliMissingBanner';
+import { TerminalCliUnverifiedBanner } from './TerminalCliUnverifiedBanner';
import { type TerminalExitInfo, TerminalExitNotice } from './TerminalExitNotice';
import { TerminalRefusalNotice } from './TerminalRefusalNotice';
import { createTerminalFileLinkProvider } from './terminal-link-provider';
@@ -219,9 +220,19 @@ function TerminalSession({
const [exitInfo, setExitInfo] = useState<TerminalExitInfo | null>(null);
// Live PTY id, mirrored out of the mount effect for the keyboard handlers.
const ptyIdRef = useRef<string | null>(null);
- // Set when a codex/cursor/opencode launch probed `not-found` on PATH — drives
- // the missing-CLI banner. Claude uses its own readiness banner instead.
- const [missingCli, setMissingCli] = useState<TerminalCli | null>(null);
+ // Set when a launch suppressed its bake off a non-`present` verdict — drives
+ // the per-CLI banner strip. `not-found` is the VERIFIED absence (the probe
+ // ran and the binary is genuinely off the PATH); `unverified` covers a
+ // still-unknown probe and a rejected preflight IPC, where the binary may
+ // well be installed — the probe contract forbids presenting that as
+ // "isn't installed". A genuine claude not-found routes through the richer
+ // readiness banner instead (`setReadiness`), so `not-found` here is
+ // non-claude only.
+ const [cliNotice, setCliNotice] = useState<
+ | { cli: TerminalCli; kind: 'unverified' }
+ | { cli: Exclude<TerminalCli, 'claude'>; kind: 'not-found' }
+ | null
+ >(null);
// Auto-approve OK's own tools for the baked launch (user-scope preference,
// default on). Read the config context nullably (`use`, not `useConfigContext`)
@@ -672,14 +683,17 @@ function TerminalSession({
// the tab back to a fresh interactive shell after the agent exits.
//
// The bake is gated on a CLI confirmed present on PATH — exactly today's
- // guarantee that the terminal never shows a raw `command not found`. A not-
- // present / unknown / IPC-failure verdict returns undefined (spawn a plain
- // shell) and surfaces a banner: this function is the ONLY producer of the
- // claude readiness verdict (launch-less sessions carry no claude intent and
- // never probe — see attachSession), and sets the missing-CLI banner for
- // codex/cursor/opencode. The claude probe here doubles as the launch-time MCP
- // pre-approval check — as fresh as the on-disk `.mcp.json` gets, since it runs
- // immediately before the spawn.
+ // guarantee that the terminal never shows a raw `command not found`. Any
+ // other verdict returns undefined (spawn a plain shell) and surfaces a
+ // banner keyed to what the probe actually established: verified `not-found`
+ // gets the actionable not-installed banner, while a still-`unknown` probe or
+ // a rejected preflight IPC gets the distinct unverified strip (presenting an
+ // unverified verdict as absence is the conflation the probe's producer
+ // contract forbids). This function is the ONLY producer of the claude
+ // readiness verdict (launch-less sessions carry no claude intent and never
+ // probe — see attachSession). The claude probe here doubles as the
+ // launch-time MCP pre-approval check — as fresh as the on-disk `.mcp.json`
+ // gets, since it runs immediately before the spawn.
const resolveLaunchCommand = async (
intent: TerminalLaunchIntent,
): Promise<string | undefined> => {
@@ -700,25 +714,25 @@ function TerminalSession({
autoApproveOkTools: autoApproveOkToolsRef.current && fresh.mcpPreApprovable === true,
});
}
- // Not confirmed present (not-found OR unknown) — suppress the bake and
- // surface the readiness banner so the user always gets feedback. The
- // banner hides for `unknown` by design (a flaky probe must never show a
- // false "not installed"), so map a lingering `unknown` to not-found FOR
- // DISPLAY only — by here the launch-time verdict is treated as unconfirmed.
+ // Not confirmed present — suppress the bake and surface feedback. A
+ // verified `not-found` gets the readiness banner's actionable
+ // not-installed message; a lingering `unknown` is an UNVERIFIED
+ // verdict, and the probe's producer contract forbids rendering a
+ // "not installed" claim off it — it gets the distinct unverified
+ // strip instead.
if (!cancelled) {
- setReadiness(
- fresh.claude === 'not-found'
- ? fresh
- : { claude: 'not-found', mcp: fresh.mcp, mcpPreApprovable: false },
- );
+ if (fresh.claude === 'not-found') {
+ setReadiness(fresh);
+ } else {
+ setCliNotice({ cli: 'claude', kind: 'unverified' });
+ }
}
} catch (err) {
console.warn('[terminal] claude launch preflight failed', err);
- // Unconfirmed (IPC failure) → still surface the banner rather than a
- // silent no-op (there is no "couldn't verify" state).
- if (!cancelled) {
- setReadiness({ claude: 'not-found', mcp: 'needs-rewire', mcpPreApprovable: false });
- }
+ // The preflight IPC itself failed, so presence was never verified —
+ // same unverified state as a still-unknown probe, never a fabricated
+ // not-found.
+ if (!cancelled) setCliNotice({ cli: 'claude', kind: 'unverified' });
}
return undefined;
}
@@ -742,10 +756,20 @@ function TerminalSession({
autoApproveOkToolsRef.current,
});
}
+ // A verified `not-found` gets the actionable missing-CLI banner; a
+ // still-unknown probe stays UNVERIFIED and must not be presented as
+ // absence (the probe's producer contract) — distinct strip instead.
+ if (!cancelled) {
+ setCliNotice({
+ cli: intent.cli,
+ kind: res.onPath === 'not-found' ? 'not-found' : 'unverified',
+ });
+ }
} catch (err) {
console.warn('[terminal] cliPreflight failed', { cli: intent.cli, err });
+ // IPC failure: presence was never verified — same unverified state.
+ if (!cancelled) setCliNotice({ cli: intent.cli, kind: 'unverified' });
}
- if (!cancelled) setMissingCli(intent.cli);
return undefined;
};
@@ -1042,12 +1066,16 @@ function TerminalSession({
onDismiss={() => setReadiness(null)}
/>
) : null}
- {status === 'running' && missingCli ? (
- <TerminalCliMissingBanner
- cli={missingCli}
- bridge={bridge}
- onDismiss={() => setMissingCli(null)}
- />
+ {status === 'running' && cliNotice ? (
+ cliNotice.kind === 'not-found' ? (
+ <TerminalCliMissingBanner
+ cli={cliNotice.cli}
+ bridge={bridge}
+ onDismiss={() => setCliNotice(null)}
+ />
+ ) : (
+ <TerminalCliUnverifiedBanner cli={cliNotice.cli} onDismiss={() => setCliNotice(null)} />
+ )
) : null}
<div ref={containerRef} data-terminal-status={status} className="min-h-0 flex-1 px-1.5" />
{status === 'exited' && exitInfo ? (
diff --git a/packages/app/src/locales/ar/messages.json b/packages/app/src/locales/ar/messages.json
index 8571e5d26..763171621 100644
--- a/packages/app/src/locales/ar/messages.json
+++ b/packages/app/src/locales/ar/messages.json
@@ -3087,6 +3087,15 @@
],
"aM23Wr": ["page-name"],
"aNb3JH": ["نسخ بصيغة YAML"],
+ "aQ37oZ": [
+ "تعذر التحقق من توفر ",
+ ["displayName"],
+ " (",
+ ["bin"],
+ ")، لذا هذه جلسة shell عادية. لا يزال بإمكانك تشغيل ",
+ ["bin"],
+ " بنفسك."
+ ],
"aQD_86": ["فشل تحديث مزوّد التضمينات — ", ["detail"]],
"aQyGJc": ["شيء آخر"],
"aR4DgO": [
diff --git a/packages/app/src/locales/ar/messages.po b/packages/app/src/locales/ar/messages.po
index 448dfd57a..d0bc36dcb 100644
--- a/packages/app/src/locales/ar/messages.po
+++ b/packages/app/src/locales/ar/messages.po
@@ -3868,6 +3868,10 @@ msgstr "تعذّر تحديث مشاركة المهارات"
msgid "Couldn't update skills sharing — {detail}."
msgstr "تعذّر تحديث مشاركة المهارات — {detail}."
+#: src/components/TerminalCliUnverifiedBanner.tsx
+msgid "Couldn't verify that {displayName} ({bin}) is available, so this is a plain shell. You can still run {bin} yourself."
+msgstr "تعذر التحقق من توفر {displayName} ({bin})، لذا هذه جلسة shell عادية. لا يزال بإمكانك تشغيل {bin} بنفسك."
+
#: src/components/settings/settings-fields.ts
msgid "Count skill installs publicly"
msgstr "احتساب تثبيتات المهارة علنًا"
@@ -4426,6 +4430,7 @@ msgstr "يجري قطع الاتصال"
#: src/components/OnboardingCard.tsx
#: src/components/settings/SharingSection.tsx
#: src/components/TerminalCliMissingBanner.tsx
+#: src/components/TerminalCliUnverifiedBanner.tsx
msgid "Dismiss"
msgstr "تجاهل"
diff --git a/packages/app/src/locales/bn/messages.json b/packages/app/src/locales/bn/messages.json
index ef417f3b2..5f23e40d4 100644
--- a/packages/app/src/locales/bn/messages.json
+++ b/packages/app/src/locales/bn/messages.json
@@ -2645,6 +2645,14 @@
],
"aM23Wr": ["page-name"],
"aNb3JH": ["YAML হিসেবে কপি করুন"],
+ "aQ37oZ": [
+ ["displayName"],
+ " (",
+ ["bin"],
+ ") উপলব্ধ কি না তা যাচাই করা যায়নি, তাই এটি একটি সাধারণ শেল। আপনি এখনও নিজে ",
+ ["bin"],
+ " চালাতে পারেন।"
+ ],
"aQD_86": ["এমবেডিং সরবরাহকারী হালনাগাদ করতে ব্যর্থ — ", ["detail"]],
"aQyGJc": ["অন্য কিছু"],
"aR4DgO": [
diff --git a/packages/app/src/locales/bn/messages.po b/packages/app/src/locales/bn/messages.po
index bffd192b9..cebf38b7c 100644
--- a/packages/app/src/locales/bn/messages.po
+++ b/packages/app/src/locales/bn/messages.po
@@ -3864,6 +3864,10 @@ msgstr "স্কিল ভাগাভাগি হালনাগাদ কর
msgid "Couldn't update skills sharing — {detail}."
msgstr "স্কিল ভাগাভাগি হালনাগাদ করা যায়নি — {detail}।"
+#: src/components/TerminalCliUnverifiedBanner.tsx
+msgid "Couldn't verify that {displayName} ({bin}) is available, so this is a plain shell. You can still run {bin} yourself."
+msgstr "{displayName} ({bin}) উপলব্ধ কি না তা যাচাই করা যায়নি, তাই এটি একটি সাধারণ শেল। আপনি এখনও নিজে {bin} চালাতে পারেন।"
+
#: src/components/settings/settings-fields.ts
msgid "Count skill installs publicly"
msgstr "স্কিল ইনস্টলের সংখ্যা প্রকাশ্যে গণনা করুন"
@@ -4422,6 +4426,7 @@ msgstr "সংযোগ বিচ্ছিন্ন করা হচ্ছে"
#: src/components/OnboardingCard.tsx
#: src/components/settings/SharingSection.tsx
#: src/components/TerminalCliMissingBanner.tsx
+#: src/components/TerminalCliUnverifiedBanner.tsx
msgid "Dismiss"
msgstr "সরিয়ে দিন"
diff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.json
index bb4c8793f..d5491c595 100644
--- a/packages/app/src/locales/en/messages.json
+++ b/packages/app/src/locales/en/messages.json
@@ -2697,6 +2697,15 @@
],
"aM23Wr": ["page-name"],
"aNb3JH": ["Copy as YAML"],
+ "aQ37oZ": [
+ "Couldn't verify that ",
+ ["displayName"],
+ " (",
+ ["bin"],
+ ") is available, so this is a plain shell. You can still run ",
+ ["bin"],
+ " yourself."
+ ],
"aQD_86": ["Failed to update the embeddings provider — ", ["detail"]],
"aQyGJc": ["Something else"],
"aR4DgO": [
diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.po
index 137575562..33c0acac6 100644
--- a/packages/app/src/locales/en/messages.po
+++ b/packages/app/src/locales/en/messages.po
@@ -3868,6 +3868,10 @@ msgstr "Couldn't update skills sharing"
msgid "Couldn't update skills sharing — {detail}."
msgstr "Couldn't update skills sharing — {detail}."
+#: src/components/TerminalCliUnverifiedBanner.tsx
+msgid "Couldn't verify that {displayName} ({bin}) is available, so this is a plain shell. You can still run {bin} yourself."
+msgstr "Couldn't verify that {displayName} ({bin}) is available, so this is a plain shell. You can still run {bin} yourself."
+
#: src/components/settings/settings-fields.ts
msgid "Count skill installs publicly"
msgstr "Count skill installs publicly"
@@ -4426,6 +4430,7 @@ msgstr "Disconnecting"
#: src/components/OnboardingCard.tsx
#: src/components/settings/SharingSection.tsx
#: src/components/TerminalCliMissingBanner.tsx
+#: src/components/TerminalCliUnverifiedBanner.tsx
msgid "Dismiss"
msgstr "Dismiss"
diff --git a/packages/app/src/locales/es/messages.json b/packages/app/src/locales/es/messages.json
index 8775a6537..a96e33260 100644
--- a/packages/app/src/locales/es/messages.json
+++ b/packages/app/src/locales/es/messages.json
@@ -3127,6 +3127,15 @@
],
"aM23Wr": ["nombre-de-pagina"],
"aNb3JH": ["Copiar como YAML"],
+ "aQ37oZ": [
+ "No se pudo verificar que ",
+ ["displayName"],
+ " (",
+ ["bin"],
+ ") esté disponible, así que este es un shell normal. Aún puedes ejecutar ",
+ ["bin"],
+ " tú mismo."
+ ],
"aQD_86": ["No se pudo actualizar el proveedor de embeddings — ", ["detail"]],
"aQyGJc": ["Otra cosa"],
"aR4DgO": [
diff --git a/packages/app/src/locales/es/messages.po b/packages/app/src/locales/es/messages.po
index 9b8449339..40f7825fd 100644
--- a/packages/app/src/locales/es/messages.po
+++ b/packages/app/src/locales/es/messages.po
@@ -3868,6 +3868,10 @@ msgstr "No se pudo actualizar la compartición de habilidades"
msgid "Couldn't update skills sharing — {detail}."
msgstr "No se pudo actualizar la compartición de habilidades: {detail}."
+#: src/components/TerminalCliUnverifiedBanner.tsx
+msgid "Couldn't verify that {displayName} ({bin}) is available, so this is a plain shell. You can still run {bin} yourself."
+msgstr "No se pudo verificar que {displayName} ({bin}) esté disponible, así que este es un shell normal. Aún puedes ejecutar {bin} tú mismo."
+
#: src/components/settings/settings-fields.ts
msgid "Count skill installs publicly"
msgstr "Contar públicamente las instalaciones de habilidades"
@@ -4426,6 +4430,7 @@ msgstr "Desconectando"
#: src/components/OnboardingCard.tsx
#: src/components/settings/SharingSection.tsx
#: src/components/TerminalCliMissingBanner.tsx
+#: src/components/TerminalCliUnverifiedBanner.tsx
msgid "Dismiss"
msgstr "Descartar"
diff --git a/packages/app/src/locales/fr/messages.json b/packages/app/src/locales/fr/messages.json
index d1e2557fb..e95be5fb9 100644
--- a/packages/app/src/locales/fr/messages.json
+++ b/packages/app/src/locales/fr/messages.json
@@ -3157,6 +3157,15 @@
],
"aM23Wr": ["page-name"],
"aNb3JH": ["Copier au format YAML"],
+ "aQ37oZ": [
+ "Impossible de vérifier que ",
+ ["displayName"],
+ " (",
+ ["bin"],
+ ") est disponible, ceci est donc un shell ordinaire. Vous pouvez toujours lancer ",
+ ["bin"],
+ " vous-même."
+ ],
"aQD_86": ["Échec de la mise à jour du fournisseur d'embeddings — ", ["detail"]],
"aQyGJc": ["Autre chose"],
"aR4DgO": [
diff --git a/packages/app/src/locales/fr/messages.po b/packages/app/src/locales/fr/messages.po
index e98a87c9e..a6c3df0f5 100644
--- a/packages/app/src/locales/fr/messages.po
+++ b/packages/app/src/locales/fr/messages.po
@@ -3868,6 +3868,10 @@ msgstr "Impossible de mettre à jour le partage des compétences"
msgid "Couldn't update skills sharing — {detail}."
msgstr "Impossible de mettre à jour le partage des compétences — {detail}."
+#: src/components/TerminalCliUnverifiedBanner.tsx
+msgid "Couldn't verify that {displayName} ({bin}) is available, so this is a plain shell. You can still run {bin} yourself."
+msgstr "Impossible de vérifier que {displayName} ({bin}) est disponible, ceci est donc un shell ordinaire. Vous pouvez toujours lancer {bin} vous-même."
+
#: src/components/settings/settings-fields.ts
msgid "Count skill installs publicly"
msgstr "Compter publiquement les installations de compétences"
@@ -4426,6 +4430,7 @@ msgstr "Déconnexion"
#: src/components/OnboardingCard.tsx
#: src/components/settings/SharingSection.tsx
#: src/components/TerminalCliMissingBanner.tsx
+#: src/components/TerminalCliUnverifiedBanner.tsx
msgid "Dismiss"
msgstr "Ignorer"
diff --git a/packages/app/src/locales/hi/messages.json b/packages/app/src/locales/hi/messages.json
index 8e46c8a10..93fcbc9bc 100644
--- a/packages/app/src/locales/hi/messages.json
+++ b/packages/app/src/locales/hi/messages.json
@@ -2628,6 +2628,15 @@
],
"aM23Wr": ["page-name"],
"aNb3JH": ["YAML के रूप में कॉपी करें"],
+ "aQ37oZ": [
+ "यह सत्यापित नहीं हो सका कि ",
+ ["displayName"],
+ " (",
+ ["bin"],
+ ") उपलब्ध है, इसलिए यह एक सादा शेल है। आप फिर भी ",
+ ["bin"],
+ " स्वयं चला सकते हैं।"
+ ],
"aQD_86": ["एम्बेडिंग प्रदाता अपडेट करने में विफल — ", ["detail"]],
"aQyGJc": ["कुछ और"],
"aR4DgO": [
diff --git a/packages/app/src/locales/hi/messages.po b/packages/app/src/locales/hi/messages.po
index 225fe45be..b1d6fa6e0 100644
--- a/packages/app/src/locales/hi/messages.po
+++ b/packages/app/src/locales/hi/messages.po
@@ -3864,6 +3864,10 @@ msgstr "स्किल साझाकरण अपडेट नहीं क
msgid "Couldn't update skills sharing — {detail}."
msgstr "स्किल साझाकरण अपडेट नहीं किया जा सका — {detail}."
+#: src/components/TerminalCliUnverifiedBanner.tsx
+msgid "Couldn't verify that {displayName} ({bin}) is available, so this is a plain shell. You can still run {bin} yourself."
+msgstr "यह सत्यापित नहीं हो सका कि {displayName} ({bin}) उपलब्ध है, इसलिए यह एक सादा शेल है। आप फिर भी {bin} स्वयं चला सकते हैं।"
+
#: src/components/settings/settings-fields.ts
msgid "Count skill installs publicly"
msgstr "स्किल इंस्टॉल की गिनती सार्वजनिक रूप से करें"
@@ -4422,6 +4426,7 @@ msgstr "कनेक्शन तोड़ा जा रहा है"
#: src/components/OnboardingCard.tsx
#: src/components/settings/SharingSection.tsx
#: src/components/TerminalCliMissingBanner.tsx
+#: src/components/TerminalCliUnverifiedBanner.tsx
msgid "Dismiss"
msgstr "ख़ारिज करें"
diff --git a/packages/app/src/locales/id/messages.json b/packages/app/src/locales/id/messages.json
index e63205c53..daed8ebcd 100644
--- a/packages/app/src/locales/id/messages.json
+++ b/packages/app/src/locales/id/messages.json
@@ -2709,6 +2709,15 @@
],
"aM23Wr": ["nama-halaman"],
"aNb3JH": ["Salin sebagai YAML"],
+ "aQ37oZ": [
+ "Tidak dapat memverifikasi bahwa ",
+ ["displayName"],
+ " (",
+ ["bin"],
+ ") tersedia, jadi ini adalah shell biasa. Anda tetap dapat menjalankan ",
+ ["bin"],
+ " sendiri."
+ ],
"aQD_86": ["Gagal memperbarui penyedia embedding — ", ["detail"]],
"aQyGJc": ["Hal lain"],
"aR4DgO": [
diff --git a/packages/app/src/locales/id/messages.po b/packages/app/src/locales/id/messages.po
index 62d2e119e..02bce5da2 100644
--- a/packages/app/src/locales/id/messages.po
+++ b/packages/app/src/locales/id/messages.po
@@ -3864,6 +3864,10 @@ msgstr "Berbagi keterampilan tidak bisa diperbarui"
msgid "Couldn't update skills sharing — {detail}."
msgstr "Berbagi keterampilan tidak bisa diperbarui — {detail}."
+#: src/components/TerminalCliUnverifiedBanner.tsx
+msgid "Couldn't verify that {displayName} ({bin}) is available, so this is a plain shell. You can still run {bin} yourself."
+msgstr "Tidak dapat memverifikasi bahwa {displayName} ({bin}) tersedia, jadi ini adalah shell biasa. Anda tetap dapat menjalankan {bin} sendiri."
+
#: src/components/settings/settings-fields.ts
msgid "Count skill installs publicly"
msgstr "Hitung pemasangan keterampilan secara publik"
@@ -4422,6 +4426,7 @@ msgstr "Memutus koneksi"
#: src/components/OnboardingCard.tsx
#: src/components/settings/SharingSection.tsx
#: src/components/TerminalCliMissingBanner.tsx
+#: src/components/TerminalCliUnverifiedBanner.tsx
msgid "Dismiss"
msgstr "Tutup"
diff --git a/packages/app/src/locales/ko/messages.json b/packages/app/src/locales/ko/messages.json
index 142229574..052b12136 100644
--- a/packages/app/src/locales/ko/messages.json
+++ b/packages/app/src/locales/ko/messages.json
@@ -2604,6 +2604,14 @@
],
"aM23Wr": ["page-name"],
"aNb3JH": ["YAML로 복사"],
+ "aQ37oZ": [
+ ["displayName"],
+ "(",
+ ["bin"],
+ ")이(가) 사용 가능한지 확인할 수 없어 일반 셸이 열렸습니다. 직접 ",
+ ["bin"],
+ "을(를) 실행할 수 있습니다."
+ ],
"aQD_86": ["임베딩 제공업체를 업데이트하지 못했습니다: ", ["detail"]],
"aQyGJc": ["기타"],
"aR4DgO": [
diff --git a/packages/app/src/locales/ko/messages.po b/packages/app/src/locales/ko/messages.po
index 62484b11a..f79fe192b 100644
--- a/packages/app/src/locales/ko/messages.po
+++ b/packages/app/src/locales/ko/messages.po
@@ -3868,6 +3868,10 @@ msgstr "스킬 공유를 업데이트하지 못했습니다"
msgid "Couldn't update skills sharing — {detail}."
msgstr "스킬 공유를 업데이트하지 못했습니다: {detail}."
+#: src/components/TerminalCliUnverifiedBanner.tsx
+msgid "Couldn't verify that {displayName} ({bin}) is available, so this is a plain shell. You can still run {bin} yourself."
+msgstr "{displayName}({bin})이(가) 사용 가능한지 확인할 수 없어 일반 셸이 열렸습니다. 직접 {bin}을(를) 실행할 수 있습니다."
+
#: src/components/settings/settings-fields.ts
msgid "Count skill installs publicly"
msgstr "스킬 설치 횟수를 공개적으로 집계"
@@ -4426,6 +4430,7 @@ msgstr "연결 해제 중"
#: src/components/OnboardingCard.tsx
#: src/components/settings/SharingSection.tsx
#: src/components/TerminalCliMissingBanner.tsx
+#: src/components/TerminalCliUnverifiedBanner.tsx
msgid "Dismiss"
msgstr "닫기"
diff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.json
index 51d1dbda1..632b596f4 100644
--- a/packages/app/src/locales/pseudo/messages.json
+++ b/packages/app/src/locales/pseudo/messages.json
@@ -2697,6 +2697,15 @@
],
"aM23Wr": ["ƥàĝē-ńàḿē"],
"aNb3JH": ["Ćōƥŷ àś ŶÀḾĹ"],
+ "aQ37oZ": [
+ "Ćōũĺďń'ţ vēŕĩƒŷ ţĥàţ ",
+ ["displayName"],
+ " (",
+ ["bin"],
+ ") ĩś àvàĩĺàƀĺē, śō ţĥĩś ĩś à ƥĺàĩń śĥēĺĺ. Ŷōũ ćàń śţĩĺĺ ŕũń ",
+ ["bin"],
+ " ŷōũŕśēĺƒ."
+ ],
"aQD_86": ["Ƒàĩĺēď ţō ũƥďàţē ţĥē ēḿƀēďďĩńĝś ƥŕōvĩďēŕ — ", ["detail"]],
"aQyGJc": ["Śōḿēţĥĩńĝ ēĺśē"],
"aR4DgO": [
diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.po
index 00c51f89f..651ae9dcd 100644
--- a/packages/app/src/locales/pseudo/messages.po
+++ b/packages/app/src/locales/pseudo/messages.po
@@ -3864,6 +3864,10 @@ msgstr ""
msgid "Couldn't update skills sharing — {detail}."
msgstr ""
+#: src/components/TerminalCliUnverifiedBanner.tsx
+msgid "Couldn't verify that {displayName} ({bin}) is available, so this is a plain shell. You can still run {bin} yourself."
+msgstr ""
+
#: src/components/settings/settings-fields.ts
msgid "Count skill installs publicly"
msgstr ""
@@ -4422,6 +4426,7 @@ msgstr ""
#: src/components/OnboardingCard.tsx
#: src/components/settings/SharingSection.tsx
#: src/components/TerminalCliMissingBanner.tsx
+#: src/components/TerminalCliUnverifiedBanner.tsx
msgid "Dismiss"
msgstr ""
diff --git a/packages/app/src/locales/pt-BR/messages.json b/packages/app/src/locales/pt-BR/messages.json
index 864ce3926..5ff43b50c 100644
--- a/packages/app/src/locales/pt-BR/messages.json
+++ b/packages/app/src/locales/pt-BR/messages.json
@@ -3064,6 +3064,15 @@
],
"aM23Wr": ["nome-da-pagina"],
"aNb3JH": ["Copiar como YAML"],
+ "aQ37oZ": [
+ "Não foi possível verificar se ",
+ ["displayName"],
+ " (",
+ ["bin"],
+ ") está disponível, então este é um shell comum. Você ainda pode executar ",
+ ["bin"],
+ " por conta própria."
+ ],
"aQD_86": ["Falha ao atualizar o provedor de embeddings — ", ["detail"]],
"aQyGJc": ["Outra coisa"],
"aR4DgO": [
diff --git a/packages/app/src/locales/pt-BR/messages.po b/packages/app/src/locales/pt-BR/messages.po
index 739ae1893..39cc3b1c2 100644
--- a/packages/app/src/locales/pt-BR/messages.po
+++ b/packages/app/src/locales/pt-BR/messages.po
@@ -3864,6 +3864,10 @@ msgstr "Não deu para atualizar o compartilhamento de habilidades"
msgid "Couldn't update skills sharing — {detail}."
msgstr "Não deu para atualizar o compartilhamento de habilidades — {detail}."
+#: src/components/TerminalCliUnverifiedBanner.tsx
+msgid "Couldn't verify that {displayName} ({bin}) is available, so this is a plain shell. You can still run {bin} yourself."
+msgstr "Não foi possível verificar se {displayName} ({bin}) está disponível, então este é um shell comum. Você ainda pode executar {bin} por conta própria."
+
#: src/components/settings/settings-fields.ts
msgid "Count skill installs publicly"
msgstr "Contar publicamente as instalações de habilidades"
@@ -4422,6 +4426,7 @@ msgstr "Desconectando"
#: src/components/OnboardingCard.tsx
#: src/components/settings/SharingSection.tsx
#: src/components/TerminalCliMissingBanner.tsx
+#: src/components/TerminalCliUnverifiedBanner.tsx
msgid "Dismiss"
msgstr "Dispensar"
diff --git a/packages/app/src/locales/ur/messages.json b/packages/app/src/locales/ur/messages.json
index 8de7d7ac6..0787b0a6b 100644
--- a/packages/app/src/locales/ur/messages.json
+++ b/packages/app/src/locales/ur/messages.json
@@ -2760,6 +2760,15 @@
],
"aM23Wr": ["page-name"],
"aNb3JH": ["YAML کے طور پر نقل کریں"],
+ "aQ37oZ": [
+ "تصدیق نہیں ہو سکی کہ ",
+ ["displayName"],
+ " (",
+ ["bin"],
+ ") دستیاب ہے، اس لیے یہ ایک سادہ شیل ہے۔ آپ پھر بھی خود ",
+ ["bin"],
+ " چلا سکتے ہیں۔"
+ ],
"aQD_86": ["ایمبیڈنگز فراہم کنندہ تازہ نہیں ہو سکا — ", ["detail"]],
"aQyGJc": ["کچھ اور"],
"aR4DgO": [
diff --git a/packages/app/src/locales/ur/messages.po b/packages/app/src/locales/ur/messages.po
index 3ebc4690b..98ddbe0bd 100644
--- a/packages/app/src/locales/ur/messages.po
+++ b/packages/app/src/locales/ur/messages.po
@@ -3868,6 +3868,10 @@ msgstr "مہارتوں کا اشتراک تازہ نہیں ہو سکا"
msgid "Couldn't update skills sharing — {detail}."
msgstr "مہارتوں کا اشتراک تازہ نہیں ہو سکا — {detail}۔"
+#: src/components/TerminalCliUnverifiedBanner.tsx
+msgid "Couldn't verify that {displayName} ({bin}) is available, so this is a plain shell. You can still run {bin} yourself."
+msgstr "تصدیق نہیں ہو سکی کہ {displayName} ({bin}) دستیاب ہے، اس لیے یہ ایک سادہ شیل ہے۔ آپ پھر بھی خود {bin} چلا سکتے ہیں۔"
+
#: src/components/settings/settings-fields.ts
msgid "Count skill installs publicly"
msgstr "مہارت کی تنصیبات عوامی طور پر شمار کریں"
@@ -4426,6 +4430,7 @@ msgstr "منقطع کیا جا رہا ہے"
#: src/components/OnboardingCard.tsx
#: src/components/settings/SharingSection.tsx
#: src/components/TerminalCliMissingBanner.tsx
+#: src/components/TerminalCliUnverifiedBanner.tsx
msgid "Dismiss"
msgstr "برخاست کریں"
diff --git a/packages/app/src/locales/zh-Hans/messages.json b/packages/app/src/locales/zh-Hans/messages.json
index f36865c68..22aac8fb4 100644
--- a/packages/app/src/locales/zh-Hans/messages.json
+++ b/packages/app/src/locales/zh-Hans/messages.json
@@ -2393,6 +2393,15 @@
],
"aM23Wr": ["page-name"],
"aNb3JH": ["复制为 YAML"],
+ "aQ37oZ": [
+ "无法确认 ",
+ ["displayName"],
+ "(",
+ ["bin"],
+ ")是否可用,因此这是一个普通 shell。你仍然可以自行运行 ",
+ ["bin"],
+ "。"
+ ],
"aQD_86": ["更新嵌入服务提供方失败——", ["detail"]],
"aQyGJc": ["其他原因"],
"aR4DgO": [
diff --git a/packages/app/src/locales/zh-Hans/messages.po b/packages/app/src/locales/zh-Hans/messages.po
index deac026e6..db98ceeb0 100644
--- a/packages/app/src/locales/zh-Hans/messages.po
+++ b/packages/app/src/locales/zh-Hans/messages.po
@@ -3868,6 +3868,10 @@ msgstr "无法更新技能共享设置"
msgid "Couldn't update skills sharing — {detail}."
msgstr "无法更新技能共享设置——{detail}。"
+#: src/components/TerminalCliUnverifiedBanner.tsx
+msgid "Couldn't verify that {displayName} ({bin}) is available, so this is a plain shell. You can still run {bin} yourself."
+msgstr "无法确认 {displayName}({bin})是否可用,因此这是一个普通 shell。你仍然可以自行运行 {bin}。"
+
#: src/components/settings/settings-fields.ts
msgid "Count skill installs publicly"
msgstr "公开统计技能安装量"
@@ -4426,6 +4430,7 @@ msgstr "正在断开连接"
#: src/components/OnboardingCard.tsx
#: src/components/settings/SharingSection.tsx
#: src/components/TerminalCliMissingBanner.tsx
+#: src/components/TerminalCliUnverifiedBanner.tsx
msgid "Dismiss"
msgstr "忽略"
diff --git a/packages/app/src/locales/zh-Hant/messages.json b/packages/app/src/locales/zh-Hant/messages.json
index 2f19b8e41..3ec258ca8 100644
--- a/packages/app/src/locales/zh-Hant/messages.json
+++ b/packages/app/src/locales/zh-Hant/messages.json
@@ -2417,6 +2417,15 @@
],
"aM23Wr": ["page-name"],
"aNb3JH": ["複製為 YAML"],
+ "aQ37oZ": [
+ "無法確認 ",
+ ["displayName"],
+ "(",
+ ["bin"],
+ ")是否可用,因此這是一個一般 shell。你仍然可以自行執行 ",
+ ["bin"],
+ "。"
+ ],
"aQD_86": ["更新嵌入服務供應商失敗——", ["detail"]],
"aQyGJc": ["其他原因"],
"aR4DgO": [
diff --git a/packages/app/src/locales/zh-Hant/messages.po b/packages/app/src/locales/zh-Hant/messages.po
index 4db46518a..a4149befa 100644
--- a/packages/app/src/locales/zh-Hant/messages.po
+++ b/packages/app/src/locales/zh-Hant/messages.po
@@ -3868,6 +3868,10 @@ msgstr "無法更新技能分享設定"
msgid "Couldn't update skills sharing — {detail}."
msgstr "無法更新技能分享設定——{detail}。"
+#: src/components/TerminalCliUnverifiedBanner.tsx
+msgid "Couldn't verify that {displayName} ({bin}) is available, so this is a plain shell. You can still run {bin} yourself."
+msgstr "無法確認 {displayName}({bin})是否可用,因此這是一個一般 shell。你仍然可以自行執行 {bin}。"
+
#: src/components/settings/settings-fields.ts
msgid "Count skill installs publicly"
msgstr "公開統計技能安裝次數"
@@ -4426,6 +4430,7 @@ msgstr "正在中斷連接"
#: src/components/OnboardingCard.tsx
#: src/components/settings/SharingSection.tsx
#: src/components/TerminalCliMissingBanner.tsx
+#: src/components/TerminalCliUnverifiedBanner.tsx
msgid "Dismiss"
msgstr "關閉"
diff --git a/packages/core/src/desktop-bridge.ts b/packages/core/src/desktop-bridge.ts
index 7adc50dee..8aa981646 100644
--- a/packages/core/src/desktop-bridge.ts
+++ b/packages/core/src/desktop-bridge.ts
@@ -2067,7 +2067,12 @@ export interface OkDesktopBridge {
onExit(cb: (msg: OkPtyExit) => void): OkUnsubscribe;
claudePreflight(): Promise<ClaudeReadiness>;
cliPreflight(cli: TerminalCli): Promise<CliReadiness>;
- cliInstalledMap(): Promise<Record<TerminalCli, boolean>>;
+ /**
+ * Batched on-PATH readiness. An absent key means the probe could not verify
+ * that CLI either way (NOT absence) — consumers must fail open on
+ * `undefined` and reserve gating-off for the positive `false`.
+ */
+ cliInstalledMap(): Promise<Partial<Record<TerminalCli, boolean>>>;
rewireClaudeMcp(): Promise<ClaudeReadiness>;
};
diff --git a/packages/desktop/src/main/claude-readiness.ts b/packages/desktop/src/main/claude-readiness.ts
index d7f2c2ec1..e672fb144 100644
--- a/packages/desktop/src/main/claude-readiness.ts
+++ b/packages/desktop/src/main/claude-readiness.ts
@@ -74,6 +74,11 @@ export interface ProbeTimers {
* `command -v` ran and `claude` is genuinely absent, whereas `null` means the
* probe itself failed and claude's presence is UNKNOWN — the caller must not
* render a "not installed" message off an UNKNOWN.
+ *
+ * Every `null` resolution logs at warn: this probe gates launch baking and the
+ * installed-map row gating, and a silent degradation makes a field report of
+ * "isn't installed" undiagnosable (genuine PATH loss and a probe flake would
+ * otherwise leave identical artifacts).
*/
export function runLoginShellProbe(
spawn: ProbeSpawn,
@@ -86,14 +91,22 @@ export function runLoginShellProbe(
let child: ProbeChild;
try {
child = spawn(shell, args);
- } catch {
+ } catch (err) {
// partial-failure boundary: spawn can throw synchronously on resource
// exhaustion. Claude presence is UNKNOWN, not absent.
+ getLogger('login-shell-probe').warn(
+ { shell, args, err },
+ 'login-shell PATH probe spawn threw; presence unknown',
+ );
resolve(null);
return;
}
let settled = false;
const timer = timers.setTimer(() => {
+ getLogger('login-shell-probe').warn(
+ { shell, args, timeoutMs },
+ 'login-shell PATH probe timed out; presence unknown',
+ );
child.kill();
finish(null);
}, timeoutMs);
@@ -103,7 +116,15 @@ export function runLoginShellProbe(
timers.clearTimer(timer);
resolve(code);
}
- child.onError(() => finish(null));
+ child.onError((err) => {
+ if (!settled) {
+ getLogger('login-shell-probe').warn(
+ { shell, args, err },
+ 'login-shell PATH probe failed to run; presence unknown',
+ );
+ }
+ finish(null);
+ });
child.onExit((code) => finish(code));
});
}
@@ -222,29 +243,34 @@ export async function resolveCliOnPath(deps: ResolveCliOnPathDeps): Promise<CliR
export interface ResolveCliInstalledMapDeps {
/** Login-shell PATH probe for a CLI's registry binary; resolves the exit code
- * or `null` (probe failed → UNKNOWN, treated here as not-installed). */
+ * or `null` (probe failed → UNKNOWN, that entry is omitted from the map). */
probe(cli: TerminalCli): Promise<number | null>;
}
/**
- * Batched on-PATH readiness for every launchable CLI, collapsed to a plain
- * installed map (`present` ⇒ true; `not-found` and `unknown` ⇒ false). This is
- * the "which CLIs can I launch?" answer the New-chat default-CLI auto-pick needs
- * — one query instead of four separate {@link resolveCliOnPath} preflights.
- * Collapsing `unknown` to false is deliberate: defaulting must resolve to a
- * concrete CLI, and an undetectable CLI is not a safe auto-pick (the resolver's
- * final fallback is claude). Each entry still routes through
- * {@link resolveCliOnPath}, so a flaky or rejected probe degrades that one entry
- * without crashing the batch.
+ * Batched on-PATH readiness for every launchable CLI as an installed map:
+ * `present` ⇒ `true`, `not-found` ⇒ `false`, and `unknown` ⇒ the entry is
+ * OMITTED — an absent key means the probe could not verify either way, and
+ * consumers must not read it as absence (row gating fails open on `undefined`;
+ * auto-pick requires `=== true`, so an unverifiable CLI is still never a safe
+ * auto-pick and the resolver's final fallback stays claude). This is the "which
+ * CLIs can I launch?" answer the New-chat default-CLI auto-pick needs — one
+ * query instead of a per-CLI {@link resolveCliOnPath} preflight fan-out. Each
+ * entry still routes through {@link resolveCliOnPath}, so a flaky or rejected
+ * probe degrades that one entry without crashing the batch.
*/
export async function resolveCliInstalledMap(
deps: ResolveCliInstalledMapDeps,
-): Promise<Record<TerminalCli, boolean>> {
+): Promise<Partial<Record<TerminalCli, boolean>>> {
const entries = await Promise.all(
TERMINAL_CLI_IDS.map(async (cli) => {
const { onPath } = await resolveCliOnPath({ probe: () => deps.probe(cli) });
- return [cli, onPath === 'present'] as const;
+ return [cli, onPath] as const;
}),
);
- return Object.fromEntries(entries) as Record<TerminalCli, boolean>;
+ const map: Partial<Record<TerminalCli, boolean>> = {};
+ for (const [cli, onPath] of entries) {
+ if (onPath !== 'unknown') map[cli] = onPath === 'present';
+ }
+ return map;
}
diff --git a/packages/desktop/src/main/index.ts b/packages/desktop/src/main/index.ts
index 2d747c04b..0b27a2621 100644
--- a/packages/desktop/src/main/index.ts
+++ b/packages/desktop/src/main/index.ts
@@ -4734,18 +4734,20 @@ function resolveTerminalCliOnPath(cli: TerminalCli): Promise<CliReadiness> {
* just-installed CLI shows up within a minute.
*/
const CLI_INSTALLED_MAP_TTL_MS = 60_000;
-let cliInstalledMapCache: { at: number; value: Promise<Record<TerminalCli, boolean>> } | null =
- null;
+let cliInstalledMapCache: {
+ at: number;
+ value: Promise<Partial<Record<TerminalCli, boolean>>>;
+} | null = null;
/**
- * Batched on-PATH readiness for all four CLIs, cached ~60s. Caches the in-flight
- * Promise (not the resolved value) so concurrent New-chat clicks share one probe
- * batch. `resolveCliInstalledMap` never rejects today (each entry degrades to
- * not-installed); the defensive `.catch` below evicts the cache if a future
- * change ever lets one through, so a transient failure becomes an immediate
- * retry rather than a 60s-cached rejection.
+ * Batched on-PATH readiness for all registry CLIs, cached ~60s. Caches the
+ * in-flight Promise (not the resolved value) so concurrent New-chat clicks share
+ * one probe batch. `resolveCliInstalledMap` never rejects today (each entry
+ * degrades to an omitted unverified key); the defensive `.catch` below evicts
+ * the cache if a future change ever lets one through, so a transient failure
+ * becomes an immediate retry rather than a 60s-cached rejection.
*/
-function resolveTerminalCliInstalledMap(): Promise<Record<TerminalCli, boolean>> {
+function resolveTerminalCliInstalledMap(): Promise<Partial<Record<TerminalCli, boolean>>> {
const now = Date.now();
if (cliInstalledMapCache && now - cliInstalledMapCache.at < CLI_INSTALLED_MAP_TTL_MS) {
return cliInstalledMapCache.value;
@@ -5096,9 +5098,12 @@ function registerIpcHandlers() {
return resolveTerminalCliOnPath(req.cli);
});
- handle('ok:terminal:cli-installed-map', async (): Promise<Record<TerminalCli, boolean>> => {
- return resolveTerminalCliInstalledMap();
- });
+ handle(
+ 'ok:terminal:cli-installed-map',
+ async (): Promise<Partial<Record<TerminalCli, boolean>>> => {
+ return resolveTerminalCliInstalledMap();
+ },
+ );
handle('ok:terminal:dock-state', async (event) => {
const win = BrowserWindow.fromWebContents(event.sender);
diff --git a/packages/desktop/src/shared/ipc-channels.ts b/packages/desktop/src/shared/ipc-channels.ts
index 4cfc85710..9e6544707 100644
--- a/packages/desktop/src/shared/ipc-channels.ts
+++ b/packages/desktop/src/shared/ipc-channels.ts
@@ -1795,15 +1795,16 @@ export interface RequestChannels {
result: CliReadiness;
};
/**
- * Batched docked-terminal on-PATH readiness for all launchable CLIs → a plain
- * installed map (`true` ⇒ the CLI's registry binary resolves on the login-shell
- * PATH). Drives the New-chat default-CLI auto-pick. NOT an exec channel: no
- * renderer input; main runs a fixed `command -v <bin>` per registry binary and
- * caches the batch (~60s).
+ * Batched docked-terminal on-PATH readiness for all launchable CLIs → an
+ * installed map (`true` ⇒ the CLI's registry binary resolves on the
+ * login-shell PATH, `false` ⇒ verified absent, absent key ⇒ the probe could
+ * not verify — consumers must not read it as absence). Drives the New-chat
+ * default-CLI auto-pick. NOT an exec channel: no renderer input; main runs a
+ * fixed `command -v <bin>` per registry binary and caches the batch (~60s).
*/
'ok:terminal:cli-installed-map': {
args: [];
- result: Record<TerminalCli, boolean>;
+ result: Partial<Record<TerminalCli, boolean>>;
};
/** Per-window state for the independent terminal and agents panels. */
'ok:terminal:dock-state': {
diff --git a/packages/desktop/tests/main/claude-readiness.test.ts b/packages/desktop/tests/main/claude-readiness.test.ts
index e409d4bb8..634cc4873 100644
--- a/packages/desktop/tests/main/claude-readiness.test.ts
+++ b/packages/desktop/tests/main/claude-readiness.test.ts
@@ -1,5 +1,5 @@
import { TERMINAL_CLI_IDS, type TerminalCli } from '@inkeep/open-knowledge-core';
-import { describe, expect, test } from 'vitest';
+import { beforeEach, describe, expect, test, vi } from 'vitest';
import {
CLAUDE_PROBE_ARGS,
cliProbeArgs,
@@ -13,6 +13,33 @@ import {
runLoginShellProbe,
} from '../../src/main/claude-readiness.ts';
+/** Spy logger shared by every `getLogger(name)` call inside claude-readiness —
+ * the observation seam for the verdict-observability contract (a probe that
+ * degrades to UNKNOWN must leave an operator-visible trace). */
+const probeLog = vi.hoisted(() => {
+ const logger = {
+ trace: vi.fn(),
+ debug: vi.fn(),
+ info: vi.fn(),
+ warn: vi.fn(),
+ error: vi.fn(),
+ fatal: vi.fn(),
+ child: () => logger,
+ };
+ return logger;
+});
+vi.mock('../../src/main/desktop-logger.ts', () => ({ getLogger: () => probeLog }));
+
+/** Log records an operator would see at default level (info and above). */
+function operatorVisibleRecords(): unknown[][] {
+ return [
+ ...probeLog.fatal.mock.calls,
+ ...probeLog.error.mock.calls,
+ ...probeLog.warn.mock.calls,
+ ...probeLog.info.mock.calls,
+ ];
+}
+
function makeFakeChild() {
let exitCb: ((code: number | null) => void) | null = null;
let errorCb: ((err: Error) => void) | null = null;
@@ -183,6 +210,61 @@ describe('runLoginShellProbe', () => {
});
});
+describe('probe verdict observability (an UNKNOWN must leave a trace)', () => {
+ // The launch gate and the row-hiding installed map both key off this probe's
+ // verdict. Standing contract: every probe-failure resolution must emit an
+ // operator-visible log record (info and above) naming the failure class —
+ // without it, genuine PATH loss and a probe flake leave identical artifacts
+ // and a field report of "isn't installed" is undiagnosable.
+ beforeEach(() => {
+ vi.clearAllMocks();
+ });
+
+ test('a probe timeout emits an operator-visible log record naming the failure class', async () => {
+ const { child } = makeFakeChild();
+ const { timers, fireTimeout } = makeFakeTimers();
+ const p = runLoginShellProbe(() => child, 'zsh', timers, 5000);
+ fireTimeout();
+ expect(await p).toBe(null);
+ const records = operatorVisibleRecords();
+ expect(records.length).toBeGreaterThan(0);
+ const messages = records.map((call) => call.map(String).join(' '));
+ expect(messages.some((m) => /timed?\s*out/i.test(m))).toBe(true);
+ });
+
+ test("an async spawn 'error' emits an operator-visible log record carrying the cause", async () => {
+ const { child, emitError } = makeFakeChild();
+ const { timers } = makeFakeTimers();
+ const p = runLoginShellProbe(() => child, 'zsh', timers);
+ const spawnFailure = new Error('spawn zsh ENOENT');
+ emitError(spawnFailure);
+ expect(await p).toBe(null);
+ const records = operatorVisibleRecords();
+ expect(records.length).toBeGreaterThan(0);
+ expect(
+ records.some((call) => call.some((arg) => (arg as { err?: unknown })?.err === spawnFailure)),
+ ).toBe(true);
+ });
+
+ test('a synchronous spawn throw emits an operator-visible log record carrying the cause', async () => {
+ const { timers } = makeFakeTimers();
+ const spawnFailure = new Error('spawn EMFILE');
+ const p = runLoginShellProbe(
+ () => {
+ throw spawnFailure;
+ },
+ 'zsh',
+ timers,
+ );
+ expect(await p).toBe(null);
+ const records = operatorVisibleRecords();
+ expect(records.length).toBeGreaterThan(0);
+ expect(
+ records.some((call) => call.some((arg) => (arg as { err?: unknown })?.err === spawnFailure)),
+ ).toBe(true);
+ });
+});
+
describe('resolveClaudeReadiness', () => {
test("claude present + mcp wired + project entry is OK's own → pre-approvable", async () => {
const r = await resolveClaudeReadiness({
@@ -302,13 +384,12 @@ describe('resolveCliOnPath', () => {
});
describe('resolveCliInstalledMap', () => {
- test('maps each CLI probe exit code to installed=true iff the probe exited 0', async () => {
- // A distinct verdict per CLI: on-PATH (0), absent (127), flaky/unknown (null).
- const codes: Record<TerminalCli, number | null> = {
+ test('maps definitive probe exit codes: 0 → installed, non-zero → not installed', async () => {
+ const codes: Record<TerminalCli, number> = {
claude: 0,
codex: 127,
copilot: 0,
- opencode: null,
+ opencode: 127,
cursor: 0,
pi: 127,
antigravity: 0,
@@ -328,24 +409,37 @@ describe('resolveCliInstalledMap', () => {
});
});
- test('a rejected probe for one CLI degrades that entry to not-installed, never crashes', async () => {
+ test('a probe-null (UNKNOWN) entry is not collapsed into positive absence', async () => {
+ // The row-gating consumer (`isTerminalCliEnabled`) hides a launch row only
+ // on the positive-absence value `false` and documents fail-open for an
+ // unresolved probe — a contract this map defeats when it collapses `unknown`
+ // to `false`: one flaky probe then hides an installed CLI's rows for the
+ // whole cache TTL. Unknown must stay distinguishable from a genuine
+ // not-found all the way to that consumer.
const map = await resolveCliInstalledMap({
- probe: (cli) => (cli === 'codex' ? Promise.reject(new Error('boom')) : Promise.resolve(0)),
+ probe: (cli) => Promise.resolve(cli === 'pi' ? null : cli === 'codex' ? 127 : 0),
});
- expect(map).toEqual({
- claude: true,
- codex: false,
- copilot: true,
- opencode: true,
- cursor: true,
- pi: true,
- antigravity: true,
- openclaw: true,
- hermes: true,
+ expect(map.claude).toBe(true);
+ expect(map.codex).toBe(false);
+ // Unknown is encoded as key ABSENCE, not an explicit `undefined` value —
+ // `Object.keys`/`in` consumers must not see an unverified entry.
+ expect('pi' in map).toBe(false);
+ });
+
+ test('a rejected probe entry degrades to UNKNOWN — never positive absence — and never crashes', async () => {
+ const map = await resolveCliInstalledMap({
+ probe: (cli) => (cli === 'codex' ? Promise.reject(new Error('boom')) : Promise.resolve(0)),
});
+ expect(map.claude).toBe(true);
+ expect('codex' in map).toBe(false);
+ });
+
+ test('all probes failing yields an empty map, not a map of explicit undefineds', async () => {
+ const map = await resolveCliInstalledMap({ probe: () => Promise.resolve(null) });
+ expect(Object.keys(map)).toHaveLength(0);
});
- test('returns exactly one entry per CLI in TERMINAL_CLI_IDS', async () => {
+ test('all-definitive probes yield one entry per CLI in TERMINAL_CLI_IDS', async () => {
const map = await resolveCliInstalledMap({ probe: () => Promise.resolve(127) });
expect(Object.keys(map).sort()).toEqual([...TERMINAL_CLI_IDS].sort());
});
diff --git a/packages/server/src/acp/harness-availability.test.ts b/packages/server/src/acp/harness-availability.test.ts
index a0127a318..4088d4bc2 100644
--- a/packages/server/src/acp/harness-availability.test.ts
+++ b/packages/server/src/acp/harness-availability.test.ts
@@ -1,13 +1,34 @@
import { mkdtempSync, rmSync, writeFileSync } from 'node:fs';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
-import { afterEach, describe, expect, test } from 'vitest';
+import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
import {
ACP_AGENT_HARNESS_CLIS,
type AcpHarnessCli,
createAcpHarnessAvailabilityProbe,
type HarnessAvailability,
} from './harness-availability.ts';
+import { AgentLaunchError } from './launch.ts';
+
+/** Spy logger shared by every `getLogger(name)` call inside the availability
+ * module — the observation seam for the verdict-observability contract (a
+ * degraded verdict must leave an operator-visible trace). */
+const acpLog = vi.hoisted(() => {
+ const logger = {
+ trace: vi.fn(),
+ debug: vi.fn(),
+ info: vi.fn(),
+ warn: vi.fn(),
+ error: vi.fn(),
+ fatal: vi.fn(),
+ child: () => logger,
+ };
+ return logger;
+});
+vi.mock('../logger.ts', async (importOriginal) => ({
+ ...(await importOriginal<typeof import('../logger.ts')>()),
+ getLogger: () => acpLog,
+}));
let shims: string[] = [];
afterEach(() => {
@@ -109,3 +130,54 @@ describe('ACP harness availability', () => {
expect((await probe()).codex).toBe('unknown');
});
});
+
+describe('unverified verdicts (a probe failure is not absence, and must leave a trace)', () => {
+ // Hermetic via the injected preflight seam: every first chance misses
+ // deterministically regardless of what is installed on the host, so the
+ // capture-failure branch is exercised on dev machines and CI alike.
+ const firstChanceAlwaysMisses = async () => {
+ throw new AgentLaunchError('command-not-found', 'injected: first chance misses');
+ };
+ beforeEach(() => {
+ vi.clearAllMocks();
+ });
+
+ test('a failed login-shell PATH capture reports unknown, never not-found', async () => {
+ // The second-chance login-shell PATH could not be captured, so absence was
+ // never verified for any CLI that missed the base PATH. Reporting the
+ // positive `not-found` off a capture failure is the same conflation the
+ // probe layer forbids: capture failure ≠ absence.
+ const probe = createAcpHarnessAvailabilityProbe({
+ preflight: firstChanceAlwaysMisses,
+ resolveLoginShellPath: async () => null,
+ });
+ const result = await probe();
+ for (const [cli, verdict] of Object.entries(result)) {
+ expect({ cli, verdict }).toEqual({ cli, verdict: 'unknown' });
+ }
+ // Guard against a vacuous pass: every mapped harness got a verdict.
+ expect(Object.keys(result)).toHaveLength(6);
+ });
+
+ test('a degraded (unverified) verdict leaves an operator-visible log trace naming the cause', async () => {
+ // A defaulting signal that silently degrades makes a field report
+ // undiagnosable — the capture-failure path must log at info or warn, and
+ // must carry the capture failure's cause when the provider rejected.
+ const captureFailure = new Error('login shell exited before printing PATH');
+ const probe = createAcpHarnessAvailabilityProbe({
+ preflight: firstChanceAlwaysMisses,
+ resolveLoginShellPath: async () => {
+ throw captureFailure;
+ },
+ });
+ const result = await probe();
+ for (const verdict of Object.values(result)) expect(verdict).toBe('unknown');
+ const records = [...acpLog.warn.mock.calls, ...acpLog.info.mock.calls];
+ expect(records.length).toBeGreaterThan(0);
+ expect(
+ records.some((call) =>
+ call.some((arg) => (arg as { err?: unknown })?.err === captureFailure),
+ ),
+ ).toBe(true);
+ });
+});
diff --git a/packages/server/src/acp/harness-availability.ts b/packages/server/src/acp/harness-availability.ts
index a539a18ac..5e0249dc4 100644
--- a/packages/server/src/acp/harness-availability.ts
+++ b/packages/server/src/acp/harness-availability.ts
@@ -51,6 +51,7 @@ const DEFAULT_TTL_MS = 60_000;
async function detectHarness(
cli: AcpHarnessCli,
resolveLoginShellPath: () => Promise<string | null>,
+ preflight: typeof preflightLaunch = preflightLaunch,
): Promise<HarnessAvailability> {
const launch = {
cmd: HARNESS_BINS[cli],
@@ -60,21 +61,52 @@ async function detectHarness(
pathFromOverlay: false,
};
try {
- await preflightLaunch(launch);
+ await preflight(launch);
return 'present';
} catch (err) {
- if (!(err instanceof AgentLaunchError) || err.code !== 'command-not-found') return 'unknown';
+ if (!(err instanceof AgentLaunchError) || err.code !== 'command-not-found') {
+ // Presence was never verified either way — a silent degradation here
+ // makes a wrong default undiagnosable in the field, so leave a trace.
+ getLogger('acp-harness').warn(
+ { cli, err },
+ 'harness preflight failed before absence could be verified; availability unknown',
+ );
+ return 'unknown';
+ }
// Same second chance the launch chain takes, and deliberately the same
// shared provider: reporting `not-found` for a harness that
// `ensureLaunchable` would go on to start is worse than no signal at all,
// because it steers defaulting away from an agent that works.
- const loginShellPath = await resolveLoginShellPath().catch(() => null);
- if (loginShellPath === null) return 'not-found';
+ let loginShellPath: string | null = null;
+ let captureErr: unknown;
+ try {
+ loginShellPath = await resolveLoginShellPath();
+ } catch (resolveErr) {
+ captureErr = resolveErr;
+ }
+ if (loginShellPath === null) {
+ // Capture failure ≠ absence: without the login-shell PATH the second
+ // chance never ran, so a `not-found` here would be a positive absence
+ // claim off an unverified state. Carry the capture failure's cause —
+ // this is a degradation path and must name why it degraded.
+ getLogger('acp-harness').warn(
+ { cli, err: captureErr },
+ 'login-shell PATH capture failed; harness absence unverified — availability unknown',
+ );
+ return 'unknown';
+ }
try {
- await preflightLaunch(withLoginShellPath(launch, loginShellPath));
+ await preflight(withLoginShellPath(launch, loginShellPath));
return 'present';
- } catch {
- return 'not-found';
+ } catch (secondErr) {
+ if (secondErr instanceof AgentLaunchError && secondErr.code === 'command-not-found') {
+ return 'not-found';
+ }
+ getLogger('acp-harness').warn(
+ { cli, err: secondErr },
+ 'harness preflight on the login-shell PATH failed before absence could be verified; availability unknown',
+ );
+ return 'unknown';
}
}
}
@@ -86,11 +118,15 @@ export function createAcpHarnessAvailabilityProbe(
ttlMs?: number;
/** Defaults to the process-shared probe the launch chain uses. */
resolveLoginShellPath?: () => Promise<string | null>;
+ /** Test seam: the launch preflight is otherwise environment-dependent. */
+ preflight?: typeof preflightLaunch;
} = {},
): () => Promise<AcpHarnessAvailability> {
const resolveLoginShellPath =
opts.resolveLoginShellPath ?? getSharedLoginShellPathProvider(getLogger('acp-harness'));
- const probe = opts.probe ?? ((cli: AcpHarnessCli) => detectHarness(cli, resolveLoginShellPath));
+ const preflight = opts.preflight ?? preflightLaunch;
+ const probe =
+ opts.probe ?? ((cli: AcpHarnessCli) => detectHarness(cli, resolveLoginShellPath, preflight));
const now = opts.now ?? Date.now;
const ttlMs = opts.ttlMs ?? DEFAULT_TTL_MS;
const harnesses = [...new Set(Object.values(ACP_AGENT_HARNESS_CLIS))].filter(
@@ -105,7 +141,11 @@ export function createAcpHarnessAvailabilityProbe(
harnesses.map(async (cli) => {
try {
return [cli, await probe(cli)] as const;
- } catch {
+ } catch (err) {
+ getLogger('acp-harness').warn(
+ { cli, err },
+ 'harness availability probe rejected; availability unknown',
+ );
return [cli, 'unknown'] as const;
}
}),