@corbat-tech/coco 2.40.0 → 2.41.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 +81 -3
- package/dist/adapters/index.js +179 -1
- package/dist/adapters/index.js.map +1 -1
- package/dist/{agent-runtime-Cd6pB640.d.ts → agent-runtime-BJeNjVuk.d.ts} +20 -2
- package/dist/{blueprints-Dmdaw6_I.d.ts → blueprints-Dw5-uWU9.d.ts} +28 -4
- package/dist/cli/index.js +474 -15
- package/dist/cli/index.js.map +1 -1
- package/dist/{workflow-engine-DleSoUhy.d.ts → context-BLPsKYxc.d.ts} +247 -129
- package/dist/{index-BD5_a3Q8.d.ts → index-DhUKtM2p.d.ts} +2 -2
- package/dist/index.d.ts +10 -10
- package/dist/index.js +1324 -128
- package/dist/index.js.map +1 -1
- package/dist/presets/index.d.ts +5 -5
- package/dist/presets/index.js +521 -17
- package/dist/presets/index.js.map +1 -1
- package/dist/{profiles-BA9dvyaF.d.ts → profiles-GRoVNorK.d.ts} +3 -3
- package/dist/{rag-D-Zo1oyo.d.ts → rag-B2oGudNb.d.ts} +68 -2
- package/dist/runtime/index.d.ts +278 -8
- package/dist/runtime/index.js +1113 -122
- package/dist/runtime/index.js.map +1 -1
- package/dist/tools/index.d.ts +4 -4
- package/dist/tools/index.js +1 -0
- package/dist/tools/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/runtime-tool-executor-L5i8QWzn.d.ts +0 -174
|
@@ -793,110 +793,116 @@ declare function validateAgentCapabilities(capability: AgentCapability, required
|
|
|
793
793
|
declare function validateAgentGraph(graph: AgentGraphDefinition): AgentGraphValidationResult;
|
|
794
794
|
declare function dryRunAgentGraphNodeExecutor(execution: AgentGraphNodeExecution): Promise<AgentRunResult>;
|
|
795
795
|
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
risk: WorkflowRisk;
|
|
796
|
+
interface AgentRunnerExecutionInput {
|
|
797
|
+
task: AgentTask;
|
|
798
|
+
capability: AgentCapability;
|
|
799
|
+
trace?: AgentTraceContext;
|
|
800
|
+
toolRiskManifest?: ToolRiskManifest;
|
|
802
801
|
}
|
|
803
|
-
interface
|
|
804
|
-
|
|
805
|
-
|
|
802
|
+
interface AgentRunnerExecutionContext {
|
|
803
|
+
task: AgentTask;
|
|
804
|
+
capability: AgentCapability;
|
|
805
|
+
trace: AgentTraceContext;
|
|
806
|
+
assertToolAllowed(toolName: string): void;
|
|
806
807
|
}
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
retryPolicy?: WorkflowRetryPolicy;
|
|
818
|
-
parallelism?: number;
|
|
819
|
-
checks: string[];
|
|
820
|
-
outputKind: "markdown" | "json" | "patch" | "pull-request" | "release";
|
|
821
|
-
replayable: boolean;
|
|
808
|
+
type AgentRunnerExecutor = (context: AgentRunnerExecutionContext) => Promise<AgentRunnerRawResult>;
|
|
809
|
+
interface AgentRunnerRawResult {
|
|
810
|
+
output: string;
|
|
811
|
+
success?: boolean;
|
|
812
|
+
turns?: number;
|
|
813
|
+
toolsUsed?: string[];
|
|
814
|
+
inputTokens?: number;
|
|
815
|
+
outputTokens?: number;
|
|
816
|
+
error?: string;
|
|
817
|
+
metadata?: Record<string, unknown>;
|
|
822
818
|
}
|
|
823
|
-
interface
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
input: Record<string, unknown>;
|
|
827
|
-
status: "planned";
|
|
828
|
-
createdAt: string;
|
|
819
|
+
interface AgentRunnerOptions {
|
|
820
|
+
eventLog?: EventLog;
|
|
821
|
+
executor?: AgentRunnerExecutor;
|
|
829
822
|
}
|
|
830
|
-
declare
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
constructor(workflows?: WorkflowDefinition[]);
|
|
835
|
-
register(workflow: WorkflowDefinition): void;
|
|
836
|
-
get(id: string): WorkflowDefinition | undefined;
|
|
837
|
-
list(): WorkflowDefinition[];
|
|
838
|
-
createPlan(workflowId: string, input: Record<string, unknown>, eventLog?: EventLog): WorkflowPlan;
|
|
823
|
+
declare class AgentRunner {
|
|
824
|
+
private readonly options;
|
|
825
|
+
constructor(options?: AgentRunnerOptions);
|
|
826
|
+
run(input: AgentRunnerExecutionInput): Promise<AgentRunResult>;
|
|
839
827
|
}
|
|
840
|
-
declare
|
|
841
|
-
declare const WorkflowRegistry: typeof WorkflowCatalog;
|
|
842
|
-
declare function createWorkflowCatalog(workflows?: WorkflowDefinition[]): WorkflowCatalog;
|
|
843
|
-
declare function createWorkflowRegistry(workflows?: WorkflowDefinition[]): WorkflowCatalog;
|
|
828
|
+
declare function createAgentRunner(options?: AgentRunnerOptions): AgentRunner;
|
|
844
829
|
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
830
|
+
declare class AgentDefinitionRegistry {
|
|
831
|
+
private readonly definitionsByRole;
|
|
832
|
+
private readonly definitionsById;
|
|
833
|
+
constructor(definitions?: AgentDefinition[]);
|
|
834
|
+
register(definition: AgentDefinition): void;
|
|
835
|
+
get(id: string): AgentDefinition | undefined;
|
|
836
|
+
getByRole(role: AgentRole): AgentDefinition | undefined;
|
|
837
|
+
list(): AgentDefinition[];
|
|
838
|
+
}
|
|
839
|
+
interface RuntimeAgentNodeExecutorOptions {
|
|
840
|
+
registry: AgentDefinitionRegistry;
|
|
841
|
+
runner?: AgentRunner;
|
|
842
|
+
runnerOptions?: AgentRunnerOptions;
|
|
843
|
+
runtimePolicy?: RuntimePolicy;
|
|
844
|
+
toolRiskManifest?: ToolRiskManifest;
|
|
851
845
|
}
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
846
|
+
declare class RuntimeAgentNodeExecutor {
|
|
847
|
+
private readonly options;
|
|
848
|
+
private readonly runner;
|
|
849
|
+
constructor(options: RuntimeAgentNodeExecutorOptions);
|
|
850
|
+
execute: AgentGraphNodeExecutor;
|
|
851
|
+
private findBlockedTool;
|
|
858
852
|
}
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
853
|
+
declare function createAgentDefinitionRegistry(definitions?: AgentDefinition[]): AgentDefinitionRegistry;
|
|
854
|
+
declare function createRuntimeAgentNodeExecutor(options: RuntimeAgentNodeExecutorOptions): AgentGraphNodeExecutor;
|
|
855
|
+
|
|
856
|
+
type WorkflowRunStatus = "completed" | "failed";
|
|
857
|
+
interface WorkflowRunInput {
|
|
858
|
+
workflowId: string;
|
|
859
|
+
input: Record<string, unknown>;
|
|
860
|
+
plan?: WorkflowPlan;
|
|
864
861
|
}
|
|
865
|
-
interface
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
862
|
+
interface WorkflowRunResult {
|
|
863
|
+
id: string;
|
|
864
|
+
workflowId: string;
|
|
865
|
+
status: WorkflowRunStatus;
|
|
866
|
+
output: unknown;
|
|
867
|
+
startedAt: string;
|
|
868
|
+
completedAt: string;
|
|
869
|
+
error?: string;
|
|
870
|
+
graphResult?: AgentGraphRunResult;
|
|
871
|
+
trace?: AgentTraceContext;
|
|
870
872
|
}
|
|
871
|
-
interface
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
873
|
+
interface WorkflowRunContext {
|
|
874
|
+
workflow: WorkflowDefinition;
|
|
875
|
+
plan: WorkflowPlan;
|
|
876
|
+
eventLog: EventLog;
|
|
875
877
|
}
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
878
|
+
type WorkflowHandler = (input: Record<string, unknown>, context: WorkflowRunContext) => Promise<unknown>;
|
|
879
|
+
interface WorkflowEngineOptions {
|
|
880
|
+
catalog?: WorkflowCatalog;
|
|
881
|
+
eventLog?: EventLog;
|
|
882
|
+
sharedState?: SharedWorkspaceStore;
|
|
883
|
+
nodeExecutor?: AgentGraphNodeExecutor;
|
|
884
|
+
agentDefinitionRegistry?: AgentDefinitionRegistry;
|
|
885
|
+
agentNodeExecutorOptions?: Omit<RuntimeAgentNodeExecutorOptions, "registry" | "runtimePolicy">;
|
|
886
|
+
runtimePolicy?: RuntimePolicy;
|
|
887
|
+
runtimeContext?: RuntimeRequestContext;
|
|
888
|
+
runtimeHostMode?: RuntimeHostMode;
|
|
887
889
|
}
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
890
|
+
declare class WorkflowEngine {
|
|
891
|
+
private readonly catalog;
|
|
892
|
+
private readonly eventLog;
|
|
893
|
+
private handlers;
|
|
894
|
+
private readonly sharedState;
|
|
895
|
+
private readonly runtimePolicy?;
|
|
896
|
+
private readonly runtimeContext?;
|
|
897
|
+
private readonly runtimeHostMode;
|
|
898
|
+
private nodeExecutor?;
|
|
899
|
+
constructor(catalog?: WorkflowCatalog, eventLog?: EventLog, options?: Omit<WorkflowEngineOptions, "catalog" | "eventLog">);
|
|
900
|
+
registerHandler(workflowId: string, handler: WorkflowHandler): void;
|
|
901
|
+
registerNodeExecutor(executor: AgentGraphNodeExecutor): void;
|
|
902
|
+
createPlan(workflowId: string, input: Record<string, unknown>): WorkflowPlan;
|
|
903
|
+
run(request: WorkflowRunInput): Promise<WorkflowRunResult>;
|
|
896
904
|
}
|
|
897
|
-
declare function
|
|
898
|
-
declare function mergeRuntimePolicy(base: RuntimePolicy | undefined, override: RuntimePolicy | undefined): RuntimePolicy | undefined;
|
|
899
|
-
declare function runtimeContextToMetadata(context: RuntimeRequestContext | undefined): Record<string, unknown>;
|
|
905
|
+
declare function createWorkflowEngine(catalog?: WorkflowCatalog, eventLog?: EventLog, options?: Omit<WorkflowEngineOptions, "catalog" | "eventLog">): WorkflowEngine;
|
|
900
906
|
|
|
901
907
|
type ReasoningEffort = "auto" | "low" | "medium" | "high" | "max";
|
|
902
908
|
type RuntimeMode = AgentModeId;
|
|
@@ -925,6 +931,8 @@ interface AgentRuntimeOptions {
|
|
|
925
931
|
};
|
|
926
932
|
runtimeContext?: RuntimeRequestContext;
|
|
927
933
|
runtimePolicy?: RuntimePolicy;
|
|
934
|
+
runtimeHostMode?: RuntimeHostMode;
|
|
935
|
+
agentDefinitionRegistry?: AgentDefinitionRegistry;
|
|
928
936
|
}
|
|
929
937
|
interface AgentRuntimeSnapshot {
|
|
930
938
|
provider: {
|
|
@@ -939,8 +947,9 @@ interface AgentRuntimeSnapshot {
|
|
|
939
947
|
modes: AgentModeDefinition[];
|
|
940
948
|
context?: RuntimeRequestContext;
|
|
941
949
|
policy?: RuntimePolicy;
|
|
950
|
+
hostMode: RuntimeHostMode;
|
|
942
951
|
}
|
|
943
|
-
type RuntimeEventType = "runtime.initialized" | "provider.attached" | "provider.created" | "provider.updated" | "turn.started" | "turn.completed" | "turn.cancelled" | "turn.failed" | "tool.started" | "tool.completed" | "tool.allowed" | "tool.blocked" | "tool.skipped" | "agent.started" | "agent.graph.started" | "agent.graph.completed" | "agent.graph.failed" | "agent.tool.called" | "agent.handoff.created" | "agent.artifact.created" | "agent.completed" | "agent.failed" | "guardrail.input" | "guardrail.output" | "guardrail.tool" | "workflow.planned" | "workflow.started" | "workflow.completed" | "workflow.failed" | "workflow.gate.passed" | "workflow.gate.failed" | "shared_state.updated" | "session.created" | "session.updated" | "checkpoint.created" | "error";
|
|
952
|
+
type RuntimeEventType = "runtime.initialized" | "provider.attached" | "provider.created" | "provider.updated" | "retention.cleanup" | "turn.started" | "turn.completed" | "turn.cancelled" | "turn.failed" | "tool.started" | "tool.completed" | "tool.allowed" | "tool.blocked" | "tool.skipped" | "agent.started" | "agent.graph.started" | "agent.graph.completed" | "agent.graph.failed" | "agent.tool.called" | "agent.handoff.created" | "agent.artifact.created" | "agent.completed" | "agent.failed" | "guardrail.input" | "guardrail.output" | "guardrail.tool" | "workflow.planned" | "workflow.started" | "workflow.completed" | "workflow.failed" | "workflow.gate.passed" | "workflow.gate.failed" | "shared_state.updated" | "session.created" | "session.updated" | "checkpoint.created" | "error";
|
|
944
953
|
interface RuntimeEvent {
|
|
945
954
|
id: string;
|
|
946
955
|
type: RuntimeEventType;
|
|
@@ -953,6 +962,12 @@ interface EventLog {
|
|
|
953
962
|
count(): number;
|
|
954
963
|
clear(): void;
|
|
955
964
|
}
|
|
965
|
+
interface AsyncEventLog {
|
|
966
|
+
record(type: RuntimeEventType, data?: Record<string, unknown>): Promise<RuntimeEvent>;
|
|
967
|
+
list(): Promise<RuntimeEvent[]>;
|
|
968
|
+
count(): Promise<number>;
|
|
969
|
+
clear(): Promise<void>;
|
|
970
|
+
}
|
|
956
971
|
interface PermissionDecision {
|
|
957
972
|
allowed: boolean;
|
|
958
973
|
reason?: string;
|
|
@@ -991,6 +1006,13 @@ interface RuntimeSessionStore {
|
|
|
991
1006
|
list(): RuntimeSession[];
|
|
992
1007
|
delete(id: string): boolean;
|
|
993
1008
|
}
|
|
1009
|
+
interface AsyncRuntimeSessionStore {
|
|
1010
|
+
create(options?: RuntimeSessionCreateOptions): Promise<RuntimeSession>;
|
|
1011
|
+
get(id: string): Promise<RuntimeSession | undefined>;
|
|
1012
|
+
update(session: RuntimeSession): Promise<RuntimeSession>;
|
|
1013
|
+
list(): Promise<RuntimeSession[]>;
|
|
1014
|
+
delete(id: string): Promise<boolean>;
|
|
1015
|
+
}
|
|
994
1016
|
interface RuntimeTurnInput {
|
|
995
1017
|
content: string;
|
|
996
1018
|
sessionId?: string;
|
|
@@ -1055,49 +1077,145 @@ interface RuntimeToolExecutionResult {
|
|
|
1055
1077
|
decision: PermissionDecision;
|
|
1056
1078
|
}
|
|
1057
1079
|
|
|
1058
|
-
type
|
|
1059
|
-
interface
|
|
1080
|
+
type WorkflowRisk = "read-only" | "write" | "network" | "destructive" | "secrets-sensitive";
|
|
1081
|
+
interface WorkflowStepDefinition {
|
|
1082
|
+
id: string;
|
|
1083
|
+
description: string;
|
|
1084
|
+
requiredTools: string[];
|
|
1085
|
+
risk: WorkflowRisk;
|
|
1086
|
+
}
|
|
1087
|
+
interface WorkflowRetryPolicy {
|
|
1088
|
+
maxAttempts: number;
|
|
1089
|
+
backoffMs?: number;
|
|
1090
|
+
}
|
|
1091
|
+
interface WorkflowDefinition {
|
|
1092
|
+
id: string;
|
|
1093
|
+
name: string;
|
|
1094
|
+
description: string;
|
|
1095
|
+
inputSchema: string;
|
|
1096
|
+
/** Legacy linear workflow steps. Prefer nodes for new multi-agent workflows. */
|
|
1097
|
+
steps: WorkflowStepDefinition[];
|
|
1098
|
+
nodes?: AgentGraphNode[];
|
|
1099
|
+
edges?: AgentGraphDefinition["edges"];
|
|
1100
|
+
gates?: AgentGateDefinition[];
|
|
1101
|
+
retryPolicy?: WorkflowRetryPolicy;
|
|
1102
|
+
parallelism?: number;
|
|
1103
|
+
checks: string[];
|
|
1104
|
+
outputKind: "markdown" | "json" | "patch" | "pull-request" | "release";
|
|
1105
|
+
replayable: boolean;
|
|
1106
|
+
}
|
|
1107
|
+
interface WorkflowPlan {
|
|
1108
|
+
id: string;
|
|
1060
1109
|
workflowId: string;
|
|
1061
1110
|
input: Record<string, unknown>;
|
|
1062
|
-
|
|
1111
|
+
status: "planned";
|
|
1112
|
+
createdAt: string;
|
|
1063
1113
|
}
|
|
1064
|
-
|
|
1114
|
+
declare function workflowToAgentGraph(workflow: WorkflowDefinition): AgentGraphDefinition;
|
|
1115
|
+
/** Descriptive catalog of reusable workflow definitions; it does not execute workflows. */
|
|
1116
|
+
declare class WorkflowCatalog {
|
|
1117
|
+
private workflows;
|
|
1118
|
+
constructor(workflows?: WorkflowDefinition[]);
|
|
1119
|
+
register(workflow: WorkflowDefinition): void;
|
|
1120
|
+
get(id: string): WorkflowDefinition | undefined;
|
|
1121
|
+
list(): WorkflowDefinition[];
|
|
1122
|
+
createPlan(workflowId: string, input: Record<string, unknown>, eventLog?: EventLog): WorkflowPlan;
|
|
1123
|
+
}
|
|
1124
|
+
declare const DEFAULT_WORKFLOWS: WorkflowDefinition[];
|
|
1125
|
+
declare const WorkflowRegistry: typeof WorkflowCatalog;
|
|
1126
|
+
declare function createWorkflowCatalog(workflows?: WorkflowDefinition[]): WorkflowCatalog;
|
|
1127
|
+
declare function createWorkflowRegistry(workflows?: WorkflowDefinition[]): WorkflowCatalog;
|
|
1128
|
+
|
|
1129
|
+
type RuntimeSurface = "cli" | "api" | "web" | "whatsapp" | "slack" | "teams" | "internal" | "mcp" | "worker";
|
|
1130
|
+
interface TenantContext {
|
|
1065
1131
|
id: string;
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
startedAt: string;
|
|
1070
|
-
completedAt: string;
|
|
1071
|
-
error?: string;
|
|
1072
|
-
graphResult?: AgentGraphRunResult;
|
|
1073
|
-
trace?: AgentTraceContext;
|
|
1132
|
+
name?: string;
|
|
1133
|
+
environment?: "development" | "staging" | "production";
|
|
1134
|
+
metadata?: Record<string, unknown>;
|
|
1074
1135
|
}
|
|
1075
|
-
interface
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1136
|
+
interface UserContext {
|
|
1137
|
+
id?: string;
|
|
1138
|
+
displayName?: string;
|
|
1139
|
+
roles?: string[];
|
|
1140
|
+
groups?: string[];
|
|
1141
|
+
metadata?: Record<string, unknown>;
|
|
1079
1142
|
}
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
nodeExecutor?: AgentGraphNodeExecutor;
|
|
1086
|
-
runtimePolicy?: RuntimePolicy;
|
|
1143
|
+
interface DataBoundary {
|
|
1144
|
+
region?: string;
|
|
1145
|
+
classification?: "public" | "internal" | "confidential" | "restricted";
|
|
1146
|
+
allowCrossTenantMemory?: boolean;
|
|
1147
|
+
redactSensitiveData?: boolean;
|
|
1087
1148
|
}
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
private readonly runtimePolicy?;
|
|
1094
|
-
private nodeExecutor?;
|
|
1095
|
-
constructor(catalog?: WorkflowCatalog, eventLog?: EventLog, options?: Omit<WorkflowEngineOptions, "catalog" | "eventLog">);
|
|
1096
|
-
registerHandler(workflowId: string, handler: WorkflowHandler): void;
|
|
1097
|
-
registerNodeExecutor(executor: AgentGraphNodeExecutor): void;
|
|
1098
|
-
createPlan(workflowId: string, input: Record<string, unknown>): WorkflowPlan;
|
|
1099
|
-
run(request: WorkflowRunInput): Promise<WorkflowRunResult>;
|
|
1149
|
+
interface CostBudget {
|
|
1150
|
+
maxInputTokens?: number;
|
|
1151
|
+
maxOutputTokens?: number;
|
|
1152
|
+
maxEstimatedCostUsd?: number;
|
|
1153
|
+
maxTurns?: number;
|
|
1100
1154
|
}
|
|
1101
|
-
|
|
1155
|
+
interface RetentionPolicy {
|
|
1156
|
+
conversationDays?: number;
|
|
1157
|
+
eventDays?: number;
|
|
1158
|
+
artifactDays?: number;
|
|
1159
|
+
}
|
|
1160
|
+
interface RuntimePolicy {
|
|
1161
|
+
allowedTools?: string[];
|
|
1162
|
+
maxToolRisk?: WorkflowRisk;
|
|
1163
|
+
requireHumanApprovalFor?: WorkflowRisk[];
|
|
1164
|
+
dataBoundary?: DataBoundary;
|
|
1165
|
+
costBudget?: CostBudget;
|
|
1166
|
+
retention?: RetentionPolicy;
|
|
1167
|
+
rateLimit?: {
|
|
1168
|
+
maxRequestsPerMinute?: number;
|
|
1169
|
+
maxConcurrentRuns?: number;
|
|
1170
|
+
};
|
|
1171
|
+
}
|
|
1172
|
+
type RuntimeHostMode = "local" | "embedded" | "hosted";
|
|
1173
|
+
interface RuntimeRequestContext {
|
|
1174
|
+
tenant?: TenantContext;
|
|
1175
|
+
user?: UserContext;
|
|
1176
|
+
surface: RuntimeSurface;
|
|
1177
|
+
channel?: string;
|
|
1178
|
+
correlationId?: string;
|
|
1179
|
+
policy?: RuntimePolicy;
|
|
1180
|
+
metadata?: Record<string, unknown>;
|
|
1181
|
+
}
|
|
1182
|
+
type RuntimePolicyViolationCode = "tenant_required" | "tool_not_allowed" | "risk_exceeded" | "approval_required" | "input_tokens_exceeded" | "output_tokens_exceeded" | "estimated_cost_exceeded" | "max_turns_exceeded" | "rate_limit_exceeded" | "concurrency_limit_exceeded";
|
|
1183
|
+
interface RuntimePolicyViolationInput {
|
|
1184
|
+
code: RuntimePolicyViolationCode;
|
|
1185
|
+
subject: string;
|
|
1186
|
+
tenantId?: string;
|
|
1187
|
+
policyPath: string;
|
|
1188
|
+
severity?: "warning" | "blocked";
|
|
1189
|
+
message: string;
|
|
1190
|
+
}
|
|
1191
|
+
declare class RuntimePolicyViolation extends Error {
|
|
1192
|
+
readonly code: RuntimePolicyViolationCode;
|
|
1193
|
+
readonly subject: string;
|
|
1194
|
+
readonly tenantId?: string;
|
|
1195
|
+
readonly policyPath: string;
|
|
1196
|
+
readonly severity: "warning" | "blocked";
|
|
1197
|
+
constructor(input: RuntimePolicyViolationInput);
|
|
1198
|
+
}
|
|
1199
|
+
interface RuntimeTenantBoundary {
|
|
1200
|
+
hostMode: RuntimeHostMode;
|
|
1201
|
+
surface: RuntimeSurface;
|
|
1202
|
+
tenantId?: string;
|
|
1203
|
+
required: boolean;
|
|
1204
|
+
}
|
|
1205
|
+
declare function createRuntimeRequestContext(input?: Partial<RuntimeRequestContext>): RuntimeRequestContext;
|
|
1206
|
+
declare function mergeRuntimePolicy(base: RuntimePolicy | undefined, override: RuntimePolicy | undefined): RuntimePolicy | undefined;
|
|
1207
|
+
declare function runtimeContextToMetadata(context: RuntimeRequestContext | undefined): Record<string, unknown>;
|
|
1208
|
+
declare function createRuntimeTenantBoundary(context: RuntimeRequestContext | undefined, hostMode?: RuntimeHostMode): RuntimeTenantBoundary;
|
|
1209
|
+
declare function assertRuntimeTenantBoundary(context: RuntimeRequestContext | undefined, hostMode?: RuntimeHostMode, subject?: string): RuntimeTenantBoundary;
|
|
1210
|
+
declare function assertRuntimeTurnWithinPolicy(policy: RuntimePolicy | undefined, input: {
|
|
1211
|
+
subject: string;
|
|
1212
|
+
currentTurns: number;
|
|
1213
|
+
tenantId?: string;
|
|
1214
|
+
}): void;
|
|
1215
|
+
declare function createRetentionCutoffs(policy: RuntimePolicy | undefined, now?: Date): {
|
|
1216
|
+
conversationBefore?: string;
|
|
1217
|
+
eventBefore?: string;
|
|
1218
|
+
artifactBefore?: string;
|
|
1219
|
+
};
|
|
1102
1220
|
|
|
1103
|
-
export { type
|
|
1221
|
+
export { type AgentGraphValidationIssue as $, type AgentRuntimeOptions as A, type AgentCapability as B, type ChatOptions as C, type DataBoundary as D, type EventLog as E, type AgentCard as F, type AgentDefinition as G, AgentDefinitionRegistry as H, type AgentGateDefinition as I, type AgentGateKind as J, type AgentGraphDefinition as K, type LLMProvider as L, type ModelCatalogEntry as M, type AgentGraphEdge as N, AgentGraphEngine as O, type ProviderType as P, type AgentGraphEngineOptions as Q, type RuntimeRequestContext as R, type StreamChunk as S, ToolRegistry as T, type AgentGraphNode as U, type AgentGraphNodeExecution as V, WorkflowEngine as W, type AgentGraphNodeExecutor as X, type AgentGraphRunInput as Y, type AgentGraphRunResult as Z, type AgentGraphRunStatus as _, type RuntimeTurnStreamEvent as a, type WorkflowStepDefinition as a$, type AgentGraphValidationResult as a0, type AgentGuardrailPolicy as a1, type AgentHandoff as a2, type AgentMessage as a3, type AgentMessageRole as a4, type AgentModeDefinition as a5, type AgentModeId as a6, type AgentRole as a7, type AgentRunResult as a8, type AgentRunStatus as a9, type RuntimePolicyViolationCode as aA, type RuntimeSurface as aB, type RuntimeTenantBoundary as aC, type RuntimeTurnContext as aD, type SharedWorkspaceProvenance as aE, type SharedWorkspaceRecord as aF, type SharedWorkspaceRecordKind as aG, SharedWorkspaceState as aH, type SharedWorkspaceStateSnapshot as aI, type SharedWorkspaceStore as aJ, type SharedWorkspaceWriteInput as aK, type TenantContext as aL, type ToolRiskLevel as aM, type ToolRiskManifest as aN, type ToolRiskManifestEntry as aO, type UserContext as aP, WorkflowCatalog as aQ, type WorkflowDefinition as aR, type WorkflowHandler as aS, type WorkflowPlan as aT, WorkflowRegistry as aU, type WorkflowRetryPolicy as aV, type WorkflowRisk as aW, type WorkflowRunContext as aX, type WorkflowRunInput as aY, type WorkflowRunResult as aZ, type WorkflowRunStatus as a_, AgentRunner as aa, type AgentRunnerExecutionContext as ab, type AgentRunnerExecutionInput as ac, type AgentRunnerExecutor as ad, type AgentRunnerOptions as ae, type AgentRunnerRawResult as af, type AgentToolPolicyDecision as ag, type AgentTraceContext as ah, type AsyncEventLog as ai, type AsyncRuntimeSessionStore as aj, type CostBudget as ak, DEFAULT_WORKFLOWS as al, FileSharedWorkspaceStore as am, InMemorySharedWorkspaceStore as an, type LegacyAgentRoleMapping as ao, type PermissionDecision as ap, type ProviderRuntimeSelection as aq, type ReasoningEffort as ar, type RetentionPolicy as as, RuntimeAgentNodeExecutor as at, type RuntimeAgentNodeExecutorOptions as au, type AgentTask as av, type RuntimeEvent as aw, type RuntimeEventType as ax, type RuntimeHostMode as ay, RuntimePolicyViolation as az, type ProviderConfig as b, assertRuntimeTenantBoundary as b0, assertRuntimeTurnWithinPolicy as b1, createAgentArtifact as b2, createAgentDefinitionRegistry as b3, createAgentGraphEngine as b4, createAgentRunner as b5, createAgentTraceContext as b6, createProvider as b7, createRuntimeAgentNodeExecutor as b8, createRuntimeRequestContext as b9, createRuntimeTenantBoundary as ba, createSummaryArtifact as bb, createToolRegistry as bc, createWorkflowCatalog as bd, createWorkflowEngine as be, createWorkflowRegistry as bf, dryRunAgentGraphNodeExecutor as bg, evaluateAgentToolPolicy as bh, getAgentMode as bi, isAgentMode as bj, listAgentModes as bk, listLegacyAgentRoleMappings as bl, mapLegacyAgentRole as bm, mergeRuntimePolicy as bn, normalizeAgentRunResult as bo, runtimeContextToMetadata as bp, validateAgentCapabilities as bq, validateAgentGraph as br, workflowToAgentGraph as bs, type ToolDefinition as bt, type ToolCategory as bu, type ToolResult as bv, defineTool as bw, getToolRegistry as bx, type RuntimeTurnRunner as c, type RuntimePolicy as d, type RuntimeSession as e, type RuntimeTurnInput as f, type RuntimeTurnResult as g, type ProviderCatalogEntry as h, type ProviderRuntimeCapability as i, type ProviderProbeResult as j, type RuntimeSessionStore as k, type PermissionPolicy as l, type AgentRuntimeSnapshot as m, type RuntimeSessionCreateOptions as n, createRetentionCutoffs as o, type RuntimeToolExecutionInput as p, type RuntimeToolExecutionResult as q, type RuntimeMode as r, type Message as s, type ChatResponse as t, type ChatWithToolsOptions as u, type ChatWithToolsResponse as v, AGENT_MODES as w, type AgentArtifact as x, type AgentArtifactKind as y, type AgentBudget as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './profiles-
|
|
1
|
+
import { bt as ToolDefinition, T as ToolRegistry } from './context-BLPsKYxc.js';
|
|
2
|
+
import './profiles-GRoVNorK.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Quality system types for Corbat-Coco
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Q as QualityScores, a as QualityDimensions } from './index-
|
|
2
|
-
export { b as QualityThresholds, c as createFullToolRegistry, r as registerAllTools } from './index-
|
|
1
|
+
import { Q as QualityScores, a as QualityDimensions } from './index-DhUKtM2p.js';
|
|
2
|
+
export { b as QualityThresholds, c as createFullToolRegistry, r as registerAllTools } from './index-DhUKtM2p.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { L as LLMProvider,
|
|
5
|
-
export {
|
|
6
|
-
export { A as AgentRuntime, P as ProviderRegistry, c as createAgentRuntime,
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export { C as Chunker, a as Citation, D as DocumentLoader, E as EmbeddingProvider, I as InMemoryKnowledgeDocument,
|
|
10
|
-
export { H as HumanEscalationHandler,
|
|
4
|
+
import { L as LLMProvider, b as ProviderConfig, s as Message$1, C as ChatOptions, t as ChatResponse$1, u as ChatWithToolsOptions, v as ChatWithToolsResponse$1, S as StreamChunk } from './context-BLPsKYxc.js';
|
|
5
|
+
export { w as AGENT_MODES, x as AgentArtifact, y as AgentArtifactKind, z as AgentBudget, B as AgentCapability, F as AgentCard, G as AgentDefinition, H as AgentDefinitionRegistry, I as AgentGateDefinition, J as AgentGateKind, K as AgentGraphDefinition, N as AgentGraphEdge, O as AgentGraphEngine, Q as AgentGraphEngineOptions, U as AgentGraphNode, V as AgentGraphNodeExecution, X as AgentGraphNodeExecutor, Y as AgentGraphRunInput, Z as AgentGraphRunResult, _ as AgentGraphRunStatus, $ as AgentGraphValidationIssue, a0 as AgentGraphValidationResult, a1 as AgentGuardrailPolicy, a2 as AgentHandoff, a3 as AgentMessage, a4 as AgentMessageRole, a5 as AgentModeDefinition, a6 as AgentModeId, a7 as AgentRole, a8 as AgentRunResult, a9 as AgentRunStatus, aa as AgentRunner, ab as AgentRunnerExecutionContext, ac as AgentRunnerExecutionInput, ad as AgentRunnerExecutor, ae as AgentRunnerOptions, af as AgentRunnerRawResult, A as AgentRuntimeOptions, m as AgentRuntimeSnapshot, ag as AgentToolPolicyDecision, ah as AgentTraceContext, ai as AsyncEventLog, aj as AsyncRuntimeSessionStore, ak as CostBudget, al as DEFAULT_WORKFLOWS, D as DataBoundary, E as EventLog, am as FileSharedWorkspaceStore, an as InMemorySharedWorkspaceStore, ao as LegacyAgentRoleMapping, ap as PermissionDecision, l as PermissionPolicy, aq as ProviderRuntimeSelection, ar as ReasoningEffort, as as RetentionPolicy, at as RuntimeAgentNodeExecutor, au as RuntimeAgentNodeExecutorOptions, av as RuntimeAgentTask, aw as RuntimeEvent, ax as RuntimeEventType, ay as RuntimeHostMode, r as RuntimeMode, d as RuntimePolicy, az as RuntimePolicyViolation, aA as RuntimePolicyViolationCode, R as RuntimeRequestContext, e as RuntimeSession, n as RuntimeSessionCreateOptions, k as RuntimeSessionStore, aB as RuntimeSurface, aC as RuntimeTenantBoundary, p as RuntimeToolExecutionInput, q as RuntimeToolExecutionResult, aD as RuntimeTurnContext, f as RuntimeTurnInput, g as RuntimeTurnResult, c as RuntimeTurnRunner, a as RuntimeTurnStreamEvent, aE as SharedWorkspaceProvenance, aF as SharedWorkspaceRecord, aG as SharedWorkspaceRecordKind, aH as SharedWorkspaceState, aI as SharedWorkspaceStateSnapshot, aJ as SharedWorkspaceStore, aK as SharedWorkspaceWriteInput, aL as TenantContext, T as ToolRegistry, aM as ToolRiskLevel, aN as ToolRiskManifest, aO as ToolRiskManifestEntry, aP as UserContext, aQ as WorkflowCatalog, aR as WorkflowDefinition, W as WorkflowEngine, aS as WorkflowHandler, aT as WorkflowPlan, aU as WorkflowRegistry, aV as WorkflowRetryPolicy, aW as WorkflowRisk, aX as WorkflowRunContext, aY as WorkflowRunInput, aZ as WorkflowRunResult, a_ as WorkflowRunStatus, a$ as WorkflowStepDefinition, b0 as assertRuntimeTenantBoundary, b1 as assertRuntimeTurnWithinPolicy, b2 as createAgentArtifact, b3 as createAgentDefinitionRegistry, b4 as createAgentGraphEngine, b5 as createAgentRunner, b6 as createAgentTraceContext, b7 as createProvider, o as createRetentionCutoffs, b8 as createRuntimeAgentNodeExecutor, b9 as createRuntimeRequestContext, ba as createRuntimeTenantBoundary, bb as createSummaryArtifact, bc as createToolRegistry, bd as createWorkflowCatalog, be as createWorkflowEngine, bf as createWorkflowRegistry, bg as dryRunAgentGraphNodeExecutor, bh as evaluateAgentToolPolicy, bi as getAgentMode, bj as isAgentMode, bk as listAgentModes, bl as listLegacyAgentRoleMappings, bm as mapLegacyAgentRole, bn as mergeRuntimePolicy, bo as normalizeAgentRunResult, bp as runtimeContextToMetadata, bq as validateAgentCapabilities, br as validateAgentGraph, bs as workflowToAgentGraph } from './context-BLPsKYxc.js';
|
|
6
|
+
export { A as AgentRuntime, P as ProviderRegistry, R as RuntimeRetentionCleanupOptions, a as RuntimeRetentionCleanupResult, c as createAgentRuntime, b as createProviderRegistry } from './agent-runtime-BJeNjVuk.js';
|
|
7
|
+
export { AgentSurface, AsyncPostgresEventLog, AsyncPostgresRuntimeSessionStore, DefaultPermissionPolicy, DefaultRuntimeTurnRunner, ExtensionRisk, FileEventLog, FileRuntimeSessionStore, FileTraceExporter, InMemoryEventLog, InMemoryRuntimeSessionStore, InMemoryTraceExporter, McpToolPolicy, OpenTelemetryTraceExporter, PostgresRuntimeAuditStore, RecipeManifest, RecipeStep, RuntimeAuditRecord, RuntimeAuditStore, RuntimeHttpServerOptions, RuntimeMetricsSnapshot, RuntimeSpan, RuntimeSpanKind, RuntimeToolExecutor, RuntimeToolExecutorInput, RuntimeToolExecutorOptions, RuntimeTraceExporter, SkillManifest, TenantScopedEventLog, TenantScopedRuntimeSessionStore, ToolCallingRuntimeTurnRunner, ToolCallingRuntimeTurnRunnerOptions, collectRuntimeMetrics, createAsyncPostgresEventLog, createAsyncPostgresRuntimeSessionStore, createDefaultRuntimeTurnRunner, createEventLog, createFileEventLog, createFileRuntimeSessionStore, createMcpToolPolicy, createPermissionPolicy, createPostgresRuntimeAuditStore, createRuntimeHttpServer, createRuntimeSessionStore, createRuntimeToolExecutor, createTenantScopedEventLog, createTenantScopedRuntimeSessionStore, createToolCallingRuntimeTurnRunner, eventToSpan, exportRuntimeEventsAsSpans, redactTraceAttributes } from './runtime/index.js';
|
|
8
|
+
export { a as AgentActionMode, b as AgentBlueprint, c as AgentDeploymentSurface, d as AgentMaturity, A as AgentPreset, e as AgentRuntimeFactoryOptions, f as ApprovalPolicy, B as BlueprintAgent, G as GuardrailAction, g as GuardrailConfig, h as GuardrailFinding, i as GuardrailPipelineResult, j as GuardrailPipelineStep, k as GuardrailResult, l as GuardrailSeverity, m as GuardrailStage, M as MemoryConfig, O as ObservabilityConfig, P as PolicyAsCodeProvider, S as SecretRedactionConfig, T as TopicBoundaryConfig, n as createAgentFromBlueprint, o as createBaseBlueprint, p as createSafeToolRegistry, q as defaultPublicGuardrails, r as mapActionModeToRuntimeMode, s as redactSecrets, t as runGuardrailPipeline, u as runGuardrails, v as validateStructuredOutput } from './blueprints-Dw5-uWU9.js';
|
|
9
|
+
export { C as Chunker, a as Citation, b as CitationVerificationResult, D as DocumentAccessPolicy, c as DocumentAcl, d as DocumentLoader, E as EmbeddingProvider, G as GroundednessEvaluation, I as InMemoryKnowledgeDocument, e as InMemoryKnowledgeRetriever, f as InMemoryVectorStore, K as KnowledgeRetriever, g as RagChunk, h as RagDocument, i as RagIngestionJob, j as RagPipeline, k as RagPipelineOptions, l as Reranker, m as RetrievalOptions, R as RetrievedSource, S as SimpleTextChunker, V as VectorStore, n as createDocumentAccessPolicy, o as createInMemoryKnowledgeRetriever, p as createInMemoryVectorStore, q as createRagIngestionJob, r as createRagPipeline, s as createSimpleTextChunker, t as evaluateGroundedness, u as formatRetrievedSourcesForPrompt, v as verifyCitations } from './rag-B2oGudNb.js';
|
|
10
|
+
export { H as HumanEscalationHandler, b as HumanEscalationInput, c as HumanEscalationOutput, S as SupportDraftHandler, d as SupportDraftInput, e as SupportDraftOutput, f as SupportRagToolRegistryOptions, g as createCodingToolRegistry, h as createCustomerSupportToolRegistry, i as createNoToolRegistry, j as createPublicWebToolRegistry, k as createRagToolRegistry, l as createSupportRagToolRegistry } from './profiles-GRoVNorK.js';
|
|
11
11
|
export { AGENT_PRESETS, AppointmentPresetConfig, BrandPresetConfig, RagPresetConfig, SupportRagPresetConfig, appointmentBookingAssistantPreset, codingAgentPreset, customerSupportAssistantPreset, internalOpsAssistantPreset, publicWebsiteAssistantPreset, ragKnowledgeAssistantPreset, salesIntakeAssistantPreset, supportRagAssistantPreset } from './presets/index.js';
|
|
12
|
-
export { ChannelAdapter, ChannelInput, ChannelOutput, HttpAssistantAdapter, StreamingHttpAssistantAdapter, WhatsAppAssistantAdapter, WhatsAppInboundMessage, createHttpAssistantAdapter, createStreamingHttpAssistantAdapter, createWebhookAssistantAdapter, createWhatsAppAssistantAdapter } from './adapters/index.js';
|
|
12
|
+
export { ChannelAdapter, ChannelInput, ChannelOutput, ChannelSessionMapper, HttpAssistantAdapter, StreamingHttpAssistantAdapter, WhatsAppAssistantAdapter, WhatsAppCloudAdapterOptions, WhatsAppCloudMedia, WhatsAppCloudMessage, WhatsAppCloudWebhookInput, WhatsAppCloudWebhookResult, WhatsAppInboundMessage, createHttpAssistantAdapter, createInMemoryChannelSessionMapper, createStreamingHttpAssistantAdapter, createWebhookAssistantAdapter, createWhatsAppAssistantAdapter, createWhatsAppCloudAdapter } from './adapters/index.js';
|
|
13
13
|
import { Logger, ILogObj } from 'tslog';
|
|
14
14
|
import 'node:http';
|
|
15
15
|
|