feat: add optional value to ReadableElementRecord#148
Merged
Conversation
Append the element's current form value as an optional 4th tuple element ([path, role, text, value?]). The value is the .value of text inputs, textareas, and selects, or "checked" for a checked checkbox/radio, and is omitted (3-tuple) when empty — keeping output compact for the common case. - Add value? to both ReadableElementRecord type definitions - Extract the value in toElementRecords via a getElementValue helper - Update MCP tool/resource descriptions to document the 4th element - Add e2e coverage (form-test checkboxes + readable-element-values.spec) - chore: make mcp-inspector task depend on build Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ndthanhdev
enabled auto-merge (squash)
June 24, 2026 19:01
Expose the outerHTML of a single element (identified by its readablePath) via a new MCP resource template and the getReadableElementHtml fallback tool, paginated through the existing snapshot machinery (new content type "readable-element-html"). - Extension: TabDomTools.getElementHtmlByReadablePath resolves the path via the existing context-store resolver and returns element.outerHTML; driver-base wrapper calls it over tab RPC - core-extension: getElementHtml added to the driver port, ExtensionTools RPC contract, and tool-call handler - core-server: SnapshotContent.getReadableElementHtmlPage (path-keyed cache, splitText pagination); widened ContentType / getSnapshotPage / mcp-descriptions - mcp-server: new bk:///.../readable-element-html/<readablePath> URI + parser, resource handler, tabReadableElementHtmlSchema, and the getReadableElementHtml tool - e2e: readable-element-html.spec.ts (tool output + resource parity) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Append the element's current form value as an optional 4th tuple element ([path, role, text, value?]). The value is the .value of text inputs, textareas, and selects, or "checked" for a checked checkbox/radio, and is omitted (3-tuple) when empty — keeping output compact for the common case.