/** * Trusted Effects (0.3 MVP) — pure type contract. * * EffectIR is the closed vocabulary of side effects a FlowIR node may declare. * PathRef is reused from resources/*; SecretRef/ServiceRef are typed handles * that fail closed until a real backend is bound (MVP: type + validation only). * * @see docs/internal/0.3.0-trusted-effects-mvp.md */ import type { PathRef } from "../resources/schema.ts"; /** Confidentiality lattice (low → high). Higher may not flow to lower sinks. */ export declare const CONFIDENTIALITY_LABELS: readonly ["public", "internal", "secret"]; export type ConfidentialityLabel = (typeof CONFIDENTIALITY_LABELS)[number]; /** Integrity lattice (low → high). Lower integrity must not overwrite higher. */ export declare const INTEGRITY_LABELS: readonly ["untrusted", "project", "verified"]; export type IntegrityLabel = (typeof INTEGRITY_LABELS)[number]; export declare const CONFIDENTIALITY_RANK: Record; export declare const INTEGRITY_RANK: Record; /** * Opaque secret handle — never carries secret material. * MVP: validation only; no vault backend. */ export interface SecretRef { secretId: string; issuer?: string; } /** * External service endpoint handle — no ambient network authority from strings. * MVP: validation only; no live adapter. */ export interface ServiceRef { serviceId: string; /** Optional logical operation name (e.g. "createIssue"). */ operation?: string; } export type EffectTarget = { kind: "path"; path: PathRef; } | { kind: "secret"; secret: SecretRef; } | { kind: "service"; service: ServiceRef; }; export declare const EFFECT_KINDS: readonly ["fs.read", "fs.write", "fs.delete", "secret.read", "service.call"]; export type EffectKind = (typeof EFFECT_KINDS)[number]; /** * One declared side effect on a FlowIR / phase node. * `id` is stable within the flow for why-effect attribution. */ export interface EffectDecl { id: string; kind: EffectKind; target: EffectTarget; confidentiality?: ConfidentialityLabel; integrity?: IntegrityLabel; /** Free-text purpose for why-* explainers (not authority). */ purpose?: string; } /** EffectIR: bag of effects attached to a node or whole flow. */ export interface EffectIR { effects: EffectDecl[]; } export interface WhyAuthorized { effectId: string; allowed: boolean; principalId?: string; capabilityBindingIds: string[]; reasons: string[]; } export interface WhyContext { effectId: string; runId: string; phaseId?: string; confidentiality: ConfidentialityLabel; integrity: IntegrityLabel; workspaceRoot?: string; reasons: string[]; } export interface WhyEffect { effectId: string; kind: EffectKind; targetSummary: string; purpose?: string; intentId?: string; journalStatus?: string; status: "declared" | "staged" | "committed" | "rejected" | "unknown" | "skipped"; reasons: string[]; authorized: WhyAuthorized; context: WhyContext; } //# sourceMappingURL=types.d.ts.map