@noodleseed/agent-kit 0.68.0 → 0.70.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 (62) hide show
  1. package/manifest.json +325 -277
  2. package/package.json +1 -1
  3. package/skills/claude-code/SKILL.md +1 -1
  4. package/skills/claude-code/authoring-mcp-servers/SKILL.md +1 -1
  5. package/skills/claude-code/building-mcp-apps/SKILL.md +1 -1
  6. package/skills/claude-code/connecting-apis-to-mcp/SKILL.md +1 -1
  7. package/skills/claude-code/creating-product-agent-guides/SKILL.md +1 -1
  8. package/skills/claude-code/debugging-mcp-delivery/SKILL.md +1 -1
  9. package/skills/claude-code/deploying-mcp-services/SKILL.md +1 -1
  10. package/skills/claude-code/designing-mcp-products/SKILL.md +1 -1
  11. package/skills/claude-code/embedding-mcp-assistants/SKILL.md +1 -1
  12. package/skills/claude-code/examples/acme-discovery/README.md +1 -1
  13. package/skills/claude-code/examples/acme-discovery/src/knowledge/faq.txt +10 -0
  14. package/skills/claude-code/examples/acme-discovery/src/knowledge/product.md +7 -0
  15. package/skills/claude-code/examples/acme-discovery/src/server.ts +28 -2
  16. package/skills/claude-code/examples/acme-discovery/test/server.test.ts +10 -0
  17. package/skills/claude-code/examples/food-ordering/README.md +79 -10
  18. package/skills/claude-code/examples/food-ordering/src/agent-guide.ts +48 -0
  19. package/skills/claude-code/examples/food-ordering/src/server.ts +112 -0
  20. package/skills/claude-code/examples/food-ordering/test/server.test.ts +48 -0
  21. package/skills/claude-code/executing-noodle-plans/SKILL.md +1 -1
  22. package/skills/claude-code/publishing-mcp-integrations/SKILL.md +1 -1
  23. package/skills/claude-code/references/authoring-workflow.md +20 -0
  24. package/skills/claude-code/references/cli-commands.md +1 -1
  25. package/skills/claude-code/references/compile-errors.md +2 -0
  26. package/skills/claude-code/references/embedded-assistant.md +13 -3
  27. package/skills/claude-code/references/product-agent-guides.md +2 -2
  28. package/skills/claude-code/references/publishing.md +18 -1
  29. package/skills/claude-code/references/sdk-surface.md +4 -1
  30. package/skills/claude-code/reporting-noodle-feedback/SKILL.md +1 -1
  31. package/skills/claude-code/verifying-mcp-delivery/SKILL.md +1 -1
  32. package/skills/claude-code/wrapping-existing-applications/SKILL.md +1 -1
  33. package/skills/codex/SKILL.md +1 -1
  34. package/skills/codex/authoring-mcp-servers/SKILL.md +1 -1
  35. package/skills/codex/building-mcp-apps/SKILL.md +1 -1
  36. package/skills/codex/connecting-apis-to-mcp/SKILL.md +1 -1
  37. package/skills/codex/creating-product-agent-guides/SKILL.md +1 -1
  38. package/skills/codex/debugging-mcp-delivery/SKILL.md +1 -1
  39. package/skills/codex/deploying-mcp-services/SKILL.md +1 -1
  40. package/skills/codex/designing-mcp-products/SKILL.md +1 -1
  41. package/skills/codex/embedding-mcp-assistants/SKILL.md +1 -1
  42. package/skills/codex/examples/acme-discovery/README.md +1 -1
  43. package/skills/codex/examples/acme-discovery/src/knowledge/faq.txt +10 -0
  44. package/skills/codex/examples/acme-discovery/src/knowledge/product.md +7 -0
  45. package/skills/codex/examples/acme-discovery/src/server.ts +28 -2
  46. package/skills/codex/examples/acme-discovery/test/server.test.ts +10 -0
  47. package/skills/codex/examples/food-ordering/README.md +79 -10
  48. package/skills/codex/examples/food-ordering/src/agent-guide.ts +48 -0
  49. package/skills/codex/examples/food-ordering/src/server.ts +112 -0
  50. package/skills/codex/examples/food-ordering/test/server.test.ts +48 -0
  51. package/skills/codex/executing-noodle-plans/SKILL.md +1 -1
  52. package/skills/codex/publishing-mcp-integrations/SKILL.md +1 -1
  53. package/skills/codex/references/authoring-workflow.md +20 -0
  54. package/skills/codex/references/cli-commands.md +1 -1
  55. package/skills/codex/references/compile-errors.md +2 -0
  56. package/skills/codex/references/embedded-assistant.md +13 -3
  57. package/skills/codex/references/product-agent-guides.md +2 -2
  58. package/skills/codex/references/publishing.md +18 -1
  59. package/skills/codex/references/sdk-surface.md +4 -1
  60. package/skills/codex/reporting-noodle-feedback/SKILL.md +1 -1
  61. package/skills/codex/verifying-mcp-delivery/SKILL.md +1 -1
  62. package/skills/codex/wrapping-existing-applications/SKILL.md +1 -1
@@ -405,6 +405,26 @@ Author managed config as `secret("NAME")` / `variable("NAME")` and operate it wi
405
405
 
406
406
  To place the same server tools inside a SaaS web app, declare `assistant: embeddedAssistant(...)` alongside the one server-level brand kit. Read `embedded-assistant.md` before integrating: it owns the HTTPS-origin rule, managed model configuration, required deploy-before-client sequence, customer-backend exchange, browser mount, and verification checklist.
407
407
 
408
+ ## Knowledge components
409
+
410
+ Ground an assistant in controlled documents and the customer's live public site with one declaration — never a handwritten `search`/`fetch` tool pair, a provider name, a sync job, or an index manifest. Declare `knowledge(...)` with `file(...)` documents (UTF-8 `.md`/`.txt`, project-root relative, ≤100 files, ≤1 MiB each, ≤25 MiB per component) and `site(...)` live scopes (exact HTTPS origin plus positive path globs), pass the declaration in the server's `knowledge` array, and include it in a public website surface's `capabilities` to project the generated `search_<name>` capability:
411
+
412
+ ```ts
413
+ const product = knowledge('product', {
414
+ title: 'Product knowledge',
415
+ description: 'Public product, pricing, and support information.',
416
+ documents: [
417
+ file('./knowledge/product.md', { title: 'Product guide' }),
418
+ file('./knowledge/faq.txt', { title: 'FAQ' }),
419
+ ],
420
+ sites: [
421
+ site({ origin: 'https://www.acme.example', include: ['/docs/**', '/pricing'] }),
422
+ ],
423
+ });
424
+ ```
425
+
426
+ The compiler validates and hashes every document at build time (bad extensions, root escapes, symlinks, oversize, and non-UTF-8 fail `noodle validate` with the exact path); deployment publishes versioned files transactionally with the app and the provider keeps live-site content current. Component names are lowercase snake-case; each component implies exactly one generated bounded search capability with cited results.
427
+
408
428
  ## Boundaries
409
429
 
410
430
  Do not hand-author manifest JSON/YAML, runtime artifacts, connector IR, or hosted asset metadata. Do not read or copy secrets, bearer tokens, refresh tokens, static access keys, `.env`, `.env.noodle`, or `~/.noodle/config.json`. Hosted access is identity-based — do not add static data-plane credential paths.
@@ -25,7 +25,7 @@ Developer-facing `noodle` commands, grouped by area. Local authoring commands (`
25
25
  | `noodle docs` | Export docs in an LLM-readable format. |
26
26
  | `noodle connect` | Print connection setup for an agent host (Claude Code, Codex, Cursor, etc.). |
27
27
  | `noodle import` | Import an OpenAPI spec into a starter `server.ts`. |
28
- | `noodle export` | Compile locally and write the portable manifest JSON (no service). |
28
+ | `noodle export` | Compile locally and write a portable manifest or target host-plugin archive (no service). |
29
29
  | `noodle validate` | Author-time compile/schema/connector check; no service (`--json`, `--fix-prompt`). |
30
30
  | `noodle check` | Check tool design (`tool_design_*`) and MCP Apps/widget readiness; no service. `--min-severity warn` shows only what needs fixing. |
31
31
  | `noodle test` | Local compile plus a loopback MCP smoke. |
@@ -56,6 +56,8 @@ Run `noodle validate` (add `--json` for the machine-readable envelope, `--fix-pr
56
56
  | `invalid_asset` | Fix the `asset("./path")` reference; the file must exist and be a supported asset type. |
57
57
  | `invalid_capability_requirement` | Correct the declared capability/permission requirement to a supported value. |
58
58
  | `state_secret_field` | Remove the secret-shaped field from widget/handle state; secrets must never be stored in state or sent to widgets. |
59
+ | `invalid_knowledge` | Fix the `knowledge()` declaration: documents must be existing UTF-8 `.md`/`.txt` files inside the project root (no symlinks), within the 100-file / 1 MiB / 25 MiB bounds, and sites need an exact HTTPS origin plus at least one include glob. |
60
+ | `knowledge_unhashed` | Compile from the project root (`noodle validate`/`noodle dev`) so declared knowledge documents can be read and hashed. |
59
61
  | `unknown_connector_alias` | The tool calls a connector alias not declared in `use`/`provides`; add it or fix the alias (see `suggestions`). |
60
62
  | `connector_not_in_catalog` | The referenced connector is not in the resolved catalog; add it to the project connectors or correct the reference. |
61
63
  | `unknown_operation` | The connector has no such operation; use an operation declared on that connector (see `didYouMean`/`suggestions`). |
@@ -84,11 +84,21 @@ At most one public surface (`public` or `mixed`) and at most one authenticated s
84
84
 
85
85
  A public surface **must** declare `capabilities`: the exact positive allowlist it may reach. It is required by the type, and it is the whole externally reachable surface — a reviewer should read it in one screenful. Anything absent stays private, and a capability added to the server later is excluded until someone lists it. `authenticatedWebsite` may also take `capabilities` to narrow the in-app surface; omitted, it projects the whole server.
86
86
 
87
- ### Mixed surfaces: not available yet
87
+ ### Mixed surfaces: let a visitor sign in mid-conversation
88
88
 
89
- `publicWebsite({ signIn: true })` **throws**. Mid-conversation sign-in has no runtime: nothing offers the visitor a way to sign in, so an identity-dependent capability on such a surface would simply be refused and accepting it would also give up the compile-time guard that plain `public` provides. The option stays declared so the vocabulary and wire shape are settled.
89
+ Add `signIn: true` to a public surface when some capabilities need a signed-in visitor. The surface becomes `mixed`: anonymous visitors start immediately, an identity-dependent capability stays **visible** so the assistant can offer it, and reaching for it raises a sign-in prompt instead of executing.
90
90
 
91
- Until it ships, split the audiences: keep anonymous-safe capabilities on `publicWebsite`, and serve identity-dependent ones from `authenticatedWebsite({ origins })`, where the embedding backend proves who the visitor is. One assistant can declare both.
91
+ ```ts
92
+ access: publicWebsite({
93
+ origins: ["https://www.example.com"],
94
+ capabilities: [answerProductQuestion, requestDemo, myOrders],
95
+ signIn: true, // `myOrders` reads ${user}; visitors sign in to reach it
96
+ }),
97
+ ```
98
+
99
+ Elevation runs through the **host application own login**, never a Noodle-operated one. The widget raises `assistant-sign-in-requested` with a single-use `continuation`; the page signs the visitor in as it already does, then its backend POSTs that continuation to the session exchange **with its own client credentials**. Possession of the continuation alone elevates nothing, and the service checks the client tenant owns that conversation.
100
+
101
+ The conversation is kept: same history, new token, the anonymous one dead. Do not build a second identity provider for this.
92
102
 
93
103
  A connector-backed side effect needs **two** independent declarations to be reachable from a public or mixed surface: inclusion in `capabilities` **and** `{ confirm: true }` on the operation. Signing in proves who the visitor is; it does not pre-authorize an effect, so confirmation still applies on a mixed surface. Confirmation is never authentication or business authorization — the customer backend still owns payload validation, abuse controls, and idempotency. Local or session-only widget state needs no confirmation.
94
104
 
@@ -8,7 +8,7 @@ Do not wait for the user to name `agentGuide`. During every MCP server or App bu
8
8
 
9
9
  Author a guide when any of these conditions applies:
10
10
 
11
- - A request for an App Package or app product skill requires one. A marketplace plugin or customer-agent distribution would also need this source, but those per-app distribution surfaces are not available in this foundation.
11
+ - A request for an App Package or app product skill requires one. A marketplace plugin or customer-agent distribution also needs this product source in addition to separate listing metadata.
12
12
  - Multiple capabilities participate in one user workflow, especially when order or purpose matters.
13
13
  - Safe or useful operation depends on product-specific ordering, grounding, clarification, boundaries, or representative examples that capability descriptions cannot express.
14
14
 
@@ -20,7 +20,7 @@ Make the judgment from the user’s stated outcome and grounded product evidence
20
20
 
21
21
  Noodle workflow skills teach a coding agent how to build and operate Noodle projects. The generated app product skill is team-local guidance for using one product. A marketplace plugin is a separate host distribution bundle.
22
22
 
23
- Per-app marketplace plugin generation and customer-agent distribution are not available in this foundation. If the user asks for either, explain the boundary and stop at the local App Package and product-skill workflow. Do not claim a listing, submission bundle, hosted distribution, or customer-agent projection.
23
+ A host-neutral distribution metadata and archive framework now exists, but per-app marketplace plugin generation is not available until a target adapter lands, and customer-agent distribution is not available. If the user asks for either, explain the boundary and stop at the proven local App Package, product-skill, and metadata work. Do not claim a target bundle, submission, hosted distribution, or customer-agent projection.
24
24
 
25
25
  ## Creation workflow
26
26
 
@@ -7,6 +7,7 @@ Directory requirements evolve. Identify the requested directory first and verify
7
7
  ## Contents
8
8
 
9
9
  - Shared readiness gate
10
+ - Distribution metadata source
10
11
  - Directory-specific evidence
11
12
  - Submission boundary
12
13
 
@@ -18,6 +19,22 @@ Use `references/app-directory-compliance.md` as this route’s canonical shared
18
19
 
19
20
  Prepare evidence for a reachable production MCP endpoint, accurate capability descriptions and schemas, useful fallback behavior, realistic positive and negative tests, data minimization, privacy disclosures, support ownership, and any interactive surface the directory will review.
20
21
 
22
+ ## Distribution metadata source
23
+
24
+ When the user explicitly prepares host packaging, author the host-neutral `distribution` option in the same `server.ts`; do not add it during an ordinary build that has no distribution goal. It contains listing, publisher, support, legal, assets, and review facts that cannot be derived safely from MCP capability descriptions.
25
+
26
+ Reference real packaged images with `asset(...)`, write useful alt text, and include realistic positive and negative review scenarios. Name the exact expected MCP tools in each positive scenario’s `tools` array. A negative scenario is a non-invocation case: set `shouldInvoke: false` and do not define `tools`. For each MCP App screenshot, add the separate user `prompt` that produces that exact state. Capture only the rendered MCP App response—never the enclosing website, Devtools shell, host conversation, or an unrelated product photo—and meet the selected directory’s current format, dimension, and count limits. Keep reviewer credentials, tokens, secrets, personal data, and test-account passwords out of metadata and source control; supply any authorized reviewer credential out of band.
27
+
28
+ `distribution` is projected separately. It leaves the canonical App Package and Runtime Artifact unchanged, so editing listing copy cannot change deployment execution or product-skill identity. A product package still needs the separately judged `agentGuide`; do not duplicate capability schemas or workflow truth in listing metadata.
29
+
30
+ The shared framework can validate metadata and resolved image bytes, run an available target adapter, and create a reproducible archive. Target-specific availability and exact flags live in `references/cli-commands.md` and the live command catalog (`noodle commands --json`); never invent an unlisted target, bundle, filename, or acceptance claim.
31
+
32
+ When a directory has separate installable-plugin and remote-connector submission projections, generate each with its own exact live-catalog command. Never combine their archives or describe an operator dossier as directly portal-uploadable.
33
+
34
+ Local or repository testing and public-directory submission are distinct packaging states with distinct required inputs. An export command only compiles local source and writes the requested archive. It does not deploy, register, upload, submit, review, or publish the package.
35
+
36
+ When an export reports `uploadArtifacts`, treat its output archive as an outer review kit. Extract it, follow the generated instructions, and upload only the named inner artifacts to their matching fields. Never substitute the outer kit for a nested single-purpose upload.
37
+
21
38
  ## Directory-specific evidence
22
39
 
23
40
  Read the selected directory’s current official submission documentation at review time. Record each additional requirement separately from the shared checklist, including listing fields, identity verification, test credentials, screenshots, policy declarations, review limits, and appeal or resubmission steps. Never project one directory’s requirements onto another.
@@ -26,4 +43,4 @@ When a requirement cannot be verified from the selected directory’s current do
26
43
 
27
44
  ## Submission boundary
28
45
 
29
- Preparation is read-only. Deployment, access changes, directory registration, and final submission each require explicit authorization for the exact target. Report remaining evidence gaps and stop when that authority or required directory access is absent.
46
+ Preparation is read-only. Reverify current official requirements immediately before public submission. Deployment, access changes, directory registration, credential entry, final submission, and publication each remain separate human-operated mutations that require explicit authorization for the exact target. Report remaining evidence gaps and stop when that authority or required directory access is absent.
@@ -58,14 +58,17 @@ Platform helper connectors are explicit subpath imports from `@noodleseed/one/pl
58
58
  - `customerEndpoint`
59
59
  - `embeddedAssistant`
60
60
  - `externalExchange`
61
+ - `file`
61
62
  - `gmailConnector`
63
+ - `knowledge`
62
64
  - `managedSecret`
63
65
  - `openAICompatible`
64
66
  - `publicWebsite`
67
+ - `site`
65
68
 
66
69
  ## Authoring signatures
67
70
 
68
- - `server(name, options, definitions)` — `options` commonly includes `title`, `version`, `instructions`, `branding`, `auth`, `use`, `provides`, `state`, and `handoff`; `definitions` is the array of tools/resources/prompts.
71
+ - `server(name, options, definitions)` — `options` commonly includes `title`, `version`, `instructions`, `agentGuide`, `distribution`, `branding`, `auth`, `use`, `provides`, `state`, and `handoff`; `definitions` is the array of tools/resources/prompts.
69
72
  - `tool(name, { description, input, output, annotations?, visibility?, view?, fulfil })` — `input`/`output` are Zod schemas; `fulfil({ input, connectors, user })` returns data matching `output`. Add `view: { component, entry }` for a React widget; use `visibility: ["app"]` for an app-only helper.
70
73
  - `resource(name, { uri, description?, mimeType?, fulfil })` and `prompt(name, { description?, arguments?, fulfil })` expose MCP resources/prompts.
71
74
  - View metadata (`viewTitle`, `viewDescription`, `csp`, `domain`, `permissions`) belongs on the tool that renders it; `asset("./path")` packages local files.
@@ -3,7 +3,7 @@ name: reporting-noodle-feedback
3
3
  description: "Use when a Noodle Seed bug, misleading instruction, missing capability, or concrete product improvement should be proposed to the user."
4
4
  ---
5
5
 
6
- <!-- noodle-skill version:0.68.0 hash:0f404109f4845683 -->
6
+ <!-- noodle-skill version:0.70.0 hash:0f404109f4845683 -->
7
7
 
8
8
  # reporting-noodle-feedback
9
9
 
@@ -3,7 +3,7 @@ name: verifying-mcp-delivery
3
3
  description: "Use when proving a Noodle Seed MCP project works at a named compile, local, connector, App, host, deployment, or production evidence level."
4
4
  ---
5
5
 
6
- <!-- noodle-skill version:0.68.0 hash:6ef6ef551e26b78e -->
6
+ <!-- noodle-skill version:0.70.0 hash:6ef6ef551e26b78e -->
7
7
 
8
8
  # verifying-mcp-delivery
9
9
 
@@ -3,7 +3,7 @@ name: wrapping-existing-applications
3
3
  description: "Use when an existing application has no stable usable API and needs a read-only, identity-first Noodle Seed integration plan before implementation."
4
4
  ---
5
5
 
6
- <!-- noodle-skill version:0.68.0 hash:eccc3c158dcafba8 -->
6
+ <!-- noodle-skill version:0.70.0 hash:eccc3c158dcafba8 -->
7
7
 
8
8
  # wrapping-existing-applications
9
9
 
@@ -3,7 +3,7 @@ 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
4
  ---
5
5
 
6
- <!-- noodle-skill version:0.68.0 hash:13ddce01769caae4 -->
6
+ <!-- noodle-skill version:0.70.0 hash:13ddce01769caae4 -->
7
7
 
8
8
  # Noodle Seed
9
9
 
@@ -3,7 +3,7 @@ name: authoring-mcp-servers
3
3
  description: "Use when creating or extending a headless Noodle Seed MCP server, tool, resource, prompt, or typed model-facing capability."
4
4
  ---
5
5
 
6
- <!-- noodle-skill version:0.68.0 hash:11523cb33b9473c0 -->
6
+ <!-- noodle-skill version:0.70.0 hash:11523cb33b9473c0 -->
7
7
 
8
8
  # authoring-mcp-servers
9
9
 
@@ -3,7 +3,7 @@ name: building-mcp-apps
3
3
  description: "Use when a Noodle Seed MCP App, widget, interactive card, visual interaction, or host-visible UI is the primary requested outcome."
4
4
  ---
5
5
 
6
- <!-- noodle-skill version:0.68.0 hash:9fd67d4d24328e15 -->
6
+ <!-- noodle-skill version:0.70.0 hash:9fd67d4d24328e15 -->
7
7
 
8
8
  # building-mcp-apps
9
9
 
@@ -3,7 +3,7 @@ name: connecting-apis-to-mcp
3
3
  description: "Use when all four API-evidence inputs exist—and only then: API base URL, authentication scheme, representative safe read, and observed response."
4
4
  ---
5
5
 
6
- <!-- noodle-skill version:0.68.0 hash:21bbd3ec441ffd30 -->
6
+ <!-- noodle-skill version:0.70.0 hash:21bbd3ec441ffd30 -->
7
7
 
8
8
  # connecting-apis-to-mcp
9
9
 
@@ -3,7 +3,7 @@ name: creating-product-agent-guides
3
3
  description: "Use when a Noodle Seed MCP server needs a new or revised product agent guide, App Package skill, or explicit product-skill regeneration."
4
4
  ---
5
5
 
6
- <!-- noodle-skill version:0.68.0 hash:0fa48a82fe836cf0 -->
6
+ <!-- noodle-skill version:0.70.0 hash:0fa48a82fe836cf0 -->
7
7
 
8
8
  # creating-product-agent-guides
9
9
 
@@ -3,7 +3,7 @@ name: debugging-mcp-delivery
3
3
  description: "Use when an existing Noodle Seed MCP project has a concrete validation, runtime, connector, App, host, deployment, or production failure."
4
4
  ---
5
5
 
6
- <!-- noodle-skill version:0.68.0 hash:aa715bae12041d7c -->
6
+ <!-- noodle-skill version:0.70.0 hash:aa715bae12041d7c -->
7
7
 
8
8
  # debugging-mcp-delivery
9
9
 
@@ -3,7 +3,7 @@ name: deploying-mcp-services
3
3
  description: "Use when the user explicitly requests a Noodle Seed hosted link, configuration write, deployment, access change, rollback, or connection write."
4
4
  ---
5
5
 
6
- <!-- noodle-skill version:0.68.0 hash:93e735b7ffb45df1 -->
6
+ <!-- noodle-skill version:0.70.0 hash:93e735b7ffb45df1 -->
7
7
 
8
8
  # deploying-mcp-services
9
9
 
@@ -3,7 +3,7 @@ name: designing-mcp-products
3
3
  description: "Use when a Noodle Seed MCP product idea needs conversational fit, user benefit, scope, interaction, or evidence design before implementation."
4
4
  ---
5
5
 
6
- <!-- noodle-skill version:0.68.0 hash:78a6f181b61f92f1 -->
6
+ <!-- noodle-skill version:0.70.0 hash:78a6f181b61f92f1 -->
7
7
 
8
8
  # designing-mcp-products
9
9
 
@@ -3,7 +3,7 @@ name: embedding-mcp-assistants
3
3
  description: "Use when embedding a Noodle assistant into an existing SaaS or web application with browser, identity, session, and credential boundaries."
4
4
  ---
5
5
 
6
- <!-- noodle-skill version:0.68.0 hash:cc54a67f21c0ecdb -->
6
+ <!-- noodle-skill version:0.70.0 hash:cc54a67f21c0ecdb -->
7
7
 
8
8
  # embedding-mcp-assistants
9
9
 
@@ -28,7 +28,7 @@ There is no second tool set and no second app — one `server.ts`, projected ont
28
28
  and closed by default: a tool added to this server later is unreachable from the website until someone
29
29
  lists it. A tool that needed a signed-in user could not be listed here at all (the compiler rejects it);
30
30
  serve those from `authenticatedWebsite({ origins })` instead, where Acme's own backend proves who the
31
- visitor is. Mid-conversation sign-in on a public surface is not available yet.
31
+ visitor is, or add `signIn: true` so visitors sign in mid-conversation through Acme own login.
32
32
 
33
33
  ## Design spec (write this before the code)
34
34
 
@@ -0,0 +1,10 @@
1
+ ACME GETAWAYS FAQ
2
+
3
+ Q: Does the assistant book and take payment?
4
+ A: No. The assistant shapes the trip and hands off to Acmes own checkout with a signed link.
5
+
6
+ Q: How current are prices?
7
+ A: Starting prices come from Acmes live site; the assistant cites the page it used.
8
+
9
+ Q: Can I compare destinations?
10
+ A: Yes, ask for a shortlist by vibe, month, or budget.
@@ -0,0 +1,7 @@
1
+ # Acme Getaways product guide
2
+
3
+ Acme Getaways curates four destination types: beach, mountains, culture, and city escapes. Every listing shows a real starting price and the best months to travel. Bookings, payments, and date selection happen on Acmes own site through a signed handoff link; the assistant never takes payment details.
4
+
5
+ ## Cancellation and support
6
+
7
+ All trips can be cancelled free within 48 hours of the handoff. Support runs seven days a week through the chat on book.acme.example.
@@ -1,10 +1,13 @@
1
1
  import {
2
2
  annotations,
3
3
  embeddedAssistant,
4
+ file,
5
+ knowledge,
4
6
  openAICompatible,
5
7
  publicWebsite,
6
8
  secret,
7
9
  server,
10
+ site,
8
11
  tool,
9
12
  variable,
10
13
  z,
@@ -196,6 +199,27 @@ const shortlistGetaway = tool('shortlist_getaway', {
196
199
  }),
197
200
  });
198
201
 
202
+ // Grounding beyond the catalog: two controlled files answer policy/pricing/support questions with
203
+ // citations, and Acme's live public site stays current through its search provider — no sync job,
204
+ // no handwritten search tool. One declaration, one generated `search_destinations` capability.
205
+ const destinations = knowledge('destinations', {
206
+ title: 'Acme Getaways destinations',
207
+ description: 'Public destination, pricing, cancellation, and support information.',
208
+ documents: [
209
+ file('./knowledge/product.md', {
210
+ title: 'Product guide',
211
+ sourceUrl: 'https://getaways.acme.example/product',
212
+ }),
213
+ file('./knowledge/faq.txt', { title: 'FAQ' }),
214
+ ],
215
+ sites: [
216
+ site({
217
+ origin: 'https://getaways.acme.example',
218
+ include: ['/destinations/**', '/pricing', '/support'],
219
+ }),
220
+ ],
221
+ });
222
+
199
223
  export default server(
200
224
  'acme_discovery',
201
225
  {
@@ -217,7 +241,8 @@ export default server(
217
241
  // The same three tools also serve Acme's own marketing site, with no second tool set and no
218
242
  // session backend: a visitor with no account gets the discovery carousel and the booking
219
243
  // handoff. `capabilities` is the whole externally reachable surface — short enough to review in
220
- // one glance, and closed by default when a tool is added to the server later.
244
+ // one glance, and closed by default when a tool is added to the server later. The knowledge
245
+ // component projects its generated search capability the same way a tool does.
221
246
  assistant: embeddedAssistant({
222
247
  model: openAICompatible({
223
248
  baseUrl: variable('ASSISTANT_MODEL_BASE_URL'),
@@ -226,11 +251,12 @@ export default server(
226
251
  }),
227
252
  access: publicWebsite({
228
253
  origins: ['https://getaways.acme.example'],
229
- capabilities: [discoverGetaways, createHandoff, shortlistGetaway],
254
+ capabilities: [destinations, discoverGetaways, createHandoff, shortlistGetaway],
230
255
  }),
231
256
  layout: { mode: 'floating', position: 'bottom-right' },
232
257
  labels: { welcomeHeading: 'Where would you like to go?' },
233
258
  }),
259
+ knowledge: [destinations],
234
260
  },
235
261
  [discoverGetaways, createHandoff, shortlistGetaway],
236
262
  );
@@ -21,4 +21,14 @@ describe('acme-discovery example', () => {
21
21
  expect(text).toContain('create_handoff');
22
22
  expect(text).toContain('shortlist_getaway');
23
23
  });
24
+
25
+ it('declares the grounded knowledge component and its live site scope', async () => {
26
+ const manifest = (await app.toManifest()) as { server: { knowledge?: unknown[] } };
27
+ // One declaration: controlled files plus the live public site, compiled later into the
28
+ // generated `search_destinations` capability with citations.
29
+ expect(manifest.server.knowledge).toHaveLength(1);
30
+ const text = JSON.stringify(manifest);
31
+ expect(text).toContain('knowledge/product.md');
32
+ expect(text).toContain('https://getaways.acme.example');
33
+ });
24
34
  });
@@ -3,7 +3,7 @@
3
3
  **Owns:** The flagship consumer ordering MCP App example: React view authoring, app-only helper tools,
4
4
  caller-scoped cart state handles, invocation context, model-visible widget state/lifecycle, packaged image
5
5
  assets, portable structured elicitation, checkout handoff policy, host actions, CSP/permissions metadata,
6
- and widget preview coverage.
6
+ product-agent guidance, host-neutral distribution metadata, and widget preview coverage.
7
7
 
8
8
  Food Ordering is a generic, synthetic version of a live marketplace ordering app. It lets a user search
9
9
  stores, browse menus, customize an item, build a multi-line cart, review the order, and hand off checkout to
@@ -15,6 +15,7 @@ private customer data.
15
15
  | Capability | Example |
16
16
  | :--- | :--- |
17
17
  | Public entry tool | `open_ordering` returns structured fallback content and renders the React widget |
18
+ | Product and distribution projections | `agentGuide` supplies grounded cross-capability guidance; `distribution` supplies listing, publisher, legal, image, and review facts separately from the runtime manifest |
18
19
  | App-only helper tools | `search_stores`, `load_menu`, `load_item`, `read_cart`, `sync_cart`, `prepare_checkout`; mutating widget-owned helpers use `confirm: false` (equivalent to omission) and execute directly because action hints alone never gate |
19
20
  | Durable cart state | `server(..., { state: { handles: { cart } }, use: { state } })` with caller scope and revision checks |
20
21
  | React app runtime kit | `@noodleseed/one/react` supplies app flow, shell/nav/view, async state, form, quantity, choice, and handoff primitives |
@@ -47,6 +48,11 @@ noodle test
47
48
  noodle dev
48
49
  ```
49
50
 
51
+ The same `server.ts` declares `distribution` metadata for host adapters. It references real packaged images
52
+ and keeps listing copy, support/legal URLs, and positive/negative review scenarios outside the canonical App
53
+ Package and Runtime Artifact. Explicit OpenAI and Claude adapters project those facts with the generated
54
+ product skill; installable plugin archives and directory-submission dossiers remain separate outputs.
55
+
50
56
  In another terminal:
51
57
 
52
58
  ```sh
@@ -71,6 +77,65 @@ For Apps metadata conformance, start `noodle dev`, copy the loopback MCP endpoin
71
77
  npx @mcpjam/cli@latest apps conformance --url http://127.0.0.1:<port>/o/demo/food-ordering/mcp --quiet --format json
72
78
  ```
73
79
 
80
+ ## Export an OpenAI plugin
81
+
82
+ This flagship includes the guided workflows, listing metadata, review cases, and image assets needed to test
83
+ OpenAI export. See the public [product-agent guide](https://docs.noodleseed.dev/docs/guides/product-agent-guides#export-an-openai-package)
84
+ for the current package workflow and boundaries.
85
+
86
+ Against its deployed MCP URL, generate the Food Ordering submission candidate with:
87
+
88
+ ```sh
89
+ noodle export plugin openai \
90
+ --state submission \
91
+ --mcp-url https://food-ordering.noodleseed.app/mcp \
92
+ --category "Food & Drink" \
93
+ --output food-ordering-openai.zip
94
+ ```
95
+
96
+ Extract `food-ordering-openai.zip` before using the portal. Upload
97
+ `submission/chatgpt-app-submission.json` to the Codex-assisted import field and
98
+ `submission/food-ordering-skill.zip` to **With MCP → Skills**. The outer ZIP is the complete review kit and
99
+ is not itself a valid skill upload; `submission/README.md` repeats the portal steps.
100
+
101
+ After registering that same URL in ChatGPT developer mode, substitute its real technical ID to generate the
102
+ Food Ordering local test package:
103
+
104
+ ```sh
105
+ noodle export plugin openai \
106
+ --state local \
107
+ --mcp-url https://food-ordering.noodleseed.app/mcp \
108
+ --category "Food & Drink" \
109
+ --registered-app-id plugin_asdk_app_0123456789abcdef0123456789abcdef \
110
+ --output food-ordering-openai-local.zip
111
+ ```
112
+
113
+ ## Export for Claude
114
+
115
+ Claude Code plugin packaging and Anthropic Connector Directory review are separate outputs. Generate the
116
+ installable plugin repository with:
117
+
118
+ ```sh
119
+ noodle export plugin claude \
120
+ --mcp-url https://food-ordering.noodleseed.app/mcp \
121
+ --output food-ordering-claude.zip
122
+ ```
123
+
124
+ Generate the credential-free operator dossier for the remote Connector Directory with:
125
+
126
+ ```sh
127
+ noodle export connector claude \
128
+ --mcp-url https://food-ordering.noodleseed.app/mcp \
129
+ --auth none \
130
+ --category "Food & Drink" \
131
+ --output food-ordering-anthropic-connector.zip
132
+ ```
133
+
134
+ The dossier is deliberately marked `portalUploadable: false`: it gathers the listing, tool annotations,
135
+ use cases, allowed-link candidates, test-account guidance, and MCP App screenshot evidence, but a human must
136
+ verify ownership/compliance and enter the final answers in Anthropic's portal. The plugin ZIP does not
137
+ contain this dossier.
138
+
74
139
  ## Client Setup
75
140
 
76
141
  Use the CLI to print the exact setup flow for your MCP client:
@@ -95,17 +160,21 @@ connector secrets and does not include tokens, caller-key mechanisms, or `.env.n
95
160
 
96
161
  ## Demo Assets
97
162
 
98
- The packaged demo images live under `assets/` and are public web assets when deployed. The current app uses
99
- `assets/noodle-bowl.jpg` as the server branding image.
163
+ The packaged demo images live under `assets/`. The current app uses `assets/noodle-bowl.jpg` as the server
164
+ branding image. Its three distribution screenshots are real, response-only MCP App captures from Noodle
165
+ Devtools at 2× device scale; each is 1640×970 PNG and has the producing user prompt next to its `asset(...)`
166
+ reference in `server.ts`.
100
167
 
101
168
  Image sources:
102
169
 
103
170
  - `assets/noodle-bowl.jpg` — Unsplash photo
104
171
  [`IRv8V9Hb8gI`](https://unsplash.com/photos/IRv8V9Hb8gI), downloaded from Unsplash.
105
- - `assets/lentil-soup.jpg` — Unsplash image
106
- [`photo-1510431198580-7727c9fa1e3a`](https://images.unsplash.com/photo-1510431198580-7727c9fa1e3a), downloaded from Unsplash.
107
- - `assets/mint-lemonade.jpg` — Unsplash photo
108
- [`X7Nx327NtuA`](https://unsplash.com/photos/X7Nx327NtuA) by Imad 786.
109
-
110
- Unsplash photos are free to use under the [Unsplash License](https://unsplash.com/license); attribution is
111
- not required, but source notes are kept here for provenance.
172
+ - `assets/food-ordering-stores.png` — store-discovery state produced by “Help me build a noodle order for
173
+ pickup.”
174
+ - `assets/food-ordering-menu.png` — Harbor Noodles menu state produced by “Show me the Harbor Noodles
175
+ menu.”
176
+ - `assets/food-ordering-handoff.png` — checkout-handoff state produced by “Review my spicy miso bowl order
177
+ before checkout.”
178
+
179
+ The Unsplash branding photo is free to use under the [Unsplash License](https://unsplash.com/license);
180
+ attribution is not required, but the source note is kept here for provenance.
@@ -0,0 +1,48 @@
1
+ import type { AgentGuideSource } from '@noodleseed/one';
2
+
3
+ /** Product guidance for the model-visible ordering and planning workflows. */
4
+ export const FOOD_ORDERING_AGENT_GUIDE = {
5
+ description:
6
+ 'Use Food Ordering to browse synthetic local options, build a reviewable cart, and hand checkout to the user.',
7
+ useWhen: [
8
+ 'The user wants to browse nearby food or assemble an order.',
9
+ 'The user wants a structured pickup or delivery plan before ordering.',
10
+ ],
11
+ workflows: [
12
+ {
13
+ id: 'build_order',
14
+ title: 'Browse and build an order',
15
+ steps: [
16
+ {
17
+ capability: { kind: 'tool', name: 'open_ordering' },
18
+ guidance:
19
+ 'Open the ordering app so the user can choose a store, review the cart, and control checkout handoff.',
20
+ },
21
+ ],
22
+ },
23
+ {
24
+ id: 'summarize_options',
25
+ title: 'Summarize available options',
26
+ steps: [{ capability: { kind: 'tool', name: 'summarize_ordering_options' } }],
27
+ },
28
+ {
29
+ id: 'plan_fulfilment',
30
+ title: 'Plan pickup or delivery',
31
+ steps: [
32
+ {
33
+ capability: { kind: 'tool', name: 'plan_order' },
34
+ guidance: 'Collect the user’s fulfilment preference without claiming to place an order.',
35
+ },
36
+ ],
37
+ },
38
+ ],
39
+ boundaries: [
40
+ 'Treat every store, menu item, price, and service area in this example as synthetic.',
41
+ 'Never claim checkout or payment completed; the final order happens only after the external handoff.',
42
+ ],
43
+ examples: [
44
+ { prompt: 'Help me put together a noodle order.', workflow: 'build_order' },
45
+ { prompt: 'What food options are available?', workflow: 'summarize_options' },
46
+ { prompt: 'Plan a delivery for Friday.', workflow: 'plan_fulfilment' },
47
+ ],
48
+ } as const satisfies AgentGuideSource;