@nahisaho/katashiro-orchestrator 0.4.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/README.md +152 -0
- package/dist/action-observation-types.d.ts +239 -0
- package/dist/action-observation-types.d.ts.map +1 -0
- package/dist/action-observation-types.js +22 -0
- package/dist/action-observation-types.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/multi-agent-orchestrator.d.ts +147 -0
- package/dist/multi-agent-orchestrator.d.ts.map +1 -0
- package/dist/multi-agent-orchestrator.js +409 -0
- package/dist/multi-agent-orchestrator.js.map +1 -0
- package/dist/task-decomposer.d.ts +113 -0
- package/dist/task-decomposer.d.ts.map +1 -0
- package/dist/task-decomposer.js +530 -0
- package/dist/task-decomposer.js.map +1 -0
- package/dist/tool-registry.d.ts +153 -0
- package/dist/tool-registry.d.ts.map +1 -0
- package/dist/tool-registry.js +416 -0
- package/dist/tool-registry.js.map +1 -0
- package/dist/types.d.ts +272 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +32 -0
- package/dist/types.js.map +1 -0
- package/package.json +55 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KATASHIRO Orchestrator - Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* @fileoverview REQ-009: タスク分解・計画、REQ-006: マルチエージェントオーケストレーション
|
|
5
|
+
* @module @nahisaho/katashiro-orchestrator
|
|
6
|
+
* @since 0.4.0
|
|
7
|
+
*/
|
|
8
|
+
import type { ID, Timestamp } from '@nahisaho/katashiro-core';
|
|
9
|
+
/**
|
|
10
|
+
* タスクの優先度
|
|
11
|
+
*/
|
|
12
|
+
export type TaskPriority = 'critical' | 'high' | 'medium' | 'low';
|
|
13
|
+
/**
|
|
14
|
+
* タスクの状態
|
|
15
|
+
*/
|
|
16
|
+
export type TaskStatus = 'pending' | 'ready' | 'running' | 'completed' | 'failed' | 'cancelled' | 'blocked';
|
|
17
|
+
/**
|
|
18
|
+
* サブタスク定義
|
|
19
|
+
* EARS: When a complex task is received, the system shall decompose it into subtasks
|
|
20
|
+
*/
|
|
21
|
+
export interface SubTask {
|
|
22
|
+
/** サブタスクID */
|
|
23
|
+
readonly id: ID;
|
|
24
|
+
/** サブタスク名 */
|
|
25
|
+
readonly name: string;
|
|
26
|
+
/** 詳細説明 */
|
|
27
|
+
readonly description: string;
|
|
28
|
+
/** 入力データ */
|
|
29
|
+
readonly input: TaskInput;
|
|
30
|
+
/** 期待出力の型定義 */
|
|
31
|
+
readonly expectedOutputSchema?: Record<string, unknown>;
|
|
32
|
+
/** 優先度 */
|
|
33
|
+
readonly priority: TaskPriority;
|
|
34
|
+
/** ステータス */
|
|
35
|
+
status: TaskStatus;
|
|
36
|
+
/** 依存するタスクID(DAG構造) */
|
|
37
|
+
readonly dependencies: readonly ID[];
|
|
38
|
+
/** 推定実行時間(秒) */
|
|
39
|
+
readonly estimatedDuration?: number;
|
|
40
|
+
/** 実行結果 */
|
|
41
|
+
result?: TaskResult;
|
|
42
|
+
/** 作成日時 */
|
|
43
|
+
readonly createdAt: Timestamp;
|
|
44
|
+
/** 更新日時 */
|
|
45
|
+
updatedAt: Timestamp;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* タスク入力
|
|
49
|
+
*/
|
|
50
|
+
export interface TaskInput {
|
|
51
|
+
/** 入力タイプ */
|
|
52
|
+
readonly type: 'text' | 'data' | 'file' | 'url' | 'mixed';
|
|
53
|
+
/** 入力コンテンツ */
|
|
54
|
+
readonly content: unknown;
|
|
55
|
+
/** メタデータ */
|
|
56
|
+
readonly metadata?: Record<string, unknown>;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* タスク実行結果
|
|
60
|
+
*/
|
|
61
|
+
export interface TaskResult {
|
|
62
|
+
/** 成功/失敗 */
|
|
63
|
+
readonly success: boolean;
|
|
64
|
+
/** 出力データ */
|
|
65
|
+
readonly output?: unknown;
|
|
66
|
+
/** エラー情報 */
|
|
67
|
+
readonly error?: TaskError;
|
|
68
|
+
/** 実行時間(ミリ秒) */
|
|
69
|
+
readonly duration: number;
|
|
70
|
+
/** 完了日時 */
|
|
71
|
+
readonly completedAt: Timestamp;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* タスクエラー
|
|
75
|
+
*/
|
|
76
|
+
export interface TaskError {
|
|
77
|
+
/** エラーコード */
|
|
78
|
+
readonly code: string;
|
|
79
|
+
/** エラーメッセージ */
|
|
80
|
+
readonly message: string;
|
|
81
|
+
/** 詳細情報 */
|
|
82
|
+
readonly details?: Record<string, unknown>;
|
|
83
|
+
/** リトライ可能か */
|
|
84
|
+
readonly retryable: boolean;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* タスク実行計画(DAG)
|
|
88
|
+
* EARS: The system shall generate a DAG representing task dependencies
|
|
89
|
+
*/
|
|
90
|
+
export interface ExecutionPlan {
|
|
91
|
+
/** プランID */
|
|
92
|
+
readonly id: ID;
|
|
93
|
+
/** プラン名 */
|
|
94
|
+
readonly name: string;
|
|
95
|
+
/** 元のタスク説明 */
|
|
96
|
+
readonly originalTask: string;
|
|
97
|
+
/** サブタスク一覧 */
|
|
98
|
+
readonly tasks: SubTask[];
|
|
99
|
+
/** 実行順序(トポロジカルソート済み) */
|
|
100
|
+
readonly executionOrder: readonly ID[];
|
|
101
|
+
/** 並列実行可能なタスクグループ */
|
|
102
|
+
readonly parallelGroups: readonly (readonly ID[])[];
|
|
103
|
+
/** 総推定時間(秒) */
|
|
104
|
+
readonly estimatedTotalDuration: number;
|
|
105
|
+
/** プラン作成日時 */
|
|
106
|
+
readonly createdAt: Timestamp;
|
|
107
|
+
/** プラン状態 */
|
|
108
|
+
status: 'draft' | 'approved' | 'executing' | 'completed' | 'failed';
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* タスク分解設定
|
|
112
|
+
*/
|
|
113
|
+
export interface DecompositionConfig {
|
|
114
|
+
/** 最大サブタスク数 */
|
|
115
|
+
readonly maxSubTasks: number;
|
|
116
|
+
/** 最小サブタスク粒度(推定実行時間秒) */
|
|
117
|
+
readonly minTaskGranularity: number;
|
|
118
|
+
/** 依存関係の深さ上限 */
|
|
119
|
+
readonly maxDependencyDepth: number;
|
|
120
|
+
/** 並列実行を許可 */
|
|
121
|
+
readonly allowParallel: boolean;
|
|
122
|
+
/** 同時実行タスク数上限(allowParallel=true時に有効) */
|
|
123
|
+
readonly maxConcurrentTasks: number;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* デフォルト分解設定
|
|
127
|
+
*/
|
|
128
|
+
export declare const DEFAULT_DECOMPOSITION_CONFIG: DecompositionConfig;
|
|
129
|
+
/**
|
|
130
|
+
* エージェントのロール
|
|
131
|
+
*/
|
|
132
|
+
export type AgentRole = 'orchestrator' | 'researcher' | 'analyzer' | 'generator' | 'validator' | 'executor' | 'custom';
|
|
133
|
+
/**
|
|
134
|
+
* エージェントの状態
|
|
135
|
+
*/
|
|
136
|
+
export type AgentState = 'idle' | 'initializing' | 'working' | 'waiting' | 'error' | 'terminated';
|
|
137
|
+
/**
|
|
138
|
+
* サブエージェント定義
|
|
139
|
+
* EARS: The system shall spawn independent sub-agents for each subtask
|
|
140
|
+
*/
|
|
141
|
+
export interface SubAgent {
|
|
142
|
+
/** エージェントID */
|
|
143
|
+
readonly id: ID;
|
|
144
|
+
/** エージェント名 */
|
|
145
|
+
readonly name: string;
|
|
146
|
+
/** ロール */
|
|
147
|
+
readonly role: AgentRole;
|
|
148
|
+
/** 現在の状態 */
|
|
149
|
+
state: AgentState;
|
|
150
|
+
/** 担当タスクID */
|
|
151
|
+
readonly assignedTaskId?: ID;
|
|
152
|
+
/** エージェント固有のコンテキスト(独立) */
|
|
153
|
+
context: AgentContext;
|
|
154
|
+
/** 利用可能なツール */
|
|
155
|
+
readonly availableTools: readonly string[];
|
|
156
|
+
/** 作成日時 */
|
|
157
|
+
readonly createdAt: Timestamp;
|
|
158
|
+
/** 最終アクティビティ */
|
|
159
|
+
lastActivity: Timestamp;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* エージェントコンテキスト(独立・分離)
|
|
163
|
+
* EARS: Each sub-agent shall maintain an independent context to avoid context pollution
|
|
164
|
+
*/
|
|
165
|
+
export interface AgentContext {
|
|
166
|
+
/** コンテキストID */
|
|
167
|
+
readonly id: ID;
|
|
168
|
+
/** 親エージェントID(オーケストレーターから継承した情報用) */
|
|
169
|
+
readonly parentId?: ID;
|
|
170
|
+
/** タスク固有の情報 */
|
|
171
|
+
taskInfo: Record<string, unknown>;
|
|
172
|
+
/** 会話履歴(このエージェント固有) */
|
|
173
|
+
conversationHistory: ConversationMessage[];
|
|
174
|
+
/** 中間結果 */
|
|
175
|
+
intermediateResults: unknown[];
|
|
176
|
+
/** メモリ使用量(トークン概算) */
|
|
177
|
+
memoryUsage: number;
|
|
178
|
+
/** 最大メモリ(トークン) */
|
|
179
|
+
readonly maxMemory: number;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* 会話メッセージ
|
|
183
|
+
*/
|
|
184
|
+
export interface ConversationMessage {
|
|
185
|
+
/** メッセージID */
|
|
186
|
+
readonly id: ID;
|
|
187
|
+
/** 送信者ロール */
|
|
188
|
+
readonly role: 'user' | 'assistant' | 'system' | 'tool';
|
|
189
|
+
/** メッセージ内容 */
|
|
190
|
+
readonly content: string;
|
|
191
|
+
/** タイムスタンプ */
|
|
192
|
+
readonly timestamp: Timestamp;
|
|
193
|
+
/** ツール呼び出し情報(roleがtoolの場合) */
|
|
194
|
+
readonly toolCall?: ToolCallInfo;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* ツール呼び出し情報
|
|
198
|
+
*/
|
|
199
|
+
export interface ToolCallInfo {
|
|
200
|
+
/** ツール名 */
|
|
201
|
+
readonly toolName: string;
|
|
202
|
+
/** 引数 */
|
|
203
|
+
readonly arguments: Record<string, unknown>;
|
|
204
|
+
/** 結果 */
|
|
205
|
+
readonly result?: unknown;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* オーケストレーション設定
|
|
209
|
+
*/
|
|
210
|
+
export interface OrchestrationConfig {
|
|
211
|
+
/** 最大同時エージェント数 */
|
|
212
|
+
readonly maxConcurrentAgents: number;
|
|
213
|
+
/** エージェントタイムアウト(秒) */
|
|
214
|
+
readonly agentTimeout: number;
|
|
215
|
+
/** コンテキスト切り替え時間上限(ミリ秒) */
|
|
216
|
+
readonly maxContextSwitchTime: number;
|
|
217
|
+
/** エージェントあたりの最大メモリ(トークン) */
|
|
218
|
+
readonly maxAgentMemory: number;
|
|
219
|
+
/** 失敗時の自動リトライ回数 */
|
|
220
|
+
readonly maxRetries: number;
|
|
221
|
+
/** リトライ間隔(ミリ秒) */
|
|
222
|
+
readonly retryDelay: number;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* デフォルトオーケストレーション設定
|
|
226
|
+
*/
|
|
227
|
+
export declare const DEFAULT_ORCHESTRATION_CONFIG: OrchestrationConfig;
|
|
228
|
+
/**
|
|
229
|
+
* オーケストレーション結果
|
|
230
|
+
*/
|
|
231
|
+
export interface OrchestrationResult {
|
|
232
|
+
/** 成功/失敗 */
|
|
233
|
+
readonly success: boolean;
|
|
234
|
+
/** 最終出力 */
|
|
235
|
+
readonly output?: unknown;
|
|
236
|
+
/** 実行されたタスク数 */
|
|
237
|
+
readonly completedTasks: number;
|
|
238
|
+
/** 失敗したタスク数 */
|
|
239
|
+
readonly failedTasks: number;
|
|
240
|
+
/** 総実行時間(ミリ秒) */
|
|
241
|
+
readonly totalDuration: number;
|
|
242
|
+
/** 使用したエージェント数 */
|
|
243
|
+
readonly agentsUsed: number;
|
|
244
|
+
/** 各タスクの結果 */
|
|
245
|
+
readonly taskResults: Map<ID, TaskResult>;
|
|
246
|
+
/** エラー一覧 */
|
|
247
|
+
readonly errors: TaskError[];
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* オーケストレーションイベント型
|
|
251
|
+
*/
|
|
252
|
+
export type OrchestratorEventType = 'plan:created' | 'plan:approved' | 'task:started' | 'task:completed' | 'task:failed' | 'agent:spawned' | 'agent:terminated' | 'context:switched' | 'orchestration:completed' | 'orchestration:failed';
|
|
253
|
+
/**
|
|
254
|
+
* オーケストレーションイベント
|
|
255
|
+
*/
|
|
256
|
+
export interface OrchestratorEvent {
|
|
257
|
+
/** イベントタイプ */
|
|
258
|
+
readonly type: OrchestratorEventType;
|
|
259
|
+
/** イベントデータ */
|
|
260
|
+
readonly data: unknown;
|
|
261
|
+
/** タイムスタンプ */
|
|
262
|
+
readonly timestamp: Timestamp;
|
|
263
|
+
/** 関連タスクID */
|
|
264
|
+
readonly taskId?: ID;
|
|
265
|
+
/** 関連エージェントID */
|
|
266
|
+
readonly agentId?: ID;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* イベントリスナー
|
|
270
|
+
*/
|
|
271
|
+
export type OrchestratorEventListener = (event: OrchestratorEvent) => void | Promise<void>;
|
|
272
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAM9D;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,OAAO,GACP,SAAS,GACT,WAAW,GACX,QAAQ,GACR,WAAW,GACX,SAAS,CAAC;AAEd;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,cAAc;IACd,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC;IAChB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|
|
5
|
+
* @fileoverview REQ-009: タスク分解・計画、REQ-006: マルチエージェントオーケストレーション
|
|
6
|
+
* @module @nahisaho/katashiro-orchestrator
|
|
7
|
+
* @since 0.4.0
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.DEFAULT_ORCHESTRATION_CONFIG = exports.DEFAULT_DECOMPOSITION_CONFIG = void 0;
|
|
11
|
+
/**
|
|
12
|
+
* デフォルト分解設定
|
|
13
|
+
*/
|
|
14
|
+
exports.DEFAULT_DECOMPOSITION_CONFIG = {
|
|
15
|
+
maxSubTasks: 50,
|
|
16
|
+
minTaskGranularity: 5,
|
|
17
|
+
maxDependencyDepth: 10,
|
|
18
|
+
allowParallel: true,
|
|
19
|
+
maxConcurrentTasks: 5, // 同時実行タスク数上限
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* デフォルトオーケストレーション設定
|
|
23
|
+
*/
|
|
24
|
+
exports.DEFAULT_ORCHESTRATION_CONFIG = {
|
|
25
|
+
maxConcurrentAgents: 10,
|
|
26
|
+
agentTimeout: 300,
|
|
27
|
+
maxContextSwitchTime: 1000,
|
|
28
|
+
maxAgentMemory: 8000,
|
|
29
|
+
maxRetries: 3,
|
|
30
|
+
retryDelay: 1000,
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AA2IH;;GAEG;AACU,QAAA,4BAA4B,GAAwB;IAC/D,WAAW,EAAE,EAAE;IACf,kBAAkB,EAAE,CAAC;IACrB,kBAAkB,EAAE,EAAE;IACtB,aAAa,EAAE,IAAI;IACnB,kBAAkB,EAAE,CAAC,EAAE,aAAa;CACrC,CAAC;AAyHF;;GAEG;AACU,QAAA,4BAA4B,GAAwB;IAC/D,mBAAmB,EAAE,EAAE;IACvB,YAAY,EAAE,GAAG;IACjB,oBAAoB,EAAE,IAAI;IAC1B,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,CAAC;IACb,UAAU,EAAE,IAAI;CACjB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nahisaho/katashiro-orchestrator",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Task decomposition, planning, and multi-agent orchestration for KATASHIRO",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc -p tsconfig.json",
|
|
15
|
+
"clean": "rimraf dist",
|
|
16
|
+
"test": "vitest run",
|
|
17
|
+
"test:watch": "vitest watch",
|
|
18
|
+
"lint": "eslint src --ext .ts",
|
|
19
|
+
"prepublishOnly": "npm run build"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"katashiro",
|
|
23
|
+
"orchestrator",
|
|
24
|
+
"multi-agent",
|
|
25
|
+
"task-decomposition",
|
|
26
|
+
"planning",
|
|
27
|
+
"dag"
|
|
28
|
+
],
|
|
29
|
+
"author": "nahisaho",
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "https://github.com/nahisaho/katashiro.git",
|
|
34
|
+
"directory": "packages/orchestrator"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@nahisaho/katashiro-core": "*"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/node": "^20.10.0",
|
|
41
|
+
"rimraf": "^5.0.5",
|
|
42
|
+
"typescript": "^5.3.0",
|
|
43
|
+
"vitest": "^1.0.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"typescript": ">=5.0.0"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=18.0.0"
|
|
50
|
+
},
|
|
51
|
+
"files": [
|
|
52
|
+
"dist",
|
|
53
|
+
"README.md"
|
|
54
|
+
]
|
|
55
|
+
}
|