triflux 3.3.0-dev.1 → 3.3.0-dev.3

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/hub/tools.mjs CHANGED
@@ -177,9 +177,9 @@ export function createTools(store, router, hitl, pipe = null) {
177
177
  },
178
178
 
179
179
  // ── 6. handoff ──
180
- {
181
- name: 'handoff',
182
- description: '다른 에이전트에게 작업을 인계합니다. acceptance_criteria로 완료 기준 지정 가능',
180
+ {
181
+ name: 'handoff',
182
+ description: '다른 에이전트에게 작업을 인계합니다. acceptance_criteria로 완료 기준 지정 가능',
183
183
  inputSchema: {
184
184
  type: 'object',
185
185
  required: ['from', 'to', 'topic', 'task'],
@@ -196,15 +196,90 @@ export function createTools(store, router, hitl, pipe = null) {
196
196
  correlation_id: { type: 'string' },
197
197
  },
198
198
  },
199
- handler: wrap('HANDOFF_FAILED', (args) => {
200
- return router.handleHandoff(args);
201
- }),
202
- },
203
-
204
- // ── 7. request_human_input ──
205
- {
206
- name: 'request_human_input',
207
- description: '사용자에게 입력을 요청합니다 (CAPTCHA, 승인, 자격증명, 선택, 텍스트)',
199
+ handler: wrap('HANDOFF_FAILED', (args) => {
200
+ return router.handleHandoff(args);
201
+ }),
202
+ },
203
+
204
+ // ── 7. assign_async ──
205
+ {
206
+ name: 'assign_async',
207
+ description: 'AWS CAO 스타일 비차단 assign job을 생성하고 워커에게 실시간 전달합니다',
208
+ inputSchema: {
209
+ type: 'object',
210
+ required: ['supervisor_agent', 'worker_agent', 'task'],
211
+ properties: {
212
+ supervisor_agent: { type: 'string', pattern: '^[a-zA-Z0-9._:-]{3,64}$' },
213
+ worker_agent: { type: 'string', pattern: '^[a-zA-Z0-9._:-]{3,64}$' },
214
+ topic: { type: 'string', pattern: '^[a-zA-Z0-9._:-]+$', default: 'assign.job' },
215
+ task: { type: 'string', minLength: 1, maxLength: 20000 },
216
+ payload: { type: 'object' },
217
+ priority: { type: 'integer', minimum: 1, maximum: 9, default: 5 },
218
+ ttl_ms: { type: 'integer', minimum: 1000, maximum: 86400000, default: 600000 },
219
+ timeout_ms: { type: 'integer', minimum: 1000, maximum: 86400000, default: 600000 },
220
+ max_retries: { type: 'integer', minimum: 0, maximum: 20, default: 0 },
221
+ trace_id: { type: 'string' },
222
+ correlation_id: { type: 'string' },
223
+ },
224
+ },
225
+ handler: wrap('ASSIGN_ASYNC_FAILED', (args) => {
226
+ return router.assignAsync(args);
227
+ }),
228
+ },
229
+
230
+ // ── 8. assign_result ──
231
+ {
232
+ name: 'assign_result',
233
+ description: 'assign job의 진행/완료 결과를 보고합니다. completed + metadata.result 관례를 지원합니다',
234
+ inputSchema: {
235
+ type: 'object',
236
+ required: ['job_id', 'status'],
237
+ properties: {
238
+ job_id: { type: 'string', minLength: 1, maxLength: 128 },
239
+ worker_agent: { type: 'string', pattern: '^[a-zA-Z0-9._:-]{3,64}$' },
240
+ status: { type: 'string', enum: ['queued', 'running', 'in_progress', 'completed', 'succeeded', 'success', 'failed', 'error', 'timed_out', 'timeout'] },
241
+ attempt: { type: 'integer', minimum: 1 },
242
+ result: {},
243
+ error: {},
244
+ metadata: { type: 'object' },
245
+ payload: { type: 'object' },
246
+ },
247
+ },
248
+ handler: wrap('ASSIGN_RESULT_FAILED', (args) => {
249
+ return router.reportAssignResult(args);
250
+ }),
251
+ },
252
+
253
+ // ── 9. assign_status ──
254
+ {
255
+ name: 'assign_status',
256
+ description: 'assign job 단건 상태 또는 supervisor/worker/status 기준 목록을 조회합니다',
257
+ inputSchema: {
258
+ type: 'object',
259
+ properties: {
260
+ job_id: { type: 'string', minLength: 1, maxLength: 128 },
261
+ supervisor_agent: { type: 'string', pattern: '^[a-zA-Z0-9._:-]{3,64}$' },
262
+ worker_agent: { type: 'string', pattern: '^[a-zA-Z0-9._:-]{3,64}$' },
263
+ status: { type: 'string', enum: ['queued', 'running', 'succeeded', 'failed', 'timed_out'] },
264
+ statuses: {
265
+ type: 'array',
266
+ items: { type: 'string', enum: ['queued', 'running', 'succeeded', 'failed', 'timed_out'] },
267
+ maxItems: 8,
268
+ },
269
+ trace_id: { type: 'string' },
270
+ correlation_id: { type: 'string' },
271
+ limit: { type: 'integer', minimum: 1, maximum: 100, default: 50 },
272
+ },
273
+ },
274
+ handler: wrap('ASSIGN_STATUS_FAILED', (args) => {
275
+ return router.getAssignStatus(args);
276
+ }),
277
+ },
278
+
279
+ // ── 10. request_human_input ──
280
+ {
281
+ name: 'request_human_input',
282
+ description: '사용자에게 입력을 요청합니다 (CAPTCHA, 승인, 자격증명, 선택, 텍스트)',
208
283
  inputSchema: {
209
284
  type: 'object',
210
285
  required: ['requester_agent', 'kind', 'prompt', 'requested_schema', 'deadline_ms', 'default_action'],
@@ -220,12 +295,12 @@ export function createTools(store, router, hitl, pipe = null) {
220
295
  correlation_id: { type: 'string' },
221
296
  },
222
297
  },
223
- handler: wrap('HITL_REQUEST_FAILED', (args) => {
224
- return hitl.requestHumanInput(args);
225
- }),
226
- },
227
-
228
- // ── 8. submit_human_input ──
298
+ handler: wrap('HITL_REQUEST_FAILED', (args) => {
299
+ return hitl.requestHumanInput(args);
300
+ }),
301
+ },
302
+
303
+ // ── 11. submit_human_input ──
229
304
  {
230
305
  name: 'submit_human_input',
231
306
  description: '사용자 입력 요청에 응답합니다 (accept, decline, cancel)',
@@ -244,7 +319,7 @@ export function createTools(store, router, hitl, pipe = null) {
244
319
  }),
245
320
  },
246
321
 
247
- // ── 9. team_info ──
322
+ // ── 12. team_info ──
248
323
  {
249
324
  name: 'team_info',
250
325
  description: 'Claude Native Teams 메타/멤버/경로 정보를 조회합니다',
@@ -262,7 +337,7 @@ export function createTools(store, router, hitl, pipe = null) {
262
337
  }),
263
338
  },
264
339
 
265
- // ── 10. team_task_list ──
340
+ // ── 13. team_task_list ──
266
341
  {
267
342
  name: 'team_task_list',
268
343
  description: 'Claude Native Teams task 목록을 owner/status 조건으로 조회합니다',
@@ -286,7 +361,7 @@ export function createTools(store, router, hitl, pipe = null) {
286
361
  }),
287
362
  },
288
363
 
289
- // ── 11. team_task_update ──
364
+ // ── 14. team_task_update ──
290
365
  {
291
366
  name: 'team_task_update',
292
367
  description: 'Claude Native Teams task를 claim/update 합니다',
@@ -314,7 +389,7 @@ export function createTools(store, router, hitl, pipe = null) {
314
389
  }),
315
390
  },
316
391
 
317
- // ── 12. team_send_message ──
392
+ // ── 15. team_send_message ──
318
393
  {
319
394
  name: 'team_send_message',
320
395
  description: 'Claude Native Teams inbox에 메시지를 append 합니다',
@@ -335,7 +410,7 @@ export function createTools(store, router, hitl, pipe = null) {
335
410
  }),
336
411
  },
337
412
 
338
- // ── 13. pipeline_state ──
413
+ // ── 16. pipeline_state ──
339
414
  {
340
415
  name: 'pipeline_state',
341
416
  description: '파이프라인 상태를 조회합니다 (--thorough 모드)',
@@ -355,7 +430,7 @@ export function createTools(store, router, hitl, pipe = null) {
355
430
  }),
356
431
  },
357
432
 
358
- // ── 14. pipeline_advance ──
433
+ // ── 17. pipeline_advance ──
359
434
  {
360
435
  name: 'pipeline_advance',
361
436
  description: '파이프라인을 다음 단계로 전이합니다 (전이 규칙 + fix loop 바운딩 적용)',
@@ -374,7 +449,7 @@ export function createTools(store, router, hitl, pipe = null) {
374
449
  }),
375
450
  },
376
451
 
377
- // ── 15. pipeline_init ──
452
+ // ── 18. pipeline_init ──
378
453
  {
379
454
  name: 'pipeline_init',
380
455
  description: '새 파이프라인을 초기화합니다 (기존 상태 덮어쓰기)',
@@ -397,7 +472,7 @@ export function createTools(store, router, hitl, pipe = null) {
397
472
  }),
398
473
  },
399
474
 
400
- // ── 16. pipeline_list ──
475
+ // ── 19. pipeline_list ──
401
476
  {
402
477
  name: 'pipeline_list',
403
478
  description: '활성 파이프라인 목록을 조회합니다',