From 9bd37d4df3a7af3275434d8e8c9621fc07d93c46 Mon Sep 17 00:00:00 2001 From: damocles Date: Mon, 1 Jun 2026 13:14:48 +0200 Subject: [PATCH] fix(#4): rename shared org from org-shared to internal --- hive-c0re/src/forge.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hive-c0re/src/forge.rs b/hive-c0re/src/forge.rs index 4e1e23f7..9ae7bc34 100644 --- a/hive-c0re/src/forge.rs +++ b/hive-c0re/src/forge.rs @@ -45,9 +45,9 @@ const CONFIG_ORG: &str = "agent-configs"; /// common reference without the operator having to bake content into /// the system prompt or rely on `/shared`. Only the manager + operator /// (i.e. `core` user) can push. -const SHARED_ORG: &str = "org-shared"; +const SHARED_ORG: &str = "internal"; /// The shared docs repo inside `SHARED_ORG`. Cloneable by every agent -/// at `{FORGE_HTTP}/org-shared/docs.git`. +/// at `{FORGE_HTTP}/internal/docs.git`. const SHARED_DOCS_REPO: &str = "docs"; /// Forgejo orgs hive-c0re ensures on startup. The meta repo lives at /// `core/meta` (the `core` user's own namespace — no org needed). @@ -540,14 +540,14 @@ pub async fn ensure_config_repo(name: &str) -> Result<()> { ensure_org_repo(CONFIG_ORG, name, &token).await } -/// Ensure the `org-shared/docs` repo exists. Called once at startup +/// Ensure the `internal/docs` repo exists. Called once at startup /// after `ensure_org(SHARED_ORG)`. Idempotent — `ensure_org_repo` /// treats 409 as success. pub async fn ensure_shared_docs_repo(core_token: &str) -> Result<()> { ensure_org_repo(SHARED_ORG, SHARED_DOCS_REPO, core_token).await } -/// Grant agent `name` read-only collaborator access to `org-shared/docs`. +/// Grant agent `name` read-only collaborator access to `internal/docs`. /// Idempotent: HTTP 204 (already a collaborator) is treated as success. /// Mirrors `meta_read_access` so agents can clone the shared docs repo /// without authentication hassle. @@ -575,7 +575,7 @@ pub async fn shared_docs_access(name: &str, core_token: &str) -> Result<()> { ]) .output() .await - .context("invoke curl PUT org-shared/docs/collaborators")?; + .context("invoke curl PUT internal/docs/collaborators")?; let code = String::from_utf8_lossy(&out.stdout).trim().to_owned(); match code.as_str() { "204" => { @@ -760,7 +760,7 @@ pub async fn sync_agent(name: &str, core_token: Option<&str>) { if let Err(e) = ensure_meta_remote(name).await { tracing::warn!(%name, error = ?e, "forge: ensure_meta_remote failed"); } - // Grant read-only access to org-shared/docs so the agent can clone + // Grant read-only access to internal/docs so the agent can clone // the operator-curated shared skills/runbook repo. Best-effort. if let Some(token) = core_token && let Err(e) = shared_docs_access(name, token).await @@ -800,7 +800,7 @@ pub async fn ensure_all() { if let Err(e) = ensure_repo("meta", token).await { tracing::warn!(error = ?e, "forge: ensure_repo core/meta failed"); } - // Seed the shared docs repo. org-shared is already in + // Seed the shared docs repo. internal is already in // SEEDED_ORGS above so the org exists; ensure the repo itself. if let Err(e) = ensure_shared_docs_repo(token).await { tracing::warn!(error = ?e, "forge: ensure_shared_docs_repo failed");