@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/dist/adapters/index.d.ts +15 -3
- package/dist/adapters/index.js +21 -1
- package/dist/adapters/index.js.map +1 -1
- package/dist/agent-runtime-Cd6pB640.d.ts +53 -0
- package/dist/{blueprints-BWcCJfnN.d.ts → blueprints-Dmdaw6_I.d.ts} +4 -2
- package/dist/cli/index.js +1537 -440
- package/dist/cli/index.js.map +1 -1
- package/dist/{index-Dp1o8c9g.d.ts → index-BD5_a3Q8.d.ts} +2 -2
- package/dist/index.d.ts +10 -10
- package/dist/index.js +13671 -13368
- package/dist/index.js.map +1 -1
- package/dist/presets/index.d.ts +5 -5
- package/dist/presets/index.js +22272 -22485
- package/dist/presets/index.js.map +1 -1
- package/dist/{profiles-BcyL-gQ9.d.ts → profiles-BA9dvyaF.d.ts} +6 -3
- package/dist/rag-D-Zo1oyo.d.ts +112 -0
- package/dist/runtime/index.d.ts +7 -7
- package/dist/runtime/index.js +6510 -23316
- package/dist/runtime/index.js.map +1 -1
- package/dist/{extension-manifests-DcvOnrp3.d.ts → runtime-tool-executor-L5i8QWzn.d.ts} +64 -3
- package/dist/tools/index.d.ts +4 -4
- package/dist/tools/index.js +36 -5
- package/dist/tools/index.js.map +1 -1
- package/dist/{agent-runtime-DeLcB0Ie.d.ts → workflow-engine-DleSoUhy.d.ts} +549 -202
- package/package.json +1 -1
- package/dist/rag-BakFRE-u.d.ts +0 -31
- package/dist/registry-CEpl9Jq0.d.ts +0 -115
package/package.json
CHANGED
package/dist/rag-BakFRE-u.d.ts
DELETED
|
@@ -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 };
|