docs(forge-tools): clarify create_repo MCP tool vs repo-create CLI
Agents cannot create repos directly via their forge token (no Create scope; push-to-create disabled). Document the two paths: - mcp__hyperhive__create_repo (forge tool group): creates under agents/ org via hive-c0re, adds write-collaborator access, enables branch protection. The standard agent path. - hive-forge repo-create / repo-add-collaborator (CLI): use the agent's own token; repo lands under agent's user account or org.
This commit is contained in:
parent
0ae2dbd8fa
commit
c6e97ef600
1 changed files with 15 additions and 5 deletions
|
|
@ -178,9 +178,20 @@ plain comment show under `last comment`, not `reviews`.
|
||||||
|
|
||||||
### Repo management
|
### Repo management
|
||||||
|
|
||||||
Three verbs create repos and manage their membership — the supported
|
Agents **cannot create repos directly via forge token** — Forgejo
|
||||||
path for workflows that need a fresh repo (agents cannot push to
|
disables push-to-create and the agent token doesn't have the Create
|
||||||
non-existent repos; the Forgejo instance disables push-to-create).
|
scope. Two paths exist depending on where the repo should live:
|
||||||
|
|
||||||
|
**Agent repos (`agents/<name>`)** — Use the `mcp__hyperhive__create_repo`
|
||||||
|
MCP tool (requires the `forge` tool group). hive-c0re creates the repo in
|
||||||
|
the c0re-owned `agents/` org, adds you as a write collaborator (not
|
||||||
|
owner), and enables branch protection (operator-team merge approval
|
||||||
|
required — you cannot self-merge). Clone URL is returned immediately.
|
||||||
|
This is the standard path for agents that need a working repo.
|
||||||
|
|
||||||
|
**Other repos** — Use the CLI verbs below (`repo-create` / `repo-add-collaborator`).
|
||||||
|
These use the agent's own forge token so the repo lands under the agent's
|
||||||
|
user account or an org the agent belongs to.
|
||||||
|
|
||||||
**`repo-create <name>`** — create a repo under the authenticated user
|
**`repo-create <name>`** — create a repo under the authenticated user
|
||||||
and print its URL. Key flags:
|
and print its URL. Key flags:
|
||||||
|
|
@ -195,8 +206,7 @@ and print its URL. Key flags:
|
||||||
active repo (`-r`/`HIVE_FORGE_REPO`). Companion to `repo-create`. The
|
active repo (`-r`/`HIVE_FORGE_REPO`). Companion to `repo-create`. The
|
||||||
`--permission` flag accepts `read` / `write` (default) / `admin`.
|
`--permission` flag accepts `read` / `write` (default) / `admin`.
|
||||||
`hive-c0re` uses this internally when an agent's config repo is
|
`hive-c0re` uses this internally when an agent's config repo is
|
||||||
initialised (`create_repo` → `repo-add-collaborator` → agent gets
|
initialised.
|
||||||
write access).
|
|
||||||
|
|
||||||
**`repo-labels [PATTERN]`** — list every label defined on the repo,
|
**`repo-labels [PATTERN]`** — list every label defined on the repo,
|
||||||
optionally filtered by a name substring (case-sensitive). Distinct from
|
optionally filtered by a name substring (case-sensitive). Distinct from
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue