/** * Build identity — 0.2.0 dogfood issue 4. * * Exports the host-neutral build-info API: `packageVersion`, `gitCommit`, and * the current run-state `schemaVersion`. Package version is sourced from * package metadata (read at runtime — never runs git). The git commit is * stamped at BUILD time into a generated `build-info.json` shipped under * `dist/`; in a source/dev checkout (no build) it falls back to the * `PI_TASKFLOW_BUILD_COMMIT` env var, then to the deterministic string * `"unknown"`. **`git` is never invoked at runtime** (no `git rev-parse`, no * `.git` read) — the stamp is purely a build-time artifact. * * The build stamp lives under `dist/` (gitignored) so a normal build never * dirties the source tree. See `scripts/stamp-build-info.mjs`. */ /** The current run-state schema version. Bumped when the persisted `RunState` * shape changes in a way a loader should be aware of. Optional metadata * fields (packageVersion/gitCommit/host/parentRunId) were added in this * version; absent fields on old runs are tolerated (backward compatible). */ export declare const CURRENT_RUN_STATE_SCHEMA_VERSION = 1; /** The deterministic fallback when no build stamp is available (source/dev * checkout, or a build that could not determine the commit). */ export declare const UNKNOWN_BUILD_COMMIT = "unknown"; export interface BuildInfo { /** Package version, sourced from the nearest package.json (runtime read). */ packageVersion: string; /** Git commit the published dist was built from, stamped at build time. * `"unknown"` in a source/dev checkout (no `git` is ever run at runtime). */ gitCommit: string; /** The current run-state schema version (see CURRENT_RUN_STATE_SCHEMA_VERSION). */ schemaVersion: number; /** When the build stamp was generated (ms epoch), if known. */ buildTime?: number; } /** Resolve the package version from the nearest package.json. Tries the * taskflow-core package.json first, then walks up. Never throws — returns * `"0.0.0"` if no version can be read. */ export declare function packageVersion(): string; /** Resolve the git commit the dist was built from. NEVER runs `git` at runtime. * Precedence: build stamp (dist/build-info.json) → PI_TASKFLOW_BUILD_COMMIT * env → "unknown". */ export declare function gitCommit(): string; /** The build timestamp (ms epoch) the dist was stamped at, if known. */ export declare function buildTime(): number | undefined; /** The full build-info record. Host adapters stamp RunState + report this to * `action=version` / `taskflow_version`. */ export declare function getBuildInfo(): BuildInfo; //# sourceMappingURL=build-info.d.ts.map