import type { ToolSpec } from "../core/types.js"; export interface GiteaIssueToolOptions { /** Gitea base URL, e.g. `https://gitea.example.com` (a trailing slash is fine). */ baseUrl: string; /** Repo owner — org or user, e.g. `AI-Only`. */ owner: string; /** Repo name, e.g. `sema-core`. */ repo: string; /** * Personal access token with issue-write scope. **Pass it from an environment variable — never * hardcode or commit it.** Sent only in the `Authorization` header, never in the issue body or * any returned/logged text. */ token: string; /** * Label **IDs** applied to every issue this tool opens (Gitea's create-issue API takes numeric * label IDs, not names). Use this to tag all AI-filed issues, e.g. with an "ai" label. */ defaultLabels?: number[]; /** Let the model pass additional label IDs per issue (merged with `defaultLabels`). Default false. */ allowModelLabels?: boolean; /** Tool name exposed to the model. Default `open_gitea_issue`. */ name?: string; /** Description override. */ description?: string; /** Custom fetch (tests / proxies). Defaults to global `fetch`. */ fetchImpl?: typeof fetch; } /** * A tool that lets the agent **open a Gitea issue** — restoring the "AI files a bug/request to the * maintainer" capability. Non-idempotent (`effect: "write"`): each call creates a new issue, so an * interrupted call is never auto-repeated (no duplicate issues on wake/resume). * * Inject one per task/scenario with a deployment-scoped repo + token (read the token from env). The * model only chooses a title and body; the repo, auth, and any default labels are fixed by config and * never exposed to the model. */ export declare function createGiteaIssueTool(opts: GiteaIssueToolOptions): ToolSpec; //# sourceMappingURL=gitea-issue.d.ts.map