2 Commits
Author SHA1 Message Date
Aleksander DygońandClaude Opus 5.5 03c2ff34c2 Remove code comments and add the no-comments rule (#12604)
* Remove code comments and add the no-comments rule

Remove the comments from first-party code and configuration files:
TS/JS, JSX, CSS, SQL migrations, Swift, Kotlin, Gradle, shell,
Docker, systemd, Nix, YAML, TOML, JSONC and GritQL.

Keep only what a tool reads: license headers, shebangs, compiler
and lint directives, JSDoc types in plain .js files, generated file
headers, GritQL scope lines, the install-server.sh help text and the
openbot-boat-pre-stop marker. Vendored code, fixtures and released
schemas keep their comments.

Add the rule to AGENTS.md, and change the docs that asked for
comments. Add two i18n keys that only comments named to
RELEASED_SOURCE_KEYS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep comments that are data in strings

The benchmark task files in opencode-free-models-bench.ts tell the
model what each function must do. The sample file and HTML page in
the two stories are display content. Put their comments back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep released migrations and mobile native inputs unchanged

check:migrations compares each released migration with v0.73.0 byte
for byte, so restore src/backend/migrations. A change to a native
build input of apps/mobile makes a new runtime version, so restore
those files and the extra fingerprint sources.

List these files and the comment markers that a tool reads in
AGENTS.md. Remove the last requests for comments in
src/renderer/AGENTS.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 12:19:28 +01:00
NB e46d2f1657 Add a built-in GitHub connection that acts as openbotgit[bot] (#1149)
* Add a built-in GitHub connection through the OpenBot GitHub App

Connect GitHub in Server settings > Connectors. The sign-in uses the
GitHub App device flow with the public Client ID only, and the tokens
stay encrypted on this computer. Every agent then gets the GitHub MCP
server, and gh and git read the token from files that each refresh
rewrites.

scripts/create-github-app.ts creates the app from
scripts/github-app/manifest.json with the manifest flow.

* Set the Client ID of the OpenBotGit GitHub App

* Show agent GitHub work as openbotgit[bot]

The account Worker holds the OpenBot GitHub App key and gives out
installation tokens at POST /v1/github/installation-tokens. The desktop
sends the GitHub user token as proof. The Worker mints tokens only for
repositories where that user can push, maintain or administer, and it
stores nothing. With no key, it answers 503 and agents act as the user.

On the desktop:
- GitHubBotTokens renews the set 10 minutes before a token expires.
- The git credential helper uses useHttpPath and takes the bot token
  of each repository from provider-state/github/repositories.
- GitHubMcpProxy is a loopback MCP server with a secret bearer. It
  sends each tool call that names a repository with its bot token. Its
  port and secret stay in the encrypted record, so a resumed session
  keeps its URL.
- gh keeps the user token. The agent instructions say to use the MCP
  tools for issues, pull requests and comments.

Also: the panel lists the repositories of the installation, and the
AGENTS.md rule "No cloud dependency for core function" is removed.

* Fix the local review findings of the GitHub connection

- Remove the 5 exports that knip reports as not used.
- Worker: a refused installation no longer stops the tokens of the others.
- Bot tokens: discard an answer that arrives after a clear, and remove an
  expired token from the repositories file while the API is not reachable.
- MCP proxy: use a new secret when the saved port is taken, close only the
  upstream client that failed, and reuse readJsonBody from LocalMcpBridge.
- A token file that cannot be written no longer stops the app or leaves the
  panel in the pending state.
- Panel: localize the error, use the danger icon, and do not show the error
  twice for an expired sign-in.
- Correct the agent instructions, PRIVACY.md, ARCHITECTURE.md, the glossary
  and the release note.

* Keep the type ratchet at its baseline for the GitHub MCP proxy

The MCP SDK transport classes do not satisfy Transport with
exactOptionalPropertyTypes. The proxy has the same 2 errors as
local-mcp-bridge.ts and mcp-probe.ts, so the baseline records them.
2026-09-29 19:06:06 +02:00