UNPKG

framework

Version:

The (AI) Framework: turnkey, zero-config AI orchestration that wraps a coding-agent CLI (Claude Code) as a black box and takes you from an idea to a running app. Vite for AI.

112 lines 5.58 kB
/** * One ticket in `tickets/` (#697). The dashboard lists these so the backlog the agent plans * from is visible without opening the repo. */ export interface WorkspaceTicket { /** Filename inside `tickets/`, which is also its identity. */ file: string; /** The `# ` heading, else the filename made readable. */ title: string; /** The `## TLDR` line, else the first prose line. Empty when the ticket has neither. */ summary: string; /** The optional `priority:` key, verbatim (a `0`-`10` string; `10` acts immediately). */ priority?: string; /** The optional `topics:` key (`topics: [dx, ui]`), as bare tags. */ topics?: string[]; /** The optional `GitHub:` key (`GitHub: [#42](https://github.com/org/repo/issues/42)`), split * into the link text and the URL it points at. */ github?: TicketGithubLink; /** * ISO 8601 (#1144/#1265). The `<DATE>_<SLUG>.md` filename's date when it has one — the format * every ticket is written in, imports included — else the file's mtime, for the rare ticket that * predates the format. Moves forward on an mtime-dated ticket edited in place (the GitHub update, * #1208); a filename-dated one keeps the date it was created on, same as the file itself does. */ date: string; /** Whether a `<name>.plan.md` sits beside it, i.e. #685 already planned it. */ planned: boolean; /** * Whether an agent holds this ticket (#1420): a `<name>.lock.md` claim exists — it is planning * the ticket or implementing it directly. Mutually informative with `planned` rather than * exclusive: the lock covers the ticket's whole life, so a locked ticket may also be planned * while its agent keeps working. */ locked?: boolean; /** * Who the `.lock.md` names, from its `CLAIMED: <holder>` line (#1420) — shown so a human can * tell whose claim they are about to release. Absent when the lock is missing or unreadable. */ lockedBy?: string; /** * The `Effort:` its `.plan.md` preamble records (`ticketing_format.md`: `0`-`10`, 0 trivial, * 10 takes months). Absent when unplanned or the plan names none. */ effort?: number; /** * The `Uncertainty:` its `.plan.md` preamble records (`0`-`10`, 0 an obvious implementation, * 10 highly uncertain how). Absent when unplanned or the plan names none. */ uncertainty?: number; } /** A ticket's `GitHub:` link, split into what a reader clicks and where it goes. */ export interface TicketGithubLink { /** As written, e.g. `#42` — not re-derived, in case the source ever names a PR differently. */ label: string; /** The issue/PR URL the label links to. */ url: string; } /** * What `tickets/meta.json` records about the last import (#1208). * * Written by the agent doing the import, in the same commit as the tickets it describes, and read * here so the view can say when `tickets/` last caught up with GitHub. A repo imported before this * file existed simply has no stamp, which reads as "not known" rather than as an error. */ export interface TicketsMeta { /** ISO 8601 UTC, the moment the last import began. Absent when nothing has recorded one. */ lastImportedAt?: string; } /** * Whether the project has any ticket at all (#958). * * A `readdir` rather than a {@link readTickets} parse: the Onboarding checklist only needs * presence, and it asks for every project on each dashboard poll, so reading and describing * every ticket to answer a yes/no would be paid over and over. */ export declare function hasTickets(cwd: string): Promise<boolean>; /** * The last-import stamp, or `{}` when there is none to read (#1208). * * Every failure lands on the same answer — no file, unreadable, not JSON, a `lastImportedAt` that * is not a usable date — because the file is written by an agent and read into the UI. "We do not * know when this last synced" is a true and harmless thing to say; throwing at the view over a * malformed optional file is not. */ export declare function readTicketsMeta(cwd: string): Promise<TicketsMeta>; /** * The project's tickets, by filename, newest first (#1144). `[]` when the repo has no `tickets/` * directory at all, which is the state the view offers to import into. * * A `.plan.md` or `.lock.md` is written *about* a ticket rather than being one, so it never * becomes a row of its own: it marks its ticket instead. */ export declare function readTickets(cwd: string): Promise<WorkspaceTicket[]>; /** One ticket, with its entire markdown rather than just the head (#1144's detail page). */ export interface WorkspaceTicketDetail extends WorkspaceTicket { /** The ticket's full text, unlike {@link readTickets}' head-only read. */ content: string; } /** * A bare filename inside `tickets/`: no path segments (so it cannot address another directory) * and not one of a ticket's own siblings (a `.plan.md`/`.lock.md` is written about a ticket, not * one itself, same as {@link readTickets}). Exported for the RPCs that take a ticket filename * from the browser (#1420's release). */ export declare function isTicketFile(file: string): boolean; /** * One ticket by filename, full text included, for its own page (#1144) rather than the list's * head-only row. Null when `file` is not a bare `.md` name, is a sibling rather than a ticket, * or does not exist. */ export declare function readTicket(cwd: string, file: string): Promise<WorkspaceTicketDetail | null>; //# sourceMappingURL=tickets.d.ts.map