Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
GitHub sign-in card: a GitHub row in Apps and a Connect GitHub card in a chat after a failed push
milind-soni2bc18664c270
diff --git a/docs/pr-screenshots/github-sign-in-card/1-before-apps.png b/docs/pr-screenshots/github-sign-in-card/1-before-apps.pngnew file mode 100644index 0000000000..daf0e7cf24Binary files /dev/null and b/docs/pr-screenshots/github-sign-in-card/1-before-apps.png differdiff --git a/docs/pr-screenshots/github-sign-in-card/10-german.png b/docs/pr-screenshots/github-sign-in-card/10-german.pngnew file mode 100644index 0000000000..bbf0c5e897Binary files /dev/null and b/docs/pr-screenshots/github-sign-in-card/10-german.png differdiff --git a/docs/pr-screenshots/github-sign-in-card/2-not-connected.png b/docs/pr-screenshots/github-sign-in-card/2-not-connected.pngnew file mode 100644index 0000000000..05370bca88Binary files /dev/null and b/docs/pr-screenshots/github-sign-in-card/2-not-connected.png differdiff --git a/docs/pr-screenshots/github-sign-in-card/3-code.png b/docs/pr-screenshots/github-sign-in-card/3-code.pngnew file mode 100644index 0000000000..a33fdb6b6dBinary files /dev/null and b/docs/pr-screenshots/github-sign-in-card/3-code.png differdiff --git a/docs/pr-screenshots/github-sign-in-card/4-connected.png b/docs/pr-screenshots/github-sign-in-card/4-connected.pngnew file mode 100644index 0000000000..7597f7909dBinary files /dev/null and b/docs/pr-screenshots/github-sign-in-card/4-connected.png differdiff --git a/docs/pr-screenshots/github-sign-in-card/5-own-github-cli.png b/docs/pr-screenshots/github-sign-in-card/5-own-github-cli.pngnew file mode 100644index 0000000000..6516bf20a4Binary files /dev/null and b/docs/pr-screenshots/github-sign-in-card/5-own-github-cli.png differdiff --git a/docs/pr-screenshots/github-sign-in-card/6-no-longer-valid.png b/docs/pr-screenshots/github-sign-in-card/6-no-longer-valid.pngnew file mode 100644index 0000000000..f5b1ad77a9Binary files /dev/null and b/docs/pr-screenshots/github-sign-in-card/6-no-longer-valid.png differdiff --git a/docs/pr-screenshots/github-sign-in-card/7-paste-a-token.png b/docs/pr-screenshots/github-sign-in-card/7-paste-a-token.pngnew file mode 100644index 0000000000..3950d3f7f1Binary files /dev/null and b/docs/pr-screenshots/github-sign-in-card/7-paste-a-token.png differdiff --git a/docs/pr-screenshots/github-sign-in-card/8-chat-card-phone.png b/docs/pr-screenshots/github-sign-in-card/8-chat-card-phone.pngnew file mode 100644index 0000000000..b5d25676deBinary files /dev/null and b/docs/pr-screenshots/github-sign-in-card/8-chat-card-phone.png differdiff --git a/docs/pr-screenshots/github-sign-in-card/9-team-member.png b/docs/pr-screenshots/github-sign-in-card/9-team-member.pngnew file mode 100644index 0000000000..cfb56a512bBinary files /dev/null and b/docs/pr-screenshots/github-sign-in-card/9-team-member.png differdiff --git a/github-sign-in-preview.html b/github-sign-in-preview.htmlnew file mode 100644index 0000000000..8be91fbaa0--- /dev/null+++ b/github-sign-in-preview.html@@ -0,0 +1,12 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />+ <title>GitHub Sign-in Preview</title>+ </head>+ <body>+ <div id="root"></div>+ <script type="module" src="/src/github-sign-in-preview.tsx"></script>+ </body>+</html>diff --git a/packages/phone-protocol/src/connector-card.ts b/packages/phone-protocol/src/connector-card.tsindex f3a52f57c3..146680f5d4 100644--- a/packages/phone-protocol/src/connector-card.ts+++ b/packages/phone-protocol/src/connector-card.ts@@ -1,6 +1,7 @@export interface ConnectorCardData {- /** What the card connects: a Composio app (absent or "composio"), or a sign-in to an MCP server ("mcp"). */- source?: "composio" | "mcp";+ /** What the card connects: a Composio app (absent or "composio"), a sign-in to an MCP server ("mcp"), or the GitHub+ * sign-in after a clone, fetch or push failed for want of one ("github", whose `text` names the bot and the repository). */+ source?: "composio" | "mcp" | "github";/** Composio toolkit slug, or the MCP server's name. It is validated server-side before every action. */slug: string;label: string;diff --git a/server/github/sign-in-card.ts b/server/github/sign-in-card.tsnew file mode 100644index 0000000000..106ace5a82--- /dev/null+++ b/server/github/sign-in-card.ts@@ -0,0 +1,14 @@+// The one call git and GitHub tools make when a clone, fetch or push failed for want of a GitHub sign-in: the chat shows+// a Connect GitHub card where the work stopped. Never call it ahead of a failure. Until the server provides the cards,+// nothing is shown.+import type { GithubCardRaised, GithubSignInCards, GithubSignInFailure } from "../host/github-sign-in-cards.ts";++let cards: Pick<GithubSignInCards, "raise"> | null = null;++export function provideGithubSignInCards(provided: Pick<GithubSignInCards, "raise"> | null): void {+ cards = provided;+}++export function raiseGithubSignInCard(at: Parameters<GithubSignInCards["raise"]>[0], failure: GithubSignInFailure): Promise<GithubCardRaised | null> {+ return cards ? cards.raise(at, failure) : Promise.resolve(null);+}diff --git a/server/host/github-sign-in-cards.test.ts b/server/host/github-sign-in-cards.test.tsnew file mode 100644index 0000000000..fa7521e49c--- /dev/null+++ b/server/host/github-sign-in-cards.test.ts@@ -0,0 +1,159 @@+import { readdirSync, readFileSync, statSync } from "node:fs";+import { join, relative } from "node:path";+import { fileURLToPath } from "node:url";+import { describe, expect, it, vi } from "vitest";++import type { GithubSignInStatus } from "../../shared/github-sign-in.ts";+import type { WireMessage as Message } from "../../shared/wire.ts";+import { raiseGithubSignInCard, provideGithubSignInCards } from "../github/sign-in-card.ts";+import { personKey } from "../person-key.ts";+import type { RequestAuth } from "../request-auth.ts";+import type { SessionRecord } from "../sessions.ts";+import { createGithubSignInCards, GITHUB_CARD_SLUG, isGithubSignInCard } from "./github-sign-in-cards.ts";++const OWNER: RequestAuth = { kind: "loopback", scopes: ["admin", "client"] };+const member = (email: string): RequestAuth => ({+ kind: "session", via: "cookie", scopes: ["client"],+ session: { id: `s-${email}`, tokenHash: "0".repeat(64), label: "Desktop", scopes: ["client"], createdAt: 1, lastSeenAt: 1, expiresAt: 9_000, email, teamRole: "member", membershipAuthority: "team" } as SessionRecord,+});+const ADA = personKey({ id: "", email: "[email protected]" });+const SIGNED_OUT: GithubSignInStatus = { state: "signed-out", download: false };+const SIGNED_IN: GithubSignInStatus = { state: "signed-in", login: "octo", source: "mausbot", scopes: ["repo"], checkedAt: 1 };++function setup(options: { team?: boolean; status?: GithubSignInStatus; person?: string | null } = {}) {+ const messages: Message[] = [];+ let status = options.status ?? SIGNED_OUT;+ const asked: string[] = [];+ const reported: string[] = [];+ const resumed: string[] = [];+ const store = {+ messagesFor: () => messages,+ appendMessage: vi.fn((_threadId: string, message: Omit<Message, "id" | "at">) => { const row = { ...message, id: `m${messages.length + 1}`, at: 1 } as Message; messages.push(row); return row; }),+ patchMessage: vi.fn((_threadId: string, id: string, patch: Partial<Message>) => { const at = messages.findIndex((row) => row.id === id); messages[at] = { ...messages[at]!, ...patch }; }),+ };+ const cards = createGithubSignInCards({+ store,+ signIn: { status: vi.fn(async (audience: string) => { asked.push(audience); return status; }), reportAuthFailure: (audience) => { reported.push(String(audience)); } },+ team: options.team ?? false,+ turnPerson: () => (options.person === undefined ? ADA : options.person),+ language: () => undefined,+ threadVisible: () => true,+ resume: (threadId, resumeKey) => { resumed.push(`${threadId} ${resumeKey}`); },+ });+ return { cards, messages, store, asked, reported, resumed, set: (next: GithubSignInStatus) => { status = next; } };+}+const chief = { bot: { id: "chief", name: "Chief" }, threadId: "t1", from: { botId: "chief", name: "Chief", color: "blue" } } as const;++describe("the Connect GitHub card in a chat", () => {+ it("is never shown by being made: only a failed clone, fetch or push shows it", async () => {+ const { messages, store, asked } = setup();+ expect(messages).toEqual([]);+ expect(store.appendMessage).not.toHaveBeenCalled();+ expect(asked).toEqual([]);+ });++ it("says which bot could not do what to which repository, as a connector card a phone can draw as text", async () => {+ const { cards, messages, asked } = setup();+ const raised = await cards.raise(chief, { operation: "push", repo: "acme/site" });+ expect(raised).toEqual({ posted: true, messageId: "m1" });+ expect(asked).toEqual(["owner"]);+ const card = messages[0]!;+ expect(isGithubSignInCard(card)).toBe(true);+ expect(card).toMatchObject({ role: "bot", kind: "connector", text: "Chief couldn't push to acme/site: GitHub isn't connected.", from: chief.from });+ expect(card.connector).toMatchObject({ source: "github", slug: GITHUB_CARD_SLUG, label: "GitHub", status: "required" });+ expect(card.connector!.resumeKey).toMatch(/^github-[\w-]{8,}$/);+ await cards.raise({ ...chief, threadId: "t2", from: undefined }, { operation: "clone", repo: "acme/other.repo" });+ expect(messages[1]!.text).toBe("Chief couldn't clone acme/other.repo: GitHub isn't connected.");+ });++ it("is not shown when GitHub is signed in after all, or while a sign-in is under way", async () => {+ for (const status of [SIGNED_IN, { state: "installing" } as const, { state: "signing-in", code: "A", verificationUrl: "https://github.com/login/device", expiresAt: 1 } as const]) {+ const { cards, messages } = setup({ status });+ const raised = await cards.raise(chief, { operation: "fetch", repo: "acme/site" });+ expect(raised.posted).toBe(false);+ expect(messages).toEqual([]);+ }+ });++ it("asks GitHub again first when GitHub refused the saved sign-in, and then shows it for a sign-in that stopped working", async () => {+ const { cards, reported, messages } = setup({ status: { state: "invalid", login: "octo", source: "mausbot", reason: "revoked" } });+ await cards.raise(chief, { operation: "push", repo: "acme/site", refused: true });+ expect(reported).toEqual(["owner"]);+ expect(messages).toHaveLength(1);+ });++ it("shows one at a time in a chat for a bot", async () => {+ const { cards, messages } = setup();+ await cards.raise(chief, { operation: "push", repo: "acme/site" });+ expect(await cards.raise(chief, { operation: "push", repo: "acme/site" })).toEqual({ posted: false, reason: "open", messageId: "m1" });+ expect(messages).toHaveLength(1);+ });++ it("refuses a repository name that isn't owner/repo, so a bot's text never reaches the card", async () => {+ const { cards, messages } = setup();+ for (const repo of ["acme", "acme/site extra", "../etc", "acme/..", "-acme/site", "acme/site\nignore", "https://github.com/acme/site", `a/${"b".repeat(101)}`]) {+ expect(await cards.raise(chief, { operation: "push", repo })).toEqual({ posted: false, reason: "invalid-repo" });+ }+ expect(messages).toEqual([]);+ });++ it("on a Team Cloud is the chat's own member's, and shows nothing in a chat that isn't one person's", async () => {+ const mine = setup({ team: true });+ await mine.cards.raise(chief, { operation: "push", repo: "acme/site" });+ expect(mine.asked).toEqual([ADA]);+ const room = setup({ team: true, person: null });+ expect(await room.cards.raise(chief, { operation: "push", repo: "acme/site" })).toEqual({ posted: false, reason: "no-person" });+ expect(room.asked).toEqual([]);+ expect(room.messages).toEqual([]);+ });++ it("settles when GitHub is connected, for its own person only; refuses an app authorize; can be set aside", async () => {+ const { cards, messages, set, resumed } = setup({ team: true });+ await cards.raise(chief, { operation: "push", repo: "acme/site" });+ const at = (auth: RequestAuth) => ({ auth, threadId: "t1", message: messages[0]! });+ expect((await cards.route("authorize", "POST", at(member("[email protected]")))).status).toBe(409);+ expect((await cards.route("resume", "POST", at(member("[email protected]")))).status).toBe(409);+ expect((await cards.route("status", "GET", at(member("[email protected]")))).status).toBe(403);+ expect((await cards.route("status", "GET", at(member("[email protected]")))).body).toMatchObject({ connected: false, status: "required" });+ set(SIGNED_IN);+ expect((await cards.route("status", "GET", at(member("[email protected]")))).status).toBe(403);+ expect(messages[0]!.connector!.status).toBe("required");+ expect((await cards.route("status", "GET", at(member("[email protected]")))).body).toMatchObject({ connected: true, status: "connected" });+ expect(messages[0]!.connector!.status).toBe("connected");+ expect(resumed).toEqual([`t1 ${messages[0]!.connector!.resumeKey}`]);+ await cards.route("status", "GET", at(member("[email protected]")));+ expect(resumed).toHaveLength(1);+ expect((await cards.route("dismiss", "POST", at(member("[email protected]")))).status).toBe(200);+ expect(messages[0]!.connector!.dismissed).toBe(true);++ const solo = setup();+ await solo.cards.raise(chief, { operation: "push", repo: "acme/site" });+ expect((await solo.cards.route("status", "GET", { auth: OWNER, threadId: "t1", message: solo.messages[0]! })).status).toBe(200);+ });++ it("raises through the one exported call once the server provides the cards, and nothing before", async () => {+ provideGithubSignInCards(null);+ expect(await raiseGithubSignInCard(chief, { operation: "push", repo: "acme/site" })).toBeNull();+ const { cards, messages } = setup();+ provideGithubSignInCards(cards);+ expect(await raiseGithubSignInCard(chief, { operation: "push", repo: "acme/site" })).toMatchObject({ posted: true });+ expect(messages).toHaveLength(1);+ provideGithubSignInCards(null);+ });++ it("is raised from nowhere yet: only a git failure may call it, and none is wired to it here", () => {+ const root = fileURLToPath(new URL("../../", import.meta.url));+ const callers: string[] = [];+ const walk = (dir: string) => {+ for (const name of readdirSync(dir)) {+ const path = join(dir, name);+ if (statSync(path).isDirectory()) { if (name !== "node_modules" && name !== "fixtures") walk(path); continue; }+ if (!name.endsWith(".ts") || name.includes(".test.")) continue;+ const text = readFileSync(path, "utf8");+ if (/raiseGithubSignInCard\(|githubSignInCards\.raise\(/.test(text)) callers.push(relative(root, path).replace(/\\/g, "/"));+ }+ };+ walk(join(root, "server"));+ expect(callers).toEqual(["server/github/sign-in-card.ts"]);+ });+});diff --git a/server/host/github-sign-in-cards.ts b/server/host/github-sign-in-cards.tsnew file mode 100644index 0000000000..6e5a83df27--- /dev/null+++ b/server/host/github-sign-in-cards.ts@@ -0,0 +1,121 @@+// A chat's Connect GitHub card: the connector card every client already draws, with source "github". It is shown only+// after a clone, fetch or push failed because GitHub isn't connected (raise), never ahead of one. The card's client signs+// in through the GitHub sign-in routes; here a card is settled, set aside, or refused an app authorize from a client+// that does not know it.+import { randomUUID } from "node:crypto";++import type { ConnectorCardData } from "../../shared/connector-card.ts";+import type { WireMessage as Message } from "../../shared/wire.ts";+import type { GithubSignIn } from "../github/sign-in.ts";+import type { RequestAuth } from "../request-auth.ts";+import { githubAudience } from "../routes/github-sign-in.ts";+import { serverLine } from "../server-lines.ts";++/** The card's slug: never an app's, so nothing that settles an app's connect cards touches it. */+export const GITHUB_CARD_SLUG = "github-sign-in";+const OWNER = "owner";+/** owner/repo as GitHub allows it: the text is the bot's, so nothing else reaches the card. */+const REPO = /^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\/(?!\.\.?$)[A-Za-z0-9._-]{1,100}$/u;++export type GithubGitOperation = "clone" | "fetch" | "push";++/** What failed: the git operation, the repository, and whether GitHub refused the saved sign-in (its 401). */+export interface GithubSignInFailure {+ operation: GithubGitOperation;+ repo: string;+ refused?: boolean;+}++export type GithubCardRaised =+ | { posted: true; messageId: string }+ /** signed-in: the failure was not for want of a sign-in. signing-in: the person is already at it. no-person: a Team+ * Cloud chat that is not one member's alone. open: this chat already shows one, which stays. */+ | { posted: false; reason: "invalid-repo" | "no-person" | "signed-in" | "signing-in" | "open"; messageId?: string };++interface CardStore {+ messagesFor(threadId: string): readonly Message[];+ appendMessage(threadId: string, message: Omit<Message, "id" | "at">): Message;+ patchMessage(threadId: string, messageId: string, patch: Partial<Message>): unknown;+}++export interface GithubSignInCardDeps {+ store: CardStore;+ signIn: Pick<GithubSignIn, "status" | "reportAuthFailure">;+ /** A Team Cloud: each member signs in for themselves. */+ team: boolean;+ /** On a Team Cloud, the member a chat's turns act for, in their own private chat; null anywhere else. */+ turnPerson(threadId: string, generation?: string): string | null;+ language(threadId: string): string | undefined;+ threadVisible(auth: RequestAuth, threadId: string): boolean;+ /** GitHub got connected: a turn parked on this card, if any, carries on. */+ resume(threadId: string, resumeKey: string): void;+}++type GithubCard = Message & { connector: ConnectorCardData };+type Reply = { status: number; body: Record<string, unknown> };++export const isGithubSignInCard = (message: Message | undefined): message is GithubCard =>+ message?.kind === "connector" && message.connector?.source === "github";++const LINE = { clone: "server.github.card.clone", fetch: "server.github.card.fetch", push: "server.github.card.push" } as const;++export function createGithubSignInCards(deps: GithubSignInCardDeps) {+ const { store } = deps;+ const audienceOf = (threadId: string, generation?: string): string | null => (deps.team ? deps.turnPerson(threadId, generation) : OWNER);+ const open = (threadId: string, botId: string | undefined) => store.messagesFor(threadId).find((message): message is GithubCard =>+ isGithubSignInCard(message) && (message.from?.botId ?? null) === (botId ?? null)+ && !message.connector.dismissed && !message.connector.stopped && message.connector.status !== "connected");++ return {+ /** After a clone, fetch or push failed for want of a GitHub sign-in: shows the person a Connect GitHub card where the+ * work stopped, unless the sign-in is there after all, one is under way, or this chat already shows the card. */+ async raise(at: { bot: { id: string; name: string }; threadId: string; generation?: string; from?: Message["from"] }, failure: GithubSignInFailure): Promise<GithubCardRaised> {+ if (!REPO.test(failure.repo)) return { posted: false, reason: "invalid-repo" };+ const audience = audienceOf(at.threadId, at.generation);+ if (!audience) return { posted: false, reason: "no-person" };+ if (failure.refused) deps.signIn.reportAuthFailure(audience);+ const now = await deps.signIn.status(audience);+ if (now.state === "signed-in") return { posted: false, reason: "signed-in" };+ if (now.state === "installing" || now.state === "signing-in") return { posted: false, reason: "signing-in" };+ const shown = open(at.threadId, at.from?.botId);+ if (shown) return { posted: false, reason: "open", messageId: shown.id };+ const language = deps.language(at.threadId);+ const message = store.appendMessage(at.threadId, {+ role: "bot", kind: "connector",+ text: serverLine(language, LINE[failure.operation], { bot: at.bot.name, repo: failure.repo }),+ ...(at.from ? { from: at.from } : {}),+ connector: {+ source: "github", slug: GITHUB_CARD_SLUG, label: "GitHub", status: "required", resumeKey: `github-${randomUUID()}`,+ description: serverLine(language, "server.github.card.description", { bot: at.bot.name }),+ },+ });+ return { posted: true, messageId: message.id };+ },++ /** The connector-card routes for this card. Its own person only: on a Team Cloud another member's sign-in is never+ * read or reported here. */+ async route(action: string, method: string, at: { auth: RequestAuth; threadId: string; message: Message }): Promise<Reply> {+ const card = at.message;+ if (!isGithubSignInCard(card) || !deps.threadVisible(at.auth, at.threadId)) return { status: 404, body: { error: "no such connection request" } };+ if (action === "dismiss" && method === "POST") {+ store.patchMessage(at.threadId, card.id, { connector: { ...card.connector, dismissed: true } });+ return { status: 200, body: { dismissed: true } };+ }+ if (action === "authorize" && method === "POST") return { status: 409, body: { error: serverLine(deps.language(at.threadId), "server.github.card.connectInApps") } };+ if (action === "resume" && method === "POST") return { status: 409, body: { error: "nothing waits on this card" } };+ if (action !== "status" || method !== "GET") return { status: 405, body: { error: "method not allowed" } };+ const audience = audienceOf(at.threadId);+ if (!audience || githubAudience(at.auth, deps.team) !== audience) return { status: 403, body: { error: "This GitHub sign-in is someone else's." } };+ const now = await deps.signIn.status(audience);+ const connected = now.state === "signed-in";+ if (connected && card.connector.status !== "connected") {+ store.patchMessage(at.threadId, card.id, { connector: { ...card.connector, status: "connected", error: undefined } });+ deps.resume(at.threadId, card.connector.resumeKey);+ }+ const pending = now.state === "installing" || now.state === "signing-in";+ return { status: 200, body: { connected, pending, status: connected ? "connected" : pending ? "authorizing" : "required" } };+ },+ };+}++export type GithubSignInCards = ReturnType<typeof createGithubSignInCards>;diff --git a/server/index.ts b/server/index.tsindex 6f3baecd21..eb0d23e105 100644--- a/server/index.ts+++ b/server/index.ts@@ -114,7 +114,7 @@ import { boatCreateRecoverySnapshot } from "./boat-create-idempotency.ts";import { boatDeletionSnapshot } from "./boat-delete-journal.ts";import { liveDecisionRefusal } from "../shared/live-approval.ts"; import type { PersonWaitKind } from "../shared/person-wait.ts";import { vpsLeftBehindNotice, vpsNotChosenReason } from "./cloud-backend.ts";-import * as composio from "./composio.ts"; import { createConnectorListingRoutes } from "./routes/connectors-listing.ts"; import { createGhTools } from "./github/gh-cli.ts"; import { createGithubSignIn } from "./github/sign-in.ts"; import { provideGithubSignIn } from "./github/token.ts"; import { createGithubSignInRoutes } from "./routes/github-sign-in.ts";+import * as composio from "./composio.ts"; import { createConnectorListingRoutes } from "./routes/connectors-listing.ts"; import { createGhTools } from "./github/gh-cli.ts"; import { createGithubSignIn } from "./github/sign-in.ts"; import { provideGithubSignIn } from "./github/token.ts"; import { createGithubSignInRoutes } from "./routes/github-sign-in.ts"; import { createGithubSignInCards, isGithubSignInCard } from "./host/github-sign-in-cards.ts"; import { provideGithubSignInCards } from "./github/sign-in-card.ts";import { appSandboxRule, connectorCallFromFrame, connectorRefusalText, connectorScopeRefusalText, connectorUnrecognizedText, evaluateConnectorTools } from "./connector-verdict.ts";import { signInCardText } from "./connector-card-text.ts";import { BOT_HELD_CODE, BOT_PAUSED_CODE } from "../shared/bot-limit.ts"; import { createBotHolds } from "./host/bot-holds.ts"; import { createBotHoldRoutes } from "./routes/bot-holds.ts"; import { createCliLogin } from "./routes/cli-login.ts"; import { createStarterAwake } from "./host/starter-awake.ts"; import { createStarterCaps } from "./host/starter-caps.ts"; import { createStarterRoutineWake, workInFlight, type StarterRoutineWake } from "./host/starter-routine-wake.ts"; import { createStarterAwakeRoutes } from "./routes/starter-awake.ts"; import { chiefOfStaffPrompt, chiefOfStaffSystemPrompt } from "./chief-of-staff.ts"; import { coordinateMessageMax, coordinateTooLong, reportBackTooLong } from "./too-long.ts"; import { chiefAbsentFrom, createChiefRooms } from "./host/chief-rooms.ts"; import { chiefLevel, readTeamRolesWith } from "./chief-level.ts"; import { defaultBotRefusal, ensureDefaultBot } from "./default-bot.ts";@@ -12059,7 +12059,7 @@ const teamMoveIn = CLOUD_TEAM ? createTeamMoveIn({ team: CLOUD_TEAM, dataDir: DAif (CLOUD_TEAM) teamHost.adoptServerProfile(sessions.list().flatMap((session) => session.email ? [session.email] : []));const sidebarRoutes = createSidebarSectionRoutes({ store, teamComputers, maxBots: MAX_WORKSPACE_BOTS, assertTeamComputerChangeIdle, wireBot, renamed: (from, to) => (to ? botHolds.rename(from, to) : botHolds.forget("department", from)) }); ROUTES.push(teamPresence.routes, sidebarRoutes, createPresenceRoutes({ isOwner: ownerOrAdmin, heard: (auth, language) => personLanguages.heard(auth.kind === "session" ? actorKey(auth) : THIS_COMPUTER, language), sawChat: (_auth, threadId) => { if (store.botByThread(threadId)) sawThread(threadId); }, active: async (source, zone, language) => { const answer = await proactive.brief.active(source, zone, language); firstHourHooks.arrived(); return answer; }, ...(CLOUD_TEAM ? { member: (auth) => { noAiNotice.flush(); return teamMessages.arrived(auth); } } : {}) }), createMeRoutes({ team: CLOUD_TEAM, session: (auth) => (auth.kind === "session" ? auth.session : null), welcome: teamWelcome, profile: teamHost.memberProfile, save: teamHost.saveMemberProfile, seed: teamHost.seedMemberProfile, seeded: teamHost.seededFields, changed: () => broadcast({ kind: "config", ...configStatus() }), names: SELF_HOSTED ? { store: personNames, shownAs: sessionPersonName } : null }), teamAway.routes, createTeamPhoneRoutes({ team: CLOUD_TEAM, sessions, publicBase: (req, auth) => pairingLinkBase(publicUrl(), auth.kind === "session" ? requestOrigin(req) : null) }),createTeamConnectionRoutes({ host: teamConnections, cfg: () => cfg, composio, policy: managedPolicy, publicOrigin: CLOUD_HOME?.publicOrigin ?? null, record: (auth, row) => appendAdminAction(DATA_DIR, { ...row, actor: decisionActorFor(auth) }) }), createSignInCardRoutes({ settle: signInSettle.settle, saveLogin: (botId, threadId, messageId, body, auth) => CLOUD_TEAM && !auth.scopes.includes("admin") ? Promise.resolve({ status: 403 as const, body: memberLoginRefusal(CLOUD_TEAM) }) : saveLoginFromCard(botId, threadId, messageId, body), saveTarget: signInSaveTarget, threadVisible: (auth, threadId) => visibleTo(viewerFor(auth)).thread(threadId), vault: createSignInVaultChoices({ logins, cardBots: (id) => botLogins.cardBots(id), settle: signInSettle.settle, openCard: (botId, threadId, messageId) => { const card = signInMessage(botId, threadId, messageId)?.signIn; return card && card.place === "browser" && !card.superseded && !card.answeredInChat && !card.stopped && !signInOutcome(card) ? card : null; } }) })); const appSuggestions = createAppSuggestions({ dataDir: DATA_DIR, store, configured: () => composio.configured(cfg), catalog: () => composio.listToolkits(cfg), services: async (live) => live ? composio.connectedServices(cfg) : (await composio.sharedConnectedInventory(cfg)).services, offerable: (slug) => !managedPolicy.appRefusal(slug) && !managedConnectorUnavailableReason(composio.connectionMode(cfg), slug) && !teamConnections.personApps().includes(slug), pickAvailable: () => appPickAvailable(cfg), decider }); ROUTES.push(createAppSuggestionRoutes(appSuggestions));-ROUTES.push(createConnectorListingRoutes({ cfg: () => cfg, composio, managedHost: DESKTOP_MANAGED || CLOUD_HOME !== null })); composio.rememberCatalogIn(DATA_DIR); composio.onCatalogChange(() => broadcast({ kind: "apps-catalog" }, { adminOnly: true })); const githubSignIn = createGithubSignIn({ dataDir: DATA_DIR, team: Boolean(CLOUD_TEAM), vault: logins, tools: createGhTools({ dataDir: DATA_DIR, personalAllowed: () => !CLOUD_HOME && !HOSTED_WORKSPACE && !botBox.enabled() }), remember: (token) => heldSecrets.remember(token, "password") }); provideGithubSignIn(githubSignIn); ROUTES.push(createGithubSignInRoutes({ signIn: githubSignIn, team: Boolean(CLOUD_TEAM) }));+ROUTES.push(createConnectorListingRoutes({ cfg: () => cfg, composio, managedHost: DESKTOP_MANAGED || CLOUD_HOME !== null })); composio.rememberCatalogIn(DATA_DIR); composio.onCatalogChange(() => broadcast({ kind: "apps-catalog" }, { adminOnly: true })); const githubSignIn = createGithubSignIn({ dataDir: DATA_DIR, team: Boolean(CLOUD_TEAM), vault: logins, tools: createGhTools({ dataDir: DATA_DIR, personalAllowed: () => !CLOUD_HOME && !HOSTED_WORKSPACE && !botBox.enabled() }), remember: (token) => heldSecrets.remember(token, "password") }); provideGithubSignIn(githubSignIn); ROUTES.push(createGithubSignInRoutes({ signIn: githubSignIn, team: Boolean(CLOUD_TEAM) })); const githubSignInCards = createGithubSignInCards({ store, signIn: githubSignIn, team: Boolean(CLOUD_TEAM), turnPerson: (threadId, generation) => teamConnections.turnPerson(threadId, generation), language: threadLanguage, threadVisible: (auth, threadId) => visibleTo(viewerFor(auth)).thread(threadId), resume: (threadId, resumeKey) => void maybeResumeConnectors(threadId, resumeKey) }); provideGithubSignInCards(githubSignInCards);ROUTES.push(createRoomHoldRoutes({group: (id) => store.group(id),groupFor: personRooms.groupForAuth,@@ -14795,7 +14795,7 @@ const handleRequest = async (req: IncomingMessage, res: ServerResponse) => {const threadId = String(method === "GET" ? url.searchParams.get("threadId") ?? "" : body.threadId ?? "");const message = connectorMessage(m[1], threadId, m[2]);if (!message?.connector) return json(res, 404, { error: "no such connection request" });- if (isMcpSignInCard(message)) {+ if (isGithubSignInCard(message)) { res.setHeader("Cache-Control", "no-store"); const answer = await githubSignInCards.route(m[3], method, { auth, threadId, message }); return json(res, answer.status, answer.body); } if (isMcpSignInCard(message)) {res.setHeader("Cache-Control", "no-store");const answer = await mcpSignInCards.route(m[3], method, { auth, req, threadId, message });return json(res, answer.status, answer.body);diff --git a/src/components/ConnectorCard.tsx b/src/components/ConnectorCard.tsxindex a2e930c65c..884fb922e0 100644--- a/src/components/ConnectorCard.tsx+++ b/src/components/ConnectorCard.tsx@@ -13,12 +13,19 @@ import { cn } from "@/lib/cn";import { askPrimary, ASK_QUIET_BUTTON, AskCard, AskSettledLine } from "./AskCard";import { CardHint } from "./CardHint";import { ConnectorAlsoUseful } from "./ConnectorAlsoUseful";+import { GithubChatCard } from "./github/GithubChatCard";const STATUS_CHECK_MS = 4_000;/** Composio marks an unfinished account EXPIRED shortly after its link lapses; the card keeps asking until it can say so. */const STATUS_WATCH_MS = AUTHORIZATION_LINK_MS + 2 * 60 * 1_000;-export function ConnectorCard({ botId, color, threadId, message }: { botId: string; color?: Bot["color"]; threadId: string; message: Message }) {+type ConnectorCardProps = { botId: string; color?: Bot["color"]; threadId: string; message: Message };++export function ConnectorCard(props: ConnectorCardProps) {+ return props.message.connector?.source === "github" ? <GithubChatCard {...props} /> : <AppConnectorCard {...props} />;+}++function AppConnectorCard({ botId, color, threadId, message }: ConnectorCardProps) {const connector = message.connector!;const gone = connector.dismissed || connector.superseded;const isMcp = connector.source === "mcp";diff --git a/src/components/MemberApps.dom.test.ts b/src/components/MemberApps.dom.test.tsindex 0cee850628..99415cc50f 100644--- a/src/components/MemberApps.dom.test.ts+++ b/src/components/MemberApps.dom.test.ts@@ -4,8 +4,10 @@ import { createRoot, type Root } from "react-dom/client";import { afterEach, beforeEach, expect, it, vi } from "vitest";import { setLocale } from "@/lib/i18n";-const f = vi.hoisted(() => ({ api: vi.fn(), dispatch: vi.fn(), open: vi.fn(async () => true) }));+const f = vi.hoisted(() => ({ api: vi.fn(), dispatch: vi.fn(), open: vi.fn(async () => true), github: false }));vi.mock("@/state/store", () => ({ api: f.api, useStore: () => ({ state: { config: { team: { id: "team-acme", name: "Acme" } } }, dispatch: f.dispatch }) }));+vi.mock("./github/GithubAppCard", () => ({ GithubAppCard: () => createElement("div", { "data-github-card": true }) }));+vi.mock("@/lib/github-sign-in", () => ({ useGithubShown: () => f.github }));vi.mock("@/lib/connector-oauth", () => ({ reserveConnectionPage: () => ({ open: f.open, cancel: vi.fn() }) }));const { MemberApps } = await import("./MemberApps");@@ -19,7 +21,7 @@ const calls = () => f.api.mock.calls.map(([path, init]) => `${(init as RequestInbeforeEach(() => {setLocale("en");apps = [{ slug: "gmail", name: "Gmail", connected: false }, { slug: "googlecalendar", name: "Google Calendar", connected: true }];- f.api.mockReset(); f.dispatch.mockReset(); f.open.mockClear();+ f.api.mockReset(); f.dispatch.mockReset(); f.open.mockClear(); f.github = false;f.api.mockImplementation(async (path: string, init?: RequestInit) => {if (path === "/api/team/my-connections") return { apps };if (init?.method === "POST") return { url: "https://connect.example.test/link" };@@ -65,3 +67,11 @@ it("says so when nothing is theirs to connect, and says the server's own words wawait act(async () => { window.dispatchEvent(new Event("focus")); });expect(host.querySelector('[role="alert"]')?.textContent).toBe("Your own apps can't be connected on Acme yet.");});++it("puts the member's own GitHub sign-in first among their apps, even when no app is theirs", async () => {+ f.github = true;+ apps = [];+ await show();+ expect(host.querySelector("[data-github-card]")).not.toBeNull();+ expect(host.querySelector("[data-member-apps-none]")).toBeNull();+});diff --git a/src/components/MemberApps.tsx b/src/components/MemberApps.tsxindex b9b6f171ab..c709ba563c 100644--- a/src/components/MemberApps.tsx+++ b/src/components/MemberApps.tsx@@ -6,6 +6,8 @@ import { api, useStore } from "@/state/store";import { AppsSection } from "./AppsSection";import { glassPopupFrameStyle } from "@/lib/glass-popup";import { ServiceIcon } from "./ServiceIcon";+import { GithubAppCard } from "./github/GithubAppCard";+import { useGithubShown } from "@/lib/github-sign-in";/** One app an admin made each person's own, as GET /api/team/my-connections lists it. */export interface OwnApp { slug: string; name: string; connected: boolean; reconnect?: boolean }@@ -22,6 +24,7 @@ export function MemberApps() {const [signIn, setSignIn] = useState<{ slug: string; url: string } | null>(null);const [error, setError] = useState<string | null>(null);const dialog = useRef<HTMLDivElement>(null);+ const githubHidden = !useGithubShown();const said = (cause: unknown) => setError(cause instanceof Error ? cause.message : String(cause));const reads = useRef(0);const load = useCallback(() => {@@ -92,8 +95,9 @@ export function MemberApps() {<div className="@container min-h-0 flex-1 overflow-y-auto px-5 pb-7 sm:px-7">{error && <div role="alert" className="mb-3 rounded-xl bg-danger/10 px-3 py-2 text-[12px] text-danger">{error}</div>}{apps === null ? <div className="flex items-center justify-center py-16 text-ink-secondary"><Loader2 size={14} className="animate-spin" /></div>- : apps.length === 0 ? <p data-member-apps-none className="py-10 text-center text-[13px] text-ink-secondary">{t("memberApps.none", { team })}</p>+ : apps.length === 0 && githubHidden ? <p data-member-apps-none className="py-10 text-center text-[13px] text-ink-secondary">{t("memberApps.none", { team })}</p>: <AppsSection id="member-apps-yours" title={t("memberApps.yours")}>+ <GithubAppCard />{apps.map((app) => (<div key={app.slug} data-app-tile={app.slug} className="flex min-w-0 flex-col rounded-xl px-2 py-2 transition-colors hover:bg-raised/40"><div className="flex items-center gap-3">diff --git a/src/components/PluginsPanel.disconnect.test.ts b/src/components/PluginsPanel.disconnect.test.tsindex 68cb90e376..b87b421e55 100644--- a/src/components/PluginsPanel.disconnect.test.ts+++ b/src/components/PluginsPanel.disconnect.test.ts@@ -34,6 +34,8 @@ vi.mock("@/lib/connector-oauth", () => ({}));vi.mock("@/lib/product-events", () => ({ connectorConnect: vi.fn() }));vi.mock("./McpServersPanel", () => ({ McpServersPanel: () => null }));+vi.mock("./github/GithubAppCard", () => ({ GITHUB_CARD_SEARCH: "github git", GITHUB_CARD_CATEGORIES: ["Developer tools"], GithubAppCard: () => null }));+vi.mock("@/lib/github-sign-in", () => ({ useGithubConnected: () => null, useGithubShown: () => false }));vi.mock("./XCard", () => ({ X_CARD_SEARCH: "x", XCard: () => null }));vi.mock("./PostizCard", () => ({ PostizCard: () => null }));vi.mock("./EmailCard", () => ({ EmailCard: () => null }));diff --git a/src/components/PluginsPanel.grants.test.ts b/src/components/PluginsPanel.grants.test.tsindex c6601e587e..cb5c8469f9 100644--- a/src/components/PluginsPanel.grants.test.ts+++ b/src/components/PluginsPanel.grants.test.ts@@ -41,6 +41,8 @@ vi.mock("@/lib/connector-oauth", () => ({}));vi.mock("@/lib/product-events", () => ({ connectorConnect: vi.fn() }));vi.mock("./McpServersPanel", () => ({ McpServersPanel: () => null }));+vi.mock("./github/GithubAppCard", () => ({ GITHUB_CARD_SEARCH: "github git", GITHUB_CARD_CATEGORIES: ["Developer tools"], GithubAppCard: () => null }));+vi.mock("@/lib/github-sign-in", () => ({ useGithubConnected: () => null, useGithubShown: () => false }));vi.mock("./XCard", () => ({ X_CARD_SEARCH: "x", XCard: () => null }));vi.mock("./PostizCard", () => ({ PostizCard: () => null }));vi.mock("./EmailCard", () => ({diff --git a/src/components/PluginsPanel.listing.test.ts b/src/components/PluginsPanel.listing.test.tsindex c0f214f272..56181c98af 100644--- a/src/components/PluginsPanel.listing.test.ts+++ b/src/components/PluginsPanel.listing.test.ts@@ -50,6 +50,8 @@ vi.mock("@/lib/connected-apps", () => ({vi.mock("@/lib/connected-apps-cache", () => ({ readCachedInventory: () => null, writeCachedInventory: () => {} }));vi.mock("@/lib/product-events", () => ({ connectorConnect: vi.fn() }));vi.mock("./McpServersPanel", () => ({ McpServersPanel: () => null }));+vi.mock("./github/GithubAppCard", () => ({ GITHUB_CARD_SEARCH: "github git", GITHUB_CARD_CATEGORIES: ["Developer tools"], GithubAppCard: () => null }));+vi.mock("@/lib/github-sign-in", () => ({ useGithubConnected: () => null, useGithubShown: () => false }));vi.mock("./XCard", () => ({ X_CARD_SEARCH: "x", XCard: () => null }));vi.mock("./PostizCard", () => ({ PostizCard: () => null }));vi.mock("./EmailCard", () => ({ EmailCard: () => null }));diff --git a/src/components/PluginsPanel.member.test.ts b/src/components/PluginsPanel.member.test.tsindex 0e3ad3ff51..00a4895ce2 100644--- a/src/components/PluginsPanel.member.test.ts+++ b/src/components/PluginsPanel.member.test.ts@@ -9,6 +9,8 @@ vi.mock("@/state/store", () => ({useStore: () => ({ state: { pluginsSurface: "apps", bots: [], instances: [] }, dispatch: vi.fn() }),}));vi.mock("./McpServersPanel", () => ({ McpServersPanel: () => null }));+vi.mock("./github/GithubAppCard", () => ({ GITHUB_CARD_SEARCH: "github git", GITHUB_CARD_CATEGORIES: ["Developer tools"], GithubAppCard: () => null }));+vi.mock("@/lib/github-sign-in", () => ({ useGithubConnected: () => null, useGithubShown: () => false }));vi.mock("./XCard", () => ({ X_CARD_SEARCH: "x", XCard: () => null }));const { PluginsPanel } = await import("./PluginsPanel");diff --git a/src/components/PluginsPanel.navigation.test.ts b/src/components/PluginsPanel.navigation.test.tsindex fa00786d3c..7c71b9ed86 100644--- a/src/components/PluginsPanel.navigation.test.ts+++ b/src/components/PluginsPanel.navigation.test.ts@@ -50,6 +50,8 @@ vi.mock("./McpServersPanel", async () => {});vi.mock("@/lib/analytics", () => ({ track: fixture.track }));vi.mock("./Avatar", () => ({ BotAvatar: ({ bot }: { bot: Bot }) => createElement("span", { "data-avatar": bot.id }) }));+vi.mock("./github/GithubAppCard", () => ({ GITHUB_CARD_SEARCH: "github git", GITHUB_CARD_CATEGORIES: ["Developer tools"], GithubAppCard: () => null }));+vi.mock("@/lib/github-sign-in", () => ({ useGithubConnected: () => null, useGithubShown: () => false }));vi.mock("./XCard", () => ({X_CARD_SEARCH: "x twitter treg tweets posts",XCard: () => createElement("div", { "data-x-card": true }, "X (Twitter)"),@@ -543,6 +545,22 @@ describe("Apps pop-up", () => {expect(html).toContain("1 connected");});+ it("puts the GitHub sign-in row just before the GitHub app's tile in its section, and in the native cards otherwise", () => {+ const categorized = (slug: string, category: string) => ({ ...card(slug), categories: [category] });+ fixture.overrides.set(CARDS, [categorized("linear", "Developer tools"), categorized("github", "Developer tools"), categorized("gmail", "Communication")]);+ const sectioned = render();+ const githubRows = (html: string) => [...html.matchAll(/<div (?:class="([^"]*)" )?data-native-card="github"(?: class="([^"]*)")?/g)].map((match) => match[1] ?? match[2]);+ expect(githubRows(sectioned.html)).toEqual(["contents", "hidden"]);+ const section = sectioned.html.slice(sectioned.html.indexOf("Developer tools"));+ expect(section.indexOf('data-native-card="github"')).toBeLessThan(section.indexOf('data-app-tile="github"'));+ expect(section.indexOf('data-app-tile="linear"')).toBeLessThan(section.indexOf('data-native-card="github"'));+ fixture.overrides.set(SEARCH, "git");+ const searched = render();+ expect(githubRows(searched.html)).toEqual(["contents"]);+ fixture.overrides.set(SEARCH, "gmail");+ expect(githubRows(render().html)).toEqual(["hidden"]);+ });+it("groups the catalog into connected apps, category previews and every app, with a View all per section", () => {const categorized = (slug: string, category: string) => ({ ...card(slug), categories: [category] });fixture.overrides.set(CARDS, [diff --git a/src/components/PluginsPanel.tsx b/src/components/PluginsPanel.tsxindex 9880c04adc..b2e8968240 100644--- a/src/components/PluginsPanel.tsx+++ b/src/components/PluginsPanel.tsx@@ -34,6 +34,8 @@ import { EmailCard } from "./EmailCard";import { PostizCard } from "./PostizCard";import { POSTIZ_CATALOG_CARD, POSTIZ_SEARCH } from "@/lib/postiz";import { X_CARD_SEARCH, XCard } from "./XCard";+import { GITHUB_CARD_CATEGORIES, GITHUB_CARD_SEARCH, GithubAppCard } from "./github/GithubAppCard";+import { useGithubConnected } from "@/lib/github-sign-in";import { mergeCompleteConnectorStatus, mergeCurrentConnectorStatus, onlyLatestConnectorResponses } from "@/lib/connector-status-merge";import { openBotSettings } from "./bot-panel/panel-link";import { openKeySettings } from "./keys/key-focus";@@ -147,6 +149,7 @@ export function PluginsPanel() {const [postizConnected, setPostizConnected] = useState<boolean | null>(null);const [emailConnected, setEmailConnected] = useState<boolean | null>(null);const [mcpServers, setMcpServers] = useState<McpServerListing[]>([]);+ const githubSignedIn = useGithubConnected();const disconnectingRef = useRef<{ slug: string; label: string; account: ConnectorAccount } | null>(null);const polls = useRef(new Map<string, () => void>());@@ -408,6 +411,7 @@ export function PluginsPanel() {const shownHosted = new Set(HOSTED_MCP_APPS.filter((app) => hostedShown(app, search, listing, hostedConnected)).map((app) => app.id));const showEmail = (!search || `email mail imap smtp mailbox ${t("email.description")}`.toLowerCase().includes(search.toLowerCase().trim())) && (listing === "all" || (listing === "connected" && emailConnected !== false));const showX = (!search || `${X_CARD_SEARCH} ${t("apps.x.description")}`.toLowerCase().includes(search.toLowerCase().trim())) && (listing === "all" || (listing === "connected" && xConnected !== false));+ const showGithub = (!search || `${GITHUB_CARD_SEARCH} ${t("githubSignIn.pitch")}`.toLowerCase().includes(search.toLowerCase().trim())) && (listing === "all" || (listing === "connected" && githubSignedIn === true));const showPostiz = (!search || `${POSTIZ_SEARCH} ${t("postiz.description")}`.toLowerCase().includes(search.toLowerCase().trim())) && (listing === "all" || (listing === "connected" && postizConnected !== false));const visible = useMemo(() => (listing === "connected" ? matching.filter((card) => isConnected(card.slug)) : matching).map((card, index) => ({ card, index }))@@ -416,7 +420,7 @@ export function PluginsPanel() {const connectedHosted = HOSTED_MCP_APPS.filter((app) => hostedConnected?.[app.id]);const ownServers = mcpServers.filter((server) => ownMcpServer(server));const ownServerShown = (server: McpServerListing) => matchesCatalogSearch(`${server.name} ${isRemoteMcpListing(server) ? server.url : [server.command, ...server.args].join(" ")}`, search);- const connectedCount = Object.values(status).filter(hasActiveConnection).length + connectedHosted.length + ownServers.filter(mcpServerConnected).length + Number(emailConnected === true) + Number(xConnected === true) + Number(postizConnected === true);+ const connectedCount = Object.values(status).filter(hasActiveConnection).length + connectedHosted.length + ownServers.filter(mcpServerConnected).length + Number(emailConnected === true) + Number(githubSignedIn === true) + Number(xConnected === true) + Number(postizConnected === true);const connectedEmptyCopy = connectedInventoryCopy(inventoryPhase);const close = () => dispatch({ type: "togglePlugins", open: false });const setupNotice = connectorSetupNotice({ configured, stale, setup, remoteClient });@@ -435,11 +439,16 @@ export function PluginsPanel() {const categoryInMore = category !== null && moreCategories.includes(category);const inCategoryView = filter === "all" && category !== null && !searching;const postizHere = showPostiz && (!inCategoryView || inCategory(POSTIZ_CATALOG_CARD, category));- const nativeCardsShown = (!inCategoryView && (shownHosted.size > 0 || showEmail || showX)) || postizHere || (filter === "connected" && ownServers.some((server) => server.enabled && ownServerShown(server)));+ const githubHere = showGithub && (!inCategoryView || inCategory({ slug: "github", categories: GITHUB_CARD_CATEGORIES }, category));+ const nativeCardsShown = (!inCategoryView && (shownHosted.size > 0 || showEmail || showX)) || postizHere || githubHere || (filter === "connected" && ownServers.some((server) => server.enabled && ownServerShown(server)));const categoryCards = useMemo(() => inCategoryView ? visible.filter((card) => inCategory(card, category)) : visible, [inCategoryView, visible, category]);const sectioned = filter === "all" && !searching && category === null;const sections = useMemo(() => sectioned ? catalogSections(visible, isConnected, ranked.inline) : [], [sectioned, visible, isConnected, ranked]);const allSection = sections.find((section) => section.kind === "all");+ /** In the sectioned view the GitHub sign-in row sits just before the GitHub app's tile, in that tile's section. */+ const githubBeside = (section: (typeof sections)[number]) => showGithub && section.kind !== "all" && (section.kind === "category" || githubSignedIn === true)+ && section.cards.slice(0, CATEGORY_SECTION_SIZE).some((card) => card.slug === "github");+ const githubSectioned = sections.some(githubBeside);const allCards = sectioned ? allSection?.cards ?? [] : categoryCards;const allCapped = sectioned && !showAllApps && allCards.length > APPS_PREVIEW_COUNT;const allShown = allCapped ? allCards.slice(0, APPS_PREVIEW_COUNT) : allCards;@@ -663,7 +672,7 @@ export function PluginsPanel() {title={t("apps.section.connected")}viewAll={section.cards.length > CATEGORY_SECTION_SIZE ? { label: t("apps.viewAll"), onClick: () => chooseFilter("connected") } : undefined}>- {section.cards.slice(0, CATEGORY_SECTION_SIZE).map((card) => renderTile(card))}+ {section.cards.slice(0, CATEGORY_SECTION_SIZE).map((card) => githubBeside(section) && card.slug === "github" ? githubPair(card) : renderTile(card))}</AppsSection>{renderSuggested()}</Fragment>@@ -674,7 +683,7 @@ export function PluginsPanel() {title={appCategoryLabel(section.category)}viewAll={section.more ? { label: t("apps.viewAll"), onClick: () => pickCategory(section.category) } : undefined}>- {section.cards.map((card) => renderTile(card))}+ {section.cards.map((card) => githubBeside(section) && card.slug === "github" ? githubPair(card) : renderTile(card))}</AppsSection>))}<AppsSection@@ -736,6 +745,7 @@ export function PluginsPanel() {)}><McpServersPanel hostedCards={{ shown: (id) => !inCategoryView && shownHosted.has(id), onConnections: setHostedConnected, onServers: setMcpServers, ...(filter === "connected" ? { ownServers: { shown: ownServerShown, manage: () => chooseFilter("mcp") } } : {}) }} refreshKey={cardsRefresh} />+ <div data-native-card="github" className={githubHere && !githubSectioned ? "contents" : "hidden"}><GithubAppCard /></div><div data-native-card="x" className={showX && !inCategoryView ? "contents" : "hidden"}><XCard refreshKey={cardsRefresh} onConnection={setXConnected} /></div><div data-native-card="email" className={showEmail && !inCategoryView ? "contents" : "hidden"}><EmailCard refreshKey={cardsRefresh} onConnection={setEmailConnected} /></div><div data-native-card="postiz" className={postizHere ? "contents" : "hidden"}><PostizCard refreshKey={cardsRefresh} onConnection={setPostizConnected} /></div>@@ -782,6 +792,10 @@ export function PluginsPanel() {);}+ function githubPair(card: ToolkitCard) {+ return <Fragment key="github-pair"><div data-native-card="github" className="contents"><GithubAppCard /></div>{renderTile(card)}</Fragment>;+ }+function renderTile(card: ToolkitCard) {const serviceStatus = status[card.slug];const standing = tileStanding(card, serviceStatus);diff --git a/src/components/PluginsPanel.window.test.ts b/src/components/PluginsPanel.window.test.tsindex 2e1aaae8d5..c8fd075507 100644--- a/src/components/PluginsPanel.window.test.ts+++ b/src/components/PluginsPanel.window.test.ts@@ -34,6 +34,8 @@ vi.mock("@/lib/connected-apps", () => ({vi.mock("@/lib/connected-apps-cache", () => ({ readCachedInventory: () => null, writeCachedInventory: () => {} }));vi.mock("@/lib/product-events", () => ({ connectorConnect: vi.fn() }));vi.mock("./McpServersPanel", () => ({ McpServersPanel: () => null }));+vi.mock("./github/GithubAppCard", () => ({ GITHUB_CARD_SEARCH: "github git", GITHUB_CARD_CATEGORIES: ["Developer tools"], GithubAppCard: () => null }));+vi.mock("@/lib/github-sign-in", () => ({ useGithubConnected: () => null, useGithubShown: () => false }));vi.mock("./XCard", async () => {const { createElement: element } = await import("react");return { X_CARD_SEARCH: "x", XCard: () => fixture.xTile ? element("div", { "data-app-tile": "x" }, "X") : null };diff --git a/src/components/github/GithubAppCard.dom.test.ts b/src/components/github/GithubAppCard.dom.test.tsnew file mode 100644index 0000000000..72782e453e--- /dev/null+++ b/src/components/github/GithubAppCard.dom.test.ts@@ -0,0 +1,222 @@+// @vitest-environment happy-dom+import { act, createElement } from "react";+import { createRoot, type Root } from "react-dom/client";+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";++import type { GithubSignInStatus } from "../../../shared/github-sign-in";+import { setLocale, t } from "@/lib/i18n";+import { createGithubSignInStore, type GithubSignInStore } from "@/lib/github-sign-in";+import { ApiError } from "@/state/api";+import en from "@/locales/en.json";+import { GithubAppCard } from "./GithubAppCard";++(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true;++const SIGNED_OUT: GithubSignInStatus = { state: "signed-out", download: false };+const CODE: GithubSignInStatus = { state: "signing-in", code: "wdjbmjht", verificationUrl: "https://github.com/login/device", expiresAt: Date.UTC(2026, 10, 24, 9, 15) };++let root: Root | null = null;+let host: HTMLElement;+beforeEach(() => { setLocale("en"); host = document.createElement("div"); document.body.append(host); });+afterEach(async () => {+ if (root) await act(async () => root!.unmount());+ root = null;+ document.body.innerHTML = "";+ vi.restoreAllMocks();+ vi.unstubAllGlobals();+});++/** The card against a fake server that answers each path from its queue, the last answer repeating. */+async function show(answers: Record<string, Array<GithubSignInStatus | ApiError>>) {+ const calls: Array<{ path: string; body?: unknown }> = [];+ const timers: Array<() => void> = [];+ const store: GithubSignInStore = createGithubSignInStore({+ api: async (path, init) => {+ calls.push({ path, body: init?.body });+ const queue = answers[path.replace(/\?.*$/, "")] ?? [];+ const next = queue.length > 1 ? queue.shift()! : queue[0];+ if (!next) throw new Error(`unexpected ${path}`);+ if (next instanceof ApiError) throw next;+ return next;+ },+ timers: { set: (fn) => { timers.push(fn); return fn; }, clear: (fn) => { const at = timers.indexOf(fn as () => void); if (at >= 0) timers.splice(at, 1); } },+ });+ root = createRoot(host);+ await act(async () => { root!.render(createElement(GithubAppCard, { store })); });+ await act(async () => { await Promise.resolve(); });+ const poll = async () => { const due = timers.splice(0); await act(async () => { for (const fn of due) fn(); await Promise.resolve(); }); };+ return { store, calls, timers, poll };+}+const card = () => host.querySelector<HTMLElement>("[data-app-tile='github-sign-in']");+const button = (label: string) => [...host.querySelectorAll("button")].find((candidate) => candidate.textContent === label || candidate.getAttribute("aria-label") === label);+const click = async (element: HTMLElement | undefined | null) => { await act(async () => { element!.click(); await Promise.resolve(); await Promise.resolve(); }); };++describe("the GitHub row in Apps", () => {+ it("not connected: one line and Connect; the download is said only when there is one; a quiet note after an expired code", async () => {+ const { timers } = await show({ "/api/github/sign-in": [SIGNED_OUT] });+ expect(card()!.dataset.githubState).toBe("signed-out");+ expect(card()!.textContent).toContain("Push bots' work to your repositories.");+ expect(card()!.textContent).not.toContain("15 MB");+ expect(button("Connect")).toBeTruthy();+ expect(timers).toEqual([]);+ await act(async () => root!.unmount()); root = null; host.innerHTML = "";++ await show({ "/api/github/sign-in": [{ state: "signed-out", download: true, last: { outcome: "expired", at: 1 } }] });+ expect(card()!.textContent).toContain("Connecting first downloads GitHub's command-line tool (about 15 MB).");+ expect(host.querySelector("[data-github-last='expired']")!.textContent).toBe("The last code expired before it was approved.");+ });++ it("Connect → preparing → the code to type, with a copy button and GitHub's own page, then signed in; polling ends there", async () => {+ const { calls, timers, poll } = await show({+ "/api/github/sign-in": [SIGNED_OUT, CODE, { state: "signed-in", login: "octo", source: "mausbot", scopes: ["repo"], orgs: ["acme"], checkedAt: 1 }],+ "/api/github/sign-in/start": [{ state: "installing" }],+ });+ await click(button("Connect"));+ expect(calls.map((call) => call.path)).toContain("/api/github/sign-in/start");+ expect(card()!.dataset.githubState).toBe("installing");+ expect(card()!.textContent).toContain("Getting GitHub sign-in ready…");+ expect(button("Cancel")).toBeTruthy();+ expect(timers).toHaveLength(1);++ await poll();+ expect(card()!.dataset.githubState).toBe("signing-in");+ expect(host.querySelector("[data-github-code]")!.textContent).toBe("WDJB-MJHT");+ expect(host.querySelector("[data-github-code]")!.getAttribute("aria-hidden")).toBe("true");+ expect(card()!.textContent).toContain("One-time code: W D J B, M J H T");+ expect(button("Copy code")).toBeTruthy();+ const open = host.querySelector<HTMLAnchorElement>("[data-github-open]")!;+ expect(open.textContent).toBe("Copy code & open GitHub");+ expect(open.getAttribute("href")).toBe("https://github.com/login/device");+ expect(open.target).toBe("_blank");+ expect(open.rel).toContain("noopener");+ expect(card()!.textContent).toContain("Or open github.com/login/device on any device.");+ expect(host.querySelector("[role='status']")!.textContent).toMatch(/^Waiting for approval · code expires at \d{1,2}:\d{2}/);+ expect(timers).toHaveLength(1);++ await poll();+ expect(card()!.dataset.githubState).toBe("signed-in");+ expect(card()!.textContent).toContain("Connected as @octo");+ expect(card()!.textContent).toContain("Signed in here · Organizations: acme");+ expect(host.querySelector<HTMLAnchorElement>("a[href='https://github.com/settings/applications']")!.textContent).toBe("Manage on GitHub");+ expect(button("Disconnect")).toBeTruthy();+ expect(timers).toEqual([]);+ });++ it("copies exactly the code when the open button is used", async () => {+ const write = vi.fn(async () => {});+ vi.stubGlobal("navigator", { ...navigator, clipboard: { writeText: write } });+ vi.spyOn(window, "open").mockReturnValue(null);+ await show({ "/api/github/sign-in": [CODE] });+ const open = host.querySelector<HTMLAnchorElement>("[data-github-open]")!;+ open.addEventListener("click", (event) => event.preventDefault());+ await click(open);+ expect(write).toHaveBeenCalledWith("WDJB-MJHT");+ });++ it("never draws a link to anywhere but GitHub's device page, though the code still shows", async () => {+ await show({ "/api/github/sign-in": [{ ...CODE, verificationUrl: "https://github.com.evil.example/login/device" }] as GithubSignInStatus[] });+ expect(host.querySelector("[data-github-code]")!.textContent).toBe("WDJB-MJHT");+ expect(host.querySelector("[data-github-open]")).toBeNull();+ expect(host.querySelector("a[href*='evil']")).toBeNull();+ expect(card()!.textContent).not.toContain("evil");+ });++ it("Cancel ends the wait and says so quietly", async () => {+ const { timers } = await show({ "/api/github/sign-in": [CODE], "/api/github/sign-in/cancel": [{ ...SIGNED_OUT, last: { outcome: "cancelled", at: 1 } }] });+ expect(timers).toHaveLength(1);+ await click(button("Cancel"));+ expect(card()!.dataset.githubState).toBe("signed-out");+ expect(card()!.textContent).toContain("The last sign-in was cancelled.");+ expect(timers).toEqual([]);+ });++ it("the person's own GitHub CLI: no Disconnect, and one line on how to sign out of it there", async () => {+ await show({ "/api/github/sign-in": [{ state: "signed-in", login: "octo", source: "cli", scopes: [], checkedAt: null }] });+ expect(card()!.textContent).toContain("Using your GitHub CLI");+ expect(host.querySelector("[data-github-cli-reason]")!.textContent).toContain("gh auth logout");+ expect(button("Disconnect")).toBeUndefined();+ });++ it("a pasted token: managed on GitHub's tokens page, and Disconnect signs it out", async () => {+ const { calls } = await show({+ "/api/github/sign-in": [{ state: "signed-in", login: "octo", source: "token", scopes: [], checkedAt: 1 }],+ "/api/github/sign-in/sign-out": [SIGNED_OUT],+ });+ expect(card()!.textContent).toContain("Using a token you pasted");+ expect(host.querySelector("a[href='https://github.com/settings/personal-access-tokens']")).toBeTruthy();+ await click(button("Disconnect"));+ expect(calls.at(-1)!.path).toBe("/api/github/sign-in/sign-out");+ expect(card()!.dataset.githubState).toBe("signed-out");+ });++ it("no longer valid: says bots can't push, and Connect again starts a new sign-in", async () => {+ const { calls } = await show({+ "/api/github/sign-in": [{ state: "invalid", login: "octo", source: "mausbot", reason: "revoked" }],+ "/api/github/sign-in/start": [CODE],+ });+ expect(card()!.textContent).toContain("GitHub sign-in stopped working. Bots can't push until you connect again.");+ await click(button("Connect again"));+ expect(calls.at(-1)!.path).toBe("/api/github/sign-in/start");+ expect(card()!.dataset.githubState).toBe("signing-in");+ });++ it("start refused: one line, then a masked token field that is emptied on submit, never echoed, never logged", async () => {+ const token = "github_pat_11AAAAAAA0secretsecretsecretsecret";+ const logs = (["log", "info", "warn", "error", "debug"] as const).map((level) => vi.spyOn(console, level).mockImplementation(() => {}));+ const { calls } = await show({+ "/api/github/sign-in": [SIGNED_OUT],+ "/api/github/sign-in/start": [new ApiError("This computer's Windows Credential Manager already holds a GitHub CLI sign-in", 409)],+ "/api/github/sign-in/token": [new ApiError(`GitHub did not accept ${token}`, 400)],+ });+ await click(button("Connect"));+ expect(host.querySelector("[data-github-refused]")!.textContent).toContain("A new GitHub sign-in can't start on this computer.");+ expect(host.querySelector("a[href='https://github.com/settings/personal-access-tokens/new']")).toBeNull();+ await click(button("Paste a token instead"));+ const field = host.querySelector<HTMLInputElement>("input[name='github-token']")!;+ expect(field.type).toBe("password");+ expect(field.autocomplete).toBe("off");+ expect(field.getAttribute("aria-label")).toBe("GitHub token");+ expect(host.querySelector("a[href='https://github.com/settings/personal-access-tokens/new']")!.textContent).toBe("Create a fine-grained token on GitHub");+ await act(async () => {+ Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")!.set!.call(field, token);+ field.dispatchEvent(new Event("input", { bubbles: true }));+ });+ await act(async () => { host.querySelector<HTMLFormElement>("[data-github-token-form]")!.requestSubmit(); await Promise.resolve(); await Promise.resolve(); });+ expect(calls.at(-1)).toEqual({ path: "/api/github/sign-in/token", body: JSON.stringify({ token }) });+ expect(host.querySelector<HTMLInputElement>("input[name='github-token']")!.value).toBe("");+ expect(host.querySelector("[role='alert']")!.textContent).toBe("GitHub didn't accept this token. Check it and paste it again.");+ expect(host.innerHTML).not.toContain(token);+ for (const spy of logs) for (const args of spy.mock.calls) expect(JSON.stringify(args)).not.toContain(token);+ });++ it("shows nothing at all to a person this sign-in isn't for", async () => {+ await show({ "/api/github/sign-in": [new ApiError("Sign in to this team's Cloud to connect your own GitHub.", 403)] });+ expect(host.innerHTML).toBe("");+ });++ it("offers Retry when the status could not be read", async () => {+ const { calls } = await show({ "/api/github/sign-in": [new ApiError("offline", 502), SIGNED_OUT] });+ await click(button("Retry"));+ expect(calls).toHaveLength(2);+ expect(card()!.dataset.githubState).toBe("signed-out");+ });+});++describe("its words", () => {+ it("are in every language the app ships, with the same placeholders", async () => {+ const { localePacks } = await import("@/locales");+ const keys = Object.keys(en).filter((key) => key.startsWith("githubSignIn.") || key.startsWith("server.github.card."));+ expect(keys.length).toBeGreaterThan(30);+ const placeholders = (text: string) => [...text.matchAll(/\{(\w+)\}/g)].map((match) => match[1]).sort();+ for (const name of new Set(Object.values(localePacks))) {+ if (name === "en") continue;+ const pack = (await import(`../../locales/${name}.json`)).default as Record<string, string>;+ for (const key of keys) {+ expect(pack[key], `${name} ${key}`).toBeTruthy();+ expect(placeholders(pack[key]!), `${name} ${key}`).toEqual(placeholders((en as Record<string, string>)[key]!));+ }+ }+ setLocale("pt-br");+ expect(t("githubSignIn.pitch")).toBe("Envie o trabalho dos bots para os seus repositórios.");+ });+});diff --git a/src/components/github/GithubAppCard.tsx b/src/components/github/GithubAppCard.tsxnew file mode 100644index 0000000000..a2b29f033f--- /dev/null+++ b/src/components/github/GithubAppCard.tsx@@ -0,0 +1,72 @@+import { Check, Loader2 } from "lucide-react";++import { githubSignIn, useGithubSignIn, type GithubSignInStore, type GithubSignInView } from "@/lib/github-sign-in";+import { t } from "@/lib/i18n";+import { githubHeadline, GithubMark, GithubSignInDetails } from "./GithubSignInDetails";++/** What the Apps search box matches for the GitHub sign-in row. */+export const GITHUB_CARD_SEARCH = "github git pull requests repositories push clone";+/** The catalog category the row also shows under. */+export const GITHUB_CARD_CATEGORIES = ["Developer tools"];++const PILL = "inline-flex h-7 min-w-[64px] shrink-0 items-center justify-center gap-2 rounded-full bg-control/80 px-3 text-[13px] font-medium leading-5 text-ink transition-colors hover:bg-raised-hover disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus";++/** The action at the row's end for each state; none for the person's own GitHub CLI, which is never signed out here. */+export function GithubRowAction({ view, store, className = PILL }: { view: GithubSignInView; store: GithubSignInStore; className?: string }) {+ const spinner = <Loader2 size={14} aria-hidden="true" className="animate-spin motion-reduce:animate-none" />;+ if (view.phase === "loading") return <button type="button" disabled className={className} aria-label={t("common.checking")}>{spinner}</button>;+ if (view.phase === "error") return <button type="button" onClick={() => void store.refresh()} className={className}>{t("connectors.action.retry")}</button>;+ const state = view.status?.state;+ if (state === "signed-out" || state === "invalid") {+ return (+ <button type="button" data-github-connect disabled={view.busy !== null} onClick={() => void store.start()} className={className}>+ {view.busy === "start" ? spinner : t(state === "invalid" ? "githubSignIn.connectAgain" : "connectors.action.connect")}+ </button>+ );+ }+ if (state === "installing" || state === "signing-in") {+ return (+ <button type="button" data-github-cancel disabled={view.busy !== null} onClick={() => void store.cancel()} className={className}>+ {view.busy === "cancel" ? spinner : t("common.cancel")}+ </button>+ );+ }+ if (state === "signed-in" && view.status?.state === "signed-in" && view.status.source !== "cli") {+ return (+ <button type="button" data-github-disconnect disabled={view.busy !== null} onClick={() => void store.signOut()} className={className}>+ {view.busy === "sign-out" ? spinner : t("connectors.disconnect")}+ </button>+ );+ }+ return null;+}++/** GitHub in Apps: the server's own sign-in, which bots' git and pull requests use. Nothing shows for a person who may+ * not manage it. */+export function GithubAppCard({ store = githubSignIn }: { store?: GithubSignInStore }) {+ const view = useGithubSignIn(store);+ if (view.phase === "hidden") return null;+ const state = view.status?.state ?? "loading";+ const signedIn = state === "signed-in";+ const headline = githubHeadline(view);+ return (+ <div data-app-tile="github-sign-in" data-github-state={view.phase === "ready" ? state : view.phase}+ className="flex min-w-0 flex-col rounded-xl px-2 py-2 transition-colors hover:bg-raised/40">+ <div className="flex items-center gap-3">+ <GithubMark />+ <div className="min-w-0 flex-1">+ <div className="flex min-w-0 items-center gap-1.5">+ <span className="truncate text-[14px] font-semibold leading-5 text-ink">{t("githubSignIn.title")}</span>+ {signedIn && <Check size={13} strokeWidth={2.5} className="shrink-0 text-success" aria-label={t("apps.connected")} />}+ {state === "installing" && <Loader2 size={13} aria-hidden="true" className="shrink-0 animate-spin text-ink-tertiary motion-reduce:animate-none" />}+ </div>+ <p dir="auto" className="text-[13px] leading-[18px] text-ink-secondary">{headline}</p>+ </div>+ <GithubRowAction view={view} store={store} />+ </div>+ <div className="ps-[52px] pt-1 empty:hidden [&>div:empty]:hidden">+ <GithubSignInDetails view={view} store={store} />+ </div>+ </div>+ );+}diff --git a/src/components/github/GithubChatCard.dom.test.ts b/src/components/github/GithubChatCard.dom.test.tsnew file mode 100644index 0000000000..16885ff4ca--- /dev/null+++ b/src/components/github/GithubChatCard.dom.test.ts@@ -0,0 +1,86 @@+// @vitest-environment happy-dom+import { act, createElement } from "react";+import { createRoot, type Root } from "react-dom/client";+import { afterEach, beforeEach, expect, it, vi } from "vitest";++import type { GithubSignInStatus } from "../../../shared/github-sign-in";++const sent = vi.hoisted(() => [] as Array<{ path: string; init?: RequestInit }>);+vi.mock("@/state/store", () => ({+ api: vi.fn(async (path: string, init?: RequestInit) => { sent.push({ path, init }); return { connected: true }; }),+}));++const { setLocale } = await import("@/lib/i18n");+const { createGithubSignInStore } = await import("@/lib/github-sign-in");+const { ApiError } = await import("@/state/api");+const { ConnectorCard } = await import("../ConnectorCard");++(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true;++const SIGNED_OUT: GithubSignInStatus = { state: "signed-out", download: false };+const CODE: GithubSignInStatus = { state: "signing-in", code: "WDJB-MJHT", verificationUrl: "https://github.com/login/device", expiresAt: Date.now() + 900_000 };+const message = (status: "required" | "connected" = "required", extra = {}) => ({+ id: "m1", role: "bot", kind: "connector", at: 1, text: "Chief couldn't push to acme/site: GitHub isn't connected.",+ connector: { source: "github", slug: "github-sign-in", label: "GitHub", description: "Connect GitHub so Chief can push its work.", status, resumeKey: "github-1", ...extra },+}) as never;++let root: Root | null = null;+let host: HTMLElement;+beforeEach(() => { setLocale("en"); sent.length = 0; host = document.createElement("div"); document.body.append(host); });+afterEach(async () => { if (root) await act(async () => root!.unmount()); root = null; document.body.innerHTML = ""; });++async function show(answers: Array<GithubSignInStatus | InstanceType<typeof ApiError>>, card = message(), starts: GithubSignInStatus[] = [CODE]) {+ const store = createGithubSignInStore({+ api: async (path) => {+ if (path.endsWith("/start")) return starts.shift();+ const next = answers.length > 1 ? answers.shift()! : answers[0]!;+ if (next instanceof ApiError) throw next;+ return next;+ },+ timers: { set: () => null, clear: () => {} },+ });+ root = createRoot(host);+ // The chat's own ConnectorCard: a github card is drawn by the GitHub card.+ const { GithubChatCard } = await import("./GithubChatCard");+ await act(async () => { root!.render(createElement(ConnectorCard, { botId: "chief", threadId: "t1", message: card })); });+ await act(async () => { await Promise.resolve(); });+ if (!(card as { connector: { dismissed?: boolean } }).connector.dismissed) {+ expect(host.querySelector("[data-github-connect], [data-ask-card]"), "ConnectorCard draws a github card as the GitHub card").toBeTruthy();+ expect(host.textContent).not.toContain("Connect securely");+ }+ await act(async () => { root!.render(createElement(GithubChatCard, { botId: "chief", threadId: "t1", message: card, store })); });+ await act(async () => { await Promise.resolve(); });+ return store;+}+const button = (label: string) => [...host.querySelectorAll("button")].find((candidate) => candidate.textContent === label || candidate.getAttribute("aria-label") === label);++it("says what failed and connects GitHub in place: the code, GitHub's page, then Cancel", async () => {+ await show([SIGNED_OUT]);+ const card = host.querySelector("[data-ask-card='pending']")!;+ expect(card.textContent).toContain("Chief couldn't push to acme/site: GitHub isn't connected.");+ expect(card.textContent).toContain("Push bots' work to your repositories.");+ await act(async () => { button("Connect GitHub")!.click(); await Promise.resolve(); await Promise.resolve(); });+ expect(host.querySelector("[data-github-code]")!.textContent).toBe("WDJB-MJHT");+ expect(host.querySelector<HTMLAnchorElement>("[data-github-open]")!.href).toBe("https://github.com/login/device");+ expect(button("Cancel")).toBeTruthy();+});++it("settles on the server and becomes one quiet line once GitHub is connected", async () => {+ await show([{ state: "signed-in", login: "octo", source: "mausbot", scopes: [], checkedAt: 1 }]);+ expect(host.querySelector("[data-ask-card='settled']")!.textContent).toContain("GitHub · Connected as @octo");+ expect(sent.some((call) => call.path === "/api/bots/chief/connector-cards/m1/status?threadId=t1")).toBe(true);+});++it("Not now sets the card aside through the card's own route", async () => {+ await show([SIGNED_OUT]);+ await act(async () => { button("Not now")!.click(); await Promise.resolve(); });+ expect(sent.at(-1)).toMatchObject({ path: "/api/bots/chief/connector-cards/m1/dismiss", init: { method: "POST", body: JSON.stringify({ threadId: "t1" }) } });+});++it("shows nothing to someone whose sign-in it isn't, and nothing once set aside", async () => {+ await show([new ApiError("Sign in to this team's Cloud to connect your own GitHub.", 403)]);+ expect(host.innerHTML).toBe("");+ await act(async () => root!.unmount()); root = null; host.innerHTML = "";+ await show([SIGNED_OUT], message("required", { dismissed: true }));+ expect(host.innerHTML).toBe("");+});diff --git a/src/components/github/GithubChatCard.tsx b/src/components/github/GithubChatCard.tsxnew file mode 100644index 0000000000..998cd00dcb--- /dev/null+++ b/src/components/github/GithubChatCard.tsx@@ -0,0 +1,70 @@+import { useEffect, useRef } from "react";+import { Loader2 } from "lucide-react";++import { githubSignIn, useGithubSignIn, type GithubSignInStore } from "@/lib/github-sign-in";+import { t } from "@/lib/i18n";+import { api, type Bot, type Message } from "@/state/store";+import { ASK_SECONDARY_BUTTON, askPrimary, AskCard, AskSettledLine } from "../AskCard";+import { githubHeadline, GithubMark, GithubSignInDetails } from "./GithubSignInDetails";++/** The card a chat shows after a clone, fetch or push failed because GitHub isn't connected: the same sign-in as Apps,+ * right where the work stopped. A client that does not draw it shows the message's text instead. */+export function GithubChatCard({ botId, color, threadId, message, store = githubSignIn }: {+ botId: string;+ color?: Bot["color"];+ threadId: string;+ message: Message;+ store?: GithubSignInStore;+}) {+ const connector = message.connector!;+ const view = useGithubSignIn(store);+ const signedIn = view.status?.state === "signed-in" ? view.status : null;+ const endpoint = `/api/bots/${encodeURIComponent(botId)}/connector-cards/${encodeURIComponent(message.id)}`;+ const settling = useRef(false);++ useEffect(() => {+ if (!signedIn || connector.status === "connected" || connector.dismissed || settling.current) return;+ settling.current = true;+ void api(`${endpoint}/status?threadId=${encodeURIComponent(threadId)}`).catch(() => {}).finally(() => { settling.current = false; });+ }, [signedIn, connector.status, connector.dismissed, endpoint, threadId]);++ if (connector.dismissed || connector.superseded || view.phase === "hidden") return null;++ if (signedIn || connector.status === "connected") {+ return (+ <AskSettledLine ariaLabel={connector.label}>+ <span className="text-ink-secondary">{connector.label}</span>+ <span> · {signedIn ? t("githubSignIn.connectedAs", { login: signedIn.login }) : t("connectors.card.connected")}</span>+ </AskSettledLine>+ );+ }++ const state = view.status?.state;+ const dismiss = () => void api(`${endpoint}/dismiss`, { method: "POST", body: JSON.stringify({ threadId }) }).catch(() => {});+ const spinner = <Loader2 size={14} aria-hidden="true" className="animate-spin motion-reduce:animate-none" />;+ return (+ <AskCard+ ariaLabel={connector.label}+ icon={<GithubMark className="size-4 rounded-[4px]" />}+ title={message.text}+ explanation={view.phase === "ready" ? githubHeadline(view) : undefined}+ onDismiss={dismiss}+ dismissLabel={t("connectors.card.notNow")}+ footer={+ view.phase === "error" ? (+ <button type="button" onClick={() => void store.refresh()} className={ASK_SECONDARY_BUTTON}>{t("connectors.action.retry")}</button>+ ) : state === "installing" || state === "signing-in" ? (+ <button type="button" data-github-cancel disabled={view.busy !== null} onClick={() => void store.cancel()} className={ASK_SECONDARY_BUTTON}>+ {view.busy === "cancel" ? spinner : t("common.cancel")}+ </button>+ ) : state === "signed-out" || state === "invalid" ? (+ <button type="button" data-github-connect disabled={view.busy !== null} onClick={() => void store.start()} {...askPrimary(color)}>+ {view.busy === "start" ? spinner : t(state === "invalid" ? "githubSignIn.connectAgain" : "githubSignIn.connectGithub")}+ </button>+ ) : view.phase === "loading" ? spinner : null+ }+ >+ {view.phase === "ready" && <GithubSignInDetails view={view} store={store} />}+ </AskCard>+ );+}diff --git a/src/components/github/GithubSignInDetails.tsx b/src/components/github/GithubSignInDetails.tsxnew file mode 100644index 0000000000..07639bedd7--- /dev/null+++ b/src/components/github/GithubSignInDetails.tsx@@ -0,0 +1,189 @@+import { useEffect, useRef, useState, type MouseEvent } from "react";+import { Check, Copy, ExternalLink, Loader2 } from "lucide-react";++import type { GithubSignInStatus } from "../../../shared/github-sign-in";+import { openExternalLink } from "@/lib/app-links";+import { cn } from "@/lib/cn";+import { copyText, COPY_FEEDBACK_MS } from "@/lib/copy-text";+import {+ GITHUB_NEW_TOKEN_URL, githubManageUrl, githubSignIn, groupCode, isGithubDeviceUrl, spellCode,+ type GithubSignInStore, type GithubSignInView,+} from "@/lib/github-sign-in";+import { intlLocale, t } from "@/lib/i18n";+import type { LocaleKey } from "@/locales";++export function GithubMark({ className = "size-10" }: { className?: string }) {+ return (+ <svg viewBox="0 0 40 40" className={cn("shrink-0 rounded-[8px]", className)} aria-hidden="true">+ <rect width="40" height="40" rx="10" fill="#1f2328" />+ <path transform="translate(8 8) scale(1.5)" fill="#fff" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" />+ </svg>+ );+}++const SOURCE: Record<"mausbot" | "token" | "cli", LocaleKey> = {+ mausbot: "githubSignIn.source.mausbot",+ cli: "githubSignIn.source.cli",+ token: "githubSignIn.source.token",+};+const LAST: Record<"expired" | "failed" | "cancelled", LocaleKey> = {+ expired: "githubSignIn.last.expired",+ failed: "githubSignIn.last.failed",+ cancelled: "githubSignIn.last.cancelled",+};+const LINK = "inline-flex items-center gap-1 text-[12px] font-medium text-accent-text hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus rounded-sm";+const FIELD = "h-8 w-full min-w-0 rounded-lg bg-inset px-2.5 text-[13px] text-ink placeholder:text-ink-tertiary focus:outline-none focus:ring-1 focus:ring-accent/50";+const NOTE = "text-[12px] leading-4 text-ink-secondary";+export const GITHUB_PRIMARY = "ui-button ui-button-md ui-button-pill ui-button-primary";+export const GITHUB_SECONDARY = "ui-button ui-button-md ui-button-pill";++/** The line that says where GitHub stands, beside the title. */+export function githubHeadline(view: GithubSignInView): string {+ const status = view.status;+ if (!status) return t("githubSignIn.pitch");+ switch (status.state) {+ case "signed-out": return t("githubSignIn.pitch");+ case "installing": return t("githubSignIn.preparing");+ case "signing-in": return t("githubSignIn.typeCode");+ case "signed-in": return t("githubSignIn.connectedAs", { login: status.login });+ case "invalid": return t("githubSignIn.pitch");+ }+}++/** Everything under the headline for each state: the code to type, who is signed in, a token to paste instead. */+export function GithubSignInDetails({ view, store = githubSignIn }: { view: GithubSignInView; store?: GithubSignInStore }) {+ const status = view.status;+ return (+ <div className="flex min-w-0 flex-col gap-1.5">+ {status?.state === "invalid" && <p data-github-invalid className="text-[13px] leading-[18px] text-warning">{t("githubSignIn.invalid")}</p>}+ {status?.state === "signed-out" && status.download && !view.refused && <p className={NOTE}>{t("githubSignIn.download")}</p>}+ {status && status.last && (status.state === "signed-out" || status.state === "invalid") && !view.refused && (+ <p data-github-last={status.last.outcome} className="text-[12px] leading-4 text-ink-tertiary">{t(LAST[status.last.outcome])}</p>+ )}+ {status?.state === "signing-in" && <DeviceCode status={status} />}+ {status?.state === "signed-in" && <SignedIn status={status} />}+ {view.refused && status?.state !== "signed-in" && status?.state !== "signing-in" && <TokenForm view={view} store={store} />}+ {view.error && <p role="alert" className="text-[12px] leading-4 text-danger">{t(view.error)}</p>}+ </div>+ );+}++function DeviceCode({ status }: { status: Extract<GithubSignInStatus, { state: "signing-in" }> }) {+ const [copied, setCopied] = useState(false);+ const reset = useRef<ReturnType<typeof setTimeout> | null>(null);+ useEffect(() => () => { if (reset.current) clearTimeout(reset.current); }, []);+ const code = groupCode(status.code);+ const url = isGithubDeviceUrl(status.verificationUrl) ? status.verificationUrl : null;+ const copy = () => {+ void copyText(code).then((result) => {+ if (result !== "copied") return;+ setCopied(true);+ if (reset.current) clearTimeout(reset.current);+ reset.current = setTimeout(() => setCopied(false), COPY_FEEDBACK_MS);+ });+ };+ const open = (event: MouseEvent<HTMLAnchorElement>) => {+ copy();+ // The desktop app hands links to the person's browser; a browser or the phone's web view follows the link itself.+ if (window.ogb && url) {+ event.preventDefault();+ void openExternalLink(url);+ }+ };+ const expires = new Intl.DateTimeFormat(intlLocale(), { hour: "numeric", minute: "2-digit" }).format(new Date(status.expiresAt));+ return (+ <div data-github-device-code className="mt-1 flex flex-col gap-2">+ <div className="flex flex-wrap items-center gap-2">+ <span+ data-github-code+ aria-hidden="true"+ className="select-all rounded-lg bg-ink/[0.045] px-3 py-1 font-mono text-[20px] font-semibold leading-7 tracking-[0.12em] text-ink tabular-nums"+ >+ {code}+ </span>+ <span className="sr-only">{t("githubSignIn.codeAria", { code: spellCode(code) })}</span>+ <button type="button" onClick={copy} aria-label={t("githubSignIn.copyCode")} title={t("githubSignIn.copyCode")} className="ui-icon-button rounded-full hover:bg-ink/[0.06]">+ {copied ? <Check size={16} aria-hidden="true" /> : <Copy size={16} aria-hidden="true" />}+ </button>+ <span aria-live="polite" className="sr-only">{copied ? t("githubSignIn.copied") : ""}</span>+ </div>+ {url && (+ <div className="flex flex-wrap items-center gap-x-3 gap-y-1">+ <a data-github-open href={url} target="_blank" rel="noopener noreferrer" onClick={open} className={cn(GITHUB_PRIMARY, "gap-1.5")}>+ {t("githubSignIn.copyAndOpen")}+ <ExternalLink size={14} aria-hidden="true" />+ </a>+ <span className={NOTE}>{t("githubSignIn.anyDevice", { address: url.replace(/^https:\/\//, "") })}</span>+ </div>+ )}+ <p role="status" className="flex items-center gap-1.5 text-[12px] leading-4 text-ink-tertiary">+ <Loader2 size={12} aria-hidden="true" className="shrink-0 animate-spin motion-reduce:animate-none" />+ {t("githubSignIn.waiting", { time: expires })}+ </p>+ </div>+ );+}++function SignedIn({ status }: { status: Extract<GithubSignInStatus, { state: "signed-in" }> }) {+ const orgs = status.orgs?.filter(Boolean) ?? [];+ return (+ <>+ <p className={NOTE}>+ {t(SOURCE[status.source])}+ {orgs.length > 0 && <> · {t("githubSignIn.orgs", { orgs: new Intl.ListFormat(intlLocale(), { style: "short", type: "unit" }).format(orgs) })}</>}+ </p>+ {status.source === "cli" && <p data-github-cli-reason className={NOTE}>{t("githubSignIn.cliReason")}</p>}+ <a href={githubManageUrl(status.source)} target="_blank" rel="noopener noreferrer" className={LINK}+ onClick={(event) => { if (window.ogb) { event.preventDefault(); void openExternalLink(githubManageUrl(status.source)); } }}>+ {t("githubSignIn.manage")}+ <ExternalLink size={11} aria-hidden="true" />+ </a>+ </>+ );+}++/** A pasted token: masked, sent once, and the field is emptied as it goes, whatever GitHub answers. */+function TokenForm({ view, store }: { view: GithubSignInView; store: GithubSignInStore }) {+ const [open, setOpen] = useState(false);+ const [draft, setDraft] = useState("");+ const busy = view.busy === "token";+ const submit = () => {+ const token = draft.trim();+ setDraft("");+ if (token) void store.saveToken(token);+ };+ return (+ <div data-github-refused className="flex flex-col gap-1.5">+ <p className={NOTE}>{t("githubSignIn.refused")}</p>+ {!open ? (+ <button type="button" aria-expanded={false} onClick={() => setOpen(true)} className={cn(LINK, "self-start")}>{t("githubSignIn.pasteInstead")}</button>+ ) : (+ <form data-github-token-form className="flex flex-col gap-1.5" onSubmit={(event) => { event.preventDefault(); submit(); }}>+ <div className="flex items-center gap-2">+ <input+ type="password"+ name="github-token"+ autoComplete="off"+ spellCheck={false}+ autoFocus+ aria-label={t("githubSignIn.tokenLabel")}+ placeholder={t("githubSignIn.tokenPlaceholder")}+ value={draft}+ disabled={busy}+ onChange={(event) => setDraft(event.target.value)}+ className={FIELD}+ />+ <button type="submit" disabled={busy || !draft.trim()} className={GITHUB_SECONDARY}>+ {busy ? <Loader2 size={14} aria-label={t("common.checking")} className="animate-spin" /> : t("connectors.action.connect")}+ </button>+ </div>+ <a href={GITHUB_NEW_TOKEN_URL} target="_blank" rel="noopener noreferrer" className={cn(LINK, "self-start")}+ onClick={(event) => { if (window.ogb) { event.preventDefault(); void openExternalLink(GITHUB_NEW_TOKEN_URL); } }}>+ {t("githubSignIn.tokenCreate")}+ <ExternalLink size={11} aria-hidden="true" />+ </a>+ </form>+ )}+ </div>+ );+}diff --git a/src/github-sign-in-preview.tsx b/src/github-sign-in-preview.tsxnew file mode 100644index 0000000000..6f3e0143bd--- /dev/null+++ b/src/github-sign-in-preview.tsx@@ -0,0 +1,159 @@+// Dev-only: the GitHub sign-in in the real Apps panel, a Team Cloud member's Apps page and a chat's card, against made-up+// answers, served at /github-sign-in-preview.html; not in the packaged app. Every request is answered here.+// ?view=apps|member|chat&gh=out|download|expired|installing|code|mausbot|cli|token|invalid|refused|token-error|hidden+// &composio=connected|open&q=git&skin=midnight|daylight&lang=de+import { StrictMode, useEffect } from "react";+import { createRoot } from "react-dom/client";+import type { GithubSignInStatus } from "../shared/github-sign-in";+import "./styles.css";++const params = new URLSearchParams(location.search);+const view = params.get("view") ?? "apps";+const gh = params.get("gh") ?? "out";+const composioGithub = params.get("composio") ?? "open";+const AT = Date.UTC(2026, 10, 24, 9, 0);++const STATUS: Record<string, GithubSignInStatus> = {+ out: { state: "signed-out", download: false },+ download: { state: "signed-out", download: true },+ expired: { state: "signed-out", download: false, last: { outcome: "expired", at: AT } },+ installing: { state: "installing" },+ code: { state: "signing-in", code: "WDJB-MJHT", verificationUrl: "https://github.com/login/device", expiresAt: Date.now() + 15 * 60_000 },+ mausbot: { state: "signed-in", login: "maya-shah", source: "mausbot", scopes: ["repo", "read:org", "gist"], orgs: ["acme-labs", "maya-oss"], checkedAt: AT },+ cli: { state: "signed-in", login: "maya-shah", source: "cli", scopes: ["repo"], checkedAt: AT },+ token: { state: "signed-in", login: "maya-shah", source: "token", scopes: [], checkedAt: AT },+ invalid: { state: "invalid", login: "maya-shah", source: "mausbot", reason: "GitHub refused the saved sign-in." },+ refused: { state: "signed-out", download: false },+ "token-error": { state: "signed-out", download: false },+};+const github = STATUS[gh] ?? STATUS.out!;++const card = (slug: string, label: string, blurb: string, categories: string[]) => ({ slug, label, blurb, logo: null, domain: null, categories });+const CARDS = [+ card("github", "GitHub", "Manage repositories, issues and pull requests", ["Developer tools"]),+ card("gmail", "Gmail", "Read, send and organize email", ["Communication"]),+ card("slack", "Slack", "Send messages and read channels", ["Communication"]),+ card("notion", "Notion", "Pages, notes and databases", ["Productivity"]),+ card("linear", "Linear", "Issues, projects and cycles", ["Developer tools"]),+ card("googlecalendar", "Google Calendar", "Events and schedules", ["Productivity"]),+ card("sentry", "Sentry", "Errors and performance issues", ["Developer tools"]),+ card("jira", "Jira", "Issues and boards", ["Developer tools"]),+];+const services: Record<string, unknown> = { gmail: { connected: true, status: "ACTIVE", accounts: [{ id: "ca_gmail", status: "ACTIVE" }] } };+if (composioGithub === "connected") services.github = { connected: true, status: "ACTIVE", accounts: [{ id: "ca_github", status: "ACTIVE" }] };++const CONFIG = {+ composio: { configured: true }, box: { configured: false }, vps: { configured: false, sshAlias: "" },+ rooms: { turnTimeoutMinutes: 10 }, localVm: { mode: "shared", maxInstances: 1 },+ profile: { name: "Maya Shah", email: "[email protected]" }, features: { savedSteps: false },+ onboarding: { completedAt: "2026-01-01", version: 1, reelSeen: true, hintsSeen: [] },+ edition: { edition: "community", features: [] }, browserProfiles: [], managedPolicy: null,+ signIn: { admins: [], members: [] }, membership: { authority: "local", pairingCodes: true }, cloudHome: false,+ ...(view === "member" ? { team: { id: "t1", name: "Acme Labs" } } : {}),+};+const ANSWERS: Record<string, unknown> = {+ "/api/instances": { instances: [] }, "/api/config": CONFIG,+ "/api/auth/session": { kind: "session", id: "s1", label: "Chrome on Mac", email: "[email protected]", scopes: ["admin", "client"], expiresAt: 0 },+ "/api/auth/sessions": { sessions: [{ id: "s1" }], current: "s1" }, "/api/routines": { routines: [], runs: [] }, "/api/webhooks": { webhooks: [], attempts: [] },+ "/api/bots": { bots: [{ id: "chief", name: "Chief", threadId: "t-chief" }], groups: [] },+ "/api/connectors/catalog": { cards: CARDS, source: "api", configured: true, mode: "managed", setup: "ready" },+ "/api/connectors/connected": { services, inventoryComplete: true },+ "/api/connectors/suggestions": { cards: [], pick: "picked" },+ "/api/x/status": { using: null, ownKey: false, included: false },+ "/api/email": { accounts: [] },+ "/api/mcp/servers": { servers: [] },+ "/api/team/my-connections": { apps: [{ slug: "gmail", name: "Gmail", connected: true }, { slug: "notion", name: "Notion", connected: false }] },+};+const reply = (body: unknown, status = 200) => Promise.resolve(new Response(JSON.stringify(body), { status, headers: { "content-type": "application/json" } }));+const realFetch = window.fetch.bind(window);+window.fetch = (input: RequestInfo | URL, init?: RequestInit) => {+ const url = new URL(String(input instanceof Request ? input.url : input), location.href);+ if (url.origin !== location.origin || !url.pathname.startsWith("/api/")) return realFetch(input, init);+ if (url.pathname.startsWith("/api/github/sign-in")) {+ if (gh === "hidden") return reply({ error: "Sign in to this team's Cloud to connect your own GitHub." }, 403);+ if (url.pathname.endsWith("/start")) return reply({ error: "GitHub is already signed in on this computer." }, 409);+ if (url.pathname.endsWith("/token")) return reply({ error: "GitHub did not accept this token." }, 400);+ return reply(github);+ }+ if (url.pathname.includes("/connector-cards/")) return reply({ connected: false, pending: false, status: "required" });+ return reply(ANSWERS[url.pathname] ?? {});+};+class QuietEventSource {+ onopen: (() => void) | null = null; onerror: (() => void) | null = null; onmessage: ((event: { data: string }) => void) | null = null;+ readyState = 1;+ constructor(readonly url: string) { setTimeout(() => this.onmessage?.({ data: JSON.stringify({ kind: "hello", resumed: false, cursor: "run:0" }) }), 50); }+ addEventListener() {} removeEventListener() {} close() {}+}+Object.assign(window, { EventSource: QuietEventSource });+try { localStorage.setItem("omb-advanced-mode", "0"); } catch { /* blocked storage */ }++const [{ StoreProvider, useStore }, { PluginsPanel }, { MemberApps }, { ConnectorCard }, { githubSignIn }, { applySkin, readSkin, SKIN_IDS }, { loadLocale }] = await Promise.all([+ import("@/state/store"), import("@/components/PluginsPanel"), import("@/components/MemberApps"), import("@/components/ConnectorCard"),+ import("@/lib/github-sign-in"), import("@/lib/skins"), import("@/lib/i18n"),+]);++/** The refused states are reached as a person reaches them: Connect, then Paste a token instead (then a refused token). */+async function walkToRefusal() {+ if (gh !== "refused" && gh !== "token-error") return;+ while (githubSignIn.snapshot().phase === "loading") await new Promise((done) => setTimeout(done, 50));+ await githubSignIn.start();+ await new Promise((done) => setTimeout(done, 50));+ document.querySelector<HTMLButtonElement>("[data-github-refused] button")?.click();+ if (gh === "token-error") await githubSignIn.saveToken("github_pat_preview_only_not_a_real_token");+}++function AppsView() {+ const { state: app, dispatch } = useStore();+ useEffect(() => { if (app.config) dispatch({ type: "togglePlugins", open: true, surface: "apps" }); }, [Boolean(app.config)]);+ useEffect(() => {+ if (!app.pluginsOpen) return;+ const search = params.get("q");+ const field = document.querySelector<HTMLInputElement>("[data-tour='apps-panel'] input");+ if (search && field) {+ Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")!.set!.call(field, search);+ field.dispatchEvent(new Event("input", { bubbles: true }));+ }+ void walkToRefusal();+ }, [app.pluginsOpen]);+ if (!app.pluginsOpen) return <div className="h-screen bg-app" />;+ return <div className="h-screen bg-app">{view === "member" ? <MemberApps /> : <PluginsPanel />}</div>;+}++function ChatView() {+ useEffect(() => { void walkToRefusal(); }, []);+ const message = {+ id: "m-github", role: "bot" as const, kind: "connector" as const, at: AT,+ text: "Chief couldn't push to acme-labs/website: GitHub isn't connected.",+ connector: { source: "github" as const, slug: "github-sign-in", label: "GitHub", status: "required" as const, resumeKey: "github-preview",+ description: "Connect GitHub so Chief can push its work to your repositories." },+ };+ return (+ <div className="flex min-h-screen justify-center bg-app px-4 py-10 text-ink">+ <div className="flex w-full max-w-[720px] flex-col gap-4">+ <div className="max-w-[560px] self-end rounded-4xl bg-raised px-4 py-2.5 text-[15px] leading-[22px]">Push the landing page fix to acme-labs/website.</div>+ <div className="text-[15px] leading-[22px] text-ink">I made the fix on a branch, but pushing it needs GitHub.</div>+ <ConnectorCard botId="chief" color="blue" threadId="t-chief" message={message as never} />+ </div>+ </div>+ );+}++/** The pictures are taken once GitHub is in view: this row, else the GitHub app's tile, else the chat's card. */+function markReady() {+ const started = Date.now();+ const timer = setInterval(() => {+ const target = document.querySelector<HTMLElement>("[data-native-card='github'].contents [data-app-tile], [data-app-tile='github-sign-in'], [data-app-tile='github'], [data-ask-card]");+ const settled = gh === "refused" || gh === "token-error" ? document.querySelector(gh === "refused" ? "[data-github-token-form]" : "[data-github-refused] ~ [role='alert']") : true;+ if ((target && settled) || Date.now() - started > 8_000) {+ clearInterval(timer);+ target?.scrollIntoView({ block: "center" });+ requestAnimationFrame(() => document.body.setAttribute("data-preview-ready", ""));+ }+ }, 150);+}+markReady();++const asked = params.get("skin");+applySkin((SKIN_IDS as readonly string[]).includes(asked ?? "") ? asked as Parameters<typeof applySkin>[0] : readSkin());+await loadLocale(params.get("lang") ?? "en");+createRoot(document.getElementById("root")!).render(<StrictMode><StoreProvider>{view === "chat" ? <ChatView /> : <AppsView />}</StoreProvider></StrictMode>);diff --git a/src/lib/github-sign-in.test.ts b/src/lib/github-sign-in.test.tsnew file mode 100644index 0000000000..22c352cae7--- /dev/null+++ b/src/lib/github-sign-in.test.ts@@ -0,0 +1,195 @@+import { describe, expect, it, vi } from "vitest";++import type { GithubSignInStatus } from "../../shared/github-sign-in";+import { ApiError } from "@/state/api";+import {+ createGithubSignInStore, githubConnected, githubManageUrl, groupCode, INSTALLING_POLL_MS, isGithubDeviceUrl, SIGNING_IN_POLL_MS, spellCode,+} from "./github-sign-in";++const SIGNED_OUT: GithubSignInStatus = { state: "signed-out", download: false };+const CODE: GithubSignInStatus = { state: "signing-in", code: "WDJB-MJHT", verificationUrl: "https://github.com/login/device", expiresAt: 1_000 };+const SIGNED_IN: GithubSignInStatus = { state: "signed-in", login: "octo", source: "mausbot", scopes: ["repo"], checkedAt: 1 };++/** A fake server: answers in order for each path, and hand-run timers. */+function harness(answers: Record<string, Array<GithubSignInStatus | ApiError>>) {+ const calls: Array<{ path: string; init?: RequestInit & { background?: boolean } }> = [];+ const api = vi.fn(async (path: string, init?: RequestInit & { background?: boolean }) => {+ calls.push({ path, init });+ const key = path.replace(/\?.*$/, "");+ const queue = answers[key] ?? [];+ const next = queue.length > 1 ? queue.shift()! : queue[0];+ if (!next) throw new Error(`unexpected ${path}`);+ if (next instanceof ApiError) throw next;+ return next;+ });+ const pending: Array<{ fn: () => void; ms: number; cleared: boolean }> = [];+ const timers = {+ set: (fn: () => void, ms: number) => { const timer = { fn, ms, cleared: false }; pending.push(timer); return timer; },+ clear: (handle: unknown) => { (handle as { cleared: boolean }).cleared = true; },+ };+ const live = () => pending.filter((timer) => !timer.cleared);+ const tick = async () => {+ const due = live();+ for (const timer of due) { timer.cleared = true; timer.fn(); }+ await flush();+ };+ const store = createGithubSignInStore({ api, timers });+ return { store, calls, live, tick };+}+const flush = async () => { for (let i = 0; i < 5; i++) await Promise.resolve(); };++describe("the device address", () => {+ it("is drawn as a link only when it is exactly GitHub's device page", () => {+ expect(isGithubDeviceUrl("https://github.com/login/device")).toBe(true);+ for (const other of [+ "http://github.com/login/device", "https://github.com/login/device?x=1", "https://github.com/login/device#a",+ "https://github.com:444/login/device", "https://[email protected]/login/device", "https://github.com.evil.example/login/device",+ "https://evil.example/login/device", "https://github.com/login/device/../oauth", "https://github.com/login/devices",+ "javascript:alert(1)", "", null, 42, "https://github.com/login/device?",+ ]) expect(isGithubDeviceUrl(other), String(other)).toBe(false);+ });++ it("groups the code in fours and spells it out for a screen reader", () => {+ expect(groupCode("wdjbmjht")).toBe("WDJB-MJHT");+ expect(groupCode("WDJB-MJHT")).toBe("WDJB-MJHT");+ expect(groupCode(" abc ")).toBe("ABC");+ expect(spellCode("WDJB-MJHT")).toBe("W D J B, M J H T");+ });++ it("manages a pasted token on the tokens page and a code sign-in among authorized apps", () => {+ expect(githubManageUrl("token")).toBe("https://github.com/settings/personal-access-tokens");+ expect(githubManageUrl("mausbot")).toBe("https://github.com/settings/applications");+ expect(githubManageUrl("cli")).toBe("https://github.com/settings/applications");+ });+});++describe("the shared status", () => {+ it("asks once when shown and never again while nothing is under way", async () => {+ const { store, calls, live, tick } = harness({ "/api/github/sign-in": [SIGNED_OUT] });+ const stop = store.subscribe(() => {});+ const second = store.subscribe(() => {});+ await flush();+ expect(calls.map((call) => call.path)).toEqual(["/api/github/sign-in"]);+ expect(store.snapshot()).toMatchObject({ phase: "ready", status: SIGNED_OUT });+ expect(live()).toEqual([]);+ await tick();+ expect(calls).toHaveLength(1);+ stop(); second();+ expect(githubConnected(store.snapshot())).toBe(false);+ });++ it("polls while GitHub CLI is prepared and the code waits, quietly, and stops once signed in", async () => {+ const { store, calls, live, tick } = harness({+ "/api/github/sign-in": [SIGNED_OUT, CODE, SIGNED_IN],+ "/api/github/sign-in/start": [{ state: "installing" }],+ });+ store.subscribe(() => {});+ await flush();+ await store.start();+ expect(store.snapshot().status?.state).toBe("installing");+ expect(live().map((timer) => timer.ms)).toEqual([INSTALLING_POLL_MS]);+ await tick();+ expect(store.snapshot().status?.state).toBe("signing-in");+ expect(live().map((timer) => timer.ms)).toEqual([SIGNING_IN_POLL_MS]);+ await tick();+ expect(store.snapshot().status).toEqual(SIGNED_IN);+ expect(live()).toEqual([]);+ expect(calls.filter((call) => call.path === "/api/github/sign-in").slice(1).every((call) => call.init?.background === true)).toBe(true);+ await tick();+ expect(calls).toHaveLength(4);+ expect(githubConnected(store.snapshot())).toBe(true);+ });++ it("stops polling when the last card goes, and picks up again when one is shown", async () => {+ const { store, live } = harness({ "/api/github/sign-in": [CODE] });+ const stop = store.subscribe(() => {});+ await flush();+ expect(live()).toHaveLength(1);+ stop();+ expect(live()).toEqual([]);+ store.subscribe(() => {});+ expect(live()).toHaveLength(1);+ });++ it("stops polling after cancel and after an expired code", async () => {+ const expired: GithubSignInStatus = { state: "signed-out", download: false, last: { outcome: "expired", at: 2 } };+ const { store, live, tick } = harness({ "/api/github/sign-in": [CODE, expired], "/api/github/sign-in/cancel": [{ ...SIGNED_OUT, last: { outcome: "cancelled", at: 3 } }] });+ store.subscribe(() => {});+ await flush();+ await tick();+ expect(store.snapshot().status).toEqual(expired);+ expect(live()).toEqual([]);++ const second = harness({ "/api/github/sign-in": [CODE], "/api/github/sign-in/cancel": [{ ...SIGNED_OUT, last: { outcome: "cancelled", at: 3 } }] });+ second.store.subscribe(() => {});+ await flush();+ await second.store.cancel();+ expect(second.store.snapshot().status?.last?.outcome).toBe("cancelled");+ expect(second.live()).toEqual([]);+ });++ it("offers a token when start is refused, after asking again what is true now", async () => {+ const { store, calls } = harness({+ "/api/github/sign-in": [SIGNED_OUT],+ "/api/github/sign-in/start": [new ApiError("Windows Credential Manager already holds a GitHub CLI sign-in", 409)],+ });+ store.subscribe(() => {});+ await flush();+ expect(await store.start()).toBe(false);+ expect(calls.map((call) => call.path)).toEqual(["/api/github/sign-in", "/api/github/sign-in/start", "/api/github/sign-in"]);+ expect(store.snapshot()).toMatchObject({ refused: true, error: null, busy: null });+ });++ it("shows the sign-in instead of a refusal when the person's own GitHub CLI turns out to be signed in", async () => {+ const { store } = harness({+ "/api/github/sign-in": [SIGNED_OUT, { ...SIGNED_IN, source: "cli" }],+ "/api/github/sign-in/start": [new ApiError("GitHub is already signed in on this computer as octo", 409)],+ });+ store.subscribe(() => {});+ await flush();+ await store.start();+ expect(store.snapshot()).toMatchObject({ refused: false, status: { state: "signed-in", source: "cli" } });+ });++ it("hides everything for a person the sign-in isn't for", async () => {+ const { store, live } = harness({ "/api/github/sign-in": [new ApiError("Only the owner or an admin of this server can connect GitHub.", 403)] });+ store.subscribe(() => {});+ await flush();+ expect(store.snapshot()).toMatchObject({ phase: "hidden", status: null });+ expect(live()).toEqual([]);+ expect(githubConnected(store.snapshot())).toBe(false);+ });++ it("offers Retry when the first answer fails, and keeps what it showed when a later one does", async () => {+ const failing = harness({ "/api/github/sign-in": [new ApiError("Couldn't reach", 502)] });+ failing.store.subscribe(() => {});+ await flush();+ expect(failing.store.snapshot().phase).toBe("error");++ const later = harness({ "/api/github/sign-in": [CODE, new ApiError("offline", 503)] });+ later.store.subscribe(() => {});+ await flush();+ await later.tick();+ expect(later.store.snapshot()).toMatchObject({ phase: "ready", status: CODE });+ });++ it("sends a pasted token once and keeps it nowhere, and says why GitHub refused it in its own words", async () => {+ const token = "github_pat_11ABCDEFG0123456789_secretsecretsecret";+ const { store, calls } = harness({+ "/api/github/sign-in": [SIGNED_OUT],+ "/api/github/sign-in/token": [new ApiError(`GitHub did not accept ${token}`, 400), new ApiError("rate", 502), { ...SIGNED_IN, source: "token" }],+ });+ store.subscribe(() => {});+ await flush();+ expect(await store.saveToken(token)).toBe(false);+ expect(store.snapshot().error).toBe("githubSignIn.tokenRejected");+ expect(JSON.stringify(store.snapshot())).not.toContain(token);+ await store.saveToken(token);+ expect(store.snapshot().error).toBe("githubSignIn.tokenUnchecked");+ expect(await store.saveToken(token)).toBe(true);+ expect(store.snapshot()).toMatchObject({ error: null, status: { state: "signed-in", source: "token" } });+ expect(JSON.stringify(store.snapshot())).not.toContain(token);+ const sent = calls.filter((call) => call.path === "/api/github/sign-in/token");+ expect(sent.map((call) => [call.init?.method, call.init?.body])).toEqual(Array(3).fill(["POST", JSON.stringify({ token })]));+ });+});diff --git a/src/lib/github-sign-in.ts b/src/lib/github-sign-in.tsnew file mode 100644index 0000000000..0664fcaaeb--- /dev/null+++ b/src/lib/github-sign-in.ts@@ -0,0 +1,185 @@+// What the GitHub sign-in card shows, shared by every card on screen (the Apps row, a chat's card): one status, one+// poll. The status is asked for while a card is shown, and asked again only while GitHub CLI is being prepared or a+// code waits for approval; nothing is pushed.+import { useSyncExternalStore } from "react";++import { GITHUB_SIGN_IN_PATH, type GithubSignInStatus } from "../../shared/github-sign-in";+import type { LocaleKey } from "@/locales";+import { api as storeApi } from "@/state/store";++export const GITHUB_DEVICE_URL = "https://github.com/login/device";+export const GITHUB_APPLICATIONS_URL = "https://github.com/settings/applications";+export const GITHUB_TOKENS_URL = "https://github.com/settings/personal-access-tokens";+export const GITHUB_NEW_TOKEN_URL = "https://github.com/settings/personal-access-tokens/new";+export const INSTALLING_POLL_MS = 1_500;+export const SIGNING_IN_POLL_MS = 3_000;++/** Only GitHub's own device page is ever drawn as a link: anything else the server says is not opened. */+export function isGithubDeviceUrl(value: unknown): value is string {+ if (typeof value !== "string") return false;+ let url: URL;+ try { url = new URL(value); } catch { return false; }+ return url.protocol === "https:" && url.hostname === "github.com" && url.port === "" && url.username === "" && url.password === ""+ && url.pathname === "/login/device" && url.search === "" && url.hash === "" && !/[?#]/.test(value);+}++/** "abcd1234" and "ABCD-1234" both read "ABCD-1234"; a code of another shape is shown as it came, upper-cased. */+export function groupCode(code: string): string {+ const plain = code.toUpperCase().replace(/[^A-Z0-9]/g, "");+ return plain.length === 8 ? `${plain.slice(0, 4)}-${plain.slice(4)}` : code.trim().toUpperCase();+}++/** The code one character at a time, for a screen reader: "A B C D, 1 2 3 4". */+export function spellCode(code: string): string {+ return groupCode(code).split("-").map((group) => [...group].join(" ")).join(", ");+}++export type GithubSignInBusy = "start" | "cancel" | "token" | "sign-out" | null;++export interface GithubSignInView {+ /** hidden: this person may not see or change this sign-in (a member's room, a client without the owner's rights). */+ phase: "loading" | "ready" | "hidden" | "error";+ status: GithubSignInStatus | null;+ busy: GithubSignInBusy;+ /** Start was refused (their own GitHub CLI, or Windows' saved sign-in): offer a pasted token. */+ refused: boolean;+ error: LocaleKey | null;+}++type Api = (path: string, init?: RequestInit & { background?: boolean }) => Promise<unknown>;+type Timers = { set(fn: () => void, ms: number): unknown; clear(handle: unknown): void };++const statusOf = (cause: unknown): number | undefined => {+ const status = (cause as { status?: unknown } | null)?.status;+ return typeof status === "number" ? status : undefined;+};++function isStatus(value: unknown): value is GithubSignInStatus {+ const state = (value as { state?: unknown } | null)?.state;+ return state === "signed-out" || state === "installing" || state === "signing-in" || state === "signed-in" || state === "invalid";+}++const INITIAL: GithubSignInView = { phase: "loading", status: null, busy: null, refused: false, error: null };++export function createGithubSignInStore(deps: { api?: Api; timers?: Timers } = {}) {+ const api: Api = deps.api ?? storeApi;+ const timers: Timers = deps.timers ?? { set: (fn, ms) => setTimeout(fn, ms), clear: (handle) => clearTimeout(handle as ReturnType<typeof setTimeout>) };+ let view = INITIAL;+ let loaded = false;+ let reads = 0;+ let timer: unknown = null;+ const listeners = new Set<() => void>();++ const set = (patch: Partial<GithubSignInView>) => {+ view = { ...view, ...patch };+ for (const listener of listeners) listener();+ schedule();+ };+ const stopPolling = () => {+ if (timer !== null) timers.clear(timer);+ timer = null;+ };+ function schedule() {+ const state = view.status?.state;+ const wait = state === "installing" ? INSTALLING_POLL_MS : state === "signing-in" ? SIGNING_IN_POLL_MS : null;+ if (wait === null || !listeners.size || view.phase !== "ready") return stopPolling();+ if (timer !== null) return;+ timer = timers.set(() => {+ timer = null;+ void read({ background: true });+ }, wait);+ }++ /** A status answer; a 403 hides the card, anything else that fails keeps what was shown, or offers Retry. */+ async function read(options: { check?: boolean; background?: boolean } = {}): Promise<void> {+ const mine = ++reads;+ try {+ const answer = await api(`${GITHUB_SIGN_IN_PATH}${options.check ? "?check=1" : ""}`, options.background ? { background: true } : undefined);+ if (mine !== reads) return;+ if (!isStatus(answer)) throw new Error("unexpected GitHub sign-in status");+ set({ phase: "ready", status: answer, refused: answer.state === "signed-in" ? false : view.refused });+ } catch (cause) {+ if (mine !== reads) return;+ if (statusOf(cause) === 403) set({ phase: "hidden", status: null });+ else if (view.status) set({});+ else set({ phase: "error" });+ }+ }++ async function act(busy: Exclude<GithubSignInBusy, null>, action: string, body?: string): Promise<boolean> {+ if (view.busy) return false;+ reads++;+ set({ busy, error: null });+ try {+ const answer = await api(`${GITHUB_SIGN_IN_PATH}/${action}`, { method: "POST", ...(body === undefined ? {} : { body }) });+ if (!isStatus(answer)) throw new Error("unexpected GitHub sign-in status");+ set({ phase: "ready", status: answer, busy: null, refused: answer.state === "signed-in" ? false : view.refused });+ return true;+ } catch (cause) {+ const status = statusOf(cause);+ set({ busy: null });+ if (status === 403) set({ phase: "hidden", status: null });+ else if (action === "start" && status === 409) {+ // The server's reasons differ (their own GitHub CLI is signed in, it could not be read, Windows holds a saved+ // sign-in): what it says now decides, and a token is offered unless that is already signed in.+ await read();+ if (view.status?.state !== "signed-in") set({ refused: true });+ } else if (action === "token") set({ error: status === 400 ? "githubSignIn.tokenRejected" : status === 502 ? "githubSignIn.tokenUnchecked" : "githubSignIn.failed" });+ else set({ error: "githubSignIn.failed" });+ return false;+ }+ }++ return {+ subscribe(listener: () => void): () => void {+ listeners.add(listener);+ if (!loaded) {+ loaded = true;+ void read();+ }+ schedule();+ return () => {+ listeners.delete(listener);+ if (!listeners.size) stopPolling();+ };+ },+ snapshot: (): GithubSignInView => view,+ /** Ask again now; `check` asks GitHub whether the saved sign-in still works. */+ refresh: (check = false) => read({ check }),+ start: () => act("start", "start"),+ cancel: () => act("cancel", "cancel"),+ signOut: () => act("sign-out", "sign-out"),+ /** The token goes in this one request's body and is kept nowhere here. */+ saveToken: (token: string) => act("token", "token", JSON.stringify({ token })),+ polling: () => timer !== null,+ };+}++export type GithubSignInStore = ReturnType<typeof createGithubSignInStore>;++export const githubSignIn = createGithubSignInStore({ api: (path, init) => storeApi(path, init) });++export function useGithubSignIn(store: GithubSignInStore = githubSignIn): GithubSignInView {+ return useSyncExternalStore(store.subscribe, store.snapshot, () => INITIAL);+}++/** Only what the Apps panel needs, so it is rendered again only when that changes. */+export function useGithubConnected(store: GithubSignInStore = githubSignIn): boolean | null {+ return useSyncExternalStore(store.subscribe, () => githubConnected(store.snapshot()), () => null);+}++/** False once the server said this sign-in isn't this person's to see. */+export function useGithubShown(store: GithubSignInStore = githubSignIn): boolean {+ return useSyncExternalStore(store.subscribe, () => store.snapshot().phase !== "hidden", () => true);+}++/** True while this person's GitHub is signed in, false when it is not or not theirs to see, null until known. */+export function githubConnected(view: GithubSignInView): boolean | null {+ if (view.phase === "loading") return null;+ return view.phase === "ready" && view.status?.state === "signed-in";+}++/** Where the person manages this sign-in on GitHub: the authorized apps for a code sign-in, the tokens page for a token. */+export function githubManageUrl(source: "mausbot" | "token" | "cli"): string {+ return source === "token" ? GITHUB_TOKENS_URL : GITHUB_APPLICATIONS_URL;+}diff --git a/src/locales/de.json b/src/locales/de.jsonindex ec554e7efb..080d797496 100644--- a/src/locales/de.json+++ b/src/locales/de.json@@ -4295,5 +4295,42 @@"skillBurger.run.pathUndone": "Weg entfernt","skillBurger.run.addPathFailed": "Das hat nicht geklappt. Versuch es noch einmal.","activity.tool.team.runWorkflow": "Skill Burger ausführen",- "activity.tool.team.workflowEdit": "Skill Burger ändern"+ "activity.tool.team.workflowEdit": "Skill Burger ändern",+ "githubSignIn.pitch": "Die Arbeit der Bots in deine Repositorys pushen.",+ "githubSignIn.download": "Beim Verbinden wird zuerst das Befehlszeilentool von GitHub heruntergeladen (etwa 15 MB).",+ "githubSignIn.connectGithub": "GitHub verbinden",+ "githubSignIn.connectAgain": "Erneut verbinden",+ "githubSignIn.preparing": "GitHub-Anmeldung wird vorbereitet…",+ "githubSignIn.typeCode": "Gib diesen Code auf GitHub ein, um zu verbinden.",+ "githubSignIn.codeAria": "Einmalcode: {code}",+ "githubSignIn.copyCode": "Code kopieren",+ "githubSignIn.copied": "Code kopiert",+ "githubSignIn.copyAndOpen": "Code kopieren und GitHub öffnen",+ "githubSignIn.anyDevice": "Oder öffne {address} auf einem beliebigen Gerät.",+ "githubSignIn.waiting": "Warte auf Bestätigung · Code läuft um {time} ab",+ "githubSignIn.connectedAs": "Verbunden als @{login}",+ "githubSignIn.source.mausbot": "Hier angemeldet",+ "githubSignIn.source.cli": "Nutzt dein GitHub CLI",+ "githubSignIn.source.token": "Nutzt ein eingefügtes Token",+ "githubSignIn.orgs": "Organisationen: {orgs}",+ "githubSignIn.manage": "Auf GitHub verwalten",+ "githubSignIn.cliReason": "Das ist die Anmeldung deines eigenen GitHub CLI. Melde dich im Terminal mit gh auth logout davon ab.",+ "githubSignIn.invalid": "Die GitHub-Anmeldung funktioniert nicht mehr. Bots können erst wieder pushen, wenn du neu verbindest.",+ "githubSignIn.refused": "Auf diesem Computer kann keine neue GitHub-Anmeldung starten.",+ "githubSignIn.pasteInstead": "Stattdessen ein Token einfügen",+ "githubSignIn.tokenLabel": "GitHub-Token",+ "githubSignIn.tokenCreate": "Ein fein abgestuftes Token auf GitHub erstellen",+ "githubSignIn.tokenRejected": "GitHub hat dieses Token nicht angenommen. Prüfe es und füge es erneut ein.",+ "githubSignIn.tokenUnchecked": "GitHub konnte das Token gerade nicht prüfen. Versuch es in einer Minute noch einmal.",+ "githubSignIn.failed": "Das hat nicht geklappt. Versuch es noch einmal.",+ "githubSignIn.last.expired": "Der letzte Code ist abgelaufen, bevor er bestätigt wurde.",+ "githubSignIn.last.failed": "Die letzte Anmeldung wurde nicht abgeschlossen.",+ "githubSignIn.last.cancelled": "Die letzte Anmeldung wurde abgebrochen.",+ "server.github.card.push": "{bot} konnte nicht nach {repo} pushen: GitHub ist nicht verbunden.",+ "server.github.card.clone": "{bot} konnte {repo} nicht klonen: GitHub ist nicht verbunden.",+ "server.github.card.fetch": "{bot} konnte nicht von {repo} abrufen: GitHub ist nicht verbunden.",+ "server.github.card.description": "Verbinde GitHub, damit {bot} seine Arbeit in deine Repositorys pushen kann.",+ "server.github.card.connectInApps": "Verbinde GitHub über diese Karte in der App auf deinem Computer oder unter Apps.",+ "githubSignIn.title": "GitHub",+ "githubSignIn.tokenPlaceholder": "github_pat_…"}diff --git a/src/locales/en.json b/src/locales/en.jsonindex 43106fa77c..44021bf938 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -11735,5 +11735,42 @@"skillBurger.run.pathUndone": "Path removed","skillBurger.run.addPathFailed": "Couldn't do that. Try again.","activity.tool.team.runWorkflow": "Run workflow",- "activity.tool.team.workflowEdit": "Workflow edit"+ "activity.tool.team.workflowEdit": "Workflow edit",+ "githubSignIn.title": "GitHub",+ "githubSignIn.pitch": "Push bots' work to your repositories.",+ "githubSignIn.download": "Connecting first downloads GitHub's command-line tool (about 15 MB).",+ "githubSignIn.connectGithub": "Connect GitHub",+ "githubSignIn.connectAgain": "Connect again",+ "githubSignIn.preparing": "Getting GitHub sign-in ready…",+ "githubSignIn.typeCode": "Type this code on GitHub to connect.",+ "githubSignIn.codeAria": "One-time code: {code}",+ "githubSignIn.copyCode": "Copy code",+ "githubSignIn.copied": "Code copied",+ "githubSignIn.copyAndOpen": "Copy code & open GitHub",+ "githubSignIn.anyDevice": "Or open {address} on any device.",+ "githubSignIn.waiting": "Waiting for approval · code expires at {time}",+ "githubSignIn.connectedAs": "Connected as @{login}",+ "githubSignIn.source.mausbot": "Signed in here",+ "githubSignIn.source.cli": "Using your GitHub CLI",+ "githubSignIn.source.token": "Using a token you pasted",+ "githubSignIn.orgs": "Organizations: {orgs}",+ "githubSignIn.manage": "Manage on GitHub",+ "githubSignIn.cliReason": "This is your own GitHub CLI sign-in. Sign out of it in your terminal with gh auth logout.",+ "githubSignIn.invalid": "GitHub sign-in stopped working. Bots can't push until you connect again.",+ "githubSignIn.refused": "A new GitHub sign-in can't start on this computer.",+ "githubSignIn.pasteInstead": "Paste a token instead",+ "githubSignIn.tokenLabel": "GitHub token",+ "githubSignIn.tokenPlaceholder": "github_pat_…",+ "githubSignIn.tokenCreate": "Create a fine-grained token on GitHub",+ "githubSignIn.tokenRejected": "GitHub didn't accept this token. Check it and paste it again.",+ "githubSignIn.tokenUnchecked": "GitHub couldn't check the token just now. Try again in a minute.",+ "githubSignIn.failed": "That didn't work. Try again.",+ "githubSignIn.last.expired": "The last code expired before it was approved.",+ "githubSignIn.last.failed": "The last sign-in didn't finish.",+ "githubSignIn.last.cancelled": "The last sign-in was cancelled.",+ "server.github.card.push": "{bot} couldn't push to {repo}: GitHub isn't connected.",+ "server.github.card.clone": "{bot} couldn't clone {repo}: GitHub isn't connected.",+ "server.github.card.fetch": "{bot} couldn't fetch from {repo}: GitHub isn't connected.",+ "server.github.card.description": "Connect GitHub so {bot} can push its work to your repositories.",+ "server.github.card.connectInApps": "Connect GitHub from this card in the app on your computer, or in Apps."}diff --git a/src/locales/es.json b/src/locales/es.jsonindex e79cb3e695..6899167d8b 100644--- a/src/locales/es.json+++ b/src/locales/es.json@@ -6567,5 +6567,42 @@"skillBurger.run.pathUndone": "Camino quitado","skillBurger.run.addPathFailed": "No se pudo hacer. Inténtalo de nuevo.","activity.tool.team.runWorkflow": "Ejecutar Skill Burger",- "activity.tool.team.workflowEdit": "Cambiar Skill Burger"+ "activity.tool.team.workflowEdit": "Cambiar Skill Burger",+ "githubSignIn.pitch": "Sube el trabajo de los bots a tus repositorios.",+ "githubSignIn.download": "Al conectar, primero se descarga la herramienta de línea de comandos de GitHub (unos 15 MB).",+ "githubSignIn.connectGithub": "Conectar GitHub",+ "githubSignIn.connectAgain": "Conectar de nuevo",+ "githubSignIn.preparing": "Preparando el inicio de sesión en GitHub…",+ "githubSignIn.typeCode": "Escribe este código en GitHub para conectar.",+ "githubSignIn.codeAria": "Código de un solo uso: {code}",+ "githubSignIn.copyCode": "Copiar código",+ "githubSignIn.copied": "Código copiado",+ "githubSignIn.copyAndOpen": "Copiar código y abrir GitHub",+ "githubSignIn.anyDevice": "O abre {address} en cualquier dispositivo.",+ "githubSignIn.waiting": "Esperando la aprobación · el código caduca a las {time}",+ "githubSignIn.connectedAs": "Conectado como @{login}",+ "githubSignIn.source.mausbot": "Sesión iniciada aquí",+ "githubSignIn.source.cli": "Usa tu GitHub CLI",+ "githubSignIn.source.token": "Usa un token que pegaste",+ "githubSignIn.orgs": "Organizaciones: {orgs}",+ "githubSignIn.manage": "Gestionar en GitHub",+ "githubSignIn.cliReason": "Es la sesión de tu propio GitHub CLI. Ciérrala en tu terminal con gh auth logout.",+ "githubSignIn.invalid": "El inicio de sesión en GitHub dejó de funcionar. Los bots no pueden subir cambios hasta que vuelvas a conectar.",+ "githubSignIn.refused": "No se puede iniciar una nueva sesión de GitHub en este ordenador.",+ "githubSignIn.pasteInstead": "Pegar un token",+ "githubSignIn.tokenLabel": "Token de GitHub",+ "githubSignIn.tokenCreate": "Crear un token detallado en GitHub",+ "githubSignIn.tokenRejected": "GitHub no aceptó este token. Revísalo y pégalo de nuevo.",+ "githubSignIn.tokenUnchecked": "GitHub no pudo comprobar el token ahora. Inténtalo de nuevo en un minuto.",+ "githubSignIn.failed": "No funcionó. Inténtalo de nuevo.",+ "githubSignIn.last.expired": "El último código caducó antes de aprobarse.",+ "githubSignIn.last.failed": "El último inicio de sesión no terminó.",+ "githubSignIn.last.cancelled": "Se canceló el último inicio de sesión.",+ "server.github.card.push": "{bot} no pudo subir a {repo}: GitHub no está conectado.",+ "server.github.card.clone": "{bot} no pudo clonar {repo}: GitHub no está conectado.",+ "server.github.card.fetch": "{bot} no pudo traer cambios de {repo}: GitHub no está conectado.",+ "server.github.card.description": "Conecta GitHub para que {bot} pueda subir su trabajo a tus repositorios.",+ "server.github.card.connectInApps": "Conecta GitHub desde esta tarjeta en la app de tu ordenador o en Apps.",+ "githubSignIn.title": "GitHub",+ "githubSignIn.tokenPlaceholder": "github_pat_…"}diff --git a/src/locales/fr.json b/src/locales/fr.jsonindex ff7d1a6628..7439fa12fb 100644--- a/src/locales/fr.json+++ b/src/locales/fr.json@@ -3972,5 +3972,42 @@"skillBurger.run.pathUndone": "Chemin retiré","skillBurger.run.addPathFailed": "Impossible de le faire. Réessayez.","activity.tool.team.runWorkflow": "Exécuter le Skill Burger",- "activity.tool.team.workflowEdit": "Modifier le Skill Burger"+ "activity.tool.team.workflowEdit": "Modifier le Skill Burger",+ "githubSignIn.pitch": "Pousser le travail des bots vers vos dépôts.",+ "githubSignIn.download": "La connexion télécharge d'abord l'outil en ligne de commande de GitHub (environ 15 Mo).",+ "githubSignIn.connectGithub": "Connecter GitHub",+ "githubSignIn.connectAgain": "Se reconnecter",+ "githubSignIn.preparing": "Préparation de la connexion à GitHub…",+ "githubSignIn.typeCode": "Saisissez ce code sur GitHub pour vous connecter.",+ "githubSignIn.codeAria": "Code à usage unique : {code}",+ "githubSignIn.copyCode": "Copier le code",+ "githubSignIn.copied": "Code copié",+ "githubSignIn.copyAndOpen": "Copier le code et ouvrir GitHub",+ "githubSignIn.anyDevice": "Ou ouvrez {address} sur n'importe quel appareil.",+ "githubSignIn.waiting": "En attente d'approbation · le code expire à {time}",+ "githubSignIn.connectedAs": "Connecté en tant que @{login}",+ "githubSignIn.source.mausbot": "Connecté ici",+ "githubSignIn.source.cli": "Utilise votre GitHub CLI",+ "githubSignIn.source.token": "Utilise un jeton que vous avez collé",+ "githubSignIn.orgs": "Organisations : {orgs}",+ "githubSignIn.manage": "Gérer sur GitHub",+ "githubSignIn.cliReason": "C'est la connexion de votre propre GitHub CLI. Déconnectez-vous dans votre terminal avec gh auth logout.",+ "githubSignIn.invalid": "La connexion à GitHub ne fonctionne plus. Les bots ne peuvent plus pousser tant que vous ne vous reconnectez pas.",+ "githubSignIn.refused": "Une nouvelle connexion à GitHub ne peut pas démarrer sur cet ordinateur.",+ "githubSignIn.pasteInstead": "Coller un jeton à la place",+ "githubSignIn.tokenLabel": "Jeton GitHub",+ "githubSignIn.tokenCreate": "Créer un jeton à granularité fine sur GitHub",+ "githubSignIn.tokenRejected": "GitHub n'a pas accepté ce jeton. Vérifiez-le et collez-le à nouveau.",+ "githubSignIn.tokenUnchecked": "GitHub n'a pas pu vérifier le jeton pour le moment. Réessayez dans une minute.",+ "githubSignIn.failed": "Cela n'a pas fonctionné. Réessayez.",+ "githubSignIn.last.expired": "Le dernier code a expiré avant d'être approuvé.",+ "githubSignIn.last.failed": "La dernière connexion n'a pas abouti.",+ "githubSignIn.last.cancelled": "La dernière connexion a été annulée.",+ "server.github.card.push": "{bot} n'a pas pu pousser vers {repo} : GitHub n'est pas connecté.",+ "server.github.card.clone": "{bot} n'a pas pu cloner {repo} : GitHub n'est pas connecté.",+ "server.github.card.fetch": "{bot} n'a pas pu récupérer {repo} : GitHub n'est pas connecté.",+ "server.github.card.description": "Connectez GitHub pour que {bot} puisse pousser son travail vers vos dépôts.",+ "server.github.card.connectInApps": "Connectez GitHub depuis cette carte dans l'app de votre ordinateur, ou dans Apps.",+ "githubSignIn.title": "GitHub",+ "githubSignIn.tokenPlaceholder": "github_pat_…"}diff --git a/src/locales/hi.json b/src/locales/hi.jsonindex c6c640445d..16a194dd40 100644--- a/src/locales/hi.json+++ b/src/locales/hi.json@@ -3824,5 +3824,42 @@"skillBurger.run.pathUndone": "रास्ता हटाया गया","skillBurger.run.addPathFailed": "यह नहीं हो सका। फिर कोशिश करें।","activity.tool.team.runWorkflow": "Skill Burger चलाएँ",- "activity.tool.team.workflowEdit": "Skill Burger बदलें"+ "activity.tool.team.workflowEdit": "Skill Burger बदलें",+ "githubSignIn.pitch": "बॉट्स का काम अपनी रिपॉज़िटरी में पुश करें।",+ "githubSignIn.download": "कनेक्ट करने पर पहले GitHub का कमांड-लाइन टूल डाउनलोड होता है (लगभग 15 MB)।",+ "githubSignIn.connectGithub": "GitHub कनेक्ट करें",+ "githubSignIn.connectAgain": "फिर से कनेक्ट करें",+ "githubSignIn.preparing": "GitHub साइन-इन तैयार हो रहा है…",+ "githubSignIn.typeCode": "कनेक्ट करने के लिए यह कोड GitHub पर टाइप करें।",+ "githubSignIn.codeAria": "एक बार का कोड: {code}",+ "githubSignIn.copyCode": "कोड कॉपी करें",+ "githubSignIn.copied": "कोड कॉपी हो गया",+ "githubSignIn.copyAndOpen": "कोड कॉपी करें और GitHub खोलें",+ "githubSignIn.anyDevice": "या किसी भी डिवाइस पर {address} खोलें।",+ "githubSignIn.waiting": "मंज़ूरी का इंतज़ार · कोड {time} पर खत्म होगा",+ "githubSignIn.connectedAs": "@{login} के रूप में कनेक्टेड",+ "githubSignIn.source.mausbot": "यहाँ साइन इन किया गया",+ "githubSignIn.source.cli": "आपका GitHub CLI इस्तेमाल हो रहा है",+ "githubSignIn.source.token": "आपका पेस्ट किया टोकन इस्तेमाल हो रहा है",+ "githubSignIn.orgs": "संगठन: {orgs}",+ "githubSignIn.manage": "GitHub पर मैनेज करें",+ "githubSignIn.cliReason": "यह आपके अपने GitHub CLI का साइन-इन है। अपने टर्मिनल में gh auth logout से इससे साइन आउट करें।",+ "githubSignIn.invalid": "GitHub साइन-इन ने काम करना बंद कर दिया। जब तक आप फिर से कनेक्ट नहीं करते, बॉट्स पुश नहीं कर सकते।",+ "githubSignIn.refused": "इस कंप्यूटर पर नया GitHub साइन-इन शुरू नहीं हो सकता।",+ "githubSignIn.pasteInstead": "इसके बजाय टोकन पेस्ट करें",+ "githubSignIn.tokenLabel": "GitHub टोकन",+ "githubSignIn.tokenCreate": "GitHub पर फ़ाइन-ग्रेन्ड टोकन बनाएँ",+ "githubSignIn.tokenRejected": "GitHub ने यह टोकन स्वीकार नहीं किया। इसे जाँचें और फिर से पेस्ट करें।",+ "githubSignIn.tokenUnchecked": "GitHub अभी टोकन जाँच नहीं सका। एक मिनट बाद फिर से कोशिश करें।",+ "githubSignIn.failed": "यह नहीं हुआ। फिर से कोशिश करें।",+ "githubSignIn.last.expired": "पिछला कोड मंज़ूरी से पहले खत्म हो गया।",+ "githubSignIn.last.failed": "पिछला साइन-इन पूरा नहीं हुआ।",+ "githubSignIn.last.cancelled": "पिछला साइन-इन रद्द कर दिया गया।",+ "server.github.card.push": "{bot} {repo} पर पुश नहीं कर सका: GitHub कनेक्ट नहीं है।",+ "server.github.card.clone": "{bot} {repo} को क्लोन नहीं कर सका: GitHub कनेक्ट नहीं है।",+ "server.github.card.fetch": "{bot} {repo} से फ़ेच नहीं कर सका: GitHub कनेक्ट नहीं है।",+ "server.github.card.description": "GitHub कनेक्ट करें ताकि {bot} अपना काम आपकी रिपॉज़िटरी में पुश कर सके।",+ "server.github.card.connectInApps": "अपने कंप्यूटर के ऐप में इस कार्ड से, या Apps में, GitHub कनेक्ट करें।",+ "githubSignIn.title": "GitHub",+ "githubSignIn.tokenPlaceholder": "github_pat_…"}diff --git a/src/locales/it.json b/src/locales/it.jsonindex 80593e38e3..21b0e52ed6 100644--- a/src/locales/it.json+++ b/src/locales/it.json@@ -11456,5 +11456,42 @@"skillBurger.run.pathUndone": "Percorso rimosso","skillBurger.run.addPathFailed": "Non è stato possibile. Riprova.","activity.tool.team.runWorkflow": "Esegui Skill Burger",- "activity.tool.team.workflowEdit": "Modifica Skill Burger"+ "activity.tool.team.workflowEdit": "Modifica Skill Burger",+ "githubSignIn.pitch": "Invia il lavoro dei bot ai tuoi repository.",+ "githubSignIn.download": "La connessione scarica prima lo strumento a riga di comando di GitHub (circa 15 MB).",+ "githubSignIn.connectGithub": "Connetti GitHub",+ "githubSignIn.connectAgain": "Connetti di nuovo",+ "githubSignIn.preparing": "Preparazione dell'accesso a GitHub…",+ "githubSignIn.typeCode": "Digita questo codice su GitHub per connetterti.",+ "githubSignIn.codeAria": "Codice monouso: {code}",+ "githubSignIn.copyCode": "Copia codice",+ "githubSignIn.copied": "Codice copiato",+ "githubSignIn.copyAndOpen": "Copia codice e apri GitHub",+ "githubSignIn.anyDevice": "Oppure apri {address} su qualsiasi dispositivo.",+ "githubSignIn.waiting": "In attesa di approvazione · il codice scade alle {time}",+ "githubSignIn.connectedAs": "Connesso come @{login}",+ "githubSignIn.source.mausbot": "Accesso effettuato qui",+ "githubSignIn.source.cli": "Usa il tuo GitHub CLI",+ "githubSignIn.source.token": "Usa un token che hai incollato",+ "githubSignIn.orgs": "Organizzazioni: {orgs}",+ "githubSignIn.manage": "Gestisci su GitHub",+ "githubSignIn.cliReason": "È l'accesso del tuo GitHub CLI. Esci dal terminale con gh auth logout.",+ "githubSignIn.invalid": "L'accesso a GitHub ha smesso di funzionare. I bot non possono inviare modifiche finché non ti connetti di nuovo.",+ "githubSignIn.refused": "Su questo computer non può partire un nuovo accesso a GitHub.",+ "githubSignIn.pasteInstead": "Incolla un token",+ "githubSignIn.tokenLabel": "Token GitHub",+ "githubSignIn.tokenCreate": "Crea un token con permessi granulari su GitHub",+ "githubSignIn.tokenRejected": "GitHub non ha accettato questo token. Controllalo e incollalo di nuovo.",+ "githubSignIn.tokenUnchecked": "GitHub non è riuscito a verificare il token ora. Riprova tra un minuto.",+ "githubSignIn.failed": "Non ha funzionato. Riprova.",+ "githubSignIn.last.expired": "L'ultimo codice è scaduto prima dell'approvazione.",+ "githubSignIn.last.failed": "L'ultimo accesso non è stato completato.",+ "githubSignIn.last.cancelled": "L'ultimo accesso è stato annullato.",+ "server.github.card.push": "{bot} non è riuscito a inviare a {repo}: GitHub non è connesso.",+ "server.github.card.clone": "{bot} non è riuscito a clonare {repo}: GitHub non è connesso.",+ "server.github.card.fetch": "{bot} non è riuscito a scaricare da {repo}: GitHub non è connesso.",+ "server.github.card.description": "Connetti GitHub perché {bot} possa inviare il suo lavoro ai tuoi repository.",+ "server.github.card.connectInApps": "Connetti GitHub da questa scheda nell'app sul tuo computer, oppure in App.",+ "githubSignIn.title": "GitHub",+ "githubSignIn.tokenPlaceholder": "github_pat_…"}diff --git a/src/locales/ja.json b/src/locales/ja.jsonindex a83edfbbef..24590b2300 100644--- a/src/locales/ja.json+++ b/src/locales/ja.json@@ -8102,5 +8102,42 @@"skillBurger.run.pathUndone": "手順を削除しました","skillBurger.run.addPathFailed": "できませんでした。もう一度お試しください。","activity.tool.team.runWorkflow": "Skill Burger を実行",- "activity.tool.team.workflowEdit": "Skill Burger を変更"+ "activity.tool.team.workflowEdit": "Skill Burger を変更",+ "githubSignIn.pitch": "ボットの作業をあなたのリポジトリにプッシュします。",+ "githubSignIn.download": "接続すると、最初に GitHub のコマンドラインツール (約 15 MB) をダウンロードします。",+ "githubSignIn.connectGithub": "GitHub に接続",+ "githubSignIn.connectAgain": "もう一度接続",+ "githubSignIn.preparing": "GitHub のサインインを準備しています…",+ "githubSignIn.typeCode": "このコードを GitHub に入力して接続します。",+ "githubSignIn.codeAria": "ワンタイムコード: {code}",+ "githubSignIn.copyCode": "コードをコピー",+ "githubSignIn.copied": "コードをコピーしました",+ "githubSignIn.copyAndOpen": "コードをコピーして GitHub を開く",+ "githubSignIn.anyDevice": "または任意のデバイスで {address} を開きます。",+ "githubSignIn.waiting": "承認を待っています · コードの有効期限 {time}",+ "githubSignIn.connectedAs": "@{login} として接続中",+ "githubSignIn.source.mausbot": "ここでサインイン",+ "githubSignIn.source.cli": "あなたの GitHub CLI を使用",+ "githubSignIn.source.token": "貼り付けたトークンを使用",+ "githubSignIn.orgs": "Organization: {orgs}",+ "githubSignIn.manage": "GitHub で管理",+ "githubSignIn.cliReason": "これはあなた自身の GitHub CLI のサインインです。ターミナルで gh auth logout を実行してサインアウトしてください。",+ "githubSignIn.invalid": "GitHub のサインインが無効になりました。もう一度接続するまで、ボットはプッシュできません。",+ "githubSignIn.refused": "このコンピューターでは新しい GitHub サインインを開始できません。",+ "githubSignIn.pasteInstead": "代わりにトークンを貼り付ける",+ "githubSignIn.tokenLabel": "GitHub トークン",+ "githubSignIn.tokenCreate": "GitHub で Fine-grained トークンを作成",+ "githubSignIn.tokenRejected": "GitHub がこのトークンを受け付けませんでした。確認してもう一度貼り付けてください。",+ "githubSignIn.tokenUnchecked": "GitHub が今はトークンを確認できませんでした。1 分後にもう一度お試しください。",+ "githubSignIn.failed": "うまくいきませんでした。もう一度お試しください。",+ "githubSignIn.last.expired": "前回のコードは承認される前に期限切れになりました。",+ "githubSignIn.last.failed": "前回のサインインは完了しませんでした。",+ "githubSignIn.last.cancelled": "前回のサインインはキャンセルされました。",+ "server.github.card.push": "{bot} は {repo} にプッシュできませんでした: GitHub が接続されていません。",+ "server.github.card.clone": "{bot} は {repo} をクローンできませんでした: GitHub が接続されていません。",+ "server.github.card.fetch": "{bot} は {repo} からフェッチできませんでした: GitHub が接続されていません。",+ "server.github.card.description": "GitHub に接続すると、{bot} が作業をあなたのリポジトリにプッシュできます。",+ "server.github.card.connectInApps": "コンピューターのアプリのこのカード、またはアプリ画面から GitHub に接続してください。",+ "githubSignIn.title": "GitHub",+ "githubSignIn.tokenPlaceholder": "github_pat_…"}diff --git a/src/locales/ko.json b/src/locales/ko.jsonindex 2c3aaf7e8f..53991eaca6 100644--- a/src/locales/ko.json+++ b/src/locales/ko.json@@ -7792,5 +7792,42 @@"skillBurger.run.pathUndone": "경로를 제거했습니다","skillBurger.run.addPathFailed": "하지 못했습니다. 다시 시도하세요.","activity.tool.team.runWorkflow": "Skill Burger 실행",- "activity.tool.team.workflowEdit": "Skill Burger 변경"+ "activity.tool.team.workflowEdit": "Skill Burger 변경",+ "githubSignIn.pitch": "봇의 작업을 내 저장소로 푸시합니다.",+ "githubSignIn.download": "연결하면 먼저 GitHub 명령줄 도구(약 15MB)를 내려받습니다.",+ "githubSignIn.connectGithub": "GitHub 연결",+ "githubSignIn.connectAgain": "다시 연결",+ "githubSignIn.preparing": "GitHub 로그인을 준비하는 중…",+ "githubSignIn.typeCode": "GitHub에서 이 코드를 입력해 연결하세요.",+ "githubSignIn.codeAria": "일회용 코드: {code}",+ "githubSignIn.copyCode": "코드 복사",+ "githubSignIn.copied": "코드를 복사했습니다",+ "githubSignIn.copyAndOpen": "코드 복사 후 GitHub 열기",+ "githubSignIn.anyDevice": "또는 아무 기기에서나 {address}을(를) 여세요.",+ "githubSignIn.waiting": "승인을 기다리는 중 · 코드 만료 {time}",+ "githubSignIn.connectedAs": "@{login}(으)로 연결됨",+ "githubSignIn.source.mausbot": "여기에서 로그인함",+ "githubSignIn.source.cli": "내 GitHub CLI 사용 중",+ "githubSignIn.source.token": "붙여 넣은 토큰 사용 중",+ "githubSignIn.orgs": "조직: {orgs}",+ "githubSignIn.manage": "GitHub에서 관리",+ "githubSignIn.cliReason": "내 GitHub CLI의 로그인입니다. 터미널에서 gh auth logout으로 로그아웃하세요.",+ "githubSignIn.invalid": "GitHub 로그인이 더 이상 작동하지 않습니다. 다시 연결할 때까지 봇이 푸시할 수 없습니다.",+ "githubSignIn.refused": "이 컴퓨터에서는 새 GitHub 로그인을 시작할 수 없습니다.",+ "githubSignIn.pasteInstead": "대신 토큰 붙여 넣기",+ "githubSignIn.tokenLabel": "GitHub 토큰",+ "githubSignIn.tokenCreate": "GitHub에서 세분화된 토큰 만들기",+ "githubSignIn.tokenRejected": "GitHub에서 이 토큰을 받아들이지 않았습니다. 확인한 뒤 다시 붙여 넣으세요.",+ "githubSignIn.tokenUnchecked": "지금은 GitHub에서 토큰을 확인할 수 없습니다. 1분 뒤에 다시 시도하세요.",+ "githubSignIn.failed": "잘 되지 않았습니다. 다시 시도하세요.",+ "githubSignIn.last.expired": "지난 코드는 승인되기 전에 만료되었습니다.",+ "githubSignIn.last.failed": "지난 로그인이 완료되지 않았습니다.",+ "githubSignIn.last.cancelled": "지난 로그인이 취소되었습니다.",+ "server.github.card.push": "{bot}이(가) {repo}에 푸시하지 못했습니다: GitHub가 연결되지 않았습니다.",+ "server.github.card.clone": "{bot}이(가) {repo}을(를) 복제하지 못했습니다: GitHub가 연결되지 않았습니다.",+ "server.github.card.fetch": "{bot}이(가) {repo}에서 가져오지 못했습니다: GitHub가 연결되지 않았습니다.",+ "server.github.card.description": "GitHub를 연결하면 {bot}이(가) 작업을 내 저장소로 푸시할 수 있습니다.",+ "server.github.card.connectInApps": "컴퓨터의 앱에서 이 카드로, 또는 앱 화면에서 GitHub를 연결하세요.",+ "githubSignIn.title": "GitHub",+ "githubSignIn.tokenPlaceholder": "github_pat_…"}diff --git a/src/locales/pl.json b/src/locales/pl.jsonindex bf2d8f227f..6e30bff7c0 100644--- a/src/locales/pl.json+++ b/src/locales/pl.json@@ -7263,5 +7263,42 @@"skillBurger.run.pathUndone": "Usunięto ścieżkę","skillBurger.run.addPathFailed": "Nie udało się. Spróbuj ponownie.","activity.tool.team.runWorkflow": "Uruchom Skill Burger",- "activity.tool.team.workflowEdit": "Zmień Skill Burger"+ "activity.tool.team.workflowEdit": "Zmień Skill Burger",+ "githubSignIn.pitch": "Wysyłaj pracę botów do swoich repozytoriów.",+ "githubSignIn.download": "Połączenie najpierw pobiera narzędzie wiersza poleceń GitHuba (około 15 MB).",+ "githubSignIn.connectGithub": "Połącz z GitHubem",+ "githubSignIn.connectAgain": "Połącz ponownie",+ "githubSignIn.preparing": "Przygotowywanie logowania do GitHuba…",+ "githubSignIn.typeCode": "Wpisz ten kod na GitHubie, aby połączyć.",+ "githubSignIn.codeAria": "Kod jednorazowy: {code}",+ "githubSignIn.copyCode": "Kopiuj kod",+ "githubSignIn.copied": "Skopiowano kod",+ "githubSignIn.copyAndOpen": "Kopiuj kod i otwórz GitHuba",+ "githubSignIn.anyDevice": "Albo otwórz {address} na dowolnym urządzeniu.",+ "githubSignIn.waiting": "Czekanie na zatwierdzenie · kod wygasa o {time}",+ "githubSignIn.connectedAs": "Połączono jako @{login}",+ "githubSignIn.source.mausbot": "Zalogowano tutaj",+ "githubSignIn.source.cli": "Używa Twojego GitHub CLI",+ "githubSignIn.source.token": "Używa wklejonego tokena",+ "githubSignIn.orgs": "Organizacje: {orgs}",+ "githubSignIn.manage": "Zarządzaj na GitHubie",+ "githubSignIn.cliReason": "To logowanie Twojego własnego GitHub CLI. Wyloguj się w terminalu poleceniem gh auth logout.",+ "githubSignIn.invalid": "Logowanie do GitHuba przestało działać. Boty nie mogą wysyłać zmian, dopóki nie połączysz ponownie.",+ "githubSignIn.refused": "Na tym komputerze nie można rozpocząć nowego logowania do GitHuba.",+ "githubSignIn.pasteInstead": "Wklej token",+ "githubSignIn.tokenLabel": "Token GitHuba",+ "githubSignIn.tokenCreate": "Utwórz szczegółowy token na GitHubie",+ "githubSignIn.tokenRejected": "GitHub nie przyjął tego tokena. Sprawdź go i wklej ponownie.",+ "githubSignIn.tokenUnchecked": "GitHub nie mógł teraz sprawdzić tokena. Spróbuj ponownie za minutę.",+ "githubSignIn.failed": "Nie udało się. Spróbuj ponownie.",+ "githubSignIn.last.expired": "Ostatni kod wygasł przed zatwierdzeniem.",+ "githubSignIn.last.failed": "Ostatnie logowanie się nie zakończyło.",+ "githubSignIn.last.cancelled": "Ostatnie logowanie zostało anulowane.",+ "server.github.card.push": "{bot} nie może wysłać zmian do {repo}: GitHub nie jest połączony.",+ "server.github.card.clone": "{bot} nie może sklonować {repo}: GitHub nie jest połączony.",+ "server.github.card.fetch": "{bot} nie może pobrać zmian z {repo}: GitHub nie jest połączony.",+ "server.github.card.description": "Połącz z GitHubem, aby {bot} mógł wysyłać swoją pracę do Twoich repozytoriów.",+ "server.github.card.connectInApps": "Połącz z GitHubem przez tę kartę w aplikacji na komputerze albo w Aplikacjach.",+ "githubSignIn.title": "GitHub",+ "githubSignIn.tokenPlaceholder": "github_pat_…"}diff --git a/src/locales/pt-br.json b/src/locales/pt-br.jsonindex 3ca3a0bb8f..121c361ac5 100644--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@ -11735,5 +11735,42 @@"skillBurger.run.pathUndone": "Caminho removido","skillBurger.run.addPathFailed": "Não foi possível. Tente de novo.","activity.tool.team.runWorkflow": "Executar Skill Burger",- "activity.tool.team.workflowEdit": "Alterar Skill Burger"+ "activity.tool.team.workflowEdit": "Alterar Skill Burger",+ "githubSignIn.pitch": "Envie o trabalho dos bots para os seus repositórios.",+ "githubSignIn.download": "Ao conectar, a ferramenta de linha de comando do GitHub é baixada primeiro (cerca de 15 MB).",+ "githubSignIn.connectGithub": "Conectar GitHub",+ "githubSignIn.connectAgain": "Conectar novamente",+ "githubSignIn.preparing": "Preparando o login no GitHub…",+ "githubSignIn.typeCode": "Digite este código no GitHub para conectar.",+ "githubSignIn.codeAria": "Código de uso único: {code}",+ "githubSignIn.copyCode": "Copiar código",+ "githubSignIn.copied": "Código copiado",+ "githubSignIn.copyAndOpen": "Copiar código e abrir o GitHub",+ "githubSignIn.anyDevice": "Ou abra {address} em qualquer dispositivo.",+ "githubSignIn.waiting": "Aguardando aprovação · o código expira às {time}",+ "githubSignIn.connectedAs": "Conectado como @{login}",+ "githubSignIn.source.mausbot": "Login feito aqui",+ "githubSignIn.source.cli": "Usando o seu GitHub CLI",+ "githubSignIn.source.token": "Usando um token que você colou",+ "githubSignIn.orgs": "Organizações: {orgs}",+ "githubSignIn.manage": "Gerenciar no GitHub",+ "githubSignIn.cliReason": "Este é o login do seu próprio GitHub CLI. Para sair dele, rode gh auth logout no seu terminal.",+ "githubSignIn.invalid": "O login no GitHub parou de funcionar. Os bots não podem enviar alterações até você conectar novamente.",+ "githubSignIn.refused": "Não é possível iniciar um novo login no GitHub neste computador.",+ "githubSignIn.pasteInstead": "Colar um token",+ "githubSignIn.tokenLabel": "Token do GitHub",+ "githubSignIn.tokenCreate": "Criar um token de acesso refinado no GitHub",+ "githubSignIn.tokenRejected": "O GitHub não aceitou este token. Confira e cole novamente.",+ "githubSignIn.tokenUnchecked": "Não foi possível verificar o token no GitHub agora. Tente novamente em um minuto.",+ "githubSignIn.failed": "Não deu certo. Tente novamente.",+ "githubSignIn.last.expired": "O último código expirou antes de ser aprovado.",+ "githubSignIn.last.failed": "O último login não foi concluído.",+ "githubSignIn.last.cancelled": "O último login foi cancelado.",+ "server.github.card.push": "{bot} não conseguiu enviar para {repo}: o GitHub não está conectado.",+ "server.github.card.clone": "{bot} não conseguiu clonar {repo}: o GitHub não está conectado.",+ "server.github.card.fetch": "{bot} não conseguiu buscar de {repo}: o GitHub não está conectado.",+ "server.github.card.description": "Conecte o GitHub para que {bot} possa enviar o trabalho para os seus repositórios.",+ "server.github.card.connectInApps": "Conecte o GitHub por este cartão no app do seu computador, ou em Apps.",+ "githubSignIn.title": "GitHub",+ "githubSignIn.tokenPlaceholder": "github_pat_…"}diff --git a/src/locales/ru.json b/src/locales/ru.jsonindex 6d10c73305..d3b68c6554 100644--- a/src/locales/ru.json+++ b/src/locales/ru.json@@ -7317,5 +7317,42 @@"skillBurger.run.pathUndone": "Путь удалён","skillBurger.run.addPathFailed": "Не получилось. Попробуйте ещё раз.","activity.tool.team.runWorkflow": "Запустить Skill Burger",- "activity.tool.team.workflowEdit": "Изменить Skill Burger"+ "activity.tool.team.workflowEdit": "Изменить Skill Burger",+ "githubSignIn.pitch": "Отправляйте работу ботов в свои репозитории.",+ "githubSignIn.download": "При подключении сначала скачивается инструмент командной строки GitHub (около 15 МБ).",+ "githubSignIn.connectGithub": "Подключить GitHub",+ "githubSignIn.connectAgain": "Подключить снова",+ "githubSignIn.preparing": "Готовим вход в GitHub…",+ "githubSignIn.typeCode": "Введите этот код на GitHub, чтобы подключиться.",+ "githubSignIn.codeAria": "Одноразовый код: {code}",+ "githubSignIn.copyCode": "Скопировать код",+ "githubSignIn.copied": "Код скопирован",+ "githubSignIn.copyAndOpen": "Скопировать код и открыть GitHub",+ "githubSignIn.anyDevice": "Или откройте {address} на любом устройстве.",+ "githubSignIn.waiting": "Ждём подтверждения · код действует до {time}",+ "githubSignIn.connectedAs": "Подключено как @{login}",+ "githubSignIn.source.mausbot": "Вход выполнен здесь",+ "githubSignIn.source.cli": "Используется ваш GitHub CLI",+ "githubSignIn.source.token": "Используется вставленный вами токен",+ "githubSignIn.orgs": "Организации: {orgs}",+ "githubSignIn.manage": "Управлять на GitHub",+ "githubSignIn.cliReason": "Это вход вашего собственного GitHub CLI. Выйти из него можно в терминале командой gh auth logout.",+ "githubSignIn.invalid": "Вход в GitHub перестал работать. Боты не смогут отправлять изменения, пока вы не подключитесь снова.",+ "githubSignIn.refused": "На этом компьютере нельзя начать новый вход в GitHub.",+ "githubSignIn.pasteInstead": "Вставить токен",+ "githubSignIn.tokenLabel": "Токен GitHub",+ "githubSignIn.tokenCreate": "Создать детализированный токен на GitHub",+ "githubSignIn.tokenRejected": "GitHub не принял этот токен. Проверьте его и вставьте снова.",+ "githubSignIn.tokenUnchecked": "GitHub сейчас не смог проверить токен. Попробуйте через минуту.",+ "githubSignIn.failed": "Не получилось. Попробуйте снова.",+ "githubSignIn.last.expired": "Срок действия прошлого кода истёк до подтверждения.",+ "githubSignIn.last.failed": "Прошлый вход не завершился.",+ "githubSignIn.last.cancelled": "Прошлый вход был отменён.",+ "server.github.card.push": "{bot} не удалось отправить изменения в {repo}: GitHub не подключён.",+ "server.github.card.clone": "{bot} не удалось клонировать {repo}: GitHub не подключён.",+ "server.github.card.fetch": "{bot} не удалось получить изменения из {repo}: GitHub не подключён.",+ "server.github.card.description": "Подключите GitHub, чтобы {bot} мог отправлять работу в ваши репозитории.",+ "server.github.card.connectInApps": "Подключите GitHub через эту карточку в приложении на компьютере или в разделе «Приложения».",+ "githubSignIn.title": "GitHub",+ "githubSignIn.tokenPlaceholder": "github_pat_…"}diff --git a/src/locales/tr.json b/src/locales/tr.jsonindex aa7c872e91..f14d5c0e92 100644--- a/src/locales/tr.json+++ b/src/locales/tr.json@@ -6062,5 +6062,42 @@"skillBurger.run.pathUndone": "Yol kaldırıldı","skillBurger.run.addPathFailed": "Yapılamadı. Tekrar deneyin.","activity.tool.team.runWorkflow": "Skill Burger çalıştır",- "activity.tool.team.workflowEdit": "Skill Burger değiştir"+ "activity.tool.team.workflowEdit": "Skill Burger değiştir",+ "githubSignIn.pitch": "Botların işini depolarınıza gönderin.",+ "githubSignIn.download": "Bağlanırken önce GitHub'ın komut satırı aracı indirilir (yaklaşık 15 MB).",+ "githubSignIn.connectGithub": "GitHub'ı bağla",+ "githubSignIn.connectAgain": "Yeniden bağla",+ "githubSignIn.preparing": "GitHub oturumu hazırlanıyor…",+ "githubSignIn.typeCode": "Bağlanmak için bu kodu GitHub'a yazın.",+ "githubSignIn.codeAria": "Tek kullanımlık kod: {code}",+ "githubSignIn.copyCode": "Kodu kopyala",+ "githubSignIn.copied": "Kod kopyalandı",+ "githubSignIn.copyAndOpen": "Kodu kopyala ve GitHub'ı aç",+ "githubSignIn.anyDevice": "Ya da herhangi bir cihazda {address} adresini açın.",+ "githubSignIn.waiting": "Onay bekleniyor · kodun süresi {time} saatinde doluyor",+ "githubSignIn.connectedAs": "@{login} olarak bağlı",+ "githubSignIn.source.mausbot": "Burada oturum açıldı",+ "githubSignIn.source.cli": "Kendi GitHub CLI'ınız kullanılıyor",+ "githubSignIn.source.token": "Yapıştırdığınız token kullanılıyor",+ "githubSignIn.orgs": "Kuruluşlar: {orgs}",+ "githubSignIn.manage": "GitHub'da yönet",+ "githubSignIn.cliReason": "Bu, kendi GitHub CLI oturumunuz. Terminalinizde gh auth logout ile oturumu kapatın.",+ "githubSignIn.invalid": "GitHub oturumu artık çalışmıyor. Yeniden bağlanana kadar botlar gönderim yapamaz.",+ "githubSignIn.refused": "Bu bilgisayarda yeni bir GitHub oturumu başlatılamıyor.",+ "githubSignIn.pasteInstead": "Bunun yerine token yapıştır",+ "githubSignIn.tokenLabel": "GitHub token'ı",+ "githubSignIn.tokenCreate": "GitHub'da ayrıntılı izinli bir token oluştur",+ "githubSignIn.tokenRejected": "GitHub bu token'ı kabul etmedi. Kontrol edip yeniden yapıştırın.",+ "githubSignIn.tokenUnchecked": "GitHub şu anda token'ı doğrulayamadı. Bir dakika sonra yeniden deneyin.",+ "githubSignIn.failed": "Olmadı. Yeniden deneyin.",+ "githubSignIn.last.expired": "Son kodun süresi onaylanmadan doldu.",+ "githubSignIn.last.failed": "Son oturum açma tamamlanmadı.",+ "githubSignIn.last.cancelled": "Son oturum açma iptal edildi.",+ "server.github.card.push": "{bot}, {repo} deposuna gönderemedi: GitHub bağlı değil.",+ "server.github.card.clone": "{bot}, {repo} deposunu klonlayamadı: GitHub bağlı değil.",+ "server.github.card.fetch": "{bot}, {repo} deposundan çekemedi: GitHub bağlı değil.",+ "server.github.card.description": "{bot} işini depolarınıza gönderebilsin diye GitHub'ı bağlayın.",+ "server.github.card.connectInApps": "GitHub'ı bilgisayarınızdaki uygulamada bu karttan ya da Uygulamalar'dan bağlayın.",+ "githubSignIn.title": "GitHub",+ "githubSignIn.tokenPlaceholder": "github_pat_…"}diff --git a/src/locales/uk.json b/src/locales/uk.jsonindex 12a537a8f7..52e88bcc8d 100644--- a/src/locales/uk.json+++ b/src/locales/uk.json@@ -4244,5 +4244,42 @@"skillBurger.run.pathUndone": "Шлях вилучено","skillBurger.run.addPathFailed": "Не вдалося. Спробуйте ще раз.","activity.tool.team.runWorkflow": "Запустити Skill Burger",- "activity.tool.team.workflowEdit": "Змінити Skill Burger"+ "activity.tool.team.workflowEdit": "Змінити Skill Burger",+ "githubSignIn.pitch": "Надсилайте роботу ботів у свої репозиторії.",+ "githubSignIn.download": "Під час підключення спершу завантажується інструмент командного рядка GitHub (близько 15 МБ).",+ "githubSignIn.connectGithub": "Підключити GitHub",+ "githubSignIn.connectAgain": "Підключити знову",+ "githubSignIn.preparing": "Готуємо вхід у GitHub…",+ "githubSignIn.typeCode": "Введіть цей код на GitHub, щоб підключитися.",+ "githubSignIn.codeAria": "Одноразовий код: {code}",+ "githubSignIn.copyCode": "Скопіювати код",+ "githubSignIn.copied": "Код скопійовано",+ "githubSignIn.copyAndOpen": "Скопіювати код і відкрити GitHub",+ "githubSignIn.anyDevice": "Або відкрийте {address} на будь-якому пристрої.",+ "githubSignIn.waiting": "Чекаємо на підтвердження · код діє до {time}",+ "githubSignIn.connectedAs": "Підключено як @{login}",+ "githubSignIn.source.mausbot": "Вхід виконано тут",+ "githubSignIn.source.cli": "Використовується ваш GitHub CLI",+ "githubSignIn.source.token": "Використовується вставлений вами токен",+ "githubSignIn.orgs": "Організації: {orgs}",+ "githubSignIn.manage": "Керувати на GitHub",+ "githubSignIn.cliReason": "Це вхід вашого власного GitHub CLI. Вийти з нього можна в терміналі командою gh auth logout.",+ "githubSignIn.invalid": "Вхід у GitHub перестав працювати. Боти не зможуть надсилати зміни, доки ви не підключитеся знову.",+ "githubSignIn.refused": "На цьому комп'ютері не можна почати новий вхід у GitHub.",+ "githubSignIn.pasteInstead": "Вставити токен",+ "githubSignIn.tokenLabel": "Токен GitHub",+ "githubSignIn.tokenCreate": "Створити детальний токен на GitHub",+ "githubSignIn.tokenRejected": "GitHub не прийняв цей токен. Перевірте його й вставте знову.",+ "githubSignIn.tokenUnchecked": "GitHub зараз не зміг перевірити токен. Спробуйте за хвилину.",+ "githubSignIn.failed": "Не вдалося. Спробуйте знову.",+ "githubSignIn.last.expired": "Строк дії минулого коду сплив до підтвердження.",+ "githubSignIn.last.failed": "Минулий вхід не завершився.",+ "githubSignIn.last.cancelled": "Минулий вхід скасовано.",+ "server.github.card.push": "{bot} не вдалося надіслати зміни в {repo}: GitHub не підключено.",+ "server.github.card.clone": "{bot} не вдалося клонувати {repo}: GitHub не підключено.",+ "server.github.card.fetch": "{bot} не вдалося отримати зміни з {repo}: GitHub не підключено.",+ "server.github.card.description": "Підключіть GitHub, щоб {bot} міг надсилати роботу у ваші репозиторії.",+ "server.github.card.connectInApps": "Підключіть GitHub через цю картку в застосунку на комп'ютері або в розділі «Застосунки».",+ "githubSignIn.title": "GitHub",+ "githubSignIn.tokenPlaceholder": "github_pat_…"}diff --git a/src/locales/vi.json b/src/locales/vi.jsonindex 5c78decbc9..a009c97fa7 100644--- a/src/locales/vi.json+++ b/src/locales/vi.json@@ -6062,5 +6062,42 @@"skillBurger.run.pathUndone": "Đã xóa nhánh","skillBurger.run.addPathFailed": "Không làm được. Hãy thử lại.","activity.tool.team.runWorkflow": "Chạy Skill Burger",- "activity.tool.team.workflowEdit": "Đổi Skill Burger"+ "activity.tool.team.workflowEdit": "Đổi Skill Burger",+ "githubSignIn.pitch": "Đẩy công việc của bot lên kho mã của bạn.",+ "githubSignIn.download": "Khi kết nối, công cụ dòng lệnh của GitHub sẽ được tải xuống trước (khoảng 15 MB).",+ "githubSignIn.connectGithub": "Kết nối GitHub",+ "githubSignIn.connectAgain": "Kết nối lại",+ "githubSignIn.preparing": "Đang chuẩn bị đăng nhập GitHub…",+ "githubSignIn.typeCode": "Nhập mã này trên GitHub để kết nối.",+ "githubSignIn.codeAria": "Mã dùng một lần: {code}",+ "githubSignIn.copyCode": "Sao chép mã",+ "githubSignIn.copied": "Đã sao chép mã",+ "githubSignIn.copyAndOpen": "Sao chép mã và mở GitHub",+ "githubSignIn.anyDevice": "Hoặc mở {address} trên bất kỳ thiết bị nào.",+ "githubSignIn.waiting": "Đang chờ phê duyệt · mã hết hạn lúc {time}",+ "githubSignIn.connectedAs": "Đã kết nối với tên @{login}",+ "githubSignIn.source.mausbot": "Đã đăng nhập tại đây",+ "githubSignIn.source.cli": "Đang dùng GitHub CLI của bạn",+ "githubSignIn.source.token": "Đang dùng token bạn đã dán",+ "githubSignIn.orgs": "Tổ chức: {orgs}",+ "githubSignIn.manage": "Quản lý trên GitHub",+ "githubSignIn.cliReason": "Đây là phiên đăng nhập GitHub CLI của riêng bạn. Đăng xuất trong terminal bằng gh auth logout.",+ "githubSignIn.invalid": "Đăng nhập GitHub đã ngừng hoạt động. Bot không thể đẩy cho đến khi bạn kết nối lại.",+ "githubSignIn.refused": "Không thể bắt đầu đăng nhập GitHub mới trên máy tính này.",+ "githubSignIn.pasteInstead": "Dán token thay thế",+ "githubSignIn.tokenLabel": "Token GitHub",+ "githubSignIn.tokenCreate": "Tạo token chi tiết trên GitHub",+ "githubSignIn.tokenRejected": "GitHub không chấp nhận token này. Hãy kiểm tra và dán lại.",+ "githubSignIn.tokenUnchecked": "GitHub chưa kiểm tra được token lúc này. Hãy thử lại sau một phút.",+ "githubSignIn.failed": "Không thành công. Hãy thử lại.",+ "githubSignIn.last.expired": "Mã trước đã hết hạn trước khi được phê duyệt.",+ "githubSignIn.last.failed": "Lần đăng nhập trước chưa hoàn tất.",+ "githubSignIn.last.cancelled": "Lần đăng nhập trước đã bị hủy.",+ "server.github.card.push": "{bot} không thể đẩy lên {repo}: GitHub chưa được kết nối.",+ "server.github.card.clone": "{bot} không thể sao chép {repo}: GitHub chưa được kết nối.",+ "server.github.card.fetch": "{bot} không thể lấy dữ liệu từ {repo}: GitHub chưa được kết nối.",+ "server.github.card.description": "Kết nối GitHub để {bot} có thể đẩy công việc lên kho mã của bạn.",+ "server.github.card.connectInApps": "Kết nối GitHub từ thẻ này trong ứng dụng trên máy tính, hoặc trong Ứng dụng.",+ "githubSignIn.title": "GitHub",+ "githubSignIn.tokenPlaceholder": "github_pat_…"}diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.jsonindex 1680fd8088..e07391a9bc 100644--- a/src/locales/zh-tw.json+++ b/src/locales/zh-tw.json@@ -10378,5 +10378,42 @@"skillBurger.run.pathUndone": "已移除路徑","skillBurger.run.addPathFailed": "無法完成,請再試一次。","activity.tool.team.runWorkflow": "執行 Skill Burger",- "activity.tool.team.workflowEdit": "變更 Skill Burger"+ "activity.tool.team.workflowEdit": "變更 Skill Burger",+ "githubSignIn.pitch": "將機器人的工作推送到你的儲存庫。",+ "githubSignIn.download": "連線時會先下載 GitHub 的命令列工具(約 15 MB)。",+ "githubSignIn.connectGithub": "連線 GitHub",+ "githubSignIn.connectAgain": "重新連線",+ "githubSignIn.preparing": "正在準備 GitHub 登入…",+ "githubSignIn.typeCode": "在 GitHub 上輸入此代碼以完成連線。",+ "githubSignIn.codeAria": "一次性代碼:{code}",+ "githubSignIn.copyCode": "複製代碼",+ "githubSignIn.copied": "已複製代碼",+ "githubSignIn.copyAndOpen": "複製代碼並開啟 GitHub",+ "githubSignIn.anyDevice": "也可以在任何裝置上開啟 {address}。",+ "githubSignIn.waiting": "等待核准 · 代碼將於 {time} 到期",+ "githubSignIn.connectedAs": "已連線為 @{login}",+ "githubSignIn.source.mausbot": "在此處登入",+ "githubSignIn.source.cli": "使用你的 GitHub CLI",+ "githubSignIn.source.token": "使用你貼上的權杖",+ "githubSignIn.orgs": "組織:{orgs}",+ "githubSignIn.manage": "在 GitHub 上管理",+ "githubSignIn.cliReason": "這是你自己的 GitHub CLI 登入。請在終端機執行 gh auth logout 登出。",+ "githubSignIn.invalid": "GitHub 登入已失效。重新連線之前,機器人無法推送。",+ "githubSignIn.refused": "無法在這台電腦上開始新的 GitHub 登入。",+ "githubSignIn.pasteInstead": "改為貼上權杖",+ "githubSignIn.tokenLabel": "GitHub 權杖",+ "githubSignIn.tokenCreate": "在 GitHub 上建立細緻權限的權杖",+ "githubSignIn.tokenRejected": "GitHub 未接受此權杖。請檢查後重新貼上。",+ "githubSignIn.tokenUnchecked": "GitHub 暫時無法驗證此權杖。請一分鐘後再試。",+ "githubSignIn.failed": "沒有成功。請再試一次。",+ "githubSignIn.last.expired": "上一個代碼在核准前已到期。",+ "githubSignIn.last.failed": "上一次登入未完成。",+ "githubSignIn.last.cancelled": "上一次登入已取消。",+ "server.github.card.push": "{bot} 無法推送到 {repo}:GitHub 尚未連線。",+ "server.github.card.clone": "{bot} 無法複製 {repo}:GitHub 尚未連線。",+ "server.github.card.fetch": "{bot} 無法從 {repo} 擷取:GitHub 尚未連線。",+ "server.github.card.description": "連線 GitHub 後,{bot} 就能把工作推送到你的儲存庫。",+ "server.github.card.connectInApps": "請在電腦上的應用程式中透過此卡片連線 GitHub,或在「應用程式」中連線。",+ "githubSignIn.title": "GitHub",+ "githubSignIn.tokenPlaceholder": "github_pat_…"}diff --git a/src/locales/zh.json b/src/locales/zh.jsonindex c011481601..6216b03a87 100644--- a/src/locales/zh.json+++ b/src/locales/zh.json@@ -10291,5 +10291,42 @@"skillBurger.run.pathUndone": "已移除路径","skillBurger.run.addPathFailed": "无法完成,请重试。","activity.tool.team.runWorkflow": "运行 Skill Burger",- "activity.tool.team.workflowEdit": "更改 Skill Burger"+ "activity.tool.team.workflowEdit": "更改 Skill Burger",+ "githubSignIn.pitch": "将机器人的工作推送到你的仓库。",+ "githubSignIn.download": "连接时会先下载 GitHub 的命令行工具(约 15 MB)。",+ "githubSignIn.connectGithub": "连接 GitHub",+ "githubSignIn.connectAgain": "重新连接",+ "githubSignIn.preparing": "正在准备 GitHub 登录…",+ "githubSignIn.typeCode": "在 GitHub 上输入此代码以完成连接。",+ "githubSignIn.codeAria": "一次性代码:{code}",+ "githubSignIn.copyCode": "复制代码",+ "githubSignIn.copied": "已复制代码",+ "githubSignIn.copyAndOpen": "复制代码并打开 GitHub",+ "githubSignIn.anyDevice": "也可以在任意设备上打开 {address}。",+ "githubSignIn.waiting": "等待批准 · 代码将于 {time} 过期",+ "githubSignIn.connectedAs": "已连接为 @{login}",+ "githubSignIn.source.mausbot": "在此处登录",+ "githubSignIn.source.cli": "使用你的 GitHub CLI",+ "githubSignIn.source.token": "使用你粘贴的令牌",+ "githubSignIn.orgs": "组织:{orgs}",+ "githubSignIn.manage": "在 GitHub 上管理",+ "githubSignIn.cliReason": "这是你自己的 GitHub CLI 登录。请在终端中运行 gh auth logout 退出。",+ "githubSignIn.invalid": "GitHub 登录已失效。重新连接之前,机器人无法推送。",+ "githubSignIn.refused": "无法在这台电脑上开始新的 GitHub 登录。",+ "githubSignIn.pasteInstead": "改为粘贴令牌",+ "githubSignIn.tokenLabel": "GitHub 令牌",+ "githubSignIn.tokenCreate": "在 GitHub 上创建细粒度令牌",+ "githubSignIn.tokenRejected": "GitHub 未接受此令牌。请检查后重新粘贴。",+ "githubSignIn.tokenUnchecked": "GitHub 暂时无法验证该令牌。请一分钟后再试。",+ "githubSignIn.failed": "操作未成功。请重试。",+ "githubSignIn.last.expired": "上一个代码在批准前已过期。",+ "githubSignIn.last.failed": "上一次登录未完成。",+ "githubSignIn.last.cancelled": "上一次登录已取消。",+ "server.github.card.push": "{bot} 无法推送到 {repo}:GitHub 未连接。",+ "server.github.card.clone": "{bot} 无法克隆 {repo}:GitHub 未连接。",+ "server.github.card.fetch": "{bot} 无法从 {repo} 拉取:GitHub 未连接。",+ "server.github.card.description": "连接 GitHub 后,{bot} 就能把工作推送到你的仓库。",+ "server.github.card.connectInApps": "请在电脑上的应用中通过此卡片连接 GitHub,或在“应用”中连接。",+ "githubSignIn.title": "GitHub",+ "githubSignIn.tokenPlaceholder": "github_pat_…"}