import type { Tool } from "@github/copilot-sdk"; import type { EnhancedFactStore, FactStore } from "./facts-store.js"; import type { ArtifactStore } from "./session-store.js"; export declare const TOOL_PRIVATE_FACT_PREFIX = "tools/"; export declare function normalizeToolOnlyPrefixes(extra?: readonly string[] | null): string[]; /** True when `key` is under a tool-only prefix — stripped from every agent-facing read. */ export declare function isToolOnlyFactKey(key: string, toolOnly?: readonly string[]): boolean; export declare function createFactTools(opts: { factStore: FactStore; getDescendantSessionIds?: (sessionId: string) => Promise; getLineageSessionIds?: (sessionId: string) => Promise; agentIdentity?: string; /** Internal: app-assigned crawler role, derived from bound agent metadata. */ isCrawler?: boolean; /** @deprecated Use `isCrawler`; accepted as a compatibility alias. */ isHarvester?: boolean; /** * Optional fire-and-forget hook invoked from inside tool handlers when * a `read_facts` call touches the `skills/` knowledge namespace. Used * by SessionManager to record `learned_skill.read` CMS events for * skill-usage stats. Errors are swallowed; tool behavior is unaffected. */ recordEvent?: (sessionId: string, eventType: string, data: unknown) => Promise; /** Optional hook invoked after a successful shared intake/* write. */ onSharedIntakeFactStored?: (input: { key: string; sourceSessionId: string | null; agentId: string | null; }) => Promise; /** * Artifact store for bulk_store_facts (artifact-sourced ingestion and the * failure artifact). Absent ⇒ the tool still registers, but only inline * `facts` work and `to_file` is refused with a clear message. */ artifactStore?: ArtifactStore | null; /** * When the store is an EnhancedFactStore (search capability), the search * tools (`facts_search`, `facts_similar`) and the skills-scoped * `search_skills` pull tool are appended (enhancedfactstore 07 P4/§1.6). * `search_skills` is omitted for the facts-manager (it owns the namespace). */ enhancedFactStore?: EnhancedFactStore; /** * Host-reserved key prefixes, kept from every agent like `tools/` is * (worker option `reservedFactPrefixes`). Reachable only through the * invocation-context facts accessor. */ reservedFactPrefixes?: readonly string[] | null; }): Tool[]; //# sourceMappingURL=facts-tools.d.ts.map