Skip to main content

Type Alias: PersistedSource

PersistedSource = { format: "compose"; implementation: ComposableToolSpec; } | { capabilities: CapabilityName[]; format: "raw-code"; implementation: SandboxedToolSpec; inferred: true; } | { capabilities: CapabilityName[]; format: "code-with-list"; implementation: SandboxedToolSpec; inferred: false; } | { capabilities: CapabilityName[]; format: "redacted"; } | { error: string; format: "unreadable"; }

Defined in: packages/agentos/src/cognition/emergent/persisted-source.ts:44

A stored tool's source as the loader reads it from implementation_source: a composition's step spec; a raw-code row (releases before 0.10.33 stored the code alone, so its capabilities are inferred from the text); a code-with-list row ({ mode, code, allowlist }, the list is the request); a redacted record (an API list without code, written with persistSandboxSource off, which cannot be rebuilt); or a row that does not read, with the reason.