Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

Add host-scoped git token paste for non-GitHub remotes (PRD-8703) (#4791)

miles-kt-inkeep4b7891407d27
diff --git a/.changeset/prd-8703-hide-github-sign-in-off-github.md b/.changeset/prd-8703-hide-github-sign-in-off-github.md
new file mode 100644
index 000000000..e841cd019
--- /dev/null
+++ b/.changeset/prd-8703-hide-github-sign-in-off-github.md
@@ -0,0 +1,6 @@
+---
+"@inkeep/open-knowledge-app": patch
+"@inkeep/open-knowledge-core": patch
+---
+
+A project whose git remote is not GitHub no longer offers GitHub sign-in in Settings, sync status, or after a sync auth failure. Each of those places links to the token form for that host instead.
diff --git a/.changeset/prd-8703-host-scoped-git-token-paste.md b/.changeset/prd-8703-host-scoped-git-token-paste.md
new file mode 100644
index 000000000..06c4b74fd
--- /dev/null
+++ b/.changeset/prd-8703-host-scoped-git-token-paste.md
@@ -0,0 +1,8 @@
+---
+"@inkeep/open-knowledge": minor
+"@inkeep/open-knowledge-app": minor
+"@inkeep/open-knowledge-core": minor
+"@inkeep/open-knowledge-server": minor
+---
+
+Store an access token for any git host with `ok auth token --host <host> --username <username>` or from Settings → Git. `ok auth status` reports it without contacting GitHub. While OpenKnowledge runs, sync uses a stored token ahead of credentials git saved elsewhere for that host.
diff --git a/docs/content/features/git/github.mdx b/docs/content/features/git/github.mdx
new file mode 100644
index 000000000..99fe04ca7
--- /dev/null
+++ b/docs/content/features/git/github.mdx
@@ -0,0 +1,58 @@
+---
+title: GitHub
+icon: custom/GitHub
+description: Clone and publish GitHub repositories.
+---
+You can clone GitHub repositories and publish local projects to a GitHub remote directly from OpenKnowledge. To sign in and choose which GitHub account a project uses, see [Authentication](/docs/features/git/sync#authentication).
+
+## Clone an existing GitHub repository
+
+These steps use the desktop app; from a terminal, [`ok clone`](/docs/reference/cli#clone-from-github) does the same.
+
+<Steps>
+
+<Step>
+ ### Open the clone dialog
+
+ From the Navigator window, click **Clone from GitHub**. You can open the Navigator window from the editor by clicking on your project name in the bottom left and then clicking **Switch project**.
+</Step>
+
+<Step>
+ ### Sign in to GitHub
+
+ If you are already signed in with the GitHub CLI, OpenKnowledge will use those credentials by default. If not, click **Connect GitHub** and complete the device authentication flow.
+</Step>
+
+<Step>
+ ### Choose a repository
+
+ Paste a repository URL or `owner/repo` shorthand. You can also filter and select from a list of repositories your account can access.
+</Step>
+
+<Step>
+ ### Open the project
+
+ When the clone completes, the cloned project opens in a new editor window and the Navigator closes. Re-summon the Navigator from inside the editor via the sidebar Switch Project pill, the File menu, or the Command Palette.
+</Step>
+</Steps>
+
+## Publish a local project to GitHub
+
+You can publish your local project to GitHub directly from the OpenKnowledge app by opening a folder or file and clicking the **Share** button in the top right of the editor.
+
+This will open a dialog where you can choose an owner and repository name. You can also choose to make the repository public or private.
+
+## GitHub Enterprise Server
+
+For these features to work against a GitHub Enterprise Server, add the host under **Settings → Git → GitHub Enterprise Server hosts**, or declare it in your user configuration, `~/.ok/global.yml` (`~/.ok-beta/global.yml` in OpenKnowledge Beta), then restart OpenKnowledge:
+
+```yaml
+git:
+ hosts:
+ github.example.com:
+ provider: github
+```
+
+The declaration applies to every project on your machine. It enables GitHub credential handling, push-permission checks, share links, and the default host for `ok auth`. Without a declaration, OpenKnowledge treats the host as ordinary git, preserves your system git credentials unless you store a token for an `https:` remote on that host (see [Git sync](/docs/features/git/sync)), and refuses sharing and project GitHub sign-in requests.
+
+[Share links](/docs/features/share) work with declared enterprise remotes. A recipient opening a GHES share is asked to confirm the server unless they are already signed in to it.
diff --git a/docs/content/features/git/meta.json b/docs/content/features/git/meta.json
new file mode 100644
index 000000000..0f31f5741
--- /dev/null
+++ b/docs/content/features/git/meta.json
@@ -0,0 +1,5 @@
+{
+ "title": "Git",
+ "icon": "LuGitBranch",
+ "pages": ["sync", "github"]
+}
diff --git a/docs/content/features/github-sync.mdx b/docs/content/features/git/sync.mdx
similarity index 64%
rename from docs/content/features/github-sync.mdx
rename to docs/content/features/git/sync.mdx
index 33c6b035c..491f07ac5 100644
--- a/docs/content/features/github-sync.mdx
+++ b/docs/content/features/git/sync.mdx
@@ -1,132 +1,103 @@
---
-title: GitHub sync
-icon: custom/GitHub
-description: Clone repos from GitHub, auto-sync changes with your team, and resolve conflicts.
+title: Git sync
+icon: LuRefreshCw
+description: Auto-sync changes with your team and resolve conflicts.
---
import { Cloud } from 'lucide-react';
-OpenKnowledge can connect a project to a GitHub remote repository and keep it synced over time. When GitHub sync is enabled, OpenKnowledge keeps your copy current with the remote.
-
-The sync mode controls what runs automatically:
-
-- **Manual** — nothing moves until you ask. Pull, push, or both from the sync menu whenever you choose.
-- **Auto (Pull only)** — updates flow in from the remote on a schedule; your edits stay on this computer and are never pushed.
-- **Auto (Pull and Push)** — your edits are committed and pushed automatically, and remote changes pull in.
-
-The mode only chooses the schedule. The manual **Pull**, **Push**, and **Pull and Push** buttons in the sync menu do the same thing in every mode: **Pull** brings in remote changes without ever committing your work, **Push** commits and sends your work, and **Pull and Push** does both in one pass. If your GitHub account can't push to the repository, **Push** and **Pull and Push** are hidden rather than offered and rejected — see [GitHub-side blockers](#github-side-blockers).
-
-<Callout type="warn">
- Only enable Auto (Pull and Push) for repositories where you are comfortable with OpenKnowledge writing commits to the remote history. If you are worried about automated commits cluttering your Git history, use Manual or Auto (Pull only) for that repository.
-</Callout>
-
-## What GitHub sync is for
-
-Use GitHub sync when you want to collaborate with your team on an OpenKnowledge project.
+OpenKnowledge can connect a project to a Git remote repository and keep it synced over time.
+Use Git sync when you want to collaborate with your team on an OpenKnowledge project.
It helps you:
- Keep your project in sync with updates from your team
- Resolve conflicts between your edits and your team's edits
-## Clone an existing GitHub repository
+## Enable Git sync
-These steps use the desktop app; from a terminal, [`ok clone`](/docs/reference/cli#clone-from-github) does the same.
+When you open a project for the first time, you will be prompted to enable sync. If you have push access to the repository, you will be prompted to enable **Auto (Pull and Push)**. If you have read-only access, you will be prompted to enable **Auto (Pull only)**. You can change the sync mode from the sync popover (the <Cloud role="img" aria-label="Sync" className="inline size-4 align-text-bottom" /> icon) or from **Settings → Sync** at any time.
-<Steps>
+If you want to set a default sync setting for future collaborators, go to the project settings page and navigate to the **Sync** → **Shared default** section. This writes [`autoSync.default`](/docs/reference/configuration) — one of `off` (Manual), `follow` (Auto, pull only), or `full` (Auto, pull and push) — to the project's committed `.ok/config.yml`, pre-answering the enable-sync prompt for everyone who clones the repo. Users can always override this default with their own local auto-sync choice.
-<Step>
- ### Open the clone dialog
+## Sync modes
- From the Navigator window, click **Clone from GitHub**. You can open the Navigator window from the editor by clicking on your project name in the bottom left and then clicking **Switch project**.
-</Step>
-
-<Step>
- ### Sign into GitHub
+<Callout type="warn">
+ Only enable Auto (Pull and Push) for repositories where you are comfortable with OpenKnowledge writing commits to the remote history. If you are worried about automated commits cluttering your Git history, use Manual or Auto (Pull only) for that repository.
+</Callout>
- If you are already signed in with the GitHub CLI, OpenKnowledge will use those credentials by default. If not, click **Connect GitHub** and complete the device authentication flow.
-</Step>
+### Manual
-<Step>
- ### Choose a repository
+Nothing runs on a schedule. The sync menu's **Pull**, **Push**, and **Pull and Push** buttons cover everything on demand, and the menu's status section shows what each would do before you click: which files a pull would bring in, which files a push would include, and which would be skipped.
- Paste a repository URL or `owner/repo` shorthand. You can also filter and select from a list of repositories your account can access.
-</Step>
+### Auto (Pull and Push)
-<Step>
- ### Open the project
+With push-and-pull sync active, OpenKnowledge:
- When the clone completes, the cloned project opens in a new editor window and the Navigator closes. Re-summon the Navigator from inside the editor via the sidebar Switch Project pill, the File menu, or the Command Palette.
-</Step>
-</Steps>
+- Fetches commits from the remote
+- Commits your edits locally using the configured Git identity
+- Pushes those commits back to the remote so collaborators see your changes
-## Publish a local project
+If your Git identity isn't set, OpenKnowledge commits under a default "**OpenKnowledge**" author; the sync status indicator reminds you to set one so teammates see your name.
-You can publish your local project to GitHub directly from the OpenKnowledge app by opening a folder or file and clicking the **Share** button in the top right of the editor.
+Auto sync pauses when an incoming update conflicts with your edits; open the conflicted file to [choose which version to keep](#resolving-a-conflict). It also pauses when an update would overwrite uncommitted changes to other tracked files, such as configs. The sync menu then lists them under **Changed here and on the remote**, and **Commit and sync** commits them and resumes. See [Conflicts and pending changes](#conflicts-and-pending-changes).
-This will open a dialog where you can choose an owner and repository name. You can also choose to make the repository public or private.
+### Auto (Pull only)
-## Enable GitHub sync
+With pull-only sync active, OpenKnowledge:
-### How often sync runs
+- Fetches commits from the remote
+- Never commits or pushes your edits on its own — if you have push access, the manual **Push** button is still there when you want to send something. Collaborators who can't push to the repository don't see it; see [Remote blockers](#remote-blockers).
-Both automatic modes run on a timer, and the two directions have their own cadence: OpenKnowledge checks for updates every **30 seconds** and pushes your edits every **60 seconds** by default. They differ on purpose. A pull is a read, so checking more often only means you see other people's work sooner. A push is a commit, so pushing more often leaves more of them in the history everyone reads.
+Your own edits stay on this computer. You can keep editing: when an update arrives, non-overlapping changes combine automatically, and an edit to the same lines the remote changed surfaces in the [conflict view](#resolving-a-conflict) where you choose which side to keep. Your branch always tracks the remote tip and never forks. The same applies to the manual **Pull** button in every mode — a pull never commits your in-progress work.
-Change either one in **Settings → Sync → Advanced** (the disclosure is collapsed by default), under **Check for updates every** and **Push my edits every**. The controls appear only while an automatic mode is active — in Manual nothing runs on a schedule, so there is no cadence to set. Both accept 30 seconds, 1 minute, 5 minutes, 15 minutes, or 1 hour, and both are per-machine — your choice stays on this computer and is not committed to the repository. **Push my edits every** appears only in Auto (Pull and Push), since no other mode pushes on a schedule.
+### How often sync runs
-After repeated failures, OpenKnowledge slows each direction down independently: 3 failures in a row hold the next attempt for at least 5 minutes, 5 failures for at least 15 minutes, and 8 failures for at least 1 hour. These are floors, not replacements: if your configured interval is already longer than the tier, the interval stands. The two directions back off on separate counters — push failures do not slow down pulls, and pull failures do not slow down pushes. A successful sync in a direction resets that direction's backoff; a manual trigger from the sync indicator (or clicking Pull/Push) resets both directions immediately. One cross-direction case: if pushes were backing off because the network was unreachable, the next successful update check releases that backoff straight away — it is direct proof the remote is reachable again. A backoff from a rejected push (a protected branch, say) is left alone, since reaching the remote says nothing about whether it will accept the write.
+With Auto mode enabled, OpenKnowledge checks for updates every **30 seconds** and pushes your edits every **60 seconds** by default. Change either one in **Settings → Sync → Advanced** (the disclosure is collapsed by default), under **Check for updates every** and **Push my edits every**. The controls appear only while an automatic mode is active, and **Push my edits every** appears only in Auto (Pull and Push), since no other mode pushes on a schedule. Both accept 30 seconds, 1 minute, 5 minutes, 15 minutes, or 1 hour. Your sync configuration is local only, so it will not be committed to the repository.
-When you open a freshly cloned project, you will be prompted to enable sync. If you have push access to the repository, you will be prompted to enable **Auto (Pull and Push)**. If you have read-only access, you will be prompted to enable **Auto (Pull only)**. You can change the sync mode from the sync popover (the <Cloud role="img" aria-label="Sync" className="inline size-4 align-text-bottom" /> icon) or from **Settings → Sync** at any time.
+After repeated failures, OpenKnowledge slows each direction down independently: 3 failures in a row hold the next attempt for at least 5 minutes, 5 failures for at least 15 minutes, and 8 failures for at least 1 hour. These are floors, not replacements: if your configured interval is already longer, the interval stands. Push failures do not slow down pulls, and pull failures do not slow down pushes. A successful sync in a direction resets that direction's backoff, and a manual trigger from the sync indicator (or clicking **Pull** or **Push**) resets both immediately. If pushes were backing off because the network was unreachable, the next successful update check releases that backoff straight away; a backoff from a rejected push, such as one to a protected branch, is left alone.
-If you want to set a default sync setting for future collaborators, go to the project settings page and navigate to the **Sync** → **Shared default** section. This writes [`autoSync.default`](/docs/reference/configuration) — one of `off` (Manual), `follow` (Auto, pull only), or `full` (Auto, pull and push) — to the project's committed `.ok/config.yml`, pre-answering the enable-sync prompt for everyone who clones the repo; each machine's own auto-sync choice overrides it.
+## Sync status and conflicts
-### Manual
+Click the <Cloud role="img" aria-label="Sync" className="inline size-4 align-text-bottom" /> icon in the top right to open the sync menu. The **Status** section shows how many commits you are ahead of or behind the remote, which files the next pull or push would include, and when sync last ran. Opening the menu only fetches; nothing in your copy changes until you press a button.
-Nothing runs on a schedule. The sync menu's **Pull**, **Push**, and **Pull and Push** buttons cover everything on demand, and the menu's status section shows what each would do before you click: which files a pull would bring in, which files a push would include, and which changed files sit outside OpenKnowledge's commit scope and would be skipped. If that list cannot be read the section says so, and if a refresh fails it keeps the last list and marks it as possibly out of date rather than showing you nothing. When sync is paused because your local edits overlap an incoming update, the same menu grows a **Changed here and on the remote** section listing the blocked files with a **Commit and sync** button — see [Conflicts and pending changes](#conflicts-and-pending-changes).
+If an incoming update conflicts with your edits, sync pauses and the menu lists the conflicted files. Open one to [choose which version to keep](#resolving-a-conflict); every other file stays editable in the meantime. Uncommitted changes that an update would overwrite appear under **Changed here and on the remote**, where **Commit and sync** commits them and resumes.
-### Auto (Pull and Push)
+## Resolving a conflict
-With push-and-pull sync active, OpenKnowledge:
+When a remote update conflicts with your local edits, OpenKnowledge surfaces the conflict in three places at once: the conflicted file gains a `⚠` badge on its tab, a pinned **Conflicts** section appears at the top of the file tree listing every conflicted file, and the editor area swaps from the normal editor to a unified diff view.
-- Fetches commits from the remote
-- Commits your edits locally using the configured Git identity
-- Pushes those commits back to the remote so collaborators see your changes
+Click the badged tab or any row in the Conflicts section to focus the conflict.
-If your Git identity isn't set, OpenKnowledge commits under a default "OpenKnowledge" author; the sync status indicator reminds you to set one so teammates see your name.
+You can't edit a page with conflicts until they're resolved; the same applies to agents writing over MCP.
-### Auto (Pull only)
+### Conflicts that don't come from Git
-With pull-only sync active, OpenKnowledge:
+A conflict doesn't need a remote. When a file changes on disk while OpenKnowledge has it open, OpenKnowledge merges the two versions itself, and raises a conflict if it can't merge them cleanly.
-- Fetches commits from the remote
-- Never commits or pushes your edits on its own — if you have push access, the manual **Push** button is still there when you want to send something. Collaborators who can't push to the repository don't see it; see [GitHub-side blockers](#github-side-blockers).
+Another app can also save an exact older copy over an edit OpenKnowledge already acknowledged. In the diff view, **Current** is the protected OpenKnowledge version and **Incoming** is the rejected external save. Choose which to keep. An intentional exact revert can trigger the same confirmation. Both versions stay recoverable after a restart, and keeping current protects against repeated saves from the stale editor. That protection expires after 30 minutes, so update or close the other app rather than relying on that protection.
-Your own edits stay on this computer. You can keep editing: when an update arrives, non-overlapping changes combine automatically, and an edit to the same lines the remote changed surfaces in the [conflict view](#resolving-a-conflict) where you choose which side to keep. Your branch always tracks the remote tip and never forks. The same applies to the manual **Pull** button in every mode — a pull never commits your in-progress work.
+## Work on multiple branches
-## Authentication
+In the desktop app you can open several branches of the same project at once, each in its own window. Click your project name in the bottom left and pick a branch or worktree from the project switcher (open worktrees also appear in the Command Palette); **New worktree** starts a fresh branch or checks out an existing one. The switcher discovers Git's complete local worktree list when you open a repository, including checkouts that have never been opened in OpenKnowledge. Each checkout shows its path and a location label: **primary** is the original clone, **internal** is beneath that clone's `.ok/worktrees/` directory, and **external** is anywhere else. A generic **worktree** label means the location could not be resolved yet, such as a recent checkout shown before its inventory loads or a checkout whose directory is unavailable. These labels describe location only.
-If you are logged in with the GitHub CLI, OpenKnowledge will use those credentials for GitHub operations. If not, you can complete device authentication to generate an OAuth token. OpenKnowledge stores this token in the keychain and reuses it for syncing, cloning, and publishing.
+Opening a branch that has no worktree yet creates one on demand under `.ok/worktrees/`, kept out of `git status`, so each window runs its own editor and server without touching your main working copy. Detached and Git-locked worktrees remain available. A row marked **project missing**, **path unreadable**, or **stale Git entry** is shown for diagnosis but cannot be opened until its filesystem or Git state is repaired.
-Manage the connection from **Settings → Account**. **Connect GitHub** authorizes OpenKnowledge to browse and sync your repositories; **Disconnect** clears OpenKnowledge's GitHub token only. From a terminal, the [`ok auth`](/docs/reference/cli) subcommands manage the same credentials: `ok auth signout` matches **Disconnect**, `ok auth pat` stores a Personal Access Token when device authentication isn't an option, and `--host` targets GitHub Enterprise.
+If the matching OpenKnowledge project cannot be opened safely, or its local setup fails, the checkout is still created under `.ok/worktrees/` and appears in the switcher. It is labelled **project missing** or **path unreadable** when its project folder or `.ok/config.yml` is absent or unreadable; otherwise it appears as an ordinary checkout.
-For GitHub Enterprise Server, add the host under **Settings → Account → GitHub Enterprise Server hosts**, or declare it in your user configuration, `~/.ok/global.yml` (`~/.ok-beta/global.yml` in OpenKnowledge Beta), then restart OpenKnowledge:
+## Authentication
-```yaml
-git:
- hosts:
- github.example.com:
- provider: github
-```
+OpenKnowledge fetches and pushes changes using plain Git operations, so syncing will work against any remote host. If `git push/pull` works in your terminal, then syncing will work in OpenKnowledge.
-The declaration applies to every project on your machine. It enables GitHub credential handling, push-permission checks, share links, and the default host for `ok auth`. Without a declaration, OpenKnowledge treats the host as ordinary git, preserves your system git credentials and refuses sharing and project GitHub sign-in requests. **Settings → Account** says the project's remote isn't a recognized GitHub host and points to the Enterprise hosts list instead of offering sign-in.
+<Tabs groupId="ok-git-host" persist items={['GitHub', 'Other Git hosts']}>
-[Share links](/docs/features/share) work with declared enterprise remotes. A recipient opening a GHES share is asked to confirm the server unless they are already signed in to it.
+<Tab>
-### Which GitHub account is used
+If you are logged in with the GitHub CLI, OpenKnowledge will use those credentials for GitHub operations. If not, you can complete device authentication to generate an OAuth token. OpenKnowledge stores this token in the keychain and reuses it for syncing, cloning, and publishing.
-If you are signed into multiple accounts with the GitHub CLI, OpenKnowledge will use the account that is active by default. If you want to set a specific account for a project, you can do so by adding a username to the remote URL or a `credential.<url>.username` entry to your [Git configuration](https://github.com/git-ecosystem/git-credential-manager/blob/main/docs/multiple-users.md).
+Manage the connection from **Settings → Git**. **Connect GitHub** authorizes OpenKnowledge to browse and sync your repositories; **Disconnect** clears OpenKnowledge's GitHub token only. From a terminal, the [`ok auth`](/docs/reference/cli) subcommands manage the same credentials: `ok auth signout` matches **Disconnect**, `ok auth pat` stores a Personal Access Token when device authentication isn't an option, and `--host` targets GitHub Enterprise.
-OpenKnowledge will choose the GitHub credential to use for a project in the following order of priority:
+If you are signed into multiple accounts with the GitHub CLI, OpenKnowledge will choose the credential to use for a project in the following order of priority:
| Priority | Declaration | Where it lives | How to set it |
| --- | --- | --- | --- |
@@ -136,39 +107,29 @@ OpenKnowledge will choose the GitHub credential to use for a project in the foll
The username entries above apply to HTTPS remotes only. SSH projects follow the GitHub CLI's active account (switch it with `gh auth switch`), and that account decides only which identity the push-permission check runs as — the push itself authenticates with your SSH key, chosen by your SSH configuration. To pin an SSH project to a declared account, switch it to an HTTPS remote.
-## Sync status and conflicts
-
-The sync status indicator in the editor opens the sync menu: the mode selector, the manual **Pull** / **Push** / **Pull and Push** buttons, and a live status section showing how far ahead or behind the remote you are, which files a pull would bring in, which files a push would include (and which it would skip), unresolved conflicts, and when a sync last ran. Opening the menu refreshes the remote counts with a read-only fetch — nothing in your copy moves until you press a button. That status section also says when it cannot see your files: a working tree it cannot read at all renders **Couldn't read the working tree**, and a refresh that fails after a good read keeps the last list you saw and marks it as possibly out of date, counting up from when that read happened. Neither changes the sync status indicator's color, because the problem is with reading the list rather than with sync. From a terminal, `ok sync` commits, pulls, and pushes in one pass; `ok pull` and `ok push` cover one direction each. All three work whether or not the editor is open (see the [CLI reference](/docs/reference/cli)).
+</Tab>
-## Resolving a conflict
+<Tab>
-When a remote update conflicts with your local edits, OpenKnowledge surfaces the conflict in three places at once: the conflicted file gains a `⚠` badge on its tab, a pinned **Conflicts** section appears at the top of the file tree listing every conflicted file, and the editor area swaps from the normal editor to a unified diff view.
-
-Click the badged tab or any row in the Conflicts section to focus the conflict.
+By default sync runs with whatever credentials `git` has access to. If your remote starts with `https:` you can give OpenKnowledge a username and token to override the `git` default:
-You can't edit a page with conflicts until they're resolved; the same applies to agents writing over MCP.
-
-### Conflicts that don't come from GitHub
-
-A conflict doesn't need a remote. When a file changes on disk while OpenKnowledge has it open, OpenKnowledge merges the two versions itself, and raises a conflict if it can't merge them cleanly.
-
-Another app can also save an exact older copy over an edit OpenKnowledge already acknowledged. In the diff view, **Current** is the protected OpenKnowledge version and **Incoming** is the rejected external save. Choose which to keep. An intentional exact revert can trigger the same confirmation. Both versions stay recoverable after a restart, and keeping current protects against repeated saves from the stale editor. That protection expires after 30 minutes, so update or close the other app rather than relying on that protection.
-
-## Work on multiple branches
+```bash
+ok auth token --host <hostname> --username <username>
+```
-In the desktop app you can open several branches of the same project at once, each in its own window. Click your project name in the bottom left and pick a branch or worktree from the project switcher (open worktrees also appear in the Command Palette); **New worktree** starts a fresh branch or checks out an existing one. The switcher discovers Git's complete local worktree list when you open a repository, including checkouts that have never been opened in OpenKnowledge. Each checkout shows its path and a location label: **primary** is the original clone, **internal** is beneath that clone's `.ok/worktrees/` directory, and **external** is anywhere else. A generic **worktree** label means the location could not be resolved yet, such as a recent checkout shown before its inventory loads or a checkout whose directory is unavailable. These labels describe location only.
+This command asks for the token and stores it in your operating system's credential store. The host is matched without regard to case, and `:443` is the same as no port. Once set, OpenKnowledge's sync uses this username and token, ahead of any credential git has saved for that host, in every project whose `https:` remote is on that host. That holds while OpenKnowledge is running (the desktop app or `ok start`); `ok sync`, `ok pull` and `ok push` with no server running keep using git's own credentials. The same configuration is available from **Settings → Git → Other Git hosts**. To remove a token, run `ok auth signout --host <hostname>`.
-Opening a branch that has no worktree yet creates one on demand under `.ok/worktrees/`, kept out of `git status`, so each window runs its own editor and server without touching your main working copy. Detached and Git-locked worktrees remain available. A row marked **project missing**, **path unreadable**, or **stale Git entry** is shown for diagnosis but cannot be opened until its filesystem or Git state is repaired.
+</Tab>
-If the matching OpenKnowledge project cannot be opened safely, or its local setup fails, the checkout is still created under `.ok/worktrees/` and appears in the switcher. It is labelled **project missing** or **path unreadable** when its project folder or `.ok/config.yml` is absent or unreadable; otherwise it appears as an ordinary checkout.
+</Tabs>
## Common failure modes
-A few situations stop sync from completing successfully. Most of them change the sync status indicator's color and tell you what's wrong. Two of the local ones below — another program holding the Git index lock, and a project with no commits yet — change the indicator's color in Manual only; in the automatic modes they are reported in the sync menu and the indicator stays as it is. Except where noted, sync stays paused until the underlying issue is fixed, then picks back up on its own.
+A few situations stop sync from completing successfully. Most of them change the sync status indicator's color and tell you what's wrong. Two of the local ones below — another program holding the Git index lock, and a project with no commits yet — change the indicator's color in Manual mode only; in the automatic modes they are reported in the sync menu and the indicator stays as it is. Except where noted, sync stays paused until the underlying issue is fixed, then picks back up on its own.
### Conflicts and pending changes
-- **Unresolved conflicts.** If even one file has a conflict between your edits and your team's, sync waits. You can keep working on every other doc; only the conflicted files are frozen until you choose a side from the diff view. See [Resolving a conflict](#resolving-a-conflict) above.
+- **Unresolved conflicts.** If any file has a conflict between your edits and your team's, sync pauses. You can keep working on every other doc; only the conflicted files are frozen until you choose resolution from the diff view. See [Resolving a conflict](#resolving-a-conflict) above.
- **Local changes would be overwritten by an incoming update.** A teammate's update is ready to pull, but a file it touches has uncommitted local changes. Doc edits are committed automatically before merging, so this usually means other tracked files, like configs. Sync pauses rather than clobbering your work. The sync menu lists every blocked file under **Changed here and on the remote**, and **Commit and sync** commits exactly those files and resumes — nothing else in your working tree is touched. If you would rather stash the changes or throw them away, **Resolve in terminal** (desktop app only) opens a terminal on the project so you can run that yourself. OpenKnowledge never discards uncommitted work for you.
- **A Git operation or unresolved conflicts need attention.** Automatic Git commits pause when the repository has an unfinished merge, rebase, cherry-pick, or unresolved conflicts. The sync indicator and **Settings → Sync** explain the pause. Edits continue to save locally. Finish the operation or resolve the conflicts in your terminal, then retry sync. With automatic sync enabled, it retries on its usual schedule and clears the notice once Git is ready.
- **Edits made outside the app aren't ready yet.** If you (or another tool) edited a file directly on disk while sync wanted to merge, OpenKnowledge waits until those external edits settle before merging. Usually this clears in a second or two on its own.
@@ -207,13 +168,13 @@ If a teammate's update adds, retargets, or removes symlinks in a way that leaves
- **The repository has no commits yet.** The project has a remote, but its branch does not exist yet, so there is nothing to send: **Push** stops before it starts and the sync menu says so. Editing a document does not clear this on its own — auto-save writes to OpenKnowledge's own internal ref, never to your branch. Closing and reopening the project (or restarting the app) makes that first commit for you; running `git commit` yourself does the same. Push works from then on.
-### GitHub-side blockers
+### Remote blockers
-- **Authentication errors.** Your stored credentials expired, were revoked, or don't have access to this repository anymore. Reconnect from the sync indicator (or from **Settings → Account**) to clear the error.
-- **You don't have permission to push to this repo.** Someone shared a project backed by a GitHub repo where your account isn't a collaborator (or has read-only access on a private repo). OpenKnowledge checks this up front and offers **Auto (Pull only)** instead. In that mode the manual **Push** and **Pull and Push** buttons are hidden, since GitHub would reject them.
+- **Authentication errors.** Your stored credentials expired, were revoked, or don't have access to this repository anymore. Reconnect from the sync indicator (or from **Settings → Git**) to clear the error.
+- **You don't have permission to push to this repo.** Someone shared a project backed by a repo where your account isn't a collaborator (or has read-only access on a private repo). For a GitHub repository, OpenKnowledge checks this up front and offers **Auto (Pull only)** instead. In that mode the manual **Push** and **Pull and Push** buttons are hidden, since GitHub would reject them. Other hosts aren't checked in advance, so a push without permission fails when it reaches the host.
- **Protected branches and rejected pushes.** If the target branch requires reviews, signed commits, or status checks, GitHub rejects the push. OpenKnowledge turns sync off automatically so it stops retrying, and it stays off until you turn it back on from the sync indicator or **Settings → Sync**. Switch to a branch you can push to, or use a pull request for the protected branch instead.
### Temporary problems
-- **Network or service hiccups.** Flaky Wi-Fi, a VPN drop, or a brief GitHub outage. OpenKnowledge retries automatically, slowing down progressively as described in [How often sync runs](#how-often-sync-runs). No action needed; a manual trigger from the sync indicator resets the backoff immediately if you want sync to run sooner.
+- **Network or service hiccups.** Flaky Wi-Fi, a VPN drop, or a brief host outage. OpenKnowledge retries automatically, slowing down progressively as described in [How often sync runs](#how-often-sync-runs). No action needed; a manual trigger from the sync indicator resets the backoff immediately if you want sync to run sooner.
- **Another program is holding the Git index lock.** Git lets one process at a time write `.git/index`, and it enforces that by creating `.git/index.lock` first. Another tool on your machine — a terminal command, an editor extension, a background indexer — was holding that lock file when sync reached for it. The sync menu names `.git/index.lock` so you know it isn't your work that's wrong. In the automatic modes, sync keeps trying and picks up on its own once the other program lets go. In Manual mode nothing runs unattended, so press Sync again after the other program finishes. If the message persists, look for a git command still open in a terminal.
diff --git a/docs/content/features/meta.json b/docs/content/features/meta.json
index e89fd6ae5..518eb413c 100644
--- a/docs/content/features/meta.json
+++ b/docs/content/features/meta.json
@@ -7,7 +7,7 @@
"assets-and-embeds",
"ignore-patterns",
"timeline-and-recovery",
- "github-sync",
+ "git",
"share",
"agent-activity",
"skills"
diff --git a/docs/content/features/share.mdx b/docs/content/features/share.mdx
index e05ff8585..e3a328299 100644
--- a/docs/content/features/share.mdx
+++ b/docs/content/features/share.mdx
@@ -27,7 +27,7 @@ If the push fails after the repo was created (auth lost mid-flow, network blip),
A share link points at GitHub, but your local edits only reach GitHub through **Auto (Pull and Push)** or a manual push — in Manual and Auto (Pull only), nothing is pushed on a schedule. When you click Share, OpenKnowledge checks the shared doc or folder against its last-known state on GitHub and, if the link won't yet show what you're looking at, adds a non-blocking warning row to the popover:
-- **Not on GitHub yet.** The target has never been pushed, so the link won't resolve until it is. When the project isn't on Auto (Pull and Push), the row offers **Enable Auto (Pull and Push)** and **How to push manually**; when it is, it offers **Sync now** and clears itself once the push lands. While sync is paused on an unfinished Git operation or on [unsafe symlinks](/docs/features/github-sync#incoming-changes-with-unsafe-symlinks), a notice explaining the pause takes the place of **Sync now**.
+- **Not on GitHub yet.** The target has never been pushed, so the link won't resolve until it is. When the project isn't on Auto (Pull and Push), the row offers **Enable Auto (Pull and Push)** and **How to push manually**; when it is, it offers **Sync now** and clears itself once the push lands. While sync is paused on an unfinished Git operation or on [unsafe symlinks](/docs/features/git/sync#incoming-changes-with-unsafe-symlinks), a notice explaining the pause takes the place of **Sync now**.
- **Unpushed changes.** The target is on GitHub but has local edits that aren't, so recipients see the last pushed version. On Auto (Pull and Push) this stays silent — the next scheduled push closes the gap.
- **Empty folder.** The folder holds nothing Git can track — it has no documents, or everything inside it is ignored — so the link won't resolve, and unlike the never-pushed case no push will fix it. The row names the only remedy, adding a document, and offers no sync actions at all. Only folders reach this state: a doc is trackable at any size, including zero bytes.
@@ -59,18 +59,18 @@ If you have the repo open locally but on a different branch, the app opens a bra
- **Moved.** If GitHub shows the target was renamed, the dialog offers to open it at its new path.
- **Removed, or never pushed.** A deleted target is messaged as removed from the branch; a path that never existed on the branch is messaged as "may not have been pushed yet." The two are distinct, and neither drops you into an empty create-mode editor.
-If uncommitted changes conflict with the switch, switching is disabled until you commit or stash them; if the share's branch is already checked out in another worktree, the dialog offers to open that worktree instead. If the branch has a symlink that would be unsafe to check out, the switch is refused and the refused links are listed; see [Incoming changes with unsafe symlinks](/docs/features/github-sync#incoming-changes-with-unsafe-symlinks) for what to do.
+If uncommitted changes conflict with the switch, switching is disabled until you commit or stash them; if the share's branch is already checked out in another worktree, the dialog offers to open that worktree instead. If the branch has a symlink that would be unsafe to check out, the switch is refused and the refused links are listed; see [Incoming changes with unsafe symlinks](/docs/features/git/sync#incoming-changes-with-unsafe-symlinks) for what to do.
If OpenKnowledge can't reach GitHub to make this call, the dialog falls back to the plain switch.
### When the shared target is not on your local copy
Even on the right branch, a shared target (file or folder) can be renamed or deleted after a link is minted. In this case, OpenKnowledge offers to open the renamed target at its new path, a plain "removed from this branch" message with a link back to the parent folder, or "not pushed yet" when the path never existed.
-If the target was moved, renamed, or deleted in your own local copy, OpenKnowledge tells you to commit your changes manually or enable Auto (Pull and Push). On Auto (Pull and Push) it says the change hasn't synced yet and offers **Sync now**; while sync is paused on an unfinished Git operation or on [unsafe symlinks](/docs/features/github-sync#incoming-changes-with-unsafe-symlinks), a notice explaining the pause takes its place.
-If the target is on GitHub but hasn't reached your local copy yet, OpenKnowledge alerts you that your local copy is behind. The **Pull latest changes** button on this message fetches from GitHub and fast-forwards your copy in place. It only ever pulls: nothing is committed or pushed on your behalf, and your uncommitted edits ride on top of what comes in. If the pull can't run — another sync operation is already in flight, or GitHub is unreachable — the reason appears under the message and the button stays available to retry. If the incoming changes have an unsafe symlink, the pull is refused and sync pauses until the link is fixed; see [Incoming changes with unsafe symlinks](/docs/features/github-sync#incoming-changes-with-unsafe-symlinks).
+If the target was moved, renamed, or deleted in your own local copy, OpenKnowledge tells you to commit your changes manually or enable Auto (Pull and Push). On Auto (Pull and Push) it says the change hasn't synced yet and offers **Sync now**; while sync is paused on an unfinished Git operation or on [unsafe symlinks](/docs/features/git/sync#incoming-changes-with-unsafe-symlinks), a notice explaining the pause takes its place.
+If the target is on GitHub but hasn't reached your local copy yet, OpenKnowledge alerts you that your local copy is behind. The **Pull latest changes** button on this message fetches from GitHub and fast-forwards your copy in place. It only ever pulls: nothing is committed or pushed on your behalf, and your uncommitted edits ride on top of what comes in. If the pull can't run — another sync operation is already in flight, or GitHub is unreachable — the reason appears under the message and the button stays available to retry. If the incoming changes have an unsafe symlink, the pull is refused and sync pauses until the link is fixed; see [Incoming changes with unsafe symlinks](/docs/features/git/sync#incoming-changes-with-unsafe-symlinks).
### Receiving without push permission
-If the shared repo is one your GitHub account can't push to (you're not a collaborator on a public repo, or you have read-only access on a private one), OpenKnowledge offers **[Auto (Pull only)](/docs/features/github-sync#auto-pull-only)** at first open instead of the full "Enable Auto (Pull and Push)?" prompt: your copy keeps up to date by pulling the latest from GitHub automatically, while your own edits stay on your computer. You can keep editing — an incoming update combines with your non-overlapping changes automatically, and an edit to the same lines surfaces as a conflict to resolve.
+If the shared repo is one your GitHub account can't push to (you're not a collaborator on a public repo, or you have read-only access on a private one), OpenKnowledge offers **[Auto (Pull only)](/docs/features/git/sync#auto-pull-only)** at first open instead of the full "Enable Auto (Pull and Push)?" prompt: your copy keeps up to date by pulling the latest from GitHub automatically, while your own edits stay on your computer. You can keep editing — an incoming update combines with your non-overlapping changes automatically, and an edit to the same lines surfaces as a conflict to resolve.
-See [GitHub sync](/docs/features/github-sync) for how to automatically sync changes to GitHub, and [Timeline and recovery](/docs/features/timeline-and-recovery) for per-doc history once the doc is open.
+See [Git sync](/docs/features/git/sync) for how to automatically sync changes to GitHub, and [Timeline and recovery](/docs/features/timeline-and-recovery) for per-doc history once the doc is open.
diff --git a/docs/content/get-started/overview.mdx b/docs/content/get-started/overview.mdx
index 381a9d028..247ca009a 100644
--- a/docs/content/get-started/overview.mdx
+++ b/docs/content/get-started/overview.mdx
@@ -21,7 +21,7 @@ OpenKnowledge is three layers working together: a WYSIWYG editor for you, MCP an
- **[Skills Studio](../features/skills/index.mdx)**: write reusable instructions for your AI tools, or find a skill in the catalog.
- **[Ask AI](../features/editor.mdx#ask-ai)** experience: chat with your agent **in app** without leaving OpenKnowledge, or hand the work to an external agent app or the built-in **[TUI](../features/editor.mdx#terminal)** in the desktop app.
- Annotate your knowledge base with **[comments](../features/comments.mdx)**, then resolve them with AI.
-- **[Auto-sync](../features/github-sync.mdx)** knowledge base changes with your team using Git.
+- **[Auto-sync](../features/git/sync.mdx)** knowledge base changes with your team using Git.
- Explore your knowledge base through **[graph and wiki-link visualizations](../reference/core-concepts.md#links-and-backlinks)**.
- [Connect to OpenKnowledge](../remote-control/connecting-agents.mdx) remotely from local agents, remote agents, or other devices.
diff --git a/docs/content/get-started/quickstart.mdx b/docs/content/get-started/quickstart.mdx
index ac55340c6..438e0c2a7 100644
--- a/docs/content/get-started/quickstart.mdx
+++ b/docs/content/get-started/quickstart.mdx
@@ -203,6 +203,6 @@ Right-click anywhere in the sidebar (empty space, a folder, or a file) to create
## What's next
-- Syncing your knowledge base to GitHub: [Syncing](/docs/features/github-sync)
+- Syncing your knowledge base to GitHub: [Syncing](/docs/features/git/sync)
- Learn more about the editor: [Editor](/docs/features/editor)
- Configure OpenKnowledge: [Configuration](/docs/reference/configuration)
diff --git a/docs/content/migrate/notion.mdx b/docs/content/migrate/notion.mdx
index a5145f1a1..74e9bea19 100644
--- a/docs/content/migrate/notion.mdx
+++ b/docs/content/migrate/notion.mdx
@@ -108,7 +108,7 @@ A number of Notion features don't survive the Markdown & CSV export, or land as
## See also
-- [GitHub sync](/docs/features/github-sync): keep your project synced with your team through GitHub
+- [Git sync](/docs/features/git/sync): keep your project synced with your team through Git
- [Quickstart](/docs/get-started/quickstart): the five-minute setup
- [Core concepts](/docs/reference/core-concepts): links, backlinks, and the file-system-as-database model
- [Assets and embeds](/docs/features/assets-and-embeds): how images and file references behave
diff --git a/docs/content/migrate/obsidian.mdx b/docs/content/migrate/obsidian.mdx
index 564d56d7c..9b761baa1 100644
--- a/docs/content/migrate/obsidian.mdx
+++ b/docs/content/migrate/obsidian.mdx
@@ -75,4 +75,4 @@ Getting an AI agent to work *well* inside an Obsidian vault usually means adding
- [Timeline and recovery](/docs/features/timeline-and-recovery): version history and point-in-time rollback
- [Ignore patterns](/docs/features/ignore-patterns): keep folders out of the editor, search, and agents
- [Assets and embeds](/docs/features/assets-and-embeds): how images and file references behave
-- [GitHub sync](/docs/features/github-sync): keep your project synced with your team through GitHub
+- [Git sync](/docs/features/git/sync): keep your project synced with your team through Git
diff --git a/docs/content/reference/cli.mdx b/docs/content/reference/cli.mdx
index 520c9286e..447a6e3f0 100644
--- a/docs/content/reference/cli.mdx
+++ b/docs/content/reference/cli.mdx
@@ -98,11 +98,11 @@ ok auth login
If you're already logged in with the `gh` CLI, you can skip this step.
-`ok auth` also provides `status` (show who's logged in), `repos` (list repositories you can access), `signout` (remove stored credentials), and `pat` (store a Personal Access Token). Every subcommand takes `--host <hostname>`. GitHub Enterprise hosts must be declared as `git.hosts.<host>.provider: github` in `~/.ok/global.yml` (`~/.ok-beta/global.yml` for `ok-beta`) before commands contact them. See [configuration](/docs/reference/configuration).
+`ok auth` also provides `status` (show who's logged in), `repos` (list repositories you can access), `signout` (remove stored credentials), `pat` (store a GitHub Personal Access Token), and `token` (store an access token for any other git host). Every subcommand takes `--host <hostname>`. For a host that is not GitHub, `status` reports the stored token without verifying it: it exits `0` when a token is stored and `1` when none is, and its `--json` output carries `"unverified": true` with the stored username. GitHub Enterprise hosts must be declared as `git.hosts.<host>.provider: github` in `~/.ok/global.yml` (`~/.ok-beta/global.yml` for `ok-beta`) before commands contact them. See [configuration](/docs/reference/configuration).
-Without `--host`, commands select the recognized GitHub origin, or `github.com` when no origin exists. An unrecognized origin requires explicit host selection, so commands cannot contact or clear credentials for a different host by accident. `status` and `repos` contact GitHub APIs. `signout --host <hostname>` only removes local credentials and works even after that host's declaration has been removed.
+Without `--host`, commands select the recognized GitHub origin, or `github.com` when no origin exists. An unrecognized origin requires explicit host selection for `login`, `pat`, `repos` and `signout`, so they cannot contact or clear credentials for a different host by accident. `status` on a non-GitHub host reports the stored token without contacting any API; on a GitHub host, `status` and `repos` contact GitHub APIs. `signout --host <hostname>` only removes local credentials and works for any host, including one whose declaration has been removed.
-## Sync with GitHub
+## Sync with a Git remote
Sync a project with its remote from the terminal:
@@ -112,9 +112,11 @@ Sync a project with its remote from the terminal:
| `ok pull` | Pull changes from the remote |
| `ok push` | Push commits to the remote |
-Each command goes through the running server when one is up. Otherwise it runs git directly. When the remote's URL is `https://` and names `github.com` or a declared GitHub Enterprise host exactly, in lowercase and with no port, and OpenKnowledge has a GitHub sign-in for it ([which account is used](/docs/features/github-sync#which-github-account-is-used)), that sign-in replaces your git credential helpers for HTTPS requests to that host during the command, though a `~/.netrc` entry for the host is still used before any helper. The sign-in answers only that exact spelling of the host: for a submodule or extra push URL that writes it with an explicit `:443` or in different letter case, git asks a configured askpass program (`GIT_ASKPASS`, `core.askPass` or `SSH_ASKPASS`; VS Code's integrated terminal sets one), and the request fails when none is configured. Requests to another host, a non-default port or a plain `http://` URL use your own git credentials. Pass `--json` for JSONL progress events when scripting. See [GitHub sync](/docs/features/github-sync) for how syncing works.
+Each command goes through the running OpenKnowledge server when one is up. Otherwise it runs git directly. When the remote's URL is `https://` and names `github.com` or a declared GitHub Enterprise host exactly, in lowercase and with no port, and OpenKnowledge has a GitHub sign-in for it ([which account is used](/docs/features/git/sync#authentication)), that sign-in replaces your git credential helpers for HTTPS requests to that host during the command, though a `~/.netrc` entry for the host or a password in the remote URL is still used first. A submodule or extra push URL that writes the same host with an explicit `:443` or in different letter case gets the same sign-in, and is never sent to your own credential helpers.
-Without a running server, `ok pull` and `ok sync` check every symlink the pull would add, retarget or remove before writing anything, and refuse the whole update if one would be unsafe: it points outside the repository, into private `.git` or OpenKnowledge state, at a file that may hold secrets, or somewhere that cannot be checked. The command exits with an error naming up to five refused links, each with its reason, followed by a count of any others and what to do next. With a server running, the command only triggers the pull, and the refusal appears in the app's sync indicator instead. The full rules, including links both sides changed, links that pass through them, names spelled more than one way, and the Git 2.38 requirement for three-way pulls, are in [Incoming changes with unsafe symlinks](/docs/features/github-sync#incoming-changes-with-unsafe-symlinks).
+Requests to another host, a non-default port or a plain `http://` URL use your own git credentials. A token stored with `ok auth token --host <host> --username <username>` overrides them for an HTTPS host only when the request goes through the running server; run directly, these commands keep your own git credentials. The username is what git sends with the token: `oauth2` for GitLab, your Gitea username, `x-bitbucket-api-token-auth` for a Bitbucket API token or `x-token-auth` for a Bitbucket repository or workspace access token, and any value for Azure DevOps. Pass `--json` for JSONL progress events when scripting. See [Git sync](/docs/features/git/sync) for how syncing works.
+
+Without a running server, `ok pull` and `ok sync` check every symlink the pull would add, retarget or remove before writing anything, and refuse the whole update if one would be unsafe: it points outside the repository, into private `.git` or OpenKnowledge state, at a file that may hold secrets, or somewhere that cannot be checked. The command exits with an error naming up to five refused links, each with its reason, followed by a count of any others and what to do next. With a server running, the command only triggers the pull, and the refusal appears in the app's sync indicator instead. The full rules, including links both sides changed, links that pass through them, names spelled more than one way, and the Git 2.38 requirement for three-way pulls, are in [Incoming changes with unsafe symlinks](/docs/features/git/sync#incoming-changes-with-unsafe-symlinks).
## Manage local servers
diff --git a/docs/content/reference/configuration.mdx b/docs/content/reference/configuration.mdx
index 62fa11c56..16d9ba5cf 100644
--- a/docs/content/reference/configuration.mdx
+++ b/docs/content/reference/configuration.mdx
@@ -20,7 +20,7 @@ You can inspect and edit config three ways:
Edits made anywhere reflect everywhere; an open Settings pane refreshes live.
-In the desktop app, Settings follows the focused window. An editor opens the full Settings pane. From the project navigator, Settings opens a customization dialog for your theme and, when available, terminal access and connections to your AI tools; on macOS it also opens that dialog when all windows are closed and the app is still running. This customization shortcut requires a supported packaged installation (macOS, Windows, or Linux deb/rpm). Dev and AppImage builds direct you to use Settings from a project window instead. Open a project for Account, Sync, Plugins, and Skills Studio settings. See the [quickstart](/docs/get-started/quickstart) for first-launch setup.
+In the desktop app, Settings follows the focused window. An editor opens the full Settings pane. From the project navigator, Settings opens a customization dialog for your theme and, when available, terminal access and connections to your AI tools; on macOS it also opens that dialog when all windows are closed and the app is still running. This customization shortcut requires a supported packaged installation (macOS, Windows, or Linux deb/rpm). Dev and AppImage builds direct you to use Settings from a project window instead. Open a project for Git, Sync, Plugins, and Skills Studio settings. See the [quickstart](/docs/get-started/quickstart) for first-launch setup.
## Schema
@@ -58,7 +58,7 @@ A key set in a file more specific than its scope (a user-scope key in `.ok/confi
| `autoSync.pushIntervalSeconds` | `number` | `60` | project-local | Seconds between scheduled pushes while `autoSync.mode` is `full` (30–3600). Shown in **Settings → Sync** as **Push my edits every**. Ignored in every other mode, which never pushes on a schedule. Each cycle with pending edits authors a commit, so a shorter interval means more, smaller commits in shared history. |
| `autoSync.enabled` | `boolean \| null` | `null` | project-local | Legacy per-machine auto-sync toggle, superseded by `autoSync.mode`. Read only when `mode` is absent (`true` = full, `false` = off). `null` means "unanswered". |
| `autoSync.default` | `"off" \| "follow" \| "full" \| boolean \| null` | `null` | project | Committed seed for each machine's first-open sync mode: `off` / `follow` / `full`, or the legacy boolean (`true` = full, `false` = off). `null` = ask. Lets a maintainer pre-answer the onboarding prompt for everyone who clones; a per-machine `autoSync.mode` overrides it. Compatibility note: a committed string value (`off` / `follow` / `full`) is rejected by app versions released before `autoSync.mode` existed, resetting that machine to config defaults until it updates (it never silently syncs). The legacy boolean seed (`true` / `false`) stays readable by older apps — commit `follow` only once collaborators are on a current version. |
-| `git.hosts.<host>.provider` | `"github"` | (unset) | user | Declares that `<host>` is a GitHub Enterprise Server instance, so OpenKnowledge treats remotes on it the way it treats `github.com`: OpenKnowledge's own credential handling, the push-permission check, share links, and the default host for `ok auth`. `github` is the only accepted value today. Shown in **Settings → Account** as **GitHub Enterprise Server hosts**, which adds and removes entries for you. A host that is neither `github.com` nor declared here is treated as a generic git remote, so OpenKnowledge leaves the machine's own git credentials alone and reports push permission as unknown instead of pausing sync. Per-machine: one entry covers every project on this machine, and a declaration committed in a project's `.ok/config.yml` is ignored. Read at server start. Matching uses the hostname without its port, across transports. Without a running server, `ok sync`, `ok pull` and `ok push` use OpenKnowledge's sign-in only for an `https://` remote that names the host in lowercase and with no port; any other form, even an explicit `:443`, keeps your own git credentials. Invalid entries produce config diagnostics without erasing valid siblings. Undeclared origins cause GitHub-specific CLI commands and project sign-in requests to refuse; CLI commands can still target a declared host with `--host`. |
+| `git.hosts.<host>.provider` | `"github"` | (unset) | user | Declares that `<host>` is a GitHub Enterprise Server instance, so OpenKnowledge treats remotes on it the way it treats `github.com`: OpenKnowledge's own credential handling, the push-permission check, share links, and the default host for `ok auth`. `github` is the only accepted value today. Shown in **Settings → Git** as **GitHub Enterprise Server hosts**, which adds and removes entries for you. A host that is neither `github.com` nor declared here is treated as a generic git remote, so OpenKnowledge leaves the machine's own git credentials alone, unless a token is stored for that host and the remote uses `https:`, in which case the running server's sync uses the token, and reports push permission as unknown instead of pausing sync. Per-machine: one entry covers every project on this machine, and a declaration committed in a project's `.ok/config.yml` is ignored. Read at server start. Matching uses the hostname without its port, across transports. Without a running server, `ok sync`, `ok pull` and `ok push` use OpenKnowledge's sign-in only for an `https://` remote that names the host in lowercase and with no port; any other form, even an explicit `:443`, keeps your own git credentials. Invalid entries produce config diagnostics without erasing valid siblings. Undeclared origins cause GitHub-specific CLI commands and project sign-in requests to refuse; CLI commands can still target a declared host with `--host`. |
| `server.bind` | list of addresses | `["127.0.0.1"]` | project-local | Addresses the server binds, e.g. `[127.0.0.1]` or `[0.0.0.0]`. The loopback default keeps everything off-machine out. A non-loopback bind additionally requires the `server.allowExternal` consent interlock. Per-machine — a value committed to `.ok/config.yml` is ignored (the exposing host would otherwise refuse to boot for every teammate who clones and runs locally, since the interlock needs per-machine consent that is never committed). Set it where the server is exposed: `OK_BIND` (space-separated), `ok start --bind <address>`, or `.ok/local/config.yml`. Lists replace, never merge. Read at server start. |
| `server.port` | number | (unset) | project | TCP port the server listens on. Unset = a local start picks a free port dynamically (deployment platforms inject `PORT` instead). Read at server start. |
| `server.externalUrl` | string | (unset) | project | Canonical external origin the server is reached at, e.g. `https://kb.example.com` — its host joins the Host/Origin allowlists and issued URLs. Setting it declares external exposure, which additionally requires the `server.allowExternal` consent interlock. Env: `OK_EXTERNAL_URL`; flag: `ok start --external-url <url>`. Read at server start. |
diff --git a/docs/content/reference/mcp.mdx b/docs/content/reference/mcp.mdx
index 6d5d09695..8b404635d 100644
--- a/docs/content/reference/mcp.mdx
+++ b/docs/content/reference/mcp.mdx
@@ -100,7 +100,7 @@ A whole-document replace attempted while another writer changed the same documen
### Resolving a conflict
-The MCP server has no conflict tools. An agent that hits `doc-in-conflict` or `stale-external-write` should name the file and ask the user to resolve it in the app; see [Resolving a conflict](../features/github-sync.mdx#resolving-a-conflict). HTTP integrations can list conflicts with `GET /api/sync/conflicts`, then read `GET /api/sync/conflict-content?file=<path>` for `base`, `ours`, `theirs`, the conflict kind, and its current `resolutionOptions`. To resolve one, send `POST /api/sync/resolve-conflict` with `{ file, strategy }`, choosing an offered strategy (`mine`, `theirs`, `content`, or `delete`). The `content` strategy also requires `content`; an empty string keeps an empty file. Content must be free of conflict markers. Use only the strategies returned for that conflict; its kind determines the commit behavior described above.
+The MCP server has no conflict tools. An agent that hits `doc-in-conflict` or `stale-external-write` should name the file and ask the user to resolve it in the app; see [Resolving a conflict](../features/git/sync.mdx#resolving-a-conflict). HTTP integrations can list conflicts with `GET /api/sync/conflicts`, then read `GET /api/sync/conflict-content?file=<path>` for `base`, `ours`, `theirs`, the conflict kind, and its current `resolutionOptions`. To resolve one, send `POST /api/sync/resolve-conflict` with `{ file, strategy }`, choosing an offered strategy (`mine`, `theirs`, `content`, or `delete`). The `content` strategy also requires `content`; an empty string keeps an empty file. Content must be free of conflict markers. Use only the strategies returned for that conflict; its kind determines the commit behavior described above.
## Preview links
diff --git a/docs/content/remote-control/methods/cli.mdx b/docs/content/remote-control/methods/cli.mdx
index fcb4588ff..f6076565e 100644
--- a/docs/content/remote-control/methods/cli.mdx
+++ b/docs/content/remote-control/methods/cli.mdx
@@ -211,6 +211,6 @@ printf '\nautoSync:\n mode: full\n' >> .ok/local/config.yml
sudo systemctl restart openknowledge
```
-From now on every edit is committed and pushed automatically. The commit author comes from the machine's git identity (`git config user.name` / `user.email`). A fresh server has none set, so commits fall back to a service identity, **OpenKnowledge**. Signing in with `gh` handles pushing, not authorship. Set a git identity if you'd rather commits carry your name. See [GitHub sync](/docs/features/github-sync) for sync modes, conflict handling, and authentication.
+From now on every edit is committed and pushed automatically. The commit author comes from the machine's git identity (`git config user.name` / `user.email`). A fresh server has none set, so commits fall back to a service identity, **OpenKnowledge**. Signing in with `gh` handles pushing, not authorship. Set a git identity if you'd rather commits carry your name. See [Git sync](/docs/features/git/sync) for sync modes, conflict handling, and authentication.
The git remote is also a way to edit locally: `git clone` it on your laptop and open the clone in OK Desktop. That gives you a separate local copy with the full editor. It syncs with the server through git (each side pushes and pulls), not live, so changes cross over on the next sync rather than instantly.
diff --git a/docs/next.config.ts b/docs/next.config.ts
index cfc825cc3..27d767114 100644
--- a/docs/next.config.ts
+++ b/docs/next.config.ts
@@ -78,6 +78,16 @@ const nextConfig: NextConfig = {
destination: '/docs/advanced/folders-and-templates',
permanent: true,
},
+ {
+ source: '/docs/features/github-sync',
+ destination: '/docs/features/git/sync',
+ permanent: true,
+ },
+ {
+ source: '/docs/features/github-sync/',
+ destination: '/docs/features/git/sync',
+ permanent: true,
+ },
{
source: '/docs/get-started/obsidian',
destination: '/docs/migrate/obsidian',
diff --git a/knip.config.ts b/knip.config.ts
index 65f0e8807..d3638888e 100644
--- a/knip.config.ts
+++ b/knip.config.ts
@@ -147,11 +147,15 @@ export default {
'packages/server': {
entry: ['src/**/*.test.ts', 'src/parse-worker.ts'],
project: 'src/**',
- ignoreDependencies: ['@types/shell-quote'],
+ ignoreDependencies: [
+ '@types/shell-quote',
+ ],
},
'packages/cli': {
entry: ['src/**/*.test.ts', 'scripts/*.ts', 'tests/**/*.ts', 'src/parse-worker.ts'],
- ignoreDependencies: ['yjs'],
+ ignoreDependencies: [
+ 'yjs',
+ ],
},
'packages/desktop': {
entry: [
diff --git a/packages/app/src/components/AuthModal.dom.test.tsx b/packages/app/src/components/AuthModal.dom.test.tsx
index 155486f48..38a99bef1 100644
--- a/packages/app/src/components/AuthModal.dom.test.tsx
+++ b/packages/app/src/components/AuthModal.dom.test.tsx
@@ -160,28 +160,8 @@ describe('AuthModal identityPrompt (set-identity) path', () => {
}
});
- test('a hostless dialog probe that reports a refused origin opens the token step for that host', async () => {
- renderModal({
- queryTransport: makeQueryTransport({
- authenticated: false,
- host: 'ghes.acme.test',
- unsupportedOrigin: { host: 'ghes.acme.test' },
- }),
- });
-
- expect(await screen.findByText('Create a token on ghes.acme.test')).toBeDefined();
- expect(screen.queryByText('Starting sign-in flow')).toBeNull();
- });
-
- test('sign-in path (no identityPrompt) goes straight to the device flow', async () => {
- const throwingQuery: AuthQueryTransport = {
- status: async () => {
- throw new Error('status must not be called for the sign-in path');
- },
- repos: async () => ({ ok: false, error: 'unused' }),
- };
-
- renderModal({ identityPrompt: false, queryTransport: throwingQuery });
+ test('sign-in path (no identityPrompt) reaches the device flow once the host probe says github.com', async () => {
+ renderModal({ identityPrompt: false, queryTransport: makeQueryTransport(NOT_CONNECTED) });
expect(await screen.findByText('Starting sign-in flow')).toBeDefined();
expect(screen.getByText('Connect GitHub')).toBeDefined();
diff --git a/packages/app/src/components/AuthModal.host-probe.dom.test.tsx b/packages/app/src/components/AuthModal.host-probe.dom.test.tsx
new file mode 100644
index 000000000..cd5947712
--- /dev/null
+++ b/packages/app/src/components/AuthModal.host-probe.dom.test.tsx
@@ -0,0 +1,187 @@
+import { act, cleanup, render, screen, waitFor } from '@testing-library/react';
+import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
+import type { OkLocalOpAuthEvent } from '@/lib/desktop-bridge-types';
+import type { AuthQueryStatus, AuthQueryTransport } from '@/lib/transports/auth-query-transport';
+import type { AuthTransport } from '@/lib/transports/auth-transport';
+
+const toastErrorCalls: string[] = [];
+
+vi.doMock('sonner', () => ({
+ toast: {
+ error: (msg: string) => {
+ toastErrorCalls.push(msg);
+ },
+ info: () => {},
+ success: () => {},
+ warn: () => {},
+ },
+}));
+
+const { AuthModal } = await import('./AuthModal');
+
+type WindowGlobals = { NodeFilter?: typeof NodeFilter };
+type GlobalWithDomShims = typeof globalThis &
+ WindowGlobals & { window?: WindowGlobals; ResizeObserver?: unknown };
+const globalWithDomShims = globalThis as GlobalWithDomShims;
+if (
+ globalWithDomShims.NodeFilter === undefined &&
+ globalWithDomShims.window?.NodeFilter !== undefined
+) {
+ globalWithDomShims.NodeFilter = globalWithDomShims.window.NodeFilter;
+}
+if (globalWithDomShims.ResizeObserver === undefined) {
+ class NoopResizeObserver {
+ observe() {}
+ unobserve() {}
+ disconnect() {}
+ }
+ globalWithDomShims.ResizeObserver = NoopResizeObserver;
+}
+
+const noopAuthTransport: AuthTransport = {
+ start: () => ({
+ events: {
+ [Symbol.asyncIterator]() {
+ return { next: () => new Promise<IteratorResult<OkLocalOpAuthEvent>>(() => {}) };
+ },
+ },
+ cancel() {},
+ }),
+};
+
+function renderModal(status: () => Promise<AuthQueryStatus>) {
+ const onOpenChange = vi.fn();
+ const queryTransport: AuthQueryTransport = {
+ status,
+ repos: async () => ({ ok: true, host: 'github.com', repos: [] }),
+ signout: async () => ({ ok: true }),
+ };
+ render(
+ <AuthModal
+ open
+ onOpenChange={onOpenChange}
+ transport={noopAuthTransport}
+ queryTransport={queryTransport}
+ />,
+ );
+ return onOpenChange;
+}
+
+describe('AuthModal host probe refusal', () => {
+ beforeEach(() => {
+ toastErrorCalls.length = 0;
+ });
+ afterEach(cleanup);
+
+ test('an origin refusal closes the modal with the server message instead of a sign-in step', async () => {
+ const onOpenChange = renderModal(async () => ({
+ authenticated: false,
+ host: 'gitlab.example.com',
+ error: 'GitHub sign-in is unavailable for this host.',
+ unsupportedOrigin: { host: 'gitlab.example.com' },
+ }));
+
+ await waitFor(() => expect(onOpenChange).toHaveBeenCalledWith(false));
+ expect(toastErrorCalls).toEqual(['GitHub sign-in is unavailable for this host.']);
+ expect(screen.queryByText('Starting sign-in flow')).toBeNull();
+ expect(screen.queryByText('Create a token on gitlab.example.com')).toBeNull();
+ });
+
+ test('a probe that throws falls through to the sign-in flow instead of closing', async () => {
+ const onOpenChange = renderModal(async () => {
+ throw new Error('offline');
+ });
+
+ expect(await screen.findByText('Starting sign-in flow')).toBeDefined();
+ expect(onOpenChange).not.toHaveBeenCalled();
+ expect(toastErrorCalls).toEqual([]);
+ });
+
+ test('an ordinary signed-out probe still reaches the github.com device flow', async () => {
+ const onOpenChange = renderModal(async () => ({
+ authenticated: false,
+ host: 'github.com',
+ error: 'not logged in',
+ }));
+
+ expect(await screen.findByText('Starting sign-in flow')).toBeDefined();
+ expect(onOpenChange).not.toHaveBeenCalled();
+ expect(toastErrorCalls).toEqual([]);
+ });
+
+ test('an enterprise host probe still reaches the token step', async () => {
+ const onOpenChange = renderModal(async () => ({
+ authenticated: false,
+ host: 'ghe.example.com',
+ }));
+
+ expect(await screen.findByText('Connect to GitHub Enterprise Server')).toBeDefined();
+ expect(onOpenChange).not.toHaveBeenCalled();
+ expect(toastErrorCalls).toEqual([]);
+ });
+
+ test('a probe that outlasts the timeout falls through to sign-in and its late answer is ignored', async () => {
+ vi.useFakeTimers();
+ try {
+ let answer: ((status: AuthQueryStatus) => void) | undefined;
+ const onOpenChange = renderModal(
+ () =>
+ new Promise<AuthQueryStatus>((resolve) => {
+ answer = resolve;
+ }),
+ );
+
+ await act(async () => {
+ await vi.advanceTimersByTimeAsync(9_999);
+ });
+ expect(screen.queryByText('Starting sign-in flow')).toBeNull();
+
+ await act(async () => {
+ await vi.advanceTimersByTimeAsync(1);
+ });
+ expect(screen.getByText('Starting sign-in flow')).toBeDefined();
+
+ await act(async () => {
+ answer?.({
+ authenticated: false,
+ host: 'gitlab.example.com',
+ error: 'GitHub sign-in is unavailable for this host.',
+ unsupportedOrigin: { host: 'gitlab.example.com' },
+ });
+ await vi.advanceTimersByTimeAsync(0);
+ });
+
+ expect(screen.getByText('Starting sign-in flow')).toBeDefined();
+ expect(onOpenChange).not.toHaveBeenCalled();
+ expect(toastErrorCalls).toEqual([]);
+ } finally {
+ vi.useRealTimers();
+ }
+ });
+
+ test('an enterprise answer arriving after the timeout does not switch to the token step', async () => {
+ vi.useFakeTimers();
+ try {
+ let answer: ((status: AuthQueryStatus) => void) | undefined;
+ renderModal(
+ () =>
+ new Promise<AuthQueryStatus>((resolve) => {
+ answer = resolve;
+ }),
+ );
+
+ await act(async () => {
+ await vi.advanceTimersByTimeAsync(10_000);
+ });
+ await act(async () => {
+ answer?.({ authenticated: false, host: 'ghe.example.com' });
+ await vi.advanceTimersByTimeAsync(0);
+ });
+
+ expect(screen.getByText('Starting sign-in flow')).toBeDefined();
+ expect(screen.queryByText('Connect to GitHub Enterprise Server')).toBeNull();
+ } finally {
+ vi.useRealTimers();
+ }
+ });
+});
diff --git a/packages/app/src/components/AuthModal.tsx b/packages/app/src/components/AuthModal.tsx
index bed367e6d..0850d3518 100644
--- a/packages/app/src/components/AuthModal.tsx
+++ b/packages/app/src/components/AuthModal.tsx
@@ -418,7 +418,7 @@ export function AuthModal({
};
}, [open, identityPrompt]);
- // biome-ignore lint/correctness/useExhaustiveDependencies: probe runs on open; resolvedQueryTransport is a fresh object each render and excluded intentionally
+ // biome-ignore lint/correctness/useExhaustiveDependencies: probe runs on open; resolvedQueryTransport, onOpenChange and t are recreated each render and excluded intentionally
useEffect(() => {
if (!open || !needsHostProbe) return;
let settled = false;
@@ -428,10 +428,20 @@ export function AuthModal({
setStep(next);
};
const timer = setTimeout(() => settle('auth'), IDENTITY_PROBE_TIMEOUT_MS);
+ const refuse = (message: string) => {
+ if (settled) return;
+ settled = true;
+ toast.error(message);
+ onOpenChange(false);
+ };
void resolvedQueryTransport
.status()
.then((status) => {
if (settled) return;
+ if (!status.authenticated && status.unsupportedOrigin !== undefined) {
+ refuse(status.error ?? t`OpenKnowledge can't sign in to GitHub for this project.`);
+ return;
+ }
const enterprise = !!status.host && status.host !== 'github.com';
setProbedHost(status.host);
setProbedGhAvailable(status.ghAvailable);
diff --git a/packages/app/src/components/EditorPane.tsx b/packages/app/src/components/EditorPane.tsx
index 52629e33b..4e4c456d0 100644
--- a/packages/app/src/components/EditorPane.tsx
+++ b/packages/app/src/components/EditorPane.tsx
@@ -3,15 +3,7 @@ import type { AttachmentPart } from '@inkeep/open-knowledge-core/acp/thread-prot
import { isEditableTextDocFile } from '@inkeep/open-knowledge-core/constants/code-languages';
import type { TerminalCli, TerminalLaunchCommand } from '@inkeep/open-knowledge-core/handoff';
import type { TerminalPlacement } from '@inkeep/open-knowledge-core/terminal-layout';
-import {
- lazy,
- Suspense,
- useEffect,
- useEffectEvent,
- useRef,
- useState,
- useSyncExternalStore,
-} from 'react';
+import { lazy, Suspense, useEffect, useEffectEvent, useRef, useState } from 'react';
import { getEditorForDoc } from '@/editor/active-editor';
import { EmojiInsertPopover } from '@/editor/components/EmojiInsertPopover';
import { TagDialog } from '@/editor/components/TagDialog';
@@ -27,8 +19,8 @@ import { VIEW_IN_SOURCE_EVENT, type ViewInSourceDetail } from '@/editor/view-in-
import { useGitSyncStatus } from '@/hooks/use-git-sync-status';
import { useInstalledClis } from '@/hooks/use-installed-clis';
import { useNoPushPermissionToast } from '@/hooks/use-no-push-permission-toast';
+import { useSyncAuthPrompt } from '@/hooks/use-sync-auth-prompt';
import { useWorktreeAutoSyncNotice } from '@/hooks/use-worktree-autosync-notice';
-import { authPromptStore } from '@/lib/auth-prompt-store';
import { useConfigContext } from '@/lib/config-provider';
import { readWebDockSessionOrder } from '@/lib/dock-session-persistence';
import { matchesKeyboardShortcut, matchesRendererShortcut } from '@/lib/keyboard-shortcuts';
@@ -167,17 +159,11 @@ export function EditorPane({ onOpenSearch }: EditorPaneProps = {}) {
const [editorMode, setEditorMode] = useState<EditorMode>(persistedMode);
const [authModalOpen, setAuthModalOpen] = useState(false);
const [authInitialStep, setAuthInitialStep] = useState<'auth' | 'identity'>('auth');
- const authPromptPending = useSyncExternalStore(
- authPromptStore.subscribe,
- authPromptStore.getSnapshot,
- () => false,
- );
- useEffect(() => {
- if (!authPromptPending) return;
- authPromptStore.clear();
+ const syncStatus = useGitSyncStatus();
+ useSyncAuthPrompt(syncStatus?.remote, () => {
setAuthInitialStep('auth');
setAuthModalOpen(true);
- }, [authPromptPending]);
+ });
const [activeTab, setActiveTab] = useState<PanelTab>(TABS[0].id);
const [autoSyncOnboardingDismissed, setAutoSyncOnboardingDismissed] = useState(false);
const desktopBridge = typeof window !== 'undefined' ? (window.okDesktop ?? null) : null;
@@ -235,7 +221,6 @@ export function EditorPane({ onOpenSearch }: EditorPaneProps = {}) {
setAgentsVisible(true);
}
- const syncStatus = useGitSyncStatus();
const { projectConfig, projectLocalConfig, projectLocalSynced, projectSynced } =
useConfigContext();
diff --git a/packages/app/src/components/SyncStatusBadge.dom.test.tsx b/packages/app/src/components/SyncStatusBadge.dom.test.tsx
index 5d13e65c0..ca24c41fe 100644
--- a/packages/app/src/components/SyncStatusBadge.dom.test.tsx
+++ b/packages/app/src/components/SyncStatusBadge.dom.test.tsx
@@ -108,6 +108,9 @@ vi.doMock('@/lib/use-settings-route', () => ({
openSyncSettings: () => {
settingsNavigations.push('sync');
},
+ openAccountSettings: () => {
+ settingsNavigations.push('account');
+ },
}));
const emptyWorktree = {
@@ -311,7 +314,8 @@ describe('SyncStatusBadge helper behavior', () => {
{
key: 'push',
direction: null,
- message: 'GitHub authentication failed. Try signing in again.',
+ message:
+ 'Authentication failed for this git host. Add a token for it in Settings, or replace the one stored.',
},
]);
expect(
@@ -323,7 +327,8 @@ describe('SyncStatusBadge helper behavior', () => {
{
key: 'sync',
direction: null,
- message: 'GitHub authentication failed. Try signing in again.',
+ message:
+ 'Authentication failed for this git host. Add a token for it in Settings, or replace the one stored.',
},
]);
expect(
@@ -357,7 +362,7 @@ describe('SyncStatusBadge helper behavior', () => {
);
for (const format of [formatSyncFailureCode, formatPushFailureCode, formatPullFailureCode]) {
- expect(format('auth-no-credential')).toMatch(/reconnect/i);
+ expect(format('auth-no-credential', true)).toMatch(/reconnect/i);
}
});
@@ -367,7 +372,7 @@ describe('SyncStatusBadge helper behavior', () => {
);
for (const format of [formatSyncFailureCode, formatPushFailureCode, formatPullFailureCode]) {
- expect(format('auth-not-found-as-identity')).toBe(
+ expect(format('auth-not-found-as-identity', true)).toBe(
'Repository not found — it may not exist, or the account used may not have access.',
);
}
@@ -379,17 +384,112 @@ describe('SyncStatusBadge helper behavior', () => {
);
const futureCode = 'auth-far-future' as Parameters<typeof formatPushFailureCode>[0];
- expect(formatPushFailureCode(futureCode)).toBe(
+ expect(formatPushFailureCode(futureCode, true)).toBe(
'Push failed — check the server logs for details.',
);
- expect(formatPullFailureCode(futureCode)).toBe(
+ expect(formatPullFailureCode(futureCode, true)).toBe(
'Fetch failed — check the server logs for details.',
);
- expect(formatSyncFailureCode(futureCode)).toBe(
+ expect(formatSyncFailureCode(futureCode, true)).toBe(
'Sync failed — check the server logs for details.',
);
});
+ test('isGitHubRemote keys off a non-null webUrl and nothing else', async () => {
+ const { isGitHubRemote } = await import('./SyncStatusBadge');
+
+ expect(isGitHubRemote(undefined)).toBe(false);
+ expect(isGitHubRemote(null)).toBe(false);
+ expect(isGitHubRemote({ label: 'git.example.com/team/wiki', webUrl: null })).toBe(false);
+ expect(
+ isGitHubRemote({
+ label: 'inkeep/open-knowledge',
+ webUrl: 'https://github.com/inkeep/open-knowledge',
+ }),
+ ).toBe(true);
+ });
+
+ test('hasNonGitHubRemote fires only for a remote that is present and not GitHub', async () => {
+ const { hasNonGitHubRemote } = await import('./SyncStatusBadge');
+
+ expect(hasNonGitHubRemote(undefined)).toBe(false);
+ expect(hasNonGitHubRemote(null)).toBe(false);
+ expect(
+ hasNonGitHubRemote({
+ label: 'inkeep/open-knowledge',
+ webUrl: 'https://github.com/inkeep/open-knowledge',
+ }),
+ ).toBe(false);
+ expect(hasNonGitHubRemote({ label: 'git.example.com/team/wiki', webUrl: null })).toBe(true);
+ });
+
+ test('auth failure copy names GitHub only for a GitHub remote', async () => {
+ const { formatAuthFailureCode } = await import('./SyncStatusBadge');
+
+ expect(formatAuthFailureCode('auth-401', true)).toBe(
+ 'GitHub authentication failed. Try signing in again.',
+ );
+ expect(formatAuthFailureCode('auth-401', false)).toBe(
+ 'Authentication failed for this git host. Add a token for it in Settings, or replace the one stored.',
+ );
+ expect(formatAuthFailureCode('auth-scope-mismatch', true)).toBe(
+ 'Your GitHub token is missing required scopes. Try signing in again.',
+ );
+ expect(formatAuthFailureCode('auth-scope-mismatch', false)).toBe(
+ 'The stored token is missing the permissions this host needs to push.',
+ );
+ expect(formatAuthFailureCode('auth-no-credential', true)).toBe(
+ 'GitHub sign-in is missing or expired. Reconnect to resume syncing.',
+ );
+ expect(formatAuthFailureCode('auth-no-credential', false)).toBe(
+ 'No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has.',
+ );
+
+ for (const code of ['auth-401', 'auth-scope-mismatch', 'auth-no-credential'] as const) {
+ expect(formatAuthFailureCode(code, false)).not.toContain('GitHub');
+ }
+ });
+
+ test('non-auth codes fall through formatAuthFailureCode', async () => {
+ const { formatAuthFailureCode } = await import('./SyncStatusBadge');
+
+ expect(formatAuthFailureCode('auth-403', false)).toBeNull();
+ expect(formatAuthFailureCode('semantic-protected-branch', true)).toBeNull();
+ });
+
+ test('computeSyncErrorLines picks auth copy from the remote host kind', async () => {
+ const { computeSyncErrorLines } = await import('./SyncStatusBadge');
+
+ expect(
+ computeSyncErrorLines({
+ pushErrorCode: 'auth-401',
+ remote: { label: 'git.example.com/team/wiki', webUrl: null },
+ }),
+ ).toEqual([
+ {
+ key: 'push',
+ direction: null,
+ message:
+ 'Authentication failed for this git host. Add a token for it in Settings, or replace the one stored.',
+ },
+ ]);
+ expect(
+ computeSyncErrorLines({
+ pushErrorCode: 'auth-401',
+ remote: {
+ label: 'inkeep/open-knowledge',
+ webUrl: 'https://github.com/inkeep/open-knowledge',
+ },
+ }),
+ ).toEqual([
+ {
+ key: 'push',
+ direction: null,
+ message: 'GitHub authentication failed. Try signing in again.',
+ },
+ ]);
+ });
+
test('only token-invalid unknown push-permission probes offer sign-in again', async () => {
const { shouldOfferSignInAgain } = await import('./SyncStatusBadge');
@@ -1019,6 +1119,91 @@ describe('SyncStatusBadge runtime behavior', () => {
expect(screen.getByRole('button', { name: 'Sign in' })).toBeTruthy();
});
+ test('a non-GitHub auth-401 renders host-neutral authentication copy', async () => {
+ status = {
+ ...baseStatus,
+ state: 'idle',
+ remote: { label: 'git.example.com/team/wiki', webUrl: null },
+ pushErrorCode: 'auth-401',
+ };
+ await renderBadge();
+ await openPopover();
+
+ const region = screen.getByTestId('sync-popover-status').textContent ?? '';
+ expect(region).toContain('Authentication failed for this git host');
+ expect(region).not.toContain('GitHub');
+ });
+
+ test('a GitHub auth-401 keeps the GitHub-named authentication copy', async () => {
+ status = { ...baseStatus, state: 'idle', pushErrorCode: 'auth-401' };
+ await renderBadge();
+ await openPopover();
+
+ expect(screen.getByTestId('sync-popover-status').textContent ?? '').toContain(
+ 'GitHub authentication failed',
+ );
+ });
+
+ test('a GitHub reconnect prompt keeps the signed-out line and its Sign in button', async () => {
+ status = {
+ ...baseStatus,
+ state: 'idle',
+ pushPermission: { checkStatus: 'denied', deniedReason: 'not-authenticated' },
+ };
+ await renderBadge({ onSignIn: () => {} });
+ await openPopover();
+
+ expect(screen.getByText(/signed out — sign in to resume syncing/)).toBeTruthy();
+ expect(screen.getByRole('button', { name: 'Sign in' })).toBeTruthy();
+ });
+
+ test('a non-GitHub auth-error points at the stored token and offers no sign-in', async () => {
+ status = {
+ ...baseStatus,
+ state: 'auth-error',
+ remote: { label: 'git.example.com/team/wiki', webUrl: null },
+ };
+ await renderBadge({ onSignIn: () => {} });
+ await openPopover();
+
+ const region = screen.getByTestId('sync-popover-auth-error-unverified');
+ expect(region.textContent).toBe(
+ 'Reconnect required to keep syncing. Add a token for this host in Settings, or replace the one stored.',
+ );
+ expect(region.textContent ?? '').not.toContain('GitHub');
+ expect(screen.queryByRole('button', { name: 'Sign in' })).toBeNull();
+ settingsNavigations.length = 0;
+ act(() => screen.getByRole('button', { name: 'Add token' }).click());
+ expect(settingsNavigations).toEqual(['account']);
+ });
+
+ test('an SSH non-GitHub auth-error points at the SSH key and offers no token', async () => {
+ status = {
+ ...baseStatus,
+ state: 'auth-error',
+ remote: { label: 'git.example.com/team/wiki', webUrl: null, transport: 'ssh' },
+ };
+ await renderBadge({ onSignIn: () => {} });
+ await openPopover();
+
+ expect(screen.getByTestId('sync-popover-auth-error-no-token').textContent).toBe(
+ 'Reconnect required to keep syncing. Check the SSH key or saved credentials git uses for this host.',
+ );
+ expect(screen.queryByTestId('sync-popover-auth-error-unverified')).toBeNull();
+ expect(screen.queryByRole('button', { name: 'Add token' })).toBeNull();
+ expect(screen.queryByRole('button', { name: 'Sign in' })).toBeNull();
+ });
+
+ test('a GitHub auth-error keeps the reconnect line and its Sign in button', async () => {
+ status = { ...baseStatus, state: 'auth-error' };
+ await renderBadge({ onSignIn: () => {} });
+ await openPopover();
+
+ expect(screen.getByText('Reconnect required to keep syncing.')).toBeTruthy();
+ expect(screen.getByRole('button', { name: 'Sign in' })).toBeTruthy();
+ expect(screen.queryByTestId('sync-popover-auth-error-unverified')).toBeNull();
+ });
+
test('the denied popover line renders the identity sentences from the wire payload', async () => {
status = {
...baseStatus,
diff --git a/packages/app/src/components/SyncStatusBadge.tsx b/packages/app/src/components/SyncStatusBadge.tsx
index 6cfc6f0a5..db3f8902a 100644
--- a/packages/app/src/components/SyncStatusBadge.tsx
+++ b/packages/app/src/components/SyncStatusBadge.tsx
@@ -38,7 +38,7 @@ import { useGitWorktreeStatus } from '@/hooks/use-git-worktree-status';
import { useConfigContext } from '@/lib/config-provider';
import { hashFromAssetPath, hashFromDocName, isSameHash } from '@/lib/doc-hash';
import { triggerSync } from '@/lib/trigger-sync';
-import { openSyncSettings } from '@/lib/use-settings-route';
+import { openAccountSettings, openSyncSettings } from '@/lib/use-settings-route';
import { EnableSyncConfirmDialog } from './EnableSyncConfirmDialog';
import { SyncBlockingChanges } from './SyncBlockingChanges';
import {
@@ -393,16 +393,43 @@ export function shouldOfferReconnect(pushPermission: PushPermissionWire | undefi
);
}
-export function formatPushFailureCode(code: SyncErrorCode): string {
+export function isGitHubRemote(remote: GitSyncStatus['remote']): boolean {
+ return typeof remote?.webUrl === 'string';
+}
+
+export function hasNonGitHubRemote(remote: GitSyncStatus['remote']): boolean {
+ return remote != null && !isGitHubRemote(remote);
+}
+
+export function remoteTakesStoredToken(remote: GitSyncStatus['remote'] | undefined): boolean {
+ return remote?.transport === undefined || remote.transport === 'https';
+}
+
+export function formatAuthFailureCode(code: SyncErrorCode, isGitHub: boolean): string | null {
switch (code) {
- case 'auth-403':
- return t`You don't have permission to push to this repo.`;
case 'auth-401':
- return t`GitHub authentication failed. Try signing in again.`;
+ return isGitHub
+ ? t`GitHub authentication failed. Try signing in again.`
+ : t`Authentication failed for this git host. Add a token for it in Settings, or replace the one stored.`;
case 'auth-scope-mismatch':
- return t`Your GitHub token is missing required scopes. Try signing in again.`;
+ return isGitHub
+ ? t`Your GitHub token is missing required scopes. Try signing in again.`
+ : t`The stored token is missing the permissions this host needs to push.`;
case 'auth-no-credential':
- return t`GitHub sign-in is missing or expired. Reconnect to resume syncing.`;
+ return isGitHub
+ ? t`GitHub sign-in is missing or expired. Reconnect to resume syncing.`
+ : t`No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has.`;
+ default:
+ return null;
+ }
+}
+
+export function formatPushFailureCode(code: SyncErrorCode, isGitHub: boolean): string {
+ const authMessage = formatAuthFailureCode(code, isGitHub);
+ if (authMessage !== null) return authMessage;
+ switch (code) {
+ case 'auth-403':
+ return t`You don't have permission to push to this repo.`;
case 'semantic-protected-branch':
return t`The default branch is protected — pushes need a pull request.`;
case 'auth-not-found-as-identity':
@@ -412,16 +439,12 @@ export function formatPushFailureCode(code: SyncErrorCode): string {
}
}
-export function formatPullFailureCode(code: SyncErrorCode): string {
+export function formatPullFailureCode(code: SyncErrorCode, isGitHub: boolean): string {
+ const authMessage = formatAuthFailureCode(code, isGitHub);
+ if (authMessage !== null) return authMessage;
switch (code) {
case 'auth-403':
return t`You don't have access to this repository.`;
- case 'auth-401':
- return t`GitHub authentication failed. Try signing in again.`;
- case 'auth-scope-mismatch':
- return t`Your GitHub token is missing required scopes. Try signing in again.`;
- case 'auth-no-credential':
- return t`GitHub sign-in is missing or expired. Reconnect to resume syncing.`;
case 'auth-not-found-as-identity':
return t`Repository not found — it may not exist, or the account used may not have access.`;
default:
@@ -429,16 +452,12 @@ export function formatPullFailureCode(code: SyncErrorCode): string {
}
}
-export function formatSyncFailureCode(code: SyncErrorCode): string {
+export function formatSyncFailureCode(code: SyncErrorCode, isGitHub: boolean): string {
+ const authMessage = formatAuthFailureCode(code, isGitHub);
+ if (authMessage !== null) return authMessage;
switch (code) {
case 'auth-403':
return t`You don't have access to this repository.`;
- case 'auth-401':
- return t`GitHub authentication failed. Try signing in again.`;
- case 'auth-scope-mismatch':
- return t`Your GitHub token is missing required scopes. Try signing in again.`;
- case 'auth-no-credential':
- return t`GitHub sign-in is missing or expired. Reconnect to resume syncing.`;
case 'semantic-protected-branch':
return t`The default branch is protected — pushes need a pull request.`;
case 'auth-not-found-as-identity':
@@ -457,8 +476,12 @@ export interface SyncErrorLine {
}
export function computeSyncErrorLines(
- status: Pick<GitSyncStatus, 'pushError' | 'pushErrorCode' | 'pullError' | 'pullErrorCode'>,
+ status: Pick<
+ GitSyncStatus,
+ 'pushError' | 'pushErrorCode' | 'pullError' | 'pullErrorCode' | 'remote'
+ >,
): SyncErrorLine[] {
+ const isGitHub = isGitHubRemote(status.remote);
const pushPresent = status.pushErrorCode != null || status.pushError != null;
const pullPresent = status.pullErrorCode != null || status.pullError != null;
@@ -474,7 +497,7 @@ export function computeSyncErrorLines(
direction: null,
message:
status.pushErrorCode != null
- ? formatSyncFailureCode(status.pushErrorCode)
+ ? formatSyncFailureCode(status.pushErrorCode, isGitHub)
: (status.pushError as string),
},
];
@@ -488,7 +511,7 @@ export function computeSyncErrorLines(
key: 'push',
direction: labelDirections ? 'push' : null,
message: status.pushErrorCode
- ? formatPushFailureCode(status.pushErrorCode)
+ ? formatPushFailureCode(status.pushErrorCode, isGitHub)
: (status.pushError as string),
});
}
@@ -497,7 +520,7 @@ export function computeSyncErrorLines(
key: 'pull',
direction: labelDirections ? 'pull' : null,
message: status.pullErrorCode
- ? formatPullFailureCode(status.pullErrorCode)
+ ? formatPullFailureCode(status.pullErrorCode, isGitHub)
: (status.pullError as string),
});
}
@@ -1007,6 +1030,22 @@ function UpdatedLine({
);
}
+function AddHostTokenButton() {
+ return (
+ <PopoverClose asChild>
+ <Button
+ variant="outline"
+ size="xs"
+ className="self-start"
+ onClick={() => openAccountSettings()}
+ data-testid="sync-popover-add-host-token"
+ >
+ <Trans>Add token</Trans>
+ </Button>
+ </PopoverClose>
+ );
+}
+
function PopoverBody({ status, onSignIn, onSetIdentity }: PopoverBodyProps) {
const { t } = useLingui();
const { conflictCount } = status;
@@ -1039,6 +1078,7 @@ function PopoverBody({ status, onSignIn, onSetIdentity }: PopoverBodyProps) {
status.pushPermission?.checkStatus === 'denied' &&
status.pushPermission.deniedReason !== 'not-authenticated' &&
!notFoundAsIdentity;
+ const isGitHub = isGitHubRemote(status.remote);
const canPush = !genuineReadOnly;
const busy = state === 'fetching' || state === 'pulling' || state === 'pushing';
@@ -1300,16 +1340,40 @@ function PopoverBody({ status, onSignIn, onSetIdentity }: PopoverBodyProps) {
</div>
)}
- {state === 'auth-error' && !isParkedOnNotFoundAsIdentity(status) && onSignIn && (
- <div className="flex items-start gap-2">
- <p className="min-w-0 flex-1 text-xs text-destructive">
- <Trans>Reconnect required to keep syncing.</Trans>
+ {state === 'auth-error' &&
+ !isParkedOnNotFoundAsIdentity(status) &&
+ (isGitHub ? (
+ onSignIn && (
+ <div className="flex items-start gap-2">
+ <p className="min-w-0 flex-1 text-xs text-destructive">
+ <Trans>Reconnect required to keep syncing.</Trans>
+ </p>
+ <Button variant="outline" size="xs" className="self-start" onClick={onSignIn}>
+ <Trans>Sign in</Trans>
+ </Button>
+ </div>
+ )
+ ) : remoteTakesStoredToken(status.remote) ? (
+ <div className="flex items-start gap-2">
+ <p
+ className="min-w-0 flex-1 text-xs text-destructive"
+ data-testid="sync-popover-auth-error-unverified"
+ >
+ <Trans>
+ Reconnect required to keep syncing. Add a token for this host in Settings, or
+ replace the one stored.
+ </Trans>
+ </p>
+ <AddHostTokenButton />
+ </div>
+ ) : (
+ <p className="text-xs text-destructive" data-testid="sync-popover-auth-error-no-token">
+ <Trans>
+ Reconnect required to keep syncing. Check the SSH key or saved credentials git uses
+ for this host.
+ </Trans>
</p>
- <Button variant="outline" size="xs" className="self-start" onClick={onSignIn}>
- <Trans>Sign in</Trans>
- </Button>
- </div>
- )}
+ ))}
{conflictCount > 0 && (
<p className="text-xs text-muted-foreground">
diff --git a/packages/app/src/components/settings/AccountSection.dom.test.tsx b/packages/app/src/components/settings/AccountSection.dom.test.tsx
index 4b110706f..c4407090f 100644
--- a/packages/app/src/components/settings/AccountSection.dom.test.tsx
+++ b/packages/app/src/components/settings/AccountSection.dom.test.tsx
@@ -1,14 +1,14 @@
import { bindConfigDoc, type ConfigBinding } from '@inkeep/open-knowledge-core';
-import { act, cleanup, render, screen, within } from '@testing-library/react';
+import { act, cleanup, render, screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import { afterEach, beforeEach, describe, expect, test } from 'vitest';
+import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
import * as Y from 'yjs';
import { TooltipProvider } from '@/components/ui/tooltip';
import { getLastKnownSignedIn, setLastKnownSignedIn } from '@/lib/auth-state-cache';
import type { OkLocalOpAuthEvent, OkLocalOpAuthStatusResponse } from '@/lib/desktop-bridge-types';
import type { AuthQueryTransport } from '@/lib/transports/auth-query-transport';
import type { AuthTransport } from '@/lib/transports/auth-transport';
-import { AccountSection } from './AccountSection';
+import { AccountSection, hostFromRemoteLabel } from './AccountSection';
type WindowGlobals = { NodeFilter?: typeof NodeFilter };
type GlobalWithDomShims = typeof globalThis &
@@ -87,18 +87,29 @@ function bindUserConfig(): ConfigBinding {
return binding;
}
-function renderSection(authQueryTransport: AuthQueryTransport) {
+afterEach(() => {
+ for (const binding of bindings.splice(0)) binding.dispose();
+});
+
+function renderSection(
+ authQueryTransport: AuthQueryTransport,
+ authTransport: AuthTransport = noopAuthTransport,
+) {
return render(
<TooltipProvider>
<AccountSection
authQueryTransport={authQueryTransport}
- authTransport={noopAuthTransport}
+ authTransport={authTransport}
userBinding={bindUserConfig()}
/>
</TooltipProvider>,
);
}
+function makeAuthTransport(hostToken: NonNullable<AuthTransport['hostToken']>): AuthTransport {
+ return { ...noopAuthTransport, hostToken };
+}
+
describe('AccountSection', () => {
beforeEach(() => setLastKnownSignedIn(null));
afterEach(() => {
@@ -124,29 +135,27 @@ describe('AccountSection', () => {
expect(screen.queryByTestId('settings-account-disconnect')).toBeNull();
});
- test('an origin on an unrecognized host explains why instead of offering Sign in', async () => {
+ test('an origin on a host that is not GitHub hides the GitHub sign-in box', async () => {
setLastKnownSignedIn(true);
- renderSection(
- makeQueryTransport({
- status: async () => ({
- authenticated: false,
- host: 'ghes.acme.test',
- error: 'GitHub sign-in is unavailable for this host.',
- unsupportedOrigin: { host: 'ghes.acme.test' },
- }),
- }),
- );
-
- const row = await screen.findByTestId('settings-account-unsupported-origin');
- expect(row.textContent).toContain('ghes.acme.test');
- expect(row.textContent).toContain('GitHub Enterprise Server hosts');
- expect(screen.getByTestId('settings-enterprise-hosts')).toBeDefined();
+ const status = vi.fn(async () => ({
+ authenticated: false as const,
+ host: 'gitea.acme.test',
+ error: 'GitHub sign-in is unavailable for this host.',
+ unsupportedOrigin: { host: 'gitea.acme.test' },
+ }));
+ renderSection(makeQueryTransport({ status }));
+
+ await waitFor(() => expect(screen.queryByTestId('settings-account-loading')).toBeNull());
+ expect(status).toHaveBeenCalled();
+ expect(screen.queryByTestId('settings-account-disconnected')).toBeNull();
expect(screen.queryByRole('button', { name: 'Sign in' })).toBeNull();
- expect(screen.queryByText('Not connected')).toBeNull();
+ expect(screen.queryByText("GitHub sign-in isn't available for this project")).toBeNull();
+ expect(screen.getByTestId('settings-enterprise-hosts')).toBeDefined();
+ expect(screen.getByTestId('settings-account-host-token')).toBeDefined();
expect(getLastKnownSignedIn()).toBe(true);
});
- test('an origin that names no host explains that sign-in is unavailable', async () => {
+ test('an origin that names no host also hides the GitHub sign-in box', async () => {
renderSection(
makeQueryTransport({
status: async () => ({
@@ -157,9 +166,9 @@ describe('AccountSection', () => {
}),
);
- const row = await screen.findByTestId('settings-account-unsupported-origin');
- expect(row.textContent).toContain("couldn't find a host name");
+ await waitFor(() => expect(screen.queryByTestId('settings-account-loading')).toBeNull());
expect(screen.queryByRole('button', { name: 'Sign in' })).toBeNull();
+ expect(screen.getByTestId('settings-account-host-token')).toBeDefined();
});
test('clicking Sign in opens the AuthModal in connect mode (not reauth)', async () => {
@@ -337,3 +346,419 @@ describe('AccountSection', () => {
expect(screen.queryByTestId('settings-account-gh-cli')).toBeNull();
});
});
+
+describe('hostFromRemoteLabel', () => {
+ test('takes the host from an scp-derived remote label', () => {
+ expect(hostFromRemoteLabel('gitea.internal/o/r')).toBe('gitea.internal');
+ });
+
+ test('takes the host from a scheme-derived remote label', () => {
+ expect(hostFromRemoteLabel('git.example.com/team/notes')).toBe('git.example.com');
+ });
+
+ test('preserves an explicit port, which git keys credentials on', () => {
+ expect(hostFromRemoteLabel('host:3000/o/r')).toBe('host:3000');
+ });
+
+ test('refuses a label that is still a raw URL', () => {
+ expect(hostFromRemoteLabel('ssh://git.example.com/o/r')).toBe('');
+ });
+
+ test('refuses a label the remote parser could not reduce to a host', () => {
+ expect(hostFromRemoteLabel('not a url at all')).toBe('');
+ });
+
+ test('refuses an empty label', () => {
+ expect(hostFromRemoteLabel('')).toBe('');
+ });
+});
+
+describe('AccountSection host-token prefill', () => {
+ const realFetch = globalThis.fetch;
+ let syncStatusCalls = 0;
+
+ function stubSyncStatus(remote: { label: string; webUrl: string | null; transport?: string }) {
+ syncStatusCalls = 0;
+ globalThis.fetch = (async (url: string) => {
+ if (String(url).includes('/api/sync/status')) {
+ syncStatusCalls += 1;
+ return new Response(JSON.stringify({ remote }), { status: 200 });
+ }
+ return new Response('{}', { status: 200 });
+ }) as unknown as typeof fetch;
+ }
+
+ beforeEach(() => setLastKnownSignedIn(null));
+ afterEach(() => {
+ cleanup();
+ setLastKnownSignedIn(null);
+ globalThis.fetch = realFetch;
+ });
+
+ test('seeds the host field from a non-GitHub remote', async () => {
+ stubSyncStatus({ label: 'gitea.internal/o/r', webUrl: null });
+ renderSection(makeQueryTransport({ status: async () => CONNECTED }));
+
+ await waitFor(() =>
+ expect((screen.getByLabelText('Host') as HTMLInputElement).value).toBe('gitea.internal'),
+ );
+ expect(screen.queryByTestId('settings-account-host-token-not-https')).toBeNull();
+ });
+
+ test.each(['ssh', 'git', 'http'])(
+ 'a %s remote is not seeded and says a stored token only applies over HTTPS',
+ async (transport) => {
+ stubSyncStatus({ label: 'gitea.internal/o/r', webUrl: null, transport });
+ renderSection(makeQueryTransport({ status: async () => CONNECTED }));
+
+ const note = await screen.findByTestId('settings-account-host-token-not-https');
+ expect(note.textContent).toContain("this project's remote doesn't use HTTPS");
+ expect((screen.getByLabelText('Host') as HTMLInputElement).value).toBe('');
+ },
+ );
+
+ test('an HTTPS remote is seeded without the not-HTTPS note', async () => {
+ stubSyncStatus({ label: 'gitea.internal/o/r', webUrl: null, transport: 'https' });
+ renderSection(makeQueryTransport({ status: async () => CONNECTED }));
+
+ await waitFor(() =>
+ expect((screen.getByLabelText('Host') as HTMLInputElement).value).toBe('gitea.internal'),
+ );
+ expect(screen.queryByTestId('settings-account-host-token-not-https')).toBeNull();
+ });
+
+ test('an unsupported origin still seeds the host field with the host git sends, port included', async () => {
+ stubSyncStatus({ label: 'Git.Example.Internal:8443/o/r', webUrl: null, transport: 'https' });
+ renderSection(
+ makeQueryTransport({
+ status: async () => ({
+ authenticated: false,
+ host: 'git.example.internal',
+ unsupportedOrigin: { host: 'git.example.internal' },
+ }),
+ }),
+ );
+
+ await waitFor(() =>
+ expect((screen.getByLabelText('Host') as HTMLInputElement).value).toBe(
+ 'Git.Example.Internal:8443',
+ ),
+ );
+ });
+
+ test('leaves the host field empty when the remote is GitHub', async () => {
+ stubSyncStatus({ label: 'github.com/o/r', webUrl: 'https://github.com/o/r' });
+ renderSection(makeQueryTransport({ status: async () => CONNECTED }));
+
+ await waitFor(() => expect(syncStatusCalls).toBeGreaterThan(0));
+ await act(async () => {
+ await Promise.resolve();
+ });
+
+ expect((screen.getByLabelText('Host') as HTMLInputElement).value).toBe('');
+ });
+
+ test('never seeds over a host the user has already typed', async () => {
+ const user = userEvent.setup();
+ let release: (() => void) | undefined;
+ const gate = new Promise<void>((resolve) => {
+ release = resolve;
+ });
+ syncStatusCalls = 0;
+ globalThis.fetch = (async (url: string) => {
+ if (String(url).includes('/api/sync/status')) {
+ await gate;
+ syncStatusCalls += 1;
+ return new Response(
+ JSON.stringify({ remote: { label: 'gitea.internal/o/r', webUrl: null } }),
+ { status: 200 },
+ );
+ }
+ return new Response('{}', { status: 200 });
+ }) as unknown as typeof fetch;
+
+ renderSection(makeQueryTransport({ status: async () => CONNECTED }));
+ await user.type(await screen.findByLabelText('Host'), 'git.mine.test');
+
+ release?.();
+ await waitFor(() => expect(syncStatusCalls).toBeGreaterThan(0));
+ await act(async () => {
+ await Promise.resolve();
+ });
+
+ expect((screen.getByLabelText('Host') as HTMLInputElement).value).toBe('git.mine.test');
+ });
+});
+
+describe('AccountSection host-token form', () => {
+ beforeEach(() => setLastKnownSignedIn(null));
+ afterEach(() => {
+ cleanup();
+ setLastKnownSignedIn(null);
+ });
+
+ test('renders a host, username and access-token field with a submit control', async () => {
+ renderSection(makeQueryTransport({ status: async () => CONNECTED }));
+
+ expect(await screen.findByLabelText('Host')).toBeDefined();
+ expect(screen.getByLabelText('Username')).toBeDefined();
+ expect(screen.getByLabelText('Access token')).toBeDefined();
+ expect(screen.getByTestId('settings-account-host-token-submit')).toBeDefined();
+ });
+
+ test('keeps submit disabled until all three fields hold a non-blank value', async () => {
+ const user = userEvent.setup();
+ renderSection(makeQueryTransport({ status: async () => CONNECTED }));
+
+ const submit = await screen.findByTestId('settings-account-host-token-submit');
+ expect((submit as HTMLButtonElement).disabled).toBe(true);
+
+ await user.type(screen.getByLabelText('Host'), 'gitea.internal');
+ await user.type(screen.getByLabelText('Username'), 'oauth2');
+ expect((submit as HTMLButtonElement).disabled).toBe(true);
+
+ await user.type(screen.getByLabelText('Access token'), ' ');
+ expect((submit as HTMLButtonElement).disabled).toBe(true);
+
+ await user.type(screen.getByLabelText('Access token'), 'glpat_secret');
+ expect((submit as HTMLButtonElement).disabled).toBe(false);
+ });
+
+ test('a successful submit sends trimmed values, confirms, and clears only the token', async () => {
+ const user = userEvent.setup();
+ const calls: Array<[string, string, string]> = [];
+ renderSection(
+ makeQueryTransport({ status: async () => CONNECTED }),
+ makeAuthTransport(async (host, username, token) => {
+ calls.push([host, username, token]);
+ return { ok: true, login: 'oauth2' };
+ }),
+ );
+
+ await user.type(await screen.findByLabelText('Host'), ' gitea.internal ');
+ await user.type(screen.getByLabelText('Username'), ' oauth2 ');
+ await user.type(screen.getByLabelText('Access token'), ' glpat_secret ');
+ await user.click(screen.getByTestId('settings-account-host-token-submit'));
+
+ const confirmation = await screen.findByTestId('settings-account-host-token-success');
+ expect(confirmation.textContent).toBe(
+ 'Token stored for oauth2 on gitea.internal. To remove it, run ok auth signout --host gitea.internal.',
+ );
+ expect(calls).toEqual([['gitea.internal', 'oauth2', 'glpat_secret']]);
+ expect((screen.getByLabelText('Access token') as HTMLInputElement).value).toBe('');
+ expect((screen.getByLabelText('Host') as HTMLInputElement).value).toBe(' gitea.internal ');
+ expect((screen.getByLabelText('Username') as HTMLInputElement).value).toBe(' oauth2 ');
+ });
+
+ test('a rejected submit surfaces the reason and keeps the token for a retry', async () => {
+ const user = userEvent.setup();
+ renderSection(
+ makeQueryTransport({ status: async () => CONNECTED }),
+ makeAuthTransport(async () => ({ ok: false, error: 'Host must not include a scheme' })),
+ );
+
+ await user.type(await screen.findByLabelText('Host'), 'gitea.internal');
+ await user.type(screen.getByLabelText('Username'), 'oauth2');
+ await user.type(screen.getByLabelText('Access token'), 'glpat_secret');
+ await user.click(screen.getByTestId('settings-account-host-token-submit'));
+
+ const alert = await screen.findByTestId('settings-account-host-token-error');
+ expect(alert.getAttribute('role')).toBe('alert');
+ expect(alert.textContent).toBe('Host must not include a scheme');
+ expect((screen.getByLabelText('Access token') as HTMLInputElement).value).toBe('glpat_secret');
+ expect(screen.queryByTestId('settings-account-host-token-success')).toBeNull();
+ });
+
+ test('Enter in the token field submits the form', async () => {
+ const user = userEvent.setup();
+ const calls: string[][] = [];
+ renderSection(
+ makeQueryTransport({ status: async () => CONNECTED }),
+ makeAuthTransport(async (host, username, token) => {
+ calls.push([host, username, token]);
+ return { ok: true, login: username };
+ }),
+ );
+
+ await user.type(await screen.findByLabelText('Host'), 'gitea.internal');
+ await user.type(screen.getByLabelText('Username'), 'alice');
+ await user.type(screen.getByLabelText('Access token'), 'tok{Enter}');
+
+ expect(await screen.findByTestId('settings-account-host-token-success')).toBeDefined();
+ expect(calls).toEqual([['gitea.internal', 'alice', 'tok']]);
+ });
+
+ test('a host with a scheme or path is refused before anything is sent', async () => {
+ const user = userEvent.setup();
+ const hostToken = vi.fn(async () => ({ ok: true, login: 'alice' }));
+ renderSection(
+ makeQueryTransport({ status: async () => CONNECTED }),
+ makeAuthTransport(hostToken),
+ );
+
+ await user.type(await screen.findByLabelText('Host'), 'https://gitea.internal/team');
+ await user.type(screen.getByLabelText('Username'), 'alice');
+ await user.type(screen.getByLabelText('Access token'), 'tok');
+ await user.click(screen.getByTestId('settings-account-host-token-submit'));
+
+ const alert = await screen.findByTestId('settings-account-host-token-error');
+ expect(alert.textContent).toContain('no scheme or path');
+ expect(hostToken).not.toHaveBeenCalled();
+ const hostField = screen.getByLabelText('Host');
+ expect(hostField.getAttribute('aria-invalid')).toBe('true');
+ expect(hostField.getAttribute('aria-describedby')).toBe(alert.id);
+ expect(alert.id).not.toBe('');
+ });
+
+ test('correcting the host after a format error clears the invalid state and its message', async () => {
+ const user = userEvent.setup();
+ renderSection(
+ makeQueryTransport({ status: async () => CONNECTED }),
+ makeAuthTransport(async () => ({ ok: true, login: 'alice' })),
+ );
+
+ const hostField = await screen.findByLabelText('Host');
+ await user.type(hostField, 'https://gitea.internal/team');
+ await user.type(screen.getByLabelText('Username'), 'alice');
+ await user.type(screen.getByLabelText('Access token'), 'tok');
+ await user.click(screen.getByTestId('settings-account-host-token-submit'));
+ await screen.findByTestId('settings-account-host-token-error');
+
+ await user.clear(hostField);
+ await user.type(hostField, 'gitea.internal');
+
+ expect(hostField.hasAttribute('aria-invalid')).toBe(false);
+ expect(hostField.hasAttribute('aria-describedby')).toBe(false);
+ expect(screen.queryByTestId('settings-account-host-token-error')).toBeNull();
+ });
+
+ test('a valid host carries no invalid state and is not described by an error', async () => {
+ const user = userEvent.setup();
+ renderSection(
+ makeQueryTransport({ status: async () => CONNECTED }),
+ makeAuthTransport(async () => ({ ok: false, error: 'Rejected by host' })),
+ );
+
+ await user.type(await screen.findByLabelText('Host'), 'gitea.internal');
+ await user.type(screen.getByLabelText('Username'), 'alice');
+ await user.type(screen.getByLabelText('Access token'), 'tok');
+ await user.click(screen.getByTestId('settings-account-host-token-submit'));
+
+ await screen.findByTestId('settings-account-host-token-error');
+ const hostField = screen.getByLabelText('Host');
+ expect(hostField.hasAttribute('aria-invalid')).toBe(false);
+ expect(hostField.hasAttribute('aria-describedby')).toBe(false);
+ });
+
+ test('the username field is described by visible guidance naming the fixed usernames', async () => {
+ renderSection(makeQueryTransport({ status: async () => CONNECTED }));
+
+ const field = await screen.findByLabelText('Username');
+ const hintId = field.getAttribute('aria-describedby');
+ expect(hintId).toBeTruthy();
+ const hint = document.getElementById(hintId as string);
+ expect(hint).not.toBeNull();
+ expect(hint?.closest('[role="tooltip"]')).toBeNull();
+ for (const value of [
+ 'x-bitbucket-api-token-auth',
+ 'x-token-auth',
+ 'oauth2',
+ 'Gitea username',
+ 'Azure DevOps accepts any value',
+ ]) {
+ expect(hint?.textContent).toContain(value);
+ }
+ expect(screen.queryByRole('tooltip')).toBeNull();
+ });
+
+ test('a transport that throws re-enables the form, reports a connection error and logs the reason', async () => {
+ const user = userEvent.setup();
+ const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});
+ const failure = new Error('boom');
+ renderSection(
+ makeQueryTransport({ status: async () => CONNECTED }),
+ makeAuthTransport(async () => {
+ throw failure;
+ }),
+ );
+
+ await user.type(await screen.findByLabelText('Host'), 'gitea.internal');
+ await user.type(screen.getByLabelText('Username'), 'alice');
+ await user.type(screen.getByLabelText('Access token'), 'tok');
+ await user.click(screen.getByTestId('settings-account-host-token-submit'));
+
+ const alert = await screen.findByTestId('settings-account-host-token-error');
+ expect(alert.textContent).toBe('Connection error — try again');
+ expect(
+ (screen.getByTestId('settings-account-host-token-submit') as HTMLButtonElement).disabled,
+ ).toBe(false);
+ expect(warn.mock.calls.some((call) => call.includes(failure))).toBe(true);
+ warn.mockRestore();
+ });
+
+ test('an empty login from the transport falls back to the typed username', async () => {
+ const user = userEvent.setup();
+ renderSection(
+ makeQueryTransport({ status: async () => CONNECTED }),
+ makeAuthTransport(async () => ({ ok: true, login: '' })),
+ );
+
+ await user.type(await screen.findByLabelText('Host'), 'gitea.internal');
+ await user.type(screen.getByLabelText('Username'), 'alice');
+ await user.type(screen.getByLabelText('Access token'), 'tok');
+ await user.click(screen.getByTestId('settings-account-host-token-submit'));
+
+ const confirmation = await screen.findByTestId('settings-account-host-token-success');
+ expect(confirmation.textContent).toContain('Token stored for alice on gitea.internal.');
+ });
+
+ test('the token field opts out of browser and password-manager autofill', async () => {
+ renderSection(makeQueryTransport({ status: async () => CONNECTED }));
+
+ const field = await screen.findByLabelText('Access token');
+ expect(field.getAttribute('autocomplete')).toBe('off');
+ expect(field.hasAttribute('data-1p-ignore')).toBe(true);
+ expect(field.getAttribute('data-lpignore')).toBe('true');
+ });
+
+ test('a transport that cannot store tokens explains itself instead of throwing', async () => {
+ const user = userEvent.setup();
+ renderSection(makeQueryTransport({ status: async () => CONNECTED }));
+
+ await user.type(await screen.findByLabelText('Host'), 'gitea.internal');
+ await user.type(screen.getByLabelText('Username'), 'oauth2');
+ await user.type(screen.getByLabelText('Access token'), 'glpat_secret');
+ await user.click(screen.getByTestId('settings-account-host-token-submit'));
+
+ const alert = await screen.findByTestId('settings-account-host-token-error');
+ expect(alert.textContent).toBe(
+ "This window can't store a token — open Settings from the main app window.",
+ );
+ });
+
+ test('a rejected retry after a stored token drops the stale confirmation', async () => {
+ const user = userEvent.setup();
+ let attempts = 0;
+ renderSection(
+ makeQueryTransport({ status: async () => CONNECTED }),
+ makeAuthTransport(async () => {
+ attempts += 1;
+ return attempts === 1
+ ? { ok: true, login: 'oauth2' }
+ : { ok: false, error: 'Host must not include a scheme' };
+ }),
+ );
+
+ await user.type(await screen.findByLabelText('Host'), 'gitea.internal');
+ await user.type(screen.getByLabelText('Username'), 'oauth2');
+ await user.type(screen.getByLabelText('Access token'), 'glpat_secret');
+ await user.click(screen.getByTestId('settings-account-host-token-submit'));
+ await screen.findByTestId('settings-account-host-token-success');
+
+ await user.type(screen.getByLabelText('Access token'), 'glpat_second');
+ await user.click(screen.getByTestId('settings-account-host-token-submit'));
+
+ await screen.findByTestId('settings-account-host-token-error');
+ expect(screen.queryByTestId('settings-account-host-token-success')).toBeNull();
+ });
+});
diff --git a/packages/app/src/components/settings/AccountSection.tsx b/packages/app/src/components/settings/AccountSection.tsx
index 1ebca5eeb..8af98cc85 100644
--- a/packages/app/src/components/settings/AccountSection.tsx
+++ b/packages/app/src/components/settings/AccountSection.tsx
@@ -1,16 +1,21 @@
import type { ConfigBinding } from '@inkeep/open-knowledge-core/config/bind-config-doc';
+import { isGitCredentialHost } from '@inkeep/open-knowledge-core/constants/github';
import { Trans, useLingui } from '@lingui/react/macro';
-import { useEffect, useRef, useState } from 'react';
+import { useEffect, useId, useRef, useState } from 'react';
import { AuthModal } from '@/components/AuthModal';
+import { isGitHubRemote, remoteTakesStoredToken } from '@/components/SyncStatusBadge';
import { Button } from '@/components/ui/button';
+import { Input } from '@/components/ui/input';
+import { Label } from '@/components/ui/label';
import { Skeleton } from '@/components/ui/skeleton';
+import { type GitSyncStatus, useGitSyncStatus } from '@/hooks/use-git-sync-status';
import { recordAuthStatus } from '@/lib/auth-state-cache';
import {
type AuthQueryStatus,
type AuthQueryTransport,
httpAuthQueryTransport,
} from '@/lib/transports/auth-query-transport';
-import type { AuthTransport } from '@/lib/transports/auth-transport';
+import { type AuthTransport, httpAuthTransport } from '@/lib/transports/auth-transport';
import { EnterpriseHostsSection } from './EnterpriseHostsSection';
import { SettingsSectionHeader } from './SettingsSectionHeader';
@@ -32,6 +37,7 @@ export function AccountSection({
}: AccountSectionProps) {
const { t } = useLingui();
const resolvedQuery = authQueryTransport ?? httpAuthQueryTransport();
+ const remote = useGitSyncStatus()?.remote ?? null;
const [status, setStatus] = useState<StatusState>({ phase: 'loading' });
const [authModalOpen, setAuthModalOpen] = useState(false);
const [disconnecting, setDisconnecting] = useState(false);
@@ -80,63 +86,65 @@ export function AccountSection({
return (
<section
aria-labelledby="settings-account-title"
- className="space-y-3"
+ className="space-y-5"
data-testid="settings-account"
>
<SettingsSectionHeader
titleId="settings-account-title"
- title={<Trans>Account</Trans>}
+ title={<Trans>Git</Trans>}
scope="user"
>
<Trans>
- Manage the GitHub account OpenKnowledge uses to browse and sync your repositories.
+ Manage the accounts and access tokens OpenKnowledge uses to connect to your git hosts.
</Trans>
</SettingsSectionHeader>
- {status.phase === 'loading' ? (
- <div
- role="status"
- aria-live="polite"
- aria-busy="true"
- className="space-y-2 rounded-md border p-3"
- data-testid="settings-account-loading"
- >
- <span className="sr-only">
- <Trans>Checking your GitHub connection</Trans>
- </span>
- <Skeleton className="h-4 w-40" />
- <Skeleton className="h-8 w-32" />
- </div>
- ) : status.phase === 'check-failed' ? (
- <div
- className="space-y-2 rounded-md border p-3"
- data-testid="settings-account-check-failed"
- >
- <p role="status" className="text-sm text-muted-foreground">
- <Trans>We couldn't check your GitHub connection.</Trans>
- </p>
- <Button variant="outline" size="sm" onClick={() => void loadStatus()}>
- <Trans>Try again</Trans>
- </Button>
- </div>
- ) : status.result.authenticated ? (
- status.result.tier === 'A' ? (
- <GhCliRow login={status.result.login} />
- ) : (
- <ConnectedRow
- login={status.result.login}
- disconnecting={disconnecting}
- error={disconnectError}
- onDisconnect={() => void handleDisconnect()}
- />
- )
- ) : status.result.unsupportedOrigin !== undefined ? (
- <UnsupportedOriginRow host={status.result.unsupportedOrigin.host} />
- ) : (
- <DisconnectedRow onConnect={() => setAuthModalOpen(true)} />
- )}
+ <div className="space-y-8">
+ {status.phase === 'loading' ? (
+ <div
+ role="status"
+ aria-live="polite"
+ aria-busy="true"
+ className="space-y-2 rounded-md border p-3"
+ data-testid="settings-account-loading"
+ >
+ <span className="sr-only">
+ <Trans>Checking your GitHub connection</Trans>
+ </span>
+ <Skeleton className="h-4 w-40" />
+ <Skeleton className="h-8 w-32" />
+ </div>
+ ) : status.phase === 'check-failed' ? (
+ <div
+ className="space-y-2 rounded-md border p-3"
+ data-testid="settings-account-check-failed"
+ >
+ <p role="status" className="text-sm text-muted-foreground">
+ <Trans>We couldn't check your GitHub connection.</Trans>
+ </p>
+ <Button variant="outline" size="sm" onClick={() => void loadStatus()}>
+ <Trans>Try again</Trans>
+ </Button>
+ </div>
+ ) : status.result.authenticated ? (
+ status.result.tier === 'A' ? (
+ <GhCliRow login={status.result.login} />
+ ) : (
+ <ConnectedRow
+ login={status.result.login}
+ disconnecting={disconnecting}
+ error={disconnectError}
+ onDisconnect={() => void handleDisconnect()}
+ />
+ )
+ ) : status.result.unsupportedOrigin !== undefined ? null : (
+ <DisconnectedRow onConnect={() => setAuthModalOpen(true)} />
+ )}
+
+ <EnterpriseHostsSection binding={userBinding} />
- <EnterpriseHostsSection binding={userBinding} />
+ <HostTokenForm authTransport={authTransport} remote={remote} />
+ </div>
<AuthModal
open={authModalOpen}
@@ -155,6 +163,240 @@ export function AccountSection({
);
}
+export function hostFromRemoteLabel(label: string): string {
+ const candidate = label.split('/')[0] ?? '';
+ return isGitCredentialHost(candidate) ? candidate : '';
+}
+
+function HostTokenSuccess({ login, host }: { login: string; host: string }) {
+ return (
+ <p
+ role="status"
+ className="text-1sm text-muted-foreground"
+ data-testid="settings-account-host-token-success"
+ >
+ <Trans>
+ Token stored for {login} on {host}. To remove it, run{' '}
+ <code translate="no">ok auth signout --host {host}</code>.
+ </Trans>
+ </p>
+ );
+}
+
+const PASSWORD_MANAGER_OPT_OUT = {
+ 'data-1p-ignore': true,
+ 'data-lpignore': 'true',
+ 'data-bwignore': true,
+ 'data-form-type': 'other',
+} as const;
+
+function HostTokenForm({
+ authTransport,
+ remote,
+}: {
+ authTransport?: AuthTransport;
+ remote: GitSyncStatus['remote'] | null;
+}) {
+ const { t } = useLingui();
+ const resolvedAuth = authTransport ?? httpAuthTransport();
+ const remoteLabel = remote?.label ?? null;
+ const remoteIsGitHub = remote ? isGitHubRemote(remote) : false;
+ const remoteTakesTokens = remoteTakesStoredToken(remote);
+ const hostId = useId();
+ const hostErrorId = useId();
+ const usernameId = useId();
+ const usernameHintId = useId();
+ const tokenId = useId();
+ const [host, setHost] = useState('');
+ const [username, setUsername] = useState('');
+ const [token, setToken] = useState('');
+ const [submitting, setSubmitting] = useState(false);
+ const [error, setError] = useState<string | null>(null);
+ const [hostInvalid, setHostInvalid] = useState(false);
+ const [success, setSuccess] = useState<{ login: string; host: string } | null>(null);
+ const submittingRef = useRef(false);
+ const hostPrefillLockedRef = useRef(false);
+
+ useEffect(() => {
+ if (hostPrefillLockedRef.current) return;
+ if (remoteLabel === null || remoteIsGitHub || !remoteTakesTokens) return;
+ const seeded = hostFromRemoteLabel(remoteLabel);
+ if (!seeded) return;
+ hostPrefillLockedRef.current = true;
+ setHost(seeded);
+ }, [remoteLabel, remoteIsGitHub, remoteTakesTokens]);
+
+ async function handleSubmit() {
+ if (submittingRef.current) return;
+ const trimmedHost = host.trim();
+ const trimmedUsername = username.trim();
+ const trimmedToken = token.trim();
+ if (!trimmedHost || !trimmedUsername || !trimmedToken) return;
+ if (!isGitCredentialHost(trimmedHost)) {
+ setSuccess(null);
+ setHostInvalid(true);
+ setError(
+ t`Enter the host name git connects to, with an optional :port and no scheme or path, for example git.example.com.`,
+ );
+ return;
+ }
+ setHostInvalid(false);
+ if (!resolvedAuth.hostToken) {
+ setError(t`This window can't store a token — open Settings from the main app window.`);
+ return;
+ }
+ submittingRef.current = true;
+ setSubmitting(true);
+ setError(null);
+ setSuccess(null);
+ const result = await resolvedAuth
+ .hostToken(trimmedHost, trimmedUsername, trimmedToken)
+ .catch((err: unknown) => {
+ console.warn('[AccountSection] storing a host token failed', err);
+ return { ok: false as const, login: undefined, error: t`Connection error — try again` };
+ });
+ setSubmitting(false);
+ submittingRef.current = false;
+ if (result.ok) {
+ setToken('');
+ setSuccess({ login: result.login || trimmedUsername, host: trimmedHost });
+ } else {
+ setError(result.error ?? t`Failed to store the token — try again`);
+ }
+ }
+
+ return (
+ <section
+ aria-labelledby="settings-host-tokens-title"
+ className="space-y-4"
+ data-field="section:host-tokens"
+ >
+ <div>
+ <h4 id="settings-host-tokens-title" className="text-sm font-medium">
+ <Trans>Other Git hosts</Trans>
+ </h4>
+ <p className="text-1sm text-muted-foreground">
+ <Trans>
+ Add an access token for a GitLab, Gitea, Bitbucket, Azure DevOps or self-hosted git
+ server. Without one, git uses the credentials it already has saved for that host; with
+ one, OpenKnowledge uses the token instead.
+ </Trans>
+ </p>
+ </div>
+
+ <form
+ className="space-y-3 rounded-lg border bg-card p-3"
+ data-testid="settings-account-host-token"
+ aria-labelledby="settings-host-tokens-title"
+ autoComplete="off"
+ onSubmit={(e) => {
+ e.preventDefault();
+ void handleSubmit();
+ }}
+ >
+ {remoteLabel !== null && !remoteIsGitHub && !remoteTakesTokens ? (
+ <p
+ className="text-1sm text-muted-foreground"
+ data-testid="settings-account-host-token-not-https"
+ >
+ <Trans>
+ A token added here only applies to HTTPS remotes, and this project's remote doesn't
+ use HTTPS.
+ </Trans>
+ </p>
+ ) : null}
+
+ <div className="space-y-1">
+ <Label htmlFor={hostId}>
+ <Trans>Host</Trans>
+ </Label>
+ <Input
+ id={hostId}
+ type="text"
+ placeholder="git.example.com"
+ autoComplete="off"
+ {...PASSWORD_MANAGER_OPT_OUT}
+ aria-invalid={hostInvalid || undefined}
+ aria-describedby={hostInvalid && error ? hostErrorId : undefined}
+ value={host}
+ onChange={(e) => {
+ hostPrefillLockedRef.current = true;
+ setHost(e.target.value);
+ if (hostInvalid) {
+ setHostInvalid(false);
+ setError(null);
+ }
+ }}
+ />
+ </div>
+
+ <div className="space-y-1">
+ <Label htmlFor={usernameId}>
+ <Trans>Username</Trans>
+ </Label>
+ <Input
+ id={usernameId}
+ type="text"
+ autoComplete="off"
+ {...PASSWORD_MANAGER_OPT_OUT}
+ aria-describedby={usernameHintId}
+ value={username}
+ onChange={(e) => setUsername(e.target.value)}
+ />
+ <p
+ id={usernameHintId}
+ className="text-1sm text-muted-foreground"
+ data-testid="settings-account-host-token-username-hint"
+ >
+ <Trans>
+ The username git sends with the token. Some hosts expect a fixed value: type{' '}
+ <code translate="no">x-bitbucket-api-token-auth</code> for a Bitbucket API token,{' '}
+ <code translate="no">x-token-auth</code> for a Bitbucket repository or workspace
+ access token, or <code translate="no">oauth2</code> for GitLab. For Gitea, use your
+ Gitea username. Azure DevOps accepts any value.
+ </Trans>
+ </p>
+ </div>
+
+ <div className="space-y-1">
+ <Label htmlFor={tokenId}>
+ <Trans>Access token</Trans>
+ </Label>
+ <Input
+ id={tokenId}
+ type="password"
+ autoComplete="off"
+ {...PASSWORD_MANAGER_OPT_OUT}
+ value={token}
+ onChange={(e) => setToken(e.target.value)}
+ />
+ </div>
+
+ <Button
+ type="submit"
+ data-testid="settings-account-host-token-submit"
+ disabled={submitting || !host.trim() || !username.trim() || !token.trim()}
+ >
+ {submitting ? <Trans>Adding</Trans> : <Trans>Add token</Trans>}
+ </Button>
+
+ {success ? <HostTokenSuccess login={success.login} host={success.host} /> : null}
+
+ {error ? (
+ <p
+ id={hostInvalid ? hostErrorId : undefined}
+ role="alert"
+ className="text-sm text-destructive"
+ data-testid="settings-account-host-token-error"
+ >
+ {error}
+ </p>
+ ) : null}
+ </form>
+ </section>
+ );
+}
+
function ConnectedRow({
login,
disconnecting,
@@ -228,34 +470,6 @@ function GhCliRow({ login }: { login: string }) {
);
}
-function UnsupportedOriginRow({ host }: { host: string | null }) {
- return (
- <div
- role="status"
- className="space-y-1 rounded-md border p-3"
- data-testid="settings-account-unsupported-origin"
- >
- <div className="text-sm font-medium">
- <Trans>GitHub sign-in isn't available for this project</Trans>
- </div>
- <p className="text-muted-foreground text-1sm">
- {host === null ? (
- <Trans>
- OpenKnowledge couldn't find a host name in this project's git remote, so it can't tell
- which GitHub server to sign in to.
- </Trans>
- ) : (
- <Trans>
- This project's git remote is on {host}, which OpenKnowledge doesn't recognize as a
- GitHub host. If {host} runs GitHub Enterprise Server, add it to GitHub Enterprise Server
- hosts below, then restart OpenKnowledge.
- </Trans>
- )}
- </p>
- </div>
- );
-}
-
function DisconnectedRow({ onConnect }: { onConnect: () => void }) {
return (
<div className="rounded-md border p-3" data-testid="settings-account-disconnected">
@@ -265,7 +479,7 @@ function DisconnectedRow({ onConnect }: { onConnect: () => void }) {
<Trans>Not connected</Trans>
</div>
<p className="text-muted-foreground text-1sm">
- <Trans>Connect a GitHub account to browse and sync your repositories.</Trans>
+ <Trans>Connect a GitHub account to browse and publish GitHub repositories.</Trans>
</p>
</div>
<Button onClick={onConnect} data-testid="settings-account-connect">
diff --git a/packages/app/src/components/settings/EnterpriseHostsSection.tsx b/packages/app/src/components/settings/EnterpriseHostsSection.tsx
index 99b441fc5..d1f1a12a1 100644
--- a/packages/app/src/components/settings/EnterpriseHostsSection.tsx
+++ b/packages/app/src/components/settings/EnterpriseHostsSection.tsx
@@ -87,7 +87,7 @@ export function EnterpriseHostsSection({ binding }: { binding: ConfigBinding })
return (
<section
aria-labelledby="settings-enterprise-hosts-title"
- className="space-y-4 pt-5"
+ className="space-y-4"
data-field="section:enterprise-hosts"
data-testid="settings-enterprise-hosts"
>
diff --git a/packages/app/src/components/settings/SettingsDialogBody.sync-mode.dom.test.tsx b/packages/app/src/components/settings/SettingsDialogBody.sync-mode.dom.test.tsx
index 347d18c41..80f1df1a8 100644
--- a/packages/app/src/components/settings/SettingsDialogBody.sync-mode.dom.test.tsx
+++ b/packages/app/src/components/settings/SettingsDialogBody.sync-mode.dom.test.tsx
@@ -11,7 +11,11 @@ type SyncStatus = {
hasRemote: boolean;
pausedReason?: string;
refusedSymlinkPaths?: string[];
- pushPermission?: { checkStatus: 'allowed' | 'denied' | 'unknown'; deniedReason?: string };
+ pushPermission?: {
+ checkStatus: 'allowed' | 'denied' | 'unknown';
+ deniedReason?: string;
+ unknownError?: string;
+ };
syncEnabled?: boolean;
syncMode?: 'off' | 'follow' | 'full';
ahead?: number;
@@ -587,3 +591,114 @@ describe('Settings Sync section — Advanced disclosure intent', () => {
expect(disclosureState()).toBe('closed');
});
});
+
+describe('Settings Sync section — GitHub sign-in prompts', () => {
+ beforeEach(() => {
+ cleanup();
+ syncStatus = {
+ state: 'idle',
+ hasRemote: true,
+ syncEnabled: true,
+ syncMode: 'full',
+ ahead: 0,
+ remote: {
+ label: 'inkeep/open-knowledge',
+ webUrl: 'https://github.com/inkeep/open-knowledge',
+ },
+ };
+ projectLocalConfig = { autoSync: { mode: 'full' } };
+ projectConfig = { autoSync: { default: null }, content: { attachmentFolderPath: './' } };
+ projectLocalSynced = true;
+ projectSynced = true;
+ localPatchCalls = [];
+ toastErrors.length = 0;
+ });
+
+ test('a GitHub paused sync keeps the sign-in prompt and its button', async () => {
+ syncStatus = {
+ ...syncStatus,
+ pushPermission: { checkStatus: 'denied', deniedReason: 'not-authenticated' },
+ } as SyncStatus;
+
+ await renderSyncSection();
+
+ const region = screen.getByTestId('settings-sync-reconnect');
+ expect(region.textContent ?? '').toContain('Auto-sync is paused');
+ expect(within(region).getByRole('button', { name: 'Sign in' })).not.toBeNull();
+ });
+
+ test('a GitHub host keeps the expired-session line and its sign-in button', async () => {
+ syncStatus = {
+ ...syncStatus,
+ pushPermission: { checkStatus: 'unknown', unknownError: 'token-invalid' },
+ } as SyncStatus;
+
+ await renderSyncSection();
+
+ const region = screen.getByTestId('settings-sync-signin-again');
+ expect(region.textContent ?? '').toContain('GitHub session expired');
+ expect(within(region).getByRole('button', { name: 'Sign in' })).not.toBeNull();
+ });
+});
+
+describe('Settings Sync section — publish-to-GitHub reachability', () => {
+ beforeEach(() => {
+ cleanup();
+ projectLocalConfig = { autoSync: { mode: 'off' } };
+ projectConfig = { autoSync: { default: null }, content: { attachmentFolderPath: './' } };
+ projectLocalSynced = true;
+ projectSynced = true;
+ localPatchCalls = [];
+ toastErrors.length = 0;
+ });
+
+ test('a project with no remote is offered the GitHub publish flow', async () => {
+ syncStatus = {
+ state: 'dormant',
+ hasRemote: false,
+ syncEnabled: false,
+ ahead: 0,
+ } as SyncStatus;
+
+ await renderSyncSection();
+
+ expect(screen.getByTestId('settings-sync-setup')).not.toBeNull();
+ });
+
+ test('a non-GitHub remote is never offered the GitHub publish flow', async () => {
+ syncStatus = {
+ state: 'idle',
+ hasRemote: true,
+ syncEnabled: true,
+ syncMode: 'off',
+ ahead: 0,
+ remote: { label: 'git.example.com/team/wiki', webUrl: null },
+ } as SyncStatus;
+
+ await renderSyncSection();
+
+ expect(screen.queryByTestId('settings-sync-setup')).toBeNull();
+ expect(screen.queryByTestId('settings-sync-empty')).toBeNull();
+ expect(screen.getByTestId('settings-sync-remote-label').textContent).toContain(
+ 'git.example.com',
+ );
+ });
+
+ test('a GitHub remote is not offered the publish flow either — it is already published', async () => {
+ syncStatus = {
+ state: 'idle',
+ hasRemote: true,
+ syncEnabled: true,
+ syncMode: 'off',
+ ahead: 0,
+ remote: {
+ label: 'inkeep/open-knowledge',
+ webUrl: 'https://github.com/inkeep/open-knowledge',
+ },
+ } as SyncStatus;
+
+ await renderSyncSection();
+
+ expect(screen.queryByTestId('settings-sync-setup')).toBeNull();
+ });
+});
diff --git a/packages/app/src/components/settings/SettingsDialogShell.tsx b/packages/app/src/components/settings/SettingsDialogShell.tsx
index 0149ff770..3a16ba940 100644
--- a/packages/app/src/components/settings/SettingsDialogShell.tsx
+++ b/packages/app/src/components/settings/SettingsDialogShell.tsx
@@ -218,7 +218,7 @@ export function SettingsDialogShell({
{ id: 'hotkeys', label: t`Hotkeys` },
{
id: 'account',
- label: t`Account`,
+ label: t`Git`,
subsections: [
{
id: 'enterprise-hosts',
@@ -230,6 +230,17 @@ export function SettingsDialogShell({
t({ message: 'git host', context: 'settings search keyword' }),
],
},
+ {
+ id: 'host-tokens',
+ label: t`Other Git hosts`,
+ anchor: 'section:host-tokens',
+ keywords: [
+ t({ message: 'token', context: 'settings search keyword' }),
+ t({ message: 'GitLab', context: 'settings search keyword' }),
+ t({ message: 'Bitbucket', context: 'settings search keyword' }),
+ t({ message: 'git host', context: 'settings search keyword' }),
+ ],
+ },
] satisfies SidebarSubsection[],
},
{ id: 'user-plugins-manage', label: t`Plugins` },
diff --git a/packages/app/src/components/settings/SyncSection.tsx b/packages/app/src/components/settings/SyncSection.tsx
index 6772dd964..24784bf18 100644
--- a/packages/app/src/components/settings/SyncSection.tsx
+++ b/packages/app/src/components/settings/SyncSection.tsx
@@ -17,6 +17,7 @@ import {
formatDeniedIdentitySentences,
formatSyncFailureCode,
hasNotFoundAsIdentityError,
+ isGitHubRemote,
isParkedOnNotFoundAsIdentity,
PausedReasonNotice,
SyncRefusedSymlinks,
@@ -169,7 +170,7 @@ function SyncSectionContent({
const parkedOnNotFound = isParkedOnNotFoundAsIdentity(status);
const pushDenialCoversPause = isPushDenied && status?.pausedReason !== 'unsafe-incoming-symlinks';
const pausedNotice = !status?.pausedReason ? null : parkedOnNotFound ? (
- formatSyncFailureCode('auth-not-found-as-identity')
+ formatSyncFailureCode('auth-not-found-as-identity', isGitHubRemote(status?.remote))
) : pushDenialCoversPause ? null : (
<PausedReasonNotice reason={status.pausedReason} />
);
diff --git a/packages/app/src/hooks/use-git-sync-status.ts b/packages/app/src/hooks/use-git-sync-status.ts
index 3e1fefff3..62492222a 100644
--- a/packages/app/src/hooks/use-git-sync-status.ts
+++ b/packages/app/src/hooks/use-git-sync-status.ts
@@ -40,7 +40,11 @@ export interface GitSyncStatus {
syncEnabled: boolean;
syncMode?: SyncMode;
identityUnresolved?: boolean;
- remote?: { label: string; webUrl: string | null } | null;
+ remote?: {
+ label: string;
+ webUrl: string | null;
+ transport?: 'https' | 'http' | 'ssh' | 'git';
+ } | null;
pushError?: string;
pushErrorCode?: SyncErrorCode;
pullError?: string;
diff --git a/packages/app/src/hooks/use-sync-auth-prompt.dom.test.tsx b/packages/app/src/hooks/use-sync-auth-prompt.dom.test.tsx
new file mode 100644
index 000000000..f607c2a6c
--- /dev/null
+++ b/packages/app/src/hooks/use-sync-auth-prompt.dom.test.tsx
@@ -0,0 +1,129 @@
+import { act, cleanup, render } from '@testing-library/react';
+import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
+
+const toastInfoCalls: string[] = [];
+const toastInfoActions: Array<{ label: string; onClick: () => void } | undefined> = [];
+
+import * as actualLinguiMacro from '@lingui/react/macro';
+
+vi.doMock('sonner', () => ({
+ toast: {
+ info: (msg: string, opts?: { action?: { label: string; onClick: () => void } }) => {
+ toastInfoCalls.push(msg);
+ toastInfoActions.push(opts?.action);
+ },
+ success: () => {},
+ error: () => {},
+ warn: () => {},
+ },
+}));
+
+vi.doMock('@lingui/react/macro', () => ({
+ ...actualLinguiMacro,
+ useLingui: () => ({
+ t: (strings: TemplateStringsArray) => strings.join(''),
+ }),
+}));
+
+const { authPromptStore } = await import('@/lib/auth-prompt-store');
+const { useSyncAuthPrompt } = await import('./use-sync-auth-prompt');
+
+const NO_CREDENTIAL_COPY =
+ 'OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has.';
+
+type Remote = Parameters<typeof useSyncAuthPrompt>[0];
+
+const GITHUB_REMOTE: Remote = {
+ label: 'github.com/o/r',
+ webUrl: 'https://github.com/o/r',
+ transport: 'https',
+};
+const GITEA_HTTPS_REMOTE: Remote = {
+ label: 'gitea.internal/o/r',
+ webUrl: null,
+ transport: 'https',
+};
+const GITEA_SSH_REMOTE: Remote = { label: 'gitea.internal/o/r', webUrl: null, transport: 'ssh' };
+
+const NO_TOKEN_COPY =
+ "Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it.";
+
+function TestComponent({ remote, onPrompt }: { remote: Remote; onPrompt: () => void }) {
+ useSyncAuthPrompt(remote, onPrompt);
+ return null;
+}
+
+describe('useSyncAuthPrompt', () => {
+ beforeEach(() => {
+ toastInfoCalls.length = 0;
+ toastInfoActions.length = 0;
+ authPromptStore.clear();
+ window.location.hash = '';
+ });
+
+ afterEach(() => {
+ cleanup();
+ authPromptStore.clear();
+ });
+
+ test('a GitHub or remote-less project opens the sign-in modal', () => {
+ const onPrompt = vi.fn();
+ render(<TestComponent remote={GITHUB_REMOTE} onPrompt={onPrompt} />);
+
+ act(() => authPromptStore.request());
+
+ expect(onPrompt).toHaveBeenCalledTimes(1);
+ expect(toastInfoCalls).toEqual([]);
+ });
+
+ test('a non-GitHub remote gets the stored-credential sentence and no modal', () => {
+ const onPrompt = vi.fn();
+ render(<TestComponent remote={GITEA_HTTPS_REMOTE} onPrompt={onPrompt} />);
+
+ act(() => authPromptStore.request());
+
+ expect(onPrompt).not.toHaveBeenCalled();
+ expect(toastInfoCalls).toEqual([NO_CREDENTIAL_COPY]);
+ expect(toastInfoCalls[0]).not.toContain('GitHub sign');
+ });
+
+ test('the notice carries an action that opens Account settings, where the token form lives', () => {
+ render(<TestComponent remote={GITEA_HTTPS_REMOTE} onPrompt={vi.fn()} />);
+
+ act(() => authPromptStore.request());
+
+ const action = toastInfoActions[0];
+ expect(action?.label).toBe('Add token');
+ action?.onClick();
+ expect(window.location.hash).toBe('#settings/account');
+ });
+
+ test('a pending request is consumed either way, so it cannot replay', () => {
+ const onPrompt = vi.fn();
+ render(<TestComponent remote={GITEA_HTTPS_REMOTE} onPrompt={onPrompt} />);
+
+ act(() => authPromptStore.request());
+
+ expect(authPromptStore.getSnapshot()).toBe(false);
+ expect(toastInfoCalls).toHaveLength(1);
+ });
+
+ test('an SSH remote is pointed at its SSH key, with no Add token action', () => {
+ const onPrompt = vi.fn();
+ render(<TestComponent remote={GITEA_SSH_REMOTE} onPrompt={onPrompt} />);
+
+ act(() => authPromptStore.request());
+
+ expect(onPrompt).not.toHaveBeenCalled();
+ expect(toastInfoCalls).toEqual([NO_TOKEN_COPY]);
+ expect(toastInfoActions[0]).toBeUndefined();
+ });
+
+ test('no request means neither surface fires', () => {
+ const onPrompt = vi.fn();
+ render(<TestComponent remote={GITEA_HTTPS_REMOTE} onPrompt={onPrompt} />);
+
+ expect(onPrompt).not.toHaveBeenCalled();
+ expect(toastInfoCalls).toEqual([]);
+ });
+});
diff --git a/packages/app/src/hooks/use-sync-auth-prompt.ts b/packages/app/src/hooks/use-sync-auth-prompt.ts
new file mode 100644
index 000000000..9cba5a1e4
--- /dev/null
+++ b/packages/app/src/hooks/use-sync-auth-prompt.ts
@@ -0,0 +1,39 @@
+import { useLingui } from '@lingui/react/macro';
+import { useEffect, useSyncExternalStore } from 'react';
+import { toast } from 'sonner';
+import { hasNonGitHubRemote, remoteTakesStoredToken } from '@/components/SyncStatusBadge';
+import type { GitSyncStatus } from '@/hooks/use-git-sync-status';
+import { authPromptStore } from '@/lib/auth-prompt-store';
+import { openAccountSettings } from '@/lib/use-settings-route';
+
+export function useSyncAuthPrompt(
+ remote: GitSyncStatus['remote'] | undefined,
+ onPrompt: () => void,
+): void {
+ const { t } = useLingui();
+ const pending = useSyncExternalStore(
+ authPromptStore.subscribe,
+ authPromptStore.getSnapshot,
+ () => false,
+ );
+ const nonGitHub = hasNonGitHubRemote(remote ?? null);
+ const takesToken = remoteTakesStoredToken(remote);
+ useEffect(() => {
+ if (!pending) return;
+ authPromptStore.clear();
+ if (!nonGitHub) {
+ onPrompt();
+ return;
+ }
+ if (!takesToken) {
+ toast.info(
+ t`Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it.`,
+ );
+ return;
+ }
+ toast.info(
+ t`OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has.`,
+ { action: { label: t`Add token`, onClick: () => openAccountSettings() } },
+ );
+ }, [pending, nonGitHub, takesToken, onPrompt, t]);
+}
diff --git a/packages/app/src/lib/share/run-share-action.test.ts b/packages/app/src/lib/share/run-share-action.test.ts
index 45768bbc1..626f44145 100644
--- a/packages/app/src/lib/share/run-share-action.test.ts
+++ b/packages/app/src/lib/share/run-share-action.test.ts
@@ -384,6 +384,54 @@ describe('runShareAction — no-remote routing', () => {
expect(deps.errorToasts).toEqual([]);
});
+ test('a share that succeeds against a remote never opens the GitHub publish wizard', async () => {
+ const deps = makeDeps({
+ fetchResponse: {
+ ok: true,
+ shareUrl: 'https://openknowledge.ai/d/Aaa',
+ sharedUrl: 'https://git.example.com/team/wiki/blob/main/a.md',
+ branch: 'main',
+ },
+ });
+ let wizardOpened = false;
+
+ await runShareAction(
+ {
+ kind: 'doc',
+ docName: 'a',
+ hasRemote: true,
+ onClickWhenNoRemote: () => {
+ wizardOpened = true;
+ },
+ },
+ deps,
+ );
+
+ expect(wizardOpened).toBe(false);
+ });
+
+ test('a share error other than no-remote never opens the GitHub publish wizard', async () => {
+ const deps = makeDeps({
+ fetchResponse: { ok: false, error: 'branch-not-on-origin', branch: 'wip' },
+ });
+ let wizardOpened = false;
+
+ const result = await runShareAction(
+ {
+ kind: 'doc',
+ docName: 'a',
+ hasRemote: true,
+ onClickWhenNoRemote: () => {
+ wizardOpened = true;
+ },
+ },
+ deps,
+ );
+
+ expect(result.kind).toBe('business-error');
+ expect(wizardOpened).toBe(false);
+ });
+
test('server-side no-remote response also fires the wizard (worktree dev parity)', async () => {
const deps = makeDeps({
fetchResponse: { ok: false, error: 'no-remote' },
diff --git a/packages/app/src/lib/transports/auth-query-transport.test.ts b/packages/app/src/lib/transports/auth-query-transport.test.ts
index 6c400af0d..dd0c3bb0c 100644
--- a/packages/app/src/lib/transports/auth-query-transport.test.ts
+++ b/packages/app/src/lib/transports/auth-query-transport.test.ts
@@ -174,6 +174,17 @@ describe('httpAuthQueryTransport().status', () => {
expect(fetchCalls).toHaveLength(2);
});
+
+ it('leaves an ordinary signed-out 200 free of an origin refusal', async () => {
+ stubFetch(
+ () =>
+ new Response(JSON.stringify({ authenticated: false, host: 'github.com', error: 'nope' })),
+ );
+
+ const result = await httpAuthQueryTransport().status();
+ expect(result.authenticated).toBe(false);
+ expect(result.authenticated ? undefined : result.unsupportedOrigin).toBeUndefined();
+ });
});
describe('httpAuthQueryTransport().signout', () => {
diff --git a/packages/app/src/lib/transports/auth-transport.test.ts b/packages/app/src/lib/transports/auth-transport.test.ts
index 64925f59f..ec5385f2c 100644
--- a/packages/app/src/lib/transports/auth-transport.test.ts
+++ b/packages/app/src/lib/transports/auth-transport.test.ts
@@ -64,6 +64,60 @@ describe('httpAuthTransport().pat', () => {
});
});
+describe('httpAuthTransport().hostToken', () => {
+ test('POSTs { host, username, token } to the token relay and returns the login on success', async () => {
+ const calls: Array<{ url: string; body: unknown }> = [];
+ globalThis.fetch = vi.fn(async (url: string, init?: RequestInit) => {
+ calls.push({ url, body: JSON.parse(String(init?.body)) });
+ return new Response(JSON.stringify({ host: 'gitea.internal', login: 'oauth2' }), {
+ status: 200,
+ });
+ }) as unknown as typeof fetch;
+
+ const result = await httpAuthTransport().hostToken?.(
+ 'gitea.internal',
+ 'oauth2',
+ 'glpat_secret',
+ );
+ expect(result).toEqual({ ok: true, login: 'oauth2' });
+ expect(calls).toHaveLength(1);
+ expect(calls[0]?.url).toBe('/api/local-op/auth/token');
+ expect(calls[0]?.body).toEqual({
+ host: 'gitea.internal',
+ username: 'oauth2',
+ token: 'glpat_secret',
+ });
+ });
+
+ test('surfaces the problem+json detail on a rejected request (bounded reason)', async () => {
+ globalThis.fetch = vi.fn(
+ async () =>
+ new Response(
+ JSON.stringify({
+ type: 'urn:ok:error:auth-failed',
+ title: 'Authentication failed',
+ status: 400,
+ detail: 'Host must not include a scheme',
+ }),
+ { status: 400, headers: { 'Content-Type': 'application/problem+json' } },
+ ),
+ ) as unknown as typeof fetch;
+
+ const result = await httpAuthTransport().hostToken?.('https://gitea.internal', 'oauth2', 'x');
+ expect(result).toEqual({ ok: false, error: 'Host must not include a scheme' });
+ });
+
+ test('returns a generic connection error when the request throws', async () => {
+ globalThis.fetch = vi.fn(async () => {
+ throw new Error('network down');
+ }) as unknown as typeof fetch;
+
+ const result = await httpAuthTransport().hostToken?.('gitea.internal', 'oauth2', 'x');
+ expect(result?.ok).toBe(false);
+ expect(result?.error).toBe('Connection error — try again');
+ });
+});
+
describe('httpAuthTransport().start / ghLogin (streamAuthEndpoint)', () => {
test('a pre-stream problem+json failure surfaces the typed title as a single error event', async () => {
globalThis.fetch = vi.fn(
diff --git a/packages/app/src/lib/transports/auth-transport.ts b/packages/app/src/lib/transports/auth-transport.ts
index f126b1deb..08dade63b 100644
--- a/packages/app/src/lib/transports/auth-transport.ts
+++ b/packages/app/src/lib/transports/auth-transport.ts
@@ -26,6 +26,7 @@ interface PatResult {
export interface AuthTransport {
start(): AuthTransportHandle;
pat?(host: string, token: string): Promise<PatResult>;
+ hostToken?(host: string, username: string, token: string): Promise<PatResult>;
ghLogin?(host: string): AuthTransportHandle;
}
@@ -213,6 +214,27 @@ export function httpAuthTransport(): AuthTransport {
return { ok: false, error: t`Connection error — try again` };
}
},
+ async hostToken(host: string, username: string, token: string): Promise<PatResult> {
+ try {
+ const res = await fetch('/api/local-op/auth/token', {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json' },
+ body: JSON.stringify({ host, username, token }),
+ });
+ if (res.ok) {
+ const body = (await res.json()) as { login?: unknown };
+ return { ok: true, login: typeof body.login === 'string' ? body.login : '' };
+ }
+ let error = t`Failed to store the token — try again`;
+ try {
+ const result = ProblemDetailsSchema.safeParse(await res.json());
+ if (result.success) error = result.data.detail || result.data.title;
+ } catch {}
+ return { ok: false, error };
+ } catch {
+ return { ok: false, error: t`Connection error — try again` };
+ }
+ },
};
}
diff --git a/packages/app/src/lib/use-settings-route.ts b/packages/app/src/lib/use-settings-route.ts
index d5c112d44..fc7bfccc6 100644
--- a/packages/app/src/lib/use-settings-route.ts
+++ b/packages/app/src/lib/use-settings-route.ts
@@ -40,6 +40,12 @@ export function openAgentSettings(): void {
openSettingsSection(AGENT_SETTINGS_SECTION);
}
+const ACCOUNT_SECTION = 'account';
+
+export function openAccountSettings(): void {
+ openSettingsSection(ACCOUNT_SECTION);
+}
+
const PROJECT_SYNC_SECTION = 'sync';
let pendingSyncAdvanced = false;
diff --git a/packages/app/src/locales/ar/messages.json b/packages/app/src/locales/ar/messages.json
index 11f07afac..744db5c37 100644
--- a/packages/app/src/locales/ar/messages.json
+++ b/packages/app/src/locales/ar/messages.json
@@ -61,6 +61,9 @@
],
"-l6jM7": ["ابدأ محادثة بزر +، أو شغّل وكيلاً من صفحة."],
"-lCAuQ": ["يجري تحميل الرسم البياني"],
+ "-nA68n": [
+ "أضف رمز وصول لخادم GitLab أو Gitea أو Bitbucket أو Azure DevOps أو خادم git مستضاف ذاتيًا. بدونه، يستخدم git بيانات الاعتماد المحفوظة لديه لهذا المضيف؛ ومعه، يستخدم OpenKnowledge الرمز بدلًا منها."
+ ],
"-o5XAG": [
"يُرسل بشكل خاص إلى فريق OpenKnowledge، مع ملاحظتك ونسخة التطبيق. لا يُنشر علنًا أبدًا."
],
@@ -290,6 +293,7 @@
"1vczDE": ["فتح ", ["displayName"], " Desktop"],
"1vn0CI": ["استجابة الخادم غير صالحة"],
"1xui0Q": ["فشل تحميل الملفات المحلية"],
+ "1yHVE-": ["يجري الإضافة"],
"2-3Mlu": ["تعذر إلغاء تثبيت ", ["name"]],
"20LVKb": ["طلب شيء من خارج هذه المحادثة من عملية الوكيل أن تتوقف (", ["signal"], ")."],
"2277Tu": ["طيّ الرسم البياني"],
@@ -543,6 +547,15 @@
"4mp6Tv": ["عرض OpenKnowledge المهارات المثبّتة"],
"4niEzY": ["تضمين HTML معزول — اكتب HTML وشاهد المعاينة المعروضة مباشرةً."],
"4nj6n8": ["أعاد /api/config الرمز ", ["code"]],
+ "4p8Baj": [
+ "تم تخزين الرمز لـ ",
+ ["login"],
+ " على ",
+ ["host"],
+ ". لإزالته، شغّل <0>ok auth signout --host ",
+ ["host"],
+ "</0>."
+ ],
"4pDZ2N": ["أُزيلت «", ["0"], "» من كل موقع آخر — ولا يزال مجلدها المصدر يُحمَّل"],
"4r6p_B": [
"يحتوي هذا الأمر على أحرف مخفية قد تجعله يبدو مختلفًا عمّا يُنفَّذ فعلًا. تظهر هنا بصيغة ⟨U+…⟩."
@@ -868,13 +881,6 @@
"7YRrJ9": [
"متاح في تطبيق OpenKnowledge لسطح المكتب. من الطرفية، استخدم<0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2>."
],
- "7_I248": [
- "المستودع البعيد لـ git الخاص بهذا المشروع موجود على ",
- ["host"],
- "، ولا يتعرّف عليه OpenKnowledge كمضيف GitHub. إذا كان ",
- ["host"],
- " يشغّل GitHub Enterprise Server، فأضفه في مضيفو GitHub Enterprise Server أدناه، ثم أعد تشغيل OpenKnowledge."
- ],
"7_bFEL": ["اسحب ", ["patternText"], " لإعادة الترتيب"],
"7a0YcF": ["اضغط <0>مسافة</0> أو انقر على الـ blob للبدء"],
"7aNk5D": ["عدّل OpenKnowledge ", ["subject"]],
@@ -903,6 +909,7 @@
"7lFX_h": ["إعادة التوجيه الآن"],
"7m3Ade": ["التثبيتات:"],
"7qRHf0": ["التثبيت لـ Claude Chat وCowork"],
+ "7sNhEz": ["اسم المستخدم"],
"7uBlRT": ["انسخ عنصر شجرة الملفات المركَّز عليه ليتمكن «لصق» من تكراره."],
"7vxWET": ["معاينة الحزمة غير متاحة."],
"7wogIQ": [
@@ -1062,6 +1069,7 @@
"9bCiQ8": ["لا توجد صفحات تفتقر إلى روابط واردة في الرسم البياني."],
"9bG48P": ["يجري الإرسال"],
"9clcD5": ["فتح المستندات الموسومة بـ #", ["chip"]],
+ "9djC8C": ["اربط حساب GitHub لاستعراض مستودعات GitHub ونشرها."],
"9euN0m": [
[
"count",
@@ -1164,7 +1172,6 @@
" في ",
["parentLabel"]
],
- "AeXO77": ["الحساب"],
"AgoIW4": [
["source"],
": تم تحديث ",
@@ -1177,6 +1184,7 @@
["detail"]
],
"AhoGwP": ["إعداد تكاملات OpenKnowledge"],
+ "Ai2U7L": ["المضيف"],
"AiNMQ7": [
"يعيش هذا المشروع على هذا الجهاز وحده. اربطه بـ GitHub لنسخه احتياطيًا ومشاركته مع آخرين."
],
@@ -1519,7 +1527,6 @@
"E2Mv-X": ["نسخ المصدر"],
"E4XYYH": ["تفعيل الطرفية لهذا المشروع"],
"E5WeIy": ["أعد فتح آخر تبويب محرر مغلق."],
- "E6lrpp": ["أدِر حساب GitHub الذي يستخدمه OpenKnowledge لاستعراض مستودعاتك ومزامنتها."],
"E7BhZn": ["ملاحظة فارغة"],
"E8NbNG": ["تعذر تحميل أشجار العمل."],
"E91VZY": ["فتح في نافذة جديدة"],
@@ -1533,7 +1540,6 @@
"EEYbdt": ["نشر"],
"EFfGAv": ["تلك الرسالة أُرسلت بالفعل — لم يُطبَّق تعديلك."],
"EHu0x2": ["تجري المزامنة"],
- "EJuO7B": ["اربط حساب GitHub لاستعراض مستودعاتك ومزامنتها."],
"EKwNEe": [
"ترتبط التضمينات المخزَّنة بنقطة النهاية والنموذج اللذين أنتجاها، لذا يعيد هذا بناء الفهرس من الصفر."
],
@@ -1676,6 +1682,9 @@
"FgRAvd": ["السجلات ومعلومات النظام"],
"Fhp4Gn": ["عرض الإضافة"],
"Fim5F3": ["تضمينات"],
+ "FioJgb": [
+ "يلزم إعادة الاتصال لمتابعة المزامنة. أضف رمزًا لهذا المضيف في الإعدادات، أو استبدل الرمز المخزّن."
+ ],
"FiyNln": ["الانتقال إلى النص المحدد في الخاصية"],
"FjkaiT": ["تصغير"],
"Fjz6aJ": ["إرسال إلى محادثة جديدة"],
@@ -2132,6 +2141,9 @@
"KvwJv8": ["بعض الملفات غير مدرجة: شجرة العمل تحتوي على تغييرات كثيرة جدًا."],
"Kx881F": ["تمت استعادة ", ["0"], "."],
"KziH2K": ["سريع"],
+ "L-crEu": [
+ "تعذّر على git المصادقة مع هذا المضيف. تحقق من مفتاح SSH أو بيانات الاعتماد المحفوظة التي يستخدمها git له."
+ ],
"L-rMC9": ["إعادة التعيين إلى الافتراضي"],
"L1BQTH": [["0"], " غير مثبَّت بعد — يجري فتح صفحة تنزيله."],
"L1ZE3M": ["إحصاءات المستند"],
@@ -2202,6 +2214,7 @@
"LRgZAt": [["owner"], "/", ["name"], " موجود بالفعل"],
"LSuMte": [["0"], " من ", ["totalCount"]],
"LTeJuX": ["تبديل ملء الشاشة"],
+ "LVWA9A": ["فشلت المصادقة مع مضيف git هذا. أضف رمزًا له في الإعدادات، أو استبدل الرمز المخزّن."],
"LXIm4m": ["نافذة السياق"],
"LXdWeS": ["عنوان قسم متوسط."],
"LXfNU-": ["التنقل والاقتراحات"],
@@ -2381,6 +2394,7 @@
"Mj8R8K": ["تعذّر تثبيت المهارة: ", ["0"]],
"MmDDWK": ["فُتح مؤخرًا"],
"Mnavhe": ["خصائص ", ["propPanelDescriptorLabel"]],
+ "MpZRQy": ["Git"],
"MqQoV-": ["صِف ما تريد بناءه، أو ابدأ بملف فارغ، أو ابنِ هيكلًا من قالب."],
"MqsbfN": ["هل تشغّل معاينات الروابط الخارجية؟"],
"MrUmCD": ["فشل غير معروف في البناء"],
@@ -2574,6 +2588,9 @@
"OPOiKn": ["قواعد المحتوى"],
"OTF92M": ["التسمية <0>(نص عرض اختياري)</0>"],
"OVjNeX": ["الطرفية ", ["0"]],
+ "OWs-8P": [
+ "الرمز المضاف هنا ينطبق فقط على المستودعات البعيدة عبر HTTPS، والمستودع البعيد لهذا المشروع لا يستخدم HTTPS."
+ ],
"OX2Neh": ["كود مضمَّن"],
"OXb_Df": ["محتوى الإعدادات"],
"OXdGnd": ["المشكلات"],
@@ -2693,6 +2710,7 @@
["filePath"],
". اشرح ما الذي ينبغي أن أقارنه في عرض التعارضات في OpenKnowledge؛ سأختار الحل وأطبقه هناك."
],
+ "Q14Keq": ["Bitbucket"],
"Q1mtyd": ["إخفاء الشريط الجانبي"],
"Q5fqMz": ["خطأ في الاتصال — أعد المحاولة"],
"Q6hhn8": ["التفضيلات"],
@@ -3015,6 +3033,7 @@
"SiUUCS": ["التطابق التالي"],
"SkMZlS": ["تعذّرت إزالة <0>", ["targetGitPath"], "</0>: ", ["removeGitError"]],
"SkTkKV": ["الوكيل لا يتوقف. الإيقاف القسري يغلق هذه المحادثة وينهي الوكيل."],
+ "SkUcEr": ["رمز الوصول"],
"Ske_wc": [
"إضافات المستخدم خاصة بهذا الجهاز — شغّلها أو أوقفها هنا. تحصل كل إضافة مفعّلة على صفحتها الخاصة تحت «الإضافات» في الشريط الجانبي للإعدادات."
],
@@ -3411,9 +3430,6 @@
"XAyxsa": ["سحب فرع بعيد"],
"XBBZnv": ["هدف الرابط \"", ["shown"], "\" لا يشير إلى مستند موجود."],
"XBgr2S": ["النسخ إلى هنا"],
- "XBpH6-": [
- "لم يعثر OpenKnowledge على اسم مضيف في المستودع البعيد لـ git الخاص بهذا المشروع، لذا لا يمكنه تحديد خادم GitHub الذي يجب تسجيل الدخول إليه."
- ],
"XDzAnp": ["يفتح في تبويب جديد"],
"XF1kgP": ["كل ما من ", ["source"], " محدّث بالفعل"],
"XGKy1z": ["تعذّر إظهار الصورة"],
@@ -3883,6 +3899,9 @@
"arUUsK": ["تحديثات المنتج"],
"ax9kie": ["لم تُحمَّل إعدادات معاينة الروابط بعد — أعد المحاولة بعد قليل"],
"axQ1h6": ["هل تودّ إضافة شيء؟ (اختياري)"],
+ "azrR7I": [
+ "اسم المستخدم الذي يرسله git مع الرمز. بعض المضيفات تتوقع قيمة ثابتة: اكتب <0>x-bitbucket-api-token-auth</0> لرمز API في Bitbucket، أو <1>x-token-auth</1> لرمز وصول المستودع أو مساحة العمل في Bitbucket، أو <2>oauth2</2> في GitLab. في Gitea، استخدم اسم المستخدم الخاص بك في Gitea. يقبل Azure DevOps أي قيمة."
+ ],
"b18t0_": ["إغلاق الفروق"],
"b1FDss": ["التمرير إلى البداية"],
"b2ezG_": ["تم الاحتفاظ بكليهما — «", ["0"], "» أصبحت مهارة قائمة بذاتها الآن"],
@@ -4303,6 +4322,7 @@
"e8zRrb": ["إظهار الملفات"],
"e8zYa8": ["تعذّر فتح ", ["shareBranch"], " في شجرة عمل. أعد المحاولة."],
"e9sHSO": ["تابع من حيث توقفت"],
+ "eAYJMv": ["رمز"],
"eBGWcy": [
"أدوات Open Knowledge غير متاحة لأن مجلد المشروع مفقود أو يتعذر الوصول إليه أو تغيّر. تحقق من موقعه وأذوناته، ثم أعد المحاولة."
],
@@ -4942,6 +4962,7 @@
"jZ_E5M": ["فشل الجلب — راجع سجلات الخادم للتفاصيل."],
"j_Z6g7": ["الافتراضي المشترك"],
"jbSG8V": ["إظهار الملفات (", ["sidebarShortcutLabel"], ")"],
+ "jbhCDS": ["مضيفات Git أخرى"],
"jcEoUi": ["نقل إلى اللوحة اليمنى"],
"jdGUeI": ["تعذّر إنشاء القالب: ", ["error"]],
"jeCFV7": ["النقل إلى جزء جديد على اليمين"],
@@ -5595,6 +5616,9 @@
]
],
"pd0UH2": ["محاذاة إلى اليمين"],
+ "pd6t3G": [
+ "أدر الحسابات ورموز الوصول التي يستخدمها OpenKnowledge للاتصال بمضيفات git الخاصة بك."
+ ],
"peq20S": [
"المتصفح غير متاح في هذه المحادثة لأنه تعذّر إعداده. يحتوي سجل OpenKnowledge على التفاصيل."
],
@@ -5724,6 +5748,7 @@
"qi17kj": ["تضمين لقطة مباشرة للوحة ‎.excalidraw من مساحة العمل هذه."],
"qi1F96": ["الكشف في مستعرض الملفات"],
"qiRoLb": ["لخّص كل ما غيّرته هذا الأسبوع"],
+ "qimTXH": ["لا يمكن لـ OpenKnowledge تسجيل الدخول إلى GitHub لهذا المشروع."],
"qioCwA": ["الانتقال إلى الصفحة ", ["pageNumber"]],
"qjHMHf": ["فشل تعطيل المزامنة — ", ["detail"]],
"qkqG0b": ["أخذ نسخة المستودع البعيد"],
@@ -5776,6 +5801,9 @@
"rVxu1k": ["لا توجد صفحات ترتبط بهذه بعد."],
"rXz97P": ["قائمة عناصر مرقّمة."],
"rZ9HZq": ["للقيام به"],
+ "rZFxkH": [
+ "أدخل اسم المضيف الذي يتصل به git، مع :port اختياري ودون مخطط أو مسار، مثل git.example.com."
+ ],
"rZVMkf": ["حقل استبدال المحرر المرئي مركَّز عليه"],
"radOpL": ["الصورة ", ["identity"], ". انتقل إلى المرجع."],
"rageVb": ["HTML مخصص مع لوحة معاينة حية (إطار معزول)."],
@@ -6000,6 +6028,9 @@
"tlGXxX": ["تلقائي (سحب فقط)"],
"tnG-m6": ["المزامنة التلقائية موقوفة مؤقتًا — سجّل الدخول للمتابعة."],
"toyw51": ["عناصر تحكم مخطط Mermaid"],
+ "tpOnU9": [
+ "لا يملك OpenKnowledge أي بيانات اعتماد مخزّنة لهذا المضيف. أضف رمزًا في الإعدادات، أو دع git يستخدم بيانات الاعتماد الموجودة لديه بالفعل."
+ ],
"tqQBwN": ["تُعرض أي نصوص برمجية للمراجعة، ولا تُنفَّذ أبدًا."],
"troubleshooting.claude-desktop.per-tool-approval": [
"يطلب منك ",
@@ -6202,6 +6233,7 @@
]
],
"ur2XSb": ["المحرر المرئي"],
+ "uraHF0": ["GitLab"],
"uuoHOU": ["فشل الأمر."],
"uwzRx4": [
"اضبط حجم طلب الفهرسة ومهلته لخوادم التضمينات البطيئة أو المحدودة الذاكرة. ينبغي لمعظم الإعدادات الإبقاء على القيم الافتراضية."
@@ -6332,6 +6364,9 @@
"vy_VIN": [
"متتبَّع في git — تتدفق التحديثات عبر مستودعك (بالسحب أو التكامل المستمر)، لا بالتحديث التلقائي"
],
+ "w-Wt3H": [
+ "يلزم إعادة الاتصال لمتابعة المزامنة. تحقق من مفتاح SSH أو بيانات الاعتماد المحفوظة التي يستخدمها git لهذا المضيف."
+ ],
"w0YVAE": ["إظهار عقد المهارات"],
"w3tVpc": ["لا توجد روابط بعد. أضف روابط ويكي أو روابط Markdown لبناء رسم بياني."],
"w3vFfL": ["إخفاء الملفات"],
@@ -6453,7 +6488,6 @@
"x57cJf": ["فتح الرابط"],
"xAlHfe": [["basename"], " — محرر نصوص"],
"xBFg6z": ["من إضافة ", ["0"]],
- "xBjIs7": ["تسجيل الدخول إلى GitHub غير متاح لهذا المشروع"],
"xCJdfg": ["مسح"],
"xCdTnb": ["إغلاق التبويب الجديد"],
"xD4Xm2": ["جلب"],
@@ -6465,6 +6499,9 @@
"xG4tb6": ["فُقد الاتصال بـ «", ["docName"], "»."],
"xG8Ish": ["غير مخطط له"],
"xHGM4U": ["إخفاء معاينة HTML"],
+ "xJ7qrb": [
+ "لا توجد بيانات اعتماد مخزّنة لمضيف git هذا. أضف رمزًا في الإعدادات، أو دع git يستخدم بيانات الاعتماد الموجودة لديه بالفعل."
+ ],
"xK291b": ["صفحتان (فردي)"],
"xKDsGS": ["الانتقال إلى السطر ", ["0"], " في ", ["1"]],
"xKcXG6": [
@@ -6579,6 +6616,7 @@
"yLEyuq": ["تحديثات المنتج في بريدك."],
"yLq4w4": ["فاصل"],
"yLwx9e": ["المجلد الأب هو الرابط الرمزي — فك ارتباط ذلك المجلد نفسه لاستعادة هذا."],
+ "yLyiQV": ["ينقص الرمز المخزّن الصلاحيات التي يحتاجها هذا المضيف للدفع."],
"yMgL_E": ["التنقل في حقل البحث"],
"yOjRUV": ["لم يتم العثور على أدوات الذكاء الاصطناعي. ثبّت واحدة لاستخدام هذه المهارة."],
"yQE2r9": ["يجري التحميل"],
@@ -6708,6 +6746,7 @@
"zLak8b": ["تنشيط تبويب جديد"],
"zMmwh4": ["اختر سمة أو أنشئ سمتك الخاصة."],
"zWZBPx": ["تغيّر النوع"],
+ "zXZJoN": ["إضافة رمز"],
"zXj1rA": ["البحث حسب المعنى"],
"zYp8Sr": [
"تشير شارة <0>معدَّل</0> إلى القواعد التي يضبطها إعدادك صراحةً — مباشرةً أو موروثةً عبر <1>extends</1>. تحتفظ القواعد غير المؤشَّرة بحالتها الافتراضية."
diff --git a/packages/app/src/locales/ar/messages.po b/packages/app/src/locales/ar/messages.po
index ffd6537c3..03e59a6f9 100644
--- a/packages/app/src/locales/ar/messages.po
+++ b/packages/app/src/locales/ar/messages.po
@@ -1548,6 +1548,10 @@ msgstr "يوجد بالفعل قالب باسم <0>{trimmedSlug}</0> هنا. ا
msgid "A title, description, tags — anything that describes this folder."
msgstr "عنوان، وصف، وسوم — أي شيء يصف هذا المجلد."
+#: src/components/settings/AccountSection.tsx
+msgid "A token added here only applies to HTTPS remotes, and this project's remote doesn't use HTTPS."
+msgstr "الرمز المضاف هنا ينطبق فقط على المستودعات البعيدة عبر HTTPS، والمستودع البعيد لهذا المشروع لا يستخدم HTTPS."
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "A worktree folder for {shareBranch} already exists."
msgstr "يوجد بالفعل مجلد شجرة عمل للفرع {shareBranch}."
@@ -1600,9 +1604,8 @@ msgid "Accept their deletion"
msgstr "قبول حذفهم"
#: src/components/settings/AccountSection.tsx
-#: src/components/settings/SettingsDialogShell.tsx
-msgid "Account"
-msgstr "الحساب"
+msgid "Access token"
+msgstr "رمز الوصول"
#: src/components/TemplateRow.tsx
msgid "Actions for {label}"
@@ -1681,6 +1684,10 @@ msgstr "إضافة خاصية"
msgid "Add a starter pack"
msgstr "إضافة حزمة بداية"
+#: src/components/settings/AccountSection.tsx
+msgid "Add an access token for a GitLab, Gitea, Bitbucket, Azure DevOps or self-hosted git server. Without one, git uses the credentials it already has saved for that host; with one, OpenKnowledge uses the token instead."
+msgstr "أضف رمز وصول لخادم GitLab أو Gitea أو Bitbucket أو Azure DevOps أو خادم git مستضاف ذاتيًا. بدونه، يستخدم git بيانات الاعتماد المحفوظة لديه لهذا المضيف؛ ومعه، يستخدم OpenKnowledge الرمز بدلًا منها."
+
#: src/components/settings/OkignoreSection.tsx
msgid "Add another pattern"
msgstr "إضافة نمط آخر"
@@ -1810,6 +1817,12 @@ msgstr "إضافة إلى القاموس"
msgid "Add to prompt"
msgstr "إضافة إلى الموجّه"
+#: src/components/settings/AccountSection.tsx
+#: src/components/SyncStatusBadge.tsx
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Add token"
+msgstr "إضافة رمز"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Add value"
msgstr "إضافة قيمة"
@@ -1820,6 +1833,10 @@ msgstr "إضافة قيمة"
msgid "Added"
msgstr "أُضيف"
+#: src/components/settings/AccountSection.tsx
+msgid "Adding"
+msgstr "يجري الإضافة"
+
#: src/components/settings/AgentConnectionDialogs.tsx
msgid "Adds a global OpenKnowledge MCP entry for this agent."
msgstr "يضيف إدخال MCP عامًا لـ OpenKnowledge لهذا الوكيل."
@@ -2335,6 +2352,10 @@ msgstr "يجب أن يقل إجمالي المرفقات عن 3 ميغابايت
msgid "Authenticated as {login}."
msgstr "تمت المصادقة باسم {login}."
+#: src/components/SyncStatusBadge.tsx
+msgid "Authentication failed for this git host. Add a token for it in Settings, or replace the one stored."
+msgstr "فشلت المصادقة مع مضيف git هذا. أضف رمزًا له في الإعدادات، أو استبدل الرمز المخزّن."
+
#: src/editor/slash-command/component-items.tsx
msgid "Authoritative content; mirrored verbatim everywhere it's referenced."
msgstr "محتوى مرجعي؛ يُعكس حرفيًا في كل مكان يُشار إليه فيه."
@@ -2536,6 +2557,11 @@ msgstr "عنوان قسم كبير."
msgid "Bird wiki"
msgstr "ويكي الطيور"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "Bitbucket"
+msgstr "Bitbucket"
+
#: src/components/NewItemDialog.tsx
msgid "Blank note"
msgstr "ملاحظة فارغة"
@@ -3605,8 +3631,8 @@ msgid "Connect"
msgstr "اتصال"
#: src/components/settings/AccountSection.tsx
-msgid "Connect a GitHub account to browse and sync your repositories."
-msgstr "اربط حساب GitHub لاستعراض مستودعاتك ومزامنتها."
+msgid "Connect a GitHub account to browse and publish GitHub repositories."
+msgstr "اربط حساب GitHub لاستعراض مستودعات GitHub ونشرها."
#: src/components/settings/SyncSection.tsx
msgid "Connect an existing repository"
@@ -3698,6 +3724,7 @@ msgid "Connection dropped"
msgstr "انقطع الاتصال"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Connection error — try again"
msgstr "خطأ في الاتصال — أعد المحاولة"
@@ -5937,6 +5964,10 @@ msgstr "أدخل عددًا صحيحًا بين {minimum} و{maximum}."
msgid "Enter at least 3 characters to search by meaning."
msgstr "أدخل 3 أحرف على الأقل للبحث حسب المعنى."
+#: src/components/settings/AccountSection.tsx
+msgid "Enter the host name git connects to, with an optional :port and no scheme or path, for example git.example.com."
+msgstr "أدخل اسم المضيف الذي يتصل به git، مع :port اختياري ودون مخطط أو مسار، مثل git.example.com."
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Enter the public origin your tunnel serves, for example https://notes.example.com"
msgstr "أدخل الأصل العام الذي يخدمه النفق الخاص بك، على سبيل المثال https://notes.example.com"
@@ -6412,6 +6443,7 @@ msgid "Failed to start sign-in — try again"
msgstr "فشل بدء تسجيل الدخول — أعد المحاولة"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Failed to store the token — try again"
msgstr "فشل تخزين الرمز — أعد المحاولة"
@@ -6885,6 +6917,11 @@ msgctxt "settings search keyword"
msgid "GHES"
msgstr "GHES"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Git"
+msgstr "Git"
+
#: src/components/ExploreSkills.tsx
msgid "Git & PRs"
msgstr "Git وطلبات السحب"
@@ -6893,6 +6930,10 @@ msgstr "Git وطلبات السحب"
msgid "Git can't track this folder — it's empty or contains only ignored files. The link won't work until you add a tracked document."
msgstr "لا يستطيع Git تتبع هذا المجلد — فهو فارغ أو يحتوي على ملفات متجاهَلة فقط. لن يعمل الرابط حتى تضيف مستندًا متتبَّعًا."
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it."
+msgstr "تعذّر على git المصادقة مع هذا المضيف. تحقق من مفتاح SSH أو بيانات الاعتماد المحفوظة التي يستخدمها git له."
+
#: src/components/RecentProjectsMenu.tsx
msgid "Git has locked this worktree, but it can still be opened."
msgstr "قام Git بقفل شجرة العمل هذه، ولكن لا يزال من الممكن فتحها."
@@ -6952,10 +6993,6 @@ msgstr "مضيفو GitHub Enterprise Server"
msgid "GitHub sign-in is missing or expired. Reconnect to resume syncing."
msgstr "تسجيل الدخول إلى GitHub مفقود أو منتهي الصلاحية. أعد الاتصال لاستئناف المزامنة."
-#: src/components/settings/AccountSection.tsx
-msgid "GitHub sign-in isn't available for this project"
-msgstr "تسجيل الدخول إلى GitHub غير متاح لهذا المشروع"
-
#: src/components/ImportSkillForm.tsx
msgid "GitHub, a git URL, or a local path."
msgstr "GitHub، أو رابط git، أو مسار محلي."
@@ -6964,6 +7001,11 @@ msgstr "GitHub، أو رابط git، أو مسار محلي."
msgid "github.com is always recognized, so it doesn't need to be added."
msgstr "يُتعرَّف على github.com دائمًا، لذا لا حاجة إلى إضافته."
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "GitLab"
+msgstr "GitLab"
+
#: src/components/settings/SavedThemesTiles.tsx
msgid "Give it a name before editing its colors."
msgstr "امنحها اسمًا قبل تعديل ألوانها."
@@ -7318,6 +7360,10 @@ msgstr "شريط أقراص أفقي مع اللوحة النشطة أدناه؛
msgid "Horizontal rule that divides sections."
msgstr "خط أفقي يفصل بين الأقسام."
+#: src/components/settings/AccountSection.tsx
+msgid "Host"
+msgstr "المضيف"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Hosting is on. The server is running on port {boundPort}. Reach it through your tunnel."
msgstr "الاستضافة مفعّلة. الخادم يعمل على المنفذ {boundPort}. يمكنك الوصول إليه عبر نفقك."
@@ -8611,8 +8657,8 @@ msgid "Manage skill folders"
msgstr "إدارة مجلدات المهارات"
#: src/components/settings/AccountSection.tsx
-msgid "Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."
-msgstr "أدِر حساب GitHub الذي يستخدمه OpenKnowledge لاستعراض مستودعاتك ومزامنتها."
+msgid "Manage the accounts and access tokens OpenKnowledge uses to connect to your git hosts."
+msgstr "أدر الحسابات ورموز الوصول التي يستخدمها OpenKnowledge للاتصال بمضيفات git الخاصة بك."
#: src/components/settings/AgentConnectionDialogs.tsx
#: src/components/settings/AgentConnectionsSection.tsx
@@ -9442,6 +9488,10 @@ msgstr "لا تغييرات في المحتوى في هذه النسخة."
msgid "No content changes in this version"
msgstr "لا تغييرات في المحتوى في هذه النسخة"
+#: src/components/SyncStatusBadge.tsx
+msgid "No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "لا توجد بيانات اعتماد مخزّنة لمضيف git هذا. أضف رمزًا في الإعدادات، أو دع git يستخدم بيانات الاعتماد الموجودة لديه بالفعل."
+
#: src/components/GraphPanel.tsx
msgid "No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."
msgstr "لا توجد صفحات منفصلة. تظهر الصفحات هنا فقط عندما لا تكون لها حواف واردة ولا صادرة في الرسم البياني."
@@ -10394,6 +10444,10 @@ msgstr "يجري الفتح..."
msgid "OpenKnowledge"
msgstr "OpenKnowledge"
+#: src/components/AuthModal.tsx
+msgid "OpenKnowledge can't sign in to GitHub for this project."
+msgstr "لا يمكن لـ OpenKnowledge تسجيل الدخول إلى GitHub لهذا المشروع."
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge checked {subject}"
msgstr "تحقق OpenKnowledge من {subject}"
@@ -10406,10 +10460,6 @@ msgstr "تحقق OpenKnowledge من المشروع"
msgid "OpenKnowledge could not find this agent on this machine."
msgstr "لم يتمكن OpenKnowledge من العثور على هذا الوكيل على هذا الجهاز."
-#: src/components/settings/AccountSection.tsx
-msgid "OpenKnowledge couldn't find a host name in this project's git remote, so it can't tell which GitHub server to sign in to."
-msgstr "لم يعثر OpenKnowledge على اسم مضيف في المستودع البعيد لـ git الخاص بهذا المشروع، لذا لا يمكنه تحديد خادم GitHub الذي يجب تسجيل الدخول إليه."
-
#: src/lib/worktree-create-error.ts
msgid "OpenKnowledge couldn't finish setting up this project. The worktree was created but not opened."
msgstr "تعذر على OpenKnowledge إكمال إعداد هذا المشروع. تم إنشاء شجرة العمل ولكن لم يتم فتحها."
@@ -10466,6 +10516,10 @@ msgstr "عدّل OpenKnowledge مستندًا"
msgid "OpenKnowledge files were removed"
msgstr "تمت إزالة ملفات OpenKnowledge"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "لا يملك OpenKnowledge أي بيانات اعتماد مخزّنة لهذا المضيف. أضف رمزًا في الإعدادات، أو دع git يستخدم بيانات الاعتماد الموجودة لديه بالفعل."
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge imported {source}"
msgstr "استورد OpenKnowledge {source}"
@@ -10694,6 +10748,11 @@ msgstr "أخرى"
msgid "Other"
msgstr "أخرى"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Other Git hosts"
+msgstr "مضيفات Git أخرى"
+
#: src/components/settings/SharingSection.tsx
msgid "Other OK paths are tracked upstream:"
msgstr "تُتتبَّع مسارات OK الأخرى في المستودع البعيد:"
@@ -11628,6 +11687,14 @@ msgstr "إعادة الاتصال مطلوبة"
msgid "Reconnect required to keep syncing."
msgstr "يلزم إعادة الاتصال لمتابعة المزامنة."
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Add a token for this host in Settings, or replace the one stored."
+msgstr "يلزم إعادة الاتصال لمتابعة المزامنة. أضف رمزًا لهذا المضيف في الإعدادات، أو استبدل الرمز المخزّن."
+
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Check the SSH key or saved credentials git uses for this host."
+msgstr "يلزم إعادة الاتصال لمتابعة المزامنة. تحقق من مفتاح SSH أو بيانات الاعتماد المحفوظة التي يستخدمها git لهذا المضيف."
+
#: src/presence/use-sync-toasts.ts
msgid "Reconnected"
msgstr "أُعيد الاتصال"
@@ -14819,6 +14886,10 @@ msgstr "لا تطابق قائمة المهارات مخططها."
msgid "The source folder itself does not move."
msgstr "لا يتحرك مجلد المصدر نفسه."
+#: src/components/SyncStatusBadge.tsx
+msgid "The stored token is missing the permissions this host needs to push."
+msgstr "ينقص الرمز المخزّن الصلاحيات التي يحتاجها هذا المضيف للدفع."
+
#: src/components/TemplateProperties.tsx
msgid "The template's filename (without `.md`)."
msgstr "اسم ملف القالب (بدون `.md`)."
@@ -14877,6 +14948,10 @@ msgstr "لم يتم العثور على الملف التنفيذي terminal.she
msgid "The token needs the repo and read:user scopes."
msgstr "يحتاج الرمز إلى نطاقي repo وread:user."
+#: src/components/settings/AccountSection.tsx
+msgid "The username git sends with the token. Some hosts expect a fixed value: type <0>x-bitbucket-api-token-auth</0> for a Bitbucket API token, <1>x-token-auth</1> for a Bitbucket repository or workspace access token, or <2>oauth2</2> for GitLab. For Gitea, use your Gitea username. Azure DevOps accepts any value."
+msgstr "اسم المستخدم الذي يرسله git مع الرمز. بعض المضيفات تتوقع قيمة ثابتة: اكتب <0>x-bitbucket-api-token-auth</0> لرمز API في Bitbucket، أو <1>x-token-auth</1> لرمز وصول المستودع أو مساحة العمل في Bitbucket، أو <2>oauth2</2> في GitLab. في Gitea، استخدم اسم المستخدم الخاص بك في Gitea. يقبل Azure DevOps أي قيمة."
+
#: src/lib/tab-session-restore-recovery-notice.ts
msgid "The workspace opened without it so the app could start."
msgstr "فُتحت مساحة العمل بدونه حتى يتمكن التطبيق من البدء."
@@ -15405,10 +15480,6 @@ msgstr "هذا المشروع ليس مستودع git، لذا أشجار الع
msgid "This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."
msgstr "يعيش هذا المشروع على هذا الجهاز وحده. اربطه بـ GitHub لنسخه احتياطيًا ومشاركته مع آخرين."
-#: src/components/settings/AccountSection.tsx
-msgid "This project's git remote is on {host}, which OpenKnowledge doesn't recognize as a GitHub host. If {host} runs GitHub Enterprise Server, add it to GitHub Enterprise Server hosts below, then restart OpenKnowledge."
-msgstr "المستودع البعيد لـ git الخاص بهذا المشروع موجود على {host}، ولا يتعرّف عليه OpenKnowledge كمضيف GitHub. إذا كان {host} يشغّل GitHub Enterprise Server، فأضفه في مضيفو GitHub Enterprise Server أدناه، ثم أعد تشغيل OpenKnowledge."
-
#: src/components/DocumentErrorBoundary.tsx
msgid "This project's running server doesn't support live editing. Restart OpenKnowledge to fix."
msgstr "لا يدعم خادم هذا المشروع العامل التحرير الحي. أعد تشغيل OpenKnowledge للإصلاح."
@@ -15505,6 +15576,7 @@ msgid "This usually means one of:"
msgstr "يعني هذا عادةً أحد الأمور التالية:"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
msgid "This window can't store a token — open Settings from the main app window."
msgstr "لا تستطيع هذه النافذة تخزين رمز — افتح الإعدادات من نافذة التطبيق الرئيسية."
@@ -15658,6 +15730,15 @@ msgstr "بدّل تنسيق التسطير."
msgid "Toggles the pattern {0}/**"
msgstr "يبدّل النمط {0}/**"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "token"
+msgstr "رمز"
+
+#: src/components/settings/AccountSection.tsx
+msgid "Token stored for {login} on {host}. To remove it, run <0>ok auth signout --host {host}</0>."
+msgstr "تم تخزين الرمز لـ {login} على {host}. لإزالته، شغّل <0>ok auth signout --host {host}</0>."
+
#: src/components/SkillBundlePreview.tsx
#: src/components/SkillProperties.tsx
msgid "tokens"
@@ -16244,6 +16325,10 @@ msgstr "المستخدم"
msgid "User plugins are personal to this device — turn them on or off here. Each enabled plugin gets its own page under Plugins in the settings sidebar."
msgstr "إضافات المستخدم خاصة بهذا الجهاز — شغّلها أو أوقفها هنا. تحصل كل إضافة مفعّلة على صفحتها الخاصة تحت «الإضافات» في الشريط الجانبي للإعدادات."
+#: src/components/settings/AccountSection.tsx
+msgid "Username"
+msgstr "اسم المستخدم"
+
#: src/components/settings/SearchSection.tsx
msgid "Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."
msgstr "يُستخدم متغير البيئة <0>OK_EMBEDDINGS_API_KEY</0> (مُدار خارج OpenKnowledge)."
diff --git a/packages/app/src/locales/bn/messages.json b/packages/app/src/locales/bn/messages.json
index c68eae0b6..185c37003 100644
--- a/packages/app/src/locales/bn/messages.json
+++ b/packages/app/src/locales/bn/messages.json
@@ -37,6 +37,9 @@
],
"-l6jM7": ["+ বোতাম দিয়ে চ্যাট শুরু করুন, বা কোনো পৃষ্ঠা থেকে এজেন্ট চালু করুন।"],
"-lCAuQ": ["গ্রাফ লোড হচ্ছে"],
+ "-nA68n": [
+ "GitLab, Gitea, Bitbucket, Azure DevOps বা স্ব-হোস্ট করা git সার্ভারের জন্য একটি প্রবেশ টোকেন যোগ করুন। টোকেন না থাকলে git ওই হোস্টের জন্য আগে থেকে সংরক্ষিত শংসাপত্র ব্যবহার করে; টোকেন থাকলে OpenKnowledge তার বদলে টোকেনটি ব্যবহার করে।"
+ ],
"-o5XAG": [
"আপনার নোট ও অ্যাপের সংস্করণসহ ব্যক্তিগতভাবে OpenKnowledge দলের কাছে পাঠানো হয়। কখনও প্রকাশ্যে প্রকাশ করা হয় না।"
],
@@ -233,6 +236,7 @@
"1vczDE": [["displayName"], " Desktop খুলুন"],
"1vn0CI": ["সার্ভারের প্রতিক্রিয়া অবৈধ"],
"1xui0Q": ["স্থানীয় ফাইল লোড করতে ব্যর্থ"],
+ "1yHVE-": ["যোগ করা হচ্ছে"],
"2-3Mlu": [["name"], " থেকে পিন সরানো যায়নি"],
"20LVKb": ["এই চ্যাটের বাইরের কিছু এজেন্ট প্রসেসটিকে থামতে বলেছে (", ["signal"], ")।"],
"2277Tu": ["গ্রাফ গুটিয়ে নিন"],
@@ -457,6 +461,14 @@
"4mp6Tv": ["OpenKnowledge ইনস্টল করা স্কিলগুলির তালিকা দেখিয়েছে"],
"4niEzY": ["স্যান্ডবক্স করা HTML এমবেড — HTML লিখুন, রেন্ডার করা প্রাকদর্শন সঙ্গে সঙ্গে দেখুন।"],
"4nj6n8": ["/api/config HTTP ", ["code"], " ফিরিয়েছে"],
+ "4p8Baj": [
+ ["host"],
+ "-এ ",
+ ["login"],
+ "-এর জন্য টোকেন সংরক্ষিত হয়েছে। এটি সরাতে <0>ok auth signout --host ",
+ ["host"],
+ "</0> চালান।"
+ ],
"4pDZ2N": ["\"", ["0"], "\"-কে অন্য প্রতিটি জায়গা থেকে সরানো হয়েছে — এর উৎস ফোল্ডার এখনও লোড হয়"],
"4r6p_B": [
"এই কমান্ডে লুকানো অক্ষর আছে, যার ফলে এটি আসলে যা চলে তার থেকে আলাদা দেখাতে পারে। এগুলো এখানে ⟨U+…⟩ হিসেবে দেখানো হয়েছে।"
@@ -707,13 +719,6 @@
"7YRrJ9": [
"OpenKnowledge ডেস্কটপ অ্যাপে পাওয়া যায়। টার্মিনাল থেকে <0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2> ব্যবহার করুন।"
],
- "7_I248": [
- "এই প্রজেক্টের git রিমোট ",
- ["host"],
- "-এ আছে, যাকে OpenKnowledge GitHub হোস্ট হিসেবে চেনে না। ",
- ["host"],
- "-এ যদি GitHub Enterprise Server চলে, তবে নিচের GitHub Enterprise Server হোস্ট অংশে এটি যোগ করুন, তারপর OpenKnowledge আবার চালু করুন।"
- ],
"7_bFEL": ["ক্রম বদলাতে ", ["patternText"], " টেনে আনুন"],
"7a0YcF": ["শুরু করতে <0>স্পেস</0> চাপুন বা blob-এ ট্যাপ করুন"],
"7aNk5D": ["OpenKnowledge ", ["subject"], " সম্পাদনা করেছে"],
@@ -742,6 +747,7 @@
"7lFX_h": ["এখনই দিক পরিবর্তন করুন"],
"7m3Ade": ["ইনস্টল:"],
"7qRHf0": ["Claude Chat ও Cowork-এর জন্য ইনস্টল করুন"],
+ "7sNhEz": ["ব্যবহারকারীর নাম"],
"7uBlRT": ["ফোকাস করা ফাইল-ট্রি আইটেমটি কপি করুন যাতে Paste সেটির প্রতিলিপি বানাতে পারে।"],
"7vxWET": ["প্যাক প্রিভিউ অনুপলব্ধ।"],
"7wogIQ": [["0", "plural", { "one": ["প্লাগইন"], "other": ["প্লাগইন"] }]],
@@ -880,6 +886,7 @@
"9bCiQ8": ["কোনো পাতার আগত গ্রাফ লিংক অনুপস্থিত নয়।"],
"9bG48P": ["পাঠানো হচ্ছে"],
"9clcD5": ["#", ["chip"], " ট্যাগযুক্ত নথি খুলুন"],
+ "9djC8C": ["GitHub রিপোজিটরি ব্রাউজ ও প্রকাশ করতে একটি GitHub অ্যাকাউন্ট যুক্ত করুন।"],
"9euN0m": [
[
"count",
@@ -981,7 +988,6 @@
["position"],
"তম"
],
- "AeXO77": ["অ্যাকাউন্ট"],
"AgoIW4": [
["source"],
": ",
@@ -994,6 +1000,7 @@
["detail"]
],
"AhoGwP": ["OpenKnowledge সংযুক্তি সেট আপ করুন"],
+ "Ai2U7L": ["হোস্ট"],
"AiNMQ7": [
"এই প্রকল্পটি কেবল এই কম্পিউটারেই আছে। এর ব্যাকআপ রাখতে ও অন্যদের সঙ্গে ভাগ করতে এটি GitHub-এর সঙ্গে যুক্ত করুন।"
],
@@ -1262,7 +1269,6 @@
"E2Mv-X": ["সোর্স কপি করুন"],
"E4XYYH": ["এই প্রকল্পের জন্য টার্মিনাল চালু করুন"],
"E5WeIy": ["সবচেয়ে সম্প্রতি বন্ধ করা সম্পাদক ট্যাবটি আবার খুলুন।"],
- "E6lrpp": ["আপনার রিপোজিটরি ব্রাউজ ও সিঙ্ক করতে OpenKnowledge যে GitHub অ্যাকাউন্ট ব্যবহার করে তা সামলান।"],
"E7BhZn": ["খালি নোট"],
"E8NbNG": ["ওয়ার্কট্রিগুলি লোড করা যায়নি।"],
"E91VZY": ["নতুন উইন্ডোতে খুলুন"],
@@ -1276,7 +1282,6 @@
"EEYbdt": ["প্রকাশ করুন"],
"EFfGAv": ["সেই বার্তাটি ইতিমধ্যে চলে গেছে — আপনার সম্পাদনা প্রয়োগ হয়নি।"],
"EHu0x2": ["সিঙ্ক হচ্ছে"],
- "EJuO7B": ["আপনার রিপোজিটরি ব্রাউজ ও সিঙ্ক করতে একটি GitHub অ্যাকাউন্ট যুক্ত করুন।"],
"EKwNEe": [
"ক্যাশ করা এমবেডিং যে এন্ডপয়েন্ট ও মডেল সেগুলো তৈরি করেছে তারই, তাই এটি সূচি একেবারে গোড়া থেকে গড়ে।"
],
@@ -1429,6 +1434,9 @@
"FgRAvd": ["লগ ও সিস্টেমের তথ্য"],
"Fhp4Gn": ["প্লাগইন দেখুন"],
"Fim5F3": ["এম্বেডিং"],
+ "FioJgb": [
+ "সিঙ্ক চালিয়ে যেতে আবার সংযোগ করতে হবে। সেটিং-এ এই হোস্টের জন্য একটি টোকেন যোগ করুন, নয়তো সংরক্ষিত টোকেনটি বদলে দিন।"
+ ],
"FiyNln": ["প্রপার্টিতে নির্বাচিত লেখায় যান"],
"FjkaiT": ["ছোট করুন"],
"Fjz6aJ": ["নতুন চ্যাটে পাঠান"],
@@ -1825,6 +1833,9 @@
"KvwJv8": ["কিছু ফাইল তালিকায় নেই: ওয়ার্কিং ট্রিতে অনেক বেশি পরিবর্তন আছে।"],
"Kx881F": [["0"], " পুনরুদ্ধার করা হয়েছে।"],
"KziH2K": ["দ্রুত"],
+ "L-crEu": [
+ "git এই হোস্টে প্রমাণীকরণ করতে পারেনি। এর জন্য git যে SSH কী বা সংরক্ষিত শংসাপত্র ব্যবহার করে তা পরীক্ষা করুন।"
+ ],
"L-rMC9": ["ডিফল্টে রিসেট করুন"],
"L1BQTH": [["0"], " এখনও ইনস্টল করা নেই — এর ডাউনলোড পাতা খোলা হচ্ছে।"],
"L1ZE3M": ["নথির পরিসংখ্যান"],
@@ -1884,6 +1895,9 @@
"LRgZAt": [["owner"], "/", ["name"], " আগে থেকেই আছে"],
"LSuMte": [["totalCount"], "টির মধ্যে ", ["0"], "টি"],
"LTeJuX": ["পূর্ণ পর্দা চালু বা বন্ধ করুন"],
+ "LVWA9A": [
+ "এই git হোস্টের জন্য প্রমাণীকরণ ব্যর্থ হয়েছে। সেটিং-এ এর জন্য একটি টোকেন যোগ করুন, নয়তো সংরক্ষিত টোকেনটি বদলে দিন।"
+ ],
"LXIm4m": ["প্রসঙ্গ উইন্ডো"],
"LXdWeS": ["মাঝারি বিভাগ শিরোনাম।"],
"LXfNU-": ["নেভিগেশন ও পরামর্শ"],
@@ -2002,6 +2016,7 @@
"Mj8R8K": ["স্কিল ইনস্টল করা যায়নি: ", ["0"]],
"MmDDWK": ["সম্প্রতি খোলা"],
"Mnavhe": [["propPanelDescriptorLabel"], " প্রপার্টি"],
+ "MpZRQy": ["Git"],
"MqQoV-": ["আপনি কী বানাতে চান তার বর্ণনা দিন, একটি খালি ফাইল শুরু করুন, বা কোনো টেমপ্লেট থেকে কাঠামো গড়ুন।"],
"MqsbfN": ["বাইরের লিংকের প্রাকদর্শন চালু করবেন?"],
"MrUmCD": ["অজানা বিল্ড ব্যর্থতা"],
@@ -2171,6 +2186,7 @@
"OPOiKn": ["বিষয়বস্তুর নিয়ম"],
"OTF92M": ["লেবেল <0>(ঐচ্ছিক প্রদর্শিত লেখা)</0>"],
"OVjNeX": ["টার্মিনাল ", ["0"]],
+ "OWs-8P": ["এখানে যোগ করা টোকেন শুধু HTTPS রিমোটে প্রযোজ্য, আর এই প্রকল্পের রিমোট HTTPS ব্যবহার করে না।"],
"OX2Neh": ["ইনলাইন কোড"],
"OXb_Df": ["সেটিং-এর বিষয়বস্তু"],
"OXdGnd": ["সমস্যা"],
@@ -2289,6 +2305,7 @@
["filePath"],
"-এর কনফ্লিক্টটি বুঝতে আমাকে সাহায্য করুন। OpenKnowledge-এর কনফ্লিক্ট দৃশ্যে কী তুলনা করা উচিত তা ব্যাখ্যা করুন; আমি সেখানেই সমাধান বেছে নিয়ে প্রয়োগ করব।"
],
+ "Q14Keq": ["Bitbucket"],
"Q1mtyd": ["সাইডবার লুকান"],
"Q5fqMz": ["সংযোগ ত্রুটি — আবার চেষ্টা করুন"],
"Q6hhn8": ["পছন্দ"],
@@ -2552,6 +2569,7 @@
"SiUUCS": ["পরবর্তী মিল"],
"SkMZlS": ["<0>", ["targetGitPath"], "</0> সরানো যায়নি: ", ["removeGitError"]],
"SkTkKV": ["এজেন্ট থামছে না। ফোর্স স্টপ এই চ্যাট বন্ধ করবে এবং এজেন্ট থেকে বেরিয়ে যাবে।"],
+ "SkUcEr": ["প্রবেশ টোকেন"],
"Ske_wc": [
"ব্যবহারকারী প্লাগইন এই যন্ত্রেই সীমাবদ্ধ — সেগুলো এখানে চালু বা বন্ধ করুন। চালু করা প্রতিটি প্লাগইন সেটিং সাইডবারে Plugins-এর নিচে নিজের পাতা পায়।"
],
@@ -2861,9 +2879,6 @@
"XAyxsa": ["রিমোট ব্রাঞ্চ চেক আউট করুন"],
"XBBZnv": ["লিংকের লক্ষ্য \"", ["shown"], "\" কোনো বিদ্যমান নথিকে নির্দেশ করে না।"],
"XBgr2S": ["এখানে কপি করুন"],
- "XBpH6-": [
- "OpenKnowledge এই প্রজেক্টের git রিমোটে কোনো হোস্টনেম খুঁজে পায়নি, তাই কোন GitHub সার্ভারে সাইন ইন করতে হবে তা বুঝতে পারছে না।"
- ],
"XDzAnp": ["নতুন ট্যাবে খোলে"],
"XF1kgP": [["source"], " থেকে সবকিছু ইতিমধ্যে আপ টু ডেট"],
"XGKy1z": ["ছবি দেখানো যায়নি"],
@@ -3298,6 +3313,9 @@
"arUUsK": ["পণ্যের হালনাগাদ"],
"ax9kie": ["লিংক প্রাকদর্শনের সেটিং এখনও লোড হয়নি — একটু পরে আবার চেষ্টা করুন"],
"axQ1h6": ["আর কিছু যোগ করতে চান? (ঐচ্ছিক)"],
+ "azrR7I": [
+ "টোকেনের সাথে git যে ব্যবহারকারীর নাম পাঠায়। কিছু হোস্ট একটি নির্দিষ্ট মান আশা করে: Bitbucket API টোকেনের জন্য <0>x-bitbucket-api-token-auth</0>, Bitbucket রিপোজিটরি বা ওয়ার্কস্পেস প্রবেশ টোকেনের জন্য <1>x-token-auth</1>, অথবা GitLab-এর জন্য <2>oauth2</2> লিখুন। Gitea-র জন্য আপনার Gitea ব্যবহারকারীর নাম দিন। Azure DevOps যেকোনো মান গ্রহণ করে।"
+ ],
"b18t0_": ["পার্থক্য বন্ধ করুন"],
"b1FDss": ["শুরুতে স্ক্রল করুন"],
"b2ezG_": ["দুটোই রাখা হয়েছে — \"", ["0"], "\" এখন নিজেই একটি স্কিল"],
@@ -3607,6 +3625,7 @@
"e8zRrb": ["Files দেখান"],
"e8zYa8": [["shareBranch"], " কোনো ওয়ার্কট্রিতে খোলা যায়নি। আবার চেষ্টা করুন।"],
"e9sHSO": ["যেখানে ছেড়েছিলেন সেখান থেকেই শুরু করুন"],
+ "eAYJMv": ["টোকেন"],
"eBGWcy": [
"Open Knowledge-এর টুলগুলো উপলব্ধ নেই, কারণ প্রোজেক্ট ফোল্ডারটি নেই, সেটিতে প্রবেশ করা যাচ্ছে না অথবা সেটি বদলে গেছে। ফোল্ডারের অবস্থান ও অনুমতি পরীক্ষা করে আবার চেষ্টা করুন।"
],
@@ -4164,6 +4183,7 @@
"jZ_E5M": ["আনা ব্যর্থ — বিস্তারিত জানতে সার্ভার লগ দেখুন।"],
"j_Z6g7": ["ভাগ করা ডিফল্ট"],
"jbSG8V": ["Files দেখান (", ["sidebarShortcutLabel"], ")"],
+ "jbhCDS": ["অন্যান্য Git হোস্ট"],
"jcEoUi": ["ডান প্যানেলে সরান"],
"jdGUeI": ["টেমপ্লেট তৈরি করা যায়নি: ", ["error"]],
"jeCFV7": ["ডান পাশের নতুন প্যানে সরান"],
@@ -4716,6 +4736,9 @@
"pckX1A": [["0", "plural", { "one": ["#", " ব্যবহার"], "other": ["#", " ব্যবহার"] }]],
"pcqlQu": [["0", "plural", { "one": ["ফোল্ডার"], "other": ["ফোল্ডার"] }]],
"pd0UH2": ["ডানে সারিবদ্ধ করুন"],
+ "pd6t3G": [
+ "OpenKnowledge আপনার git হোস্টগুলোর সঙ্গে সংযোগ করতে যে অ্যাকাউন্ট ও প্রবেশ টোকেন ব্যবহার করে সেগুলো সামলান।"
+ ],
"peq20S": ["এই চ্যাটে ব্রাউজার উপলভ্য নয়, কারণ এটি সেট আপ করা যায়নি। OpenKnowledge-এর লগে বিস্তারিত আছে।"],
"pfkaJ2": ["YAML বা JSON, যেকোনো base16 বিন্যাসে।"],
"pgDlbM": ["ডেভেলপার টুল চালু বা বন্ধ করুন"],
@@ -4822,6 +4845,7 @@
"qi17kj": ["এই ওয়ার্কস্পেসের একটি .excalidraw বোর্ডের লাইভ স্ন্যাপশট এম্বেড করুন।"],
"qi1F96": ["File Explorer-এ দেখান"],
"qiRoLb": ["এই সপ্তাহে আমি যা যা বদলেছি তার সারসংক্ষেপ দিন"],
+ "qimTXH": ["OpenKnowledge এই প্রকল্পের জন্য GitHub-এ সাইন ইন করতে পারে না।"],
"qioCwA": ["পাতা ", ["pageNumber"], "-এ যান"],
"qjHMHf": ["সিঙ্ক নিষ্ক্রিয় করতে ব্যর্থ — ", ["detail"]],
"qkqG0b": ["আপস্ট্রিমেরটি নিন"],
@@ -4873,6 +4897,9 @@
"rVxu1k": ["এখনও কোনো পাতা এখানে লিংক করে না।"],
"rXz97P": ["আইটেমের সংখ্যায়িত তালিকা।"],
"rZ9HZq": ["করণীয়"],
+ "rZFxkH": [
+ "git যে হোস্ট নামে সংযোগ করে সেটি লিখুন, ঐচ্ছিক :port সহ এবং কোনো স্কিম বা পাথ ছাড়া, যেমন git.example.com।"
+ ],
"rZVMkf": ["দৃশ্য সম্পাদকের বদলানোর ইনপুট ফোকাসে"],
"radOpL": ["ছবি ", ["identity"], "। রেফারেন্সে যান।"],
"rageVb": ["সরাসরি প্রাকদর্শন প্যানেলসহ কাস্টম HTML (স্যান্ডবক্স করা iframe)।"],
@@ -5073,6 +5100,9 @@
"tlGXxX": ["স্বয়ংক্রিয় (শুধু টানুন)"],
"tnG-m6": ["স্বয়ংক্রিয় সিঙ্ক থেমে আছে — আবার শুরু করতে সাইন ইন করুন।"],
"toyw51": ["Mermaid চিত্রের নিয়ন্ত্রণ"],
+ "tpOnU9": [
+ "OpenKnowledge এই হোস্টের জন্য কোনো ক্রেডেনশিয়াল সংরক্ষণ করেনি। সেটিং-এ একটি টোকেন যোগ করুন, নয়তো git-কে তার আগে থেকেই থাকা ক্রেডেনশিয়াল ব্যবহার করতে দিন।"
+ ],
"tqQBwN": ["যেকোনো স্ক্রিপ্ট পর্যালোচনার জন্য দেখানো হয়, কখনও চালানো হয় না।"],
"troubleshooting.claude-desktop.per-tool-approval": [
["agent"],
@@ -5229,6 +5259,7 @@
"uoJF_D": ["এটি সেট আপ করা বা শুরু করা খুব কঠিন ছিল"],
"uqs8Gd": [["others", "plural", { "one": ["আরও ", "#", "টি"], "other": ["আরও ", "#", "টি"] }]],
"ur2XSb": ["দৃশ্য সম্পাদক"],
+ "uraHF0": ["GitLab"],
"uuoHOU": ["কমান্ড ব্যর্থ।"],
"uwzRx4": [
"ধীর বা কম মেমোরির এমবেডিং সার্ভারের জন্য ইনডেক্সিং অনুরোধের আকার ও সময়সীমা সমন্বয় করুন। বেশিরভাগ ক্ষেত্রে ডিফল্ট মানই রাখা উচিত।"
@@ -5320,6 +5351,9 @@
"vvWZnu": ["পার্থক্য অনুপলব্ধ"],
"vwV-kH": ["ফাইল ঠিক করার কাজ অপ্রত্যাশিতভাবে থেমে গেছে।"],
"vy_VIN": ["git-এ হিসাবভুক্ত — হালনাগাদ আপনার রিপোজিটরির মাধ্যমে আসে (pull বা CI), স্বয়ংক্রিয় হালনাগাদে নয়"],
+ "w-Wt3H": [
+ "সিঙ্ক চালিয়ে যেতে আবার সংযোগ করতে হবে। এই হোস্টের জন্য git যে SSH কী বা সংরক্ষিত শংসাপত্র ব্যবহার করে তা পরীক্ষা করুন।"
+ ],
"w0YVAE": ["স্কিল নোড দেখান"],
"w3tVpc": ["এখনও কোনো লিংক নেই। গ্রাফ গড়তে উইকি লিংক বা markdown লিংক যোগ করুন।"],
"w3vFfL": ["Files লুকান"],
@@ -5431,7 +5465,6 @@
"x57cJf": ["লিংক খুলুন"],
"xAlHfe": [["basename"], " — টেক্সট সম্পাদক"],
"xBFg6z": [["0"], " প্লাগইন থেকে"],
- "xBjIs7": ["এই প্রজেক্টের জন্য GitHub সাইন-ইন উপলব্ধ নয়"],
"xCJdfg": ["মুছুন"],
"xCdTnb": ["নতুন ট্যাব বন্ধ করুন"],
"xD4Xm2": ["আনা"],
@@ -5443,6 +5476,9 @@
"xG4tb6": ["\"", ["docName"], "\"-এর সঙ্গে সংযোগ হারিয়েছে।"],
"xG8Ish": ["পরিকল্পনায় নেই"],
"xHGM4U": ["HTML প্রাকদর্শন লুকান"],
+ "xJ7qrb": [
+ "এই git হোস্টের জন্য কোনো ক্রেডেনশিয়াল সংরক্ষিত নেই। সেটিং-এ একটি টোকেন যোগ করুন, নয়তো git-কে তার আগে থেকেই থাকা ক্রেডেনশিয়াল ব্যবহার করতে দিন।"
+ ],
"xK291b": ["দুই পাতা (বিজোড়)"],
"xKDsGS": [["1"], "-এ লাইন ", ["0"], "-এ যান"],
"xKcXG6": [
@@ -5525,6 +5561,7 @@
"yLEyuq": ["আপনার ইনবক্সে পণ্যের হালনাগাদ।"],
"yLq4w4": ["বিভাজক"],
"yLwx9e": ["একটি মূল ডিরেক্টরিই সিমলিংক — এটি ফিরিয়ে নিতে সেই ফোল্ডারটিকেই আনলিংক করুন।"],
+ "yLyiQV": ["সংরক্ষিত টোকেনে সেই অনুমতিগুলো নেই যা পুশ করতে এই হোস্টের দরকার।"],
"yMgL_E": ["খোঁজার ফিল্ডে নেভিগেশন"],
"yOjRUV": ["কোনো AI টুল পাওয়া যায়নি। এই স্কিল ব্যবহার করতে একটি ইনস্টল করুন।"],
"yQE2r9": ["লোড হচ্ছে"],
@@ -5612,6 +5649,7 @@
"zLak8b": ["নতুন ট্যাব সক্রিয় করুন"],
"zMmwh4": ["একটি থিম বেছে নিন বা নিজের থিম তৈরি করুন।"],
"zWZBPx": ["ধরন বদলেছে"],
+ "zXZJoN": ["টোকেন যোগ করুন"],
"zXj1rA": ["অর্থ অনুযায়ী খুঁজুন"],
"zYp8Sr": [
"<0>পরিবর্তিত</0> ব্যাজ সেই নিয়মগুলো চিহ্নিত করে যেগুলো আপনার কনফিগ স্পষ্টভাবে নির্ধারণ করে — সরাসরি, বা <1>extends</1>-এর মাধ্যমে উত্তরাধিকারসূত্রে। চিহ্নহীন নিয়মগুলো তাদের ডিফল্ট অবস্থায় থাকে।"
diff --git a/packages/app/src/locales/bn/messages.po b/packages/app/src/locales/bn/messages.po
index 766b3a9e5..942ef4c72 100644
--- a/packages/app/src/locales/bn/messages.po
+++ b/packages/app/src/locales/bn/messages.po
@@ -1544,6 +1544,10 @@ msgstr "<0>{trimmedSlug}</0> নামের একটি টেমপ্লে
msgid "A title, description, tags — anything that describes this folder."
msgstr "একটি শিরোনাম, বিবরণ, ট্যাগ — এই ফোল্ডারকে বর্ণনা করে এমন যা কিছু।"
+#: src/components/settings/AccountSection.tsx
+msgid "A token added here only applies to HTTPS remotes, and this project's remote doesn't use HTTPS."
+msgstr "এখানে যোগ করা টোকেন শুধু HTTPS রিমোটে প্রযোজ্য, আর এই প্রকল্পের রিমোট HTTPS ব্যবহার করে না।"
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "A worktree folder for {shareBranch} already exists."
msgstr "{shareBranch}-এর জন্য একটি ওয়ার্কট্রি ফোল্ডার আগে থেকেই আছে।"
@@ -1596,9 +1600,8 @@ msgid "Accept their deletion"
msgstr "তাদের মুছে ফেলা গ্রহণ করুন"
#: src/components/settings/AccountSection.tsx
-#: src/components/settings/SettingsDialogShell.tsx
-msgid "Account"
-msgstr "অ্যাকাউন্ট"
+msgid "Access token"
+msgstr "প্রবেশ টোকেন"
#: src/components/TemplateRow.tsx
msgid "Actions for {label}"
@@ -1677,6 +1680,10 @@ msgstr "একটি প্রপার্টি যোগ করুন"
msgid "Add a starter pack"
msgstr "একটি স্টার্টার প্যাক যোগ করুন"
+#: src/components/settings/AccountSection.tsx
+msgid "Add an access token for a GitLab, Gitea, Bitbucket, Azure DevOps or self-hosted git server. Without one, git uses the credentials it already has saved for that host; with one, OpenKnowledge uses the token instead."
+msgstr "GitLab, Gitea, Bitbucket, Azure DevOps বা স্ব-হোস্ট করা git সার্ভারের জন্য একটি প্রবেশ টোকেন যোগ করুন। টোকেন না থাকলে git ওই হোস্টের জন্য আগে থেকে সংরক্ষিত শংসাপত্র ব্যবহার করে; টোকেন থাকলে OpenKnowledge তার বদলে টোকেনটি ব্যবহার করে।"
+
#: src/components/settings/OkignoreSection.tsx
msgid "Add another pattern"
msgstr "আরেকটি প্যাটার্ন যোগ করুন"
@@ -1806,6 +1813,12 @@ msgstr "অভিধানে যোগ করুন"
msgid "Add to prompt"
msgstr "প্রম্পটে যোগ করুন"
+#: src/components/settings/AccountSection.tsx
+#: src/components/SyncStatusBadge.tsx
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Add token"
+msgstr "টোকেন যোগ করুন"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Add value"
msgstr "মান যোগ করুন"
@@ -1816,6 +1829,10 @@ msgstr "মান যোগ করুন"
msgid "Added"
msgstr "যোগ করা হয়েছে"
+#: src/components/settings/AccountSection.tsx
+msgid "Adding"
+msgstr "যোগ করা হচ্ছে"
+
#: src/components/settings/AgentConnectionDialogs.tsx
msgid "Adds a global OpenKnowledge MCP entry for this agent."
msgstr "এই এজেন্টের জন্য একটি গ্লোবাল OpenKnowledge MCP এন্ট্রি যোগ করে।"
@@ -2331,6 +2348,10 @@ msgstr "সংযুক্তির মোট আকার ৩ MB-র কম হ
msgid "Authenticated as {login}."
msgstr "{login} হিসেবে প্রমাণীকৃত।"
+#: src/components/SyncStatusBadge.tsx
+msgid "Authentication failed for this git host. Add a token for it in Settings, or replace the one stored."
+msgstr "এই git হোস্টের জন্য প্রমাণীকরণ ব্যর্থ হয়েছে। সেটিং-এ এর জন্য একটি টোকেন যোগ করুন, নয়তো সংরক্ষিত টোকেনটি বদলে দিন।"
+
#: src/editor/slash-command/component-items.tsx
msgid "Authoritative content; mirrored verbatim everywhere it's referenced."
msgstr "প্রামাণিক বিষয়বস্তু; যেখানেই উল্লেখ করা হোক হুবহু প্রতিফলিত।"
@@ -2532,6 +2553,11 @@ msgstr "বড় বিভাগ শিরোনাম।"
msgid "Bird wiki"
msgstr "পাখি উইকি"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "Bitbucket"
+msgstr "Bitbucket"
+
#: src/components/NewItemDialog.tsx
msgid "Blank note"
msgstr "খালি নোট"
@@ -3601,8 +3627,8 @@ msgid "Connect"
msgstr "যুক্ত করুন"
#: src/components/settings/AccountSection.tsx
-msgid "Connect a GitHub account to browse and sync your repositories."
-msgstr "আপনার রিপোজিটরি ব্রাউজ ও সিঙ্ক করতে একটি GitHub অ্যাকাউন্ট যুক্ত করুন।"
+msgid "Connect a GitHub account to browse and publish GitHub repositories."
+msgstr "GitHub রিপোজিটরি ব্রাউজ ও প্রকাশ করতে একটি GitHub অ্যাকাউন্ট যুক্ত করুন।"
#: src/components/settings/SyncSection.tsx
msgid "Connect an existing repository"
@@ -3694,6 +3720,7 @@ msgid "Connection dropped"
msgstr "সংযোগ বিচ্ছিন্ন হয়েছে"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Connection error — try again"
msgstr "সংযোগ ত্রুটি — আবার চেষ্টা করুন"
@@ -5933,6 +5960,10 @@ msgstr "{minimum} থেকে {maximum} এর মধ্যে একটি প
msgid "Enter at least 3 characters to search by meaning."
msgstr "অর্থের ভিত্তিতে অনুসন্ধান করতে অন্তত ৩টি অক্ষর লিখুন।"
+#: src/components/settings/AccountSection.tsx
+msgid "Enter the host name git connects to, with an optional :port and no scheme or path, for example git.example.com."
+msgstr "git যে হোস্ট নামে সংযোগ করে সেটি লিখুন, ঐচ্ছিক :port সহ এবং কোনো স্কিম বা পাথ ছাড়া, যেমন git.example.com।"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Enter the public origin your tunnel serves, for example https://notes.example.com"
msgstr "আপনার টানেল যে পাবলিক অরিজিন পরিবেশন করে তা লিখুন, উদাহরণস্বরূপ https://notes.example.com"
@@ -6408,6 +6439,7 @@ msgid "Failed to start sign-in — try again"
msgstr "সাইন-ইন শুরু করতে ব্যর্থ — আবার চেষ্টা করুন"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Failed to store the token — try again"
msgstr "টোকেন সংরক্ষণ করতে ব্যর্থ — আবার চেষ্টা করুন"
@@ -6881,6 +6913,11 @@ msgctxt "settings search keyword"
msgid "GHES"
msgstr "GHES"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Git"
+msgstr "Git"
+
#: src/components/ExploreSkills.tsx
msgid "Git & PRs"
msgstr "Git ও PR"
@@ -6889,6 +6926,10 @@ msgstr "Git ও PR"
msgid "Git can't track this folder — it's empty or contains only ignored files. The link won't work until you add a tracked document."
msgstr "Git এই ফোল্ডারের হিসাব রাখতে পারে না — এটি খালি বা এতে কেবল উপেক্ষিত ফাইল আছে। আপনি একটি হিসাবভুক্ত নথি যোগ না করা পর্যন্ত লিংকটি কাজ করবে না।"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it."
+msgstr "git এই হোস্টে প্রমাণীকরণ করতে পারেনি। এর জন্য git যে SSH কী বা সংরক্ষিত শংসাপত্র ব্যবহার করে তা পরীক্ষা করুন।"
+
#: src/components/RecentProjectsMenu.tsx
msgid "Git has locked this worktree, but it can still be opened."
msgstr "Git এই ওয়ার্কট্রিটি লক করেছে, তবে এটি এখনও খোলা যাবে।"
@@ -6948,10 +6989,6 @@ msgstr "GitHub Enterprise Server হোস্ট"
msgid "GitHub sign-in is missing or expired. Reconnect to resume syncing."
msgstr "GitHub সাইন-ইন অনুপস্থিত বা এর মেয়াদ শেষ। সিঙ্ক আবার শুরু করতে পুনরায় যুক্ত হোন।"
-#: src/components/settings/AccountSection.tsx
-msgid "GitHub sign-in isn't available for this project"
-msgstr "এই প্রজেক্টের জন্য GitHub সাইন-ইন উপলব্ধ নয়"
-
#: src/components/ImportSkillForm.tsx
msgid "GitHub, a git URL, or a local path."
msgstr "GitHub, একটি git URL, বা একটি স্থানীয় পথ।"
@@ -6960,6 +6997,11 @@ msgstr "GitHub, একটি git URL, বা একটি স্থানীয
msgid "github.com is always recognized, so it doesn't need to be added."
msgstr "github.com সবসময় চেনা হয়, তাই এটি যোগ করার দরকার নেই।"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "GitLab"
+msgstr "GitLab"
+
#: src/components/settings/SavedThemesTiles.tsx
msgid "Give it a name before editing its colors."
msgstr "রং সম্পাদনা করার আগে এটিকে একটি নাম দিন।"
@@ -7314,6 +7356,10 @@ msgstr "অনুভূমিক পিল স্ট্রিপ + নিচে
msgid "Horizontal rule that divides sections."
msgstr "বিভাগ ভাগ করে দেওয়া অনুভূমিক রেখা।"
+#: src/components/settings/AccountSection.tsx
+msgid "Host"
+msgstr "হোস্ট"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Hosting is on. The server is running on port {boundPort}. Reach it through your tunnel."
msgstr "হোস্টিং চালু আছে। সার্ভারটি পোর্ট {boundPort}-এ চলছে। আপনার টানেলের মাধ্যমে এটিতে পৌঁছান।"
@@ -8607,8 +8653,8 @@ msgid "Manage skill folders"
msgstr "স্কিল ফোল্ডার সামলান"
#: src/components/settings/AccountSection.tsx
-msgid "Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."
-msgstr "আপনার রিপোজিটরি ব্রাউজ ও সিঙ্ক করতে OpenKnowledge যে GitHub অ্যাকাউন্ট ব্যবহার করে তা সামলান।"
+msgid "Manage the accounts and access tokens OpenKnowledge uses to connect to your git hosts."
+msgstr "OpenKnowledge আপনার git হোস্টগুলোর সঙ্গে সংযোগ করতে যে অ্যাকাউন্ট ও প্রবেশ টোকেন ব্যবহার করে সেগুলো সামলান।"
#: src/components/settings/AgentConnectionDialogs.tsx
#: src/components/settings/AgentConnectionsSection.tsx
@@ -9438,6 +9484,10 @@ msgstr "এই সংস্করণে বিষয়বস্তুর কো
msgid "No content changes in this version"
msgstr "এই সংস্করণে বিষয়বস্তুর কোনো পরিবর্তন নেই"
+#: src/components/SyncStatusBadge.tsx
+msgid "No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "এই git হোস্টের জন্য কোনো ক্রেডেনশিয়াল সংরক্ষিত নেই। সেটিং-এ একটি টোকেন যোগ করুন, নয়তো git-কে তার আগে থেকেই থাকা ক্রেডেনশিয়াল ব্যবহার করতে দিন।"
+
#: src/components/GraphPanel.tsx
msgid "No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."
msgstr "কোনো বিচ্ছিন্ন পাতা নেই। পাতা এখানে কেবল তখনই দেখা যায় যখন তার কোনো আগত ও কোনো বহির্গামী গ্রাফ প্রান্ত থাকে না।"
@@ -10390,6 +10440,10 @@ msgstr "খোলা হচ্ছে…"
msgid "OpenKnowledge"
msgstr "OpenKnowledge"
+#: src/components/AuthModal.tsx
+msgid "OpenKnowledge can't sign in to GitHub for this project."
+msgstr "OpenKnowledge এই প্রকল্পের জন্য GitHub-এ সাইন ইন করতে পারে না।"
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge checked {subject}"
msgstr "OpenKnowledge {subject} পরীক্ষা করেছে"
@@ -10402,10 +10456,6 @@ msgstr "OpenKnowledge প্রকল্প পরীক্ষা করেছ
msgid "OpenKnowledge could not find this agent on this machine."
msgstr "OpenKnowledge এই মেশিনে এই এজেন্টটি খুঁজে পায়নি।"
-#: src/components/settings/AccountSection.tsx
-msgid "OpenKnowledge couldn't find a host name in this project's git remote, so it can't tell which GitHub server to sign in to."
-msgstr "OpenKnowledge এই প্রজেক্টের git রিমোটে কোনো হোস্টনেম খুঁজে পায়নি, তাই কোন GitHub সার্ভারে সাইন ইন করতে হবে তা বুঝতে পারছে না।"
-
#: src/lib/worktree-create-error.ts
msgid "OpenKnowledge couldn't finish setting up this project. The worktree was created but not opened."
msgstr "OpenKnowledge এই প্রজেক্টের সেটআপ শেষ করতে পারেনি। ওয়ার্কট্রি তৈরি হয়েছে, কিন্তু খোলা হয়নি।"
@@ -10462,6 +10512,10 @@ msgstr "OpenKnowledge একটি নথি সম্পাদনা করে
msgid "OpenKnowledge files were removed"
msgstr "OpenKnowledge-এর ফাইল সরানো হয়েছে"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "OpenKnowledge এই হোস্টের জন্য কোনো ক্রেডেনশিয়াল সংরক্ষণ করেনি। সেটিং-এ একটি টোকেন যোগ করুন, নয়তো git-কে তার আগে থেকেই থাকা ক্রেডেনশিয়াল ব্যবহার করতে দিন।"
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge imported {source}"
msgstr "OpenKnowledge {source} আমদানি করেছে"
@@ -10690,6 +10744,11 @@ msgstr "অন্যান্য"
msgid "Other"
msgstr "অন্যান্য"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Other Git hosts"
+msgstr "অন্যান্য Git হোস্ট"
+
#: src/components/settings/SharingSection.tsx
msgid "Other OK paths are tracked upstream:"
msgstr "অন্য OK পথগুলো আপস্ট্রিমে হিসাবভুক্ত:"
@@ -11624,6 +11683,14 @@ msgstr "পুনরায় যুক্ত হওয়া দরকার"
msgid "Reconnect required to keep syncing."
msgstr "সিঙ্ক চালিয়ে যেতে আবার সংযোগ করতে হবে।"
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Add a token for this host in Settings, or replace the one stored."
+msgstr "সিঙ্ক চালিয়ে যেতে আবার সংযোগ করতে হবে। সেটিং-এ এই হোস্টের জন্য একটি টোকেন যোগ করুন, নয়তো সংরক্ষিত টোকেনটি বদলে দিন।"
+
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Check the SSH key or saved credentials git uses for this host."
+msgstr "সিঙ্ক চালিয়ে যেতে আবার সংযোগ করতে হবে। এই হোস্টের জন্য git যে SSH কী বা সংরক্ষিত শংসাপত্র ব্যবহার করে তা পরীক্ষা করুন।"
+
#: src/presence/use-sync-toasts.ts
msgid "Reconnected"
msgstr "পুনরায় যুক্ত হয়েছে"
@@ -14815,6 +14882,10 @@ msgstr "স্কিল তালিকা তার স্কিমার স
msgid "The source folder itself does not move."
msgstr "উৎস ফোল্ডারটি নিজে সরে না।"
+#: src/components/SyncStatusBadge.tsx
+msgid "The stored token is missing the permissions this host needs to push."
+msgstr "সংরক্ষিত টোকেনে সেই অনুমতিগুলো নেই যা পুশ করতে এই হোস্টের দরকার।"
+
#: src/components/TemplateProperties.tsx
msgid "The template's filename (without `.md`)."
msgstr "টেমপ্লেটের ফাইলের নাম (`.md` ছাড়া)।"
@@ -14873,6 +14944,10 @@ msgstr ".ok/local/config.yml-এ terminal.shell এক্সিকিউটে
msgid "The token needs the repo and read:user scopes."
msgstr "টোকেনটির repo ও read:user স্কোপ দরকার।"
+#: src/components/settings/AccountSection.tsx
+msgid "The username git sends with the token. Some hosts expect a fixed value: type <0>x-bitbucket-api-token-auth</0> for a Bitbucket API token, <1>x-token-auth</1> for a Bitbucket repository or workspace access token, or <2>oauth2</2> for GitLab. For Gitea, use your Gitea username. Azure DevOps accepts any value."
+msgstr "টোকেনের সাথে git যে ব্যবহারকারীর নাম পাঠায়। কিছু হোস্ট একটি নির্দিষ্ট মান আশা করে: Bitbucket API টোকেনের জন্য <0>x-bitbucket-api-token-auth</0>, Bitbucket রিপোজিটরি বা ওয়ার্কস্পেস প্রবেশ টোকেনের জন্য <1>x-token-auth</1>, অথবা GitLab-এর জন্য <2>oauth2</2> লিখুন। Gitea-র জন্য আপনার Gitea ব্যবহারকারীর নাম দিন। Azure DevOps যেকোনো মান গ্রহণ করে।"
+
#: src/lib/tab-session-restore-recovery-notice.ts
msgid "The workspace opened without it so the app could start."
msgstr "অ্যাপটি যাতে চালু হতে পারে তাই ওয়ার্কস্পেসটি এটি ছাড়াই খোলা হয়েছে।"
@@ -15401,10 +15476,6 @@ msgstr "এই প্রকল্পটি একটি git রিপোজি
msgid "This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."
msgstr "এই প্রকল্পটি কেবল এই কম্পিউটারেই আছে। এর ব্যাকআপ রাখতে ও অন্যদের সঙ্গে ভাগ করতে এটি GitHub-এর সঙ্গে যুক্ত করুন।"
-#: src/components/settings/AccountSection.tsx
-msgid "This project's git remote is on {host}, which OpenKnowledge doesn't recognize as a GitHub host. If {host} runs GitHub Enterprise Server, add it to GitHub Enterprise Server hosts below, then restart OpenKnowledge."
-msgstr "এই প্রজেক্টের git রিমোট {host}-এ আছে, যাকে OpenKnowledge GitHub হোস্ট হিসেবে চেনে না। {host}-এ যদি GitHub Enterprise Server চলে, তবে নিচের GitHub Enterprise Server হোস্ট অংশে এটি যোগ করুন, তারপর OpenKnowledge আবার চালু করুন।"
-
#: src/components/DocumentErrorBoundary.tsx
msgid "This project's running server doesn't support live editing. Restart OpenKnowledge to fix."
msgstr "এই প্রকল্পের চলমান সার্ভার সরাসরি সম্পাদনা সমর্থন করে না। ঠিক করতে OpenKnowledge পুনরায় চালু করুন।"
@@ -15501,6 +15572,7 @@ msgid "This usually means one of:"
msgstr "এর সাধারণত অর্থ এগুলোর একটি:"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
msgid "This window can't store a token — open Settings from the main app window."
msgstr "এই জানালাটি কোনো টোকেন সংরক্ষণ করতে পারে না — মূল অ্যাপ জানালা থেকে Settings খুলুন।"
@@ -15654,6 +15726,15 @@ msgstr "নিম্নরেখার বিন্যাস চালু বা
msgid "Toggles the pattern {0}/**"
msgstr "প্যাটার্ন {0}/** টগল করুন"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "token"
+msgstr "টোকেন"
+
+#: src/components/settings/AccountSection.tsx
+msgid "Token stored for {login} on {host}. To remove it, run <0>ok auth signout --host {host}</0>."
+msgstr "{host}-এ {login}-এর জন্য টোকেন সংরক্ষিত হয়েছে। এটি সরাতে <0>ok auth signout --host {host}</0> চালান।"
+
#: src/components/SkillBundlePreview.tsx
#: src/components/SkillProperties.tsx
msgid "tokens"
@@ -16240,6 +16321,10 @@ msgstr "ব্যবহারকারী"
msgid "User plugins are personal to this device — turn them on or off here. Each enabled plugin gets its own page under Plugins in the settings sidebar."
msgstr "ব্যবহারকারী প্লাগইন এই যন্ত্রেই সীমাবদ্ধ — সেগুলো এখানে চালু বা বন্ধ করুন। চালু করা প্রতিটি প্লাগইন সেটিং সাইডবারে Plugins-এর নিচে নিজের পাতা পায়।"
+#: src/components/settings/AccountSection.tsx
+msgid "Username"
+msgstr "ব্যবহারকারীর নাম"
+
#: src/components/settings/SearchSection.tsx
msgid "Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."
msgstr "<0>OK_EMBEDDINGS_API_KEY</0> পরিবেশ চলক ব্যবহার করা হচ্ছে (OpenKnowledge-এর বাইরে পরিচালিত)।"
diff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.json
index 410a16bed..c54bfb47a 100644
--- a/packages/app/src/locales/en/messages.json
+++ b/packages/app/src/locales/en/messages.json
@@ -41,6 +41,9 @@
],
"-l6jM7": ["Start a chat with the + button, or launch an agent from a page."],
"-lCAuQ": ["Loading graph"],
+ "-nA68n": [
+ "Add an access token for a GitLab, Gitea, Bitbucket, Azure DevOps or self-hosted git server. Without one, git uses the credentials it already has saved for that host; with one, OpenKnowledge uses the token instead."
+ ],
"-o5XAG": [
"Sent privately to the OpenKnowledge team, along with your note and app version. Never posted publicly."
],
@@ -241,6 +244,7 @@
"1vczDE": ["Open ", ["displayName"], " Desktop"],
"1vn0CI": ["Invalid server response"],
"1xui0Q": ["Failed to load local files"],
+ "1yHVE-": ["Adding"],
"2-3Mlu": ["Couldn't unpin ", ["name"]],
"20LVKb": [
"The agent process was told to stop (",
@@ -474,6 +478,15 @@
"4mp6Tv": ["OpenKnowledge listed the installed skills"],
"4niEzY": ["Sandboxed HTML embed — write HTML, see the rendered preview live."],
"4nj6n8": ["/api/config returned HTTP ", ["code"]],
+ "4p8Baj": [
+ "Token stored for ",
+ ["login"],
+ " on ",
+ ["host"],
+ ". To remove it, run <0>ok auth signout --host ",
+ ["host"],
+ "</0>."
+ ],
"4pDZ2N": ["Removed \"", ["0"], "\" from every other location — its source folder still loads"],
"4r6p_B": [
"This command contains hidden characters that can make it look different from what runs. They are shown here as ⟨U+…⟩."
@@ -727,13 +740,6 @@
"7YRrJ9": [
"Available in the OpenKnowledge desktop app. From a terminal, use<0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2>."
],
- "7_I248": [
- "This project's git remote is on ",
- ["host"],
- ", which OpenKnowledge doesn't recognize as a GitHub host. If ",
- ["host"],
- " runs GitHub Enterprise Server, add it to GitHub Enterprise Server hosts below, then restart OpenKnowledge."
- ],
"7_bFEL": ["Drag ", ["patternText"], " to reorder"],
"7a0YcF": ["Press <0>Space</0> or tap the blob to start"],
"7aNk5D": ["OpenKnowledge edited ", ["subject"]],
@@ -766,6 +772,7 @@
"7lFX_h": ["Steer now"],
"7m3Ade": ["installs:"],
"7qRHf0": ["Install for Claude Chat & Cowork"],
+ "7sNhEz": ["Username"],
"7uBlRT": ["Copy the focused file-tree item so Paste can duplicate it."],
"7vxWET": ["Pack preview unavailable."],
"7wogIQ": [["0", "plural", { "one": ["Plugin"], "other": ["Plugins"] }]],
@@ -911,6 +918,7 @@
"9bCiQ8": ["No pages are missing incoming graph links."],
"9bG48P": ["Sending"],
"9clcD5": ["Open documents tagged #", ["chip"]],
+ "9djC8C": ["Connect a GitHub account to browse and publish GitHub repositories."],
"9euN0m": [
[
"count",
@@ -1011,7 +1019,6 @@
" in ",
["parentLabel"]
],
- "AeXO77": ["Account"],
"AgoIW4": [
["source"],
": ",
@@ -1024,6 +1031,7 @@
["detail"]
],
"AhoGwP": ["Set up OpenKnowledge integrations"],
+ "Ai2U7L": ["Host"],
"AiNMQ7": [
"This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."
],
@@ -1306,9 +1314,6 @@
"E2Mv-X": ["Copy source"],
"E4XYYH": ["Enable terminal for this project"],
"E5WeIy": ["Reopen the most recently closed editor tab."],
- "E6lrpp": [
- "Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."
- ],
"E7BhZn": ["Blank note"],
"E8NbNG": ["Couldn't load worktrees."],
"E91VZY": ["Open in New Window"],
@@ -1322,7 +1327,6 @@
"EEYbdt": ["Publish"],
"EFfGAv": ["That message already went out — your edit wasn't applied."],
"EHu0x2": ["Syncing"],
- "EJuO7B": ["Connect a GitHub account to browse and sync your repositories."],
"EKwNEe": [
"Cached embeddings belong to the endpoint and model that produced them, so this rebuilds the index from scratch."
],
@@ -1473,6 +1477,9 @@
"FgRAvd": ["Logs & system info"],
"Fhp4Gn": ["View plugin"],
"Fim5F3": ["embeddings"],
+ "FioJgb": [
+ "Reconnect required to keep syncing. Add a token for this host in Settings, or replace the one stored."
+ ],
"FiyNln": ["Jump to selected text in property"],
"FjkaiT": ["Zoom out"],
"Fjz6aJ": ["Send to a new chat"],
@@ -1889,6 +1896,9 @@
"KvwJv8": ["Some files are not listed — the working tree has too many changes."],
"Kx881F": ["Restored ", ["0"], "."],
"KziH2K": ["Fast"],
+ "L-crEu": [
+ "Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it."
+ ],
"L-rMC9": ["Reset to default"],
"L1BQTH": [["0"], " isn't installed yet — opening its download page."],
"L1ZE3M": ["Document statistics"],
@@ -1944,6 +1954,9 @@
"LRgZAt": [["owner"], "/", ["name"], " already exists"],
"LSuMte": [["0"], " of ", ["totalCount"]],
"LTeJuX": ["Toggle Full Screen"],
+ "LVWA9A": [
+ "Authentication failed for this git host. Add a token for it in Settings, or replace the one stored."
+ ],
"LXIm4m": ["Context window"],
"LXdWeS": ["Medium section heading."],
"LXfNU-": ["Navigation and suggestions"],
@@ -2076,6 +2089,7 @@
"Mj8R8K": ["Couldn't install skill: ", ["0"]],
"MmDDWK": ["Recently opened"],
"Mnavhe": [["propPanelDescriptorLabel"], " Properties"],
+ "MpZRQy": ["Git"],
"MqQoV-": ["Describe what you want to build, start a blank file, or scaffold from a template."],
"MqsbfN": ["Turn on external link previews?"],
"MrUmCD": ["unknown build failure"],
@@ -2247,6 +2261,9 @@
"OPOiKn": ["Content rules"],
"OTF92M": ["Label <0>(optional display text)</0>"],
"OVjNeX": ["Terminal ", ["0"]],
+ "OWs-8P": [
+ "A token added here only applies to HTTPS remotes, and this project's remote doesn't use HTTPS."
+ ],
"OX2Neh": ["Inline code"],
"OXb_Df": ["Settings content"],
"OXdGnd": ["Problems"],
@@ -2364,6 +2381,7 @@
["filePath"],
". Explain what I should compare in the OpenKnowledge Conflict view; I will choose and apply the resolution there."
],
+ "Q14Keq": ["Bitbucket"],
"Q1mtyd": ["Hide sidebar"],
"Q5fqMz": ["Connection error — try again"],
"Q6hhn8": ["Preferences"],
@@ -2632,6 +2650,7 @@
"SiUUCS": ["Next match"],
"SkMZlS": ["Couldn't remove <0>", ["targetGitPath"], "</0>: ", ["removeGitError"]],
"SkTkKV": ["The agent isn't stopping. Force stop closes this chat and quits the agent."],
+ "SkUcEr": ["Access token"],
"Ske_wc": [
"User plugins are personal to this device — turn them on or off here. Each enabled plugin gets its own page under Plugins in the settings sidebar."
],
@@ -2947,9 +2966,6 @@
"XAyxsa": ["Check out remote branch"],
"XBBZnv": ["Link target \"", ["shown"], "\" does not resolve to an existing document."],
"XBgr2S": ["Copy in"],
- "XBpH6-": [
- "OpenKnowledge couldn't find a host name in this project's git remote, so it can't tell which GitHub server to sign in to."
- ],
"XDzAnp": ["Opens in a new tab"],
"XF1kgP": ["Everything from ", ["source"], " is already up to date"],
"XGKy1z": ["Image couldn't be displayed"],
@@ -3388,6 +3404,9 @@
"arUUsK": ["Product updates"],
"ax9kie": ["Link preview settings not yet loaded — try again in a moment"],
"axQ1h6": ["Anything you'd like to add? (optional)"],
+ "azrR7I": [
+ "The username git sends with the token. Some hosts expect a fixed value: type <0>x-bitbucket-api-token-auth</0> for a Bitbucket API token, <1>x-token-auth</1> for a Bitbucket repository or workspace access token, or <2>oauth2</2> for GitLab. For Gitea, use your Gitea username. Azure DevOps accepts any value."
+ ],
"b18t0_": ["Close diff"],
"b1FDss": ["Scroll to start"],
"b2ezG_": ["Kept both — \"", ["0"], "\" is its own skill now"],
@@ -3722,6 +3741,7 @@
"e8zRrb": ["Show Files"],
"e8zYa8": ["Could not open ", ["shareBranch"], " in a worktree. Try again."],
"e9sHSO": ["Pick up where you left off"],
+ "eAYJMv": ["token"],
"eBGWcy": [
"Open Knowledge tools are unavailable because the project folder is missing, inaccessible, or has changed. Check its location and permissions, then retry."
],
@@ -4301,6 +4321,7 @@
"jZ_E5M": ["Fetch failed — check the server logs for details."],
"j_Z6g7": ["Shared default"],
"jbSG8V": ["Show Files (", ["sidebarShortcutLabel"], ")"],
+ "jbhCDS": ["Other Git hosts"],
"jcEoUi": ["Move to right panel"],
"jdGUeI": ["Couldn't create template: ", ["error"]],
"jeCFV7": ["Move to new pane right"],
@@ -4874,6 +4895,9 @@
"pckX1A": [["0", "plural", { "one": ["#", " use"], "other": ["#", " uses"] }]],
"pcqlQu": [["0", "plural", { "one": ["Folder"], "other": ["Folders"] }]],
"pd0UH2": ["Align right"],
+ "pd6t3G": [
+ "Manage the accounts and access tokens OpenKnowledge uses to connect to your git hosts."
+ ],
"peq20S": [
"The browser isn't available in this chat because it couldn't be set up. OpenKnowledge's log has the details."
],
@@ -4985,6 +5009,7 @@
"qi17kj": ["Embed a live snapshot of an .excalidraw board from this workspace."],
"qi1F96": ["Reveal in File Explorer"],
"qiRoLb": ["Summarize everything I changed this week"],
+ "qimTXH": ["OpenKnowledge can't sign in to GitHub for this project."],
"qioCwA": ["Jump to page ", ["pageNumber"]],
"qjHMHf": ["Failed to disable sync — ", ["detail"]],
"qkqG0b": ["Take upstream"],
@@ -5045,6 +5070,9 @@
"rVxu1k": ["No pages link here yet."],
"rXz97P": ["Numbered list of items."],
"rZ9HZq": ["To do"],
+ "rZFxkH": [
+ "Enter the host name git connects to, with an optional :port and no scheme or path, for example git.example.com."
+ ],
"rZVMkf": ["Visual editor replace input focused"],
"radOpL": ["Image ", ["identity"], ". Go to reference."],
"rageVb": ["Custom HTML with a live preview pane (sandboxed iframe)."],
@@ -5256,6 +5284,9 @@
"tlGXxX": ["Auto (Pull only)"],
"tnG-m6": ["Auto-sync is paused — sign in to resume."],
"toyw51": ["Mermaid diagram controls"],
+ "tpOnU9": [
+ "OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has."
+ ],
"tqQBwN": ["Any scripts are shown for review, never run."],
"troubleshooting.claude-desktop.per-tool-approval": [
["agent"],
@@ -5416,6 +5447,7 @@
"uoJF_D": ["It was too hard to set up or get started"],
"uqs8Gd": [["others", "plural", { "one": ["#", " other"], "other": ["#", " others"] }]],
"ur2XSb": ["Visual editor"],
+ "uraHF0": ["GitLab"],
"uuoHOU": ["Command failed."],
"uwzRx4": [
"Adjust indexing request size and timeout for slow or memory-constrained embedding servers. Most setups should keep the defaults."
@@ -5513,6 +5545,9 @@
"vvWZnu": ["Diff unavailable"],
"vwV-kH": ["Fixing files stopped unexpectedly."],
"vy_VIN": ["Tracked in git — updates flow through your repo (pull or CI), not auto-update"],
+ "w-Wt3H": [
+ "Reconnect required to keep syncing. Check the SSH key or saved credentials git uses for this host."
+ ],
"w0YVAE": ["Show skill nodes"],
"w3tVpc": ["No links yet. Add wiki links or markdown links to build a graph."],
"w3vFfL": ["Hide Files"],
@@ -5632,7 +5667,6 @@
"x57cJf": ["Open link"],
"xAlHfe": [["basename"], " — text editor"],
"xBFg6z": ["From the ", ["0"], " plugin"],
- "xBjIs7": ["GitHub sign-in isn't available for this project"],
"xCJdfg": ["Clear"],
"xCdTnb": ["Close new tab"],
"xD4Xm2": ["Fetch"],
@@ -5644,6 +5678,9 @@
"xG4tb6": ["Lost connection to \"", ["docName"], "\"."],
"xG8Ish": ["Not planned"],
"xHGM4U": ["Hide HTML preview"],
+ "xJ7qrb": [
+ "No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has."
+ ],
"xK291b": ["Two-page (odd)"],
"xKDsGS": ["Go to line ", ["0"], " in ", ["1"]],
"xKcXG6": [["addingCount", "plural", { "one": ["#", " added"], "other": ["#", " added"] }]],
@@ -5730,6 +5767,7 @@
"yLwx9e": [
"A parent directory is the symlink — unlink that folder itself to take this one back."
],
+ "yLyiQV": ["The stored token is missing the permissions this host needs to push."],
"yMgL_E": ["Find field navigation"],
"yOjRUV": ["No AI tools detected. Install one to use this skill."],
"yQE2r9": ["Loading"],
@@ -5817,6 +5855,7 @@
"zLak8b": ["Activate new tab"],
"zMmwh4": ["Pick a theme or create your own."],
"zWZBPx": ["Type changed"],
+ "zXZJoN": ["Add token"],
"zXj1rA": ["Search by meaning"],
"zYp8Sr": [
"A <0>Modified</0> badge marks rules your config sets explicitly — directly, or inherited through <1>extends</1>. Unmarked rules keep their default state."
diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.po
index 61e45d160..07c42879a 100644
--- a/packages/app/src/locales/en/messages.po
+++ b/packages/app/src/locales/en/messages.po
@@ -1548,6 +1548,10 @@ msgstr "A template named <0>{trimmedSlug}</0> already exists here. Saving create
msgid "A title, description, tags — anything that describes this folder."
msgstr "A title, description, tags — anything that describes this folder."
+#: src/components/settings/AccountSection.tsx
+msgid "A token added here only applies to HTTPS remotes, and this project's remote doesn't use HTTPS."
+msgstr "A token added here only applies to HTTPS remotes, and this project's remote doesn't use HTTPS."
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "A worktree folder for {shareBranch} already exists."
msgstr "A worktree folder for {shareBranch} already exists."
@@ -1600,9 +1604,8 @@ msgid "Accept their deletion"
msgstr "Accept their deletion"
#: src/components/settings/AccountSection.tsx
-#: src/components/settings/SettingsDialogShell.tsx
-msgid "Account"
-msgstr "Account"
+msgid "Access token"
+msgstr "Access token"
#: src/components/TemplateRow.tsx
msgid "Actions for {label}"
@@ -1681,6 +1684,10 @@ msgstr "Add a property"
msgid "Add a starter pack"
msgstr "Add a starter pack"
+#: src/components/settings/AccountSection.tsx
+msgid "Add an access token for a GitLab, Gitea, Bitbucket, Azure DevOps or self-hosted git server. Without one, git uses the credentials it already has saved for that host; with one, OpenKnowledge uses the token instead."
+msgstr "Add an access token for a GitLab, Gitea, Bitbucket, Azure DevOps or self-hosted git server. Without one, git uses the credentials it already has saved for that host; with one, OpenKnowledge uses the token instead."
+
#: src/components/settings/OkignoreSection.tsx
msgid "Add another pattern"
msgstr "Add another pattern"
@@ -1810,6 +1817,12 @@ msgstr "Add to Dictionary"
msgid "Add to prompt"
msgstr "Add to prompt"
+#: src/components/settings/AccountSection.tsx
+#: src/components/SyncStatusBadge.tsx
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Add token"
+msgstr "Add token"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Add value"
msgstr "Add value"
@@ -1820,6 +1833,10 @@ msgstr "Add value"
msgid "Added"
msgstr "Added"
+#: src/components/settings/AccountSection.tsx
+msgid "Adding"
+msgstr "Adding"
+
#: src/components/settings/AgentConnectionDialogs.tsx
msgid "Adds a global OpenKnowledge MCP entry for this agent."
msgstr "Adds a global OpenKnowledge MCP entry for this agent."
@@ -2335,6 +2352,10 @@ msgstr "Attachments must total under 3 MB."
msgid "Authenticated as {login}."
msgstr "Authenticated as {login}."
+#: src/components/SyncStatusBadge.tsx
+msgid "Authentication failed for this git host. Add a token for it in Settings, or replace the one stored."
+msgstr "Authentication failed for this git host. Add a token for it in Settings, or replace the one stored."
+
#: src/editor/slash-command/component-items.tsx
msgid "Authoritative content; mirrored verbatim everywhere it's referenced."
msgstr "Authoritative content; mirrored verbatim everywhere it's referenced."
@@ -2536,6 +2557,11 @@ msgstr "Big section heading."
msgid "Bird wiki"
msgstr "Bird wiki"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "Bitbucket"
+msgstr "Bitbucket"
+
#: src/components/NewItemDialog.tsx
msgid "Blank note"
msgstr "Blank note"
@@ -3605,8 +3631,8 @@ msgid "Connect"
msgstr "Connect"
#: src/components/settings/AccountSection.tsx
-msgid "Connect a GitHub account to browse and sync your repositories."
-msgstr "Connect a GitHub account to browse and sync your repositories."
+msgid "Connect a GitHub account to browse and publish GitHub repositories."
+msgstr "Connect a GitHub account to browse and publish GitHub repositories."
#: src/components/settings/SyncSection.tsx
msgid "Connect an existing repository"
@@ -3698,6 +3724,7 @@ msgid "Connection dropped"
msgstr "Connection dropped"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Connection error — try again"
msgstr "Connection error — try again"
@@ -5937,6 +5964,10 @@ msgstr "Enter a whole number between {minimum} and {maximum}."
msgid "Enter at least 3 characters to search by meaning."
msgstr "Enter at least 3 characters to search by meaning."
+#: src/components/settings/AccountSection.tsx
+msgid "Enter the host name git connects to, with an optional :port and no scheme or path, for example git.example.com."
+msgstr "Enter the host name git connects to, with an optional :port and no scheme or path, for example git.example.com."
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Enter the public origin your tunnel serves, for example https://notes.example.com"
msgstr "Enter the public origin your tunnel serves, for example https://notes.example.com"
@@ -6412,6 +6443,7 @@ msgid "Failed to start sign-in — try again"
msgstr "Failed to start sign-in — try again"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Failed to store the token — try again"
msgstr "Failed to store the token — try again"
@@ -6885,6 +6917,11 @@ msgctxt "settings search keyword"
msgid "GHES"
msgstr "GHES"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Git"
+msgstr "Git"
+
#: src/components/ExploreSkills.tsx
msgid "Git & PRs"
msgstr "Git & PRs"
@@ -6893,6 +6930,10 @@ msgstr "Git & PRs"
msgid "Git can't track this folder — it's empty or contains only ignored files. The link won't work until you add a tracked document."
msgstr "Git can't track this folder — it's empty or contains only ignored files. The link won't work until you add a tracked document."
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it."
+msgstr "Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it."
+
#: src/components/RecentProjectsMenu.tsx
msgid "Git has locked this worktree, but it can still be opened."
msgstr "Git has locked this worktree, but it can still be opened."
@@ -6952,10 +6993,6 @@ msgstr "GitHub Enterprise Server hosts"
msgid "GitHub sign-in is missing or expired. Reconnect to resume syncing."
msgstr "GitHub sign-in is missing or expired. Reconnect to resume syncing."
-#: src/components/settings/AccountSection.tsx
-msgid "GitHub sign-in isn't available for this project"
-msgstr "GitHub sign-in isn't available for this project"
-
#: src/components/ImportSkillForm.tsx
msgid "GitHub, a git URL, or a local path."
msgstr "GitHub, a git URL, or a local path."
@@ -6964,6 +7001,11 @@ msgstr "GitHub, a git URL, or a local path."
msgid "github.com is always recognized, so it doesn't need to be added."
msgstr "github.com is always recognized, so it doesn't need to be added."
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "GitLab"
+msgstr "GitLab"
+
#: src/components/settings/SavedThemesTiles.tsx
msgid "Give it a name before editing its colors."
msgstr "Give it a name before editing its colors."
@@ -7318,6 +7360,10 @@ msgstr "Horizontal pill strip + active panel below; click a pill to switch panel
msgid "Horizontal rule that divides sections."
msgstr "Horizontal rule that divides sections."
+#: src/components/settings/AccountSection.tsx
+msgid "Host"
+msgstr "Host"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Hosting is on. The server is running on port {boundPort}. Reach it through your tunnel."
msgstr "Hosting is on. The server is running on port {boundPort}. Reach it through your tunnel."
@@ -8611,8 +8657,8 @@ msgid "Manage skill folders"
msgstr "Manage skill folders"
#: src/components/settings/AccountSection.tsx
-msgid "Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."
-msgstr "Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."
+msgid "Manage the accounts and access tokens OpenKnowledge uses to connect to your git hosts."
+msgstr "Manage the accounts and access tokens OpenKnowledge uses to connect to your git hosts."
#: src/components/settings/AgentConnectionDialogs.tsx
#: src/components/settings/AgentConnectionsSection.tsx
@@ -9442,6 +9488,10 @@ msgstr "No content changes at this version."
msgid "No content changes in this version"
msgstr "No content changes in this version"
+#: src/components/SyncStatusBadge.tsx
+msgid "No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has."
+
#: src/components/GraphPanel.tsx
msgid "No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."
msgstr "No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."
@@ -10394,6 +10444,10 @@ msgstr "Opening..."
msgid "OpenKnowledge"
msgstr "OpenKnowledge"
+#: src/components/AuthModal.tsx
+msgid "OpenKnowledge can't sign in to GitHub for this project."
+msgstr "OpenKnowledge can't sign in to GitHub for this project."
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge checked {subject}"
msgstr "OpenKnowledge checked {subject}"
@@ -10406,10 +10460,6 @@ msgstr "OpenKnowledge checked the project"
msgid "OpenKnowledge could not find this agent on this machine."
msgstr "OpenKnowledge could not find this agent on this machine."
-#: src/components/settings/AccountSection.tsx
-msgid "OpenKnowledge couldn't find a host name in this project's git remote, so it can't tell which GitHub server to sign in to."
-msgstr "OpenKnowledge couldn't find a host name in this project's git remote, so it can't tell which GitHub server to sign in to."
-
#: src/lib/worktree-create-error.ts
msgid "OpenKnowledge couldn't finish setting up this project. The worktree was created but not opened."
msgstr "OpenKnowledge couldn't finish setting up this project. The worktree was created but not opened."
@@ -10466,6 +10516,10 @@ msgstr "OpenKnowledge edited a document"
msgid "OpenKnowledge files were removed"
msgstr "OpenKnowledge files were removed"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has."
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge imported {source}"
msgstr "OpenKnowledge imported {source}"
@@ -10694,6 +10748,11 @@ msgstr "other"
msgid "Other"
msgstr "Other"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Other Git hosts"
+msgstr "Other Git hosts"
+
#: src/components/settings/SharingSection.tsx
msgid "Other OK paths are tracked upstream:"
msgstr "Other OK paths are tracked upstream:"
@@ -11628,6 +11687,14 @@ msgstr "Reconnect required"
msgid "Reconnect required to keep syncing."
msgstr "Reconnect required to keep syncing."
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Add a token for this host in Settings, or replace the one stored."
+msgstr "Reconnect required to keep syncing. Add a token for this host in Settings, or replace the one stored."
+
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Check the SSH key or saved credentials git uses for this host."
+msgstr "Reconnect required to keep syncing. Check the SSH key or saved credentials git uses for this host."
+
#: src/presence/use-sync-toasts.ts
msgid "Reconnected"
msgstr "Reconnected"
@@ -14819,6 +14886,10 @@ msgstr "The skills list did not match its schema."
msgid "The source folder itself does not move."
msgstr "The source folder itself does not move."
+#: src/components/SyncStatusBadge.tsx
+msgid "The stored token is missing the permissions this host needs to push."
+msgstr "The stored token is missing the permissions this host needs to push."
+
#: src/components/TemplateProperties.tsx
msgid "The template's filename (without `.md`)."
msgstr "The template's filename (without `.md`)."
@@ -14877,6 +14948,10 @@ msgstr "The terminal.shell executable in .ok/local/config.yml was not found. Usi
msgid "The token needs the repo and read:user scopes."
msgstr "The token needs the repo and read:user scopes."
+#: src/components/settings/AccountSection.tsx
+msgid "The username git sends with the token. Some hosts expect a fixed value: type <0>x-bitbucket-api-token-auth</0> for a Bitbucket API token, <1>x-token-auth</1> for a Bitbucket repository or workspace access token, or <2>oauth2</2> for GitLab. For Gitea, use your Gitea username. Azure DevOps accepts any value."
+msgstr "The username git sends with the token. Some hosts expect a fixed value: type <0>x-bitbucket-api-token-auth</0> for a Bitbucket API token, <1>x-token-auth</1> for a Bitbucket repository or workspace access token, or <2>oauth2</2> for GitLab. For Gitea, use your Gitea username. Azure DevOps accepts any value."
+
#: src/lib/tab-session-restore-recovery-notice.ts
msgid "The workspace opened without it so the app could start."
msgstr "The workspace opened without it so the app could start."
@@ -15405,10 +15480,6 @@ msgstr "This project isn't a git repository, so worktrees aren't available."
msgid "This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."
msgstr "This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."
-#: src/components/settings/AccountSection.tsx
-msgid "This project's git remote is on {host}, which OpenKnowledge doesn't recognize as a GitHub host. If {host} runs GitHub Enterprise Server, add it to GitHub Enterprise Server hosts below, then restart OpenKnowledge."
-msgstr "This project's git remote is on {host}, which OpenKnowledge doesn't recognize as a GitHub host. If {host} runs GitHub Enterprise Server, add it to GitHub Enterprise Server hosts below, then restart OpenKnowledge."
-
#: src/components/DocumentErrorBoundary.tsx
msgid "This project's running server doesn't support live editing. Restart OpenKnowledge to fix."
msgstr "This project's running server doesn't support live editing. Restart OpenKnowledge to fix."
@@ -15505,6 +15576,7 @@ msgid "This usually means one of:"
msgstr "This usually means one of:"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
msgid "This window can't store a token — open Settings from the main app window."
msgstr "This window can't store a token — open Settings from the main app window."
@@ -15658,6 +15730,15 @@ msgstr "Toggle underline formatting."
msgid "Toggles the pattern {0}/**"
msgstr "Toggles the pattern {0}/**"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "token"
+msgstr "token"
+
+#: src/components/settings/AccountSection.tsx
+msgid "Token stored for {login} on {host}. To remove it, run <0>ok auth signout --host {host}</0>."
+msgstr "Token stored for {login} on {host}. To remove it, run <0>ok auth signout --host {host}</0>."
+
#: src/components/SkillBundlePreview.tsx
#: src/components/SkillProperties.tsx
msgid "tokens"
@@ -16244,6 +16325,10 @@ msgstr "User"
msgid "User plugins are personal to this device — turn them on or off here. Each enabled plugin gets its own page under Plugins in the settings sidebar."
msgstr "User plugins are personal to this device — turn them on or off here. Each enabled plugin gets its own page under Plugins in the settings sidebar."
+#: src/components/settings/AccountSection.tsx
+msgid "Username"
+msgstr "Username"
+
#: src/components/settings/SearchSection.tsx
msgid "Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."
msgstr "Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."
diff --git a/packages/app/src/locales/es/messages.json b/packages/app/src/locales/es/messages.json
index 64a4cb3c3..8c701dfcd 100644
--- a/packages/app/src/locales/es/messages.json
+++ b/packages/app/src/locales/es/messages.json
@@ -51,6 +51,9 @@
],
"-l6jM7": ["Inicia un chat con el botón + o lanza un agente desde una página."],
"-lCAuQ": ["Cargando el grafo"],
+ "-nA68n": [
+ "Añade un token de acceso para un servidor GitLab, Gitea, Bitbucket, Azure DevOps o git autoalojado. Sin él, git usa las credenciales que ya tiene guardadas para ese host; con él, OpenKnowledge usa el token en su lugar."
+ ],
"-o5XAG": [
"Se envía en privado al equipo de OpenKnowledge, junto con tu nota y la versión de la aplicación. Nunca se publica."
],
@@ -275,6 +278,7 @@
"1vczDE": ["Abrir ", ["displayName"], " Desktop"],
"1vn0CI": ["Respuesta del servidor no válida"],
"1xui0Q": ["No se pudieron cargar los archivos locales"],
+ "1yHVE-": ["Añadiendo"],
"2-3Mlu": ["No se pudo dejar de fijar ", ["name"]],
"20LVKb": [
"Algo ajeno a este chat pidió al proceso del agente que se detuviera (",
@@ -547,6 +551,15 @@
"Incrustación de HTML aislada: escribe HTML y ve la vista previa renderizada en vivo."
],
"4nj6n8": ["/api/config devolvió HTTP ", ["code"]],
+ "4p8Baj": [
+ "Token guardado para ",
+ ["login"],
+ " en ",
+ ["host"],
+ ". Para quitarlo, ejecuta <0>ok auth signout --host ",
+ ["host"],
+ "</0>."
+ ],
"4pDZ2N": [
"Se quitó \"",
["0"],
@@ -857,13 +870,6 @@
"7YRrJ9": [
"Disponible en la aplicación de escritorio de OpenKnowledge. Desde una terminal, usa<0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2>."
],
- "7_I248": [
- "El remoto de git de este proyecto está en ",
- ["host"],
- ", que OpenKnowledge no reconoce como host de GitHub. Si ",
- ["host"],
- " ejecuta GitHub Enterprise Server, agrégalo en Hosts de GitHub Enterprise Server más abajo y luego reinicia OpenKnowledge."
- ],
"7_bFEL": ["Arrastra ", ["patternText"], " para reordenar"],
"7a0YcF": ["Pulsa <0>Espacio</0> o toca el blob para empezar"],
"7aNk5D": ["OpenKnowledge editó ", ["subject"]],
@@ -896,6 +902,7 @@
"7lFX_h": ["Redirigir ahora"],
"7m3Ade": ["instalaciones:"],
"7qRHf0": ["Instalar para Claude Chat y Cowork"],
+ "7sNhEz": ["Nombre de usuario"],
"7uBlRT": ["Copia el elemento enfocado del árbol de archivos para que Pegar pueda duplicarlo."],
"7vxWET": ["La vista previa del paquete no está disponible."],
"7wogIQ": [
@@ -1065,6 +1072,7 @@
"9bCiQ8": ["No hay páginas sin enlaces entrantes en el grafo."],
"9bG48P": ["Enviando"],
"9clcD5": ["Abrir los documentos etiquetados con #", ["chip"]],
+ "9djC8C": ["Conecta una cuenta de GitHub para explorar y publicar repositorios de GitHub."],
"9euN0m": [
[
"count",
@@ -1178,7 +1186,6 @@
" en ",
["parentLabel"]
],
- "AeXO77": ["Cuenta"],
"AgoIW4": [
["source"],
": ",
@@ -1191,6 +1198,7 @@
["detail"]
],
"AhoGwP": ["Configurar las integraciones de OpenKnowledge"],
+ "Ai2U7L": ["Host"],
"AiNMQ7": [
"Este proyecto solo vive en este equipo. Conéctalo a GitHub para tener una copia de seguridad y compartirlo con otras personas."
],
@@ -1528,9 +1536,6 @@
"E2Mv-X": ["Copiar el código fuente"],
"E4XYYH": ["Activar la terminal en este proyecto"],
"E5WeIy": ["Reabre la última pestaña del editor que se cerró."],
- "E6lrpp": [
- "Gestiona la cuenta de GitHub que usa OpenKnowledge para explorar y sincronizar tus repositorios."
- ],
"E7BhZn": ["Nota en blanco"],
"E8NbNG": ["No se pudieron cargar los árboles de trabajo."],
"E91VZY": ["Abrir en una ventana nueva"],
@@ -1546,7 +1551,6 @@
"EEYbdt": ["Publicar"],
"EFfGAv": ["Ese mensaje ya se envió: no se aplicó tu edición."],
"EHu0x2": ["Sincronizando"],
- "EJuO7B": ["Conecta una cuenta de GitHub para explorar y sincronizar tus repositorios."],
"EKwNEe": [
"Los embeddings en caché pertenecen al endpoint y al modelo que los generó, así que esto reconstruye el índice desde cero."
],
@@ -1701,6 +1705,9 @@
"FgRAvd": ["Registros e información del sistema"],
"Fhp4Gn": ["Ver el complemento"],
"Fim5F3": ["embeddings"],
+ "FioJgb": [
+ "Se requiere volver a conectar para seguir sincronizando. Añade un token para este host en Ajustes, o reemplaza el que está guardado."
+ ],
"FiyNln": ["Ir al texto seleccionado en la propiedad"],
"FjkaiT": ["Alejar"],
"Fjz6aJ": ["Enviar a un chat nuevo"],
@@ -2189,6 +2196,9 @@
"KvwJv8": ["Algunos archivos no aparecen: el árbol de trabajo tiene demasiados cambios."],
"Kx881F": ["Se restauró ", ["0"], "."],
"KziH2K": ["Rápido"],
+ "L-crEu": [
+ "git no pudo autenticarse con este host. Revisa la clave SSH o las credenciales guardadas que git usa para él."
+ ],
"L-rMC9": ["Restablecer al valor por defecto"],
"L1BQTH": [["0"], " todavía no está instalado: abriendo su página de descarga."],
"L1ZE3M": ["Estadísticas del documento"],
@@ -2257,6 +2267,9 @@
"LRgZAt": [["owner"], "/", ["name"], " ya existe"],
"LSuMte": [["0"], " de ", ["totalCount"]],
"LTeJuX": ["Activar o desactivar la pantalla completa"],
+ "LVWA9A": [
+ "Falló la autenticación en este host de git. Añade un token para él en Ajustes, o reemplaza el que está guardado."
+ ],
"LXIm4m": ["Ventana de contexto"],
"LXdWeS": ["Encabezado de sección mediano."],
"LXfNU-": ["Navegación y sugerencias"],
@@ -2415,6 +2428,7 @@
"Mj8R8K": ["No se pudo instalar la habilidad: ", ["0"]],
"MmDDWK": ["Abiertos recientemente"],
"Mnavhe": ["Propiedades de ", ["propPanelDescriptorLabel"]],
+ "MpZRQy": ["Git"],
"MqQoV-": [
"Describe lo que quieres crear, empieza con un archivo en blanco o parte de una plantilla."
],
@@ -2598,6 +2612,9 @@
"OPOiKn": ["Reglas de contenido"],
"OTF92M": ["Etiqueta <0>(texto mostrado, opcional)</0>"],
"OVjNeX": ["Terminal ", ["0"]],
+ "OWs-8P": [
+ "Un token añadido aquí solo se aplica a remotos HTTPS, y el remoto de este proyecto no usa HTTPS."
+ ],
"OX2Neh": ["Código en línea"],
"OXb_Df": ["Contenido de los ajustes"],
"OXdGnd": ["Problemas"],
@@ -2723,6 +2740,7 @@
["filePath"],
". Explica qué debo comparar en la vista de conflictos de OpenKnowledge; yo elegiré y aplicaré la resolución allí."
],
+ "Q14Keq": ["Bitbucket"],
"Q1mtyd": ["Ocultar la barra lateral"],
"Q5fqMz": ["Error de conexión: inténtalo de nuevo"],
"Q6hhn8": ["Preferencias"],
@@ -3025,6 +3043,7 @@
"SiUUCS": ["Coincidencia siguiente"],
"SkMZlS": ["No se pudo eliminar <0>", ["targetGitPath"], "</0>: ", ["removeGitError"]],
"SkTkKV": ["El agente no se detiene. La detención forzada cierra este chat y sale del agente."],
+ "SkUcEr": ["Token de acceso"],
"Ske_wc": [
"Los complementos de usuario son personales de este dispositivo: actívalos o desactívalos aquí. Cada complemento activado tiene su propia página bajo Complementos en la barra lateral de ajustes."
],
@@ -3420,9 +3439,6 @@
"XAyxsa": ["Extraer rama remota"],
"XBBZnv": ["El destino del enlace «", ["shown"], "» no corresponde a un documento existente."],
"XBgr2S": ["Copiar aquí"],
- "XBpH6-": [
- "OpenKnowledge no encontró un nombre de host en el remoto de git de este proyecto, así que no puede saber en qué servidor de GitHub iniciar sesión."
- ],
"XDzAnp": ["Se abre en una pestaña nueva"],
"XF1kgP": ["Todo lo de ", ["source"], " ya está actualizado"],
"XGKy1z": ["No se pudo mostrar la imagen"],
@@ -3910,6 +3926,9 @@
"Los ajustes de vista previa de enlaces aún no se han cargado; inténtalo de nuevo en un momento"
],
"axQ1h6": ["¿Quieres añadir algo? (opcional)"],
+ "azrR7I": [
+ "El nombre de usuario que git envía con el token. Algunos hosts esperan un valor fijo: escribe <0>x-bitbucket-api-token-auth</0> para un token de API de Bitbucket, <1>x-token-auth</1> para un token de acceso de repositorio o de espacio de trabajo de Bitbucket, u <2>oauth2</2> para GitLab. En Gitea, usa tu nombre de usuario de Gitea. Azure DevOps acepta cualquier valor."
+ ],
"b18t0_": ["Cerrar diferencias"],
"b1FDss": ["Desplazar hasta el principio"],
"b2ezG_": ["Se conservaron ambos: \"", ["0"], "\" ahora es una habilidad aparte"],
@@ -4312,6 +4331,7 @@
"e8zRrb": ["Mostrar Archivos"],
"e8zYa8": ["No se pudo abrir ", ["shareBranch"], " en un worktree. Inténtalo de nuevo."],
"e9sHSO": ["Continúa donde lo dejaste"],
+ "eAYJMv": ["token"],
"eBGWcy": [
"Las herramientas de Open Knowledge no están disponibles porque la carpeta del proyecto no existe, no es accesible o ha cambiado. Comprueba su ubicación y permisos y vuelve a intentarlo."
],
@@ -4985,6 +5005,7 @@
"jZ_E5M": ["Falló el fetch: consulta los registros del servidor para ver los detalles."],
"j_Z6g7": ["Valor compartido por defecto"],
"jbSG8V": ["Mostrar Archivos (", ["sidebarShortcutLabel"], ")"],
+ "jbhCDS": ["Otros hosts de Git"],
"jcEoUi": ["Mover al panel derecho"],
"jdGUeI": ["No se pudo crear la plantilla: ", ["error"]],
"jeCFV7": ["Mover a un panel nuevo a la derecha"],
@@ -5627,6 +5648,9 @@
["0", "plural", { "one": ["Carpeta"], "many": ["Carpetas"], "other": ["Carpetas"] }]
],
"pd0UH2": ["Alinear a la derecha"],
+ "pd6t3G": [
+ "Gestiona las cuentas y los tokens de acceso que OpenKnowledge usa para conectarse a tus hosts de git."
+ ],
"peq20S": [
"El navegador no está disponible en este chat porque no se pudo configurar. El registro de OpenKnowledge tiene los detalles."
],
@@ -5759,6 +5783,7 @@
],
"qi1F96": ["Mostrar en el Explorador de archivos"],
"qiRoLb": ["Resume todo lo que cambié esta semana"],
+ "qimTXH": ["OpenKnowledge no puede iniciar sesión en GitHub para este proyecto."],
"qioCwA": ["Ir a la página ", ["pageNumber"]],
"qjHMHf": ["No se pudo desactivar la sincronización — ", ["detail"]],
"qkqG0b": ["Aceptar la versión remota"],
@@ -5821,6 +5846,9 @@
"rVxu1k": ["Todavía no hay páginas que enlacen aquí."],
"rXz97P": ["Lista numerada de elementos."],
"rZ9HZq": ["Por hacer"],
+ "rZFxkH": [
+ "Escribe el nombre del host al que se conecta git, con un :port opcional y sin esquema ni ruta, por ejemplo git.example.com."
+ ],
"rZVMkf": ["Campo de reemplazo del editor visual enfocado"],
"radOpL": ["Imagen ", ["identity"], ". Ir a la referencia."],
"rageVb": ["HTML personalizado con panel de vista previa en vivo (iframe aislado)."],
@@ -6051,6 +6079,9 @@
"tlGXxX": ["Automático (solo Pull)"],
"tnG-m6": ["La sincronización automática está en pausa: inicia sesión para reanudarla."],
"toyw51": ["Controles del diagrama de Mermaid"],
+ "tpOnU9": [
+ "OpenKnowledge no tiene ninguna credencial guardada para este host. Añade un token en Ajustes, o deja que git use las credenciales que ya tiene."
+ ],
"tqQBwN": ["Los scripts se muestran para que los revises; nunca se ejecutan."],
"troubleshooting.claude-desktop.per-tool-approval": [
["agent"],
@@ -6227,6 +6258,7 @@
["others", "plural", { "one": ["#", " más"], "many": ["#", " más"], "other": ["#", " más"] }]
],
"ur2XSb": ["Editor visual"],
+ "uraHF0": ["GitLab"],
"uuoHOU": ["El comando falló."],
"uwzRx4": [
"Ajusta el tamaño y el tiempo de espera de las solicitudes de indexación para servidores de embeddings lentos o con poca memoria. La mayoría de las configuraciones deberían mantener los valores predeterminados."
@@ -6355,6 +6387,9 @@
"vy_VIN": [
"Seguido en git: las actualizaciones llegan por tu repositorio (pull o CI), no por actualización automática"
],
+ "w-Wt3H": [
+ "Se requiere volver a conectar para seguir sincronizando. Revisa la clave SSH o las credenciales guardadas que git usa para este host."
+ ],
"w0YVAE": ["Mostrar los nodos de habilidades"],
"w3tVpc": [
"Todavía no hay enlaces. Añade enlaces wiki o enlaces markdown para construir un grafo."
@@ -6480,7 +6515,6 @@
"x57cJf": ["Abrir el enlace"],
"xAlHfe": [["basename"], " — editor de texto"],
"xBFg6z": ["Del complemento ", ["0"]],
- "xBjIs7": ["El inicio de sesión de GitHub no está disponible para este proyecto"],
"xCJdfg": ["Borrar"],
"xCdTnb": ["Cerrar pestaña nueva"],
"xD4Xm2": ["Obtener"],
@@ -6494,6 +6528,9 @@
"xG4tb6": ["Se perdió la conexión con \"", ["docName"], "\"."],
"xG8Ish": ["No planificada"],
"xHGM4U": ["Ocultar la vista previa del HTML"],
+ "xJ7qrb": [
+ "No hay ninguna credencial guardada para este host de git. Añade un token en Ajustes, o deja que git use las credenciales que ya tiene."
+ ],
"xK291b": ["Dos páginas (impares)"],
"xKDsGS": ["Ir a la línea ", ["0"], " de ", ["1"]],
"xKcXG6": [
@@ -6591,6 +6628,7 @@
"yLwx9e": [
"El enlace simbólico es un directorio superior: desvincula esa carpeta para recuperar esta."
],
+ "yLyiQV": ["Al token guardado le faltan los permisos que este host necesita para hacer push."],
"yMgL_E": ["Navegación del campo de búsqueda"],
"yOjRUV": ["No se detectaron herramientas de IA. Instala una para usar esta habilidad."],
"yQE2r9": ["Cargando"],
@@ -6714,6 +6752,7 @@
"zLak8b": ["Activar pestaña nueva"],
"zMmwh4": ["Elige un tema o crea el tuyo."],
"zWZBPx": ["Tipo cambiado"],
+ "zXZJoN": ["Añadir token"],
"zXj1rA": ["Buscar por significado"],
"zYp8Sr": [
"La etiqueta <0>Modificada</0> marca las reglas que tu configuración define de forma explícita, directamente o heredadas mediante <1>extends</1>. Las reglas sin marcar conservan su estado por defecto."
diff --git a/packages/app/src/locales/es/messages.po b/packages/app/src/locales/es/messages.po
index 99d1ec99f..0b888df8f 100644
--- a/packages/app/src/locales/es/messages.po
+++ b/packages/app/src/locales/es/messages.po
@@ -1548,6 +1548,10 @@ msgstr "Ya existe aquí una plantilla llamada <0>{trimmedSlug}</0>. Al guardar s
msgid "A title, description, tags — anything that describes this folder."
msgstr "Un título, una descripción, etiquetas: cualquier cosa que describa esta carpeta."
+#: src/components/settings/AccountSection.tsx
+msgid "A token added here only applies to HTTPS remotes, and this project's remote doesn't use HTTPS."
+msgstr "Un token añadido aquí solo se aplica a remotos HTTPS, y el remoto de este proyecto no usa HTTPS."
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "A worktree folder for {shareBranch} already exists."
msgstr "Ya existe una carpeta de worktree para {shareBranch}."
@@ -1600,9 +1604,8 @@ msgid "Accept their deletion"
msgstr "Aceptar su eliminación"
#: src/components/settings/AccountSection.tsx
-#: src/components/settings/SettingsDialogShell.tsx
-msgid "Account"
-msgstr "Cuenta"
+msgid "Access token"
+msgstr "Token de acceso"
#: src/components/TemplateRow.tsx
msgid "Actions for {label}"
@@ -1681,6 +1684,10 @@ msgstr "Añadir una propiedad"
msgid "Add a starter pack"
msgstr "Añadir un paquete inicial"
+#: src/components/settings/AccountSection.tsx
+msgid "Add an access token for a GitLab, Gitea, Bitbucket, Azure DevOps or self-hosted git server. Without one, git uses the credentials it already has saved for that host; with one, OpenKnowledge uses the token instead."
+msgstr "Añade un token de acceso para un servidor GitLab, Gitea, Bitbucket, Azure DevOps o git autoalojado. Sin él, git usa las credenciales que ya tiene guardadas para ese host; con él, OpenKnowledge usa el token en su lugar."
+
#: src/components/settings/OkignoreSection.tsx
msgid "Add another pattern"
msgstr "Añadir otro patrón"
@@ -1810,6 +1817,12 @@ msgstr "Añadir al diccionario"
msgid "Add to prompt"
msgstr "Añadir al prompt"
+#: src/components/settings/AccountSection.tsx
+#: src/components/SyncStatusBadge.tsx
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Add token"
+msgstr "Añadir token"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Add value"
msgstr "Añadir valor"
@@ -1820,6 +1833,10 @@ msgstr "Añadir valor"
msgid "Added"
msgstr "Añadido"
+#: src/components/settings/AccountSection.tsx
+msgid "Adding"
+msgstr "Añadiendo"
+
#: src/components/settings/AgentConnectionDialogs.tsx
msgid "Adds a global OpenKnowledge MCP entry for this agent."
msgstr "Añade una entrada MCP de OpenKnowledge global para este agente."
@@ -2335,6 +2352,10 @@ msgstr "Los adjuntos deben sumar menos de 3 MB."
msgid "Authenticated as {login}."
msgstr "Autenticado como {login}."
+#: src/components/SyncStatusBadge.tsx
+msgid "Authentication failed for this git host. Add a token for it in Settings, or replace the one stored."
+msgstr "Falló la autenticación en este host de git. Añade un token para él en Ajustes, o reemplaza el que está guardado."
+
#: src/editor/slash-command/component-items.tsx
msgid "Authoritative content; mirrored verbatim everywhere it's referenced."
msgstr "Contenido autoritativo; se replica literalmente allí donde se referencia."
@@ -2536,6 +2557,11 @@ msgstr "Encabezado de sección grande."
msgid "Bird wiki"
msgstr "Wiki de aves"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "Bitbucket"
+msgstr "Bitbucket"
+
#: src/components/NewItemDialog.tsx
msgid "Blank note"
msgstr "Nota en blanco"
@@ -3605,8 +3631,8 @@ msgid "Connect"
msgstr "Conectar"
#: src/components/settings/AccountSection.tsx
-msgid "Connect a GitHub account to browse and sync your repositories."
-msgstr "Conecta una cuenta de GitHub para explorar y sincronizar tus repositorios."
+msgid "Connect a GitHub account to browse and publish GitHub repositories."
+msgstr "Conecta una cuenta de GitHub para explorar y publicar repositorios de GitHub."
#: src/components/settings/SyncSection.tsx
msgid "Connect an existing repository"
@@ -3698,6 +3724,7 @@ msgid "Connection dropped"
msgstr "Se perdió la conexión"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Connection error — try again"
msgstr "Error de conexión: inténtalo de nuevo"
@@ -5937,6 +5964,10 @@ msgstr "Introduce un número entero entre {minimum} y {maximum}."
msgid "Enter at least 3 characters to search by meaning."
msgstr "Introduce al menos 3 caracteres para buscar por significado."
+#: src/components/settings/AccountSection.tsx
+msgid "Enter the host name git connects to, with an optional :port and no scheme or path, for example git.example.com."
+msgstr "Escribe el nombre del host al que se conecta git, con un :port opcional y sin esquema ni ruta, por ejemplo git.example.com."
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Enter the public origin your tunnel serves, for example https://notes.example.com"
msgstr "Introduce el origen público que sirve tu túnel, por ejemplo https://notes.example.com"
@@ -6412,6 +6443,7 @@ msgid "Failed to start sign-in — try again"
msgstr "No se pudo iniciar la sesión: inténtalo de nuevo"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Failed to store the token — try again"
msgstr "No se pudo guardar el token: inténtalo de nuevo"
@@ -6885,6 +6917,11 @@ msgctxt "settings search keyword"
msgid "GHES"
msgstr "GHES"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Git"
+msgstr "Git"
+
#: src/components/ExploreSkills.tsx
msgid "Git & PRs"
msgstr "Git y PR"
@@ -6893,6 +6930,10 @@ msgstr "Git y PR"
msgid "Git can't track this folder — it's empty or contains only ignored files. The link won't work until you add a tracked document."
msgstr "Git no puede seguir esta carpeta: está vacía o solo contiene archivos ignorados. El enlace no funcionará hasta que añadas un documento seguido por git."
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it."
+msgstr "git no pudo autenticarse con este host. Revisa la clave SSH o las credenciales guardadas que git usa para él."
+
#: src/components/RecentProjectsMenu.tsx
msgid "Git has locked this worktree, but it can still be opened."
msgstr "Git ha bloqueado este worktree, pero aún se puede abrir."
@@ -6952,10 +6993,6 @@ msgstr "Hosts de GitHub Enterprise Server"
msgid "GitHub sign-in is missing or expired. Reconnect to resume syncing."
msgstr "Falta la sesión de GitHub o ha caducado. Vuelve a conectarte para reanudar la sincronización."
-#: src/components/settings/AccountSection.tsx
-msgid "GitHub sign-in isn't available for this project"
-msgstr "El inicio de sesión de GitHub no está disponible para este proyecto"
-
#: src/components/ImportSkillForm.tsx
msgid "GitHub, a git URL, or a local path."
msgstr "GitHub, una URL de git o una ruta local."
@@ -6964,6 +7001,11 @@ msgstr "GitHub, una URL de git o una ruta local."
msgid "github.com is always recognized, so it doesn't need to be added."
msgstr "github.com siempre se reconoce, así que no hace falta agregarlo."
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "GitLab"
+msgstr "GitLab"
+
#: src/components/settings/SavedThemesTiles.tsx
msgid "Give it a name before editing its colors."
msgstr "Ponle un nombre antes de editar sus colores."
@@ -7318,6 +7360,10 @@ msgstr "Tira horizontal de pastillas con el panel activo debajo; haz clic en una
msgid "Horizontal rule that divides sections."
msgstr "Línea horizontal que separa secciones."
+#: src/components/settings/AccountSection.tsx
+msgid "Host"
+msgstr "Host"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Hosting is on. The server is running on port {boundPort}. Reach it through your tunnel."
msgstr "El alojamiento está activo. El servidor se ejecuta en el puerto {boundPort}. Accede a él a través de tu túnel."
@@ -8611,8 +8657,8 @@ msgid "Manage skill folders"
msgstr "Gestionar las carpetas de habilidades"
#: src/components/settings/AccountSection.tsx
-msgid "Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."
-msgstr "Gestiona la cuenta de GitHub que usa OpenKnowledge para explorar y sincronizar tus repositorios."
+msgid "Manage the accounts and access tokens OpenKnowledge uses to connect to your git hosts."
+msgstr "Gestiona las cuentas y los tokens de acceso que OpenKnowledge usa para conectarse a tus hosts de git."
#: src/components/settings/AgentConnectionDialogs.tsx
#: src/components/settings/AgentConnectionsSection.tsx
@@ -9442,6 +9488,10 @@ msgstr "No hay cambios de contenido en esta versión."
msgid "No content changes in this version"
msgstr "No hay cambios de contenido en esta versión"
+#: src/components/SyncStatusBadge.tsx
+msgid "No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "No hay ninguna credencial guardada para este host de git. Añade un token en Ajustes, o deja que git use las credenciales que ya tiene."
+
#: src/components/GraphPanel.tsx
msgid "No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."
msgstr "No hay páginas desconectadas. Aquí solo aparecen las páginas sin aristas entrantes ni salientes en el grafo."
@@ -10394,6 +10444,10 @@ msgstr "Abriendo..."
msgid "OpenKnowledge"
msgstr "OpenKnowledge"
+#: src/components/AuthModal.tsx
+msgid "OpenKnowledge can't sign in to GitHub for this project."
+msgstr "OpenKnowledge no puede iniciar sesión en GitHub para este proyecto."
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge checked {subject}"
msgstr "OpenKnowledge revisó {subject}"
@@ -10406,10 +10460,6 @@ msgstr "OpenKnowledge revisó el proyecto"
msgid "OpenKnowledge could not find this agent on this machine."
msgstr "OpenKnowledge no encontró este agente en este equipo."
-#: src/components/settings/AccountSection.tsx
-msgid "OpenKnowledge couldn't find a host name in this project's git remote, so it can't tell which GitHub server to sign in to."
-msgstr "OpenKnowledge no encontró un nombre de host en el remoto de git de este proyecto, así que no puede saber en qué servidor de GitHub iniciar sesión."
-
#: src/lib/worktree-create-error.ts
msgid "OpenKnowledge couldn't finish setting up this project. The worktree was created but not opened."
msgstr "OpenKnowledge no pudo terminar de configurar este proyecto. El worktree se creó, pero no se abrió."
@@ -10466,6 +10516,10 @@ msgstr "OpenKnowledge editó un documento"
msgid "OpenKnowledge files were removed"
msgstr "Se eliminaron los archivos de OpenKnowledge"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "OpenKnowledge no tiene ninguna credencial guardada para este host. Añade un token en Ajustes, o deja que git use las credenciales que ya tiene."
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge imported {source}"
msgstr "OpenKnowledge importó {source}"
@@ -10694,6 +10748,11 @@ msgstr "otros"
msgid "Other"
msgstr "Otro"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Other Git hosts"
+msgstr "Otros hosts de Git"
+
#: src/components/settings/SharingSection.tsx
msgid "Other OK paths are tracked upstream:"
msgstr "Hay otras rutas OK seguidas en el remoto:"
@@ -11628,6 +11687,14 @@ msgstr "Hay que reconectar"
msgid "Reconnect required to keep syncing."
msgstr "Se requiere volver a conectar para seguir sincronizando."
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Add a token for this host in Settings, or replace the one stored."
+msgstr "Se requiere volver a conectar para seguir sincronizando. Añade un token para este host en Ajustes, o reemplaza el que está guardado."
+
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Check the SSH key or saved credentials git uses for this host."
+msgstr "Se requiere volver a conectar para seguir sincronizando. Revisa la clave SSH o las credenciales guardadas que git usa para este host."
+
#: src/presence/use-sync-toasts.ts
msgid "Reconnected"
msgstr "Reconectado"
@@ -14819,6 +14886,10 @@ msgstr "La lista de habilidades no coincide con su esquema."
msgid "The source folder itself does not move."
msgstr "La carpeta de origen en sí no se mueve."
+#: src/components/SyncStatusBadge.tsx
+msgid "The stored token is missing the permissions this host needs to push."
+msgstr "Al token guardado le faltan los permisos que este host necesita para hacer push."
+
#: src/components/TemplateProperties.tsx
msgid "The template's filename (without `.md`)."
msgstr "El nombre de archivo de la plantilla (sin `.md`)."
@@ -14877,6 +14948,10 @@ msgstr "No se encontró el ejecutable terminal.shell de .ok/local/config.yml. Se
msgid "The token needs the repo and read:user scopes."
msgstr "El token necesita los ámbitos repo y read:user."
+#: src/components/settings/AccountSection.tsx
+msgid "The username git sends with the token. Some hosts expect a fixed value: type <0>x-bitbucket-api-token-auth</0> for a Bitbucket API token, <1>x-token-auth</1> for a Bitbucket repository or workspace access token, or <2>oauth2</2> for GitLab. For Gitea, use your Gitea username. Azure DevOps accepts any value."
+msgstr "El nombre de usuario que git envía con el token. Algunos hosts esperan un valor fijo: escribe <0>x-bitbucket-api-token-auth</0> para un token de API de Bitbucket, <1>x-token-auth</1> para un token de acceso de repositorio o de espacio de trabajo de Bitbucket, u <2>oauth2</2> para GitLab. En Gitea, usa tu nombre de usuario de Gitea. Azure DevOps acepta cualquier valor."
+
#: src/lib/tab-session-restore-recovery-notice.ts
msgid "The workspace opened without it so the app could start."
msgstr "El espacio de trabajo se abrió sin él para que la aplicación pudiera iniciarse."
@@ -15405,10 +15480,6 @@ msgstr "Este proyecto no es un repositorio de git, así que los worktrees no est
msgid "This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."
msgstr "Este proyecto solo vive en este equipo. Conéctalo a GitHub para tener una copia de seguridad y compartirlo con otras personas."
-#: src/components/settings/AccountSection.tsx
-msgid "This project's git remote is on {host}, which OpenKnowledge doesn't recognize as a GitHub host. If {host} runs GitHub Enterprise Server, add it to GitHub Enterprise Server hosts below, then restart OpenKnowledge."
-msgstr "El remoto de git de este proyecto está en {host}, que OpenKnowledge no reconoce como host de GitHub. Si {host} ejecuta GitHub Enterprise Server, agrégalo en Hosts de GitHub Enterprise Server más abajo y luego reinicia OpenKnowledge."
-
#: src/components/DocumentErrorBoundary.tsx
msgid "This project's running server doesn't support live editing. Restart OpenKnowledge to fix."
msgstr "El servidor en marcha de este proyecto no admite edición en vivo. Reinicia OpenKnowledge para arreglarlo."
@@ -15505,6 +15576,7 @@ msgid "This usually means one of:"
msgstr "Esto suele significar una de estas cosas:"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
msgid "This window can't store a token — open Settings from the main app window."
msgstr "Esta ventana no puede guardar un token: abre Ajustes desde la ventana principal de la aplicación."
@@ -15658,6 +15730,15 @@ msgstr "Activa o desactiva el subrayado."
msgid "Toggles the pattern {0}/**"
msgstr "Alterna el patrón {0}/**"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "token"
+msgstr "token"
+
+#: src/components/settings/AccountSection.tsx
+msgid "Token stored for {login} on {host}. To remove it, run <0>ok auth signout --host {host}</0>."
+msgstr "Token guardado para {login} en {host}. Para quitarlo, ejecuta <0>ok auth signout --host {host}</0>."
+
#: src/components/SkillBundlePreview.tsx
#: src/components/SkillProperties.tsx
msgid "tokens"
@@ -16244,6 +16325,10 @@ msgstr "Usuario"
msgid "User plugins are personal to this device — turn them on or off here. Each enabled plugin gets its own page under Plugins in the settings sidebar."
msgstr "Los complementos de usuario son personales de este dispositivo: actívalos o desactívalos aquí. Cada complemento activado tiene su propia página bajo Complementos en la barra lateral de ajustes."
+#: src/components/settings/AccountSection.tsx
+msgid "Username"
+msgstr "Nombre de usuario"
+
#: src/components/settings/SearchSection.tsx
msgid "Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."
msgstr "Se está usando la variable de entorno <0>OK_EMBEDDINGS_API_KEY</0> (gestionada fuera de OpenKnowledge)."
diff --git a/packages/app/src/locales/fr/messages.json b/packages/app/src/locales/fr/messages.json
index 2b681c6da..40ec4d317 100644
--- a/packages/app/src/locales/fr/messages.json
+++ b/packages/app/src/locales/fr/messages.json
@@ -53,6 +53,9 @@
],
"-l6jM7": ["Démarrez un chat avec le bouton + ou lancez un agent depuis une page."],
"-lCAuQ": ["Chargement du graphe"],
+ "-nA68n": [
+ "Ajoutez un jeton d'accès pour un serveur GitLab, Gitea, Bitbucket, Azure DevOps ou git auto-hébergé. Sans jeton, git utilise les identifiants qu'il a déjà enregistrés pour cet hôte ; avec un jeton, OpenKnowledge utilise le jeton à la place."
+ ],
"-o5XAG": [
"Envoyé en privé à l'équipe OpenKnowledge, avec votre note et la version de l'application. Jamais publié publiquement."
],
@@ -289,6 +292,7 @@
"1vczDE": ["Ouvrir ", ["displayName"], " Desktop"],
"1vn0CI": ["Réponse du serveur invalide"],
"1xui0Q": ["Échec du chargement des fichiers locaux"],
+ "1yHVE-": ["Ajout"],
"2-3Mlu": ["Impossible de détacher ", ["name"]],
"20LVKb": [
"Quelque chose d'extérieur à ce chat a demandé au processus de l'agent de s'arrêter (",
@@ -563,6 +567,15 @@
"Intégration HTML en bac à sable — écrivez du HTML, voyez l'aperçu se rendre en direct."
],
"4nj6n8": ["/api/config a renvoyé HTTP ", ["code"]],
+ "4p8Baj": [
+ "Jeton enregistré pour ",
+ ["login"],
+ " sur ",
+ ["host"],
+ ". Pour le supprimer, exécutez <0>ok auth signout --host ",
+ ["host"],
+ "</0>."
+ ],
"4pDZ2N": [
"« ",
["0"],
@@ -886,13 +899,6 @@
"7YRrJ9": [
"Disponible dans l'application de bureau OpenKnowledge. Depuis un terminal, utilisez<0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2>."
],
- "7_I248": [
- "Le dépôt distant git de ce projet se trouve sur ",
- ["host"],
- ", qu’OpenKnowledge ne reconnaît pas comme un hôte GitHub. Si ",
- ["host"],
- " exécute GitHub Enterprise Server, ajoutez-le dans Hôtes GitHub Enterprise Server ci-dessous, puis redémarrez OpenKnowledge."
- ],
"7_bFEL": ["Faites glisser ", ["patternText"], " pour réorganiser"],
"7a0YcF": ["Appuyez sur <0>Espace</0> ou touchez le blob pour commencer"],
"7aNk5D": ["OpenKnowledge a modifié ", ["subject"]],
@@ -927,6 +933,7 @@
"7lFX_h": ["Réorienter maintenant"],
"7m3Ade": ["installations :"],
"7qRHf0": ["Installer pour Claude Chat et Cowork"],
+ "7sNhEz": ["Nom d'utilisateur"],
"7uBlRT": [
"Copie l'élément de l'arborescence ayant le focus pour que Coller puisse le dupliquer."
],
@@ -1094,6 +1101,7 @@
"9bCiQ8": ["Aucune page ne manque de liens entrants dans le graphe."],
"9bG48P": ["Envoi en cours"],
"9clcD5": ["Ouvrir les documents étiquetés #", ["chip"]],
+ "9djC8C": ["Connectez un compte GitHub pour parcourir et publier des dépôts GitHub."],
"9euN0m": [
[
"count",
@@ -1207,7 +1215,6 @@
" dans ",
["parentLabel"]
],
- "AeXO77": ["Compte"],
"AgoIW4": [
["source"],
" : ",
@@ -1220,6 +1227,7 @@
["detail"]
],
"AhoGwP": ["Configurer les intégrations OpenKnowledge"],
+ "Ai2U7L": ["Hôte"],
"AiNMQ7": [
"Ce projet n'existe que sur cet ordinateur. Connectez-le à GitHub pour le sauvegarder et le partager avec d'autres personnes."
],
@@ -1561,9 +1569,6 @@
"E2Mv-X": ["Copier la source"],
"E4XYYH": ["Activer le terminal pour ce projet"],
"E5WeIy": ["Rouvre le dernier onglet d'éditeur fermé."],
- "E6lrpp": [
- "Gérez le compte GitHub qu'OpenKnowledge utilise pour parcourir et synchroniser vos dépôts."
- ],
"E7BhZn": ["Note vierge"],
"E8NbNG": ["Impossible de charger les arbres de travail."],
"E91VZY": ["Ouvrir dans une nouvelle fenêtre"],
@@ -1577,7 +1582,6 @@
"EEYbdt": ["Publier"],
"EFfGAv": ["Ce message est déjà parti : votre modification n’a pas été appliquée."],
"EHu0x2": ["Synchronisation en cours"],
- "EJuO7B": ["Connectez un compte GitHub pour parcourir et synchroniser vos dépôts."],
"EKwNEe": [
"Les embeddings en cache appartiennent au point de terminaison et au modèle qui les ont produits, donc ceci reconstruit l'index depuis zéro."
],
@@ -1737,6 +1741,9 @@
"FgRAvd": ["Journaux et informations système"],
"Fhp4Gn": ["Voir le plugin"],
"Fim5F3": ["embeddings"],
+ "FioJgb": [
+ "Reconnexion requise pour continuer la synchronisation. Ajoutez un jeton pour cet hôte dans les Paramètres, ou remplacez celui qui est enregistré."
+ ],
"FiyNln": ["Aller au texte sélectionné dans la propriété"],
"FjkaiT": ["Zoom arrière"],
"Fjz6aJ": ["Envoyer dans un nouveau chat"],
@@ -2229,6 +2236,9 @@
],
"Kx881F": [["0"], " a été restauré."],
"KziH2K": ["Rapide"],
+ "L-crEu": [
+ "git n'a pas pu s'authentifier auprès de cet hôte. Vérifiez la clé SSH ou les identifiants enregistrés que git utilise pour lui."
+ ],
"L-rMC9": ["Réinitialiser à la valeur par défaut"],
"L1BQTH": [["0"], " n'est pas encore installé — ouverture de sa page de téléchargement."],
"L1ZE3M": ["Statistiques du document"],
@@ -2303,6 +2313,9 @@
"LRgZAt": [["owner"], "/", ["name"], " existe déjà"],
"LSuMte": [["0"], " sur ", ["totalCount"]],
"LTeJuX": ["Basculer en plein écran"],
+ "LVWA9A": [
+ "L'authentification a échoué pour cet hôte git. Ajoutez un jeton pour lui dans les Paramètres, ou remplacez celui qui est enregistré."
+ ],
"LXIm4m": ["Fenetre de contexte"],
"LXdWeS": ["Titre de section moyen."],
"LXfNU-": ["Navigation et suggestions"],
@@ -2459,6 +2472,7 @@
"Mj8R8K": ["Impossible d'installer la compétence : ", ["0"]],
"MmDDWK": ["Ouverts récemment"],
"Mnavhe": ["Propriétés de ", ["propPanelDescriptorLabel"]],
+ "MpZRQy": ["Git"],
"MqQoV-": [
"Décrivez ce que vous voulez construire, partez d'un fichier vierge, ou générez à partir d'un modèle."
],
@@ -2640,6 +2654,9 @@
"OPOiKn": ["Règles de contenu"],
"OTF92M": ["Libellé <0>(texte affiché, facultatif)</0>"],
"OVjNeX": ["Terminal ", ["0"]],
+ "OWs-8P": [
+ "Un jeton ajouté ici ne s'applique qu'aux dépôts distants HTTPS, et le dépôt distant de ce projet n'utilise pas HTTPS."
+ ],
"OX2Neh": ["Code en ligne"],
"OXb_Df": ["Contenu des paramètres"],
"OXdGnd": ["Problèmes"],
@@ -2767,6 +2784,7 @@
["filePath"],
". Explique ce que je dois comparer dans la vue des conflits d’OpenKnowledge ; je choisirai et appliquerai la résolution là-bas."
],
+ "Q14Keq": ["Bitbucket"],
"Q1mtyd": ["Masquer la barre latérale"],
"Q5fqMz": ["Erreur de connexion — réessayez"],
"Q6hhn8": ["Préférences"],
@@ -3071,6 +3089,7 @@
"SiUUCS": ["Occurrence suivante"],
"SkMZlS": ["Impossible de supprimer <0>", ["targetGitPath"], "</0> : ", ["removeGitError"]],
"SkTkKV": ["L'agent ne s'arrête pas. L'arrêt forcé ferme ce chat et quitte l'agent."],
+ "SkUcEr": ["Jeton d'accès"],
"Ske_wc": [
"Les plugins utilisateur sont propres à cet appareil — activez-les ou désactivez-les ici. Chaque plugin activé obtient sa propre page sous Plugins dans la barre latérale des paramètres."
],
@@ -3472,9 +3491,6 @@
"XAyxsa": ["Extraire une branche distante"],
"XBBZnv": ["La cible du lien « ", ["shown"], " » ne correspond à aucun document existant."],
"XBgr2S": ["Copier ici"],
- "XBpH6-": [
- "OpenKnowledge n’a trouvé aucun nom d’hôte dans le dépôt distant git de ce projet : impossible de savoir à quel serveur GitHub se connecter."
- ],
"XDzAnp": ["S'ouvre dans un nouvel onglet"],
"XF1kgP": ["Tout ce qui provient de ", ["source"], " est déjà à jour"],
"XGKy1z": ["Impossible d'afficher l'image"],
@@ -3963,6 +3979,9 @@
"Les paramètres d'aperçu des liens ne sont pas encore chargés — réessayez dans un instant"
],
"axQ1h6": ["Vous souhaitez ajouter quelque chose ? (facultatif)"],
+ "azrR7I": [
+ "Le nom d'utilisateur que git envoie avec le jeton. Certains hôtes attendent une valeur fixe : saisissez <0>x-bitbucket-api-token-auth</0> pour un jeton d'API Bitbucket, <1>x-token-auth</1> pour un jeton d'accès de dépôt ou d'espace de travail Bitbucket, ou <2>oauth2</2> pour GitLab. Pour Gitea, utilisez votre nom d'utilisateur Gitea. Azure DevOps accepte n'importe quelle valeur."
+ ],
"b18t0_": ["Fermer les différences"],
"b1FDss": ["Défiler jusqu'au début"],
"b2ezG_": ["Les deux conservés — « ", ["0"], " » est désormais une compétence à part entière"],
@@ -4363,6 +4382,7 @@
"e8zRrb": ["Afficher les fichiers"],
"e8zYa8": ["Impossible d'ouvrir ", ["shareBranch"], " dans un worktree. Réessayez."],
"e9sHSO": ["Reprenez là où vous vous étiez arrêté"],
+ "eAYJMv": ["jeton"],
"eBGWcy": [
"Les outils Open Knowledge ne sont pas disponibles, car le dossier du projet est introuvable, inaccessible ou a changé. Vérifiez son emplacement et ses autorisations, puis réessayez."
],
@@ -5026,6 +5046,7 @@
"jZ_E5M": ["Échec de la récupération — consultez les journaux du serveur pour les détails."],
"j_Z6g7": ["Valeur par défaut partagée"],
"jbSG8V": ["Afficher les fichiers (", ["sidebarShortcutLabel"], ")"],
+ "jbhCDS": ["Autres hôtes Git"],
"jcEoUi": ["Déplacer vers le panneau de droite"],
"jdGUeI": ["Impossible de créer le modèle : ", ["error"]],
"jeCFV7": ["Déplacer vers un nouveau volet à droite"],
@@ -5688,6 +5709,9 @@
["0", "plural", { "one": ["Dossier"], "many": ["Dossiers"], "other": ["Dossiers"] }]
],
"pd0UH2": ["Aligner à droite"],
+ "pd6t3G": [
+ "Gérez les comptes et les jetons d'accès qu'OpenKnowledge utilise pour se connecter à vos hôtes git."
+ ],
"peq20S": [
"Le navigateur n'est pas disponible dans ce chat, car il n'a pas pu être configuré. Le journal d'OpenKnowledge contient les détails."
],
@@ -5824,6 +5848,7 @@
],
"qi1F96": ["Afficher dans l'Explorateur de fichiers"],
"qiRoLb": ["Résume tout ce que j'ai changé cette semaine"],
+ "qimTXH": ["OpenKnowledge ne peut pas se connecter à GitHub pour ce projet."],
"qioCwA": ["Aller à la page ", ["pageNumber"]],
"qjHMHf": ["Échec de la désactivation de la synchronisation — ", ["detail"]],
"qkqG0b": ["Prendre la version amont"],
@@ -5892,6 +5917,9 @@
"rVxu1k": ["Aucune page ne renvoie encore ici."],
"rXz97P": ["Liste numérotée d'éléments."],
"rZ9HZq": ["À faire"],
+ "rZFxkH": [
+ "Saisissez le nom d'hôte auquel git se connecte, avec un :port facultatif et sans schéma ni chemin, par exemple git.example.com."
+ ],
"rZVMkf": ["Champ de remplacement de l'éditeur visuel actif"],
"radOpL": ["Image ", ["identity"], ". Accéder à la référence."],
"rageVb": ["HTML personnalisé avec un volet d'aperçu en direct (iframe en bac à sable)."],
@@ -6120,6 +6148,9 @@
"tlGXxX": ["Auto (Tirer seulement)"],
"tnG-m6": ["La synchronisation automatique est en pause — connectez-vous pour la reprendre."],
"toyw51": ["Contrôles du diagramme Mermaid"],
+ "tpOnU9": [
+ "OpenKnowledge n'a aucun identifiant enregistré pour cet hôte. Ajoutez un jeton dans les Paramètres, ou laissez git utiliser les identifiants dont il dispose déjà."
+ ],
"tqQBwN": ["Les scripts sont affichés pour relecture, jamais exécutés."],
"troubleshooting.claude-desktop.per-tool-approval": [
["agent"],
@@ -6303,6 +6334,7 @@
]
],
"ur2XSb": ["Éditeur visuel"],
+ "uraHF0": ["GitLab"],
"uuoHOU": ["La commande a échoué."],
"uwzRx4": [
"Ajustez la taille et le délai d'attente des requêtes d'indexation pour les serveurs d'embeddings lents ou limités en mémoire. La plupart des configurations devraient conserver les valeurs par défaut."
@@ -6437,6 +6469,9 @@
"vy_VIN": [
"Suivi dans git — les mises à jour arrivent via votre dépôt (pull ou CI), pas par mise à jour automatique"
],
+ "w-Wt3H": [
+ "Reconnexion requise pour continuer la synchronisation. Vérifiez la clé SSH ou les identifiants enregistrés que git utilise pour cet hôte."
+ ],
"w0YVAE": ["Afficher les nœuds de compétences"],
"w3tVpc": [
"Pas encore de liens. Ajoutez des liens wiki ou markdown pour construire un graphe."
@@ -6560,7 +6595,6 @@
"x57cJf": ["Ouvrir le lien"],
"xAlHfe": [["basename"], " — éditeur de texte"],
"xBFg6z": ["Du plugin ", ["0"]],
- "xBjIs7": ["La connexion GitHub n’est pas disponible pour ce projet"],
"xCJdfg": ["Effacer"],
"xCdTnb": ["Fermer le nouvel onglet"],
"xD4Xm2": ["Récupérer"],
@@ -6572,6 +6606,9 @@
"xG4tb6": ["Connexion perdue avec « ", ["docName"], " »."],
"xG8Ish": ["Non planifié"],
"xHGM4U": ["Masquer l'aperçu HTML"],
+ "xJ7qrb": [
+ "Aucun identifiant n'est enregistré pour cet hôte git. Ajoutez un jeton dans les Paramètres, ou laissez git utiliser les identifiants dont il dispose déjà."
+ ],
"xK291b": ["Deux pages (impaires)"],
"xKDsGS": ["Aller à la ligne ", ["0"], " dans ", ["1"]],
"xKcXG6": [
@@ -6673,6 +6710,9 @@
"yLwx9e": [
"C'est un répertoire parent qui est le lien symbolique — dissociez ce dossier-là pour récupérer celui-ci."
],
+ "yLyiQV": [
+ "Il manque au jeton enregistré les permissions dont cet hôte a besoin pour pousser."
+ ],
"yMgL_E": ["Navigation dans le champ de recherche"],
"yOjRUV": ["Aucun outil IA détecté. Installez-en un pour utiliser cette compétence."],
"yQE2r9": ["Chargement"],
@@ -6798,6 +6838,7 @@
"zLak8b": ["Activer le nouvel onglet"],
"zMmwh4": ["Choisissez un thème ou créez le vôtre."],
"zWZBPx": ["Type modifié"],
+ "zXZJoN": ["Ajouter le jeton"],
"zXj1rA": ["Rechercher par le sens"],
"zYp8Sr": [
"Un badge <0>Modifié</0> signale les règles que votre configuration définit explicitement — directement, ou héritées via <1>extends</1>. Les règles sans badge conservent leur état par défaut."
diff --git a/packages/app/src/locales/fr/messages.po b/packages/app/src/locales/fr/messages.po
index 141d88414..9baafe7d2 100644
--- a/packages/app/src/locales/fr/messages.po
+++ b/packages/app/src/locales/fr/messages.po
@@ -1548,6 +1548,10 @@ msgstr "Un modèle nommé <0>{trimmedSlug}</0> existe déjà ici. L'enregistrer
msgid "A title, description, tags — anything that describes this folder."
msgstr "Un titre, une description, des étiquettes — tout ce qui décrit ce dossier."
+#: src/components/settings/AccountSection.tsx
+msgid "A token added here only applies to HTTPS remotes, and this project's remote doesn't use HTTPS."
+msgstr "Un jeton ajouté ici ne s'applique qu'aux dépôts distants HTTPS, et le dépôt distant de ce projet n'utilise pas HTTPS."
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "A worktree folder for {shareBranch} already exists."
msgstr "Un dossier de worktree pour {shareBranch} existe déjà."
@@ -1600,9 +1604,8 @@ msgid "Accept their deletion"
msgstr "Accepter leur suppression"
#: src/components/settings/AccountSection.tsx
-#: src/components/settings/SettingsDialogShell.tsx
-msgid "Account"
-msgstr "Compte"
+msgid "Access token"
+msgstr "Jeton d'accès"
#: src/components/TemplateRow.tsx
msgid "Actions for {label}"
@@ -1681,6 +1684,10 @@ msgstr "Ajouter une propriété"
msgid "Add a starter pack"
msgstr "Ajouter un pack de démarrage"
+#: src/components/settings/AccountSection.tsx
+msgid "Add an access token for a GitLab, Gitea, Bitbucket, Azure DevOps or self-hosted git server. Without one, git uses the credentials it already has saved for that host; with one, OpenKnowledge uses the token instead."
+msgstr "Ajoutez un jeton d'accès pour un serveur GitLab, Gitea, Bitbucket, Azure DevOps ou git auto-hébergé. Sans jeton, git utilise les identifiants qu'il a déjà enregistrés pour cet hôte ; avec un jeton, OpenKnowledge utilise le jeton à la place."
+
#: src/components/settings/OkignoreSection.tsx
msgid "Add another pattern"
msgstr "Ajouter un autre motif"
@@ -1810,6 +1817,12 @@ msgstr "Ajouter au dictionnaire"
msgid "Add to prompt"
msgstr "Ajouter à l’invite"
+#: src/components/settings/AccountSection.tsx
+#: src/components/SyncStatusBadge.tsx
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Add token"
+msgstr "Ajouter le jeton"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Add value"
msgstr "Ajouter une valeur"
@@ -1820,6 +1833,10 @@ msgstr "Ajouter une valeur"
msgid "Added"
msgstr "Ajouté"
+#: src/components/settings/AccountSection.tsx
+msgid "Adding"
+msgstr "Ajout"
+
#: src/components/settings/AgentConnectionDialogs.tsx
msgid "Adds a global OpenKnowledge MCP entry for this agent."
msgstr "Ajoute une entrée MCP OpenKnowledge globale pour cet agent."
@@ -2335,6 +2352,10 @@ msgstr "Les pièces jointes doivent totaliser moins de 3 Mo."
msgid "Authenticated as {login}."
msgstr "Authentifié en tant que {login}."
+#: src/components/SyncStatusBadge.tsx
+msgid "Authentication failed for this git host. Add a token for it in Settings, or replace the one stored."
+msgstr "L'authentification a échoué pour cet hôte git. Ajoutez un jeton pour lui dans les Paramètres, ou remplacez celui qui est enregistré."
+
#: src/editor/slash-command/component-items.tsx
msgid "Authoritative content; mirrored verbatim everywhere it's referenced."
msgstr "Contenu faisant autorité ; reproduit tel quel partout où il est référencé."
@@ -2536,6 +2557,11 @@ msgstr "Grand titre de section."
msgid "Bird wiki"
msgstr "Wiki des oiseaux"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "Bitbucket"
+msgstr "Bitbucket"
+
#: src/components/NewItemDialog.tsx
msgid "Blank note"
msgstr "Note vierge"
@@ -3605,8 +3631,8 @@ msgid "Connect"
msgstr "Connecter"
#: src/components/settings/AccountSection.tsx
-msgid "Connect a GitHub account to browse and sync your repositories."
-msgstr "Connectez un compte GitHub pour parcourir et synchroniser vos dépôts."
+msgid "Connect a GitHub account to browse and publish GitHub repositories."
+msgstr "Connectez un compte GitHub pour parcourir et publier des dépôts GitHub."
#: src/components/settings/SyncSection.tsx
msgid "Connect an existing repository"
@@ -3698,6 +3724,7 @@ msgid "Connection dropped"
msgstr "Connexion interrompue"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Connection error — try again"
msgstr "Erreur de connexion — réessayez"
@@ -5937,6 +5964,10 @@ msgstr "Saisissez un nombre entier compris entre {minimum} et {maximum}."
msgid "Enter at least 3 characters to search by meaning."
msgstr "Saisissez au moins 3 caractères pour rechercher par sens."
+#: src/components/settings/AccountSection.tsx
+msgid "Enter the host name git connects to, with an optional :port and no scheme or path, for example git.example.com."
+msgstr "Saisissez le nom d'hôte auquel git se connecte, avec un :port facultatif et sans schéma ni chemin, par exemple git.example.com."
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Enter the public origin your tunnel serves, for example https://notes.example.com"
msgstr "Saisissez l'origine publique servie par votre tunnel, par exemple https://notes.example.com"
@@ -6412,6 +6443,7 @@ msgid "Failed to start sign-in — try again"
msgstr "Échec du démarrage de la connexion — réessayez"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Failed to store the token — try again"
msgstr "Échec de l'enregistrement du jeton — réessayez"
@@ -6885,6 +6917,11 @@ msgctxt "settings search keyword"
msgid "GHES"
msgstr "GHES"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Git"
+msgstr "Git"
+
#: src/components/ExploreSkills.tsx
msgid "Git & PRs"
msgstr "Git et PR"
@@ -6893,6 +6930,10 @@ msgstr "Git et PR"
msgid "Git can't track this folder — it's empty or contains only ignored files. The link won't work until you add a tracked document."
msgstr "Git ne peut pas suivre ce dossier — il est vide ou ne contient que des fichiers ignorés. Le lien ne fonctionnera pas tant que vous n'aurez pas ajouté un document suivi."
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it."
+msgstr "git n'a pas pu s'authentifier auprès de cet hôte. Vérifiez la clé SSH ou les identifiants enregistrés que git utilise pour lui."
+
#: src/components/RecentProjectsMenu.tsx
msgid "Git has locked this worktree, but it can still be opened."
msgstr "Git a verrouillé ce worktree, mais il peut toujours être ouvert."
@@ -6952,10 +6993,6 @@ msgstr "Hôtes GitHub Enterprise Server"
msgid "GitHub sign-in is missing or expired. Reconnect to resume syncing."
msgstr "La connexion GitHub est absente ou expirée. Reconnectez-vous pour reprendre la synchronisation."
-#: src/components/settings/AccountSection.tsx
-msgid "GitHub sign-in isn't available for this project"
-msgstr "La connexion GitHub n’est pas disponible pour ce projet"
-
#: src/components/ImportSkillForm.tsx
msgid "GitHub, a git URL, or a local path."
msgstr "GitHub, une URL git, ou un chemin local."
@@ -6964,6 +7001,11 @@ msgstr "GitHub, une URL git, ou un chemin local."
msgid "github.com is always recognized, so it doesn't need to be added."
msgstr "github.com est toujours reconnu : inutile de l’ajouter."
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "GitLab"
+msgstr "GitLab"
+
#: src/components/settings/SavedThemesTiles.tsx
msgid "Give it a name before editing its colors."
msgstr "Donnez-lui un nom avant de modifier ses couleurs."
@@ -7318,6 +7360,10 @@ msgstr "Bande horizontale de pastilles + panneau actif en dessous ; cliquez sur
msgid "Horizontal rule that divides sections."
msgstr "Filet horizontal qui sépare les sections."
+#: src/components/settings/AccountSection.tsx
+msgid "Host"
+msgstr "Hôte"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Hosting is on. The server is running on port {boundPort}. Reach it through your tunnel."
msgstr "L’hébergement est activé. Le serveur fonctionne sur le port {boundPort}. Accédez-y via votre tunnel."
@@ -8611,8 +8657,8 @@ msgid "Manage skill folders"
msgstr "Gérer les dossiers de compétences"
#: src/components/settings/AccountSection.tsx
-msgid "Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."
-msgstr "Gérez le compte GitHub qu'OpenKnowledge utilise pour parcourir et synchroniser vos dépôts."
+msgid "Manage the accounts and access tokens OpenKnowledge uses to connect to your git hosts."
+msgstr "Gérez les comptes et les jetons d'accès qu'OpenKnowledge utilise pour se connecter à vos hôtes git."
#: src/components/settings/AgentConnectionDialogs.tsx
#: src/components/settings/AgentConnectionsSection.tsx
@@ -9442,6 +9488,10 @@ msgstr "Aucune modification de contenu dans cette version."
msgid "No content changes in this version"
msgstr "Aucune modification de contenu dans cette version"
+#: src/components/SyncStatusBadge.tsx
+msgid "No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "Aucun identifiant n'est enregistré pour cet hôte git. Ajoutez un jeton dans les Paramètres, ou laissez git utiliser les identifiants dont il dispose déjà."
+
#: src/components/GraphPanel.tsx
msgid "No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."
msgstr "Aucune page isolée. Les pages n'apparaissent ici que si elles n'ont ni arête entrante ni arête sortante dans le graphe."
@@ -10394,6 +10444,10 @@ msgstr "Ouverture…"
msgid "OpenKnowledge"
msgstr "OpenKnowledge"
+#: src/components/AuthModal.tsx
+msgid "OpenKnowledge can't sign in to GitHub for this project."
+msgstr "OpenKnowledge ne peut pas se connecter à GitHub pour ce projet."
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge checked {subject}"
msgstr "OpenKnowledge a vérifié {subject}"
@@ -10406,10 +10460,6 @@ msgstr "OpenKnowledge a vérifié le projet"
msgid "OpenKnowledge could not find this agent on this machine."
msgstr "OpenKnowledge n'a pas trouvé cet agent sur cette machine."
-#: src/components/settings/AccountSection.tsx
-msgid "OpenKnowledge couldn't find a host name in this project's git remote, so it can't tell which GitHub server to sign in to."
-msgstr "OpenKnowledge n’a trouvé aucun nom d’hôte dans le dépôt distant git de ce projet : impossible de savoir à quel serveur GitHub se connecter."
-
#: src/lib/worktree-create-error.ts
msgid "OpenKnowledge couldn't finish setting up this project. The worktree was created but not opened."
msgstr "OpenKnowledge n’a pas pu terminer la configuration de ce projet. Le worktree a été créé, mais pas ouvert."
@@ -10466,6 +10516,10 @@ msgstr "OpenKnowledge a modifié un document"
msgid "OpenKnowledge files were removed"
msgstr "Les fichiers OpenKnowledge ont été supprimés"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "OpenKnowledge n'a aucun identifiant enregistré pour cet hôte. Ajoutez un jeton dans les Paramètres, ou laissez git utiliser les identifiants dont il dispose déjà."
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge imported {source}"
msgstr "OpenKnowledge a importé {source}"
@@ -10694,6 +10748,11 @@ msgstr "autres"
msgid "Other"
msgstr "Autre"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Other Git hosts"
+msgstr "Autres hôtes Git"
+
#: src/components/settings/SharingSection.tsx
msgid "Other OK paths are tracked upstream:"
msgstr "D'autres chemins OK sont suivis en amont :"
@@ -11628,6 +11687,14 @@ msgstr "Reconnexion nécessaire"
msgid "Reconnect required to keep syncing."
msgstr "Reconnexion requise pour continuer la synchronisation."
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Add a token for this host in Settings, or replace the one stored."
+msgstr "Reconnexion requise pour continuer la synchronisation. Ajoutez un jeton pour cet hôte dans les Paramètres, ou remplacez celui qui est enregistré."
+
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Check the SSH key or saved credentials git uses for this host."
+msgstr "Reconnexion requise pour continuer la synchronisation. Vérifiez la clé SSH ou les identifiants enregistrés que git utilise pour cet hôte."
+
#: src/presence/use-sync-toasts.ts
msgid "Reconnected"
msgstr "Reconnecté"
@@ -14819,6 +14886,10 @@ msgstr "La liste de compétences ne correspond pas à son schéma."
msgid "The source folder itself does not move."
msgstr "Le dossier source lui-même ne bouge pas."
+#: src/components/SyncStatusBadge.tsx
+msgid "The stored token is missing the permissions this host needs to push."
+msgstr "Il manque au jeton enregistré les permissions dont cet hôte a besoin pour pousser."
+
#: src/components/TemplateProperties.tsx
msgid "The template's filename (without `.md`)."
msgstr "Le nom de fichier du modèle (sans `.md`)."
@@ -14877,6 +14948,10 @@ msgstr "L’exécutable terminal.shell indiqué dans .ok/local/config.yml est in
msgid "The token needs the repo and read:user scopes."
msgstr "Le jeton doit avoir les portées repo et read:user."
+#: src/components/settings/AccountSection.tsx
+msgid "The username git sends with the token. Some hosts expect a fixed value: type <0>x-bitbucket-api-token-auth</0> for a Bitbucket API token, <1>x-token-auth</1> for a Bitbucket repository or workspace access token, or <2>oauth2</2> for GitLab. For Gitea, use your Gitea username. Azure DevOps accepts any value."
+msgstr "Le nom d'utilisateur que git envoie avec le jeton. Certains hôtes attendent une valeur fixe : saisissez <0>x-bitbucket-api-token-auth</0> pour un jeton d'API Bitbucket, <1>x-token-auth</1> pour un jeton d'accès de dépôt ou d'espace de travail Bitbucket, ou <2>oauth2</2> pour GitLab. Pour Gitea, utilisez votre nom d'utilisateur Gitea. Azure DevOps accepte n'importe quelle valeur."
+
#: src/lib/tab-session-restore-recovery-notice.ts
msgid "The workspace opened without it so the app could start."
msgstr "L'espace de travail s'est ouvert sans lui pour que l'application puisse démarrer."
@@ -15405,10 +15480,6 @@ msgstr "Ce projet n'est pas un dépôt git, les worktrees ne sont donc pas dispo
msgid "This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."
msgstr "Ce projet n'existe que sur cet ordinateur. Connectez-le à GitHub pour le sauvegarder et le partager avec d'autres personnes."
-#: src/components/settings/AccountSection.tsx
-msgid "This project's git remote is on {host}, which OpenKnowledge doesn't recognize as a GitHub host. If {host} runs GitHub Enterprise Server, add it to GitHub Enterprise Server hosts below, then restart OpenKnowledge."
-msgstr "Le dépôt distant git de ce projet se trouve sur {host}, qu’OpenKnowledge ne reconnaît pas comme un hôte GitHub. Si {host} exécute GitHub Enterprise Server, ajoutez-le dans Hôtes GitHub Enterprise Server ci-dessous, puis redémarrez OpenKnowledge."
-
#: src/components/DocumentErrorBoundary.tsx
msgid "This project's running server doesn't support live editing. Restart OpenKnowledge to fix."
msgstr "Le serveur en cours d'exécution de ce projet ne prend pas en charge l'édition en direct. Redémarrez OpenKnowledge pour corriger cela."
@@ -15505,6 +15576,7 @@ msgid "This usually means one of:"
msgstr "Cela signifie généralement l'une de ces choses :"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
msgid "This window can't store a token — open Settings from the main app window."
msgstr "Cette fenêtre ne peut pas stocker de jeton — ouvrez les Paramètres depuis la fenêtre principale de l'application."
@@ -15658,6 +15730,15 @@ msgstr "Bascule la mise en forme soulignée."
msgid "Toggles the pattern {0}/**"
msgstr "Active ou désactive le motif {0}/**"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "token"
+msgstr "jeton"
+
+#: src/components/settings/AccountSection.tsx
+msgid "Token stored for {login} on {host}. To remove it, run <0>ok auth signout --host {host}</0>."
+msgstr "Jeton enregistré pour {login} sur {host}. Pour le supprimer, exécutez <0>ok auth signout --host {host}</0>."
+
#: src/components/SkillBundlePreview.tsx
#: src/components/SkillProperties.tsx
msgid "tokens"
@@ -16244,6 +16325,10 @@ msgstr "Utilisateur"
msgid "User plugins are personal to this device — turn them on or off here. Each enabled plugin gets its own page under Plugins in the settings sidebar."
msgstr "Les plugins utilisateur sont propres à cet appareil — activez-les ou désactivez-les ici. Chaque plugin activé obtient sa propre page sous Plugins dans la barre latérale des paramètres."
+#: src/components/settings/AccountSection.tsx
+msgid "Username"
+msgstr "Nom d'utilisateur"
+
#: src/components/settings/SearchSection.tsx
msgid "Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."
msgstr "Utilise la variable d'environnement <0>OK_EMBEDDINGS_API_KEY</0> (gérée en dehors d'OpenKnowledge)."
diff --git a/packages/app/src/locales/hi/messages.json b/packages/app/src/locales/hi/messages.json
index a0bd5b3c8..a62259034 100644
--- a/packages/app/src/locales/hi/messages.json
+++ b/packages/app/src/locales/hi/messages.json
@@ -41,6 +41,9 @@
],
"-l6jM7": ["+ बटन से चैट शुरू करें, या किसी पेज से एजेंट लॉन्च करें।"],
"-lCAuQ": ["ग्राफ़ लोड हो रहा है"],
+ "-nA68n": [
+ "GitLab, Gitea, Bitbucket, Azure DevOps या स्व-होस्ट किए गए git सर्वर के लिए पहुँच टोकन जोड़ें। टोकन न होने पर git उस होस्ट के लिए पहले से सहेजे गए क्रेडेंशियल उपयोग करता है; टोकन होने पर OpenKnowledge उनकी जगह टोकन उपयोग करता है।"
+ ],
"-o5XAG": [
"आपके नोट और ऐप संस्करण के साथ निजी तौर पर OpenKnowledge टीम को भेजा गया। कभी सार्वजनिक रूप से पोस्ट नहीं किया जाता।"
],
@@ -235,6 +238,7 @@
"1vczDE": [["displayName"], " Desktop खोलें"],
"1vn0CI": ["सर्वर की प्रतिक्रिया अमान्य है"],
"1xui0Q": ["स्थानीय फ़ाइलें लोड करने में विफल"],
+ "1yHVE-": ["जोड़ा जा रहा है"],
"2-3Mlu": [["name"], " का पिन नहीं हटाया जा सका"],
"20LVKb": ["इस चैट के बाहर की किसी चीज़ ने एजेंट प्रोसेस को रुकने के लिए कहा (", ["signal"], ")।"],
"2277Tu": ["ग्राफ़ समेटें"],
@@ -459,6 +463,14 @@
"4mp6Tv": ["OpenKnowledge ने इंस्टॉल की गई स्किल सूचीबद्ध कीं"],
"4niEzY": ["सैंडबॉक्स किया गया HTML एम्बेड — HTML लिखें, रेंडर किया गया पूर्वावलोकन तुरंत देखें।"],
"4nj6n8": ["/api/config ने HTTP ", ["code"], " लौटाया"],
+ "4p8Baj": [
+ ["host"],
+ " पर ",
+ ["login"],
+ " के लिए टोकन सहेजा गया। इसे हटाने के लिए <0>ok auth signout --host ",
+ ["host"],
+ "</0> चलाएँ।"
+ ],
"4pDZ2N": ["\"", ["0"], "\" को बाकी हर स्थान से हटा दिया गया — इसका स्रोत फ़ोल्डर अब भी लोड होता है"],
"4r6p_B": [
"इस कमांड में छिपे हुए वर्ण हैं, जिनके कारण यह जो असल में चलता है उससे अलग दिख सकता है। इन्हें यहाँ ⟨U+…⟩ के रूप में दिखाया गया है।"
@@ -712,13 +724,6 @@
"7YRrJ9": [
"OpenKnowledge डेस्कटॉप ऐप में उपलब्ध। टर्मिनल से <0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2> का उपयोग करें।"
],
- "7_I248": [
- "इस प्रोजेक्ट का git रिमोट ",
- ["host"],
- " पर है, जिसे OpenKnowledge GitHub होस्ट के रूप में नहीं पहचानता। यदि ",
- ["host"],
- " पर GitHub Enterprise Server चलता है, तो उसे नीचे GitHub Enterprise Server होस्ट में जोड़ें, फिर OpenKnowledge को फिर से शुरू करें।"
- ],
"7_bFEL": ["क्रम बदलने के लिए ", ["patternText"], " खींचें"],
"7a0YcF": ["शुरू करने के लिए <0>स्पेस</0> दबाएँ या blob पर टैप करें"],
"7aNk5D": ["OpenKnowledge ने ", ["subject"], " को संपादित किया"],
@@ -747,6 +752,7 @@
"7lFX_h": ["अभी दिशा बदलें"],
"7m3Ade": ["इंस्टॉल:"],
"7qRHf0": ["Claude Chat और Cowork के लिए इंस्टॉल करें"],
+ "7sNhEz": ["उपयोगकर्ता नाम"],
"7uBlRT": ["फ़ाइल-ट्री के फ़ोकस किए गए आइटम को कॉपी करें ताकि Paste उसकी नकल बना सके।"],
"7vxWET": ["पैक पूर्वावलोकन उपलब्ध नहीं है।"],
"7wogIQ": [["0", "plural", { "one": ["प्लगइन"], "other": ["प्लगइन"] }]],
@@ -887,6 +893,7 @@
"9bCiQ8": ["किसी पेज पर आने वाले ग्राफ़ लिंक अनुपस्थित नहीं हैं।"],
"9bG48P": ["भेजा जा रहा है"],
"9clcD5": ["#", ["chip"], " टैग वाले दस्तावेज़ खोलें"],
+ "9djC8C": ["GitHub रिपॉज़िटरी ब्राउज़ और प्रकाशित करने के लिए कोई GitHub खाता जोड़ें।"],
"9euN0m": [
[
"count",
@@ -984,7 +991,6 @@
" में से ",
["position"]
],
- "AeXO77": ["खाता"],
"AgoIW4": [
["source"],
": ",
@@ -997,6 +1003,7 @@
["detail"]
],
"AhoGwP": ["OpenKnowledge एकीकरण सेट अप करें"],
+ "Ai2U7L": ["होस्ट"],
"AiNMQ7": [
"यह प्रोजेक्ट केवल इसी कंप्यूटर पर है। इसका बैकअप लेने और दूसरों के साथ साझा करने के लिए इसे GitHub से जोड़ें।"
],
@@ -1273,9 +1280,6 @@
"E2Mv-X": ["स्रोत कॉपी करें"],
"E4XYYH": ["इस प्रोजेक्ट के लिए टर्मिनल सक्षम करें"],
"E5WeIy": ["सबसे हाल में बंद किया गया संपादक टैब फिर से खोलें।"],
- "E6lrpp": [
- "आपकी रिपॉज़िटरी ब्राउज़ और सिंक करने के लिए OpenKnowledge जिस GitHub खाते का उपयोग करता है उसे सँभालें।"
- ],
"E7BhZn": ["खाली नोट"],
"E8NbNG": ["वर्कट्री लोड नहीं किए जा सके।"],
"E91VZY": ["नई विंडो में खोलें"],
@@ -1289,7 +1293,6 @@
"EEYbdt": ["प्रकाशित करें"],
"EFfGAv": ["वह संदेश पहले ही भेजा जा चुका है — आपका संपादन लागू नहीं हुआ।"],
"EHu0x2": ["सिंक हो रहा है"],
- "EJuO7B": ["अपनी रिपॉज़िटरी ब्राउज़ और सिंक करने के लिए कोई GitHub खाता जोड़ें।"],
"EKwNEe": [
"कैश की गई एम्बेडिंग उसी एंडपॉइंट और मॉडल की होती हैं जिसने उन्हें बनाया था, इसलिए यह इंडेक्स को शुरू से बनाता है।"
],
@@ -1436,6 +1439,9 @@
"FgRAvd": ["लॉग और सिस्टम जानकारी"],
"Fhp4Gn": ["प्लगइन देखें"],
"Fim5F3": ["एम्बेडिंग"],
+ "FioJgb": [
+ "सिंक जारी रखने के लिए फिर से कनेक्ट करना ज़रूरी है। सेटिंग में इस होस्ट के लिए एक टोकन जोड़ें, या सहेजे गए टोकन को बदलें।"
+ ],
"FiyNln": ["प्रॉपर्टी में चयनित पाठ पर जाएँ"],
"FjkaiT": ["छोटा करें"],
"Fjz6aJ": ["नई चैट में भेजें"],
@@ -1828,6 +1834,9 @@
"KvwJv8": ["कुछ फ़ाइलें सूचीबद्ध नहीं हैं: वर्किंग ट्री में बहुत अधिक बदलाव हैं।"],
"Kx881F": [["0"], " बहाल कर दिया गया।"],
"KziH2K": ["तेज़"],
+ "L-crEu": [
+ "git इस होस्ट के साथ प्रमाणीकरण नहीं कर सका। इसके लिए git जो SSH कुंजी या सहेजे गए क्रेडेंशियल उपयोग करता है, उन्हें जाँचें।"
+ ],
"L-rMC9": ["डिफ़ॉल्ट पर रीसेट करें"],
"L1BQTH": [["0"], " अभी इंस्टॉल नहीं है — इसका डाउनलोड पेज खोला जा रहा है।"],
"L1ZE3M": ["दस्तावेज़ आँकड़े"],
@@ -1883,6 +1892,9 @@
"LRgZAt": [["owner"], "/", ["name"], " पहले से मौजूद है"],
"LSuMte": [["totalCount"], " में से ", ["0"]],
"LTeJuX": ["पूर्ण स्क्रीन चालू या बंद करें"],
+ "LVWA9A": [
+ "इस git होस्ट के लिए प्रमाणीकरण विफल रहा। सेटिंग में इसके लिए एक टोकन जोड़ें, या सहेजे गए टोकन को बदलें।"
+ ],
"LXIm4m": ["संदर्भ विंडो"],
"LXdWeS": ["मध्यम अनुभाग शीर्षक।"],
"LXfNU-": ["नेविगेशन और सुझाव"],
@@ -2006,6 +2018,7 @@
"Mj8R8K": ["स्किल इंस्टॉल नहीं की जा सकी: ", ["0"]],
"MmDDWK": ["हाल में खोले गए"],
"Mnavhe": [["propPanelDescriptorLabel"], " प्रॉपर्टी"],
+ "MpZRQy": ["Git"],
"MqQoV-": ["बताएँ कि आप क्या बनाना चाहते हैं, एक खाली फ़ाइल शुरू करें, या किसी टेम्पलेट से ढाँचा बनाएँ।"],
"MqsbfN": ["बाहरी लिंक पूर्वावलोकन चालू करें?"],
"MrUmCD": ["अज्ञात बिल्ड विफलता"],
@@ -2176,6 +2189,9 @@
"OPOiKn": ["सामग्री नियम"],
"OTF92M": ["लेबल <0>(वैकल्पिक प्रदर्शित पाठ)</0>"],
"OVjNeX": ["टर्मिनल ", ["0"]],
+ "OWs-8P": [
+ "यहाँ जोड़ा गया टोकन केवल HTTPS रिमोट पर लागू होता है, और इस प्रोजेक्ट का रिमोट HTTPS का उपयोग नहीं करता।"
+ ],
"OX2Neh": ["इनलाइन कोड"],
"OXb_Df": ["सेटिंग सामग्री"],
"OXdGnd": ["समस्याएँ"],
@@ -2292,6 +2308,7 @@
["filePath"],
" में हुए कॉन्फ़्लिक्ट को समझने में मेरी मदद करें। बताएं कि OpenKnowledge के कॉन्फ़्लिक्ट दृश्य में मुझे क्या तुलना करनी चाहिए; मैं वहीं समाधान चुनकर लागू करूंगा।"
],
+ "Q14Keq": ["Bitbucket"],
"Q1mtyd": ["साइडबार छिपाएँ"],
"Q5fqMz": ["कनेक्शन त्रुटि — फिर कोशिश करें"],
"Q6hhn8": ["वरीयताएँ"],
@@ -2546,6 +2563,7 @@
"SiUUCS": ["अगला मेल"],
"SkMZlS": ["<0>", ["targetGitPath"], "</0> नहीं हटाया जा सका: ", ["removeGitError"]],
"SkTkKV": ["एजेंट रुक नहीं रहा है। फ़ोर्स स्टॉप इस चैट को बंद कर देगा और एजेंट से बाहर निकल जाएगा।"],
+ "SkUcEr": ["पहुँच टोकन"],
"Ske_wc": [
"उपयोगकर्ता प्लगइन इस डिवाइस तक सीमित हैं — उन्हें यहाँ चालू या बंद करें। हर सक्षम प्लगइन को सेटिंग साइडबार में Plugins के अंतर्गत अपना पेज मिलता है।"
],
@@ -2854,9 +2872,6 @@
"XAyxsa": ["रिमोट ब्रांच चेक आउट करें"],
"XBBZnv": ["लिंक लक्ष्य \"", ["shown"], "\" किसी मौजूदा दस्तावेज़ पर हल नहीं होता।"],
"XBgr2S": ["यहाँ कॉपी करें"],
- "XBpH6-": [
- "OpenKnowledge को इस प्रोजेक्ट के git रिमोट में कोई होस्टनेम नहीं मिला, इसलिए वह यह तय नहीं कर सकता कि किस GitHub सर्वर में साइन इन करना है।"
- ],
"XDzAnp": ["नए टैब में खुलता है"],
"XF1kgP": [["source"], " से सब कुछ पहले से ही अपडेट है"],
"XGKy1z": ["छवि दिखाई नहीं जा सकी"],
@@ -3288,6 +3303,9 @@
"arUUsK": ["उत्पाद अपडेट"],
"ax9kie": ["लिंक पूर्वावलोकन सेटिंग अभी लोड नहीं हुई — कुछ देर बाद फिर कोशिश करें"],
"axQ1h6": ["कुछ और जोड़ना चाहेंगे? (वैकल्पिक)"],
+ "azrR7I": [
+ "वह उपयोगकर्ता नाम जो git टोकन के साथ भेजता है। कुछ होस्ट एक तय मान की अपेक्षा करते हैं: Bitbucket API टोकन के लिए <0>x-bitbucket-api-token-auth</0>, Bitbucket रिपॉज़िटरी या वर्कस्पेस पहुँच टोकन के लिए <1>x-token-auth</1>, या GitLab के लिए <2>oauth2</2> लिखें। Gitea के लिए अपना Gitea उपयोगकर्ता नाम दें। Azure DevOps कोई भी मान स्वीकार करता है।"
+ ],
"b18t0_": ["अंतर बंद करें"],
"b1FDss": ["शुरुआत तक स्क्रॉल करें"],
"b2ezG_": ["दोनों रखे गए — \"", ["0"], "\" अब अपनी अलग स्किल है"],
@@ -3599,6 +3617,7 @@
"e8zRrb": ["Files दिखाएँ"],
"e8zYa8": [["shareBranch"], " को किसी वर्कट्री में नहीं खोला जा सका। फिर कोशिश करें।"],
"e9sHSO": ["जहाँ छोड़ा था वहीं से शुरू करें"],
+ "eAYJMv": ["टोकन"],
"eBGWcy": [
"Open Knowledge के टूल उपलब्ध नहीं हैं क्योंकि प्रोजेक्ट फ़ोल्डर मौजूद नहीं है, उस तक पहुँच नहीं है या वह बदल गया है। उसका स्थान और अनुमतियाँ जाँचें, फिर दोबारा कोशिश करें।"
],
@@ -4159,6 +4178,7 @@
"jZ_E5M": ["फ़ेच विफल — विवरण के लिए सर्वर लॉग देखें।"],
"j_Z6g7": ["साझा डिफ़ॉल्ट"],
"jbSG8V": ["Files दिखाएँ (", ["sidebarShortcutLabel"], ")"],
+ "jbhCDS": ["अन्य Git होस्ट"],
"jcEoUi": ["दाएँ पैनल में ले जाएँ"],
"jdGUeI": ["टेम्पलेट नहीं बनाया जा सका: ", ["error"]],
"jeCFV7": ["दाईं ओर नए फलक में ले जाएँ"],
@@ -4705,6 +4725,9 @@
"pckX1A": [["0", "plural", { "one": ["#", " उपयोग"], "other": ["#", " उपयोग"] }]],
"pcqlQu": [["0", "plural", { "one": ["फ़ोल्डर"], "other": ["फ़ोल्डर"] }]],
"pd0UH2": ["दाएँ संरेखित करें"],
+ "pd6t3G": [
+ "OpenKnowledge आपके git होस्ट से जुड़ने के लिए जिन खातों और पहुँच टोकन का उपयोग करता है, उन्हें सँभालें।"
+ ],
"peq20S": [
"इस चैट में ब्राउज़र उपलब्ध नहीं है, क्योंकि इसे सेट अप नहीं किया जा सका। OpenKnowledge के लॉग में विवरण है।"
],
@@ -4806,6 +4829,7 @@
"qi17kj": ["इस वर्कस्पेस के किसी .excalidraw बोर्ड का लाइव स्नैपशॉट एम्बेड करें।"],
"qi1F96": ["File Explorer में दिखाएँ"],
"qiRoLb": ["इस सप्ताह मैंने जो कुछ बदला उसका सारांश दें"],
+ "qimTXH": ["OpenKnowledge इस प्रोजेक्ट के लिए GitHub में साइन इन नहीं कर सकता।"],
"qioCwA": ["पेज ", ["pageNumber"], " पर जाएँ"],
"qjHMHf": ["सिंक अक्षम करने में विफल — ", ["detail"]],
"qkqG0b": ["अपस्ट्रीम वाला लें"],
@@ -4854,6 +4878,9 @@
"rVxu1k": ["अभी कोई पेज यहाँ लिंक नहीं करता।"],
"rXz97P": ["आइटम की क्रमांकित सूची।"],
"rZ9HZq": ["करना है"],
+ "rZFxkH": [
+ "वह होस्ट नाम दर्ज करें जिससे git जुड़ता है, वैकल्पिक :port के साथ और बिना स्कीम या पाथ के, जैसे git.example.com।"
+ ],
"rZVMkf": ["दृश्य संपादक का बदलें इनपुट फ़ोकस में"],
"radOpL": ["चित्र ", ["identity"], "। संदर्भ पर जाएँ।"],
"rageVb": ["लाइव पूर्वावलोकन पैनल वाला कस्टम HTML (सैंडबॉक्स किया गया iframe)।"],
@@ -5051,6 +5078,9 @@
"tlGXxX": ["स्वचालित (केवल खींचें)"],
"tnG-m6": ["स्वत: सिंक रुका हुआ है — फिर से शुरू करने के लिए साइन इन करें।"],
"toyw51": ["Mermaid आरेख नियंत्रण"],
+ "tpOnU9": [
+ "OpenKnowledge ने इस होस्ट के लिए कोई क्रेडेंशियल नहीं सहेजा है। सेटिंग में एक टोकन जोड़ें, या git को उसके पहले से मौजूद क्रेडेंशियल इस्तेमाल करने दें।"
+ ],
"tqQBwN": ["कोई भी स्क्रिप्ट समीक्षा के लिए दिखाई जाती है, कभी चलाई नहीं जाती।"],
"troubleshooting.claude-desktop.per-tool-approval": [
["agent"],
@@ -5208,6 +5238,7 @@
"uoJF_D": ["इसे सेट अप करना या शुरू करना बहुत कठिन था"],
"uqs8Gd": [["others", "plural", { "one": ["#", " अन्य"], "other": ["#", " अन्य"] }]],
"ur2XSb": ["दृश्य संपादक"],
+ "uraHF0": ["GitLab"],
"uuoHOU": ["कमांड विफल।"],
"uwzRx4": [
"धीमे या कम मेमोरी वाले एम्बेडिंग सर्वर के लिए इंडेक्सिंग अनुरोध का आकार और टाइमआउट समायोजित करें। अधिकांश सेटअप में डिफ़ॉल्ट मान ही रखने चाहिए।"
@@ -5301,6 +5332,9 @@
"vy_VIN": [
"git में ट्रैक किया गया — अपडेट आपकी रिपॉज़िटरी के ज़रिए आते हैं (pull या CI), स्वत: अपडेट से नहीं"
],
+ "w-Wt3H": [
+ "सिंक जारी रखने के लिए फिर से कनेक्ट करना ज़रूरी है। इस होस्ट के लिए git जो SSH कुंजी या सहेजे गए क्रेडेंशियल उपयोग करता है, उन्हें जाँचें।"
+ ],
"w0YVAE": ["स्किल नोड दिखाएँ"],
"w3tVpc": ["अभी कोई लिंक नहीं। ग्राफ़ बनाने के लिए विकी लिंक या markdown लिंक जोड़ें।"],
"w3vFfL": ["Files छिपाएँ"],
@@ -5416,7 +5450,6 @@
"x57cJf": ["लिंक खोलें"],
"xAlHfe": [["basename"], " — टेक्स्ट संपादक"],
"xBFg6z": [["0"], " प्लगइन से"],
- "xBjIs7": ["इस प्रोजेक्ट के लिए GitHub साइन-इन उपलब्ध नहीं है"],
"xCJdfg": ["साफ़ करें"],
"xCdTnb": ["नया टैब बंद करें"],
"xD4Xm2": ["लाना"],
@@ -5428,6 +5461,9 @@
"xG4tb6": ["\"", ["docName"], "\" से कनेक्शन टूट गया।"],
"xG8Ish": ["योजना में नहीं"],
"xHGM4U": ["HTML पूर्वावलोकन छिपाएँ"],
+ "xJ7qrb": [
+ "इस git होस्ट के लिए कोई क्रेडेंशियल सहेजा नहीं गया है। सेटिंग में एक टोकन जोड़ें, या git को उसके पहले से मौजूद क्रेडेंशियल इस्तेमाल करने दें।"
+ ],
"xK291b": ["दो पेज (विषम)"],
"xKDsGS": [["1"], " में पंक्ति ", ["0"], " पर जाएँ"],
"xKcXG6": [["addingCount", "plural", { "one": ["#", " जोड़ा गया"], "other": ["#", " जोड़े गए"] }]],
@@ -5508,6 +5544,7 @@
"yLEyuq": ["आपके इनबॉक्स में उत्पाद अपडेट।"],
"yLq4w4": ["विभाजक"],
"yLwx9e": ["मूल निर्देशिका ही सिमलिंक है — इसे वापस लेने के लिए उस फ़ोल्डर को ही अनलिंक करें।"],
+ "yLyiQV": ["सहेजे गए टोकन में वे अनुमतियाँ नहीं हैं जो इस होस्ट को पुश करने के लिए चाहिए।"],
"yMgL_E": ["खोज फ़ील्ड नेविगेशन"],
"yOjRUV": ["कोई AI टूल नहीं मिला। इस स्किल को इस्तेमाल करने के लिए एक इंस्टॉल करें।"],
"yQE2r9": ["लोड हो रहा है"],
@@ -5597,6 +5634,7 @@
"zLak8b": ["नया टैब सक्रिय करें"],
"zMmwh4": ["कोई थीम चुनें या अपनी थीम बनाएँ।"],
"zWZBPx": ["प्रकार बदला गया"],
+ "zXZJoN": ["टोकन जोड़ें"],
"zXj1rA": ["अर्थ के अनुसार खोजें"],
"zYp8Sr": [
"<0>संशोधित</0> बैज उन नियमों को चिह्नित करता है जिन्हें आपका कॉन्फ़िग स्पष्ट रूप से सेट करता है — सीधे, या <1>extends</1> के माध्यम से विरासत में। बिना चिह्न वाले नियम अपनी डिफ़ॉल्ट स्थिति में रहते हैं।"
diff --git a/packages/app/src/locales/hi/messages.po b/packages/app/src/locales/hi/messages.po
index 1771331f6..bd8c31684 100644
--- a/packages/app/src/locales/hi/messages.po
+++ b/packages/app/src/locales/hi/messages.po
@@ -1544,6 +1544,10 @@ msgstr "<0>{trimmedSlug}</0> नाम का एक टेम्पलेट
msgid "A title, description, tags — anything that describes this folder."
msgstr "एक शीर्षक, विवरण, टैग — कुछ भी जो इस फ़ोल्डर का वर्णन करता हो।"
+#: src/components/settings/AccountSection.tsx
+msgid "A token added here only applies to HTTPS remotes, and this project's remote doesn't use HTTPS."
+msgstr "यहाँ जोड़ा गया टोकन केवल HTTPS रिमोट पर लागू होता है, और इस प्रोजेक्ट का रिमोट HTTPS का उपयोग नहीं करता।"
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "A worktree folder for {shareBranch} already exists."
msgstr "{shareBranch} के लिए एक वर्कट्री फ़ोल्डर पहले से मौजूद है।"
@@ -1596,9 +1600,8 @@ msgid "Accept their deletion"
msgstr "उनका विलोपन स्वीकारें"
#: src/components/settings/AccountSection.tsx
-#: src/components/settings/SettingsDialogShell.tsx
-msgid "Account"
-msgstr "खाता"
+msgid "Access token"
+msgstr "पहुँच टोकन"
#: src/components/TemplateRow.tsx
msgid "Actions for {label}"
@@ -1677,6 +1680,10 @@ msgstr "एक प्रॉपर्टी जोड़ें"
msgid "Add a starter pack"
msgstr "एक स्टार्टर पैक जोड़ें"
+#: src/components/settings/AccountSection.tsx
+msgid "Add an access token for a GitLab, Gitea, Bitbucket, Azure DevOps or self-hosted git server. Without one, git uses the credentials it already has saved for that host; with one, OpenKnowledge uses the token instead."
+msgstr "GitLab, Gitea, Bitbucket, Azure DevOps या स्व-होस्ट किए गए git सर्वर के लिए पहुँच टोकन जोड़ें। टोकन न होने पर git उस होस्ट के लिए पहले से सहेजे गए क्रेडेंशियल उपयोग करता है; टोकन होने पर OpenKnowledge उनकी जगह टोकन उपयोग करता है।"
+
#: src/components/settings/OkignoreSection.tsx
msgid "Add another pattern"
msgstr "एक और पैटर्न जोड़ें"
@@ -1806,6 +1813,12 @@ msgstr "शब्दकोश में जोड़ें"
msgid "Add to prompt"
msgstr "प्रॉम्प्ट में जोड़ें"
+#: src/components/settings/AccountSection.tsx
+#: src/components/SyncStatusBadge.tsx
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Add token"
+msgstr "टोकन जोड़ें"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Add value"
msgstr "मान जोड़ें"
@@ -1816,6 +1829,10 @@ msgstr "मान जोड़ें"
msgid "Added"
msgstr "जोड़ा गया"
+#: src/components/settings/AccountSection.tsx
+msgid "Adding"
+msgstr "जोड़ा जा रहा है"
+
#: src/components/settings/AgentConnectionDialogs.tsx
msgid "Adds a global OpenKnowledge MCP entry for this agent."
msgstr "इस एजेंट के लिए एक वैश्विक OpenKnowledge MCP प्रविष्टि जोड़ता है।"
@@ -2331,6 +2348,10 @@ msgstr "संलग्नकों का कुल आकार 3 MB से
msgid "Authenticated as {login}."
msgstr "{login} के रूप में प्रमाणित किया गया।"
+#: src/components/SyncStatusBadge.tsx
+msgid "Authentication failed for this git host. Add a token for it in Settings, or replace the one stored."
+msgstr "इस git होस्ट के लिए प्रमाणीकरण विफल रहा। सेटिंग में इसके लिए एक टोकन जोड़ें, या सहेजे गए टोकन को बदलें।"
+
#: src/editor/slash-command/component-items.tsx
msgid "Authoritative content; mirrored verbatim everywhere it's referenced."
msgstr "आधिकारिक सामग्री; जहाँ भी संदर्भित हो वहाँ हूबहू प्रतिबिंबित।"
@@ -2532,6 +2553,11 @@ msgstr "बड़ा अनुभाग शीर्षक।"
msgid "Bird wiki"
msgstr "पक्षी विकी"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "Bitbucket"
+msgstr "Bitbucket"
+
#: src/components/NewItemDialog.tsx
msgid "Blank note"
msgstr "खाली नोट"
@@ -3601,8 +3627,8 @@ msgid "Connect"
msgstr "जोड़ें"
#: src/components/settings/AccountSection.tsx
-msgid "Connect a GitHub account to browse and sync your repositories."
-msgstr "अपनी रिपॉज़िटरी ब्राउज़ और सिंक करने के लिए कोई GitHub खाता जोड़ें।"
+msgid "Connect a GitHub account to browse and publish GitHub repositories."
+msgstr "GitHub रिपॉज़िटरी ब्राउज़ और प्रकाशित करने के लिए कोई GitHub खाता जोड़ें।"
#: src/components/settings/SyncSection.tsx
msgid "Connect an existing repository"
@@ -3694,6 +3720,7 @@ msgid "Connection dropped"
msgstr "कनेक्शन टूट गया"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Connection error — try again"
msgstr "कनेक्शन त्रुटि — फिर कोशिश करें"
@@ -5933,6 +5960,10 @@ msgstr "{minimum} और {maximum} के बीच एक पूर्णां
msgid "Enter at least 3 characters to search by meaning."
msgstr "अर्थ के आधार पर खोजने के लिए कम से कम 3 अक्षर दर्ज करें।"
+#: src/components/settings/AccountSection.tsx
+msgid "Enter the host name git connects to, with an optional :port and no scheme or path, for example git.example.com."
+msgstr "वह होस्ट नाम दर्ज करें जिससे git जुड़ता है, वैकल्पिक :port के साथ और बिना स्कीम या पाथ के, जैसे git.example.com।"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Enter the public origin your tunnel serves, for example https://notes.example.com"
msgstr "वह सार्वजनिक ऑरिजिन दर्ज करें जिसे आपका tunnel सर्व करता है, उदाहरण के लिए https://notes.example.com"
@@ -6408,6 +6439,7 @@ msgid "Failed to start sign-in — try again"
msgstr "साइन-इन शुरू करने में विफल — फिर कोशिश करें"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Failed to store the token — try again"
msgstr "टोकन सहेजने में विफल — फिर कोशिश करें"
@@ -6881,6 +6913,11 @@ msgctxt "settings search keyword"
msgid "GHES"
msgstr "GHES"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Git"
+msgstr "Git"
+
#: src/components/ExploreSkills.tsx
msgid "Git & PRs"
msgstr "Git और PR"
@@ -6889,6 +6926,10 @@ msgstr "Git और PR"
msgid "Git can't track this folder — it's empty or contains only ignored files. The link won't work until you add a tracked document."
msgstr "Git इस फ़ोल्डर पर नज़र नहीं रख सकता — यह खाली है या इसमें केवल अनदेखी की गई फ़ाइलें हैं। जब तक आप कोई ट्रैक की गई दस्तावेज़ नहीं जोड़ते तब तक लिंक काम नहीं करेगा।"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it."
+msgstr "git इस होस्ट के साथ प्रमाणीकरण नहीं कर सका। इसके लिए git जो SSH कुंजी या सहेजे गए क्रेडेंशियल उपयोग करता है, उन्हें जाँचें।"
+
#: src/components/RecentProjectsMenu.tsx
msgid "Git has locked this worktree, but it can still be opened."
msgstr "Git ने इस वर्कट्री को लॉक किया है, लेकिन इसे अभी भी खोला जा सकता है।"
@@ -6948,10 +6989,6 @@ msgstr "GitHub Enterprise Server होस्ट"
msgid "GitHub sign-in is missing or expired. Reconnect to resume syncing."
msgstr "GitHub साइन-इन अनुपस्थित है या उसकी अवधि समाप्त हो चुकी है। सिंक फिर से शुरू करने के लिए दोबारा जुड़ें।"
-#: src/components/settings/AccountSection.tsx
-msgid "GitHub sign-in isn't available for this project"
-msgstr "इस प्रोजेक्ट के लिए GitHub साइन-इन उपलब्ध नहीं है"
-
#: src/components/ImportSkillForm.tsx
msgid "GitHub, a git URL, or a local path."
msgstr "GitHub, एक git URL, या एक स्थानीय पथ।"
@@ -6960,6 +6997,11 @@ msgstr "GitHub, एक git URL, या एक स्थानीय पथ।"
msgid "github.com is always recognized, so it doesn't need to be added."
msgstr "github.com हमेशा पहचाना जाता है, इसलिए इसे जोड़ने की ज़रूरत नहीं है।"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "GitLab"
+msgstr "GitLab"
+
#: src/components/settings/SavedThemesTiles.tsx
msgid "Give it a name before editing its colors."
msgstr "इसके रंग संपादित करने से पहले इसे नाम दें।"
@@ -7314,6 +7356,10 @@ msgstr "क्षैतिज पिल पट्टी + नीचे सक्
msgid "Horizontal rule that divides sections."
msgstr "अनुभागों को विभाजित करने वाली क्षैतिज रेखा।"
+#: src/components/settings/AccountSection.tsx
+msgid "Host"
+msgstr "होस्ट"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Hosting is on. The server is running on port {boundPort}. Reach it through your tunnel."
msgstr "होस्टिंग चालू है। सर्वर पोर्ट {boundPort} पर चल रहा है। इसे अपने टनल के माध्यम से एक्सेस करें।"
@@ -8607,8 +8653,8 @@ msgid "Manage skill folders"
msgstr "स्किल फ़ोल्डर सँभालें"
#: src/components/settings/AccountSection.tsx
-msgid "Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."
-msgstr "आपकी रिपॉज़िटरी ब्राउज़ और सिंक करने के लिए OpenKnowledge जिस GitHub खाते का उपयोग करता है उसे सँभालें।"
+msgid "Manage the accounts and access tokens OpenKnowledge uses to connect to your git hosts."
+msgstr "OpenKnowledge आपके git होस्ट से जुड़ने के लिए जिन खातों और पहुँच टोकन का उपयोग करता है, उन्हें सँभालें।"
#: src/components/settings/AgentConnectionDialogs.tsx
#: src/components/settings/AgentConnectionsSection.tsx
@@ -9438,6 +9484,10 @@ msgstr "इस संस्करण में सामग्री का क
msgid "No content changes in this version"
msgstr "इस संस्करण में सामग्री का कोई बदलाव नहीं"
+#: src/components/SyncStatusBadge.tsx
+msgid "No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "इस git होस्ट के लिए कोई क्रेडेंशियल सहेजा नहीं गया है। सेटिंग में एक टोकन जोड़ें, या git को उसके पहले से मौजूद क्रेडेंशियल इस्तेमाल करने दें।"
+
#: src/components/GraphPanel.tsx
msgid "No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."
msgstr "कोई असंबद्ध पेज नहीं। पेज यहाँ तभी दिखते हैं जब उनके न कोई आने वाले और न कोई जाने वाले ग्राफ़ किनारे हों।"
@@ -10390,6 +10440,10 @@ msgstr "खोला जा रहा है…"
msgid "OpenKnowledge"
msgstr "OpenKnowledge"
+#: src/components/AuthModal.tsx
+msgid "OpenKnowledge can't sign in to GitHub for this project."
+msgstr "OpenKnowledge इस प्रोजेक्ट के लिए GitHub में साइन इन नहीं कर सकता।"
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge checked {subject}"
msgstr "OpenKnowledge ने {subject} की जाँच की"
@@ -10402,10 +10456,6 @@ msgstr "OpenKnowledge ने प्रोजेक्ट की जाँच क
msgid "OpenKnowledge could not find this agent on this machine."
msgstr "OpenKnowledge को इस मशीन पर यह एजेंट नहीं मिला।"
-#: src/components/settings/AccountSection.tsx
-msgid "OpenKnowledge couldn't find a host name in this project's git remote, so it can't tell which GitHub server to sign in to."
-msgstr "OpenKnowledge को इस प्रोजेक्ट के git रिमोट में कोई होस्टनेम नहीं मिला, इसलिए वह यह तय नहीं कर सकता कि किस GitHub सर्वर में साइन इन करना है।"
-
#: src/lib/worktree-create-error.ts
msgid "OpenKnowledge couldn't finish setting up this project. The worktree was created but not opened."
msgstr "OpenKnowledge इस प्रोजेक्ट का सेटअप पूरा नहीं कर सका। वर्कट्री बनाई गई, लेकिन खोली नहीं गई।"
@@ -10462,6 +10512,10 @@ msgstr "OpenKnowledge ने एक दस्तावेज़ संपाद
msgid "OpenKnowledge files were removed"
msgstr "OpenKnowledge की फ़ाइलें हटा दी गईं"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "OpenKnowledge ने इस होस्ट के लिए कोई क्रेडेंशियल नहीं सहेजा है। सेटिंग में एक टोकन जोड़ें, या git को उसके पहले से मौजूद क्रेडेंशियल इस्तेमाल करने दें।"
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge imported {source}"
msgstr "OpenKnowledge ने {source} आयात किया"
@@ -10690,6 +10744,11 @@ msgstr "अन्य"
msgid "Other"
msgstr "अन्य"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Other Git hosts"
+msgstr "अन्य Git होस्ट"
+
#: src/components/settings/SharingSection.tsx
msgid "Other OK paths are tracked upstream:"
msgstr "अन्य OK पथ अपस्ट्रीम ट्रैक किए जाते हैं:"
@@ -11624,6 +11683,14 @@ msgstr "फिर से जुड़ना ज़रूरी"
msgid "Reconnect required to keep syncing."
msgstr "सिंक जारी रखने के लिए फिर से कनेक्ट करना ज़रूरी है।"
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Add a token for this host in Settings, or replace the one stored."
+msgstr "सिंक जारी रखने के लिए फिर से कनेक्ट करना ज़रूरी है। सेटिंग में इस होस्ट के लिए एक टोकन जोड़ें, या सहेजे गए टोकन को बदलें।"
+
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Check the SSH key or saved credentials git uses for this host."
+msgstr "सिंक जारी रखने के लिए फिर से कनेक्ट करना ज़रूरी है। इस होस्ट के लिए git जो SSH कुंजी या सहेजे गए क्रेडेंशियल उपयोग करता है, उन्हें जाँचें।"
+
#: src/presence/use-sync-toasts.ts
msgid "Reconnected"
msgstr "फिर से जुड़ गया"
@@ -14815,6 +14882,10 @@ msgstr "स्किल सूची अपने स्कीमा से म
msgid "The source folder itself does not move."
msgstr "स्रोत फ़ोल्डर ख़ुद नहीं हिलता।"
+#: src/components/SyncStatusBadge.tsx
+msgid "The stored token is missing the permissions this host needs to push."
+msgstr "सहेजे गए टोकन में वे अनुमतियाँ नहीं हैं जो इस होस्ट को पुश करने के लिए चाहिए।"
+
#: src/components/TemplateProperties.tsx
msgid "The template's filename (without `.md`)."
msgstr "टेम्पलेट का फ़ाइल-नाम (`.md` के बिना)।"
@@ -14873,6 +14944,10 @@ msgstr ".ok/local/config.yml में terminal.shell एक्ज़ीक्
msgid "The token needs the repo and read:user scopes."
msgstr "टोकन को repo और read:user स्कोप चाहिए।"
+#: src/components/settings/AccountSection.tsx
+msgid "The username git sends with the token. Some hosts expect a fixed value: type <0>x-bitbucket-api-token-auth</0> for a Bitbucket API token, <1>x-token-auth</1> for a Bitbucket repository or workspace access token, or <2>oauth2</2> for GitLab. For Gitea, use your Gitea username. Azure DevOps accepts any value."
+msgstr "वह उपयोगकर्ता नाम जो git टोकन के साथ भेजता है। कुछ होस्ट एक तय मान की अपेक्षा करते हैं: Bitbucket API टोकन के लिए <0>x-bitbucket-api-token-auth</0>, Bitbucket रिपॉज़िटरी या वर्कस्पेस पहुँच टोकन के लिए <1>x-token-auth</1>, या GitLab के लिए <2>oauth2</2> लिखें। Gitea के लिए अपना Gitea उपयोगकर्ता नाम दें। Azure DevOps कोई भी मान स्वीकार करता है।"
+
#: src/lib/tab-session-restore-recovery-notice.ts
msgid "The workspace opened without it so the app could start."
msgstr "ऐप शुरू हो सके इसलिए कार्यक्षेत्र उसके बिना खुला।"
@@ -15401,10 +15476,6 @@ msgstr "यह प्रोजेक्ट एक git रिपॉज़िट
msgid "This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."
msgstr "यह प्रोजेक्ट केवल इसी कंप्यूटर पर है। इसका बैकअप लेने और दूसरों के साथ साझा करने के लिए इसे GitHub से जोड़ें।"
-#: src/components/settings/AccountSection.tsx
-msgid "This project's git remote is on {host}, which OpenKnowledge doesn't recognize as a GitHub host. If {host} runs GitHub Enterprise Server, add it to GitHub Enterprise Server hosts below, then restart OpenKnowledge."
-msgstr "इस प्रोजेक्ट का git रिमोट {host} पर है, जिसे OpenKnowledge GitHub होस्ट के रूप में नहीं पहचानता। यदि {host} पर GitHub Enterprise Server चलता है, तो उसे नीचे GitHub Enterprise Server होस्ट में जोड़ें, फिर OpenKnowledge को फिर से शुरू करें।"
-
#: src/components/DocumentErrorBoundary.tsx
msgid "This project's running server doesn't support live editing. Restart OpenKnowledge to fix."
msgstr "इस प्रोजेक्ट का चल रहा सर्वर जीवंत संपादन का समर्थन नहीं करता। ठीक करने के लिए OpenKnowledge पुनः आरंभ करें।"
@@ -15501,6 +15572,7 @@ msgid "This usually means one of:"
msgstr "इसका आमतौर पर मतलब इनमें से एक होता है:"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
msgid "This window can't store a token — open Settings from the main app window."
msgstr "यह विंडो कोई टोकन नहीं सहेज सकती — मुख्य ऐप विंडो से Settings खोलें।"
@@ -15654,6 +15726,15 @@ msgstr "रेखांकित फ़ॉर्मैटिंग चालू
msgid "Toggles the pattern {0}/**"
msgstr "पैटर्न {0}/** टॉगल करें"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "token"
+msgstr "टोकन"
+
+#: src/components/settings/AccountSection.tsx
+msgid "Token stored for {login} on {host}. To remove it, run <0>ok auth signout --host {host}</0>."
+msgstr "{host} पर {login} के लिए टोकन सहेजा गया। इसे हटाने के लिए <0>ok auth signout --host {host}</0> चलाएँ।"
+
#: src/components/SkillBundlePreview.tsx
#: src/components/SkillProperties.tsx
msgid "tokens"
@@ -16240,6 +16321,10 @@ msgstr "उपयोगकर्ता"
msgid "User plugins are personal to this device — turn them on or off here. Each enabled plugin gets its own page under Plugins in the settings sidebar."
msgstr "उपयोगकर्ता प्लगइन इस डिवाइस तक सीमित हैं — उन्हें यहाँ चालू या बंद करें। हर सक्षम प्लगइन को सेटिंग साइडबार में Plugins के अंतर्गत अपना पेज मिलता है।"
+#: src/components/settings/AccountSection.tsx
+msgid "Username"
+msgstr "उपयोगकर्ता नाम"
+
#: src/components/settings/SearchSection.tsx
msgid "Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."
msgstr "<0>OK_EMBEDDINGS_API_KEY</0> पर्यावरण चर का उपयोग किया जा रहा है (OpenKnowledge के बाहर प्रबंधित)।"
diff --git a/packages/app/src/locales/id/messages.json b/packages/app/src/locales/id/messages.json
index 9d16ff734..1d8bbdc5e 100644
--- a/packages/app/src/locales/id/messages.json
+++ b/packages/app/src/locales/id/messages.json
@@ -35,6 +35,9 @@
],
"-l6jM7": ["Mulai obrolan dengan tombol +, atau luncurkan agen dari halaman."],
"-lCAuQ": ["Memuat graf"],
+ "-nA68n": [
+ "Tambahkan token akses untuk server GitLab, Gitea, Bitbucket, Azure DevOps, atau git yang di-host sendiri. Tanpa token, git memakai kredensial yang sudah tersimpan untuk host tersebut; dengan token, OpenKnowledge memakai token itu sebagai gantinya."
+ ],
"-o5XAG": [
"Dikirim secara pribadi ke tim OpenKnowledge, beserta catatan Anda dan versi aplikasinya. Tidak pernah dipublikasikan."
],
@@ -237,6 +240,7 @@
"1vczDE": ["Buka ", ["displayName"], " Desktop"],
"1vn0CI": ["Respons server tidak valid"],
"1xui0Q": ["Gagal memuat berkas lokal"],
+ "1yHVE-": ["Menambahkan"],
"2-3Mlu": ["Tidak dapat melepas sematan ", ["name"]],
"20LVKb": ["Sesuatu di luar obrolan ini meminta proses agen berhenti (", ["signal"], ")."],
"2277Tu": ["Ciutkan graf"],
@@ -471,6 +475,15 @@
"4mp6Tv": ["OpenKnowledge menampilkan daftar keterampilan yang terpasang"],
"4niEzY": ["Sematan HTML tersekat — tulis HTML, lihat pratinjau terendernya secara langsung."],
"4nj6n8": ["/api/config mengembalikan HTTP ", ["code"]],
+ "4p8Baj": [
+ "Token disimpan untuk ",
+ ["login"],
+ " di ",
+ ["host"],
+ ". Untuk menghapusnya, jalankan <0>ok auth signout --host ",
+ ["host"],
+ "</0>."
+ ],
"4pDZ2N": ["\"", ["0"], "\" dihapus dari semua lokasi lain — folder sumbernya tetap dimuat"],
"4r6p_B": [
"Perintah ini berisi karakter tersembunyi yang dapat membuatnya terlihat berbeda dari yang dijalankan. Karakter tersebut ditampilkan di sini sebagai ⟨U+…⟩."
@@ -736,13 +749,6 @@
"7YRrJ9": [
"Tersedia di aplikasi desktop OpenKnowledge. Dari terminal, gunakan<0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2>."
],
- "7_I248": [
- "Remote git proyek ini berada di ",
- ["host"],
- ", yang tidak dikenali OpenKnowledge sebagai host GitHub. Jika ",
- ["host"],
- " menjalankan GitHub Enterprise Server, tambahkan ke Host GitHub Enterprise Server di bawah, lalu mulai ulang OpenKnowledge."
- ],
"7_bFEL": ["Seret ", ["patternText"], " untuk menata ulang"],
"7a0YcF": ["Tekan <0>Spasi</0> atau ketuk blob untuk mulai"],
"7aNk5D": ["OpenKnowledge menyunting ", ["subject"]],
@@ -775,6 +781,7 @@
"7lFX_h": ["Alihkan sekarang"],
"7m3Ade": ["pemasangan:"],
"7qRHf0": ["Pasang untuk Claude Chat & Cowork"],
+ "7sNhEz": ["Nama pengguna"],
"7uBlRT": ["Menyalin item pohon berkas yang sedang difokus agar Tempel bisa menggandakannya."],
"7vxWET": ["Pratinjau paket tidak tersedia."],
"7wogIQ": [["0", "plural", { "other": ["Plugin"] }]],
@@ -926,6 +933,7 @@
"9bCiQ8": ["Tidak ada halaman yang kehilangan tautan graf masuk."],
"9bG48P": ["Mengirim"],
"9clcD5": ["Buka dokumen bertag #", ["chip"]],
+ "9djC8C": ["Hubungkan akun GitHub untuk menjelajahi dan menerbitkan repositori GitHub."],
"9euN0m": [["count", "plural", { "other": ["#", " peserta lagi dari dokumen lain"] }]],
"9fhQRL": ["Kanal beta"],
"9fvog2": ["Pratinjau tidak tersedia: ", ["errorDetail"]],
@@ -1017,7 +1025,6 @@
" dalam ",
["parentLabel"]
],
- "AeXO77": ["Akun"],
"AgoIW4": [
["source"],
": ",
@@ -1030,6 +1037,7 @@
["detail"]
],
"AhoGwP": ["Siapkan integrasi OpenKnowledge"],
+ "Ai2U7L": ["Host"],
"AiNMQ7": [
"Proyek ini hanya ada di komputer ini. Hubungkan ke GitHub untuk mencadangkannya dan membagikannya dengan orang lain."
],
@@ -1306,9 +1314,6 @@
"E2Mv-X": ["Salin sumber"],
"E4XYYH": ["Aktifkan terminal untuk proyek ini"],
"E5WeIy": ["Membuka lagi tab penyunting yang paling akhir ditutup."],
- "E6lrpp": [
- "Kelola akun GitHub yang dipakai OpenKnowledge untuk menelusuri dan menyinkronkan repositori Anda."
- ],
"E7BhZn": ["Catatan kosong"],
"E8NbNG": ["Worktree tidak dapat dimuat."],
"E91VZY": ["Buka di Jendela Baru"],
@@ -1322,7 +1327,6 @@
"EEYbdt": ["Terbitkan"],
"EFfGAv": ["Pesan itu sudah terkirim — hasil suntinganmu tidak diterapkan."],
"EHu0x2": ["Menyinkronkan"],
- "EJuO7B": ["Hubungkan akun GitHub untuk menelusuri dan menyinkronkan repositori Anda."],
"EKwNEe": [
"Embedding dalam cache milik endpoint dan model yang menghasilkannya, jadi ini membangun ulang indeksnya dari nol."
],
@@ -1477,6 +1481,9 @@
"FgRAvd": ["Log & info sistem"],
"Fhp4Gn": ["Lihat plugin"],
"Fim5F3": ["embedding"],
+ "FioJgb": [
+ "Perlu menyambung ulang untuk melanjutkan sinkronisasi. Tambahkan token untuk host ini di Pengaturan, atau ganti token yang tersimpan."
+ ],
"FiyNln": ["Lompat ke teks terpilih di properti"],
"FjkaiT": ["Perkecil"],
"Fjz6aJ": ["Kirim ke obrolan baru"],
@@ -1922,6 +1929,9 @@
"KvwJv8": ["Sebagian file tidak ditampilkan: working tree memiliki terlalu banyak perubahan."],
"Kx881F": [["0"], " dipulihkan."],
"KziH2K": ["Cepat"],
+ "L-crEu": [
+ "git tidak dapat mengautentikasi ke host ini. Periksa kunci SSH atau kredensial tersimpan yang dipakai git untuk host tersebut."
+ ],
"L-rMC9": ["Setel ulang ke bawaan"],
"L1BQTH": [["0"], " belum terpasang — membuka halaman unduhannya."],
"L1ZE3M": ["Statistik dokumen"],
@@ -1976,6 +1986,9 @@
"LRgZAt": [["owner"], "/", ["name"], " sudah ada"],
"LSuMte": [["0"], " dari ", ["totalCount"]],
"LTeJuX": ["Layar Penuh"],
+ "LVWA9A": [
+ "Autentikasi gagal untuk host git ini. Tambahkan token untuknya di Pengaturan, atau ganti token yang tersimpan."
+ ],
"LXIm4m": ["Jendela konteks"],
"LXdWeS": ["Judul bagian sedang."],
"LXfNU-": ["Navigasi dan saran"],
@@ -2088,6 +2101,7 @@
"Mj8R8K": ["Keterampilan tidak bisa dipasang: ", ["0"]],
"MmDDWK": ["Baru saja dibuka"],
"Mnavhe": ["Properti ", ["propPanelDescriptorLabel"]],
+ "MpZRQy": ["Git"],
"MqQoV-": [
"Jelaskan apa yang ingin Anda bangun, mulai dari berkas kosong, atau susun dari templat."
],
@@ -2257,6 +2271,9 @@
"OPOiKn": ["Aturan konten"],
"OTF92M": ["Label <0>(teks tampilan opsional)</0>"],
"OVjNeX": ["Terminal ", ["0"]],
+ "OWs-8P": [
+ "Token yang ditambahkan di sini hanya berlaku untuk remote HTTPS, dan remote proyek ini tidak memakai HTTPS."
+ ],
"OX2Neh": ["Kode sebaris"],
"OXb_Df": ["Isi pengaturan"],
"OXdGnd": ["Masalah"],
@@ -2376,6 +2393,7 @@
["filePath"],
". Jelaskan apa yang perlu saya bandingkan di tampilan konflik OpenKnowledge; saya akan memilih dan menerapkan penyelesaiannya di sana."
],
+ "Q14Keq": ["Bitbucket"],
"Q1mtyd": ["Sembunyikan bilah sisi"],
"Q5fqMz": ["Galat koneksi — coba lagi"],
"Q6hhn8": ["Preferensi"],
@@ -2634,6 +2652,7 @@
"SiUUCS": ["Kecocokan berikutnya"],
"SkMZlS": ["<0>", ["targetGitPath"], "</0> tidak bisa dihapus: ", ["removeGitError"]],
"SkTkKV": ["Agen tidak berhenti. Hentikan paksa menutup obrolan ini dan keluar dari agen."],
+ "SkUcEr": ["Token akses"],
"Ske_wc": [
"Plugin pengguna bersifat pribadi untuk perangkat ini — nyalakan atau matikan di sini. Setiap plugin yang aktif mendapat halamannya sendiri di bawah Plugin pada bilah sisi pengaturan."
],
@@ -2969,9 +2988,6 @@
"XAyxsa": ["Ambil cabang remote"],
"XBBZnv": ["Target tautan \"", ["shown"], "\" tidak merujuk ke dokumen yang ada."],
"XBgr2S": ["Salin ke sini"],
- "XBpH6-": [
- "OpenKnowledge tidak menemukan nama host di remote git proyek ini, jadi tidak dapat mengetahui server GitHub mana yang harus dimasuki."
- ],
"XDzAnp": ["Terbuka di tab baru"],
"XF1kgP": ["Semua dari ", ["source"], " sudah yang terbaru"],
"XGKy1z": ["Gambar tidak dapat ditampilkan"],
@@ -3405,6 +3421,9 @@
"arUUsK": ["Kabar terbaru produk"],
"ax9kie": ["Pengaturan pratinjau tautan belum dimuat — coba lagi sebentar"],
"axQ1h6": ["Ada yang ingin Anda tambahkan? (opsional)"],
+ "azrR7I": [
+ "Nama pengguna yang dikirim git bersama token. Beberapa host mengharapkan nilai tetap: ketik <0>x-bitbucket-api-token-auth</0> untuk token API Bitbucket, <1>x-token-auth</1> untuk token akses repositori atau workspace Bitbucket, atau <2>oauth2</2> untuk GitLab. Untuk Gitea, gunakan nama pengguna Gitea Anda. Azure DevOps menerima nilai apa pun."
+ ],
"b18t0_": ["Tutup perbedaan"],
"b1FDss": ["Gulir ke awal"],
"b2ezG_": ["Keduanya disimpan — \"", ["0"], "\" kini menjadi keterampilan tersendiri"],
@@ -3725,6 +3744,7 @@
"e8zRrb": ["Tampilkan Berkas"],
"e8zYa8": [["shareBranch"], " tidak dapat dibuka di worktree. Coba lagi."],
"e9sHSO": ["Lanjutkan dari tempat Anda berhenti"],
+ "eAYJMv": ["token"],
"eBGWcy": [
"Alat Open Knowledge tidak tersedia karena folder proyek tidak ada, tidak dapat diakses, atau telah berubah. Periksa lokasi dan izinnya, lalu coba lagi."
],
@@ -4317,6 +4337,7 @@
"jZ_E5M": ["Fetch gagal — periksa log server untuk detailnya."],
"j_Z6g7": ["Bawaan bersama"],
"jbSG8V": ["Tampilkan Berkas (", ["sidebarShortcutLabel"], ")"],
+ "jbhCDS": ["Host Git lainnya"],
"jcEoUi": ["Pindahkan ke panel kanan"],
"jdGUeI": ["Templat tidak bisa dibuat: ", ["error"]],
"jeCFV7": ["Pindahkan ke panel baru di kanan"],
@@ -4890,6 +4911,9 @@
"pckX1A": [["0", "plural", { "other": ["#", " penggunaan"] }]],
"pcqlQu": [["0", "plural", { "other": ["Folder"] }]],
"pd0UH2": ["Rata kanan"],
+ "pd6t3G": [
+ "Kelola akun dan token akses yang dipakai OpenKnowledge untuk terhubung ke host git Anda."
+ ],
"peq20S": [
"Browser tidak tersedia di obrolan ini karena tidak dapat disiapkan. Log OpenKnowledge berisi detailnya."
],
@@ -4988,6 +5012,7 @@
"qi17kj": ["Sematkan cuplikan langsung papan .excalidraw dari ruang kerja ini."],
"qi1F96": ["Tampilkan di Penjelajah Berkas"],
"qiRoLb": ["Ringkas semua yang saya ubah minggu ini"],
+ "qimTXH": ["OpenKnowledge tidak dapat masuk ke GitHub untuk proyek ini."],
"qioCwA": ["Lompat ke halaman ", ["pageNumber"]],
"qjHMHf": ["Gagal menonaktifkan sinkronisasi — ", ["detail"]],
"qkqG0b": ["Ambil versi remote"],
@@ -5050,6 +5075,9 @@
"rVxu1k": ["Belum ada halaman yang menaut ke sini."],
"rXz97P": ["Daftar item bernomor."],
"rZ9HZq": ["Akan dikerjakan"],
+ "rZFxkH": [
+ "Masukkan nama host yang dihubungi git, dengan :port opsional dan tanpa skema atau path, misalnya git.example.com."
+ ],
"rZVMkf": ["Bidang penggantian penyunting visual sedang difokus"],
"radOpL": ["Gambar ", ["identity"], ". Buka referensi."],
"rageVb": ["HTML khusus dengan panel pratinjau langsung (iframe tersekat)."],
@@ -5265,6 +5293,9 @@
"tlGXxX": ["Otomatis (hanya Pull)"],
"tnG-m6": ["Sinkronisasi otomatis dijeda — masuk untuk melanjutkan."],
"toyw51": ["Kendali diagram Mermaid"],
+ "tpOnU9": [
+ "OpenKnowledge tidak menyimpan kredensial apa pun untuk host ini. Tambahkan token di Pengaturan, atau biarkan git memakai kredensial yang sudah dimilikinya."
+ ],
"tqQBwN": ["Skrip apa pun ditampilkan untuk ditinjau, tidak pernah dijalankan."],
"troubleshooting.claude-desktop.per-tool-approval": [
["agent"],
@@ -5417,6 +5448,7 @@
"uoJF_D": ["Terlalu sulit disiapkan atau dimulai"],
"uqs8Gd": [["others", "plural", { "other": ["#", " lainnya"] }]],
"ur2XSb": ["Penyunting visual"],
+ "uraHF0": ["GitLab"],
"uuoHOU": ["Perintah gagal."],
"uwzRx4": [
"Sesuaikan ukuran dan batas waktu permintaan pengindeksan untuk server embedding yang lambat atau terbatas memori. Sebagian besar penyiapan sebaiknya mempertahankan nilai bawaan."
@@ -5515,6 +5547,9 @@
"vy_VIN": [
"Dilacak di git — pembaruan mengalir lewat repo Anda (pull atau CI), bukan pembaruan otomatis"
],
+ "w-Wt3H": [
+ "Perlu menyambung ulang untuk melanjutkan sinkronisasi. Periksa kunci SSH atau kredensial tersimpan yang dipakai git untuk host ini."
+ ],
"w0YVAE": ["Tampilkan simpul keterampilan"],
"w3tVpc": [
"Belum ada tautan. Tambahkan tautan wiki atau tautan markdown untuk membangun sebuah graf."
@@ -5630,7 +5665,6 @@
"x57cJf": ["Buka tautan"],
"xAlHfe": [["basename"], " — penyunting teks"],
"xBFg6z": ["Dari plugin ", ["0"]],
- "xBjIs7": ["Masuk ke GitHub tidak tersedia untuk proyek ini"],
"xCJdfg": ["Bersihkan"],
"xCdTnb": ["Tutup tab baru"],
"xD4Xm2": ["Ambil"],
@@ -5642,6 +5676,9 @@
"xG4tb6": ["Koneksi ke \"", ["docName"], "\" terputus."],
"xG8Ish": ["Tidak direncanakan"],
"xHGM4U": ["Sembunyikan pratinjau HTML"],
+ "xJ7qrb": [
+ "Tidak ada kredensial yang tersimpan untuk host git ini. Tambahkan token di Pengaturan, atau biarkan git memakai kredensial yang sudah dimilikinya."
+ ],
"xK291b": ["Dua halaman (ganjil)"],
"xKDsGS": ["Ke baris ", ["0"], " di ", ["1"]],
"xKcXG6": [["addingCount", "plural", { "other": ["#", " ditambahkan"] }]],
@@ -5723,6 +5760,9 @@
"yLwx9e": [
"Direktori di atasnya yang merupakan symlink — lepaskan tautan folder itu untuk mengambil kembali yang ini."
],
+ "yLyiQV": [
+ "Token yang tersimpan tidak memiliki izin yang dibutuhkan host ini untuk melakukan push."
+ ],
"yMgL_E": ["Navigasi bidang pencarian"],
"yOjRUV": ["Tidak ada alat AI yang terdeteksi. Pasang satu untuk memakai keterampilan ini."],
"yQE2r9": ["Memuat"],
@@ -5820,6 +5860,7 @@
"zLak8b": ["Aktifkan tab baru"],
"zMmwh4": ["Pilih tema atau buat tema Anda sendiri."],
"zWZBPx": ["Tipe berubah"],
+ "zXZJoN": ["Tambah token"],
"zXj1rA": ["Cari berdasarkan makna"],
"zYp8Sr": [
"Lencana <0>Diubah</0> menandai aturan yang disetel konfigurasi Anda secara eksplisit — langsung, atau diwarisi lewat <1>extends</1>. Aturan tanpa lencana tetap pada keadaan bawaannya."
diff --git a/packages/app/src/locales/id/messages.po b/packages/app/src/locales/id/messages.po
index e592e77fe..f2efeeb82 100644
--- a/packages/app/src/locales/id/messages.po
+++ b/packages/app/src/locales/id/messages.po
@@ -1544,6 +1544,10 @@ msgstr "Templat bernama <0>{trimmedSlug}</0> sudah ada di sini. Menyimpan akan m
msgid "A title, description, tags — anything that describes this folder."
msgstr "Judul, deskripsi, tag — apa saja yang menggambarkan folder ini."
+#: src/components/settings/AccountSection.tsx
+msgid "A token added here only applies to HTTPS remotes, and this project's remote doesn't use HTTPS."
+msgstr "Token yang ditambahkan di sini hanya berlaku untuk remote HTTPS, dan remote proyek ini tidak memakai HTTPS."
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "A worktree folder for {shareBranch} already exists."
msgstr "Folder worktree untuk {shareBranch} sudah ada."
@@ -1596,9 +1600,8 @@ msgid "Accept their deletion"
msgstr "Terima penghapusan mereka"
#: src/components/settings/AccountSection.tsx
-#: src/components/settings/SettingsDialogShell.tsx
-msgid "Account"
-msgstr "Akun"
+msgid "Access token"
+msgstr "Token akses"
#: src/components/TemplateRow.tsx
msgid "Actions for {label}"
@@ -1677,6 +1680,10 @@ msgstr "Tambahkan properti"
msgid "Add a starter pack"
msgstr "Tambahkan paket awal"
+#: src/components/settings/AccountSection.tsx
+msgid "Add an access token for a GitLab, Gitea, Bitbucket, Azure DevOps or self-hosted git server. Without one, git uses the credentials it already has saved for that host; with one, OpenKnowledge uses the token instead."
+msgstr "Tambahkan token akses untuk server GitLab, Gitea, Bitbucket, Azure DevOps, atau git yang di-host sendiri. Tanpa token, git memakai kredensial yang sudah tersimpan untuk host tersebut; dengan token, OpenKnowledge memakai token itu sebagai gantinya."
+
#: src/components/settings/OkignoreSection.tsx
msgid "Add another pattern"
msgstr "Tambahkan pola lain"
@@ -1806,6 +1813,12 @@ msgstr "Tambahkan ke kamus"
msgid "Add to prompt"
msgstr "Tambahkan ke prompt"
+#: src/components/settings/AccountSection.tsx
+#: src/components/SyncStatusBadge.tsx
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Add token"
+msgstr "Tambah token"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Add value"
msgstr "Tambahkan nilai"
@@ -1816,6 +1829,10 @@ msgstr "Tambahkan nilai"
msgid "Added"
msgstr "Ditambahkan"
+#: src/components/settings/AccountSection.tsx
+msgid "Adding"
+msgstr "Menambahkan"
+
#: src/components/settings/AgentConnectionDialogs.tsx
msgid "Adds a global OpenKnowledge MCP entry for this agent."
msgstr "Menambahkan entri MCP OpenKnowledge global untuk agen ini."
@@ -2331,6 +2348,10 @@ msgstr "Total lampiran harus di bawah 3 MB."
msgid "Authenticated as {login}."
msgstr "Diautentikasi sebagai {login}."
+#: src/components/SyncStatusBadge.tsx
+msgid "Authentication failed for this git host. Add a token for it in Settings, or replace the one stored."
+msgstr "Autentikasi gagal untuk host git ini. Tambahkan token untuknya di Pengaturan, atau ganti token yang tersimpan."
+
#: src/editor/slash-command/component-items.tsx
msgid "Authoritative content; mirrored verbatim everywhere it's referenced."
msgstr "Konten otoritatif; dicerminkan apa adanya di mana pun ia dirujuk."
@@ -2532,6 +2553,11 @@ msgstr "Judul bagian besar."
msgid "Bird wiki"
msgstr "Wiki burung"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "Bitbucket"
+msgstr "Bitbucket"
+
#: src/components/NewItemDialog.tsx
msgid "Blank note"
msgstr "Catatan kosong"
@@ -3601,8 +3627,8 @@ msgid "Connect"
msgstr "Hubungkan"
#: src/components/settings/AccountSection.tsx
-msgid "Connect a GitHub account to browse and sync your repositories."
-msgstr "Hubungkan akun GitHub untuk menelusuri dan menyinkronkan repositori Anda."
+msgid "Connect a GitHub account to browse and publish GitHub repositories."
+msgstr "Hubungkan akun GitHub untuk menjelajahi dan menerbitkan repositori GitHub."
#: src/components/settings/SyncSection.tsx
msgid "Connect an existing repository"
@@ -3694,6 +3720,7 @@ msgid "Connection dropped"
msgstr "Koneksi terputus"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Connection error — try again"
msgstr "Galat koneksi — coba lagi"
@@ -5933,6 +5960,10 @@ msgstr "Masukkan bilangan bulat antara {minimum} dan {maximum}."
msgid "Enter at least 3 characters to search by meaning."
msgstr "Masukkan minimal 3 karakter untuk mencari berdasarkan makna."
+#: src/components/settings/AccountSection.tsx
+msgid "Enter the host name git connects to, with an optional :port and no scheme or path, for example git.example.com."
+msgstr "Masukkan nama host yang dihubungi git, dengan :port opsional dan tanpa skema atau path, misalnya git.example.com."
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Enter the public origin your tunnel serves, for example https://notes.example.com"
msgstr "Masukkan origin publik yang dilayani tunnel Anda, misalnya https://notes.example.com"
@@ -6408,6 +6439,7 @@ msgid "Failed to start sign-in — try again"
msgstr "Gagal memulai proses masuk — coba lagi"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Failed to store the token — try again"
msgstr "Gagal menyimpan token — coba lagi"
@@ -6881,6 +6913,11 @@ msgctxt "settings search keyword"
msgid "GHES"
msgstr "GHES"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Git"
+msgstr "Git"
+
#: src/components/ExploreSkills.tsx
msgid "Git & PRs"
msgstr "Git & PR"
@@ -6889,6 +6926,10 @@ msgstr "Git & PR"
msgid "Git can't track this folder — it's empty or contains only ignored files. The link won't work until you add a tracked document."
msgstr "Git tidak bisa melacak folder ini — folder ini kosong atau hanya berisi berkas yang diabaikan. Tautannya tidak akan berfungsi sampai Anda menambahkan dokumen yang dilacak."
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it."
+msgstr "git tidak dapat mengautentikasi ke host ini. Periksa kunci SSH atau kredensial tersimpan yang dipakai git untuk host tersebut."
+
#: src/components/RecentProjectsMenu.tsx
msgid "Git has locked this worktree, but it can still be opened."
msgstr "Git telah mengunci worktree ini, tetapi masih dapat dibuka."
@@ -6948,10 +6989,6 @@ msgstr "Host GitHub Enterprise Server"
msgid "GitHub sign-in is missing or expired. Reconnect to resume syncing."
msgstr "Status masuk GitHub tidak ada atau kedaluwarsa. Sambungkan ulang untuk melanjutkan sinkronisasi."
-#: src/components/settings/AccountSection.tsx
-msgid "GitHub sign-in isn't available for this project"
-msgstr "Masuk ke GitHub tidak tersedia untuk proyek ini"
-
#: src/components/ImportSkillForm.tsx
msgid "GitHub, a git URL, or a local path."
msgstr "GitHub, sebuah URL git, atau jalur lokal."
@@ -6960,6 +6997,11 @@ msgstr "GitHub, sebuah URL git, atau jalur lokal."
msgid "github.com is always recognized, so it doesn't need to be added."
msgstr "github.com selalu dikenali, jadi tidak perlu ditambahkan."
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "GitLab"
+msgstr "GitLab"
+
#: src/components/settings/SavedThemesTiles.tsx
msgid "Give it a name before editing its colors."
msgstr "Beri nama sebelum menyunting warnanya."
@@ -7314,6 +7356,10 @@ msgstr "Deretan pil mendatar + panel aktif di bawahnya; klik sebuah pil untuk be
msgid "Horizontal rule that divides sections."
msgstr "Garis mendatar yang memisahkan bagian."
+#: src/components/settings/AccountSection.tsx
+msgid "Host"
+msgstr "Host"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Hosting is on. The server is running on port {boundPort}. Reach it through your tunnel."
msgstr "Hosting aktif. Server berjalan di port {boundPort}. Akses melalui tunnel Anda."
@@ -8607,8 +8653,8 @@ msgid "Manage skill folders"
msgstr "Kelola folder keterampilan"
#: src/components/settings/AccountSection.tsx
-msgid "Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."
-msgstr "Kelola akun GitHub yang dipakai OpenKnowledge untuk menelusuri dan menyinkronkan repositori Anda."
+msgid "Manage the accounts and access tokens OpenKnowledge uses to connect to your git hosts."
+msgstr "Kelola akun dan token akses yang dipakai OpenKnowledge untuk terhubung ke host git Anda."
#: src/components/settings/AgentConnectionDialogs.tsx
#: src/components/settings/AgentConnectionsSection.tsx
@@ -9438,6 +9484,10 @@ msgstr "Tidak ada perubahan isi pada versi ini."
msgid "No content changes in this version"
msgstr "Tidak ada perubahan isi pada versi ini"
+#: src/components/SyncStatusBadge.tsx
+msgid "No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "Tidak ada kredensial yang tersimpan untuk host git ini. Tambahkan token di Pengaturan, atau biarkan git memakai kredensial yang sudah dimilikinya."
+
#: src/components/GraphPanel.tsx
msgid "No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."
msgstr "Tidak ada halaman yang terputus. Halaman muncul di sini hanya bila ia tidak punya sisi graf masuk maupun keluar."
@@ -10390,6 +10440,10 @@ msgstr "Membuka..."
msgid "OpenKnowledge"
msgstr "OpenKnowledge"
+#: src/components/AuthModal.tsx
+msgid "OpenKnowledge can't sign in to GitHub for this project."
+msgstr "OpenKnowledge tidak dapat masuk ke GitHub untuk proyek ini."
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge checked {subject}"
msgstr "OpenKnowledge memeriksa {subject}"
@@ -10402,10 +10456,6 @@ msgstr "OpenKnowledge memeriksa proyek"
msgid "OpenKnowledge could not find this agent on this machine."
msgstr "OpenKnowledge tidak menemukan agen ini di mesin ini."
-#: src/components/settings/AccountSection.tsx
-msgid "OpenKnowledge couldn't find a host name in this project's git remote, so it can't tell which GitHub server to sign in to."
-msgstr "OpenKnowledge tidak menemukan nama host di remote git proyek ini, jadi tidak dapat mengetahui server GitHub mana yang harus dimasuki."
-
#: src/lib/worktree-create-error.ts
msgid "OpenKnowledge couldn't finish setting up this project. The worktree was created but not opened."
msgstr "OpenKnowledge tidak dapat menyelesaikan penyiapan proyek ini. Worktree dibuat, tetapi tidak dibuka."
@@ -10462,6 +10512,10 @@ msgstr "OpenKnowledge menyunting sebuah dokumen"
msgid "OpenKnowledge files were removed"
msgstr "File OpenKnowledge telah dihapus"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "OpenKnowledge tidak menyimpan kredensial apa pun untuk host ini. Tambahkan token di Pengaturan, atau biarkan git memakai kredensial yang sudah dimilikinya."
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge imported {source}"
msgstr "OpenKnowledge mengimpor {source}"
@@ -10690,6 +10744,11 @@ msgstr "lainnya"
msgid "Other"
msgstr "Lainnya"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Other Git hosts"
+msgstr "Host Git lainnya"
+
#: src/components/settings/SharingSection.tsx
msgid "Other OK paths are tracked upstream:"
msgstr "Ada jalur OK lain yang dilacak di remote:"
@@ -11624,6 +11683,14 @@ msgstr "Perlu menyambung ulang"
msgid "Reconnect required to keep syncing."
msgstr "Perlu menyambung ulang untuk melanjutkan sinkronisasi."
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Add a token for this host in Settings, or replace the one stored."
+msgstr "Perlu menyambung ulang untuk melanjutkan sinkronisasi. Tambahkan token untuk host ini di Pengaturan, atau ganti token yang tersimpan."
+
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Check the SSH key or saved credentials git uses for this host."
+msgstr "Perlu menyambung ulang untuk melanjutkan sinkronisasi. Periksa kunci SSH atau kredensial tersimpan yang dipakai git untuk host ini."
+
#: src/presence/use-sync-toasts.ts
msgid "Reconnected"
msgstr "Tersambung kembali"
@@ -14815,6 +14882,10 @@ msgstr "Daftar skill tidak cocok dengan skemanya."
msgid "The source folder itself does not move."
msgstr "Folder sumbernya sendiri tidak berpindah."
+#: src/components/SyncStatusBadge.tsx
+msgid "The stored token is missing the permissions this host needs to push."
+msgstr "Token yang tersimpan tidak memiliki izin yang dibutuhkan host ini untuk melakukan push."
+
#: src/components/TemplateProperties.tsx
msgid "The template's filename (without `.md`)."
msgstr "Nama berkas templatnya (tanpa `.md`)."
@@ -14873,6 +14944,10 @@ msgstr "Executable terminal.shell di .ok/local/config.yml tidak ditemukan. Shell
msgid "The token needs the repo and read:user scopes."
msgstr "Token itu memerlukan cakupan repo dan read:user."
+#: src/components/settings/AccountSection.tsx
+msgid "The username git sends with the token. Some hosts expect a fixed value: type <0>x-bitbucket-api-token-auth</0> for a Bitbucket API token, <1>x-token-auth</1> for a Bitbucket repository or workspace access token, or <2>oauth2</2> for GitLab. For Gitea, use your Gitea username. Azure DevOps accepts any value."
+msgstr "Nama pengguna yang dikirim git bersama token. Beberapa host mengharapkan nilai tetap: ketik <0>x-bitbucket-api-token-auth</0> untuk token API Bitbucket, <1>x-token-auth</1> untuk token akses repositori atau workspace Bitbucket, atau <2>oauth2</2> untuk GitLab. Untuk Gitea, gunakan nama pengguna Gitea Anda. Azure DevOps menerima nilai apa pun."
+
#: src/lib/tab-session-restore-recovery-notice.ts
msgid "The workspace opened without it so the app could start."
msgstr "Ruang kerja terbuka tanpanya agar aplikasi dapat dimulai."
@@ -15401,10 +15476,6 @@ msgstr "Proyek ini bukan repositori git, jadi worktree tidak tersedia."
msgid "This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."
msgstr "Proyek ini hanya ada di komputer ini. Hubungkan ke GitHub untuk mencadangkannya dan membagikannya dengan orang lain."
-#: src/components/settings/AccountSection.tsx
-msgid "This project's git remote is on {host}, which OpenKnowledge doesn't recognize as a GitHub host. If {host} runs GitHub Enterprise Server, add it to GitHub Enterprise Server hosts below, then restart OpenKnowledge."
-msgstr "Remote git proyek ini berada di {host}, yang tidak dikenali OpenKnowledge sebagai host GitHub. Jika {host} menjalankan GitHub Enterprise Server, tambahkan ke Host GitHub Enterprise Server di bawah, lalu mulai ulang OpenKnowledge."
-
#: src/components/DocumentErrorBoundary.tsx
msgid "This project's running server doesn't support live editing. Restart OpenKnowledge to fix."
msgstr "Server proyek ini yang sedang berjalan tidak mendukung penyuntingan langsung. Mulai ulang OpenKnowledge untuk memperbaikinya."
@@ -15501,6 +15572,7 @@ msgid "This usually means one of:"
msgstr "Biasanya ini berarti salah satu dari:"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
msgid "This window can't store a token — open Settings from the main app window."
msgstr "Jendela ini tidak bisa menyimpan token — buka Pengaturan dari jendela utama aplikasi."
@@ -15654,6 +15726,15 @@ msgstr "Menyalakan atau mematikan format garis bawah."
msgid "Toggles the pattern {0}/**"
msgstr "Mengaktifkan atau menonaktifkan pola {0}/**"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "token"
+msgstr "token"
+
+#: src/components/settings/AccountSection.tsx
+msgid "Token stored for {login} on {host}. To remove it, run <0>ok auth signout --host {host}</0>."
+msgstr "Token disimpan untuk {login} di {host}. Untuk menghapusnya, jalankan <0>ok auth signout --host {host}</0>."
+
#: src/components/SkillBundlePreview.tsx
#: src/components/SkillProperties.tsx
msgid "tokens"
@@ -16240,6 +16321,10 @@ msgstr "Pengguna"
msgid "User plugins are personal to this device — turn them on or off here. Each enabled plugin gets its own page under Plugins in the settings sidebar."
msgstr "Plugin pengguna bersifat pribadi untuk perangkat ini — nyalakan atau matikan di sini. Setiap plugin yang aktif mendapat halamannya sendiri di bawah Plugin pada bilah sisi pengaturan."
+#: src/components/settings/AccountSection.tsx
+msgid "Username"
+msgstr "Nama pengguna"
+
#: src/components/settings/SearchSection.tsx
msgid "Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."
msgstr "Memakai variabel lingkungan <0>OK_EMBEDDINGS_API_KEY</0> (dikelola di luar OpenKnowledge)."
diff --git a/packages/app/src/locales/ko/messages.json b/packages/app/src/locales/ko/messages.json
index 54690b9c3..bb21b2201 100644
--- a/packages/app/src/locales/ko/messages.json
+++ b/packages/app/src/locales/ko/messages.json
@@ -35,6 +35,9 @@
],
"-l6jM7": ["+ 버튼으로 채팅 시작하거나 페이지에서 에이전트 실행하세요."],
"-lCAuQ": ["그래프 불러오는 중"],
+ "-nA68n": [
+ "GitLab, Gitea, Bitbucket, Azure DevOps 또는 자체 호스팅 git 서버용 액세스 토큰을 추가합니다. 토큰이 없으면 git은 해당 호스트에 이미 저장된 자격 증명을 사용하고, 토큰이 있으면 OpenKnowledge가 대신 토큰을 사용합니다."
+ ],
"-o5XAG": [
"사용자 메모 및 앱 버전과 함께 OpenKnowledge 팀에 비공개로 전송되었습니다. 공개적으로 게시되지 않습니다."
],
@@ -228,6 +231,7 @@
"1vczDE": [["displayName"], " Desktop 열기"],
"1vn0CI": ["잘못된 서버 응답"],
"1xui0Q": ["로컬 파일 불러오기 실패"],
+ "1yHVE-": ["추가 중"],
"2-3Mlu": [["name"], "의 고정을 해제할 수 없습니다"],
"20LVKb": ["이 채팅 밖의 무언가가 에이전트 프로세스에 중지를 요청했습니다(", ["signal"], ")."],
"2277Tu": ["그래프 접기"],
@@ -454,6 +458,14 @@
"샌드박스 처리된 HTML 삽입입니다. HTML을 작성하면 렌더링된 미리보기가 실시간으로 표시됩니다."
],
"4nj6n8": ["/api/config HTTP ", ["code"], " 반환"],
+ "4p8Baj": [
+ ["host"],
+ "의 ",
+ ["login"],
+ "에 대한 토큰이 저장되었습니다. 제거하려면 <0>ok auth signout --host ",
+ ["host"],
+ "</0>을(를) 실행하세요."
+ ],
"4pDZ2N": ["다른 모든 위치에서 \"", ["0"], "\"을 제거했습니다. 소스 폴더는 계속 불러옵니다"],
"4r6p_B": [
"이 명령에는 실제로 실행되는 내용과 다르게 보이게 할 수 있는 숨겨진 문자가 있습니다. 여기서는 ⟨U+…⟩ 형식으로 표시됩니다."
@@ -708,13 +720,6 @@
"7YRrJ9": [
"OpenKnowledge 데스크톱 앱에서 사용할 수 있습니다. 터미널에서 <0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2>를 사용합니다."
],
- "7_I248": [
- "이 프로젝트의 git 원격은 ",
- ["host"],
- "에 있으며, OpenKnowledge는 이를 GitHub 호스트로 인식하지 않습니다. ",
- ["host"],
- "이(가) GitHub Enterprise Server를 실행한다면 아래의 GitHub Enterprise Server 호스트에 추가한 다음 OpenKnowledge를 다시 시작하세요."
- ],
"7_bFEL": [["patternText"], " 드래그로 순서를 변경합니다."],
"7a0YcF": ["<0>스페이스</0>를 누르거나 블롭을 탭하여 시작"],
"7aNk5D": ["OpenKnowledge에서 ", ["subject"], " 편집"],
@@ -747,6 +752,7 @@
"7lFX_h": ["지금 조정"],
"7m3Ade": ["설치 항목:"],
"7qRHf0": ["Claude Chat 및 Cowork용 설치"],
+ "7sNhEz": ["사용자 이름"],
"7uBlRT": ["붙여넣기로 복제할 수 있도록 파일 트리에서 포커스된 항목을 복사합니다."],
"7vxWET": ["팩 미리보기를 사용할 수 없습니다."],
"7wogIQ": [["0", "plural", { "other": ["플러그인"] }]],
@@ -891,6 +897,7 @@
"9bCiQ8": ["들어오는 그래프 링크가 누락된 페이지가 없습니다."],
"9bG48P": ["보내는 중"],
"9clcD5": ["#", ["chip"], " 태그가 있는 문서 열기"],
+ "9djC8C": ["GitHub 저장소를 찾아보고 게시하려면 GitHub 계정을 연결하세요."],
"9euN0m": [["count", "plural", { "other": ["다른 문서 참여자 ", "#", "명 더"] }]],
"9fhQRL": ["베타 채널"],
"9fvog2": ["미리보기를 사용할 수 없음: ", ["errorDetail"]],
@@ -985,7 +992,6 @@
["position"],
"번째"
],
- "AeXO77": ["계정"],
"AgoIW4": [
["source"],
": ",
@@ -998,6 +1004,7 @@
["detail"]
],
"AhoGwP": ["OpenKnowledge 통합 설정"],
+ "Ai2U7L": ["호스트"],
"AiNMQ7": [
"이 프로젝트는 이 컴퓨터에만 있습니다. 백업하고 다른 사람과 공유하려면 GitHub에 연결합니다."
],
@@ -1266,7 +1273,6 @@
"E2Mv-X": ["소스 복사"],
"E4XYYH": ["이 프로젝트에서 터미널 사용"],
"E5WeIy": ["가장 최근에 닫은 편집기 탭을 다시 엽니다."],
- "E6lrpp": ["OpenKnowledge가 저장소를 탐색하고 동기화할 때 사용하는 GitHub 계정을 관리합니다."],
"E7BhZn": ["빈 노트"],
"E8NbNG": ["워크트리를 불러올 수 없습니다."],
"E91VZY": ["새 창에서 열기"],
@@ -1280,7 +1286,6 @@
"EEYbdt": ["게시"],
"EFfGAv": ["메시지 전송 완료. 편집 내용 미적용."],
"EHu0x2": ["동기화 중"],
- "EJuO7B": ["GitHub 계정을 연결하면 저장소를 찾아보고 동기화할 수 있습니다."],
"EKwNEe": [
"캐시된 임베딩은 이를 생성한 엔드포인트와 모델에 속하므로, 인덱스를 처음부터 다시 빌드합니다."
],
@@ -1421,6 +1426,9 @@
"FgRAvd": ["로그 및 시스템 정보"],
"Fhp4Gn": ["플러그인 보기"],
"Fim5F3": ["임베딩"],
+ "FioJgb": [
+ "계속 동기화하려면 다시 연결해야 합니다. 설정에서 이 호스트의 토큰을 추가하거나 저장된 토큰을 교체하세요."
+ ],
"FiyNln": ["속성에서 선택한 텍스트로 이동"],
"FjkaiT": ["축소"],
"Fjz6aJ": ["새 채팅으로 전송"],
@@ -1838,6 +1846,9 @@
"KvwJv8": ["일부 파일이 표시되지 않았습니다. 작업 트리의 변경 사항이 너무 많습니다."],
"Kx881F": ["복원됨: ", ["0"], "."],
"KziH2K": ["빠름"],
+ "L-crEu": [
+ "git이 이 호스트에 인증하지 못했습니다. git이 이 호스트에 사용하는 SSH 키나 저장된 자격 증명을 확인하세요."
+ ],
"L-rMC9": ["기본값으로 재설정"],
"L1BQTH": [["0"], " 미설치 상태입니다. 다운로드 페이지를 엽니다."],
"L1ZE3M": ["문서 통계"],
@@ -1888,6 +1899,9 @@
"LRgZAt": [["owner"], "/", ["name"], "이 이미 존재합니다"],
"LSuMte": [["0"], "/", ["totalCount"]],
"LTeJuX": ["전체 화면 전환"],
+ "LVWA9A": [
+ "이 git 호스트에 대한 인증에 실패했습니다. 설정에서 이 호스트의 토큰을 추가하거나 저장된 토큰을 교체하세요."
+ ],
"LXIm4m": ["컨텍스트 창"],
"LXdWeS": ["중간 크기 섹션 제목입니다."],
"LXfNU-": ["탐색 및 제안"],
@@ -2001,6 +2015,7 @@
"Mj8R8K": ["스킬 설치 실패: ", ["0"]],
"MmDDWK": ["최근 열기"],
"Mnavhe": [["propPanelDescriptorLabel"], " 속성"],
+ "MpZRQy": ["Git"],
"MqQoV-": ["만들려는 것을 설명하고, 빈 파일로 시작하거나 템플릿에서 뼈대를 만듭니다."],
"MqsbfN": ["외부 링크 미리보기를 켜시겠습니까?"],
"MrUmCD": ["빌드 실패 원인 불명"],
@@ -2167,6 +2182,9 @@
"OPOiKn": ["콘텐츠 규칙"],
"OTF92M": ["레이블 <0>(선택적 표시 텍스트)</0>"],
"OVjNeX": ["터미널 ", ["0"]],
+ "OWs-8P": [
+ "여기에 추가한 토큰은 HTTPS 원격 저장소에만 적용되며, 이 프로젝트의 원격 저장소는 HTTPS를 사용하지 않습니다."
+ ],
"OX2Neh": ["인라인 코드"],
"OXb_Df": ["설정 콘텐츠"],
"OXdGnd": ["문제"],
@@ -2281,6 +2299,7 @@
["filePath"],
"의 충돌을 이해할 수 있도록 도와주세요. OpenKnowledge 충돌 보기에서 무엇을 비교해야 하는지 설명해 주세요. 해결 방법은 제가 그곳에서 선택하고 적용하겠습니다."
],
+ "Q14Keq": ["Bitbucket"],
"Q1mtyd": ["사이드바 가리기"],
"Q5fqMz": ["연결 오류. 다시 시도하세요."],
"Q6hhn8": ["환경설정"],
@@ -2516,6 +2535,7 @@
"SiUUCS": ["다음 일치 항목"],
"SkMZlS": ["<0>", ["targetGitPath"], "</0>을 제거하지 못했습니다: ", ["removeGitError"]],
"SkTkKV": ["에이전트 중지 실패. 강제 중지 시 채팅 종료 및 에이전트 종료."],
+ "SkUcEr": ["액세스 토큰"],
"Ske_wc": [
"사용자 플러그인은 이 기기에만 적용됩니다. 여기에서 켜거나 끌 수 있습니다. 활성화된 각 플러그인은 설정 사이드바의 플러그인 아래에 전용 페이지가 생깁니다."
],
@@ -2834,9 +2854,6 @@
"XAyxsa": ["원격 브랜치 체크아웃"],
"XBBZnv": ["링크 대상 \"", ["shown"], "\"이 존재하는 문서로 확인되지 않습니다."],
"XBgr2S": ["복사해 넣기"],
- "XBpH6-": [
- "OpenKnowledge가 이 프로젝트의 git 원격 주소에서 호스트 이름을 찾지 못해 어느 GitHub 서버에 로그인해야 할지 알 수 없습니다."
- ],
"XDzAnp": ["새 탭에서 열림"],
"XF1kgP": [["source"], "의 모든 항목이 이미 최신입니다"],
"XGKy1z": ["이미지를 표시할 수 없음"],
@@ -3263,6 +3280,9 @@
"arUUsK": ["제품 업데이트"],
"ax9kie": ["링크 미리보기 설정을 아직 불러오지 못했습니다. 잠시 후 다시 시도합니다."],
"axQ1h6": ["추가할 내용이 있나요? (선택 사항)"],
+ "azrR7I": [
+ "git이 토큰과 함께 보내는 사용자 이름입니다. 일부 호스트는 고정된 값을 요구합니다. Bitbucket API 토큰이면 <0>x-bitbucket-api-token-auth</0>, Bitbucket 저장소 또는 워크스페이스 액세스 토큰이면 <1>x-token-auth</1>, GitLab이면 <2>oauth2</2>를 입력하세요. Gitea는 Gitea 사용자 이름을 사용합니다. Azure DevOps는 아무 값이나 허용합니다."
+ ],
"b18t0_": ["Diff 닫기"],
"b1FDss": ["시작으로 스크롤"],
"b2ezG_": ["둘 다 유지됨. \"", ["0"], "\"은 이제 별도 스킬입니다"],
@@ -3570,6 +3590,7 @@
"e8zRrb": ["파일 보기"],
"e8zYa8": ["워크트리에서 ", ["shareBranch"], " 브랜치 열기에 실패했습니다. 다시 시도하세요."],
"e9sHSO": ["중단한 지점부터 계속"],
+ "eAYJMv": ["토큰"],
"eBGWcy": [
"프로젝트 폴더가 없거나, 접근할 수 없거나, 변경되어 Open Knowledge 도구를 사용할 수 없습니다. 위치와 권한을 확인한 후 다시 시도하세요."
],
@@ -4130,6 +4151,7 @@
"jZ_E5M": ["가져오기 실패. 자세한 내용은 서버 로그를 확인하세요."],
"j_Z6g7": ["공유 기본값"],
"jbSG8V": ["파일 보기 (", ["sidebarShortcutLabel"], ")"],
+ "jbhCDS": ["기타 Git 호스트"],
"jcEoUi": ["오른쪽 패널로 이동"],
"jdGUeI": ["템플릿 생성 실패: ", ["error"]],
"jeCFV7": ["새 패널 오른쪽으로 이동"],
@@ -4675,6 +4697,7 @@
"pckX1A": [["0", "plural", { "other": ["#", "회 사용"] }]],
"pcqlQu": [["0", "plural", { "other": ["폴더"] }]],
"pd0UH2": ["오른쪽 정렬"],
+ "pd6t3G": ["OpenKnowledge가 git 호스트에 연결할 때 사용하는 계정과 액세스 토큰을 관리합니다."],
"peq20S": [
"이 채팅에서는 브라우저를 사용할 수 없습니다. 브라우저를 설정하지 못했기 때문입니다. 자세한 내용은 OpenKnowledge 로그에 있습니다."
],
@@ -4770,6 +4793,7 @@
"qi17kj": ["이 워크스페이스의 .excalidraw 보드 라이브 스냅샷을 삽입합니다."],
"qi1F96": ["파일 탐색기에서 보기"],
"qiRoLb": ["이번 주 변경한 내용 모두 요약"],
+ "qimTXH": ["OpenKnowledge는 이 프로젝트에서 GitHub에 로그인할 수 없습니다."],
"qioCwA": [["pageNumber"], "페이지로 이동"],
"qjHMHf": ["동기화를 사용 중지하지 못했습니다. ", ["detail"]],
"qkqG0b": ["업스트림 가져오기"],
@@ -4829,6 +4853,9 @@
"rVxu1k": ["아직 이곳으로 연결되는 페이지가 없습니다."],
"rXz97P": ["번호 매기기 목록입니다."],
"rZ9HZq": ["할 일"],
+ "rZFxkH": [
+ "git이 연결하는 호스트 이름을 입력하세요. :port는 선택 사항이며 스킴이나 경로는 넣지 마세요. 예: git.example.com."
+ ],
"rZVMkf": ["비주얼 편집기 바꾸기 입력 필드에 포커스가 있습니다."],
"radOpL": ["이미지 ", ["identity"], ". 참조로 이동합니다."],
"rageVb": ["실시간 미리보기 창이 있는 사용자 지정 HTML입니다. 샌드박스 처리된 iframe입니다."],
@@ -5034,6 +5061,9 @@
"tlGXxX": ["자동(풀만)"],
"tnG-m6": ["자동 동기화가 일시 중지되었습니다. 계속하려면 로그인합니다."],
"toyw51": ["Mermaid 다이어그램 컨트롤"],
+ "tpOnU9": [
+ "OpenKnowledge에 이 호스트용으로 저장된 자격 증명이 없습니다. 설정에서 토큰을 추가하거나, git이 이미 가지고 있는 자격 증명을 사용하도록 두세요."
+ ],
"tqQBwN": ["스크립트는 검토용으로만 표시하며 실행하지 않습니다."],
"troubleshooting.claude-desktop.per-tool-approval": [
["agent"],
@@ -5175,6 +5205,7 @@
"uoJF_D": ["설정하거나 시작하기가 너무 어려웠습니다"],
"uqs8Gd": [["others", "plural", { "other": ["다른 파일 ", "#", "개"] }]],
"ur2XSb": ["비주얼 편집기"],
+ "uraHF0": ["GitLab"],
"uuoHOU": ["명령에 실패했습니다."],
"uwzRx4": [
"느리거나 메모리가 제한된 임베딩 서버에 맞게 인덱싱 요청 크기와 시간 제한을 조정합니다. 대부분의 환경에서는 기본값을 유지하는 것이 좋습니다."
@@ -5261,6 +5292,9 @@
"vy_VIN": [
"git에서 추적됨. 업데이트는 자동 업데이트가 아니라 저장소를 통해 전달됩니다(pull 또는 CI)"
],
+ "w-Wt3H": [
+ "계속 동기화하려면 다시 연결해야 합니다. git이 이 호스트에 사용하는 SSH 키나 저장된 자격 증명을 확인하세요."
+ ],
"w0YVAE": ["스킬 노드 보기"],
"w3tVpc": ["아직 링크가 없습니다. 위키 링크나 Markdown 링크를 추가하여 그래프를 만드세요."],
"w3vFfL": ["파일 숨기기"],
@@ -5378,7 +5412,6 @@
"x57cJf": ["링크 열기"],
"xAlHfe": [["basename"], " 텍스트 편집기"],
"xBFg6z": [["0"], " 플러그인에서"],
- "xBjIs7": ["이 프로젝트에서는 GitHub 로그인을 사용할 수 없습니다"],
"xCJdfg": ["지우기"],
"xCdTnb": ["새 탭 닫기"],
"xD4Xm2": ["가져오기"],
@@ -5390,6 +5423,9 @@
"xG4tb6": ["\"", ["docName"], "\" 연결이 끊겼습니다."],
"xG8Ish": ["계획 없음"],
"xHGM4U": ["HTML 미리보기 숨기기"],
+ "xJ7qrb": [
+ "이 git 호스트에 저장된 자격 증명이 없습니다. 설정에서 토큰을 추가하거나, git이 이미 가지고 있는 자격 증명을 사용하도록 두세요."
+ ],
"xK291b": ["두 페이지 (홀수)"],
"xKDsGS": ["줄 ", ["0"], ", ", ["1"], "에서 이동"],
"xKcXG6": [["addingCount", "plural", { "other": ["#", " 추가됨"] }]],
@@ -5469,6 +5505,7 @@
"yLwx9e": [
"상위 디렉터리가 심볼릭 링크입니다. 이 폴더 자체의 링크를 해제하면 다시 가져올 수 있습니다."
],
+ "yLyiQV": ["저장된 토큰에 이 호스트가 푸시하는 데 필요한 권한이 없습니다."],
"yMgL_E": ["찾기 필드 탐색"],
"yOjRUV": ["AI 도구가 감지되지 않았습니다. 이 스킬을 사용하려면 하나를 설치하세요."],
"yQE2r9": ["로드 중"],
@@ -5557,6 +5594,7 @@
"zLak8b": ["새 탭 활성화"],
"zMmwh4": ["테마를 선택하거나 직접 만듭니다."],
"zWZBPx": ["유형 변경됨"],
+ "zXZJoN": ["토큰 추가"],
"zXj1rA": ["의미로 검색"],
"zYp8Sr": [
"<0>수정됨</0> 배지는 config가 직접 설정했거나 <1>extends</1>를 통해 상속한 규칙을 나타냅니다. 표시가 없는 규칙은 기본 상태를 유지합니다."
diff --git a/packages/app/src/locales/ko/messages.po b/packages/app/src/locales/ko/messages.po
index d48ef5f2d..2efcb4bb1 100644
--- a/packages/app/src/locales/ko/messages.po
+++ b/packages/app/src/locales/ko/messages.po
@@ -1548,6 +1548,10 @@ msgstr "<0>{trimmedSlug}</0>이라는 템플릿이 이미 있습니다. 저장
msgid "A title, description, tags — anything that describes this folder."
msgstr "이 폴더를 설명하는 제목, 설명, 태그 등입니다."
+#: src/components/settings/AccountSection.tsx
+msgid "A token added here only applies to HTTPS remotes, and this project's remote doesn't use HTTPS."
+msgstr "여기에 추가한 토큰은 HTTPS 원격 저장소에만 적용되며, 이 프로젝트의 원격 저장소는 HTTPS를 사용하지 않습니다."
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "A worktree folder for {shareBranch} already exists."
msgstr "{shareBranch}용 워크트리 폴더가 이미 있습니다."
@@ -1600,9 +1604,8 @@ msgid "Accept their deletion"
msgstr "삭제를 수락"
#: src/components/settings/AccountSection.tsx
-#: src/components/settings/SettingsDialogShell.tsx
-msgid "Account"
-msgstr "계정"
+msgid "Access token"
+msgstr "액세스 토큰"
#: src/components/TemplateRow.tsx
msgid "Actions for {label}"
@@ -1681,6 +1684,10 @@ msgstr "속성 추가"
msgid "Add a starter pack"
msgstr "스타터 팩 추가"
+#: src/components/settings/AccountSection.tsx
+msgid "Add an access token for a GitLab, Gitea, Bitbucket, Azure DevOps or self-hosted git server. Without one, git uses the credentials it already has saved for that host; with one, OpenKnowledge uses the token instead."
+msgstr "GitLab, Gitea, Bitbucket, Azure DevOps 또는 자체 호스팅 git 서버용 액세스 토큰을 추가합니다. 토큰이 없으면 git은 해당 호스트에 이미 저장된 자격 증명을 사용하고, 토큰이 있으면 OpenKnowledge가 대신 토큰을 사용합니다."
+
#: src/components/settings/OkignoreSection.tsx
msgid "Add another pattern"
msgstr "패턴 추가"
@@ -1810,6 +1817,12 @@ msgstr "사전에 추가"
msgid "Add to prompt"
msgstr "프롬프트에 추가"
+#: src/components/settings/AccountSection.tsx
+#: src/components/SyncStatusBadge.tsx
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Add token"
+msgstr "토큰 추가"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Add value"
msgstr "값 추가"
@@ -1820,6 +1833,10 @@ msgstr "값 추가"
msgid "Added"
msgstr "추가됨"
+#: src/components/settings/AccountSection.tsx
+msgid "Adding"
+msgstr "추가 중"
+
#: src/components/settings/AgentConnectionDialogs.tsx
msgid "Adds a global OpenKnowledge MCP entry for this agent."
msgstr "이 에이전트에 전역 OpenKnowledge MCP 항목을 추가합니다."
@@ -2335,6 +2352,10 @@ msgstr "첨부 파일 총 용량은 3MB 미만이어야 합니다."
msgid "Authenticated as {login}."
msgstr "{login}(으)로 인증되었습니다."
+#: src/components/SyncStatusBadge.tsx
+msgid "Authentication failed for this git host. Add a token for it in Settings, or replace the one stored."
+msgstr "이 git 호스트에 대한 인증에 실패했습니다. 설정에서 이 호스트의 토큰을 추가하거나 저장된 토큰을 교체하세요."
+
#: src/editor/slash-command/component-items.tsx
msgid "Authoritative content; mirrored verbatim everywhere it's referenced."
msgstr "기준 콘텐츠이며, 참조되는 모든 곳에 그대로 미러링됩니다."
@@ -2536,6 +2557,11 @@ msgstr "큰 섹션 제목입니다."
msgid "Bird wiki"
msgstr "조류 위키"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "Bitbucket"
+msgstr "Bitbucket"
+
#: src/components/NewItemDialog.tsx
msgid "Blank note"
msgstr "빈 노트"
@@ -3605,8 +3631,8 @@ msgid "Connect"
msgstr "연결"
#: src/components/settings/AccountSection.tsx
-msgid "Connect a GitHub account to browse and sync your repositories."
-msgstr "GitHub 계정을 연결하면 저장소를 찾아보고 동기화할 수 있습니다."
+msgid "Connect a GitHub account to browse and publish GitHub repositories."
+msgstr "GitHub 저장소를 찾아보고 게시하려면 GitHub 계정을 연결하세요."
#: src/components/settings/SyncSection.tsx
msgid "Connect an existing repository"
@@ -3698,6 +3724,7 @@ msgid "Connection dropped"
msgstr "연결 끊김"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Connection error — try again"
msgstr "연결 오류. 다시 시도하세요."
@@ -5937,6 +5964,10 @@ msgstr "{minimum}에서 {maximum} 사이의 정수를 입력하세요."
msgid "Enter at least 3 characters to search by meaning."
msgstr "의미로 검색하려면 3자 이상 입력하세요."
+#: src/components/settings/AccountSection.tsx
+msgid "Enter the host name git connects to, with an optional :port and no scheme or path, for example git.example.com."
+msgstr "git이 연결하는 호스트 이름을 입력하세요. :port는 선택 사항이며 스킴이나 경로는 넣지 마세요. 예: git.example.com."
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Enter the public origin your tunnel serves, for example https://notes.example.com"
msgstr "터널이 제공하는 공개 오리진을 입력하세요. 예: https://notes.example.com"
@@ -6412,6 +6443,7 @@ msgid "Failed to start sign-in — try again"
msgstr "로그인을 시작하지 못했습니다. 다시 시도하세요"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Failed to store the token — try again"
msgstr "토큰 저장 실패. 다시 시도하세요."
@@ -6885,6 +6917,11 @@ msgctxt "settings search keyword"
msgid "GHES"
msgstr "GHES"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Git"
+msgstr "Git"
+
#: src/components/ExploreSkills.tsx
msgid "Git & PRs"
msgstr "Git 및 PR"
@@ -6893,6 +6930,10 @@ msgstr "Git 및 PR"
msgid "Git can't track this folder — it's empty or contains only ignored files. The link won't work until you add a tracked document."
msgstr "Git이 이 폴더를 추적할 수 없습니다. 비어 있거나 무시된 파일만 포함되어 있습니다. 추적할 문서를 추가해야 링크가 작동합니다."
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it."
+msgstr "git이 이 호스트에 인증하지 못했습니다. git이 이 호스트에 사용하는 SSH 키나 저장된 자격 증명을 확인하세요."
+
#: src/components/RecentProjectsMenu.tsx
msgid "Git has locked this worktree, but it can still be opened."
msgstr "Git에서 이 워크트리를 잠갔지만 계속 열 수 있습니다."
@@ -6952,10 +6993,6 @@ msgstr "GitHub Enterprise Server 호스트"
msgid "GitHub sign-in is missing or expired. Reconnect to resume syncing."
msgstr "GitHub 로그인이 없거나 만료되었습니다. 동기화를 계속하려면 다시 연결하세요."
-#: src/components/settings/AccountSection.tsx
-msgid "GitHub sign-in isn't available for this project"
-msgstr "이 프로젝트에서는 GitHub 로그인을 사용할 수 없습니다"
-
#: src/components/ImportSkillForm.tsx
msgid "GitHub, a git URL, or a local path."
msgstr "GitHub, git URL 또는 로컬 경로입니다."
@@ -6964,6 +7001,11 @@ msgstr "GitHub, git URL 또는 로컬 경로입니다."
msgid "github.com is always recognized, so it doesn't need to be added."
msgstr "github.com은 항상 인식되므로 추가할 필요가 없습니다."
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "GitLab"
+msgstr "GitLab"
+
#: src/components/settings/SavedThemesTiles.tsx
msgid "Give it a name before editing its colors."
msgstr "색상을 편집하기 전에 이름을 지정합니다."
@@ -7318,6 +7360,10 @@ msgstr "가로 필 스트립과 아래의 활성 패널입니다. 필을 클릭
msgid "Horizontal rule that divides sections."
msgstr "섹션을 나누는 가로줄입니다."
+#: src/components/settings/AccountSection.tsx
+msgid "Host"
+msgstr "호스트"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Hosting is on. The server is running on port {boundPort}. Reach it through your tunnel."
msgstr "호스팅이 켜져 있습니다. 서버가 포트 {boundPort}에서 실행 중입니다. 터널을 통해 접속하세요."
@@ -8611,8 +8657,8 @@ msgid "Manage skill folders"
msgstr "스킬 폴더 관리"
#: src/components/settings/AccountSection.tsx
-msgid "Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."
-msgstr "OpenKnowledge가 저장소를 탐색하고 동기화할 때 사용하는 GitHub 계정을 관리합니다."
+msgid "Manage the accounts and access tokens OpenKnowledge uses to connect to your git hosts."
+msgstr "OpenKnowledge가 git 호스트에 연결할 때 사용하는 계정과 액세스 토큰을 관리합니다."
#: src/components/settings/AgentConnectionDialogs.tsx
#: src/components/settings/AgentConnectionsSection.tsx
@@ -9442,6 +9488,10 @@ msgstr "이 버전에서 내용 변경 없음."
msgid "No content changes in this version"
msgstr "이 버전에는 콘텐츠 변경 없음"
+#: src/components/SyncStatusBadge.tsx
+msgid "No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "이 git 호스트에 저장된 자격 증명이 없습니다. 설정에서 토큰을 추가하거나, git이 이미 가지고 있는 자격 증명을 사용하도록 두세요."
+
#: src/components/GraphPanel.tsx
msgid "No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."
msgstr "연결이 끊긴 페이지가 없습니다. 들어오는 그래프 연결과 나가는 그래프 연결이 모두 없을 때만 페이지가 여기에 표시됩니다."
@@ -10394,6 +10444,10 @@ msgstr "여는 중…"
msgid "OpenKnowledge"
msgstr "OpenKnowledge"
+#: src/components/AuthModal.tsx
+msgid "OpenKnowledge can't sign in to GitHub for this project."
+msgstr "OpenKnowledge는 이 프로젝트에서 GitHub에 로그인할 수 없습니다."
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge checked {subject}"
msgstr "OpenKnowledge에서 {subject} 확인"
@@ -10406,10 +10460,6 @@ msgstr "OpenKnowledge에서 프로젝트 확인"
msgid "OpenKnowledge could not find this agent on this machine."
msgstr "OpenKnowledge가 이 컴퓨터에서 이 에이전트를 찾지 못했습니다."
-#: src/components/settings/AccountSection.tsx
-msgid "OpenKnowledge couldn't find a host name in this project's git remote, so it can't tell which GitHub server to sign in to."
-msgstr "OpenKnowledge가 이 프로젝트의 git 원격 주소에서 호스트 이름을 찾지 못해 어느 GitHub 서버에 로그인해야 할지 알 수 없습니다."
-
#: src/lib/worktree-create-error.ts
msgid "OpenKnowledge couldn't finish setting up this project. The worktree was created but not opened."
msgstr "OpenKnowledge가 이 프로젝트 설정을 완료하지 못했습니다. 워크트리는 생성되었지만 열리지 않았습니다."
@@ -10466,6 +10516,10 @@ msgstr "OpenKnowledge에서 문서 편집"
msgid "OpenKnowledge files were removed"
msgstr "OpenKnowledge 파일을 제거했습니다"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "OpenKnowledge에 이 호스트용으로 저장된 자격 증명이 없습니다. 설정에서 토큰을 추가하거나, git이 이미 가지고 있는 자격 증명을 사용하도록 두세요."
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge imported {source}"
msgstr "OpenKnowledge에서 {source} 가져오기"
@@ -10694,6 +10748,11 @@ msgstr "기타"
msgid "Other"
msgstr "기타"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Other Git hosts"
+msgstr "기타 Git 호스트"
+
#: src/components/settings/SharingSection.tsx
msgid "Other OK paths are tracked upstream:"
msgstr "다른 OK 경로는 upstream에서 추적됩니다:"
@@ -11628,6 +11687,14 @@ msgstr "다시 연결 필요"
msgid "Reconnect required to keep syncing."
msgstr "계속 동기화하려면 다시 연결해야 합니다."
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Add a token for this host in Settings, or replace the one stored."
+msgstr "계속 동기화하려면 다시 연결해야 합니다. 설정에서 이 호스트의 토큰을 추가하거나 저장된 토큰을 교체하세요."
+
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Check the SSH key or saved credentials git uses for this host."
+msgstr "계속 동기화하려면 다시 연결해야 합니다. git이 이 호스트에 사용하는 SSH 키나 저장된 자격 증명을 확인하세요."
+
#: src/presence/use-sync-toasts.ts
msgid "Reconnected"
msgstr "다시 연결됨"
@@ -14819,6 +14886,10 @@ msgstr "스킬 목록이 스키마와 일치하지 않습니다."
msgid "The source folder itself does not move."
msgstr "소스 폴더 자체는 이동하지 않습니다."
+#: src/components/SyncStatusBadge.tsx
+msgid "The stored token is missing the permissions this host needs to push."
+msgstr "저장된 토큰에 이 호스트가 푸시하는 데 필요한 권한이 없습니다."
+
#: src/components/TemplateProperties.tsx
msgid "The template's filename (without `.md`)."
msgstr "템플릿 파일 이름입니다(`.md` 제외)."
@@ -14877,6 +14948,10 @@ msgstr ".ok/local/config.yml의 terminal.shell 실행 파일을 찾을 수 없
msgid "The token needs the repo and read:user scopes."
msgstr "토큰에 repo 및 read:user 범위가 필요합니다."
+#: src/components/settings/AccountSection.tsx
+msgid "The username git sends with the token. Some hosts expect a fixed value: type <0>x-bitbucket-api-token-auth</0> for a Bitbucket API token, <1>x-token-auth</1> for a Bitbucket repository or workspace access token, or <2>oauth2</2> for GitLab. For Gitea, use your Gitea username. Azure DevOps accepts any value."
+msgstr "git이 토큰과 함께 보내는 사용자 이름입니다. 일부 호스트는 고정된 값을 요구합니다. Bitbucket API 토큰이면 <0>x-bitbucket-api-token-auth</0>, Bitbucket 저장소 또는 워크스페이스 액세스 토큰이면 <1>x-token-auth</1>, GitLab이면 <2>oauth2</2>를 입력하세요. Gitea는 Gitea 사용자 이름을 사용합니다. Azure DevOps는 아무 값이나 허용합니다."
+
#: src/lib/tab-session-restore-recovery-notice.ts
msgid "The workspace opened without it so the app could start."
msgstr "앱을 시작할 수 있도록 해당 문서 없이 워크스페이스를 열었습니다."
@@ -15405,10 +15480,6 @@ msgstr "이 프로젝트는 git 저장소가 아니므로 워크트리를 사용
msgid "This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."
msgstr "이 프로젝트는 이 컴퓨터에만 있습니다. 백업하고 다른 사람과 공유하려면 GitHub에 연결합니다."
-#: src/components/settings/AccountSection.tsx
-msgid "This project's git remote is on {host}, which OpenKnowledge doesn't recognize as a GitHub host. If {host} runs GitHub Enterprise Server, add it to GitHub Enterprise Server hosts below, then restart OpenKnowledge."
-msgstr "이 프로젝트의 git 원격은 {host}에 있으며, OpenKnowledge는 이를 GitHub 호스트로 인식하지 않습니다. {host}이(가) GitHub Enterprise Server를 실행한다면 아래의 GitHub Enterprise Server 호스트에 추가한 다음 OpenKnowledge를 다시 시작하세요."
-
#: src/components/DocumentErrorBoundary.tsx
msgid "This project's running server doesn't support live editing. Restart OpenKnowledge to fix."
msgstr "이 프로젝트에서 실행 중인 서버는 실시간 편집을 지원하지 않습니다. OpenKnowledge를 다시 시작하여 수정하세요."
@@ -15505,6 +15576,7 @@ msgid "This usually means one of:"
msgstr "일반적으로 다음 중 하나입니다:"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
msgid "This window can't store a token — open Settings from the main app window."
msgstr "이 창에는 토큰을 저장할 수 없습니다. 기본 앱 창에서 설정을 여세요."
@@ -15658,6 +15730,15 @@ msgstr "밑줄 서식을 전환합니다."
msgid "Toggles the pattern {0}/**"
msgstr "패턴 {0}/** 사용 설정 전환"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "token"
+msgstr "토큰"
+
+#: src/components/settings/AccountSection.tsx
+msgid "Token stored for {login} on {host}. To remove it, run <0>ok auth signout --host {host}</0>."
+msgstr "{host}의 {login}에 대한 토큰이 저장되었습니다. 제거하려면 <0>ok auth signout --host {host}</0>을(를) 실행하세요."
+
#: src/components/SkillBundlePreview.tsx
#: src/components/SkillProperties.tsx
msgid "tokens"
@@ -16244,6 +16325,10 @@ msgstr "사용자"
msgid "User plugins are personal to this device — turn them on or off here. Each enabled plugin gets its own page under Plugins in the settings sidebar."
msgstr "사용자 플러그인은 이 기기에만 적용됩니다. 여기에서 켜거나 끌 수 있습니다. 활성화된 각 플러그인은 설정 사이드바의 플러그인 아래에 전용 페이지가 생깁니다."
+#: src/components/settings/AccountSection.tsx
+msgid "Username"
+msgstr "사용자 이름"
+
#: src/components/settings/SearchSection.tsx
msgid "Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."
msgstr "OpenKnowledge 외부에서 관리되는 <0>OK_EMBEDDINGS_API_KEY</0> 환경 변수를 사용합니다."
diff --git a/packages/app/src/locales/pl/messages.json b/packages/app/src/locales/pl/messages.json
index e08f4d785..615efc3b4 100644
--- a/packages/app/src/locales/pl/messages.json
+++ b/packages/app/src/locales/pl/messages.json
@@ -57,6 +57,9 @@
],
"-l6jM7": ["Rozpocznij czat przyciskiem + albo uruchom agenta ze strony."],
"-lCAuQ": ["Ładowanie grafu"],
+ "-nA68n": [
+ "Dodaj token dostępowy dla serwera GitLab, Gitea, Bitbucket, Azure DevOps lub własnego serwera git. Bez tokenu git używa danych logowania, które ma już zapisane dla tego hosta; z tokenem OpenKnowledge używa zamiast nich tokenu."
+ ],
"-o5XAG": [
"Wysłane prywatnie do zespołu OpenKnowledge wraz z Twoją notatką i wersją aplikacji. Nigdy publikowane publicznie."
],
@@ -296,6 +299,7 @@
"1vczDE": ["Otwórz ", ["displayName"], " Desktop"],
"1vn0CI": ["Nieprawidłowa odpowiedź serwera"],
"1xui0Q": ["Nie udało się wczytać plików lokalnych"],
+ "1yHVE-": ["Dodawanie"],
"2-3Mlu": ["Nie udało się odpiąć ", ["name"]],
"20LVKb": ["Coś spoza tego czatu nakazało zatrzymanie procesu agenta (", ["signal"], ")."],
"2277Tu": ["Zwiń graf"],
@@ -563,6 +567,15 @@
"4mp6Tv": ["OpenKnowledge wypisało zainstalowane umiejętności"],
"4niEzY": ["Osadzenie HTML w piaskownicy — wpisz HTML i zobacz renderowany podgląd na żywo."],
"4nj6n8": ["/api/config zwrócił HTTP ", ["code"]],
+ "4p8Baj": [
+ "Zapisano token dla ",
+ ["login"],
+ " na ",
+ ["host"],
+ ". Aby go usunąć, uruchom <0>ok auth signout --host ",
+ ["host"],
+ "</0>."
+ ],
"4pDZ2N": [
"Usunięto \"",
["0"],
@@ -896,13 +909,6 @@
"7YRrJ9": [
"Dostępne w aplikacji desktopowej OpenKnowledge. W terminalu użyj<0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2>."
],
- "7_I248": [
- "Zdalne repozytorium gita tego projektu znajduje się na ",
- ["host"],
- ", którego OpenKnowledge nie rozpoznaje jako hosta GitHub. Jeśli ",
- ["host"],
- " działa pod GitHub Enterprise Server, dodaj go do listy hostów GitHub Enterprise Server poniżej, a następnie uruchom ponownie OpenKnowledge."
- ],
"7_bFEL": ["Przeciągnij ", ["patternText"], ", aby zmienić kolejność"],
"7a0YcF": ["Naciśnij <0>Spację</0> lub dotknij bloba, aby rozpocząć"],
"7aNk5D": ["OpenKnowledge edytowało ", ["subject"]],
@@ -935,6 +941,7 @@
"7lFX_h": ["Skieruj teraz"],
"7m3Ade": ["instalacje:"],
"7qRHf0": ["Zainstaluj dla Claude Chat i Cowork"],
+ "7sNhEz": ["Nazwa użytkownika"],
"7uBlRT": ["Skopiuj zaznaczony element drzewa plików, aby dało się go potem wkleić."],
"7vxWET": ["Podgląd pakietu niedostępny."],
"7wogIQ": [
@@ -1105,6 +1112,7 @@
"9bCiQ8": ["Żadnej stronie nie brakuje linków przychodzących w grafie."],
"9bG48P": ["Wysyłanie"],
"9clcD5": ["Otwórz dokumenty oznaczone #", ["chip"]],
+ "9djC8C": ["Połącz konto GitHub, aby przeglądać i publikować repozytoria GitHub."],
"9euN0m": [
[
"count",
@@ -1215,7 +1223,6 @@
" w ",
["parentLabel"]
],
- "AeXO77": ["Konto"],
"AgoIW4": [
["source"],
": ",
@@ -1228,6 +1235,7 @@
["detail"]
],
"AhoGwP": ["Konfiguruj integracje OpenKnowledge"],
+ "Ai2U7L": ["Host"],
"AiNMQ7": [
"Ten projekt znajduje się tylko na tym komputerze. Połącz go z GitHub, aby zrobić kopię zapasową i udostępnić go innym osobom."
],
@@ -1570,9 +1578,6 @@
"E2Mv-X": ["Kopiuj źródło"],
"E4XYYH": ["Włącz terminal dla tego projektu"],
"E5WeIy": ["Otwiera ponownie ostatnio zamkniętą kartę edytora."],
- "E6lrpp": [
- "Zarządzaj kontem GitHub, którego OpenKnowledge używa do przeglądania i synchronizowania twoich repozytoriów."
- ],
"E7BhZn": ["Pusta notatka"],
"E8NbNG": ["Nie udało się wczytać worktrees."],
"E91VZY": ["Otwórz w nowym oknie"],
@@ -1586,7 +1591,6 @@
"EEYbdt": ["Opublikuj"],
"EFfGAv": ["Ta wiadomość została już wysłana — Twoja edycja nie została zastosowana."],
"EHu0x2": ["Synchronizowanie"],
- "EJuO7B": ["Połącz konto GitHub, aby przeglądać i synchronizować swoje repozytoria."],
"EKwNEe": [
"Zapisane embeddingi należą do punktu końcowego i modelu, który je wygenerował, dlatego to odbudowuje indeks od zera."
],
@@ -1741,6 +1745,9 @@
"FgRAvd": ["Logi i informacje o systemie"],
"Fhp4Gn": ["Zobacz wtyczkę"],
"Fim5F3": ["embeddingi"],
+ "FioJgb": [
+ "Aby kontynuować synchronizację, wymagane jest ponowne połączenie. Dodaj token dla tego hosta w Ustawieniach albo zastąp zapisany."
+ ],
"FiyNln": ["Przejdź do zaznaczonego tekstu we właściwości"],
"FjkaiT": ["Pomniejsz"],
"Fjz6aJ": ["Wyślij do nowego czatu"],
@@ -2224,6 +2231,9 @@
"KvwJv8": ["Niektóre pliki nie są wymienione — drzewo robocze ma zbyt wiele zmian."],
"Kx881F": ["Przywrócono ", ["0"], "."],
"KziH2K": ["Szybko"],
+ "L-crEu": [
+ "git nie mógł uwierzytelnić się na tym hoście. Sprawdź klucz SSH lub zapisane dane logowania, których git używa dla tego hosta."
+ ],
"L-rMC9": ["Zresetuj do wartości domyślnej"],
"L1BQTH": [["0"], " nie jest jeszcze zainstalowany — otwieranie strony pobierania."],
"L1ZE3M": ["Statystyki dokumentu"],
@@ -2294,6 +2304,9 @@
"LRgZAt": [["owner"], "/", ["name"], " już istnieje"],
"LSuMte": [["0"], " z ", ["totalCount"]],
"LTeJuX": ["Przełącz tryb pełnoekranowy"],
+ "LVWA9A": [
+ "Uwierzytelnianie na tym hoście git nie powiodło się. Dodaj dla niego token w Ustawieniach albo zastąp zapisany."
+ ],
"LXIm4m": ["Okno kontekstu"],
"LXdWeS": ["Średni nagłówek sekcji."],
"LXfNU-": ["Nawigacja i podpowiedzi"],
@@ -2465,6 +2478,7 @@
"Mj8R8K": ["Nie udało się zainstalować umiejętności: ", ["0"]],
"MmDDWK": ["Ostatnio otwarte"],
"Mnavhe": ["Właściwości: ", ["propPanelDescriptorLabel"]],
+ "MpZRQy": ["Git"],
"MqQoV-": ["Opisz, co chcesz zbudować, zacznij od pustego pliku albo skorzystaj z szablonu."],
"MqsbfN": ["Włączyć podglądy zewnętrznych linków?"],
"MrUmCD": ["nieznana przyczyna niepowodzenia budowania"],
@@ -2650,6 +2664,9 @@
"OPOiKn": ["Zasady treści"],
"OTF92M": ["Etykieta <0>(opcjonalny tekst wyświetlany)</0>"],
"OVjNeX": ["Terminal ", ["0"]],
+ "OWs-8P": [
+ "Token dodany tutaj dotyczy tylko zdalnych repozytoriów HTTPS, a zdalne repozytorium tego projektu nie używa HTTPS."
+ ],
"OX2Neh": ["Kod w wierszu"],
"OXb_Df": ["Treść ustawień"],
"OXdGnd": ["Problemy"],
@@ -2773,6 +2790,7 @@
["filePath"],
". Wyjaśnij, co powinienem porównać w widoku konfliktów OpenKnowledge; tam wybiorę i zastosuję rozwiązanie."
],
+ "Q14Keq": ["Bitbucket"],
"Q1mtyd": ["Ukryj panel boczny"],
"Q5fqMz": ["Błąd połączenia — spróbuj ponownie"],
"Q6hhn8": ["Preferencje"],
@@ -3092,6 +3110,7 @@
"SkTkKV": [
"Agent nie zatrzymuje się. Wymuszone zatrzymanie zamyka ten czat i kończy działanie agenta."
],
+ "SkUcEr": ["Token dostępowy"],
"Ske_wc": [
"Wtyczki użytkownika są prywatne dla tego urządzenia — włączaj i wyłączaj je tutaj. Każda włączona wtyczka ma własną stronę w sekcji Wtyczki na pasku bocznym ustawień."
],
@@ -3501,9 +3520,6 @@
"XAyxsa": ["Przełącz zdalną gałąź"],
"XBBZnv": ["Cel linku „", ["shown"], "” nie wskazuje na istniejący dokument."],
"XBgr2S": ["Skopiuj tutaj"],
- "XBpH6-": [
- "OpenKnowledge nie znalazło nazwy hosta w zdalnym repozytorium git tego projektu, więc nie może określić, do jakiego serwera GitHub się zalogować."
- ],
"XDzAnp": ["Otwiera się w nowej karcie"],
"XF1kgP": ["Wszystko z ", ["source"], " jest już aktualne"],
"XGKy1z": ["Nie można wyświetlić obrazu"],
@@ -3990,6 +4006,9 @@
"arUUsK": ["Aktualizacje produktu"],
"ax9kie": ["Ustawienia podglądu linków jeszcze się nie wczytały — spróbuj za chwilę"],
"axQ1h6": ["Chcesz coś dodać? (opcjonalnie)"],
+ "azrR7I": [
+ "Nazwa użytkownika, którą git wysyła razem z tokenem. Niektóre hosty oczekują stałej wartości: wpisz <0>x-bitbucket-api-token-auth</0> dla tokenu API Bitbucket, <1>x-token-auth</1> dla tokenu dostępowego repozytorium lub obszaru roboczego Bitbucket albo <2>oauth2</2> dla GitLab. W Gitea użyj swojej nazwy użytkownika Gitea. Azure DevOps akceptuje dowolną wartość."
+ ],
"b18t0_": ["Zamknij widok różnic"],
"b1FDss": ["Przewiń na początek"],
"b2ezG_": ["Zachowano oba — „", ["0"], "” jest teraz osobną umiejętnością"],
@@ -4404,6 +4423,7 @@
"e8zRrb": ["Pokaż pliki"],
"e8zYa8": ["Nie udało się otworzyć ", ["shareBranch"], " w worktree. Spróbuj ponownie."],
"e9sHSO": ["Wróć do miejsca przerwania"],
+ "eAYJMv": ["token"],
"eBGWcy": [
"Narzędzia Open Knowledge są niedostępne, ponieważ folder projektu jest nieobecny, niedostępny lub się zmienił. Sprawdź jego lokalizację i uprawnienia, a następnie spróbuj ponownie."
],
@@ -5097,6 +5117,7 @@
"jZ_E5M": ["Pobieranie nie powiodło się — sprawdź logi serwera, aby poznać szczegóły."],
"j_Z6g7": ["Domyślnie współdzielone"],
"jbSG8V": ["Pokaż pliki (", ["sidebarShortcutLabel"], ")"],
+ "jbhCDS": ["Inne hosty Git"],
"jcEoUi": ["Przenieś do prawego panelu"],
"jdGUeI": ["Nie udało się utworzyć szablonu: ", ["error"]],
"jeCFV7": ["Przenieś do nowego panelu po prawej"],
@@ -5761,6 +5782,9 @@
]
],
"pd0UH2": ["Wyrównaj do prawej"],
+ "pd6t3G": [
+ "Zarządzaj kontami i tokenami dostępowymi, których OpenKnowledge używa do łączenia się z Twoimi hostami git."
+ ],
"peq20S": [
"Przeglądarka nie jest dostępna w tym czacie, ponieważ nie udało się jej uruchomić. Szczegóły znajdziesz w logu OpenKnowledge."
],
@@ -5897,6 +5921,7 @@
"qi17kj": ["Osadź żywą migawkę tablicy .excalidraw z tego obszaru roboczego."],
"qi1F96": ["Pokaż w Eksploratorze plików"],
"qiRoLb": ["Podsumuj wszystko, co zmieniłem w tym tygodniu"],
+ "qimTXH": ["OpenKnowledge nie może zalogować się do GitHub dla tego projektu."],
"qioCwA": ["Przejdź do strony ", ["pageNumber"]],
"qjHMHf": ["Nie udało się wyłączyć synchronizacji — ", ["detail"]],
"qkqG0b": ["Przyjmij wersję nadrzędną"],
@@ -5964,6 +5989,9 @@
"rVxu1k": ["Żadna strona nie linkuje jeszcze tutaj."],
"rXz97P": ["Lista numerowana elementów."],
"rZ9HZq": ["Do zrobienia"],
+ "rZFxkH": [
+ "Wpisz nazwę hosta, z którym łączy się git, z opcjonalnym :port, bez schematu i ścieżki, na przykład git.example.com."
+ ],
"rZVMkf": ["Aktywne pole zamiany w edytorze wizualnym"],
"radOpL": ["Obraz ", ["identity"], ". Przejdź do odnośnika."],
"rageVb": ["Niestandardowy HTML z panelem podglądu na żywo (izolowany iframe)."],
@@ -6197,6 +6225,9 @@
"tlGXxX": ["Auto (tylko Pull)"],
"tnG-m6": ["Synchronizacja automatyczna jest wstrzymana — zaloguj się, aby wznowić."],
"toyw51": ["Sterowanie diagramem Mermaid"],
+ "tpOnU9": [
+ "OpenKnowledge nie ma zapisanych danych logowania dla tego hosta. Dodaj token w Ustawieniach albo pozwól git użyć danych logowania, które już ma."
+ ],
"tqQBwN": ["Wszystkie skrypty są wyświetlane do przeglądu i nigdy nie są uruchamiane."],
"troubleshooting.claude-desktop.per-tool-approval": [
["agent"],
@@ -6389,6 +6420,7 @@
]
],
"ur2XSb": ["Edytor wizualny"],
+ "uraHF0": ["GitLab"],
"uuoHOU": ["Polecenie nie powiodło się."],
"uwzRx4": [
"Dostosuj rozmiar żądania indeksowania i limit czasu dla wolnych serwerów embeddingów lub o ograniczonej pamięci. W większości konfiguracji warto zostawić ustawienia domyślne."
@@ -6540,6 +6572,9 @@
"vy_VIN": [
"Śledzone w gicie — aktualizacje docierają przez Twoje repozytorium (pull lub CI), nie przez automatyczną aktualizację"
],
+ "w-Wt3H": [
+ "Aby kontynuować synchronizację, wymagane jest ponowne połączenie. Sprawdź klucz SSH lub zapisane dane logowania, których git używa dla tego hosta."
+ ],
"w0YVAE": ["Pokazuj węzły umiejętności"],
"w3tVpc": ["Brak linków. Dodaj linki wiki lub linki markdown, aby zbudować graf."],
"w3vFfL": ["Ukryj pliki"],
@@ -6666,7 +6701,6 @@
"x57cJf": ["Otwórz link"],
"xAlHfe": [["basename"], " — edytor tekstowy"],
"xBFg6z": ["Z wtyczki ", ["0"]],
- "xBjIs7": ["Logowanie do GitHub nie jest dostępne dla tego projektu"],
"xCJdfg": ["Wyczyść"],
"xCdTnb": ["Zamknij nową kartę"],
"xD4Xm2": ["Pobierz"],
@@ -6678,6 +6712,9 @@
"xG4tb6": ["Utracono połączenie z „", ["docName"], "”."],
"xG8Ish": ["Niezaplanowane"],
"xHGM4U": ["Ukryj podgląd HTML"],
+ "xJ7qrb": [
+ "Dla tego hosta git nie zapisano danych logowania. Dodaj token w Ustawieniach albo pozwól git użyć danych logowania, które już ma."
+ ],
"xK291b": ["Dwustronicowe (nieparzyste)"],
"xKDsGS": ["Przejdź do linii ", ["0"], " w ", ["1"]],
"xKcXG6": [
@@ -6794,6 +6831,7 @@
"yLwx9e": [
"Katalog nadrzędny jest dowiązaniem symbolicznym — odłącz sam folder, aby odzyskać ten."
],
+ "yLyiQV": ["Zapisany token nie ma uprawnień, których ten host wymaga do wypychania zmian."],
"yMgL_E": ["Nawigacja w polu wyszukiwania"],
"yOjRUV": ["Nie wykryto narzędzi AI. Zainstaluj jedno, aby używać tej umiejętności."],
"yQE2r9": ["Ładowanie"],
@@ -6921,6 +6959,7 @@
"zLak8b": ["Aktywuj nową kartę"],
"zMmwh4": ["Wybierz motyw lub stwórz własny."],
"zWZBPx": ["Typ się zmienił"],
+ "zXZJoN": ["Dodaj token"],
"zXj1rA": ["Szukaj według znaczenia"],
"zYp8Sr": [
"Znacznik <0>Zmodyfikowane</0> oznacza reguły, które twoja konfiguracja ustawia jawnie — bezpośrednio lub przez dziedziczenie w <1>extends</1>. Reguły bez znacznika zachowują swój stan domyślny."
diff --git a/packages/app/src/locales/pl/messages.po b/packages/app/src/locales/pl/messages.po
index 8e4e803b0..6c3347f8b 100644
--- a/packages/app/src/locales/pl/messages.po
+++ b/packages/app/src/locales/pl/messages.po
@@ -1548,6 +1548,10 @@ msgstr "Szablon o nazwie <0>{trimmedSlug}</0> już tutaj istnieje. Zapisanie utw
msgid "A title, description, tags — anything that describes this folder."
msgstr "Tytuł, opis, tagi — wszystko, co opisuje ten folder."
+#: src/components/settings/AccountSection.tsx
+msgid "A token added here only applies to HTTPS remotes, and this project's remote doesn't use HTTPS."
+msgstr "Token dodany tutaj dotyczy tylko zdalnych repozytoriów HTTPS, a zdalne repozytorium tego projektu nie używa HTTPS."
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "A worktree folder for {shareBranch} already exists."
msgstr "Folder worktree dla {shareBranch} już istnieje."
@@ -1600,9 +1604,8 @@ msgid "Accept their deletion"
msgstr "Akceptuj ich usunięcie"
#: src/components/settings/AccountSection.tsx
-#: src/components/settings/SettingsDialogShell.tsx
-msgid "Account"
-msgstr "Konto"
+msgid "Access token"
+msgstr "Token dostępowy"
#: src/components/TemplateRow.tsx
msgid "Actions for {label}"
@@ -1681,6 +1684,10 @@ msgstr "Dodaj właściwość"
msgid "Add a starter pack"
msgstr "Dodaj pakiet startowy"
+#: src/components/settings/AccountSection.tsx
+msgid "Add an access token for a GitLab, Gitea, Bitbucket, Azure DevOps or self-hosted git server. Without one, git uses the credentials it already has saved for that host; with one, OpenKnowledge uses the token instead."
+msgstr "Dodaj token dostępowy dla serwera GitLab, Gitea, Bitbucket, Azure DevOps lub własnego serwera git. Bez tokenu git używa danych logowania, które ma już zapisane dla tego hosta; z tokenem OpenKnowledge używa zamiast nich tokenu."
+
#: src/components/settings/OkignoreSection.tsx
msgid "Add another pattern"
msgstr "Dodaj kolejny wzorzec"
@@ -1810,6 +1817,12 @@ msgstr "Dodaj do słownika"
msgid "Add to prompt"
msgstr "Dodaj do promptu"
+#: src/components/settings/AccountSection.tsx
+#: src/components/SyncStatusBadge.tsx
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Add token"
+msgstr "Dodaj token"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Add value"
msgstr "Dodaj wartość"
@@ -1820,6 +1833,10 @@ msgstr "Dodaj wartość"
msgid "Added"
msgstr "Dodano"
+#: src/components/settings/AccountSection.tsx
+msgid "Adding"
+msgstr "Dodawanie"
+
#: src/components/settings/AgentConnectionDialogs.tsx
msgid "Adds a global OpenKnowledge MCP entry for this agent."
msgstr "Dodaje globalny wpis MCP OpenKnowledge dla tego agenta."
@@ -2335,6 +2352,10 @@ msgstr "Łączna wielkość załączników musi być mniejsza niż 3 MB."
msgid "Authenticated as {login}."
msgstr "Zalogowano jako {login}."
+#: src/components/SyncStatusBadge.tsx
+msgid "Authentication failed for this git host. Add a token for it in Settings, or replace the one stored."
+msgstr "Uwierzytelnianie na tym hoście git nie powiodło się. Dodaj dla niego token w Ustawieniach albo zastąp zapisany."
+
#: src/editor/slash-command/component-items.tsx
msgid "Authoritative content; mirrored verbatim everywhere it's referenced."
msgstr "Treść nadrzędna; kopiowana dosłownie wszędzie, gdzie jest przywoływana."
@@ -2536,6 +2557,11 @@ msgstr "Duży nagłówek sekcji."
msgid "Bird wiki"
msgstr "Wiki o ptakach"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "Bitbucket"
+msgstr "Bitbucket"
+
#: src/components/NewItemDialog.tsx
msgid "Blank note"
msgstr "Pusta notatka"
@@ -3605,8 +3631,8 @@ msgid "Connect"
msgstr "Połącz"
#: src/components/settings/AccountSection.tsx
-msgid "Connect a GitHub account to browse and sync your repositories."
-msgstr "Połącz konto GitHub, aby przeglądać i synchronizować swoje repozytoria."
+msgid "Connect a GitHub account to browse and publish GitHub repositories."
+msgstr "Połącz konto GitHub, aby przeglądać i publikować repozytoria GitHub."
#: src/components/settings/SyncSection.tsx
msgid "Connect an existing repository"
@@ -3698,6 +3724,7 @@ msgid "Connection dropped"
msgstr "Połączenie zostało zerwane"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Connection error — try again"
msgstr "Błąd połączenia — spróbuj ponownie"
@@ -5937,6 +5964,10 @@ msgstr "Wpisz liczbę całkowitą z zakresu od {minimum} do {maximum}."
msgid "Enter at least 3 characters to search by meaning."
msgstr "Wpisz co najmniej 3 znaki, aby wyszukiwać według znaczenia."
+#: src/components/settings/AccountSection.tsx
+msgid "Enter the host name git connects to, with an optional :port and no scheme or path, for example git.example.com."
+msgstr "Wpisz nazwę hosta, z którym łączy się git, z opcjonalnym :port, bez schematu i ścieżki, na przykład git.example.com."
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Enter the public origin your tunnel serves, for example https://notes.example.com"
msgstr "Wpisz publiczny origin, pod którym działa Twój tunel, np. https://notes.example.com"
@@ -6412,6 +6443,7 @@ msgid "Failed to start sign-in — try again"
msgstr "Nie udało się rozpocząć logowania — spróbuj ponownie"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Failed to store the token — try again"
msgstr "Nie udało się zapisać tokenu — spróbuj ponownie"
@@ -6885,6 +6917,11 @@ msgctxt "settings search keyword"
msgid "GHES"
msgstr "GHES"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Git"
+msgstr "Git"
+
#: src/components/ExploreSkills.tsx
msgid "Git & PRs"
msgstr "Git i PR-y"
@@ -6893,6 +6930,10 @@ msgstr "Git i PR-y"
msgid "Git can't track this folder — it's empty or contains only ignored files. The link won't work until you add a tracked document."
msgstr "Git nie może śledzić tego folderu — jest pusty lub zawiera tylko pliki ignorowane. Link nie będzie działać, dopóki nie dodasz śledzonego dokumentu."
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it."
+msgstr "git nie mógł uwierzytelnić się na tym hoście. Sprawdź klucz SSH lub zapisane dane logowania, których git używa dla tego hosta."
+
#: src/components/RecentProjectsMenu.tsx
msgid "Git has locked this worktree, but it can still be opened."
msgstr "Git zablokował ten worktree, ale nadal można go otworzyć."
@@ -6952,10 +6993,6 @@ msgstr "Hosty GitHub Enterprise Server"
msgid "GitHub sign-in is missing or expired. Reconnect to resume syncing."
msgstr "Logowanie do GitHub brakuje lub wygasło. Połącz ponownie, aby wznowić synchronizację."
-#: src/components/settings/AccountSection.tsx
-msgid "GitHub sign-in isn't available for this project"
-msgstr "Logowanie do GitHub nie jest dostępne dla tego projektu"
-
#: src/components/ImportSkillForm.tsx
msgid "GitHub, a git URL, or a local path."
msgstr "GitHub, adres URL git lub ścieżka lokalna."
@@ -6964,6 +7001,11 @@ msgstr "GitHub, adres URL git lub ścieżka lokalna."
msgid "github.com is always recognized, so it doesn't need to be added."
msgstr "github.com jest zawsze rozpoznawane, więc nie trzeba go dodawać."
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "GitLab"
+msgstr "GitLab"
+
#: src/components/settings/SavedThemesTiles.tsx
msgid "Give it a name before editing its colors."
msgstr "Nadaj mu nazwę, zanim zaczniesz edytować jego kolory."
@@ -7318,6 +7360,10 @@ msgstr "Poziomy pasek pigułek, poniżej aktywny panel; kliknij pigułkę, aby p
msgid "Horizontal rule that divides sections."
msgstr "Pozioma linia dzieląca sekcje."
+#: src/components/settings/AccountSection.tsx
+msgid "Host"
+msgstr "Host"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Hosting is on. The server is running on port {boundPort}. Reach it through your tunnel."
msgstr "Hosting jest włączony. Serwer działa na porcie {boundPort}. Uzyskaj do niego dostęp przez swój tunel."
@@ -8611,8 +8657,8 @@ msgid "Manage skill folders"
msgstr "Zarządzaj folderami umiejętności"
#: src/components/settings/AccountSection.tsx
-msgid "Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."
-msgstr "Zarządzaj kontem GitHub, którego OpenKnowledge używa do przeglądania i synchronizowania twoich repozytoriów."
+msgid "Manage the accounts and access tokens OpenKnowledge uses to connect to your git hosts."
+msgstr "Zarządzaj kontami i tokenami dostępowymi, których OpenKnowledge używa do łączenia się z Twoimi hostami git."
#: src/components/settings/AgentConnectionDialogs.tsx
#: src/components/settings/AgentConnectionsSection.tsx
@@ -9442,6 +9488,10 @@ msgstr "Brak zmian zawartości w tej wersji."
msgid "No content changes in this version"
msgstr "Brak zmian zawartości w tej wersji"
+#: src/components/SyncStatusBadge.tsx
+msgid "No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "Dla tego hosta git nie zapisano danych logowania. Dodaj token w Ustawieniach albo pozwól git użyć danych logowania, które już ma."
+
#: src/components/GraphPanel.tsx
msgid "No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."
msgstr "Brak odłączonych stron. Strony pojawiają się tutaj tylko wtedy, gdy nie mają ani krawędzi przychodzących, ani wychodzących w grafie."
@@ -10394,6 +10444,10 @@ msgstr "Otwieranie..."
msgid "OpenKnowledge"
msgstr "OpenKnowledge"
+#: src/components/AuthModal.tsx
+msgid "OpenKnowledge can't sign in to GitHub for this project."
+msgstr "OpenKnowledge nie może zalogować się do GitHub dla tego projektu."
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge checked {subject}"
msgstr "OpenKnowledge sprawdziło {subject}"
@@ -10406,10 +10460,6 @@ msgstr "OpenKnowledge sprawdziło projekt"
msgid "OpenKnowledge could not find this agent on this machine."
msgstr "OpenKnowledge nie znalazło tego agenta na tym komputerze."
-#: src/components/settings/AccountSection.tsx
-msgid "OpenKnowledge couldn't find a host name in this project's git remote, so it can't tell which GitHub server to sign in to."
-msgstr "OpenKnowledge nie znalazło nazwy hosta w zdalnym repozytorium git tego projektu, więc nie może określić, do jakiego serwera GitHub się zalogować."
-
#: src/lib/worktree-create-error.ts
msgid "OpenKnowledge couldn't finish setting up this project. The worktree was created but not opened."
msgstr "OpenKnowledge nie zakończyło przygotowywania tego projektu. Worktree zostało utworzone, ale nie otwarte."
@@ -10466,6 +10516,10 @@ msgstr "OpenKnowledge edytowało dokument"
msgid "OpenKnowledge files were removed"
msgstr "Pliki OpenKnowledge zostały usunięte"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "OpenKnowledge nie ma zapisanych danych logowania dla tego hosta. Dodaj token w Ustawieniach albo pozwól git użyć danych logowania, które już ma."
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge imported {source}"
msgstr "OpenKnowledge zaimportowało {source}"
@@ -10694,6 +10748,11 @@ msgstr "inne"
msgid "Other"
msgstr "Inne"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Other Git hosts"
+msgstr "Inne hosty Git"
+
#: src/components/settings/SharingSection.tsx
msgid "Other OK paths are tracked upstream:"
msgstr "Inne ścieżki OK są śledzone w zdalnym repozytorium:"
@@ -11628,6 +11687,14 @@ msgstr "Wymagane ponowne połączenie"
msgid "Reconnect required to keep syncing."
msgstr "Aby kontynuować synchronizację, wymagane jest ponowne połączenie."
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Add a token for this host in Settings, or replace the one stored."
+msgstr "Aby kontynuować synchronizację, wymagane jest ponowne połączenie. Dodaj token dla tego hosta w Ustawieniach albo zastąp zapisany."
+
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Check the SSH key or saved credentials git uses for this host."
+msgstr "Aby kontynuować synchronizację, wymagane jest ponowne połączenie. Sprawdź klucz SSH lub zapisane dane logowania, których git używa dla tego hosta."
+
#: src/presence/use-sync-toasts.ts
msgid "Reconnected"
msgstr "Połączono ponownie"
@@ -14819,6 +14886,10 @@ msgstr "Lista umiejętności nie jest zgodna ze swoim schematem."
msgid "The source folder itself does not move."
msgstr "Sam folder źródłowy nie jest przenoszony."
+#: src/components/SyncStatusBadge.tsx
+msgid "The stored token is missing the permissions this host needs to push."
+msgstr "Zapisany token nie ma uprawnień, których ten host wymaga do wypychania zmian."
+
#: src/components/TemplateProperties.tsx
msgid "The template's filename (without `.md`)."
msgstr "Nazwa pliku szablonu (bez `.md`)."
@@ -14877,6 +14948,10 @@ msgstr "Nie znaleziono pliku wykonywalnego terminal.shell w .ok/local/config.yml
msgid "The token needs the repo and read:user scopes."
msgstr "Token wymaga zakresów repo oraz read:user."
+#: src/components/settings/AccountSection.tsx
+msgid "The username git sends with the token. Some hosts expect a fixed value: type <0>x-bitbucket-api-token-auth</0> for a Bitbucket API token, <1>x-token-auth</1> for a Bitbucket repository or workspace access token, or <2>oauth2</2> for GitLab. For Gitea, use your Gitea username. Azure DevOps accepts any value."
+msgstr "Nazwa użytkownika, którą git wysyła razem z tokenem. Niektóre hosty oczekują stałej wartości: wpisz <0>x-bitbucket-api-token-auth</0> dla tokenu API Bitbucket, <1>x-token-auth</1> dla tokenu dostępowego repozytorium lub obszaru roboczego Bitbucket albo <2>oauth2</2> dla GitLab. W Gitea użyj swojej nazwy użytkownika Gitea. Azure DevOps akceptuje dowolną wartość."
+
#: src/lib/tab-session-restore-recovery-notice.ts
msgid "The workspace opened without it so the app could start."
msgstr "Obszar roboczy otworzył się bez niego, aby aplikacja mogła się uruchomić."
@@ -15405,10 +15480,6 @@ msgstr "Ten projekt nie jest repozytorium gita, więc worktree nie są dostępne
msgid "This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."
msgstr "Ten projekt znajduje się tylko na tym komputerze. Połącz go z GitHub, aby zrobić kopię zapasową i udostępnić go innym osobom."
-#: src/components/settings/AccountSection.tsx
-msgid "This project's git remote is on {host}, which OpenKnowledge doesn't recognize as a GitHub host. If {host} runs GitHub Enterprise Server, add it to GitHub Enterprise Server hosts below, then restart OpenKnowledge."
-msgstr "Zdalne repozytorium gita tego projektu znajduje się na {host}, którego OpenKnowledge nie rozpoznaje jako hosta GitHub. Jeśli {host} działa pod GitHub Enterprise Server, dodaj go do listy hostów GitHub Enterprise Server poniżej, a następnie uruchom ponownie OpenKnowledge."
-
#: src/components/DocumentErrorBoundary.tsx
msgid "This project's running server doesn't support live editing. Restart OpenKnowledge to fix."
msgstr "Uruchomiony serwer tego projektu nie obsługuje edycji na żywo. Uruchom ponownie OpenKnowledge, aby to naprawić."
@@ -15505,6 +15576,7 @@ msgid "This usually means one of:"
msgstr "Zwykle oznacza to jedno z:"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
msgid "This window can't store a token — open Settings from the main app window."
msgstr "To okno nie może przechowywać tokena — otwórz Ustawienia z głównego okna aplikacji."
@@ -15658,6 +15730,15 @@ msgstr "Przełącz formatowanie podkreślenia."
msgid "Toggles the pattern {0}/**"
msgstr "Przełącza wzorzec {0}/**"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "token"
+msgstr "token"
+
+#: src/components/settings/AccountSection.tsx
+msgid "Token stored for {login} on {host}. To remove it, run <0>ok auth signout --host {host}</0>."
+msgstr "Zapisano token dla {login} na {host}. Aby go usunąć, uruchom <0>ok auth signout --host {host}</0>."
+
#: src/components/SkillBundlePreview.tsx
#: src/components/SkillProperties.tsx
msgid "tokens"
@@ -16244,6 +16325,10 @@ msgstr "Użytkownik"
msgid "User plugins are personal to this device — turn them on or off here. Each enabled plugin gets its own page under Plugins in the settings sidebar."
msgstr "Wtyczki użytkownika są prywatne dla tego urządzenia — włączaj i wyłączaj je tutaj. Każda włączona wtyczka ma własną stronę w sekcji Wtyczki na pasku bocznym ustawień."
+#: src/components/settings/AccountSection.tsx
+msgid "Username"
+msgstr "Nazwa użytkownika"
+
#: src/components/settings/SearchSection.tsx
msgid "Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."
msgstr "Z użyciem zmiennej środowiskowej <0>OK_EMBEDDINGS_API_KEY</0> (zarządzanej poza OpenKnowledge)."
diff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.json
index 4fa4d6beb..cadb1b863 100644
--- a/packages/app/src/locales/pseudo/messages.json
+++ b/packages/app/src/locales/pseudo/messages.json
@@ -41,6 +41,9 @@
],
"-l6jM7": ["Śţàŕţ à ćĥàţ ŵĩţĥ ţĥē + ƀũţţōń, ōŕ ĺàũńćĥ àń àĝēńţ ƒŕōḿ à ƥàĝē."],
"-lCAuQ": ["Ĺōàďĩńĝ ĝŕàƥĥ"],
+ "-nA68n": [
+ "Àďď àń àććēśś ţōķēń ƒōŕ à ĜĩţĹàƀ, Ĝĩţēà, ßĩţƀũćķēţ, Àźũŕē ĎēvŌƥś ōŕ śēĺƒ-ĥōśţēď ĝĩţ śēŕvēŕ. Ŵĩţĥōũţ ōńē, ĝĩţ ũśēś ţĥē ćŕēďēńţĩàĺś ĩţ àĺŕēàďŷ ĥàś śàvēď ƒōŕ ţĥàţ ĥōśţ; ŵĩţĥ ōńē, ŌƥēńĶńōŵĺēďĝē ũśēś ţĥē ţōķēń ĩńśţēàď."
+ ],
"-o5XAG": [
"Śēńţ ƥŕĩvàţēĺŷ ţō ţĥē ŌƥēńĶńōŵĺēďĝē ţēàḿ, àĺōńĝ ŵĩţĥ ŷōũŕ ńōţē àńď àƥƥ vēŕśĩōń. Ńēvēŕ ƥōśţēď ƥũƀĺĩćĺŷ."
],
@@ -241,6 +244,7 @@
"1vczDE": ["Ōƥēń ", ["displayName"], " Ďēśķţōƥ"],
"1vn0CI": ["Ĩńvàĺĩď śēŕvēŕ ŕēśƥōńśē"],
"1xui0Q": ["Ƒàĩĺēď ţō ĺōàď ĺōćàĺ ƒĩĺēś"],
+ "1yHVE-": ["Àďďĩńĝ"],
"2-3Mlu": ["Ćōũĺďń'ţ ũńƥĩń ", ["name"]],
"20LVKb": [
"Ţĥē àĝēńţ ƥŕōćēśś ŵàś ţōĺď ţō śţōƥ (",
@@ -474,6 +478,15 @@
"4mp6Tv": ["ŌƥēńĶńōŵĺēďĝē ĺĩśţēď ţĥē ĩńśţàĺĺēď śķĩĺĺś"],
"4niEzY": ["Śàńďƀōxēď ĤŢḾĹ ēḿƀēď — ŵŕĩţē ĤŢḾĹ, śēē ţĥē ŕēńďēŕēď ƥŕēvĩēŵ ĺĩvē."],
"4nj6n8": ["/àƥĩ/ćōńƒĩĝ ŕēţũŕńēď ĤŢŢƤ ", ["code"]],
+ "4p8Baj": [
+ "Ţōķēń śţōŕēď ƒōŕ ",
+ ["login"],
+ " ōń ",
+ ["host"],
+ ". Ţō ŕēḿōvē ĩţ, ŕũń <0>ōķ àũţĥ śĩĝńōũţ --ĥōśţ ",
+ ["host"],
+ "</0>."
+ ],
"4pDZ2N": ["Ŕēḿōvēď \"", ["0"], "\" ƒŕōḿ ēvēŕŷ ōţĥēŕ ĺōćàţĩōń — ĩţś śōũŕćē ƒōĺďēŕ śţĩĺĺ ĺōàďś"],
"4r6p_B": [
"Ţĥĩś ćōḿḿàńď ćōńţàĩńś ĥĩďďēń ćĥàŕàćţēŕś ţĥàţ ćàń ḿàķē ĩţ ĺōōķ ďĩƒƒēŕēńţ ƒŕōḿ ŵĥàţ ŕũńś. Ţĥēŷ àŕē śĥōŵń ĥēŕē àś ⟨Ũ+…⟩."
@@ -727,13 +740,6 @@
"7YRrJ9": [
"Àvàĩĺàƀĺē ĩń ţĥē ŌƥēńĶńōŵĺēďĝē ďēśķţōƥ àƥƥ. Ƒŕōḿ à ţēŕḿĩńàĺ, ũśē<0> ōķ ćōńƒĩĝ-śĥàŕĩńĝ śţàţũś</0> / <1>śĥàŕē</1> / <2>ũńśĥàŕē</2>."
],
- "7_I248": [
- "Ţĥĩś ƥŕōĴēćţ'ś ĝĩţ ŕēḿōţē ĩś ōń ",
- ["host"],
- ", ŵĥĩćĥ ŌƥēńĶńōŵĺēďĝē ďōēśń'ţ ŕēćōĝńĩźē àś à ĜĩţĤũƀ ĥōśţ. Ĩƒ ",
- ["host"],
- " ŕũńś ĜĩţĤũƀ Ēńţēŕƥŕĩśē Śēŕvēŕ, àďď ĩţ ţō ĜĩţĤũƀ Ēńţēŕƥŕĩśē Śēŕvēŕ ĥōśţś ƀēĺōŵ, ţĥēń ŕēśţàŕţ ŌƥēńĶńōŵĺēďĝē."
- ],
"7_bFEL": ["Ďŕàĝ ", ["patternText"], " ţō ŕēōŕďēŕ"],
"7a0YcF": ["Ƥŕēśś <0>Śƥàćē</0> ōŕ ţàƥ ţĥē ƀĺōƀ ţō śţàŕţ"],
"7aNk5D": ["ŌƥēńĶńōŵĺēďĝē ēďĩţēď ", ["subject"]],
@@ -766,6 +772,7 @@
"7lFX_h": ["Śţēēŕ ńōŵ"],
"7m3Ade": ["ĩńśţàĺĺś:"],
"7qRHf0": ["Ĩńśţàĺĺ ƒōŕ Ćĺàũďē Ćĥàţ & Ćōŵōŕķ"],
+ "7sNhEz": ["Ũśēŕńàḿē"],
"7uBlRT": ["Ćōƥŷ ţĥē ƒōćũśēď ƒĩĺē-ţŕēē ĩţēḿ śō Ƥàśţē ćàń ďũƥĺĩćàţē ĩţ."],
"7vxWET": ["Ƥàćķ ƥŕēvĩēŵ ũńàvàĩĺàƀĺē."],
"7wogIQ": [["0", "plural", { "one": ["Ƥĺũĝĩń"], "other": ["Ƥĺũĝĩńś"] }]],
@@ -911,6 +918,7 @@
"9bCiQ8": ["Ńō ƥàĝēś àŕē ḿĩśśĩńĝ ĩńćōḿĩńĝ ĝŕàƥĥ ĺĩńķś."],
"9bG48P": ["Śēńďĩńĝ"],
"9clcD5": ["Ōƥēń ďōćũḿēńţś ţàĝĝēď #", ["chip"]],
+ "9djC8C": ["Ćōńńēćţ à ĜĩţĤũƀ àććōũńţ ţō ƀŕōŵśē àńď ƥũƀĺĩśĥ ĜĩţĤũƀ ŕēƥōśĩţōŕĩēś."],
"9euN0m": [
[
"count",
@@ -1011,7 +1019,6 @@
" ĩń ",
["parentLabel"]
],
- "AeXO77": ["Àććōũńţ"],
"AgoIW4": [
["source"],
": ",
@@ -1024,6 +1031,7 @@
["detail"]
],
"AhoGwP": ["Śēţ ũƥ ŌƥēńĶńōŵĺēďĝē ĩńţēĝŕàţĩōńś"],
+ "Ai2U7L": ["Ĥōśţ"],
"AiNMQ7": [
"Ţĥĩś ƥŕōĴēćţ ĺĩvēś ōńĺŷ ōń ţĥĩś ćōḿƥũţēŕ. Ćōńńēćţ ĩţ ţō ĜĩţĤũƀ ţō ƀàćķ ĩţ ũƥ àńď śĥàŕē ĩţ ŵĩţĥ ōţĥēŕ ƥēōƥĺē."
],
@@ -1306,9 +1314,6 @@
"E2Mv-X": ["Ćōƥŷ śōũŕćē"],
"E4XYYH": ["Ēńàƀĺē ţēŕḿĩńàĺ ƒōŕ ţĥĩś ƥŕōĴēćţ"],
"E5WeIy": ["Ŕēōƥēń ţĥē ḿōśţ ŕēćēńţĺŷ ćĺōśēď ēďĩţōŕ ţàƀ."],
- "E6lrpp": [
- "Ḿàńàĝē ţĥē ĜĩţĤũƀ àććōũńţ ŌƥēńĶńōŵĺēďĝē ũśēś ţō ƀŕōŵśē àńď śŷńć ŷōũŕ ŕēƥōśĩţōŕĩēś."
- ],
"E7BhZn": ["ßĺàńķ ńōţē"],
"E8NbNG": ["Ćōũĺďń'ţ ĺōàď ŵōŕķţŕēēś."],
"E91VZY": ["Ōƥēń ĩń Ńēŵ Ŵĩńďōŵ"],
@@ -1322,7 +1327,6 @@
"EEYbdt": ["Ƥũƀĺĩśĥ"],
"EFfGAv": ["Ţĥàţ ḿēśśàĝē àĺŕēàďŷ ŵēńţ ōũţ — ŷōũŕ ēďĩţ ŵàśń'ţ àƥƥĺĩēď."],
"EHu0x2": ["Śŷńćĩńĝ"],
- "EJuO7B": ["Ćōńńēćţ à ĜĩţĤũƀ àććōũńţ ţō ƀŕōŵśē àńď śŷńć ŷōũŕ ŕēƥōśĩţōŕĩēś."],
"EKwNEe": [
"Ćàćĥēď ēḿƀēďďĩńĝś ƀēĺōńĝ ţō ţĥē ēńďƥōĩńţ àńď ḿōďēĺ ţĥàţ ƥŕōďũćēď ţĥēḿ, śō ţĥĩś ŕēƀũĩĺďś ţĥē ĩńďēx ƒŕōḿ śćŕàţćĥ."
],
@@ -1473,6 +1477,9 @@
"FgRAvd": ["Ĺōĝś & śŷśţēḿ ĩńƒō"],
"Fhp4Gn": ["Vĩēŵ ƥĺũĝĩń"],
"Fim5F3": ["ēḿƀēďďĩńĝś"],
+ "FioJgb": [
+ "Ŕēćōńńēćţ ŕēǫũĩŕēď ţō ķēēƥ śŷńćĩńĝ. Àďď à ţōķēń ƒōŕ ţĥĩś ĥōśţ ĩń Śēţţĩńĝś, ōŕ ŕēƥĺàćē ţĥē ōńē śţōŕēď."
+ ],
"FiyNln": ["ĵũḿƥ ţō śēĺēćţēď ţēxţ ĩń ƥŕōƥēŕţŷ"],
"FjkaiT": ["Źōōḿ ōũţ"],
"Fjz6aJ": ["Śēńď ţō à ńēŵ ćĥàţ"],
@@ -1889,6 +1896,9 @@
"KvwJv8": ["Śōḿē ƒĩĺēś àŕē ńōţ ĺĩśţēď — ţĥē ŵōŕķĩńĝ ţŕēē ĥàś ţōō ḿàńŷ ćĥàńĝēś."],
"Kx881F": ["Ŕēśţōŕēď ", ["0"], "."],
"KziH2K": ["Ƒàśţ"],
+ "L-crEu": [
+ "Ĝĩţ ćōũĺďń'ţ àũţĥēńţĩćàţē ŵĩţĥ ţĥĩś ĥōśţ. Ćĥēćķ ţĥē ŚŚĤ ķēŷ ōŕ śàvēď ćŕēďēńţĩàĺś ĝĩţ ũśēś ƒōŕ ĩţ."
+ ],
"L-rMC9": ["Ŕēśēţ ţō ďēƒàũĺţ"],
"L1BQTH": [["0"], " ĩśń'ţ ĩńśţàĺĺēď ŷēţ — ōƥēńĩńĝ ĩţś ďōŵńĺōàď ƥàĝē."],
"L1ZE3M": ["Ďōćũḿēńţ śţàţĩśţĩćś"],
@@ -1944,6 +1954,9 @@
"LRgZAt": [["owner"], "/", ["name"], " àĺŕēàďŷ ēxĩśţś"],
"LSuMte": [["0"], " ōƒ ", ["totalCount"]],
"LTeJuX": ["Ţōĝĝĺē Ƒũĺĺ Śćŕēēń"],
+ "LVWA9A": [
+ "Àũţĥēńţĩćàţĩōń ƒàĩĺēď ƒōŕ ţĥĩś ĝĩţ ĥōśţ. Àďď à ţōķēń ƒōŕ ĩţ ĩń Śēţţĩńĝś, ōŕ ŕēƥĺàćē ţĥē ōńē śţōŕēď."
+ ],
"LXIm4m": ["Ćōńţēxţ ŵĩńďōŵ"],
"LXdWeS": ["Ḿēďĩũḿ śēćţĩōń ĥēàďĩńĝ."],
"LXfNU-": ["Ńàvĩĝàţĩōń àńď śũĝĝēśţĩōńś"],
@@ -2076,6 +2089,7 @@
"Mj8R8K": ["Ćōũĺďń'ţ ĩńśţàĺĺ śķĩĺĺ: ", ["0"]],
"MmDDWK": ["Ŕēćēńţĺŷ ōƥēńēď"],
"Mnavhe": [["propPanelDescriptorLabel"], " Ƥŕōƥēŕţĩēś"],
+ "MpZRQy": ["Ĝĩţ"],
"MqQoV-": ["Ďēśćŕĩƀē ŵĥàţ ŷōũ ŵàńţ ţō ƀũĩĺď, śţàŕţ à ƀĺàńķ ƒĩĺē, ōŕ śćàƒƒōĺď ƒŕōḿ à ţēḿƥĺàţē."],
"MqsbfN": ["Ţũŕń ōń ēxţēŕńàĺ ĺĩńķ ƥŕēvĩēŵś?"],
"MrUmCD": ["ũńķńōŵń ƀũĩĺď ƒàĩĺũŕē"],
@@ -2247,6 +2261,9 @@
"OPOiKn": ["Ćōńţēńţ ŕũĺēś"],
"OTF92M": ["Ĺàƀēĺ <0>(ōƥţĩōńàĺ ďĩśƥĺàŷ ţēxţ)</0>"],
"OVjNeX": ["Ţēŕḿĩńàĺ ", ["0"]],
+ "OWs-8P": [
+ "À ţōķēń àďďēď ĥēŕē ōńĺŷ àƥƥĺĩēś ţō ĤŢŢƤŚ ŕēḿōţēś, àńď ţĥĩś ƥŕōĴēćţ'ś ŕēḿōţē ďōēśń'ţ ũśē ĤŢŢƤŚ."
+ ],
"OX2Neh": ["Ĩńĺĩńē ćōďē"],
"OXb_Df": ["Śēţţĩńĝś ćōńţēńţ"],
"OXdGnd": ["Ƥŕōƀĺēḿś"],
@@ -2364,6 +2381,7 @@
["filePath"],
". Ēxƥĺàĩń ŵĥàţ Ĩ śĥōũĺď ćōḿƥàŕē ĩń ţĥē ŌƥēńĶńōŵĺēďĝē Ćōńƒĺĩćţ vĩēŵ; Ĩ ŵĩĺĺ ćĥōōśē àńď àƥƥĺŷ ţĥē ŕēśōĺũţĩōń ţĥēŕē."
],
+ "Q14Keq": ["ßĩţƀũćķēţ"],
"Q1mtyd": ["Ĥĩďē śĩďēƀàŕ"],
"Q5fqMz": ["Ćōńńēćţĩōń ēŕŕōŕ — ţŕŷ àĝàĩń"],
"Q6hhn8": ["Ƥŕēƒēŕēńćēś"],
@@ -2632,6 +2650,7 @@
"SiUUCS": ["Ńēxţ ḿàţćĥ"],
"SkMZlS": ["Ćōũĺďń'ţ ŕēḿōvē <0>", ["targetGitPath"], "</0>: ", ["removeGitError"]],
"SkTkKV": ["Ţĥē àĝēńţ ĩśń'ţ śţōƥƥĩńĝ. Ƒōŕćē śţōƥ ćĺōśēś ţĥĩś ćĥàţ àńď ǫũĩţś ţĥē àĝēńţ."],
+ "SkUcEr": ["Àććēśś ţōķēń"],
"Ske_wc": [
"Ũśēŕ ƥĺũĝĩńś àŕē ƥēŕśōńàĺ ţō ţĥĩś ďēvĩćē — ţũŕń ţĥēḿ ōń ōŕ ōƒƒ ĥēŕē. Ēàćĥ ēńàƀĺēď ƥĺũĝĩń ĝēţś ĩţś ōŵń ƥàĝē ũńďēŕ Ƥĺũĝĩńś ĩń ţĥē śēţţĩńĝś śĩďēƀàŕ."
],
@@ -2947,9 +2966,6 @@
"XAyxsa": ["Ćĥēćķ ōũţ ŕēḿōţē ƀŕàńćĥ"],
"XBBZnv": ["Ĺĩńķ ţàŕĝēţ \"", ["shown"], "\" ďōēś ńōţ ŕēśōĺvē ţō àń ēxĩśţĩńĝ ďōćũḿēńţ."],
"XBgr2S": ["Ćōƥŷ ĩń"],
- "XBpH6-": [
- "ŌƥēńĶńōŵĺēďĝē ćōũĺďń'ţ ƒĩńď à ĥōśţ ńàḿē ĩń ţĥĩś ƥŕōĴēćţ'ś ĝĩţ ŕēḿōţē, śō ĩţ ćàń'ţ ţēĺĺ ŵĥĩćĥ ĜĩţĤũƀ śēŕvēŕ ţō śĩĝń ĩń ţō."
- ],
"XDzAnp": ["Ōƥēńś ĩń à ńēŵ ţàƀ"],
"XF1kgP": ["Ēvēŕŷţĥĩńĝ ƒŕōḿ ", ["source"], " ĩś àĺŕēàďŷ ũƥ ţō ďàţē"],
"XGKy1z": ["Ĩḿàĝē ćōũĺďń'ţ ƀē ďĩśƥĺàŷēď"],
@@ -3388,6 +3404,9 @@
"arUUsK": ["Ƥŕōďũćţ ũƥďàţēś"],
"ax9kie": ["Ĺĩńķ ƥŕēvĩēŵ śēţţĩńĝś ńōţ ŷēţ ĺōàďēď — ţŕŷ àĝàĩń ĩń à ḿōḿēńţ"],
"axQ1h6": ["Àńŷţĥĩńĝ ŷōũ'ď ĺĩķē ţō àďď? (ōƥţĩōńàĺ)"],
+ "azrR7I": [
+ "Ţĥē ũśēŕńàḿē ĝĩţ śēńďś ŵĩţĥ ţĥē ţōķēń. Śōḿē ĥōśţś ēxƥēćţ à ƒĩxēď vàĺũē: ţŷƥē <0>x-ƀĩţƀũćķēţ-àƥĩ-ţōķēń-àũţĥ</0> ƒōŕ à ßĩţƀũćķēţ ÀƤĨ ţōķēń, <1>x-ţōķēń-àũţĥ</1> ƒōŕ à ßĩţƀũćķēţ ŕēƥōśĩţōŕŷ ōŕ ŵōŕķśƥàćē àććēśś ţōķēń, ōŕ <2>ōàũţĥ2</2> ƒōŕ ĜĩţĹàƀ. Ƒōŕ Ĝĩţēà, ũśē ŷōũŕ Ĝĩţēà ũśēŕńàḿē. Àźũŕē ĎēvŌƥś àććēƥţś àńŷ vàĺũē."
+ ],
"b18t0_": ["Ćĺōśē ďĩƒƒ"],
"b1FDss": ["Śćŕōĺĺ ţō śţàŕţ"],
"b2ezG_": ["Ķēƥţ ƀōţĥ — \"", ["0"], "\" ĩś ĩţś ōŵń śķĩĺĺ ńōŵ"],
@@ -3722,6 +3741,7 @@
"e8zRrb": ["Śĥōŵ Ƒĩĺēś"],
"e8zYa8": ["Ćōũĺď ńōţ ōƥēń ", ["shareBranch"], " ĩń à ŵōŕķţŕēē. Ţŕŷ àĝàĩń."],
"e9sHSO": ["Ƥĩćķ ũƥ ŵĥēŕē ŷōũ ĺēƒţ ōƒƒ"],
+ "eAYJMv": ["ţōķēń"],
"eBGWcy": [
"Ōƥēń Ķńōŵĺēďĝē ţōōĺś àŕē ũńàvàĩĺàƀĺē ƀēćàũśē ţĥē ƥŕōĴēćţ ƒōĺďēŕ ĩś ḿĩśśĩńĝ, ĩńàććēśśĩƀĺē, ōŕ ĥàś ćĥàńĝēď. Ćĥēćķ ĩţś ĺōćàţĩōń àńď ƥēŕḿĩśśĩōńś, ţĥēń ŕēţŕŷ."
],
@@ -4301,6 +4321,7 @@
"jZ_E5M": ["Ƒēţćĥ ƒàĩĺēď — ćĥēćķ ţĥē śēŕvēŕ ĺōĝś ƒōŕ ďēţàĩĺś."],
"j_Z6g7": ["Śĥàŕēď ďēƒàũĺţ"],
"jbSG8V": ["Śĥōŵ Ƒĩĺēś (", ["sidebarShortcutLabel"], ")"],
+ "jbhCDS": ["Ōţĥēŕ Ĝĩţ ĥōśţś"],
"jcEoUi": ["Ḿōvē ţō ŕĩĝĥţ ƥàńēĺ"],
"jdGUeI": ["Ćōũĺďń'ţ ćŕēàţē ţēḿƥĺàţē: ", ["error"]],
"jeCFV7": ["Ḿōvē ţō ńēŵ ƥàńē ŕĩĝĥţ"],
@@ -4874,6 +4895,9 @@
"pckX1A": [["0", "plural", { "one": ["#", " ũśē"], "other": ["#", " ũśēś"] }]],
"pcqlQu": [["0", "plural", { "one": ["Ƒōĺďēŕ"], "other": ["Ƒōĺďēŕś"] }]],
"pd0UH2": ["Àĺĩĝń ŕĩĝĥţ"],
+ "pd6t3G": [
+ "Ḿàńàĝē ţĥē àććōũńţś àńď àććēśś ţōķēńś ŌƥēńĶńōŵĺēďĝē ũśēś ţō ćōńńēćţ ţō ŷōũŕ ĝĩţ ĥōśţś."
+ ],
"peq20S": [
"Ţĥē ƀŕōŵśēŕ ĩśń'ţ àvàĩĺàƀĺē ĩń ţĥĩś ćĥàţ ƀēćàũśē ĩţ ćōũĺďń'ţ ƀē śēţ ũƥ. ŌƥēńĶńōŵĺēďĝē'ś ĺōĝ ĥàś ţĥē ďēţàĩĺś."
],
@@ -4985,6 +5009,7 @@
"qi17kj": ["Ēḿƀēď à ĺĩvē śńàƥśĥōţ ōƒ àń .ēxćàĺĩďŕàŵ ƀōàŕď ƒŕōḿ ţĥĩś ŵōŕķśƥàćē."],
"qi1F96": ["Ŕēvēàĺ ĩń Ƒĩĺē Ēxƥĺōŕēŕ"],
"qiRoLb": ["Śũḿḿàŕĩźē ēvēŕŷţĥĩńĝ Ĩ ćĥàńĝēď ţĥĩś ŵēēķ"],
+ "qimTXH": ["ŌƥēńĶńōŵĺēďĝē ćàń'ţ śĩĝń ĩń ţō ĜĩţĤũƀ ƒōŕ ţĥĩś ƥŕōĴēćţ."],
"qioCwA": ["ĵũḿƥ ţō ƥàĝē ", ["pageNumber"]],
"qjHMHf": ["Ƒàĩĺēď ţō ďĩśàƀĺē śŷńć — ", ["detail"]],
"qkqG0b": ["Ţàķē ũƥśţŕēàḿ"],
@@ -5045,6 +5070,9 @@
"rVxu1k": ["Ńō ƥàĝēś ĺĩńķ ĥēŕē ŷēţ."],
"rXz97P": ["Ńũḿƀēŕēď ĺĩśţ ōƒ ĩţēḿś."],
"rZ9HZq": ["Ţō ďō"],
+ "rZFxkH": [
+ "Ēńţēŕ ţĥē ĥōśţ ńàḿē ĝĩţ ćōńńēćţś ţō, ŵĩţĥ àń ōƥţĩōńàĺ :ƥōŕţ àńď ńō śćĥēḿē ōŕ ƥàţĥ, ƒōŕ ēxàḿƥĺē ĝĩţ.ēxàḿƥĺē.ćōḿ."
+ ],
"rZVMkf": ["Vĩśũàĺ ēďĩţōŕ ŕēƥĺàćē ĩńƥũţ ƒōćũśēď"],
"radOpL": ["Ĩḿàĝē ", ["identity"], ". Ĝō ţō ŕēƒēŕēńćē."],
"rageVb": ["Ćũśţōḿ ĤŢḾĹ ŵĩţĥ à ĺĩvē ƥŕēvĩēŵ ƥàńē (śàńďƀōxēď ĩƒŕàḿē)."],
@@ -5256,6 +5284,9 @@
"tlGXxX": ["Àũţō (Ƥũĺĺ ōńĺŷ)"],
"tnG-m6": ["Àũţō-śŷńć ĩś ƥàũśēď — śĩĝń ĩń ţō ŕēśũḿē."],
"toyw51": ["Ḿēŕḿàĩď ďĩàĝŕàḿ ćōńţŕōĺś"],
+ "tpOnU9": [
+ "ŌƥēńĶńōŵĺēďĝē ĥàś ńō ćŕēďēńţĩàĺ śţōŕēď ƒōŕ ţĥĩś ĥōśţ. Àďď à ţōķēń ĩń Śēţţĩńĝś, ōŕ ĺēţ ĝĩţ ũśē ţĥē ćŕēďēńţĩàĺś ĩţ àĺŕēàďŷ ĥàś."
+ ],
"tqQBwN": ["Àńŷ śćŕĩƥţś àŕē śĥōŵń ƒōŕ ŕēvĩēŵ, ńēvēŕ ŕũń."],
"troubleshooting.claude-desktop.per-tool-approval": [
["agent"],
@@ -5416,6 +5447,7 @@
"uoJF_D": ["Ĩţ ŵàś ţōō ĥàŕď ţō śēţ ũƥ ōŕ ĝēţ śţàŕţēď"],
"uqs8Gd": [["others", "plural", { "one": ["#", " ōţĥēŕ"], "other": ["#", " ōţĥēŕś"] }]],
"ur2XSb": ["Vĩśũàĺ ēďĩţōŕ"],
+ "uraHF0": ["ĜĩţĹàƀ"],
"uuoHOU": ["Ćōḿḿàńď ƒàĩĺēď."],
"uwzRx4": [
"ÀďĴũśţ ĩńďēxĩńĝ ŕēǫũēśţ śĩźē àńď ţĩḿēōũţ ƒōŕ śĺōŵ ōŕ ḿēḿōŕŷ-ćōńśţŕàĩńēď ēḿƀēďďĩńĝ śēŕvēŕś. Ḿōśţ śēţũƥś śĥōũĺď ķēēƥ ţĥē ďēƒàũĺţś."
@@ -5513,6 +5545,9 @@
"vvWZnu": ["Ďĩƒƒ ũńàvàĩĺàƀĺē"],
"vwV-kH": ["Ƒĩxĩńĝ ƒĩĺēś śţōƥƥēď ũńēxƥēćţēďĺŷ."],
"vy_VIN": ["Ţŕàćķēď ĩń ĝĩţ — ũƥďàţēś ƒĺōŵ ţĥŕōũĝĥ ŷōũŕ ŕēƥō (ƥũĺĺ ōŕ ĆĨ), ńōţ àũţō-ũƥďàţē"],
+ "w-Wt3H": [
+ "Ŕēćōńńēćţ ŕēǫũĩŕēď ţō ķēēƥ śŷńćĩńĝ. Ćĥēćķ ţĥē ŚŚĤ ķēŷ ōŕ śàvēď ćŕēďēńţĩàĺś ĝĩţ ũśēś ƒōŕ ţĥĩś ĥōśţ."
+ ],
"w0YVAE": ["Śĥōŵ śķĩĺĺ ńōďēś"],
"w3tVpc": ["Ńō ĺĩńķś ŷēţ. Àďď ŵĩķĩ ĺĩńķś ōŕ ḿàŕķďōŵń ĺĩńķś ţō ƀũĩĺď à ĝŕàƥĥ."],
"w3vFfL": ["Ĥĩďē Ƒĩĺēś"],
@@ -5632,7 +5667,6 @@
"x57cJf": ["Ōƥēń ĺĩńķ"],
"xAlHfe": [["basename"], " — ţēxţ ēďĩţōŕ"],
"xBFg6z": ["Ƒŕōḿ ţĥē ", ["0"], " ƥĺũĝĩń"],
- "xBjIs7": ["ĜĩţĤũƀ śĩĝń-ĩń ĩśń'ţ àvàĩĺàƀĺē ƒōŕ ţĥĩś ƥŕōĴēćţ"],
"xCJdfg": ["Ćĺēàŕ"],
"xCdTnb": ["Ćĺōśē ńēŵ ţàƀ"],
"xD4Xm2": ["Ƒēţćĥ"],
@@ -5644,6 +5678,9 @@
"xG4tb6": ["Ĺōśţ ćōńńēćţĩōń ţō \"", ["docName"], "\"."],
"xG8Ish": ["Ńōţ ƥĺàńńēď"],
"xHGM4U": ["Ĥĩďē ĤŢḾĹ ƥŕēvĩēŵ"],
+ "xJ7qrb": [
+ "Ńō ćŕēďēńţĩàĺ ĩś śţōŕēď ƒōŕ ţĥĩś ĝĩţ ĥōśţ. Àďď à ţōķēń ĩń Śēţţĩńĝś, ōŕ ĺēţ ĝĩţ ũśē ţĥē ćŕēďēńţĩàĺś ĩţ àĺŕēàďŷ ĥàś."
+ ],
"xK291b": ["Ţŵō-ƥàĝē (ōďď)"],
"xKDsGS": ["Ĝō ţō ĺĩńē ", ["0"], " ĩń ", ["1"]],
"xKcXG6": [["addingCount", "plural", { "one": ["#", " àďďēď"], "other": ["#", " àďďēď"] }]],
@@ -5730,6 +5767,7 @@
"yLwx9e": [
"À ƥàŕēńţ ďĩŕēćţōŕŷ ĩś ţĥē śŷḿĺĩńķ — ũńĺĩńķ ţĥàţ ƒōĺďēŕ ĩţśēĺƒ ţō ţàķē ţĥĩś ōńē ƀàćķ."
],
+ "yLyiQV": ["Ţĥē śţōŕēď ţōķēń ĩś ḿĩśśĩńĝ ţĥē ƥēŕḿĩśśĩōńś ţĥĩś ĥōśţ ńēēďś ţō ƥũśĥ."],
"yMgL_E": ["Ƒĩńď ƒĩēĺď ńàvĩĝàţĩōń"],
"yOjRUV": ["Ńō ÀĨ ţōōĺś ďēţēćţēď. Ĩńśţàĺĺ ōńē ţō ũśē ţĥĩś śķĩĺĺ."],
"yQE2r9": ["Ĺōàďĩńĝ"],
@@ -5817,6 +5855,7 @@
"zLak8b": ["Àćţĩvàţē ńēŵ ţàƀ"],
"zMmwh4": ["Ƥĩćķ à ţĥēḿē ōŕ ćŕēàţē ŷōũŕ ōŵń."],
"zWZBPx": ["Ţŷƥē ćĥàńĝēď"],
+ "zXZJoN": ["Àďď ţōķēń"],
"zXj1rA": ["Śēàŕćĥ ƀŷ ḿēàńĩńĝ"],
"zYp8Sr": [
"À <0>Ḿōďĩƒĩēď</0> ƀàďĝē ḿàŕķś ŕũĺēś ŷōũŕ ćōńƒĩĝ śēţś ēxƥĺĩćĩţĺŷ — ďĩŕēćţĺŷ, ōŕ ĩńĥēŕĩţēď ţĥŕōũĝĥ <1>ēxţēńďś</1>. Ũńḿàŕķēď ŕũĺēś ķēēƥ ţĥēĩŕ ďēƒàũĺţ śţàţē."
diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.po
index 0c0d2f876..7693ba942 100644
--- a/packages/app/src/locales/pseudo/messages.po
+++ b/packages/app/src/locales/pseudo/messages.po
@@ -1544,6 +1544,10 @@ msgstr ""
msgid "A title, description, tags — anything that describes this folder."
msgstr ""
+#: src/components/settings/AccountSection.tsx
+msgid "A token added here only applies to HTTPS remotes, and this project's remote doesn't use HTTPS."
+msgstr ""
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "A worktree folder for {shareBranch} already exists."
msgstr ""
@@ -1596,8 +1600,7 @@ msgid "Accept their deletion"
msgstr ""
#: src/components/settings/AccountSection.tsx
-#: src/components/settings/SettingsDialogShell.tsx
-msgid "Account"
+msgid "Access token"
msgstr ""
#: src/components/TemplateRow.tsx
@@ -1677,6 +1680,10 @@ msgstr ""
msgid "Add a starter pack"
msgstr ""
+#: src/components/settings/AccountSection.tsx
+msgid "Add an access token for a GitLab, Gitea, Bitbucket, Azure DevOps or self-hosted git server. Without one, git uses the credentials it already has saved for that host; with one, OpenKnowledge uses the token instead."
+msgstr ""
+
#: src/components/settings/OkignoreSection.tsx
msgid "Add another pattern"
msgstr ""
@@ -1806,6 +1813,12 @@ msgstr ""
msgid "Add to prompt"
msgstr ""
+#: src/components/settings/AccountSection.tsx
+#: src/components/SyncStatusBadge.tsx
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Add token"
+msgstr ""
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Add value"
msgstr ""
@@ -1816,6 +1829,10 @@ msgstr ""
msgid "Added"
msgstr ""
+#: src/components/settings/AccountSection.tsx
+msgid "Adding"
+msgstr ""
+
#: src/components/settings/AgentConnectionDialogs.tsx
msgid "Adds a global OpenKnowledge MCP entry for this agent."
msgstr ""
@@ -2331,6 +2348,10 @@ msgstr ""
msgid "Authenticated as {login}."
msgstr ""
+#: src/components/SyncStatusBadge.tsx
+msgid "Authentication failed for this git host. Add a token for it in Settings, or replace the one stored."
+msgstr ""
+
#: src/editor/slash-command/component-items.tsx
msgid "Authoritative content; mirrored verbatim everywhere it's referenced."
msgstr ""
@@ -2532,6 +2553,11 @@ msgstr ""
msgid "Bird wiki"
msgstr ""
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "Bitbucket"
+msgstr ""
+
#: src/components/NewItemDialog.tsx
msgid "Blank note"
msgstr ""
@@ -3601,7 +3627,7 @@ msgid "Connect"
msgstr ""
#: src/components/settings/AccountSection.tsx
-msgid "Connect a GitHub account to browse and sync your repositories."
+msgid "Connect a GitHub account to browse and publish GitHub repositories."
msgstr ""
#: src/components/settings/SyncSection.tsx
@@ -3694,6 +3720,7 @@ msgid "Connection dropped"
msgstr ""
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Connection error — try again"
msgstr ""
@@ -5933,6 +5960,10 @@ msgstr ""
msgid "Enter at least 3 characters to search by meaning."
msgstr ""
+#: src/components/settings/AccountSection.tsx
+msgid "Enter the host name git connects to, with an optional :port and no scheme or path, for example git.example.com."
+msgstr ""
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Enter the public origin your tunnel serves, for example https://notes.example.com"
msgstr ""
@@ -6408,6 +6439,7 @@ msgid "Failed to start sign-in — try again"
msgstr ""
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Failed to store the token — try again"
msgstr ""
@@ -6881,6 +6913,11 @@ msgctxt "settings search keyword"
msgid "GHES"
msgstr ""
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Git"
+msgstr ""
+
#: src/components/ExploreSkills.tsx
msgid "Git & PRs"
msgstr ""
@@ -6889,6 +6926,10 @@ msgstr ""
msgid "Git can't track this folder — it's empty or contains only ignored files. The link won't work until you add a tracked document."
msgstr ""
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it."
+msgstr ""
+
#: src/components/RecentProjectsMenu.tsx
msgid "Git has locked this worktree, but it can still be opened."
msgstr ""
@@ -6948,10 +6989,6 @@ msgstr ""
msgid "GitHub sign-in is missing or expired. Reconnect to resume syncing."
msgstr ""
-#: src/components/settings/AccountSection.tsx
-msgid "GitHub sign-in isn't available for this project"
-msgstr ""
-
#: src/components/ImportSkillForm.tsx
msgid "GitHub, a git URL, or a local path."
msgstr ""
@@ -6960,6 +6997,11 @@ msgstr ""
msgid "github.com is always recognized, so it doesn't need to be added."
msgstr ""
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "GitLab"
+msgstr ""
+
#: src/components/settings/SavedThemesTiles.tsx
msgid "Give it a name before editing its colors."
msgstr ""
@@ -7314,6 +7356,10 @@ msgstr ""
msgid "Horizontal rule that divides sections."
msgstr ""
+#: src/components/settings/AccountSection.tsx
+msgid "Host"
+msgstr ""
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Hosting is on. The server is running on port {boundPort}. Reach it through your tunnel."
msgstr ""
@@ -8607,7 +8653,7 @@ msgid "Manage skill folders"
msgstr ""
#: src/components/settings/AccountSection.tsx
-msgid "Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."
+msgid "Manage the accounts and access tokens OpenKnowledge uses to connect to your git hosts."
msgstr ""
#: src/components/settings/AgentConnectionDialogs.tsx
@@ -9438,6 +9484,10 @@ msgstr ""
msgid "No content changes in this version"
msgstr ""
+#: src/components/SyncStatusBadge.tsx
+msgid "No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has."
+msgstr ""
+
#: src/components/GraphPanel.tsx
msgid "No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."
msgstr ""
@@ -10390,6 +10440,10 @@ msgstr ""
msgid "OpenKnowledge"
msgstr ""
+#: src/components/AuthModal.tsx
+msgid "OpenKnowledge can't sign in to GitHub for this project."
+msgstr ""
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge checked {subject}"
msgstr ""
@@ -10402,10 +10456,6 @@ msgstr ""
msgid "OpenKnowledge could not find this agent on this machine."
msgstr ""
-#: src/components/settings/AccountSection.tsx
-msgid "OpenKnowledge couldn't find a host name in this project's git remote, so it can't tell which GitHub server to sign in to."
-msgstr ""
-
#: src/lib/worktree-create-error.ts
msgid "OpenKnowledge couldn't finish setting up this project. The worktree was created but not opened."
msgstr ""
@@ -10462,6 +10512,10 @@ msgstr ""
msgid "OpenKnowledge files were removed"
msgstr ""
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has."
+msgstr ""
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge imported {source}"
msgstr ""
@@ -10690,6 +10744,11 @@ msgstr ""
msgid "Other"
msgstr ""
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Other Git hosts"
+msgstr ""
+
#: src/components/settings/SharingSection.tsx
msgid "Other OK paths are tracked upstream:"
msgstr ""
@@ -11624,6 +11683,14 @@ msgstr ""
msgid "Reconnect required to keep syncing."
msgstr ""
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Add a token for this host in Settings, or replace the one stored."
+msgstr ""
+
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Check the SSH key or saved credentials git uses for this host."
+msgstr ""
+
#: src/presence/use-sync-toasts.ts
msgid "Reconnected"
msgstr ""
@@ -14815,6 +14882,10 @@ msgstr ""
msgid "The source folder itself does not move."
msgstr ""
+#: src/components/SyncStatusBadge.tsx
+msgid "The stored token is missing the permissions this host needs to push."
+msgstr ""
+
#: src/components/TemplateProperties.tsx
msgid "The template's filename (without `.md`)."
msgstr ""
@@ -14873,6 +14944,10 @@ msgstr ""
msgid "The token needs the repo and read:user scopes."
msgstr ""
+#: src/components/settings/AccountSection.tsx
+msgid "The username git sends with the token. Some hosts expect a fixed value: type <0>x-bitbucket-api-token-auth</0> for a Bitbucket API token, <1>x-token-auth</1> for a Bitbucket repository or workspace access token, or <2>oauth2</2> for GitLab. For Gitea, use your Gitea username. Azure DevOps accepts any value."
+msgstr ""
+
#: src/lib/tab-session-restore-recovery-notice.ts
msgid "The workspace opened without it so the app could start."
msgstr ""
@@ -15401,10 +15476,6 @@ msgstr ""
msgid "This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."
msgstr ""
-#: src/components/settings/AccountSection.tsx
-msgid "This project's git remote is on {host}, which OpenKnowledge doesn't recognize as a GitHub host. If {host} runs GitHub Enterprise Server, add it to GitHub Enterprise Server hosts below, then restart OpenKnowledge."
-msgstr ""
-
#: src/components/DocumentErrorBoundary.tsx
msgid "This project's running server doesn't support live editing. Restart OpenKnowledge to fix."
msgstr ""
@@ -15501,6 +15572,7 @@ msgid "This usually means one of:"
msgstr ""
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
msgid "This window can't store a token — open Settings from the main app window."
msgstr ""
@@ -15654,6 +15726,15 @@ msgstr ""
msgid "Toggles the pattern {0}/**"
msgstr ""
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "token"
+msgstr ""
+
+#: src/components/settings/AccountSection.tsx
+msgid "Token stored for {login} on {host}. To remove it, run <0>ok auth signout --host {host}</0>."
+msgstr ""
+
#: src/components/SkillBundlePreview.tsx
#: src/components/SkillProperties.tsx
msgid "tokens"
@@ -16240,6 +16321,10 @@ msgstr ""
msgid "User plugins are personal to this device — turn them on or off here. Each enabled plugin gets its own page under Plugins in the settings sidebar."
msgstr ""
+#: src/components/settings/AccountSection.tsx
+msgid "Username"
+msgstr ""
+
#: src/components/settings/SearchSection.tsx
msgid "Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."
msgstr ""
diff --git a/packages/app/src/locales/pt-BR/messages.json b/packages/app/src/locales/pt-BR/messages.json
index 2f2708e90..cfa9fa87f 100644
--- a/packages/app/src/locales/pt-BR/messages.json
+++ b/packages/app/src/locales/pt-BR/messages.json
@@ -51,6 +51,9 @@
],
"-l6jM7": ["Inicie um chat com o botão + ou inicie um agente a partir de uma página."],
"-lCAuQ": ["Carregando o grafo"],
+ "-nA68n": [
+ "Adicione um token de acesso para um servidor GitLab, Gitea, Bitbucket, Azure DevOps ou git auto-hospedado. Sem ele, o git usa as credenciais que já tem salvas para esse host; com ele, o OpenKnowledge usa o token no lugar delas."
+ ],
"-o5XAG": [
"Enviado em particular para a equipe do OpenKnowledge, junto com sua nota e a versão do app. Nunca é publicado."
],
@@ -275,6 +278,7 @@
"1vczDE": ["Abrir ", ["displayName"], " Desktop"],
"1vn0CI": ["Resposta do servidor inválida"],
"1xui0Q": ["Falha ao carregar os arquivos locais"],
+ "1yHVE-": ["Adicionando"],
"2-3Mlu": ["Não foi possível desafixar ", ["name"]],
"20LVKb": ["Algo fora deste chat pediu ao processo do agente que parasse (", ["signal"], ")."],
"2277Tu": ["Recolher o grafo"],
@@ -543,6 +547,15 @@
"HTML incorporado em modo isolado — escreva HTML e veja a pré-visualização renderizada ao vivo."
],
"4nj6n8": ["/api/config devolveu HTTP ", ["code"]],
+ "4p8Baj": [
+ "Token guardado para ",
+ ["login"],
+ " em ",
+ ["host"],
+ ". Para removê-lo, execute <0>ok auth signout --host ",
+ ["host"],
+ "</0>."
+ ],
"4pDZ2N": [
"\"",
["0"],
@@ -853,13 +866,6 @@
"7YRrJ9": [
"Disponível no app de desktop do OpenKnowledge. Em um terminal, use<0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2>."
],
- "7_I248": [
- "O remoto git deste projeto está em ",
- ["host"],
- ", que o OpenKnowledge não reconhece como host do GitHub. Se ",
- ["host"],
- " executa o GitHub Enterprise Server, adicione-o em Hosts do GitHub Enterprise Server abaixo e reinicie o OpenKnowledge."
- ],
"7_bFEL": ["Arraste ", ["patternText"], " para reordenar"],
"7a0YcF": ["Pressione <0>Espaço</0> ou toque no blob para começar"],
"7aNk5D": ["OpenKnowledge editou ", ["subject"]],
@@ -892,6 +898,7 @@
"7lFX_h": ["Redirecionar agora"],
"7m3Ade": ["instalações:"],
"7qRHf0": ["Instalar para o Claude Chat e Cowork"],
+ "7sNhEz": ["Nome de usuário"],
"7uBlRT": ["Copia o item em foco na árvore de arquivos para que Colar possa duplicá-lo."],
"7vxWET": ["Prévia do pacote indisponível."],
"7wogIQ": [["0", "plural", { "one": ["Plugin"], "many": ["Plugins"], "other": ["Plugins"] }]],
@@ -1053,6 +1060,7 @@
"9bCiQ8": ["Nenhuma página está sem links de entrada no grafo."],
"9bG48P": ["Enviando"],
"9clcD5": ["Abrir os documentos com a tag #", ["chip"]],
+ "9djC8C": ["Conecte uma conta do GitHub para explorar e publicar repositórios do GitHub."],
"9euN0m": [
[
"count",
@@ -1166,7 +1174,6 @@
" em ",
["parentLabel"]
],
- "AeXO77": ["Conta"],
"AgoIW4": [
["source"],
": ",
@@ -1179,6 +1186,7 @@
["detail"]
],
"AhoGwP": ["Configurar as integrações do OpenKnowledge"],
+ "Ai2U7L": ["Host"],
"AiNMQ7": [
"Este projeto vive só neste computador. Conecte-o ao GitHub para fazer backup e compartilhar com outras pessoas."
],
@@ -1502,9 +1510,6 @@
"E2Mv-X": ["Copiar o código fonte"],
"E4XYYH": ["Ativar o terminal neste projeto"],
"E5WeIy": ["Reabre a última aba do editor que foi fechada."],
- "E6lrpp": [
- "Gerencie a conta do GitHub que o OpenKnowledge usa para explorar e sincronizar seus repositórios."
- ],
"E7BhZn": ["Nota em branco"],
"E8NbNG": ["Não foi possível carregar as árvores de trabalho."],
"E91VZY": ["Abrir em nova janela"],
@@ -1518,7 +1523,6 @@
"EEYbdt": ["Publicar"],
"EFfGAv": ["Essa mensagem já foi enviada — sua edição não foi aplicada."],
"EHu0x2": ["Sincronizando"],
- "EJuO7B": ["Conecte uma conta do GitHub para explorar e sincronizar seus repositórios."],
"EKwNEe": [
"Os embeddings em cache pertencem ao endpoint e ao modelo que os gerou, então isso reconstrói o índice do zero."
],
@@ -1677,6 +1681,9 @@
"FgRAvd": ["Logs e informações do sistema"],
"Fhp4Gn": ["Ver o plugin"],
"Fim5F3": ["embeddings"],
+ "FioJgb": [
+ "É necessário reconectar para continuar sincronizando. Adicione um token para este host nas Configurações, ou substitua o que está guardado."
+ ],
"FiyNln": ["Ir para o texto selecionado na propriedade"],
"FjkaiT": ["Afastar"],
"Fjz6aJ": ["Enviar para um novo chat"],
@@ -2162,6 +2169,9 @@
"KvwJv8": ["Alguns arquivos não estão listados: a árvore de trabalho tem alterações demais."],
"Kx881F": [["0"], " foi restaurado."],
"KziH2K": ["Rápido"],
+ "L-crEu": [
+ "O git não conseguiu se autenticar neste host. Verifique a chave SSH ou as credenciais salvas que o git usa para ele."
+ ],
"L-rMC9": ["Redefinir para o padrão"],
"L1BQTH": [["0"], " ainda não está instalado — abrindo sua página de download."],
"L1ZE3M": ["Estatísticas do documento"],
@@ -2226,6 +2236,9 @@
"LRgZAt": [["owner"], "/", ["name"], " já existe"],
"LSuMte": [["0"], " de ", ["totalCount"]],
"LTeJuX": ["Ativar ou desativar a tela cheia"],
+ "LVWA9A": [
+ "Falha na autenticação neste host git. Adicione um token para ele nas Configurações, ou substitua o que está guardado."
+ ],
"LXIm4m": ["Janela de contexto"],
"LXdWeS": ["Título de seção médio."],
"LXfNU-": ["Navegação e sugestões"],
@@ -2382,6 +2395,7 @@
"Mj8R8K": ["Não deu para instalar a habilidade: ", ["0"]],
"MmDDWK": ["Abertos recentemente"],
"Mnavhe": ["Propriedades de ", ["propPanelDescriptorLabel"]],
+ "MpZRQy": ["Git"],
"MqQoV-": [
"Descreva o que quer construir, comece com um arquivo em branco ou parta de um modelo."
],
@@ -2565,6 +2579,9 @@
"OPOiKn": ["Regras de conteúdo"],
"OTF92M": ["Rótulo <0>(texto exibido, opcional)</0>"],
"OVjNeX": ["Terminal ", ["0"]],
+ "OWs-8P": [
+ "Um token adicionado aqui só se aplica a remotos HTTPS, e o remoto deste projeto não usa HTTPS."
+ ],
"OX2Neh": ["Código em linha"],
"OXb_Df": ["Conteúdo das configurações"],
"OXdGnd": ["Problemas"],
@@ -2688,6 +2705,7 @@
["filePath"],
". Explique o que devo comparar na visualização de conflitos do OpenKnowledge; vou escolher e aplicar a resolução lá."
],
+ "Q14Keq": ["Bitbucket"],
"Q1mtyd": ["Ocultar a barra lateral"],
"Q5fqMz": ["Erro de conexão — tente de novo"],
"Q6hhn8": ["Preferências"],
@@ -2986,6 +3004,7 @@
"SiUUCS": ["Próxima ocorrência"],
"SkMZlS": ["Não deu para remover <0>", ["targetGitPath"], "</0>: ", ["removeGitError"]],
"SkTkKV": ["O agente não está parando. A parada forçada fecha este chat e encerra o agente."],
+ "SkUcEr": ["Token de acesso"],
"Ske_wc": [
"Os plugins de usuário são pessoais deste dispositivo — ligue ou desligue aqui. Cada plugin ativado ganha uma página própria em Plugins, na barra lateral de configurações."
],
@@ -3373,9 +3392,6 @@
"XAyxsa": ["Extrair ramo remoto"],
"XBBZnv": ["O destino do link \"", ["shown"], "\" não corresponde a um documento existente."],
"XBgr2S": ["Copiar para cá"],
- "XBpH6-": [
- "O OpenKnowledge não encontrou um nome de host no remoto git deste projeto, então não consegue saber em qual servidor GitHub fazer login."
- ],
"XDzAnp": ["Abre em uma nova aba"],
"XF1kgP": ["Tudo de ", ["source"], " já está atualizado"],
"XGKy1z": ["Não foi possível mostrar a imagem"],
@@ -3837,6 +3853,9 @@
"As configurações de pré-visualização de links ainda não carregaram — tente de novo em instantes"
],
"axQ1h6": ["Quer acrescentar alguma coisa? (opcional)"],
+ "azrR7I": [
+ "O nome de usuário que o git envia com o token. Alguns hosts esperam um valor fixo: digite <0>x-bitbucket-api-token-auth</0> para um token de API do Bitbucket, <1>x-token-auth</1> para um token de acesso de repositório ou de workspace do Bitbucket, ou <2>oauth2</2> para o GitLab. No Gitea, use seu nome de usuário do Gitea. O Azure DevOps aceita qualquer valor."
+ ],
"b18t0_": ["Fechar diferenças"],
"b1FDss": ["Rolar até o início"],
"b2ezG_": ["Os dois foram mantidos — \"", ["0"], "\" agora é uma habilidade própria"],
@@ -4221,6 +4240,7 @@
"e8zRrb": ["Mostrar Arquivos"],
"e8zYa8": ["Não foi possível abrir ", ["shareBranch"], " em um worktree. Tente de novo."],
"e9sHSO": ["Continue de onde parou"],
+ "eAYJMv": ["token"],
"eBGWcy": [
"As ferramentas do Open Knowledge estão indisponíveis porque a pasta do projeto não existe, está inacessível ou foi alterada. Verifique a localização e as permissões e tente novamente."
],
@@ -4886,6 +4906,7 @@
"jZ_E5M": ["Falha ao buscar — veja os logs do servidor para os detalhes."],
"j_Z6g7": ["Padrão compartilhado"],
"jbSG8V": ["Mostrar Arquivos (", ["sidebarShortcutLabel"], ")"],
+ "jbhCDS": ["Outros hosts Git"],
"jcEoUi": ["Mover para o painel direito"],
"jdGUeI": ["Não deu para criar o modelo: ", ["error"]],
"jeCFV7": ["Mover para um novo painel à direita"],
@@ -5512,6 +5533,9 @@
],
"pcqlQu": [["0", "plural", { "one": ["Pasta"], "many": ["Pastas"], "other": ["Pastas"] }]],
"pd0UH2": ["Alinhar à direita"],
+ "pd6t3G": [
+ "Gerencie as contas e os tokens de acesso que o OpenKnowledge usa para se conectar aos seus hosts git."
+ ],
"peq20S": [
"O navegador não está disponível neste chat porque não foi possível configurá-lo. O log do OpenKnowledge tem os detalhes."
],
@@ -5642,6 +5666,7 @@
],
"qi1F96": ["Mostrar no Explorador de Arquivos"],
"qiRoLb": ["Resuma tudo o que mudei esta semana"],
+ "qimTXH": ["O OpenKnowledge não pode entrar no GitHub para este projeto."],
"qioCwA": ["Ir para a página ", ["pageNumber"]],
"qjHMHf": ["Falha ao desativar a sincronização — ", ["detail"]],
"qkqG0b": ["Aceitar a versão remota"],
@@ -5704,6 +5729,9 @@
"rVxu1k": ["Ainda não há páginas apontando para cá."],
"rXz97P": ["Lista numerada de itens."],
"rZ9HZq": ["A fazer"],
+ "rZFxkH": [
+ "Digite o nome do host ao qual o git se conecta, com um :port opcional e sem esquema nem caminho, por exemplo git.example.com."
+ ],
"rZVMkf": ["Campo de substituição do editor visual em foco"],
"radOpL": ["Imagem ", ["identity"], ". Ir para a referência."],
"rageVb": ["HTML personalizado com painel de pré-visualização ao vivo (iframe isolado)."],
@@ -5932,6 +5960,9 @@
"tlGXxX": ["Automático (somente Pull)"],
"tnG-m6": ["A sincronização automática está pausada — entre na sua conta para retomar."],
"toyw51": ["Controles do diagrama do Mermaid"],
+ "tpOnU9": [
+ "O OpenKnowledge não tem nenhuma credencial guardada para este host. Adicione um token nas Configurações, ou deixe o git usar as credenciais que ele já tem."
+ ],
"tqQBwN": ["Os scripts são exibidos para revisão, nunca executados."],
"troubleshooting.claude-desktop.per-tool-approval": [
"O ",
@@ -6116,6 +6147,7 @@
]
],
"ur2XSb": ["Editor visual"],
+ "uraHF0": ["GitLab"],
"uuoHOU": ["O comando falhou."],
"uwzRx4": [
"Ajuste o tamanho e o tempo limite das requisições de indexação para servidores de embeddings lentos ou com pouca memória. A maioria das configurações deve manter os valores padrão."
@@ -6232,6 +6264,9 @@
"vy_VIN": [
"Rastreado no git — as atualizações chegam pelo seu repositório (pull ou CI), não por atualização automática"
],
+ "w-Wt3H": [
+ "É necessário reconectar para continuar sincronizando. Verifique a chave SSH ou as credenciais salvas que o git usa para este host."
+ ],
"w0YVAE": ["Mostrar os nós de habilidades"],
"w3tVpc": ["Ainda não há links. Adicione links wiki ou links markdown para montar um grafo."],
"w3vFfL": ["Ocultar Arquivos"],
@@ -6353,7 +6388,6 @@
"x57cJf": ["Abrir o link"],
"xAlHfe": [["basename"], " — editor de texto"],
"xBFg6z": ["Do plugin ", ["0"]],
- "xBjIs7": ["O login no GitHub não está disponível para este projeto"],
"xCJdfg": ["Limpar"],
"xCdTnb": ["Fechar nova aba"],
"xD4Xm2": ["Buscar"],
@@ -6365,6 +6399,9 @@
"xG4tb6": ["A conexão com \"", ["docName"], "\" foi perdida."],
"xG8Ish": ["Não planejado"],
"xHGM4U": ["Ocultar a pré-visualização do HTML"],
+ "xJ7qrb": [
+ "Nenhuma credencial está guardada para este host git. Adicione um token nas Configurações, ou deixe o git usar as credenciais que ele já tem."
+ ],
"xK291b": ["Duas páginas (ímpares)"],
"xKDsGS": ["Ir para a linha ", ["0"], " em ", ["1"]],
"xKcXG6": [
@@ -6464,6 +6501,7 @@
"yLwx9e": [
"O link simbólico é um diretório acima — desvincule aquela pasta para retomar esta."
],
+ "yLyiQV": ["Faltam ao token guardado as permissões de que este host precisa para fazer push."],
"yMgL_E": ["Navegação do campo de busca"],
"yOjRUV": ["Nenhuma ferramenta de IA detectada. Instale uma para usar esta habilidade."],
"yQE2r9": ["Carregando"],
@@ -6575,6 +6613,7 @@
"zLak8b": ["Ativar nova aba"],
"zMmwh4": ["Escolha um tema ou crie o seu."],
"zWZBPx": ["Tipo alterado"],
+ "zXZJoN": ["Adicionar token"],
"zXj1rA": ["Buscar por significado"],
"zYp8Sr": [
"O selo <0>Modificada</0> marca as regras que sua configuração define explicitamente — diretamente ou herdadas por <1>extends</1>. As regras sem selo mantêm o estado padrão."
diff --git a/packages/app/src/locales/pt-BR/messages.po b/packages/app/src/locales/pt-BR/messages.po
index f05901250..a6a0f3229 100644
--- a/packages/app/src/locales/pt-BR/messages.po
+++ b/packages/app/src/locales/pt-BR/messages.po
@@ -1544,6 +1544,10 @@ msgstr "Já existe aqui um modelo chamado <0>{trimmedSlug}</0>. Salvar cria uma
msgid "A title, description, tags — anything that describes this folder."
msgstr "Um título, uma descrição, tags — qualquer coisa que descreva esta pasta."
+#: src/components/settings/AccountSection.tsx
+msgid "A token added here only applies to HTTPS remotes, and this project's remote doesn't use HTTPS."
+msgstr "Um token adicionado aqui só se aplica a remotos HTTPS, e o remoto deste projeto não usa HTTPS."
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "A worktree folder for {shareBranch} already exists."
msgstr "Já existe uma pasta de worktree para {shareBranch}."
@@ -1596,9 +1600,8 @@ msgid "Accept their deletion"
msgstr "Aceitar a exclusão deles"
#: src/components/settings/AccountSection.tsx
-#: src/components/settings/SettingsDialogShell.tsx
-msgid "Account"
-msgstr "Conta"
+msgid "Access token"
+msgstr "Token de acesso"
#: src/components/TemplateRow.tsx
msgid "Actions for {label}"
@@ -1677,6 +1680,10 @@ msgstr "Adicionar uma propriedade"
msgid "Add a starter pack"
msgstr "Adicionar um pacote inicial"
+#: src/components/settings/AccountSection.tsx
+msgid "Add an access token for a GitLab, Gitea, Bitbucket, Azure DevOps or self-hosted git server. Without one, git uses the credentials it already has saved for that host; with one, OpenKnowledge uses the token instead."
+msgstr "Adicione um token de acesso para um servidor GitLab, Gitea, Bitbucket, Azure DevOps ou git auto-hospedado. Sem ele, o git usa as credenciais que já tem salvas para esse host; com ele, o OpenKnowledge usa o token no lugar delas."
+
#: src/components/settings/OkignoreSection.tsx
msgid "Add another pattern"
msgstr "Adicionar outro padrão"
@@ -1806,6 +1813,12 @@ msgstr "Adicionar ao dicionário"
msgid "Add to prompt"
msgstr "Adicionar ao prompt"
+#: src/components/settings/AccountSection.tsx
+#: src/components/SyncStatusBadge.tsx
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Add token"
+msgstr "Adicionar token"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Add value"
msgstr "Adicionar valor"
@@ -1816,6 +1829,10 @@ msgstr "Adicionar valor"
msgid "Added"
msgstr "Adicionado"
+#: src/components/settings/AccountSection.tsx
+msgid "Adding"
+msgstr "Adicionando"
+
#: src/components/settings/AgentConnectionDialogs.tsx
msgid "Adds a global OpenKnowledge MCP entry for this agent."
msgstr "Adiciona uma entrada MCP do OpenKnowledge global para este agente."
@@ -2331,6 +2348,10 @@ msgstr "Os anexos devem somar menos de 3 MB."
msgid "Authenticated as {login}."
msgstr "Autenticado como {login}."
+#: src/components/SyncStatusBadge.tsx
+msgid "Authentication failed for this git host. Add a token for it in Settings, or replace the one stored."
+msgstr "Falha na autenticação neste host git. Adicione um token para ele nas Configurações, ou substitua o que está guardado."
+
#: src/editor/slash-command/component-items.tsx
msgid "Authoritative content; mirrored verbatim everywhere it's referenced."
msgstr "Conteúdo autoritativo; espelhado literalmente em todo lugar onde for referenciado."
@@ -2532,6 +2553,11 @@ msgstr "Título de seção grande."
msgid "Bird wiki"
msgstr "Wiki de aves"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "Bitbucket"
+msgstr "Bitbucket"
+
#: src/components/NewItemDialog.tsx
msgid "Blank note"
msgstr "Nota em branco"
@@ -3601,8 +3627,8 @@ msgid "Connect"
msgstr "Conectar"
#: src/components/settings/AccountSection.tsx
-msgid "Connect a GitHub account to browse and sync your repositories."
-msgstr "Conecte uma conta do GitHub para explorar e sincronizar seus repositórios."
+msgid "Connect a GitHub account to browse and publish GitHub repositories."
+msgstr "Conecte uma conta do GitHub para explorar e publicar repositórios do GitHub."
#: src/components/settings/SyncSection.tsx
msgid "Connect an existing repository"
@@ -3694,6 +3720,7 @@ msgid "Connection dropped"
msgstr "A conexão caiu"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Connection error — try again"
msgstr "Erro de conexão — tente de novo"
@@ -5933,6 +5960,10 @@ msgstr "Insira um número inteiro entre {minimum} e {maximum}."
msgid "Enter at least 3 characters to search by meaning."
msgstr "Digite pelo menos 3 caracteres para buscar por significado."
+#: src/components/settings/AccountSection.tsx
+msgid "Enter the host name git connects to, with an optional :port and no scheme or path, for example git.example.com."
+msgstr "Digite o nome do host ao qual o git se conecta, com um :port opcional e sem esquema nem caminho, por exemplo git.example.com."
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Enter the public origin your tunnel serves, for example https://notes.example.com"
msgstr "Insira a origem pública que seu túnel serve, por exemplo https://notes.example.com"
@@ -6408,6 +6439,7 @@ msgid "Failed to start sign-in — try again"
msgstr "Falha ao iniciar o login — tente de novo"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Failed to store the token — try again"
msgstr "Falha ao guardar o token — tente de novo"
@@ -6881,6 +6913,11 @@ msgctxt "settings search keyword"
msgid "GHES"
msgstr "GHES"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Git"
+msgstr "Git"
+
#: src/components/ExploreSkills.tsx
msgid "Git & PRs"
msgstr "Git e PRs"
@@ -6889,6 +6926,10 @@ msgstr "Git e PRs"
msgid "Git can't track this folder — it's empty or contains only ignored files. The link won't work until you add a tracked document."
msgstr "O git não consegue rastrear esta pasta — ela está vazia ou só tem arquivos ignorados. O link não vai funcionar até você adicionar um documento rastreado."
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it."
+msgstr "O git não conseguiu se autenticar neste host. Verifique a chave SSH ou as credenciais salvas que o git usa para ele."
+
#: src/components/RecentProjectsMenu.tsx
msgid "Git has locked this worktree, but it can still be opened."
msgstr "O Git bloqueou este worktree, mas ele ainda pode ser aberto."
@@ -6948,10 +6989,6 @@ msgstr "Hosts do GitHub Enterprise Server"
msgid "GitHub sign-in is missing or expired. Reconnect to resume syncing."
msgstr "O login do GitHub está ausente ou expirou. Reconecte para retomar a sincronização."
-#: src/components/settings/AccountSection.tsx
-msgid "GitHub sign-in isn't available for this project"
-msgstr "O login no GitHub não está disponível para este projeto"
-
#: src/components/ImportSkillForm.tsx
msgid "GitHub, a git URL, or a local path."
msgstr "GitHub, uma URL de git ou um caminho local."
@@ -6960,6 +6997,11 @@ msgstr "GitHub, uma URL de git ou um caminho local."
msgid "github.com is always recognized, so it doesn't need to be added."
msgstr "O github.com é sempre reconhecido, então não precisa ser adicionado."
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "GitLab"
+msgstr "GitLab"
+
#: src/components/settings/SavedThemesTiles.tsx
msgid "Give it a name before editing its colors."
msgstr "Dê um nome antes de editar as cores."
@@ -7314,6 +7356,10 @@ msgstr "Faixa horizontal de pastilhas com o painel ativo abaixo; clique em uma p
msgid "Horizontal rule that divides sections."
msgstr "Linha horizontal que separa seções."
+#: src/components/settings/AccountSection.tsx
+msgid "Host"
+msgstr "Host"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Hosting is on. The server is running on port {boundPort}. Reach it through your tunnel."
msgstr "A hospedagem está ativa. O servidor está em execução na porta {boundPort}. Acesse-o pelo seu túnel."
@@ -8607,8 +8653,8 @@ msgid "Manage skill folders"
msgstr "Gerenciar as pastas de habilidades"
#: src/components/settings/AccountSection.tsx
-msgid "Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."
-msgstr "Gerencie a conta do GitHub que o OpenKnowledge usa para explorar e sincronizar seus repositórios."
+msgid "Manage the accounts and access tokens OpenKnowledge uses to connect to your git hosts."
+msgstr "Gerencie as contas e os tokens de acesso que o OpenKnowledge usa para se conectar aos seus hosts git."
#: src/components/settings/AgentConnectionDialogs.tsx
#: src/components/settings/AgentConnectionsSection.tsx
@@ -9438,6 +9484,10 @@ msgstr "Nenhuma alteração de conteúdo nesta versão."
msgid "No content changes in this version"
msgstr "Nenhuma alteração de conteúdo nesta versão"
+#: src/components/SyncStatusBadge.tsx
+msgid "No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "Nenhuma credencial está guardada para este host git. Adicione um token nas Configurações, ou deixe o git usar as credenciais que ele já tem."
+
#: src/components/GraphPanel.tsx
msgid "No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."
msgstr "Nenhuma página desconectada. As páginas só aparecem aqui quando não têm arestas de entrada nem de saída no grafo."
@@ -10390,6 +10440,10 @@ msgstr "Abrindo..."
msgid "OpenKnowledge"
msgstr "OpenKnowledge"
+#: src/components/AuthModal.tsx
+msgid "OpenKnowledge can't sign in to GitHub for this project."
+msgstr "O OpenKnowledge não pode entrar no GitHub para este projeto."
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge checked {subject}"
msgstr "OpenKnowledge verificou {subject}"
@@ -10402,10 +10456,6 @@ msgstr "OpenKnowledge verificou o projeto"
msgid "OpenKnowledge could not find this agent on this machine."
msgstr "O OpenKnowledge não encontrou este agente nesta máquina."
-#: src/components/settings/AccountSection.tsx
-msgid "OpenKnowledge couldn't find a host name in this project's git remote, so it can't tell which GitHub server to sign in to."
-msgstr "O OpenKnowledge não encontrou um nome de host no remoto git deste projeto, então não consegue saber em qual servidor GitHub fazer login."
-
#: src/lib/worktree-create-error.ts
msgid "OpenKnowledge couldn't finish setting up this project. The worktree was created but not opened."
msgstr "O OpenKnowledge não conseguiu concluir a configuração deste projeto. O worktree foi criado, mas não foi aberto."
@@ -10462,6 +10512,10 @@ msgstr "OpenKnowledge editou um documento"
msgid "OpenKnowledge files were removed"
msgstr "Os arquivos do OpenKnowledge foram removidos"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "O OpenKnowledge não tem nenhuma credencial guardada para este host. Adicione um token nas Configurações, ou deixe o git usar as credenciais que ele já tem."
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge imported {source}"
msgstr "OpenKnowledge importou {source}"
@@ -10690,6 +10744,11 @@ msgstr "outros"
msgid "Other"
msgstr "Outro"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Other Git hosts"
+msgstr "Outros hosts Git"
+
#: src/components/settings/SharingSection.tsx
msgid "Other OK paths are tracked upstream:"
msgstr "Há outros caminhos OK rastreados no remoto:"
@@ -11624,6 +11683,14 @@ msgstr "É preciso reconectar"
msgid "Reconnect required to keep syncing."
msgstr "É necessário reconectar para continuar sincronizando."
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Add a token for this host in Settings, or replace the one stored."
+msgstr "É necessário reconectar para continuar sincronizando. Adicione um token para este host nas Configurações, ou substitua o que está guardado."
+
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Check the SSH key or saved credentials git uses for this host."
+msgstr "É necessário reconectar para continuar sincronizando. Verifique a chave SSH ou as credenciais salvas que o git usa para este host."
+
#: src/presence/use-sync-toasts.ts
msgid "Reconnected"
msgstr "Reconectado"
@@ -14815,6 +14882,10 @@ msgstr "A lista de habilidades não corresponde ao seu esquema."
msgid "The source folder itself does not move."
msgstr "A pasta de origem em si não se move."
+#: src/components/SyncStatusBadge.tsx
+msgid "The stored token is missing the permissions this host needs to push."
+msgstr "Faltam ao token guardado as permissões de que este host precisa para fazer push."
+
#: src/components/TemplateProperties.tsx
msgid "The template's filename (without `.md`)."
msgstr "O nome do arquivo do modelo (sem `.md`)."
@@ -14873,6 +14944,10 @@ msgstr "O executável terminal.shell em .ok/local/config.yml não foi encontrado
msgid "The token needs the repo and read:user scopes."
msgstr "O token precisa dos escopos repo e read:user."
+#: src/components/settings/AccountSection.tsx
+msgid "The username git sends with the token. Some hosts expect a fixed value: type <0>x-bitbucket-api-token-auth</0> for a Bitbucket API token, <1>x-token-auth</1> for a Bitbucket repository or workspace access token, or <2>oauth2</2> for GitLab. For Gitea, use your Gitea username. Azure DevOps accepts any value."
+msgstr "O nome de usuário que o git envia com o token. Alguns hosts esperam um valor fixo: digite <0>x-bitbucket-api-token-auth</0> para um token de API do Bitbucket, <1>x-token-auth</1> para um token de acesso de repositório ou de workspace do Bitbucket, ou <2>oauth2</2> para o GitLab. No Gitea, use seu nome de usuário do Gitea. O Azure DevOps aceita qualquer valor."
+
#: src/lib/tab-session-restore-recovery-notice.ts
msgid "The workspace opened without it so the app could start."
msgstr "O espaço de trabalho abriu sem ele para que o aplicativo pudesse iniciar."
@@ -15401,10 +15476,6 @@ msgstr "Este projeto não é um repositório git, então worktrees não estão d
msgid "This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."
msgstr "Este projeto vive só neste computador. Conecte-o ao GitHub para fazer backup e compartilhar com outras pessoas."
-#: src/components/settings/AccountSection.tsx
-msgid "This project's git remote is on {host}, which OpenKnowledge doesn't recognize as a GitHub host. If {host} runs GitHub Enterprise Server, add it to GitHub Enterprise Server hosts below, then restart OpenKnowledge."
-msgstr "O remoto git deste projeto está em {host}, que o OpenKnowledge não reconhece como host do GitHub. Se {host} executa o GitHub Enterprise Server, adicione-o em Hosts do GitHub Enterprise Server abaixo e reinicie o OpenKnowledge."
-
#: src/components/DocumentErrorBoundary.tsx
msgid "This project's running server doesn't support live editing. Restart OpenKnowledge to fix."
msgstr "O servidor em execução deste projeto não suporta edição ao vivo. Reinicie o OpenKnowledge para corrigir."
@@ -15501,6 +15572,7 @@ msgid "This usually means one of:"
msgstr "Isto costuma significar uma destas coisas:"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
msgid "This window can't store a token — open Settings from the main app window."
msgstr "Esta janela não consegue guardar um token — abra Configurações pela janela principal do app."
@@ -15654,6 +15726,15 @@ msgstr "Liga ou desliga o sublinhado."
msgid "Toggles the pattern {0}/**"
msgstr "Alterna o padrão {0}/**"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "token"
+msgstr "token"
+
+#: src/components/settings/AccountSection.tsx
+msgid "Token stored for {login} on {host}. To remove it, run <0>ok auth signout --host {host}</0>."
+msgstr "Token guardado para {login} em {host}. Para removê-lo, execute <0>ok auth signout --host {host}</0>."
+
#: src/components/SkillBundlePreview.tsx
#: src/components/SkillProperties.tsx
msgid "tokens"
@@ -16240,6 +16321,10 @@ msgstr "Usuário"
msgid "User plugins are personal to this device — turn them on or off here. Each enabled plugin gets its own page under Plugins in the settings sidebar."
msgstr "Os plugins de usuário são pessoais deste dispositivo — ligue ou desligue aqui. Cada plugin ativado ganha uma página própria em Plugins, na barra lateral de configurações."
+#: src/components/settings/AccountSection.tsx
+msgid "Username"
+msgstr "Nome de usuário"
+
#: src/components/settings/SearchSection.tsx
msgid "Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."
msgstr "Usando a variável de ambiente <0>OK_EMBEDDINGS_API_KEY</0> (gerenciada fora do OpenKnowledge)."
diff --git a/packages/app/src/locales/ur/messages.json b/packages/app/src/locales/ur/messages.json
index 1d3a7f70d..4e3d22f6e 100644
--- a/packages/app/src/locales/ur/messages.json
+++ b/packages/app/src/locales/ur/messages.json
@@ -37,6 +37,9 @@
],
"-l6jM7": ["+ بٹن سے چیٹ شروع کریں، یا کسی صفحے سے ایجنٹ شروع کریں۔"],
"-lCAuQ": ["گراف لوڈ ہو رہا ہے"],
+ "-nA68n": [
+ "GitLab، Gitea، Bitbucket، Azure DevOps یا خود میزبانی والے git سرور کے لیے رسائی ٹوکن شامل کریں۔ ٹوکن کے بغیر git اس ہوسٹ کے لیے پہلے سے محفوظ اسناد استعمال کرتا ہے؛ ٹوکن ہونے پر OpenKnowledge ان کی جگہ ٹوکن استعمال کرتا ہے۔"
+ ],
"-o5XAG": [
"آپ کے نوٹ اور ایپ کے ورژن سمیت نجی طور پر OpenKnowledge ٹیم کو بھیجا جاتا ہے۔ کبھی عوامی طور پر شائع نہیں ہوتا۔"
],
@@ -240,6 +243,7 @@
"1vczDE": [["displayName"], " Desktop کھولیں"],
"1vn0CI": ["سرور کا جواب غیر درست ہے"],
"1xui0Q": ["مقامی فائلیں لوڈ نہیں ہو سکیں"],
+ "1yHVE-": ["شامل کیا جا رہا ہے"],
"2-3Mlu": [["name"], " سے پن نہیں ہٹایا جا سکا"],
"20LVKb": ["اس چیٹ سے باہر کسی چیز نے ایجنٹ پروسیس کو رکنے کے لیے کہا (", ["signal"], ")۔"],
"2277Tu": ["گراف سکیڑیں"],
@@ -470,6 +474,14 @@
"4mp6Tv": ["OpenKnowledge نے انسٹال شدہ اسکلز کی فہرست دی"],
"4niEzY": ["سینڈ باکسڈ HTML ایمبیڈ — HTML لکھیں، رینڈر شدہ پیش منظر براہِ راست دیکھیں۔"],
"4nj6n8": ["/api/config نے HTTP ", ["code"], " لوٹایا"],
+ "4p8Baj": [
+ ["host"],
+ " پر ",
+ ["login"],
+ " کے لیے ٹوکن محفوظ کر لیا گیا۔ اسے ہٹانے کے لیے <0>ok auth signout --host ",
+ ["host"],
+ "</0> چلائیں۔"
+ ],
"4pDZ2N": [
"«",
["0"],
@@ -739,13 +751,6 @@
"7YRrJ9": [
"OpenKnowledge ڈیسک ٹاپ ایپ میں دستیاب۔ ٹرمینل سے<0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2> استعمال کریں۔"
],
- "7_I248": [
- "اس پروجیکٹ کا git ریموٹ ",
- ["host"],
- " پر ہے، جسے OpenKnowledge GitHub ہوسٹ کے طور پر نہیں پہچانتا۔ اگر ",
- ["host"],
- " پر GitHub Enterprise Server چلتا ہے تو اسے نیچے GitHub Enterprise Server ہوسٹس میں شامل کریں، پھر OpenKnowledge دوبارہ شروع کریں۔"
- ],
"7_bFEL": ["ترتیب بدلنے کے لیے ", ["patternText"], " کھینچیں"],
"7a0YcF": ["شروع کرنے کے لیے <0>اسپیس</0> دبائیں یا blob پر ٹیپ کریں"],
"7aNk5D": ["OpenKnowledge نے ", ["subject"], " میں ترمیم کی"],
@@ -778,6 +783,7 @@
"7lFX_h": ["ابھی رخ بدلیں"],
"7m3Ade": ["تنصیبات:"],
"7qRHf0": ["Claude Chat اور Cowork کے لیے نصب کریں"],
+ "7sNhEz": ["صارف نام"],
"7uBlRT": ["فوکس شدہ فائل ٹری آئٹم نقل کریں تاکہ «چسپاں» اس کی نقل بنا سکے۔"],
"7vxWET": ["پیک کا پیش منظر دستیاب نہیں ہے۔"],
"7wogIQ": [["0", "plural", { "one": ["پلگ اِن"], "other": ["پلگ اِنز"] }]],
@@ -926,6 +932,7 @@
"9bCiQ8": ["کسی صفحے میں آنے والے گراف لنکس کی کمی نہیں۔"],
"9bG48P": ["بھیجا جا رہا ہے"],
"9clcD5": ["#", ["chip"], " سے ٹیگ شدہ دستاویزات کھولیں"],
+ "9djC8C": ["GitHub ریپازٹریز براؤز کرنے اور شائع کرنے کے لیے کوئی GitHub اکاؤنٹ جوڑیں۔"],
"9euN0m": [
[
"count",
@@ -1023,7 +1030,6 @@
" میں سے ",
["position"]
],
- "AeXO77": ["اکاؤنٹ"],
"AgoIW4": [
["source"],
": ",
@@ -1036,6 +1042,7 @@
["detail"]
],
"AhoGwP": ["OpenKnowledge کے انضمامات ترتیب دیں"],
+ "Ai2U7L": ["ہوسٹ"],
"AiNMQ7": [
"یہ پروجیکٹ صرف اسی کمپیوٹر پر ہے۔ اس کا بیک اپ رکھنے اور دوسروں کے ساتھ شیئر کرنے کے لیے اسے GitHub سے منسلک کریں۔"
],
@@ -1323,9 +1330,6 @@
"E2Mv-X": ["سورس نقل کریں"],
"E4XYYH": ["اس پروجیکٹ کے لیے ٹرمینل فعال کریں"],
"E5WeIy": ["حال ہی میں بند کیا گیا ایڈیٹر ٹیب دوبارہ کھولیں۔"],
- "E6lrpp": [
- "وہ GitHub اکاؤنٹ سنبھالیں جو OpenKnowledge آپ کی ریپازٹریز براؤز اور مطابق کرنے کے لیے استعمال کرتا ہے۔"
- ],
"E7BhZn": ["خالی نوٹ"],
"E8NbNG": ["ورک ٹریز لوڈ نہیں ہو سکیں۔"],
"E91VZY": ["نئی ونڈو میں کھولیں"],
@@ -1339,7 +1343,6 @@
"EEYbdt": ["شائع کریں"],
"EFfGAv": ["وہ پیغام پہلے ہی بھیجا جا چکا ہے — آپ کی ترمیم لاگو نہیں ہوئی۔"],
"EHu0x2": ["مطابقت پذیری جاری ہے"],
- "EJuO7B": ["اپنی ریپازٹریز براؤز اور مطابق کرنے کے لیے GitHub اکاؤنٹ منسلک کریں۔"],
"EKwNEe": [
"محفوظ شدہ ایمبیڈنگز اسی اینڈ پوائنٹ اور ماڈل سے تعلق رکھتی ہیں جس نے انہیں بنایا، اس لیے یہ اشاریہ سرے سے دوبارہ بناتا ہے۔"
],
@@ -1492,6 +1495,9 @@
"FgRAvd": ["لاگز اور سسٹم کی معلومات"],
"Fhp4Gn": ["پلگ اِن دیکھیں"],
"Fim5F3": ["ایمبیڈنگز"],
+ "FioJgb": [
+ "مطابقت پذیری جاری رکھنے کے لیے دوبارہ منسلک ہونا ضروری ہے۔ ترتیبات میں اس ہوسٹ کے لیے ٹوکن شامل کریں، یا محفوظ ٹوکن بدل دیں۔"
+ ],
"FiyNln": ["پراپرٹی میں منتخب متن پر جائیں"],
"FjkaiT": ["چھوٹا کریں"],
"Fjz6aJ": ["نئی چیٹ میں بھیجیں"],
@@ -1922,6 +1928,9 @@
"KvwJv8": ["کچھ فائلیں فہرست میں نہیں ہیں: ورکنگ ٹری میں بہت زیادہ تبدیلیاں ہیں۔"],
"Kx881F": [["0"], " بحال کر دیا گیا۔"],
"KziH2K": ["تیز"],
+ "L-crEu": [
+ "git اس ہوسٹ کے ساتھ تصدیق نہیں کر سکا۔ اس کے لیے git جو SSH کلید یا محفوظ اسناد استعمال کرتا ہے، انہیں چیک کریں۔"
+ ],
"L-rMC9": ["طے شدہ پر واپس کریں"],
"L1BQTH": [["0"], " ابھی نصب نہیں ہے — اس کا ڈاؤن لوڈ صفحہ کھولا جا رہا ہے۔"],
"L1ZE3M": ["دستاویز کے اعداد و شمار"],
@@ -1985,6 +1994,9 @@
"LRgZAt": [["owner"], "/", ["name"], " پہلے سے موجود ہے"],
"LSuMte": [["totalCount"], " میں سے ", ["0"]],
"LTeJuX": ["پوری اسکرین بدلیں"],
+ "LVWA9A": [
+ "اس git ہوسٹ کے لیے تصدیق ناکام رہی۔ ترتیبات میں اس کے لیے ٹوکن شامل کریں، یا محفوظ ٹوکن بدل دیں۔"
+ ],
"LXIm4m": ["سیاق و سباق ونڈو"],
"LXdWeS": ["درمیانہ سیکشن عنوان۔"],
"LXfNU-": ["نیویگیشن اور تجاویز"],
@@ -2114,6 +2126,7 @@
"Mj8R8K": ["مہارت نصب نہیں ہو سکی: ", ["0"]],
"MmDDWK": ["حال ہی میں کھولے گئے"],
"Mnavhe": [["propPanelDescriptorLabel"], " کی خصوصیات"],
+ "MpZRQy": ["Git"],
"MqQoV-": [
"بیان کریں کہ آپ کیا بنانا چاہتے ہیں، خالی فائل شروع کریں، یا ٹیمپلیٹ سے ڈھانچہ بنائیں۔"
],
@@ -2288,6 +2301,9 @@
"OPOiKn": ["مواد کے قواعد"],
"OTF92M": ["لیبل <0>(اختیاری ظاہری متن)</0>"],
"OVjNeX": ["ٹرمینل ", ["0"]],
+ "OWs-8P": [
+ "یہاں شامل کیا گیا ٹوکن صرف HTTPS ریموٹس پر لاگو ہوتا ہے، اور اس پروجیکٹ کا ریموٹ HTTPS استعمال نہیں کرتا۔"
+ ],
"OX2Neh": ["اِن لائن کوڈ"],
"OXb_Df": ["ترتیبات کا مواد"],
"OXdGnd": ["مسائل"],
@@ -2406,6 +2422,7 @@
["filePath"],
" میں موجود کنفلکٹ کو سمجھنے میں میری مدد کریں۔ بتائیں کہ OpenKnowledge کے کنفلکٹ کے منظر میں مجھے کن چیزوں کا موازنہ کرنا چاہیے؛ میں وہیں حل منتخب کر کے نافذ کروں گا۔"
],
+ "Q14Keq": ["Bitbucket"],
"Q1mtyd": ["سائیڈ بار چھپائیں"],
"Q5fqMz": ["کنکشن کی خرابی — دوبارہ کوشش کریں"],
"Q6hhn8": ["ترجیحات"],
@@ -2677,6 +2694,7 @@
"SkTkKV": [
"ایجنٹ رک نہیں رہا۔ زبردستی روکنے سے یہ چیٹ بند ہو جائے گی اور ایجنٹ ختم ہو جائے گا۔"
],
+ "SkUcEr": ["رسائی ٹوکن"],
"Ske_wc": [
"صارف کے پلگ اِنز اسی آلے تک محدود ہیں — انہیں یہاں فعال یا بند کریں۔ ہر فعال پلگ اِن کو ترتیبات کے سائیڈ بار میں پلگ اِنز کے تحت اپنا صفحہ ملتا ہے۔"
],
@@ -3008,9 +3026,6 @@
"XAyxsa": ["ریموٹ برانچ چیک آؤٹ کریں"],
"XBBZnv": ["لنک کا ہدف \"", ["shown"], "\" کسی موجودہ دستاویز کی طرف اشارہ نہیں کرتا۔"],
"XBgr2S": ["یہاں کاپی کریں"],
- "XBpH6-": [
- "OpenKnowledge کو اس پروجیکٹ کے git ریموٹ میں کوئی ہوسٹ نیم نہیں ملا، اس لیے وہ طے نہیں کر سکتا کہ کس GitHub سرور میں سائن ان کرنا ہے۔"
- ],
"XDzAnp": ["نئے ٹیب میں کھلتا ہے"],
"XF1kgP": [["source"], " سے سب کچھ پہلے ہی اپ ڈیٹ ہے"],
"XGKy1z": ["تصویر دکھائی نہیں جا سکی"],
@@ -3457,6 +3472,9 @@
"arUUsK": ["مصنوعات کی اپ ڈیٹس"],
"ax9kie": ["لنک کے پیش منظر کی ترتیبات ابھی لوڈ نہیں ہوئیں — تھوڑی دیر بعد دوبارہ کوشش کریں"],
"axQ1h6": ["کچھ اور شامل کرنا چاہیں گے؟ (اختیاری)"],
+ "azrR7I": [
+ "وہ صارف نام جو git ٹوکن کے ساتھ بھیجتا ہے۔ کچھ ہوسٹس ایک مقررہ قدر کی توقع کرتے ہیں: Bitbucket API ٹوکن کے لیے <0>x-bitbucket-api-token-auth</0>، Bitbucket ریپوزٹری یا ورک اسپیس رسائی ٹوکن کے لیے <1>x-token-auth</1>، یا GitLab کے لیے <2>oauth2</2> لکھیں۔ Gitea کے لیے اپنا Gitea صارف نام استعمال کریں۔ Azure DevOps کوئی بھی قدر قبول کرتا ہے۔"
+ ],
"b18t0_": ["فرق بند کریں"],
"b1FDss": ["شروع تک سکرول کریں"],
"b2ezG_": ["دونوں رکھ لیے گئے — «", ["0"], "» اب اپنی الگ مہارت ہے"],
@@ -3798,6 +3816,7 @@
"e8zRrb": ["فائلیں دکھائیں"],
"e8zYa8": [["shareBranch"], " کسی ورک ٹری میں نہیں کھل سکا۔ دوبارہ کوشش کریں۔"],
"e9sHSO": ["جہاں چھوڑا تھا وہیں سے شروع کریں"],
+ "eAYJMv": ["ٹوکن"],
"eBGWcy": [
"Open Knowledge کے ٹولز دستیاب نہیں ہیں کیونکہ پروجیکٹ فولڈر موجود نہیں، اس تک رسائی ممکن نہیں یا وہ تبدیل ہو گیا ہے۔ اس کا مقام اور اجازتیں چیک کریں، پھر دوبارہ کوشش کریں۔"
],
@@ -4385,6 +4404,7 @@
"jZ_E5M": ["لانا ناکام رہا — تفصیلات کے لیے سرور کے لاگز دیکھیں۔"],
"j_Z6g7": ["مشترکہ طے شدہ"],
"jbSG8V": ["فائلیں دکھائیں (", ["sidebarShortcutLabel"], ")"],
+ "jbhCDS": ["دیگر Git ہوسٹس"],
"jcEoUi": ["دائیں پینل میں منتقل کریں"],
"jdGUeI": ["ٹیمپلیٹ نہیں بن سکا: ", ["error"]],
"jeCFV7": ["دائیں جانب نئے پین میں منتقل کریں"],
@@ -4965,6 +4985,9 @@
"pckX1A": [["0", "plural", { "one": ["#", " استعمال"], "other": ["#", " استعمالات"] }]],
"pcqlQu": [["0", "plural", { "one": ["فولڈر"], "other": ["فولڈرز"] }]],
"pd0UH2": ["دائیں ترتیب دیں"],
+ "pd6t3G": [
+ "OpenKnowledge آپ کے git ہوسٹس سے جڑنے کے لیے جو اکاؤنٹس اور رسائی ٹوکن استعمال کرتا ہے، انہیں سنبھالیں۔"
+ ],
"peq20S": [
"اس چیٹ میں براؤزر دستیاب نہیں ہے، کیونکہ اسے سیٹ اپ نہیں کیا جا سکا۔ OpenKnowledge کے لاگ میں تفصیلات موجود ہیں۔"
],
@@ -5072,6 +5095,7 @@
"qi17kj": ["اس ورک اسپیس کے کسی .excalidraw بورڈ کا لائیو اسنیپ شاٹ ایمبیڈ کریں۔"],
"qi1F96": ["فائل ایکسپلورر میں دکھائیں"],
"qiRoLb": ["اس ہفتے میں نے جو کچھ بدلا اس کا خلاصہ کریں"],
+ "qimTXH": ["OpenKnowledge اس پروجیکٹ کے لیے GitHub میں سائن اِن نہیں کر سکتا۔"],
"qioCwA": ["صفحہ ", ["pageNumber"], " پر جائیں"],
"qjHMHf": ["مطابقت پذیری بند نہیں ہو سکی — ", ["detail"]],
"qkqG0b": ["اپ سٹریم والا لیں"],
@@ -5127,6 +5151,9 @@
"rVxu1k": ["ابھی کوئی صفحہ یہاں لنک نہیں کرتا۔"],
"rXz97P": ["آئٹمز کی نمبر شدہ فہرست۔"],
"rZ9HZq": ["کرنا ہے"],
+ "rZFxkH": [
+ "وہ ہوسٹ نام درج کریں جس سے git جڑتا ہے، اختیاری :port کے ساتھ اور بغیر اسکیم یا پاتھ کے، مثلاً git.example.com۔"
+ ],
"rZVMkf": ["بصری ایڈیٹر کا تبدیلی اِن پٹ فوکس میں ہے"],
"radOpL": ["تصویر ", ["identity"], "۔ حوالہ پر جائیں۔"],
"rageVb": ["براہِ راست پیش منظر کے پین کے ساتھ حسبِ ضرورت HTML (سینڈ باکسڈ iframe)۔"],
@@ -5334,6 +5361,9 @@
"tlGXxX": ["خودکار (صرف کھینچیں)"],
"tnG-m6": ["خودکار مطابقت پذیری روکی گئی ہے — جاری رکھنے کے لیے سائن اِن کریں۔"],
"toyw51": ["Mermaid خاکے کے کنٹرولز"],
+ "tpOnU9": [
+ "OpenKnowledge نے اس ہوسٹ کے لیے کوئی کریڈینشل محفوظ نہیں کیا۔ ترتیبات میں ٹوکن شامل کریں، یا git کو وہ کریڈینشلز استعمال کرنے دیں جو اس کے پاس پہلے سے ہیں۔"
+ ],
"tqQBwN": ["کوئی بھی اسکرپٹ جائزے کے لیے دکھائی جاتی ہے، کبھی چلائی نہیں جاتی۔"],
"troubleshooting.claude-desktop.per-tool-approval": [
["agent"],
@@ -5491,6 +5521,7 @@
"uoJF_D": ["اسے ترتیب دینا یا شروع کرنا بہت مشکل تھا"],
"uqs8Gd": [["others", "plural", { "one": ["#", " دیگر"], "other": ["#", " دیگر"] }]],
"ur2XSb": ["بصری ایڈیٹر"],
+ "uraHF0": ["GitLab"],
"uuoHOU": ["کمانڈ ناکام ہو گئی۔"],
"uwzRx4": [
"سست یا محدود میموری والے ایمبیڈنگ سرورز کے لیے انڈیکسنگ درخواست کا حجم اور ٹائم آؤٹ ایڈجسٹ کریں۔ زیادہ تر سیٹ اپ میں طے شدہ اقدار ہی رکھنی چاہییں۔"
@@ -5597,6 +5628,9 @@
"vy_VIN": [
"git میں ٹریک شدہ — اپ ڈیٹس آپ کے ریپو کے ذریعے آتی ہیں (کھینچ کر یا CI سے)، خودکار اپ ڈیٹ سے نہیں"
],
+ "w-Wt3H": [
+ "مطابقت پذیری جاری رکھنے کے لیے دوبارہ منسلک ہونا ضروری ہے۔ اس ہوسٹ کے لیے git جو SSH کلید یا محفوظ اسناد استعمال کرتا ہے، انہیں چیک کریں۔"
+ ],
"w0YVAE": ["مہارت نوڈز دکھائیں"],
"w3tVpc": ["ابھی کوئی لنک نہیں۔ گراف بنانے کے لیے وکی لنکس یا Markdown لنکس شامل کریں۔"],
"w3vFfL": ["فائلیں چھپائیں"],
@@ -5714,7 +5748,6 @@
"x57cJf": ["لنک کھولیں"],
"xAlHfe": [["basename"], " — ٹیکسٹ ایڈیٹر"],
"xBFg6z": [["0"], " پلگ اِن سے"],
- "xBjIs7": ["اس پروجیکٹ کے لیے GitHub سائن ان دستیاب نہیں"],
"xCJdfg": ["صاف کریں"],
"xCdTnb": ["نیا ٹیب بند کریں"],
"xD4Xm2": ["حاصل کرنا"],
@@ -5726,6 +5759,9 @@
"xG4tb6": ["«", ["docName"], "» سے رابطہ ختم ہو گیا۔"],
"xG8Ish": ["منصوبے میں نہیں"],
"xHGM4U": ["HTML کا پیش منظر چھپائیں"],
+ "xJ7qrb": [
+ "اس git ہوسٹ کے لیے کوئی کریڈینشل محفوظ نہیں ہے۔ ترتیبات میں ٹوکن شامل کریں، یا git کو وہ کریڈینشلز استعمال کرنے دیں جو اس کے پاس پہلے سے ہیں۔"
+ ],
"xK291b": ["دو صفحے (طاق)"],
"xKDsGS": [["1"], " میں سطر ", ["0"], " پر جائیں"],
"xKcXG6": [
@@ -5811,6 +5847,7 @@
"yLEyuq": ["مصنوعات کی اپ ڈیٹس آپ کے اِن باکس میں۔"],
"yLq4w4": ["علیحدہ کنندہ"],
"yLwx9e": ["والد ڈائریکٹری ہی سِم لنک ہے — اسے واپس لینے کے لیے اسی فولڈر کا لنک ختم کریں۔"],
+ "yLyiQV": ["محفوظ ٹوکن میں وہ اجازتیں نہیں ہیں جو اس ہوسٹ کو پُش کرنے کے لیے درکار ہیں۔"],
"yMgL_E": ["تلاش کے فیلڈ میں نیویگیشن"],
"yOjRUV": ["کوئی AI ٹول نہیں ملا۔ اس مہارت کو استعمال کرنے کے لیے ایک نصب کریں۔"],
"yQE2r9": ["لوڈ ہو رہا ہے"],
@@ -5901,6 +5938,7 @@
"zLak8b": ["نیا ٹیب فعال کریں"],
"zMmwh4": ["ایک تھیم منتخب کریں یا اپنی تھیم بنائیں۔"],
"zWZBPx": ["قسم تبدیل ہوئی"],
+ "zXZJoN": ["ٹوکن شامل کریں"],
"zXj1rA": ["معنی کے لحاظ سے تلاش کریں"],
"zYp8Sr": [
"<0>ترمیم شدہ</0> کا نشان ان قواعد کو ظاہر کرتا ہے جو آپ کی کنفیگ واضح طور پر مقرر کرتی ہے — براہِ راست، یا <1>extends</1> کے ذریعے وراثت میں۔ بغیر نشان والے قواعد اپنی طے شدہ حالت پر رہتے ہیں۔"
diff --git a/packages/app/src/locales/ur/messages.po b/packages/app/src/locales/ur/messages.po
index f98c0ea42..7170aa169 100644
--- a/packages/app/src/locales/ur/messages.po
+++ b/packages/app/src/locales/ur/messages.po
@@ -1548,6 +1548,10 @@ msgstr "<0>{trimmedSlug}</0> نام کا ٹیمپلیٹ یہاں پہلے سے
msgid "A title, description, tags — anything that describes this folder."
msgstr "عنوان، تفصیل، ٹیگز — کوئی بھی چیز جو اس فولڈر کو بیان کرے۔"
+#: src/components/settings/AccountSection.tsx
+msgid "A token added here only applies to HTTPS remotes, and this project's remote doesn't use HTTPS."
+msgstr "یہاں شامل کیا گیا ٹوکن صرف HTTPS ریموٹس پر لاگو ہوتا ہے، اور اس پروجیکٹ کا ریموٹ HTTPS استعمال نہیں کرتا۔"
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "A worktree folder for {shareBranch} already exists."
msgstr "{shareBranch} کے لیے ورک ٹری فولڈر پہلے سے موجود ہے۔"
@@ -1600,9 +1604,8 @@ msgid "Accept their deletion"
msgstr "ان کا حذف قبول کریں"
#: src/components/settings/AccountSection.tsx
-#: src/components/settings/SettingsDialogShell.tsx
-msgid "Account"
-msgstr "اکاؤنٹ"
+msgid "Access token"
+msgstr "رسائی ٹوکن"
#: src/components/TemplateRow.tsx
msgid "Actions for {label}"
@@ -1681,6 +1684,10 @@ msgstr "خصوصیت شامل کریں"
msgid "Add a starter pack"
msgstr "ابتدائی پیک شامل کریں"
+#: src/components/settings/AccountSection.tsx
+msgid "Add an access token for a GitLab, Gitea, Bitbucket, Azure DevOps or self-hosted git server. Without one, git uses the credentials it already has saved for that host; with one, OpenKnowledge uses the token instead."
+msgstr "GitLab، Gitea، Bitbucket، Azure DevOps یا خود میزبانی والے git سرور کے لیے رسائی ٹوکن شامل کریں۔ ٹوکن کے بغیر git اس ہوسٹ کے لیے پہلے سے محفوظ اسناد استعمال کرتا ہے؛ ٹوکن ہونے پر OpenKnowledge ان کی جگہ ٹوکن استعمال کرتا ہے۔"
+
#: src/components/settings/OkignoreSection.tsx
msgid "Add another pattern"
msgstr "ایک اور پیٹرن شامل کریں"
@@ -1810,6 +1817,12 @@ msgstr "لغت میں شامل کریں"
msgid "Add to prompt"
msgstr "پرامپٹ میں شامل کریں"
+#: src/components/settings/AccountSection.tsx
+#: src/components/SyncStatusBadge.tsx
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Add token"
+msgstr "ٹوکن شامل کریں"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Add value"
msgstr "قدر شامل کریں"
@@ -1820,6 +1833,10 @@ msgstr "قدر شامل کریں"
msgid "Added"
msgstr "شامل کر دیا گیا"
+#: src/components/settings/AccountSection.tsx
+msgid "Adding"
+msgstr "شامل کیا جا رہا ہے"
+
#: src/components/settings/AgentConnectionDialogs.tsx
msgid "Adds a global OpenKnowledge MCP entry for this agent."
msgstr "اس ایجنٹ کے لیے ایک عالمی OpenKnowledge MCP اندراج شامل کرتا ہے۔"
@@ -2335,6 +2352,10 @@ msgstr "منسلکات کا مجموعی حجم 3 MB سے کم ہونا چاہی
msgid "Authenticated as {login}."
msgstr "{login} کے طور پر تصدیق کی گئی۔"
+#: src/components/SyncStatusBadge.tsx
+msgid "Authentication failed for this git host. Add a token for it in Settings, or replace the one stored."
+msgstr "اس git ہوسٹ کے لیے تصدیق ناکام رہی۔ ترتیبات میں اس کے لیے ٹوکن شامل کریں، یا محفوظ ٹوکن بدل دیں۔"
+
#: src/editor/slash-command/component-items.tsx
msgid "Authoritative content; mirrored verbatim everywhere it's referenced."
msgstr "مستند مواد؛ جہاں بھی اس کا حوالہ ہو وہاں لفظ بہ لفظ منعکس ہوتا ہے۔"
@@ -2536,6 +2557,11 @@ msgstr "بڑا سیکشن عنوان۔"
msgid "Bird wiki"
msgstr "پرندوں کی وکی"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "Bitbucket"
+msgstr "Bitbucket"
+
#: src/components/NewItemDialog.tsx
msgid "Blank note"
msgstr "خالی نوٹ"
@@ -3605,8 +3631,8 @@ msgid "Connect"
msgstr "منسلک کریں"
#: src/components/settings/AccountSection.tsx
-msgid "Connect a GitHub account to browse and sync your repositories."
-msgstr "اپنی ریپازٹریز براؤز اور مطابق کرنے کے لیے GitHub اکاؤنٹ منسلک کریں۔"
+msgid "Connect a GitHub account to browse and publish GitHub repositories."
+msgstr "GitHub ریپازٹریز براؤز کرنے اور شائع کرنے کے لیے کوئی GitHub اکاؤنٹ جوڑیں۔"
#: src/components/settings/SyncSection.tsx
msgid "Connect an existing repository"
@@ -3698,6 +3724,7 @@ msgid "Connection dropped"
msgstr "کنکشن منقطع ہو گیا"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Connection error — try again"
msgstr "کنکشن کی خرابی — دوبارہ کوشش کریں"
@@ -5937,6 +5964,10 @@ msgstr "{minimum} اور {maximum} کے درمیان ایک صحیح عدد در
msgid "Enter at least 3 characters to search by meaning."
msgstr "معنی کے لحاظ سے تلاش کرنے کے لیے کم از کم 3 حروف درج کریں۔"
+#: src/components/settings/AccountSection.tsx
+msgid "Enter the host name git connects to, with an optional :port and no scheme or path, for example git.example.com."
+msgstr "وہ ہوسٹ نام درج کریں جس سے git جڑتا ہے، اختیاری :port کے ساتھ اور بغیر اسکیم یا پاتھ کے، مثلاً git.example.com۔"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Enter the public origin your tunnel serves, for example https://notes.example.com"
msgstr "وہ عوامی اوریجن درج کریں جو آپ کا ٹنل سرو کرتا ہے، مثلاً https://notes.example.com"
@@ -6412,6 +6443,7 @@ msgid "Failed to start sign-in — try again"
msgstr "سائن اِن شروع نہیں ہو سکا — دوبارہ کوشش کریں"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Failed to store the token — try again"
msgstr "ٹوکن محفوظ نہیں ہو سکا — دوبارہ کوشش کریں"
@@ -6885,6 +6917,11 @@ msgctxt "settings search keyword"
msgid "GHES"
msgstr "GHES"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Git"
+msgstr "Git"
+
#: src/components/ExploreSkills.tsx
msgid "Git & PRs"
msgstr "Git اور PRs"
@@ -6893,6 +6930,10 @@ msgstr "Git اور PRs"
msgid "Git can't track this folder — it's empty or contains only ignored files. The link won't work until you add a tracked document."
msgstr "Git اس فولڈر کو ٹریک نہیں کر سکتا — یہ خالی ہے یا اس میں صرف نظر انداز شدہ فائلیں ہیں۔ جب تک آپ کوئی ٹریک شدہ دستاویز شامل نہ کریں لنک کام نہیں کرے گا۔"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it."
+msgstr "git اس ہوسٹ کے ساتھ تصدیق نہیں کر سکا۔ اس کے لیے git جو SSH کلید یا محفوظ اسناد استعمال کرتا ہے، انہیں چیک کریں۔"
+
#: src/components/RecentProjectsMenu.tsx
msgid "Git has locked this worktree, but it can still be opened."
msgstr "Git نے اس ورک ٹری کو لاک کیا ہے، لیکن اسے اب بھی کھولا جا سکتا ہے۔"
@@ -6952,10 +6993,6 @@ msgstr "GitHub Enterprise Server ہوسٹس"
msgid "GitHub sign-in is missing or expired. Reconnect to resume syncing."
msgstr "GitHub کا سائن اِن غائب یا میعاد ختم ہے۔ مطابقت پذیری جاری رکھنے کے لیے دوبارہ منسلک ہوں۔"
-#: src/components/settings/AccountSection.tsx
-msgid "GitHub sign-in isn't available for this project"
-msgstr "اس پروجیکٹ کے لیے GitHub سائن ان دستیاب نہیں"
-
#: src/components/ImportSkillForm.tsx
msgid "GitHub, a git URL, or a local path."
msgstr "GitHub، کوئی git URL، یا مقامی راستہ۔"
@@ -6964,6 +7001,11 @@ msgstr "GitHub، کوئی git URL، یا مقامی راستہ۔"
msgid "github.com is always recognized, so it doesn't need to be added."
msgstr "github.com ہمیشہ پہچانا جاتا ہے، اس لیے اسے شامل کرنے کی ضرورت نہیں۔"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "GitLab"
+msgstr "GitLab"
+
#: src/components/settings/SavedThemesTiles.tsx
msgid "Give it a name before editing its colors."
msgstr "اس کے رنگوں میں ترمیم سے پہلے اسے نام دیں۔"
@@ -7318,6 +7360,10 @@ msgstr "افقی پِل سٹرپ + نیچے فعال پینل؛ پینل بدل
msgid "Horizontal rule that divides sections."
msgstr "افقی لکیر جو سیکشنز کو الگ کرتی ہے۔"
+#: src/components/settings/AccountSection.tsx
+msgid "Host"
+msgstr "ہوسٹ"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Hosting is on. The server is running on port {boundPort}. Reach it through your tunnel."
msgstr "ہوسٹنگ آن ہے۔ سرور پورٹ {boundPort} پر چل رہا ہے۔ اپنے ٹنل کے ذریعے اس تک رسائی حاصل کریں۔"
@@ -8611,8 +8657,8 @@ msgid "Manage skill folders"
msgstr "مہارت کے فولڈرز سنبھالیں"
#: src/components/settings/AccountSection.tsx
-msgid "Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."
-msgstr "وہ GitHub اکاؤنٹ سنبھالیں جو OpenKnowledge آپ کی ریپازٹریز براؤز اور مطابق کرنے کے لیے استعمال کرتا ہے۔"
+msgid "Manage the accounts and access tokens OpenKnowledge uses to connect to your git hosts."
+msgstr "OpenKnowledge آپ کے git ہوسٹس سے جڑنے کے لیے جو اکاؤنٹس اور رسائی ٹوکن استعمال کرتا ہے، انہیں سنبھالیں۔"
#: src/components/settings/AgentConnectionDialogs.tsx
#: src/components/settings/AgentConnectionsSection.tsx
@@ -9442,6 +9488,10 @@ msgstr "اس ورژن میں مواد کی کوئی تبدیلی نہیں۔"
msgid "No content changes in this version"
msgstr "اس ورژن میں مواد کی کوئی تبدیلی نہیں"
+#: src/components/SyncStatusBadge.tsx
+msgid "No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "اس git ہوسٹ کے لیے کوئی کریڈینشل محفوظ نہیں ہے۔ ترتیبات میں ٹوکن شامل کریں، یا git کو وہ کریڈینشلز استعمال کرنے دیں جو اس کے پاس پہلے سے ہیں۔"
+
#: src/components/GraphPanel.tsx
msgid "No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."
msgstr "کوئی منقطع صفحہ نہیں۔ صفحات یہاں صرف اسی وقت ظاہر ہوتے ہیں جب ان کے گراف میں نہ آنے والے اور نہ جانے والے کنارے ہوں۔"
@@ -10394,6 +10444,10 @@ msgstr "کھولا جا رہا ہے..."
msgid "OpenKnowledge"
msgstr "OpenKnowledge"
+#: src/components/AuthModal.tsx
+msgid "OpenKnowledge can't sign in to GitHub for this project."
+msgstr "OpenKnowledge اس پروجیکٹ کے لیے GitHub میں سائن اِن نہیں کر سکتا۔"
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge checked {subject}"
msgstr "OpenKnowledge نے {subject} کی جانچ کی"
@@ -10406,10 +10460,6 @@ msgstr "OpenKnowledge نے پروجیکٹ کی جانچ کی"
msgid "OpenKnowledge could not find this agent on this machine."
msgstr "OpenKnowledge کو اس مشین پر یہ ایجنٹ نہیں ملا۔"
-#: src/components/settings/AccountSection.tsx
-msgid "OpenKnowledge couldn't find a host name in this project's git remote, so it can't tell which GitHub server to sign in to."
-msgstr "OpenKnowledge کو اس پروجیکٹ کے git ریموٹ میں کوئی ہوسٹ نیم نہیں ملا، اس لیے وہ طے نہیں کر سکتا کہ کس GitHub سرور میں سائن ان کرنا ہے۔"
-
#: src/lib/worktree-create-error.ts
msgid "OpenKnowledge couldn't finish setting up this project. The worktree was created but not opened."
msgstr "OpenKnowledge اس پروجیکٹ کا سیٹ اپ مکمل نہیں کر سکا۔ ورک ٹری بن گئی، لیکن کھولی نہیں گئی۔"
@@ -10466,6 +10516,10 @@ msgstr "OpenKnowledge نے ایک دستاویز میں ترمیم کی"
msgid "OpenKnowledge files were removed"
msgstr "OpenKnowledge کی فائلیں ہٹا دی گئیں"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "OpenKnowledge نے اس ہوسٹ کے لیے کوئی کریڈینشل محفوظ نہیں کیا۔ ترتیبات میں ٹوکن شامل کریں، یا git کو وہ کریڈینشلز استعمال کرنے دیں جو اس کے پاس پہلے سے ہیں۔"
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge imported {source}"
msgstr "OpenKnowledge نے {source} درآمد کیا"
@@ -10694,6 +10748,11 @@ msgstr "دیگر"
msgid "Other"
msgstr "دیگر"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Other Git hosts"
+msgstr "دیگر Git ہوسٹس"
+
#: src/components/settings/SharingSection.tsx
msgid "Other OK paths are tracked upstream:"
msgstr "OK کے دیگر راستے اپ سٹریم ٹریک ہوتے ہیں:"
@@ -11628,6 +11687,14 @@ msgstr "دوبارہ منسلک ہونا ضروری ہے"
msgid "Reconnect required to keep syncing."
msgstr "مطابقت پذیری جاری رکھنے کے لیے دوبارہ منسلک ہونا ضروری ہے۔"
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Add a token for this host in Settings, or replace the one stored."
+msgstr "مطابقت پذیری جاری رکھنے کے لیے دوبارہ منسلک ہونا ضروری ہے۔ ترتیبات میں اس ہوسٹ کے لیے ٹوکن شامل کریں، یا محفوظ ٹوکن بدل دیں۔"
+
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Check the SSH key or saved credentials git uses for this host."
+msgstr "مطابقت پذیری جاری رکھنے کے لیے دوبارہ منسلک ہونا ضروری ہے۔ اس ہوسٹ کے لیے git جو SSH کلید یا محفوظ اسناد استعمال کرتا ہے، انہیں چیک کریں۔"
+
#: src/presence/use-sync-toasts.ts
msgid "Reconnected"
msgstr "دوبارہ منسلک ہو گیا"
@@ -14819,6 +14886,10 @@ msgstr "اسکلز کی فہرست اپنے اسکیما سے مطابقت نہ
msgid "The source folder itself does not move."
msgstr "ماخذ فولڈر خود نہیں ہلتا۔"
+#: src/components/SyncStatusBadge.tsx
+msgid "The stored token is missing the permissions this host needs to push."
+msgstr "محفوظ ٹوکن میں وہ اجازتیں نہیں ہیں جو اس ہوسٹ کو پُش کرنے کے لیے درکار ہیں۔"
+
#: src/components/TemplateProperties.tsx
msgid "The template's filename (without `.md`)."
msgstr "ٹیمپلیٹ کی فائل کا نام (`.md` کے بغیر)۔"
@@ -14877,6 +14948,10 @@ msgstr ".ok/local/config.yml میں terminal.shell ایگزیکیوٹیبل نہ
msgid "The token needs the repo and read:user scopes."
msgstr "ٹوکن کو repo اور read:user دائرہ کار درکار ہیں۔"
+#: src/components/settings/AccountSection.tsx
+msgid "The username git sends with the token. Some hosts expect a fixed value: type <0>x-bitbucket-api-token-auth</0> for a Bitbucket API token, <1>x-token-auth</1> for a Bitbucket repository or workspace access token, or <2>oauth2</2> for GitLab. For Gitea, use your Gitea username. Azure DevOps accepts any value."
+msgstr "وہ صارف نام جو git ٹوکن کے ساتھ بھیجتا ہے۔ کچھ ہوسٹس ایک مقررہ قدر کی توقع کرتے ہیں: Bitbucket API ٹوکن کے لیے <0>x-bitbucket-api-token-auth</0>، Bitbucket ریپوزٹری یا ورک اسپیس رسائی ٹوکن کے لیے <1>x-token-auth</1>، یا GitLab کے لیے <2>oauth2</2> لکھیں۔ Gitea کے لیے اپنا Gitea صارف نام استعمال کریں۔ Azure DevOps کوئی بھی قدر قبول کرتا ہے۔"
+
#: src/lib/tab-session-restore-recovery-notice.ts
msgid "The workspace opened without it so the app could start."
msgstr "ایپ شروع ہو سکے اس لیے ورک اسپیس اس کے بغیر کھلی۔"
@@ -15405,10 +15480,6 @@ msgstr "یہ پروجیکٹ git ریپازٹری نہیں ہے، اس لیے و
msgid "This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."
msgstr "یہ پروجیکٹ صرف اسی کمپیوٹر پر ہے۔ اس کا بیک اپ رکھنے اور دوسروں کے ساتھ شیئر کرنے کے لیے اسے GitHub سے منسلک کریں۔"
-#: src/components/settings/AccountSection.tsx
-msgid "This project's git remote is on {host}, which OpenKnowledge doesn't recognize as a GitHub host. If {host} runs GitHub Enterprise Server, add it to GitHub Enterprise Server hosts below, then restart OpenKnowledge."
-msgstr "اس پروجیکٹ کا git ریموٹ {host} پر ہے، جسے OpenKnowledge GitHub ہوسٹ کے طور پر نہیں پہچانتا۔ اگر {host} پر GitHub Enterprise Server چلتا ہے تو اسے نیچے GitHub Enterprise Server ہوسٹس میں شامل کریں، پھر OpenKnowledge دوبارہ شروع کریں۔"
-
#: src/components/DocumentErrorBoundary.tsx
msgid "This project's running server doesn't support live editing. Restart OpenKnowledge to fix."
msgstr "اس پروجیکٹ کا چلتا ہوا سرور براہِ راست ترمیم کی حمایت نہیں کرتا۔ ٹھیک کرنے کے لیے OpenKnowledge دوبارہ چلائیں۔"
@@ -15505,6 +15576,7 @@ msgid "This usually means one of:"
msgstr "اس کا عام طور پر مطلب ان میں سے کوئی ایک ہے:"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
msgid "This window can't store a token — open Settings from the main app window."
msgstr "یہ ونڈو ٹوکن محفوظ نہیں کر سکتی — ایپ کی مرکزی ونڈو سے ترتیبات کھولیں۔"
@@ -15658,6 +15730,15 @@ msgstr "خطِ تحت کی فارمیٹنگ بدلیں۔"
msgid "Toggles the pattern {0}/**"
msgstr "پیٹرن {0}/** ٹوگل کریں"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "token"
+msgstr "ٹوکن"
+
+#: src/components/settings/AccountSection.tsx
+msgid "Token stored for {login} on {host}. To remove it, run <0>ok auth signout --host {host}</0>."
+msgstr "{host} پر {login} کے لیے ٹوکن محفوظ کر لیا گیا۔ اسے ہٹانے کے لیے <0>ok auth signout --host {host}</0> چلائیں۔"
+
#: src/components/SkillBundlePreview.tsx
#: src/components/SkillProperties.tsx
msgid "tokens"
@@ -16244,6 +16325,10 @@ msgstr "صارف"
msgid "User plugins are personal to this device — turn them on or off here. Each enabled plugin gets its own page under Plugins in the settings sidebar."
msgstr "صارف کے پلگ اِنز اسی آلے تک محدود ہیں — انہیں یہاں فعال یا بند کریں۔ ہر فعال پلگ اِن کو ترتیبات کے سائیڈ بار میں پلگ اِنز کے تحت اپنا صفحہ ملتا ہے۔"
+#: src/components/settings/AccountSection.tsx
+msgid "Username"
+msgstr "صارف نام"
+
#: src/components/settings/SearchSection.tsx
msgid "Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."
msgstr "<0>OK_EMBEDDINGS_API_KEY</0> ماحولیاتی متغیر استعمال ہو رہا ہے (OpenKnowledge سے باہر سنبھالا جاتا ہے)۔"
diff --git a/packages/app/src/locales/zh-Hans/messages.json b/packages/app/src/locales/zh-Hans/messages.json
index 4f9e94d4a..5984259d1 100644
--- a/packages/app/src/locales/zh-Hans/messages.json
+++ b/packages/app/src/locales/zh-Hans/messages.json
@@ -33,6 +33,9 @@
],
"-l6jM7": ["使用 + 按钮开始对话,或从页面启动智能体。"],
"-lCAuQ": ["正在加载关系图"],
+ "-nA68n": [
+ "为 GitLab、Gitea、Bitbucket、Azure DevOps 或自托管 git 服务器添加访问令牌。没有令牌时,git 会使用它已为该主机保存的凭据;添加令牌后,OpenKnowledge 改用该令牌。"
+ ],
"-o5XAG": ["会连同你的备注和应用版本一起私下发送给 OpenKnowledge 团队。绝不会公开发布。"],
"-oHckY": ["OpenKnowledge 读取了设置 ", ["key"]],
"-othoN": ["此主题文件过大"],
@@ -213,6 +216,7 @@
"1vczDE": ["打开 ", ["displayName"], " Desktop"],
"1vn0CI": ["服务器响应无效"],
"1xui0Q": ["加载本地文件失败"],
+ "1yHVE-": ["正在添加"],
"2-3Mlu": ["无法取消置顶 ", ["name"]],
"20LVKb": ["此对话之外的某个来源要求智能体进程停止(", ["signal"], ")。"],
"2277Tu": ["折叠关系图"],
@@ -415,6 +419,15 @@
"4mp6Tv": ["OpenKnowledge 列出了已安装的技能"],
"4niEzY": ["沙箱化的 HTML 嵌入——写下 HTML,实时查看渲染效果。"],
"4nj6n8": ["/api/config 返回了 HTTP ", ["code"]],
+ "4p8Baj": [
+ "已为 ",
+ ["host"],
+ " 上的 ",
+ ["login"],
+ " 保存令牌。要移除它,请运行 <0>ok auth signout --host ",
+ ["host"],
+ "</0>。"
+ ],
"4pDZ2N": ["已把“", ["0"], "”从其他所有位置移除——它的来源文件夹仍会加载"],
"4r6p_B": [
"此命令包含隐藏字符,可能使其看起来与实际运行的内容不同。这些字符在此显示为 ⟨U+…⟩。"
@@ -637,13 +650,6 @@
"7YRrJ9": [
"在 OpenKnowledge 桌面应用中可用。在终端里可使用<0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2>。"
],
- "7_I248": [
- "此项目的 git 远程位于 ",
- ["host"],
- ",OpenKnowledge 未将其识别为 GitHub 主机。如果 ",
- ["host"],
- " 运行的是 GitHub Enterprise Server,请在下方的“GitHub Enterprise Server 主机”中添加它,然后重启 OpenKnowledge。"
- ],
"7_bFEL": ["拖动 ", ["patternText"], " 以重新排序"],
"7a0YcF": ["按<0>空格</0>或点击 blob 开始"],
"7aNk5D": ["OpenKnowledge 编辑了 ", ["subject"]],
@@ -672,6 +678,7 @@
"7lFX_h": ["立即改向"],
"7m3Ade": ["安装量:"],
"7qRHf0": ["为 Claude Chat 和 Cowork 安装"],
+ "7sNhEz": ["用户名"],
"7uBlRT": ["复制文件树中当前聚焦的项目,以便用「粘贴」创建副本。"],
"7vxWET": ["无法预览入门包。"],
"7wogIQ": [["0", "plural", { "other": ["插件"] }]],
@@ -804,6 +811,7 @@
"9bCiQ8": ["没有页面缺少入链。"],
"9bG48P": ["正在发送"],
"9clcD5": ["打开带 #", ["chip"], " 标签的文档"],
+ "9djC8C": ["连接一个 GitHub 账户,以浏览和发布 GitHub 仓库。"],
"9euN0m": [["count", "plural", { "other": ["另有 ", "#", " 位跨文档参与者"] }]],
"9fhQRL": ["Beta 通道"],
"9fvog2": ["无法预览:", ["errorDetail"]],
@@ -890,7 +898,6 @@
["total"],
" 项"
],
- "AeXO77": ["账户"],
"AgoIW4": [
["source"],
":已更新 ",
@@ -903,6 +910,7 @@
["detail"]
],
"AhoGwP": ["设置 OpenKnowledge 集成"],
+ "Ai2U7L": ["主机"],
"AiNMQ7": ["这个项目只存在于这台电脑上。把它连接到 GitHub 即可备份并与他人共享。"],
"Aif3E7": ["开启语义搜索"],
"AkA6DO": ["属于 ", ["0"], " 插件——只读;打开它可编辑一份副本"],
@@ -1143,7 +1151,6 @@
"E2Mv-X": ["复制源码"],
"E4XYYH": ["为这个项目启用终端"],
"E5WeIy": ["重新打开最近关闭的那个编辑器标签页。"],
- "E6lrpp": ["管理 OpenKnowledge 用来浏览和同步你的仓库的 GitHub 账户。"],
"E7BhZn": ["空白笔记"],
"E8NbNG": ["无法加载工作树。"],
"E91VZY": ["在新窗口中打开"],
@@ -1157,7 +1164,6 @@
"EEYbdt": ["发布"],
"EFfGAv": ["该消息已发出——你的编辑未生效。"],
"EHu0x2": ["正在同步"],
- "EJuO7B": ["连接一个 GitHub 账户,以便浏览和同步你的仓库。"],
"EKwNEe": ["缓存的嵌入向量属于生成它们的端点和模型,因此这会从头重建索引。"],
"ELYtNJ": [".ok 文件夹"],
"EL_YRd": ["<0>api-spec</0> 的镜像"],
@@ -1290,6 +1296,9 @@
"FgRAvd": ["日志与系统信息"],
"Fhp4Gn": ["查看插件"],
"Fim5F3": ["嵌入"],
+ "FioJgb": [
+ "需要重新连接才能继续同步。请在「设置」中为这个主机添加令牌,或者替换已保存的令牌。"
+ ],
"FiyNln": ["跳到属性中选中的文本"],
"FjkaiT": ["缩小"],
"Fjz6aJ": ["发送到新对话"],
@@ -1648,6 +1657,7 @@
"KvwJv8": ["部分文件未列出:工作区的更改过多。"],
"Kx881F": ["已恢复 ", ["0"], "。"],
"KziH2K": ["快速"],
+ "L-crEu": ["git 无法向此主机进行身份验证。请检查 git 为该主机使用的 SSH 密钥或已保存的凭据。"],
"L-rMC9": ["重置为默认值"],
"L1BQTH": [["0"], " 尚未安装——正在打开它的下载页面。"],
"L1ZE3M": ["文档统计"],
@@ -1694,6 +1704,7 @@
"LRgZAt": [["owner"], "/", ["name"], " 已存在"],
"LSuMte": [["totalCount"], " 项中的 ", ["0"], " 项"],
"LTeJuX": ["切换全屏"],
+ "LVWA9A": ["这个 git 主机的身份验证失败。请在「设置」中为它添加令牌,或者替换已保存的令牌。"],
"LXIm4m": ["上下文窗口"],
"LXdWeS": ["中号章节标题。"],
"LXfNU-": ["导航与建议"],
@@ -1794,6 +1805,7 @@
"Mj8R8K": ["无法安装技能:", ["0"]],
"MmDDWK": ["最近打开"],
"Mnavhe": [["propPanelDescriptorLabel"], " 属性"],
+ "MpZRQy": ["Git"],
"MqQoV-": ["描述你想构建的东西、新建空白文件,或者从模板生成。"],
"MqsbfN": ["要开启外部链接预览吗?"],
"MrUmCD": ["未知的构建失败"],
@@ -1955,6 +1967,7 @@
"OPOiKn": ["内容规则"],
"OTF92M": ["标签 <0>(可选的显示文本)</0>"],
"OVjNeX": ["终端 ", ["0"]],
+ "OWs-8P": ["在此添加的令牌只适用于 HTTPS 远程仓库,而此项目的远程仓库不使用 HTTPS。"],
"OX2Neh": ["行内代码"],
"OXb_Df": ["设置内容"],
"OXdGnd": ["问题"],
@@ -2064,6 +2077,7 @@
["filePath"],
" 中的冲突。说明我应该在 OpenKnowledge 的冲突视图中比较哪些内容;我会在那里选择并应用解决方案。"
],
+ "Q14Keq": ["Bitbucket"],
"Q1mtyd": ["隐藏侧边栏"],
"Q5fqMz": ["连接出错——请重试"],
"Q6hhn8": ["偏好设置"],
@@ -2286,6 +2300,7 @@
"SiUUCS": ["下一处匹配"],
"SkMZlS": ["无法移除 <0>", ["targetGitPath"], "</0>:", ["removeGitError"]],
"SkTkKV": ["智能体没有停止。强制停止将关闭此对话并退出智能体。"],
+ "SkUcEr": ["访问令牌"],
"Ske_wc": [
"用户插件是这台设备的个人设置——在这里开启或关闭它们。每个启用的插件在设置侧边栏的「插件」下都有自己的页面。"
],
@@ -2583,9 +2598,6 @@
"XAyxsa": ["检出远程分支"],
"XBBZnv": ["链接目标“", ["shown"], "”未指向现有文档。"],
"XBgr2S": ["复制进来"],
- "XBpH6-": [
- "OpenKnowledge 在此项目的 git 远程地址中找不到主机名,因此无法确定要登录哪个 GitHub 服务器。"
- ],
"XDzAnp": ["在新标签页中打开"],
"XF1kgP": ["来自 ", ["source"], " 的内容均已是最新"],
"XGKy1z": ["无法显示图片"],
@@ -2975,6 +2987,9 @@
"arUUsK": ["产品动态"],
"ax9kie": ["链接预览设置尚未加载——请稍后再试"],
"axQ1h6": ["还有什么想补充的吗?(可选)"],
+ "azrR7I": [
+ "git 随令牌一起发送的用户名。有些主机要求填写固定值:Bitbucket API 令牌填 <0>x-bitbucket-api-token-auth</0>,Bitbucket 仓库或工作区访问令牌填 <1>x-token-auth</1>,GitLab 填 <2>oauth2</2>。Gitea 请填你的 Gitea 用户名。Azure DevOps 可填任意值。"
+ ],
"b18t0_": ["关闭差异视图"],
"b1FDss": ["滚动到开头"],
"b2ezG_": ["两个都保留了——“", ["0"], "”现在是一个独立的技能"],
@@ -3251,6 +3266,7 @@
"e8zRrb": ["显示「文件」"],
"e8zYa8": ["无法在 worktree 中打开 ", ["shareBranch"], "。请重试。"],
"e9sHSO": ["从上次的位置继续"],
+ "eAYJMv": ["令牌"],
"eBGWcy": [
"Open Knowledge 工具不可用,因为项目文件夹缺失、无法访问或已更改。请检查其位置和权限,然后重试。"
],
@@ -3751,6 +3767,7 @@
"jZ_E5M": ["获取失败——详情请查看服务器日志。"],
"j_Z6g7": ["共享的默认值"],
"jbSG8V": ["显示「文件」(", ["sidebarShortcutLabel"], ")"],
+ "jbhCDS": ["其他 Git 主机"],
"jcEoUi": ["移到右侧面板"],
"jdGUeI": ["无法创建模板:", ["error"]],
"jeCFV7": ["移动到右侧新窗格"],
@@ -4249,6 +4266,7 @@
"pckX1A": [["0", "plural", { "other": ["#", " 次使用"] }]],
"pcqlQu": [["0", "plural", { "other": ["文件夹"] }]],
"pd0UH2": ["右对齐"],
+ "pd6t3G": ["管理 OpenKnowledge 用来连接你的 git 主机的账户和访问令牌。"],
"peq20S": ["此对话中无法使用浏览器,因为未能完成设置。详细信息请查看 OpenKnowledge 的日志。"],
"pfkaJ2": ["YAML 或 JSON,两种 base16 布局都可以。"],
"pgDlbM": ["切换开发者工具"],
@@ -4335,6 +4353,7 @@
"qi17kj": ["嵌入此工作区中 .excalidraw 画板的实时快照。"],
"qi1F96": ["在文件资源管理器中显示"],
"qiRoLb": ["总结我这周改了些什么"],
+ "qimTXH": ["OpenKnowledge 无法为此项目登录 GitHub。"],
"qioCwA": ["跳到第 ", ["pageNumber"], " 页"],
"qjHMHf": ["关闭同步失败——", ["detail"]],
"qkqG0b": ["采用远程版本"],
@@ -4389,6 +4408,9 @@
"rVxu1k": ["还没有页面链接到这里。"],
"rXz97P": ["带编号的项目列表。"],
"rZ9HZq": ["待办"],
+ "rZFxkH": [
+ "输入 git 连接的主机名,可带可选的 :port,不要包含协议或路径,例如 git.example.com。"
+ ],
"rZVMkf": ["可视化编辑器替换输入框已聚焦"],
"radOpL": ["图片 ", ["identity"], "。转到引用位置。"],
"rageVb": ["带实时预览面板的自定义 HTML(沙箱 iframe)。"],
@@ -4569,6 +4591,9 @@
"tlGXxX": ["自动(仅拉取)"],
"tnG-m6": ["自动同步已暂停——请登录以继续。"],
"toyw51": ["Mermaid 图示控件"],
+ "tpOnU9": [
+ "OpenKnowledge 没有为这个主机保存任何凭据。请在「设置」中添加一个令牌,或者让 git 使用它已有的凭据。"
+ ],
"tqQBwN": ["任何脚本都只会展示以供查看,绝不会运行。"],
"troubleshooting.claude-desktop.per-tool-approval": [
["agent"],
@@ -4699,6 +4724,7 @@
"uoJF_D": ["设置或上手太麻烦了"],
"uqs8Gd": [["others", "plural", { "other": ["其他 ", "#", " 个文件"] }]],
"ur2XSb": ["可视化编辑器"],
+ "uraHF0": ["GitLab"],
"uuoHOU": ["命令执行失败。"],
"uwzRx4": [
"为速度较慢或内存受限的嵌入服务器调整索引请求的大小和超时时间。大多数情况下应保持默认值。"
@@ -4773,6 +4799,7 @@
"vvWZnu": ["无法显示差异"],
"vwV-kH": ["修复文件的过程意外中止。"],
"vy_VIN": ["受 git 跟踪——更新通过你的仓库(pull 或 CI)流入,而不是自动更新"],
+ "w-Wt3H": ["需要重新连接才能继续同步。请检查 git 为此主机使用的 SSH 密钥或已保存的凭据。"],
"w0YVAE": ["显示技能节点"],
"w3tVpc": ["还没有链接。添加维基链接或 markdown 链接来构建关系图。"],
"w3vFfL": ["隐藏「文件」"],
@@ -4876,7 +4903,6 @@
"x57cJf": ["打开链接"],
"xAlHfe": [["basename"], " — 文本编辑器"],
"xBFg6z": ["来自 ", ["0"], " 插件"],
- "xBjIs7": ["此项目无法使用 GitHub 登录"],
"xCJdfg": ["清除"],
"xCdTnb": ["关闭新标签页"],
"xD4Xm2": ["获取"],
@@ -4888,6 +4914,9 @@
"xG4tb6": ["与“", ["docName"], "”的连接已断开。"],
"xG8Ish": ["未计划"],
"xHGM4U": ["隐藏 HTML 预览"],
+ "xJ7qrb": [
+ "没有为这个 git 主机保存任何凭据。请在「设置」中添加一个令牌,或者让 git 使用它已有的凭据。"
+ ],
"xK291b": ["双页(奇数)"],
"xKDsGS": ["跳转到 ", ["1"], " 的第 ", ["0"], " 行"],
"xKcXG6": [["addingCount", "plural", { "other": ["已添加 ", "#"] }]],
@@ -4962,6 +4991,7 @@
"yLEyuq": ["把产品动态发到你的邮箱。"],
"yLq4w4": ["分隔符"],
"yLwx9e": ["作为符号链接的是上层目录——请对那个文件夹取消链接,才能收回这一个。"],
+ "yLyiQV": ["保存的令牌缺少这个主机推送所需的权限。"],
"yMgL_E": ["查找字段导航"],
"yOjRUV": ["未检测到 AI 工具。请先安装一个再使用此技能。"],
"yQE2r9": ["正在加载"],
@@ -5044,6 +5074,7 @@
"zLak8b": ["激活新标签页"],
"zMmwh4": ["选择一个主题或创建自己的主题。"],
"zWZBPx": ["类型已更改"],
+ "zXZJoN": ["添加令牌"],
"zXj1rA": ["按语义搜索"],
"zYp8Sr": [
"<0>已修改</0>标记表示你的配置显式设置过的规则——直接设置,或通过 <1>extends</1> 继承而来。未标记的规则保持默认状态。"
diff --git a/packages/app/src/locales/zh-Hans/messages.po b/packages/app/src/locales/zh-Hans/messages.po
index f64a69ca1..b0a4c2f58 100644
--- a/packages/app/src/locales/zh-Hans/messages.po
+++ b/packages/app/src/locales/zh-Hans/messages.po
@@ -1548,6 +1548,10 @@ msgstr "这里已存在名为 <0>{trimmedSlug}</0> 的模板。保存会创建
msgid "A title, description, tags — anything that describes this folder."
msgstr "标题、描述、标签——任何能描述这个文件夹的信息。"
+#: src/components/settings/AccountSection.tsx
+msgid "A token added here only applies to HTTPS remotes, and this project's remote doesn't use HTTPS."
+msgstr "在此添加的令牌只适用于 HTTPS 远程仓库,而此项目的远程仓库不使用 HTTPS。"
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "A worktree folder for {shareBranch} already exists."
msgstr "{shareBranch} 的 worktree 文件夹已存在。"
@@ -1600,9 +1604,8 @@ msgid "Accept their deletion"
msgstr "接受对方的删除"
#: src/components/settings/AccountSection.tsx
-#: src/components/settings/SettingsDialogShell.tsx
-msgid "Account"
-msgstr "账户"
+msgid "Access token"
+msgstr "访问令牌"
#: src/components/TemplateRow.tsx
msgid "Actions for {label}"
@@ -1681,6 +1684,10 @@ msgstr "添加属性"
msgid "Add a starter pack"
msgstr "添加入门包"
+#: src/components/settings/AccountSection.tsx
+msgid "Add an access token for a GitLab, Gitea, Bitbucket, Azure DevOps or self-hosted git server. Without one, git uses the credentials it already has saved for that host; with one, OpenKnowledge uses the token instead."
+msgstr "为 GitLab、Gitea、Bitbucket、Azure DevOps 或自托管 git 服务器添加访问令牌。没有令牌时,git 会使用它已为该主机保存的凭据;添加令牌后,OpenKnowledge 改用该令牌。"
+
#: src/components/settings/OkignoreSection.tsx
msgid "Add another pattern"
msgstr "再添加一个模式"
@@ -1810,6 +1817,12 @@ msgstr "添加到词典"
msgid "Add to prompt"
msgstr "添加到提示词"
+#: src/components/settings/AccountSection.tsx
+#: src/components/SyncStatusBadge.tsx
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Add token"
+msgstr "添加令牌"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Add value"
msgstr "添加值"
@@ -1820,6 +1833,10 @@ msgstr "添加值"
msgid "Added"
msgstr "已添加"
+#: src/components/settings/AccountSection.tsx
+msgid "Adding"
+msgstr "正在添加"
+
#: src/components/settings/AgentConnectionDialogs.tsx
msgid "Adds a global OpenKnowledge MCP entry for this agent."
msgstr "为此智能体添加全局 OpenKnowledge MCP 条目。"
@@ -2335,6 +2352,10 @@ msgstr "附件总大小必须小于 3 MB。"
msgid "Authenticated as {login}."
msgstr "已以 {login} 身份验证。"
+#: src/components/SyncStatusBadge.tsx
+msgid "Authentication failed for this git host. Add a token for it in Settings, or replace the one stored."
+msgstr "这个 git 主机的身份验证失败。请在「设置」中为它添加令牌,或者替换已保存的令牌。"
+
#: src/editor/slash-command/component-items.tsx
msgid "Authoritative content; mirrored verbatim everywhere it's referenced."
msgstr "权威内容;在所有被引用的地方逐字镜像。"
@@ -2536,6 +2557,11 @@ msgstr "大号章节标题。"
msgid "Bird wiki"
msgstr "鸟类维基"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "Bitbucket"
+msgstr "Bitbucket"
+
#: src/components/NewItemDialog.tsx
msgid "Blank note"
msgstr "空白笔记"
@@ -3605,8 +3631,8 @@ msgid "Connect"
msgstr "连接"
#: src/components/settings/AccountSection.tsx
-msgid "Connect a GitHub account to browse and sync your repositories."
-msgstr "连接一个 GitHub 账户,以便浏览和同步你的仓库。"
+msgid "Connect a GitHub account to browse and publish GitHub repositories."
+msgstr "连接一个 GitHub 账户,以浏览和发布 GitHub 仓库。"
#: src/components/settings/SyncSection.tsx
msgid "Connect an existing repository"
@@ -3698,6 +3724,7 @@ msgid "Connection dropped"
msgstr "连接已断开"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Connection error — try again"
msgstr "连接出错——请重试"
@@ -5937,6 +5964,10 @@ msgstr "请输入 {minimum} 到 {maximum} 之间的整数。"
msgid "Enter at least 3 characters to search by meaning."
msgstr "输入至少 3 个字符以按含义搜索。"
+#: src/components/settings/AccountSection.tsx
+msgid "Enter the host name git connects to, with an optional :port and no scheme or path, for example git.example.com."
+msgstr "输入 git 连接的主机名,可带可选的 :port,不要包含协议或路径,例如 git.example.com。"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Enter the public origin your tunnel serves, for example https://notes.example.com"
msgstr "输入你的隧道所服务的公开来源,例如 https://notes.example.com"
@@ -6412,6 +6443,7 @@ msgid "Failed to start sign-in — try again"
msgstr "启动登录失败——请重试"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Failed to store the token — try again"
msgstr "保存令牌失败——请重试"
@@ -6885,6 +6917,11 @@ msgctxt "settings search keyword"
msgid "GHES"
msgstr "GHES"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Git"
+msgstr "Git"
+
#: src/components/ExploreSkills.tsx
msgid "Git & PRs"
msgstr "Git 与 PR"
@@ -6893,6 +6930,10 @@ msgstr "Git 与 PR"
msgid "Git can't track this folder — it's empty or contains only ignored files. The link won't work until you add a tracked document."
msgstr "Git 无法跟踪这个文件夹——它是空的,或者只包含被忽略的文件。在你添加一个受跟踪的文档之前,链接不会生效。"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it."
+msgstr "git 无法向此主机进行身份验证。请检查 git 为该主机使用的 SSH 密钥或已保存的凭据。"
+
#: src/components/RecentProjectsMenu.tsx
msgid "Git has locked this worktree, but it can still be opened."
msgstr "Git 已锁定此工作树,但仍可打开。"
@@ -6952,10 +6993,6 @@ msgstr "GitHub Enterprise Server 主机"
msgid "GitHub sign-in is missing or expired. Reconnect to resume syncing."
msgstr "GitHub 登录缺失或已过期。请重新连接以继续同步。"
-#: src/components/settings/AccountSection.tsx
-msgid "GitHub sign-in isn't available for this project"
-msgstr "此项目无法使用 GitHub 登录"
-
#: src/components/ImportSkillForm.tsx
msgid "GitHub, a git URL, or a local path."
msgstr "GitHub、一个 git URL,或一个本地路径。"
@@ -6964,6 +7001,11 @@ msgstr "GitHub、一个 git URL,或一个本地路径。"
msgid "github.com is always recognized, so it doesn't need to be added."
msgstr "github.com 始终会被识别,无需添加。"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "GitLab"
+msgstr "GitLab"
+
#: src/components/settings/SavedThemesTiles.tsx
msgid "Give it a name before editing its colors."
msgstr "请先命名主题,再编辑颜色。"
@@ -7318,6 +7360,10 @@ msgstr "水平胶囊条,活动面板在下方;点击胶囊可切换面板。
msgid "Horizontal rule that divides sections."
msgstr "用于分隔章节的水平分割线。"
+#: src/components/settings/AccountSection.tsx
+msgid "Host"
+msgstr "主机"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Hosting is on. The server is running on port {boundPort}. Reach it through your tunnel."
msgstr "托管已开启。服务器正在端口 {boundPort} 上运行。通过您的隧道访问它。"
@@ -8611,8 +8657,8 @@ msgid "Manage skill folders"
msgstr "管理技能文件夹"
#: src/components/settings/AccountSection.tsx
-msgid "Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."
-msgstr "管理 OpenKnowledge 用来浏览和同步你的仓库的 GitHub 账户。"
+msgid "Manage the accounts and access tokens OpenKnowledge uses to connect to your git hosts."
+msgstr "管理 OpenKnowledge 用来连接你的 git 主机的账户和访问令牌。"
#: src/components/settings/AgentConnectionDialogs.tsx
#: src/components/settings/AgentConnectionsSection.tsx
@@ -9442,6 +9488,10 @@ msgstr "这个版本没有内容改动。"
msgid "No content changes in this version"
msgstr "这个版本没有内容改动"
+#: src/components/SyncStatusBadge.tsx
+msgid "No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "没有为这个 git 主机保存任何凭据。请在「设置」中添加一个令牌,或者让 git 使用它已有的凭据。"
+
#: src/components/GraphPanel.tsx
msgid "No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."
msgstr "没有孤立页面。只有既无入链又无出链的页面才会出现在这里。"
@@ -10394,6 +10444,10 @@ msgstr "正在打开…"
msgid "OpenKnowledge"
msgstr "OpenKnowledge"
+#: src/components/AuthModal.tsx
+msgid "OpenKnowledge can't sign in to GitHub for this project."
+msgstr "OpenKnowledge 无法为此项目登录 GitHub。"
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge checked {subject}"
msgstr "OpenKnowledge 检查了 {subject}"
@@ -10406,10 +10460,6 @@ msgstr "OpenKnowledge 检查了项目"
msgid "OpenKnowledge could not find this agent on this machine."
msgstr "OpenKnowledge 未在此设备上找到该智能体。"
-#: src/components/settings/AccountSection.tsx
-msgid "OpenKnowledge couldn't find a host name in this project's git remote, so it can't tell which GitHub server to sign in to."
-msgstr "OpenKnowledge 在此项目的 git 远程地址中找不到主机名,因此无法确定要登录哪个 GitHub 服务器。"
-
#: src/lib/worktree-create-error.ts
msgid "OpenKnowledge couldn't finish setting up this project. The worktree was created but not opened."
msgstr "OpenKnowledge 无法完成此项目的设置。工作树已创建,但未打开。"
@@ -10466,6 +10516,10 @@ msgstr "OpenKnowledge 编辑了一个文档"
msgid "OpenKnowledge files were removed"
msgstr "已移除 OpenKnowledge 文件"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "OpenKnowledge 没有为这个主机保存任何凭据。请在「设置」中添加一个令牌,或者让 git 使用它已有的凭据。"
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge imported {source}"
msgstr "OpenKnowledge 导入了 {source}"
@@ -10694,6 +10748,11 @@ msgstr "其他"
msgid "Other"
msgstr "其他"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Other Git hosts"
+msgstr "其他 Git 主机"
+
#: src/components/settings/SharingSection.tsx
msgid "Other OK paths are tracked upstream:"
msgstr "其他 OK 路径在远程受跟踪:"
@@ -11628,6 +11687,14 @@ msgstr "需要重新连接"
msgid "Reconnect required to keep syncing."
msgstr "需要重新连接才能继续同步。"
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Add a token for this host in Settings, or replace the one stored."
+msgstr "需要重新连接才能继续同步。请在「设置」中为这个主机添加令牌,或者替换已保存的令牌。"
+
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Check the SSH key or saved credentials git uses for this host."
+msgstr "需要重新连接才能继续同步。请检查 git 为此主机使用的 SSH 密钥或已保存的凭据。"
+
#: src/presence/use-sync-toasts.ts
msgid "Reconnected"
msgstr "已重新连接"
@@ -14819,6 +14886,10 @@ msgstr "技能列表与其结构定义不匹配。"
msgid "The source folder itself does not move."
msgstr "来源文件夹本身不会移动。"
+#: src/components/SyncStatusBadge.tsx
+msgid "The stored token is missing the permissions this host needs to push."
+msgstr "保存的令牌缺少这个主机推送所需的权限。"
+
#: src/components/TemplateProperties.tsx
msgid "The template's filename (without `.md`)."
msgstr "模板的文件名(不含 `.md`)。"
@@ -14877,6 +14948,10 @@ msgstr "未找到 .ok/local/config.yml 中指定的 terminal.shell 可执行文
msgid "The token needs the repo and read:user scopes."
msgstr "这个令牌需要 repo 和 read:user 权限范围。"
+#: src/components/settings/AccountSection.tsx
+msgid "The username git sends with the token. Some hosts expect a fixed value: type <0>x-bitbucket-api-token-auth</0> for a Bitbucket API token, <1>x-token-auth</1> for a Bitbucket repository or workspace access token, or <2>oauth2</2> for GitLab. For Gitea, use your Gitea username. Azure DevOps accepts any value."
+msgstr "git 随令牌一起发送的用户名。有些主机要求填写固定值:Bitbucket API 令牌填 <0>x-bitbucket-api-token-auth</0>,Bitbucket 仓库或工作区访问令牌填 <1>x-token-auth</1>,GitLab 填 <2>oauth2</2>。Gitea 请填你的 Gitea 用户名。Azure DevOps 可填任意值。"
+
#: src/lib/tab-session-restore-recovery-notice.ts
msgid "The workspace opened without it so the app could start."
msgstr "工作区在不加载它的情况下打开,以便应用能够启动。"
@@ -15405,10 +15480,6 @@ msgstr "这个项目不是 git 仓库,因此无法使用 worktree。"
msgid "This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."
msgstr "这个项目只存在于这台电脑上。把它连接到 GitHub 即可备份并与他人共享。"
-#: src/components/settings/AccountSection.tsx
-msgid "This project's git remote is on {host}, which OpenKnowledge doesn't recognize as a GitHub host. If {host} runs GitHub Enterprise Server, add it to GitHub Enterprise Server hosts below, then restart OpenKnowledge."
-msgstr "此项目的 git 远程位于 {host},OpenKnowledge 未将其识别为 GitHub 主机。如果 {host} 运行的是 GitHub Enterprise Server,请在下方的“GitHub Enterprise Server 主机”中添加它,然后重启 OpenKnowledge。"
-
#: src/components/DocumentErrorBoundary.tsx
msgid "This project's running server doesn't support live editing. Restart OpenKnowledge to fix."
msgstr "这个项目正在运行的服务器不支持实时编辑。重启 OpenKnowledge 即可修复。"
@@ -15505,6 +15576,7 @@ msgid "This usually means one of:"
msgstr "这通常意味着以下之一:"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
msgid "This window can't store a token — open Settings from the main app window."
msgstr "这个窗口无法保存令牌——请从应用主窗口打开「设置」。"
@@ -15658,6 +15730,15 @@ msgstr "切换下划线格式。"
msgid "Toggles the pattern {0}/**"
msgstr "切换模式 {0}/**"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "token"
+msgstr "令牌"
+
+#: src/components/settings/AccountSection.tsx
+msgid "Token stored for {login} on {host}. To remove it, run <0>ok auth signout --host {host}</0>."
+msgstr "已为 {host} 上的 {login} 保存令牌。要移除它,请运行 <0>ok auth signout --host {host}</0>。"
+
#: src/components/SkillBundlePreview.tsx
#: src/components/SkillProperties.tsx
msgid "tokens"
@@ -16244,6 +16325,10 @@ msgstr "用户"
msgid "User plugins are personal to this device — turn them on or off here. Each enabled plugin gets its own page under Plugins in the settings sidebar."
msgstr "用户插件是这台设备的个人设置——在这里开启或关闭它们。每个启用的插件在设置侧边栏的「插件」下都有自己的页面。"
+#: src/components/settings/AccountSection.tsx
+msgid "Username"
+msgstr "用户名"
+
#: src/components/settings/SearchSection.tsx
msgid "Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."
msgstr "正在使用 <0>OK_EMBEDDINGS_API_KEY</0> 环境变量(在 OpenKnowledge 之外管理)。"
diff --git a/packages/app/src/locales/zh-Hant/messages.json b/packages/app/src/locales/zh-Hant/messages.json
index 532d56d4f..a56ac1eec 100644
--- a/packages/app/src/locales/zh-Hant/messages.json
+++ b/packages/app/src/locales/zh-Hant/messages.json
@@ -33,6 +33,9 @@
],
"-l6jM7": ["使用 + 按鈕開始對話,或從頁面啟動智慧代理。"],
"-lCAuQ": ["正在載入關係圖"],
+ "-nA68n": [
+ "為 GitLab、Gitea、Bitbucket、Azure DevOps 或自架 git 伺服器新增存取權杖。沒有權杖時,git 會使用它已為該主機儲存的憑證;新增權杖後,OpenKnowledge 改用該權杖。"
+ ],
"-o5XAG": ["會連同你的備註和應用程式版本一起私下寄給 OpenKnowledge 團隊。絕不會公開發布。"],
"-oHckY": ["OpenKnowledge 讀取了設定 ", ["key"]],
"-othoN": ["這個主題檔案太大"],
@@ -215,6 +218,7 @@
"1vczDE": ["開啟 ", ["displayName"], " Desktop"],
"1vn0CI": ["伺服器回應無效"],
"1xui0Q": ["載入本機檔案失敗"],
+ "1yHVE-": ["正在新增"],
"2-3Mlu": ["無法取消置頂 ", ["name"]],
"20LVKb": ["此對話之外的某個來源要求智慧代理程序停止(", ["signal"], ")。"],
"2277Tu": ["摺疊關係圖"],
@@ -417,6 +421,15 @@
"4mp6Tv": ["OpenKnowledge 列出了已安裝的技能"],
"4niEzY": ["沙箱化的 HTML 嵌入——寫下 HTML,即時看到顯示結果。"],
"4nj6n8": ["/api/config 傳回了 HTTP ", ["code"]],
+ "4p8Baj": [
+ "已為 ",
+ ["host"],
+ " 上的 ",
+ ["login"],
+ " 儲存權杖。要移除它,請執行 <0>ok auth signout --host ",
+ ["host"],
+ "</0>。"
+ ],
"4pDZ2N": ["已把「", ["0"], "」從其他所有位置移除——它的來源資料夾仍然會載入"],
"4r6p_B": [
"此指令包含隱藏字元,可能使其看起來與實際執行的內容不同。這些字元在此顯示為 ⟨U+…⟩。"
@@ -637,13 +650,6 @@
"7YRrJ9": [
"在 OpenKnowledge 桌面應用程式中提供。在終端機裡可以使用<0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2>。"
],
- "7_I248": [
- "此專案的 git 遠端位於 ",
- ["host"],
- ",OpenKnowledge 並未將其辨識為 GitHub 主機。如果 ",
- ["host"],
- " 執行的是 GitHub Enterprise Server,請在下方的「GitHub Enterprise Server 主機」中新增它,然後重新啟動 OpenKnowledge。"
- ],
"7_bFEL": ["拖曳 ", ["patternText"], " 以重新排序"],
"7a0YcF": ["按<0>空白鍵</0>或點擊 blob 開始"],
"7aNk5D": ["OpenKnowledge 編輯了 ", ["subject"]],
@@ -672,6 +678,7 @@
"7lFX_h": ["立即改向"],
"7m3Ade": ["安裝次數:"],
"7qRHf0": ["為 Claude Chat 和 Cowork 安裝"],
+ "7sNhEz": ["使用者名稱"],
"7uBlRT": ["複製檔案樹中目前聚焦的項目,這樣「貼上」就能做出一份副本。"],
"7vxWET": ["無法預覽入門套件。"],
"7wogIQ": [["0", "plural", { "other": ["外掛程式"] }]],
@@ -804,6 +811,7 @@
"9bCiQ8": ["沒有頁面缺少連入的關係圖連結。"],
"9bG48P": ["正在傳送"],
"9clcD5": ["開啟標了 #", ["chip"], " 的文件"],
+ "9djC8C": ["連接一個 GitHub 帳戶,以瀏覽和發布 GitHub 儲存庫。"],
"9euN0m": [["count", "plural", { "other": ["另有 ", "#", " 位跨文件參與者"] }]],
"9fhQRL": ["Beta 通道"],
"9fvog2": ["無法預覽:", ["errorDetail"]],
@@ -892,7 +900,6 @@
["total"],
" 項"
],
- "AeXO77": ["帳戶"],
"AgoIW4": [
["source"],
":已更新 ",
@@ -905,6 +912,7 @@
["detail"]
],
"AhoGwP": ["設定 OpenKnowledge 整合"],
+ "Ai2U7L": ["主機"],
"AiNMQ7": ["這個專案只存在於這台電腦上。把它連接到 GitHub 就能備份,也能和別人分享。"],
"Aif3E7": ["開啟語意搜尋"],
"AkA6DO": ["屬於 ", ["0"], " 外掛——唯讀;開啟它可以編輯一份副本"],
@@ -1149,7 +1157,6 @@
"E2Mv-X": ["複製原始碼"],
"E4XYYH": ["為這個專案啟用終端機"],
"E5WeIy": ["重新開啟最近關閉的那個編輯器分頁。"],
- "E6lrpp": ["管理 OpenKnowledge 用來瀏覽和同步你的儲存庫的那個 GitHub 帳戶。"],
"E7BhZn": ["空白筆記"],
"E8NbNG": ["無法載入工作樹。"],
"E91VZY": ["在新視窗中開啟"],
@@ -1163,7 +1170,6 @@
"EEYbdt": ["發布"],
"EFfGAv": ["該訊息已送出——你的編輯未生效。"],
"EHu0x2": ["正在同步"],
- "EJuO7B": ["連接一個 GitHub 帳戶,就能瀏覽並同步你的儲存庫。"],
"EKwNEe": ["快取的嵌入向量屬於產生它們的端點和模型,所以這會從頭重建索引。"],
"ELYtNJ": [".ok 資料夾"],
"EL_YRd": ["<0>api-spec</0> 的鏡像"],
@@ -1296,6 +1302,9 @@
"FgRAvd": ["記錄與系統資訊"],
"Fhp4Gn": ["檢視外掛"],
"Fim5F3": ["嵌入"],
+ "FioJgb": [
+ "需要重新連線才能繼續同步。請在「設定」中為這個主機新增權杖,或者取代已儲存的權杖。"
+ ],
"FiyNln": ["跳到屬性中選取的文字"],
"FjkaiT": ["縮小"],
"Fjz6aJ": ["傳送到新對話"],
@@ -1662,6 +1671,7 @@
"KvwJv8": ["部分檔案未列出:工作區的變更過多。"],
"Kx881F": ["已還原 ", ["0"], "。"],
"KziH2K": ["快速"],
+ "L-crEu": ["git 無法向此主機進行驗證。請檢查 git 為該主機使用的 SSH 金鑰或已儲存的憑證。"],
"L-rMC9": ["重設為預設值"],
"L1BQTH": [["0"], " 尚未安裝——正在開啟它的下載頁面。"],
"L1ZE3M": ["文件統計"],
@@ -1708,6 +1718,7 @@
"LRgZAt": [["owner"], "/", ["name"], " 已存在"],
"LSuMte": [["totalCount"], " 項中的 ", ["0"], " 項"],
"LTeJuX": ["切換全螢幕"],
+ "LVWA9A": ["這個 git 主機的驗證失敗。請在「設定」中為它新增權杖,或者取代已儲存的權杖。"],
"LXIm4m": ["上下文視窗"],
"LXdWeS": ["中型章節標題。"],
"LXfNU-": ["導覽與建議"],
@@ -1814,6 +1825,7 @@
"Mj8R8K": ["無法安裝技能:", ["0"]],
"MmDDWK": ["最近開啟"],
"Mnavhe": [["propPanelDescriptorLabel"], " 屬性"],
+ "MpZRQy": ["Git"],
"MqQoV-": ["描述你想做的東西、開一個空白檔案,或從範本產生。"],
"MqsbfN": ["要開啟外部連結預覽嗎?"],
"MrUmCD": ["未知的建置失敗"],
@@ -1975,6 +1987,7 @@
"OPOiKn": ["內容規則"],
"OTF92M": ["標籤 <0>(選填的顯示文字)</0>"],
"OVjNeX": ["終端機 ", ["0"]],
+ "OWs-8P": ["在此新增的權杖只適用於 HTTPS 遠端儲存庫,而此專案的遠端儲存庫不使用 HTTPS。"],
"OX2Neh": ["行內程式碼"],
"OXb_Df": ["設定內容"],
"OXdGnd": ["問題"],
@@ -2084,6 +2097,7 @@
["filePath"],
" 中的衝突。說明我應該在 OpenKnowledge 的衝突檢視中比較哪些內容;我會在那裡選擇並套用解決方案。"
],
+ "Q14Keq": ["Bitbucket"],
"Q1mtyd": ["隱藏側邊欄"],
"Q5fqMz": ["連線出錯——請再試一次"],
"Q6hhn8": ["偏好設定"],
@@ -2306,6 +2320,7 @@
"SiUUCS": ["下一個相符項"],
"SkMZlS": ["無法移除 <0>", ["targetGitPath"], "</0>:", ["removeGitError"]],
"SkTkKV": ["智慧代理沒有停止。強制停止將關閉此對話並結束智慧代理。"],
+ "SkUcEr": ["存取權杖"],
"Ske_wc": [
"使用者外掛只屬於這台裝置——在這裡開啟或關閉它們。每個啟用的外掛在設定側邊欄的「外掛」底下都有自己的頁面。"
],
@@ -2605,9 +2620,6 @@
"XAyxsa": ["簽出遠端分支"],
"XBBZnv": ["連結目標「", ["shown"], "」未指向現有文件。"],
"XBgr2S": ["複製進來"],
- "XBpH6-": [
- "OpenKnowledge 在此專案的 git 遠端位址中找不到主機名稱,因此無法判斷要登入哪一台 GitHub 伺服器。"
- ],
"XDzAnp": ["在新分頁中開啟"],
"XF1kgP": ["來自 ", ["source"], " 的內容均已是最新"],
"XGKy1z": ["無法顯示圖片"],
@@ -2995,6 +3007,9 @@
"arUUsK": ["產品動態"],
"ax9kie": ["連結預覽設定尚未載入——請稍候再試"],
"axQ1h6": ["還有什麼想補充的嗎?(選填)"],
+ "azrR7I": [
+ "git 隨權杖一起傳送的使用者名稱。有些主機要求填寫固定值:Bitbucket API 權杖填 <0>x-bitbucket-api-token-auth</0>,Bitbucket 儲存庫或工作區存取權杖填 <1>x-token-auth</1>,GitLab 填 <2>oauth2</2>。Gitea 請填你的 Gitea 使用者名稱。Azure DevOps 可填任意值。"
+ ],
"b18t0_": ["關閉差異檢視"],
"b1FDss": ["捲動到開頭"],
"b2ezG_": ["兩個都保留了——「", ["0"], "」現在是一個獨立的技能"],
@@ -3269,6 +3284,7 @@
"e8zRrb": ["顯示「檔案」"],
"e8zYa8": ["無法在 worktree 中開啟 ", ["shareBranch"], "。請再試一次。"],
"e9sHSO": ["從上次停下的地方繼續"],
+ "eAYJMv": ["權杖"],
"eBGWcy": [
"Open Knowledge 工具無法使用,因為專案資料夾遺失、無法存取或已變更。請檢查其位置和權限,然後重試。"
],
@@ -3769,6 +3785,7 @@
"jZ_E5M": ["取得失敗——詳情請看伺服器記錄。"],
"j_Z6g7": ["分享的預設值"],
"jbSG8V": ["顯示「檔案」(", ["sidebarShortcutLabel"], ")"],
+ "jbhCDS": ["其他 Git 主機"],
"jcEoUi": ["移到右側面板"],
"jdGUeI": ["無法建立範本:", ["error"]],
"jeCFV7": ["移動到右側新窗格"],
@@ -4269,6 +4286,7 @@
"pckX1A": [["0", "plural", { "other": ["#", " 次使用"] }]],
"pcqlQu": [["0", "plural", { "other": ["資料夾"] }]],
"pd0UH2": ["靠右對齊"],
+ "pd6t3G": ["管理 OpenKnowledge 用來連線到你的 git 主機的帳戶和存取權杖。"],
"peq20S": ["此對話中無法使用瀏覽器,因為未能完成設定。詳細資訊請查看 OpenKnowledge 的記錄。"],
"pfkaJ2": ["YAML 或 JSON,兩種 base16 排版都可以。"],
"pgDlbM": ["切換開發者工具"],
@@ -4355,6 +4373,7 @@
"qi17kj": ["嵌入此工作區中 .excalidraw 畫板的即時快照。"],
"qi1F96": ["在檔案總管中顯示"],
"qiRoLb": ["總結我這週改了哪些東西"],
+ "qimTXH": ["OpenKnowledge 無法為此專案登入 GitHub。"],
"qioCwA": ["跳到第 ", ["pageNumber"], " 頁"],
"qjHMHf": ["關閉同步失敗——", ["detail"]],
"qkqG0b": ["採用上游版本"],
@@ -4409,6 +4428,9 @@
"rVxu1k": ["還沒有頁面連到這裡。"],
"rXz97P": ["有編號的項目清單。"],
"rZ9HZq": ["待辦"],
+ "rZFxkH": [
+ "輸入 git 連線的主機名稱,可加上選用的 :port,不要包含協定或路徑,例如 git.example.com。"
+ ],
"rZVMkf": ["視覺化編輯器取代輸入框已聚焦"],
"radOpL": ["圖片 ", ["identity"], "。前往引用位置。"],
"rageVb": ["帶即時預覽窗格的自訂 HTML(沙箱 iframe)。"],
@@ -4589,6 +4611,9 @@
"tlGXxX": ["自動(僅拉取)"],
"tnG-m6": ["自動同步已暫停——請登入以繼續。"],
"toyw51": ["Mermaid 圖表控制項"],
+ "tpOnU9": [
+ "OpenKnowledge 沒有為這個主機儲存任何憑證。請在「設定」中新增一個權杖,或者讓 git 使用它已有的憑證。"
+ ],
"tqQBwN": ["任何指令碼都只會顯示出來供你檢查,絕不會執行。"],
"troubleshooting.claude-desktop.per-tool-approval": [
["agent"],
@@ -4721,6 +4746,7 @@
"uoJF_D": ["設定或上手太麻煩了"],
"uqs8Gd": [["others", "plural", { "other": ["其他 ", "#", " 個檔案"] }]],
"ur2XSb": ["視覺化編輯器"],
+ "uraHF0": ["GitLab"],
"uuoHOU": ["指令執行失敗。"],
"uwzRx4": [
"為速度較慢或記憶體受限的嵌入伺服器調整索引請求的大小與逾時時間。大多數情況下應保持預設值。"
@@ -4795,6 +4821,7 @@
"vvWZnu": ["無法顯示差異"],
"vwV-kH": ["修復檔案的過程意外中止。"],
"vy_VIN": ["由 git 追蹤——更新是透過你的儲存庫(pull 或 CI)流入,不是自動更新"],
+ "w-Wt3H": ["需要重新連線才能繼續同步。請檢查 git 為此主機使用的 SSH 金鑰或已儲存的憑證。"],
"w0YVAE": ["顯示技能節點"],
"w3tVpc": ["還沒有連結。加上維基連結或 markdown 連結來建立關係圖。"],
"w3vFfL": ["隱藏「檔案」"],
@@ -4900,7 +4927,6 @@
"x57cJf": ["開啟連結"],
"xAlHfe": [["basename"], " — 文字編輯器"],
"xBFg6z": ["來自 ", ["0"], " 外掛"],
- "xBjIs7": ["此專案無法使用 GitHub 登入"],
"xCJdfg": ["清除"],
"xCdTnb": ["關閉新分頁"],
"xD4Xm2": ["取得"],
@@ -4912,6 +4938,9 @@
"xG4tb6": ["與「", ["docName"], "」的連線已中斷。"],
"xG8Ish": ["未規劃"],
"xHGM4U": ["隱藏 HTML 預覽"],
+ "xJ7qrb": [
+ "沒有為這個 git 主機儲存任何憑證。請在「設定」中新增一個權杖,或者讓 git 使用它已有的憑證。"
+ ],
"xK291b": ["雙頁(奇數)"],
"xKDsGS": ["移至 ", ["1"], " 的第 ", ["0"], " 行"],
"xKcXG6": [["addingCount", "plural", { "other": ["已新增 ", "#"] }]],
@@ -4986,6 +5015,7 @@
"yLEyuq": ["把產品動態寄到你的信箱。"],
"yLq4w4": ["分隔線"],
"yLwx9e": ["作為符號連結的是上層目錄——請對那個資料夾取消連結,才能把這一個收回來。"],
+ "yLyiQV": ["儲存的權杖缺少這個主機推送所需的權限。"],
"yMgL_E": ["尋找欄位導覽"],
"yOjRUV": ["未偵測到 AI 工具。請先安裝一個再使用此技能。"],
"yQE2r9": ["正在載入"],
@@ -5070,6 +5100,7 @@
"zLak8b": ["切換到新分頁"],
"zMmwh4": ["選擇主題或建立自己的主題。"],
"zWZBPx": ["類型已變更"],
+ "zXZJoN": ["新增權杖"],
"zXj1rA": ["按語意搜尋"],
"zYp8Sr": [
"<0>已修改</0>標記代表你的設定明確設過的規則——直接設定,或透過 <1>extends</1> 繼承而來。未標記的規則維持預設狀態。"
diff --git a/packages/app/src/locales/zh-Hant/messages.po b/packages/app/src/locales/zh-Hant/messages.po
index 9628af358..13dd8facd 100644
--- a/packages/app/src/locales/zh-Hant/messages.po
+++ b/packages/app/src/locales/zh-Hant/messages.po
@@ -1548,6 +1548,10 @@ msgstr "這裡已存在名為 <0>{trimmedSlug}</0> 的範本。儲存會建立
msgid "A title, description, tags — anything that describes this folder."
msgstr "標題、描述、標籤——任何能描述這個資料夾的資訊。"
+#: src/components/settings/AccountSection.tsx
+msgid "A token added here only applies to HTTPS remotes, and this project's remote doesn't use HTTPS."
+msgstr "在此新增的權杖只適用於 HTTPS 遠端儲存庫,而此專案的遠端儲存庫不使用 HTTPS。"
+
#: src/components/ShareBranchSwitchDialog.tsx
msgid "A worktree folder for {shareBranch} already exists."
msgstr "{shareBranch} 的 worktree 資料夾已存在。"
@@ -1600,9 +1604,8 @@ msgid "Accept their deletion"
msgstr "接受對方的刪除"
#: src/components/settings/AccountSection.tsx
-#: src/components/settings/SettingsDialogShell.tsx
-msgid "Account"
-msgstr "帳戶"
+msgid "Access token"
+msgstr "存取權杖"
#: src/components/TemplateRow.tsx
msgid "Actions for {label}"
@@ -1681,6 +1684,10 @@ msgstr "新增屬性"
msgid "Add a starter pack"
msgstr "加入入門套件"
+#: src/components/settings/AccountSection.tsx
+msgid "Add an access token for a GitLab, Gitea, Bitbucket, Azure DevOps or self-hosted git server. Without one, git uses the credentials it already has saved for that host; with one, OpenKnowledge uses the token instead."
+msgstr "為 GitLab、Gitea、Bitbucket、Azure DevOps 或自架 git 伺服器新增存取權杖。沒有權杖時,git 會使用它已為該主機儲存的憑證;新增權杖後,OpenKnowledge 改用該權杖。"
+
#: src/components/settings/OkignoreSection.tsx
msgid "Add another pattern"
msgstr "再新增一個模式"
@@ -1810,6 +1817,12 @@ msgstr "加入詞典"
msgid "Add to prompt"
msgstr "加入提示"
+#: src/components/settings/AccountSection.tsx
+#: src/components/SyncStatusBadge.tsx
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Add token"
+msgstr "新增權杖"
+
#: src/components/settings/frontmatter-schema-field-editor.tsx
msgid "Add value"
msgstr "新增值"
@@ -1820,6 +1833,10 @@ msgstr "新增值"
msgid "Added"
msgstr "已新增"
+#: src/components/settings/AccountSection.tsx
+msgid "Adding"
+msgstr "正在新增"
+
#: src/components/settings/AgentConnectionDialogs.tsx
msgid "Adds a global OpenKnowledge MCP entry for this agent."
msgstr "為此智慧代理新增全域 OpenKnowledge MCP 項目。"
@@ -2335,6 +2352,10 @@ msgstr "附件總大小必須小於 3 MB。"
msgid "Authenticated as {login}."
msgstr "已以 {login} 身分驗證。"
+#: src/components/SyncStatusBadge.tsx
+msgid "Authentication failed for this git host. Add a token for it in Settings, or replace the one stored."
+msgstr "這個 git 主機的驗證失敗。請在「設定」中為它新增權杖,或者取代已儲存的權杖。"
+
#: src/editor/slash-command/component-items.tsx
msgid "Authoritative content; mirrored verbatim everywhere it's referenced."
msgstr "權威內容;在所有被參照的地方逐字鏡像。"
@@ -2536,6 +2557,11 @@ msgstr "大型章節標題。"
msgid "Bird wiki"
msgstr "鳥類維基"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "Bitbucket"
+msgstr "Bitbucket"
+
#: src/components/NewItemDialog.tsx
msgid "Blank note"
msgstr "空白筆記"
@@ -3605,8 +3631,8 @@ msgid "Connect"
msgstr "連接"
#: src/components/settings/AccountSection.tsx
-msgid "Connect a GitHub account to browse and sync your repositories."
-msgstr "連接一個 GitHub 帳戶,就能瀏覽並同步你的儲存庫。"
+msgid "Connect a GitHub account to browse and publish GitHub repositories."
+msgstr "連接一個 GitHub 帳戶,以瀏覽和發布 GitHub 儲存庫。"
#: src/components/settings/SyncSection.tsx
msgid "Connect an existing repository"
@@ -3698,6 +3724,7 @@ msgid "Connection dropped"
msgstr "連線已中斷"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Connection error — try again"
msgstr "連線出錯——請再試一次"
@@ -5937,6 +5964,10 @@ msgstr "請輸入介於 {minimum} 和 {maximum} 之間的整數。"
msgid "Enter at least 3 characters to search by meaning."
msgstr "輸入至少 3 個字元以依含義搜尋。"
+#: src/components/settings/AccountSection.tsx
+msgid "Enter the host name git connects to, with an optional :port and no scheme or path, for example git.example.com."
+msgstr "輸入 git 連線的主機名稱,可加上選用的 :port,不要包含協定或路徑,例如 git.example.com。"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Enter the public origin your tunnel serves, for example https://notes.example.com"
msgstr "輸入你的通道所提供服務的公開來源,例如 https://notes.example.com"
@@ -6412,6 +6443,7 @@ msgid "Failed to start sign-in — try again"
msgstr "啟動登入失敗——請再試一次"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
#: src/lib/transports/auth-transport.ts
msgid "Failed to store the token — try again"
msgstr "儲存權杖失敗——請再試一次"
@@ -6885,6 +6917,11 @@ msgctxt "settings search keyword"
msgid "GHES"
msgstr "GHES"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Git"
+msgstr "Git"
+
#: src/components/ExploreSkills.tsx
msgid "Git & PRs"
msgstr "Git 與 PR"
@@ -6893,6 +6930,10 @@ msgstr "Git 與 PR"
msgid "Git can't track this folder — it's empty or contains only ignored files. The link won't work until you add a tracked document."
msgstr "Git 無法追蹤這個資料夾——它是空的,或者只有被忽略的檔案。在你加入一份被追蹤的文件之前,連結不會生效。"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "Git couldn't authenticate with this host. Check the SSH key or saved credentials git uses for it."
+msgstr "git 無法向此主機進行驗證。請檢查 git 為該主機使用的 SSH 金鑰或已儲存的憑證。"
+
#: src/components/RecentProjectsMenu.tsx
msgid "Git has locked this worktree, but it can still be opened."
msgstr "Git 已鎖定此工作樹,但仍可開啟。"
@@ -6952,10 +6993,6 @@ msgstr "GitHub Enterprise Server 主機"
msgid "GitHub sign-in is missing or expired. Reconnect to resume syncing."
msgstr "GitHub 登入不存在或已過期。請重新連接以繼續同步。"
-#: src/components/settings/AccountSection.tsx
-msgid "GitHub sign-in isn't available for this project"
-msgstr "此專案無法使用 GitHub 登入"
-
#: src/components/ImportSkillForm.tsx
msgid "GitHub, a git URL, or a local path."
msgstr "GitHub、一個 git URL,或一個本機路徑。"
@@ -6964,6 +7001,11 @@ msgstr "GitHub、一個 git URL,或一個本機路徑。"
msgid "github.com is always recognized, so it doesn't need to be added."
msgstr "github.com 一律會被辨識,不需要新增。"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "GitLab"
+msgstr "GitLab"
+
#: src/components/settings/SavedThemesTiles.tsx
msgid "Give it a name before editing its colors."
msgstr "請先為主題命名,再編輯色彩。"
@@ -7318,6 +7360,10 @@ msgstr "水平膠囊列,作用中的面板在下方;點一下膠囊即可切
msgid "Horizontal rule that divides sections."
msgstr "用來分隔章節的水平分隔線。"
+#: src/components/settings/AccountSection.tsx
+msgid "Host"
+msgstr "主機"
+
#: src/components/settings/NetworkAccessSection.tsx
msgid "Hosting is on. The server is running on port {boundPort}. Reach it through your tunnel."
msgstr "託管已開啟。伺服器正在連接埠 {boundPort} 上執行。透過您的通道存取它。"
@@ -8611,8 +8657,8 @@ msgid "Manage skill folders"
msgstr "管理技能資料夾"
#: src/components/settings/AccountSection.tsx
-msgid "Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."
-msgstr "管理 OpenKnowledge 用來瀏覽和同步你的儲存庫的那個 GitHub 帳戶。"
+msgid "Manage the accounts and access tokens OpenKnowledge uses to connect to your git hosts."
+msgstr "管理 OpenKnowledge 用來連線到你的 git 主機的帳戶和存取權杖。"
#: src/components/settings/AgentConnectionDialogs.tsx
#: src/components/settings/AgentConnectionsSection.tsx
@@ -9442,6 +9488,10 @@ msgstr "這個版本沒有內容變更。"
msgid "No content changes in this version"
msgstr "這個版本沒有內容變更"
+#: src/components/SyncStatusBadge.tsx
+msgid "No credential is stored for this git host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "沒有為這個 git 主機儲存任何憑證。請在「設定」中新增一個權杖,或者讓 git 使用它已有的憑證。"
+
#: src/components/GraphPanel.tsx
msgid "No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."
msgstr "沒有孤立的頁面。只有既沒有連入也沒有連出關係圖邊的頁面才會出現在這裡。"
@@ -10394,6 +10444,10 @@ msgstr "正在開啟…"
msgid "OpenKnowledge"
msgstr "OpenKnowledge"
+#: src/components/AuthModal.tsx
+msgid "OpenKnowledge can't sign in to GitHub for this project."
+msgstr "OpenKnowledge 無法為此專案登入 GitHub。"
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge checked {subject}"
msgstr "OpenKnowledge 檢查了 {subject}"
@@ -10406,10 +10460,6 @@ msgstr "OpenKnowledge 檢查了專案"
msgid "OpenKnowledge could not find this agent on this machine."
msgstr "OpenKnowledge 未在此裝置上找到該代理程式。"
-#: src/components/settings/AccountSection.tsx
-msgid "OpenKnowledge couldn't find a host name in this project's git remote, so it can't tell which GitHub server to sign in to."
-msgstr "OpenKnowledge 在此專案的 git 遠端位址中找不到主機名稱,因此無法判斷要登入哪一台 GitHub 伺服器。"
-
#: src/lib/worktree-create-error.ts
msgid "OpenKnowledge couldn't finish setting up this project. The worktree was created but not opened."
msgstr "OpenKnowledge 無法完成此專案的設定。工作樹已建立,但未開啟。"
@@ -10466,6 +10516,10 @@ msgstr "OpenKnowledge 編輯了一個文件"
msgid "OpenKnowledge files were removed"
msgstr "已移除 OpenKnowledge 檔案"
+#: src/hooks/use-sync-auth-prompt.ts
+msgid "OpenKnowledge has no credential stored for this host. Add a token in Settings, or let git use the credentials it already has."
+msgstr "OpenKnowledge 沒有為這個主機儲存任何憑證。請在「設定」中新增一個權杖,或者讓 git 使用它已有的憑證。"
+
#: src/lib/acp/tool-call-display.ts
msgid "OpenKnowledge imported {source}"
msgstr "OpenKnowledge 匯入了 {source}"
@@ -10694,6 +10748,11 @@ msgstr "其他"
msgid "Other"
msgstr "其他"
+#: src/components/settings/AccountSection.tsx
+#: src/components/settings/SettingsDialogShell.tsx
+msgid "Other Git hosts"
+msgstr "其他 Git 主機"
+
#: src/components/settings/SharingSection.tsx
msgid "Other OK paths are tracked upstream:"
msgstr "其他 OK 路徑在上游受追蹤:"
@@ -11628,6 +11687,14 @@ msgstr "需要重新連接"
msgid "Reconnect required to keep syncing."
msgstr "需要重新連線才能繼續同步。"
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Add a token for this host in Settings, or replace the one stored."
+msgstr "需要重新連線才能繼續同步。請在「設定」中為這個主機新增權杖,或者取代已儲存的權杖。"
+
+#: src/components/SyncStatusBadge.tsx
+msgid "Reconnect required to keep syncing. Check the SSH key or saved credentials git uses for this host."
+msgstr "需要重新連線才能繼續同步。請檢查 git 為此主機使用的 SSH 金鑰或已儲存的憑證。"
+
#: src/presence/use-sync-toasts.ts
msgid "Reconnected"
msgstr "已重新連線"
@@ -14819,6 +14886,10 @@ msgstr "技能清單與其結構定義不符。"
msgid "The source folder itself does not move."
msgstr "來源資料夾本身不會移動。"
+#: src/components/SyncStatusBadge.tsx
+msgid "The stored token is missing the permissions this host needs to push."
+msgstr "儲存的權杖缺少這個主機推送所需的權限。"
+
#: src/components/TemplateProperties.tsx
msgid "The template's filename (without `.md`)."
msgstr "範本的檔案名稱(不含 `.md`)。"
@@ -14877,6 +14948,10 @@ msgstr "找不到 .ok/local/config.yml 中指定的 terminal.shell 執行檔,
msgid "The token needs the repo and read:user scopes."
msgstr "這個權杖需要 repo 和 read:user 權限範圍。"
+#: src/components/settings/AccountSection.tsx
+msgid "The username git sends with the token. Some hosts expect a fixed value: type <0>x-bitbucket-api-token-auth</0> for a Bitbucket API token, <1>x-token-auth</1> for a Bitbucket repository or workspace access token, or <2>oauth2</2> for GitLab. For Gitea, use your Gitea username. Azure DevOps accepts any value."
+msgstr "git 隨權杖一起傳送的使用者名稱。有些主機要求填寫固定值:Bitbucket API 權杖填 <0>x-bitbucket-api-token-auth</0>,Bitbucket 儲存庫或工作區存取權杖填 <1>x-token-auth</1>,GitLab 填 <2>oauth2</2>。Gitea 請填你的 Gitea 使用者名稱。Azure DevOps 可填任意值。"
+
#: src/lib/tab-session-restore-recovery-notice.ts
msgid "The workspace opened without it so the app could start."
msgstr "工作區在不載入它的情況下開啟,讓應用程式能夠啟動。"
@@ -15405,10 +15480,6 @@ msgstr "這個專案不是 git 儲存庫,所以無法使用 worktree。"
msgid "This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."
msgstr "這個專案只存在於這台電腦上。把它連接到 GitHub 就能備份,也能和別人分享。"
-#: src/components/settings/AccountSection.tsx
-msgid "This project's git remote is on {host}, which OpenKnowledge doesn't recognize as a GitHub host. If {host} runs GitHub Enterprise Server, add it to GitHub Enterprise Server hosts below, then restart OpenKnowledge."
-msgstr "此專案的 git 遠端位於 {host},OpenKnowledge 並未將其辨識為 GitHub 主機。如果 {host} 執行的是 GitHub Enterprise Server,請在下方的「GitHub Enterprise Server 主機」中新增它,然後重新啟動 OpenKnowledge。"
-
#: src/components/DocumentErrorBoundary.tsx
msgid "This project's running server doesn't support live editing. Restart OpenKnowledge to fix."
msgstr "這個專案正在執行的伺服器不支援即時編輯。重新啟動 OpenKnowledge 即可修正。"
@@ -15505,6 +15576,7 @@ msgid "This usually means one of:"
msgstr "這通常代表下列其中之一:"
#: src/components/AuthModal.tsx
+#: src/components/settings/AccountSection.tsx
msgid "This window can't store a token — open Settings from the main app window."
msgstr "這個視窗無法儲存權杖——請從應用程式主視窗開啟「設定」。"
@@ -15658,6 +15730,15 @@ msgstr "切換底線格式。"
msgid "Toggles the pattern {0}/**"
msgstr "切換模式 {0}/**"
+#: src/components/settings/SettingsDialogShell.tsx
+msgctxt "settings search keyword"
+msgid "token"
+msgstr "權杖"
+
+#: src/components/settings/AccountSection.tsx
+msgid "Token stored for {login} on {host}. To remove it, run <0>ok auth signout --host {host}</0>."
+msgstr "已為 {host} 上的 {login} 儲存權杖。要移除它,請執行 <0>ok auth signout --host {host}</0>。"
+
#: src/components/SkillBundlePreview.tsx
#: src/components/SkillProperties.tsx
msgid "tokens"
@@ -16244,6 +16325,10 @@ msgstr "使用者"
msgid "User plugins are personal to this device — turn them on or off here. Each enabled plugin gets its own page under Plugins in the settings sidebar."
msgstr "使用者外掛只屬於這台裝置——在這裡開啟或關閉它們。每個啟用的外掛在設定側邊欄的「外掛」底下都有自己的頁面。"
+#: src/components/settings/AccountSection.tsx
+msgid "Username"
+msgstr "使用者名稱"
+
#: src/components/settings/SearchSection.tsx
msgid "Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."
msgstr "正在使用 <0>OK_EMBEDDINGS_API_KEY</0> 環境變數(在 OpenKnowledge 之外管理)。"
diff --git a/packages/app/tests/integration/attribution-sweep-coverage.test.ts b/packages/app/tests/integration/attribution-sweep-coverage.test.ts
index 82f5d8837..2a179f63b 100644
--- a/packages/app/tests/integration/attribution-sweep-coverage.test.ts
+++ b/packages/app/tests/integration/attribution-sweep-coverage.test.ts
@@ -127,6 +127,7 @@ const EXEMPT_HANDLERS = new Set([
'handleLocalOpAuthSignout',
'handleLocalOpAuthSetIdentity',
'handleLocalOpAuthPat',
+ 'handleLocalOpAuthToken',
'handleLocalOpAuthGhLogin',
'handleLocalOpAuthCancel',
'handleLocalOpEmbeddingsSetKey',
diff --git a/packages/app/tests/integration/bug3-source-mode-writeback.test.ts b/packages/app/tests/integration/bug3-source-mode-writeback.test.ts
index 8a60e5826..4549c74b3 100644
--- a/packages/app/tests/integration/bug3-source-mode-writeback.test.ts
+++ b/packages/app/tests/integration/bug3-source-mode-writeback.test.ts
@@ -1,3 +1,4 @@
+
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import { setTimeout as wait } from 'node:timers/promises';
@@ -439,13 +440,13 @@ describe('QA canary — cold-reopen / concurrent-peer / idempotence (Observer-A
});
const OK_ROOT = join(import.meta.dirname, '..', '..', '..', '..');
-const GITHUB_SYNC = join(OK_ROOT, 'docs', 'content', 'features', 'github-sync.mdx');
+const GITHUB_DOC = join(OK_ROOT, 'docs', 'content', 'features', 'git', 'github.mdx');
const QUICKSTART = join(OK_ROOT, 'docs', 'content', 'get-started', 'quickstart.mdx');
describe('QA canary — real repo docs with <Steps>', () => {
- test('github-sync.mdx loads byte-clean through the bridge (frontmatter + Callout + Steps intact)', async () => {
- const md = readFileSync(GITHUB_SYNC, 'utf-8');
- expect(md).toContain('title: GitHub sync');
+ test('git/github.mdx loads byte-clean through the bridge (frontmatter + Steps intact)', async () => {
+ const md = readFileSync(GITHUB_DOC, 'utf-8');
+ expect(md).toMatch(/^title: GitHub$/m);
expect((md.match(/^<Step>$/gm) ?? []).length).toBe(4);
expect(md).toMatch(/^<Steps>$/m);
expect(md).toMatch(/\n {4}### /);
@@ -458,8 +459,7 @@ describe('QA canary — real repo docs with <Steps>', () => {
try {
await awaitDocQuiescence(client.doc);
const ytext = client.doc.getText('source').toString();
- expect(ytext).toContain('title: GitHub sync');
- expect(ytext).toContain('<Callout type="warn">');
+ expect(ytext).toMatch(/^title: GitHub$/m);
expect((ytext.match(/^<Step>$/gm) ?? []).length).toBe(4);
expect(ytext).not.toMatch(INDENTED_STEP);
expect(ytext).toMatch(/\n {4}### Open the clone dialog/);
@@ -472,7 +472,7 @@ describe('QA canary — real repo docs with <Steps>', () => {
});
test('live source edit inside a real Step fires no Observer-A re-indent; disk cold-reopen clean', async () => {
- const md = readFileSync(GITHUB_SYNC, 'utf-8');
+ const md = readFileSync(GITHUB_DOC, 'utf-8');
const docName = `real-gh-edit-${crypto.randomUUID()}`;
await agentWriteMd(server.port, md, { docName, position: 'replace' });
await wait(300);
@@ -490,7 +490,7 @@ describe('QA canary — real repo docs with <Steps>', () => {
expect(memory).toContain('Paste a repository URL (edited)');
expect(memory).not.toMatch(INDENTED_STEP);
expect((memory.match(/^<Step>$/gm) ?? []).length).toBe(4);
- expect(memory).toContain('title: GitHub sync');
+ expect(memory).toMatch(/^title: GitHub$/m);
expect(memory.length).toBeLessThan(md.length + 32);
const disk = await pollDiskContentStable(join(server.contentDir, `${docName}.md`), (c) =>
diff --git a/packages/app/tests/integration/conflict-gate-coverage.test.ts b/packages/app/tests/integration/conflict-gate-coverage.test.ts
index 35c4173a5..37ae5122c 100644
--- a/packages/app/tests/integration/conflict-gate-coverage.test.ts
+++ b/packages/app/tests/integration/conflict-gate-coverage.test.ts
@@ -118,6 +118,7 @@ const EXEMPT_HANDLERS = new Set([
'handleLocalOpAuthSignout',
'handleLocalOpAuthSetIdentity',
'handleLocalOpAuthPat',
+ 'handleLocalOpAuthToken',
'handleLocalOpAuthGhLogin',
'handleLocalOpAuthCancel',
'handleLocalOpEmbeddingsSetKey',
diff --git a/packages/app/tests/integration/indented-jsx-byte-sacred.test.ts b/packages/app/tests/integration/indented-jsx-byte-sacred.test.ts
index 6fcdc23f2..4fc2c11f9 100644
--- a/packages/app/tests/integration/indented-jsx-byte-sacred.test.ts
+++ b/packages/app/tests/integration/indented-jsx-byte-sacred.test.ts
@@ -1,3 +1,4 @@
+
import { setTimeout as wait } from 'node:timers/promises';
import { normalizeBridge } from '@inkeep/open-knowledge-core';
import { updateYFragment } from '@tiptap/y-tiptap';
diff --git a/packages/app/tests/integration/interior-edit-freshness.test.ts b/packages/app/tests/integration/interior-edit-freshness.test.ts
index 40b5cdfd6..9f2f6feb6 100644
--- a/packages/app/tests/integration/interior-edit-freshness.test.ts
+++ b/packages/app/tests/integration/interior-edit-freshness.test.ts
@@ -1,3 +1,4 @@
+
import { setTimeout as wait } from 'node:timers/promises';
import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
diff --git a/packages/app/tests/integration/keystroke-cadence-danger-space.test.ts b/packages/app/tests/integration/keystroke-cadence-danger-space.test.ts
index 93666af70..2a085742b 100644
--- a/packages/app/tests/integration/keystroke-cadence-danger-space.test.ts
+++ b/packages/app/tests/integration/keystroke-cadence-danger-space.test.ts
@@ -1,3 +1,4 @@
+
import { setTimeout as wait } from 'node:timers/promises';
import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
diff --git a/packages/app/tests/integration/producer-guard-wiring.test.ts b/packages/app/tests/integration/producer-guard-wiring.test.ts
index 867598d34..878d5196b 100644
--- a/packages/app/tests/integration/producer-guard-wiring.test.ts
+++ b/packages/app/tests/integration/producer-guard-wiring.test.ts
@@ -1,3 +1,4 @@
+
import { setTimeout as wait } from 'node:timers/promises';
import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
diff --git a/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.ts b/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.ts
index 0970ac12f..4ada3cf26 100644
--- a/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.ts
+++ b/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.ts
@@ -1,3 +1,4 @@
+
import { randomUUID } from 'node:crypto';
import { afterEach, describe, expect, test } from 'vitest';
import { agentWriteMd, createTestServer, type TestServer } from './test-harness';
diff --git a/packages/app/tests/integration/qa-045-restore-after-gc.test.ts b/packages/app/tests/integration/qa-045-restore-after-gc.test.ts
index b632185e1..cbe2b705f 100644
--- a/packages/app/tests/integration/qa-045-restore-after-gc.test.ts
+++ b/packages/app/tests/integration/qa-045-restore-after-gc.test.ts
@@ -1,3 +1,4 @@
+
import { execFileSync } from 'node:child_process';
import { randomUUID } from 'node:crypto';
import { join } from 'node:path';
diff --git a/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.ts b/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.ts
index c530ce4ba..89bc9b4d9 100644
--- a/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.ts
+++ b/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.ts
@@ -1,3 +1,4 @@
+
import { randomUUID } from 'node:crypto';
import { afterAll, afterEach, beforeAll, describe, expect, test } from 'vitest';
import type * as Y from 'yjs';
diff --git a/packages/app/tests/integration/undo-after-rollback.test.ts b/packages/app/tests/integration/undo-after-rollback.test.ts
index d3767adc9..a78aeb0e4 100644
--- a/packages/app/tests/integration/undo-after-rollback.test.ts
+++ b/packages/app/tests/integration/undo-after-rollback.test.ts
@@ -1,3 +1,4 @@
+
import { ROLLBACK_ORIGIN } from '@inkeep/open-knowledge-server';
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
import * as Y from 'yjs';
diff --git a/packages/app/tests/integration/undo-recycle-reset.test.ts b/packages/app/tests/integration/undo-recycle-reset.test.ts
index b076f955c..e7cc69c3f 100644
--- a/packages/app/tests/integration/undo-recycle-reset.test.ts
+++ b/packages/app/tests/integration/undo-recycle-reset.test.ts
@@ -1,3 +1,4 @@
+
import { writeFileSync } from 'node:fs';
import { join } from 'node:path';
import { setTimeout as wait } from 'node:timers/promises';
diff --git a/packages/app/tests/integration/undo-rederive-survival.test.ts b/packages/app/tests/integration/undo-rederive-survival.test.ts
index 7935e35f8..9ddcd0730 100644
--- a/packages/app/tests/integration/undo-rederive-survival.test.ts
+++ b/packages/app/tests/integration/undo-rederive-survival.test.ts
@@ -1,3 +1,4 @@
+
import { prependFrontmatter } from '@inkeep/open-knowledge-core';
import { Plugin, PluginKey } from '@tiptap/pm/state';
import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';
diff --git a/packages/cli/src/auth/resolve-auth.ts b/packages/cli/src/auth/resolve-auth.ts
index b30e71056..af88b806f 100644
--- a/packages/cli/src/auth/resolve-auth.ts
+++ b/packages/cli/src/auth/resolve-auth.ts
@@ -20,6 +20,7 @@ interface ResolveAuthOptions {
skipGhDetect?: boolean;
login?: string;
selfCliArgs?: readonly string[];
+ credentialHost?: string;
}
function cliCredentialHelperCommand(selfCliArgs: readonly string[]): string {
@@ -65,7 +66,9 @@ export async function resolveAuth(
}
}
- const entry = await tokenStore.get(host);
+ const entry =
+ (options.credentialHost === undefined ? null : await tokenStore.get(options.credentialHost)) ??
+ (await tokenStore.get(host));
if (entry != null) {
const tier: AuthTier = entry.gitProtocol === 'ssh' ? 'C' : 'B';
return { tier, gitConfig: authenticatedConfig };
diff --git a/packages/cli/src/commands/auth/command-host.test.ts b/packages/cli/src/commands/auth/command-host.test.ts
index de4f9f06a..73ec75eb7 100644
--- a/packages/cli/src/commands/auth/command-host.test.ts
+++ b/packages/cli/src/commands/auth/command-host.test.ts
@@ -9,6 +9,7 @@ import { shareNameCheckCommand } from '../share/name-check.ts';
import { shareOwnersCommand } from '../share/owners.ts';
import { patCommand } from './pat.ts';
import { signoutCommand } from './signout.ts';
+import { statusCommand } from './status.ts';
vi.mock('@inquirer/password', () => ({ default: vi.fn() }));
vi.mock('../../auth/gh-detect.ts', () => ({ detectGh: () => ({ available: false }) }));
@@ -120,6 +121,230 @@ test('PAT refuses an undeclared explicit host before opening the token prompt',
expect(password).not.toHaveBeenCalled();
});
+test('status on an explicit non-GitHub host reports the stored token without asking GitHub', async () => {
+ const exit = vi.spyOn(process, 'exit').mockImplementation(() => {
+ throw new Error('exit');
+ });
+ const stdout = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
+ const store = new FileBackend(join(projectDir, 'auth.yml'));
+ await store.set('gitea.internal', 'alice', 'tok', { gitProtocol: 'https' });
+ await expect(
+ statusCommand(async () => store).parseAsync(['--host', 'gitea.internal', '--json'], {
+ from: 'user',
+ }),
+ ).rejects.toThrow('exit');
+ expect(JSON.parse(String(stdout.mock.calls[0]?.[0]))).toEqual({
+ type: 'status',
+ host: 'gitea.internal',
+ backend: 'file',
+ authenticated: false,
+ unverified: true,
+ login: 'alice',
+ });
+ expect(exit).toHaveBeenCalledWith(0);
+});
+
+test('status with no --host on a non-GitHub origin reports the stored token for that host', async () => {
+ execFileSync('git', ['remote', 'add', 'origin', 'https://gitea.internal/team/kb.git'], {
+ cwd: projectDir,
+ });
+ vi.spyOn(process, 'exit').mockImplementation(() => {
+ throw new Error('exit');
+ });
+ const stdout = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
+ const store = new FileBackend(join(projectDir, 'auth.yml'));
+ await store.set('gitea.internal', 'alice', 'tok', { gitProtocol: 'https' });
+ await expect(
+ statusCommand(async () => store).parseAsync(['--json'], { from: 'user' }),
+ ).rejects.toThrow('exit');
+ expect(JSON.parse(String(stdout.mock.calls[0]?.[0]))).toMatchObject({
+ host: 'gitea.internal',
+ unverified: true,
+ login: 'alice',
+ });
+});
+
+test('status with no --host on a non-GitHub origin with nothing stored names ok auth token', async () => {
+ execFileSync('git', ['remote', 'add', 'origin', '[email protected]:team/kb.git'], {
+ cwd: projectDir,
+ });
+ const exit = vi.spyOn(process, 'exit').mockImplementation(() => {
+ throw new Error('exit');
+ });
+ const store = new FileBackend(join(projectDir, 'auth.yml'));
+ await expect(statusCommand(async () => store).parseAsync([], { from: 'user' })).rejects.toThrow(
+ 'exit',
+ );
+ const written = vi
+ .mocked(process.stderr.write)
+ .mock.calls.map((c) => String(c[0]))
+ .join('');
+ expect(written).toContain('ok auth token --host gitea.internal --username <username>');
+ expect(written).not.toContain('declare it in');
+ expect(exit).toHaveBeenCalledWith(1);
+});
+
+test('status with no --host on an origin with a port reports the token stored for host:port', async () => {
+ execFileSync('git', ['remote', 'add', 'origin', 'https://Git.Corp.example:8443/team/kb.git'], {
+ cwd: projectDir,
+ });
+ vi.spyOn(process, 'exit').mockImplementation(() => {
+ throw new Error('exit');
+ });
+ const stdout = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
+ const store = new FileBackend(join(projectDir, 'auth.yml'));
+ await store.set('git.corp.example:8443', 'alice', 'tok', { gitProtocol: 'https' });
+ await expect(
+ statusCommand(async () => store).parseAsync(['--json'], { from: 'user' }),
+ ).rejects.toThrow('exit');
+ expect(JSON.parse(String(stdout.mock.calls[0]?.[0]))).toMatchObject({
+ host: 'git.corp.example:8443',
+ unverified: true,
+ login: 'alice',
+ });
+});
+
+test('status with no --host on a ported origin with nothing stored names the host with its port', async () => {
+ execFileSync('git', ['remote', 'add', 'origin', 'https://git.corp.example:8443/team/kb.git'], {
+ cwd: projectDir,
+ });
+ vi.spyOn(process, 'exit').mockImplementation(() => {
+ throw new Error('exit');
+ });
+ const store = new FileBackend(join(projectDir, 'auth.yml'));
+ await expect(statusCommand(async () => store).parseAsync([], { from: 'user' })).rejects.toThrow(
+ 'exit',
+ );
+ const written = vi
+ .mocked(process.stderr.write)
+ .mock.calls.map((c) => String(c[0]))
+ .join('');
+ expect(written).toContain('ok auth token --host git.corp.example:8443 --username <username>');
+});
+
+test('status with no --host on an origin URL deeper than owner/repo still finds the host', async () => {
+ execFileSync('git', ['remote', 'add', 'origin', 'https://gitlab.corp.example/group/sub/kb.git'], {
+ cwd: projectDir,
+ });
+ vi.spyOn(process, 'exit').mockImplementation(() => {
+ throw new Error('exit');
+ });
+ const stdout = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
+ const store = new FileBackend(join(projectDir, 'auth.yml'));
+ await store.set('gitlab.corp.example', 'oauth2', 'tok', { gitProtocol: 'https' });
+ await expect(
+ statusCommand(async () => store).parseAsync(['--json'], { from: 'user' }),
+ ).rejects.toThrow('exit');
+ expect(JSON.parse(String(stdout.mock.calls[0]?.[0]))).toMatchObject({
+ host: 'gitlab.corp.example',
+ unverified: true,
+ login: 'oauth2',
+ });
+});
+
+test('status --host on a non-GitHub host matches the stored key regardless of case or :443', async () => {
+ vi.spyOn(process, 'exit').mockImplementation(() => {
+ throw new Error('exit');
+ });
+ const stdout = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
+ const store = new FileBackend(join(projectDir, 'auth.yml'));
+ await store.set('gitea.internal', 'alice', 'tok', { gitProtocol: 'https' });
+ await expect(
+ statusCommand(async () => store).parseAsync(['--host', 'Gitea.Internal:443', '--json'], {
+ from: 'user',
+ }),
+ ).rejects.toThrow('exit');
+ expect(JSON.parse(String(stdout.mock.calls[0]?.[0]))).toMatchObject({
+ host: 'gitea.internal',
+ unverified: true,
+ login: 'alice',
+ });
+});
+
+test('PAT on a ported non-GitHub origin names ok auth token with the port kept', async () => {
+ execFileSync('git', ['remote', 'add', 'origin', 'https://git.corp.example:8443/team/kb.git'], {
+ cwd: projectDir,
+ });
+ vi.spyOn(process, 'exit').mockImplementation(() => {
+ throw new Error('exit');
+ });
+ await expect(
+ patCommand(async () => new FileBackend(join(projectDir, 'auth.yml'))).parseAsync([], {
+ from: 'user',
+ }),
+ ).rejects.toThrow('exit');
+ const written = vi
+ .mocked(process.stderr.write)
+ .mock.calls.map((c) => String(c[0]))
+ .join('');
+ expect(written).toContain("this project's git remote is git.corp.example,");
+ expect(written).toContain('ok auth token --host git.corp.example:8443 --username <username>');
+ expect(password).not.toHaveBeenCalled();
+});
+
+test('PAT on an origin deeper than owner/repo names the host and ok auth token', async () => {
+ execFileSync('git', ['remote', 'add', 'origin', 'https://gitlab.corp.example/group/sub/kb.git'], {
+ cwd: projectDir,
+ });
+ vi.spyOn(process, 'exit').mockImplementation(() => {
+ throw new Error('exit');
+ });
+ await expect(
+ patCommand(async () => new FileBackend(join(projectDir, 'auth.yml'))).parseAsync([], {
+ from: 'user',
+ }),
+ ).rejects.toThrow('exit');
+ const written = vi
+ .mocked(process.stderr.write)
+ .mock.calls.map((c) => String(c[0]))
+ .join('');
+ expect(written).toContain(
+ "this project's git remote is gitlab.corp.example, which is not a GitHub host",
+ );
+ expect(written).toContain('ok auth token --host gitlab.corp.example --username <username>');
+ expect(written).not.toContain('Cannot determine');
+ expect(written).not.toContain('declare it in');
+ expect(password).not.toHaveBeenCalled();
+});
+
+test('implicit signout on an origin deeper than owner/repo names the host in the lead', async () => {
+ execFileSync('git', ['remote', 'add', 'origin', 'https://gitlab.corp.example/group/sub/kb.git'], {
+ cwd: projectDir,
+ });
+ vi.spyOn(process, 'exit').mockImplementation(() => {
+ throw new Error('exit');
+ });
+ await expect(signoutCommand().parseAsync([], { from: 'user' })).rejects.toThrow('exit');
+ const written = vi
+ .mocked(process.stderr.write)
+ .mock.calls.map((c) => String(c[0]))
+ .join('');
+ expect(written).toContain("This project's git remote is gitlab.corp.example");
+ expect(written).toContain('ok auth signout --host gitlab.corp.example');
+ expect(written).not.toContain('Cannot determine');
+});
+
+test('explicit signout of a non-GitHub host clears the key git asks for', async () => {
+ await signoutCommand().parseAsync(['--host', 'Git.Corp.example:443'], { from: 'user' });
+ expect(clearTokenFromAllBackends).toHaveBeenCalledWith('git.corp.example');
+});
+
+test('implicit signout on a ported origin names the host with its port', async () => {
+ execFileSync('git', ['remote', 'add', 'origin', 'https://git.corp.example:8443/team/kb.git'], {
+ cwd: projectDir,
+ });
+ vi.spyOn(process, 'exit').mockImplementation(() => {
+ throw new Error('exit');
+ });
+ await expect(signoutCommand().parseAsync([], { from: 'user' })).rejects.toThrow('exit');
+ const written = vi
+ .mocked(process.stderr.write)
+ .mock.calls.map((c) => String(c[0]))
+ .join('');
+ expect(written).toContain('ok auth signout --host git.corp.example:8443');
+ expect(clearTokenFromAllBackends).not.toHaveBeenCalled();
+});
+
test.each(['owners', 'name-check'])(
'share %s honors the user-level declaration from a nested directory',
async (name) => {
diff --git a/packages/cli/src/commands/auth/git-credential-get.test.ts b/packages/cli/src/commands/auth/git-credential-get.test.ts
index 9b01ac6ac..4b8cf0654 100644
--- a/packages/cli/src/commands/auth/git-credential-get.test.ts
+++ b/packages/cli/src/commands/auth/git-credential-get.test.ts
@@ -2,9 +2,10 @@ import { mkdtempSync, rmSync } from 'node:fs';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { Readable, Writable } from 'node:stream';
-import { afterEach, beforeEach, describe, expect, test } from 'vitest';
+import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
import { FileBackend } from '../../auth/token-store.ts';
import { type CredentialGetLogContext, handleCredentialGet } from './git-credential-get.ts';
+import { runTokenPaste } from './token.ts';
function makeStream(content: string): Readable {
return Readable.from([Buffer.from(content, 'utf-8')]);
@@ -109,6 +110,100 @@ describe('handleCredentialGet', () => {
expect(result()).toBe('username=alice\npassword=gho_abc\n');
});
+ test('serves the credential that ok auth token stored for a non-GitHub host', async () => {
+ const store = makeStore(tmpDir);
+ const stderrSpy = vi.spyOn(process.stderr, 'write').mockImplementation(() => true);
+ try {
+ await runTokenPaste(
+ { host: 'git.example.internal', username: 'alice', json: false },
+ store,
+ async () => 'tok_internal_123',
+ );
+ } finally {
+ stderrSpy.mockRestore();
+ }
+ const input = makeStream('protocol=https\nhost=git.example.internal\n\n');
+ const { writable, result } = makeOutput();
+
+ const code = await handleCredentialGet(input, writable, store);
+
+ expect(code).toBe(0);
+ expect(result()).toBe('username=alice\npassword=tok_internal_123\n');
+ });
+
+ async function storeWithTokenPaste(store: FileBackend, host: string): Promise<void> {
+ const stderrSpy = vi.spyOn(process.stderr, 'write').mockImplementation(() => true);
+ try {
+ await runTokenPaste({ host, username: 'alice', json: false }, store, async () => 'tok_A');
+ } finally {
+ stderrSpy.mockRestore();
+ }
+ }
+
+ test.each([
+ ['git.example.internal', 'protocol=https\nhost=GIT.Example.Internal\n\n'],
+ ['Git.Example.Internal', 'protocol=https\nhost=git.example.internal\n\n'],
+ ['git.example.internal', 'protocol=https\nhost=git.example.internal:443\n\n'],
+ ['git.example.internal:443', 'protocol=https\nhost=git.example.internal\n\n'],
+ ['git.example.internal:8443', 'protocol=https\nhost=Git.Example.Internal:8443\n\n'],
+ ['git.example.internal', 'host=git.example.internal:443\n\n'],
+ ])('a token stored for %s answers git request %j', async (stored, request) => {
+ const store = makeStore(tmpDir);
+ await storeWithTokenPaste(store, stored);
+ const { writable, result } = makeOutput();
+
+ const code = await handleCredentialGet(makeStream(request), writable, store);
+
+ expect(code).toBe(0);
+ expect(result()).toBe('username=alice\npassword=tok_A\n');
+ });
+
+ test.each([
+ ['git.example.internal:8443', 'protocol=https\nhost=git.example.internal\n\n'],
+ ['git.example.internal', 'protocol=https\nhost=git.example.internal:8443\n\n'],
+ ['git.example.internal', 'protocol=http\nhost=git.example.internal\n\n'],
+ ['git.example.internal', 'protocol=http\nhost=git.example.internal:80\n\n'],
+ ])('a token stored for %s does not answer git request %j', async (stored, request) => {
+ const store = makeStore(tmpDir);
+ await storeWithTokenPaste(store, stored);
+ const { writable, result } = makeOutput();
+
+ const code = await handleCredentialGet(makeStream(request), writable, store);
+
+ expect(code).toBe(1);
+ expect(result()).toBe('');
+ });
+
+ test('still serves an entry stored under a mixed-case key before keys were lowercased', async () => {
+ const store = makeStore(tmpDir);
+ await store.set('GHES.Example.com', 'alice', 'tok_legacy');
+ const { writable, result } = makeOutput();
+
+ const code = await handleCredentialGet(
+ makeStream('protocol=https\nhost=GHES.Example.com\n\n'),
+ writable,
+ store,
+ );
+
+ expect(code).toBe(0);
+ expect(result()).toBe('username=alice\npassword=tok_legacy\n');
+ });
+
+ test('never hands a stored GitHub token to a plain-http request', async () => {
+ const store = makeStore(tmpDir);
+ await store.set('github.com', 'alice', 'gho_abc123');
+ const { writable, result } = makeOutput();
+
+ const code = await handleCredentialGet(
+ makeStream('protocol=http\nhost=github.com\n\n'),
+ writable,
+ store,
+ );
+
+ expect(code).toBe(1);
+ expect(result()).toBe('');
+ });
+
test('output format matches git credential protocol', async () => {
const store = makeStore(tmpDir);
await store.set('github.com', 'miles', 'gho_secret_token_123');
@@ -296,6 +391,53 @@ describe('handleCredentialGet gh-token relay', () => {
expect(result()).toBe('username=x-access-token\npassword=gho_relayed\n');
});
+ test.each(['protocol=https\nhost=GitHub.com\n\n', 'protocol=https\nhost=github.com:443\n\n'])(
+ 'the relayed token answers %j, the same host spelled differently',
+ async (request) => {
+ const store = makeStore(tmpDir);
+ process.env.OK_GH_TOKEN = 'gho_relayed';
+ process.env.OK_GH_TOKEN_HOST = 'github.com';
+ const { writable, result } = makeOutput();
+
+ const code = await handleCredentialGet(makeStream(request), writable, store);
+
+ expect(code).toBe(0);
+ expect(result()).toBe('username=x-access-token\npassword=gho_relayed\n');
+ },
+ );
+
+ test('the relayed token does not answer a different port on the same host', async () => {
+ const store = makeStore(tmpDir);
+ process.env.OK_GH_TOKEN = 'gho_relayed';
+ process.env.OK_GH_TOKEN_HOST = 'github.com';
+ const { writable, result } = makeOutput();
+
+ const code = await handleCredentialGet(
+ makeStream('protocol=https\nhost=github.com:8443\n\n'),
+ writable,
+ store,
+ );
+
+ expect(code).toBe(1);
+ expect(result()).toBe('');
+ });
+
+ test('a relayed token is never handed to a plain-http request', async () => {
+ const store = makeStore(tmpDir);
+ process.env.OK_GH_TOKEN = 'gho_relayed';
+ process.env.OK_GH_TOKEN_HOST = 'github.com';
+ const { writable, result } = makeOutput();
+
+ const code = await handleCredentialGet(
+ makeStream('protocol=http\nhost=github.com\n\n'),
+ writable,
+ store,
+ );
+
+ expect(code).toBe(1);
+ expect(result()).toBe('');
+ });
+
test('relayed token serves even when the store is empty (the reported bug)', async () => {
const store = makeStore(tmpDir);
process.env.OK_GH_TOKEN = 'gho_relayed';
diff --git a/packages/cli/src/commands/auth/git-credential-get.ts b/packages/cli/src/commands/auth/git-credential-get.ts
index 5edc6d664..e97bbd899 100644
--- a/packages/cli/src/commands/auth/git-credential-get.ts
+++ b/packages/cli/src/commands/auth/git-credential-get.ts
@@ -1,4 +1,5 @@
import type { Readable, Writable } from 'node:stream';
+import { gitCredentialHostKey } from '@inkeep/open-knowledge-core';
import type { Logger as PinoLoggerInstance } from 'pino';
import type { TokenStore, TokenStoreDiagnostics } from '../../auth/token-store.ts';
@@ -29,9 +30,18 @@ export async function handleCredentialGet(
return 1;
}
+ if (attrs.protocol !== undefined && attrs.protocol !== 'https') {
+ ctx?.log?.warn(
+ { host, protocol: attrs.protocol, outcome: 'insecure-protocol', backend: tokenStore.backend },
+ '[auth] git-credential get',
+ );
+ return 1;
+ }
+
+ const key = gitCredentialHostKey(host, attrs.protocol);
const relayToken = process.env.OK_GH_TOKEN;
const relayTokenHost = process.env.OK_GH_TOKEN_HOST;
- if (relayToken && relayTokenHost === host) {
+ if (relayToken && relayTokenHost && gitCredentialHostKey(relayTokenHost) === key) {
ctx?.log?.debug(
{
host,
@@ -45,7 +55,7 @@ export async function handleCredentialGet(
return 0;
}
- const entry = await tokenStore.get(host);
+ const entry = (await tokenStore.get(key)) ?? (key === host ? null : await tokenStore.get(host));
const diag = ctx?.getDiag?.();
const outcome = entry != null ? 'found' : (diag?.kind ?? 'absent');
if (ctx?.log) {
diff --git a/packages/cli/src/commands/auth/index.ts b/packages/cli/src/commands/auth/index.ts
index c758157fc..83486a557 100644
--- a/packages/cli/src/commands/auth/index.ts
+++ b/packages/cli/src/commands/auth/index.ts
@@ -7,10 +7,11 @@ import { patCommand } from './pat.ts';
import { reposCommand } from './repos.ts';
import { signoutCommand } from './signout.ts';
import { statusCommand } from './status.ts';
+import { tokenCommand } from './token.ts';
export function authCommand(getLog?: () => PinoLoggerInstance | undefined): Command {
const cmd = new Command('auth');
- cmd.description('GitHub authentication management');
+ cmd.description('Git host authentication management');
const getTokenStore = (diag?: TokenStoreDiagnostics) => createTokenStore(undefined, diag);
@@ -19,6 +20,7 @@ export function authCommand(getLog?: () => PinoLoggerInstance | undefined): Comm
cmd.addCommand(reposCommand(getTokenStore));
cmd.addCommand(signoutCommand());
cmd.addCommand(patCommand(getTokenStore));
+ cmd.addCommand(tokenCommand(getTokenStore));
cmd.addCommand(gitCredentialCommand(getTokenStore, getLog));
return cmd;
diff --git a/packages/cli/src/commands/auth/pat.ts b/packages/cli/src/commands/auth/pat.ts
index a16f1c977..c4fd95a2f 100644
--- a/packages/cli/src/commands/auth/pat.ts
+++ b/packages/cli/src/commands/auth/pat.ts
@@ -3,6 +3,7 @@ import { Octokit } from '@octokit/rest';
import { Command } from 'commander';
import { describeAuthFailure } from '../../auth/describe-auth-error.ts';
import type { TokenStore } from '../../auth/token-store.ts';
+import { readTokenFromStdin } from './read-token-stdin.ts';
import { resolveAuthHost } from './validate-host.ts';
interface PatOptions {
@@ -10,14 +11,6 @@ interface PatOptions {
json: boolean;
}
-async function readTokenFromStdin(): Promise<string> {
- const chunks: Buffer[] = [];
- for await (const chunk of process.stdin) {
- chunks.push(chunk as Buffer);
- }
- return Buffer.concat(chunks).toString('utf8').trim();
-}
-
async function runPat(
opts: PatOptions,
tokenStore: TokenStore,
@@ -54,7 +47,18 @@ async function runPat(
process.exit(1);
}
- await tokenStore.set(host, login, token, { gitProtocol: 'https', name, email });
+ try {
+ await tokenStore.set(host, login, token, { gitProtocol: 'https', name, email });
+ } catch (err) {
+ const reason = err instanceof Error ? err.message : String(err);
+ const message = `Could not save the token to the credential store: ${reason}`;
+ if (json) {
+ process.stdout.write(`${JSON.stringify({ type: 'error', message })}\n`);
+ } else {
+ process.stderr.write(`${message}\n`);
+ }
+ process.exit(1);
+ }
if (json) {
process.stdout.write(`${JSON.stringify({ type: 'complete', host, login })}\n`);
diff --git a/packages/cli/src/commands/auth/read-token-stdin.ts b/packages/cli/src/commands/auth/read-token-stdin.ts
new file mode 100644
index 000000000..44341cf3c
--- /dev/null
+++ b/packages/cli/src/commands/auth/read-token-stdin.ts
@@ -0,0 +1,7 @@
+export async function readTokenFromStdin(): Promise<string> {
+ const chunks: Buffer[] = [];
+ for await (const chunk of process.stdin) {
+ chunks.push(chunk as Buffer);
+ }
+ return Buffer.concat(chunks).toString('utf8').trim();
+}
diff --git a/packages/cli/src/commands/auth/status.test.ts b/packages/cli/src/commands/auth/status.test.ts
index e419be4fb..a3fcd004f 100644
--- a/packages/cli/src/commands/auth/status.test.ts
+++ b/packages/cli/src/commands/auth/status.test.ts
@@ -4,7 +4,12 @@ import { join } from 'node:path';
import { afterEach, beforeEach, describe, expect, test } from 'vitest';
import type { GhDetectResult } from '../../auth/gh-detect.ts';
import { FileBackend } from '../../auth/token-store.ts';
-import { buildStatusPayload, resolveStatusSource } from './status.ts';
+import {
+ buildStatusPayload,
+ formatStoredEntryStatus,
+ resolveStatusSource,
+ resolveStoredEntryStatus,
+} from './status.ts';
function makeStore(tmpDir: string) {
return new FileBackend(join(tmpDir, 'auth.yml'));
@@ -132,3 +137,48 @@ describe('buildStatusPayload', () => {
});
});
});
+
+describe('resolveStoredEntryStatus', () => {
+ let tmpDir: string;
+ beforeEach(() => {
+ tmpDir = mkdtempSync(join(tmpdir(), 'ok-stored-entry-status-'));
+ });
+ afterEach(() => {
+ rmSync(tmpDir, { recursive: true, force: true });
+ });
+
+ test('a stored entry reports its login as unverified', async () => {
+ const store = makeStore(tmpDir);
+ await store.set('gitea.internal', 'alice', 'tok', { gitProtocol: 'https' });
+ expect(await resolveStoredEntryStatus('gitea.internal', store)).toEqual({
+ authenticated: false,
+ unverified: true,
+ login: 'alice',
+ });
+ });
+
+ test('no stored entry reports signed out', async () => {
+ expect(await resolveStoredEntryStatus('gitea.internal', makeStore(tmpDir))).toEqual({
+ authenticated: false,
+ });
+ });
+});
+
+describe('formatStoredEntryStatus', () => {
+ test('the unverified line names the login and host and never claims a GitHub identity', () => {
+ const line = formatStoredEntryStatus(
+ { authenticated: false, unverified: true, login: 'alice' },
+ 'gitea.internal',
+ );
+ expect(line).toContain('alice');
+ expect(line).toContain('gitea.internal');
+ expect(line).toContain('git uses this credential');
+ expect(line).not.toContain('Logged in as');
+ });
+
+ test('no stored entry names the command that stores one', () => {
+ const line = formatStoredEntryStatus({ authenticated: false }, 'gitea.internal');
+ expect(line).toContain('No token stored for gitea.internal');
+ expect(line).toContain('ok auth token --host gitea.internal --username <username>');
+ });
+});
diff --git a/packages/cli/src/commands/auth/status.ts b/packages/cli/src/commands/auth/status.ts
index bce01d03c..cc4a0d542 100644
--- a/packages/cli/src/commands/auth/status.ts
+++ b/packages/cli/src/commands/auth/status.ts
@@ -3,7 +3,7 @@ import { Command } from 'commander';
import { describeAuthFailure } from '../../auth/describe-auth-error.ts';
import { detectGh } from '../../auth/gh-detect.ts';
import type { TokenStore } from '../../auth/token-store.ts';
-import { resolveAuthHost } from './validate-host.ts';
+import { resolveStatusHost, tokenCommandLine } from './validate-host.ts';
interface StatusOptions {
host: string;
@@ -24,9 +24,21 @@ export async function resolveStatusSource(
return { tier: entry.gitProtocol === 'ssh' ? 'C' : 'B', token: entry.token };
}
+type StatusSignedOut = { authenticated: false; error?: never; unverified?: never; login?: never };
+type StatusFailed = { authenticated: false; error: string; unverified?: never; login?: never };
+type StatusStoredUnverified = {
+ authenticated: false;
+ unverified: true;
+ login: string;
+ error?: never;
+};
+
+export type StoredEntryOutcome = StatusSignedOut | StatusStoredUnverified;
+
export type StatusOutcome =
- | { authenticated: false }
- | { authenticated: false; error: string }
+ | StatusSignedOut
+ | StatusFailed
+ | StatusStoredUnverified
| {
authenticated: true;
tier: 'A' | 'B' | 'C';
@@ -43,6 +55,39 @@ export function buildStatusPayload(
return { type: 'status', host, backend, ...outcome };
}
+export async function resolveStoredEntryStatus(
+ host: string,
+ tokenStore: TokenStore,
+): Promise<StoredEntryOutcome> {
+ const entry = await tokenStore.get(host);
+ return entry == null
+ ? { authenticated: false }
+ : { authenticated: false, unverified: true, login: entry.login };
+}
+
+export function formatStoredEntryStatus(outcome: StoredEntryOutcome, host: string): string {
+ if (outcome.unverified !== true) {
+ return `No token stored for ${host}. Store one with:\n\n${tokenCommandLine(host)}`;
+ }
+ return (
+ `Token stored for ${outcome.login} on ${host}. ${host} is not a GitHub host, so ` +
+ `OpenKnowledge does not verify it; git uses this credential to push and pull.`
+ );
+}
+
+async function runStoredEntryStatus(opts: StatusOptions, tokenStore: TokenStore): Promise<void> {
+ const { host, json } = opts;
+ const outcome = await resolveStoredEntryStatus(host, tokenStore);
+ if (json) {
+ process.stdout.write(
+ `${JSON.stringify(buildStatusPayload(host, tokenStore.backend, outcome))}\n`,
+ );
+ } else {
+ process.stderr.write(`${formatStoredEntryStatus(outcome, host)}\n`);
+ }
+ process.exit(outcome.unverified === true ? 0 : 1);
+}
+
async function runStatus(opts: StatusOptions, tokenStore: TokenStore): Promise<void> {
const { host, json } = opts;
@@ -100,11 +145,15 @@ export function statusCommand(getTokenStore: () => Promise<TokenStore>): Command
.description('Show authentication status')
.option(
'--host <host>',
- 'GitHub or GitHub Enterprise hostname (default: the GitHub origin host, or github.com with no origin; required otherwise)',
+ 'Git hostname (default: the origin host, or github.com with no origin; required when origin has no hostname, such as a local path). A non-GitHub host reports its stored token without verifying it',
)
.option('--json', 'Output JSON', false)
.action(async (opts: Omit<StatusOptions, 'host'> & { host?: string }) => {
- const host = resolveAuthHost(opts.host);
- await runStatus({ ...opts, host }, await getTokenStore());
+ const target = resolveStatusHost(opts.host);
+ if (target.kind === 'other') {
+ await runStoredEntryStatus({ ...opts, host: target.host }, await getTokenStore());
+ return;
+ }
+ await runStatus({ ...opts, host: target.host }, await getTokenStore());
});
}
diff --git a/packages/cli/src/commands/auth/token.test.ts b/packages/cli/src/commands/auth/token.test.ts
new file mode 100644
index 000000000..2c1357822
--- /dev/null
+++ b/packages/cli/src/commands/auth/token.test.ts
@@ -0,0 +1,298 @@
+import { mkdtempSync, rmSync } from 'node:fs';
+import { tmpdir } from 'node:os';
+import { join } from 'node:path';
+import { Readable } from 'node:stream';
+import { isGitHubHost } from '@inkeep/open-knowledge-core';
+import password from '@inquirer/password';
+import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
+import { FileBackend } from '../../auth/token-store.ts';
+import { readTokenFromStdin } from './read-token-stdin.ts';
+import { runTokenPaste, tokenCommand } from './token.ts';
+
+vi.mock('@inquirer/password', () => ({
+ default: vi.fn(async () => {
+ throw new Error('the interactive prompt was opened');
+ }),
+}));
+
+function makeStore(tmpDir: string) {
+ return new FileBackend(join(tmpDir, 'auth.yml'));
+}
+
+function constantToken(token: string): () => Promise<string> {
+ return async () => token;
+}
+
+describe('runTokenPaste', () => {
+ let tmpDir: string;
+
+ beforeEach(() => {
+ tmpDir = mkdtempSync(join(tmpdir(), 'ok-auth-token-'));
+ vi.stubEnv('HOME', tmpDir);
+ vi.stubEnv('USERPROFILE', tmpDir);
+ vi.spyOn(process.stderr, 'write').mockImplementation(() => true);
+ });
+
+ afterEach(() => {
+ vi.restoreAllMocks();
+ vi.unstubAllEnvs();
+ rmSync(tmpDir, { recursive: true, force: true });
+ });
+
+ test('stores login and token for an arbitrary git host without calling out to a network', async () => {
+ const store = makeStore(tmpDir);
+ const fetchSpy = vi.spyOn(globalThis, 'fetch');
+
+ const result = await runTokenPaste(
+ { host: 'gitea.internal', username: 'alice', json: false },
+ store,
+ constantToken('gitea_token_abc'),
+ );
+
+ expect(result).toEqual({ type: 'complete', host: 'gitea.internal', login: 'alice' });
+ expect(fetchSpy).not.toHaveBeenCalled();
+ expect(await store.get('gitea.internal')).toMatchObject({
+ login: 'alice',
+ token: 'gitea_token_abc',
+ gitProtocol: 'https',
+ });
+ });
+
+ test.each([
+ ['Gitea.Internal', 'gitea.internal'],
+ ['gitea.internal:443', 'gitea.internal'],
+ ['Gitea.Internal:8443', 'gitea.internal:8443'],
+ ])('stores %s under the key git asks for, %s', async (typed, key) => {
+ const store = makeStore(tmpDir);
+
+ const result = await runTokenPaste(
+ { host: typed, username: 'alice', json: false },
+ store,
+ constantToken('gitea_token_abc'),
+ );
+
+ expect(result).toEqual({ type: 'complete', host: key, login: 'alice' });
+ expect(await store.get(key)).toMatchObject({ login: 'alice', token: 'gitea_token_abc' });
+ });
+
+ test('accepts a host that is not a GitHub host, which ok auth pat refuses', async () => {
+ const store = makeStore(tmpDir);
+ expect(isGitHubHost('gitlab.com')).toBe(false);
+
+ const result = await runTokenPaste(
+ { host: 'gitlab.com', username: 'oauth2', json: false },
+ store,
+ constantToken('glpat_xyz'),
+ );
+
+ expect(result).toEqual({ type: 'complete', host: 'gitlab.com', login: 'oauth2' });
+ expect(await store.get('gitlab.com')).toMatchObject({ login: 'oauth2', token: 'glpat_xyz' });
+ });
+
+ test('the --token-stdin reader takes the token from the stdin stream and drops its trailing newline', async () => {
+ const store = makeStore(tmpDir);
+ const originalStdin = Object.getOwnPropertyDescriptor(process, 'stdin');
+ Object.defineProperty(process, 'stdin', {
+ configurable: true,
+ value: Readable.from([Buffer.from('gitea_from_stdin\n', 'utf8')]),
+ });
+
+ try {
+ const result = await runTokenPaste(
+ { host: 'gitea.internal', username: 'alice', json: false },
+ store,
+ readTokenFromStdin,
+ );
+ expect(result.type).toBe('complete');
+ } finally {
+ if (originalStdin) Object.defineProperty(process, 'stdin', originalStdin);
+ }
+
+ expect(await store.get('gitea.internal')).toMatchObject({ token: 'gitea_from_stdin' });
+ });
+
+ test('--json writes one complete line carrying the host and login to stdout', async () => {
+ const store = makeStore(tmpDir);
+ let stdout = '';
+ vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
+ stdout += typeof chunk === 'string' ? chunk : Buffer.from(chunk).toString('utf-8');
+ return true;
+ });
+
+ const result = await runTokenPaste(
+ { host: 'bitbucket.org', username: 'x-bitbucket-api-token-auth', json: true },
+ store,
+ constantToken('bb_token'),
+ );
+
+ expect(result).toEqual({
+ type: 'complete',
+ host: 'bitbucket.org',
+ login: 'x-bitbucket-api-token-auth',
+ });
+ expect(stdout).toBe(
+ '{"type":"complete","host":"bitbucket.org","login":"x-bitbucket-api-token-auth"}\n',
+ );
+ });
+
+ test('a missing or whitespace-only --username is rejected and writes nothing to the store', async () => {
+ const store = makeStore(tmpDir);
+
+ const missing = await runTokenPaste(
+ { host: 'gitea.internal', json: false },
+ store,
+ constantToken('tok'),
+ );
+ const blank = await runTokenPaste(
+ { host: 'gitea.internal', username: ' ', json: false },
+ store,
+ constantToken('tok'),
+ );
+
+ expect(missing.type).toBe('error');
+ expect(blank.type).toBe('error');
+ expect(await store.get('gitea.internal')).toBeNull();
+ });
+
+ test('a missing --host is rejected rather than defaulted from the workspace origin', async () => {
+ const store = makeStore(tmpDir);
+
+ const result = await runTokenPaste(
+ { username: 'alice', json: false },
+ store,
+ constantToken('tok'),
+ );
+
+ expect(result.type).toBe('error');
+ expect(await store.get('github.com')).toBeNull();
+ });
+
+ test('an empty token is rejected and writes nothing to the store', async () => {
+ const store = makeStore(tmpDir);
+
+ const result = await runTokenPaste(
+ { host: 'gitea.internal', username: 'alice', json: false },
+ store,
+ constantToken(''),
+ );
+
+ expect(result.type).toBe('error');
+ expect(await store.get('gitea.internal')).toBeNull();
+ });
+
+ test('clearing the host on this backend removes the stored entry, which is the FileBackend half of signout and not its fan-out across backends', async () => {
+ const store = makeStore(tmpDir);
+ await runTokenPaste(
+ { host: 'gitea.internal', username: 'alice', json: false },
+ store,
+ constantToken('tok'),
+ );
+ expect(await store.get('gitea.internal')).not.toBeNull();
+
+ await store.clear('gitea.internal');
+
+ expect(await store.get('gitea.internal')).toBeNull();
+ });
+
+ test.each([
+ 'https://gitea.internal',
+ 'gitea.internal/team/wiki',
+ 'gitea.internal/',
+ 'gitea.internal:port',
+ ])('a host git would never send (%s) is rejected and writes nothing', async (host) => {
+ const store = makeStore(tmpDir);
+ const result = await runTokenPaste(
+ { host, username: 'alice', json: false },
+ store,
+ constantToken('tok'),
+ );
+ expect(result).toMatchObject({ type: 'error', message: expect.stringContaining('host name') });
+ expect(await store.get(host)).toBeNull();
+ });
+
+ test('a host with a port is stored under the host and port git sends', async () => {
+ const store = makeStore(tmpDir);
+ const result = await runTokenPaste(
+ { host: 'gitea.internal:8443', username: 'alice', json: false },
+ store,
+ constantToken('tok'),
+ );
+ expect(result.type).toBe('complete');
+ expect(await store.get('gitea.internal:8443')).toMatchObject({ login: 'alice' });
+ });
+
+ test('a GitHub host is refused and pointed at ok auth pat, leaving the verified entry alone', async () => {
+ const store = makeStore(tmpDir);
+ await store.set('github.com', 'octocat', 'verified', { gitProtocol: 'https' });
+ const result = await runTokenPaste(
+ { host: 'github.com', username: 'mallory', json: false },
+ store,
+ constantToken('unverified'),
+ );
+ expect(result).toMatchObject({
+ type: 'error',
+ message: expect.stringContaining('ok auth pat --host github.com'),
+ });
+ expect(await store.get('github.com')).toMatchObject({ login: 'octocat', token: 'verified' });
+ });
+
+ test('a credential store that refuses the write reports a structured error', async () => {
+ const store = makeStore(tmpDir);
+ vi.spyOn(store, 'set').mockRejectedValue(new Error('keychain locked'));
+ let stdout = '';
+ vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {
+ stdout += String(chunk);
+ return true;
+ });
+ const result = await runTokenPaste(
+ { host: 'gitea.internal', username: 'alice', json: true },
+ store,
+ constantToken('tok'),
+ );
+ expect(result).toMatchObject({
+ type: 'error',
+ message: expect.stringContaining('keychain locked'),
+ });
+ expect(JSON.parse(stdout)).toMatchObject({ type: 'error' });
+ });
+});
+
+describe('tokenCommand', () => {
+ let tmpDir: string;
+
+ beforeEach(() => {
+ tmpDir = mkdtempSync(join(tmpdir(), 'ok-auth-token-command-'));
+ vi.stubEnv('HOME', tmpDir);
+ vi.stubEnv('USERPROFILE', tmpDir);
+ vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
+ });
+
+ afterEach(() => {
+ vi.restoreAllMocks();
+ vi.unstubAllEnvs();
+ rmSync(tmpDir, { recursive: true, force: true });
+ });
+
+ test('--token-stdin reads the token from stdin and never opens the interactive prompt', async () => {
+ const store = makeStore(tmpDir);
+ const originalStdin = Object.getOwnPropertyDescriptor(process, 'stdin');
+ Object.defineProperty(process, 'stdin', {
+ configurable: true,
+ value: Readable.from([Buffer.from('piped_token\n', 'utf8')]),
+ });
+ try {
+ await tokenCommand(async () => store).parseAsync(
+ ['--host', 'gitea.internal', '--username', 'alice', '--token-stdin', '--json'],
+ { from: 'user' },
+ );
+ } finally {
+ if (originalStdin) Object.defineProperty(process, 'stdin', originalStdin);
+ }
+ expect(password).not.toHaveBeenCalled();
+ expect(await store.get('gitea.internal')).toMatchObject({
+ login: 'alice',
+ token: 'piped_token',
+ });
+ });
+});
diff --git a/packages/cli/src/commands/auth/token.ts b/packages/cli/src/commands/auth/token.ts
new file mode 100644
index 000000000..a78c81b53
--- /dev/null
+++ b/packages/cli/src/commands/auth/token.ts
@@ -0,0 +1,108 @@
+import { gitCredentialHostKey, isGitCredentialHost } from '@inkeep/open-knowledge-core';
+import password from '@inquirer/password';
+import { Command } from 'commander';
+import type { TokenStore } from '../../auth/token-store.ts';
+import { readTokenFromStdin } from './read-token-stdin.ts';
+import { isDeclaredGitHubHost } from './validate-host.ts';
+
+export interface TokenPasteOptions {
+ host?: string;
+ username?: string;
+ json: boolean;
+}
+
+export type TokenPasteResult =
+ | { type: 'complete'; host: string; login: string }
+ | { type: 'error'; message: string };
+
+const USERNAME_HELP =
+ 'Username git sends with the token (Bitbucket: x-bitbucket-api-token-auth for an API token, x-token-auth for a repository or workspace access token; oauth2 for GitLab; your Gitea username; any non-empty value for Azure DevOps)';
+
+function emit(result: TokenPasteResult, json: boolean): TokenPasteResult {
+ if (json) {
+ process.stdout.write(`${JSON.stringify(result)}\n`);
+ } else if (result.type === 'error') {
+ process.stderr.write(`${result.message}\n`);
+ } else {
+ process.stderr.write(`✓ Token stored for ${result.login} on ${result.host}\n`);
+ }
+ return result;
+}
+
+export async function runTokenPaste(
+ opts: TokenPasteOptions,
+ tokenStore: TokenStore,
+ readToken?: () => Promise<string>,
+): Promise<TokenPasteResult> {
+ const { json } = opts;
+
+ const rawHost = opts.host?.trim() ?? '';
+ if (!rawHost) {
+ return emit({ type: 'error', message: 'A host is required. Pass --host <host>.' }, json);
+ }
+ if (!isGitCredentialHost(rawHost)) {
+ return emit(
+ {
+ type: 'error',
+ message: `${rawHost} is not a host name. Pass the host git connects to, with an optional :port and no scheme or path, for example git.example.com or git.example.com:8443.`,
+ },
+ json,
+ );
+ }
+ const host = gitCredentialHostKey(rawHost);
+ if (isDeclaredGitHubHost(host)) {
+ return emit(
+ {
+ type: 'error',
+ message: `${host} is a GitHub host. Use ok auth pat --host ${host}, which checks the token with GitHub before storing it.`,
+ },
+ json,
+ );
+ }
+
+ const username = opts.username?.trim() ?? '';
+ if (!username) {
+ return emit(
+ { type: 'error', message: 'A username is required. Pass --username <username>.' },
+ json,
+ );
+ }
+
+ const getToken = readToken ?? (() => password({ message: 'Enter token:' }));
+ const token = await getToken();
+ if (!token) {
+ return emit({ type: 'error', message: 'No token provided' }, json);
+ }
+
+ try {
+ await tokenStore.set(host, username, token, { gitProtocol: 'https' });
+ } catch (err) {
+ const reason = err instanceof Error ? err.message : String(err);
+ return emit(
+ { type: 'error', message: `Could not save the token to the credential store: ${reason}` },
+ json,
+ );
+ }
+
+ return emit({ type: 'complete', host, login: username }, json);
+}
+
+export function tokenCommand(getTokenStore: () => Promise<TokenStore>): Command {
+ return new Command('token')
+ .description('Store an access token for any git host')
+ .option('--host <host>', 'Git host to store the token for')
+ .option('--username <username>', USERNAME_HELP)
+ .option('--json', 'Output JSON', false)
+ .option('--token-stdin', 'Read the token from stdin instead of prompting', false)
+ .action(
+ async (opts: { host?: string; username?: string; json: boolean; tokenStdin?: boolean }) => {
+ const readToken = opts.tokenStdin ? readTokenFromStdin : undefined;
+ const result = await runTokenPaste(
+ { host: opts.host, username: opts.username, json: opts.json },
+ await getTokenStore(),
+ readToken,
+ );
+ if (result.type === 'error') process.exit(1);
+ },
+ );
+}
diff --git a/packages/cli/src/commands/auth/validate-host.test.ts b/packages/cli/src/commands/auth/validate-host.test.ts
index 1516966c3..e4cd09869 100644
--- a/packages/cli/src/commands/auth/validate-host.test.ts
+++ b/packages/cli/src/commands/auth/validate-host.test.ts
@@ -75,7 +75,8 @@ describe('gitHubHostRejection', () => {
vi.stubEnv('OK_CHANNEL', '');
expect(gitHubHostRejection('git.example.internal')).toBe(
`${errorColor('Error:')} git.example.internal is not a known GitHub host.\n` +
- 'To use a GitHub Enterprise Server host, declare it in ~/.ok/global.yml:\n\n git:\n hosts:\n git.example.internal:\n provider: github\n',
+ 'To use a GitHub Enterprise Server host, declare it in ~/.ok/global.yml:\n\n git:\n hosts:\n git.example.internal:\n provider: github\n\n' +
+ 'If git.example.internal is not a GitHub host, store an access token for git with:\n\n ok auth token --host git.example.internal --username <username>\n',
);
});
diff --git a/packages/cli/src/commands/auth/validate-host.ts b/packages/cli/src/commands/auth/validate-host.ts
index 42e7c9bd1..da240c922 100644
--- a/packages/cli/src/commands/auth/validate-host.ts
+++ b/packages/cli/src/commands/auth/validate-host.ts
@@ -1,4 +1,5 @@
import {
+ gitCredentialHostKey,
isGitHubHost,
normalizeGitHostname,
okUserHomeDisplayPath,
@@ -6,6 +7,7 @@ import {
import {
findEnclosingProjectRoot,
readDeclaredGitHubHosts,
+ readOriginCredentialHost,
resolveGitHubAuthHost,
} from '@inkeep/open-knowledge-server';
import { error as errorColor } from '../../ui/colors.ts';
@@ -19,15 +21,28 @@ function declarationRemedy(host: string): string {
return `${okUserHomeDisplayPath('global.yml')}:\n\n git:\n hosts:\n ${host}:\n provider: github\n`;
}
+export function tokenCommandLine(host: string): string {
+ return ` ok auth token --host ${host} --username <username>`;
+}
+
+function tokenRemedy(host: string): string {
+ return `If ${host} is not a GitHub host, store an access token for git with:\n\n${tokenCommandLine(host)}\n`;
+}
+
function explicitGitHubHostRejection(host: string): string {
return (
`${errorColor('Error:')} ${host} is not a known GitHub host.\n` +
- `To use a GitHub Enterprise Server host, declare it in ${declarationRemedy(host)}`
+ `To use a GitHub Enterprise Server host, declare it in ${declarationRemedy(host)}\n` +
+ tokenRemedy(host)
);
}
+export function isDeclaredGitHubHost(host: string): boolean {
+ return isGitHubHost(host, readDeclaredGitHubHosts());
+}
+
export function gitHubHostRejection(host: string): string | null {
- return isGitHubHost(host, readDeclaredGitHubHosts())
+ return isDeclaredGitHubHost(host)
? null
: explicitGitHubHostRejection(normalizeGitHostname(host));
}
@@ -39,16 +54,44 @@ export function validateGitHubHost(host: string): void {
process.exit(1);
}
-function nonGitHubOriginRejection(originHost: string | null): string {
- const lead =
- originHost === null
- ? `${errorColor('Error:')} Cannot determine a GitHub hostname from this project's git remote.\n`
- : `${errorColor('Error:')} this project's git remote is ${originHost}, which is not a GitHub host, so GitHub sign-in does not apply here.\n`;
- const remedy =
- originHost === null
- ? 'Pass --host <hostname> to target a GitHub host explicitly.\n'
- : `Pass --host <hostname> to target a GitHub host explicitly, or, if ${originHost} runs GitHub Enterprise Server, declare it in ${declarationRemedy(originHost)}`;
- return lead + remedy;
+function nonGitHubOriginRejection(
+ credentialHost: string | null,
+ offerDeclaration: boolean,
+): string {
+ if (credentialHost === null) {
+ return (
+ `${errorColor('Error:')} Cannot determine a GitHub hostname from this project's git remote.\n` +
+ 'Pass --host <hostname> to target a GitHub host explicitly.\n'
+ );
+ }
+ const host = normalizeGitHostname(credentialHost);
+ const declaration = offerDeclaration
+ ? `, or, if ${host} runs GitHub Enterprise Server, declare it in ${declarationRemedy(host)}\n`
+ : '.\n';
+ return (
+ `${errorColor('Error:')} this project's git remote is ${host}, which is not a GitHub host, so GitHub sign-in does not apply here.\n` +
+ `Pass --host <hostname> to target a GitHub host explicitly${declaration}` +
+ tokenRemedy(credentialHost)
+ );
+}
+
+export type StatusHost = { kind: 'github'; host: string } | { kind: 'other'; host: string };
+
+export function resolveStatusHost(
+ explicitHost: string | undefined,
+ projectDir: string = authProjectDir(),
+): StatusHost {
+ if (explicitHost !== undefined) {
+ return isDeclaredGitHubHost(explicitHost)
+ ? { kind: 'github', host: explicitHost }
+ : { kind: 'other', host: gitCredentialHostKey(explicitHost) };
+ }
+ const result = resolveGitHubAuthHost(projectDir);
+ if (result.kind === 'ok') return { kind: 'github', host: result.host };
+ const tokenHost = readOriginCredentialHost(projectDir) ?? result.host;
+ if (tokenHost !== null) return { kind: 'other', host: tokenHost };
+ process.stderr.write(nonGitHubOriginRejection(null, false));
+ process.exit(1);
}
export function resolveAuthHost(
@@ -60,7 +103,10 @@ export function resolveAuthHost(
process.stderr.write(
result.kind === 'rejected-explicit'
? explicitGitHubHostRejection(result.host)
- : nonGitHubOriginRejection(result.host),
+ : nonGitHubOriginRejection(
+ readOriginCredentialHost(projectDir) ?? result.host,
+ result.host !== null,
+ ),
);
process.exit(1);
}
@@ -69,16 +115,19 @@ export function resolveSignoutHost(
explicitHost: string | undefined,
projectDir: string = authProjectDir(),
): string {
- if (explicitHost !== undefined) return explicitHost;
+ if (explicitHost !== undefined) {
+ return isDeclaredGitHubHost(explicitHost) ? explicitHost : gitCredentialHostKey(explicitHost);
+ }
const result = resolveGitHubAuthHost(projectDir);
if (result.kind === 'ok') return result.host;
+ const credentialHost = readOriginCredentialHost(projectDir) ?? result.host;
const lead =
- result.host === null
+ credentialHost === null
? `Cannot determine a hostname from this project's git remote.`
- : `This project's git remote is ${result.host}, which is not a known GitHub host.`;
+ : `This project's git remote is ${normalizeGitHostname(credentialHost)}, which is not a known GitHub host.`;
process.stderr.write(
`${errorColor('Error:')} ${lead}\n` +
- `Run ok auth signout --host ${result.host ?? '<hostname>'} to remove stored local credentials. No provider declaration is required.\n`,
+ `Run ok auth signout --host ${credentialHost ?? '<hostname>'} to remove stored local credentials. No provider declaration is required.\n`,
);
process.exit(1);
}
diff --git a/packages/cli/src/commands/clone-git-config-env.test.ts b/packages/cli/src/commands/clone-git-config-env.test.ts
index c7e2a1e75..520f6e1d9 100644
--- a/packages/cli/src/commands/clone-git-config-env.test.ts
+++ b/packages/cli/src/commands/clone-git-config-env.test.ts
@@ -10,8 +10,6 @@ import {
rmSync,
writeFileSync,
} from 'node:fs';
-import { createServer } from 'node:http';
-import type { AddressInfo } from 'node:net';
import { tmpdir } from 'node:os';
import { dirname, join } from 'node:path';
import { shellSingleQuote } from '@inkeep/open-knowledge-core';
@@ -29,6 +27,7 @@ import {
resolveCloneAuth,
runClone,
} from './clone.ts';
+import { startGitHubStandIn } from './github-stand-in.test-helper.ts';
const relayTokenGh = (): GhDetectResult => ({ available: true, token: 'ghs_relay_probe' });
@@ -90,20 +89,40 @@ function helperConfigValue(helperPath: string): string {
return `!${shellSingleQuote(process.execPath)} ${shellSingleQuote(helperPath)}`;
}
-async function listenUnauthorized(): Promise<{ port: number; close: () => Promise<void> }> {
- const server = createServer((req, res) => {
- req.resume();
- res.writeHead(401, { 'WWW-Authenticate': 'Basic realm="ok-test"' });
- res.end();
+const TOKEN_HOST = 'git.example.test';
+
+async function startHttpsTokenHost(root: string): Promise<{
+ url: string;
+ gitConfig: Array<[string, string]>;
+ close: () => Promise<void>;
+}> {
+ mkdirSync(root, { recursive: true });
+ const standIn = await startGitHubStandIn({
+ root,
+ acceptedPassword: 'stand-in-only',
+ repositories: [],
+ enterpriseHosts: { [TOKEN_HOST]: ['stand-in-only'] },
});
- await new Promise<void>((resolveListen) => server.listen(0, '127.0.0.1', resolveListen));
- const { port } = server.address() as AddressInfo;
return {
- port,
- close: () => new Promise<void>((resolveClose) => server.close(() => resolveClose())),
+ url: `https://${TOKEN_HOST}/o/r.git`,
+ gitConfig: [
+ ['http.proxy', standIn.proxyUrl],
+ ['http.sslCAInfo', standIn.caFile],
+ ['http.curloptResolve', `${TOKEN_HOST}:443:127.0.0.1`],
+ ],
+ close: standIn.close,
};
}
+function commandScopeConfig(entries: Array<[string, string]>): Record<string, string> {
+ const env: Record<string, string> = { GIT_CONFIG_COUNT: String(entries.length) };
+ entries.forEach(([key, value], index) => {
+ env[`GIT_CONFIG_KEY_${index}`] = key;
+ env[`GIT_CONFIG_VALUE_${index}`] = value;
+ });
+ return env;
+}
+
describe('clone honours the environment command-scope git config (GIT_CONFIG_COUNT)', () => {
let workspace: string;
@@ -151,16 +170,21 @@ describe('clone honours the environment command-scope git config (GIT_CONFIG_COU
test("runClone asks the CLI's own credential helper and never an environment-configured one", async () => {
const okHelper = writeCredentialHelper(join(workspace, 'ok-cli.mjs'), 'ok');
const envHelper = writeCredentialHelper(join(workspace, 'env-helper.mjs'), 'env');
- vi.stubEnv('GIT_CONFIG_COUNT', '1');
- vi.stubEnv('GIT_CONFIG_KEY_0', 'credential.helper');
- vi.stubEnv('GIT_CONFIG_VALUE_0', helperConfigValue(envHelper));
- const server = await listenUnauthorized();
+ const server = await startHttpsTokenHost(join(workspace, 'stand-in'));
+ for (const [name, value] of Object.entries(
+ commandScopeConfig([
+ ['credential.helper', helperConfigValue(envHelper)],
+ ...server.gitConfig,
+ ]),
+ )) {
+ vi.stubEnv(name, value);
+ }
const cliEntry = process.argv[1];
process.argv[1] = okHelper;
try {
await expect(
runClone(
- `http://127.0.0.1:${server.port}/o/r.git`,
+ server.url,
{ json: true, dir: 'target', _detectGhFn: relayTokenGh },
{} as never,
workspace,
@@ -182,10 +206,10 @@ describe('clone honours the environment command-scope git config (GIT_CONFIG_COU
const okHelper = writeCredentialHelper(join(workspace, 'ok-cli.mjs'), 'ok');
const envHelper = writeCredentialHelper(join(workspace, 'env-helper.mjs'), 'env');
const tokenStore = new FileBackend(join(workspace, 'auth.yml'));
- await tokenStore.set('127.0.0.1', 'alice', 'ghp_stored_probe', { gitProtocol: 'https' });
- const server = await listenUnauthorized();
+ await tokenStore.set(TOKEN_HOST, 'alice', 'ghp_stored_probe', { gitProtocol: 'https' });
+ const server = await startHttpsTokenHost(join(workspace, 'stand-in'));
try {
- const url = `http://127.0.0.1:${server.port}/o/r.git`;
+ const url = server.url;
const { auth } = await resolveCloneAuth(url, tokenStore, {
selfCliArgs: [process.execPath, okHelper],
cwd: workspace,
@@ -199,9 +223,10 @@ describe('clone honours the environment command-scope git config (GIT_CONFIG_COU
PATH: process.env.PATH ?? '',
HOME: workspace,
GIT_CONFIG_NOSYSTEM: '1',
- GIT_CONFIG_COUNT: '1',
- GIT_CONFIG_KEY_0: 'credential.helper',
- GIT_CONFIG_VALUE_0: helperConfigValue(envHelper),
+ ...commandScopeConfig([
+ ['credential.helper', helperConfigValue(envHelper)],
+ ...server.gitConfig,
+ ]),
}),
);
diff --git a/packages/cli/src/commands/clone.test.ts b/packages/cli/src/commands/clone.test.ts
index 947b480f9..da1b6f744 100644
--- a/packages/cli/src/commands/clone.test.ts
+++ b/packages/cli/src/commands/clone.test.ts
@@ -195,6 +195,53 @@ describe('resolveCloneAuth', () => {
expect(declaredMiss).toBeUndefined();
});
+ test.each([
+ ['https://git.corp.example:8443/team/kb.git', 'git.corp.example:8443'],
+ ['https://Git.Corp.example/team/kb.git', 'git.corp.example'],
+ ['https://git.corp.example:443/team/kb.git', 'git.corp.example'],
+ ])('a token stored for the host git asks for authenticates a clone of %s', async (url, key) => {
+ const store = makeStore();
+ await store.set(key, 'alice', 'tok_A', { gitProtocol: 'https' });
+
+ const { auth: resolved } = await resolveCloneAuth(url, store, {
+ selfCliArgs: SELF,
+ _detectGhFn: () => ({ available: false }),
+ _readCredentialUrlMatch: () => null,
+ });
+
+ expect(resolved.tier).toBe('B');
+ expect(resolved.gitConfig[0]).toBe('credential.helper=');
+ });
+
+ test.each(['http://git.corp.example/team/kb.git', 'http://git.corp.example:8080/team/kb.git'])(
+ 'a plain-http clone of %s keeps ambient git credentials, since the helper answers only https',
+ async (url) => {
+ const store = makeStore();
+ await store.set('git.corp.example', 'alice', 'tok_A', { gitProtocol: 'https' });
+
+ const { auth: resolved } = await resolveCloneAuth(url, store, {
+ selfCliArgs: SELF,
+ _detectGhFn: () => ({ available: true, token: 'ghs_x', fallback: false }),
+ _readCredentialUrlMatch: () => null,
+ });
+
+ expect(resolved).toEqual({ tier: 'none', gitConfig: [] });
+ },
+ );
+
+ test('a clone URL with a port still finds an entry stored under the bare host', async () => {
+ const store = makeStore();
+ await store.set('ghes.corp.example', 'alice', 'tok_A', { gitProtocol: 'https' });
+
+ const { auth: resolved } = await resolveCloneAuth('https://ghes.corp.example:8443/o/r', store, {
+ selfCliArgs: SELF,
+ _detectGhFn: () => ({ available: false }),
+ _readCredentialUrlMatch: () => null,
+ });
+
+ expect(resolved.tier).toBe('B');
+ });
+
test('an unparseable clone URL is rejected the way runClone rejects it', async () => {
await expect(resolveCloneAuth('not-a-url', makeStore(), { selfCliArgs: SELF })).rejects.toThrow(
'Invalid git URL: not-a-url',
diff --git a/packages/cli/src/commands/clone.ts b/packages/cli/src/commands/clone.ts
index ac6ba345d..10459a30b 100644
--- a/packages/cli/src/commands/clone.ts
+++ b/packages/cli/src/commands/clone.ts
@@ -3,6 +3,7 @@ import { join, resolve } from 'node:path';
import {
type ClassifiedGitAuthError,
classifyGitAuthError,
+ credentialHostFromRemoteUrl,
isBranchNotFoundGitError,
isLoginFixableGitAuthError,
shellSingleQuote,
@@ -199,14 +200,16 @@ export async function resolveCloneAuth(
if (!parsed) {
throw new Error(`Invalid git URL: ${stripUrlPassword(cloneUrl)}`);
}
+ if (cloneUrl.trim().startsWith('http://')) return { auth: { tier: 'none', gitConfig: [] } };
const account = resolveGitHubAccountFromUrl(cloneUrl, {
cwd: options.cwd,
_readCredentialUrlMatch: options._readCredentialUrlMatch,
});
+ const credentialHost = credentialHostFromRemoteUrl(cloneUrl) ?? undefined;
const auth = await resolveAuth(
account.host ?? parsed.hostname,
tokenStore,
- { selfCliArgs: options.selfCliArgs, login: account.login },
+ { selfCliArgs: options.selfCliArgs, login: account.login, credentialHost },
options._detectGhFn,
);
const declaredMiss =
diff --git a/packages/cli/src/commands/sync-credential-helper.test.ts b/packages/cli/src/commands/sync-credential-helper.test.ts
index 9dc8b7bfc..29ba29aab 100644
--- a/packages/cli/src/commands/sync-credential-helper.test.ts
+++ b/packages/cli/src/commands/sync-credential-helper.test.ts
@@ -1409,14 +1409,17 @@ describe("ok sync without a running server authenticates through OpenKnowledge's
});
test.each([
- { spelling: 'in different letter case', writtenHost: 'GitHub.com' },
- { spelling: 'with an explicit :443', writtenHost: `${GITHUB_HOST}:443` },
- ])(
- "with a second push URL that writes the signed-in host $spelling, ok push sends that URL's credential request only to OpenKnowledge's helper, which declines it, and never to the user's own helpers",
- async ({ writtenHost }) => {
+ { spelling: 'in different letter case', writtenHost: 'GitHub.com', source: 'stored' },
+ { spelling: 'with an explicit :443', writtenHost: `${GITHUB_HOST}:443`, source: 'stored' },
+ { spelling: 'in different letter case', writtenHost: 'GitHub.com', source: 'gh' },
+ { spelling: 'with an explicit :443', writtenHost: `${GITHUB_HOST}:443`, source: 'gh' },
+ ] as const)(
+ "with a second push URL that writes the signed-in host $spelling, ok push answers it from OpenKnowledge's helper with the $source token and never asks the user's own helpers",
+ async ({ writtenHost, source }) => {
+ const token = source === 'stored' ? OK_TOKEN : GH_TOKEN;
const server = await arrange({
- gitHubAccepts: OK_TOKEN,
- okStoreToken: OK_TOKEN,
+ gitHubAccepts: token,
+ ...(source === 'stored' ? { okStoreToken: OK_TOKEN } : {}),
repository: (git, github) => {
originUpstreamOnGitHub(git, github);
git('config', '--add', 'remote.origin.pushurl', ORIGIN_URL);
@@ -1424,11 +1427,26 @@ describe("ok sync without a running server authenticates through OpenKnowledge's
},
});
- const outcome = await syncWith(signedInSeam(), 'push');
-
- expect(server.requests, "the first push URL's receive-pack").toContainEqual(
- authenticatedRequest('push', { username: expect.any(String), password: OK_TOKEN }),
+ const outcome = await syncWith(
+ source === 'stored'
+ ? signedInSeam()
+ : {
+ tokenStore: new FileBackend(authFile),
+ _detectGhFn: () => ({ available: true, token: GH_TOKEN }),
+ },
+ 'push',
);
+
+ expect.soft(outcome.error, 'the error runSync threw').toBeNull();
+ expect(
+ server.requests.filter(
+ (request) =>
+ request.path.endsWith('/info/refs?service=git-receive-pack') &&
+ request.credential?.password === token &&
+ request.status === 200,
+ ),
+ 'authenticated push discoveries, one per push URL',
+ ).toHaveLength(2);
expect
.soft(
readJsonLines<CliHelperCall>(cliHelperLog),
@@ -1442,12 +1460,6 @@ describe("ok sync without a running server authenticates through OpenKnowledge's
expect
.soft(readJsonLines<RecordedHelperCall>(helperLog), 'calls reaching the ambient helpers')
.toEqual([]);
- expect.soft(outcome.error, 'the error runSync threw').not.toBeNull();
- const message =
- outcome.error instanceof Error ? outcome.error.message : String(outcome.error);
- expect
- .soft(message, 'the failure ok push reports for the second push URL')
- .not.toContain("OpenKnowledge's GitHub sign-in");
},
);
diff --git a/packages/core/src/bridge/compose.ts b/packages/core/src/bridge/compose.ts
index f4cc8a286..2a597ec3d 100644
--- a/packages/core/src/bridge/compose.ts
+++ b/packages/core/src/bridge/compose.ts
@@ -1,3 +1,4 @@
+
import { prependFrontmatter, stripFrontmatter } from '../extensions/frontmatter.ts';
export type ComposeAdjustment = 'none' | 'body' | 'frontmatter' | 'unresolved';
diff --git a/packages/core/src/bridge/doc-boundary-space.ts b/packages/core/src/bridge/doc-boundary-space.ts
index 8fb428b90..01ef76a9f 100644
--- a/packages/core/src/bridge/doc-boundary-space.ts
+++ b/packages/core/src/bridge/doc-boundary-space.ts
@@ -1,3 +1,4 @@
+
import { FRONTMATTER_RE, stripFrontmatter } from '../extensions/frontmatter.ts';
import { carriedEdgeEmpties, type DocEdgeEmpties } from '../markdown/doc-edge-blank-runs.ts';
diff --git a/packages/core/src/constants/github.test.ts b/packages/core/src/constants/github.test.ts
index 692d9d29e..69fd9e1b4 100644
--- a/packages/core/src/constants/github.test.ts
+++ b/packages/core/src/constants/github.test.ts
@@ -1,7 +1,9 @@
import { describe, expect, test } from 'vitest';
import {
classifyGitHubShareHost,
+ credentialHostFromRemoteUrl,
declaredGitHubHostsFrom,
+ gitCredentialHostKey,
isGitHubHost,
normalizeGitHostname,
} from './github.ts';
@@ -118,3 +120,54 @@ describe('classifyGitHubShareHost', () => {
expect(classifyGitHubShareHost('www.github.com')).toBe('github.com');
});
});
+
+describe('gitCredentialHostKey', () => {
+ test('lowercases the host', () => {
+ expect(gitCredentialHostKey('Git.Example.COM')).toBe('git.example.com');
+ });
+
+ test('keeps a non-default port', () => {
+ expect(gitCredentialHostKey('Git.Example.com:8443')).toBe('git.example.com:8443');
+ });
+
+ test('drops the default HTTPS port', () => {
+ expect(gitCredentialHostKey('git.example.com:443')).toBe('git.example.com');
+ expect(gitCredentialHostKey('git.example.com:443', 'https')).toBe('git.example.com');
+ });
+
+ test('drops the default HTTP port only for http', () => {
+ expect(gitCredentialHostKey('git.example.com:80', 'http')).toBe('git.example.com');
+ expect(gitCredentialHostKey('git.example.com:80', 'https')).toBe('git.example.com:80');
+ expect(gitCredentialHostKey('git.example.com:443', 'http')).toBe('git.example.com:443');
+ });
+
+ test('keeps the port for a protocol with no known default', () => {
+ expect(gitCredentialHostKey('git.example.com:443', 'ssh')).toBe('git.example.com:443');
+ });
+
+ test('does not fold www.github.com', () => {
+ expect(gitCredentialHostKey('www.github.com')).toBe('www.github.com');
+ });
+});
+
+describe('credentialHostFromRemoteUrl', () => {
+ test.each([
+ ['https://git.example.com/team/kb.git', 'git.example.com'],
+ ['https://[email protected]:8443/team/kb.git', 'git.example.com:8443'],
+ ['https://git.example.com:443/team/kb.git', 'git.example.com'],
+ ['http://git.example.com:80/team/kb.git', 'git.example.com'],
+ ['http://git.example.com:8080/team/kb.git', 'git.example.com:8080'],
+ ['https://gitlab.example.com/group/sub/kb.git', 'gitlab.example.com'],
+ ['https://dev.azure.com/org/proj/_git/kb', 'dev.azure.com'],
+ ['https://git.example.com', 'git.example.com'],
+ ['ssh://[email protected]:2222/team/kb.git', 'git.example.com'],
+ ['[email protected]:team/kb.git', 'git.example.com'],
+ ['git://git.example.com:9418/team/kb.git', 'git.example.com'],
+ ])('%s -> %s', (url, expected) => {
+ expect(credentialHostFromRemoteUrl(url)).toBe(expected);
+ });
+
+ test.each(['', '/srv/git/kb.git', '../kb', 'C:\\repos\\kb'])('%j has no host', (url) => {
+ expect(credentialHostFromRemoteUrl(url)).toBeNull();
+ });
+});
diff --git a/packages/core/src/constants/github.ts b/packages/core/src/constants/github.ts
index 92ac7623d..44d2ed050 100644
--- a/packages/core/src/constants/github.ts
+++ b/packages/core/src/constants/github.ts
@@ -13,6 +13,32 @@ const KNOWN_NON_GITHUB_GIT_HOSTS: ReadonlySet<string> = new Set([
'sourcehut.org',
]);
+const GIT_CREDENTIAL_HOST_PATTERN = /^[A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?(?::\d{1,5})?$/;
+
+export function isGitCredentialHost(host: string): boolean {
+ return GIT_CREDENTIAL_HOST_PATTERN.test(host);
+}
+
+const DEFAULT_PORT_BY_PROTOCOL: Readonly<Record<string, string>> = { https: '443', http: '80' };
+
+export function gitCredentialHostKey(host: string, protocol = 'https'): string {
+ const lower = host.trim().toLowerCase();
+ const defaultPort = DEFAULT_PORT_BY_PROTOCOL[protocol.toLowerCase()];
+ return defaultPort !== undefined && lower.endsWith(`:${defaultPort}`)
+ ? lower.slice(0, -(defaultPort.length + 1))
+ : lower;
+}
+
+export function credentialHostFromRemoteUrl(remoteUrl: string): string | null {
+ const raw = remoteUrl.trim();
+ const http = /^(https?):\/\/(?:[^/]*@)?([\w.-]+(?::\d+)?)(?:[/?#]|$)/i.exec(raw);
+ if (http) return gitCredentialHostKey(http[2], http[1]);
+ const url = /^[a-z][a-z0-9+.-]*:\/\/(?:[^/]*@)?([\w.-]+)(?::\d+)?(?:[/?#]|$)/i.exec(raw);
+ if (url) return url[1].toLowerCase();
+ const scp = /^(?:[^@/]+@)?([\w.-]+):(?!\/\/|\\)/.exec(raw);
+ return scp ? scp[1].toLowerCase() : null;
+}
+
export function normalizeGitHostname(raw: string): string {
const host = raw.toLowerCase().replace(/:\d+$/, '');
return host === 'www.github.com' ? 'github.com' : host;
diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts
index 1f7ecb2f2..815681f84 100644
--- a/packages/core/src/index.ts
+++ b/packages/core/src/index.ts
@@ -443,10 +443,13 @@ export { SHOW_INSTALL_SKILL } from './constants/feature-flags.ts';
export type { OkFolderState } from './constants/folder-state.ts';
export {
classifyGitHubShareHost,
+ credentialHostFromRemoteUrl,
DEFAULT_GITHUB_OAUTH_CLIENT_ID,
declaredGitHubHostsFrom,
GIT_HOST_PROVIDERS,
type GitHostProvider,
+ gitCredentialHostKey,
+ isGitCredentialHost,
isGitHubHost,
normalizeGitHostname,
} from './constants/github.ts';
@@ -1406,6 +1409,10 @@ export {
LocalOpAuthSetIdentityRequestSchema,
type LocalOpAuthStatusSuccess,
LocalOpAuthStatusSuccessSchema,
+ type LocalOpAuthTokenRequest,
+ LocalOpAuthTokenRequestSchema,
+ type LocalOpAuthTokenSuccess,
+ LocalOpAuthTokenSuccessSchema,
type LocalOpCloneRequest,
LocalOpCloneRequestSchema,
type LocalOpEmbeddingsMutationSuccess,
diff --git a/packages/core/src/logging/qa-secret-pattern-canary.test.ts b/packages/core/src/logging/qa-secret-pattern-canary.test.ts
index 43b5e4844..210404ae2 100644
--- a/packages/core/src/logging/qa-secret-pattern-canary.test.ts
+++ b/packages/core/src/logging/qa-secret-pattern-canary.test.ts
@@ -83,6 +83,11 @@ const PLANTED: Record<string, { input: string; secret: string; marker: string }>
secret: 'glpat-abcdefghij0123456789XYZABC',
marker: '[REDACTED-GITLAB]',
},
+ 'atlassian-api-token': {
+ input: 'bitbucket ATATT3xFfGF0abcdefghij0123456789KLMNOPQR= here',
+ secret: 'ATATT3xFfGF0abcdefghij0123456789KLMNOPQR=',
+ marker: '[REDACTED-ATLASSIAN]',
+ },
'bearer-token-json': {
input: '{"authorization":"Bearer opaque:Tokenv1/1234567890abcXYZ","k":1}',
secret: 'opaque:Tokenv1/1234567890abcXYZ',
diff --git a/packages/core/src/logging/secret-scrub.test.ts b/packages/core/src/logging/secret-scrub.test.ts
index 6329bd7ea..75af54246 100644
--- a/packages/core/src/logging/secret-scrub.test.ts
+++ b/packages/core/src/logging/secret-scrub.test.ts
@@ -406,3 +406,29 @@ describe('redactSecrets', () => {
expect(result.lineCount).toBe(1);
});
});
+
+describe('git host token prefixes', () => {
+ it('masks a Bitbucket/Atlassian API token', () => {
+ const token = 'ATATT3xFfGF0abcdefghij0123456789KLMNOPQR=';
+ const out = scrubSecrets(`password=${token}`);
+ expect(out).not.toContain(token);
+ expect(out).toContain('[REDACTED-ATLASSIAN]');
+ });
+
+ it.each([
+ [
+ 'a Bitbucket repository or workspace access token',
+ 'ATCTT3xFfGN0abcdefghij0123456789KLMNOPQR=',
+ ],
+ ['a Bitbucket app password', 'ATBB3xFfGF0abcdefghij0123456789KLMNOPQR'],
+ ])('masks %s', (_label, token) => {
+ const out = scrubSecrets(`password=${token}`);
+ expect(out).not.toContain(token);
+ expect(out).toContain('[REDACTED-ATLASSIAN]');
+ });
+
+ it('leaves a bare 40-char hex Gitea token alone because it is shaped like a commit sha', () => {
+ const giteaToken = 'a'.repeat(40);
+ expect(scrubSecrets(`token ${giteaToken}`)).toContain(giteaToken);
+ });
+});
diff --git a/packages/core/src/logging/secret-scrub.ts b/packages/core/src/logging/secret-scrub.ts
index bdc419897..2abfdca0f 100644
--- a/packages/core/src/logging/secret-scrub.ts
+++ b/packages/core/src/logging/secret-scrub.ts
@@ -118,6 +118,11 @@ const SECRET_PATTERNS: readonly SecretPattern[] = [
replacement: '[REDACTED-STRIPE]',
},
{ name: 'gitlab-pat', regex: /glpat-[0-9A-Za-z_-]{20,}/g, replacement: '[REDACTED-GITLAB]' },
+ {
+ name: 'atlassian-api-token',
+ regex: /\b(?:ATATT|ATCTT|ATBB)[0-9A-Za-z_=-]{20,}/g,
+ replacement: '[REDACTED-ATLASSIAN]',
+ },
{
name: 'bearer-token-json',
regex: /("[Aa]uthorization"\s*:\s*"[Bb]earer\s+)(?:\\"[^"\\]+\\"|[^"\\]+)/g,
diff --git a/packages/core/src/markdown/comment-promoter.ts b/packages/core/src/markdown/comment-promoter.ts
index fc267cbea..fb0ba5a7c 100644
--- a/packages/core/src/markdown/comment-promoter.ts
+++ b/packages/core/src/markdown/comment-promoter.ts
@@ -1,3 +1,4 @@
+
import type { Nodes, Paragraph, PhrasingContent, Root, RootContent, Text } from 'mdast';
import { SKIP, visit } from 'unist-util-visit';
import type { VFile } from 'vfile';
diff --git a/packages/core/src/markdown/merged-walker.ts b/packages/core/src/markdown/merged-walker.ts
index bfd7e3109..fa3cfcd86 100644
--- a/packages/core/src/markdown/merged-walker.ts
+++ b/packages/core/src/markdown/merged-walker.ts
@@ -1,3 +1,4 @@
+
import type { Nodes, Parent, Root } from 'mdast';
import { SKIP, visit } from 'unist-util-visit';
import type { VFile } from 'vfile';
diff --git a/packages/core/src/markdown/safe-url.ts b/packages/core/src/markdown/safe-url.ts
index 4d3250d3a..8be632ba4 100644
--- a/packages/core/src/markdown/safe-url.ts
+++ b/packages/core/src/markdown/safe-url.ts
@@ -1,3 +1,4 @@
+
export const SAFE_URL_SCHEMES = ['https', 'http', 'mailto', 'tel', 'ftp', 'sms'] as const;
const SCHEME_ALT = SAFE_URL_SCHEMES.map((s) => `${s}:`).join('|');
diff --git a/packages/core/src/schemas/api/local-op.test.ts b/packages/core/src/schemas/api/local-op.test.ts
index 8257e613c..563f1beb6 100644
--- a/packages/core/src/schemas/api/local-op.test.ts
+++ b/packages/core/src/schemas/api/local-op.test.ts
@@ -4,6 +4,7 @@ import {
LocalOpAuthHostRequestSchema,
LocalOpAuthSetIdentityRequestSchema,
LocalOpAuthStatusSuccessSchema,
+ LocalOpAuthTokenRequestSchema,
ProblemTypeSchema,
} from './index.ts';
@@ -82,6 +83,49 @@ describe('LocalOpAuthStatusSuccessSchema', () => {
});
});
+describe('LocalOpAuthTokenRequestSchema', () => {
+ const valid = { host: 'ghes.test', username: 'alice', token: 'tkn-1' };
+
+ test('parses a full host + username + token body', () => {
+ expect(LocalOpAuthTokenRequestSchema.safeParse(valid).success).toBe(true);
+ });
+ test('rejects a missing host', () => {
+ expect(
+ LocalOpAuthTokenRequestSchema.safeParse({ username: 'alice', token: 'tkn-1' }).success,
+ ).toBe(false);
+ });
+ test('rejects an empty host', () => {
+ expect(LocalOpAuthTokenRequestSchema.safeParse({ ...valid, host: '' }).success).toBe(false);
+ });
+ test.each(['https://ghes.test', 'ghes.test/team', 'ghes.test/', '[email protected]'])(
+ 'rejects %s, a host git never sends to a credential helper',
+ (host) => {
+ expect(LocalOpAuthTokenRequestSchema.safeParse({ ...valid, host }).success).toBe(false);
+ },
+ );
+ test('accepts a host with a port', () => {
+ expect(
+ LocalOpAuthTokenRequestSchema.safeParse({ ...valid, host: 'ghes.test:8443' }).success,
+ ).toBe(true);
+ });
+ test('rejects a missing username', () => {
+ expect(
+ LocalOpAuthTokenRequestSchema.safeParse({ host: 'ghes.test', token: 'tkn-1' }).success,
+ ).toBe(false);
+ });
+ test('rejects an empty username', () => {
+ expect(LocalOpAuthTokenRequestSchema.safeParse({ ...valid, username: '' }).success).toBe(false);
+ });
+ test('rejects a missing token', () => {
+ expect(
+ LocalOpAuthTokenRequestSchema.safeParse({ host: 'ghes.test', username: 'alice' }).success,
+ ).toBe(false);
+ });
+ test('rejects an empty token', () => {
+ expect(LocalOpAuthTokenRequestSchema.safeParse({ ...valid, token: '' }).success).toBe(false);
+ });
+});
+
describe('LocalOpAuthEmptySuccessSchema', () => {
test('parses empty body', () => {
expect(LocalOpAuthEmptySuccessSchema.safeParse({}).success).toBe(true);
diff --git a/packages/core/src/schemas/api/local-op.ts b/packages/core/src/schemas/api/local-op.ts
index 98319e171..db410d278 100644
--- a/packages/core/src/schemas/api/local-op.ts
+++ b/packages/core/src/schemas/api/local-op.ts
@@ -1,5 +1,6 @@
import type { StandardSchemaV1 } from '@standard-schema/spec';
import { z } from 'zod';
+import { isGitCredentialHost } from '../../constants/github.ts';
export const LocalOpOkInitRequestSchema = z
.object({
@@ -54,6 +55,25 @@ export const LocalOpAuthPatSuccessSchema = z
.loose() satisfies StandardSchemaV1;
export type LocalOpAuthPatSuccess = z.infer<typeof LocalOpAuthPatSuccessSchema>;
+export const LocalOpAuthTokenRequestSchema = z
+ .object({
+ host: z.string().refine(isGitCredentialHost, {
+ message: 'Host must be a hostname with an optional :port, with no scheme or path',
+ }),
+ username: z.string().min(1),
+ token: z.string().min(1),
+ })
+ .loose() satisfies StandardSchemaV1;
+export type LocalOpAuthTokenRequest = z.infer<typeof LocalOpAuthTokenRequestSchema>;
+
+export const LocalOpAuthTokenSuccessSchema = z
+ .object({
+ host: z.string(),
+ login: z.string(),
+ })
+ .loose() satisfies StandardSchemaV1;
+export type LocalOpAuthTokenSuccess = z.infer<typeof LocalOpAuthTokenSuccessSchema>;
+
export const LocalOpEmbeddingsSetKeyRequestSchema = z
.object({
key: z.string().min(1),
diff --git a/packages/core/src/schemas/api/sync-seed.ts b/packages/core/src/schemas/api/sync-seed.ts
index 7409f3946..9b1cbe71c 100644
--- a/packages/core/src/schemas/api/sync-seed.ts
+++ b/packages/core/src/schemas/api/sync-seed.ts
@@ -25,6 +25,7 @@ export const SyncRemoteSchema = z
.object({
label: z.string().min(1),
webUrl: z.url().nullable(),
+ transport: z.enum(['https', 'http', 'ssh', 'git']).optional(),
})
.loose() satisfies StandardSchemaV1;
export type SyncRemoteWire = z.infer<typeof SyncRemoteSchema>;
diff --git a/packages/server/src/api-extension.ts b/packages/server/src/api-extension.ts
index d269b5a62..e1f0ef2f1 100644
--- a/packages/server/src/api-extension.ts
+++ b/packages/server/src/api-extension.ts
@@ -351,7 +351,10 @@ import { createSkillInstallOpsService } from './services/skill-install-ops.ts';
import { createSkillPlacementOpsService } from './services/skill-placement-ops.ts';
import { createSkillReimportService } from './services/skill-reimport.ts';
import { SERVICE_WRITER, type ShadowRef, shadowGit } from './shadow-repo.ts';
-import { readDeclaredGitHubHosts } from './share/git-context.ts';
+import {
+ createSyncCredentialConfigResolver,
+ readDeclaredGitHubHosts,
+} from './share/git-context.ts';
import { readSkillInstallModeRaw } from './skill-placements.ts';
@@ -1286,6 +1289,7 @@ interface ApiExtensionBaseOptions {
agentPresenceBroadcaster?: AgentPresenceBroadcaster;
onAgentWrite?: () => void;
getSyncEngine?: () => SyncEngine | null;
+ resolveSyncCredentialConfig?: () => Promise<string[]>;
conflicts: ConflictAuthority;
setBatchInProgress?: (value: boolean) => void;
localOpCliArgs?: string[];
@@ -1511,6 +1515,14 @@ export function createApiExtension(options: ApiExtensionOptions): Extension & {
} = options;
const declaredGitHubHosts =
options.declaredGitHubHosts ?? readDeclaredGitHubHosts(homeDirOverride);
+ const resolveSyncCredentialConfig =
+ options.resolveSyncCredentialConfig ??
+ createSyncCredentialConfigResolver({
+ projectDir: projectDir ?? contentDir,
+ tokenStore: null,
+ localOpCliArgs,
+ declaredGitHubHosts,
+ });
const catalogCache = createSkillsCatalogCache({ homeDirOverride, log });
const { bumpSkillsCatalogGen, enumerateInstalledSkillsCached, pluginSkillsByName } = catalogCache;
const signalChannel: typeof rawSignalChannel = rawSignalChannel
@@ -5076,10 +5088,10 @@ export function createApiExtension(options: ApiExtensionOptions): Extension & {
localOpCliArgs,
localOpGuard,
getSyncEngine,
+ resolveCredentialConfig: resolveSyncCredentialConfig,
toGitRelativePath,
});
const gitRoutes = createGitRoutes({
- declaredGitHubHosts,
projectDir,
contentDir,
contentFilter,
@@ -5087,7 +5099,7 @@ export function createApiExtension(options: ApiExtensionOptions): Extension & {
checkLocalOpSecurity,
getSyncEngine,
getPrincipal,
- localOpCliArgs,
+ resolveCredentialConfig: resolveSyncCredentialConfig,
});
const localOpRoutes = createLocalOpRoutes({
declaredGitHubHosts,
diff --git a/packages/server/src/github-permissions.ts b/packages/server/src/github-permissions.ts
index 0cfe09f84..03c3900e4 100644
--- a/packages/server/src/github-permissions.ts
+++ b/packages/server/src/github-permissions.ts
@@ -1,6 +1,6 @@
import type { Counter, Histogram } from '@opentelemetry/api';
import { getLogger } from './logger.ts';
-import { type OriginTransport, sameGitHubLogin } from './share/git-context.ts';
+import { type ParsedOriginTransport, sameGitHubLogin } from './share/git-context.ts';
import type { GitHubAccountSource } from './share/github-account.ts';
import { getMeter } from './telemetry.ts';
@@ -60,7 +60,7 @@ export interface CheckPushPermissionOptions {
owner: string;
repo: string;
host?: string;
- transport?: OriginTransport;
+ transport?: ParsedOriginTransport;
account?: ProbeAccount;
detectGh?: DetectGhFn;
detectGhAccounts?: DetectGhAccountsFn;
diff --git a/packages/server/src/http/git-routes.test.ts b/packages/server/src/http/git-routes.test.ts
index a5062e95b..b533413fa 100644
--- a/packages/server/src/http/git-routes.test.ts
+++ b/packages/server/src/http/git-routes.test.ts
@@ -1,11 +1,30 @@
+import type { IncomingMessage } from 'node:http';
import { createServer } from 'node:http';
import type { AddressInfo } from 'node:net';
+import { Readable } from 'node:stream';
import { describe, expect, test, vi } from 'vitest';
+import { makeCaptureRes } from '../composition-rig.test-helper.ts';
import type { FileIndexEntry } from '../file-watcher.ts';
import { getLogger } from '../logger.ts';
import { createGitRoutes } from './git-routes.ts';
const worktreeReadCalls = vi.hoisted(() => [] as (AbortSignal | undefined)[]);
+const checkoutCredentialConfigs = vi.hoisted(() => [] as string[][]);
+
+vi.mock('../git-checkout.ts', async (importOriginal) => {
+ const actual = await importOriginal<typeof import('../git-checkout.ts')>();
+ return {
+ ...actual,
+ runCheckoutFlow: async (
+ _projectDir: string,
+ _branch: string,
+ options: { credentialConfig: string[] },
+ ) => {
+ checkoutCredentialConfigs.push(options.credentialConfig);
+ return { ok: true };
+ },
+ };
+});
vi.mock('../git-worktree-status.ts', async (importOriginal) => {
const actual = await importOriginal<typeof import('../git-worktree-status.ts')>();
@@ -40,7 +59,7 @@ vi.mock('../git-worktree-status.ts', async (importOriginal) => {
};
});
-function buildGroup() {
+function buildGroup(overrides: Partial<Parameters<typeof createGitRoutes>[0]> = {}) {
return createGitRoutes({
projectDir: undefined,
contentDir: '/nonexistent-content',
@@ -49,10 +68,43 @@ function buildGroup() {
checkLocalOpSecurity: () => true,
getSyncEngine: undefined,
getPrincipal: undefined,
- localOpCliArgs: ['open-knowledge'],
+ resolveCredentialConfig: async () => ['credential.helper=!open-knowledge auth git-credential'],
+ ...overrides,
});
}
+async function postCheckout(group: ReturnType<typeof buildGroup>): Promise<number> {
+ const req = Readable.from([Buffer.from(JSON.stringify({ branch: 'main' }))]) as IncomingMessage;
+ req.method = 'POST';
+ req.url = '/api/git/checkout';
+ req.headers = { 'content-type': 'application/json', 'transfer-encoding': 'chunked' };
+ const { res, captured } = makeCaptureRes();
+ const route = group.table.resolve(req.url);
+ if (!route?.dispatch) throw new Error('missing checkout handler');
+ await route.dispatch(req, res);
+ return captured.status;
+}
+
+describe('checkout credential chain', () => {
+ test('each checkout runs with the chain the resolver returns at request time', async () => {
+ checkoutCredentialConfigs.length = 0;
+ const chains = [
+ ['credential.helper=', 'credential.helper=!open-knowledge auth git-credential'],
+ ['credential.helper=!open-knowledge auth git-credential'],
+ ];
+ let call = 0;
+ const group = buildGroup({
+ projectDir: '/nonexistent-project',
+ resolveCredentialConfig: async () => chains[call++] ?? [],
+ });
+
+ expect(await postCheckout(group)).toBe(200);
+ expect(await postCheckout(group)).toBe(200);
+
+ expect(checkoutCredentialConfigs).toEqual(chains);
+ });
+});
+
describe('createGitRoutes table', () => {
test('registers exactly the three git paths', () => {
expect([...buildGroup().paths].sort()).toEqual(
diff --git a/packages/server/src/http/git-routes.ts b/packages/server/src/http/git-routes.ts
index be0e27bd1..85059dbdb 100644
--- a/packages/server/src/http/git-routes.ts
+++ b/packages/server/src/http/git-routes.ts
@@ -21,10 +21,9 @@ import {
isValidBranchName,
} from '../git-branch-info.ts';
import { CHECKOUT_HANDLER_TAG, runCheckoutFlow } from '../git-checkout.ts';
-import { buildSyncCredentialConfig, withParentLock } from '../git-handle.ts';
+import { withParentLock } from '../git-handle.ts';
import { readWorktreeStatus } from '../git-worktree-status.ts';
import { toPosix } from '../path-utils.ts';
-import { readDeclaredGitHubHosts, shouldResetAmbientCredentials } from '../share/git-context.ts';
import type { SyncEngine } from '../sync-engine.ts';
import { type ApiRouteGroup, type ApiRouteRecord, createApiRouteGroup } from './api-pipeline.ts';
import { errorResponse } from './error-response.ts';
@@ -33,7 +32,6 @@ import { withValidation } from './request-validation.ts';
import { successResponse } from './success-response.ts';
export interface GitRouteDeps {
- declaredGitHubHosts?: ReadonlySet<string>;
projectDir: string | undefined;
contentDir: string;
contentFilter: ContentFilter | undefined;
@@ -45,7 +43,7 @@ export interface GitRouteDeps {
) => boolean;
getSyncEngine: (() => SyncEngine | null) | undefined;
getPrincipal: (() => Principal | null) | undefined;
- localOpCliArgs: string[];
+ resolveCredentialConfig: () => Promise<string[]>;
}
export function createGitRoutes(deps: GitRouteDeps): ApiRouteGroup {
@@ -57,9 +55,8 @@ export function createGitRoutes(deps: GitRouteDeps): ApiRouteGroup {
checkLocalOpSecurity,
getSyncEngine,
getPrincipal,
- localOpCliArgs,
+ resolveCredentialConfig,
} = deps;
- const declaredGitHubHosts = deps.declaredGitHubHosts ?? readDeclaredGitHubHosts();
function toOpenTarget(projectRelPath: string): GitWorktreeOpenTarget | undefined {
const absPath = join(projectDir ?? contentDir, projectRelPath);
@@ -195,12 +192,11 @@ export function createGitRoutes(deps: GitRouteDeps): ApiRouteGroup {
}
try {
+ const credentialConfig = await resolveCredentialConfig();
const outcome = await withParentLock(() =>
runCheckoutFlow(projectDir, body.branch, {
fastForward: body.fastForward === true,
- credentialConfig: buildSyncCredentialConfig(localOpCliArgs, {
- resetAmbient: shouldResetAmbientCredentials(projectDir, declaredGitHubHosts),
- }),
+ credentialConfig,
}),
);
successResponse(res, 200, CheckoutResponseSchema, outcome, {
diff --git a/packages/server/src/http/local-op-auth-shutdown-errors.test.ts b/packages/server/src/http/local-op-auth-shutdown-errors.test.ts
index 5c8d94efa..366ed29dc 100644
--- a/packages/server/src/http/local-op-auth-shutdown-errors.test.ts
+++ b/packages/server/src/http/local-op-auth-shutdown-errors.test.ts
@@ -97,7 +97,11 @@ const verification = {
expires_in: 900,
};
-function postAuth(baseUrl: string, route: 'login' | 'pat', body: object): Promise<Response> {
+function postAuth(
+ baseUrl: string,
+ route: 'login' | 'pat' | 'token',
+ body: object,
+): Promise<Response> {
return fetch(`${baseUrl}/api/local-op/auth/${route}`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
@@ -326,6 +330,90 @@ test('shutdown suppresses a late token completion and sync resume', async () =>
}
});
+const tokenBody = { host: 'git.corp.example', username: 'alice', token: 'fixture-token' };
+
+test('an in-flight token store keeps shutdown pending and is signalled to stop', async () => {
+ guardNativeSpawn();
+ const child = new RecordedChild();
+ const spawned = Promise.withResolvers<void>();
+ spawn.mockImplementation(() => {
+ spawned.resolve();
+ return child;
+ });
+ const fixture = await createRecordingServer();
+ let shutdown: Promise<void> | undefined;
+ let response: Promise<Response> | undefined;
+ try {
+ response = postAuth(fixture.baseUrl, 'token', tokenBody);
+ await spawned.promise;
+ let shutdownSettled = false;
+ shutdown = fixture.group.shutdown().then(() => {
+ shutdownSettled = true;
+ });
+ await drainPriorEvents(fixture.baseUrl);
+ expect(shutdownSettled).toBe(false);
+ expect(child.signals.length).toBeGreaterThan(0);
+ child.close();
+ await shutdown;
+ expect(shutdownSettled).toBe(true);
+ } finally {
+ child.close();
+ await shutdown;
+ await response;
+ await fixture.close();
+ }
+});
+
+test('shutdown suppresses a late host-token completion and sync resume', async () => {
+ guardNativeSpawn();
+ const child = new RecordedChild();
+ const spawned = Promise.withResolvers<void>();
+ spawn.mockImplementation(() => {
+ spawned.resolve();
+ return child;
+ });
+ const notifyCredentialsChanged = vi.fn(async () => {});
+ const refreshPushPermission = vi.fn(async () => null);
+ const engine = { notifyCredentialsChanged, refreshPushPermission } as unknown as SyncEngine;
+ const fixture = await createRecordingServer(() => engine);
+ let shutdown: Promise<void> | undefined;
+ let response: Promise<Response> | undefined;
+ try {
+ response = postAuth(fixture.baseUrl, 'token', tokenBody);
+ await spawned.promise;
+ shutdown = fixture.group.shutdown();
+ await drainPriorEvents(fixture.baseUrl);
+ child.stdout.write(
+ `${JSON.stringify({ type: 'complete', host: 'git.corp.example', login: 'alice' })}\n`,
+ );
+ child.close();
+ const result = await response;
+ await shutdown;
+ expect.soft(result.status).toBe(503);
+ expect.soft(notifyCredentialsChanged).not.toHaveBeenCalled();
+ expect.soft(refreshPushPermission).not.toHaveBeenCalled();
+ } finally {
+ child.close();
+ await shutdown;
+ await response;
+ await fixture.close();
+ }
+});
+
+test('a host-token request after shutdown is refused with 503 and spawns nothing', async () => {
+ guardNativeSpawn();
+ const fixture = await createRecordingServer();
+ try {
+ await fixture.group.shutdown();
+ const response = await postAuth(fixture.baseUrl, 'token', tokenBody);
+ expect(response.status).toBe(503);
+ expect(await response.json()).toMatchObject({ title: 'The server is shutting down.' });
+ expect(spawn).not.toHaveBeenCalled();
+ } finally {
+ await fixture.close();
+ }
+});
+
test('shutdown settles after a synchronous repos launch failure', async () => {
guardNativeSpawn();
spawn.mockImplementation(() => {
diff --git a/packages/server/src/http/local-op-routes.test.ts b/packages/server/src/http/local-op-routes.test.ts
index 0998f4764..e582b62be 100644
--- a/packages/server/src/http/local-op-routes.test.ts
+++ b/packages/server/src/http/local-op-routes.test.ts
@@ -19,6 +19,7 @@ const LOCAL_OP_PATHS = [
'/api/local-op/auth/login',
'/api/local-op/auth/status',
'/api/local-op/auth/pat',
+ '/api/local-op/auth/token',
'/api/local-op/auth/gh-login',
'/api/local-op/auth/cancel',
'/api/local-op/auth/repos',
@@ -49,7 +50,7 @@ function buildGroup(overrides: Partial<LocalOpRouteDeps> = {}) {
}
describe('createLocalOpRoutes table', () => {
- test('claims the namespace with a single wildcard and resolves all thirteen members', () => {
+ test('claims the namespace with a single wildcard and resolves all fourteen members', () => {
const group = buildGroup();
expect([...group.paths]).toEqual(['/api/local-op/*']);
for (const path of LOCAL_OP_PATHS) {
@@ -182,49 +183,49 @@ async function* ndjsonLines(body: ReadableStream<Uint8Array>): AsyncGenerator<St
}
}
-describe('auth-login stream displacement (a second start orphans the first client)', () => {
- const home = useIsolatedHome();
-
- let servers: HttpServer[] = [];
-
- afterEach(async () => {
- vi.restoreAllMocks();
- const active = servers;
- servers = [];
- await Promise.allSettled(
- active.map(
- (server) =>
- new Promise<void>((resolve) => {
- server.closeAllConnections();
- server.close(() => resolve());
- }),
- ),
- );
- });
+const home = useIsolatedHome();
- async function serveLocalOpGroup(overrides: Partial<LocalOpRouteDeps> = {}): Promise<string> {
- const group = buildGroup(overrides);
- const server = createServer((req, res) => {
- const pathname = new URL(req.url ?? '/', 'http://127.0.0.1').pathname;
- const dispatch = group.table.resolve(pathname)?.dispatch;
- if (!dispatch) {
- res.writeHead(404).end();
- return;
- }
- void dispatch(req, res);
- });
- const { baseUrl } = await listenOnLoopback(server);
- servers.push(server);
- return baseUrl;
- }
+let servers: HttpServer[] = [];
- const postJson = (baseUrl: string, path: string, body: unknown): Promise<Response> =>
- fetch(`${baseUrl}${path}`, {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify(body),
- });
+afterEach(async () => {
+ vi.restoreAllMocks();
+ const active = servers;
+ servers = [];
+ await Promise.allSettled(
+ active.map(
+ (server) =>
+ new Promise<void>((resolve) => {
+ server.closeAllConnections();
+ server.close(() => resolve());
+ }),
+ ),
+ );
+});
+
+async function serveLocalOpGroup(overrides: Partial<LocalOpRouteDeps> = {}): Promise<string> {
+ const group = buildGroup(overrides);
+ const server = createServer((req, res) => {
+ const pathname = new URL(req.url ?? '/', 'http://127.0.0.1').pathname;
+ const dispatch = group.table.resolve(pathname)?.dispatch;
+ if (!dispatch) {
+ res.writeHead(404).end();
+ return;
+ }
+ void dispatch(req, res);
+ });
+ const { baseUrl } = await listenOnLoopback(server);
+ servers.push(server);
+ return baseUrl;
+}
+
+const postJson = (baseUrl: string, path: string, body: unknown): Promise<Response> =>
+ fetch(`${baseUrl}${path}`, {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json' },
+ body: JSON.stringify(body),
+ });
+describe('auth-login stream displacement (a second start orphans the first client)', () => {
test('a project whose origin is not a GitHub host refuses GitHub auth routes that name no host', async () => {
const projectDir = mkdtempSync(join(tmpdir(), 'ok-local-op-non-github-'));
try {
@@ -453,3 +454,117 @@ describe('auth-login stream displacement (a second start orphans the first clien
expect(secondLines.some((line) => line.type === 'verification')).toBe(true);
}, 30_000);
});
+
+const ECHO_TOKEN_STDIN_CLI = `
+let d='';
+process.stdin.on('data', c => { d += c; });
+process.stdin.on('end', () => {
+ if (d.trim() === 'good-token') {
+ process.stdout.write(JSON.stringify({ type: 'complete', host: 'ghes.test', login: process.argv[process.argv.indexOf('--username') + 1] }) + '\\n');
+ process.exit(0);
+ }
+ process.stdout.write(JSON.stringify({ type: 'error', message: 'Could not store the token for ghes.test' }) + '\\n');
+ process.exit(1);
+});
+`;
+
+const tokenCli = (): string[] => [process.execPath, '-e', ECHO_TOKEN_STDIN_CLI];
+
+describe('POST /api/local-op/auth/token', () => {
+ test('stores the host-scoped token and returns the supplied login', async () => {
+ const baseUrl = await serveLocalOpGroup({ localOpCliArgs: tokenCli() });
+
+ const res = await postJson(baseUrl, '/api/local-op/auth/token', {
+ host: 'ghes.test',
+ username: 'alice',
+ token: 'good-token',
+ });
+
+ expect(res.status).toBe(200);
+ expect(await res.json()).toMatchObject({ host: 'ghes.test', login: 'alice' });
+ });
+
+ test('stays open on a project whose origin is not a GitHub host', async () => {
+ const projectDir = mkdtempSync(join(tmpdir(), 'ok-local-op-token-non-github-'));
+ try {
+ execFileSync('git', ['init', '-q'], { cwd: projectDir });
+ execFileSync('git', ['remote', 'add', 'origin', 'https://gitlab.example.com/team/kb.git'], {
+ cwd: projectDir,
+ });
+ const baseUrl = await serveLocalOpGroup({ projectDir, localOpCliArgs: tokenCli() });
+
+ const res = await postJson(baseUrl, '/api/local-op/auth/token', {
+ host: 'gitlab.example.com',
+ username: 'oauth2',
+ token: 'good-token',
+ });
+
+ expect(res.status).toBe(200);
+ expect(await res.json()).toMatchObject({ login: 'oauth2' });
+ } finally {
+ rmSync(projectDir, { recursive: true, force: true });
+ }
+ });
+
+ test('a stored token rebuilds the sync credential chain; a refused one does not', async () => {
+ const notifyCredentialsChanged = vi.fn(async () => {});
+ const refreshPushPermission = vi.fn(async () => null);
+ const engine = { notifyCredentialsChanged, refreshPushPermission } as unknown as SyncEngine;
+ const baseUrl = await serveLocalOpGroup({
+ localOpCliArgs: tokenCli(),
+ getSyncEngine: () => engine,
+ });
+
+ const refused = await postJson(baseUrl, '/api/local-op/auth/token', {
+ host: 'ghes.test',
+ username: 'alice',
+ token: 'wrong-token',
+ });
+ expect(refused.status).toBe(400);
+ expect(notifyCredentialsChanged).not.toHaveBeenCalled();
+
+ const stored = await postJson(baseUrl, '/api/local-op/auth/token', {
+ host: 'ghes.test',
+ username: 'alice',
+ token: 'good-token',
+ });
+ expect(stored.status).toBe(200);
+ expect(notifyCredentialsChanged).toHaveBeenCalledTimes(1);
+ });
+
+ test('surfaces a CLI failure as a 400 auth-failed problem', async () => {
+ const baseUrl = await serveLocalOpGroup({ localOpCliArgs: tokenCli() });
+
+ const res = await postJson(baseUrl, '/api/local-op/auth/token', {
+ host: 'ghes.test',
+ username: 'alice',
+ token: 'wrong-token',
+ });
+
+ expect(res.status).toBe(400);
+ expect(await res.json()).toMatchObject({
+ type: 'urn:ok:error:auth-failed',
+ title: 'Could not store the token for ghes.test',
+ });
+ });
+
+ test('rejects a body with no host rather than defaulting to the origin host', async () => {
+ const baseUrl = await serveLocalOpGroup({ localOpCliArgs: tokenCli() });
+
+ const res = await postJson(baseUrl, '/api/local-op/auth/token', {
+ username: 'alice',
+ token: 'good-token',
+ });
+
+ expect(res.status).toBe(400);
+ expect(await res.json()).toMatchObject({ type: 'urn:ok:error:invalid-request' });
+ });
+
+ test('rejects a GET with 405', async () => {
+ const baseUrl = await serveLocalOpGroup({ localOpCliArgs: tokenCli() });
+
+ const res = await fetch(`${baseUrl}/api/local-op/auth/token`);
+
+ expect(res.status).toBe(405);
+ });
+});
diff --git a/packages/server/src/http/local-op-routes.ts b/packages/server/src/http/local-op-routes.ts
index b2c0c50dc..fdefa4cb8 100644
--- a/packages/server/src/http/local-op-routes.ts
+++ b/packages/server/src/http/local-op-routes.ts
@@ -15,6 +15,8 @@ import {
LocalOpAuthPatSuccessSchema,
LocalOpAuthSetIdentityRequestSchema,
LocalOpAuthStatusSuccessSchema,
+ LocalOpAuthTokenRequestSchema,
+ LocalOpAuthTokenSuccessSchema,
type LocalOpCloneRequest,
LocalOpCloneRequestSchema,
LocalOpEmbeddingsMutationSuccessSchema,
@@ -52,6 +54,7 @@ import {
type AuthEvent,
classifyCloneError,
createGhBinaryPathResolver,
+ runAuthTokenSubprocess,
runCloneSubprocess,
runDeviceFlowSubprocess,
runGhDeviceLoginSubprocess,
@@ -501,6 +504,7 @@ export function createLocalOpRoutes(
const LOCAL_OP_AUTH_REPOS_KEY = '/api/local-op/auth/repos';
const LOCAL_OP_AUTH_SIGNOUT_KEY = '/api/local-op/auth/signout';
const LOCAL_OP_AUTH_PAT_KEY = '/api/local-op/auth/pat';
+ const LOCAL_OP_AUTH_TOKEN_KEY = '/api/local-op/auth/token';
const LOCAL_OP_AUTH_GH_LOGIN_KEY = '/api/local-op/auth/gh-login';
const LOCAL_OP_AUTH_SUBPROCESS_TIMEOUT_MS = 30_000;
@@ -981,6 +985,65 @@ export function createLocalOpRoutes(
},
);
+ const HANDLE_LOCAL_OP_AUTH_TOKEN = 'local-op-auth-token';
+ const handleLocalOpAuthToken = withValidation(
+ LocalOpAuthTokenRequestSchema,
+ async (_req, res, body) => {
+ if (rejectShuttingDown(res, HANDLE_LOCAL_OP_AUTH_TOKEN)) return;
+ if (!localOpGuard.tryAcquire(LOCAL_OP_AUTH_TOKEN_KEY)) {
+ errorResponse(
+ res,
+ 429,
+ 'urn:ok:error:concurrent-operation',
+ 'An auth operation is already in progress.',
+ { handler: HANDLE_LOCAL_OP_AUTH_TOKEN, extraHeaders: { 'Retry-After': '5' } },
+ );
+ return;
+ }
+
+ const finish = subprocessLifetime.begin();
+ try {
+ const result = await runAuthTokenSubprocess({
+ lifetime: subprocessLifetime,
+ cliArgs: localOpCliArgs,
+ host: body.host,
+ username: body.username,
+ token: body.token,
+ });
+ if (rejectShuttingDown(res, HANDLE_LOCAL_OP_AUTH_TOKEN)) return;
+ if (result.ok) {
+ onAuthCredentialLanded(getSyncEngine);
+ successResponse(
+ res,
+ 200,
+ LocalOpAuthTokenSuccessSchema,
+ { host: result.host, login: result.login },
+ { handler: HANDLE_LOCAL_OP_AUTH_TOKEN },
+ );
+ } else {
+ errorResponse(res, 400, 'urn:ok:error:auth-failed', result.error, {
+ handler: HANDLE_LOCAL_OP_AUTH_TOKEN,
+ });
+ }
+ } catch (err) {
+ if (rejectShuttingDown(res, HANDLE_LOCAL_OP_AUTH_TOKEN, err)) return;
+ errorResponse(res, 500, 'urn:ok:error:auth-failed', 'Storing the token failed.', {
+ handler: HANDLE_LOCAL_OP_AUTH_TOKEN,
+ cause: err,
+ });
+ } finally {
+ localOpGuard.release(LOCAL_OP_AUTH_TOKEN_KEY);
+ finish();
+ }
+ },
+ {
+ handler: HANDLE_LOCAL_OP_AUTH_TOKEN,
+ method: 'POST',
+ preBodyGate: (req, res) =>
+ checkLocalOpSecurity(req, res, { handler: HANDLE_LOCAL_OP_AUTH_TOKEN }),
+ },
+ );
+
const HANDLE_LOCAL_OP_AUTH_REPOS = 'local-op-auth-repos';
const handleLocalOpAuthRepos = withValidation(
LocalOpAuthHostRequestSchema,
@@ -1464,6 +1527,7 @@ export function createLocalOpRoutes(
'/api/local-op/auth/login': handleLocalOpAuthLogin,
'/api/local-op/auth/status': handleLocalOpAuthStatus,
'/api/local-op/auth/pat': handleLocalOpAuthPat,
+ '/api/local-op/auth/token': handleLocalOpAuthToken,
'/api/local-op/auth/gh-login': handleLocalOpAuthGhLogin,
'/api/local-op/auth/cancel': handleLocalOpAuthCancel,
'/api/local-op/auth/repos': handleLocalOpAuthRepos,
diff --git a/packages/server/src/http/share-routes.test.ts b/packages/server/src/http/share-routes.test.ts
index eba422a63..68059a221 100644
--- a/packages/server/src/http/share-routes.test.ts
+++ b/packages/server/src/http/share-routes.test.ts
@@ -12,6 +12,25 @@ import { useIsolatedHome } from '../share/git-host-declarations.test-helper.ts';
import { SHARE_PUBLISH_TIMEOUT_MS } from '../share/publish.ts';
import { createShareRoutes, type ShareRouteDeps } from './share-routes.ts';
+const targetStatusCredentialConfigs = vi.hoisted(() => [] as string[][]);
+
+vi.mock('../share/target-status.ts', async (importOriginal) => {
+ const actual = await importOriginal<typeof import('../share/target-status.ts')>();
+ return {
+ ...actual,
+ computeShareTargetStatus: async (
+ _projectDir: string,
+ _branch: string,
+ _path: string,
+ _kind: string,
+ options: { credentialConfig: string[] },
+ ) => {
+ targetStatusCredentialConfigs.push(options.credentialConfig);
+ return { verdict: 'on-origin' };
+ },
+ };
+});
+
function buildGroup(overrides: Partial<ShareRouteDeps> = {}) {
return createShareRoutes({
projectDir: undefined,
@@ -21,11 +40,43 @@ function buildGroup(overrides: Partial<ShareRouteDeps> = {}) {
localOpCliArgs: ['open-knowledge'],
localOpGuard: { tryAcquire: () => true, release: () => {} },
getSyncEngine: undefined,
+ resolveCredentialConfig: async () => ['credential.helper=!open-knowledge auth git-credential'],
toGitRelativePath: () => null,
...overrides,
});
}
+describe('share target-status credential chain', () => {
+ test('each status check runs with the chain the resolver returns at request time', async () => {
+ targetStatusCredentialConfigs.length = 0;
+ const chains = [
+ ['credential.helper=', 'credential.helper=!open-knowledge auth git-credential'],
+ ['credential.helper=!open-knowledge auth git-credential'],
+ ];
+ let call = 0;
+ const group = buildGroup({
+ projectDir: '/nonexistent-project',
+ resolveCredentialConfig: async () => chains[call++] ?? [],
+ });
+
+ for (const _chain of chains) {
+ const req = Readable.from([
+ Buffer.from(JSON.stringify({ branch: 'main', path: 'README.md', kind: 'doc' })),
+ ]) as IncomingMessage;
+ req.method = 'POST';
+ req.url = '/api/share/target-status';
+ req.headers = { 'content-type': 'application/json', 'transfer-encoding': 'chunked' };
+ const { res, captured } = makeCaptureRes();
+ const route = group.table.resolve(req.url);
+ if (!route?.dispatch) throw new Error('missing target-status handler');
+ await route.dispatch(req, res);
+ expect(captured.status).toBe(200);
+ }
+
+ expect(targetStatusCredentialConfigs).toEqual(chains);
+ });
+});
+
describe('createShareRoutes table', () => {
const home = useIsolatedHome();
diff --git a/packages/server/src/http/share-routes.ts b/packages/server/src/http/share-routes.ts
index 943a5ceb1..bd202c3f8 100644
--- a/packages/server/src/http/share-routes.ts
+++ b/packages/server/src/http/share-routes.ts
@@ -19,7 +19,6 @@ import {
withHiddenWindowsConsole,
} from '../child-process-windows-hide.ts';
import { isValidBranchInfoPath } from '../git-branch-info.ts';
-import { buildSyncCredentialConfig } from '../git-handle.ts';
import type { ConcurrencyGuard } from '../local-op-security.ts';
import type { PinoLogger } from '../logger.ts';
import {
@@ -36,7 +35,6 @@ import {
readDeclaredGitHubHosts,
readGitHeadBranch,
readOriginGitHubRepo,
- shouldResetAmbientCredentials,
} from '../share/git-context.ts';
import {
emitSharePublishLog,
@@ -79,6 +77,7 @@ export interface ShareRouteDeps {
localOpCliArgs: string[];
localOpGuard: ConcurrencyGuard;
getSyncEngine: (() => SyncEngine | null) | undefined;
+ resolveCredentialConfig: () => Promise<string[]>;
toGitRelativePath: (projectDir: string, absolutePath: string) => string | null;
}
@@ -91,6 +90,7 @@ export function createShareRoutes(deps: ShareRouteDeps): ApiRouteGroup {
localOpCliArgs,
localOpGuard,
getSyncEngine,
+ resolveCredentialConfig,
toGitRelativePath,
} = deps;
const declaredGitHubHosts = deps.declaredGitHubHosts ?? readDeclaredGitHubHosts();
@@ -308,9 +308,7 @@ export function createShareRoutes(deps: ShareRouteDeps): ApiRouteGroup {
body.path,
body.kind,
{
- credentialConfig: buildSyncCredentialConfig(localOpCliArgs, {
- resetAmbient: shouldResetAmbientCredentials(projectDir, declaredGitHubHosts),
- }),
+ credentialConfig: await resolveCredentialConfig(),
},
);
const contentStatus =
diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts
index 212b58558..d782c72e5 100644
--- a/packages/server/src/index.ts
+++ b/packages/server/src/index.ts
@@ -569,6 +569,7 @@ export {
type GitHubAuthHostResult,
loginShapedUserinfoUser,
readDeclaredGitHubHosts,
+ readOriginCredentialHost,
readOriginGitHubRepo,
resolveGitHubAuthHost,
sameGitHubLogin,
diff --git a/packages/server/src/local-ops/auth-pat.test.ts b/packages/server/src/local-ops/auth-pat.test.ts
index 681eab58d..bf14efb56 100644
--- a/packages/server/src/local-ops/auth-pat.test.ts
+++ b/packages/server/src/local-ops/auth-pat.test.ts
@@ -80,8 +80,8 @@ describe('runPatSubprocess', () => {
}
});
- test('redacts a bare PAT in stderr before it reaches the fallback error', async () => {
- const token = `ghp_${'g'.repeat(36)}`;
+ test('removes the submitted token from stderr even when no scrubber pattern knows its shape', async () => {
+ const token = `${'a'.repeat(8)}0123456789abcdef0123456789abcdef`;
const result = await runPatSubprocess({
cliArgs: fixtureCli(`
process.stderr.write("[auth] Failed to parse auth.yml: bad indentation at line 2:\\n token: ${token}");
@@ -93,6 +93,23 @@ describe('runPatSubprocess', () => {
expect(result.ok).toBe(false);
if (!result.ok) {
expect(result.error).not.toContain(token);
+ expect(result.error).toContain('token: [REDACTED]');
+ }
+ });
+
+ test('redacts a bare PAT in stderr other than the submitted token', async () => {
+ const storedToken = `ghp_${'g'.repeat(36)}`;
+ const result = await runPatSubprocess({
+ cliArgs: fixtureCli(`
+ process.stderr.write("[auth] Failed to parse auth.yml: bad indentation at line 2:\\n token: ${storedToken}");
+ process.exitCode = 3;
+ `),
+ host: 'ghes.test',
+ token: 'submitted-token',
+ });
+ expect(result.ok).toBe(false);
+ if (!result.ok) {
+ expect(result.error).not.toContain(storedToken);
expect(result.error).toContain('[REDACTED-GH-PAT]');
}
});
diff --git a/packages/server/src/local-ops/auth-pat.ts b/packages/server/src/local-ops/auth-pat.ts
index e64080c69..b98e5c318 100644
--- a/packages/server/src/local-ops/auth-pat.ts
+++ b/packages/server/src/local-ops/auth-pat.ts
@@ -1,5 +1,9 @@
import { stderrDetailSuffix } from './clone-error-classify.ts';
-import { type LocalOpCliInvocation, runSubprocess } from './subprocess.ts';
+import {
+ LOCAL_OP_AUTH_SUBPROCESS_TIMEOUT_MS,
+ type LocalOpCliInvocation,
+ runSubprocess,
+} from './subprocess.ts';
import type { LocalOpSubprocessLifetime } from './subprocess-lifetime.ts';
export interface RunPatOptions extends LocalOpCliInvocation {
@@ -13,8 +17,6 @@ export type RunPatResult =
| { ok: true; host: string; login: string }
| { ok: false; host: string; error: string };
-const DEFAULT_TIMEOUT_MS = 30_000;
-
export async function runPatSubprocess(opts: RunPatOptions): Promise<RunPatResult> {
const host = opts.host ?? 'github.com';
let terminal: RunPatResult | null = null;
@@ -26,7 +28,7 @@ export async function runPatSubprocess(opts: RunPatOptions): Promise<RunPatResul
cwd: opts.cwd,
trailingArgs: ['auth', 'pat', '--json', '--host', host, '--token-stdin'],
stdinData: opts.token,
- timeoutMs: opts.timeoutMs ?? DEFAULT_TIMEOUT_MS,
+ timeoutMs: opts.timeoutMs ?? LOCAL_OP_AUTH_SUBPROCESS_TIMEOUT_MS,
onLine: ({ parsed }) => {
if (!parsed) return;
if (parsed.type === 'complete') {
@@ -48,5 +50,9 @@ export async function runPatSubprocess(opts: RunPatOptions): Promise<RunPatResul
const result = await proc.done;
if (terminal) return terminal;
if (result.timedOut) return { ok: false, host, error: 'Token validation timed out.' };
- return { ok: false, host, error: `Token validation failed.${stderrDetailSuffix(result.stderr)}` };
+ return {
+ ok: false,
+ host,
+ error: `Token validation failed.${stderrDetailSuffix(result.stderr, [opts.token, opts.token.trim()])}`,
+ };
}
diff --git a/packages/server/src/local-ops/auth-query.ts b/packages/server/src/local-ops/auth-query.ts
index 96b8efec9..6d9575c3e 100644
--- a/packages/server/src/local-ops/auth-query.ts
+++ b/packages/server/src/local-ops/auth-query.ts
@@ -1,7 +1,9 @@
import { redactedStderrDetail } from './clone-error-classify.ts';
-import { type LocalOpCliInvocation, runSubprocess } from './subprocess.ts';
-
-const DEFAULT_TIMEOUT_MS = 30_000;
+import {
+ LOCAL_OP_AUTH_SUBPROCESS_TIMEOUT_MS,
+ type LocalOpCliInvocation,
+ runSubprocess,
+} from './subprocess.ts';
const SIGNED_OUT_SENTENCE = /^not logged in to /i;
const BENIGN_TOKEN_STORAGE_BANNER = /^\[auth\] token storage: /;
@@ -53,7 +55,7 @@ export async function runAuthStatusSubprocess(
cliEnv: opts.cliEnv,
cwd: opts.cwd,
trailingArgs: ['auth', 'status', '--json', '--host', host],
- timeoutMs: opts.timeoutMs ?? DEFAULT_TIMEOUT_MS,
+ timeoutMs: opts.timeoutMs ?? LOCAL_OP_AUTH_SUBPROCESS_TIMEOUT_MS,
onLine: ({ parsed }) => {
if (parsed) lines.push(parsed);
},
@@ -102,7 +104,7 @@ export async function runAuthReposSubprocess(
cliEnv: opts.cliEnv,
cwd: opts.cwd,
trailingArgs: ['auth', 'repos', '--json', '--host', host],
- timeoutMs: opts.timeoutMs ?? DEFAULT_TIMEOUT_MS,
+ timeoutMs: opts.timeoutMs ?? LOCAL_OP_AUTH_SUBPROCESS_TIMEOUT_MS,
onLine: ({ parsed }) => {
if (parsed) lines.push(parsed);
},
diff --git a/packages/server/src/local-ops/auth-token.test.ts b/packages/server/src/local-ops/auth-token.test.ts
new file mode 100644
index 000000000..cdf2fc45e
--- /dev/null
+++ b/packages/server/src/local-ops/auth-token.test.ts
@@ -0,0 +1,174 @@
+import { describe, expect, test } from 'vitest';
+import { runAuthTokenSubprocess } from './auth-token.ts';
+
+const fixtureCli = (script: string): readonly string[] => [process.execPath, '-e', script];
+
+const ECHO_STDIN_CLI = `
+let d='';
+process.stdin.on('data', c => { d += c; });
+process.stdin.on('end', () => {
+ if (d.trim() === 'good-token') {
+ process.stdout.write(JSON.stringify({ type: 'complete', host: 'ghes.test', login: 'got:' + d.trim() }) + '\\n');
+ process.exit(0);
+ }
+ process.stdout.write(JSON.stringify({ type: 'error', message: 'Could not store the token for ghes.test' }) + '\\n');
+ process.exit(1);
+});
+`;
+
+const ECHO_ARGV_CLI = `
+let d='';
+process.stdin.on('data', c => { d += c; });
+process.stdin.on('end', () => {
+ process.stdout.write(JSON.stringify({ type: 'complete', host: 'ghes.test', login: JSON.stringify(process.argv) }) + '\\n');
+ process.exit(0);
+});
+`;
+
+describe('runAuthTokenSubprocess', () => {
+ test('feeds the token via stdin and returns the stored identity on complete', async () => {
+ const result = await runAuthTokenSubprocess({
+ cliArgs: fixtureCli(ECHO_STDIN_CLI),
+ host: 'ghes.test',
+ username: 'alice',
+ token: 'good-token',
+ });
+ expect(result).toEqual({ ok: true, host: 'ghes.test', login: 'got:good-token' });
+ });
+
+ test('surfaces the CLI error message when the store fails', async () => {
+ const result = await runAuthTokenSubprocess({
+ cliArgs: fixtureCli(ECHO_STDIN_CLI),
+ host: 'ghes.test',
+ username: 'alice',
+ token: 'wrong-token',
+ });
+ expect(result).toEqual({
+ ok: false,
+ host: 'ghes.test',
+ error: 'Could not store the token for ghes.test',
+ });
+ });
+
+ test('falls back to a bounded generic error when the child exits with no terminal event', async () => {
+ const result = await runAuthTokenSubprocess({
+ cliArgs: fixtureCli('process.exit(3)'),
+ host: 'ghes.test',
+ username: 'alice',
+ token: 'x',
+ });
+ expect(result.ok).toBe(false);
+ if (!result.ok) {
+ expect(result.error).toBe('Storing the token failed.');
+ }
+ });
+
+ test('folds the child stderr into the generic fallback error', async () => {
+ const result = await runAuthTokenSubprocess({
+ cliArgs: fixtureCli(`
+ process.stderr.write('spawn EINVAL');
+ process.exitCode = 3;
+ `),
+ host: 'ghes.test',
+ username: 'alice',
+ token: 'x',
+ });
+ expect(result.ok).toBe(false);
+ if (!result.ok) {
+ expect(result.error).toContain('Storing the token failed.');
+ expect(result.error).toContain('spawn EINVAL');
+ }
+ });
+
+ test('keeps the token out of the child argv while passing the username through', async () => {
+ const token = 'argv-must-not-carry-this-token';
+ const result = await runAuthTokenSubprocess({
+ cliArgs: fixtureCli(ECHO_ARGV_CLI),
+ host: 'ghes.test',
+ username: 'alice',
+ token,
+ });
+ expect(result.ok).toBe(true);
+ if (!result.ok) return;
+ const argv = JSON.parse(result.login) as string[];
+ expect(argv).not.toContain(token);
+ expect(argv.join(' ')).not.toContain(token);
+ expect(argv).toContain('--username');
+ expect(argv).toContain('alice');
+ expect(argv).toContain('--token-stdin');
+ expect(argv).toContain('--host');
+ expect(argv).toContain('ghes.test');
+ });
+
+ test('redacts credentialed stderr before it reaches the fallback error', async () => {
+ const token = `ghp_${'b'.repeat(36)}`;
+ const result = await runAuthTokenSubprocess({
+ cliArgs: fixtureCli(`
+ process.stderr.write("fatal: unable to access 'https://x-access-token:${token}@ghes.test/o/r.git/'");
+ process.exitCode = 3;
+ `),
+ host: 'ghes.test',
+ username: 'alice',
+ token,
+ });
+ expect(result.ok).toBe(false);
+ if (!result.ok) {
+ expect(result.error).not.toContain(token);
+ expect(result.error).toContain('https://[REDACTED]@ghes.test');
+ }
+ });
+
+ test('redacts a bare PAT in stderr other than the submitted token', async () => {
+ const storedToken = `ghp_${'g'.repeat(36)}`;
+ const result = await runAuthTokenSubprocess({
+ cliArgs: fixtureCli(`
+ process.stderr.write("[auth] Failed to parse auth.yml: bad indentation at line 2:\\n token: ${storedToken}");
+ process.exitCode = 3;
+ `),
+ host: 'ghes.test',
+ username: 'alice',
+ token: 'submitted-token',
+ });
+ expect(result.ok).toBe(false);
+ if (!result.ok) {
+ expect(result.error).not.toContain(storedToken);
+ expect(result.error).toContain('[REDACTED-GH-PAT]');
+ }
+ });
+
+ test('removes the submitted token from stderr even when no scrubber pattern knows its shape', async () => {
+ const token = `${'a'.repeat(8)}0123456789abcdef0123456789abcdef`;
+ const result = await runAuthTokenSubprocess({
+ cliArgs: fixtureCli(`
+ process.stderr.write("[auth] Failed to parse auth.yml: bad indentation at line 2:\\n token: ${token}");
+ process.exitCode = 3;
+ `),
+ host: 'gitea.internal',
+ username: 'alice',
+ token: `${token}\n`,
+ });
+ expect(result.ok).toBe(false);
+ if (!result.ok) {
+ expect(result.error).not.toContain(token);
+ expect(result.error).toContain('token: [REDACTED]');
+ }
+ });
+
+ test('forwards cliEnv through to the spawned CLI', async () => {
+ const result = await runAuthTokenSubprocess({
+ cliArgs: fixtureCli(`
+ let d='';
+ process.stdin.on('data', c => { d += c; });
+ process.stdin.on('end', () => {
+ process.stdout.write(JSON.stringify({ type: 'complete', host: 'ghes.test', login: process.env.OK_AUTH_TOKEN_ENV_MARKER || 'unset' }) + '\\n');
+ process.exit(0);
+ });
+ `),
+ cliEnv: { OK_AUTH_TOKEN_ENV_MARKER: 'marker-from-cli-env' },
+ host: 'ghes.test',
+ username: 'alice',
+ token: 'good-token',
+ });
+ expect(result).toEqual({ ok: true, host: 'ghes.test', login: 'marker-from-cli-env' });
+ });
+});
diff --git a/packages/server/src/local-ops/auth-token.ts b/packages/server/src/local-ops/auth-token.ts
new file mode 100644
index 000000000..c13045f22
--- /dev/null
+++ b/packages/server/src/local-ops/auth-token.ts
@@ -0,0 +1,69 @@
+import { stderrDetailSuffix } from './clone-error-classify.ts';
+import {
+ LOCAL_OP_AUTH_SUBPROCESS_TIMEOUT_MS,
+ type LocalOpCliInvocation,
+ runSubprocess,
+} from './subprocess.ts';
+import type { LocalOpSubprocessLifetime } from './subprocess-lifetime.ts';
+
+export interface RunAuthTokenOptions extends LocalOpCliInvocation {
+ lifetime?: LocalOpSubprocessLifetime;
+ host: string;
+ username: string;
+ token: string;
+ timeoutMs?: number;
+}
+
+export type RunAuthTokenResult =
+ | { ok: true; host: string; login: string }
+ | { ok: false; host: string; error: string };
+
+export async function runAuthTokenSubprocess(
+ opts: RunAuthTokenOptions,
+): Promise<RunAuthTokenResult> {
+ const host = opts.host;
+ let terminal: RunAuthTokenResult | null = null;
+
+ const proc = runSubprocess({
+ lifetime: opts.lifetime,
+ cliArgs: opts.cliArgs,
+ cliEnv: opts.cliEnv,
+ trailingArgs: [
+ 'auth',
+ 'token',
+ '--json',
+ '--host',
+ host,
+ '--username',
+ opts.username,
+ '--token-stdin',
+ ],
+ stdinData: opts.token,
+ timeoutMs: opts.timeoutMs ?? LOCAL_OP_AUTH_SUBPROCESS_TIMEOUT_MS,
+ onLine: ({ parsed }) => {
+ if (!parsed) return;
+ if (parsed.type === 'complete') {
+ terminal = {
+ ok: true,
+ host: typeof parsed.host === 'string' ? parsed.host : host,
+ login: typeof parsed.login === 'string' ? parsed.login : '',
+ };
+ } else if (parsed.type === 'error') {
+ terminal = {
+ ok: false,
+ host,
+ error: typeof parsed.message === 'string' ? parsed.message : 'Storing the token failed',
+ };
+ }
+ },
+ });
+
+ const result = await proc.done;
+ if (terminal) return terminal;
+ if (result.timedOut) return { ok: false, host, error: 'Storing the token timed out.' };
+ return {
+ ok: false,
+ host,
+ error: `Storing the token failed.${stderrDetailSuffix(result.stderr, [opts.token, opts.token.trim()])}`,
+ };
+}
diff --git a/packages/server/src/local-ops/clone-error-classify.ts b/packages/server/src/local-ops/clone-error-classify.ts
index 5e4ff516b..8432524f7 100644
--- a/packages/server/src/local-ops/clone-error-classify.ts
+++ b/packages/server/src/local-ops/clone-error-classify.ts
@@ -14,8 +14,12 @@ export function redactedStderrDetail(rawStderr: string): string {
return scrubSecrets(redactShareSubprocessStderr(rawStderr)).trim().slice(0, MAX_DETAIL_LEN);
}
-export function stderrDetailSuffix(rawStderr: string): string {
- const detail = redactedStderrDetail(rawStderr);
+export function stderrDetailSuffix(rawStderr: string, secrets: readonly string[] = []): string {
+ const withoutSecrets = secrets.reduce(
+ (text, secret) => (secret.length > 0 ? text.split(secret).join('[REDACTED]') : text),
+ rawStderr,
+ );
+ const detail = redactedStderrDetail(withoutSecrets);
return detail.length > 0 ? ` — ${detail}` : '';
}
diff --git a/packages/server/src/local-ops/index.ts b/packages/server/src/local-ops/index.ts
index eb24f9419..7f39ef21d 100644
--- a/packages/server/src/local-ops/index.ts
+++ b/packages/server/src/local-ops/index.ts
@@ -12,6 +12,7 @@ export {
runAuthReposSubprocess,
runAuthStatusSubprocess,
} from './auth-query.ts';
+export { runAuthTokenSubprocess } from './auth-token.ts';
export { classifyCloneError } from './clone-error-classify.ts';
export {
type RawCloneEvent,
diff --git a/packages/server/src/local-ops/subprocess.ts b/packages/server/src/local-ops/subprocess.ts
index afad1e48e..d96e3a584 100644
--- a/packages/server/src/local-ops/subprocess.ts
+++ b/packages/server/src/local-ops/subprocess.ts
@@ -10,6 +10,8 @@ interface ParsedLine {
type LocalOpCliEnv = Readonly<Record<string, string | undefined>>;
+export const LOCAL_OP_AUTH_SUBPROCESS_TIMEOUT_MS = 30_000;
+
export interface LocalOpCliInvocation {
readonly cliArgs: readonly string[];
readonly cliEnv?: LocalOpCliEnv;
diff --git a/packages/server/src/server-factory.ts b/packages/server/src/server-factory.ts
index 6cb56a406..fee623144 100644
--- a/packages/server/src/server-factory.ts
+++ b/packages/server/src/server-factory.ts
@@ -161,7 +161,7 @@ import {
tracedUnlinkSync,
tracedWriteFileSync,
} from './fs-traced.ts';
-import { buildSyncCredentialConfig, createGitInstance } from './git-handle.ts';
+import { createGitInstance } from './git-handle.ts';
import type {
CheckPushPermissionOptions,
DetectGhAccountsFn,
@@ -274,9 +274,8 @@ import {
shadowGit,
} from './shadow-repo.ts';
import {
+ createSyncCredentialConfigResolver,
readDeclaredGitHubHosts,
- readOriginGitHubRepo,
- shouldResetAmbientCredentials,
} from './share/git-context.ts';
import { resyncRecordedSkillCopies } from './skill-placements.ts';
import { skillStateYamlPath } from './skill-state.ts';
@@ -515,6 +514,12 @@ export function createServer(options: ServerOptions): ServerInstance {
ephemeral = false,
} = options;
const declaredGitHubHosts = readDeclaredGitHubHosts(configHomedirOverride);
+ const resolveSyncCredentialConfig = createSyncCredentialConfigResolver({
+ projectDir,
+ tokenStore: options.tokenStore,
+ localOpCliArgs,
+ declaredGitHubHosts,
+ });
const log = getLogger('server');
let headWatcher: HeadWatcherHandle | null = null;
@@ -2116,6 +2121,7 @@ export function createServer(options: ServerOptions): ServerInstance {
const apiExtension = createApiExtension({
declaredGitHubHosts,
+ resolveSyncCredentialConfig,
hocuspocus,
durabilityState,
ingressPolicy,
@@ -4485,17 +4491,7 @@ export function createServer(options: ServerOptions): ServerInstance {
log.warn({ err }, '[conflicts] boot prune of merge-native entries failed');
}
- const resetAmbientCredentials = shouldResetAmbientCredentials(projectDir, declaredGitHubHosts);
- log.debug(
- {
- resetAmbientCredentials,
- originKind: readOriginGitHubRepo(projectDir, declaredGitHubHosts).kind,
- },
- '[sync] ambient credential-chain reset decision at boot',
- );
- const syncCredentialConfig = buildSyncCredentialConfig(localOpCliArgs, {
- resetAmbient: resetAmbientCredentials,
- });
+ const syncCredentialConfig = await resolveSyncCredentialConfig();
const bootAutoSyncMode = readProjectAutoSyncMode();
const bootAutoSyncIntervals = readProjectAutoSyncIntervals();
if (bootAutoSyncMode.mode !== 'off') {
@@ -4518,6 +4514,7 @@ export function createServer(options: ServerOptions): ServerInstance {
pushIntervalSeconds:
options.pushIntervalSeconds ?? bootAutoSyncIntervals.pushIntervalSeconds,
credentialConfig: syncCredentialConfig,
+ resolveCredentialConfig: resolveSyncCredentialConfig,
cc1Broadcaster,
conflicts,
detectGh: options.detectGh,
diff --git a/packages/server/src/share/git-context.test.ts b/packages/server/src/share/git-context.test.ts
index fc2d67b99..f0a89d025 100644
--- a/packages/server/src/share/git-context.test.ts
+++ b/packages/server/src/share/git-context.test.ts
@@ -4,11 +4,14 @@ import { join, relative, resolve } from 'node:path';
import { afterEach, beforeEach, describe, expect, test } from 'vitest';
import {
branchExistsOnOrigin,
+ createSyncCredentialConfigResolver,
parseGitHubOriginUrl,
readDeclaredGitHubHosts,
readGitHeadBranch,
+ readOriginCredentialHost,
readOriginGitHubRepo,
readSyncRemoteInfo,
+ resolveAmbientCredentialReset,
resolveGitHubAuthHost,
sameGitHubLogin,
shouldResetAmbientCredentials,
@@ -577,6 +580,155 @@ describe('shouldResetAmbientCredentials', () => {
});
});
+describe('resolveAmbientCredentialReset', () => {
+ let dir: string;
+
+ beforeEach(() => {
+ dir = mkdtempSync(join(tmpdir(), 'share-git-reset-token-'));
+ });
+
+ afterEach(() => {
+ rmSync(dir, { recursive: true, force: true });
+ });
+
+ function storeWith(...hosts: string[]) {
+ const asked: string[] = [];
+ return {
+ asked,
+ store: {
+ async get(host: string) {
+ asked.push(host);
+ return hosts.includes(host) ? { login: 'alice', token: 'tok' } : null;
+ },
+ },
+ };
+ }
+
+ test('a non-GitHub origin with a stored token resets, so a stale ambient credential cannot win', async () => {
+ seedRepo(dir, {
+ config: '[remote "origin"]\n\turl = https://Git.Corp.example:8443/team/kb.git\n',
+ });
+ const { store, asked } = storeWith('git.corp.example:8443');
+ expect(await resolveAmbientCredentialReset(dir, store)).toBe(true);
+ expect(asked).toEqual(['git.corp.example:8443']);
+ });
+
+ test('a plain http origin with a stored token keeps the ambient chain the helper cannot replace', async () => {
+ seedRepo(dir, {
+ config: '[remote "origin"]\n\turl = http://git.corp.example/team/kb.git\n',
+ });
+ expect(await resolveAmbientCredentialReset(dir, storeWith('git.corp.example').store)).toBe(
+ false,
+ );
+ });
+
+ test('a non-GitHub origin with nothing stored keeps the ambient chain', async () => {
+ seedRepo(dir, {
+ config: '[remote "origin"]\n\turl = https://gitlab.com/team/notes.git\n',
+ });
+ expect(await resolveAmbientCredentialReset(dir, storeWith().store)).toBe(false);
+ });
+
+ test('a non-GitHub origin with no token store keeps the ambient chain', async () => {
+ seedRepo(dir, {
+ config: '[remote "origin"]\n\turl = https://gitlab.com/team/notes.git\n',
+ });
+ expect(await resolveAmbientCredentialReset(dir, null)).toBe(false);
+ });
+
+ test('a token store that throws surfaces the failure instead of choosing a chain', async () => {
+ seedRepo(dir, {
+ config: '[remote "origin"]\n\turl = https://gitlab.com/team/notes.git\n',
+ });
+ const store = {
+ async get(): Promise<never> {
+ throw new Error('keychain locked');
+ },
+ };
+ await expect(resolveAmbientCredentialReset(dir, store)).rejects.toThrow('keychain locked');
+ });
+
+ test('a declared GitHub Enterprise origin over plain http keeps the ambient chain', async () => {
+ seedRepo(dir, {
+ config: '[remote "origin"]\n\turl = http://ghes.corp.example/team/kb.git\n',
+ });
+ const declared = new Set(['ghes.corp.example']);
+ expect(await resolveAmbientCredentialReset(dir, storeWith().store, declared)).toBe(false);
+ const resolve = createSyncCredentialConfigResolver({
+ projectDir: dir,
+ tokenStore: storeWith().store,
+ localOpCliArgs: ['ok'],
+ declaredGitHubHosts: declared,
+ });
+ expect(await resolve()).not.toContain('credential.helper=');
+ });
+
+ test('a declared GitHub Enterprise origin over https still resets the ambient chain', async () => {
+ seedRepo(dir, {
+ config: '[remote "origin"]\n\turl = https://ghes.corp.example/team/kb.git\n',
+ });
+ const declared = new Set(['ghes.corp.example']);
+ expect(await resolveAmbientCredentialReset(dir, storeWith().store, declared)).toBe(true);
+ });
+
+ test('a failed lookup keeps the chain the resolver already chose', async () => {
+ seedRepo(dir, {
+ config: '[remote "origin"]\n\turl = https://gitlab.com/team/notes.git\n',
+ });
+ let fail = false;
+ const store = {
+ async get(host: string) {
+ if (fail) throw new Error('keychain locked');
+ return host === 'gitlab.com' ? { login: 'oauth2', token: 'tok' } : null;
+ },
+ };
+ const resolve = createSyncCredentialConfigResolver({
+ projectDir: dir,
+ tokenStore: store,
+ localOpCliArgs: ['ok'],
+ declaredGitHubHosts: new Set(),
+ });
+ const first = await resolve();
+ expect(first).toContain('credential.helper=');
+ fail = true;
+ expect(await resolve()).toEqual(first);
+ expect(await resolve()).toEqual(first);
+ });
+
+ test('a lookup that fails before any chain was chosen falls back to the ambient chain', async () => {
+ seedRepo(dir, {
+ config: '[remote "origin"]\n\turl = https://gitlab.com/team/notes.git\n',
+ });
+ const resolve = createSyncCredentialConfigResolver({
+ projectDir: dir,
+ tokenStore: {
+ async get(): Promise<never> {
+ throw new Error('keychain locked');
+ },
+ },
+ localOpCliArgs: ['ok'],
+ declaredGitHubHosts: new Set(),
+ });
+ expect(await resolve()).not.toContain('credential.helper=');
+ });
+
+ test('a GitHub origin resets without reading the token store', async () => {
+ seedRepo(dir, {
+ config: '[remote "origin"]\n\turl = https://github.com/inkeep/open-knowledge.git\n',
+ });
+ const { store, asked } = storeWith();
+ expect(await resolveAmbientCredentialReset(dir, store)).toBe(true);
+ expect(asked).toEqual([]);
+ });
+
+ test('readOriginCredentialHost keeps a non-default port and drops the case', () => {
+ seedRepo(dir, {
+ config: '[remote "origin"]\n\turl = https://Git.Corp.example:8443/group/sub/kb.git\n',
+ });
+ expect(readOriginCredentialHost(dir)).toBe('git.corp.example:8443');
+ });
+});
+
describe('branchExistsOnOrigin', () => {
let dir: string;
@@ -653,6 +805,7 @@ describe('readSyncRemoteInfo', () => {
expect(readSyncRemoteInfo(dir)).toEqual({
label: 'inkeep/open-knowledge',
webUrl: 'https://github.com/inkeep/open-knowledge',
+ transport: 'https',
});
});
@@ -663,6 +816,7 @@ describe('readSyncRemoteInfo', () => {
expect(readSyncRemoteInfo(dir)).toEqual({
label: 'inkeep/open-knowledge',
webUrl: 'https://github.com/inkeep/open-knowledge',
+ transport: 'ssh',
});
});
@@ -674,6 +828,7 @@ describe('readSyncRemoteInfo', () => {
expect(readSyncRemoteInfo(dir)).toEqual({
label: 'ghes.acme.test/team/notes',
webUrl: 'https://ghes.acme.test/team/notes',
+ transport: 'https',
});
});
@@ -685,6 +840,7 @@ describe('readSyncRemoteInfo', () => {
expect(readSyncRemoteInfo(dir)).toEqual({
label: 'ghes.corp.example/org/repo',
webUrl: 'https://ghes.corp.example/org/repo',
+ transport: 'https',
});
});
@@ -695,19 +851,39 @@ describe('readSyncRemoteInfo', () => {
expect(readSyncRemoteInfo(dir)).toEqual({
label: 'gitlab.com/team/notes',
webUrl: null,
+ transport: 'https',
+ });
+ });
+
+ test('a plain http origin reports the http transport, distinct from https', () => {
+ seedRepo(dir, {
+ config: '[remote "origin"]\n\turl = http://git.corp.example/team/notes.git\n',
+ });
+ expect(readSyncRemoteInfo(dir)).toEqual({
+ label: 'git.corp.example/team/notes',
+ webUrl: null,
+ transport: 'http',
});
});
test('non-github scp-style ssh origin strips credentials into host/path label', () => {
seedRepo(dir, { config: '[remote "origin"]\n\turl = [email protected]:team/notes.git\n' });
- expect(readSyncRemoteInfo(dir)).toEqual({ label: 'gitlab.com/team/notes', webUrl: null });
+ expect(readSyncRemoteInfo(dir)).toEqual({
+ label: 'gitlab.com/team/notes',
+ webUrl: null,
+ transport: 'ssh',
+ });
});
test('non-github https origin with embedded credentials (incl. @ in password) leaks none', () => {
seedRepo(dir, {
config: '[remote "origin"]\n\turl = https://user:p@[email protected]/org/repo.git\n',
});
- expect(readSyncRemoteInfo(dir)).toEqual({ label: 'gitlab.com/org/repo', webUrl: null });
+ expect(readSyncRemoteInfo(dir)).toEqual({
+ label: 'gitlab.com/org/repo',
+ webUrl: null,
+ transport: 'https',
+ });
});
test('returns null when no origin url is configured', () => {
@@ -763,6 +939,7 @@ describe('linked-worktree common-dir resolution', () => {
expect(readSyncRemoteInfo(project)).toEqual({
label: 'inkeep/open-knowledge',
webUrl: 'https://github.com/inkeep/open-knowledge',
+ transport: 'https',
});
});
@@ -857,6 +1034,7 @@ describe('git host declaration gates GitHub treatment', () => {
expect(readSyncRemoteInfo(dir)).toEqual({
label: 'git.example.internal/team/kb',
webUrl: 'https://git.example.internal/team/kb',
+ transport: 'https',
});
});
@@ -872,6 +1050,14 @@ describe('git host declaration gates GitHub treatment', () => {
config: '[remote "origin"]\n\turl = ssh://[email protected]/team/kb.git\n',
});
expect(readOriginGitHubRepo(dir)).toEqual({ kind: 'non-github', host: 'git.example.internal' });
+ expect(readSyncRemoteInfo(dir)?.transport).toBe('ssh');
+ });
+
+ test('an origin the parser cannot read still reports its transport', () => {
+ seedRepo(dir, {
+ config: '[remote "origin"]\n\turl = https://git.example.com/scm/team/sub/wiki.git\n',
+ });
+ expect(readSyncRemoteInfo(dir)).toMatchObject({ webUrl: null, transport: 'https' });
});
test.each(['gitlab.com', 'bitbucket.org', 'codeberg.org', 'gitea.com', 'sr.ht', 'sourcehut.org'])(
diff --git a/packages/server/src/share/git-context.ts b/packages/server/src/share/git-context.ts
index 4885b5fd4..26be51cc2 100644
--- a/packages/server/src/share/git-context.ts
+++ b/packages/server/src/share/git-context.ts
@@ -1,4 +1,5 @@
import {
+ credentialHostFromRemoteUrl,
declaredGitHubHostsFrom,
isGitHubHost,
normalizeGitHostname,
@@ -8,11 +9,14 @@ import {
inspectGitRepository,
} from '@inkeep/open-knowledge-core/git-repository';
import { readConfigSafely, resolveConfigPath } from '@inkeep/open-knowledge-core/server';
+import { buildSyncCredentialConfig } from '../git-handle.ts';
import { getLogger } from '../logger.ts';
const log = getLogger('git-context');
-export type OriginTransport = 'https' | 'ssh' | 'git';
+export type OriginTransport = 'https' | 'http' | 'ssh' | 'git';
+
+export type ParsedOriginTransport = Exclude<OriginTransport, 'http'>;
export type OriginResult =
| {
@@ -20,7 +24,7 @@ export type OriginResult =
host: string;
owner: string;
repo: string;
- transport: OriginTransport;
+ transport: ParsedOriginTransport;
}
| { kind: 'no-remote' }
| { kind: 'non-github'; host: string | null };
@@ -39,7 +43,7 @@ export interface ParsedOriginRepo {
host: string;
owner: string;
repo: string;
- transport: OriginTransport;
+ transport: ParsedOriginTransport;
login?: string;
}
@@ -110,7 +114,7 @@ export function parseGitRemoteUrl(originUrl: string): ParsedOriginRepo | null {
host: string,
owner: string,
repo: string,
- transport: OriginTransport,
+ transport: ParsedOriginTransport,
userinfo?: string,
): ParsedOriginRepo | null => {
const normalized = normalizeGitHostname(host);
@@ -154,6 +158,11 @@ export function readOriginRemoteUrl(projectDir: string): string | null {
return origin?.kind === 'configured' ? origin.url : null;
}
+export function readOriginCredentialHost(projectDir: string): string | null {
+ const originUrl = readOriginRemoteUrl(projectDir);
+ return originUrl === null ? null : credentialHostFromRemoteUrl(originUrl);
+}
+
function readParsedOrigin(
projectDir: string,
declaredGitHubHosts: ReadonlySet<string>,
@@ -210,9 +219,75 @@ export function shouldResetAmbientCredentials(
return readOriginGitHubRepo(projectDir, declaredGitHubHosts).kind !== 'non-github';
}
+export interface CredentialPresenceStore {
+ get(host: string): Promise<unknown>;
+}
+
+export async function resolveAmbientCredentialReset(
+ projectDir: string,
+ tokenStore: CredentialPresenceStore | null | undefined,
+ declaredGitHubHosts: ReadonlySet<string> = readDeclaredGitHubHosts(),
+): Promise<boolean> {
+ const originUrl = readOriginRemoteUrl(projectDir);
+ const transport = originUrl === null ? undefined : originTransport(originUrl);
+ if (transport === 'http') return false;
+ if (shouldResetAmbientCredentials(projectDir, declaredGitHubHosts)) return true;
+ if (originUrl === null || transport !== 'https' || !tokenStore) return false;
+ const host = credentialHostFromRemoteUrl(originUrl);
+ if (host === null) return false;
+ try {
+ return (await tokenStore.get(host)) != null;
+ } catch (err) {
+ log.warn({ err, host }, '[sync] stored-token lookup for the credential reset decision failed');
+ throw err;
+ }
+}
+
+export function createSyncCredentialConfigResolver(deps: {
+ projectDir: string;
+ tokenStore: CredentialPresenceStore | null | undefined;
+ localOpCliArgs: string[] | undefined;
+ declaredGitHubHosts?: ReadonlySet<string>;
+}): () => Promise<string[]> {
+ const declaredGitHubHosts = deps.declaredGitHubHosts ?? readDeclaredGitHubHosts();
+ let lastConfig: string[] | null = null;
+ return async () => {
+ let resetAmbient: boolean;
+ try {
+ resetAmbient = await resolveAmbientCredentialReset(
+ deps.projectDir,
+ deps.tokenStore,
+ declaredGitHubHosts,
+ );
+ } catch {
+ if (lastConfig !== null) return lastConfig;
+ resetAmbient = false;
+ }
+ log.debug(
+ {
+ resetAmbient,
+ originKind: readOriginGitHubRepo(deps.projectDir, declaredGitHubHosts).kind,
+ },
+ '[sync] ambient credential-chain reset decision',
+ );
+ lastConfig = buildSyncCredentialConfig(deps.localOpCliArgs, { resetAmbient });
+ return lastConfig;
+ };
+}
+
export interface SyncRemoteInfo {
label: string;
webUrl: string | null;
+ transport?: OriginTransport;
+}
+
+function originTransport(url: string): OriginTransport | undefined {
+ const trimmed = url.trim();
+ if (/^https:\/\//i.test(trimmed)) return 'https';
+ if (/^http:\/\//i.test(trimmed)) return 'http';
+ if (/^ssh:\/\//i.test(trimmed) || /^[\w.-]+@[^:/]+:/.test(trimmed)) return 'ssh';
+ if (/^git:\/\//i.test(trimmed)) return 'git';
+ return undefined;
}
export function readSyncRemoteInfo(
@@ -221,14 +296,17 @@ export function readSyncRemoteInfo(
): SyncRemoteInfo | null {
const parsed = readParsedOrigin(projectDir, declaredGitHubHosts);
if (!parsed) return null;
+ const transport = originTransport(parsed.originUrl);
+ const withTransport = transport === undefined ? {} : { transport };
if (parsed.github) {
const { host, owner, repo } = parsed.github;
return {
label: host === 'github.com' ? `${owner}/${repo}` : `${host}/${owner}/${repo}`,
webUrl: `https://${host}/${owner}/${repo}`,
+ ...withTransport,
};
}
- return { label: labelFromNonGitHubUrl(parsed.originUrl), webUrl: null };
+ return { label: labelFromNonGitHubUrl(parsed.originUrl), webUrl: null, ...withTransport };
}
function labelFromNonGitHubUrl(url: string): string {
diff --git a/packages/server/src/sync-engine.test.ts b/packages/server/src/sync-engine.test.ts
index a98bc5882..2b983fbdf 100644
--- a/packages/server/src/sync-engine.test.ts
+++ b/packages/server/src/sync-engine.test.ts
@@ -24,6 +24,7 @@ import type { GitHandle } from './git-handle.ts';
import { listNames } from './git-paths.ts';
import type { DetectGhAccountsFn, DetectGhFn } from './github-permissions.ts';
import { getLogger } from './logger.ts';
+import { createSyncCredentialConfigResolver } from './share/git-context.ts';
import { declareGitHubHosts, useIsolatedHome } from './share/git-host-declarations.test-helper.ts';
import type { CredentialUrlMatchReader } from './share/github-account.ts';
import {
@@ -4585,6 +4586,110 @@ describe('SyncEngine auth-error recovery', () => {
expect(engine.getStatus().pausedReason).toBe('auth-error');
});
+ test('notifyCredentialsChanged rebuilds the credential chain, even when sync is off', async () => {
+ const resolved = [
+ ['credential.helper=!ok auth git-credential'],
+ ['credential.helper=', 'credential.helper=!ok auth git-credential'],
+ ];
+ let calls = 0;
+ const engine = new SyncEngine({
+ conflicts: newAuthority(),
+ projectDir,
+ contentDir,
+ contentFilter: stubContentFilter,
+ syncEnabled: false,
+ credentialConfig: resolved[0],
+ resolveCredentialConfig: async () => resolved[Math.min(++calls, 1)],
+ });
+ expect(engine.getCredentialConfig()).toEqual(resolved[0]);
+
+ await engine.notifyCredentialsChanged();
+
+ expect(engine.getCredentialConfig()).toEqual(resolved[1]);
+ });
+
+ test.each([
+ ['pull', (engine: SyncEngine) => engine.pullOnce()],
+ ['push', (engine: SyncEngine) => engine.pushOnce()],
+ ] as const)(
+ 'a token removed outside the server drops the ambient reset from the next %s',
+ async (_op, runCycle) => {
+ await initGitWithOrigin('https://git.invalid/team/notes.git');
+ const storedHosts = new Set(['git.invalid']);
+ const resolveCredentialConfig = createSyncCredentialConfigResolver({
+ projectDir,
+ tokenStore: {
+ async get(host: string) {
+ return storedHosts.has(host) ? { login: 'alice', token: 'tok' } : null;
+ },
+ },
+ localOpCliArgs: ['open-knowledge'],
+ declaredGitHubHosts: new Set(),
+ });
+ const engine = new SyncEngine({
+ conflicts: newAuthority(),
+ projectDir,
+ contentDir,
+ contentFilter: stubContentFilter,
+ syncEnabled: false,
+ credentialConfig: await resolveCredentialConfig(),
+ resolveCredentialConfig,
+ });
+ const internal = engine as unknown as { hasRemote: boolean; gitHandle: () => GitHandle };
+ internal.hasRemote = true;
+ const createGitHandle = internal.gitHandle.bind(engine);
+ const invocationChains: string[][] = [];
+ internal.gitHandle = () => {
+ const handle = createGitHandle();
+ invocationChains.push(handle.credentialConfig);
+ return handle;
+ };
+ expect(engine.getCredentialConfig()).toContain('credential.helper=');
+
+ storedHosts.delete('git.invalid');
+ await runCycle(engine);
+
+ expect(invocationChains.length).toBeGreaterThan(0);
+ expect(invocationChains[0]).not.toContain('credential.helper=');
+ expect(invocationChains[0]).toHaveLength(1);
+ await engine.destroy();
+ },
+ );
+
+ test('a failed credential chain rebuild keeps the previous chain', async () => {
+ const engine = new SyncEngine({
+ conflicts: newAuthority(),
+ projectDir,
+ contentDir,
+ contentFilter: stubContentFilter,
+ syncEnabled: false,
+ credentialConfig: ['credential.helper=!ok auth git-credential'],
+ resolveCredentialConfig: async () => {
+ throw new Error('keychain locked');
+ },
+ });
+
+ await engine.notifyCredentialsChanged();
+
+ expect(engine.getCredentialConfig()).toEqual(['credential.helper=!ok auth git-credential']);
+ });
+
+ test('a push-permission pause left over from a GitHub origin clears once the origin is not GitHub', async () => {
+ await initGitWithOrigin('https://gitlab.com/team/notes.git');
+ const engine = makeEngine({ syncEnabled: true });
+ const internal = engine as unknown as InternalState & { hasRemote: boolean };
+ internal.hasRemote = true;
+ internal.state = 'disabled';
+ internal.pausedReason = 'no-push-permission';
+
+ const result = await engine.refreshPushPermission();
+
+ expect(result).toEqual({ checkStatus: 'unknown' });
+ expect(engine.getStatus().pausedReason).toBeUndefined();
+ expect(engine.getStatus().state).toBe('idle');
+ await engine.destroy();
+ });
+
test('notifyCredentialsChanged is a no-op when not parked on auth-error', async () => {
const engine = makeEngine({ syncEnabled: true });
const before = engine.getStatus().state;
diff --git a/packages/server/src/sync-engine.ts b/packages/server/src/sync-engine.ts
index c01fb1ca1..fa3d8f9da 100644
--- a/packages/server/src/sync-engine.ts
+++ b/packages/server/src/sync-engine.ts
@@ -321,6 +321,7 @@ interface SyncEngineOptions {
mode?: SyncMode;
syncEnabled?: boolean;
credentialConfig?: string[];
+ resolveCredentialConfig?: () => Promise<string[]>;
cc1Broadcaster?: Pick<CC1Broadcaster, 'signal'> | null;
conflicts: ConflictAuthority;
onStateChange?: (state: SyncState) => void;
@@ -401,6 +402,7 @@ export class SyncEngine {
private pushIntervalSeconds: number;
private mode: SyncMode;
private credentialConfig: string[];
+ private readonly resolveCredentialConfig: (() => Promise<string[]>) | undefined;
private cc1Broadcaster: Pick<CC1Broadcaster, 'signal'> | null;
private onStateChange: ((state: SyncState) => void) | undefined;
private setBatchInProgress: ((value: boolean) => void) | undefined;
@@ -491,6 +493,7 @@ export class SyncEngine {
this.pushIntervalSeconds = options.pushIntervalSeconds ?? 60;
this.mode = options.mode ?? (options.syncEnabled === true ? 'full' : 'off');
this.credentialConfig = options.credentialConfig ?? [];
+ this.resolveCredentialConfig = options.resolveCredentialConfig;
this.cc1Broadcaster = options.cc1Broadcaster ?? null;
this.onStateChange = options.onStateChange;
this.setBatchInProgress = options.setBatchInProgress;
@@ -853,7 +856,21 @@ export class SyncEngine {
}
}
+ getCredentialConfig(): string[] {
+ return this.credentialConfig;
+ }
+
+ private async refreshCredentialConfig(): Promise<void> {
+ if (!this.resolveCredentialConfig) return;
+ try {
+ this.credentialConfig = await this.resolveCredentialConfig();
+ } catch (err) {
+ log.warn({ err }, '[sync] credential config refresh failed — keeping the previous chain');
+ }
+ }
+
async notifyCredentialsChanged(): Promise<void> {
+ await this.refreshCredentialConfig();
if (this.mode === 'off') return;
this.ghTokenSource.invalidate();
@@ -1002,6 +1019,7 @@ export class SyncEngine {
if (this.cycleInFlight !== null || this.fetchOnlyInFlight) return false;
this.fetchOnlyInFlight = true;
+ await this.refreshCredentialConfig();
const handle = this.gitHandle();
try {
await handle.git.fetch('origin');
@@ -1223,7 +1241,17 @@ export class SyncEngine {
const next: PushPermissionStatus = { checkStatus: 'unknown' };
const prev = this.pushPermission;
this.pushPermission = next;
- if (!pushPermissionStatusEqual(prev, next)) {
+ if (this.pausedReason === 'no-push-permission') {
+ this.pausedReason = undefined;
+ if (this.state === 'disabled' && this.mode === 'full') {
+ this.transitionTo('idle');
+ }
+ log.info(
+ { caller, originKind: origin.kind },
+ '[sync] push-permission pause cleared — origin is no longer a GitHub host',
+ );
+ this.cc1Broadcaster?.signal('sync-status');
+ } else if (!pushPermissionStatusEqual(prev, next)) {
this.cc1Broadcaster?.signal('sync-status');
}
return next;
@@ -1474,6 +1502,7 @@ export class SyncEngine {
return 'error';
}
}
+ await this.refreshCredentialConfig();
const handle = this.gitHandle();
let branch: string;
@@ -2061,6 +2090,7 @@ export class SyncEngine {
private async doPushCycle(retriesLeft = 0): Promise<void> {
this.pushCycleLanded = false;
+ await this.refreshCredentialConfig();
const tmpIndexPath = join(tmpdir(), `ok-sync-idx-${process.pid}-${Date.now()}.idx`);
let commitSha: string | null = null;