Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

Make agent sign-in read as a sign-in (#3488)

saraha27d35e76d47
diff --git a/.changeset/acp-sign-in-prompt.md b/.changeset/acp-sign-in-prompt.md
new file mode 100644
index 000000000..33bd6a1ef
--- /dev/null
+++ b/.changeset/acp-sign-in-prompt.md
@@ -0,0 +1,13 @@
+---
+"@inkeep/open-knowledge": patch
+---
+
+Signing in to an agent now reads as a sign-in rather than an error. When a thread is waiting on authentication, the agent's mark and name take the pane with the ways in stacked beneath, one leading and the rest as alternatives, instead of an amber alert card with a row of equally loud buttons.
+
+Device-code flows now show their code. An agent signing in has no session yet, so the code and confirmation URL it prints are the only place that information exists, and OK was discarding them; the browser would ask the user to confirm a code their device never displayed. The code now appears while the sign-in runs, one tap to copy, with the confirmation page linked below it.
+
+A sign-in in flight has a status of its own. It used to report `installing`, so clicking a method replaced the prompt with "Starting the agent" while the agent was in fact waiting on the user, and the sign-in options vanished mid-flow.
+
+A completed sign-in the running agent cannot see now relaunches the agent instead of asking again. An agent that reads its credentials at startup will still refuse a session even after `authenticate` succeeds, and the fix has always been to restart it, which is what Retry did. OK now takes that step itself.
+
+Startup failures no longer pile up on a working thread. Each failed attempt left a card behind, so a thread that eventually signed in opened on a stack of warnings about a sign-in the user had already completed. A launch that succeeds retires the failures it took to get there; failures inside a live session still stand.
diff --git a/packages/app/src/components/SessionsHost.tsx b/packages/app/src/components/SessionsHost.tsx
index 8ad7bf159..5256c8482 100644
--- a/packages/app/src/components/SessionsHost.tsx
+++ b/packages/app/src/components/SessionsHost.tsx
@@ -192,6 +192,7 @@ function threadStatusDotClass(status: ThreadStatus): string {
return 'bg-amber-500 animate-pulse';
case 'installing':
case 'spawning':
+ case 'authenticating':
return 'bg-sky-500 animate-pulse';
case 'auth_required':
case 'awaiting_permission':
diff --git a/packages/app/src/components/acp/ThreadView.dom.test.tsx b/packages/app/src/components/acp/ThreadView.dom.test.tsx
index 570d3e4cd..6de738502 100644
--- a/packages/app/src/components/acp/ThreadView.dom.test.tsx
+++ b/packages/app/src/components/acp/ThreadView.dom.test.tsx
@@ -1876,6 +1876,272 @@ describe('ThreadView retry', () => {
expect(screen.getByTestId('agent-thread-retry')).toBeDefined();
});
+ // Several ways in are still one decision: the agent's first method leads and
+ // the alternatives stay quiet, so the pane never reads as competing demands.
+ test('only the first sign-in method carries the primary weight', () => {
+ model = makeModel({
+ turnActive: false,
+ items: [
+ {
+ kind: 'notice',
+ text: '',
+ tone: 'info',
+ failure: {
+ reason: 'auth-required',
+ authMethods: [
+ { id: 'ioa', name: 'IoA' },
+ { id: 'google', name: 'Google' },
+ { id: 'sso', name: 'Enterprise domain' },
+ ],
+ },
+ },
+ ],
+ });
+ render(<ThreadView info={makeInfo({ status: 'auth_required' })} />);
+
+ // The rule is "exactly one primary, and it's the first" — which quiet
+ // variant the alternatives wear is a styling call, free to be retuned.
+ const variants = screen
+ .getAllByTestId('agent-thread-auth-method')
+ .map((b) => b.getAttribute('data-variant'));
+ expect(variants).toHaveLength(3);
+ expect(variants[0]).toBe('default');
+ expect(variants.slice(1).every((v) => v !== 'default')).toBe(true);
+ });
+
+ // Alone under the stack, Retry is a lone muted word with nothing to explain
+ // it; beside a details toggle it has company, and the framing would only make
+ // the pair wordy.
+ test('Retry is framed as a question only when it stands alone', () => {
+ const authFailure = (machineDetail?: string): Extract<RenderedItem, { kind: 'notice' }> => ({
+ kind: 'notice',
+ text: '',
+ tone: 'info',
+ failure: {
+ reason: 'auth-required',
+ authMethods: [{ id: 'test_login', name: 'Test Login' }],
+ ...(machineDetail === undefined ? {} : { machineDetail }),
+ },
+ });
+
+ model = makeModel({ turnActive: false, items: [authFailure()] });
+ const alone = render(<ThreadView info={makeInfo({ status: 'auth_required' })} />);
+ expect(screen.getByTestId('agent-thread-notice').textContent).toContain('Already signed in?');
+ alone.unmount();
+
+ model = makeModel({ turnActive: false, items: [authFailure('{"detail":"x"}')] });
+ render(<ThreadView info={makeInfo({ status: 'auth_required' })} />);
+ expect(screen.getByTestId('agent-thread-notice-details-toggle')).toBeDefined();
+ expect(screen.getByTestId('agent-thread-notice').textContent).not.toContain(
+ 'Already signed in?',
+ );
+ });
+
+ // Clicking a method used to drop the prompt and say "Starting the agent…" —
+ // a claim the user could see was false, since they had not signed in yet.
+ test('a sign-in in flight reads as a wait, not as the agent starting', () => {
+ model = makeModel({
+ turnActive: false,
+ items: [
+ {
+ kind: 'notice',
+ text: '',
+ tone: 'info',
+ failure: {
+ reason: 'auth-required',
+ authMethods: [{ id: 'test_login', name: 'Test Login' }],
+ },
+ },
+ ],
+ });
+ render(<ThreadView info={makeInfo({ status: 'authenticating' })} />);
+
+ const card = screen.getByTestId('agent-thread-notice');
+ expect(card.textContent).toContain('Signing in to Claude');
+ // The offer is over: the methods stop inviting a second click, and nothing
+ // claims the agent is on its way.
+ expect(screen.queryByTestId('agent-thread-auth-method')).toBeNull();
+ expect(screen.queryByTestId('agent-thread-starting')).toBeNull();
+ expect(card.textContent).not.toContain('Already signed in?');
+ // Abandoning the sign-in in a browser tab parks the thread until it times
+ // out, so the way back stays on screen throughout.
+ expect(screen.getByTestId('agent-thread-retry')).toBeDefined();
+ });
+
+ // The browser asks the user to confirm a device code against what their
+ // device shows. If OK shows nothing, they confirm blind and the check is
+ // theatre — so the agent's own words go on screen while the wait is live.
+ test('a sign-in in flight shows what the agent printed', () => {
+ model = makeModel({
+ turnActive: false,
+ items: [
+ {
+ kind: 'notice',
+ text: '',
+ tone: 'info',
+ failure: {
+ reason: 'auth-required',
+ authMethods: [{ id: 'test_login', name: 'Test Login' }],
+ },
+ },
+ ],
+ });
+ render(
+ <ThreadView
+ info={makeInfo({
+ status: 'authenticating',
+ signInOutput: [
+ '[acp/auth] Starting OAuth login for cline…',
+ '[acp/auth] Enter this code in your browser: CRQT-NXNT',
+ '[acp/auth] https://authkit.cline.bot/device?user_code=CRQT-NXNT',
+ ],
+ })}
+ />,
+ );
+
+ // The code is the focus, one tap to copy, with the page to confirm it at
+ // underneath — not a wall of log lines to squint through.
+ expect(screen.getByTestId('agent-thread-sign-in-code').textContent).toContain('CRQT-NXNT');
+ expect(screen.getByTestId('agent-thread-sign-in-url').textContent).toBe(
+ 'authkit.cline.bot/device',
+ );
+ });
+
+ // The headline swap is silent to anyone not looking at it: the shimmer reads
+ // as progress visually and as nothing to a screen reader.
+ test('the sign-in transition is announced to assistive tech', () => {
+ const authNotice: Extract<RenderedItem, { kind: 'notice' }> = {
+ kind: 'notice',
+ text: '',
+ tone: 'info',
+ failure: { reason: 'auth-required', authMethods: [{ id: 'test_login', name: 'Test Login' }] },
+ };
+
+ model = makeModel({ turnActive: false, items: [authNotice] });
+ const parked = render(<ThreadView info={makeInfo({ status: 'auth_required' })} />);
+ const regions = () => screen.getAllByRole('status').map((n) => n.textContent);
+ // Mounted before the transition, and empty — a region that appears and
+ // fills in one cycle is missed on VoiceOver.
+ expect(regions()).toContain('');
+ parked.unmount();
+
+ model = makeModel({ turnActive: false, items: [authNotice] });
+ render(<ThreadView info={makeInfo({ status: 'authenticating' })} />);
+ expect(regions().join(' ')).toContain('Signing in to Claude');
+ });
+
+ // Copy feedback is an icon swap, which is no feedback at all without this.
+ test('copying the code is announced to assistive tech', async () => {
+ const writeText = vi.fn(() => Promise.resolve());
+ vi.stubGlobal('navigator', { ...navigator, clipboard: { writeText } });
+ model = makeModel({
+ turnActive: false,
+ items: [
+ {
+ kind: 'notice',
+ text: '',
+ tone: 'info',
+ failure: {
+ reason: 'auth-required',
+ authMethods: [{ id: 'test_login', name: 'Test Login' }],
+ },
+ },
+ ],
+ });
+ render(
+ <ThreadView
+ info={makeInfo({
+ status: 'authenticating',
+ signInOutput: ['[acp/auth] Enter this code in your browser: CRQT-NXNT'],
+ })}
+ />,
+ );
+
+ await userEvent.click(screen.getByTestId('agent-thread-sign-in-code'));
+
+ expect(writeText).toHaveBeenCalledWith('CRQT-NXNT');
+ await vi.waitFor(() =>
+ expect(screen.getAllByRole('status').map((n) => n.textContent)).toContain('Code copied'),
+ );
+ vi.unstubAllGlobals();
+ });
+
+ // A flow shaped differently must still reach the user: this stderr is the
+ // only channel a sign-in has before a session exists.
+ test('a sign-in that prints something unrecognized shows it verbatim', () => {
+ model = makeModel({
+ turnActive: false,
+ items: [
+ {
+ kind: 'notice',
+ text: '',
+ tone: 'info',
+ failure: {
+ reason: 'auth-required',
+ authMethods: [{ id: 'test_login', name: 'Test Login' }],
+ },
+ },
+ ],
+ });
+ render(
+ <ThreadView
+ info={makeInfo({ status: 'authenticating', signInOutput: ['[auth] check your email'] })}
+ />,
+ );
+
+ expect(screen.queryByTestId('agent-thread-sign-in-code')).toBeNull();
+ expect(screen.getByTestId('agent-thread-sign-in-output').textContent).toContain(
+ 'check your email',
+ );
+ });
+
+ // Nothing to say yet: an empty channel must not leave an empty box behind.
+ test('a sign-in with nothing printed shows no output block', () => {
+ model = makeModel({
+ turnActive: false,
+ items: [
+ {
+ kind: 'notice',
+ text: '',
+ tone: 'info',
+ failure: {
+ reason: 'auth-required',
+ authMethods: [{ id: 'test_login', name: 'Test Login' }],
+ },
+ },
+ ],
+ });
+ render(<ThreadView info={makeInfo({ status: 'authenticating' })} />);
+
+ expect(screen.queryByTestId('agent-thread-sign-in-output')).toBeNull();
+ });
+
+ // Nothing has been said in this thread yet, so the sign-in is the whole
+ // screen — not an alert stacked on top of the startup failures it replaces.
+ test('a sign-in on an unstarted thread replaces the startup notices', () => {
+ model = makeModel({
+ turnActive: false,
+ items: [
+ failureNotice('connect'),
+ {
+ kind: 'notice',
+ text: '',
+ tone: 'info',
+ failure: {
+ reason: 'auth-required',
+ authMethods: [{ id: 'test_login', name: 'Test Login' }],
+ },
+ },
+ ],
+ });
+ render(<ThreadView info={makeInfo({ status: 'auth_required' })} />);
+
+ const notices = screen.getAllByTestId('agent-thread-notice');
+ expect(notices).toHaveLength(1);
+ expect(notices[0]?.contains(screen.getByTestId('agent-thread-auth-method'))).toBe(true);
+ expect(notices[0]?.textContent).not.toContain("couldn't start");
+ });
+
test('a refused sign-in surfaces the reason and leaves the button usable', async () => {
authenticateResult = Promise.reject(new Error('wrong account'));
model = makeModel({
@@ -1952,7 +2218,7 @@ describe('ThreadView retry', () => {
// draft was written in must not go read-only underneath it.
test('the composer stays typable once the sign-in is under way', () => {
model = makeModel({ turnActive: false, items: [] });
- render(<ThreadView info={makeInfo({ status: 'installing' })} />);
+ render(<ThreadView info={makeInfo({ status: 'authenticating' })} />);
const composer = screen.getByTestId('agent-thread-composer');
expect(composer.hasAttribute('disabled')).toBe(false);
diff --git a/packages/app/src/components/acp/ThreadView.tsx b/packages/app/src/components/acp/ThreadView.tsx
index a8d6815ed..0ecbf5085 100644
--- a/packages/app/src/components/acp/ThreadView.tsx
+++ b/packages/app/src/components/acp/ThreadView.tsx
@@ -127,6 +127,7 @@ import {
} from '@/lib/acp/image-attachment';
import { computeDiffRows } from '@/lib/acp/inline-diff';
import { isPermissiveMode } from '@/lib/acp/permissive-mode';
+import { parseSignInOutput, shortenUrl } from '@/lib/acp/sign-in-output';
import { renderTerminalText } from '@/lib/acp/terminal-text';
import {
getAgentThreadClient,
@@ -145,6 +146,7 @@ import {
} from '@/lib/acp/thread-event-model';
import { describeToolCall, type ToolCallGlyph } from '@/lib/acp/tool-call-display';
import { docNameFromHash, hashFromDocName } from '@/lib/doc-hash';
+import { dispatchExternalLinkClick } from '@/lib/external-link';
import { useWorkspace } from '@/lib/use-workspace';
import { cn } from '@/lib/utils';
import { AgentMarkdown } from './AgentMarkdown';
@@ -414,7 +416,14 @@ export function ThreadView({
const canPrompt = archived ? !resumePending : status === 'ready' && !turnActive;
// A live thread sitting in a failure status never opened a session, so the
// launch can simply be run again — see the server's `retryThread` guards.
- const canRetry = !archived && (status === 'error' || status === 'auth_required');
+ // The sign-in prompt owns both halves of the wait: the offer, and the round
+ // trip the user is off completing. Dropping it the moment `authenticate` is
+ // called is what made a click look like it had done nothing.
+ const signingIn = status === 'authenticating';
+ const awaitingSignIn = status === 'auth_required' || signingIn;
+ // A sign-in abandoned in a browser tab holds the thread until it times out —
+ // the server treats an in-flight one as retryable for exactly that reason.
+ const canRetry = !archived && (status === 'error' || awaitingSignIn);
const [retryPending, setRetryPending] = useState(false);
// Mid-turn sends don't reject anymore — the server queues them behind the
// active turn and drains FIFO (`ThreadInfo.queue`).
@@ -820,10 +829,17 @@ export function ThreadView({
// failure, once. An allowlist rather than "not a prompt failure": a reason
// added later is only retryable once someone decides it is, and a prompt
// failure never is (that session is live, and re-sending IS the retry).
+ // Failures a later `ready` retired stay in the log but leave the screen —
+ // see `superseded` in the fold. One list so the Retry index and the render
+ // cannot disagree about which row is which.
+ const visibleItems =
+ model === null
+ ? []
+ : model.items.filter((item) => item.kind !== 'notice' || item.superseded !== true);
let retryNoticeIndex = -1;
- if (canRetry && model !== null) {
- for (let index = model.items.length - 1; index >= 0; index -= 1) {
- const item = model.items[index];
+ if (canRetry) {
+ for (let index = visibleItems.length - 1; index >= 0; index -= 1) {
+ const item = visibleItems[index];
if (item?.kind === 'notice' && item.failure !== null && isRetryableFailure(item.failure)) {
retryNoticeIndex = index;
break;
@@ -831,6 +847,22 @@ export function ThreadView({
}
}
+ // A thread waiting on sign-in has nothing else to show: it never opened a
+ // session, so its transcript is startup diagnostics the sign-in supersedes.
+ // The prompt takes the whole pane rather than sitting under a stack of alert
+ // cards repeating the same sentence, one per failed attempt.
+ const items = visibleItems;
+ let authPrompt: ThreadFailureDetail | null = null;
+ if (awaitingSignIn && !archived) {
+ for (let index = items.length - 1; index >= 0; index -= 1) {
+ const item = items[index];
+ if (item?.kind === 'notice' && item.failure?.reason === 'auth-required') {
+ authPrompt = item.failure;
+ break;
+ }
+ }
+ }
+
return (
<ImagePreviewContext.Provider value={openImagePreview}>
<ImagePreviewDialog
@@ -873,7 +905,7 @@ export function ThreadView({
>
<ThreadHeader info={info} followFile={followFile} onToggleFollow={toggleFollow} />
{model !== null && model.plan.length > 0 ? <PlanChecklist plan={model.plan} /> : null}
- {model === null || model.items.length === 0 ? (
+ {authPrompt !== null || model === null || visibleItems.length === 0 ? (
// No messages yet: the empty state centers itself via `h-full`, which needs
// a plain definite-height block host. The scroller's managed flex layout
// won't provide one, so only real transcripts go through the scroller.
@@ -881,7 +913,23 @@ export function ThreadView({
className="min-h-0 flex-1 overflow-y-auto px-3 py-2 subtle-scrollbar scroll-fade-mask"
data-testid="agent-thread-transcript"
>
- <ThreadEmptyState status={status} archived={archived} agent={info.agent} />
+ {authPrompt !== null ? (
+ <div className="flex min-h-full items-center justify-center">
+ <ThreadAuthPrompt
+ failure={authPrompt}
+ agent={info.agent}
+ agentName={agentDisplayName(info.agent.name)}
+ signingIn={signingIn}
+ signInOutput={info.signInOutput}
+ showRetry={canRetry}
+ retryPending={retryPending}
+ onRetry={retryThread}
+ onAuthenticate={authenticateThread}
+ />
+ </div>
+ ) : (
+ <ThreadEmptyState status={status} archived={archived} agent={info.agent} />
+ )}
</div>
) : (
// autoScroll = stick-to-bottom that yields to reader intent; last-anchor
@@ -898,7 +946,7 @@ export function ThreadView({
data-testid="agent-thread-transcript"
>
<MessageScrollerContent className="gap-2 [&>[data-tool-call]+[data-tool-call]]:-mt-1">
- {model.items.map((item, index) => {
+ {visibleItems.map((item, index) => {
const id = transcriptItemId(item, index);
return (
<MessageScrollerItem
@@ -922,16 +970,12 @@ export function ThreadView({
// the prompt settles (and some agents ask outside a turn) —
// only a dead thread makes answering impossible.
actionable={!archived && status !== 'exited' && status !== 'error'}
- streaming={turnActive && index === model.items.length - 1}
+ streaming={turnActive && index === visibleItems.length - 1}
terminals={model.terminals}
permissionsByToolCall={model.permissionsByToolCall}
showRetry={index === retryNoticeIndex}
retryPending={retryPending}
onRetry={retryThread}
- // Sign-in belongs to the same notice Retry does, and
- // only while the thread is still waiting on it.
- showAuth={index === retryNoticeIndex && status === 'auth_required'}
- onAuthenticate={authenticateThread}
/>
</MessageScrollerItem>
);
@@ -1628,12 +1672,18 @@ function ThreadEmptyState({
);
}
- // Auth is an action prompt, not a wait — keep a plain line pointing at the
- // sign-in notice rendered below the transcript.
+ // Waiting on sign-in with nothing to sign in WITH: the agent reported the
+ // status but named no method, so this is only the state, in the same shape
+ // the sign-in prompt uses when it does have methods to offer.
if (status === 'auth_required') {
return (
- <div className="flex h-full items-center justify-center px-6 text-center text-muted-foreground text-sm">
- {t`This agent needs you to sign in first — see the notice below.`}
+ <div className="flex h-full flex-col items-center justify-center gap-3 px-6 text-center">
+ <RegisteredAgentIcon
+ agentId={agent.id}
+ iconUrl={agent.iconUrl}
+ className="size-12 opacity-25 grayscale"
+ />
+ <p className="text-muted-foreground text-sm">{t`Sign in to ${agentName} to continue.`}</p>
</div>
);
}
@@ -1648,7 +1698,9 @@ function ThreadEmptyState({
? t`Installing ${agentName}…`
: status === 'spawning'
? t`Starting ${agentName}…`
- : t`Connecting to ${agentName}…`;
+ : status === 'authenticating'
+ ? t`Signing in to ${agentName}…`
+ : t`Connecting to ${agentName}…`;
return (
<div className="flex h-full flex-col items-center justify-center gap-3 px-6 text-center">
<RegisteredAgentIcon
@@ -1732,8 +1784,6 @@ function ThreadItem({
showRetry,
retryPending,
onRetry,
- showAuth,
- onAuthenticate,
}: {
item: RenderedItem;
threadId: string;
@@ -1748,9 +1798,6 @@ function ThreadItem({
showRetry: boolean;
retryPending: boolean;
onRetry: () => void;
- /** …and the one that offers sign-in, while the thread still needs it. */
- showAuth: boolean;
- onAuthenticate: (methodId: string) => Promise<void>;
}): ReactNode {
switch (item.kind) {
case 'message':
@@ -1780,8 +1827,6 @@ function ThreadItem({
showRetry={showRetry}
retryPending={retryPending}
onRetry={onRetry}
- showAuth={showAuth}
- onAuthenticate={onAuthenticate}
/>
);
}
@@ -1848,35 +1893,121 @@ function ThoughtBlock({
}
/**
- * A failure the user has to read: what broke, in OK's own words, with the
- * agent's message quoted underneath and the wire payload behind a disclosure
- * so a JSON blob never becomes the headline.
+ * What the agent printed while signing in. A device-code flow gets the code as
+ * the focus (large, monospaced, one tap to copy — the user has to match it
+ * against their browser character for character) with the confirmation URL
+ * beneath it. Anything unrecognized falls through verbatim, because this stderr
+ * is the only channel a sign-in has before a session exists.
*/
-function ThreadNotice({
- item,
+function SignInOutput({ output }: { output?: string[] }): ReactNode {
+ const { t } = useLingui();
+ const [copied, setCopied] = useState(false);
+ // Timer owned by an effect, not the click handler: the panel unmounts the
+ // moment the sign-in resolves, which can land inside this window.
+ useEffect(() => {
+ if (!copied) return;
+ const timer = setTimeout(() => setCopied(false), COMPLETION_CHECK_MS);
+ return () => clearTimeout(timer);
+ }, [copied]);
+ const parsed = output === undefined || output.length === 0 ? null : parseSignInOutput(output);
+ const empty =
+ parsed === null ||
+ (parsed.code === undefined && parsed.url === undefined && parsed.lines.length === 0);
+
+ const copyCode = (value: string): void => {
+ void navigator.clipboard
+ ?.writeText(value)
+ .then(() => setCopied(true))
+ .catch(() => {
+ // No clipboard (insecure context, denied permission) — the code is on
+ // screen and selectable, so there is nothing to recover from.
+ });
+ };
+
+ // Mounted unconditionally and starting empty: a live region added and filled
+ // in the same render is missed on VoiceOver/Safari. Copying gives sighted
+ // users an icon swap, which is nothing at all without the announcement.
+ const liveRegion = (
+ <div className="sr-only" role="status" aria-live="polite">
+ {copied ? t`Code copied` : ''}
+ </div>
+ );
+ if (empty) return liveRegion;
+ const { code, url, lines } = parsed;
+
+ return (
+ <div
+ className="mt-1 flex flex-col items-center gap-1.5"
+ data-testid="agent-thread-sign-in-output"
+ >
+ {liveRegion}
+ {code !== undefined ? (
+ <Button
+ type="button"
+ variant="outline"
+ className="h-auto w-full select-text py-1.5 font-mono text-base tracking-[0.2em]"
+ onClick={() => copyCode(code)}
+ aria-label={t`Copy the code ${code}`}
+ data-testid="agent-thread-sign-in-code"
+ >
+ {copied ? <Check className="size-3.5" aria-hidden="true" /> : null}
+ {code}
+ </Button>
+ ) : null}
+ {url !== undefined ? (
+ <a
+ href={url}
+ target="_blank"
+ rel="noreferrer"
+ className="text-muted-foreground text-xs underline underline-offset-2 hover:text-foreground"
+ onClick={(e) => dispatchExternalLinkClick(e, url)}
+ onAuxClick={(e) => dispatchExternalLinkClick(e, url)}
+ data-testid="agent-thread-sign-in-url"
+ >
+ {shortenUrl(url)}
+ </a>
+ ) : null}
+ {lines.length > 0 ? (
+ <p className="select-text text-muted-foreground text-xs">{lines.join(' ')}</p>
+ ) : null}
+ </div>
+ );
+}
+
+/**
+ * Sign-in, rendered as the thread's own front door rather than an alert: the
+ * agent's mark, its name, and the ways in. Untinted on purpose — needing an
+ * account is a step in starting an agent, not a fault to warn about — and only
+ * the first method carries the primary weight, so several ways in still read
+ * as one decision instead of a row of equal demands.
+ */
+function ThreadAuthPrompt({
+ failure,
+ agent,
agentName,
+ signingIn,
+ signInOutput,
showRetry,
retryPending,
onRetry,
- showAuth,
onAuthenticate,
}: {
- item: Extract<RenderedItem, { kind: 'notice' }>;
+ failure: ThreadFailureDetail;
+ agent: ThreadInfo['agent'];
agentName: string;
+ /** The server has an `authenticate` in flight for this thread. */
+ signingIn: boolean;
+ /** What the agent printed during the sign-in — a device code, a URL. */
+ signInOutput?: string[];
showRetry: boolean;
retryPending: boolean;
onRetry: () => void;
- showAuth: boolean;
onAuthenticate: (methodId: string) => Promise<void>;
}): ReactNode {
const { t } = useLingui();
const [showDetail, setShowDetail] = useState(false);
const [authPending, setAuthPending] = useState<string | null>(null);
- const failure = item.failure;
- const authMethods =
- showAuth && failure !== null && failure.reason === 'auth-required'
- ? (failure.authMethods ?? [])
- : [];
+ const authMethods = failure.authMethods ?? [];
// `env_var` / `terminal` methods are completed in the user's own shell or
// environment — OK can name them, but the protocol gives it no way to carry
// out the sign-in, so they get no button. Retry below is how the user says
@@ -1884,6 +2015,9 @@ function ThreadNotice({
// an `authenticate` call OK can make itself.
const signInMethods = authMethods.filter((m) => m.kind !== 'terminal' && m.kind !== 'env_var');
const manualMethods = authMethods.filter((m) => m.kind === 'terminal' || m.kind === 'env_var');
+ const agentMessage = failure.agentMessage ?? '';
+ const machineDetail = failure.machineDetail ?? '';
+ const framedRetry = showRetry && machineDetail === '' && !signingIn;
const signIn = (methodId: string): void => {
setAuthPending(methodId);
void onAuthenticate(methodId)
@@ -1892,6 +2026,149 @@ function ThreadNotice({
})
.finally(() => setAuthPending(null));
};
+ return (
+ <div
+ className="mx-auto flex w-full max-w-72 flex-col items-center gap-4 px-2 py-6 text-center"
+ data-testid="agent-thread-notice"
+ >
+ <RegisteredAgentIcon
+ agentId={agent.id}
+ iconUrl={agent.iconUrl}
+ className="size-12 opacity-25 grayscale"
+ />
+ {/* The panel swaps its whole headline when the sign-in starts, and a
+ swapped paragraph is a silent change: the shimmer reads as progress
+ to anyone who can see it and as nothing at all to anyone who cannot.
+ Mounted empty from the first render so the announcement is not lost
+ to a region that appears and fills in the same cycle. WCAG 4.1.3. */}
+ <div className="sr-only" role="status" aria-live="polite">
+ {signingIn ? t`Signing in to ${agentName}` : ''}
+ </div>
+ <div className="flex flex-col gap-1">
+ {signingIn ? (
+ <>
+ <p className="shimmer font-medium text-sm">{t`Signing in to ${agentName}…`}</p>
+ <SignInOutput output={signInOutput} />
+ </>
+ ) : (
+ <>
+ <p className="font-medium text-foreground text-sm">{t`Sign in to ${agentName} to continue.`}</p>
+ {agentMessage !== '' ? (
+ <p className="text-muted-foreground text-1sm">{agentMessage}</p>
+ ) : null}
+ </>
+ )}
+ </div>
+ {!signingIn && signInMethods.length > 0 ? (
+ <div className="flex w-full flex-col gap-1.5">
+ {signInMethods.map((method, index) => (
+ <Button
+ key={method.id}
+ type="button"
+ size="sm"
+ // The agent lists its methods best-first, so the first one leads
+ // and the rest stay available without competing with it.
+ variant={index === 0 ? 'default' : 'outline-mono'}
+ className="w-full"
+ disabled={authPending !== null}
+ onClick={() => signIn(method.id)}
+ data-testid="agent-thread-auth-method"
+ data-auth-method-id={method.id}
+ >
+ {authPending === method.id ? (
+ <Spinner className="size-3.5" aria-hidden="true" />
+ ) : null}
+ {/* One method is the whole choice, so the button says what it
+ does; several are a menu, and the names are the choice. */}
+ {signInMethods.length === 1 ? t`Sign in with ${method.name}` : method.name}
+ </Button>
+ ))}
+ </div>
+ ) : null}
+ {!signingIn && manualMethods.length > 0 ? (
+ <ul className="flex flex-col gap-1 text-muted-foreground text-xs">
+ {manualMethods.map((method) => (
+ <li key={method.id} data-testid="agent-thread-auth-manual">
+ {method.description !== undefined && method.description !== ''
+ ? `${method.name} — ${method.description}`
+ : method.name}
+ </li>
+ ))}
+ </ul>
+ ) : null}
+ {showRetry || machineDetail !== '' ? (
+ <div className={cn('flex items-center', framedRetry ? 'gap-1.5' : 'gap-3')}>
+ {framedRetry ? (
+ <span className="text-muted-foreground text-xs">{t`Already signed in?`}</span>
+ ) : null}
+ {showRetry ? (
+ <Button
+ type="button"
+ variant="link-muted"
+ size="xs"
+ className="h-auto p-0"
+ disabled={retryPending}
+ onClick={onRetry}
+ data-testid="agent-thread-retry"
+ >
+ {retryPending ? (
+ <>
+ <Spinner className="size-3" aria-hidden="true" />
+ {t`Retrying…`}
+ </>
+ ) : (
+ t`Retry`
+ )}
+ </Button>
+ ) : null}
+ {machineDetail !== '' ? (
+ <Button
+ type="button"
+ variant="link-muted"
+ size="xs"
+ className="h-auto p-0"
+ onClick={() => setShowDetail((open) => !open)}
+ aria-expanded={showDetail}
+ data-testid="agent-thread-notice-details-toggle"
+ >
+ {showDetail ? t`Hide details` : t`Show details`}
+ </Button>
+ ) : null}
+ </div>
+ ) : null}
+ {showDetail && machineDetail !== '' ? (
+ <pre
+ className="w-full overflow-x-auto whitespace-pre-wrap rounded-md bg-muted/50 p-2 text-left font-mono text-[10px] text-muted-foreground"
+ data-testid="agent-thread-notice-details"
+ >
+ {machineDetail}
+ </pre>
+ ) : null}
+ </div>
+ );
+}
+
+/**
+ * A failure the user has to read: what broke, in OK's own words, with the
+ * agent's message quoted underneath and the wire payload behind a disclosure
+ * so a JSON blob never becomes the headline.
+ */
+function ThreadNotice({
+ item,
+ agentName,
+ showRetry,
+ retryPending,
+ onRetry,
+}: {
+ item: Extract<RenderedItem, { kind: 'notice' }>;
+ agentName: string;
+ showRetry: boolean;
+ retryPending: boolean;
+ onRetry: () => void;
+}): ReactNode {
+ const { t } = useLingui();
+ const [showDetail, setShowDetail] = useState(false);
+ const failure = item.failure;
// Exhaustive by construction: a new `reason` on the wire fails the build
// here instead of silently rendering the prompt-failure copy.
const failureHeadline = (reason: ThreadFailureDetail['reason']): string => {
@@ -1952,40 +2229,6 @@ function ThreadNotice({
) : null}
</>
) : null}
- {manualMethods.length > 0 ? (
- <ul className="mt-1.5 flex flex-col gap-0.5 opacity-80">
- {manualMethods.map((method) => (
- <li key={method.id} data-testid="agent-thread-auth-manual">
- {method.description !== undefined && method.description !== ''
- ? `${method.name} — ${method.description}`
- : method.name}
- </li>
- ))}
- </ul>
- ) : null}
- {signInMethods.length > 0 ? (
- <div className="mt-1.5 flex flex-wrap items-center gap-1.5">
- {signInMethods.map((method) => (
- <Button
- key={method.id}
- type="button"
- size="sm"
- className="h-6 text-xs"
- disabled={authPending !== null}
- onClick={() => signIn(method.id)}
- data-testid="agent-thread-auth-method"
- data-auth-method-id={method.id}
- >
- {authPending === method.id ? (
- <Spinner className="size-3" aria-hidden="true" />
- ) : null}
- {/* One method is the whole choice, so the button says what it
- does; several are a menu, and the names are the choice. */}
- {signInMethods.length === 1 ? t`Sign in with ${method.name}` : method.name}
- </Button>
- ))}
- </div>
- ) : null}
{showRetry ? (
<div className="mt-1.5">
<Button
@@ -3282,7 +3525,9 @@ function ThreadComposer({
: t`Pick up where you left off`
: status === 'auth_required'
? t`Sign in to ${agentName} first`
- : t`Message ${agentName}`
+ : status === 'authenticating'
+ ? t`Signing in to ${agentName}`
+ : t`Message ${agentName}`
}
disabled={composerDisabled}
// The advertised slash-command corpus: null until the agent's
diff --git a/packages/app/src/lib/acp/sign-in-output.test.ts b/packages/app/src/lib/acp/sign-in-output.test.ts
new file mode 100644
index 000000000..53487b6c1
--- /dev/null
+++ b/packages/app/src/lib/acp/sign-in-output.test.ts
@@ -0,0 +1,67 @@
+import { describe, expect, test } from 'vitest';
+import { parseSignInOutput, shortenUrl } from './sign-in-output';
+
+describe('parseSignInOutput', () => {
+ // The shape Cline 3.0.54 actually prints, captured from a real sign-in.
+ test('pulls the code and URL out of a device-code flow', () => {
+ const parsed = parseSignInOutput([
+ '[acp/auth] Starting OAuth login for cline…',
+ '[acp/auth] Enter this code in your browser: CRQT-NXNT',
+ '[acp/auth] https://authkit.cline.bot/device?user_code=CRQT-NXNT',
+ ]);
+
+ expect(parsed.code).toBe('CRQT-NXNT');
+ expect(parsed.url).toBe('https://authkit.cline.bot/device?user_code=CRQT-NXNT');
+ // Both announcement lines are represented by the code and the link now.
+ expect(parsed.lines).toEqual(['Starting OAuth login for cline…']);
+ });
+
+ // The code the server issued beats one scraped from a sentence.
+ test('prefers the code carried in the URL', () => {
+ const parsed = parseSignInOutput([
+ 'Type ABCD-EFGH if prompted',
+ 'https://example.test/device?user_code=WDJB-MJHT',
+ ]);
+
+ expect(parsed.code).toBe('WDJB-MJHT');
+ });
+
+ // Nothing recognized must still reach the user — silence would be worse
+ // than prose, since this is the only channel the sign-in has.
+ test('hands back anything it does not understand', () => {
+ const parsed = parseSignInOutput(['[auth] check your email', 'we sent a magic link']);
+
+ expect(parsed.code).toBeUndefined();
+ expect(parsed.url).toBeUndefined();
+ expect(parsed.lines).toEqual(['check your email', 'we sent a magic link']);
+ });
+
+ // Ordinary words must not be mistaken for a code.
+ test('does not invent a code out of prose', () => {
+ expect(parseSignInOutput(['Opening your browser to finish signing in']).code).toBeUndefined();
+ expect(parseSignInOutput(['ERROR: token expired']).code).toBeUndefined();
+ });
+
+ test('drops empty lines and logging tags', () => {
+ expect(parseSignInOutput(['', ' ', '[acp/auth] spaced ']).lines).toEqual(['spaced']);
+ });
+
+ test('trims trailing punctuation off a URL', () => {
+ expect(parseSignInOutput(['visit https://example.test/device.']).url).toBe(
+ 'https://example.test/device',
+ );
+ });
+});
+
+describe('shortenUrl', () => {
+ test('keeps host and path, drops scheme and query', () => {
+ expect(shortenUrl('https://authkit.cline.bot/device?user_code=CRQT-NXNT')).toBe(
+ 'authkit.cline.bot/device',
+ );
+ expect(shortenUrl('https://example.test/')).toBe('example.test');
+ });
+
+ test('passes through anything that is not a URL', () => {
+ expect(shortenUrl('not a url')).toBe('not a url');
+ });
+});
diff --git a/packages/app/src/lib/acp/sign-in-output.ts b/packages/app/src/lib/acp/sign-in-output.ts
new file mode 100644
index 000000000..6548474ca
--- /dev/null
+++ b/packages/app/src/lib/acp/sign-in-output.ts
@@ -0,0 +1,78 @@
+/**
+ * Reads the stderr an agent prints while signing in and pulls out the two
+ * things a device-code flow asks the user to act on: the code the browser wants
+ * confirmed, and the URL to confirm it at.
+ *
+ * Agents have no structured channel for this — the sign-in happens before any
+ * session exists — so prose is all there is. Everything here is therefore a
+ * guess that must fail safe: anything unrecognized is handed back verbatim in
+ * `lines`, so a flow shaped differently still shows the user what it said.
+ */
+
+/** `[acp/auth] `, `[auth] ` — a logging tag, not something the user needs. */
+const LEADING_TAG = /^\[[^\]]{1,32}\]\s*/;
+const URL_IN_LINE = /\bhttps?:\/\/\S+/;
+/**
+ * RFC 8628 user codes are short, case-insensitive, and usually grouped with a
+ * dash (`WDJB-MJHT`, `CRQT-NXNT`). Requiring the dash and upper case is what
+ * keeps ordinary words out; a flow that formats its code differently falls
+ * through to the raw lines rather than being mangled.
+ */
+const DEVICE_CODE = /\b[A-Z0-9]{3,8}(?:-[A-Z0-9]{3,8})+\b/;
+
+export interface ParsedSignInOutput {
+ /** The code the user has to match against their browser, if one was found. */
+ code?: string;
+ /** Where to complete the sign-in, if a URL was printed. */
+ url?: string;
+ /** Whatever is left, tag-stripped — empty when everything was recognized. */
+ lines: string[];
+}
+
+/** Strip the query string and scheme: `authkit.cline.bot/device` reads as a
+ * place, where the full URL with an embedded code reads as noise. */
+export function shortenUrl(url: string): string {
+ try {
+ const parsed = new URL(url);
+ return `${parsed.host}${parsed.pathname === '/' ? '' : parsed.pathname}`;
+ } catch {
+ return url;
+ }
+}
+
+export function parseSignInOutput(raw: readonly string[]): ParsedSignInOutput {
+ let code: string | undefined;
+ let url: string | undefined;
+ const lines: string[] = [];
+
+ for (const rawLine of raw) {
+ const line = rawLine.replace(LEADING_TAG, '').trim();
+ if (line === '') continue;
+
+ const urlMatch = line.match(URL_IN_LINE);
+ if (url === undefined && urlMatch !== null) {
+ url = urlMatch[0].replace(/[).,]+$/, '');
+ // A code carried in the URL beats one scraped from prose: it is the
+ // value the server issued, not a lookalike in a sentence.
+ const fromUrl = new URLSearchParams(url.split('?')[1] ?? '').get('user_code');
+ if (fromUrl !== null && fromUrl !== '') code = fromUrl;
+ }
+
+ if (code === undefined) {
+ const codeMatch = line.match(DEVICE_CODE);
+ if (codeMatch !== null) code = codeMatch[0];
+ }
+
+ // A line that only announced the code or the URL is now represented by
+ // them; keeping it would say the same thing twice.
+ const isAboutCode = code !== undefined && line.includes(code);
+ const isAboutUrl = url !== undefined && line.includes(url);
+ if (!isAboutCode && !isAboutUrl) lines.push(line);
+ }
+
+ return {
+ ...(code !== undefined ? { code } : {}),
+ ...(url !== undefined ? { url } : {}),
+ lines,
+ };
+}
diff --git a/packages/app/src/lib/acp/thread-event-model.test.ts b/packages/app/src/lib/acp/thread-event-model.test.ts
index 44d3f0b92..b401243f4 100644
--- a/packages/app/src/lib/acp/thread-event-model.test.ts
+++ b/packages/app/src/lib/acp/thread-event-model.test.ts
@@ -555,3 +555,44 @@ describe('resolvePermissionOutcome', () => {
});
});
});
+
+describe('startup failures a later ready retires', () => {
+ const statusEvent = (
+ status: 'auth_required' | 'ready' | 'error',
+ reason?: 'auth-required' | 'connect' | 'prompt',
+ ) => ({
+ kind: 'status' as const,
+ status,
+ ts: 1,
+ ...(reason === undefined ? {} : { failure: { reason, agentMessage: 'x' } }),
+ });
+
+ // A thread that eventually started should not open on a stack of amber
+ // cards about the sign-in the user already completed.
+ test('a launch that eventually worked retires the failures it took to get there', () => {
+ const model = buildThreadRenderModel([
+ statusEvent('auth_required', 'auth-required'),
+ statusEvent('auth_required', 'auth-required'),
+ statusEvent('ready'),
+ ]);
+
+ expect(model.items.filter((i) => i.kind === 'notice' && i.superseded !== true)).toHaveLength(0);
+ // Marked, not dropped: positions are load-bearing for the fold's indexes.
+ expect(model.items).toHaveLength(2);
+ });
+
+ // A prompt failure happened inside a live session, so a later `ready` says
+ // nothing about it — the user still needs to see it.
+ test('a prompt failure survives a later ready', () => {
+ const model = buildThreadRenderModel([statusEvent('error', 'prompt'), statusEvent('ready')]);
+
+ expect(model.items.filter((i) => i.kind === 'notice' && i.superseded !== true)).toHaveLength(1);
+ });
+
+ // Still parked: nothing has been answered yet, so nothing is retired.
+ test('failures stand while the thread has not started', () => {
+ const model = buildThreadRenderModel([statusEvent('auth_required', 'auth-required')]);
+
+ expect(model.items.filter((i) => i.kind === 'notice' && i.superseded !== true)).toHaveLength(1);
+ });
+});
diff --git a/packages/app/src/lib/acp/thread-event-model.ts b/packages/app/src/lib/acp/thread-event-model.ts
index bbb3de1a3..88f1a7a00 100644
--- a/packages/app/src/lib/acp/thread-event-model.ts
+++ b/packages/app/src/lib/acp/thread-event-model.ts
@@ -87,6 +87,13 @@ interface RenderedNotice {
* transcripts, and any failure site that hasn't been classified yet).
*/
failure: ThreadFailureDetail | null;
+ /**
+ * A later `ready` answered this failure — the launch it complained about
+ * eventually worked, so the card no longer describes anything the user can
+ * act on. Kept in the log (positions are load-bearing) and skipped by the
+ * view.
+ */
+ superseded?: boolean;
}
/**
@@ -172,6 +179,20 @@ function textFromContent(content: unknown): string | null {
return c.type === 'text' && typeof c.text === 'string' ? c.text : null;
}
+/**
+ * Failures a successful launch retires. The startup reasons only: a `prompt`
+ * failure happened inside a live session, so a later `ready` says nothing
+ * about it and the user still needs to see it.
+ */
+function isSupersededByReady(failure: ThreadFailureDetail | null): boolean {
+ return (
+ failure !== null &&
+ (failure.reason === 'connect' ||
+ failure.reason === 'session-setup' ||
+ failure.reason === 'auth-required')
+ );
+}
+
export class ThreadRenderModelBuilder {
private items: RenderedItem[] = [];
private plan: PlanEntry[] = [];
@@ -290,6 +311,25 @@ export class ThreadRenderModelBuilder {
}
}
}
+ if (event.status === 'ready') {
+ // A launch that eventually worked answers every failure it took to
+ // get there: those notices were the ways in, and one of them landed.
+ // Left standing they pile up at the top of a healthy thread — amber
+ // cards about a sign-in the user already completed.
+ //
+ // Marked, never removed: six index maps hold positions into `items`,
+ // so dropping an element would silently retarget every one of them.
+ for (let index = 0; index < this.items.length; index += 1) {
+ const item = this.items[index];
+ if (
+ item?.kind === 'notice' &&
+ item.superseded !== true &&
+ isSupersededByReady(item.failure)
+ ) {
+ this.items[index] = { ...item, superseded: true };
+ }
+ }
+ }
if (event.status === 'error' || event.status === 'auth_required') {
// A structured failure alone is enough: the view composes its own
// copy from `reason`, so the server no longer has to ship a string.
diff --git a/packages/app/src/locales/ar/messages.json b/packages/app/src/locales/ar/messages.json
index 2a489c8f1..ad73ec6fd 100644
--- a/packages/app/src/locales/ar/messages.json
+++ b/packages/app/src/locales/ar/messages.json
@@ -2093,7 +2093,6 @@
"QQbwzK": ["لا يوجد وكلاء متاحون."],
"QQghPu": ["التثبيت في Claude Desktop"],
"QR5SP1": ["أنشأ قالبًا"],
- "QTsvh1": ["يحتاج هذا الوكيل إلى تسجيل دخولك أولًا — انظر الإشعار أدناه."],
"QUhYEG": ["مسافة للقفز · سهم لأسفل للانحناء"],
"QWdKwH": ["نقل"],
"QYTOaN": ["يمكنك تغيير هذا لاحقًا من <0>الإعدادات ← المزامنة</0>."],
@@ -2564,6 +2563,7 @@
["targetCount"],
" عنصرًا محددًا؟ ستُحذف المجلدات وكل الملفات بداخلها. لا يمكن التراجع عن هذا الإجراء."
],
+ "WMsoIm": ["هل سجّلت الدخول بالفعل؟"],
"WPwDin": ["فتح المجلد على القرص"],
"WR0y2O": ["مشاركة المجلد"],
"WRNXKp": ["يجري البحث"],
@@ -2645,6 +2645,7 @@
"XfzqjK": ["القالب «", ["name"], "»"],
"Xg-Ntj": ["يحتاج الرمز إلى نطاقي repo وread:user."],
"XgqUOy": ["لم يُعثر على مهارة في ذلك المصدر. سيوضح الاستيراد السبب إن تابعت."],
+ "XgsZ2F": ["نسخ الرمز ", ["code"]],
"Xhm7gG": ["اقتراحات الأصول"],
"Xisk4u": ["حُرِّر ", ["editedAgo"]],
"XjqA8x": ["يبدّل النمط ", ["0"], "/**"],
@@ -2781,6 +2782,7 @@
],
"Yy90sM": ["أُنشئت المهارة «", ["name"], "»"],
"YyXtnN": ["تسطير"],
+ "Yz8urJ": ["جارٍ تسجيل الدخول إلى ", ["agentName"]],
"Yzs3QX": ["مزيد من إجراءات المهارة"],
"Z0W6SO": [
"هذا المجلد نسخة من ",
@@ -3261,6 +3263,7 @@
"dw_3cv": ["إعادة تسمية المهارة"],
"dw_dUJ": ["فشل تكرار المسار"],
"dx-TwN": ["تجري مراجعة المشروع"],
+ "dyfMJN": ["تم نسخ الرمز"],
"e0NrBM": ["المشروع"],
"e1Rn_k": ["فتح المجلد الحاوي"],
"e1hptq": ["ضمّن مقطع فيديو بعناصر تحكم مشغّل أصلية."],
@@ -3449,6 +3452,7 @@
"gUx34c": [
"اللغة التي يتحدث بها OpenKnowledge؛ ويتبع خيار النظام لغة نظام التشغيل لديك. تبقى ملاحظاتك باللغة التي كتبتها بها."
],
+ "gY7wnY": ["جارٍ تسجيل الدخول إلى ", ["agentName"], "…"],
"gYz2ep": ["تنتهي الصلاحية خلال ", ["timeLabel"]],
"gZElfU": ["يجري إصلاح ", ["0"], " من ", ["1"], " ملف"],
"gZiT5e": ["هل تستبدل هذه الروابط الرمزية بنسخ مستقلة؟"],
diff --git a/packages/app/src/locales/ar/messages.po b/packages/app/src/locales/ar/messages.po
index 07797c8c6..f499be7b3 100644
--- a/packages/app/src/locales/ar/messages.po
+++ b/packages/app/src/locales/ar/messages.po
@@ -1559,6 +1559,10 @@ msgstr "مفتوح بالفعل"
msgid "Already set up — ok is available in your terminal"
msgstr "مُعدّ بالفعل — الأمر ok متاح في طرفيتك"
+#: src/components/acp/ThreadView.tsx
+msgid "Already signed in?"
+msgstr "هل سجّلت الدخول بالفعل؟"
+
#: src/components/ReportBugDialogBody.tsx
msgid "Always included"
msgstr "مُدرج دائمًا"
@@ -2588,6 +2592,10 @@ msgstr "لغة كتلة الكود: {currentLabel}. انقر للتغيير."
msgid "Code block settings"
msgstr "إعدادات كتلة الكود"
+#: src/components/acp/ThreadView.tsx
+msgid "Code copied"
+msgstr "تم نسخ الرمز"
+
#: src/components/AuthModal.tsx
msgid "Code copied to clipboard"
msgstr "تم نسخ الكود إلى الحافظة"
@@ -3135,6 +3143,10 @@ msgstr "نسخ رابط المشاركة"
msgid "Copy source"
msgstr "نسخ المصدر"
+#: src/components/acp/ThreadView.tsx
+msgid "Copy the code {code}"
+msgstr "نسخ الرمز {code}"
+
#: src/lib/keyboard-shortcuts.ts
msgid "Copy the focused file-tree item so Paste can duplicate it."
msgstr "انسخ عنصر شجرة الملفات المركَّز عليه ليتمكن «لصق» من تكراره."
@@ -11218,6 +11230,14 @@ msgstr "فشل تسجيل الدخول: {0}"
msgid "Sign-in stream ended without confirmation — please try again"
msgstr "انتهى بث تسجيل الدخول دون تأكيد — يرجى المحاولة مرة أخرى"
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}"
+msgstr "جارٍ تسجيل الدخول إلى {agentName}"
+
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}…"
+msgstr "جارٍ تسجيل الدخول إلى {agentName}…"
+
#: src/editor/components/Pdf.tsx
msgid "Single page"
msgstr "صفحة واحدة"
@@ -12395,10 +12415,6 @@ msgstr "هذا الوكيل لا يقدم أوامر الشرطة المائلة
msgid "This agent hasn't announced its commands yet"
msgstr "لم يعلن هذا الوكيل عن أوامره بعد"
-#: src/components/acp/ThreadView.tsx
-msgid "This agent needs you to sign in first — see the notice below."
-msgstr "يحتاج هذا الوكيل إلى تسجيل دخولك أولًا — انظر الإشعار أدناه."
-
#. placeholder {0}: item.provides
#. placeholder {1}: item.displayName
#. placeholder {2}: item.displayName
diff --git a/packages/app/src/locales/bn/messages.json b/packages/app/src/locales/bn/messages.json
index 192c16814..14c443329 100644
--- a/packages/app/src/locales/bn/messages.json
+++ b/packages/app/src/locales/bn/messages.json
@@ -1802,7 +1802,6 @@
"QQbwzK": ["কোনো এজেন্ট নেই।"],
"QQghPu": ["Claude Desktop-এ ইনস্টল করুন"],
"QR5SP1": ["টেমপ্লেট তৈরি হয়েছে"],
- "QTsvh1": ["এই এজেন্টের জন্য আপনাকে আগে সাইন ইন করতে হবে — নিচের বিজ্ঞপ্তিটি দেখুন।"],
"QUhYEG": ["লাফাতে স্পেস · নিচু হতে নিচের তির"],
"QWdKwH": ["সরান"],
"QYTOaN": ["আপনি এটি পরে <0>Settings → Sync</0>-এ বদলাতে পারেন।"],
@@ -2178,6 +2177,7 @@
["targetCount"],
"টি আইটেম মুছে ফেলতে চান? ফোল্ডার ও তার ভেতরের সব ফাইল মুছে যাবে। এই কাজ ফেরানো যাবে না।"
],
+ "WMsoIm": ["আগে থেকেই সাইন ইন করা আছে?"],
"WPwDin": ["ফোল্ডারটি ডিস্কে খুলুন"],
"WR0y2O": ["ফোল্ডার ভাগ করুন"],
"WRNXKp": ["খোঁজা হচ্ছে"],
@@ -2259,6 +2259,7 @@
"XfzqjK": ["টেমপ্লেট \"", ["name"], "\""],
"Xg-Ntj": ["টোকেনটির repo ও read:user স্কোপ দরকার।"],
"XgqUOy": ["ওই উৎসে কোনো স্কিল পাওয়া যায়নি। আপনি চালিয়ে গেলে আমদানি কারণ জানাবে।"],
+ "XgsZ2F": [["code"], " কোডটি কপি করুন"],
"Xhm7gG": ["অ্যাসেট পরামর্শ"],
"Xisk4u": [["editedAgo"], " সম্পাদিত"],
"XjqA8x": ["প্যাটার্ন ", ["0"], "/** টগল করুন"],
@@ -2365,6 +2366,7 @@
],
"Yy90sM": ["স্কিল \"", ["name"], "\" তৈরি হয়েছে"],
"YyXtnN": ["নিম্নরেখা"],
+ "Yz8urJ": [["agentName"], "-এ সাইন ইন করা হচ্ছে"],
"Yzs3QX": ["স্কিলের আরও ক্রিয়া"],
"Z0W6SO": [
"এই ফোল্ডারটি ",
@@ -2761,6 +2763,7 @@
"dw_3cv": ["স্কিলের নাম বদলান"],
"dw_dUJ": ["পথের প্রতিলিপি করতে ব্যর্থ"],
"dx-TwN": ["প্রকল্প নিরীক্ষা চালানো হচ্ছে"],
+ "dyfMJN": ["কোড কপি হয়েছে"],
"e0NrBM": ["প্রকল্প"],
"e1Rn_k": ["যে ফোল্ডারে আছে সেটি খুলুন"],
"e1hptq": ["নিজস্ব প্লেয়ার নিয়ন্ত্রণসহ একটি ভিডিও এমবেড করুন।"],
@@ -2920,6 +2923,7 @@
"gUx34c": [
"OpenKnowledge যে ভাষায় কথা বলে; সিস্টেম আপনার অপারেটিং সিস্টেমকে অনুসরণ করে। আপনার নিজের নোট যে ভাষায় লিখেছেন সেই ভাষাতেই থাকবে।"
],
+ "gY7wnY": [["agentName"], "-এ সাইন ইন করা হচ্ছে…"],
"gYz2ep": [["timeLabel"], "-এ মেয়াদ শেষ"],
"gZElfU": [["1"], "টির মধ্যে ", ["0"], "টি ফাইল ঠিক করা হচ্ছে"],
"gZiT5e": ["এই সিমলিংকগুলো স্বতন্ত্র অনুলিপি দিয়ে বদলাবেন?"],
diff --git a/packages/app/src/locales/bn/messages.po b/packages/app/src/locales/bn/messages.po
index 399cb56d1..a4d43c30a 100644
--- a/packages/app/src/locales/bn/messages.po
+++ b/packages/app/src/locales/bn/messages.po
@@ -1555,6 +1555,10 @@ msgstr "আগে থেকেই খোলা"
msgid "Already set up — ok is available in your terminal"
msgstr "আগে থেকেই সেট আপ করা — ok আপনার টার্মিনালে আছে"
+#: src/components/acp/ThreadView.tsx
+msgid "Already signed in?"
+msgstr "আগে থেকেই সাইন ইন করা আছে?"
+
#: src/components/ReportBugDialogBody.tsx
msgid "Always included"
msgstr "সবসময় অন্তর্ভুক্ত"
@@ -2584,6 +2588,10 @@ msgstr "কোড ব্লকের ভাষা: {currentLabel}। বদল
msgid "Code block settings"
msgstr "কোড ব্লক সেটিং"
+#: src/components/acp/ThreadView.tsx
+msgid "Code copied"
+msgstr "কোড কপি হয়েছে"
+
#: src/components/AuthModal.tsx
msgid "Code copied to clipboard"
msgstr "কোড ক্লিপবোর্ডে কপি হয়েছে"
@@ -3131,6 +3139,10 @@ msgstr "শেয়ার লিংক কপি করুন"
msgid "Copy source"
msgstr "সোর্স কপি করুন"
+#: src/components/acp/ThreadView.tsx
+msgid "Copy the code {code}"
+msgstr "{code} কোডটি কপি করুন"
+
#: src/lib/keyboard-shortcuts.ts
msgid "Copy the focused file-tree item so Paste can duplicate it."
msgstr "ফোকাস করা ফাইল-ট্রি আইটেমটি কপি করুন যাতে Paste সেটির প্রতিলিপি বানাতে পারে।"
@@ -11214,6 +11226,14 @@ msgstr "সাইন ইন ব্যর্থ: {0}"
msgid "Sign-in stream ended without confirmation — please try again"
msgstr "সাইন-ইন স্ট্রিম নিশ্চিতকরণ ছাড়াই শেষ হয়েছে — অনুগ্রহ করে আবার চেষ্টা করুন"
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}"
+msgstr "{agentName}-এ সাইন ইন করা হচ্ছে"
+
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}…"
+msgstr "{agentName}-এ সাইন ইন করা হচ্ছে…"
+
#: src/editor/components/Pdf.tsx
msgid "Single page"
msgstr "একটি পাতা"
@@ -12391,10 +12411,6 @@ msgstr "এই এজেন্ট স্ল্যাশ কমান্ড দ
msgid "This agent hasn't announced its commands yet"
msgstr "এই এজেন্ট এখনও তার কমান্ড ঘোষণা করেনি"
-#: src/components/acp/ThreadView.tsx
-msgid "This agent needs you to sign in first — see the notice below."
-msgstr "এই এজেন্টের জন্য আপনাকে আগে সাইন ইন করতে হবে — নিচের বিজ্ঞপ্তিটি দেখুন।"
-
#. placeholder {0}: item.provides
#. placeholder {1}: item.displayName
#. placeholder {2}: item.displayName
diff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.json
index a9dc11a39..85035f6bd 100644
--- a/packages/app/src/locales/en/messages.json
+++ b/packages/app/src/locales/en/messages.json
@@ -1851,7 +1851,6 @@
"QQbwzK": ["No agents available."],
"QQghPu": ["Install in Claude Desktop"],
"QR5SP1": ["created template"],
- "QTsvh1": ["This agent needs you to sign in first — see the notice below."],
"QUhYEG": ["Space to jump · down arrow to duck"],
"QWdKwH": ["Move"],
"QYTOaN": ["You can change this later in <0>Settings → Sync</0>."],
@@ -2231,6 +2230,7 @@
["targetCount"],
" selected items? Folders and all files inside them will be deleted. This action cannot be undone."
],
+ "WMsoIm": ["Already signed in?"],
"WPwDin": ["Open folder on disk"],
"WR0y2O": ["Share folder"],
"WRNXKp": ["Searching"],
@@ -2312,6 +2312,7 @@
"XfzqjK": ["template \"", ["name"], "\""],
"Xg-Ntj": ["The token needs the repo and read:user scopes."],
"XgqUOy": ["No skill found at that source. Import will report why if you continue."],
+ "XgsZ2F": ["Copy the code ", ["code"]],
"Xhm7gG": ["Asset suggestions"],
"Xisk4u": ["Edited ", ["editedAgo"]],
"XjqA8x": ["Toggles the pattern ", ["0"], "/**"],
@@ -2419,6 +2420,7 @@
],
"Yy90sM": ["Skill \"", ["name"], "\" created"],
"YyXtnN": ["Underline"],
+ "Yz8urJ": ["Signing in to ", ["agentName"]],
"Yzs3QX": ["More skill actions"],
"Z0W6SO": [
"This folder is a clone of ",
@@ -2835,6 +2837,7 @@
"dw_3cv": ["Rename skill"],
"dw_dUJ": ["Failed to duplicate path"],
"dx-TwN": ["Running project audit"],
+ "dyfMJN": ["Code copied"],
"e0NrBM": ["Project"],
"e1Rn_k": ["Open containing folder"],
"e1hptq": ["Embed a video with native player controls."],
@@ -3009,6 +3012,7 @@
"gUx34c": [
"The language OpenKnowledge speaks; System follows your operating system. Your own notes stay in the language you wrote them in."
],
+ "gY7wnY": ["Signing in to ", ["agentName"], "…"],
"gYz2ep": ["Expires in ", ["timeLabel"]],
"gZElfU": ["Fixing ", ["0"], " of ", ["1"], " files"],
"gZiT5e": ["Replace these symlinks with independent copies?"],
diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.po
index 3c03c05ee..db5ee69b2 100644
--- a/packages/app/src/locales/en/messages.po
+++ b/packages/app/src/locales/en/messages.po
@@ -1559,6 +1559,10 @@ msgstr "Already open"
msgid "Already set up — ok is available in your terminal"
msgstr "Already set up — ok is available in your terminal"
+#: src/components/acp/ThreadView.tsx
+msgid "Already signed in?"
+msgstr "Already signed in?"
+
#: src/components/ReportBugDialogBody.tsx
msgid "Always included"
msgstr "Always included"
@@ -2588,6 +2592,10 @@ msgstr "Code block language: {currentLabel}. Click to change."
msgid "Code block settings"
msgstr "Code block settings"
+#: src/components/acp/ThreadView.tsx
+msgid "Code copied"
+msgstr "Code copied"
+
#: src/components/AuthModal.tsx
msgid "Code copied to clipboard"
msgstr "Code copied to clipboard"
@@ -3135,6 +3143,10 @@ msgstr "Copy share link"
msgid "Copy source"
msgstr "Copy source"
+#: src/components/acp/ThreadView.tsx
+msgid "Copy the code {code}"
+msgstr "Copy the code {code}"
+
#: src/lib/keyboard-shortcuts.ts
msgid "Copy the focused file-tree item so Paste can duplicate it."
msgstr "Copy the focused file-tree item so Paste can duplicate it."
@@ -11218,6 +11230,14 @@ msgstr "Sign-in failed: {0}"
msgid "Sign-in stream ended without confirmation — please try again"
msgstr "Sign-in stream ended without confirmation — please try again"
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}"
+msgstr "Signing in to {agentName}"
+
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}…"
+msgstr "Signing in to {agentName}…"
+
#: src/editor/components/Pdf.tsx
msgid "Single page"
msgstr "Single page"
@@ -12395,10 +12415,6 @@ msgstr "This agent doesn't offer slash commands — your message will be sent as
msgid "This agent hasn't announced its commands yet"
msgstr "This agent hasn't announced its commands yet"
-#: src/components/acp/ThreadView.tsx
-msgid "This agent needs you to sign in first — see the notice below."
-msgstr "This agent needs you to sign in first — see the notice below."
-
#. placeholder {0}: item.provides
#. placeholder {1}: item.displayName
#. placeholder {2}: item.displayName
diff --git a/packages/app/src/locales/es/messages.json b/packages/app/src/locales/es/messages.json
index 52ee2ef9c..58406aa18 100644
--- a/packages/app/src/locales/es/messages.json
+++ b/packages/app/src/locales/es/messages.json
@@ -2135,7 +2135,6 @@
"QQbwzK": ["No hay agentes disponibles."],
"QQghPu": ["Instalar en Claude Desktop"],
"QR5SP1": ["plantilla creada"],
- "QTsvh1": ["Este agente necesita que inicies sesión primero; mira el aviso de abajo."],
"QUhYEG": ["Espacio para saltar · flecha abajo para agacharse"],
"QWdKwH": ["Mover"],
"QYTOaN": ["Puedes cambiarlo más adelante en <0>Ajustes → Sincronización</0>."],
@@ -2594,6 +2593,7 @@
["targetCount"],
" elementos seleccionados? Se eliminarán las carpetas y todos los archivos que contienen. Esta acción no se puede deshacer."
],
+ "WMsoIm": ["¿Ya iniciaste sesión?"],
"WPwDin": ["Abrir la carpeta en el disco"],
"WR0y2O": ["Compartir la carpeta"],
"WRNXKp": ["Buscando"],
@@ -2679,6 +2679,7 @@
"XgqUOy": [
"No se encontró ninguna habilidad en ese origen. Si continúas, la importación te dirá por qué."
],
+ "XgsZ2F": ["Copiar el código ", ["code"]],
"Xhm7gG": ["Sugerencias de recursos"],
"Xisk4u": ["Editado ", ["editedAgo"]],
"XjqA8x": ["Alterna el patrón ", ["0"], "/**"],
@@ -2818,6 +2819,7 @@
],
"Yy90sM": ["Se creó la habilidad \"", ["name"], "\""],
"YyXtnN": ["Subrayado"],
+ "Yz8urJ": ["Iniciando sesión en ", ["agentName"]],
"Yzs3QX": ["Más acciones de habilidad"],
"Z0W6SO": [
"Esta carpeta es un clon de ",
@@ -3307,6 +3309,7 @@
"dw_3cv": ["Renombrar la habilidad"],
"dw_dUJ": ["No se pudo duplicar la ruta"],
"dx-TwN": ["Ejecutando la auditoría del proyecto"],
+ "dyfMJN": ["Código copiado"],
"e0NrBM": ["Proyecto"],
"e1Rn_k": ["Abrir la carpeta contenedora"],
"e1hptq": ["Incrusta un vídeo con los controles nativos del reproductor."],
@@ -3520,6 +3523,7 @@
"gUx34c": [
"El idioma en el que habla OpenKnowledge; Sistema sigue el de tu sistema operativo. Tus notas se quedan en el idioma en el que las escribiste."
],
+ "gY7wnY": ["Iniciando sesión en ", ["agentName"], "…"],
"gYz2ep": ["Caduca en ", ["timeLabel"]],
"gZElfU": ["Arreglando ", ["0"], " de ", ["1"], " archivos"],
"gZiT5e": ["¿Reemplazar estos enlaces simbólicos por copias independientes?"],
diff --git a/packages/app/src/locales/es/messages.po b/packages/app/src/locales/es/messages.po
index 6ed4fe5c8..d26277600 100644
--- a/packages/app/src/locales/es/messages.po
+++ b/packages/app/src/locales/es/messages.po
@@ -1559,6 +1559,10 @@ msgstr "Ya está abierto"
msgid "Already set up — ok is available in your terminal"
msgstr "Ya está configurado: ok está disponible en tu terminal"
+#: src/components/acp/ThreadView.tsx
+msgid "Already signed in?"
+msgstr "¿Ya iniciaste sesión?"
+
#: src/components/ReportBugDialogBody.tsx
msgid "Always included"
msgstr "Siempre incluido"
@@ -2588,6 +2592,10 @@ msgstr "Lenguaje del bloque de código: {currentLabel}. Haz clic para cambiarlo.
msgid "Code block settings"
msgstr "Ajustes del bloque de código"
+#: src/components/acp/ThreadView.tsx
+msgid "Code copied"
+msgstr "Código copiado"
+
#: src/components/AuthModal.tsx
msgid "Code copied to clipboard"
msgstr "Código copiado al portapapeles"
@@ -3135,6 +3143,10 @@ msgstr "Copiar enlace para compartir"
msgid "Copy source"
msgstr "Copiar el código fuente"
+#: src/components/acp/ThreadView.tsx
+msgid "Copy the code {code}"
+msgstr "Copiar el código {code}"
+
#: src/lib/keyboard-shortcuts.ts
msgid "Copy the focused file-tree item so Paste can duplicate it."
msgstr "Copia el elemento enfocado del árbol de archivos para que Pegar pueda duplicarlo."
@@ -11218,6 +11230,14 @@ msgstr "Error al iniciar sesión: {0}"
msgid "Sign-in stream ended without confirmation — please try again"
msgstr "El flujo de inicio de sesión terminó sin confirmación; inténtalo de nuevo"
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}"
+msgstr "Iniciando sesión en {agentName}"
+
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}…"
+msgstr "Iniciando sesión en {agentName}…"
+
#: src/editor/components/Pdf.tsx
msgid "Single page"
msgstr "Página única"
@@ -12395,10 +12415,6 @@ msgstr "Este agente no ofrece comandos de barra — tu mensaje se enviará como
msgid "This agent hasn't announced its commands yet"
msgstr "Este agente aún no ha anunciado sus comandos"
-#: src/components/acp/ThreadView.tsx
-msgid "This agent needs you to sign in first — see the notice below."
-msgstr "Este agente necesita que inicies sesión primero; mira el aviso de abajo."
-
#. placeholder {0}: item.provides
#. placeholder {1}: item.displayName
#. placeholder {2}: item.displayName
diff --git a/packages/app/src/locales/fr/messages.json b/packages/app/src/locales/fr/messages.json
index 84a9355c3..8291e1c6c 100644
--- a/packages/app/src/locales/fr/messages.json
+++ b/packages/app/src/locales/fr/messages.json
@@ -2164,7 +2164,6 @@
"QQbwzK": ["Aucun agent disponible."],
"QQghPu": ["Installer dans Claude Desktop"],
"QR5SP1": ["modèle créé"],
- "QTsvh1": ["Cet agent nécessite que vous vous connectiez d'abord — voyez l'avis ci-dessous."],
"QUhYEG": ["Espace pour sauter · flèche bas pour s'accroupir"],
"QWdKwH": ["Déplacer"],
"QYTOaN": ["Vous pourrez changer cela plus tard dans <0>Paramètres → Synchronisation</0>."],
@@ -2633,6 +2632,7 @@
["targetCount"],
" éléments sélectionnés ? Les dossiers et tous les fichiers qu'ils contiennent seront supprimés. Cette action est irréversible."
],
+ "WMsoIm": ["Déjà connecté ?"],
"WPwDin": ["Ouvrir le dossier sur le disque"],
"WR0y2O": ["Partager le dossier"],
"WRNXKp": ["Recherche en cours"],
@@ -2718,6 +2718,7 @@
"XgqUOy": [
"Aucune compétence trouvée à cette source. L'importation en indiquera la raison si vous continuez."
],
+ "XgsZ2F": ["Copier le code ", ["code"]],
"Xhm7gG": ["Suggestions de ressources"],
"Xisk4u": ["Modifié ", ["editedAgo"]],
"XjqA8x": ["Active ou désactive le motif ", ["0"], "/**"],
@@ -2856,6 +2857,7 @@
],
"Yy90sM": ["Compétence « ", ["name"], " » créée"],
"YyXtnN": ["Souligné"],
+ "Yz8urJ": ["Connexion à ", ["agentName"]],
"Yzs3QX": ["Plus d'actions sur la compétence"],
"Z0W6SO": [
"Ce dossier est un clone de ",
@@ -3344,6 +3346,7 @@
"dw_3cv": ["Renommer la compétence"],
"dw_dUJ": ["Échec de la duplication du chemin"],
"dx-TwN": ["Audit du projet en cours"],
+ "dyfMJN": ["Code copié"],
"e0NrBM": ["Projet"],
"e1Rn_k": ["Ouvrir le dossier contenant"],
"e1hptq": ["Intègre une vidéo avec les contrôles natifs du lecteur."],
@@ -3553,6 +3556,7 @@
"gUx34c": [
"La langue que parle OpenKnowledge ; Système suit celle de votre système d’exploitation. Vos notes restent dans la langue dans laquelle vous les avez écrites."
],
+ "gY7wnY": ["Connexion à ", ["agentName"], "…"],
"gYz2ep": ["Expire dans ", ["timeLabel"]],
"gZElfU": ["Correction du fichier ", ["0"], " sur ", ["1"]],
"gZiT5e": ["Remplacer ces liens symboliques par des copies indépendantes ?"],
diff --git a/packages/app/src/locales/fr/messages.po b/packages/app/src/locales/fr/messages.po
index 508572462..70ffb24ec 100644
--- a/packages/app/src/locales/fr/messages.po
+++ b/packages/app/src/locales/fr/messages.po
@@ -1559,6 +1559,10 @@ msgstr "Déjà ouvert"
msgid "Already set up — ok is available in your terminal"
msgstr "Déjà configuré — ok est disponible dans votre terminal"
+#: src/components/acp/ThreadView.tsx
+msgid "Already signed in?"
+msgstr "Déjà connecté ?"
+
#: src/components/ReportBugDialogBody.tsx
msgid "Always included"
msgstr "Toujours inclus"
@@ -2588,6 +2592,10 @@ msgstr "Langage du bloc de code : {currentLabel}. Cliquez pour changer."
msgid "Code block settings"
msgstr "Paramètres du bloc de code"
+#: src/components/acp/ThreadView.tsx
+msgid "Code copied"
+msgstr "Code copié"
+
#: src/components/AuthModal.tsx
msgid "Code copied to clipboard"
msgstr "Code copié dans le presse-papiers"
@@ -3135,6 +3143,10 @@ msgstr "Copier le lien de partage"
msgid "Copy source"
msgstr "Copier la source"
+#: src/components/acp/ThreadView.tsx
+msgid "Copy the code {code}"
+msgstr "Copier le code {code}"
+
#: src/lib/keyboard-shortcuts.ts
msgid "Copy the focused file-tree item so Paste can duplicate it."
msgstr "Copie l'élément de l'arborescence ayant le focus pour que Coller puisse le dupliquer."
@@ -11218,6 +11230,14 @@ msgstr "Échec de la connexion : {0}"
msgid "Sign-in stream ended without confirmation — please try again"
msgstr "Le flux de connexion s'est terminé sans confirmation — veuillez réessayer"
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}"
+msgstr "Connexion à {agentName}"
+
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}…"
+msgstr "Connexion à {agentName}…"
+
#: src/editor/components/Pdf.tsx
msgid "Single page"
msgstr "Page unique"
@@ -12395,10 +12415,6 @@ msgstr "Cet agent ne propose pas de commandes slash — votre message sera envoy
msgid "This agent hasn't announced its commands yet"
msgstr "Cet agent n'a pas encore annoncé ses commandes"
-#: src/components/acp/ThreadView.tsx
-msgid "This agent needs you to sign in first — see the notice below."
-msgstr "Cet agent nécessite que vous vous connectiez d'abord — voyez l'avis ci-dessous."
-
#. placeholder {0}: item.provides
#. placeholder {1}: item.displayName
#. placeholder {2}: item.displayName
diff --git a/packages/app/src/locales/hi/messages.json b/packages/app/src/locales/hi/messages.json
index 2de947211..67b5683a6 100644
--- a/packages/app/src/locales/hi/messages.json
+++ b/packages/app/src/locales/hi/messages.json
@@ -1793,7 +1793,6 @@
"QQbwzK": ["कोई एजेंट उपलब्ध नहीं।"],
"QQghPu": ["Claude Desktop में इंस्टॉल करें"],
"QR5SP1": ["टेम्पलेट बनाया गया"],
- "QTsvh1": ["इस एजेंट के लिए पहले आपका साइन इन करना ज़रूरी है — नीचे दी सूचना देखें।"],
"QUhYEG": ["कूदने के लिए स्पेस · झुकने के लिए नीचे तीर"],
"QWdKwH": ["हिलाएँ"],
"QYTOaN": ["आप इसे बाद में <0>Settings → Sync</0> में बदल सकते हैं।"],
@@ -2161,6 +2160,7 @@
["targetCount"],
" चयनित आइटम हटाना चाहते हैं? फ़ोल्डर और उनके भीतर की सभी फ़ाइलें हट जाएँगी। यह क्रिया वापस नहीं ली जा सकती।"
],
+ "WMsoIm": ["पहले से साइन इन हैं?"],
"WPwDin": ["फ़ोल्डर डिस्क पर खोलें"],
"WR0y2O": ["फ़ोल्डर साझा करें"],
"WRNXKp": ["खोजा जा रहा है"],
@@ -2242,6 +2242,7 @@
"XfzqjK": ["टेम्पलेट \"", ["name"], "\""],
"Xg-Ntj": ["टोकन को repo और read:user स्कोप चाहिए।"],
"XgqUOy": ["उस स्रोत पर कोई स्किल नहीं मिली। आगे बढ़ने पर आयात बताएगा कि क्यों।"],
+ "XgsZ2F": ["कोड ", ["code"], " कॉपी करें"],
"Xhm7gG": ["एसेट सुझाव"],
"Xisk4u": [["editedAgo"], " संपादित"],
"XjqA8x": ["पैटर्न ", ["0"], "/** टॉगल करें"],
@@ -2346,6 +2347,7 @@
],
"Yy90sM": ["स्किल \"", ["name"], "\" बनाई गई"],
"YyXtnN": ["रेखांकित"],
+ "Yz8urJ": [["agentName"], " में साइन इन किया जा रहा है"],
"Yzs3QX": ["और स्किल क्रियाएँ"],
"Z0W6SO": [
"यह फ़ोल्डर ",
@@ -2747,6 +2749,7 @@
"dw_3cv": ["स्किल का नाम बदलें"],
"dw_dUJ": ["पथ की नकल बनाने में विफल"],
"dx-TwN": ["प्रोजेक्ट ऑडिट चलाया जा रहा है"],
+ "dyfMJN": ["कोड कॉपी हो गया"],
"e0NrBM": ["प्रोजेक्ट"],
"e1Rn_k": ["जिसमें है वह फ़ोल्डर खोलें"],
"e1hptq": ["मूल प्लेयर नियंत्रणों के साथ एक वीडियो एम्बेड करें।"],
@@ -2907,6 +2910,7 @@
"gUx34c": [
"वह भाषा जिसमें OpenKnowledge बात करता है; सिस्टम आपके ऑपरेटिंग सिस्टम का अनुसरण करता है। आपके अपने नोट्स उसी भाषा में रहते हैं जिसमें आपने उन्हें लिखा था।"
],
+ "gY7wnY": [["agentName"], " में साइन इन किया जा रहा है…"],
"gYz2ep": [["timeLabel"], " में समाप्त होगा"],
"gZElfU": [["1"], " में से ", ["0"], " फ़ाइलें ठीक की जा रही हैं"],
"gZiT5e": ["इन सिमलिंक को स्वतंत्र प्रतियों से बदलें?"],
diff --git a/packages/app/src/locales/hi/messages.po b/packages/app/src/locales/hi/messages.po
index 274404547..3d600ba46 100644
--- a/packages/app/src/locales/hi/messages.po
+++ b/packages/app/src/locales/hi/messages.po
@@ -1555,6 +1555,10 @@ msgstr "पहले से खुला है"
msgid "Already set up — ok is available in your terminal"
msgstr "पहले से सेट अप है — ok आपके टर्मिनल में उपलब्ध है"
+#: src/components/acp/ThreadView.tsx
+msgid "Already signed in?"
+msgstr "पहले से साइन इन हैं?"
+
#: src/components/ReportBugDialogBody.tsx
msgid "Always included"
msgstr "हमेशा शामिल"
@@ -2584,6 +2588,10 @@ msgstr "कोड ब्लॉक भाषा: {currentLabel}. बदलने
msgid "Code block settings"
msgstr "कोड ब्लॉक सेटिंग"
+#: src/components/acp/ThreadView.tsx
+msgid "Code copied"
+msgstr "कोड कॉपी हो गया"
+
#: src/components/AuthModal.tsx
msgid "Code copied to clipboard"
msgstr "कोड क्लिपबोर्ड पर कॉपी किया गया"
@@ -3131,6 +3139,10 @@ msgstr "साझा लिंक कॉपी करें"
msgid "Copy source"
msgstr "स्रोत कॉपी करें"
+#: src/components/acp/ThreadView.tsx
+msgid "Copy the code {code}"
+msgstr "कोड {code} कॉपी करें"
+
#: src/lib/keyboard-shortcuts.ts
msgid "Copy the focused file-tree item so Paste can duplicate it."
msgstr "फ़ाइल-ट्री के फ़ोकस किए गए आइटम को कॉपी करें ताकि Paste उसकी नकल बना सके।"
@@ -11214,6 +11226,14 @@ msgstr "साइन इन विफल: {0}"
msgid "Sign-in stream ended without confirmation — please try again"
msgstr "साइन-इन स्ट्रीम बिना पुष्टि के समाप्त हुई — कृपया फिर कोशिश करें"
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}"
+msgstr "{agentName} में साइन इन किया जा रहा है"
+
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}…"
+msgstr "{agentName} में साइन इन किया जा रहा है…"
+
#: src/editor/components/Pdf.tsx
msgid "Single page"
msgstr "एक पेज"
@@ -12391,10 +12411,6 @@ msgstr "यह एजेंट स्लैश कमांड नहीं द
msgid "This agent hasn't announced its commands yet"
msgstr "इस एजेंट ने अभी तक अपने कमांड घोषित नहीं किए हैं"
-#: src/components/acp/ThreadView.tsx
-msgid "This agent needs you to sign in first — see the notice below."
-msgstr "इस एजेंट के लिए पहले आपका साइन इन करना ज़रूरी है — नीचे दी सूचना देखें।"
-
#. placeholder {0}: item.provides
#. placeholder {1}: item.displayName
#. placeholder {2}: item.displayName
diff --git a/packages/app/src/locales/id/messages.json b/packages/app/src/locales/id/messages.json
index 326d59416..7af87c2dd 100644
--- a/packages/app/src/locales/id/messages.json
+++ b/packages/app/src/locales/id/messages.json
@@ -1863,7 +1863,6 @@
"QQbwzK": ["Tidak ada agen yang tersedia."],
"QQghPu": ["Pasang di Claude Desktop"],
"QR5SP1": ["templat dibuat"],
- "QTsvh1": ["Agen ini memerlukan Anda masuk dulu — lihat pemberitahuan di bawah."],
"QUhYEG": ["Spasi untuk melompat · panah bawah untuk menunduk"],
"QWdKwH": ["Pindahkan"],
"QYTOaN": ["Anda bisa mengubah ini nanti di <0>Pengaturan → Sinkronisasi</0>."],
@@ -2248,6 +2247,7 @@
["targetCount"],
" item terpilih? Folder dan semua berkas di dalamnya akan dihapus. Tindakan ini tidak bisa dibatalkan."
],
+ "WMsoIm": ["Sudah masuk?"],
"WPwDin": ["Buka folder di disk"],
"WR0y2O": ["Bagikan folder"],
"WRNXKp": ["Mencari"],
@@ -2331,6 +2331,7 @@
"XgqUOy": [
"Tidak ada keterampilan yang ditemukan di sumber itu. Jika Anda melanjutkan, impor akan melaporkan alasannya."
],
+ "XgsZ2F": ["Salin kode ", ["code"]],
"Xhm7gG": ["Saran aset"],
"Xisk4u": ["Disunting ", ["editedAgo"]],
"XjqA8x": ["Mengaktifkan atau menonaktifkan pola ", ["0"], "/**"],
@@ -2431,6 +2432,7 @@
],
"Yy90sM": ["Keterampilan \"", ["name"], "\" dibuat"],
"YyXtnN": ["Garis bawah"],
+ "Yz8urJ": ["Sedang masuk ke ", ["agentName"]],
"Yzs3QX": ["Tindakan keterampilan lainnya"],
"Z0W6SO": [
"Folder ini adalah klona dari ",
@@ -2854,6 +2856,7 @@
"dw_3cv": ["Ganti nama keterampilan"],
"dw_dUJ": ["Gagal menggandakan jalur"],
"dx-TwN": ["Menjalankan audit proyek"],
+ "dyfMJN": ["Kode disalin"],
"e0NrBM": ["Proyek"],
"e1Rn_k": ["Buka folder induknya"],
"e1hptq": ["Menyematkan video dengan kendali pemutar bawaan."],
@@ -3023,6 +3026,7 @@
"gUx34c": [
"Bahasa yang digunakan OpenKnowledge; Sistem mengikuti sistem operasi Anda. Catatan Anda sendiri tetap dalam bahasa saat Anda menulisnya."
],
+ "gY7wnY": ["Sedang masuk ke ", ["agentName"], "…"],
"gYz2ep": ["Kedaluwarsa dalam ", ["timeLabel"]],
"gZElfU": ["Memperbaiki ", ["0"], " dari ", ["1"], " berkas"],
"gZiT5e": ["Ganti symlink-symlink ini dengan salinan mandiri?"],
diff --git a/packages/app/src/locales/id/messages.po b/packages/app/src/locales/id/messages.po
index 0a6307963..4fdb23bf2 100644
--- a/packages/app/src/locales/id/messages.po
+++ b/packages/app/src/locales/id/messages.po
@@ -1555,6 +1555,10 @@ msgstr "Sudah terbuka"
msgid "Already set up — ok is available in your terminal"
msgstr "Sudah disiapkan — ok tersedia di terminal Anda"
+#: src/components/acp/ThreadView.tsx
+msgid "Already signed in?"
+msgstr "Sudah masuk?"
+
#: src/components/ReportBugDialogBody.tsx
msgid "Always included"
msgstr "Selalu disertakan"
@@ -2584,6 +2588,10 @@ msgstr "Bahasa blok kode: {currentLabel}. Klik untuk mengubah."
msgid "Code block settings"
msgstr "Pengaturan blok kode"
+#: src/components/acp/ThreadView.tsx
+msgid "Code copied"
+msgstr "Kode disalin"
+
#: src/components/AuthModal.tsx
msgid "Code copied to clipboard"
msgstr "Kode disalin ke papan klip"
@@ -3131,6 +3139,10 @@ msgstr "Salin tautan berbagi"
msgid "Copy source"
msgstr "Salin sumber"
+#: src/components/acp/ThreadView.tsx
+msgid "Copy the code {code}"
+msgstr "Salin kode {code}"
+
#: src/lib/keyboard-shortcuts.ts
msgid "Copy the focused file-tree item so Paste can duplicate it."
msgstr "Menyalin item pohon berkas yang sedang difokus agar Tempel bisa menggandakannya."
@@ -11214,6 +11226,14 @@ msgstr "Gagal masuk: {0}"
msgid "Sign-in stream ended without confirmation — please try again"
msgstr "Aliran proses masuk berakhir tanpa konfirmasi — silakan coba lagi"
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}"
+msgstr "Sedang masuk ke {agentName}"
+
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}…"
+msgstr "Sedang masuk ke {agentName}…"
+
#: src/editor/components/Pdf.tsx
msgid "Single page"
msgstr "Satu halaman"
@@ -12391,10 +12411,6 @@ msgstr "Agen ini tidak menawarkan perintah garis miring — pesan Anda akan diki
msgid "This agent hasn't announced its commands yet"
msgstr "Agen ini belum mengumumkan perintahnya"
-#: src/components/acp/ThreadView.tsx
-msgid "This agent needs you to sign in first — see the notice below."
-msgstr "Agen ini memerlukan Anda masuk dulu — lihat pemberitahuan di bawah."
-
#. placeholder {0}: item.provides
#. placeholder {1}: item.displayName
#. placeholder {2}: item.displayName
diff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.json
index ccb801677..7499c990f 100644
--- a/packages/app/src/locales/pseudo/messages.json
+++ b/packages/app/src/locales/pseudo/messages.json
@@ -1851,7 +1851,6 @@
"QQbwzK": ["Ńō àĝēńţś àvàĩĺàƀĺē."],
"QQghPu": ["Ĩńśţàĺĺ ĩń Ćĺàũďē Ďēśķţōƥ"],
"QR5SP1": ["ćŕēàţēď ţēḿƥĺàţē"],
- "QTsvh1": ["Ţĥĩś àĝēńţ ńēēďś ŷōũ ţō śĩĝń ĩń ƒĩŕśţ — śēē ţĥē ńōţĩćē ƀēĺōŵ."],
"QUhYEG": ["Śƥàćē ţō Ĵũḿƥ · ďōŵń àŕŕōŵ ţō ďũćķ"],
"QWdKwH": ["Ḿōvē"],
"QYTOaN": ["Ŷōũ ćàń ćĥàńĝē ţĥĩś ĺàţēŕ ĩń <0>Śēţţĩńĝś → Śŷńć</0>."],
@@ -2231,6 +2230,7 @@
["targetCount"],
" śēĺēćţēď ĩţēḿś? Ƒōĺďēŕś àńď àĺĺ ƒĩĺēś ĩńśĩďē ţĥēḿ ŵĩĺĺ ƀē ďēĺēţēď. Ţĥĩś àćţĩōń ćàńńōţ ƀē ũńďōńē."
],
+ "WMsoIm": ["Àĺŕēàďŷ śĩĝńēď ĩń?"],
"WPwDin": ["Ōƥēń ƒōĺďēŕ ōń ďĩśķ"],
"WR0y2O": ["Śĥàŕē ƒōĺďēŕ"],
"WRNXKp": ["Śēàŕćĥĩńĝ"],
@@ -2312,6 +2312,7 @@
"XfzqjK": ["ţēḿƥĺàţē \"", ["name"], "\""],
"Xg-Ntj": ["Ţĥē ţōķēń ńēēďś ţĥē ŕēƥō àńď ŕēàď:ũśēŕ śćōƥēś."],
"XgqUOy": ["Ńō śķĩĺĺ ƒōũńď àţ ţĥàţ śōũŕćē. Ĩḿƥōŕţ ŵĩĺĺ ŕēƥōŕţ ŵĥŷ ĩƒ ŷōũ ćōńţĩńũē."],
+ "XgsZ2F": ["Ćōƥŷ ţĥē ćōďē ", ["code"]],
"Xhm7gG": ["Àśśēţ śũĝĝēśţĩōńś"],
"Xisk4u": ["Ēďĩţēď ", ["editedAgo"]],
"XjqA8x": ["Ţōĝĝĺēś ţĥē ƥàţţēŕń ", ["0"], "/**"],
@@ -2419,6 +2420,7 @@
],
"Yy90sM": ["Śķĩĺĺ \"", ["name"], "\" ćŕēàţēď"],
"YyXtnN": ["Ũńďēŕĺĩńē"],
+ "Yz8urJ": ["Śĩĝńĩńĝ ĩń ţō ", ["agentName"]],
"Yzs3QX": ["Ḿōŕē śķĩĺĺ àćţĩōńś"],
"Z0W6SO": [
"Ţĥĩś ƒōĺďēŕ ĩś à ćĺōńē ōƒ ",
@@ -2835,6 +2837,7 @@
"dw_3cv": ["Ŕēńàḿē śķĩĺĺ"],
"dw_dUJ": ["Ƒàĩĺēď ţō ďũƥĺĩćàţē ƥàţĥ"],
"dx-TwN": ["Ŕũńńĩńĝ ƥŕōĴēćţ àũďĩţ"],
+ "dyfMJN": ["Ćōďē ćōƥĩēď"],
"e0NrBM": ["ƤŕōĴēćţ"],
"e1Rn_k": ["Ōƥēń ćōńţàĩńĩńĝ ƒōĺďēŕ"],
"e1hptq": ["Ēḿƀēď à vĩďēō ŵĩţĥ ńàţĩvē ƥĺàŷēŕ ćōńţŕōĺś."],
@@ -3009,6 +3012,7 @@
"gUx34c": [
"Ţĥē ĺàńĝũàĝē ŌƥēńĶńōŵĺēďĝē śƥēàķś; Śŷśţēḿ ƒōĺĺōŵś ŷōũŕ ōƥēŕàţĩńĝ śŷśţēḿ. Ŷōũŕ ōŵń ńōţēś śţàŷ ĩń ţĥē ĺàńĝũàĝē ŷōũ ŵŕōţē ţĥēḿ ĩń."
],
+ "gY7wnY": ["Śĩĝńĩńĝ ĩń ţō ", ["agentName"], "…"],
"gYz2ep": ["Ēxƥĩŕēś ĩń ", ["timeLabel"]],
"gZElfU": ["Ƒĩxĩńĝ ", ["0"], " ōƒ ", ["1"], " ƒĩĺēś"],
"gZiT5e": ["Ŕēƥĺàćē ţĥēśē śŷḿĺĩńķś ŵĩţĥ ĩńďēƥēńďēńţ ćōƥĩēś?"],
diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.po
index 5e0c9c903..89e52c239 100644
--- a/packages/app/src/locales/pseudo/messages.po
+++ b/packages/app/src/locales/pseudo/messages.po
@@ -1555,6 +1555,10 @@ msgstr ""
msgid "Already set up — ok is available in your terminal"
msgstr ""
+#: src/components/acp/ThreadView.tsx
+msgid "Already signed in?"
+msgstr ""
+
#: src/components/ReportBugDialogBody.tsx
msgid "Always included"
msgstr ""
@@ -2584,6 +2588,10 @@ msgstr ""
msgid "Code block settings"
msgstr ""
+#: src/components/acp/ThreadView.tsx
+msgid "Code copied"
+msgstr ""
+
#: src/components/AuthModal.tsx
msgid "Code copied to clipboard"
msgstr ""
@@ -3131,6 +3139,10 @@ msgstr ""
msgid "Copy source"
msgstr ""
+#: src/components/acp/ThreadView.tsx
+msgid "Copy the code {code}"
+msgstr ""
+
#: src/lib/keyboard-shortcuts.ts
msgid "Copy the focused file-tree item so Paste can duplicate it."
msgstr ""
@@ -11214,6 +11226,14 @@ msgstr ""
msgid "Sign-in stream ended without confirmation — please try again"
msgstr ""
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}"
+msgstr ""
+
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}…"
+msgstr ""
+
#: src/editor/components/Pdf.tsx
msgid "Single page"
msgstr ""
@@ -12391,10 +12411,6 @@ msgstr ""
msgid "This agent hasn't announced its commands yet"
msgstr ""
-#: src/components/acp/ThreadView.tsx
-msgid "This agent needs you to sign in first — see the notice below."
-msgstr ""
-
#. placeholder {0}: item.provides
#. placeholder {1}: item.displayName
#. placeholder {2}: item.displayName
diff --git a/packages/app/src/locales/pt-BR/messages.json b/packages/app/src/locales/pt-BR/messages.json
index 164eb0708..0b0134b58 100644
--- a/packages/app/src/locales/pt-BR/messages.json
+++ b/packages/app/src/locales/pt-BR/messages.json
@@ -2111,7 +2111,6 @@
"QQbwzK": ["Nenhum agente disponível."],
"QQghPu": ["Instalar no Claude Desktop"],
"QR5SP1": ["modelo criado"],
- "QTsvh1": ["Este agente precisa que você entre primeiro — veja o aviso abaixo."],
"QUhYEG": ["Espaço para pular · seta para baixo para agachar"],
"QWdKwH": ["Mover"],
"QYTOaN": ["Você pode mudar isto depois em <0>Configurações → Sincronização</0>."],
@@ -2560,6 +2559,7 @@
["targetCount"],
" itens selecionados? As pastas e todos os arquivos dentro delas serão excluídos. Esta ação não pode ser desfeita."
],
+ "WMsoIm": ["Já fez login?"],
"WPwDin": ["Abrir a pasta no disco"],
"WR0y2O": ["Compartilhar a pasta"],
"WRNXKp": ["Buscando"],
@@ -2643,6 +2643,7 @@
"XgqUOy": [
"Nenhuma habilidade encontrada nessa fonte. Se você continuar, a importação vai dizer por quê."
],
+ "XgsZ2F": ["Copiar o código ", ["code"]],
"Xhm7gG": ["Sugestões de recursos"],
"Xisk4u": ["Editado ", ["editedAgo"]],
"XjqA8x": ["Alterna o padrão ", ["0"], "/**"],
@@ -2769,6 +2770,7 @@
],
"Yy90sM": ["Habilidade \"", ["name"], "\" criada"],
"YyXtnN": ["Sublinhado"],
+ "Yz8urJ": ["Fazendo login em ", ["agentName"]],
"Yzs3QX": ["Mais ações de habilidade"],
"Z0W6SO": [
"Esta pasta é um clone de ",
@@ -3243,6 +3245,7 @@
"dw_3cv": ["Renomear a habilidade"],
"dw_dUJ": ["Falha ao duplicar o caminho"],
"dx-TwN": ["Rodando a auditoria do projeto"],
+ "dyfMJN": ["Código copiado"],
"e0NrBM": ["Projeto"],
"e1Rn_k": ["Abrir a pasta que o contém"],
"e1hptq": ["Incorpora um vídeo com os controles nativos do player."],
@@ -3450,6 +3453,7 @@
"gUx34c": [
"O idioma que o OpenKnowledge fala; Sistema acompanha o do seu sistema operacional. Suas anotações continuam no idioma em que você as escreveu."
],
+ "gY7wnY": ["Fazendo login em ", ["agentName"], "…"],
"gYz2ep": ["Expira em ", ["timeLabel"]],
"gZElfU": ["Corrigindo ", ["0"], " de ", ["1"], " arquivos"],
"gZiT5e": ["Substituir estes links simbólicos por cópias independentes?"],
diff --git a/packages/app/src/locales/pt-BR/messages.po b/packages/app/src/locales/pt-BR/messages.po
index f7f87b8f7..46c85150f 100644
--- a/packages/app/src/locales/pt-BR/messages.po
+++ b/packages/app/src/locales/pt-BR/messages.po
@@ -1555,6 +1555,10 @@ msgstr "Já está aberto"
msgid "Already set up — ok is available in your terminal"
msgstr "Já configurado — ok está disponível no seu terminal"
+#: src/components/acp/ThreadView.tsx
+msgid "Already signed in?"
+msgstr "Já fez login?"
+
#: src/components/ReportBugDialogBody.tsx
msgid "Always included"
msgstr "Sempre incluído"
@@ -2584,6 +2588,10 @@ msgstr "Linguagem do bloco de código: {currentLabel}. Clique para alterar."
msgid "Code block settings"
msgstr "Configurações do bloco de código"
+#: src/components/acp/ThreadView.tsx
+msgid "Code copied"
+msgstr "Código copiado"
+
#: src/components/AuthModal.tsx
msgid "Code copied to clipboard"
msgstr "Código copiado para a área de transferência"
@@ -3131,6 +3139,10 @@ msgstr "Copiar link de compartilhamento"
msgid "Copy source"
msgstr "Copiar o código fonte"
+#: src/components/acp/ThreadView.tsx
+msgid "Copy the code {code}"
+msgstr "Copiar o código {code}"
+
#: src/lib/keyboard-shortcuts.ts
msgid "Copy the focused file-tree item so Paste can duplicate it."
msgstr "Copia o item em foco na árvore de arquivos para que Colar possa duplicá-lo."
@@ -11214,6 +11226,14 @@ msgstr "Falha no login: {0}"
msgid "Sign-in stream ended without confirmation — please try again"
msgstr "O fluxo de login terminou sem confirmação — tente de novo"
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}"
+msgstr "Fazendo login em {agentName}"
+
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}…"
+msgstr "Fazendo login em {agentName}…"
+
#: src/editor/components/Pdf.tsx
msgid "Single page"
msgstr "Página única"
@@ -12391,10 +12411,6 @@ msgstr "Este agente não oferece comandos de barra — sua mensagem será enviad
msgid "This agent hasn't announced its commands yet"
msgstr "Este agente ainda não anunciou seus comandos"
-#: src/components/acp/ThreadView.tsx
-msgid "This agent needs you to sign in first — see the notice below."
-msgstr "Este agente precisa que você entre primeiro — veja o aviso abaixo."
-
#. placeholder {0}: item.provides
#. placeholder {1}: item.displayName
#. placeholder {2}: item.displayName
diff --git a/packages/app/src/locales/ur/messages.json b/packages/app/src/locales/ur/messages.json
index 8e1e0b7b3..b3b415b3e 100644
--- a/packages/app/src/locales/ur/messages.json
+++ b/packages/app/src/locales/ur/messages.json
@@ -1890,7 +1890,6 @@
"QQbwzK": ["کوئی ایجنٹ دستیاب نہیں۔"],
"QQghPu": ["Claude Desktop میں نصب کریں"],
"QR5SP1": ["ٹیمپلیٹ بنایا"],
- "QTsvh1": ["اس ایجنٹ کے لیے آپ کا پہلے سائن اِن کرنا ضروری ہے — نیچے دی گئی اطلاع دیکھیں۔"],
"QUhYEG": ["چھلانگ کے لیے اسپیس · جھکنے کے لیے نیچے کا تیر"],
"QWdKwH": ["منتقل کریں"],
"QYTOaN": ["آپ اسے بعد میں <0>ترتیبات ← مطابقت پذیری</0> میں بدل سکتے ہیں۔"],
@@ -2291,6 +2290,7 @@
["targetCount"],
" منتخب آئٹمز حذف کرنا چاہتے ہیں؟ فولڈرز اور ان کے اندر کی تمام فائلیں حذف ہو جائیں گی۔ یہ عمل واپس نہیں لیا جا سکتا۔"
],
+ "WMsoIm": ["پہلے سے سائن اِن ہیں؟"],
"WPwDin": ["ڈسک پر فولڈر کھولیں"],
"WR0y2O": ["فولڈر شیئر کریں"],
"WRNXKp": ["تلاش جاری ہے"],
@@ -2372,6 +2372,7 @@
"XfzqjK": ["ٹیمپلیٹ «", ["name"], "»"],
"Xg-Ntj": ["ٹوکن کو repo اور read:user دائرہ کار درکار ہیں۔"],
"XgqUOy": ["اس ماخذ پر کوئی مہارت نہیں ملی۔ اگر آپ جاری رکھیں تو درآمد وجہ بتا دے گی۔"],
+ "XgsZ2F": ["کوڈ ", ["code"], " کاپی کریں"],
"Xhm7gG": ["اثاثوں کی تجاویز"],
"Xisk4u": [["editedAgo"], " ترمیم ہوئی"],
"XjqA8x": ["پیٹرن ", ["0"], "/** ٹوگل کریں"],
@@ -2478,6 +2479,7 @@
],
"Yy90sM": ["مہارت «", ["name"], "» بن گئی"],
"YyXtnN": ["خطِ تحت"],
+ "Yz8urJ": [["agentName"], " میں سائن اِن کیا جا رہا ہے"],
"Yzs3QX": ["مہارت کے مزید اعمال"],
"Z0W6SO": [
"یہ فولڈر ",
@@ -2908,6 +2910,7 @@
"dw_3cv": ["مہارت کا نام بدلیں"],
"dw_dUJ": ["راستے کی نقل نہیں بن سکی"],
"dx-TwN": ["پروجیکٹ کا آڈٹ چل رہا ہے"],
+ "dyfMJN": ["کوڈ کاپی ہو گیا"],
"e0NrBM": ["پروجیکٹ"],
"e1Rn_k": ["پر مشتمل فولڈر کھولیں"],
"e1hptq": ["مقامی پلیئر کنٹرولز کے ساتھ ویڈیو شامل کریں۔"],
@@ -3077,6 +3080,7 @@
"gUx34c": [
"وہ زبان جو OpenKnowledge بولتا ہے؛ سسٹم آپ کے آپریٹنگ سسٹم کی پیروی کرتا ہے۔ آپ کے اپنے نوٹس اسی زبان میں رہیں گے جس میں آپ نے لکھے تھے۔"
],
+ "gY7wnY": [["agentName"], " میں سائن اِن کیا جا رہا ہے…"],
"gYz2ep": [["timeLabel"], " میں میعاد ختم"],
"gZElfU": [["1"], " میں سے ", ["0"], " فائلیں ٹھیک کی جا رہی ہیں"],
"gZiT5e": ["کیا ان سِم لنکس کو خودمختار نقول سے بدل دیا جائے؟"],
diff --git a/packages/app/src/locales/ur/messages.po b/packages/app/src/locales/ur/messages.po
index 5ba18f692..f440a4829 100644
--- a/packages/app/src/locales/ur/messages.po
+++ b/packages/app/src/locales/ur/messages.po
@@ -1559,6 +1559,10 @@ msgstr "پہلے سے کھلا ہے"
msgid "Already set up — ok is available in your terminal"
msgstr "پہلے سے ترتیب دیا جا چکا ہے — ok آپ کے ٹرمینل میں دستیاب ہے"
+#: src/components/acp/ThreadView.tsx
+msgid "Already signed in?"
+msgstr "پہلے سے سائن اِن ہیں؟"
+
#: src/components/ReportBugDialogBody.tsx
msgid "Always included"
msgstr "ہمیشہ شامل"
@@ -2588,6 +2592,10 @@ msgstr "کوڈ بلاک کی زبان: {currentLabel}۔ تبدیل کرنے کے
msgid "Code block settings"
msgstr "کوڈ بلاک کی ترتیبات"
+#: src/components/acp/ThreadView.tsx
+msgid "Code copied"
+msgstr "کوڈ کاپی ہو گیا"
+
#: src/components/AuthModal.tsx
msgid "Code copied to clipboard"
msgstr "کوڈ کلپ بورڈ پر نقل ہو گیا"
@@ -3135,6 +3143,10 @@ msgstr "شیئر لنک نقل کریں"
msgid "Copy source"
msgstr "سورس نقل کریں"
+#: src/components/acp/ThreadView.tsx
+msgid "Copy the code {code}"
+msgstr "کوڈ {code} کاپی کریں"
+
#: src/lib/keyboard-shortcuts.ts
msgid "Copy the focused file-tree item so Paste can duplicate it."
msgstr "فوکس شدہ فائل ٹری آئٹم نقل کریں تاکہ «چسپاں» اس کی نقل بنا سکے۔"
@@ -11218,6 +11230,14 @@ msgstr "سائن اِن ناکام: {0}"
msgid "Sign-in stream ended without confirmation — please try again"
msgstr "سائن اِن کی سٹریم تصدیق کے بغیر ختم ہو گئی — براہِ کرم دوبارہ کوشش کریں"
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}"
+msgstr "{agentName} میں سائن اِن کیا جا رہا ہے"
+
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}…"
+msgstr "{agentName} میں سائن اِن کیا جا رہا ہے…"
+
#: src/editor/components/Pdf.tsx
msgid "Single page"
msgstr "ایک صفحہ"
@@ -12395,10 +12415,6 @@ msgstr "یہ ایجنٹ سلیش کمانڈ پیش نہیں کرتا — آپ ک
msgid "This agent hasn't announced its commands yet"
msgstr "اس ایجنٹ نے ابھی تک اپنی کمانڈز کا اعلان نہیں کیا"
-#: src/components/acp/ThreadView.tsx
-msgid "This agent needs you to sign in first — see the notice below."
-msgstr "اس ایجنٹ کے لیے آپ کا پہلے سائن اِن کرنا ضروری ہے — نیچے دی گئی اطلاع دیکھیں۔"
-
#. placeholder {0}: item.provides
#. placeholder {1}: item.displayName
#. placeholder {2}: item.displayName
diff --git a/packages/app/src/locales/zh-Hans/messages.json b/packages/app/src/locales/zh-Hans/messages.json
index ba850e67a..d07841ed3 100644
--- a/packages/app/src/locales/zh-Hans/messages.json
+++ b/packages/app/src/locales/zh-Hans/messages.json
@@ -1638,7 +1638,6 @@
"QQbwzK": ["没有可用的智能体。"],
"QQghPu": ["安装到 Claude Desktop"],
"QR5SP1": ["已创建模板"],
- "QTsvh1": ["这个智能体需要你先登录——请看下方的提示。"],
"QUhYEG": ["空格跳跃 · 下方向键下蹲"],
"QWdKwH": ["移动"],
"QYTOaN": ["之后可以在<0>「设置 → 同步」</0>中更改。"],
@@ -1979,6 +1978,7 @@
["targetCount"],
" 个项目吗?文件夹及其中的所有文件都会被删除。此操作无法撤销。"
],
+ "WMsoIm": ["已经登录了?"],
"WPwDin": ["在磁盘上打开文件夹"],
"WR0y2O": ["共享文件夹"],
"WRNXKp": ["正在搜索"],
@@ -2060,6 +2060,7 @@
"XfzqjK": ["模板“", ["name"], "”"],
"Xg-Ntj": ["这个令牌需要 repo 和 read:user 权限范围。"],
"XgqUOy": ["在那个来源没有找到技能。如果继续,导入会告诉你原因。"],
+ "XgsZ2F": ["复制代码 ", ["code"]],
"Xhm7gG": ["资源建议"],
"Xisk4u": [["editedAgo"], "编辑"],
"XjqA8x": ["切换模式 ", ["0"], "/**"],
@@ -2150,6 +2151,7 @@
],
"Yy90sM": ["已创建技能“", ["name"], "”"],
"YyXtnN": ["下划线"],
+ "Yz8urJ": ["正在登录 ", ["agentName"]],
"Yzs3QX": ["更多技能操作"],
"Z0W6SO": [
"此文件夹是 ",
@@ -2517,6 +2519,7 @@
"dw_3cv": ["重命名技能"],
"dw_dUJ": ["复制路径失败"],
"dx-TwN": ["正在运行项目审查"],
+ "dyfMJN": ["代码已复制"],
"e0NrBM": ["项目"],
"e1Rn_k": ["打开所在文件夹"],
"e1hptq": ["嵌入一段视频,带原生播放器控件。"],
@@ -2662,6 +2665,7 @@
"gUx34c": [
"OpenKnowledge 使用的语言;“跟随系统”会跟随你的操作系统。你自己的笔记仍保持你书写时的语言。"
],
+ "gY7wnY": ["正在登录 ", ["agentName"], "…"],
"gYz2ep": [["timeLabel"], "后过期"],
"gZElfU": ["正在修复第 ", ["0"], "/", ["1"], " 个文件"],
"gZiT5e": ["要把这些符号链接替换为独立副本吗?"],
diff --git a/packages/app/src/locales/zh-Hans/messages.po b/packages/app/src/locales/zh-Hans/messages.po
index a0022d435..3912e4a7c 100644
--- a/packages/app/src/locales/zh-Hans/messages.po
+++ b/packages/app/src/locales/zh-Hans/messages.po
@@ -1559,6 +1559,10 @@ msgstr "已经打开"
msgid "Already set up — ok is available in your terminal"
msgstr "已配置完成——ok 现在可以在你的终端中使用"
+#: src/components/acp/ThreadView.tsx
+msgid "Already signed in?"
+msgstr "已经登录了?"
+
#: src/components/ReportBugDialogBody.tsx
msgid "Always included"
msgstr "始终包含"
@@ -2588,6 +2592,10 @@ msgstr "代码块语言:{currentLabel}。点击可更改。"
msgid "Code block settings"
msgstr "代码块设置"
+#: src/components/acp/ThreadView.tsx
+msgid "Code copied"
+msgstr "代码已复制"
+
#: src/components/AuthModal.tsx
msgid "Code copied to clipboard"
msgstr "代码已复制到剪贴板"
@@ -3135,6 +3143,10 @@ msgstr "复制共享链接"
msgid "Copy source"
msgstr "复制源码"
+#: src/components/acp/ThreadView.tsx
+msgid "Copy the code {code}"
+msgstr "复制代码 {code}"
+
#: src/lib/keyboard-shortcuts.ts
msgid "Copy the focused file-tree item so Paste can duplicate it."
msgstr "复制文件树中当前聚焦的项目,以便用「粘贴」创建副本。"
@@ -11218,6 +11230,14 @@ msgstr "登录失败:{0}"
msgid "Sign-in stream ended without confirmation — please try again"
msgstr "登录流程未确认就结束了——请重试"
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}"
+msgstr "正在登录 {agentName}"
+
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}…"
+msgstr "正在登录 {agentName}…"
+
#: src/editor/components/Pdf.tsx
msgid "Single page"
msgstr "单页"
@@ -12395,10 +12415,6 @@ msgstr "此智能体不提供斜杠命令 — 你的消息将作为纯文本发
msgid "This agent hasn't announced its commands yet"
msgstr "此智能体尚未公布其命令"
-#: src/components/acp/ThreadView.tsx
-msgid "This agent needs you to sign in first — see the notice below."
-msgstr "这个智能体需要你先登录——请看下方的提示。"
-
#. placeholder {0}: item.provides
#. placeholder {1}: item.displayName
#. placeholder {2}: item.displayName
diff --git a/packages/app/src/locales/zh-Hant/messages.json b/packages/app/src/locales/zh-Hant/messages.json
index 4e4a21b1d..f2c84b23e 100644
--- a/packages/app/src/locales/zh-Hant/messages.json
+++ b/packages/app/src/locales/zh-Hant/messages.json
@@ -1658,7 +1658,6 @@
"QQbwzK": ["沒有可用的代理。"],
"QQghPu": ["安裝到 Claude Desktop"],
"QR5SP1": ["已建立範本"],
- "QTsvh1": ["這個代理需要你先登入——請看下面的提示。"],
"QUhYEG": ["空白鍵跳躍 · 下方向鍵蹲下"],
"QWdKwH": ["移動"],
"QYTOaN": ["之後可以在<0>「設定 → 同步」</0>中變更。"],
@@ -2001,6 +2000,7 @@
["targetCount"],
" 個項目嗎?資料夾以及裡面的所有檔案都會被刪除。這個動作無法復原。"
],
+ "WMsoIm": ["已經登入了?"],
"WPwDin": ["在磁碟上開啟資料夾"],
"WR0y2O": ["分享資料夾"],
"WRNXKp": ["正在搜尋"],
@@ -2082,6 +2082,7 @@
"XfzqjK": ["範本「", ["name"], "」"],
"Xg-Ntj": ["這個權杖需要 repo 和 read:user 權限範圍。"],
"XgqUOy": ["在那個來源找不到技能。如果繼續,匯入會告訴你原因。"],
+ "XgsZ2F": ["複製代碼 ", ["code"]],
"Xhm7gG": ["資源建議"],
"Xisk4u": [["editedAgo"], "編輯"],
"XjqA8x": ["切換模式 ", ["0"], "/**"],
@@ -2168,6 +2169,7 @@
"YxZDGh": ["無法讀取 ", ["fileName"], "。它可能已被移動、刪除,或還沒下載完。請試著重新加入。"],
"Yy90sM": ["已建立技能「", ["name"], "」"],
"YyXtnN": ["底線"],
+ "Yz8urJ": ["正在登入 ", ["agentName"]],
"Yzs3QX": ["更多技能動作"],
"Z0W6SO": [
"這個資料夾是 ",
@@ -2537,6 +2539,7 @@
"dw_3cv": ["重新命名技能"],
"dw_dUJ": ["複製路徑失敗"],
"dx-TwN": ["正在執行專案稽核"],
+ "dyfMJN": ["代碼已複製"],
"e0NrBM": ["專案"],
"e1Rn_k": ["開啟所在的資料夾"],
"e1hptq": ["嵌入一段影片,附原生播放器控制項。"],
@@ -2686,6 +2689,7 @@
"gUx34c": [
"OpenKnowledge 使用的語言;「跟隨系統」會跟隨你的作業系統。你自己的筆記會保持你書寫時的語言。"
],
+ "gY7wnY": ["正在登入 ", ["agentName"], "…"],
"gYz2ep": [["timeLabel"], "後到期"],
"gZElfU": ["正在修正第 ", ["0"], "/", ["1"], " 個檔案"],
"gZiT5e": ["要把這些符號連結換成獨立的副本嗎?"],
diff --git a/packages/app/src/locales/zh-Hant/messages.po b/packages/app/src/locales/zh-Hant/messages.po
index 020ff4b77..ed6778f08 100644
--- a/packages/app/src/locales/zh-Hant/messages.po
+++ b/packages/app/src/locales/zh-Hant/messages.po
@@ -1559,6 +1559,10 @@ msgstr "已經開啟"
msgid "Already set up — ok is available in your terminal"
msgstr "已經設定好了——ok 現在可以在你的終端機中使用"
+#: src/components/acp/ThreadView.tsx
+msgid "Already signed in?"
+msgstr "已經登入了?"
+
#: src/components/ReportBugDialogBody.tsx
msgid "Always included"
msgstr "一律包含"
@@ -2588,6 +2592,10 @@ msgstr "程式碼區塊語言:{currentLabel}。點一下可變更。"
msgid "Code block settings"
msgstr "程式碼區塊設定"
+#: src/components/acp/ThreadView.tsx
+msgid "Code copied"
+msgstr "代碼已複製"
+
#: src/components/AuthModal.tsx
msgid "Code copied to clipboard"
msgstr "程式碼已複製到剪貼簿"
@@ -3135,6 +3143,10 @@ msgstr "複製分享連結"
msgid "Copy source"
msgstr "複製原始碼"
+#: src/components/acp/ThreadView.tsx
+msgid "Copy the code {code}"
+msgstr "複製代碼 {code}"
+
#: src/lib/keyboard-shortcuts.ts
msgid "Copy the focused file-tree item so Paste can duplicate it."
msgstr "複製檔案樹中目前聚焦的項目,這樣「貼上」就能做出一份副本。"
@@ -11218,6 +11230,14 @@ msgstr "登入失敗:{0}"
msgid "Sign-in stream ended without confirmation — please try again"
msgstr "登入流程還沒確認就結束了——請再試一次"
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}"
+msgstr "正在登入 {agentName}"
+
+#: src/components/acp/ThreadView.tsx
+msgid "Signing in to {agentName}…"
+msgstr "正在登入 {agentName}…"
+
#: src/editor/components/Pdf.tsx
msgid "Single page"
msgstr "單頁"
@@ -12395,10 +12415,6 @@ msgstr "此智慧代理不提供斜線指令 — 你的訊息將以純文字傳
msgid "This agent hasn't announced its commands yet"
msgstr "此智慧代理尚未公布其指令"
-#: src/components/acp/ThreadView.tsx
-msgid "This agent needs you to sign in first — see the notice below."
-msgstr "這個代理需要你先登入——請看下面的提示。"
-
#. placeholder {0}: item.provides
#. placeholder {1}: item.displayName
#. placeholder {2}: item.displayName
diff --git a/packages/core/src/acp/thread-protocol.ts b/packages/core/src/acp/thread-protocol.ts
index e349fe8b1..cb92e9c61 100644
--- a/packages/core/src/acp/thread-protocol.ts
+++ b/packages/core/src/acp/thread-protocol.ts
@@ -34,12 +34,18 @@ import type {
* strip can show "blocked on you" instead of a generic spinner. Terminal
* failures always win over it — a dead turn's stale prompt must never read
* as still inviting approval.
+ *
+ * `authenticating` is the `authenticate` round trip: the user picked a method
+ * and the agent is running the sign-in, which can take minutes when it detours
+ * through a browser. It is NOT `installing` — a client that conflates them
+ * tells the user the agent is starting while it is in fact waiting on them.
*/
export type ThreadStatus =
| 'installing'
| 'spawning'
| 'ready'
| 'auth_required'
+ | 'authenticating'
| 'running'
| 'awaiting_permission'
| 'exited'
@@ -253,6 +259,16 @@ export interface ThreadInfo {
* never persisted.
*/
steer?: SteerMessage;
+ /**
+ * What the agent said while an `authenticate` was in flight — its own
+ * stderr, verbatim and untranslated. A device-code flow prints the code and
+ * the URL to confirm it against here, and that is the only channel it has:
+ * the sign-in happens before any session exists, so no `session/update` can
+ * carry it. Present only while the status is `authenticating`; the client
+ * shows it so the browser's "confirm this code" step has something to check
+ * against. Live-thread-only and never persisted.
+ */
+ signInOutput?: string[];
}
/** One entry in a thread's event log. */
diff --git a/packages/server/src/acp/thread-manager.integration.test.ts b/packages/server/src/acp/thread-manager.integration.test.ts
index ac1bbe62d..ee49488e4 100644
--- a/packages/server/src/acp/thread-manager.integration.test.ts
+++ b/packages/server/src/acp/thread-manager.integration.test.ts
@@ -17,6 +17,7 @@ import { tmpdir } from 'node:os';
import { dirname, join } from 'node:path';
import type {
ThreadEvent,
+ ThreadInfo,
ThreadServerFrame,
} from '@inkeep/open-knowledge-core/acp/thread-protocol';
import { afterEach, describe, expect, test } from 'vitest';
@@ -2696,11 +2697,15 @@ function writeSessionFailingAgentEntry(
localDir: string,
id: string,
error: { code: number; message: string; data: unknown },
+ /** Startup chatter on stderr — the boot banners and package-manager warnings
+ * a real agent writes before it says anything about the failure. */
+ stderrNoise?: string,
): void {
const agentPath = join(localDir, `${id}.mjs`);
writeFileSync(
agentPath,
`
+${stderrNoise === undefined ? '' : `process.stderr.write(${JSON.stringify(`${stderrNoise}\n`)});`}
const write = (msg) => process.stdout.write(JSON.stringify(msg) + '\\n');
const ERROR = ${JSON.stringify(error)};
const AUTH_METHODS = [{ id: 'test_login', name: 'Test Login', description: 'Sign in via test' }];
@@ -2810,13 +2815,83 @@ process.stdin.on('data', (chunk) => {
* `markerPath` exists, so a retry (which respawns) can still reach ready and
* the recovery paths around an unanswered sign-in are drivable end to end.
*/
-function writeSilentAuthAgentEntry(localDir: string, id: string, markerPath: string): void {
+/**
+ * An agent that reads its credentials once at startup, the way a real CLI does:
+ * `authenticate` succeeds and writes the marker, but THIS process still refuses
+ * `session/new` because it decided at boot that it was signed out. Only a fresh
+ * process sees the credential.
+ */
+function writeStartupCredentialAgentEntry(localDir: string, id: string, markerPath: string): void {
+ const agentPath = join(localDir, `${id}.mjs`);
+ writeFileSync(
+ agentPath,
+ `
+import { existsSync, writeFileSync } from 'node:fs';
+const MARKER = ${JSON.stringify(markerPath)};
+const AUTHED_AT_START = existsSync(MARKER);
+const write = (msg) => process.stdout.write(JSON.stringify(msg) + '\\n');
+const AUTH_METHODS = [{ id: 'test_login', name: 'Test Login' }];
+let buffer = '';
+process.stdin.setEncoding('utf8');
+process.stdin.on('data', (chunk) => {
+ buffer += chunk;
+ let idx = buffer.indexOf('\\n');
+ while (idx !== -1) {
+ const line = buffer.slice(0, idx);
+ buffer = buffer.slice(idx + 1);
+ idx = buffer.indexOf('\\n');
+ if (line.trim() === '') continue;
+ const msg = JSON.parse(line);
+ if (msg.method === 'initialize') {
+ write({
+ jsonrpc: '2.0',
+ id: msg.id,
+ result: { protocolVersion: 1, agentCapabilities: {}, authMethods: AUTH_METHODS },
+ });
+ } else if (msg.method === 'authenticate') {
+ writeFileSync(MARKER, '');
+ write({ jsonrpc: '2.0', id: msg.id, result: {} });
+ } else if (msg.method === 'session/new') {
+ if (AUTHED_AT_START) {
+ write({ jsonrpc: '2.0', id: msg.id, result: { sessionId: 'startup-cred-session' } });
+ } else {
+ write({
+ jsonrpc: '2.0',
+ id: msg.id,
+ error: { code: -32000, message: 'Authentication required' },
+ });
+ }
+ } else if (msg.method === 'session/prompt') {
+ write({ jsonrpc: '2.0', id: msg.id, result: { stopReason: 'end_turn' } });
+ } else if (msg.id !== undefined) {
+ write({ jsonrpc: '2.0', id: msg.id, result: {} });
+ }
+ }
+});
+`,
+ );
+ writeFileSync(
+ join(localDir, 'acp-agents.json'),
+ JSON.stringify([{ id, name: `Fake ${id}`, command: 'node', args: [agentPath] }]),
+ );
+}
+
+function writeSilentAuthAgentEntry(
+ localDir: string,
+ id: string,
+ markerPath: string,
+ /** Emit a device-code flow's stderr prose: boot noise, then a code once
+ * `authenticate` arrives — the shape a real OAuth-device agent has. */
+ deviceCodeProse = false,
+): void {
const agentPath = join(localDir, `${id}.mjs`);
writeFileSync(
agentPath,
`
import { existsSync } from 'node:fs';
const MARKER = ${JSON.stringify(markerPath)};
+const PROSE = ${JSON.stringify(deviceCodeProse)};
+if (PROSE) process.stderr.write('npm warn Unknown env config "_jsr-registry".\\n');
const write = (msg) => process.stdout.write(JSON.stringify(msg) + '\\n');
const AUTH_METHODS = [{ id: 'test_login', name: 'Test Login' }];
let buffer = '';
@@ -2837,6 +2912,7 @@ process.stdin.on('data', (chunk) => {
result: { protocolVersion: 1, agentCapabilities: {}, authMethods: AUTH_METHODS },
});
} else if (msg.method === 'authenticate') {
+ if (PROSE) process.stderr.write('[auth] Enter this code in your browser: CRQT-NXNT\\n');
// No reply, ever: the sign-in went to a browser nobody came back from.
} else if (msg.method === 'session/new') {
if (existsSync(MARKER)) {
@@ -2912,14 +2988,50 @@ describe('AcpThreadManager auth classification', () => {
await manager.closeThread(info.threadId);
}, 30_000);
- test('a non-auth session/new failure is an error, not a sign-in prompt, and kills the agent', async () => {
+ // Nothing has gone wrong on a thread waiting to authenticate — the process is
+ // healthy — so its stderr is only startup chatter, and burying the agent's own
+ // "where to sign in" line under it helps nobody.
+ test('a sign-in prompt keeps the stderr tail out of the disclosure', async () => {
const contentDir = tmp();
const localDir = tmp();
- writeSessionFailingAgentEntry(localDir, 'broken-agent', {
- code: -32603,
- message: 'Failed to initialize session services',
- data: { cause: 'services' },
+ writeSessionFailingAgentEntry(
+ localDir,
+ 'noisy-auth-agent',
+ { code: -32000, message: 'Authentication required', data: { detail: 'run /login first' } },
+ 'npm warn Unknown env config "_jsr-registry".',
+ );
+ const manager = makeManager(contentDir, localDir);
+ const statuses: StatusEvent[] = [];
+ const info = await manager.createThread({
+ agent: { source: 'custom', id: 'noisy-auth-agent' },
});
+ await manager.subscribe(info.threadId, 0, collectStatuses(statuses));
+ await waitUntil(
+ () => withStatus(statuses, 'auth_required') !== undefined,
+ 15_000,
+ `auth_required; got ${JSON.stringify(statuses.map((e) => e.status))}`,
+ );
+
+ const detail = withStatus(statuses, 'auth_required')?.failure?.machineDetail ?? '';
+ expect(detail).toContain('run /login first');
+ expect(detail).not.toContain('npm warn');
+
+ await manager.closeThread(info.threadId);
+ }, 30_000);
+
+ test('a non-auth session/new failure is an error, not a sign-in prompt, and kills the agent', async () => {
+ const contentDir = tmp();
+ const localDir = tmp();
+ writeSessionFailingAgentEntry(
+ localDir,
+ 'broken-agent',
+ {
+ code: -32603,
+ message: 'Failed to initialize session services',
+ data: { cause: 'services' },
+ },
+ 'boot: loading services',
+ );
const manager = makeManager(contentDir, localDir);
const statuses: StatusEvent[] = [];
const info = await manager.createThread({ agent: { source: 'custom', id: 'broken-agent' } });
@@ -2939,6 +3051,9 @@ describe('AcpThreadManager auth classification', () => {
expect(event?.failure?.reason).toBe('session-setup');
expect(event?.failure?.agentMessage).toBe('Failed to initialize session services');
expect(event?.failure?.machineDetail).toContain('"cause":"services"');
+ // A real failure is the case the disclosure exists for: stderr is often the
+ // only evidence of why the agent died, so the tail stays attached here.
+ expect(event?.failure?.machineDetail).toContain('boot: loading services');
// A session that never opened leaves the process nothing to do.
await waitUntil(
@@ -3055,6 +3170,220 @@ describe('AcpThreadManager auth classification', () => {
await manager.closeThread(info.threadId);
}, 30_000);
+ // A device-code flow prints its code to stderr, because before a session
+ // exists ACP gives the agent no other channel — and the browser asks the user
+ // to confirm that code against what their device shows. Dropping it leaves
+ // them nothing to compare, so the confirmation step checks nothing.
+ test('a sign-in prompt keeps what the agent printed during the sign-in', async () => {
+ const contentDir = tmp();
+ const localDir = tmp();
+ const marker = join(tmp(), 'signed-in-elsewhere');
+ writeSilentAuthAgentEntry(localDir, 'coded-auth', marker, true);
+ // Long enough that the child's stderr reaches the parent before the sign-in
+ // gives up — the assertion is about what the prompt carries, not timing.
+ const manager = makeManager(contentDir, localDir, { authenticateTimeoutMs: 1_500 });
+ const statuses: StatusEvent[] = [];
+ const info = await manager.createThread({ agent: { source: 'custom', id: 'coded-auth' } });
+ await manager.subscribe(info.threadId, 0, collectStatuses(statuses));
+ await waitUntil(() => withStatus(statuses, 'auth_required') !== undefined, 15_000, 'auth');
+
+ // Before any sign-in: startup noise only, and none of it is worth showing.
+ expect(withStatus(statuses, 'auth_required')?.failure?.machineDetail ?? '').not.toContain(
+ 'npm warn',
+ );
+
+ await expect(manager.authenticateThread(info.threadId, 'test_login')).rejects.toThrow(
+ /didn't complete in time/,
+ );
+
+ // The broadcast coalesces, so the re-prompt lands a tick after the rejection.
+ await waitUntil(
+ () => statuses.filter((e) => e.status === 'auth_required').length >= 2,
+ 10_000,
+ 'the sign-in failure to re-prompt',
+ );
+ const detail = statuses.filter((e) => e.status === 'auth_required').at(-1)
+ ?.failure?.machineDetail;
+ expect(detail).toContain('CRQT-NXNT');
+ expect(detail).not.toContain('npm warn');
+
+ await manager.closeThread(info.threadId);
+ }, 40_000);
+
+ test('a sign-in in flight publishes the agent output live, then clears it', async () => {
+ const contentDir = tmp();
+ const localDir = tmp();
+ const marker = join(tmp(), 'signed-in-elsewhere');
+ writeSilentAuthAgentEntry(localDir, 'live-code-auth', marker, true);
+ const manager = makeManager(contentDir, localDir, { authenticateTimeoutMs: 1_500 });
+ const statuses: StatusEvent[] = [];
+ const infos: ThreadInfo[] = [];
+ const info = await manager.createThread({ agent: { source: 'custom', id: 'live-code-auth' } });
+ await manager.subscribe(info.threadId, 0, (frame: ThreadServerFrame) => {
+ collectStatuses(statuses)(frame);
+ if (frame.op === 'info') infos.push(frame.info);
+ });
+ await waitUntil(() => withStatus(statuses, 'auth_required') !== undefined, 15_000, 'auth');
+
+ const signIn = manager
+ .authenticateThread(info.threadId, 'test_login')
+ .then(() => null)
+ .catch((err: unknown) => err);
+
+ // Live: the code has to reach the user while the browser still wants it,
+ // not batched behind the next status change.
+ await waitUntil(
+ () => infos.some((i) => (i.signInOutput ?? []).some((l) => l.includes('CRQT-NXNT'))),
+ 10_000,
+ `the code to publish; got ${JSON.stringify(infos.map((i) => i.signInOutput))}`,
+ );
+ // Startup noise stays out — it was written before the sign-in began.
+ const published = infos.flatMap((i) => i.signInOutput ?? []);
+ expect(published.join('\n')).not.toContain('npm warn');
+
+ expect(String(await signIn)).toMatch(/didn't complete in time/);
+ // The wait is over, so the transient output goes with it.
+ await waitUntil(
+ () => manager.getInfo(info.threadId)?.signInOutput === undefined,
+ 10_000,
+ 'the sign-in output to clear',
+ );
+
+ await manager.closeThread(info.threadId);
+ }, 40_000);
+
+ // A CLI that reads its credentials at startup cannot see a sign-in that
+ // happened after it booted, so `session/new` refuses even though the sign-in
+ // worked. Handing the user back the prompt they just answered is the wrong
+ // answer when relaunching demonstrably fixes it.
+ test('a sign-in the running agent cannot see relaunches instead of re-prompting', async () => {
+ const contentDir = tmp();
+ const localDir = tmp();
+ const marker = join(tmp(), 'credential-written-by-authenticate');
+ writeStartupCredentialAgentEntry(localDir, 'startup-cred', marker);
+ const manager = makeManager(contentDir, localDir);
+ const statuses: StatusEvent[] = [];
+ const info = await manager.createThread({ agent: { source: 'custom', id: 'startup-cred' } });
+ await manager.subscribe(info.threadId, 0, collectStatuses(statuses));
+ await waitUntil(() => withStatus(statuses, 'auth_required') !== undefined, 15_000, 'auth');
+ const promptsBeforeSignIn = statuses.filter((e) => e.status === 'auth_required').length;
+
+ const signedIn = await manager.authenticateThread(info.threadId, 'test_login');
+
+ // The sign-in resolves as a sign-in: ready, not parked on a second prompt.
+ expect(signedIn.status).toBe('ready');
+ expect(manager.getInfo(info.threadId)?.status).toBe('ready');
+ expect(statuses.filter((e) => e.status === 'auth_required').length).toBe(promptsBeforeSignIn);
+
+ // …and the thread genuinely works, on the relaunched process.
+ const events: ThreadEvent[] = [];
+ await manager.subscribe(info.threadId, 0, (frame: ThreadServerFrame) => {
+ if (frame.op === 'event') events.push(frame.event);
+ if (frame.op === 'events') events.push(...frame.events);
+ });
+ manager.sendPrompt(info.threadId, 'hello');
+ await waitUntil(() => events.some((e) => e.kind === 'turn_ended'), 15_000, 'a completed turn');
+
+ await manager.closeThread(info.threadId);
+ }, 40_000);
+
+ // The relaunch can fail before it reports anything: `resolveAgentInfo`
+ // rejects on an unknown agent ahead of the first `emitStatus`. Leaving
+ // `authenticating` standing would wedge the thread, because the retry guard
+ // admits only `error` / `auth_required`.
+ test('a relaunch that fails before reporting parks the sign-in back where the user can act', async () => {
+ const contentDir = tmp();
+ const localDir = tmp();
+ const marker = join(tmp(), 'credential-written-by-authenticate');
+ writeStartupCredentialAgentEntry(localDir, 'vanishing-agent', marker);
+ const manager = makeManager(contentDir, localDir);
+ const statuses: StatusEvent[] = [];
+ const info = await manager.createThread({ agent: { source: 'custom', id: 'vanishing-agent' } });
+ await manager.subscribe(info.threadId, 0, collectStatuses(statuses));
+ await waitUntil(() => withStatus(statuses, 'auth_required') !== undefined, 15_000, 'auth');
+
+ // The agent disappears from the registry mid-sign-in, so the relaunch
+ // rejects in `resolveAgentInfo` — before it can emit a status of its own.
+ writeFileSync(join(localDir, 'acp-agents.json'), JSON.stringify([]));
+
+ await expect(manager.authenticateThread(info.threadId, 'test_login')).rejects.toThrow();
+
+ const settled = manager.getInfo(info.threadId)?.status;
+ expect(settled).not.toBe('authenticating');
+ expect(settled).toBe('auth_required');
+ // Still actionable: the retry guard admits `auth_required`, so the user's
+ // Retry reaches the launch instead of being refused.
+ await expect(manager.retryThread(info.threadId)).rejects.toThrow(/no custom agent/);
+
+ await manager.closeThread(info.threadId);
+ }, 40_000);
+
+ // The sign-in buffer belongs to the sign-in. A relaunch spawns a different
+ // process, and its boot chatter must not reach the next prompt as if it were
+ // this sign-in's device code.
+ test('a relaunch does not inherit the finished sign-in output', async () => {
+ const contentDir = tmp();
+ const localDir = tmp();
+ const marker = join(tmp(), 'credential-written-by-authenticate');
+ writeStartupCredentialAgentEntry(localDir, 'buffer-scope', marker);
+ const manager = makeManager(contentDir, localDir);
+ const infos: ThreadInfo[] = [];
+ const info = await manager.createThread({ agent: { source: 'custom', id: 'buffer-scope' } });
+ await manager.subscribe(info.threadId, 0, (frame: ThreadServerFrame) => {
+ if (frame.op === 'info') infos.push(frame.info);
+ });
+ await waitUntil(
+ () => manager.getInfo(info.threadId)?.status === 'auth_required',
+ 15_000,
+ 'auth',
+ );
+
+ const signedIn = await manager.authenticateThread(info.threadId, 'test_login');
+ expect(signedIn.status).toBe('ready');
+
+ // Nothing is left publishing into the sign-in channel once it is over.
+ expect(manager.getInfo(info.threadId)?.signInOutput).toBeUndefined();
+ expect(infos.at(-1)?.signInOutput).toBeUndefined();
+
+ await manager.closeThread(info.threadId);
+ }, 40_000);
+
+ // The field documents itself as never persisted; `buildMeta` has to agree,
+ // or a spent device code rides back out of the meta file on rehydrate.
+ // The field documents itself as never persisted; `buildMeta` has to agree,
+ // or a spent device code rides back out of the meta file on rehydrate.
+ test('sign-in output never reaches the persisted meta', async () => {
+ const contentDir = tmp();
+ const localDir = tmp();
+ const marker = join(tmp(), 'credential-written-by-authenticate');
+ writeStartupCredentialAgentEntry(localDir, 'meta-scope', marker);
+ const manager = makeManager(contentDir, localDir);
+ // Persistence only opens its `threads/` dir once the manager boots.
+ await manager.init();
+ const events: ThreadEvent[] = [];
+ const info = await manager.createThread({ agent: { source: 'custom', id: 'meta-scope' } });
+ await manager.subscribe(info.threadId, 0, (frame: ThreadServerFrame) => {
+ if (frame.op === 'event') events.push(frame.event);
+ if (frame.op === 'events') events.push(...frame.events);
+ });
+ await waitUntil(
+ () => manager.getInfo(info.threadId)?.status === 'auth_required',
+ 15_000,
+ 'auth',
+ );
+ await manager.authenticateThread(info.threadId, 'test_login');
+
+ // A thread with no user message is discarded on close rather than
+ // archived, and discarding takes the meta with it — so give it a turn.
+ manager.sendPrompt(info.threadId, 'hello');
+ await waitUntil(() => events.some((e) => e.kind === 'turn_ended'), 15_000, 'a completed turn');
+ await manager.closeThread(info.threadId);
+
+ const metaPath = join(localDir, 'threads', `${info.threadId}.meta.json`);
+ await waitUntil(() => existsSync(metaPath), 10_000, `the archived meta at ${metaPath}`);
+ expect(readFileSync(metaPath, 'utf8')).not.toContain('signInOutput');
+ }, 40_000);
+
test('an unanswered sign-in gives up on its own and leaves the thread usable', async () => {
const contentDir = tmp();
const localDir = tmp();
@@ -3110,7 +3439,9 @@ describe('AcpThreadManager auth classification', () => {
.authenticateThread(info.threadId, 'test_login')
.then(() => null)
.catch((err: unknown) => err);
- expect(manager.getInfo(info.threadId)?.status).toBe('installing');
+ // A sign-in in flight has a status of its own: reporting `installing` here
+ // told the user the agent was starting when it was waiting on them.
+ expect(manager.getInfo(info.threadId)?.status).toBe('authenticating');
writeFileSync(marker, '');
const retried = await manager.retryThread(info.threadId);
diff --git a/packages/server/src/acp/thread-manager.ts b/packages/server/src/acp/thread-manager.ts
index bedc93807..9e36fc944 100644
--- a/packages/server/src/acp/thread-manager.ts
+++ b/packages/server/src/acp/thread-manager.ts
@@ -168,6 +168,12 @@ const DEFAULT_STEER_STALL_MS = 10_000;
*/
const DEFAULT_AUTHENTICATE_TIMEOUT_MS = 5 * 60 * 1000;
const STDERR_TAIL_LINES = 40;
+/**
+ * How much of an agent's sign-in chatter the prompt will show. A device-code
+ * flow spends two lines (the code, the URL); the cap is what keeps a chatty
+ * agent from turning the prompt into a log view.
+ */
+const SIGN_IN_OUTPUT_LINES = 6;
/**
* `session/load` replays history BEFORE its response resolves per protocol,
* but at least one adapter (Gemini) fires the replay as a floating promise
@@ -309,6 +315,13 @@ interface ThreadRecord {
}
>;
stderrTail: string[];
+ /**
+ * Stderr written while an `authenticate` is in flight, or null outside one.
+ * The sign-in prose an agent emits here (a device code, the URL to confirm it
+ * against) is the only place that information exists — ACP has no session yet,
+ * so the agent has no channel but its own stderr.
+ */
+ authStderr: string[] | null;
/** ACP terminals this thread's agent asked OK to run; per-spawn, killed with the thread. */
terminals: AcpTerminalSet | null;
turnActive: boolean;
@@ -704,6 +717,7 @@ export class AcpThreadManager {
pendingPermissions: new Map(),
pendingRuntimeConsent: new Map(),
stderrTail: [],
+ authStderr: null,
terminals: null,
turnActive: false,
cancelRequested: false,
@@ -832,6 +846,14 @@ export class AcpThreadManager {
if (line.trim() === '') continue;
record.stderrTail.push(line.slice(0, 500));
if (record.stderrTail.length > STDERR_TAIL_LINES) record.stderrTail.shift();
+ if (record.authStderr !== null) {
+ record.authStderr.push(line.slice(0, 500));
+ if (record.authStderr.length > SIGN_IN_OUTPUT_LINES) record.authStderr.shift();
+ // Live, not batched with the next status: a device code is only
+ // useful while the browser is still asking the user to confirm it.
+ record.info.signInOutput = [...record.authStderr];
+ this.broadcastInfo(record);
+ }
}
});
child.on('error', (err) => {
@@ -1476,7 +1498,7 @@ export class AcpThreadManager {
if (handshake === null) return;
const { conn, init, launch } = handshake;
- if (!(await this.openSession(record, conn, init, params.settings))) return;
+ if ((await this.openSession(record, conn, init, params.settings)) !== true) return;
// Startup latency is a known UX sore point (npx resolution + node boot +
// handshake, serialized) — keep it measurable per launch kind.
this.opts.log.info(
@@ -1511,13 +1533,18 @@ export class AcpThreadManager {
* Outcomes are reported as status events rather than thrown; the boolean
* says only whether the thread reached `ready` (false also covers a thread
* closed mid-flight).
+ *
+ * `onAuthRequired: 'report'` hands the auth-required case back to the caller
+ * without parking the thread on it, so a caller that has a better answer than
+ * "ask the user again" can take it before the user ever sees a prompt.
*/
private async openSession(
record: ThreadRecord,
conn: ClientConnection,
init: InitializeResponse,
settings?: { config?: Record<string, string | boolean>; modeId?: string },
- ): Promise<boolean> {
+ onAuthRequired: 'park' | 'report' = 'park',
+ ): Promise<boolean | 'auth-required'> {
// A fresh session invalidates whatever a previous one advertised (retry
// and post-authenticate reopen reach here with a dead session's list) —
// back to "not yet known" until this session's update arrives.
@@ -1541,12 +1568,12 @@ export class AcpThreadManager {
this.emitInfo(record);
}
} catch (err) {
- const machineDetail = joinMachineDetail(agentErrorData(err), stderrTailDetail(record));
if (isAuthRequiredError(err)) {
+ if (onAuthRequired === 'report') return 'auth-required';
this.emitStatus(record, 'auth_required', `sign in required: ${agentErrorMessage(err)}`, {
reason: 'auth-required',
agentMessage: agentErrorMessage(err),
- machineDetail,
+ machineDetail: authMachineDetail(err, record),
authMethods: threadAuthMethods(init.authMethods),
});
// The child stays alive on purpose: the connection is initialized and
@@ -1555,7 +1582,7 @@ export class AcpThreadManager {
this.emitStatus(record, 'error', `session setup failed: ${agentErrorMessage(err)}`, {
reason: 'session-setup',
agentMessage: agentErrorMessage(err),
- machineDetail,
+ machineDetail: joinMachineDetail(agentErrorData(err), stderrTailDetail(record)),
});
// A session that never opened leaves nothing for the process to do —
// without this it idles until the reaper, holding a live-thread slot.
@@ -1764,8 +1791,9 @@ export class AcpThreadManager {
throw new ThreadOpError('not-ready', 'the thread is archived — resume it instead');
}
// `authInFlight` is a retryable state of its own: a sign-in the user
- // abandoned in a browser tab shows as `installing`, and retry is the only
- // way out of it. Breaking that latch is safe — closing the connection
+ // abandoned in a browser tab sits in `authenticating` until it times out,
+ // and retry is the only way out of it. Breaking that latch is safe —
+ // closing the connection
// rejects the parked request, and `authenticateThread` stands down when it
// sees the connection it captured is no longer the record's.
if (t.info.status !== 'error' && t.info.status !== 'auth_required' && !t.authInFlight) {
@@ -1852,10 +1880,13 @@ export class AcpThreadManager {
throw new ThreadOpError('not-ready', 'a sign-in is already in progress');
}
t.authInFlight = true;
+ // Opened before the request so nothing the agent prints about the sign-in
+ // is missed, and held open across the session re-open below: that call can
+ // fail for auth reasons too, and its prompt wants the same lines.
+ t.authStderr = [];
+ t.info.signInOutput = undefined;
try {
- // There is no sign-in status of its own; `installing` is the progress
- // signal every client already renders as "the agent is on its way".
- this.emitStatus(t, 'installing');
+ this.emitStatus(t, 'authenticating');
try {
await this.requestAuthenticate(conn, methodId);
} catch (err) {
@@ -1873,7 +1904,7 @@ export class AcpThreadManager {
this.emitStatus(t, 'auth_required', `sign-in failed: ${message}`, {
reason: 'auth-required',
agentMessage: message,
- machineDetail: joinMachineDetail(agentErrorData(err), stderrTailDetail(t)),
+ machineDetail: authMachineDetail(err, t),
authMethods: threadAuthMethods(init.authMethods),
});
throw new ThreadOpError('not-ready', message);
@@ -1881,11 +1912,46 @@ export class AcpThreadManager {
if (t.closed) throw new ThreadOpError('not-ready', 'thread closed during sign-in');
if (t.conn !== conn) throw threadRestartedDuringSignIn();
// Same session-open sequence the launch runs, on the same connection —
- // including the failure classification, so a still-unauthenticated agent
- // parks on sign-in again and any other failure tears the process down.
+ // any failure but auth tears the process down here, exactly as at launch.
// The create-time settings ride along so a session recovered through a
// sign-in opens on the same model/mode a first launch would have.
- if (!(await this.openSession(t, conn, init, t.launchSettings))) {
+ const opened = await this.openSession(t, conn, init, t.launchSettings, 'report');
+ if (opened === 'auth-required') {
+ // The sign-in succeeded and the agent STILL won't open a session: it
+ // read its credentials at startup and this process predates them. A
+ // fresh one picks them up, which is why Retry has always fixed this —
+ // so take that step instead of handing the user back a prompt they
+ // already answered.
+ this.opts.log.info(
+ { threadId, agentId: t.info.agent.id, methodId },
+ '[acp-threads] signed in but session still refused — relaunching the agent',
+ );
+ this.closeSignInCapture(t);
+ try {
+ return await this.retryThread(threadId);
+ } catch (err) {
+ // `retryThread` can reject BEFORE it emits any status of its own —
+ // `resolveAgentInfo` rejects on an unknown agent or an unreachable
+ // registry, both ahead of its first `emitStatus`. Leaving
+ // `authenticating` standing there wedges the thread for good: the
+ // retry guard admits only `error` / `auth_required`, so every later
+ // Retry would be refused and the pane would sit on the sign-in
+ // spinner. Park it back where the user can act.
+ // Read back through `getInfo`: this function's entry guard narrowed
+ // `t.info.status` to `auth_required`, and TS cannot see that
+ // `emitStatus` has moved it since.
+ if (this.getInfo(threadId)?.status === 'authenticating') {
+ this.emitStatus(t, 'auth_required', `sign in required: ${agentErrorMessage(err)}`, {
+ reason: 'auth-required',
+ agentMessage: agentErrorMessage(err),
+ machineDetail: authMachineDetail(err, t),
+ authMethods: threadAuthMethods(init.authMethods),
+ });
+ }
+ throw err;
+ }
+ }
+ if (opened !== true) {
throw new ThreadOpError(
'not-ready',
lastFailureMessage(t) ?? `${t.info.agent.name} still couldn't start a conversation`,
@@ -1898,6 +1964,7 @@ export class AcpThreadManager {
return { ...t.info };
} finally {
t.authInFlight = false;
+ this.closeSignInCapture(t);
}
}
@@ -3058,6 +3125,16 @@ export class AcpThreadManager {
// Info changes (status, title, modes, config) are the meta snapshot's
// refresh signal — bounded per turn, unlike per-event activity.
this.persistence.queueMetaWrite(t.info.threadId, this.buildMeta(t));
+ this.broadcastInfo(t);
+ }
+
+ /**
+ * Push an info snapshot to subscribers WITHOUT queueing a meta write. For
+ * fields that are transient by contract and arrive at a cadence the meta
+ * file must not follow — sign-in output lands per stderr line, where
+ * `emitInfo` would mean a write-and-rename each time.
+ */
+ private broadcastInfo(t: ThreadRecord): void {
for (const sink of t.subscribers) {
try {
sink({ op: 'info', info: { ...t.info } });
@@ -3067,11 +3144,26 @@ export class AcpThreadManager {
}
}
+ /**
+ * End the sign-in's stderr capture and take its output off the screen. Also
+ * called before a relaunch: what a fresh process prints is its own startup,
+ * and letting it land in this buffer would carry a spent device code and the
+ * new child's boot noise into the next prompt's disclosure.
+ */
+ private closeSignInCapture(t: ThreadRecord): void {
+ t.authStderr = null;
+ if (t.info.signInOutput !== undefined) {
+ t.info.signInOutput = undefined;
+ this.broadcastInfo(t);
+ }
+ }
+
private buildMeta(t: ThreadRecord): PersistedThreadMeta {
- // The queue and the parked steer are ephemeral by contract — persisting
- // either would resurrect ghost prompts into an archived thread after a
- // mid-turn crash.
- const { queue: _queue, steer: _steer, ...info } = t.info;
+ // The queue, the parked steer, and the sign-in output are ephemeral by
+ // contract — persisting the first two would resurrect ghost prompts into
+ // an archived thread after a mid-turn crash, and the third would restore a
+ // dead device code onto a thread whose sign-in is long over.
+ const { queue: _queue, steer: _steer, signInOutput: _signInOutput, ...info } = t.info;
return {
version: 1,
info,
@@ -3239,9 +3331,17 @@ export async function confineToContentDir(
function rehydratedRecord(meta: PersistedThreadMeta): ThreadRecord {
const status = meta.info.status === 'error' ? 'error' : 'exited';
return {
- // `queue`/`steer: undefined` belt-and-suspenders: buildMeta never persists
- // either, but a meta written by a different build must not resurrect them.
- info: { ...meta.info, status, archived: true, queue: undefined, steer: undefined },
+ // `queue`/`steer`/`signInOutput: undefined` belt-and-suspenders: buildMeta
+ // never persists any of them, but a meta written by a different build must
+ // not resurrect them.
+ info: {
+ ...meta.info,
+ status,
+ archived: true,
+ queue: undefined,
+ steer: undefined,
+ signInOutput: undefined,
+ },
docName: meta.docName,
agentRef: meta.agentRef,
cwd: meta.cwd,
@@ -3263,6 +3363,7 @@ function rehydratedRecord(meta: PersistedThreadMeta): ThreadRecord {
pendingPermissions: new Map(),
pendingRuntimeConsent: new Map(),
stderrTail: [],
+ authStderr: null,
terminals: null,
turnActive: false,
cancelRequested: false,
@@ -3361,6 +3462,21 @@ function joinMachineDetail(...parts: Array<string | undefined>): string | undefi
return joined === '' ? undefined : joined;
}
+/**
+ * A sign-in prompt carries the agent's own words about the error plus whatever
+ * it wrote to stderr DURING the sign-in — and never the whole tail. Nothing has
+ * gone wrong on a thread waiting to authenticate, so the tail is only the
+ * startup noise the agent happened to write (npm warnings, boot banners), and
+ * attaching it buries the lines that can help. Those lines are worth keeping:
+ * a device-code flow prints its code and confirmation URL to stderr, which is
+ * the only channel it has before a session exists. Genuine failures keep the
+ * whole tail; there it is usually the only evidence.
+ */
+function authMachineDetail(err: unknown, t: ThreadRecord): string | undefined {
+ const duringSignIn = t.authStderr === null ? undefined : t.authStderr.join('\n');
+ return joinMachineDetail(agentErrorData(err), duringSignIn);
+}
+
/** Trim the SDK's `AuthMethod[]` to the wire shape the client renders. */
function threadAuthMethods(methods: InitializeResponse['authMethods']): ThreadAuthMethod[] {
return (methods ?? []).flatMap((m) => {