/** * git-write — REQUIRED, provider-agnostic git skill, NOW create-PR-capable. * * This is an EXTENSION of `gitSkill` (git.js): it inherits the EXACT SAME * read tools (git_checkout / git_list_repos / git_explore), resolve() and * handleToolCall, and ADDS provider-agnostic mutation tools — * `git_open_pr` (opens a pull request / merge request off an already-pushed * branch) and `git_merge_pr` (merges/accepts an open PR/MR by number) — each * returning the REAL provider value (pr_url / merge sha). The ONLY * gate difference (vs `git`) is the backend's integration map: * * - `git` → OPTIONAL_INTEGRATION_MAP (deploy NOT blocked; the * meta-skill works anonymously on public repos). * - `git-write` → REQUIRED_INTEGRATION_MAP ({any:[github,gitlab]}) — at * least one provider MUST be connected before deploy. * * Repo-MUTATING agents (push a branch / open a PR / MR) declare * SKILLS.GIT_WRITE instead of SKILLS.GIT: you cannot write to a repo * anonymously, so deploying with neither GitHub nor GitLab connected would * leave the agent unable to push/PR. The required OR-group makes the deploy * modal render "GitHub OR GitLab" as a hard requirement. * * Why expose create-PR THROUGH git-write rather than declaring * SKILLS.GITHUB + SKILLS.GITLAB on the node? Those two skills each carry * `requiresIntegration`, so declaring BOTH would force BOTH providers * connected (an AND gate) — breaking the "GitHub OR GitLab" OR-group. By * folding the create-PR/MR capability into git-write (whose gate is the * {any:[github,gitlab]} OR-group) the agent gets a real create-PR tool with * NO change to the deploy gating. * * `git_open_pr` does NOT reimplement the provider API calls. It detects the * provider from the repoUrl and DELEGATES to the already-published, already- * tested `github_create_pr` (github.js) / `gitlab_create_mr` (gitlab.js) tools * — so the returned pr_url is the REAL html_url / web_url from the provider * response, never a value the model could fabricate, and all the expected- * business-error handling ({ success:false, skippedReason }) is inherited. * * Read-only clone/explore agents keep SKILLS.GIT (optional). * * We REUSE gitSkill's read-tool implementation (spread it) rather than * duplicate the clone/explore logic — they must never drift. handleToolCall * handles git_open_pr here and delegates everything else to gitSkill. */ /** * Detect the provider from a repo/clone URL. Returns { provider, owner, repo } * for github / gitlab, or null for an unrecognized host. Mirrors the * sentry-triage fix-node's parseRepo so the dispatch agrees with the * deterministic fallback path. */ export declare function detectProvider(url: any): { provider: string; owner: any; repo: any; }; export declare const gitWriteSkill: any;