# Build a personal Cove App

An App is a folder containing `manifest.json`, an HTML entry and local assets.
Cove installs that folder or a ZIP-based `.coveapp`, runs your UI in a sandbox,
and keeps one SQLite database per copy. The App owns its layout, interaction and
business rules. No Cove source changes or application server are needed.

Cove 0.1.0-beta.15 introduced the base `cove.browser-app/1` format. The starter
in this guide targets 0.1.0-beta.16, which adds the Chat panel, saved inline
views and SDK 1.2. For beta.15 users, distribute a package built with the
beta.15 kit. Its validator rejects `assistant`, `views`, `min_host_version`
and capability declarations beyond `ai.generate` and `chat.attach`.

## Host and author kit compatibility

Use the kit shipped for your installed Cove release. Stable CoveWeb downloads
and guides target the published host; preview guides and packages require the
matching development build. A development build can retain release metadata
while providing newer features, so do not infer support from version alone.

The SDK is served by Cove at `/cove-sdk.js`; never bundle a copy or send raw
postMessage calls. `cove.version` reports host release metadata and
`cove.sdkVersion` identifies the SDK API. Await `cove.ready` before displaying
host-dependent content, then use `cove.supports?.("ui.openPanel")` for optional
features. It reflects the current surface, not model configuration or permission.
An inline snapshot cannot gain SQL or AI access with feature detection.
`ready` rejects if initialization times out; show an error and a reopen hint.

For an App that requires beta.16 features, set
`"min_host_version": "0.1.0-beta.16"` in the manifest. Starting with beta.16,
Cove checks this field before validating other manifest fields and shows an
upgrade instruction if the required release is newer than the installed one.

Known Finder metadata (`.DS_Store`, `__MACOSX/`, `._*`) is ignored consistently
by import and packaging. Other hidden paths, traversal, duplicate paths and
symlinks remain invalid. Migrations and your App resources must not use those
metadata names. Uncaught errors are reported to the host as a category only;
never embed credentials or private data into diagnostic messages.

## Build and deliver

After dragging Cove to Applications, run this in each new Terminal session where
you want to use the bundled `coveapp` command. Adjust the path if you installed
Cove elsewhere.

```sh
export PATH="/Applications/Cove.app/Contents/MacOS:$PATH"
```

1. Ask for the user's idea and only the essential missing details. Propose a
   small useful first version, then build it using ordinary HTML/CSS/JavaScript.
2. Start with the complete example below. Choose your own publisher/app IDs and
   design a screen appropriate to the idea, including empty, loading and error
   states. Give important controls clear labels and support narrow screens.
3. With terminal tools, run `coveapp validate APP_FOLDER`, then
   `coveapp dev APP_FOLDER` to inspect and repair the actual UI. `--simulate`
   explicitly enables simulated AI; `--model-endpoint LOOPBACK_URL` enables a
   real local compatible model with review. Simulation is not real-model proof.
   Use `--no-open --launch-file /private/path/launch.json` for automation. The CLI
   reports the private descriptor path; its `url` is a single-use launch link,
   never printed to shared logs. Reload the existing tab to reuse its session.
   Valid source edits reload automatically, preserving preview data. Invalid
   edits keep the last valid UI and report the error. Reload source also rereads
   files. Preview includes all theme tokens, a narrow-width control, a simulated
   Chat draft and manual actions using the real input/result validators. These
   controls never access real conversations; repeat installation checks in Cove.
4. Deliver the folder, or run `coveapp pack APP_FOLDER OUTPUT.coveapp`. A user of
   a browser AI can save the generated files into a folder and select that folder
   in Cove. They do not need Node, a build tool, ZIP renaming or a terminal.
5. In Cove, open Mini Apps, choose Import app/folder, review access and Install.
   Open the installed copy, exercise the primary workflow and reload it. Test
   persists data; a screenshot or successful validation alone is insufficient.
6. For a change, preserve publisher/app IDs and earlier migration steps, append
   needed migrations, and increase `version`. Import the new package and choose
   Update for the existing copy. Test that its previous data remains available.

## Design for Chat and full-page use

Cove can open an installed copy in the right-hand Chat panel or at its stable
`/apps/INSTANCE_ID` page. Use the host's Open in new tab control for a fresh
Browser Session. Do not copy session credentials, open raw resource URLs, or
build your own workspace navigation. In Chat, type `@` to search installed copies
(up to five suggestions), or choose Mini Apps from Tools. Opening a copy alone
does not send its database or App instructions to a model.

The App owns a responsive interface, not a separate version for every surface:

- Start with a useful 320–480 px layout; let lists, cards and forms grow into a
  wider page. Use container/media queries, wrapping toolbars and flexible grids.
  Avoid fixed viewport widths, page-sized hero areas and nested scrolling boxes.
- Use Cove theme tokens. Provide labelled controls, visible keyboard focus,
  loading/empty/error states, and explicit save feedback. Support long user text.
- `cove.ui.getContext()` returns `{surface, width, height, readOnly, snapshot?}`.
  `surface` is `panel`, `page` or the optional saved `inline` view; dimensions describe the available frame, not the browser window.
  `cove.ui.onContextChange(listener)` observes changes and returns an unsubscribe
  function. The first event may arrive after App startup; layout must also work
  with ordinary CSS. `await cove.ui.requestExpand()` asks the host for more room
  and returns `{ok}`. It does not navigate or grant more access.
- Keep all user data in the instance's SQL store. Resizing or expanding a panel
  keeps the same App frame. Closing the panel can unload it; save durable work
  explicitly and recover it on reopening.
- Use `cove.chat.addToDraft(text)` or declared manual actions to share selected,
  bounded reference content. In a Chat panel the destination is the conversation
  that opened it; after switching conversations the user must reopen/rebind it.
  `addToDraft` and **Add selected to draft** in manual App actions create editable
  draft text. Separately, **Review App context** attaches a `.covecontext` source
  that users can preview or remove rather than edit as draft text. Submitted
  content is captured by the existing Generation lifecycle; later App edits do
  not rewrite a sent turn or its retry context. Never automatically export all
  App rows.

For authoring assistants, ship an `agent.md` explaining domain terms, fields,
manual action input schemas and documented SDK usage. Declare `assistant.guide`
and a read-only context action so the user can preview and choose records with
`@App`. Cove includes this guide as reference material only after confirmation,
never as system instructions. This is not an executable MCP server; model-
initiated tools remain out of scope. Optional `views.inline` entries display the
saved selection in answers; see **App context for Chat and saved answer views**.

Before delivery, inspect both a narrow panel-sized preview and a full page, in
light and dark themes. Install in Cove and test selecting it with `@`, sharing a
record to the intended chat, reopening, and updating without losing that record.

## Minimal example

Create these two files at the root of a new folder. The example is a starting
point, not the required appearance for every App.

`manifest.json`:

```json
{
  "format": "cove.browser-app/1",
  "publisher": "my-tools",
  "app": "tiny-notes-basic",
  "name": "Tiny Notes",
  "description": "A quiet place for short notes.",
  "version": "1.0.0",
  "min_host_version": "0.1.0-beta.16",
  "entry": "index.html",
  "capabilities": ["chat.attach", "files.open", "files.save", "speech.speak"],
  "actions": [
    {"name":"notes.list","description":"Choose notes to discuss","inputSchema":{"type":"object","properties":{},"additionalProperties":false}},
    {"name":"notes.add","description":"Save a note","inputSchema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":2000}},"required":["text"],"additionalProperties":false}}
  ]
}
```

`index.html`:

```html
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <title>Tiny Notes</title>
  <script src="/cove-sdk.js"></script>
  <style>
    * { box-sizing: border-box; }
    body { margin: 0; padding: clamp(12px, 4vw, 24px); font: 15px system-ui;
      background: var(--cove-bg, #faf9f5); color: var(--cove-text, #252820); }
    main { max-width: 640px; margin: auto; }
    button:focus-visible, textarea:focus-visible { outline: 2px solid var(--cove-accent, #437454); outline-offset: 2px; }
    textarea { width: 100%; min-height: 80px; padding: 12px; font: inherit; }
    button { padding: 10px 16px; margin-top: 10px; cursor: pointer; }
    li { padding: 12px 0; white-space: pre-wrap; }
    #status { color: var(--cove-muted, #62695b); }
  </style>
</head>
<body><main>
  <h1>Tiny Notes</h1><p>Keep a thought, then bring it to Chat when needed.</p>
  <label for="text">Your note</label><textarea id="text" maxlength="2000"></textarea>
  <button id="save" disabled>Save note</button>
  <button id="import" hidden>Import text</button>
  <button id="export" hidden>Export notes</button>
  <button id="stop-reading" hidden>Stop reading</button>
  <p id="status" role="status">Opening your notes…</p><ul id="notes"></ul>
</main><script>
  const input = document.getElementById('text');
  const status = document.getElementById('status');
  async function listNotes() {
    return cove.sql.query('SELECT id,text FROM notes ORDER BY id DESC LIMIT 16');
  }
  async function render() {
    const list = document.getElementById('notes'); list.replaceChildren();
    for (const note of await listNotes()) {
      const item = document.createElement('li');
      const text = document.createElement('span'); text.textContent = note.text;
      const attach = document.createElement('button'); attach.textContent = 'Add to Chat';
      attach.onclick = () => cove.chat.addToDraft(note.text).catch(showError);
      const remove = document.createElement('button'); remove.textContent = 'Remove';
      remove.onclick = async () => {
        try {
          if (!cove.supports?.('ui.confirm')) throw new Error('Update Cove to use host confirmations.');
          const {confirmed} = await cove.ui.confirm({title:'Remove note?',message:'This note will be removed from your notebook.'});
          if (confirmed) { await cove.sql.execute('DELETE FROM notes WHERE id = ?', [note.id]); await render(); }
        } catch(error) { showError(error); }
      };
      item.append(text, document.createElement('br'), attach, remove);
      if (cove.supports?.('speech.speak')) {
        const read = document.createElement('button'); read.textContent = 'Read aloud';
        read.onclick = () => cove.speech.speak({text:note.text,language:'en-US'}).catch(showError);
        item.append(read);
      }
      list.append(item);
    }
  }
  function showError(error) { status.textContent = error.message; }
  async function addNote({text}) {
    text = text.trim();
    if (!text || [...text].length > 2000) throw new Error('Enter a note of 1 to 2000 characters.');
    await cove.sql.execute('INSERT INTO notes(text) VALUES (?)', [text]);
    await render(); return {text: 'Note saved.'};
  }
  (async () => {
    await cove.ready;
    await cove.sql.migrate([[{sql:'CREATE TABLE notes(id INTEGER PRIMARY KEY,text TEXT NOT NULL)'}]]);
    cove.actions.register('notes.list', async () => {
      const items = [];
      for (const note of await listNotes()) {
        const item = {label:note.text.slice(0,70),content:note.text};
        if (new TextEncoder().encode(JSON.stringify({items:[...items,item]})).length > 60*1024) break;
        items.push(item);
      }
      return {items};
    });
    cove.actions.register('notes.add', addNote);
    await render(); document.getElementById('save').disabled = false;
    for (const [id, method] of [['import','files.open'], ['export','files.save'], ['stop-reading','speech.stop']])
      document.getElementById(id).hidden = !cove.supports?.(method);
    status.textContent = 'Ready.';
  })().catch(showError);
  document.getElementById('save').onclick = async () => {
    if (!input.value.trim()) return;
    const submitted = input.value;
    try { await addNote({text:submitted}); if (input.value === submitted) input.value=''; status.textContent='Saved.'; }
    catch(error) { showError(error); }
  };
  document.getElementById('import').onclick = async () => {
    try {
      const file = await cove.files.open();
      if (!file) return;
      if ([...file.text].length > 2000) throw new Error('This note supports up to 2000 characters. Shorten the file first.');
      input.value = file.text; status.textContent = 'Imported into the editor. Review it, then save.';
    } catch(error) { showError(error); }
  };
  document.getElementById('export').onclick = async () => {
    try { await cove.files.save({name:'notes.txt',text:(await listNotes()).map(note=>note.text).join('\n\n')}); }
    catch(error) { showError(error); }
  };
  document.getElementById('stop-reading').onclick = () => cove.speech.stop().catch(showError);
</script></body></html>
```

## SDK essentials

Cove supplies `/cove-sdk.js`. Never copy session credentials or Provider Keys
into an App. Use local files instead of CDN scripts, fonts, styles or remote
images. Inline code/styles and local modules are supported; evaluation from
strings and direct network calls are blocked. `localStorage` and IndexedDB are
not the App's persistence contract in this opaque-origin sandbox.

- `await cove.sql.query(sql, params)` returns an array of row objects. Use unique
  column aliases in joins. Parameter values are strings, numbers, booleans/null.
- `await cove.sql.execute(sql, params)` returns `{changes,lastInsertId}`.
- `await cove.sql.transaction([{sql,params}, ...])` executes a bounded atomic
  batch. Never send BEGIN/COMMIT, PRAGMA, ATTACH or VACUUM yourself.
- `await cove.sql.migrate([step1, step2, ...])` runs missing steps atomically.
  Each step is an array of `{sql,params}`. Steps are immutable and append-only.
  Call it before rendering editable UI or registering actions. Returns the
  resulting integer schema version. Cove records SHA-256 digests of each step's
  SQL and normalized parameters in host-reserved `_cove_` metadata. Changing an
  applied step fails with its step number; restore that step and append a new
  one. Metadata commits and travels in backups with the database. Experimental
  databases created before checksum tracking cannot be verified: startup refuses
  them without erasing data; keep an export and create a fresh copy for testing.
  No JavaScript callbacks or async work run inside a SQL transaction.
- `await cove.ai.generate(prompt)` returns final text; requires `ai.generate`.
  The user selects the model in Cove. Calls may require trusted review. Trigger
  AI from an explicit user control, show progress/errors, allow cancel through
  `cove.ai.cancel()`, and let users review/edit output before saving. Do not ask
  for a Key, contact a Provider directly, or silently replace the selected model.
- `await cove.chat.addToDraft(text)` requires `chat.attach`. It appends reference
  text, never sends it. From Chat, the target is the opening composer; standalone
  Apps use global New chat. Limit each addition to 16 KiB of UTF-8 text.
- `cove.actions.register(name, handler)` exposes a declared handler to the manual
  Chat picker. Reuse the handler from App buttons. Return `{text:"..."}` or
  `{items:[{label:"...",detail:"optional",content:"selected reference text"}]}`.
  Results have at most 100 items and 64 KiB total UTF-8 JSON. Cove renders plain
  text/checkboxes, not arbitrary JSON or your App UI. No action chains or model
  tool calling in this version.

### Optional foreground host tools (SDK 1.2)

These methods are available from Cove 0.1.0-beta.16. Check
`cove.supports?.(method)` after `await cove.ready` and offer an in-App fallback
or an update notice when it returns a falsy value. The optional call also
handles hosts that lack `supports`. File access and speech each require a
declared capability and a grant from the user.

| Method | Manifest capability | Result |
| --- | --- | --- |
| `cove.ui.confirm({title,message})` | None | `{confirmed:boolean}` |
| `cove.ui.toast(message)` | None | `{ok:true}` |
| `cove.files.open()` | `files.open` | `{name,text}` or `null` on cancel |
| `cove.files.save({name,text})` | `files.save` | `{downloaded:boolean}` |
| `cove.speech.speak({text,language,rate?})` | `speech.speak` | `{started:boolean}` |
| `cove.speech.stop()` | `speech.speak` | `{stopped:true}` |

Confirmations show the requesting App name. Cancel is the default. Titles are
at most 160 UTF-8 bytes, confirmation messages 4 KiB and notices 512 bytes.
Notices last five seconds and are rate limited to one every two seconds per
frame. Use them for occasional feedback, not progress updates or persistent UI.

File operations open a trusted Cove dialog. The user selects a file or clicks
Download there; the App cannot choose a path or silently read a directory.
Only `.txt`, `.md`, `.csv`, `.tsv` and `.json` UTF-8 files up to **1 MiB** are
supported. Binary/NUL-containing and invalid UTF-8 input is rejected. `open()`
returns the basename and text, preserving any leading UTF-8 byte-order mark.
Export requires a plain filename with one of those extensions and uses a text
download. `downloaded:true` means
the browser download was initiated, not that bytes are durably saved. Imported
text is not automatically stored or sent to AI/Chat: review it in the App first.

Speech opens a host review with a Start reading button and uses only voices the
browser identifies as local. Use explicit language tags such as `ja-JP`, `en-US`
or `zh-CN`, text up to 16 KiB and an optional rate from 0.5 to 2 (default 1).
There is no remote voice fallback. A missing device voice produces an actionable
error; do not claim every Mac has Japanese speech installed. This API uses device
voices, not Cove's separately managed speech-model settings. `started:true` means
the browser signaled that playback began. If the browser fails to start playback,
the call rejects. Cove supplies a Stop control. Closing, reloading or navigating
the App document stops its speech. Another App's speech cannot be stopped
through this API. There are no background speech jobs or audio exports.

One host-tool dialog can await review per Chat Surface. Requests expire after
90 seconds and cancel if the App closes, navigates, reloads or changes generation.
Saved inline views cannot use host tools. Handle cancellation separately from
errors; never retry file writes or speech automatically.

```js
await cove.ready;
if (cove.supports?.("files.open")) {
  const file = await cove.files.open();
  if (file) editor.value = file.text; // Review before storing or sending.
}
if (cove.supports?.("ui.confirm")) {
  const {confirmed} = await cove.ui.confirm({
    title: "Remove this note?", message: "The note will be removed from this notebook."
  });
  if (confirmed) await removeSelectedNote();
}
```

### SQL limits

- A query returns at most **500 rows** and **256 KiB of encoded row data**.
  Exceeding either limit fails the whole query; results are never silently
  truncated. Use `LIMIT` with keyset pagination, and SQL aggregation for charts
  or counts instead of loading the complete history into JavaScript.
- A SQL statement has a **2-second** deadline. A transaction or complete
  migration call has a **3-second** deadline. These include waiting for the
  database connection; split large work into bounded batches.
- Each statement is at most **64 KiB** of SQL. A batch holds at most **64
  statements** and **256 KiB** of SQL; a migration has at most **64 steps**, each
  with those batch limits. Databases are limited to **16 MiB**. SQL connection
  limits also cap columns at 128, bound parameters at 1,024 and values at 1 MiB.
- App SQL cannot use PRAGMA (including table-valued pragma functions), ATTACH,
  DETACH, VACUUM, extension/file functions, triggers or virtual tables. FTS is
  therefore unavailable. `_cove_` names are reserved for the host; do not access
  or edit them. Supply user values through `?` parameters; validation is a
  conservative guardrail, not a complete SQLite parser or malware sandbox.
- `execute` returns `{changes,lastInsertId}`. `transaction` returns `{ok:true}`
  after the atomic batch commits. Neither writes nor AI calls automatically
  retry; inspect saved state after a lost acknowledgement.

Action inputs are flat objects with string, number, integer or boolean fields;
primitive enums, required fields and length/range limits are supported. Nested
objects, array inputs, `$ref` and `oneOf` are rejected. Undeclared capabilities
or unsupported schemas fail validation with an error to repair.

Theme tokens: `--cove-bg`, `--cove-surface`, `--cove-text`, `--cove-muted`,
`--cove-border`, `--cove-accent`, `--cove-radius` and `--cove-font`; adapt with responsive CSS and reduced motion. Keep the App usable
with the keyboard. Cove owns window permissions and credential controls.

## Common repairs

- A blank preview: inspect its console and check the HTML entry, local paths and
  JavaScript errors. Remove CDN/eval dependencies or bundle them locally.
- Data disappears on reload: use `cove.sql`, not browser storage or only JS state.
- A refresh-required error: the copy was updated/restored; reload before writing.
- Same-version changed content: bump the manifest version, then import again.
- Older version rejected: restore its matching backup; never erase current data.
- Interrupted database import or version recovery: restart Cove to roll back the
  incomplete replacement before reopening that copy. This v1 recovery path keeps
  the original data and copy settings; other copies remain usable.
- Lost write acknowledgement: inspect current data before explicitly retrying.
  Do not automatically rerun writes, AI requests or whole action handlers.
- An AI answer is wrong: repair prompt/output validation in the App, offer edits,
  or select a suitable model. A successful request does not establish accuracy.

Public authoring should work without reading Cove internals. If a capability is
missing, explain that limit rather than modifying Cove or inventing an API.

Use `type="button"` and explicit click handlers for saving. Do not rely on
`submit` or `onsubmit`, even with preventDefault: the sandbox blocks form
submission before that handler can run. Semantic forms may still group fields.
Standalone Add to Chat appends to this window's existing empty, ungrouped New chat,
including its unsent text and attachments. If another conversation has an unsent
draft, the handoff is rejected; open the App from that composer's Tools menu to
append there. A new ungrouped chat is created only when doing so would discard
nothing. A changed or busy destination rejects the handoff. Nothing sends automatically.

Host AI outcomes retain up to 30 terminal results per copy for at most seven days.
Running and pending-save results are retained until settled. Save important results
in the App database. Deleting an App copy removes its host task history as well as
its own database and backups.

## Signing updates

Cove verifies package signatures and pins the signing key for updates starting
with 0.1.0-beta.16. Beta.15 can import a signed package if its manifest is
otherwise compatible, but treats the signature as an ordinary resource.

Keep a signing key outside your App source directory:

```sh
coveapp keygen /private/path/app-signing-key
coveapp sign ./my-app /private/path/app-signing-key ./my-app-1.0.0.coveapp
```

The output package includes a public key and a detached Ed25519 signature. Never
share or commit the private key. Keep it for subsequent versions: a signed copy
accepts updates only from the same key. Modified files invalidate the signature.
Unsigned personal packages still work, but publisher labels do not establish
identity. A valid first-install signature also does not prove an official author;
verify the download source yourself. A different signer must use a separate copy.
Release versions are shared by publisher label and App identifier on this Mac.
A different signed package cannot reuse an installed version, even for a separate
copy. Choose an unused version before signing and importing that copy.
Signing rejects source files that refer to the signing key, including hard links
and filesystem path aliases.


## App context for Chat and saved answer views

An App can ship a short LLM-facing `agent.md` (UTF-8, at most 8 KiB) describing
its purpose, data fields, units, scope, action names/input schemas and SDK usage. It is reference
material, never system instructions. Declare it in the manifest:

```json
"assistant": {
  "guide": "agent.md",
  "contextAction": "notes.list",
  "fields": [{"name": "text", "description": "The user's saved note."}]
},
"views": {"inline": "inline.html", "panel": "index.html", "page": "index.html"}
```

`contextAction` must name a declared action that accepts `{}`. Implement it as a
bounded read of useful records and register it after migrations. It runs only
when the user clicks **Load records for review** in the visible App panel.
Do not mutate data in a context action. This is an author contract; Cove does
not claim to enforce SQL read-only mode for arbitrary action JavaScript.
Return at most 100 selectable `{label, detail?, content}` items, or text. Users
choose what to include. Candidate results may use the action's 64 KiB budget;
the starter leaves headroom with 60 KiB. This is separate from the final
selection, which is limited to 16 KiB of JSON; with
metadata the reference is limited to 32 KiB. Trim the *candidate set* with
pagination; never silently truncate a selected record. Ordinary attachment limits
still apply (four sources per turn and at most 4,000 extracted lines per source).

Selecting `@App` opens **Review App context**; it does not send a message or
expose the database. The host adds a reviewed `.covecontext` source to the opening
composer. The App description, guide, fields and selected data enter that turn's
immutable source snapshot. Local instance/release routing IDs are excluded from
the text sent to models. Retries and old answers retain the original snapshot.
The source chip supports preview/removal before sending. An App without an
assistant declaration can still contribute its description and manual results.

### Frontend conventions across surfaces

- `page`: the normal App workspace and its standalone browser tab.
- `panel`: a resizable right-hand workspace; support 320 px without horizontal
  overflow. Prioritize the main task, use compact controls and single-column
  layouts, and keep settings secondary. Expansion must retain state.
- `inline`: an explicitly activated view inside a Chat answer. Opt in with a
  packaged `views.inline` HTML entry. It receives **only the saved selection** as
  `context.snapshot` (`{text}` or `{items}`), plus `readOnly: true`. Do not query
  SQL, run actions, attach content or call AI; the host rejects these requests.
  Use local tabs, flip cards, charts or pagination to explore the snapshot.

Use `cove.ui.getContext()` for the current context and subscribe through
`cove.ui.onContextChange(listener)`; it returns an unsubscribe function. The
initial context may arrive after script startup. Context contains `surface`,
`width`, `height`, `readOnly` and, in inline views, `snapshot`. Respond to actual
container size, not only the top-level viewport. `cove.ui.requestExpand()` asks
for more room. `cove.ui.openPanel()` opens the live copy from an inline view.
The SDK also sets `data-cove-surface` on the document root for surface-specific
CSS. Use the SDK rather than inventing a postMessage protocol; the host binds the
installed copy and opening composer. App response HTML/JS comes only from an
installed package after user activation, never from model-generated HTML.

Keep the App's visual identity while using Cove theme tokens for readability.
Use semantic headings, associated labels, keyboard controls, visible focus,
useful empty/loading/error states, reduced motion, and textContent for user data.
Use local assets and semantic HTML; no mandatory React or CSS framework. Test at
320/480 px and full-page widths in light and dark themes, plus the saved inline
view. Validate the package and include screenshots of these surfaces when
handing the App to its user. The starter's `agent.md` and `inline.html` are working
examples; an inline view must remain useful without live data.
