@ai-setting/roy-agent-core 1.5.88 → 1.5.90

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.
Files changed (48) hide show
  1. package/dist/env/agent/index.js +8 -8
  2. package/dist/env/event-source/index.js +12 -4
  3. package/dist/env/index.js +20 -15
  4. package/dist/env/llm/index.js +4 -2
  5. package/dist/env/prompt/index.js +2 -1
  6. package/dist/env/session/index.js +3 -4
  7. package/dist/env/session/storage/index.js +2 -2
  8. package/dist/env/task/delegate/index.js +3 -2
  9. package/dist/env/task/index.js +4 -3
  10. package/dist/env/task/plugins/index.js +7 -4
  11. package/dist/env/tool/built-in/index.js +2 -1
  12. package/dist/env/tool/index.js +11 -8
  13. package/dist/env/workflow/engine/index.js +5 -3
  14. package/dist/env/workflow/index.js +6 -4
  15. package/dist/env/workflow/nodes/index.js +1 -1
  16. package/dist/env/workflow/tools/index.js +7 -1
  17. package/dist/env/workflow/utils/index.js +5 -0
  18. package/dist/index.js +144 -32
  19. package/dist/shared/@ai-setting/{roy-agent-core-r0m0at3x.js → roy-agent-core-0r4ndyn9.js} +119 -7
  20. package/dist/shared/@ai-setting/{roy-agent-core-jymz9fzp.js → roy-agent-core-2c8eraxq.js} +126 -41
  21. package/dist/shared/@ai-setting/{roy-agent-core-0y64qaac.js → roy-agent-core-32m0nb9j.js} +119 -30
  22. package/dist/shared/@ai-setting/roy-agent-core-4yq23m5g.js +421 -0
  23. package/dist/shared/@ai-setting/{roy-agent-core-h2d1s8yd.js → roy-agent-core-5ykms33a.js} +1 -1
  24. package/dist/shared/@ai-setting/{roy-agent-core-mmkyydw7.js → roy-agent-core-83d035pp.js} +91 -579
  25. package/dist/shared/@ai-setting/roy-agent-core-8wd3qwx5.js +35 -0
  26. package/dist/shared/@ai-setting/{roy-agent-core-yx0vw1aw.js → roy-agent-core-8zjntsbb.js} +102 -32
  27. package/dist/shared/@ai-setting/{roy-agent-core-29fh9mxg.js → roy-agent-core-bwjpte58.js} +1 -2
  28. package/dist/shared/@ai-setting/{roy-agent-core-vneyghpg.js → roy-agent-core-ddq5hcp5.js} +1 -1
  29. package/dist/shared/@ai-setting/{roy-agent-core-qhhxx2x2.js → roy-agent-core-ds5f75pg.js} +2 -1
  30. package/dist/shared/@ai-setting/{roy-agent-core-4cdtdxqx.js → roy-agent-core-ewr1nw7t.js} +1 -1
  31. package/dist/shared/@ai-setting/roy-agent-core-hvdfgvfz.js +114 -0
  32. package/dist/shared/@ai-setting/{roy-agent-core-3arrpf7n.js → roy-agent-core-hxsbegfc.js} +229 -9
  33. package/dist/shared/@ai-setting/{roy-agent-core-9y09xfav.js → roy-agent-core-j0107ww1.js} +6 -418
  34. package/dist/shared/@ai-setting/{roy-agent-core-6mk0m4t3.js → roy-agent-core-m683wd1n.js} +283 -15
  35. package/dist/shared/@ai-setting/{roy-agent-core-bgw4dq11.js → roy-agent-core-mw4ty0ba.js} +44 -5
  36. package/dist/shared/@ai-setting/{roy-agent-core-7z4xtrmw.js → roy-agent-core-nqzt9ne4.js} +53 -0
  37. package/dist/shared/@ai-setting/roy-agent-core-pt7as39r.js +0 -0
  38. package/dist/shared/@ai-setting/{roy-agent-core-6n7xwv4v.js → roy-agent-core-rkz8r2sx.js} +5 -3
  39. package/dist/shared/@ai-setting/{roy-agent-core-c1j7ev4e.js → roy-agent-core-txwf64pd.js} +70 -0
  40. package/dist/shared/@ai-setting/{roy-agent-core-7fdzfsm6.js → roy-agent-core-w0kb72ve.js} +42 -213
  41. package/dist/shared/@ai-setting/roy-agent-core-w6bmrgap.js +581 -0
  42. package/dist/shared/@ai-setting/{roy-agent-core-qhjb153z.js → roy-agent-core-xnxyzaw4.js} +27 -4
  43. package/dist/shared/@ai-setting/roy-agent-core-yanpq5gb.js +116 -0
  44. package/dist/shared/@ai-setting/{roy-agent-core-hc20420t.js → roy-agent-core-z240ts1r.js} +27 -3
  45. package/dist/shared/@ai-setting/{roy-agent-core-q7sqeax6.js → roy-agent-core-zky9jse4.js} +163 -3
  46. package/package.json +1 -1
  47. package/dist/shared/@ai-setting/roy-agent-core-x3gtyqax.js +0 -378
  48. /package/dist/shared/@ai-setting/{roy-agent-core-4f3976cd.js → roy-agent-core-k5hxvaf0.js} +0 -0
@@ -6,10 +6,7 @@ import {
6
6
  import {
7
7
  MemorySessionStore,
8
8
  SQLiteSessionStore
9
- } from "./roy-agent-core-q7sqeax6.js";
10
- import {
11
- SummaryAgent
12
- } from "./roy-agent-core-x3gtyqax.js";
9
+ } from "./roy-agent-core-zky9jse4.js";
13
10
  import {
14
11
  envKeyToConfigKey
15
12
  } from "./roy-agent-core-qxhq8ven.js";
@@ -67,9 +64,40 @@ var SESSION_CONFIG_REGISTRATION = {
67
64
  // src/env/session/session-component.ts
68
65
  init_search_query_parser();
69
66
  import path from "path";
67
+ import { z } from "zod";
70
68
  var logger = createLogger("session");
69
+ function sleep(ms) {
70
+ return new Promise((resolve) => setTimeout(resolve, ms));
71
+ }
72
+ function isBusyError(err) {
73
+ if (err == null)
74
+ return false;
75
+ const e = err;
76
+ if (typeof e.code === "string") {
77
+ if (/^SQLITE_(BUSY|LOCKED)$/i.test(e.code))
78
+ return true;
79
+ }
80
+ if (typeof e.errno === "number" && (e.errno === 5 || e.errno === 6)) {
81
+ return true;
82
+ }
83
+ const msg = e.message ?? "";
84
+ return /SQLiteError:\s+(database is locked|database table is locked)/i.test(msg);
85
+ }
86
+
87
+ class AddMessageLockExhaustedError extends Error {
88
+ kind = "lock_exhausted";
89
+ attempts;
90
+ cause;
91
+ constructor(attempts, cause) {
92
+ super(`Failed to add message after ${attempts} attempts: ${String(cause)}`);
93
+ this.name = "AddMessageLockExhaustedError";
94
+ this.attempts = attempts;
95
+ this.cause = cause;
96
+ }
97
+ }
71
98
 
72
99
  class SessionComponent extends BaseComponent {
100
+ static BACKOFFS_MS = [50, 100, 200];
73
101
  name = "session";
74
102
  version = "1.1.0";
75
103
  config;
@@ -78,9 +106,6 @@ class SessionComponent extends BaseComponent {
78
106
  hooksConfig = {};
79
107
  configComponent;
80
108
  configWatcher;
81
- summaryAgent;
82
- promptComponent;
83
- llmComponent;
84
109
  constructor() {
85
110
  super();
86
111
  }
@@ -328,14 +353,38 @@ class SessionComponent extends BaseComponent {
328
353
  async addMessage(sessionId, message) {
329
354
  const contentPreview = typeof message.content === "string" ? message.content.substring(0, 100) : JSON.stringify(message.content).substring(0, 100);
330
355
  logger.info(`[SessionComponent.addMessage] sessionId=${sessionId}, role=${message.role}, content="${contentPreview}"`);
331
- try {
332
- const messageId = await this.store?.addMessage(sessionId, message);
333
- logger.info(`[SessionComponent.addMessage] Success: messageId=${messageId}`);
334
- return messageId;
335
- } catch (error) {
336
- logger.error(`[SessionComponent] Failed to add message: ${error}`);
337
- return;
356
+ return this.addMessageWithRetry(sessionId, message);
357
+ }
358
+ async addMessageWithRetry(sessionId, message) {
359
+ const MAX_ATTEMPTS = SessionComponent.BACKOFFS_MS.length;
360
+ for (let attempt = 0;attempt < MAX_ATTEMPTS; attempt++) {
361
+ try {
362
+ const messageId = await this.store?.addMessage(sessionId, message);
363
+ if (attempt > 0) {
364
+ logger.info(`[SessionComponent.addMessage] Recovered after ${attempt + 1} attempts: messageId=${messageId}`);
365
+ } else {
366
+ logger.info(`[SessionComponent.addMessage] Success: messageId=${messageId}`);
367
+ }
368
+ return messageId;
369
+ } catch (error) {
370
+ if (!isBusyError(error)) {
371
+ logger.error(`[SessionComponent] Failed to add message (non-busy): ${error}`);
372
+ return;
373
+ }
374
+ const isLastAttempt = attempt === MAX_ATTEMPTS - 1;
375
+ if (isLastAttempt) {
376
+ logger.error(`[SessionComponent] Failed to add message after ${MAX_ATTEMPTS} attempts (busy): ${error}`);
377
+ throw new AddMessageLockExhaustedError(MAX_ATTEMPTS, error);
378
+ }
379
+ const backoffMs = SessionComponent.BACKOFFS_MS[attempt];
380
+ logger.warn(`[SessionComponent] SQLITE_BUSY on attempt ${attempt + 1}/${MAX_ATTEMPTS}, retrying in ${backoffMs}ms: ${error}`);
381
+ await sleep(backoffMs);
382
+ }
338
383
  }
384
+ return;
385
+ }
386
+ async addMessages(sessionId, messages) {
387
+ return this.store?.addMessages(sessionId, messages) ?? [];
339
388
  }
340
389
  async getMessages(sessionId, options) {
341
390
  const messages = await this.store?.getMessages(sessionId, options?.offset, options?.limit);
@@ -398,19 +447,6 @@ class SessionComponent extends BaseComponent {
398
447
  const date = new Date().toISOString().replace("T", " ").substring(0, 19);
399
448
  return template.replace("{date}", date);
400
449
  }
401
- setSummaryComponents(promptComponent, llmComponent) {
402
- this.promptComponent = promptComponent;
403
- this.llmComponent = llmComponent;
404
- this.summaryAgent = new SummaryAgent(promptComponent, llmComponent);
405
- }
406
- ensureSummaryAgent() {
407
- if (!this.summaryAgent) {
408
- if (!this.promptComponent || !this.llmComponent) {
409
- throw new Error("SummaryAgent components not initialized. Call setSummaryComponents() first.");
410
- }
411
- this.summaryAgent = new SummaryAgent(this.promptComponent, this.llmComponent);
412
- }
413
- }
414
450
  async generateCompactHint(sessionId) {
415
451
  const session = await this.get(sessionId);
416
452
  if (!session) {
@@ -424,16 +460,33 @@ class SessionComponent extends BaseComponent {
424
460
  logger.warn("[SessionComponent] Not enough messages for hint generation");
425
461
  return "";
426
462
  }
427
- this.ensureSummaryAgent();
428
- const result = await this.summaryAgent.generateCompactHint({
429
- messages: messages.map((m) => ({ role: m.role, content: m.content })),
430
- sessionContext: {}
463
+ const agentComponent = this.env.getComponent("agent");
464
+ let hintData;
465
+ const submitTool = {
466
+ name: "workflow_submit_output",
467
+ description: "Submit the final result. Call this with your guidance_prompt.",
468
+ parameters: z.object({
469
+ guidance_prompt: z.string().describe("The compact guidance prompt (3-4 sentences)")
470
+ }),
471
+ execute: async (args) => {
472
+ const parsed = z.object({
473
+ guidance_prompt: z.string()
474
+ }).parse(args);
475
+ hintData = parsed;
476
+ return { success: true, output: "OK" };
477
+ }
478
+ };
479
+ await agentComponent.run("compact-hint", "Analyze this conversation and generate a compact guidance prompt for checkpoint generation.", {
480
+ sessionId,
481
+ persistSession: false,
482
+ extraTools: [submitTool]
431
483
  });
484
+ const hint = hintData?.guidance_prompt || "[Hint extraction failed]";
432
485
  logger.info("[SessionComponent] Compact hint generated", {
433
486
  sessionId,
434
- hintLength: result.hint.length
487
+ hintLength: hint.length
435
488
  });
436
- return result.hint;
489
+ return hint;
437
490
  }
438
491
  async compact(sessionId, options) {
439
492
  const session = await this.get(sessionId);
@@ -448,20 +501,52 @@ class SessionComponent extends BaseComponent {
448
501
  throw new Error("Not enough messages to compact (minimum 3 required)");
449
502
  }
450
503
  const recentMessages = this.extractRecentMessages(messages, 2);
451
- this.ensureSummaryAgent();
452
504
  await this.executeBeforeHooks("compact", { session, options });
453
505
  let summaryResult;
454
506
  try {
455
- summaryResult = await this.summaryAgent.run({
456
- messages: messages.map((m) => ({ role: m.role, content: m.content })),
457
- userContext: options?.summary,
458
- outputFormat: "json",
459
- scenarioHint: options?.scenarioHint
507
+ const userQuery = options?.scenarioHint ? options.scenarioHint : "Generate a checkpoint from this conversation.";
508
+ let checkpointData;
509
+ const submitTool = {
510
+ name: "workflow_submit_output",
511
+ description: "Submit the checkpoint result with title, processKeyPoints, currentState, nextSteps, userIntents.",
512
+ parameters: z.object({
513
+ title: z.string().describe("Brief checkpoint title (max 30 chars)"),
514
+ processKeyPoints: z.array(z.string()).describe("Key discoveries or decisions"),
515
+ currentState: z.string().describe("Current progress and status"),
516
+ nextSteps: z.array(z.string()).describe("Follow-up items"),
517
+ userIntents: z.array(z.string()).describe("User's core intents (2-5 items)")
518
+ }),
519
+ execute: async (args) => {
520
+ const parsed = z.object({
521
+ title: z.string(),
522
+ processKeyPoints: z.array(z.string()),
523
+ currentState: z.string(),
524
+ nextSteps: z.array(z.string()),
525
+ userIntents: z.array(z.string())
526
+ }).parse(args);
527
+ checkpointData = parsed;
528
+ return { success: true, output: "OK" };
529
+ }
530
+ };
531
+ const agentComponent = this.env.getComponent("agent");
532
+ await agentComponent.run("compact", userQuery, {
533
+ sessionId,
534
+ persistSession: false,
535
+ extraTools: [submitTool]
460
536
  });
537
+ const data = checkpointData || {};
538
+ summaryResult = {
539
+ title: data.title || "Untitled Checkpoint",
540
+ processKeyPoints: data.processKeyPoints || [],
541
+ currentState: data.currentState || "",
542
+ nextSteps: data.nextSteps || [],
543
+ userIntents: data.userIntents || [],
544
+ rawResponse: JSON.stringify(data)
545
+ };
461
546
  } catch (error) {
462
547
  const errorMessage = error instanceof Error ? error.message : String(error);
463
- logger.error(`[SessionComponent] SummaryAgent.run failed: ${errorMessage}`);
464
- throw new Error(`Session compaction failed: SummaryAgent error - ${errorMessage}`);
548
+ logger.error(`[SessionComponent] Compact agent failed: ${errorMessage}`);
549
+ throw new Error(`Session compaction failed: ${errorMessage}`);
465
550
  }
466
551
  const checkpointId = `cp_${Date.now().toString(36)}_${Math.random().toString(36).substring(2, 8)}`;
467
552
  const checkpoint = {
@@ -2,6 +2,9 @@ import {
2
2
  TAG_MAX_COUNT,
3
3
  TAG_MIN_COUNT
4
4
  } from "./roy-agent-core-tq9528d3.js";
5
+ import {
6
+ validateWorkflowDefinition
7
+ } from "./roy-agent-core-8wd3qwx5.js";
5
8
  import {
6
9
  AskUserError,
7
10
  init_workflow_hil
@@ -409,6 +412,15 @@ function createWorkflowAddTool(workflowService) {
409
412
  metadata: { execution_time_ms: 0 }
410
413
  };
411
414
  }
415
+ const validation = validateWorkflowDefinition(definition);
416
+ if (!validation.valid) {
417
+ return {
418
+ success: false,
419
+ output: "",
420
+ error: `Validation failed: ${validation.errors.join("; ")}`,
421
+ metadata: { execution_time_ms: 0 }
422
+ };
423
+ }
412
424
  const workflow = await workflowService.createWorkflow(definition, {
413
425
  tags: params.tags
414
426
  });
@@ -453,15 +465,92 @@ function createWorkflowAddTool(workflowService) {
453
465
  };
454
466
  }
455
467
 
456
- // src/env/workflow/tools/workflow-search-tool.ts
468
+ // src/env/workflow/tools/workflow-validate-tool.ts
457
469
  init_logger();
458
470
  import { z as z6 } from "zod";
459
- var logger5 = createLogger("workflow-search-tool");
460
- var WorkflowSearchInputSchema = z6.object({
461
- keyword: z6.string().optional().describe("Search keyword in name and description (case-insensitive substring)"),
462
- tags: z6.array(z6.string()).optional().describe("Filter by tags (ALL must match - AND filter)"),
463
- limit: z6.number().positive().optional().describe("Maximum number of results"),
464
- offset: z6.number().min(0).optional().describe("Pagination offset")
471
+ import yaml2 from "yaml";
472
+ var logger5 = createLogger("workflow-validate-tool");
473
+ var WorkflowValidateInputSchema = z6.object({
474
+ definition: z6.any().optional().describe("Workflow definition object (alternative to definition_yaml)"),
475
+ definition_yaml: z6.string().optional().describe("Workflow definition as YAML or JSON string"),
476
+ yaml: z6.string().optional().describe("Alias for definition_yaml — workflow definition as YAML or JSON string")
477
+ });
478
+ function createWorkflowValidateTool(_workflowService) {
479
+ return {
480
+ name: "workflow_validate",
481
+ description: `Validate a workflow definition (YAML or JSON) without persisting it. ` + `Checks for: duplicate node IDs, missing dependencies, cycles, empty node IDs. ` + `Returns { valid: boolean, errors: string[], workflowName?, nodeCount }. ` + `Use this BEFORE workflow_add to ensure the workflow is structurally sound.`,
482
+ parameters: WorkflowValidateInputSchema,
483
+ execute: async (args, _ctx) => {
484
+ try {
485
+ const params = WorkflowValidateInputSchema.parse(args);
486
+ let definition;
487
+ if (params.definition && typeof params.definition === "object") {
488
+ definition = params.definition;
489
+ } else {
490
+ const yamlText = params.yaml ?? params.definition_yaml;
491
+ if (!yamlText || typeof yamlText !== "string") {
492
+ return {
493
+ success: false,
494
+ output: "",
495
+ error: "Must provide either 'definition' (object), 'definition_yaml', or 'yaml' (string)",
496
+ metadata: { execution_time_ms: 0 }
497
+ };
498
+ }
499
+ try {
500
+ definition = yaml2.parse(yamlText);
501
+ } catch (yamlErr) {
502
+ return {
503
+ success: false,
504
+ output: "",
505
+ error: `Invalid YAML: ${yamlErr instanceof Error ? yamlErr.message : String(yamlErr)}`,
506
+ metadata: { execution_time_ms: 0 }
507
+ };
508
+ }
509
+ }
510
+ if (!definition || typeof definition !== "object") {
511
+ return {
512
+ success: false,
513
+ output: "",
514
+ error: "Parsed definition is not an object",
515
+ metadata: { execution_time_ms: 0 }
516
+ };
517
+ }
518
+ const result = validateWorkflowDefinition(definition);
519
+ const nodeCount = Array.isArray(definition.nodes) ? definition.nodes.length : 0;
520
+ const output = {
521
+ valid: result.valid,
522
+ errors: result.errors,
523
+ workflowName: definition.name,
524
+ nodeCount
525
+ };
526
+ return {
527
+ success: result.valid,
528
+ output: JSON.stringify(output, null, 2),
529
+ error: result.valid ? undefined : `Validation failed: ${result.errors.join("; ")}`,
530
+ metadata: { execution_time_ms: 0 }
531
+ };
532
+ } catch (error) {
533
+ logger5.error("[workflow_validate] failed", { error });
534
+ return {
535
+ success: false,
536
+ output: "",
537
+ error: error instanceof Error ? error.message : String(error),
538
+ metadata: { execution_time_ms: 0 }
539
+ };
540
+ }
541
+ }
542
+ };
543
+ }
544
+
545
+ // src/env/workflow/tools/workflow-search-tool.ts
546
+ init_logger();
547
+ import { z as z7 } from "zod";
548
+ var logger6 = createLogger("workflow-search-tool");
549
+ var WorkflowSearchInputSchema = z7.object({
550
+ keyword: z7.string().optional().describe("Search keyword in name and description (case-insensitive substring)"),
551
+ tags: z7.array(z7.string()).optional().describe("Filter by tags (ALL must match - AND filter)"),
552
+ limit: z7.number().positive().optional().describe("Maximum number of results"),
553
+ offset: z7.number().min(0).optional().describe("Pagination offset")
465
554
  });
466
555
  function createWorkflowSearchTool(workflowService) {
467
556
  return {
@@ -507,7 +596,7 @@ function createWorkflowSearchTool(workflowService) {
507
596
  metadata: { execution_time_ms: 0 }
508
597
  };
509
598
  } catch (error) {
510
- logger5.error("Failed to search workflows", { error });
599
+ logger6.error("Failed to search workflows", { error });
511
600
  return {
512
601
  success: false,
513
602
  output: "",
@@ -521,13 +610,13 @@ function createWorkflowSearchTool(workflowService) {
521
610
 
522
611
  // src/env/workflow/tools/run-workflow.ts
523
612
  init_logger();
524
- import { z as z7 } from "zod";
525
- var logger6 = createLogger("run-workflow-tool");
526
- var RunWorkflowInputSchema = z7.object({
527
- workflow_name: z7.string().describe("Name of the workflow to run"),
528
- input: z7.record(z7.any()).optional().describe("Input to pass to the workflow"),
529
- sync: z7.boolean().default(true).describe("Wait for completion (default: true)"),
530
- timeout: z7.number().positive().optional().describe("Timeout in milliseconds (default: 1800000 = 30 min)")
613
+ import { z as z8 } from "zod";
614
+ var logger7 = createLogger("run-workflow-tool");
615
+ var RunWorkflowInputSchema = z8.object({
616
+ workflow_name: z8.string().describe("Name of the workflow to run"),
617
+ input: z8.record(z8.any()).optional().describe("Input to pass to the workflow"),
618
+ sync: z8.boolean().default(true).describe("Wait for completion (default: true)"),
619
+ timeout: z8.number().positive().optional().describe("Timeout in milliseconds (default: 1800000 = 30 min)")
531
620
  });
532
621
  function createRunWorkflowTool(workflowService) {
533
622
  return {
@@ -549,7 +638,7 @@ function createRunWorkflowTool(workflowService) {
549
638
  execute: async (args, ctx) => {
550
639
  const startTime = Date.now();
551
640
  const { workflow_name, input, sync = true, timeout = 1800000 } = args;
552
- logger6.info(`Running workflow: ${workflow_name}`, { input, sync, timeout });
641
+ logger7.info(`Running workflow: ${workflow_name}`, { input, sync, timeout });
553
642
  let timeoutHandle;
554
643
  let durationMs;
555
644
  try {
@@ -623,8 +712,8 @@ function createRunWorkflowTool(workflowService) {
623
712
  }
624
713
  };
625
714
  }
626
- if (logger6?.error) {
627
- logger6.error(`Failed to run workflow: ${workflow_name}`, { error: errorMessage });
715
+ if (logger7?.error) {
716
+ logger7.error(`Failed to run workflow: ${workflow_name}`, { error: errorMessage });
628
717
  }
629
718
  return {
630
719
  success: false,
@@ -664,10 +753,10 @@ function createLegacyRunWorkflowTool(workflowService) {
664
753
 
665
754
  // src/env/workflow/tools/workflow-run-status-tool.ts
666
755
  init_logger();
667
- import { z as z8 } from "zod";
668
- var logger7 = createLogger("workflow-run-status-tool");
669
- var WorkflowRunStatusInputSchema = z8.object({
670
- run_id: z8.string().describe("Run/session ID to query status")
756
+ import { z as z9 } from "zod";
757
+ var logger8 = createLogger("workflow-run-status-tool");
758
+ var WorkflowRunStatusInputSchema = z9.object({
759
+ run_id: z9.string().describe("Run/session ID to query status")
671
760
  });
672
761
  function createWorkflowRunStatusTool(workflowService) {
673
762
  return {
@@ -707,7 +796,7 @@ function createWorkflowRunStatusTool(workflowService) {
707
796
  metadata: { execution_time_ms: 0 }
708
797
  };
709
798
  } catch (error) {
710
- logger7.error("Failed to get run status", { error });
799
+ logger8.error("Failed to get run status", { error });
711
800
  return {
712
801
  success: false,
713
802
  output: "",
@@ -721,11 +810,11 @@ function createWorkflowRunStatusTool(workflowService) {
721
810
 
722
811
  // src/env/workflow/tools/workflow-run-stop-tool.ts
723
812
  init_logger();
724
- import { z as z9 } from "zod";
725
- var logger8 = createLogger("workflow-run-stop-tool");
726
- var WorkflowRunStopInputSchema = z9.object({
727
- run_id: z9.string().describe("Run/session ID to stop"),
728
- reason: z9.string().optional().describe("Optional reason for stopping the workflow")
813
+ import { z as z10 } from "zod";
814
+ var logger9 = createLogger("workflow-run-stop-tool");
815
+ var WorkflowRunStopInputSchema = z10.object({
816
+ run_id: z10.string().describe("Run/session ID to stop"),
817
+ reason: z10.string().optional().describe("Optional reason for stopping the workflow")
729
818
  });
730
819
  function createWorkflowRunStopTool(workflowService) {
731
820
  return {
@@ -747,7 +836,7 @@ function createWorkflowRunStopTool(workflowService) {
747
836
  metadata: { execution_time_ms: 0 }
748
837
  };
749
838
  } catch (error) {
750
- logger8.error("Failed to stop workflow run", { error });
839
+ logger9.error("Failed to stop workflow run", { error });
751
840
  return {
752
841
  success: false,
753
842
  output: "",
@@ -759,4 +848,4 @@ function createWorkflowRunStopTool(workflowService) {
759
848
  };
760
849
  }
761
850
 
762
- export { AskUserInputSchema, askUserTool, askUserToolInstance, WorkflowGetInputSchema, createWorkflowGetTool, WorkflowListInputSchema, createWorkflowListTool, WorkflowTagListInputSchema, createWorkflowTagListTool, WorkflowAddInputSchema, createWorkflowAddTool, WorkflowSearchInputSchema, createWorkflowSearchTool, RunWorkflowInputSchema, createRunWorkflowTool, initRunWorkflowTool, getRunWorkflowTool, resetRunWorkflowTool, createLegacyRunWorkflowTool, WorkflowRunStatusInputSchema, createWorkflowRunStatusTool, WorkflowRunStopInputSchema, createWorkflowRunStopTool };
851
+ export { AskUserInputSchema, askUserTool, askUserToolInstance, WorkflowGetInputSchema, createWorkflowGetTool, WorkflowListInputSchema, createWorkflowListTool, WorkflowTagListInputSchema, createWorkflowTagListTool, WorkflowAddInputSchema, createWorkflowAddTool, WorkflowValidateInputSchema, createWorkflowValidateTool, WorkflowSearchInputSchema, createWorkflowSearchTool, RunWorkflowInputSchema, createRunWorkflowTool, initRunWorkflowTool, getRunWorkflowTool, resetRunWorkflowTool, createLegacyRunWorkflowTool, WorkflowRunStatusInputSchema, createWorkflowRunStatusTool, WorkflowRunStopInputSchema, createWorkflowRunStopTool };