Skip to content

omp xd-device: keystone_render crashes bridge on result (C of e.content) though render succeeds; docs schema renders as unknown; wrong-key error opaque #16

Description

@rz1989s

Environment

  • omp 18.1.12 (homebrew, darwin-arm64), keystone@1.0.0 at ~/.omp/plugins/node_modules/@getpipher/keystone
  • Device: xd://keystone_render

Repro

  1. read xd://keystone_render → docs show type Args = unknown — the extension's parameters (htmlPath/url/viewports/outDir) never surface, so the agent must guess keys.
  2. Write {"path": "/tmp/x.html", "viewports": [1280]} (natural guess) → error: The "path" argument must be of type string. Received undefined. Raw Node fs error from pathToFileURL(input.htmlPath); doesn't name the expected key htmlPath.
  3. Write {"htmlPath": "/tmp/x.html", "viewports": [1280], "outDir": "/tmp/out"} → render succeeds (all artifacts written: computed.json, dom.html, viewports.json, clickable.json, screenshot-*.png) but the device returns error: undefined is not an object (evaluating 'C of e.content').

Expected

  • Docs echo the declared parameter schema.
  • Wrong keys → schema-echo error naming htmlPath.
  • Successful render → tool result with screenshots/computedStylesPath/viewportMetrics, not a crash.

Actual analysis

extensions/render.ts omp registration returns the plain RenderOutput object from execute(_toolCallId, input). The omp xd bridge appears to expect a message-like {content: [...]} result and dereferences .content of something undefined (minified C of e.content), surfacing a successful render as an error. Callers can't get viewportMetrics from the tool response at all — only by reading the written viewports.json.

Workaround

Pass outDir explicitly and read the artifacts from disk; ignore the error if the outDir is populated.

Related: #13 (pi-side definition.execute is not a function — same registration area, pi copy now uses run(input) while the omp copy uses execute(_toolCallId, input)).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions