summer-engine 3.6.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +4 -2
  3. package/.codex-plugin/plugin.json +5 -3
  4. package/.cursor-plugin/plugin.json +4 -2
  5. package/.factory-plugin/plugin.json +4 -2
  6. package/CHANGELOG.md +24 -0
  7. package/README.md +11 -5
  8. package/commands/summer.md +2 -1
  9. package/dist/cli/commands/login.d.ts +0 -10
  10. package/dist/cli/commands/login.js +2 -82
  11. package/dist/cli/index.js +0 -4
  12. package/dist/core/auth.d.ts +0 -8
  13. package/dist/core/auth.js +5 -35
  14. package/dist/core/capabilities/apps.d.ts +318 -0
  15. package/dist/core/capabilities/apps.js +340 -0
  16. package/dist/core/capabilities/enable-plugin.d.ts +27 -0
  17. package/dist/core/capabilities/enable-plugin.js +75 -0
  18. package/dist/core/capabilities/seeing/args.d.ts +2 -2
  19. package/dist/core/capabilities/seeing/seeing.d.ts +1 -1
  20. package/dist/core/capabilities/sfx-choices.d.ts +2 -15
  21. package/dist/core/capabilities/sfx-choices.js +26 -64
  22. package/dist/core/capabilities/tool-dispatch.js +51 -54
  23. package/dist/core/capability-skew.js +4 -0
  24. package/dist/core/config.d.ts +1 -7
  25. package/dist/core/config.js +5 -75
  26. package/dist/mcp/hosted-mount.js +13 -1
  27. package/dist/mcp/server.d.ts +2 -1
  28. package/dist/mcp/server.js +8 -5
  29. package/dist/mcp/tools/app-tools.d.ts +2 -0
  30. package/dist/mcp/tools/app-tools.js +64 -0
  31. package/dist/mcp/tools/creator-tools.js +0 -71
  32. package/dist/mcp/tools/generate-tools.js +6 -7
  33. package/gemini-extension.json +3 -1
  34. package/library/references/mcp-tools-reference/mcp-tools-reference.md +24 -5
  35. package/library/skills/README.md +10 -2
  36. package/library/skills/publish-your-game/SKILL.md +2 -0
  37. package/library/skills/sound-effect/SKILL.md +2 -0
  38. package/library/skills/summer-apps/SKILL.md +152 -0
  39. package/library/skills/summer-apps/manifest.md +57 -0
  40. package/library/skills/summer-apps/minimal-app.md +183 -0
  41. package/library/skills/summer-apps/resource.yaml +36 -0
  42. package/library/skills/summer-apps/sdk-reference.md +135 -0
  43. package/library/skills/summer-apps-design/SKILL.md +197 -0
  44. package/library/skills/summer-apps-design/resource.yaml +23 -0
  45. package/library/skills/using-summer/SKILL.md +1 -0
  46. package/library/tools/app-call/resource.yaml +59 -0
  47. package/library/tools/app-create/resource.yaml +67 -0
  48. package/library/tools/app-data/resource.yaml +74 -0
  49. package/library/tools/app-dock/resource.yaml +59 -0
  50. package/library/tools/app-events/resource.yaml +68 -0
  51. package/library/tools/app-get/resource.yaml +46 -0
  52. package/library/tools/app-guide/resource.yaml +55 -0
  53. package/library/tools/app-list/resource.yaml +48 -0
  54. package/library/tools/app-page/resource.yaml +74 -0
  55. package/library/tools/app-publish/resource.yaml +90 -0
  56. package/library/tools/app-report-gap/resource.yaml +58 -0
  57. package/library/tools/app-screenshot/resource.yaml +85 -0
  58. package/library/tools/app-tools/resource.yaml +46 -0
  59. package/library/tools/app-update/resource.yaml +68 -0
  60. package/library/tools/enable-plugin/resource.yaml +53 -0
  61. package/library/tools/generate-sfx-choices/resource.yaml +2 -2
  62. package/package.json +1 -1
  63. package/registry/generated/aliases.json +15 -3
  64. package/registry/generated/counts.json +3 -3
  65. package/registry/generated/gemini-extension.json +3 -1
  66. package/registry/generated/index.json +759 -209
  67. package/registry/generated/marketplace.claude.json +2 -2
  68. package/registry/generated/plugin.claude.json +4 -2
  69. package/registry/generated/plugin.codex.json +5 -3
  70. package/registry/generated/plugin.cursor.json +4 -2
  71. package/registry/generated/plugin.factory.json +4 -2
  72. package/registry/generated/skills-index.md +10 -2
  73. package/registry/generated/skills-registry.json +27 -0
  74. package/registry/schemas/allowed-hosts.json +4 -2
  75. package/dist/cli/commands/publish.d.ts +0 -2
  76. package/dist/cli/commands/publish.js +0 -21
  77. package/dist/cli/commands/releases.d.ts +0 -2
  78. package/dist/cli/commands/releases.js +0 -20
  79. package/dist/core/capabilities/creator.d.ts +0 -65
  80. package/dist/core/capabilities/creator.js +0 -374
  81. package/library/tools/creator-config/resource.yaml +0 -63
  82. package/library/tools/creator-publish/resource.yaml +0 -74
  83. package/library/tools/creator-releases/resource.yaml +0 -53
@@ -0,0 +1,183 @@
1
+ # A complete minimal Summer App
2
+
3
+ A working code app: shared notes for a playtest. Copy it, rename things, then grow it.
4
+ It shows every piece an app needs: the manifest, loading the SDK and kit, waiting for
5
+ the host, shared data (list, put, live changes), who changed a row (person or agent),
6
+ an edit flow (dialog + form with setValues), status badges, an error with Try again, the
7
+ page declaration, an agent event, an agent tool and frame-move state.
8
+
9
+ Publish it with `summer_app_publish {appId, dir, manifest, note}` where `dir` holds
10
+ `index.html` and `app.js`, or pass the same two as `files`. The page, sections, inputs,
11
+ table, notice and empty text are kit components (`summer_app_guide` section `kit`, or
12
+ `/summer-ui/v1/catalog.json` on the app host); no app CSS is needed.
13
+
14
+ ## The manifest (send it as `manifest`)
15
+
16
+ ```json
17
+ {
18
+ "name": "Playtest notes",
19
+ "purpose": "Tester notes per level. Notes live in this app's shared data.",
20
+ "permissions": ["data"],
21
+ "collections": {
22
+ "notes": {
23
+ "description": "One remark from a playtest",
24
+ "fields": {
25
+ "text": { "type": "string", "required": true, "description": "What the tester said" },
26
+ "level": { "type": "string", "description": "Level name, e.g. bridge" },
27
+ "status": { "type": "string", "description": "open or fixed" },
28
+ "author": { "type": "string", "description": "Who added it" }
29
+ }
30
+ }
31
+ },
32
+ "agentEvents": ["note.added"],
33
+ "agentTools": [
34
+ {
35
+ "name": "add_note",
36
+ "description": "Add a playtest note",
37
+ "input": {
38
+ "type": "object",
39
+ "properties": { "text": { "type": "string" }, "level": { "type": "string" } },
40
+ "required": ["text"]
41
+ }
42
+ }
43
+ ]
44
+ }
45
+ ```
46
+
47
+ ## index.html
48
+
49
+ ```html
50
+ <!doctype html>
51
+ <html lang="en">
52
+ <head>
53
+ <meta charset="utf-8">
54
+ <meta name="viewport" content="width=device-width, initial-scale=1">
55
+ <title>Playtest notes</title>
56
+ <!-- Both are ES modules on the app's own host (apps.summerengine.app). Root paths, type="module". -->
57
+ <script type="module" src="/summer-sdk/v1.js"></script>
58
+ <script type="module" src="/summer-ui/v1/ui.js"></script>
59
+ </head>
60
+ <body>
61
+ <summer-page heading="Playtest notes" purpose="Tester notes per level, shared with your team and your agent.">
62
+ <summer-button slot="actions" id="add" variant="primary" icon="plus">Add note</summer-button>
63
+ <summer-section heading="Notes">
64
+ <summer-notice id="error" tone="error" action="Try again" action-icon="refresh-cw" hidden></summer-notice>
65
+ <summer-table id="table" row-key="id" sortable clickable loading
66
+ empty-text="No notes yet. Add the first one, or ask your agent to add the testers' notes."></summer-table>
67
+ </summer-section>
68
+ <summer-dialog id="dialog" heading="Note" description="Shared with your team and your agent.">
69
+ <summer-form id="form" submit-label="Save note">
70
+ <summer-text-input label="Note" name="text" multiline required></summer-text-input>
71
+ <summer-grid columns="2">
72
+ <summer-text-input label="Level" name="level" placeholder="bridge"></summer-text-input>
73
+ <summer-select label="Status" name="status" options='[{"value":"open","label":"Open"},{"value":"fixed","label":"Fixed"}]'></summer-select>
74
+ </summer-grid>
75
+ </summer-form>
76
+ </summer-dialog>
77
+ </summer-page>
78
+ <!-- app.js runs after the SDK module (module scripts run in order). -->
79
+ <script type="module" src="app.js"></script>
80
+ </body>
81
+ </html>
82
+ ```
83
+
84
+ ## app.js
85
+
86
+ ```js
87
+ const notes = summer.data.collection("notes");
88
+ const info = await summer.ready; // { viewer: { userId, name }, params, restored, ... }
89
+ const $ = (id) => document.getElementById(id);
90
+ const table = $("table"), dialog = $("dialog"), form = $("form"), error = $("error");
91
+ let editing = null; // the note id being edited, or null for a new one
92
+
93
+ table.columns = [
94
+ { key: "text", label: "Note", priority: "primary" },
95
+ { key: "level", label: "Level" },
96
+ { key: "status", label: "Status", badges: { open: "warn", fixed: "ok" } }, // one badge tone per value
97
+ { key: "by", label: "By", type: "muted" },
98
+ ];
99
+
100
+ async function load() {
101
+ table.setAttribute("loading", "");
102
+ try {
103
+ const page = await notes.list({ limit: 500 }); // removed notes are never listed
104
+ table.rows = page.records.map((r) => ({
105
+ id: r.recordId,
106
+ ...r.data,
107
+ // createdBy: who made the row ({ userId, kind: "person" | "agent" | "seed", agent?, via? });
108
+ // later edits do not change it (actor is the last writer). Seed rows have no author.
109
+ by: r.createdBy?.kind === "agent" ? `${r.createdBy.agent ?? "Agent"} (agent)` : r.data.author ?? "",
110
+ }));
111
+ error.hidden = true;
112
+ } catch (e) {
113
+ error.setAttribute("text", `Could not load notes: ${e.message}`);
114
+ error.hidden = false;
115
+ } finally {
116
+ table.removeAttribute("loading");
117
+ }
118
+ }
119
+ error.addEventListener("action", load); // the notice's "Try again" button
120
+
121
+ function openEditor(row) {
122
+ editing = row?.id ?? null;
123
+ form.setValues(row ?? { text: "", level: "", status: "open" });
124
+ dialog.show();
125
+ }
126
+ $("add").addEventListener("click", () => openEditor(null));
127
+ table.addEventListener("summer-row", (event) => openEditor(event.detail.row)); // click a row to edit
128
+
129
+ form.addEventListener("submit", async (event) => {
130
+ const { text, level, status } = event.detail.values; // numbers come as numbers, empty as null
131
+ form.setAttribute("busy", "");
132
+ try {
133
+ const id = editing ?? crypto.randomUUID();
134
+ await notes.put(id, { text, level: level ?? "", status: status ?? "open", author: info.viewer.name ?? "someone" });
135
+ if (!editing) await summer.agent.send("note.added", { id, text, level }); // name is in manifest.agentEvents
136
+ dialog.close();
137
+ summerUI.toast("Note saved");
138
+ } catch (e) {
139
+ form.setAttribute("error", e.message);
140
+ } finally {
141
+ form.removeAttribute("busy");
142
+ }
143
+ });
144
+
145
+ // Live: every change by a teammate or an agent arrives as { revision, actor, ops } (or { reset: true }).
146
+ notes.subscribe(() => load());
147
+
148
+ // Agent tool: summer_app_call { tool: "add_note", input: { text, level } } runs this while the app is open.
149
+ // Its writes are recorded as the calling agent's (actor.kind "agent", via "agent-tool").
150
+ summer.agent.tool("add_note", async ({ text, level }, { agent }) => {
151
+ const id = crypto.randomUUID();
152
+ await notes.put(id, { text, level: level ?? "", status: "open", author: agent });
153
+ return { id };
154
+ });
155
+
156
+ // What agents can read and use with summer_app_page.
157
+ summer.page.declare({ actions: [{ id: "add", label: "Add note", run: () => openEditor(null) }] });
158
+
159
+ // Frame moves: Studio moves an idle app to a fresh frame every few minutes. Shared data survives on
160
+ // its own; keep only UI state, such as an open editor.
161
+ summer.app.onSnapshot(() => (dialog.hasAttribute("open") ? { editing, values: form.values } : null));
162
+ if (info.restored?.values) {
163
+ editing = info.restored.editing;
164
+ form.setValues(info.restored.values);
165
+ dialog.show();
166
+ }
167
+
168
+ load();
169
+ ```
170
+
171
+ Playing sound with Web Audio instead of `<audio>`? Wrap it so the frame is not moved
172
+ mid-sound: `summer.app.busy(true)` when it starts, `summer.app.busy(false)` in the
173
+ source's `onended`.
174
+
175
+ ## The agent side of the same app
176
+
177
+ ```json
178
+ { "appId": "<id>", "ops": [{ "op": "put", "collection": "notes", "recordId": "n-1", "data": { "text": "Boss fight too long", "level": "boss", "status": "open", "author": "agent" } }] }
179
+ ```
180
+
181
+ That is a `summer_app_data` write: it works with the app closed, and the open app shows it
182
+ through `notes.subscribe`. `summer_app_tools` and `summer_app_data` reads return the
183
+ `collections` above, so an agent knows the record shape.
@@ -0,0 +1,36 @@
1
+ id: skill/summer-apps
2
+ kind: skill
3
+ version: 0.1.0
4
+ summary: "Build a Summer App, a team tool inside Summer Studio (balance table, quest editor, tracker, pick grid): build loop, Layout vs code, data as API, agent tools."
5
+ use_when:
6
+ - the person asks for a tool for their team ("build us a loot balance tool", "a board to track creatures")
7
+ - the person needs a UI to decide, rate or edit something they will come back to
8
+ - reading or changing the data of an existing Summer App
9
+ - calling an app's agent tools or waiting for what an app sends
10
+ facets:
11
+ lifecycle:
12
+ - build
13
+ domains:
14
+ - tools
15
+ - ui
16
+ - agent-workflow
17
+ modalities:
18
+ - ui
19
+ - docs
20
+ compatibility:
21
+ engine: ">=4.6"
22
+ related:
23
+ skills:
24
+ - skill/summer-apps-design
25
+ tools:
26
+ - tool/app-guide
27
+ - tool/app-create
28
+ - tool/app-publish
29
+ - tool/app-events
30
+ - tool/app-data
31
+ - tool/app-call
32
+ - tool/app-dock
33
+ source: official
34
+ license: MIT
35
+ status: preview
36
+ recommended: true
@@ -0,0 +1,135 @@
1
+ # Summer Apps SDK quick reference
2
+
3
+ `window.summer`, loaded with `<script type="module" src="/summer-sdk/v1.js">` (the app's own
4
+ host, apps.summerengine.app). The UI kit is `<script type="module" src="/summer-ui/v1/ui.js">`
5
+ (stylesheet alone: `/summer-ui/v1/ui.css`). Use `type="module"` (a classic script still works but warns); other paths do not work. Calling `summer.data.list(name)` and the like rejects with `invalid` and says to use `summer.data.collection(name)`.
6
+
7
+ The app runs in a sandboxed frame on that host:
8
+ `sandbox="allow-scripts allow-forms allow-popups allow-modals allow-downloads"`, never
9
+ `allow-same-origin`. So it is an opaque origin (no cookies, no `localStorage`), with no network
10
+ unless the workspace allows a domain; the kit and SDK are served with CORS so the module
11
+ scripts load. It only works inside Summer Studio. To preview, publish to a Scratch app and open
12
+ it there (`/studio/apps/<appId>`). There is no offline or local host; do not build one or mock
13
+ the SDK. Opening `index.html` on its own never connects, so `summer.ready` waits forever.
14
+
15
+ Every call returns a promise and runs as the person using the app. Failures reject with
16
+ `SummerError { code, message }`. Methods need the manifest permission in brackets.
17
+
18
+ ## Start
19
+
20
+ | Call | Returns |
21
+ |---|---|
22
+ | `await summer.ready` | `{ app: { id, name, version, surface, format }, viewer: { userId, name }, permissions: string[], params: { [k]: string }, theme: "light"\|"dark", restored?: any }` |
23
+ | `summer.app.viewer()` | `{ userId, name, image, role: "owner"\|"admin"\|"member", canManage, spentTodayMicro, dailyCapMicro }` |
24
+ | `summer.app.info({ params })` | `{ app, version, manifest, params }` |
25
+ | `summer.app.setTitle(title)`, `summer.app.notify(text)`, `summer.app.needsYou(count)`, `summer.app.open("/studio/...")` | `void` |
26
+ | `summer.app.theme()` / `summer.app.onTheme(fn)` | `"light"\|"dark"` / stop function |
27
+ | `summer.app.onSnapshot(() => state)` | stop function. `state` (JSON, up to 256 KB) comes back as `(await summer.ready).restored` after Studio moves the app to a fresh frame. |
28
+ | `summer.app.busy(on)` | `void`. Wrap Web Audio playback in `busy(true)` / `busy(false)`; `<audio>` and `<video>` count on their own. |
29
+
30
+ Use `(await summer.ready).viewer` for who is using the app; `summer.app.viewer()` is the same
31
+ person plus role and spend. The kit applies Studio's light or dark theme by itself
32
+ (`html.dark`): apps never toggle it. `theme()` / `onTheme` are only for your own drawing (canvas).
33
+
34
+ ## Shared data [data]
35
+
36
+ There is no `summer.data.list(name)`. Always go through `summer.data.collection(name)`.
37
+
38
+ ```js
39
+ const notes = summer.data.collection("notes"); // name: lowercase a-z 0-9 _ . - (max 48)
40
+ ```
41
+
42
+ | Call | Returns |
43
+ |---|---|
44
+ | `notes.list({ limit = 200, after })` | `{ revision, records: Record[], next: string\|null, collections: [{ name, count }] }`. Removed records are never listed. Pass `next` as `after` for the next page (max 500 per page). |
45
+ | `notes.get(id)` | `Record`, or `null` (also for a removed record) |
46
+ | `notes.put(id, data, { ifRevision })` | `Write` (creates or replaces) |
47
+ | `notes.patch(id, partial, { ifRevision })` | `Write` (shallow merge; `null` removes a key; creates if missing) |
48
+ | `notes.remove(id, { ifRevision })` | `Write` |
49
+ | `notes.subscribe((change) => …)` | stop function |
50
+ | `summer.data.subscribe((change) => …)` | every collection |
51
+ | `summer.data.commands({ requestId, baseRevision, ops })` | `Write`: up to 100 ops in one revision |
52
+
53
+ ```ts
54
+ Record = { collection, recordId, data, revision, actor, createdBy, createdAt, updatedAt, deleted }
55
+ Write = { revision, operation: { revision, requestId, actor, ops, createdAt }, records: Record[], replayed }
56
+ change = { revision, actor, ops: Op[] } | { revision, reset: true } // on reset, list again
57
+ actor = { userId, kind: "person" | "agent" | "seed", agent?: "claude-code" | ..., via?: "agent-tool" }
58
+ Op = { op: "put", collection, recordId, data, ifRevision? }
59
+ | { op: "patch", collection, recordId, patch, ifRevision? }
60
+ | { op: "remove", collection, recordId, ifRevision? }
61
+ ```
62
+
63
+ `ifRevision: n` applies only if the record is still at revision `n` (`0`: only if it does not
64
+ exist); otherwise the call rejects with `conflict`. Record ids: letters, digits, `_ . : -`
65
+ (max 128). Records are JSON up to 64 KB, 10,000 per collection, 50 collections.
66
+
67
+ ### Who changed it
68
+
69
+ `actor.userId` is the account the write ran as, the same id as `ready.viewer.userId` and
70
+ `app.viewer().userId`. `kind: "agent"` marks writes an agent made with `summer_app_data`, and
71
+ writes your own code made while running an agent tool for `summer_app_call` (those also have
72
+ `via: "agent-tool"`). Show agent-made rows (a small "by agent" label) so people know.
73
+
74
+ `actor` is the last writer. `createdBy` (same shape) is who created the record and does not
75
+ change on later edits, so take the "by agent" label from `createdBy.kind === "agent"`: it
76
+ survives a person's edit. `kind: "seed"` is starter data an agent wrote for the team
77
+ (`summer_app_data` with `as: "seed"`): show no author for it.
78
+
79
+ ## Agents
80
+
81
+ | Call | Returns |
82
+ |---|---|
83
+ | `summer.agent.send(name, payload)` | `{ seq }`. `name` must be in `manifest.agentEvents`. Agents read it with `summer_app_events`. |
84
+ | `summer.agent.tool(name, async (input, { agent }) => result)` | stop function. `name` must be in `manifest.agentTools`; `agent` is the calling agent's name. Data writes the handler makes are recorded as that agent's (`via: "agent-tool"`). `summer_app_call` runs it; return JSON (under 100 KB); a throw becomes `tool_failed`. |
85
+ | `summer.agent.onMessage((message) => …)` | stop function |
86
+ | `summer.page.declare({ fields, actions })` | promise. `fields: [{ id, label, kind: "text"\|"long-text"\|"number"\|"toggle"\|"choice", value, options?: [{ value, label }] (for choice), max?, hint?, set(value) }]`, `actions: [{ id, label, description?, critical?, run() }]`. Call it again when values change. Critical actions are pressed only by the person. |
87
+
88
+ ## Assets, generation, AI
89
+
90
+ | Call | Permission | Returns |
91
+ |---|---|---|
92
+ | `summer.assets.search(q, { filters, limit })` | assets:read | matching assets |
93
+ | `summer.assets.get(id)` | assets:read | one asset (`fileUrl`/`url`, `kind`, `title`, ...) |
94
+ | `summer.assets.upload({ name, contentType, base64 })` | assets:write | the new asset |
95
+ | `summer.assets.saveToLibrary(id, { name })` | assets:write | the saved asset |
96
+ | `summer.generate.image({ prompt })`, `.sfx({ prompt, durationSeconds })`, `.sfxChoices({ prompt })`, `.music({ prompt, durationSeconds })`, `.voice({ text, voiceId })` | generate | the result with its asset |
97
+ | `summer.generate.model3d({ prompt })`, `.video({ prompt })`, then `summer.generate.job(jobId)` | generate | a job, then its status |
98
+ | `summer.ai.complete({ prompt, system, json })` | ai | the model's answer |
99
+
100
+ Paid calls spend the viewer's credits; `spend_cap_reached` when the app's daily cap is hit.
101
+
102
+ ## Team, projects, analytics
103
+
104
+ | Call | Permission |
105
+ |---|---|
106
+ | `summer.team.members()` → `{ members: [{ userId, role, name, image }] }` (never emails) | team:read |
107
+ | `summer.team.presence()` → `{ presence: [{ userId, name, image, surface, seenAt }] }` | none |
108
+ | `summer.projects.list()`, `summer.projects.get(id)` | projects:read |
109
+ | `summer.grow.portfolio({ range: 7\|28\|90 })` (totals and per-game rows each carry `previous`: the same-length window before, or null), `summer.grow.game(id)`, `summer.grow.earnings()` | grow:read |
110
+
111
+ ## Engine [engine:read / engine:write]
112
+
113
+ | Call | Notes |
114
+ |---|---|
115
+ | `summer.engine.status()` | Is an engine connected for this person |
116
+ | `summer.engine.readFile(path)` / `writeFile(path, content)` | Only `manifest.engineFiles` paths (and `res://addons/<plugin>/`) |
117
+ | `summer.engine.ops([{ op: "AddNode", ... }])` | App op allowlist only; values are Godot strings (`"Vector3(0, 10, 0)"`) |
118
+ | `summer.engine.play(scene)`, `stop()`, `screenshot("viewport"\|"game")`, `state(kind)` | |
119
+ | `summer.engine.onEvent(fn)`, `summer.engine.plugin.send(msg)`, `summer.engine.plugin.onMessage(fn)` | |
120
+
121
+ `engine_offline`: no Summer Engine connected; show an "Open in Summer Engine" hint.
122
+
123
+ ## Kit values
124
+
125
+ `<summer-form>` gives its fields' values by `name` (fields anywhere inside it count, also
126
+ inside `summer-grid`); `form.values = {...}` or `form.setValues({...})` loads a record into it
127
+ for editing. `<summer-text-input type="number">` and `<summer-slider>` give numbers in form
128
+ values and change events (an empty number field gives `null`); the input's `.value` property
129
+ stays text. A `<summer-toggle>` is a boolean.
130
+
131
+ ## Errors
132
+
133
+ `permission_missing` (add it to the manifest), `invalid` (arguments; the message says which),
134
+ `unknown_method`, `conflict`, `rate_limited` (600 calls a minute, 60 paid), `spend_cap_reached`,
135
+ `engine_offline`, `not_implemented`, `unavailable`.
@@ -0,0 +1,197 @@
1
+ ---
2
+ name: summer-apps-design
3
+ description: "How a Summer App should look - page layout, Summer UI kit components, tables, charts, media, boards, states and a pre-ship checklist."
4
+ license: MIT
5
+ compatibility: [Cursor, Claude Code, Windsurf, Codex]
6
+ category: tools
7
+ user-invocable: false
8
+ ---
9
+
10
+ # Summer Apps design
11
+
12
+ A Summer App is a tool a game team uses every day inside Summer Studio. It should
13
+ feel like a calm, precise studio instrument around colourful game content. The
14
+ chrome is ink on paper; colour comes from the game (art, renders, waveforms) and
15
+ from data that means something. You have freedom inside the app. Use it for the
16
+ task, not for decoration.
17
+
18
+ ## The catalog is the API
19
+
20
+ The kit ships `summer-ui/v1/catalog.json` next to `ui.js` on the kit origin (the
21
+ summer-apps skill says how to load the kit). It lists every component's
22
+ attributes with value shapes, events with their `detail`, slots, methods, a working
23
+ example, the icon names and the tokens. **Read the entry before you use a
24
+ component** and copy its example. Never guess an attribute.
25
+
26
+ - JSON attributes take a JSON string, or set the same-named property:
27
+ `table.rows = rows`. Prefer properties for data.
28
+ - Events bubble out of the components; read `event.detail`.
29
+ - Icons: only names in `icons.names` (lucide: `plus`, `check`, `pencil`,
30
+ `trash-2`, `search`, `sparkles`, `download`, `ellipsis`, ...). Never draw SVG.
31
+ - Colours: only the tokens in `tokens` (`var(--se-text)`, ...). No hex.
32
+
33
+ ## Do this
34
+
35
+ 1. Write one line: what the person came to do, and the one action that finishes
36
+ it. That action is the primary button.
37
+ 2. Build the page from the recipe below. Every part is a kit component; write your
38
+ own CSS only for layout glue (a grid, a gap), from tokens, under 30 lines.
39
+ 3. Read real data through the SDK. No lorem ipsum, no invented numbers.
40
+ 4. Wire `loading`, empty and error for every data component.
41
+ 5. Run the checklist. Look at light and dark, 390px and 1440px.
42
+
43
+ ## Page recipe
44
+
45
+ ```html
46
+ <summer-page heading="Playtest results" purpose="How each level played in the latest playtest. Notes are shared with your team and your agent.">
47
+ <summer-avatar-stack slot="actions" people='[{"name":"Mia"},{"name":"Tom"}]'></summer-avatar-stack>
48
+ <span slot="actions" class="summer-meta">Playtest 12 Oct</span>
49
+ <summer-button slot="actions" variant="primary" icon="plus">Add note</summer-button>
50
+
51
+ <summer-stats loading>…3-5 summer-stat…</summer-stats>
52
+ <summer-chart heading="Where players stop" loading …></summer-chart>
53
+ <summer-section heading="Levels">
54
+ <summer-select slot="aside" label="Sort" options='…'></summer-select>
55
+ <summer-table loading …></summer-table>
56
+ </summer-section>
57
+ </summer-page>
58
+ ```
59
+
60
+ - `summer-page` gives the canvas, width (1280px; forms 640px), padding and spacing,
61
+ and the header. The purpose line says what the tool does and where data goes.
62
+ Header actions, in order: avatars, one meta (`.summer-meta` or
63
+ `summer-progress`), secondary buttons, the primary.
64
+ - One `summer-section` per part, with a short noun heading. Extras for the title row
65
+ (a select, a count) go in `slot="aside"`; a select there turns compact by itself.
66
+ - A chart gets its own `heading` (its legend then sits in the title row). A chart
67
+ without a heading as the first thing in a section moves its legend into the
68
+ section's title row.
69
+ - A page with one part needs no section heading and no card around it.
70
+ - Tables and lists are always framed; charts never. Do not set `frame="false"` on
71
+ a page.
72
+
73
+ ## Pick the component
74
+
75
+ | Job | Use (exact names; shapes in the catalog) |
76
+ | --- | --- |
77
+ | Key numbers | `summer-stats` > 3-5 `summer-stat label value delta hint tone`. Delta is text like "+12 this week"; the kit colours the number |
78
+ | A comparison or trend | `summer-chart kind x y heading highlight reference`. `y` is a JSON array of keys; `highlight` `{key, above, below, equals, tone, label, otherLabel}` (`key` tests another field, e.g. colour `lines` bars where `redo` is above 3; `equals` takes a value or a list); counts get whole-number gridlines by themselves; `reference` `{value, label, tone}`. One question per chart |
79
+ | Records you scan, sort, edit | `summer-table columns rows row-key`. Column `{key, label, format, digits, type: bar/badge/muted, over, tone, badges, priority: "secondary", thumb, editable, badge, badgeTone, width, minWidth, wrap}`. Text columns wrap to 2 lines by themselves; `width` takes pixels, a CSS length, "narrow" or "wide" (e.g. `"wide"` for a notes column). `badges` maps each value to a tone or `{tone, label}` for a status column (`{"draft": "quiet", "review": {"tone": "info", "label": "In review"}, "done": "ok"}`; unlabelled values show in sentence case); `badge` names a row key shown as a small badge inside a cell (e.g. "+3:01" over target). Under 640px badge columns fold under the name, and rows stack only if the columns still do not fit. `clickable` gives `summer-row`; `selectable="single"` or `"multi"` gives `summer-select-rows` |
80
+ | Unsaved table edits | `summer-save-bar count save-label` (`save` and `discard` events; then `table.commit()` or `table.discard()`) |
81
+ | Notes, tasks, comments | `summer-list items checkable action menu`. Item `{id, title, meta, checked, badge: {text, tone}, action}`; `action` `{id, label, icon}` is the one quiet button per row; `menu` items `{id, label, icon, tone: "danger"}`; events `summer-check`, `summer-action`, `summer-item` |
82
+ | Pipeline stages | `summer-board` > `summer-lane heading lane-id add-label` > `summer-board-card heading card-id art meta person comments done`; `summer-move` event |
83
+ | Pick between versions | `summer-choice-grid items` (`layout="row" heading meta` for one row per need). Item `{id, label, src, kind}` |
84
+ | Filters above a list | `summer-toolbar` > `summer-search`, `summer-segmented options value` (`{value, label, count}`; scrolls inside its own track when it does not fit), `summer-select` in `slot="end"` (compact by itself) |
85
+ | Add or edit something | `summer-dialog heading description` > `summer-form submit-label` > named inputs |
86
+ | Inputs | `summer-text-input name label hint required multiline`, `summer-select name label options`, `summer-slider`, `summer-toggle`. Every field sends `input` and `change` with `event.detail.value` |
87
+ | Media | `summer-audio`, `summer-video`, `summer-image aspect`, `summer-model-viewer`. Never `<audio controls>` or `<video controls>` |
88
+ | A repeated object | `summer-card variant="object" media selected` |
89
+ | Status in words | `summer-badge tone` (ok, warn, bad, info, quiet, count) |
90
+ | Buttons | `summer-button variant icon size`, `summer-icon-button icon label` |
91
+ | Messages | `summer-notice tone text action` in place (`action="Try again"` adds a button; listen for `action`); `summerUI.toast(text)` after an action |
92
+ | Nothing yet | `summer-empty-state heading body` with one button inside |
93
+
94
+ If you play Web Audio yourself, call `summer.app.busy(true)` while it plays and
95
+ `busy(false)` after.
96
+
97
+ ## Patterns
98
+
99
+ **Dashboard (numbers, chart, table).** Stats, then one chart answering the main
100
+ question with the problem bars highlighted and a reference line for the target,
101
+ then the table with a bar column for the value that matters. Columns a phone can do
102
+ without get `priority: "secondary"`.
103
+
104
+ **Badges in tables.** Two kinds, one rule each:
105
+ - A workflow status column (draft, in review, done, needs art) shows every value as
106
+ a badge with `badges`. Neutral steps are `quiet`, work in progress `info`, done
107
+ `ok`; only values that need someone to act get `warn` or `bad`.
108
+ - A health column (balance, over target, errors) shows a badge only on the rows
109
+ that need attention and stays empty on the rest. Never "OK" on every row.
110
+
111
+ **Edit flow.** A row click (`summer-row`) or the header's primary opens a
112
+ `summer-dialog` holding a `summer-form`. For an edit, call
113
+ `form.setValues(record)` before `dialog.show()`; for a new item, show it empty.
114
+ Listen for `submit` (`detail.values`; number fields give numbers, empty gives
115
+ null); set `busy` while saving and `error` if it fails; close the dialog on success and toast the result ("Note saved"). The rule is one
116
+ primary per region: the page header, an open dialog, a form that is the whole page,
117
+ and the save bar are separate regions. A page whose job is the form puts Save in the
118
+ form and no primary in the header.
119
+
120
+ **Empty page and the header.** One primary on screen. When the whole page is empty,
121
+ the empty state holds the primary ("Add note" or "Ask your agent") and the header
122
+ shows no primary until there is data. When only one section is empty, its
123
+ empty-state button is `secondary` and the header keeps its primary.
124
+
125
+ **List with row actions.** `summer-list` with `checkable` for done or fixed, one
126
+ `action` for the most common step (`{id: "fix", label: "Mark fixed", icon:
127
+ "check"}`: a quiet button that shows on hover and on touch), and `menu` for the rest
128
+ (Edit, Copy, Delete with `tone: "danger"`). Never a bordered button on every row.
129
+ Delete asks first in a `summer-dialog` with `summer-form destructive`.
130
+
131
+ **Data your agent fills in.** When the app waits on an agent (an import, an
132
+ analysis), the empty state says what is missing and offers the request:
133
+ `summer-empty-state heading="No playtest data yet" body="Your agent can import
134
+ last night's playtest."` with a `summer-button icon="sparkles"` "Ask your agent"
135
+ (primary or secondary per the empty-page rule above). On click call `summer.agent.send("playtest.import", {})`, swap the button
136
+ for `summer-notice tone="info"` "Your agent was asked. This fills in when it
137
+ answers.", and subscribe so rows appear live:
138
+ `summer.data.collection("levels").subscribe(render)` (there is no
139
+ `summer.data.list(name)`).
140
+
141
+ **Who added it, who changed it.** People and agents edit the same data. Every
142
+ record carries `createdBy` (set once, when it was added) and `actor` (the last
143
+ writer), both `{userId, kind: "person" | "agent" | "seed", agent, via}` or null on
144
+ old records. A "By"
145
+ column or list meta shows `createdBy`: the person's name, or the agent's name
146
+ ("Claude Code") with an "Agent" badge when `createdBy.kind` is "agent". Show
147
+ nothing for "seed" (starter data) or null. Add "Last changed by" from `actor` only when it
148
+ helps the task. Say "You" when the `userId` is `info.viewer.userId`. Flash a row or
149
+ card that someone else just changed. Changes from `subscribe` carry `actor` but not
150
+ `createdBy`: read the record again (`get(id)`) to show who added it.
151
+
152
+ **Board.** Lanes per stage, art on cards from the asset, owner initial and comment
153
+ count. Move cards with `summer-move`; write the new stage to data at once.
154
+
155
+ **Pick grid.** One `summer-choice-grid layout="row"` per need; the header shows
156
+ `summer-progress` and the primary sends the picks ("Send 7 to game").
157
+
158
+ ## States
159
+
160
+ - Loading: set `loading` on stats, chart, table, list and select until the data
161
+ arrives. Never show "No data yet" or "-" while loading.
162
+ - Empty: `empty-text`, or `empty-heading` + `empty-body`, on the component, or
163
+ `summer-empty-state` for a whole page. Say what to do next.
164
+ - Error: `summer-notice tone="error" text="The notes could not load." action="Try again"`
165
+ in place of the part that failed; retry on its `action` event. The rest keeps
166
+ working.
167
+ - Saving: `busy` on the form or save bar, `loading` on a button.
168
+
169
+ ## Type, colour, copy
170
+
171
+ - The kit sets type. In your own glue use 14px body, 12px muted meta, weights 400,
172
+ 500, 600, `tabular-nums` for numbers. Never 700, never all caps.
173
+ - Colour means something: quiet by default, ink or a status tone for what needs
174
+ attention, always with words.
175
+ - Plain words, sentence case, no full stop on labels. Name actions by result ("Save
176
+ note", "Write to game"). Errors do not apologise. Never "AI-generated".
177
+
178
+ ## Never
179
+
180
+ Grey boxes around numbers. Cards around every section, cards inside cards. Native
181
+ audio, video, select or range controls. Two primaries in one region. A labelled
182
+ button on every row. A health badge on every row that only says all is well. Hand-drawn icons, emoji. Hex
183
+ colours, gradients, glows, shadows on cards. Mono font for numbers. "No data yet"
184
+ while loading.
185
+
186
+ ## Checklist
187
+
188
+ - [ ] The purpose line says what the tool does; one primary per region finishes it.
189
+ - [ ] Every component and attribute matches its catalog entry.
190
+ - [ ] Numbers line up; long text wraps; on a phone nothing scrolls off.
191
+ - [ ] Loading, empty (including "waiting for your agent") and error states exist
192
+ and keep the layout in place.
193
+ - [ ] Subtract: remove each badge, icon, helper line and frame; keep it only if the
194
+ task gets worse without it.
195
+ - [ ] Works by keyboard; icon buttons have labels.
196
+ - [ ] Looked at light and dark, 390px and 1440px; nothing scrolls sideways except a
197
+ board or a wide table inside its frame.
@@ -0,0 +1,23 @@
1
+ id: skill/summer-apps-design
2
+ kind: skill
3
+ version: 0.1.0
4
+ summary: How a Summer App should look - page layout, Summer UI kit components, tables, charts, media, boards, states and a pre-ship checklist.
5
+ use_when:
6
+ - building or changing the UI of a Summer App (agent-built team tool inside Summer Studio)
7
+ - an app looks generic, cluttered or off-brand
8
+ - choosing layout for a table, chart, board, pick grid or settings tool
9
+ facets:
10
+ lifecycle:
11
+ - build
12
+ domains:
13
+ - ui
14
+ - tools
15
+ modalities:
16
+ - docs
17
+ related:
18
+ skills:
19
+ - skill/summer-apps
20
+ source: official
21
+ license: MIT
22
+ status: preview
23
+ recommended: true
@@ -112,6 +112,7 @@ When multiple Summer skills could apply, run them in this order:
112
112
  3. **Build skills third** — `fps-controller`, `design-mechanic`, `design-level`, `multiplayer`. These produce the artifacts.
113
113
 
114
114
  > "I want to make a game" → `brainstorm-game` first, then build skills.
115
+ > "Make me a sword clash sound" with no game in sight → the asset skill (`sound-effect`) directly. Asset requests need no brainstorm, no project and no running engine.
115
116
  > "Fix this crash" → `debug` first, then domain skills.
116
117
  > "Add an FPS controller" → check `scene-composition` first, then `fps-controller`.
117
118
 
@@ -0,0 +1,59 @@
1
+ id: tool/app-call
2
+ kind: tool
3
+ version: 1.0.0
4
+ summary: Run one of a Summer App's agent tools inside the person's open app.
5
+ use_when:
6
+ - '"nerf the bow using the balance formula in our app"'
7
+ - using logic that lives in an app (a balance formula, an export) while the app is open
8
+ do_not_use_when:
9
+ - "plain reads and edits of app data: summer_app_data"
10
+ facets:
11
+ lifecycle:
12
+ - build
13
+ domains:
14
+ - tools
15
+ - ui
16
+ compatibility:
17
+ engine: ">=4.6"
18
+ related:
19
+ skills:
20
+ - skill/summer-apps
21
+ source: official
22
+ license: MIT
23
+ status: preview
24
+ aliases:
25
+ - summer_app_call
26
+ implementation:
27
+ module: src/mcp/tools/app-tools.ts
28
+ export: registerAppTools
29
+ surfaces:
30
+ mcp:
31
+ tool_name: summer_app_call
32
+ remote: true
33
+ input_schema:
34
+ type: object
35
+ properties:
36
+ appId:
37
+ type: string
38
+ format: uuid
39
+ description: The app id from summer_app_create or summer_app_list
40
+ tool:
41
+ type: string
42
+ minLength: 1
43
+ maxLength: 64
44
+ description: The agent tool name from summer_app_tools
45
+ input:
46
+ type: object
47
+ additionalProperties: {}
48
+ default: {}
49
+ description: Input matching the tool's input schema
50
+ required:
51
+ - appId
52
+ - tool
53
+ additionalProperties: false
54
+ authority:
55
+ filesystem: false
56
+ editor_mutation: false
57
+ network: true
58
+ credentials: false
59
+ publish: false