@noodleseed/agent-kit 0.64.0 → 0.66.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 (50) hide show
  1. package/manifest.json +283 -267
  2. package/package.json +1 -1
  3. package/skills/claude-code/SKILL.md +4 -3
  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 +46 -0
  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 +22 -3
  13. package/skills/claude-code/examples/acme-discovery/src/server.ts +118 -89
  14. package/skills/claude-code/examples/acme-tasks/README.md +3 -2
  15. package/skills/claude-code/examples/customer-auth/src/server.ts +8 -5
  16. package/skills/claude-code/examples/weather/README.md +2 -1
  17. package/skills/claude-code/executing-noodle-plans/SKILL.md +1 -1
  18. package/skills/claude-code/publishing-mcp-integrations/SKILL.md +1 -1
  19. package/skills/claude-code/references/compile-errors.md +3 -0
  20. package/skills/claude-code/references/connect-an-api.md +2 -2
  21. package/skills/claude-code/references/embedded-assistant.md +67 -3
  22. package/skills/claude-code/references/product-agent-guides.md +14 -2
  23. package/skills/claude-code/references/sdk-surface.md +2 -0
  24. package/skills/claude-code/reporting-noodle-feedback/SKILL.md +1 -1
  25. package/skills/claude-code/verifying-mcp-delivery/SKILL.md +1 -1
  26. package/skills/claude-code/wrapping-existing-applications/SKILL.md +1 -1
  27. package/skills/codex/SKILL.md +4 -3
  28. package/skills/codex/authoring-mcp-servers/SKILL.md +1 -1
  29. package/skills/codex/building-mcp-apps/SKILL.md +1 -1
  30. package/skills/codex/connecting-apis-to-mcp/SKILL.md +1 -1
  31. package/skills/codex/creating-product-agent-guides/SKILL.md +46 -0
  32. package/skills/codex/debugging-mcp-delivery/SKILL.md +1 -1
  33. package/skills/codex/deploying-mcp-services/SKILL.md +1 -1
  34. package/skills/codex/designing-mcp-products/SKILL.md +1 -1
  35. package/skills/codex/embedding-mcp-assistants/SKILL.md +1 -1
  36. package/skills/codex/examples/acme-discovery/README.md +22 -3
  37. package/skills/codex/examples/acme-discovery/src/server.ts +118 -89
  38. package/skills/codex/examples/acme-tasks/README.md +3 -2
  39. package/skills/codex/examples/customer-auth/src/server.ts +8 -5
  40. package/skills/codex/examples/weather/README.md +2 -1
  41. package/skills/codex/executing-noodle-plans/SKILL.md +1 -1
  42. package/skills/codex/publishing-mcp-integrations/SKILL.md +1 -1
  43. package/skills/codex/references/compile-errors.md +3 -0
  44. package/skills/codex/references/connect-an-api.md +2 -2
  45. package/skills/codex/references/embedded-assistant.md +67 -3
  46. package/skills/codex/references/product-agent-guides.md +14 -2
  47. package/skills/codex/references/sdk-surface.md +2 -0
  48. package/skills/codex/reporting-noodle-feedback/SKILL.md +1 -1
  49. package/skills/codex/verifying-mcp-delivery/SKILL.md +1 -1
  50. package/skills/codex/wrapping-existing-applications/SKILL.md +1 -1
@@ -39,7 +39,9 @@ Before choosing code, ask the user which experience belongs in the existing prod
39
39
 
40
40
  ## Author and validate
41
41
 
42
- Use the same server tools in the embed; do not create a second tool set. Declare one server-level brand kit and an assistant configuration:
42
+ `noodle init` and `noodle init --template widget` deliberately produce credential-free MCP Apps. Add an assistant declaration only when the product explicitly includes a customer-hosted assistant; do not make ordinary external-host widgets depend on model-provider settings.
43
+
44
+ Use the same server tools in the embed; do not create a second tool set. Declare one server-level brand kit and an assistant configuration. `access` decides who may open a session, so choose it before anything else — `authenticatedWebsite(...)` for an in-app embed, `publicWebsite(...)` for a marketing page, or both:
43
45
 
44
46
  ```ts
45
47
  branding: { name: "Acme", accent: "#3157D5" },
@@ -50,12 +52,55 @@ assistant: embeddedAssistant({
50
52
  model: variable("ASSISTANT_MODEL"),
51
53
  apiKey: secret("ASSISTANT_MODEL_API_KEY"),
52
54
  }),
53
- allowedOrigins: ["http://localhost:3000", "https://app.example.com"],
55
+ access: authenticatedWebsite({
56
+ origins: ["http://localhost:3000", "https://app.example.com"],
57
+ }),
54
58
  layout: { mode: "floating", position: "bottom-right" },
55
59
  }),
56
60
  ```
57
61
 
58
- `allowedOrigins` are exact origins: scheme, host, and optional port, with no path, trailing slash, or wildcard. Production origins must be HTTPS; plain HTTP is accepted only for loopback development origins (`http://localhost:<port>`, `http://127.0.0.1:<port>`). `noodle dev` serves the MCP project, not the embedding SaaS.
62
+ Origins are exact: scheme, host, and optional port, with no path, trailing slash, or wildcard. Production origins must be HTTPS; plain HTTP is accepted only for loopback development origins (`http://localhost:<port>`, `http://127.0.0.1:<port>`). `noodle dev` serves the MCP project, not the embedding SaaS.
63
+
64
+ ### Surfaces: one assistant, every front door
65
+
66
+ A product usually has more than one front door — a marketing site and a signed-in app. One assistant (one brand, one model, one UI) projects onto both; pass `access` an array and each surface owns its own origins and allowlist:
67
+
68
+ ```ts
69
+ access: [
70
+ publicWebsite({
71
+ origins: ["https://www.example.com"],
72
+ capabilities: [answerProductQuestion, requestDemo],
73
+ }),
74
+ authenticatedWebsite({
75
+ origins: ["https://app.example.com"],
76
+ sessionClaims: { plan: { exposeToModel: true } },
77
+ }),
78
+ ],
79
+ ```
80
+
81
+ At most one public surface (`public` or `mixed`) and at most one authenticated surface, and no origin may appear on two surfaces — otherwise "which projection is this request?" would be ambiguous. Each gets its own embed snippet, budget, and kill switch.
82
+
83
+ `publicWebsite` is for a page with no signed-in user. The visitor is an **anonymous principal**, not an empty user: there is no `${user}`, no roles, no scopes, no customer routing, and no delegated credentials. A tool that needs identity — because it reads `${user}` or declares an `authorization` requirement — cannot be projected to a `public` surface, and the compiler says so.
84
+
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
+
87
+ ### Mixed surfaces: let a visitor sign in mid-conversation
88
+
89
+ Add `signIn: true` to a public surface when some capabilities need a signed-in user. The surface becomes `mixed`: anonymous visitors start immediately, and an identity-dependent capability becomes a **sign-in trigger** rather than a compile error — the same shape ChatGPT and Claude use for connectors that work with or without a linked account.
90
+
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’s own login**, never a Noodle-operated one: the page signs the visitor in and its backend exchanges that verified user for an elevated session on the same conversation. Do not build a second identity provider for this.
100
+
101
+ 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.
102
+
103
+ Origin is a browser boundary, never bot authentication — scripts can reproduce an allowed `Origin` header. Do not tell a user that origins protect a public embed; the real controls are the capability allowlist, confirmation, admission limits, and the per-surface daily budget.
59
104
 
60
105
  Run:
61
106
 
@@ -279,6 +324,25 @@ To make the *downstream API call itself* run as the signed-in user (your API enf
279
324
 
280
325
  The exchange returns the versioned Embedded Assistant v1 contract. `token`, `expiresAt`, and `endpoints.turns` / legacy `endpoints.toolConfirmations` (absolute URLs) are always present; current services add `endpoints.interactions` for accept/decline/cancel. `configuration` is optional theming data. Forward the body unchanged; browser clients choose the advertised endpoint. Do not rebuild, filter, or rewrite the response.
281
326
 
327
+ ## Mount a public website surface
328
+
329
+ A `publicWebsite` surface has no backend exchange, because it has no embed secret to protect. `noodle deploy` provisions a non-secret embed id and prints the snippet; the page presents that id directly and receives an anonymous session. Do not build a session route for a public surface — there is nothing for it to hold.
330
+
331
+ ```html
332
+ <script src="https://cloud.noodleseed.dev/v1/assistant/embed.js"
333
+ data-embed-id="pub_7f2q4k9x" async></script>
334
+ ```
335
+
336
+ The script derives its service origin from its own `src`, so one snippet works unchanged in every environment. In a React application, mount `<NoodleAssistant embedId="pub_7f2q4k9x" />` instead. `embedId` and `sessionEndpoint` are mutually exclusive: an embed id beside a backend endpoint is a mistake, and the client refuses rather than guessing which transport was meant.
337
+
338
+ The embed id is safe in page source and stable across deploys — paste it once; redeploy and rollback swap the projection under a page that never changes. Never treat it as a credential, and never put a client secret on a public page.
339
+
340
+ Tell the operator the two commands that matter: `noodle assistant embeds list` shows each surface with its live origins, capabilities, and today's spend against its cap; `noodle assistant budget set --turns-per-day 0` is the kill switch and stops conversations already under way. Raising the cap serves visitors again. Prefer it to revoking an embed, which destroys the pasted id.
341
+
342
+ A public surface is capped per day, so a visitor can meet an exhausted budget. The widget renders that calmly and offers no retry; do not add one. If the embedding page sets a Content-Security-Policy, it must allow the Noodle service origin in `script-src` (the embed script), `connect-src` (session and turns), and `frame-src` (widget sandbox) — a blocked `script-src` runs no widget code at all, so nothing can report it from the page.
343
+
344
+ Run `noodle check --target embedded-assistant` before deploying a public surface: it lists exactly what a stranger can reach and warns when no `privacyUrl` is declared.
345
+
282
346
  ## Choose a browser renderer
283
347
 
284
348
  Use the React wrapper in React applications:
@@ -16,6 +16,16 @@ A product with a single self-explanatory capability may omit the guide when its
16
16
 
17
17
  Make the judgment from the user’s stated outcome and grounded product evidence. If a guide is warranted but a decision-changing workflow or boundary is unknown, ask only for that missing product input; never fabricate it. The user should not need to know this feature name to receive the benefit.
18
18
 
19
+ ## Creation workflow
20
+
21
+ 1. **Inspect grounded capability evidence.** Read the configured TypeScript entrypoint (`server.ts` or `src/server.ts`) and identify its exact declared tools, resources, prompts, descriptions, visibility, annotations, authorization, and widget relationships. Treat schemas and compiled annotations as facts. Never invent or guess a tool, resource, prompt, capability kind, workflow, or weaker write boundary.
22
+ 2. **Decide guided or unguided.** Apply the criteria above and state the decision with its evidence. If the existing capabilities are self-explanatory and no product judgment is missing, recommend an intentionally unguided server and stop this workflow.
23
+ 3. **Interview only for product judgment.** Ask the builder for the decision-changing triggers, workflow ordering, grounding or clarification rules, boundaries, and representative prompts that source cannot prove. Do not ask them to restate capability names or schemas already present in TypeScript.
24
+ 4. **Propose TypeScript.** Present the complete proposed `agentGuide` block, map every step to one exact declared capability and kind, and call out how write, destructive, open-world, confirmation, authorization, and widget boundaries remain unchanged. Request explicit approval before editing the configured TypeScript entrypoint.
25
+ 5. **Apply and prove after approval.** Add or revise only the approved TypeScript guide. Run `noodle validate --json`, repair each structured guide error at its exact path without free-form invention, then run `noodle test --json`.
26
+ 6. **Preview the App Package plan.** Run `noodle agents setup --json` and report its exact target, file, ownership-migration, removal, and replacement actions. A preview never writes files. For an existing installed app skill, pass `--regenerate-app-skill` to state the intended operation explicitly; add `--replace-modified-app-skill` only when the builder is considering replacement of previously Noodle-owned bytes.
27
+ 7. **Ask separately before installation.** Request explicit approval before writing or replacing the app product skill. On approval, run `noodle agents setup --write` for a first installation, or `noodle agents setup --write --regenerate-app-skill` for a changed, migrated, renamed, or removed installation. Add `--replace-modified-app-skill` only when the preview identified modified previously owned bytes and the builder approved losing those exact local modifications.
28
+
19
29
  ## Authoring shape
20
30
 
21
31
  The guide contains `description`, `useWhen`, named `workflows`, optional `boundaries`, and optional example prompt-to-workflow mappings. Each workflow step references a declared `tool`, `resource`, or `prompt` by symbolic `{ kind, name }`; do not duplicate schemas, connector bindings, URLs, credentials, or raw runtime data.
@@ -26,8 +36,10 @@ Use `server.instructions` for a concise live MCP-session primer. Noodle-owned wo
26
36
 
27
37
  ## Local lifecycle
28
38
 
29
- `noodle agents setup` previews the local product-skill files compiled from `server.ts`; add `--write` to install them under `.agents/skills/<app-skill>/` and `.claude/skills/<app-skill>/`. No account or hosted deployment is required. The app files have an ownership record separate from the Noodle workflow skills.
39
+ `noodle agents setup` previews the local product-skill files compiled from `server.ts`; add `--write` for the first installation under `.agents/skills/<app-skill>/` and `.claude/skills/<app-skill>/`. No account or hosted deployment is required. The app files have an ownership record separate from the Noodle workflow skills.
40
+
41
+ A normal `noodle agents setup --write` refreshes Noodle-owned workflow skills but leaves an already installed app product skill unchanged. Regeneration, ownership-schema migration, rename, and removal require `--regenerate-app-skill` and are previewed even when `--write` is present without that flag. `--force` applies only to Noodle-owned project context and never overwrites a modified app-skill file. `--replace-modified-app-skill` is the narrower, separately approved recovery for previously owned app-skill bytes; it never claims unowned collisions or bypasses malformed state.
30
42
 
31
- `noodle agents setup --write` is idempotent and never overwrites a modified app-skill file. `--force` applies only to Noodle-owned project context, not app product skills. Run `noodle agents doctor --json`: `agent_skill_modified` means preserve and review local bytes; `agent_skill_stale` means source, surface, renderer, or installed files changed, so preview before writing; `agent_skill_invalid_state` means the ownership record is malformed or unsafe, so preserve the files and review the record before retrying.
43
+ Run `noodle agents doctor --json`: `agent_skill_modified` means preserve and review local bytes; `agent_skill_stale` means source, surface, renderer, installed files, or ownership schema changed, so preview explicit regeneration; `agent_skill_invalid_state` means the ownership record is malformed or unsafe, so preserve the files and review the record before retrying.
32
44
 
33
45
  Recover `agent_guide_*` errors by correcting the guide shape, workflow IDs, and capability kind/name. Remove any credential-shaped value: managed config is referenced by name only.
@@ -53,6 +53,7 @@ Platform helper connectors are explicit subpath imports from `@noodleseed/one/pl
53
53
 
54
54
  ### Other
55
55
 
56
+ - `authenticatedWebsite`
56
57
  - `clientCredentials`
57
58
  - `customerEndpoint`
58
59
  - `embeddedAssistant`
@@ -60,6 +61,7 @@ Platform helper connectors are explicit subpath imports from `@noodleseed/one/pl
60
61
  - `gmailConnector`
61
62
  - `managedSecret`
62
63
  - `openAICompatible`
64
+ - `publicWebsite`
63
65
 
64
66
  ## Authoring signatures
65
67
 
@@ -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.64.0 hash:0f404109f4845683 -->
6
+ <!-- noodle-skill version:0.66.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.64.0 hash:6ef6ef551e26b78e -->
6
+ <!-- noodle-skill version:0.66.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.64.0 hash:eccc3c158dcafba8 -->
6
+ <!-- noodle-skill version:0.66.0 hash:eccc3c158dcafba8 -->
7
7
 
8
8
  # wrapping-existing-applications
9
9