@obora/runtime 0.1.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/LICENSE +21 -0
- package/README.md +183 -0
- package/dist/_legacy/actor/base/BaseActor.d.ts +87 -0
- package/dist/_legacy/actor/pool/ActorPool.d.ts +194 -0
- package/dist/_legacy/actor/pool/NoOpMessageBus.d.ts +16 -0
- package/dist/_legacy/actor/pool/PoolManager.d.ts +76 -0
- package/dist/_legacy/actor/pool/index.d.ts +3 -0
- package/dist/_legacy/actor/runtime/ActorRunner.d.ts +54 -0
- package/dist/_legacy/actor/runtime/ActorRuntime.d.ts +161 -0
- package/dist/_legacy/actor/runtime/DefaultActorFactory.d.ts +44 -0
- package/dist/_legacy/actor/runtime/types.d.ts +41 -0
- package/dist/_legacy/actor/runtime/utils/delay.d.ts +7 -0
- package/dist/_legacy/actor/supervision/Supervisor.d.ts +102 -0
- package/dist/_legacy/actor/supervision/SupervisorTree.d.ts +54 -0
- package/dist/_legacy/actor/supervision/types.d.ts +130 -0
- package/dist/_legacy/actor/types/action.d.ts +65 -0
- package/dist/_legacy/actor/types/actor.d.ts +251 -0
- package/dist/_legacy/actor/types/blackboard.d.ts +46 -0
- package/dist/_legacy/actor/types/crypto.d.ts +6 -0
- package/dist/_legacy/actor/types/message.d.ts +209 -0
- package/dist/_legacy/actor/types/metrics.d.ts +43 -0
- package/dist/_legacy/actor/types/observation.d.ts +45 -0
- package/dist/_legacy/actor/types/result.d.ts +110 -0
- package/dist/_legacy/agents/roles/analyst-agent.d.ts +18 -0
- package/dist/_legacy/agents/roles/base-agent.d.ts +320 -0
- package/dist/_legacy/agents/roles/director-agent.d.ts +26 -0
- package/dist/_legacy/agents/roles/executor-agent.d.ts +26 -0
- package/dist/_legacy/agents/roles/factory.d.ts +30 -0
- package/dist/_legacy/agents/roles/index.d.ts +6 -0
- package/dist/_legacy/agents/roles/verifier-agent.d.ts +18 -0
- package/dist/_legacy/blackboard/core/accessors/decisions-accessor.d.ts +190 -0
- package/dist/_legacy/blackboard/core/accessors/index.d.ts +7 -0
- package/dist/_legacy/blackboard/core/accessors/knowledge-accessor.d.ts +154 -0
- package/dist/_legacy/blackboard/core/accessors/state-accessor.d.ts +173 -0
- package/dist/_legacy/blackboard/core/blackboard-events.d.ts +105 -0
- package/dist/_legacy/blackboard/core/blackboard.d.ts +286 -0
- package/dist/_legacy/blackboard/core/id-generator.d.ts +53 -0
- package/dist/_legacy/blackboard/core/immutable.d.ts +45 -0
- package/dist/_legacy/blackboard/core/index.d.ts +13 -0
- package/dist/_legacy/blackboard/core/path-utils.d.ts +75 -0
- package/dist/_legacy/blackboard/core/tkg.d.ts +50 -0
- package/dist/_legacy/blackboard/core/versioning.d.ts +80 -0
- package/dist/_legacy/blackboard/domains/agenda/AgendaStore.d.ts +34 -0
- package/dist/_legacy/blackboard/domains/agenda/events.d.ts +12 -0
- package/dist/_legacy/blackboard/domains/agenda/index.d.ts +6 -0
- package/dist/_legacy/blackboard/domains/agenda/types.d.ts +26 -0
- package/dist/_legacy/blackboard/domains/consensus/ConsensusRuleEngine.d.ts +10 -0
- package/dist/_legacy/blackboard/domains/consensus/index.d.ts +4 -0
- package/dist/_legacy/blackboard/domains/consensus/types.d.ts +27 -0
- package/dist/_legacy/blackboard/domains/tkg/InMemoryTKG.d.ts +38 -0
- package/dist/_legacy/blackboard/domains/tkg/JsonFileReflectorStateStore.d.ts +9 -0
- package/dist/_legacy/blackboard/domains/tkg/ObserverReflector.d.ts +114 -0
- package/dist/_legacy/blackboard/domains/tkg/index.d.ts +4 -0
- package/dist/_legacy/blackboard/domains/voting/VotingSessionStore.d.ts +14 -0
- package/dist/_legacy/blackboard/domains/voting/index.d.ts +3 -0
- package/dist/_legacy/blackboard/domains/voting/types.d.ts +32 -0
- package/dist/_legacy/blackboard/events/event-bus.d.ts +254 -0
- package/dist/_legacy/blackboard/events/event-factory.d.ts +80 -0
- package/dist/_legacy/blackboard/events/index.d.ts +17 -0
- package/dist/_legacy/blackboard/events/types.d.ts +554 -0
- package/dist/_legacy/blackboard/snapshot/compression.d.ts +170 -0
- package/dist/_legacy/blackboard/snapshot/id-utils.d.ts +20 -0
- package/dist/_legacy/blackboard/snapshot/index.d.ts +21 -0
- package/dist/_legacy/blackboard/snapshot/serializer.d.ts +123 -0
- package/dist/_legacy/blackboard/snapshot/snapshot-comparer.d.ts +102 -0
- package/dist/_legacy/blackboard/snapshot/snapshot-creator.d.ts +49 -0
- package/dist/_legacy/blackboard/snapshot/snapshot-manager.d.ts +253 -0
- package/dist/_legacy/blackboard/snapshot/snapshot-restorer.d.ts +54 -0
- package/dist/_legacy/blackboard/snapshot/snapshot-serializer.d.ts +45 -0
- package/dist/_legacy/blackboard/snapshot/snapshot-validator.d.ts +55 -0
- package/dist/_legacy/blackboard/snapshot/type-guards.d.ts +12 -0
- package/dist/_legacy/blackboard/snapshot/types.d.ts +151 -0
- package/dist/_legacy/blackboard/snapshot/utils.d.ts +20 -0
- package/dist/_legacy/blackboard/types/agent.d.ts +89 -0
- package/dist/_legacy/blackboard/types/base.d.ts +213 -0
- package/dist/_legacy/blackboard/types/blackboard.d.ts +217 -0
- package/dist/_legacy/blackboard/types/decision.d.ts +260 -0
- package/dist/_legacy/blackboard/types/index.d.ts +12 -0
- package/dist/_legacy/blackboard/types/knowledge.d.ts +224 -0
- package/dist/_legacy/blackboard/types/message.d.ts +162 -0
- package/dist/_legacy/blackboard/types/task.d.ts +154 -0
- package/dist/_legacy/blackboard/types/tkg.d.ts +189 -0
- package/dist/_legacy/blackboard/workflow/meeting-state-machine/MeetingStateMachine.d.ts +22 -0
- package/dist/_legacy/blackboard/workflow/meeting-state-machine/types.d.ts +30 -0
- package/dist/_legacy/cli-runtime/runtime/agent-registry.d.ts +33 -0
- package/dist/_legacy/cli-runtime/runtime/blackboard.d.ts +41 -0
- package/dist/_legacy/cli-runtime/runtime/context-builder.d.ts +88 -0
- package/dist/_legacy/cli-runtime/runtime/retry-policy.d.ts +8 -0
- package/dist/_legacy/cli-runtime/runtime/step-executor.d.ts +33 -0
- package/dist/_legacy/cli-runtime/runtime/types.d.ts +12 -0
- package/dist/_legacy/cli-runtime/runtime/utils.d.ts +2 -0
- package/dist/_legacy/database/src/duckdb-client.d.ts +178 -0
- package/dist/_legacy/workflow/errors/diagnosis.d.ts +32 -0
- package/dist/_legacy/workflow/errors/index.d.ts +52 -0
- package/dist/_legacy/workflow/graph/index.d.ts +57 -0
- package/dist/_legacy/workflow/index.d.ts +9 -0
- package/dist/_legacy/workflow/parser/workflow-parser.d.ts +13 -0
- package/dist/_legacy/workflow/resolver/dependency-resolver.d.ts +83 -0
- package/dist/_legacy/workflow/types/workflow.d.ts +173 -0
- package/dist/_legacy/workflow/utils.d.ts +2 -0
- package/dist/_legacy/workflow/validator/workflow-validator.d.ts +71 -0
- package/dist/artifacts/index.d.ts +2 -0
- package/dist/artifacts/local-file-artifact-store.d.ts +22 -0
- package/dist/artifacts/types.d.ts +19 -0
- package/dist/audit/AuditReplay.d.ts +4 -0
- package/dist/audit/AuditStore.d.ts +13 -0
- package/dist/audit/AuditTrail.d.ts +28 -0
- package/dist/audit/DefaultAuditRecorder.d.ts +10 -0
- package/dist/audit/EventBusAdapter.d.ts +12 -0
- package/dist/audit/InMemoryAuditStore.d.ts +9 -0
- package/dist/audit/ReExecutionDiffReport.d.ts +24 -0
- package/dist/audit/ReExecutionPlanner.d.ts +30 -0
- package/dist/audit/ReExecutionRuntime.d.ts +35 -0
- package/dist/audit/database-api.d.ts +32 -0
- package/dist/audit/database-index.d.ts +5 -0
- package/dist/audit/event-bus.d.ts +1 -0
- package/dist/audit/event-factory.d.ts +1 -0
- package/dist/audit/index.d.ts +12 -0
- package/dist/audit/testing.d.ts +15 -0
- package/dist/audit/tkg/InMemoryTKG.d.ts +1 -0
- package/dist/audit/tkg/JsonFileReflectorStateStore.d.ts +1 -0
- package/dist/audit/tkg/ObserverReflector.d.ts +1 -0
- package/dist/audit/tkg/index.d.ts +1 -0
- package/dist/audit/types.d.ts +23 -0
- package/dist/blackboard/core/accessors/decisions-accessor.d.ts +190 -0
- package/dist/blackboard/core/accessors/index.d.ts +7 -0
- package/dist/blackboard/core/accessors/knowledge-accessor.d.ts +154 -0
- package/dist/blackboard/core/accessors/state-accessor.d.ts +173 -0
- package/dist/blackboard/core/blackboard-events.d.ts +105 -0
- package/dist/blackboard/core/blackboard.d.ts +286 -0
- package/dist/blackboard/core/id-generator.d.ts +53 -0
- package/dist/blackboard/core/immutable.d.ts +45 -0
- package/dist/blackboard/core/index.d.ts +13 -0
- package/dist/blackboard/core/path-utils.d.ts +75 -0
- package/dist/blackboard/core/tkg.d.ts +50 -0
- package/dist/blackboard/core/versioning.d.ts +80 -0
- package/dist/blackboard/events/event-bus.d.ts +254 -0
- package/dist/blackboard/events/event-factory.d.ts +80 -0
- package/dist/blackboard/events/index.d.ts +17 -0
- package/dist/blackboard/events/types.d.ts +554 -0
- package/dist/blackboard/index.d.ts +20 -0
- package/dist/blackboard/observer-reflector.d.ts +114 -0
- package/dist/blackboard/snapshot/compression.d.ts +170 -0
- package/dist/blackboard/snapshot/id-utils.d.ts +20 -0
- package/dist/blackboard/snapshot/index.d.ts +21 -0
- package/dist/blackboard/snapshot/serializer.d.ts +123 -0
- package/dist/blackboard/snapshot/snapshot-comparer.d.ts +102 -0
- package/dist/blackboard/snapshot/snapshot-creator.d.ts +49 -0
- package/dist/blackboard/snapshot/snapshot-manager.d.ts +253 -0
- package/dist/blackboard/snapshot/snapshot-restorer.d.ts +54 -0
- package/dist/blackboard/snapshot/snapshot-serializer.d.ts +45 -0
- package/dist/blackboard/snapshot/snapshot-validator.d.ts +55 -0
- package/dist/blackboard/snapshot/type-guards.d.ts +12 -0
- package/dist/blackboard/snapshot/types.d.ts +151 -0
- package/dist/blackboard/snapshot/utils.d.ts +20 -0
- package/dist/blackboard/types/agent.d.ts +89 -0
- package/dist/blackboard/types/base.d.ts +213 -0
- package/dist/blackboard/types/blackboard.d.ts +217 -0
- package/dist/blackboard/types/decision.d.ts +260 -0
- package/dist/blackboard/types/index.d.ts +12 -0
- package/dist/blackboard/types/knowledge.d.ts +224 -0
- package/dist/blackboard/types/message.d.ts +162 -0
- package/dist/blackboard/types/task.d.ts +154 -0
- package/dist/blackboard/types/tkg.d.ts +189 -0
- package/dist/cell/ActorPool.d.ts +1 -0
- package/dist/cell/AgentFactory.d.ts +1 -0
- package/dist/cell/AgentRegistry.d.ts +1 -0
- package/dist/cell/BaseActor.d.ts +1 -0
- package/dist/cell/CellContext.d.ts +39 -0
- package/dist/cell/CellManager.d.ts +80 -0
- package/dist/cell/ExecutionCell.d.ts +44 -0
- package/dist/cell/PoolManager.d.ts +1 -0
- package/dist/cell/actor-types/action.d.ts +65 -0
- package/dist/cell/actor-types/actor.d.ts +251 -0
- package/dist/cell/actor-types/blackboard.d.ts +46 -0
- package/dist/cell/actor-types/crypto.d.ts +6 -0
- package/dist/cell/actor-types/index.d.ts +12 -0
- package/dist/cell/actor-types/message.d.ts +209 -0
- package/dist/cell/actor-types/metrics.d.ts +43 -0
- package/dist/cell/actor-types/observation.d.ts +45 -0
- package/dist/cell/actor-types/result.d.ts +110 -0
- package/dist/cell/agents/AnalystCellAgent.d.ts +2 -0
- package/dist/cell/agents/BaseRuntimeAgent.d.ts +2 -0
- package/dist/cell/agents/DirectorCellAgent.d.ts +2 -0
- package/dist/cell/agents/ExecutorCellAgent.d.ts +2 -0
- package/dist/cell/agents/VerifierCellAgent.d.ts +2 -0
- package/dist/cell/agents/index.d.ts +5 -0
- package/dist/cell/index.d.ts +9 -0
- package/dist/cell/internal/ActorRunnerAdapter.d.ts +2 -0
- package/dist/cell/internal/CellActorFactory.d.ts +2 -0
- package/dist/cell/internal/NoOpRuntimeBus.d.ts +2 -0
- package/dist/cell/internal/delay.d.ts +1 -0
- package/dist/cell/pool-index.d.ts +1 -0
- package/dist/cell/types.d.ts +47 -0
- package/dist/checkpoint/CheckpointFactoryRegistry.d.ts +16 -0
- package/dist/checkpoint/CheckpointManager.d.ts +41 -0
- package/dist/checkpoint/index.d.ts +5 -0
- package/dist/checkpoint/policy-hash.d.ts +11 -0
- package/dist/consensus/ConsensusGate.d.ts +83 -0
- package/dist/consensus/ConsensusRuleEngine.d.ts +1 -0
- package/dist/consensus/agenda/AgendaStore.d.ts +1 -0
- package/dist/consensus/agenda/events.d.ts +1 -0
- package/dist/consensus/agenda/index.d.ts +1 -0
- package/dist/consensus/agenda/types.d.ts +1 -0
- package/dist/consensus/index.d.ts +2 -0
- package/dist/consensus/types.d.ts +1 -0
- package/dist/consensus/voting/VotingSessionStore.d.ts +1 -0
- package/dist/consensus/voting/index.d.ts +1 -0
- package/dist/consensus/voting/types.d.ts +1 -0
- package/dist/errors/OboraErrorCode.d.ts +28 -0
- package/dist/errors/index.d.ts +1 -0
- package/dist/gates/GateAssignment.d.ts +28 -0
- package/dist/gates/MultiStageApproval.d.ts +74 -0
- package/dist/gates/SLAManager.d.ts +21 -0
- package/dist/gates/index.d.ts +4 -0
- package/dist/gates/types.d.ts +19 -0
- package/dist/index.cjs +26588 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.js +26330 -0
- package/dist/index.js.map +1 -0
- package/dist/judgment/JudgmentEngine.d.ts +24 -0
- package/dist/judgment/JudgmentNormalizer.d.ts +37 -0
- package/dist/judgment/JudgmentPolicy.d.ts +74 -0
- package/dist/judgment/JudgmentReporter.d.ts +70 -0
- package/dist/judgment/OperationalLogger.d.ts +68 -0
- package/dist/judgment/index.d.ts +6 -0
- package/dist/judgment/types.d.ts +42 -0
- package/dist/orchestrator/ExecutionContextBuilder.d.ts +1 -0
- package/dist/orchestrator/RuntimeOrchestrator.d.ts +94 -0
- package/dist/orchestrator/StepScheduler.d.ts +2 -0
- package/dist/orchestrator/index.d.ts +4 -0
- package/dist/orchestrator/types.d.ts +80 -0
- package/dist/orchestrator/utils.d.ts +1 -0
- package/dist/patterns/CustomPatternAPI.d.ts +10 -0
- package/dist/patterns/PatternRegistry.d.ts +19 -0
- package/dist/patterns/builtin/BrainstormPattern.d.ts +13 -0
- package/dist/patterns/builtin/CompositePattern.d.ts +11 -0
- package/dist/patterns/builtin/ConsensusPattern.d.ts +17 -0
- package/dist/patterns/builtin/DiscussionPattern.d.ts +13 -0
- package/dist/patterns/builtin/FanOutFanInPattern.d.ts +21 -0
- package/dist/patterns/builtin/PeerReviewPattern.d.ts +40 -0
- package/dist/patterns/builtin/PipelinePattern.d.ts +6 -0
- package/dist/patterns/builtin/RedBluePattern.d.ts +13 -0
- package/dist/patterns/builtin/SupervisorPattern.d.ts +13 -0
- package/dist/patterns/builtin/discussion/MeetingStateMachine.d.ts +1 -0
- package/dist/patterns/builtin/discussion/index.d.ts +2 -0
- package/dist/patterns/builtin/discussion/types.d.ts +1 -0
- package/dist/patterns/examples/OxfordDebatePattern.d.ts +11 -0
- package/dist/patterns/examples/index.d.ts +1 -0
- package/dist/patterns/index.d.ts +14 -0
- package/dist/patterns/resolveCustomPattern.d.ts +22 -0
- package/dist/patterns/types.d.ts +252 -0
- package/dist/plugins/PluginLoader.d.ts +16 -0
- package/dist/plugins/PluginRegistry.d.ts +15 -0
- package/dist/plugins/builtins.d.ts +137 -0
- package/dist/plugins/index.d.ts +5 -0
- package/dist/plugins/types.d.ts +52 -0
- package/dist/plugins/validator.d.ts +3 -0
- package/dist/policy/DefaultPolicyEngine.d.ts +43 -0
- package/dist/policy/DynamicPolicyContext.d.ts +21 -0
- package/dist/policy/DynamicQuotaEvaluator.d.ts +9 -0
- package/dist/policy/DynamicToolPolicy.d.ts +10 -0
- package/dist/policy/PolicyEngine.d.ts +14 -0
- package/dist/policy/PolicyLoader.d.ts +3 -0
- package/dist/policy/expressions/ExpressionEvaluator.d.ts +37 -0
- package/dist/policy/expressions/ExpressionParser.d.ts +35 -0
- package/dist/policy/expressions/constants.d.ts +5 -0
- package/dist/policy/expressions/index.d.ts +2 -0
- package/dist/policy/index.d.ts +9 -0
- package/dist/policy/rules/GateRule.d.ts +7 -0
- package/dist/policy/rules/ResourceRule.d.ts +7 -0
- package/dist/policy/rules/SandboxRule.d.ts +7 -0
- package/dist/policy/rules/ToolRule.d.ts +23 -0
- package/dist/policy/rules/index.d.ts +4 -0
- package/dist/policy/types.d.ts +156 -0
- package/dist/recovery/RecoveryEngine.d.ts +11 -0
- package/dist/recovery/RetryStrategy.d.ts +2 -0
- package/dist/recovery/SupervisionTree.d.ts +1 -0
- package/dist/recovery/index.d.ts +4 -0
- package/dist/recovery/types.d.ts +103 -0
- package/dist/state/RuntimeBlackboardCompat.d.ts +1 -0
- package/dist/state/StateBinder.d.ts +40 -0
- package/dist/state/StateManager.d.ts +1 -0
- package/dist/state/accessors/decisions-accessor.d.ts +1 -0
- package/dist/state/accessors/index.d.ts +1 -0
- package/dist/state/accessors/knowledge-accessor.d.ts +1 -0
- package/dist/state/accessors/state-accessor.d.ts +1 -0
- package/dist/state/blackboard-events.d.ts +1 -0
- package/dist/state/core-index.d.ts +1 -0
- package/dist/state/id-generator.d.ts +1 -0
- package/dist/state/immutable.d.ts +1 -0
- package/dist/state/index.d.ts +6 -0
- package/dist/state/path-utils.d.ts +1 -0
- package/dist/state/snapshot/compression.d.ts +1 -0
- package/dist/state/snapshot/id-utils.d.ts +1 -0
- package/dist/state/snapshot/index.d.ts +1 -0
- package/dist/state/snapshot/serializer.d.ts +1 -0
- package/dist/state/snapshot/snapshot-comparer.d.ts +1 -0
- package/dist/state/snapshot/snapshot-creator.d.ts +1 -0
- package/dist/state/snapshot/snapshot-manager.d.ts +1 -0
- package/dist/state/snapshot/snapshot-restorer.d.ts +1 -0
- package/dist/state/snapshot/snapshot-serializer.d.ts +1 -0
- package/dist/state/snapshot/snapshot-validator.d.ts +1 -0
- package/dist/state/snapshot/type-guards.d.ts +1 -0
- package/dist/state/snapshot/types.d.ts +1 -0
- package/dist/state/snapshot/utils.d.ts +1 -0
- package/dist/state/tkg.d.ts +1 -0
- package/dist/state/types/agent.d.ts +1 -0
- package/dist/state/types/base.d.ts +1 -0
- package/dist/state/types/blackboard.d.ts +1 -0
- package/dist/state/types/decision.d.ts +1 -0
- package/dist/state/types/index.d.ts +1 -0
- package/dist/state/types/knowledge.d.ts +1 -0
- package/dist/state/types/message.d.ts +1 -0
- package/dist/state/types/task.d.ts +1 -0
- package/dist/state/types/tkg.d.ts +1 -0
- package/dist/state/versioning.d.ts +1 -0
- package/dist/storage/index.d.ts +3 -0
- package/dist/storage/inmemory-adapter.d.ts +27 -0
- package/dist/storage/sqlite-adapter.d.ts +43 -0
- package/dist/storage/types.d.ts +129 -0
- package/package.json +76 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module result
|
|
3
|
+
* @description Result 타입 정의 - Action 수행 결과
|
|
4
|
+
*/
|
|
5
|
+
import type { ActionId } from "./action";
|
|
6
|
+
import type { ActorId } from "./actor";
|
|
7
|
+
/**
|
|
8
|
+
* Result 고유 ID 타입
|
|
9
|
+
* @description 브랜드 타입을 사용하여 타입 안전성을 확보
|
|
10
|
+
*/
|
|
11
|
+
export type ResultId = string & {
|
|
12
|
+
readonly __brand: "ResultId";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Result 상태
|
|
16
|
+
* @description 행동 수행 결과의 상태
|
|
17
|
+
*/
|
|
18
|
+
export type ResultStatus = "success" | "failure" | "partial";
|
|
19
|
+
/**
|
|
20
|
+
* Result 메트릭
|
|
21
|
+
* @description 행동 수행의 성능 메트릭
|
|
22
|
+
*/
|
|
23
|
+
export interface ResultMetrics {
|
|
24
|
+
/** 실행 시간 (밀리초) */
|
|
25
|
+
duration: number;
|
|
26
|
+
/** 메모리 사용량 (바이트) */
|
|
27
|
+
memoryUsage?: number;
|
|
28
|
+
/** 추가 메트릭 */
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Result 인터페이스
|
|
33
|
+
* @description Action 수행 결과
|
|
34
|
+
*/
|
|
35
|
+
export interface Result {
|
|
36
|
+
/** 고유 식별자 */
|
|
37
|
+
readonly id: ResultId;
|
|
38
|
+
/** 관련 Action ID */
|
|
39
|
+
actionId: ActionId;
|
|
40
|
+
/** 결과를 생성한 액터 ID */
|
|
41
|
+
actorId: ActorId;
|
|
42
|
+
/** 결과 생성 시간 */
|
|
43
|
+
timestamp: Date;
|
|
44
|
+
/** 결과 상태 */
|
|
45
|
+
status: ResultStatus;
|
|
46
|
+
/** 출력 데이터 (성공 시) */
|
|
47
|
+
output?: unknown;
|
|
48
|
+
/** 오류 정보 (실패 시) - 문자열 형태 */
|
|
49
|
+
error?: string;
|
|
50
|
+
/** 성능 메트릭 */
|
|
51
|
+
metrics?: ResultMetrics;
|
|
52
|
+
/** 보드에 기록할 데이터 */
|
|
53
|
+
toRecord?: {
|
|
54
|
+
section: "state" | "knowledge" | "decisions";
|
|
55
|
+
data: unknown;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Result ID 생성 함수
|
|
60
|
+
* @param id - 원본 문자열 ID
|
|
61
|
+
* @returns 브랜드 타입이 적용된 ResultId
|
|
62
|
+
* @example
|
|
63
|
+
* ```typescript
|
|
64
|
+
* const resultId = createResultId('result-001');
|
|
65
|
+
* // 타입: ResultId
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export declare function createResultId(id: string): ResultId;
|
|
69
|
+
/**
|
|
70
|
+
* Result ID 유효성 검사
|
|
71
|
+
* @param value - 확인할 값
|
|
72
|
+
* @returns 유효한 ResultId 여부
|
|
73
|
+
*/
|
|
74
|
+
export declare function isValidResultId(value: unknown): value is ResultId;
|
|
75
|
+
/**
|
|
76
|
+
* 성공 Result 생성 함수
|
|
77
|
+
* @param actionId - Action ID
|
|
78
|
+
* @param actorId - 액터 ID
|
|
79
|
+
* @param output - 출력 데이터
|
|
80
|
+
* @param duration - 실행 시간 (밀리초)
|
|
81
|
+
* @returns 생성된 성공 Result 객체
|
|
82
|
+
* @example
|
|
83
|
+
* ```typescript
|
|
84
|
+
* const result = createSuccessResult(
|
|
85
|
+
* createActionId('action-001'),
|
|
86
|
+
* createActorId('actor-001'),
|
|
87
|
+
* { data: 'analysis result' },
|
|
88
|
+
* 100
|
|
89
|
+
* );
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
export declare function createSuccessResult(actionId: ActionId, actorId: ActorId, output: unknown, duration: number): Result;
|
|
93
|
+
/**
|
|
94
|
+
* 실패 Result 생성 함수
|
|
95
|
+
* @param actionId - Action ID
|
|
96
|
+
* @param actorId - 액터 ID
|
|
97
|
+
* @param error - 오류 메시지
|
|
98
|
+
* @param duration - 실행 시간 (밀리초)
|
|
99
|
+
* @returns 생성된 실패 Result 객체
|
|
100
|
+
* @example
|
|
101
|
+
* ```typescript
|
|
102
|
+
* const result = createFailureResult(
|
|
103
|
+
* createActionId('action-001'),
|
|
104
|
+
* createActorId('actor-001'),
|
|
105
|
+
* 'Analysis failed',
|
|
106
|
+
* 50
|
|
107
|
+
* );
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
export declare function createFailureResult(actionId: ActionId, actorId: ActorId, error: string, duration: number): Result;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseAgent, BaseAgentConfig, AgentContext, Task, AnalystOutput } from "./base-agent";
|
|
2
|
+
/**
|
|
3
|
+
* Analyst 에이전트
|
|
4
|
+
* 역할: 데이터 분석, 위험 평가, 패턴 인식
|
|
5
|
+
*
|
|
6
|
+
* 입력: AnalystInput
|
|
7
|
+
* 출력: AnalystOutput
|
|
8
|
+
*/
|
|
9
|
+
export declare class AnalystAgent extends BaseAgent {
|
|
10
|
+
constructor(config: Omit<BaseAgentConfig, "role">);
|
|
11
|
+
protected getDefaultSystemPrompt(): string;
|
|
12
|
+
protected act(action: unknown, context: AgentContext): Promise<unknown>;
|
|
13
|
+
protected parseResponse(content: string, task: Task): AnalystOutput;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 분석 에이전트 생성
|
|
17
|
+
*/
|
|
18
|
+
export declare function createAnalystAgent(id: string, llm: BaseAgentConfig["llm"]): AnalystAgent;
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
import { type AgentEvent, type AgentTool } from "@mariozechner/pi-agent-core";
|
|
2
|
+
import { LLMAdapter, ChatMessage } from "../llm/adapter";
|
|
3
|
+
import type { Blackboard } from "../../blackboard/core/blackboard.js";
|
|
4
|
+
import type { AgentId } from "../types";
|
|
5
|
+
export type { AgentId };
|
|
6
|
+
export declare enum AgentRole {
|
|
7
|
+
ANALYST = "analyst",
|
|
8
|
+
EXECUTOR = "executor",
|
|
9
|
+
VERIFIER = "verifier",
|
|
10
|
+
DIRECTOR = "director"
|
|
11
|
+
}
|
|
12
|
+
export declare enum AgentState {
|
|
13
|
+
IDLE = "idle",
|
|
14
|
+
THINKING = "thinking",
|
|
15
|
+
ACTING = "acting",
|
|
16
|
+
WAITING = "waiting",
|
|
17
|
+
ERROR = "error"
|
|
18
|
+
}
|
|
19
|
+
export declare enum MeetingPhase {
|
|
20
|
+
OPENING = "opening",
|
|
21
|
+
DISCUSSION = "discussion",
|
|
22
|
+
VOTING = "voting",
|
|
23
|
+
CONSENSUS = "consensus",
|
|
24
|
+
CLOSING = "closing",
|
|
25
|
+
ESCALATION = "escalation"
|
|
26
|
+
}
|
|
27
|
+
export interface AgentStatus {
|
|
28
|
+
id: AgentId;
|
|
29
|
+
role: AgentRole;
|
|
30
|
+
state: AgentState;
|
|
31
|
+
lastActivity: Date;
|
|
32
|
+
currentTask?: string;
|
|
33
|
+
errorCount: number;
|
|
34
|
+
}
|
|
35
|
+
export interface AgentContext {
|
|
36
|
+
sessionId: string;
|
|
37
|
+
board: Blackboard;
|
|
38
|
+
currentTask?: Task;
|
|
39
|
+
history: ChatMessage[];
|
|
40
|
+
signal?: AbortSignal;
|
|
41
|
+
}
|
|
42
|
+
export interface Task {
|
|
43
|
+
id: string;
|
|
44
|
+
type: string;
|
|
45
|
+
description: string;
|
|
46
|
+
input: Record<string, unknown>;
|
|
47
|
+
priority: number;
|
|
48
|
+
deadline?: Date;
|
|
49
|
+
metadata?: Record<string, unknown>;
|
|
50
|
+
}
|
|
51
|
+
export interface TaskResult {
|
|
52
|
+
taskId: string;
|
|
53
|
+
success: boolean;
|
|
54
|
+
output: unknown;
|
|
55
|
+
error?: Error;
|
|
56
|
+
duration: number;
|
|
57
|
+
tokensUsed: {
|
|
58
|
+
prompt: number;
|
|
59
|
+
completion: number;
|
|
60
|
+
total: number;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export interface RuntimeExtensions {
|
|
64
|
+
tools?: AgentTool[];
|
|
65
|
+
systemPromptAppend?: string;
|
|
66
|
+
}
|
|
67
|
+
export declare abstract class BaseAgent {
|
|
68
|
+
readonly id: AgentId;
|
|
69
|
+
readonly role: AgentRole;
|
|
70
|
+
protected state: AgentState;
|
|
71
|
+
protected llm: LLMAdapter;
|
|
72
|
+
protected systemPrompt: string;
|
|
73
|
+
protected runtimeTools: AgentTool[];
|
|
74
|
+
protected runtimeSystemPromptAppend: string;
|
|
75
|
+
protected errorCount: number;
|
|
76
|
+
protected maxErrors: number;
|
|
77
|
+
protected thinkMaxTokens: number;
|
|
78
|
+
protected executeMaxTokens: number;
|
|
79
|
+
private readonly BLOCKED_PATTERNS;
|
|
80
|
+
private coreAgent?;
|
|
81
|
+
private unsubscribe?;
|
|
82
|
+
private currentContext?;
|
|
83
|
+
private currentTask?;
|
|
84
|
+
private latestUsage;
|
|
85
|
+
constructor(config: BaseAgentConfig);
|
|
86
|
+
execute(task: Task, context: AgentContext): Promise<TaskResult>;
|
|
87
|
+
continue(): Promise<void>;
|
|
88
|
+
subscribe(listener: (event: AgentEvent) => void): () => void;
|
|
89
|
+
protected observe(context: AgentContext): Promise<Record<string, unknown>>;
|
|
90
|
+
protected think(task: Task, observation: Record<string, unknown>, context: AgentContext): Promise<{
|
|
91
|
+
action: unknown;
|
|
92
|
+
usage: {
|
|
93
|
+
promptTokens: number;
|
|
94
|
+
completionTokens: number;
|
|
95
|
+
totalTokens: number;
|
|
96
|
+
};
|
|
97
|
+
}>;
|
|
98
|
+
protected abstract act(action: unknown, context: AgentContext): Promise<unknown>;
|
|
99
|
+
protected report(task: Task, result: unknown, context: AgentContext): Promise<void>;
|
|
100
|
+
protected buildMessages(task: Task, observation: Record<string, unknown>, context: AgentContext): ChatMessage[];
|
|
101
|
+
protected formatTaskAndObservation(task: Task, observation: Record<string, unknown>): string;
|
|
102
|
+
protected abstract parseResponse(content: string, task: Task): unknown;
|
|
103
|
+
protected abstract getDefaultSystemPrompt(): string;
|
|
104
|
+
configureRuntimeExtensions(extensions: RuntimeExtensions): void;
|
|
105
|
+
clearRuntimeExtensions(): void;
|
|
106
|
+
private getEffectiveSystemPrompt;
|
|
107
|
+
getStatus(): AgentStatus;
|
|
108
|
+
resetErrorCount(): void;
|
|
109
|
+
hasExceededMaxErrors(): boolean;
|
|
110
|
+
private createPiAgent;
|
|
111
|
+
/**
|
|
112
|
+
* Defines tools available to the LLM via pi-agent-core's tool-calling mechanism.
|
|
113
|
+
* These tools are registered with the Agent at creation time and executed
|
|
114
|
+
* by pi-agent-core when the LLM issues tool calls through the API.
|
|
115
|
+
*
|
|
116
|
+
* Security:
|
|
117
|
+
* - file_write/file_read/file_list: Path validated with fs.realpathSync (symlink-safe)
|
|
118
|
+
* - shell_exec: Denylist blocks dangerous command patterns
|
|
119
|
+
*/
|
|
120
|
+
private createAgentTools;
|
|
121
|
+
private createExecutorTools;
|
|
122
|
+
/**
|
|
123
|
+
* Creates a stream function bridge for pi-agent-core's Agent runtime.
|
|
124
|
+
*
|
|
125
|
+
* ARCHITECTURE NOTE - Tool-Calling Loop:
|
|
126
|
+
* The tool execution loop is fully delegated to pi-agent-core's Agent class.
|
|
127
|
+
* This streamFn is called by pi-agent-core on each LLM turn. When the LLM
|
|
128
|
+
* returns tool_calls (stopReason: "toolUse"), pi-agent-core automatically:
|
|
129
|
+
* 1. Executes the matching tool from createAgentTools()
|
|
130
|
+
* 2. Appends the tool result as a "tool" message
|
|
131
|
+
* 3. Calls this streamFn again with the updated message history
|
|
132
|
+
* 4. Repeats until the LLM returns stopReason: "stop"
|
|
133
|
+
*
|
|
134
|
+
* obora-kit does NOT implement its own tool loop — pi-agent-core handles it.
|
|
135
|
+
*/
|
|
136
|
+
private createStreamFn;
|
|
137
|
+
/**
|
|
138
|
+
* Delegates task execution to pi-agent-core's Agent runtime.
|
|
139
|
+
* The Agent.prompt() call triggers the full tool-calling loop internally.
|
|
140
|
+
* See createStreamFn() for the tool loop architecture.
|
|
141
|
+
*/
|
|
142
|
+
private executeWithPiAgent;
|
|
143
|
+
private parseBoardReadParams;
|
|
144
|
+
private parseRoleActionParams;
|
|
145
|
+
private parseBoardWriteParams;
|
|
146
|
+
private parseFileWriteParams;
|
|
147
|
+
private parseFileReadParams;
|
|
148
|
+
private parseFileListParams;
|
|
149
|
+
private parseShellExecParams;
|
|
150
|
+
private isRecord;
|
|
151
|
+
private resolveAndValidatePath;
|
|
152
|
+
private isBlockedShellCommand;
|
|
153
|
+
}
|
|
154
|
+
export interface BaseAgentConfig {
|
|
155
|
+
id?: AgentId;
|
|
156
|
+
role: AgentRole;
|
|
157
|
+
llm: LLMAdapter;
|
|
158
|
+
systemPrompt?: string;
|
|
159
|
+
maxErrors?: number;
|
|
160
|
+
provider?: string;
|
|
161
|
+
model?: string;
|
|
162
|
+
sessionId?: string;
|
|
163
|
+
thinkingLevel?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
164
|
+
enablePiRuntime?: boolean;
|
|
165
|
+
thinkMaxTokens?: number;
|
|
166
|
+
executeMaxTokens?: number;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Analyst 입력 타입
|
|
170
|
+
*/
|
|
171
|
+
export interface AnalystInput {
|
|
172
|
+
type: "analysis";
|
|
173
|
+
content: string;
|
|
174
|
+
goal?: string;
|
|
175
|
+
constraints?: string[];
|
|
176
|
+
resources?: string[];
|
|
177
|
+
previousPlans?: Plan[];
|
|
178
|
+
context?: Record<string, unknown>;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Analyst 출력 타입
|
|
182
|
+
*/
|
|
183
|
+
export interface AnalystOutput {
|
|
184
|
+
type: "analysis";
|
|
185
|
+
content: string;
|
|
186
|
+
summary: string;
|
|
187
|
+
keyFindings: string[];
|
|
188
|
+
recommendations: string[];
|
|
189
|
+
confidence: number;
|
|
190
|
+
reasoning: string;
|
|
191
|
+
sources?: string[];
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Executor 입력 타입
|
|
195
|
+
*/
|
|
196
|
+
export interface ExecutorInput {
|
|
197
|
+
type: "execution";
|
|
198
|
+
content: string;
|
|
199
|
+
taskDescription: string;
|
|
200
|
+
inputs?: Record<string, unknown>;
|
|
201
|
+
expectedOutput?: string;
|
|
202
|
+
tools?: string[];
|
|
203
|
+
context?: Record<string, unknown>;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Executor 출력 타입
|
|
207
|
+
*/
|
|
208
|
+
export interface ExecutorOutput {
|
|
209
|
+
type: "execution";
|
|
210
|
+
content: string;
|
|
211
|
+
action: string;
|
|
212
|
+
tool?: string;
|
|
213
|
+
parameters: Record<string, unknown>;
|
|
214
|
+
steps: string[];
|
|
215
|
+
expectedOutcome: string;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Verifier 입력 타입
|
|
219
|
+
*/
|
|
220
|
+
export interface VerifierInput {
|
|
221
|
+
type: "verification";
|
|
222
|
+
content: string;
|
|
223
|
+
artifact: Artifact;
|
|
224
|
+
criteria?: string[];
|
|
225
|
+
requirements?: string[];
|
|
226
|
+
context?: Record<string, unknown>;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Verifier 출력 타입
|
|
230
|
+
*/
|
|
231
|
+
export interface VerifierOutput {
|
|
232
|
+
type: "verification";
|
|
233
|
+
content: string;
|
|
234
|
+
passed: boolean;
|
|
235
|
+
score: number;
|
|
236
|
+
checks: VerificationCheck[];
|
|
237
|
+
findings: Finding[];
|
|
238
|
+
suggestions: string[];
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Director 입력 타입
|
|
242
|
+
*/
|
|
243
|
+
export interface DirectorInput {
|
|
244
|
+
type: "coordination";
|
|
245
|
+
content: string;
|
|
246
|
+
agenda: string;
|
|
247
|
+
participants: string[];
|
|
248
|
+
currentOpinions?: string[];
|
|
249
|
+
conflict?: Conflict;
|
|
250
|
+
context?: Record<string, unknown>;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Director 출력 타입 (스펙 14-ai-agents.md와 일치)
|
|
254
|
+
*/
|
|
255
|
+
export interface DirectorOutput {
|
|
256
|
+
type: "coordination";
|
|
257
|
+
content: string;
|
|
258
|
+
agenda: string;
|
|
259
|
+
participants: string[];
|
|
260
|
+
steps: CoordinationStep[];
|
|
261
|
+
timeline: string[];
|
|
262
|
+
expectedOutcome: string;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* 검증 체크 항목
|
|
266
|
+
*/
|
|
267
|
+
export interface VerificationCheck {
|
|
268
|
+
name: string;
|
|
269
|
+
description: string;
|
|
270
|
+
status: "passed" | "failed" | "skipped";
|
|
271
|
+
evidence: string;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* 발견된 이슈
|
|
275
|
+
*/
|
|
276
|
+
export interface Finding {
|
|
277
|
+
id: string;
|
|
278
|
+
type: "error" | "warning" | "info";
|
|
279
|
+
description: string;
|
|
280
|
+
location?: string;
|
|
281
|
+
severity: "low" | "medium" | "high" | "critical";
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* 조율 단계
|
|
285
|
+
*/
|
|
286
|
+
export interface CoordinationStep {
|
|
287
|
+
step: number;
|
|
288
|
+
description: string;
|
|
289
|
+
assignee?: string;
|
|
290
|
+
dependencies: string[];
|
|
291
|
+
estimatedDuration?: string;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* 갈등 정보
|
|
295
|
+
*/
|
|
296
|
+
export interface Conflict {
|
|
297
|
+
id: string;
|
|
298
|
+
topic: string;
|
|
299
|
+
parties: string[];
|
|
300
|
+
positions: Record<string, string>;
|
|
301
|
+
severity: "minor" | "moderate" | "major";
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* 아티팩트
|
|
305
|
+
*/
|
|
306
|
+
export interface Artifact {
|
|
307
|
+
id: string;
|
|
308
|
+
type: "code" | "document" | "data" | "plan" | "review";
|
|
309
|
+
name: string;
|
|
310
|
+
content: string | Record<string, unknown>;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Plan 타입 (AnalystInput에서 참조)
|
|
314
|
+
*/
|
|
315
|
+
export interface Plan {
|
|
316
|
+
id: string;
|
|
317
|
+
description: string;
|
|
318
|
+
steps: string[];
|
|
319
|
+
status: "draft" | "approved" | "completed";
|
|
320
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseAgent, BaseAgentConfig, AgentContext, Task, DirectorOutput } from "./base-agent";
|
|
2
|
+
/**
|
|
3
|
+
* Director 에이전트
|
|
4
|
+
* 역할: 조율, 진행 관리, 합의 도출
|
|
5
|
+
*
|
|
6
|
+
* 입력: DirectorInput
|
|
7
|
+
* 출력: DirectorOutput
|
|
8
|
+
*/
|
|
9
|
+
export declare class DirectorAgent extends BaseAgent {
|
|
10
|
+
constructor(config: Omit<BaseAgentConfig, "role">);
|
|
11
|
+
protected getDefaultSystemPrompt(): string;
|
|
12
|
+
protected act(action: unknown, context: AgentContext): Promise<unknown>;
|
|
13
|
+
protected parseResponse(content: string, task: Task): DirectorOutput;
|
|
14
|
+
/**
|
|
15
|
+
* 투표 세션 시작
|
|
16
|
+
*/
|
|
17
|
+
startVotingSession(agendaId: string, participants: string[], context: AgentContext): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* 투표 집계
|
|
20
|
+
*/
|
|
21
|
+
tallyVotes(agendaId: string, context: AgentContext): Promise<Record<string, number>>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 디렉터 에이전트 생성
|
|
25
|
+
*/
|
|
26
|
+
export declare function createDirectorAgent(id: string, llm: BaseAgentConfig["llm"]): DirectorAgent;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseAgent, BaseAgentConfig, AgentContext, Task, ExecutorOutput } from "./base-agent";
|
|
2
|
+
import { ToolRegistry } from "../tools";
|
|
3
|
+
/**
|
|
4
|
+
* Executor 에이전트
|
|
5
|
+
* 역할: 작업 실행, API 호출, 파일 처리
|
|
6
|
+
*
|
|
7
|
+
* 입력: ExecutorInput
|
|
8
|
+
* 출력: ExecutorOutput
|
|
9
|
+
*/
|
|
10
|
+
export declare class ExecutorAgent extends BaseAgent {
|
|
11
|
+
private toolRegistry?;
|
|
12
|
+
constructor(config: Omit<BaseAgentConfig, "role"> & {
|
|
13
|
+
toolRegistry?: ToolRegistry;
|
|
14
|
+
});
|
|
15
|
+
protected getDefaultSystemPrompt(): string;
|
|
16
|
+
protected act(action: unknown, context: AgentContext): Promise<unknown>;
|
|
17
|
+
protected parseResponse(content: string, task: Task): ExecutorOutput;
|
|
18
|
+
/**
|
|
19
|
+
* 도구 레지스트리 설정
|
|
20
|
+
*/
|
|
21
|
+
setToolRegistry(registry: ToolRegistry): void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 실행 에이전트 생성
|
|
25
|
+
*/
|
|
26
|
+
export declare function createExecutorAgent(id: string, llm: BaseAgentConfig["llm"], toolRegistry?: ToolRegistry): ExecutorAgent;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BaseAgent } from "./base-agent";
|
|
2
|
+
import type { LLMAdapter } from "../llm/adapter";
|
|
3
|
+
import type { ToolRegistry } from "../tools";
|
|
4
|
+
/**
|
|
5
|
+
* 에이전트 생성 설정
|
|
6
|
+
*/
|
|
7
|
+
export interface CreateAgentConfig {
|
|
8
|
+
id: string;
|
|
9
|
+
role: "analyst" | "executor" | "verifier" | "director";
|
|
10
|
+
llm: LLMAdapter;
|
|
11
|
+
toolRegistry?: ToolRegistry;
|
|
12
|
+
systemPrompt?: string;
|
|
13
|
+
provider?: string;
|
|
14
|
+
model?: string;
|
|
15
|
+
sessionId?: string;
|
|
16
|
+
enablePiRuntime?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 에이전트 생성
|
|
20
|
+
*/
|
|
21
|
+
export declare function createAgent(config: CreateAgentConfig): BaseAgent;
|
|
22
|
+
/**
|
|
23
|
+
* 에이전트 팀 생성
|
|
24
|
+
*/
|
|
25
|
+
export declare function createAgentTeam(config: Omit<CreateAgentConfig, "id" | "role"> & {
|
|
26
|
+
analysts?: number;
|
|
27
|
+
executors?: number;
|
|
28
|
+
verifiers?: number;
|
|
29
|
+
directors?: number;
|
|
30
|
+
}): BaseAgent[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseAgent, BaseAgentConfig, AgentContext, Task, VerifierOutput } from "./base-agent";
|
|
2
|
+
/**
|
|
3
|
+
* Verifier 에이전트
|
|
4
|
+
* 역할: 결과 검증, 품질 체크, 정확성 확인
|
|
5
|
+
*
|
|
6
|
+
* 입력: VerifierInput
|
|
7
|
+
* 출력: VerifierOutput
|
|
8
|
+
*/
|
|
9
|
+
export declare class VerifierAgent extends BaseAgent {
|
|
10
|
+
constructor(config: Omit<BaseAgentConfig, "role">);
|
|
11
|
+
protected getDefaultSystemPrompt(): string;
|
|
12
|
+
protected act(action: unknown, context: AgentContext): Promise<unknown>;
|
|
13
|
+
protected parseResponse(content: string, task: Task): VerifierOutput;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 검증 에이전트 생성
|
|
17
|
+
*/
|
|
18
|
+
export declare function createVerifierAgent(id: string, llm: BaseAgentConfig["llm"]): VerifierAgent;
|