Skip to content

docs: document widget data and CSP handling - #45

Merged
manish-wekan merged 1 commit into
nitrocloudofficial:mainfrom
KeuqS:docs/43-widget-data-csp
Oct 20, 2026
Merged

manish-wekan merged 1 commit into
nitrocloudofficial:mainfrom
KeuqS:docs/43-widget-data-csp

Conversation

@KeuqS

@KeuqS KeuqS commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #43.

This documents how widget tool output is normalized, how app mode changes metadata, and how custom HTML interacts with the host bridge.

Changes

  • Document the window.openai.toolOutput / toolResult and embedded-data fallbacks.
  • Clarify that hand-written files under widgets/out/ are loaded as-is and do not receive bridge injection from the loader.
  • Add a minimal window.__nitroWidgetRender(data) example.
  • Document WidgetCsp fields, their MCP Apps/OpenAI metadata names, and host-side CSP enforcement.
  • Clarify that data: support depends on the embedding host.

Validation

  • Compared the branch against main: one README-only commit, 51 additions, no deletions.
  • Cross-checked the documented behavior against component.py, host_bridge.py, mcp_meta.py, and the route templates.
  • Documentation-only change; no runtime code or test behavior changed.

@manish-wekan manish-wekan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Shreyavemana Shreyavemana left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README update looks solid. It clearly documents the widget data flow, the role of the host bridge, and how CSP metadata is advertised.

@manish-wekan
manish-wekan merged commit feb2bae into nitrocloudofficial:main Oct 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[widgets] Document the widget data contract and CSP handling for hand-written widget HTML

3 participants