@noodleseed/agent-kit 0.13.0 → 0.15.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 (121) hide show
  1. package/README.md +3 -3
  2. package/manifest.json +575 -5
  3. package/package.json +1 -1
  4. package/skills/claude-code/SKILL.md +7 -2
  5. package/skills/claude-code/examples/acme-bistro/README.md +51 -0
  6. package/skills/claude-code/examples/acme-bistro/design/UX-Document.md +435 -0
  7. package/skills/claude-code/examples/acme-bistro/design/api-contract.md +161 -0
  8. package/skills/claude-code/examples/acme-bistro/design/wireframe.html +573 -0
  9. package/skills/claude-code/examples/acme-bistro/noodle.json +5 -0
  10. package/skills/claude-code/examples/acme-bistro/package.json +20 -0
  11. package/skills/claude-code/examples/acme-bistro/src/helpers.ts +7 -0
  12. package/skills/claude-code/examples/acme-bistro/src/server.ts +149 -0
  13. package/skills/claude-code/examples/acme-bistro/src/views/menu-cart.tsx +159 -0
  14. package/skills/claude-code/examples/acme-bistro/src/views/widget-style.css +228 -0
  15. package/skills/claude-code/examples/acme-bistro/test/server.test.ts +21 -0
  16. package/skills/claude-code/examples/acme-bistro/vitest.config.ts +7 -0
  17. package/skills/claude-code/examples/acme-discovery/README.md +85 -0
  18. package/skills/claude-code/examples/acme-discovery/design/UX-Document.md +441 -0
  19. package/skills/claude-code/examples/acme-discovery/design/wireframe.html +670 -0
  20. package/skills/claude-code/examples/acme-discovery/noodle.json +5 -0
  21. package/skills/claude-code/examples/acme-discovery/package.json +20 -0
  22. package/skills/claude-code/examples/acme-discovery/src/helpers.ts +7 -0
  23. package/skills/claude-code/examples/acme-discovery/src/server.ts +202 -0
  24. package/skills/claude-code/examples/acme-discovery/src/views/discovery-carousel.tsx +155 -0
  25. package/skills/claude-code/examples/acme-discovery/src/views/widget-style.css +207 -0
  26. package/skills/claude-code/examples/acme-discovery/test/server.test.ts +24 -0
  27. package/skills/claude-code/examples/acme-discovery/vitest.config.ts +7 -0
  28. package/skills/claude-code/examples/acme-tasks/README.md +80 -0
  29. package/skills/claude-code/examples/acme-tasks/design/UX-Document.md +277 -0
  30. package/skills/claude-code/examples/acme-tasks/design/wireframe.html +603 -0
  31. package/skills/claude-code/examples/acme-tasks/noodle.json +5 -0
  32. package/skills/claude-code/examples/acme-tasks/package.json +20 -0
  33. package/skills/claude-code/examples/acme-tasks/src/helpers.ts +6 -0
  34. package/skills/claude-code/examples/acme-tasks/src/server.ts +141 -0
  35. package/skills/claude-code/examples/acme-tasks/src/views/task-list.tsx +177 -0
  36. package/skills/claude-code/examples/acme-tasks/src/views/widget-style.css +227 -0
  37. package/skills/claude-code/examples/acme-tasks/test/server.test.ts +22 -0
  38. package/skills/claude-code/examples/acme-tasks/vitest.config.ts +7 -0
  39. package/skills/claude-code/examples/food-ordering/README.md +82 -0
  40. package/skills/claude-code/examples/food-ordering/noodle.json +5 -0
  41. package/skills/claude-code/examples/food-ordering/package.json +22 -0
  42. package/skills/claude-code/examples/food-ordering/src/helpers.ts +34 -0
  43. package/skills/claude-code/examples/food-ordering/src/server.ts +412 -0
  44. package/skills/claude-code/examples/food-ordering/src/views/capabilities-card.tsx +155 -0
  45. package/skills/claude-code/examples/food-ordering/src/views/ordering-flow.tsx +659 -0
  46. package/skills/claude-code/examples/food-ordering/src/views/widget-style.css +682 -0
  47. package/skills/claude-code/examples/food-ordering/test/server.test.ts +58 -0
  48. package/skills/claude-code/examples/food-ordering/vitest.config.ts +30 -0
  49. package/skills/claude-code/examples/hello/README.md +13 -0
  50. package/skills/claude-code/examples/hello/noodle.json +5 -0
  51. package/skills/claude-code/examples/hello/package.json +16 -0
  52. package/skills/claude-code/examples/hello/src/server.ts +29 -0
  53. package/skills/claude-code/examples/hello/test/server.test.ts +8 -0
  54. package/skills/claude-code/examples/weather/README.md +54 -0
  55. package/skills/claude-code/examples/weather/noodle.json +4 -0
  56. package/skills/claude-code/examples/weather/package.json +16 -0
  57. package/skills/claude-code/examples/weather/src/server.ts +190 -0
  58. package/skills/claude-code/examples/weather/test/server.test.ts +8 -0
  59. package/skills/claude-code/references/chatgpt-compliance.md +63 -0
  60. package/skills/claude-code/references/connect-an-api.md +76 -0
  61. package/skills/claude-code/references/examples.md +16 -4
  62. package/skills/claude-code/references/experience-design.md +142 -0
  63. package/skills/codex/SKILL.md +7 -2
  64. package/skills/codex/examples/acme-bistro/README.md +51 -0
  65. package/skills/codex/examples/acme-bistro/design/UX-Document.md +435 -0
  66. package/skills/codex/examples/acme-bistro/design/api-contract.md +161 -0
  67. package/skills/codex/examples/acme-bistro/design/wireframe.html +573 -0
  68. package/skills/codex/examples/acme-bistro/noodle.json +5 -0
  69. package/skills/codex/examples/acme-bistro/package.json +20 -0
  70. package/skills/codex/examples/acme-bistro/src/helpers.ts +7 -0
  71. package/skills/codex/examples/acme-bistro/src/server.ts +149 -0
  72. package/skills/codex/examples/acme-bistro/src/views/menu-cart.tsx +159 -0
  73. package/skills/codex/examples/acme-bistro/src/views/widget-style.css +228 -0
  74. package/skills/codex/examples/acme-bistro/test/server.test.ts +21 -0
  75. package/skills/codex/examples/acme-bistro/vitest.config.ts +7 -0
  76. package/skills/codex/examples/acme-discovery/README.md +85 -0
  77. package/skills/codex/examples/acme-discovery/design/UX-Document.md +441 -0
  78. package/skills/codex/examples/acme-discovery/design/wireframe.html +670 -0
  79. package/skills/codex/examples/acme-discovery/noodle.json +5 -0
  80. package/skills/codex/examples/acme-discovery/package.json +20 -0
  81. package/skills/codex/examples/acme-discovery/src/helpers.ts +7 -0
  82. package/skills/codex/examples/acme-discovery/src/server.ts +202 -0
  83. package/skills/codex/examples/acme-discovery/src/views/discovery-carousel.tsx +155 -0
  84. package/skills/codex/examples/acme-discovery/src/views/widget-style.css +207 -0
  85. package/skills/codex/examples/acme-discovery/test/server.test.ts +24 -0
  86. package/skills/codex/examples/acme-discovery/vitest.config.ts +7 -0
  87. package/skills/codex/examples/acme-tasks/README.md +80 -0
  88. package/skills/codex/examples/acme-tasks/design/UX-Document.md +277 -0
  89. package/skills/codex/examples/acme-tasks/design/wireframe.html +603 -0
  90. package/skills/codex/examples/acme-tasks/noodle.json +5 -0
  91. package/skills/codex/examples/acme-tasks/package.json +20 -0
  92. package/skills/codex/examples/acme-tasks/src/helpers.ts +6 -0
  93. package/skills/codex/examples/acme-tasks/src/server.ts +141 -0
  94. package/skills/codex/examples/acme-tasks/src/views/task-list.tsx +177 -0
  95. package/skills/codex/examples/acme-tasks/src/views/widget-style.css +227 -0
  96. package/skills/codex/examples/acme-tasks/test/server.test.ts +22 -0
  97. package/skills/codex/examples/acme-tasks/vitest.config.ts +7 -0
  98. package/skills/codex/examples/food-ordering/README.md +82 -0
  99. package/skills/codex/examples/food-ordering/noodle.json +5 -0
  100. package/skills/codex/examples/food-ordering/package.json +22 -0
  101. package/skills/codex/examples/food-ordering/src/helpers.ts +34 -0
  102. package/skills/codex/examples/food-ordering/src/server.ts +412 -0
  103. package/skills/codex/examples/food-ordering/src/views/capabilities-card.tsx +155 -0
  104. package/skills/codex/examples/food-ordering/src/views/ordering-flow.tsx +659 -0
  105. package/skills/codex/examples/food-ordering/src/views/widget-style.css +682 -0
  106. package/skills/codex/examples/food-ordering/test/server.test.ts +58 -0
  107. package/skills/codex/examples/food-ordering/vitest.config.ts +30 -0
  108. package/skills/codex/examples/hello/README.md +13 -0
  109. package/skills/codex/examples/hello/noodle.json +5 -0
  110. package/skills/codex/examples/hello/package.json +16 -0
  111. package/skills/codex/examples/hello/src/server.ts +29 -0
  112. package/skills/codex/examples/hello/test/server.test.ts +8 -0
  113. package/skills/codex/examples/weather/README.md +54 -0
  114. package/skills/codex/examples/weather/noodle.json +4 -0
  115. package/skills/codex/examples/weather/package.json +16 -0
  116. package/skills/codex/examples/weather/src/server.ts +190 -0
  117. package/skills/codex/examples/weather/test/server.test.ts +8 -0
  118. package/skills/codex/references/chatgpt-compliance.md +63 -0
  119. package/skills/codex/references/connect-an-api.md +76 -0
  120. package/skills/codex/references/examples.md +16 -4
  121. package/skills/codex/references/experience-design.md +142 -0
@@ -0,0 +1,142 @@
1
+ # Experience design
2
+
3
+ Design the app experience before you author it. A ChatGPT app is a conversation with tools and
4
+ widgets, not a website — decide the funnel, the tools, the widgets, and the handoff first, then
5
+ build with the SDK (`references/authoring-workflow.md`, `references/widgets-and-apps.md`). This
6
+ reference is the design discipline; the build references are the mechanics.
7
+
8
+ ## Contents
9
+
10
+ - Design first
11
+ - The handoff is the product
12
+ - Grounded, never guessing
13
+ - Two users: the human and the model
14
+ - ChatGPT-native surface
15
+ - Scope discipline and auth stance
16
+ - Wireframe and UX-spec anatomy
17
+ - The deliverables
18
+ - From design to build
19
+
20
+ ## Design first
21
+
22
+ Write a short design spec before you author `server.ts` — a `SPEC.md`-style note you keep updated as
23
+ the app evolves. It has required fields:
24
+
25
+ - **Funnel boundary** — one sentence stating exactly what happens in ChatGPT and what happens off-app.
26
+ - **Tools** — each model-visible tool, snake_case, with what it takes and returns.
27
+ - **Widgets and display modes** — each widget, PascalCase, and the display mode it renders in
28
+ (inline card / carousel / fullscreen / picture-in-picture). State the modes you deliberately do
29
+ *not* use, and why.
30
+ - **Grounding sources** — where each fact comes from (a `connector` operation, a provided dataset).
31
+ - **Handoff domains** — the external origins the app links out to (these become server
32
+ `handoff.allowedDomains`).
33
+ - **Exceptions** — any deliberate departure from the defaults below, each with its reason.
34
+
35
+ Then author, preview with `noodle dev` / `noodle devtools`, and iterate. The spec is the contract the
36
+ tools, widgets, and handoff all trace back to.
37
+
38
+ ## The handoff is the product
39
+
40
+ Default scope is **top-of-funnel**: ChatGPT owns discovery, intent-shaping, and configuration; the
41
+ partner's own platform owns the transaction, the account, and everything after. The app hands off with
42
+ a deep link that carries the configured state (a pre-filled cart, a chosen configuration), and the
43
+ external target is declared in the server-level `handoff.allowedDomains`. This is a feature: it keeps
44
+ payment and account burden off the app and keeps the partner's platform central.
45
+
46
+ Deliberate exceptions exist — an app that completes the transaction in-chat (handing off for payment
47
+ only), or a two-way app that reads and writes a connected account. When you break the top-of-funnel
48
+ default, write down why in the design spec.
49
+
50
+ ## Grounded, never guessing
51
+
52
+ The app's credibility is that it answers from the partner's own data, reached through a `connector`,
53
+ never invented. Never fabricate compatibility, availability, pricing, or eligibility. For
54
+ consequential lookups, **cite the source and its revision in the widget** (e.g. a spec-sheet name and
55
+ revision date) and route unknowns to a human path rather than improvising. Guardrails belong in the
56
+ rendered pixels, not just in prose.
57
+
58
+ ## Two users: the human and the model
59
+
60
+ Every tool and widget serves two users at once — the human who interacts and the model that reads the
61
+ result. Keep tools atomic with inputs the model can fill from natural language, and return enough
62
+ structure that the model can speak confidently in one round-trip. Build a widget only where plain text
63
+ would genuinely degrade the experience (photos, comparisons, carts, configuration). If text would do,
64
+ don't build the widget.
65
+
66
+ ## ChatGPT-native surface
67
+
68
+ Widgets should read as native to the host. Brand through the `server` `branding` tokens only — the
69
+ compiler derives the palette — and reserve the accent for the primary CTA, the logo, and badges. No
70
+ brand gradients, no app-shoved-into-chat. Keep inline cards to at most two actions and avoid nested
71
+ scroll. Pick each display mode deliberately (fullscreen only where browsing genuinely needs it;
72
+ picture-in-picture only for live ongoing state). See `references/widgets-and-apps.md` for the widget
73
+ mechanics — do not restyle with raw global CSS.
74
+
75
+ ## Scope discipline and auth stance
76
+
77
+ Lock the funnel boundary in writing before designing, and keep a "future enhancements" list as the
78
+ pressure valve. No payment happens in chat. Avoid per-user auth in a top-of-funnel v1 — use the
79
+ partner's service credentials via a `connector`; add end-user auth only when the app is two-way by
80
+ nature (see the `customer-auth` example in `references/examples.md`).
81
+
82
+ ## Wireframe and UX-spec anatomy
83
+
84
+ For anything non-trivial, sketch the experience as a wireframe before authoring — a walk through the
85
+ conversation, screen by screen. Each screen shows a real user message, the **tool call that precedes
86
+ the widget**, and the widget filled with plausible, internally consistent data (never lorem ipsum).
87
+ Label each widget with its component name so the wireframe, the spec, and the code share one
88
+ vocabulary; put the funnel boundary at the top; and render off-app destinations distinctly (they are
89
+ reached only after the handoff). Each wireframe screen maps directly to noodle: a screen with a widget
90
+ is a `toolWithWidget` + a React `view`; a plain answer is a `tool`; an off-app destination is a
91
+ `handoff.allowedDomains` entry. A compact single screen, anonymized to a fictional "Acme" business:
92
+
93
+ ```html
94
+ <div class="phone">
95
+ <div class="chatgpt-header">ChatGPT · Acme</div>
96
+ <div class="msg user">14kW array, ~40kWh battery — what pairs with the Acme X?</div>
97
+ <!-- tool call precedes every widget; the model fills inputs from the message -->
98
+ <div class="tool-call">check_compatibility { model: "Acme X", battery_kwh: 40 }</div>
99
+ <div class="wcard">
100
+ <div class="wcard-head">CompatibilityCard</div> <!-- component name = code + spec -->
101
+ <div class="wcard-body">
102
+ <div class="kv">Acme X ⇄ 40kWh pack <span class="badge certified">Compatible</span></div>
103
+ <div class="cite">Source: Acme Integration Guide, Rev 7 (2026)</div> <!-- grounded + cited -->
104
+ <a class="cta">Configure system</a> <!-- ≤2 actions on an inline card -->
105
+ </div>
106
+ </div>
107
+ </div>
108
+ ```
109
+
110
+ Expand from one screen to the full journey: entry → configuration → handoff, ending at the off-app
111
+ destination. Verify the built app against the design with `noodle check --target chatgpt`.
112
+
113
+ For the full quality bar, open a shipped gold-standard set: in the Noodle Seed repository, the
114
+ `design/` folder of the `acme-discovery` (top-of-funnel), `acme-tasks` (two-way), and `acme-bistro`
115
+ (end-to-end) examples each holds a house-style UX Document and a single-file HTML wireframe with an
116
+ embedded OpenAI Apps SDK compliance audit. Match that bar.
117
+
118
+ ## The deliverables
119
+
120
+ The design phase produces up to three artifacts — worked gold-standard versions live in each
121
+ `acme-*` example's `design/` folder (copy their structure, swap the content):
122
+
123
+ - **UX Document** — the thinking artifact. House-style sections: product overview / knowledge base,
124
+ competitive landscape, personas, conversational flow (with tool-call playscripts), widget specs +
125
+ a display-mode strategy, tool definitions, conversation guardrails, journey map, handoff/auth
126
+ architecture, demo scope, success metrics, and future enhancements — opening on the funnel-boundary
127
+ line every scope debate resolves against.
128
+ - **Wireframe** — the single-file HTML alignment artifact (anatomy above) with the embedded compliance
129
+ audit; see `references/chatgpt-compliance.md`.
130
+ - **API contract** — when the partner's backend must be built or wrapped. Escalate: (1) the MCP
131
+ tool→call-sequence map (always); (2) "Recommended API Shapes" — concrete request/response JSON per
132
+ tool, including the hardest nested case; (3) a full OpenAPI spec for transactional apps. Contract
133
+ rules: shape responses for one-round-trip rendering (embed related objects, pre-sort); put stable
134
+ ids on anything the user picks; keep validation in the API, not the model; the handoff endpoint
135
+ mints a signed, expiring URL + attribution and never proxies payment; use server-side partner
136
+ credentials for v1 (per-user auth only for two-way apps); name tools for user intent.
137
+
138
+ ## From design to build
139
+
140
+ Once the design spec is settled, build it: `references/authoring-workflow.md` for the author→validate
141
+ loop and connectors, `references/widgets-and-apps.md` for widgets and CSP, `references/examples.md`
142
+ for a flagship to extend, and `references/deploy-and-ops.md` to ship.
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: noodle-seed
3
3
  description: Use when building, validating, testing, deploying, or operating a local or hosted Noodle Seed MCP server or app authored in TypeScript with the noodle CLI.
4
- version: 0.13.0
5
- hash: 68c2cc25462f5be7
4
+ version: 0.15.0
5
+ hash: e623fd6ca7caad0f
6
6
  ---
7
7
 
8
8
  # Noodle Seed
@@ -15,6 +15,8 @@ Use this skill for local Noodle Seed project work in Codex.
15
15
 
16
16
  This CLI is agent-native: the cold-agent-path commands speak the `--json` envelope (hosted admin/ops commands are still being normalized). Drive the loop by parsing machine state, not human prose. The full envelope, exit codes, and output modes are in `references/agent-contract.md`.
17
17
 
18
+ Before authoring, design the experience — the funnel/handoff boundary, tools, widgets, display modes, and grounding — see `references/experience-design.md`. Then run the loop:
19
+
18
20
  1. **Discover** — `noodle commands --json`: every command, subcommand, flag, and exit code (don't read source).
19
21
  2. **Author** — edit `src/server.ts` (the configured entrypoint); follow the capability recipe in `references/sdk-surface.md` and `references/examples.md`.
20
22
  3. **Validate** — `noodle validate --json`; on failure `{ok:false,error:{code,message,fix,next,errors:[{code,path,message}]}}` — the per-field detail is in `error.errors[]`.
@@ -35,11 +37,14 @@ Load these on demand:
35
37
  - `references/cli-commands.md` — every `noodle` command, grouped by area.
36
38
  - `references/compile-errors.md` — fix `noodle validate` errors by code.
37
39
  - `references/authoring-workflow.md` — input paths (scrape / OpenAPI import / user interview), the fit check, the validate→test→dev repair loop, connectors, and secrets/variables.
40
+ - `references/connect-an-api.md` — given an API key: secure it, probe the live API to learn the real shape, model the connector, and prove real output before building.
41
+ - `references/experience-design.md` — design the app experience before authoring: funnel/handoff boundary, grounding, two-users, display modes, and the wireframe/UX spec.
38
42
  - `references/widgets-and-apps.md` — MCP Apps, React `view` widgets, the widget hook surface, output shaping, and CSP.
39
43
  - `references/test-in-hosts.md` — connect and test in ChatGPT (developer mode), Claude, agent hosts, and MCP Inspector.
40
44
  - `references/troubleshooting.md` — runtime symptom → cause → fix, in-host and hosted.
41
45
  - `references/deploy-and-ops.md` — login/link/deploy/status/access and hosted operations.
42
46
  - `references/publishing.md` — submit to the ChatGPT apps directory and Claude connectors directory.
47
+ - `references/chatgpt-compliance.md` — the OpenAI Apps SDK pre-submission checklist (beyond the metadata gate): conversational value, helpful-UI-only, in-chat completion, UI guidelines, domain guardrails, privacy.
43
48
  - `references/examples.md` — flagship example index and a canonical `server.ts`.
44
49
 
45
50
  ## Safety
@@ -0,0 +1,51 @@
1
+ # Acme Bistro — end-to-end ordering with payment-only handoff
2
+
3
+ A Noodle MCP App for **Acme Bistro**, a fictional restaurant. It is the flagship for the **end-to-end
4
+ transaction** pattern: the customer browses the menu and builds the order *in chat*, and the order
5
+ completes in chat — only **payment** hands off, via a signed checkout deep link (the card never touches
6
+ the app). It pairs a `toolWithWidget` menu/cart with `toolForWidget` cart helpers and a model-visible
7
+ `create_checkout` tool backed by `handoff.allowedDomains`.
8
+
9
+ Capability slot: **end-to-end in-chat transaction + payment-only handoff**, plus a worked **design-first**
10
+ deliverable set (`design/` — a UX Document, a single-file HTML wireframe with an embedded OpenAI Apps SDK
11
+ compliance audit, and a Recommended API contract). It sets the quality bar the `noodle-seed` skill's
12
+ `references/experience-design.md` and `references/chatgpt-compliance.md` teach. (Distinct from
13
+ `food-ordering`, which is the broad widget-composition proof; this one owns the design-first end-to-end +
14
+ compliance exemplar.)
15
+
16
+ ## Design deliverables (the standard to match)
17
+
18
+ - [`design/UX-Document.md`](design/UX-Document.md) — the house-style UX Document.
19
+ - [`design/wireframe.html`](design/wireframe.html) — the single-file wireframe (open in a browser) with the
20
+ embedded OpenAI Apps SDK compliance audit.
21
+ - [`design/api-contract.md`](design/api-contract.md) — the Recommended API shapes for the partner's kitchen/
22
+ ordering backend.
23
+
24
+ ## Local author loop
25
+
26
+ ```sh
27
+ noodle validate
28
+ noodle test
29
+ noodle dev
30
+ ```
31
+
32
+ In another terminal:
33
+
34
+ ```sh
35
+ noodle tools list
36
+ noodle tools call show_menu --args '{"customer":"Asha"}'
37
+ noodle tools call create_checkout --args '{"customer":"Asha","cartToken":"stone_pizzax2-lemon_tartx1","total":36}'
38
+ noodle check --target chatgpt
39
+ ```
40
+
41
+ ## Deploy
42
+
43
+ ```sh
44
+ noodle link --org demo --app acme-bistro
45
+ noodle deploy --access owner-only
46
+ noodle open
47
+ ```
48
+
49
+ This example has no connector secrets and does not include tokens, caller-key mechanisms, or
50
+ `.env.noodle` values. The menu, prices, and URLs are fictional; payment is handled off-app on
51
+ `acme.example`, never in chat.