UNPKG

agentic-qe

Version:

Agentic Quality Engineering Fleet System - AI-driven quality management platform

149 lines 4.44 kB
import { SwarmMemoryManager } from './memory/SwarmMemoryManager'; /** * ArtifactManifest - Small metadata stored in memory * Actual content is stored in files, referenced by ID */ export interface ArtifactManifest { id: string; kind: 'code' | 'doc' | 'data' | 'config'; path: string; sha256: string; tags: string[]; size: number; createdAt: number; previousVersion?: string; } /** * Artifact creation options */ export interface ArtifactCreateOptions { kind: 'code' | 'doc' | 'data' | 'config'; path: string; tags: string[]; } /** * Artifact version creation options */ export interface ArtifactVersionOptions { path?: string; tags: string[]; } /** * Artifact query result */ export interface ArtifactQueryResult { id: string; manifest: ArtifactManifest; } /** * Artifact retrieval result */ export interface ArtifactRetrievalResult { id: string; manifest: ArtifactManifest; content: string; } /** * ArtifactWorkflow - Artifact-Centric Design with Manifest Storage * * Implements Claude Flow's artifact-centric pattern: * - Large outputs (code, docs, data) stored as files * - Small manifests stored in memory (artifacts table) * - SHA256 integrity verification * - Tag-based organization * - Version history tracking * - Reference by ID, not content * * Based on AQE-IMPROVEMENT-PLAN.md Phase 1 */ export declare class ArtifactWorkflow { private memory; private artifactsDir; constructor(memory: SwarmMemoryManager, artifactsDir?: string); /** * Create a new artifact with content storage and manifest * * @param content - Artifact content (code, doc, data, config) * @param options - Artifact metadata (kind, path, tags) * @returns Artifact ID for reference */ createArtifact(content: string, options: ArtifactCreateOptions): Promise<string>; /** * Retrieve artifact by ID with integrity verification * * @param artifactId - Artifact ID to retrieve * @returns Artifact manifest and content */ retrieveArtifact(artifactId: string): Promise<ArtifactRetrievalResult>; /** * Query artifacts by tags (AND logic - all tags must match) * * @param tags - Tags to filter by * @returns Array of matching artifacts */ queryByTags(tags: string[]): Promise<ArtifactQueryResult[]>; /** * Query artifacts by kind * * @param kind - Artifact kind to filter by * @returns Array of matching artifacts */ queryByKind(kind: string): Promise<ArtifactQueryResult[]>; /** * Query artifacts by kind AND tags * * @param kind - Artifact kind * @param tags - Tags to filter by * @returns Array of matching artifacts */ queryByKindAndTags(kind: string, tags: string[]): Promise<ArtifactQueryResult[]>; /** * Create a new version of an existing artifact * * @param previousArtifactId - ID of the previous version * @param content - New content * @param options - Version options (path, tags) * @returns New artifact ID */ createArtifactVersion(previousArtifactId: string, content: string, options: ArtifactVersionOptions): Promise<string>; /** * Get version history for an artifact * * @param artifactId - Artifact ID * @returns Array of artifacts in version chain (newest first) */ getVersionHistory(artifactId: string): Promise<ArtifactRetrievalResult[]>; /** * Get the latest version of an artifact * * @param artifactId - Any artifact ID in the version chain * @returns Latest version */ getLatestVersion(artifactId: string): Promise<ArtifactRetrievalResult>; /** * List all artifacts * * @param options - Query options (limit) * @returns Array of all artifacts */ listArtifacts(options?: { limit?: number; }): Promise<ArtifactQueryResult[]>; /** * Delete an artifact and its file * * @param artifactId - Artifact ID to delete */ deleteArtifact(artifactId: string): Promise<void>; /** * Delete an artifact and all its versions * * @param artifactId - Artifact ID (any version in chain) */ deleteArtifactWithVersions(artifactId: string): Promise<void>; /** * Validate artifact kind */ private isValidKind; } //# sourceMappingURL=ArtifactWorkflow.d.ts.map