import { z } from "zod"; //#region src/lib/schemas.d.ts /** * ISO8601 timestamp with Z suffix (UTC). */ declare const Timestamp: z.ZodString; /** * Issue ID: prefix + 26 lowercase alphanumeric characters (ULID format). * Format: is-{ulid} where ulid is 26 chars (a-z, 0-9). * Example: is-01hx5zzkbkactav9wevgemmvrz */ declare const IssueId: z.ZodString; /** * Short ID: 1+ base36 characters used for external/display IDs. * Typically 4 chars for new IDs (e.g., a7k2, b3m9). * Imports may preserve longer numeric IDs (e.g., "100" from "tbd-100"). */ declare const ShortId: z.ZodString; /** * External Issue ID input: accepts {prefix}-{short} or just {short}. * Examples: bd-a7k2, a7k2, bd-100, 100 */ declare const ExternalIssueIdInput: z.ZodString; /** * Edit counter - incremented on every local change. * NOTE: Version is NOT used for conflict detection (Git push rejection is used). * Content hash is used as tiebreaker during merge resolution. * Version is informational only - set to max(local, remote) + 1 after merges. */ declare const Version: z.ZodNumber; /** * Entity type discriminator. */ declare const EntityType: z.ZodLiteral<"is">; /** * All entities share common fields. */ declare const BaseEntity: z.ZodObject<{ type: z.ZodLiteral<"is">; id: z.ZodString; version: z.ZodNumber; created_at: z.ZodString; updated_at: z.ZodString; extensions: z.ZodOptional>; }, "strip", z.ZodTypeAny, { type: "is"; id: string; version: number; created_at: string; updated_at: string; extensions?: Record | undefined; }, { type: "is"; id: string; version: number; created_at: string; updated_at: string; extensions?: Record | undefined; }>; /** * Issue status values matching Beads. */ declare const IssueStatus: z.ZodEnum<["open", "in_progress", "blocked", "deferred", "closed"]>; /** * Issue kind/type values matching Beads. * Note: CLI uses --type flag, which maps to this `kind` field. */ declare const IssueKind: z.ZodEnum<["bug", "feature", "task", "epic", "chore"]>; /** * Priority: 0 (highest/critical) to 4 (lowest). */ declare const Priority: z.ZodNumber; /** * Dependency types - only "blocks" supported initially. */ declare const DependencyRelationType: z.ZodEnum<["blocks"]>; /** * A dependency relationship. */ declare const Dependency: z.ZodObject<{ type: z.ZodEnum<["blocks"]>; target: z.ZodString; }, "strip", z.ZodTypeAny, { type: "blocks"; target: string; }, { type: "blocks"; target: string; }>; /** * Full issue schema. * * Note: Fields use .nullable() in addition to .optional() because * YAML parses `field: null` as JavaScript null, not undefined. */ declare const IssueSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodNumber; created_at: z.ZodString; updated_at: z.ZodString; extensions: z.ZodOptional>; } & { type: z.ZodLiteral<"is">; title: z.ZodString; description: z.ZodOptional>; notes: z.ZodOptional>; kind: z.ZodDefault>; status: z.ZodDefault>; priority: z.ZodDefault; assignee: z.ZodOptional>; labels: z.ZodDefault>; dependencies: z.ZodDefault; target: z.ZodString; }, "strip", z.ZodTypeAny, { type: "blocks"; target: string; }, { type: "blocks"; target: string; }>, "many">>; parent_id: z.ZodOptional>; due_date: z.ZodOptional>; deferred_until: z.ZodOptional>; created_by: z.ZodOptional>; closed_at: z.ZodOptional>; close_reason: z.ZodOptional>; spec_path: z.ZodOptional>; }, "strip", z.ZodTypeAny, { type: "is"; id: string; version: number; created_at: string; updated_at: string; status: "open" | "in_progress" | "blocked" | "deferred" | "closed"; title: string; kind: "bug" | "feature" | "task" | "epic" | "chore"; priority: number; labels: string[]; dependencies: { type: "blocks"; target: string; }[]; extensions?: Record | undefined; description?: string | null | undefined; notes?: string | null | undefined; assignee?: string | null | undefined; parent_id?: string | null | undefined; due_date?: string | null | undefined; deferred_until?: string | null | undefined; created_by?: string | null | undefined; closed_at?: string | null | undefined; close_reason?: string | null | undefined; spec_path?: string | null | undefined; }, { type: "is"; id: string; version: number; created_at: string; updated_at: string; title: string; status?: "open" | "in_progress" | "blocked" | "deferred" | "closed" | undefined; extensions?: Record | undefined; description?: string | null | undefined; notes?: string | null | undefined; kind?: "bug" | "feature" | "task" | "epic" | "chore" | undefined; priority?: number | undefined; assignee?: string | null | undefined; labels?: string[] | undefined; dependencies?: { type: "blocks"; target: string; }[] | undefined; parent_id?: string | null | undefined; due_date?: string | null | undefined; deferred_until?: string | null | undefined; created_by?: string | null | undefined; closed_at?: string | null | undefined; close_reason?: string | null | undefined; spec_path?: string | null | undefined; }>; /** * Git branch name - restricted to safe characters. * Allows: alphanumeric, hyphens, underscores, forward slashes, and dots. * Prevents shell injection in git commands. */ declare const GitBranchName: z.ZodString; /** * Git remote name - restricted to safe characters. * Allows: alphanumeric, hyphens, underscores, and dots. * Prevents shell injection in git commands. */ declare const GitRemoteName: z.ZodString; /** * Doc cache configuration - maps destination paths to source locations. * * Keys are destination paths relative to .tbd/docs/ (e.g., "shortcuts/standard/commit-code.md") * Values are source locations: * - internal: prefix for bundled docs (e.g., "internal:shortcuts/standard/commit-code.md") * - Full URL for external docs (e.g., "https://raw.githubusercontent.com/org/repo/main/file.md") * * Example: * ```yaml * doc_cache: * shortcuts/standard/commit-code.md: internal:shortcuts/standard/commit-code.md * shortcuts/custom/my-shortcut.md: https://raw.githubusercontent.com/org/repo/main/shortcuts/my-shortcut.md * ``` */ declare const DocCacheConfigSchema: z.ZodRecord; /** * Documentation cache configuration (consolidated structure). * * Combines file sync mappings and lookup paths into a single config block. * See: docs/project/specs/active/plan-2026-01-26-docs-cache-config-restructure.md */ declare const DocsCacheSchema: z.ZodObject<{ /** * Files to sync: maps destination paths to source locations. * Keys are destination paths relative to .tbd/docs/ * Values are source locations: * - internal: prefix for bundled docs (e.g., "internal:shortcuts/standard/commit-code.md") * - Full URL for external docs (e.g., "https://raw.githubusercontent.com/org/repo/main/file.md") */ files: z.ZodOptional>; /** * Search paths for doc lookup (like shell $PATH). * Earlier paths take precedence when names conflict. */ lookup_path: z.ZodDefault>; }, "strip", z.ZodTypeAny, { lookup_path: string[]; files?: Record | undefined; }, { files?: Record | undefined; lookup_path?: string[] | undefined; }>; /** * Project configuration stored in .tbd/config.yml * * ⚠️ FORMAT VERSIONING: See tbd-format.ts for version history and migration rules. * The tbd_format field tracks breaking changes to this schema. */ declare const ConfigSchema: z.ZodObject<{ /** * Format version for the .tbd/ directory structure. * See tbd-format.ts for version history and migration rules. * Only bumped for breaking changes that require migration. */ tbd_format: z.ZodDefault; tbd_version: z.ZodString; sync: z.ZodDefault; remote: z.ZodDefault; }, "strip", z.ZodTypeAny, { branch: string; remote: string; }, { branch?: string | undefined; remote?: string | undefined; }>>; display: z.ZodObject<{ id_prefix: z.ZodString; }, "strip", z.ZodTypeAny, { id_prefix: string; }, { id_prefix: string; }>; settings: z.ZodDefault; /** * How often to automatically sync documentation cache (in hours). * - Default: 24 (sync once per day when actively using tbd) * - Set to 0 to disable auto-sync * - Only triggers when accessing docs (shortcut, guidelines, template commands) */ doc_auto_sync_hours: z.ZodDefault; /** * Whether to install the ensure-gh-cli.sh hook script during setup. * When true (default), `tbd setup` installs a SessionStart hook that * ensures the GitHub CLI is available in agent sessions. * Set to false or use `tbd setup --no-gh-cli` to disable. */ use_gh_cli: z.ZodDefault; }, "strip", z.ZodTypeAny, { auto_sync: boolean; doc_auto_sync_hours: number; use_gh_cli: boolean; }, { auto_sync?: boolean | undefined; doc_auto_sync_hours?: number | undefined; use_gh_cli?: boolean | undefined; }>>; /** * Documentation cache configuration (consolidated). * Contains files to sync and lookup paths. * See DocsCacheSchema for structure details. */ docs_cache: z.ZodOptional>; /** * Search paths for doc lookup (like shell $PATH). * Earlier paths take precedence when names conflict. */ lookup_path: z.ZodDefault>; }, "strip", z.ZodTypeAny, { lookup_path: string[]; files?: Record | undefined; }, { files?: Record | undefined; lookup_path?: string[] | undefined; }>>; }, "strip", z.ZodTypeAny, { tbd_format: string; tbd_version: string; sync: { branch: string; remote: string; }; display: { id_prefix: string; }; settings: { auto_sync: boolean; doc_auto_sync_hours: number; use_gh_cli: boolean; }; docs_cache?: { lookup_path: string[]; files?: Record | undefined; } | undefined; }, { tbd_version: string; display: { id_prefix: string; }; tbd_format?: string | undefined; sync?: { branch?: string | undefined; remote?: string | undefined; } | undefined; settings?: { auto_sync?: boolean | undefined; doc_auto_sync_hours?: number | undefined; use_gh_cli?: boolean | undefined; } | undefined; docs_cache?: { files?: Record | undefined; lookup_path?: string[] | undefined; } | undefined; }>; /** * Shared metadata stored in .tbd/data-sync/meta.yml */ declare const MetaSchema: z.ZodObject<{ schema_version: z.ZodNumber; created_at: z.ZodString; }, "strip", z.ZodTypeAny, { created_at: string; schema_version: number; }, { created_at: string; schema_version: number; }>; /** * Per-node state stored in .tbd/state.yml (gitignored). * Tracks local timing information that shouldn't be shared across nodes. */ declare const LocalStateSchema: z.ZodObject<{ /** When this node last synced issues successfully */last_sync_at: z.ZodOptional; /** When this node last synced the doc cache successfully */ last_doc_sync_at: z.ZodOptional; /** Whether the user has seen the welcome message */ welcome_seen: z.ZodOptional; }, "strip", z.ZodTypeAny, { last_sync_at?: string | undefined; last_doc_sync_at?: string | undefined; welcome_seen?: boolean | undefined; }, { last_sync_at?: string | undefined; last_doc_sync_at?: string | undefined; welcome_seen?: boolean | undefined; }>; /** * Preserved conflict losers. */ declare const AtticEntrySchema: z.ZodObject<{ entity_id: z.ZodString; timestamp: z.ZodString; field: z.ZodString; lost_value: z.ZodString; winner_source: z.ZodEnum<["local", "remote"]>; loser_source: z.ZodEnum<["local", "remote"]>; context: z.ZodObject<{ local_version: z.ZodNumber; remote_version: z.ZodNumber; local_updated_at: z.ZodString; remote_updated_at: z.ZodString; }, "strip", z.ZodTypeAny, { local_version: number; remote_version: number; local_updated_at: string; remote_updated_at: string; }, { local_version: number; remote_version: number; local_updated_at: string; remote_updated_at: string; }>; }, "strip", z.ZodTypeAny, { entity_id: string; timestamp: string; field: string; lost_value: string; winner_source: "remote" | "local"; loser_source: "remote" | "local"; context: { local_version: number; remote_version: number; local_updated_at: string; remote_updated_at: string; }; }, { entity_id: string; timestamp: string; field: string; lost_value: string; winner_source: "remote" | "local"; loser_source: "remote" | "local"; context: { local_version: number; remote_version: number; local_updated_at: string; remote_updated_at: string; }; }>; //#endregion //#region src/lib/types.d.ts /** * A tbd issue entity. */ type Issue = z.infer; /** * Issue status enum values. */ type IssueStatusType = z.infer; /** * Issue kind enum values. */ type IssueKindType = z.infer; /** * Priority level (0-4). */ type PriorityType = z.infer; /** * A dependency relationship. */ type DependencyType = z.infer; /** * Project configuration. */ type Config = z.infer; /** * Shared metadata. */ type Meta = z.infer; /** * Per-node local state. */ type LocalState = z.infer; /** * Attic entry for conflict losers. */ type AtticEntry = z.infer; /** * Options for creating an issue. */ interface CreateIssueOptions { title: string; description?: string; kind?: IssueKindType; priority?: PriorityType; assignee?: string; labels?: string[]; parent_id?: string; due_date?: string; deferred_until?: string; } /** * Options for updating an issue. */ interface UpdateIssueOptions { title?: string; description?: string; notes?: string; kind?: IssueKindType; status?: IssueStatusType; priority?: PriorityType; assignee?: string | null; addLabels?: string[]; removeLabels?: string[]; parent_id?: string | null; due_date?: string | null; deferred_until?: string | null; } /** * Options for listing issues. */ interface ListIssuesOptions { status?: IssueStatusType | IssueStatusType[]; kind?: IssueKindType | IssueKindType[]; priority?: PriorityType; assignee?: string; labels?: string[]; parent?: string; all?: boolean; sort?: 'priority' | 'created' | 'updated'; limit?: number; } /** * Options for searching issues. */ interface SearchIssuesOptions { query: string; status?: IssueStatusType | IssueStatusType[]; limit?: number; } /** * A documentation section with title and slug. * Used by docs and design commands. */ interface DocSection { title: string; slug: string; } //#endregion //#region src/file/parser.d.ts /** * Parse an issue from Markdown file content. */ declare function parseIssue(content: string): Issue; /** * Serialize an issue to Markdown file content. * Uses canonical serialization for deterministic output. */ declare function serializeIssue(issue: Issue): string; //#endregion //#region src/index.d.ts /** * tbd: Git-native issue tracking for AI agents and humans * * This is the library entry point. All exports here should be node-free * to support browser/edge runtime usage. CLI-specific code is in ./cli/. */ /** * Package version, derived from git at build time. * Format: X.Y.Z for releases, X.Y.Z-dev.N.hash for dev builds. */ declare const VERSION: string; //#endregion export { AtticEntry, AtticEntrySchema, BaseEntity, Config, ConfigSchema, CreateIssueOptions, Dependency, DependencyRelationType, DependencyType, DocCacheConfigSchema, DocSection, DocsCacheSchema, EntityType, ExternalIssueIdInput, GitBranchName, GitRemoteName, Issue, IssueId, IssueKind, IssueKindType, IssueSchema, IssueStatus, IssueStatusType, ListIssuesOptions, LocalState, LocalStateSchema, Meta, MetaSchema, Priority, PriorityType, SearchIssuesOptions, ShortId, Timestamp, UpdateIssueOptions, VERSION, Version, parseIssue, serializeIssue }; //# sourceMappingURL=index.d.mts.map