import type { PIArtifactSnapshot, CanActivateResult, ChannelWriter, WriterInput, WriterResult } from './activation-types.js'; /** * ⚠️ DISPLAY / RESOLUTION ONLY — never an identity source. * * This helper intentionally keeps its lenient multi-step fallback (column → * `content.principleId` → `content.sourcePrincipleId` → `principleDraft.title`) * because display and approval-grouping surfaces need to show *something* for * legacy artifacts that were activated before identities were stamped. * * It must NOT be used to mint or gate a principle identity: its last fallback * returns `principleDraft.title` — a natural-language string generated by the * philosopher — which is exactly how content came to masquerade as identity and * fragmented the principle identity space (Phase 3 design audit, * `docs/architecture/principle-identity-reconciliation.md`, finding F1). * * For anything that WRITES or GATES an activation use * {@link resolveActivationPrincipleId} instead (fail-closed). */ declare function extractPrincipleId(artifact: PIArtifactSnapshot): string | null; /** * I3 — ACTIVATION IDENTITY BOUNDARY (fail-closed). * * Phase 3 (Principle Identity Reconciliation, * `docs/architecture/principle-identity-reconciliation.md`): the ONLY identity * an activation may carry is the `pi_artifacts.source_principle_id` column value * when it is a ledger-shaped principle UUID. Everything else — `principleDraft` * titles, content-level ids, any text form — is refused (`null`), because a * content-derived identity is how `principle_applications` / `activations` * ended up keyed by philosopher titles instead of ledger UUIDs. * * Deliberately NOT here (and never re-add): * - contentJson fallbacks (`principleId` / `sourcePrincipleId` / draft title) * - text/fuzzy matching against ledger principles * * Ledger *membership* is validated by the ledger-backed call sites * (`PrincipleTreeLedgerAdapter.hasPrinciple` / `activatePrinciple` and * pd-console's `resolveLedgerPrincipleId`); this boundary guarantees the value * is at least UUID-shaped, so a title can never become a durable identity. * * The returned value is LOWERCASE-normalized: ledger keys are minted by * `randomUUID()` (always lowercase), so an uppercase UUID that passes the shape * check would otherwise miss `hasPrinciple` and be refused as * `principle_not_in_ledger` — a case-only mismatch masquerading as data drift. * * @returns the trimmed, lowercase UUID, or `null` when the value carries no * usable identity — callers must refuse with * `no_principle_id_in_artifact`. */ export declare function canonicalLedgerPrincipleId(value: unknown): string | null; export declare function resolveActivationPrincipleId(artifact: PIArtifactSnapshot): string | null; export declare class PromptWriter implements ChannelWriter { readonly channel: 'prompt'; canActivate(artifact: PIArtifactSnapshot): Promise; activate(input: WriterInput, _artifact: PIArtifactSnapshot): Promise; } export declare class DeferArchiveWriter implements ChannelWriter { readonly channel: 'defer_archive'; canActivate(artifact: PIArtifactSnapshot): Promise; activate(input: WriterInput, _artifact: PIArtifactSnapshot): Promise; } export { extractPrincipleId }; //# sourceMappingURL=low-risk-writers.d.ts.map