@corbat-tech/coco 2.38.0 → 2.39.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 +1 -1
- package/dist/{agent-runtime-DeLcB0Ie.d.ts → agent-runtime-DJY9FzL_.d.ts} +266 -53
- package/dist/{blueprints-BWcCJfnN.d.ts → blueprints-DYgm3K65.d.ts} +1 -1
- package/dist/cli/index.js +633 -168
- package/dist/cli/index.js.map +1 -1
- package/dist/{extension-manifests-DcvOnrp3.d.ts → extension-manifests-CAQQILhE.d.ts} +36 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +841 -112
- package/dist/index.js.map +1 -1
- package/dist/presets/index.d.ts +2 -2
- package/dist/presets/index.js +572 -107
- package/dist/presets/index.js.map +1 -1
- package/dist/runtime/index.d.ts +4 -4
- package/dist/runtime/index.js +841 -112
- package/dist/runtime/index.js.map +1 -1
- package/dist/tools/index.js +27 -2
- package/dist/tools/index.js.map +1 -1
- package/package.json +1 -1
package/dist/adapters/index.d.ts
CHANGED
|
@@ -370,7 +370,7 @@ interface AgentRuntimeSnapshot {
|
|
|
370
370
|
};
|
|
371
371
|
modes: AgentModeDefinition[];
|
|
372
372
|
}
|
|
373
|
-
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.tool.called" | "agent.artifact.created" | "agent.completed" | "agent.failed" | "guardrail.input" | "guardrail.output" | "guardrail.tool" | "workflow.planned" | "workflow.started" | "workflow.completed" | "workflow.failed" | "workflow.gate.failed" | "session.created" | "session.updated" | "checkpoint.created" | "error";
|
|
373
|
+
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";
|
|
374
374
|
interface RuntimeEvent {
|
|
375
375
|
id: string;
|
|
376
376
|
type: RuntimeEventType;
|
|
@@ -485,6 +485,55 @@ interface RuntimeToolExecutionResult {
|
|
|
485
485
|
decision: PermissionDecision;
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
+
type WorkflowRisk = "read-only" | "write" | "network" | "destructive" | "secrets-sensitive";
|
|
489
|
+
interface WorkflowStepDefinition {
|
|
490
|
+
id: string;
|
|
491
|
+
description: string;
|
|
492
|
+
requiredTools: string[];
|
|
493
|
+
risk: WorkflowRisk;
|
|
494
|
+
}
|
|
495
|
+
interface WorkflowRetryPolicy {
|
|
496
|
+
maxAttempts: number;
|
|
497
|
+
backoffMs?: number;
|
|
498
|
+
}
|
|
499
|
+
interface WorkflowDefinition {
|
|
500
|
+
id: string;
|
|
501
|
+
name: string;
|
|
502
|
+
description: string;
|
|
503
|
+
inputSchema: string;
|
|
504
|
+
/** Legacy linear workflow steps. Prefer nodes for new multi-agent workflows. */
|
|
505
|
+
steps: WorkflowStepDefinition[];
|
|
506
|
+
nodes?: AgentGraphNode[];
|
|
507
|
+
edges?: AgentGraphDefinition["edges"];
|
|
508
|
+
gates?: AgentGateDefinition[];
|
|
509
|
+
retryPolicy?: WorkflowRetryPolicy;
|
|
510
|
+
parallelism?: number;
|
|
511
|
+
checks: string[];
|
|
512
|
+
outputKind: "markdown" | "json" | "patch" | "pull-request" | "release";
|
|
513
|
+
replayable: boolean;
|
|
514
|
+
}
|
|
515
|
+
interface WorkflowPlan {
|
|
516
|
+
id: string;
|
|
517
|
+
workflowId: string;
|
|
518
|
+
input: Record<string, unknown>;
|
|
519
|
+
status: "planned";
|
|
520
|
+
createdAt: string;
|
|
521
|
+
}
|
|
522
|
+
declare function workflowToAgentGraph(workflow: WorkflowDefinition): AgentGraphDefinition;
|
|
523
|
+
/** Descriptive catalog of reusable workflow definitions; it does not execute workflows. */
|
|
524
|
+
declare class WorkflowCatalog {
|
|
525
|
+
private workflows;
|
|
526
|
+
constructor(workflows?: WorkflowDefinition[]);
|
|
527
|
+
register(workflow: WorkflowDefinition): void;
|
|
528
|
+
get(id: string): WorkflowDefinition | undefined;
|
|
529
|
+
list(): WorkflowDefinition[];
|
|
530
|
+
createPlan(workflowId: string, input: Record<string, unknown>, eventLog?: EventLog): WorkflowPlan;
|
|
531
|
+
}
|
|
532
|
+
declare const DEFAULT_WORKFLOWS: WorkflowDefinition[];
|
|
533
|
+
declare const WorkflowRegistry: typeof WorkflowCatalog;
|
|
534
|
+
declare function createWorkflowCatalog(workflows?: WorkflowDefinition[]): WorkflowCatalog;
|
|
535
|
+
declare function createWorkflowRegistry(workflows?: WorkflowDefinition[]): WorkflowCatalog;
|
|
536
|
+
|
|
488
537
|
type AgentRole = "researcher" | "planner" | "architect" | "editor" | "coder" | "tester" | "reviewer" | "optimizer" | "security" | "qa" | "integrator" | "pm" | "docs" | "database";
|
|
489
538
|
interface AgentBudget {
|
|
490
539
|
maxTurns?: number;
|
|
@@ -492,6 +541,7 @@ interface AgentBudget {
|
|
|
492
541
|
maxInputTokens?: number;
|
|
493
542
|
maxOutputTokens?: number;
|
|
494
543
|
maxEstimatedCostUsd?: number;
|
|
544
|
+
maxConcurrentRuns?: number;
|
|
495
545
|
}
|
|
496
546
|
interface AgentCapability {
|
|
497
547
|
role: AgentRole;
|
|
@@ -500,7 +550,31 @@ interface AgentCapability {
|
|
|
500
550
|
model?: string;
|
|
501
551
|
temperature?: number;
|
|
502
552
|
budget?: AgentBudget;
|
|
553
|
+
guardrails?: AgentGuardrailPolicy;
|
|
554
|
+
}
|
|
555
|
+
interface AgentGuardrailPolicy {
|
|
556
|
+
input?: boolean;
|
|
557
|
+
output?: boolean;
|
|
558
|
+
toolUse?: boolean;
|
|
559
|
+
redactSecrets?: boolean;
|
|
560
|
+
blockPromptInjection?: boolean;
|
|
503
561
|
}
|
|
562
|
+
interface AgentDefinition {
|
|
563
|
+
id: string;
|
|
564
|
+
role: AgentRole;
|
|
565
|
+
name: string;
|
|
566
|
+
instructions: string;
|
|
567
|
+
capability: AgentCapability;
|
|
568
|
+
outputSchema?: Record<string, unknown>;
|
|
569
|
+
metadata?: Record<string, unknown>;
|
|
570
|
+
}
|
|
571
|
+
interface LegacyAgentRoleMapping {
|
|
572
|
+
legacy: string;
|
|
573
|
+
role: AgentRole;
|
|
574
|
+
reason: string;
|
|
575
|
+
}
|
|
576
|
+
declare function mapLegacyAgentRole(legacyRole: string, fallback?: AgentRole): AgentRole;
|
|
577
|
+
declare function listLegacyAgentRoleMappings(): LegacyAgentRoleMapping[];
|
|
504
578
|
interface AgentTask {
|
|
505
579
|
id: string;
|
|
506
580
|
role: AgentRole;
|
|
@@ -543,6 +617,35 @@ interface AgentRunResult {
|
|
|
543
617
|
completedAt: string;
|
|
544
618
|
metadata?: Record<string, unknown>;
|
|
545
619
|
}
|
|
620
|
+
type AgentMessageRole = "user" | "agent" | "system" | "tool";
|
|
621
|
+
interface AgentMessage {
|
|
622
|
+
id: string;
|
|
623
|
+
role: AgentMessageRole;
|
|
624
|
+
content: string;
|
|
625
|
+
taskId?: string;
|
|
626
|
+
agentRunId?: string;
|
|
627
|
+
createdAt: string;
|
|
628
|
+
metadata?: Record<string, unknown>;
|
|
629
|
+
}
|
|
630
|
+
interface AgentHandoff {
|
|
631
|
+
id: string;
|
|
632
|
+
fromAgentRunId: string;
|
|
633
|
+
toRole: AgentRole;
|
|
634
|
+
task: AgentTask;
|
|
635
|
+
artifacts: AgentArtifact[];
|
|
636
|
+
createdAt: string;
|
|
637
|
+
metadata?: Record<string, unknown>;
|
|
638
|
+
}
|
|
639
|
+
interface AgentCard {
|
|
640
|
+
id: string;
|
|
641
|
+
role: AgentRole;
|
|
642
|
+
name: string;
|
|
643
|
+
description: string;
|
|
644
|
+
skills: string[];
|
|
645
|
+
inputSchema?: Record<string, unknown>;
|
|
646
|
+
outputSchema?: Record<string, unknown>;
|
|
647
|
+
capability: AgentCapability;
|
|
648
|
+
}
|
|
546
649
|
type AgentGateKind = "tests" | "coverage" | "review" | "security" | "quality-score" | "human-approval";
|
|
547
650
|
interface AgentGateDefinition {
|
|
548
651
|
id: string;
|
|
@@ -595,7 +698,61 @@ interface SharedWorkspaceStateSnapshot {
|
|
|
595
698
|
testResults: Record<string, unknown>;
|
|
596
699
|
artifacts: AgentArtifact[];
|
|
597
700
|
}
|
|
701
|
+
type SharedWorkspaceRecordKind = "fact" | "decision" | "risk" | "file" | "testResult" | "artifact";
|
|
702
|
+
interface SharedWorkspaceProvenance {
|
|
703
|
+
workflowRunId: string;
|
|
704
|
+
agentRunId?: string;
|
|
705
|
+
nodeId?: string;
|
|
706
|
+
taskId?: string;
|
|
707
|
+
eventId?: string;
|
|
708
|
+
confidence?: number;
|
|
709
|
+
risk?: WorkflowRisk;
|
|
710
|
+
}
|
|
711
|
+
interface SharedWorkspaceRecord {
|
|
712
|
+
id: string;
|
|
713
|
+
kind: SharedWorkspaceRecordKind;
|
|
714
|
+
key: string;
|
|
715
|
+
value: unknown;
|
|
716
|
+
provenance: SharedWorkspaceProvenance;
|
|
717
|
+
createdAt: string;
|
|
718
|
+
}
|
|
719
|
+
interface SharedWorkspaceWriteInput {
|
|
720
|
+
kind: SharedWorkspaceRecordKind;
|
|
721
|
+
key: string;
|
|
722
|
+
value: unknown;
|
|
723
|
+
provenance: SharedWorkspaceProvenance;
|
|
724
|
+
createdAt?: string;
|
|
725
|
+
}
|
|
726
|
+
interface SharedWorkspaceStore {
|
|
727
|
+
write(input: SharedWorkspaceWriteInput): SharedWorkspaceRecord;
|
|
728
|
+
list(): SharedWorkspaceRecord[];
|
|
729
|
+
snapshot(): SharedWorkspaceStateSnapshot;
|
|
730
|
+
readForRole(role: AgentRole): SharedWorkspaceStateSnapshot;
|
|
731
|
+
clear(): void;
|
|
732
|
+
}
|
|
733
|
+
declare class InMemorySharedWorkspaceStore implements SharedWorkspaceStore {
|
|
734
|
+
private records;
|
|
735
|
+
write(input: SharedWorkspaceWriteInput): SharedWorkspaceRecord;
|
|
736
|
+
list(): SharedWorkspaceRecord[];
|
|
737
|
+
snapshot(): SharedWorkspaceStateSnapshot;
|
|
738
|
+
readForRole(role: AgentRole): SharedWorkspaceStateSnapshot;
|
|
739
|
+
clear(): void;
|
|
740
|
+
}
|
|
741
|
+
declare class FileSharedWorkspaceStore implements SharedWorkspaceStore {
|
|
742
|
+
private readonly filePath;
|
|
743
|
+
private readonly memory;
|
|
744
|
+
private writable;
|
|
745
|
+
constructor(filePath: string);
|
|
746
|
+
write(input: SharedWorkspaceWriteInput): SharedWorkspaceRecord;
|
|
747
|
+
list(): SharedWorkspaceRecord[];
|
|
748
|
+
snapshot(): SharedWorkspaceStateSnapshot;
|
|
749
|
+
readForRole(role: AgentRole): SharedWorkspaceStateSnapshot;
|
|
750
|
+
clear(): void;
|
|
751
|
+
private readRecordsFromDisk;
|
|
752
|
+
}
|
|
598
753
|
declare class SharedWorkspaceState {
|
|
754
|
+
private readonly workflowRunId;
|
|
755
|
+
private readonly store;
|
|
599
756
|
private facts;
|
|
600
757
|
private decisions;
|
|
601
758
|
private risks;
|
|
@@ -610,7 +767,101 @@ declare class SharedWorkspaceState {
|
|
|
610
767
|
addArtifact(artifact: AgentArtifact): void;
|
|
611
768
|
readForRole(role: AgentRole): SharedWorkspaceStateSnapshot;
|
|
612
769
|
snapshot(): SharedWorkspaceStateSnapshot;
|
|
770
|
+
records(): SharedWorkspaceRecord[];
|
|
771
|
+
}
|
|
772
|
+
type ToolRiskLevel = "low" | "medium" | "high" | "critical";
|
|
773
|
+
interface ToolRiskManifestEntry {
|
|
774
|
+
toolName: string;
|
|
775
|
+
risk: WorkflowRisk;
|
|
776
|
+
level: ToolRiskLevel;
|
|
777
|
+
requiredCapability?: AgentRole | AgentRole[];
|
|
778
|
+
requiresConsent?: boolean;
|
|
779
|
+
destructive?: boolean;
|
|
780
|
+
secretsSensitive?: boolean;
|
|
781
|
+
network?: boolean;
|
|
782
|
+
filesystem?: boolean;
|
|
783
|
+
}
|
|
784
|
+
type ToolRiskManifest = Record<string, ToolRiskManifestEntry>;
|
|
785
|
+
interface AgentToolPolicyDecision {
|
|
786
|
+
allowed: boolean;
|
|
787
|
+
risk: WorkflowRisk;
|
|
788
|
+
reason?: string;
|
|
789
|
+
requiresConsent?: boolean;
|
|
790
|
+
}
|
|
791
|
+
declare function evaluateAgentToolPolicy(input: {
|
|
792
|
+
capability: AgentCapability;
|
|
793
|
+
toolName: string;
|
|
794
|
+
manifest?: ToolRiskManifest;
|
|
795
|
+
}): AgentToolPolicyDecision;
|
|
796
|
+
interface AgentTraceContext {
|
|
797
|
+
traceId: string;
|
|
798
|
+
spanId: string;
|
|
799
|
+
parentSpanId?: string;
|
|
800
|
+
workflowRunId?: string;
|
|
801
|
+
agentRunId?: string;
|
|
802
|
+
taskId?: string;
|
|
803
|
+
toolCallId?: string;
|
|
804
|
+
}
|
|
805
|
+
declare function createAgentTraceContext(input?: Partial<AgentTraceContext>): AgentTraceContext;
|
|
806
|
+
interface AgentGraphNodeExecution {
|
|
807
|
+
node: AgentGraphNode;
|
|
808
|
+
task: AgentTask;
|
|
809
|
+
attempt: number;
|
|
810
|
+
workflowRunId: string;
|
|
811
|
+
trace: AgentTraceContext;
|
|
812
|
+
dependencyResults: Map<string, AgentRunResult>;
|
|
813
|
+
sharedState: SharedWorkspaceStore;
|
|
814
|
+
eventLog: EventLog;
|
|
815
|
+
}
|
|
816
|
+
type AgentGraphNodeExecutor = (execution: AgentGraphNodeExecution) => Promise<AgentRunResult>;
|
|
817
|
+
type AgentGateEvaluator = (input: {
|
|
818
|
+
gate: AgentGateDefinition;
|
|
819
|
+
node: AgentGraphNode;
|
|
820
|
+
result: AgentRunResult;
|
|
821
|
+
workflowRunId: string;
|
|
822
|
+
trace: AgentTraceContext;
|
|
823
|
+
sharedState: SharedWorkspaceStore;
|
|
824
|
+
eventLog: EventLog;
|
|
825
|
+
}) => Promise<{
|
|
826
|
+
passed: boolean;
|
|
827
|
+
reason?: string;
|
|
828
|
+
}>;
|
|
829
|
+
interface AgentGraphEngineOptions {
|
|
830
|
+
eventLog?: EventLog;
|
|
831
|
+
sharedState?: SharedWorkspaceStore;
|
|
832
|
+
nodeExecutor?: AgentGraphNodeExecutor;
|
|
833
|
+
gateEvaluator?: AgentGateEvaluator;
|
|
834
|
+
trace?: AgentTraceContext;
|
|
835
|
+
}
|
|
836
|
+
interface AgentGraphRunInput {
|
|
837
|
+
workflowRunId: string;
|
|
838
|
+
graph: AgentGraphDefinition;
|
|
839
|
+
input: Record<string, unknown>;
|
|
613
840
|
}
|
|
841
|
+
type AgentGraphRunStatus = "completed" | "failed";
|
|
842
|
+
interface AgentGraphRunResult {
|
|
843
|
+
id: string;
|
|
844
|
+
status: AgentGraphRunStatus;
|
|
845
|
+
nodeResults: Record<string, AgentRunResult>;
|
|
846
|
+
artifacts: AgentArtifact[];
|
|
847
|
+
stateSnapshot: SharedWorkspaceStateSnapshot;
|
|
848
|
+
trace: AgentTraceContext;
|
|
849
|
+
startedAt: string;
|
|
850
|
+
completedAt: string;
|
|
851
|
+
error?: string;
|
|
852
|
+
}
|
|
853
|
+
declare class AgentGraphEngine {
|
|
854
|
+
private readonly eventLog?;
|
|
855
|
+
private readonly sharedState;
|
|
856
|
+
private readonly nodeExecutor;
|
|
857
|
+
private readonly gateEvaluator;
|
|
858
|
+
private readonly trace;
|
|
859
|
+
constructor(options?: AgentGraphEngineOptions);
|
|
860
|
+
run(input: AgentGraphRunInput): Promise<AgentGraphRunResult>;
|
|
861
|
+
private executeNode;
|
|
862
|
+
private evaluateNodeGates;
|
|
863
|
+
}
|
|
864
|
+
declare function createAgentGraphEngine(options?: AgentGraphEngineOptions): AgentGraphEngine;
|
|
614
865
|
declare function createAgentArtifact<T>(input: Omit<AgentArtifact<T>, "id" | "createdAt"> & {
|
|
615
866
|
id?: string;
|
|
616
867
|
createdAt?: string;
|
|
@@ -638,55 +889,6 @@ declare function normalizeAgentRunResult(input: {
|
|
|
638
889
|
declare function validateAgentCapabilities(capability: AgentCapability, requiredTools?: string[]): AgentGraphValidationIssue[];
|
|
639
890
|
declare function validateAgentGraph(graph: AgentGraphDefinition): AgentGraphValidationResult;
|
|
640
891
|
|
|
641
|
-
type WorkflowRisk = "read-only" | "write" | "network" | "destructive" | "secrets-sensitive";
|
|
642
|
-
interface WorkflowStepDefinition {
|
|
643
|
-
id: string;
|
|
644
|
-
description: string;
|
|
645
|
-
requiredTools: string[];
|
|
646
|
-
risk: WorkflowRisk;
|
|
647
|
-
}
|
|
648
|
-
interface WorkflowRetryPolicy {
|
|
649
|
-
maxAttempts: number;
|
|
650
|
-
backoffMs?: number;
|
|
651
|
-
}
|
|
652
|
-
interface WorkflowDefinition {
|
|
653
|
-
id: string;
|
|
654
|
-
name: string;
|
|
655
|
-
description: string;
|
|
656
|
-
inputSchema: string;
|
|
657
|
-
/** Legacy linear workflow steps. Prefer nodes for new multi-agent workflows. */
|
|
658
|
-
steps: WorkflowStepDefinition[];
|
|
659
|
-
nodes?: AgentGraphNode[];
|
|
660
|
-
edges?: AgentGraphDefinition["edges"];
|
|
661
|
-
gates?: AgentGateDefinition[];
|
|
662
|
-
retryPolicy?: WorkflowRetryPolicy;
|
|
663
|
-
parallelism?: number;
|
|
664
|
-
checks: string[];
|
|
665
|
-
outputKind: "markdown" | "json" | "patch" | "pull-request" | "release";
|
|
666
|
-
replayable: boolean;
|
|
667
|
-
}
|
|
668
|
-
interface WorkflowPlan {
|
|
669
|
-
id: string;
|
|
670
|
-
workflowId: string;
|
|
671
|
-
input: Record<string, unknown>;
|
|
672
|
-
status: "planned";
|
|
673
|
-
createdAt: string;
|
|
674
|
-
}
|
|
675
|
-
declare function workflowToAgentGraph(workflow: WorkflowDefinition): AgentGraphDefinition;
|
|
676
|
-
/** Descriptive catalog of reusable workflow definitions; it does not execute workflows. */
|
|
677
|
-
declare class WorkflowCatalog {
|
|
678
|
-
private workflows;
|
|
679
|
-
constructor(workflows?: WorkflowDefinition[]);
|
|
680
|
-
register(workflow: WorkflowDefinition): void;
|
|
681
|
-
get(id: string): WorkflowDefinition | undefined;
|
|
682
|
-
list(): WorkflowDefinition[];
|
|
683
|
-
createPlan(workflowId: string, input: Record<string, unknown>, eventLog?: EventLog): WorkflowPlan;
|
|
684
|
-
}
|
|
685
|
-
declare const DEFAULT_WORKFLOWS: WorkflowDefinition[];
|
|
686
|
-
declare const WorkflowRegistry: typeof WorkflowCatalog;
|
|
687
|
-
declare function createWorkflowCatalog(workflows?: WorkflowDefinition[]): WorkflowCatalog;
|
|
688
|
-
declare function createWorkflowRegistry(workflows?: WorkflowDefinition[]): WorkflowCatalog;
|
|
689
|
-
|
|
690
892
|
type WorkflowRunStatus = "completed" | "failed";
|
|
691
893
|
interface WorkflowRunInput {
|
|
692
894
|
workflowId: string;
|
|
@@ -701,6 +903,8 @@ interface WorkflowRunResult {
|
|
|
701
903
|
startedAt: string;
|
|
702
904
|
completedAt: string;
|
|
703
905
|
error?: string;
|
|
906
|
+
graphResult?: AgentGraphRunResult;
|
|
907
|
+
trace?: AgentTraceContext;
|
|
704
908
|
}
|
|
705
909
|
interface WorkflowRunContext {
|
|
706
910
|
workflow: WorkflowDefinition;
|
|
@@ -708,16 +912,25 @@ interface WorkflowRunContext {
|
|
|
708
912
|
eventLog: EventLog;
|
|
709
913
|
}
|
|
710
914
|
type WorkflowHandler = (input: Record<string, unknown>, context: WorkflowRunContext) => Promise<unknown>;
|
|
915
|
+
interface WorkflowEngineOptions {
|
|
916
|
+
catalog?: WorkflowCatalog;
|
|
917
|
+
eventLog?: EventLog;
|
|
918
|
+
sharedState?: SharedWorkspaceStore;
|
|
919
|
+
nodeExecutor?: AgentGraphNodeExecutor;
|
|
920
|
+
}
|
|
711
921
|
declare class WorkflowEngine {
|
|
712
922
|
private readonly catalog;
|
|
713
923
|
private readonly eventLog;
|
|
714
924
|
private handlers;
|
|
715
|
-
|
|
925
|
+
private readonly sharedState;
|
|
926
|
+
private nodeExecutor?;
|
|
927
|
+
constructor(catalog?: WorkflowCatalog, eventLog?: EventLog, options?: Omit<WorkflowEngineOptions, "catalog" | "eventLog">);
|
|
716
928
|
registerHandler(workflowId: string, handler: WorkflowHandler): void;
|
|
929
|
+
registerNodeExecutor(executor: AgentGraphNodeExecutor): void;
|
|
717
930
|
createPlan(workflowId: string, input: Record<string, unknown>): WorkflowPlan;
|
|
718
931
|
run(request: WorkflowRunInput): Promise<WorkflowRunResult>;
|
|
719
932
|
}
|
|
720
|
-
declare function createWorkflowEngine(catalog?: WorkflowCatalog, eventLog?: EventLog): WorkflowEngine;
|
|
933
|
+
declare function createWorkflowEngine(catalog?: WorkflowCatalog, eventLog?: EventLog, options?: Omit<WorkflowEngineOptions, "catalog" | "eventLog">): WorkflowEngine;
|
|
721
934
|
|
|
722
935
|
/**
|
|
723
936
|
* Reusable runtime facade for wiring providers, tools, permissions, sessions,
|
|
@@ -753,4 +966,4 @@ declare class AgentRuntime {
|
|
|
753
966
|
}
|
|
754
967
|
declare function createAgentRuntime(options: AgentRuntimeOptions): Promise<AgentRuntime>;
|
|
755
968
|
|
|
756
|
-
export {
|
|
969
|
+
export { type AgentTask as $, AGENT_MODES as A, type AgentMessageRole as B, type ChatOptions as C, type AgentModeDefinition as D, type AgentModeId as E, type AgentRole as F, type AgentRunResult as G, type AgentRunStatus as H, AgentRuntime as I, type AgentRuntimeOptions as J, type AgentRuntimeSnapshot as K, type LLMProvider as L, type Message as M, type AgentToolPolicyDecision as N, type AgentTraceContext as O, type ProviderConfig as P, DEFAULT_WORKFLOWS as Q, type EventLog as R, type StreamChunk as S, FileSharedWorkspaceStore as T, InMemorySharedWorkspaceStore as U, type LegacyAgentRoleMapping as V, type PermissionDecision as W, type PermissionPolicy as X, ProviderRegistry as Y, type ProviderRuntimeSelection as Z, type ReasoningEffort as _, type ChatResponse as a, type RuntimeEvent as a0, type RuntimeEventType as a1, type RuntimeMode as a2, type RuntimeSession as a3, type RuntimeSessionCreateOptions as a4, type RuntimeSessionStore as a5, type RuntimeToolExecutionInput as a6, type RuntimeToolExecutionResult as a7, type RuntimeTurnContext as a8, type RuntimeTurnInput as a9, createAgentArtifact as aA, createAgentGraphEngine as aB, createAgentRuntime as aC, createAgentTraceContext as aD, createProvider as aE, createProviderRegistry as aF, createSummaryArtifact as aG, createWorkflowCatalog as aH, createWorkflowEngine as aI, createWorkflowRegistry as aJ, evaluateAgentToolPolicy as aK, getAgentMode as aL, isAgentMode as aM, listAgentModes as aN, listLegacyAgentRoleMappings as aO, mapLegacyAgentRole as aP, normalizeAgentRunResult as aQ, validateAgentCapabilities as aR, validateAgentGraph as aS, workflowToAgentGraph as aT, type ProviderType as aU, type RuntimeTurnResult as aa, type RuntimeTurnRunner as ab, type RuntimeTurnStreamEvent as ac, type SharedWorkspaceProvenance as ad, type SharedWorkspaceRecord as ae, type SharedWorkspaceRecordKind as af, SharedWorkspaceState as ag, type SharedWorkspaceStateSnapshot as ah, type SharedWorkspaceStore as ai, type SharedWorkspaceWriteInput as aj, type ToolRiskLevel as ak, type ToolRiskManifest as al, type ToolRiskManifestEntry as am, WorkflowCatalog as an, type WorkflowDefinition as ao, WorkflowEngine as ap, type WorkflowHandler as aq, type WorkflowPlan as ar, WorkflowRegistry as as, type WorkflowRetryPolicy as at, type WorkflowRisk as au, type WorkflowRunContext as av, type WorkflowRunInput as aw, type WorkflowRunResult as ax, type WorkflowRunStatus as ay, type WorkflowStepDefinition as az, type ChatWithToolsOptions as b, type ChatWithToolsResponse as c, type AgentArtifact as d, type AgentArtifactKind as e, type AgentBudget as f, type AgentCapability as g, type AgentCard as h, type AgentDefinition as i, type AgentGateDefinition as j, type AgentGateKind as k, type AgentGraphDefinition as l, type AgentGraphEdge as m, AgentGraphEngine as n, type AgentGraphEngineOptions as o, type AgentGraphNode as p, type AgentGraphNodeExecution as q, type AgentGraphNodeExecutor as r, type AgentGraphRunInput as s, type AgentGraphRunResult as t, type AgentGraphRunStatus as u, type AgentGraphValidationIssue as v, type AgentGraphValidationResult as w, type AgentGuardrailPolicy as x, type AgentHandoff as y, type AgentMessage as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aU as ProviderType, P as ProviderConfig, L as LLMProvider, R as EventLog, ab as RuntimeTurnRunner, I as AgentRuntime, a3 as RuntimeSession, a9 as RuntimeTurnInput, aa as RuntimeTurnResult } from './agent-runtime-DJY9FzL_.js';
|
|
2
2
|
import { T as ToolRegistry } from './registry-CEpl9Jq0.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|