玉澜
b49bc0ed14
feat(corecmd): add declarative Wait capability (Contract.Wait + wait phase)
Framework-only: adds the reviewed wait contract mirroring the DryRunSpec
pattern (types declaration -> ContractDecl -> ContractFinal -> ToolSpec ->
Schema wait key). No business command declares it yet.
- contract.WaitSpec (mode poll/event/auto, poll_command, status_query,
terminal status->success/failure map, pending_values, event_key,
match_field, default_timeout_secs) with closed-set Validate
- Spec.WaitPoll hook pairs with the declaration at construction time
(declared without hook / hook without declaration both panic)
- declared leaves register --wait / --wait-timeout natively (never
FlagSpec, so they cannot enter MCP toolArgs); undeclared leaves reject
the flags as unknown instead of ignoring them
- internal/wait engine: immediate-first-poll, x1.5 backoff capped 30s,
dotted status extraction, fail-closed on unknown status, timeout ->
pending
- ResultInvoke path closes the unified envelope: success terminal ->
success, failure terminal -> failure with new wire-stable
error.type "wait" (exit code 8, additive like partial=7), timeout ->
pending + meta.operation.timed_out with last observed state (exit 0)
- output.WithOutcome / WithErrorInfo / WithOperationTimedOut preserve
envelope invariants (I2/I3, pending requires meta.operation)
Verified: go test ./... green; check-generated-drift.sh ok (schema
assembly deterministic, wire unchanged); check-schema-catalog.sh ok
(27 products, 1121 tools).
2026-08-15 12:41:46 +08:00
..
2026-08-05 01:22:45 +08:00
2026-08-04 09:46:55 +08:00
2026-08-10 21:23:23 +08:00
2026-08-03 00:50:16 +08:00
2026-08-06 17:11:09 +08:00
2026-08-04 09:35:48 +08:00
2026-08-06 17:53:57 +08:00
2026-08-04 11:59:32 +08:00
2026-08-06 17:11:09 +08:00
2026-08-04 11:59:32 +08:00
2026-08-02 12:26:25 +08:00
2026-08-02 10:07:19 +08:00
2026-08-11 13:47:07 +08:00
2026-08-01 22:16:17 +08:00
2026-08-04 08:36:22 +08:00
2026-08-03 14:29:13 +08:00
2026-08-04 08:36:22 +08:00
2026-08-05 12:03:39 +08:00
2026-08-06 17:53:57 +08:00
2026-08-14 11:38:26 +08:00
2026-07-29 10:02:27 +08:00
2026-08-14 11:38:26 +08:00
2026-08-13 23:26:08 +08:00
2026-07-29 10:02:27 +08:00
2026-08-03 16:18:20 +08:00
2026-08-14 11:38:26 +08:00
2026-07-29 10:02:27 +08:00
2026-03-27 17:55:57 +08:00
2026-08-06 13:06:52 +08:00
2026-07-14 01:25:05 +08:00
2026-08-04 11:34:58 +08:00
2026-08-15 12:41:46 +08:00
2026-08-05 12:28:46 +08:00
2026-08-02 13:59:37 +08:00
2026-08-05 22:45:33 +08:00
2026-08-05 22:45:33 +08:00
2026-08-05 12:28:46 +08:00
2026-08-04 11:22:39 +08:00
2026-08-10 22:15:04 +08:00
2026-08-15 12:41:46 +08:00
2026-08-13 23:28:09 +08:00
2026-08-04 16:41:40 +08:00
2026-08-03 13:38:43 +08:00
2026-08-04 16:29:48 +08:00
2026-08-11 18:51:33 +08:00
2026-08-03 19:10:13 +08:00
2026-08-01 18:54:09 +08:00
2026-08-03 19:22:53 +08:00
2026-08-03 16:18:20 +08:00
2026-08-04 08:36:22 +08:00
2026-08-13 13:02:34 +08:00
2026-08-02 10:07:19 +08:00
2026-08-04 08:36:22 +08:00
2026-08-03 17:07:36 +08:00
2026-08-15 12:41:46 +08:00
2026-08-04 16:41:40 +08:00
2026-08-05 12:28:46 +08:00
2026-08-04 16:41:40 +08:00
2026-08-04 15:53:19 +08:00
2026-08-03 22:21:30 +08:00
2026-08-04 08:36:22 +08:00
2026-08-04 08:36:22 +08:00
2026-08-04 08:36:22 +08:00
2026-08-02 13:59:37 +08:00
2026-08-03 17:58:38 +08:00
2026-08-03 17:07:36 +08:00
2026-08-03 21:15:20 +08:00
2026-08-03 17:24:32 +08:00
2026-08-03 21:15:20 +08:00
2026-08-03 21:15:20 +08:00
2026-08-03 14:44:06 +08:00
2026-08-04 11:16:21 +08:00
2026-08-01 18:54:09 +08:00
2026-08-05 22:45:33 +08:00
2026-08-05 22:45:33 +08:00
2026-08-03 13:09:14 +08:00
2026-08-03 13:09:14 +08:00
2026-08-03 13:09:14 +08:00
2026-08-04 11:22:39 +08:00
2026-08-05 22:45:33 +08:00
2026-08-13 13:02:34 +08:00
2026-08-04 11:23:13 +08:00
2026-08-04 08:36:22 +08:00
2026-08-05 22:45:33 +08:00
2026-08-10 22:15:04 +08:00
2026-08-04 08:36:22 +08:00
2026-08-15 12:41:46 +08:00
2026-08-04 08:36:22 +08:00
2026-08-15 12:41:46 +08:00
2026-08-01 20:33:45 +08:00
2026-08-05 22:45:33 +08:00
2026-08-04 08:36:22 +08:00
2026-08-03 21:15:20 +08:00
2026-08-04 11:15:02 +08:00
2026-08-04 08:36:22 +08:00
2026-08-02 13:47:26 +08:00
2026-03-27 17:55:57 +08:00
2026-03-27 17:55:57 +08:00
2026-07-16 10:58:56 +08:00
2026-07-15 22:19:49 +08:00
2026-05-19 15:25:39 +08:00