Repository navigation
feat(i18n): agent-facing text to English; add githana_api endpoint reference - #25
Merged
Merged
Conversation
…ference Agent-facing surfaces are English now; text only a human reads stays Chinese. - skills/githana/SKILL.md: whole manual translated (483 → 570 lines), frontmatter untouched - tools/**: tool descriptions, zod .describe(), every returned message and error - lib/**: only the strings an agent can reach (oauth / gpg-publish / openpgp-key / dpapi / secret's exception texts). Code comments stay Chinese throughout. - lib/routes/** and the settings-only implementations stay Chinese (their reader is the person clicking the button), as do scripts/ build logs and the README Add the githana_api endpoint reference (skills/githana/references/, 24 files): one file per category listing every endpoint this App's permission set can reach, with the supporting permission and read/write level. Generated by a new derive task from GitHub's official permission-indexed endpoint table, so it cannot drift from the granted set. The manual's escape-hatch section now points at it. Move tools/gpg-keygen.js → lib/gpg-keygen.js: it is not a tool (nothing registers it; app.js imports the ten githana-* entries only) and its sole caller is the settings page, so sitting under tools/ misread as a tool entry. Its siblings (gpg-publish / oauth / openpgp-key / secret / dpapi) already live in lib/. Verified on the installed build: tool errors come back English, the old Chinese tool descriptions are gone from bin/app.mjs, and references/ ships (25 files). Co-authored-by: HanaAgent <313794804+HanaAgent@users.noreply.github.com>
|
Important Review skippedToo many files! This PR contains 149 files, which is 49 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configuration
📒 Files selected for processing: 149
You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agent-facing surfaces are English now; text only a human reads stays Chinese. Plus a
new
githana_apiendpoint reference, and one file moved back to where it belongs.1. Agent-facing text → English
The rule: the reader decides the language, not the directory.
description, zod.describe(), every returned message and errorskills/githana/SKILL.mdlib/routes/**, settings-only implementations,scripts/build logs,READMEMeasured with a character state machine (string-literal vs comment, so a
//inside a stringcannot fool it):
SKILL.mdwent 483 → 570 lines, frontmatter untouched.Two judgement calls worth flagging:
scripts/stays Chinese. Build logs are read by a maintainer. I initially wrote the briefthe other way and had to correct it after checking the sibling repo (dshana's
scripts/has~1163 CJK lines, with English runtime strings).
lib/secret.jsis mixed on purpose. Its exception texts are English (they can reach anagent), but the one string that renders into the settings page stays Chinese.
2.
githana_apiendpoint reference (skills/githana/references/)24 files, one per category, 277 endpoints — only those inside the permission surface,
because an undeclared permission means
apigets a 403 there too; listing those would mix"can do" with "always fails".
Data source is GitHub's official permission-indexed endpoint table
(
github/docs,server-to-server-permissions.json), whose stated semantics are "for eachpermission granted, these are the endpoints the app can use" — so the filter is a direct
intersection with the granted set, and the OR/AND question does not arise (an endpoint
appearing under several permissions means any one suffices).
DELETE /repos/{owner}/{repo}/git/refs/{ref}(deleting a remote branch) will now befindable instead of having to be inferred.
Wired as a
derivetask alongsideversion/thirdparty, so it cannot drift from thegranted set; CI fetches the table then runs
derive --check. The upstream API-versionsegment is pinned deliberately — following
mainwould let the whole reference changewith no trigger point.
additional-permissionsis handled conservatively: a hit withaddl=falsesuffices on itsown, otherwise every permission listed for that endpoint must be held. The two readings
differ by only 4 endpoints (
POST /user/repos,forks,generate— all also needingadministration), and the conservative one keeps them out, which is correct.3.
tools/gpg-keygen.js→lib/gpg-keygen.jsIt was not a tool:
app.jsimports the tengithana-*entries only, and its sole caller isthe settings page. Sitting under
tools/— where the naming contract istools/<tool>.js—made it read as a tool entry, and the README already carried a parenthetical to correct the
impression. Its siblings (
gpg-publish/oauth/openpgp-key/secret/dpapi) werealready in
lib/. Git records it as a rename; the code is byte-identical apart from theimport paths.
Verified on the installed build
Real tool calls (not just the source):
bin/app.mjsno longer contains the old Chinese tool descriptions;references/ships(25 files);
derive --checkis clean across all three tasks.One known display artefact: the host's already-registered tool table does not refresh on
install, so tool descriptions still read Chinese within the running session — the shipped
artefact is English. A reload or new session picks it up.
Note on how this reached the branch
I pushed this straight to
mainfirst, which broke this repo's own convention (featurebranch → PR → review → merge).
mainhas been force-pushed back tobd390aeand the worknow lives only on this branch. Flagging it rather than quietly rewriting.