@agimon-ai/doompi-workflow 0.0.1-alpha.95 → 0.0.1-alpha.97

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.
@@ -731,7 +731,8 @@ function createWorkflowServerRuntime(host, serverHost) {
731
731
  },
732
732
  name: LIST_TOOL,
733
733
  label: "List Workflows",
734
- description: "List workflow definitions available in this repository.",
734
+ description: "List workflow definitions in this repository, not existing runs.",
735
+ promptGuidelines: ["Use list_workflows to discover definitions, not to find an existing run."],
735
736
  parameters: zod.z.toJSONSchema(feature.listWorkflowsTool.getInputSchema()),
736
737
  executionMode: "serial",
737
738
  async execute(_toolCallId, parameters, signal, _onUpdate, context) {
@@ -753,7 +754,8 @@ function createWorkflowServerRuntime(host, serverHost) {
753
754
  },
754
755
  name: LAUNCH_TOOL,
755
756
  label: "Launch Workflow",
756
- description: "Start a workflow run and return its recorded launch result.",
757
+ description: "Start a workflow run. A successful launch is not a completed workflow.",
758
+ promptGuidelines: ["Launch returns when a run starts, not when it finishes. Use the exact run key and separate workspace from its launch result for workflow_run status, not Agiflow project or job identifiers.", "Do not relaunch a healthy running workflow merely because it has not completed."],
757
759
  parameters: zod.z.toJSONSchema(feature.runTool.getInputSchema()),
758
760
  executionMode: "serial",
759
761
  async execute(_toolCallId, parameters, signal, _onUpdate, context) {
@@ -775,7 +777,13 @@ function createWorkflowServerRuntime(host, serverHost) {
775
777
  },
776
778
  name: RUN_TOOL,
777
779
  label: "Workflow Run",
778
- description: "Inspect the status of a workflow run or request cooperative control.",
780
+ description: "Inspect a session-owned workflow by exact run key and separate workspace, or request cooperative control.",
781
+ promptGuidelines: [
782
+ "Use workflow_run status for the recorded stage, outcome, position, jobs, and steps. A successful status lookup is not evidence that the workflow completed.",
783
+ "For a healthy running workflow, summarize the recorded progress. Do not automatically search CLI commands or filesystem logs, relaunch, or diagnose failure merely because it remains running.",
784
+ "Investigate further when the run reports failure or staleness, or when the user requests diagnostics. Only status, pause, resume, and stop are supported here; stop only on user request.",
785
+ "Use exact registry runKey and separate workspace from the launch or status result. Agiflow project and job identifiers are not workflow run keys."
786
+ ],
779
787
  parameters: {
780
788
  type: "object",
781
789
  properties: {
@@ -790,9 +798,13 @@ function createWorkflowServerRuntime(host, serverHost) {
790
798
  },
791
799
  runKey: {
792
800
  type: "string",
793
- minLength: 1
801
+ minLength: 1,
802
+ description: "Exact registry run key from the launch result, without the workspace prefix. Not an Agiflow job ID."
803
+ },
804
+ workspace: {
805
+ type: "string",
806
+ description: "Workspace from the launch result, passed separately from runKey."
794
807
  },
795
- workspace: { type: "string" },
796
808
  reason: { type: "string" },
797
809
  expectedRunId: { type: "string" }
798
810
  },
@@ -805,7 +817,7 @@ function createWorkflowServerRuntime(host, serverHost) {
805
817
  const input = parameters;
806
818
  const runs = readWorkflowRuns({ environment: host.context.environment }).filter((run) => runBelongsToSession(run, host.context.sessionId) && run.view.runKey === input.runKey && (input.workspace === void 0 || run.view.workspace === input.workspace));
807
819
  if (runs.length !== 1) return {
808
- ...callResult({ error: runs.length === 0 ? "Workflow run was not found in this session." : "Specify the workspace for this run key." }),
820
+ ...callResult({ error: runs.length === 0 ? "No matching workflow run was found in this session. This is a lookup failure, not evidence that the workflow failed. Use the exact runKey and separate workspace from its launch result, not Agiflow job identifiers." : "Specify the workspace for this run key." }),
809
821
  isError: true
810
822
  };
811
823
  const run = runs[0].view;