fix(runtime): fix early control return and update lifecycle

This commit is contained in:
Ljy-0827
2026-07-24 14:07:33 +08:00
parent c8963e3a68
commit 4e44fb2823
17 changed files with 1002 additions and 262 deletions
@@ -7,6 +7,17 @@
"session_id"
],
"properties": {
"completion_criteria": {
"description": "Optional explicit success detector. Navigation by itself is not a completion signal; these criteria must match before the tool can auto-complete without the user clicking Done.",
"anyOf": [
{
"$ref": "#/definitions/HelpCompletionCriteria"
},
{
"type": "null"
}
]
},
"prompt": {
"description": "Message shown to the user explaining what to do.",
"type": "string"
@@ -50,6 +61,78 @@
}
},
"definitions": {
"HelpCompletionCondition": {
"type": "object",
"properties": {
"selector_exists": {
"type": [
"string",
"null"
]
},
"selector_missing": {
"type": [
"string",
"null"
]
},
"text_exists": {
"type": [
"string",
"null"
]
},
"text_missing": {
"type": [
"string",
"null"
]
},
"url_contains": {
"type": [
"string",
"null"
]
},
"url_matches": {
"type": [
"string",
"null"
]
}
}
},
"HelpCompletionCriteria": {
"type": "object",
"properties": {
"all": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/HelpCompletionCondition"
}
},
"any": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/HelpCompletionCondition"
}
},
"stable_for_ms": {
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
}
}
},
"HelpTarget": {
"description": "One component the user is asked to look at / interact with. Exactly one of `ref` / `selector` should be supplied (mirrors the click/fill convention). When neither matches a live element the overlay still shows the prompt and reports the miss via [`ResolvedTarget`].",
"type": "object",