import { type RepositoryKnowledgeRetentionReference } from './repositoryKnowledge.js'; import { type RepositorySourceAuthorization } from './repositorySourceAuthorization.js'; export declare const REPOSITORY_SKILL_ROOTS: readonly [".agents/skills", ".claude/skills", ".codex/skills", "skills"]; declare const DEFAULT_LIMITS: { maximumEntries: number; maximumFiles: number; maximumFileBytes: number; maximumTotalBytes: number; maximumDepth: number; maximumDependencies: number; maximumScannedSourceEntries: number; }; export type RepositoryPackageLimits = typeof DEFAULT_LIMITS; export interface RepositoryPackageObservation { skillPath: string; skillHash: string; sourcePath: string; sourceHash: string; } export interface RepositoryPackageFile { path: string; managedPath?: string; sha256: string; sizeBytes: number; role: 'skill' | 'dependency' | 'approved_output' | 'repository_content' | 'knowledge'; } export interface RepositoryPackageManifest { schema: 'dharma.repository-package/v1' | 'dharma.repository-package/v2' | 'dharma.repository-package/v3'; sourceAuthorization?: RepositorySourceAuthorization; sourceFingerprint?: string; organizationId: string; workspaceId: string; snapshotId: string; snapshotHash: string; authority: 'local_inventory_not_signed'; roots: string[]; files: RepositoryPackageFile[]; skills: Array<{ path: string; managedPath?: string; providerRoot: string; entryPath: string; contentHash: string; availability: 'available' | 'partial' | 'unavailable'; filePaths: string[]; observation: { state: 'not_observed' | 'reported_observed'; authority: 'caller_supplied_not_runtime_verified'; references: RepositoryPackageObservation[]; }; }>; exclusions: Array<{ path: string; reason: string; }>; knowledge?: { repositoryAgentId: string; knowledgeBaseId: string; catalogPath: string; catalogHash: string; authority: 'locally_initialized_unsigned'; atlasAssociation: 'local_scope_only'; } | { repositoryAgentId: string; knowledgeBaseId: string; catalogPath: string; catalogHash: string; authority: 'unverified_prior_release_reference'; atlasAssociation: 'requires_verified_release'; priorRelease: RepositoryKnowledgeRetentionReference; }; } export interface RepositoryPackageSnapshot { schema: 'dharma.repository-package-snapshot/v1'; capturedAt: string; manifest: RepositoryPackageManifest; blobs: Array<{ sha256: string; contentBase64: string; }>; } export interface RepositoryPackageInventoryInput { workspace: string; organizationId: string; workspaceId: string; repositoryAgentId?: string | null; repositoryBindingId?: string | null; sourceAuthorization?: unknown; approvedOutputs?: string[]; observations?: RepositoryPackageObservation[]; limits?: Partial; now?: Date; retainedKnowledge?: { catalogBytes: Buffer; manifestBytes: Buffer; } | null; } export declare function inventoryRepositoryPackage(input: RepositoryPackageInventoryInput): Promise; export declare function rebuildRepositoryPackageSnapshot(input: RepositoryPackageSnapshot, source: { files: RepositoryPackageFile[]; skills: RepositoryPackageManifest['skills']; blobs: RepositoryPackageSnapshot['blobs']; }): RepositoryPackageSnapshot; export declare function serializeRepositoryPackageSnapshot(snapshot: RepositoryPackageSnapshot): string; export type RepositoryPackageCopyCheckpoint = 'journal_prepared' | 'file_backed_up' | 'file_installed' | 'copies_index_written' | 'manifest_written' | 'cleanup_file_removed'; export interface RepositoryPackageWriteInput { workspace: string; snapshot: RepositoryPackageSnapshot; candidateOnly?: boolean; onCopyCheckpoint?: (point: RepositoryPackageCopyCheckpoint) => void | Promise; } export declare function writeRepositoryPackageSnapshot(input: RepositoryPackageWriteInput): Promise<{ manifestPath: string; snapshotPath: string; snapshotHash: string; managedCopiesPath: string | null; disposition: "candidate_only" | "local_bootstrap_inventory"; authority: "local_inventory_not_signed"; }>; export declare function readRepositoryPackageSnapshot(workspace: string, hash: string): Promise; export declare function readRepositorySourceBaselineSnapshot(workspace: string, publishedHash: string): Promise; export {}; //# sourceMappingURL=repositoryPackage.d.ts.map