IEP: Support for “Canvases” in Projects

Enable creation, retrieval, update and deletion of “canvas” resources at the same level as project files and guidelines, so that a chat session can list, analyze and modify canvases via the canmore API.

  • Interactive editing: Let chats collaboratively author design mockups, documentation or code snippets inside the project.
  • Unified project model: Treat canvases just like other textdocs (e.g., guidelines or source files) for consistency.
  • Improved workflows: Designers, product managers and developers can iterate on UIs or docs without switching tools.

Technical Specification

  1. Canvas Resource Schema
{
  "id": "string",
  "project_id": "string",
  "name": "string",
  "type": "document" | "code/*",
  "content": "string"
}
  1. New REST Endpoints
  • GET /v1/projects/{project_id}/canvases
  • POST /v1/projects/{project_id}/canvases
  • PATCH /v1/projects/{project_id}/canvases/{canvas_id}
  • DELETE /v1/projects/{project_id}/canvases/{canvas_id}
  1. Authentication & Permissions
  • Inherit scopes from project: projects.read for GET, projects.write for POST/PATCH/DELETE.
  • Canvas access controlled by project membership and roles.
  1. canmore SDK Extension
  • Create canvas
await openai.canmore.create_textdoc({
  name: "HomepageMockup",
  type: "code/react",
  content: "<div>…JSX here…</div>"
});
  • Update canvas
await openai.canmore.update_textdoc({
  jawbone_id: "canvas_id",
  updates: [
    { pattern: "<div>(.*)<\\/div>", replacement: "<div className=\"p-4\">$1</div>" }
  ]
});

Usage Flow

  1. Chat retrieves list of canvases in a project.
  2. User selects a canvas to view or edit.
  3. Chat opens, patches or replaces content via canmore .
  4. Updated canvas is saved alongside other project files.