@corbat-tech/coco 2.38.0 → 2.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corbat-tech/coco",
3
- "version": "2.38.0",
3
+ "version": "2.40.0",
4
4
  "description": "Autonomous Coding Agent with Self-Review, Quality Convergence, and Production-Ready Output",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,31 +0,0 @@
1
- interface RetrievedSource {
2
- id: string;
3
- title: string;
4
- content: string;
5
- url?: string;
6
- score: number;
7
- metadata?: Record<string, unknown>;
8
- }
9
- interface RetrievalOptions {
10
- limit?: number;
11
- minScore?: number;
12
- }
13
- interface KnowledgeRetriever {
14
- search(query: string, options?: RetrievalOptions): Promise<RetrievedSource[]>;
15
- }
16
- interface InMemoryKnowledgeDocument {
17
- id: string;
18
- title: string;
19
- content: string;
20
- url?: string;
21
- metadata?: Record<string, unknown>;
22
- }
23
- declare class InMemoryKnowledgeRetriever implements KnowledgeRetriever {
24
- private readonly documents;
25
- constructor(documents: InMemoryKnowledgeDocument[]);
26
- search(query: string, options?: RetrievalOptions): Promise<RetrievedSource[]>;
27
- }
28
- declare function createInMemoryKnowledgeRetriever(documents: InMemoryKnowledgeDocument[]): KnowledgeRetriever;
29
- declare function formatRetrievedSourcesForPrompt(sources: RetrievedSource[]): string;
30
-
31
- export { type InMemoryKnowledgeDocument as I, type KnowledgeRetriever as K, type RetrievalOptions as R, InMemoryKnowledgeRetriever as a, type RetrievedSource as b, createInMemoryKnowledgeRetriever as c, formatRetrievedSourcesForPrompt as f };
@@ -1,115 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- /**
4
- * Tool Registry for Corbat-Coco
5
- * Central management of all available tools
6
- */
7
-
8
- /**
9
- * Tool definition
10
- */
11
- interface ToolDefinition<TInput = unknown, TOutput = unknown> {
12
- name: string;
13
- description: string;
14
- category: ToolCategory;
15
- parameters: z.ZodType<TInput, any, any>;
16
- execute: (params: TInput) => Promise<TOutput>;
17
- }
18
- /**
19
- * Tool categories
20
- */
21
- type ToolCategory = "file" | "bash" | "git" | "test" | "quality" | "build" | "deploy" | "config" | "web" | "search" | "memory" | "document";
22
- /**
23
- * Tool execution result
24
- */
25
- interface ToolResult<T = unknown> {
26
- success: boolean;
27
- data?: T;
28
- error?: string;
29
- duration: number;
30
- }
31
- /**
32
- * Progress callback for long-running operations
33
- */
34
- type ProgressCallback = (progress: ProgressInfo) => void;
35
- /**
36
- * Progress information
37
- */
38
- interface ProgressInfo {
39
- /** Current step or phase name */
40
- phase: string;
41
- /** Progress percentage (0-100), null if indeterminate */
42
- percent: number | null;
43
- /** Human-readable message */
44
- message?: string;
45
- /** Estimated time remaining in ms, null if unknown */
46
- estimatedTimeRemaining?: number | null;
47
- /** Additional metadata */
48
- metadata?: Record<string, unknown>;
49
- }
50
- /**
51
- * Options for tool execution
52
- */
53
- interface ExecuteOptions {
54
- /** Progress callback for long operations */
55
- onProgress?: ProgressCallback;
56
- /** Abort signal for cancellation */
57
- signal?: AbortSignal;
58
- }
59
- /**
60
- * Tool registry
61
- */
62
- declare class ToolRegistry {
63
- private tools;
64
- private logger;
65
- /**
66
- * Register a tool
67
- */
68
- register<TInput, TOutput>(tool: ToolDefinition<TInput, TOutput>): void;
69
- /**
70
- * Unregister a tool
71
- */
72
- unregister(name: string): boolean;
73
- /**
74
- * Get a tool by name
75
- */
76
- get<TInput = unknown, TOutput = unknown>(name: string): ToolDefinition<TInput, TOutput> | undefined;
77
- /**
78
- * Check if a tool exists
79
- */
80
- has(name: string): boolean;
81
- /**
82
- * Get all tools
83
- */
84
- getAll(): ToolDefinition[];
85
- /**
86
- * Get tools by category
87
- */
88
- getByCategory(category: ToolCategory): ToolDefinition[];
89
- /**
90
- * Execute a tool
91
- */
92
- execute<TInput, TOutput>(name: string, params: TInput, options?: ExecuteOptions): Promise<ToolResult<TOutput>>;
93
- /**
94
- * Get tool definitions for LLM (simplified format)
95
- */
96
- getToolDefinitionsForLLM(): Array<{
97
- name: string;
98
- description: string;
99
- input_schema: Record<string, unknown>;
100
- }>;
101
- }
102
- /**
103
- * Get the global tool registry
104
- */
105
- declare function getToolRegistry(): ToolRegistry;
106
- /**
107
- * Create a new tool registry
108
- */
109
- declare function createToolRegistry(): ToolRegistry;
110
- /**
111
- * Helper to create a tool definition with type safety
112
- */
113
- declare function defineTool<TInput, TOutput>(definition: ToolDefinition<TInput, TOutput>): ToolDefinition<TInput, TOutput>;
114
-
115
- export { ToolRegistry as T, type ToolDefinition as a, type ToolCategory as b, createToolRegistry as c, type ToolResult as d, defineTool as e, getToolRegistry as g };