/** * One workspace bound to one Jira project, for this user only. * * `path` is provenance for the human reading the file - JAM resolves by * `workspace` and never by path, so editing it repoints nothing. */ export type ProjectBinding = { workspace: string; key: string; path?: string; }; /** * Why reading distinguishes three states rather than returning a list: * discovery can shrug at a broken file, but a write must not. Rewriting the * whole file from an empty list that actually meant "could not parse" destroys * bindings that are still in there. */ export type BindingsInspection = { path: string; status: "absent" | "parsed" | "unreadable"; bindings: ProjectBinding[]; /** Set when status is "unreadable". */ reason?: string; }; /** * User-local, and deliberately separate from `~/.jam/config.yaml`: that file * answers which JAM build runs, this one answers which Jira project a * workspace belongs to, and neither should move when the other changes. */ export declare function projectBindingsPath(home?: string): string; /** Read-only. Never creates the directory, so `detect` stays free of writes. */ export declare function inspectProjectBindings(home?: string): BindingsInspection; /** * Discovery. A damaged file yields no bindings rather than turning every * command into an error - the same stance the preset file and the runtime * config already take. */ export declare function readProjectBindings(home?: string): ProjectBinding[]; export declare function findProjectBinding(workspaceId: string, home?: string): ProjectBinding | undefined; /** * Record one binding, preserving every other entry. * * Fail-closed on a file that exists but will not parse: refusing costs the * user one edit, while rewriting would silently drop bindings this build * could not read. Same reasoning as `.mcp.json`, which is never overwritten * when it does not parse. */ export declare function writeProjectBinding(binding: ProjectBinding, home?: string): string;