@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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { a5 as RuntimeRequestContext, ap as ToolRegistry } from './workflow-engine-DleSoUhy.js';
|
|
2
|
+
import { i as RetrievedSource, K as KnowledgeRetriever } from './rag-D-Zo1oyo.js';
|
|
3
3
|
|
|
4
4
|
interface SupportDraftInput {
|
|
5
5
|
conversationId: string;
|
|
@@ -55,6 +55,7 @@ type SalesLeadSummaryHandler = (input: SalesLeadSummaryInput) => Promise<SalesLe
|
|
|
55
55
|
type InternalOpsDraftHandler = (input: InternalOpsDraftInput) => Promise<InternalOpsDraftOutput>;
|
|
56
56
|
interface SupportRagToolRegistryOptions {
|
|
57
57
|
retriever?: KnowledgeRetriever;
|
|
58
|
+
runtimeContext?: RuntimeRequestContext;
|
|
58
59
|
supportDraft?: SupportDraftHandler;
|
|
59
60
|
humanEscalation?: HumanEscalationHandler;
|
|
60
61
|
}
|
|
@@ -71,6 +72,8 @@ declare function createCustomerSupportToolRegistry(source?: ToolRegistry): ToolR
|
|
|
71
72
|
declare function createSupportRagToolRegistry(options?: SupportRagToolRegistryOptions): ToolRegistry;
|
|
72
73
|
declare function createSalesIntakeToolRegistry(options?: SalesIntakeToolRegistryOptions): ToolRegistry;
|
|
73
74
|
declare function createInternalOpsToolRegistry(options?: InternalOpsToolRegistryOptions): ToolRegistry;
|
|
74
|
-
declare function createRagToolRegistry(retriever?: KnowledgeRetriever
|
|
75
|
+
declare function createRagToolRegistry(retriever?: KnowledgeRetriever, options?: {
|
|
76
|
+
runtimeContext?: RuntimeRequestContext;
|
|
77
|
+
}): ToolRegistry;
|
|
75
78
|
|
|
76
79
|
export { type HumanEscalationHandler as H, type InternalOpsDraftHandler as I, type SupportDraftHandler as S, type HumanEscalationInput as a, type HumanEscalationOutput as b, type SupportDraftInput as c, type SupportDraftOutput as d, type SupportRagToolRegistryOptions as e, createCodingToolRegistry as f, createCustomerSupportToolRegistry as g, createNoToolRegistry as h, createPublicWebToolRegistry as i, createRagToolRegistry as j, createSupportRagToolRegistry as k, type InternalOpsDraftInput as l, type InternalOpsDraftOutput as m, type InternalOpsToolRegistryOptions as n, type SalesIntakeToolRegistryOptions as o, type SalesLeadSummaryHandler as p, type SalesLeadSummaryInput as q, type SalesLeadSummaryOutput as r, createInternalOpsToolRegistry as s, createSalesIntakeToolRegistry as t };
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { a5 as RuntimeRequestContext, R as DataBoundary } from './workflow-engine-DleSoUhy.js';
|
|
2
|
+
|
|
3
|
+
interface RetrievedSource {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
content: string;
|
|
7
|
+
url?: string;
|
|
8
|
+
score: number;
|
|
9
|
+
metadata?: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
interface RagDocument {
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
content: string;
|
|
15
|
+
url?: string;
|
|
16
|
+
metadata?: Record<string, unknown>;
|
|
17
|
+
}
|
|
18
|
+
interface RagChunk {
|
|
19
|
+
id: string;
|
|
20
|
+
documentId: string;
|
|
21
|
+
title: string;
|
|
22
|
+
content: string;
|
|
23
|
+
url?: string;
|
|
24
|
+
metadata?: Record<string, unknown>;
|
|
25
|
+
}
|
|
26
|
+
interface Citation {
|
|
27
|
+
sourceId: string;
|
|
28
|
+
title: string;
|
|
29
|
+
url?: string;
|
|
30
|
+
score?: number;
|
|
31
|
+
}
|
|
32
|
+
interface RetrievalOptions {
|
|
33
|
+
limit?: number;
|
|
34
|
+
minScore?: number;
|
|
35
|
+
tenantId?: string;
|
|
36
|
+
runtimeContext?: RuntimeRequestContext;
|
|
37
|
+
dataBoundary?: DataBoundary;
|
|
38
|
+
}
|
|
39
|
+
interface DocumentLoader {
|
|
40
|
+
load(): Promise<RagDocument[]>;
|
|
41
|
+
}
|
|
42
|
+
interface Chunker {
|
|
43
|
+
chunk(document: RagDocument): Promise<RagChunk[]>;
|
|
44
|
+
}
|
|
45
|
+
interface EmbeddingProvider {
|
|
46
|
+
embed(texts: string[]): Promise<number[][]>;
|
|
47
|
+
}
|
|
48
|
+
interface VectorStore {
|
|
49
|
+
upsert(chunks: Array<RagChunk & {
|
|
50
|
+
embedding: number[];
|
|
51
|
+
}>): Promise<void>;
|
|
52
|
+
search(embedding: number[], options?: RetrievalOptions): Promise<RetrievedSource[]>;
|
|
53
|
+
}
|
|
54
|
+
interface Reranker {
|
|
55
|
+
rerank(query: string, sources: RetrievedSource[]): Promise<RetrievedSource[]>;
|
|
56
|
+
}
|
|
57
|
+
interface KnowledgeRetriever {
|
|
58
|
+
search(query: string, options?: RetrievalOptions): Promise<RetrievedSource[]>;
|
|
59
|
+
}
|
|
60
|
+
interface RagPipelineOptions {
|
|
61
|
+
loader?: DocumentLoader;
|
|
62
|
+
chunker?: Chunker;
|
|
63
|
+
embeddingProvider?: EmbeddingProvider;
|
|
64
|
+
vectorStore?: VectorStore;
|
|
65
|
+
retriever?: KnowledgeRetriever;
|
|
66
|
+
reranker?: Reranker;
|
|
67
|
+
runtimeContext?: RuntimeRequestContext;
|
|
68
|
+
}
|
|
69
|
+
interface RagPipeline {
|
|
70
|
+
ingest(): Promise<{
|
|
71
|
+
documents: number;
|
|
72
|
+
chunks: number;
|
|
73
|
+
}>;
|
|
74
|
+
retrieve(query: string, options?: RetrievalOptions): Promise<RetrievedSource[]>;
|
|
75
|
+
}
|
|
76
|
+
interface InMemoryKnowledgeDocument {
|
|
77
|
+
id: string;
|
|
78
|
+
title: string;
|
|
79
|
+
content: string;
|
|
80
|
+
url?: string;
|
|
81
|
+
metadata?: Record<string, unknown>;
|
|
82
|
+
}
|
|
83
|
+
declare class InMemoryKnowledgeRetriever implements KnowledgeRetriever {
|
|
84
|
+
private readonly documents;
|
|
85
|
+
constructor(documents: InMemoryKnowledgeDocument[]);
|
|
86
|
+
search(query: string, options?: RetrievalOptions): Promise<RetrievedSource[]>;
|
|
87
|
+
}
|
|
88
|
+
declare class SimpleTextChunker implements Chunker {
|
|
89
|
+
private readonly options;
|
|
90
|
+
constructor(options?: {
|
|
91
|
+
maxChars?: number;
|
|
92
|
+
overlapChars?: number;
|
|
93
|
+
});
|
|
94
|
+
chunk(document: RagDocument): Promise<RagChunk[]>;
|
|
95
|
+
}
|
|
96
|
+
declare class InMemoryVectorStore implements VectorStore {
|
|
97
|
+
private chunks;
|
|
98
|
+
upsert(chunks: Array<RagChunk & {
|
|
99
|
+
embedding: number[];
|
|
100
|
+
}>): Promise<void>;
|
|
101
|
+
search(embedding: number[], options?: RetrievalOptions): Promise<RetrievedSource[]>;
|
|
102
|
+
}
|
|
103
|
+
declare function createInMemoryKnowledgeRetriever(documents: InMemoryKnowledgeDocument[]): KnowledgeRetriever;
|
|
104
|
+
declare function createSimpleTextChunker(options?: {
|
|
105
|
+
maxChars?: number;
|
|
106
|
+
overlapChars?: number;
|
|
107
|
+
}): Chunker;
|
|
108
|
+
declare function createInMemoryVectorStore(): VectorStore;
|
|
109
|
+
declare function createRagPipeline(options: RagPipelineOptions): RagPipeline;
|
|
110
|
+
declare function formatRetrievedSourcesForPrompt(sources: RetrievedSource[]): string;
|
|
111
|
+
|
|
112
|
+
export { type Chunker as C, type DocumentLoader as D, type EmbeddingProvider as E, type InMemoryKnowledgeDocument as I, type KnowledgeRetriever as K, type RagChunk as R, SimpleTextChunker as S, type VectorStore as V, type Citation as a, InMemoryKnowledgeRetriever as b, InMemoryVectorStore as c, type RagDocument as d, type RagPipeline as e, type RagPipelineOptions as f, type Reranker as g, type RetrievalOptions as h, type RetrievedSource as i, createInMemoryKnowledgeRetriever as j, createInMemoryVectorStore as k, createRagPipeline as l, createSimpleTextChunker as m, formatRetrievedSourcesForPrompt as n };
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
export { A as
|
|
3
|
-
|
|
4
|
-
export { A as
|
|
5
|
-
export {
|
|
6
|
-
|
|
7
|
-
import 'zod';
|
|
1
|
+
export { A as AgentRuntime, P as ProviderRegistry, c as createAgentRuntime, a as createProviderRegistry } from '../agent-runtime-Cd6pB640.js';
|
|
2
|
+
export { A as AgentRunner, a as AgentRunnerExecutionContext, b as AgentRunnerExecutionInput, c as AgentRunnerExecutor, d as AgentRunnerOptions, e as AgentRunnerRawResult, f as AgentSurface, D as DefaultPermissionPolicy, g as DefaultRuntimeTurnRunner, E as ExtensionRisk, F as FileEventLog, h as FileRuntimeSessionStore, I as InMemoryEventLog, i as InMemoryRuntimeSessionStore, M as McpToolPolicy, R as RecipeManifest, j as RecipeStep, k as RuntimeHttpServerOptions, l as RuntimeToolExecutor, m as RuntimeToolExecutorInput, n as RuntimeToolExecutorOptions, S as SkillManifest, T as ToolCallingRuntimeTurnRunner, o as ToolCallingRuntimeTurnRunnerOptions, p as createAgentRunner, q as createDefaultRuntimeTurnRunner, r as createEventLog, s as createFileEventLog, t as createFileRuntimeSessionStore, u as createMcpToolPolicy, v as createPermissionPolicy, w as createRuntimeHttpServer, x as createRuntimeSessionStore, y as createRuntimeToolExecutor, z as createToolCallingRuntimeTurnRunner } from '../runtime-tool-executor-L5i8QWzn.js';
|
|
3
|
+
import { T as EventLog, a2 as RuntimeEventType, a1 as RuntimeEvent, a8 as RuntimeSessionStore, a7 as RuntimeSessionCreateOptions, a6 as RuntimeSession } from '../workflow-engine-DleSoUhy.js';
|
|
4
|
+
export { A as AGENT_MODES, d as AgentArtifact, e as AgentArtifactKind, f as AgentBudget, g as AgentCapability, h as AgentCard, i as AgentDefinition, j as AgentGateDefinition, k as AgentGateKind, l as AgentGraphDefinition, m as AgentGraphEdge, n as AgentGraphEngine, o as AgentGraphEngineOptions, p as AgentGraphNode, q as AgentGraphNodeExecution, r as AgentGraphNodeExecutor, s as AgentGraphRunInput, t as AgentGraphRunResult, u as AgentGraphRunStatus, v as AgentGraphValidationIssue, w as AgentGraphValidationResult, x as AgentGuardrailPolicy, y as AgentHandoff, z as AgentMessage, B as AgentMessageRole, D as AgentModeDefinition, E as AgentModeId, F as AgentRole, G as AgentRunResult, H as AgentRunStatus, I as AgentRuntimeOptions, J as AgentRuntimeSnapshot, a0 as AgentTask, K as AgentToolPolicyDecision, N as AgentTraceContext, O as CostBudget, Q as DEFAULT_WORKFLOWS, R as DataBoundary, U as FileSharedWorkspaceStore, V as InMemorySharedWorkspaceStore, W as LegacyAgentRoleMapping, X as PermissionDecision, Y as PermissionPolicy, Z as ProviderRuntimeSelection, _ as ReasoningEffort, $ as RetentionPolicy, a3 as RuntimeMode, a4 as RuntimePolicy, a5 as RuntimeRequestContext, a9 as RuntimeSurface, aa as RuntimeToolExecutionInput, ab as RuntimeToolExecutionResult, ac as RuntimeTurnContext, ad as RuntimeTurnInput, ae as RuntimeTurnResult, af as RuntimeTurnRunner, ag as RuntimeTurnStreamEvent, ah as SharedWorkspaceProvenance, ai as SharedWorkspaceRecord, aj as SharedWorkspaceRecordKind, ak as SharedWorkspaceState, al as SharedWorkspaceStateSnapshot, am as SharedWorkspaceStore, an as SharedWorkspaceWriteInput, ao as TenantContext, aq as ToolRiskLevel, ar as ToolRiskManifest, as as ToolRiskManifestEntry, at as UserContext, au as WorkflowCatalog, av as WorkflowDefinition, aw as WorkflowEngine, ax as WorkflowHandler, ay as WorkflowPlan, az as WorkflowRegistry, aA as WorkflowRetryPolicy, aB as WorkflowRisk, aC as WorkflowRunContext, aD as WorkflowRunInput, aE as WorkflowRunResult, aF as WorkflowRunStatus, aG as WorkflowStepDefinition, aH as createAgentArtifact, aI as createAgentGraphEngine, aJ as createAgentTraceContext, aL as createRuntimeRequestContext, aM as createSummaryArtifact, aO as createWorkflowCatalog, aP as createWorkflowEngine, aQ as createWorkflowRegistry, aR as dryRunAgentGraphNodeExecutor, aS as evaluateAgentToolPolicy, aT as getAgentMode, aU as isAgentMode, aV as listAgentModes, aW as listLegacyAgentRoleMappings, aX as mapLegacyAgentRole, aY as mergeRuntimePolicy, aZ as normalizeAgentRunResult, a_ as runtimeContextToMetadata, a$ as validateAgentCapabilities, b0 as validateAgentGraph, b1 as workflowToAgentGraph } from '../workflow-engine-DleSoUhy.js';
|
|
5
|
+
export { A as AgentActionMode, a as AgentBlueprint, b as AgentDeploymentSurface, c as AgentMaturity, d as AgentPreset, e as AgentRuntimeFactoryOptions, f as ApprovalPolicy, B as BlueprintAgent, G as GuardrailConfig, g as GuardrailFinding, h as GuardrailResult, i as GuardrailSeverity, j as GuardrailStage, M as MemoryConfig, O as ObservabilityConfig, S as SecretRedactionConfig, T as TopicBoundaryConfig, k as createAgentFromBlueprint, l as createBaseBlueprint, m as createSafeToolRegistry, n as defaultPublicGuardrails, o as mapActionModeToRuntimeMode, r as redactSecrets, p as runGuardrails, v as validateStructuredOutput } from '../blueprints-Dmdaw6_I.js';
|
|
6
|
+
export { C as Chunker, a as Citation, D as DocumentLoader, E as EmbeddingProvider, I as InMemoryKnowledgeDocument, b as InMemoryKnowledgeRetriever, c as InMemoryVectorStore, K as KnowledgeRetriever, R as RagChunk, d as RagDocument, e as RagPipeline, f as RagPipelineOptions, g as Reranker, h as RetrievalOptions, i as RetrievedSource, S as SimpleTextChunker, V as VectorStore, j as createInMemoryKnowledgeRetriever, k as createInMemoryVectorStore, l as createRagPipeline, m as createSimpleTextChunker, n as formatRetrievedSourcesForPrompt } from '../rag-D-Zo1oyo.js';
|
|
8
7
|
import 'node:http';
|
|
8
|
+
import 'zod';
|
|
9
9
|
|
|
10
10
|
interface PostgresQueryClient {
|
|
11
11
|
query<T = unknown>(sql: string, params?: unknown[]): Promise<{
|