/** * Library — auto-derived structural metadata. * * Computed at save time (zero tokens, deterministic) and re-derived live at * search time (RFC §5.2.2 staleness). No embedding logic here — that's Phase 2. * * Refs: docs/rfc-library-reuse.md §3.2 (phaseSignature), §3.3 (generality). */ import type { Taskflow } from "../schema.ts"; import type { FlowMeta } from "./types.ts"; /** Topological phase-type signature, e.g. "agent→map→gate→reduce". * Parallel same-layer phases joined with "+". Uses topoLayers() for * deterministic ordering. */ export declare function computePhaseSignature(def: Taskflow): string; export declare function countPhases(def: Taskflow): number; /** Distinct agent names referenced across phases (sorted, stable). */ export declare function extractAgentUsage(def: Taskflow): string[]; /** generality ∈ [0,1]. RFC §3.3 (v2 formula, A8 fix): * uses literalTokenRatio = literalChars/(literalChars+placeholderChars) * so verbose-but-parameterized flows aren't structurally penalized. */ export declare function computeGenerality(def: Taskflow): number; /** Build a fresh FlowMeta from a def + optional agent-provided fields. * Used at save time. reuseCount starts at 0; version starts at 1. */ export declare function deriveMeta(def: Taskflow, opts: { purpose?: string; tags?: string[]; notes?: string; derivedFrom?: string; prevMeta?: FlowMeta; }): FlowMeta; //# sourceMappingURL=meta.d.ts.map