[feat] canvas: render model-generated interactive HTML with a controlled action bridge

オープン
#443 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
18/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
css, html, javascript, typescript
領域
api, frontend, security

調査の方向性

The request centers on a sandboxed iframe that renders model-generated HTML on the canvas node, plus a controlled postMessage-style bridge to the host; the payload names no specific files, so start by locating the existing HTML canvas node and the project asset storage in the TypeScript codebase. Done means a generated page renders in isolation, a submitted interaction is validated and saved to project state, and it persists after reopening. The protocol itself is still open for discussion, so confirm the design with maintainers before writing code.

索引モデルが issue の本文から書いたものです。

説明

area:agent area:canvas

中文总结:支持文本模型生成通用交互式 HTML,在画布内隔离运行,并通过受控接口保存交互结果或填入对话草稿。

Request

Allow text models to generate interactive HTML/CSS/JS and render the result directly in an HTML canvas node, rather than opening it in an external browser.

This should support general interactions—forms, candidate selection, sliders, quizzes, interactive charts, and custom interfaces—not a fixed card layout.

Proposed scope

  • Store generated HTML as a project asset and render it in a sandboxed iframe with configurable dimensions.
  • Allow page-local JavaScript interactions. Block network access and direct access to the filesystem, CLI, and host APIs.
  • Provide a controlled bridge for submitting structured interaction results to the host, for example:
await opendirector.request({
  action: "submit",
  payload: { selectedIds: ["candidate-b"], values: { durationSeconds: 15 } }
});

The host validates the source, allowed action, target scope, and payload, executes supported project operations, and returns success or failure. The API above is illustrative; the exact protocol is open for discussion.

Initial milestone

Generate an interactive HTML interface, use it on the canvas, and save its submitted results to project state or populate a visible assistant draft. Persist submitted state across reopening.

Candidate adoption and generation can be added later as explicitly authorized actions through existing business services.

主要言語
TypeScript
スター
119
フォーク
16
平均マージ
16時間 13分
マージ済み PR(30日)
195

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ThinkFlowLab/OpenDirector のほかの issue

ThinkFlowLab/OpenDirector の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。