{"openapi":"3.1.0","info":{"title":"Upstream forge API","version":"1.0.0","description":"Same-origin HTTP API for upstream.codes: public forge reads and the authenticated developer surface. All success bodies use the `{ data }` envelope; all failures use `{ error: { code, message, hint?, docs? } }`. Start from /llms.txt for a guided index, or /sitemap.xml for the crawlable web surface.","contact":{"name":"Upstream","url":"https://staging.upstream.codes/docs"}},"servers":[{"url":"https://staging.upstream.codes","description":"Upstream public origin"}],"tags":[{"name":"discovery","description":"Machine-readable entry points."},{"name":"public-namespaces","description":"Public developer profiles and organizations."},{"name":"public-repositories","description":"Public repository reads: tree, files, commits, compare."},{"name":"public-changes","description":"Public Change Request reads and contributor mutations."},{"name":"public-issues","description":"Public Native Issue reads and contributor mutations."},{"name":"developer","description":"Authenticated dashboard, notifications, and account surface."},{"name":"system","description":"Health and service metadata."}],"paths":{"/openapi.json":{"get":{"summary":"This OpenAPI document.","operationId":"getOpenApi","tags":["discovery"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/llms.txt":{"get":{"summary":"Agent index for upstream.codes.","operationId":"getLlmsTxt","tags":["discovery"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/sitemap.xml":{"get":{"summary":"Crawlable URL index (canonical paths only).","operationId":"getSitemap","tags":["discovery"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"summary":"RFC 9728 protected-resource metadata with scopes_supported.","operationId":"getProtectedResourceMetadata","tags":["discovery"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/health":{"get":{"summary":"Service health probe.","operationId":"getHealth","tags":["system"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/forge/public/namespaces/{namespace}":{"get":{"summary":"Public namespace detail (profile or organization presentation).","operationId":"getPublicNamespace","tags":["public-namespaces"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string"},"description":"Public namespace slug (workspace slug or user handle)."}]}},"/api/forge/public/namespaces/{namespace}/repositories":{"get":{"summary":"Searchable public repository listing for a namespace.","operationId":"listPublicRepositories","tags":["public-namespaces"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string"},"description":"Public namespace slug (workspace slug or user handle)."}]}},"/api/forge/public/namespaces/{namespace}/repositories/{repository}":{"get":{"summary":"Public repository detail with viewer capabilities and fork lineage.","operationId":"getPublicRepository","tags":["public-repositories"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string"},"description":"Public namespace slug (workspace slug or user handle)."},{"name":"repository","in":"path","required":true,"schema":{"type":"string"},"description":"Repository slug within the namespace."}]}},"/api/forge/public/namespaces/{namespace}/repositories/{repository}/tree":{"get":{"summary":"Repository source tree at a ref and path.","operationId":"getPublicTree","tags":["public-repositories"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string"},"description":"Public namespace slug (workspace slug or user handle)."},{"name":"repository","in":"path","required":true,"schema":{"type":"string"},"description":"Repository slug within the namespace."}]}},"/api/forge/public/namespaces/{namespace}/repositories/{repository}/file":{"get":{"summary":"Repository file contents at a ref and path.","operationId":"getPublicFile","tags":["public-repositories"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string"},"description":"Public namespace slug (workspace slug or user handle)."},{"name":"repository","in":"path","required":true,"schema":{"type":"string"},"description":"Repository slug within the namespace."}]}},"/api/forge/public/namespaces/{namespace}/repositories/{repository}/commits":{"get":{"summary":"Commit history for a ref and optional path.","operationId":"listPublicCommits","tags":["public-repositories"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string"},"description":"Public namespace slug (workspace slug or user handle)."},{"name":"repository","in":"path","required":true,"schema":{"type":"string"},"description":"Repository slug within the namespace."}]}},"/api/forge/public/namespaces/{namespace}/repositories/{repository}/branches":{"get":{"summary":"Branch listing for a repository.","operationId":"listPublicBranches","tags":["public-repositories"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string"},"description":"Public namespace slug (workspace slug or user handle)."},{"name":"repository","in":"path","required":true,"schema":{"type":"string"},"description":"Repository slug within the namespace."}]}},"/api/forge/public/namespaces/{namespace}/repositories/{repository}/compare":{"get":{"summary":"Compare two refs (base/head), optionally cross-repository for forks.","operationId":"comparePublicRefs","tags":["public-repositories"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string"},"description":"Public namespace slug (workspace slug or user handle)."},{"name":"repository","in":"path","required":true,"schema":{"type":"string"},"description":"Repository slug within the namespace."}]}},"/api/forge/public/namespaces/{namespace}/repositories/{repository}/changes":{"get":{"summary":"Public Change Request listing for a repository.","operationId":"listPublicChangeRequests","tags":["public-changes"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string"},"description":"Public namespace slug (workspace slug or user handle)."},{"name":"repository","in":"path","required":true,"schema":{"type":"string"},"description":"Repository slug within the namespace."}]},"post":{"summary":"Open a Change Request (signed-in viewers with write on the source).","operationId":"createPublicChangeRequest","tags":["public-changes"],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string"},"description":"Public namespace slug (workspace slug or user handle)."},{"name":"repository","in":"path","required":true,"schema":{"type":"string"},"description":"Repository slug within the namespace."}]}},"/api/forge/public/namespaces/{namespace}/repositories/{repository}/changes/{number}":{"get":{"summary":"Public Change Request detail (version-pinned reviews).","operationId":"getPublicChangeRequest","tags":["public-changes"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string"},"description":"Public namespace slug (workspace slug or user handle)."},{"name":"repository","in":"path","required":true,"schema":{"type":"string"},"description":"Repository slug within the namespace."},{"name":"number","in":"path","required":true,"schema":{"type":"integer"}}]}},"/api/forge/public/namespaces/{namespace}/repositories/{repository}/changes/{number}/checks":{"get":{"summary":"Per-version check runs for a Change Request.","operationId":"listPublicChecks","tags":["public-changes"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string"},"description":"Public namespace slug (workspace slug or user handle)."},{"name":"repository","in":"path","required":true,"schema":{"type":"string"},"description":"Repository slug within the namespace."}]}},"/api/forge/public/namespaces/{namespace}/repositories/{repository}/changes/{number}/reviews":{"get":{"summary":"Version-pinned reviews for a Change Request.","operationId":"listPublicReviews","tags":["public-changes"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string"},"description":"Public namespace slug (workspace slug or user handle)."},{"name":"repository","in":"path","required":true,"schema":{"type":"string"},"description":"Repository slug within the namespace."}]}},"/api/forge/public/namespaces/{namespace}/repositories/{repository}/issues":{"get":{"summary":"Public Native Issue listing for a repository.","operationId":"listPublicIssues","tags":["public-issues"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string"},"description":"Public namespace slug (workspace slug or user handle)."},{"name":"repository","in":"path","required":true,"schema":{"type":"string"},"description":"Repository slug within the namespace."}]},"post":{"summary":"Report an issue on a live public repository (no workspace membership required).","operationId":"createPublicIssue","tags":["public-issues"],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string"},"description":"Public namespace slug (workspace slug or user handle)."},{"name":"repository","in":"path","required":true,"schema":{"type":"string"},"description":"Repository slug within the namespace."}]}},"/api/forge/public/namespaces/{namespace}/repositories/{repository}/issues/{number}":{"get":{"summary":"Public Native Issue detail.","operationId":"getPublicIssue","tags":["public-issues"],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string"},"description":"Public namespace slug (workspace slug or user handle)."},{"name":"repository","in":"path","required":true,"schema":{"type":"string"},"description":"Repository slug within the namespace."}]}},"/api/forge/developer/viewer":{"get":{"summary":"Signed-in viewer bootstrap.","operationId":"getDeveloperViewer","tags":["developer"],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/forge/developer/dashboard":{"get":{"summary":"Attention items, review queue, CRs, issues, and activity.","operationId":"getDeveloperDashboard","tags":["developer"],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/forge/developer/repositories":{"get":{"summary":"Cross-namespace repository index for the viewer.","operationId":"getDeveloperRepositories","tags":["developer"],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"summary":"Create a repository in a writable destination namespace.","operationId":"createDeveloperRepository","tags":["developer"],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/forge/developer/notifications":{"get":{"summary":"Canonical notification inbox (change_request / upstream_issue kinds).","operationId":"getDeveloperNotifications","tags":["developer"],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/forge/developer/preferences":{"get":{"summary":"Clone protocol, default namespace, and visibility defaults.","operationId":"getDeveloperPreferences","tags":["developer"],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/forge/developer/git-credentials":{"get":{"summary":"Git credential summaries (secrets never re-served).","operationId":"listGitCredentials","tags":["developer"],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"summary":"Mint a scoped Git credential for a repository.","operationId":"createGitCredential","tags":["developer"],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/forge/developer/api-tokens":{"get":{"summary":"API token summaries plus the canonical availableScopes vocabulary.","operationId":"listApiTokens","tags":["developer"],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"summary":"Mint an API token with least-privilege scopes.","operationId":"createApiToken","tags":["developer"],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/forge/developer/ssh-keys":{"get":{"summary":"Account SSH key summaries.","operationId":"listSshKeys","tags":["developer"],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"summary":"Register an account SSH public key.","operationId":"addSshKey","tags":["developer"],"security":[{"sessionCookie":[]}],"responses":{"200":{"description":"Success. Body is always the `{ data }` envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataEnvelope"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden for this viewer or origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such resource, or not visible to this viewer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}},"components":{"securitySchemes":{"sessionCookie":{"type":"apiKey","in":"cookie","name":"Coline session cookie","description":"Browser session issued via the Coline SSO handoff. Mutations also require a same-origin request (CSRF check)."},"apiToken":{"type":"http","scheme":"bearer","description":"Workspace API token (Authorization: Bearer <token>) for endpoints that explicitly declare a scope. The developer browser API uses a session cookie and does not accept this token as a replacement."}},"schemas":{"DataEnvelope":{"type":"object","description":"Success envelope for every API response.","properties":{"data":{"description":"Response payload (shape varies by operation)."}},"required":["data"]},"ErrorEnvelope":{"type":"object","description":"Structured error envelope. Agents should surface `hint` and follow `docs`.","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. not_found."},"message":{"type":"string","description":"Human-readable summary."},"hint":{"type":"string","description":"Resolution hint for the caller."},"docs":{"type":"string","description":"Docs or spec path for this failure."}},"required":["code","message"]}},"required":["error"]}}},"x-api-scopes":[{"name":"workspace.read","description":"Read workspace profile, repositories, and membership-visible metadata."},{"name":"taskboards.read","description":"Read task boards and their cards."},{"name":"taskboards.write","description":"Create and modify task boards and their cards."},{"name":"files.read","description":"Read file contents and metadata."},{"name":"files.write","description":"Create, modify, and delete files."},{"name":"notifications.write","description":"Publish notifications into the workspace."},{"name":"upstream.checks.write","description":"Report CI/agent checks against Change Request versions."},{"name":"admin.read","description":"Read administrative and audit-visible metadata."}],"x-protected-resource-metadata":"/.well-known/oauth-protected-resource","x-error-envelope":"All failures return { error: { code, message, hint?, docs? } } with an HTTP status. Agents must not parse HTML error pages; unknown /api/* paths return this JSON envelope with 404.","x-scope-names":["workspace.read","taskboards.read","taskboards.write","files.read","files.write","notifications.write","upstream.checks.write","admin.read"]}