workflow builder deprecated field stop use in wf_mcp

This commit is contained in:
lda
2026-05-21 05:32:40 +07:00 Verified
parent d089e28c15
commit 8df4c94c4e
13 changed files with 463 additions and 193 deletions
@@ -143,6 +143,22 @@ Use these categories:
Add a small checklist under this task before implementation. Do not blindly replace all strings.
Findings from the first inventory pass:
- `src/wf_artifacts/drafts/adapter.py` is the highest-value runtime hit: it still
calls `WorkflowBuilder.use_ref(..., in_map=..., input_values=..., out_map=...)`
and `WorkflowBuilder.use(..., out_map=...)`, causing deprecation warnings from
MCP draft/workspace tests. This should be changed to canonical binding lists.
- Raw workflow-plan tests in `tests/wf_mcp/test_service.py`,
`tests/wf_mcp/test_broker_server.py`, `tests/wf_mcp/test_workflow_surface.py`,
and `tests/artifacts/test_factory.py` intentionally exercise raw-plan
compatibility. Do not bulk-rewrite those while raw-plan escape hatches remain.
- Draft model tests still use `state_schema.fields` as compatibility input. That
can stay as parse input, but new docs/examples should prefer JSON Schema
`properties`.
- Docs already explain parse-only compatibility in several places, but older
operator/runbook examples still need canonical `input` / `output` examples.
---
## Task 2: Draft Adapter Emits Canonical Builder Bindings
+1 -1
View File
@@ -504,7 +504,7 @@ Concrete MCP sequence:
2. `wf.workflow.call_capability` with a small payload to verify the selected
capability behaves as expected.
3. `wf.workflow.create_minimal_draft_workspace` with a `request` object that
contains schemas, `input_map`, and `output_map`.
contains schemas plus canonical `input` and `output` binding lists.
4. `wf.workflow.list_draft_workspaces` if the client needs to rediscover
existing workspace ids.
5. `wf.workflow.get_draft_workspace` with `include_draft=true` if the client
+13 -7
View File
@@ -364,7 +364,7 @@ Workspace patches are optimistic-concurrency guarded. Pass the current
Workspace mutation tools use a single `request` object in MCP Inspector. That
keeps the form grouped and lets the schema describe fields like
`input_schema`, `output_map`, and `error_message_source`.
`input_schema`, canonical `output`, and `error_message_source`.
Use `create_wrapper_from_workspace` when the draft is meant to normalize a raw
capability into a reusable workflow-facing wrapper. It is the same validation
@@ -406,12 +406,18 @@ Minimal example:
},
"required": ["echoed"]
},
"input_map": {
"input.text": "text"
},
"output_map": {
"echoed": "state.echoed"
}
"input": [
{
"target": {"root": "local", "parts": ["text"]},
"path": {"root": "input", "parts": ["text"]}
}
],
"output": [
{
"source": {"root": "local", "parts": ["echoed"]},
"target": {"root": "state", "parts": ["echoed"]}
}
]
}
}
```
+2 -1
View File
@@ -406,7 +406,8 @@ Patch calls must include the current `revision`; stale revisions return
`create_minimal_draft_workspace` is intentionally only a bootstrapper. It wires
an `error` outcome for naive MCP wrappers only when `error_message_source` is
provided or a state path can be derived from `output_map`. Provider-specific
provided or a state path can be derived from canonical `output` bindings or the
compatibility `output_map`. Provider-specific
error envelopes still belong in saved wrapper artifacts or follow-up patches.
In MCP Inspector, workspace mutation tools accept a single `request` object.