@agimon-ai/po-workflow 0.0.0-alpha.205 → 0.0.0-alpha.207

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.
@@ -3691,6 +3691,7 @@ const WORKFLOW_TOOL_NAMES = [
3691
3691
  "launch_workflow",
3692
3692
  "workflow_run",
3693
3693
  "workflow_tools",
3694
+ "workflow_delete_definition",
3694
3695
  "scaffold_workflow"
3695
3696
  ];
3696
3697
  /** The card's tool, with any other name read as workflow_run, as the web card always has. */
@@ -3772,12 +3773,18 @@ function toolAction(toolName, args) {
3772
3773
  if (toolName === "workflow_requirements") return "requirements";
3773
3774
  if (toolName === "launch_workflow") return "launch";
3774
3775
  if (toolName === "scaffold_workflow") return "scaffold";
3776
+ if (toolName === "workflow_delete_definition") return "delete";
3775
3777
  return readString$1(args, "action") ?? "run";
3776
3778
  }
3777
3779
  function toolTarget(toolName, args) {
3778
3780
  if (toolName === "list_workflows") return readString$1(args, "directory");
3779
3781
  if (toolName === "launch_workflow" || toolName === "workflow_requirements") return readString$1(args, "workflowPath");
3780
3782
  if (toolName === "scaffold_workflow") return readString$1(args, "path");
3783
+ if (toolName === "workflow_delete_definition") {
3784
+ const key = readString$1(args, "key");
3785
+ const source = readString$1(args, "source");
3786
+ return key && source ? `${source}:${key}` : key;
3787
+ }
3781
3788
  return targetScope(args);
3782
3789
  }
3783
3790
  function statusTimestamp(value) {
@@ -3794,6 +3801,7 @@ function callActionLabel(t, action) {
3794
3801
  case "requirements": return t("workflow.call.requirements", "requirements");
3795
3802
  case "launch": return t("workflow.call.launch", "launch");
3796
3803
  case "scaffold": return t("workflow.call.scaffold", "scaffold");
3804
+ case "delete": return t("workflow.ui.delete.lowercase", "delete");
3797
3805
  case "run": return t("workflow.call.run", "run");
3798
3806
  case "status": return t("workflow.call.status", "status");
3799
3807
  case "tail": return t("workflow.call.tail", "tail");
@@ -5079,6 +5087,7 @@ function WorkflowToolMessage({ toolName, args, result, output, running, isError
5079
5087
  const t = useT();
5080
5088
  const name = workflowToolName(toolName);
5081
5089
  const summary = workflowCallSummary(t, name, args);
5090
+ const deleting = name === "workflow_delete_definition";
5082
5091
  const detail = [summary.target, ...summary.metadata].filter((value) => value !== void 0);
5083
5092
  const structured = running || isError ? void 0 : workflowStructuredView(t, name, args, result);
5084
5093
  const collapsed = workflowResultLines(t, name, args, result, {
@@ -5099,11 +5108,11 @@ function WorkflowToolMessage({ toolName, args, result, output, running, isError
5099
5108
  }),
5100
5109
  expandable,
5101
5110
  children: ({ expanded }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(MessageItemHeader, {
5102
- title: toolName,
5111
+ title: deleting ? t("workflow.ui.delete", "Delete") : toolName,
5103
5112
  children: /* @__PURE__ */ jsxs(View, {
5104
5113
  testID: `tool-call-${toolName}`,
5105
5114
  style: styles.summary,
5106
- children: [/* @__PURE__ */ jsx(Text, {
5115
+ children: [!deleting && /* @__PURE__ */ jsx(Text, {
5107
5116
  numberOfLines: 1,
5108
5117
  style: [styles.sans, styles.primary],
5109
5118
  children: summary.action
@@ -5111,7 +5120,7 @@ function WorkflowToolMessage({ toolName, args, result, output, running, isError
5111
5120
  numberOfLines: 1,
5112
5121
  ellipsizeMode: "middle",
5113
5122
  style: [styles.sans, styles.detail],
5114
- children: ["· ", detail.join(" · ")]
5123
+ children: [!deleting && "· ", detail.join(" · ")]
5115
5124
  }) : null]
5116
5125
  })
5117
5126
  }), isError ? /* @__PURE__ */ jsx(MessageItemBody, {
@@ -5174,6 +5183,7 @@ var workflow_native_default = defineToolRenderer({
5174
5183
  "launch_workflow",
5175
5184
  "workflow_run",
5176
5185
  "workflow_tools",
5186
+ "workflow_delete_definition",
5177
5187
  "scaffold_workflow"
5178
5188
  ],
5179
5189
  message: WorkflowToolMessage,
@@ -5181,9 +5191,17 @@ var workflow_native_default = defineToolRenderer({
5181
5191
  });
5182
5192
  //#endregion
5183
5193
  //#region generated/native.ts
5184
- const via = (identity, value) => value === void 0 ? void 0 : {
5185
- ...identity,
5186
- ...value
5194
+ const via = (identity, value) => {
5195
+ if (value === void 0) return void 0;
5196
+ const declaration = value;
5197
+ return {
5198
+ ...identity,
5199
+ ...declaration,
5200
+ ...declaration.relations === void 0 ? {} : { relations: declaration.relations.map((relation) => ({
5201
+ evidence: "declared",
5202
+ ...relation
5203
+ })) }
5204
+ };
5187
5205
  };
5188
5206
  const nativePlugin = defineNativePlugin({
5189
5207
  id: "workflows",