fix(mcp ux): even more error handling
who asked blud to conventional commits
This commit is contained in:
@@ -52,6 +52,7 @@ The compact response includes:
|
||||
- `run_id`: durable handle for this execution attempt
|
||||
- `status`: runtime status such as `completed`, `failed`, or `interrupted`
|
||||
- `outcome`: terminal workflow outcome when available
|
||||
- `error`: failed-run error text when execution failed before a terminal outcome
|
||||
- `output`: projected workflow output when available
|
||||
- `diagnostics`: dependency/runtime diagnostics
|
||||
- `trace_count`: total trace entry count
|
||||
@@ -70,8 +71,8 @@ Reads one stopped run by `run_id` without returning trace entries:
|
||||
```
|
||||
|
||||
Use this when a client already has a `run_id` and needs the current durable
|
||||
summary: status, outcome/output if available, diagnostics, and checkpoint
|
||||
metadata.
|
||||
summary: status, outcome/output if available, failed-run error text,
|
||||
diagnostics, and checkpoint metadata.
|
||||
|
||||
## `read_run_trace`
|
||||
|
||||
@@ -129,6 +130,8 @@ the core rule that external callers resume by `run_id`.
|
||||
- Prefer `inspect_run` before reading trace detail.
|
||||
- Use `read_run_trace` with explicit small ranges.
|
||||
- Treat `trace_count` as metadata, not an instruction to fetch the entire trace.
|
||||
- If a run failed with `trace_count: 0`, read the top-level `error` first; the
|
||||
failure may have happened before any trace entry could be emitted.
|
||||
- If `resume_run` is blocked, repair the reported dependency issue and retry
|
||||
with the same `run_id`.
|
||||
- If the run failed because a live source errored during execution, do not retry
|
||||
@@ -141,4 +144,3 @@ the core rule that external callers resume by `run_id`.
|
||||
- No protocol-native MCP Tasks integration yet.
|
||||
- No dynamic saved-workflow-as-tool projection requirement.
|
||||
- No automatic pause on disconnected sources; source failures are failed runs.
|
||||
|
||||
|
||||
@@ -282,7 +282,8 @@ top-level input/output field names, while full JSON schemas stay behind
|
||||
`wf.workflow.call_capability` is the REPL-style test step. Its result is
|
||||
self-describing: `kind` is either `node_spec` or `wrapper_artifact`,
|
||||
`source_id` identifies the owner when applicable, and `diagnostics` is empty for
|
||||
successful calls.
|
||||
successful calls. Failed test calls return a structured diagnostic with
|
||||
`outcome="runtime_error"` instead of leaking raw transport exceptions.
|
||||
|
||||
### 4. Manage Saved Workflows
|
||||
|
||||
@@ -354,9 +355,10 @@ brand-new MCP tools. Many LLM harnesses do not reliably refresh callable tool
|
||||
schemas mid-session.
|
||||
|
||||
The default `run_deployment` response is intentionally compact. It includes run
|
||||
status, output, diagnostics, and `trace_count`, where `trace_count` is the total
|
||||
number of trace entries in the original run. If the caller needs node-level
|
||||
debug detail, pass an explicit `trace_range` object such as
|
||||
status, terminal outcome when available, failed-run `error` text when available,
|
||||
output, diagnostics, and `trace_count`, where `trace_count` is the total number
|
||||
of trace entries in the original run. If the caller needs node-level debug
|
||||
detail, pass an explicit `trace_range` object such as
|
||||
`{"start": 0, "limit": 10}`; otherwise trace entries stay out of the normal
|
||||
response. Trace entries may include resolved node inputs, node outputs, and
|
||||
state changes, so treat them as debug payloads rather than ordinary list/summary
|
||||
|
||||
@@ -600,11 +600,12 @@ Workspaces are mutable and revisioned. Artifacts are immutable and versioned.
|
||||
Patch calls must include the current `revision`; stale revisions return
|
||||
`revision_conflict` and do not mutate the workspace.
|
||||
|
||||
`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 canonical `output` bindings or the
|
||||
compatibility `output_map`. Provider-specific
|
||||
error envelopes still belong in saved wrapper artifacts or follow-up patches.
|
||||
`create_minimal_draft_workspace` is intentionally only a bootstrapper. For
|
||||
naive MCP wrappers with an `error` outcome, it wires `wf.std.runtime_error` with
|
||||
a static default message unless `error_message_source` is explicitly provided.
|
||||
It does not guess that a normal output state path is also an error message.
|
||||
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.
|
||||
This is deliberate: the request object carries descriptions and validation for
|
||||
|
||||
Reference in New Issue
Block a user