/** * Plane tracker adapter — projects Plane onto the neutral TrackerAdapter * contract. Promoted from strategy/plane-app-draft/plane-adapter.draft.js. * ============================================================================ * * Mirrors the proven shape of linear.js: ONE auth chokepoint (planeFetch, with * X-API-Key), the 6 neutral methods, and a NeutralTicket with `state` (raw * name), `stateCategory` (normalized bucket) and `_raw`. * * Plane specifics that drove the design (verified — see RESEARCH.md): * - Auth: personal access token in header `X-API-Key: `. Self-hosted ⇒ * base URL is the TENANT's host (https:///api/v1), NOT api.plane.so. * Both come from env (same posture as linear.js). * - Scoping: every issue is workspace_slug → project_id → id. No global list, * so the adapter is bound to a (workspace, project) via env or per-call ctx. * - States carry a `group` ∈ {backlog, unstarted, started, completed, * cancelled} — the normalization key. NO transition object: you PATCH the * work-item `state` to a target state uuid (like Linear, unlike Jira). * - List endpoints are cursor-paginated: * { results, next_cursor, prev_cursor, count, total_results, ... } * per_page default & max 100; cursor format "value:offset:is_prev". * - Comments are HTML (comment_html), NOT markdown. We wrap plaintext. * * HONEST TODOs (inline) are Plane-version-specific details not fully confirmable * from the public docs without a live instance — kept from the research draft. */ /** * Low-level Plane REST helper — the SINGLE auth chokepoint (cf. linearFetch). * Keep token + base-url resolution here; never re-implement at call sites. * Exported so a pipeline can issue raw calls the 6 methods don't cover. * * @param {string} path path AFTER /api/v1, e.g. * `/workspaces/acme/projects//work-items/` * @param {{method?:string, body?:any, query?:object, headers?:object}} [opts] * @returns {Promise} parsed JSON (or {} for empty body) */ export declare function planeFetch(path: any, opts?: any): Promise; /** * Normalize a Plane state into the neutral 5-bucket category. * @param {{name?:string, group?:string}} [state] * @returns {'todo'|'in_progress'|'done'|'blocked'|'unknown'} */ export declare function toStateCategory(state: any): any; export declare const planeAdapter: any; export default planeAdapter;