@noodleseed/agent-kit 0.100.0 → 0.102.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 (60) hide show
  1. package/manifest.json +371 -371
  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/authoring-mcp-servers/references/authoring-workflow.md +18 -3
  6. package/skills/claude-code/authoring-mcp-servers/references/sdk-surface.md +2 -1
  7. package/skills/claude-code/building-mcp-apps/SKILL.md +1 -1
  8. package/skills/claude-code/connecting-apis-to-mcp/SKILL.md +1 -1
  9. package/skills/claude-code/connecting-apis-to-mcp/references/authoring-workflow.md +18 -3
  10. package/skills/claude-code/creating-product-agent-guides/SKILL.md +1 -1
  11. package/skills/claude-code/debugging-mcp-delivery/SKILL.md +1 -1
  12. package/skills/claude-code/deploying-mcp-services/SKILL.md +1 -1
  13. package/skills/claude-code/designing-mcp-products/SKILL.md +1 -1
  14. package/skills/claude-code/designing-mcp-products/references/authoring-workflow.md +18 -3
  15. package/skills/claude-code/embedding-mcp-assistants/SKILL.md +1 -1
  16. package/skills/claude-code/embedding-mcp-assistants/references/authoring-workflow.md +18 -3
  17. package/skills/claude-code/examples/acme-bistro/README.md +15 -48
  18. package/skills/claude-code/examples/acme-bistro/src/server.ts +58 -16
  19. package/skills/claude-code/examples/acme-bistro/test/server.test.ts +4 -4
  20. package/skills/claude-code/examples/acme-tasks/README.md +11 -11
  21. package/skills/claude-code/examples/gmail-multi-account/README.md +53 -31
  22. package/skills/claude-code/examples/weather/src/server.ts +3 -3
  23. package/skills/claude-code/executing-noodle-plans/SKILL.md +1 -1
  24. package/skills/claude-code/publishing-mcp-integrations/SKILL.md +1 -1
  25. package/skills/claude-code/references/authoring-workflow.md +18 -3
  26. package/skills/claude-code/references/compile-errors.md +4 -0
  27. package/skills/claude-code/references/sdk-surface.md +2 -1
  28. package/skills/claude-code/reporting-noodle-feedback/SKILL.md +1 -1
  29. package/skills/claude-code/verifying-mcp-delivery/SKILL.md +1 -1
  30. package/skills/claude-code/wrapping-existing-applications/SKILL.md +1 -1
  31. package/skills/claude-code/wrapping-existing-applications/references/authoring-workflow.md +18 -3
  32. package/skills/codex/SKILL.md +1 -1
  33. package/skills/codex/authoring-mcp-servers/SKILL.md +1 -1
  34. package/skills/codex/authoring-mcp-servers/references/authoring-workflow.md +18 -3
  35. package/skills/codex/authoring-mcp-servers/references/sdk-surface.md +2 -1
  36. package/skills/codex/building-mcp-apps/SKILL.md +1 -1
  37. package/skills/codex/connecting-apis-to-mcp/SKILL.md +1 -1
  38. package/skills/codex/connecting-apis-to-mcp/references/authoring-workflow.md +18 -3
  39. package/skills/codex/creating-product-agent-guides/SKILL.md +1 -1
  40. package/skills/codex/debugging-mcp-delivery/SKILL.md +1 -1
  41. package/skills/codex/deploying-mcp-services/SKILL.md +1 -1
  42. package/skills/codex/designing-mcp-products/SKILL.md +1 -1
  43. package/skills/codex/designing-mcp-products/references/authoring-workflow.md +18 -3
  44. package/skills/codex/embedding-mcp-assistants/SKILL.md +1 -1
  45. package/skills/codex/embedding-mcp-assistants/references/authoring-workflow.md +18 -3
  46. package/skills/codex/examples/acme-bistro/README.md +15 -48
  47. package/skills/codex/examples/acme-bistro/src/server.ts +58 -16
  48. package/skills/codex/examples/acme-bistro/test/server.test.ts +4 -4
  49. package/skills/codex/examples/acme-tasks/README.md +11 -11
  50. package/skills/codex/examples/gmail-multi-account/README.md +53 -31
  51. package/skills/codex/examples/weather/src/server.ts +3 -3
  52. package/skills/codex/executing-noodle-plans/SKILL.md +1 -1
  53. package/skills/codex/publishing-mcp-integrations/SKILL.md +1 -1
  54. package/skills/codex/references/authoring-workflow.md +18 -3
  55. package/skills/codex/references/compile-errors.md +4 -0
  56. package/skills/codex/references/sdk-surface.md +2 -1
  57. package/skills/codex/reporting-noodle-feedback/SKILL.md +1 -1
  58. package/skills/codex/verifying-mcp-delivery/SKILL.md +1 -1
  59. package/skills/codex/wrapping-existing-applications/SKILL.md +1 -1
  60. package/skills/codex/wrapping-existing-applications/references/authoring-workflow.md +18 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noodleseed/agent-kit",
3
- "version": "0.100.0",
3
+ "version": "0.102.0",
4
4
  "private": false,
5
5
  "description": "Self-checking, self-updating agent skills for the Noodle Seed CLI. Authored in this repo by @noodle-borg/agent-kit; this is the published, independently-versioned canonical skills artifact the CLI fetches and verifies.",
6
6
  "license": "Apache-2.0",
@@ -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.100.0 hash:d3ceb1902ef4bb72 -->
6
+ <!-- noodle-skill version:0.102.0 hash:d3ceb1902ef4bb72 -->
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.100.0 hash:dd57a15df15d10b2 -->
6
+ <!-- noodle-skill version:0.102.0 hash:dd57a15df15d10b2 -->
7
7
 
8
8
  # authoring-mcp-servers
9
9
 
@@ -42,11 +42,14 @@ Author in `server.ts`, then `noodle validate` → fix cited errors (see `compile
42
42
 
43
43
  ## Connectors
44
44
 
45
- Declare connectors as data, not imperative code:
45
+ Declare typed connectors:
46
46
 
47
- - **HTTP**: `connector("id").version("1.0.0").http({ baseUrl, allowedOrigins, auth, operations })` with per-operation `request`/`response` mapping using `${args...}` / `${response...}` expressions.
47
+ - **HTTP**: `connector("id").version("1.0.0").http({ baseUrl, allowedOrigins, auth, operations })`; map request/response with `${args...}` / `${response...}`. Use `${execution.id}` for provider idempotency, never model input. Optional `evidence: { outcome: "${response.execution_outcome}", reference: "${response.id}" }` classifies completed/rejected/accepted/unknown; reference is a bounded opaque ID, never a bearer URL or payload. No automatic action retry.
48
48
  - **MCP**: `connector("id").version("1.0.0").mcp({ endpoint, allowedOrigins, auth?, operations })` where each operation freezes the separate upstream `tool` wire name plus input/output schema. Import with `noodle import mcp`; do not hand-copy a live surface or call `tools/list` at runtime.
49
49
  - **Compute**: `connector("id").version("1.0.0").compute(name, { input, output, calls?, run })` — a self-contained, sandboxed function (no imports/closure capture) that may call allowlisted operations via `callOperation`.
50
+ - **Explicit helpers**: `run: (input, host) => ...` can use `host.time.parse(iso)`, `host.time.format(epochMs)`, `host.time.parts(epochMs, timeZone)` and `host.digest(text, "hex")` (or `"base32hex"`). They convert bounded explicit data; there is no ambient clock. Pass trusted `context.temporal.instant` through fulfilment when current time is needed. `examples/weather` demonstrates a stable digest fallback for provider records without IDs.
51
+ - **Expected HTTP errors**: declare `responses: { "409": { response: { status: "conflict" }, evidence: { outcome: "rejected" } } }` alongside the ordinary success `response`. Explicit 4xx overrides exclude 401/403/429; validate against the same output schema. Undeclared errors still fail. Overrides never inherit successful completion evidence or introduce action retries.
52
+ - **Coordinated external actions**: a compute action may declare `coordination: { connectionId, namespace, key: "${args.resource}", reference: "${execution.id}" }` with a bounded execution deadline. It requires an installed application with a live bound connection and durable service coordination. Read `host.coordination.acquired` before writing; a blocked invocation may inspect `previous` through a declared read and call `host.resolveCoordination()` only after exact source proof, then require a fresh invocation/confirmation. The runtime permits at most one nested action when acquired and zero when blocked, even after recovery. Report explicit completed/rejected/unknown evidence with `host.reportOutcome(...)`; a successful return alone never unlocks uncertainty. Do not create an external-record collection for this.
50
53
 
51
54
  Tools record connector calls into a flow; recording is not execution. Do not branch on runtime outputs with native `if` — use declarative `when(...)` conditions.
52
55
 
@@ -58,6 +61,7 @@ not imported or forwarded. The runtime opens one guarded session for one operati
58
61
  credential, and closes it; it does not act as an agent for upstream sampling, roots, or elicitation.
59
62
 
60
63
  HTTP connector auth variants: `bearer` (`{ kind: "bearer", secret: secret("API_TOKEN") }`), `apiKey` (`{ kind: "apiKey", header: "X-API-Key", secret: secret("API_KEY") }`), `clientCredentials`, `delegatedOAuth`, `delegatedSessionCookie`, and `delegatedTokenExchange` (per-user calls to your own API — see "Delegated downstream auth" below). Use managed `secret(...)` / `variable(...)` refs for all values that differ by org/app/env.
64
+ An application-owned adapter may require its own service credential in addition to the operator account credential. Declare `http.transportAuth: { kind: "apiKey", header: "X-Adapter-Key", secret: secret("ADAPTER_SERVICE_KEY") }` alongside bound account credential profiles; the credential broker supplies the two independently. Never put either credential in tool arguments or ordinary headers, and never reuse an inbound MCP bearer. This capability does not imply a provider requires two credentials.
61
65
 
62
66
  When one connector needs independently selectable accounts, declare catalog `credentialProfiles` plus each operation’s accepted `credentials.profiles`, then bind each `server.use` alias with `bind(connector, { profile, connection: connection("logical_id", managedSecret(secret("NAME"), { scopes, audience })) })`. The alias is the stable account boundary; never put provider account ids, labels, or credential values in it. `gmailConnector()` is the curated Gmail catalog helper; reuse it under independent aliases and accept canonical `accounts` arrays in tools (one account for writes, or an explicitly ordered supported combination for reads). See the bundled `gmail-multi-account` flagship. Bound managed secrets are supported by hosted execution. For deployed-server access to Google APIs, use `googleWorkloadIdentity({ provider: variable("GOOGLE_WIF_PROVIDER"), access: { kind: "direct" } })`, or add `serviceAccountImpersonation` with a managed service-account email. This is keyless Google Workload Identity Federation: exact Google scopes/audience come from the catalog operation, while `noodle auth google prepare|status|doctor|revoke` owns operator lifecycle. See the bundled `google-bigquery` flagship. `externalExchange()` is runnable only when the deployment operator injects an exact HTTPS provider endpoint/origin/audience and durable shared subject-pin store through service ports; Noodle sends a short-lived platform-signed deployment workload assertion and accepts only a bounded bearer response. Provider implementations must consume assertion replay ids through durable shared atomic storage across instances and restarts. There is intentionally no hosted enrollment or provider CRUD surface yet. The provider wire contract is public, but its conformance kit is workspace/source-only and is not an installable npm package. Bound `clientCredentials(...)` remains fail-closed until its provider slice lands.
63
67
 
@@ -408,6 +412,12 @@ Adapt the representative arguments and assertions when business contracts change
408
412
 
409
413
  Author managed config as `secret("NAME")` / `variable("NAME")` and operate it with `noodle secrets set` / `noodle variables set` (scoped org/app/env). Never inline secret values in `server.ts`, tests, or generated files.
410
414
 
415
+ For business-editable configuration, declare `const guestExperience = variable("GUEST_EXPERIENCE", { schema: z.object({ notice: z.string().max(500) }), default: { notice: "Welcome" }, portal: { label: "Guest experience" }, requiredFor: ["show_menu"] })` and register it in `server(..., { variables: [guestExperience], ... }, tools)`. Use the whole ref or `guestExperience.field("notice")` in ordinary fulfilment/connector arguments. `.field()` selects a schema-declared object property, can chain for nested objects, and retains the parent variable and full configuration snapshot; it never reads operator data at author time. Keep confirmed action arguments shallow enough for complete review; do not label ordinary settings sensitive to bypass the review. The default is reusable safe intent; each business supplies its own values without editing source. Only explicit `portal` metadata exposes a setting. Name-only references and declared variables without `portal` remain technical configuration; secrets remain credential slots. See the bundled `acme-bistro` source.
416
+
417
+ Business schemas must be bounded: booleans, finite bounded numbers, bounded text, string enums, bounded arrays, and closed objects. Put defaults in the declaration, not inside Zod schema defaults; custom transforms/refinements and arbitrary schema code cannot run in the shared runtime. `requiredFor` names existing tools whose invocation needs the value; unresolved settings must leave only dependent capabilities unavailable. Publisher compilation does not require a future buyer’s values. Application code enforces business rules server-side; exposing a control or placing the rule in a prompt is insufficient.
418
+
419
+ For an installed application, use the same `noodle variables list|resolve|set|delete` family with `--installation <id> --org <org> --runtime cloud|other`; do not combine it with app/env/scope flags or secrets. Inspection shows schema metadata, provenance, readiness and revision without saved values. Set inputs are JSON (including quotes for strings), read the current projection and save atomically; `--expected-revision <digest>` pins an explicit prior inspection. Delete resets to the current declared default or unset state. Business-administrator permission is required for mutations, conflicts never retry writes, and mutation output excludes values.
420
+
411
421
  ## Embedded assistant
412
422
 
413
423
  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.
@@ -445,8 +455,13 @@ The managed crawler and managed index are the defaults and need no configuration
445
455
  ## Managed collections
446
456
 
447
457
  Use `managedCollection(name, { title, description, schemaVersion, record })` when an application needs reusable typed intent for business records that Noodle may later hold. Pass it through `server(..., { collections: [...] }, definitions)`. `record` is one bounded, closed Zod object; names use lowercase letters, numbers, and underscores. Keep payment-card, credentials, passport/government identity, health, and biometric fields out of this surface.
458
+ Native record controls are independent: `management: { assignment: true }`, `{ notes: true }`, both, or neither. Status is an ordinary application field such as `progress: z.enum(["received", "reviewing", "handled"]).default("received")`; no framework transition graph exists. Declare `publicFields` explicitly (default empty), `editableFields` for authorized staff (default all schema properties), optional field labels/help, `summaryFields`, `filterFields` and `sortFields`. References must name actual fields and filters/sorts select scalars. Public callers cannot set staff-only fields; a required private field needs a valid creation default. Staff updates merge only admitted fields and revalidate the complete record. See the notes-only `acme-bistro` collection.
459
+ Operator record queries use `noodle solutions records list --filters '[{"field":"progress","value":"received"}]' --sort-field progress`. Only declared scalar equality/sort fields apply. Payload queries scan at most 10,000 candidates; narrow `--created-at-from`/`--created-at-to` if the API returns `query_limit_exceeded`. Ordinary listing/export has no such scan cap. Cursor reuse requires unchanged query/schema and anchor revision. An administrator can explicitly migrate an eligible historical request with `records migrate-schema ... --expected-revision N`; never implement read-time rewrites.
460
+
461
+ Omitting `source` makes Noodle authoritative for the collection. To project a read-only collection from an outside system, bind an HTTP connector in `server(..., { use: [...] })` and add `source: { connector: connector.ref(), scan: "scan_operation" }`. The compiler requires the exact normalized scan contract and the same record schema. Noodle ingests a one-way replica; create, update, and delete in the outside system remain ordinary application tools with their own confirmation and policy.
448
462
 
449
- This declaration compiles schema metadata only. It does not create a submit tool, grant access, select retention or residency, provision storage, or make records available to MCP or the embedded assistant. Operators bind lifecycle and authority separately. Until the service intake path is shipped, keep live business operations on their existing connector tools.
463
+ For an explicitly authored native operation, bind `use: { records: noodlePlatform.records.v1 }` and call `connectors.records.submitRecord({ collection: "guest_requests", payload: input })` from an ordinary confirmed tool. Submission accepts only public fields and returns a receipt. `createRecord`, `getRecord`, `listRecords`, `updateRecord`, and `deleteRecord` require a verified platform caller with a live business grant; updates/deletes require the current revision. `updateRecord({ collection, id, expectedRevision, patch, unset: ["optional_field"] })` removes named optional editable fields; omitted keys stay unchanged, `null` is data, and overlap with `patch`, required fields or undeclared fields is rejected. Runtime identity supplies write idempotency and admission; never accept those controls as model arguments. An uninstalled collection is unavailable, including during local tool execution.
464
+ A collection declaration does not create a submit tool, grant access, select retention or residency, provision storage, or expose records to MCP or an embedded assistant. Operators activate the definition and configure lifecycle, access, and any external binding. A connector does not become a collection unless the app explicitly supplies the source contract, and an external collection never becomes a writable mirror.
450
465
 
451
466
  ## Boundaries
452
467
 
@@ -37,7 +37,7 @@ Platform helper connectors are explicit subpath imports from `@noodleseed/one/pl
37
37
  ### Managed config
38
38
 
39
39
  - `secret("NAME")` — reference a managed secret (operated via `noodle secrets`).
40
- - `variable("NAME")` — reference a managed variable (operated via `noodle variables`).
40
+ - `variable("NAME")` — reference managed configuration; add `{ schema, default?, portal?, requiredFor? }` and register in `server.variables` for typed business settings. Operate through `noodle variables` or authorized Portal settings.
41
41
 
42
42
  ### Customer auth
43
43
 
@@ -67,6 +67,7 @@ Platform helper connectors are explicit subpath imports from `@noodleseed/one/pl
67
67
  - `managedSecret`
68
68
  - `meilisearch`
69
69
  - `noodleManaged`
70
+ - `noodlePlatform`
70
71
  - `openAICompatible`
71
72
  - `publicWebsite`
72
73
  - `site`
@@ -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.100.0 hash:98c7b07c82a7d7ce -->
6
+ <!-- noodle-skill version:0.102.0 hash:98c7b07c82a7d7ce -->
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.100.0 hash:8020811f1769c538 -->
6
+ <!-- noodle-skill version:0.102.0 hash:8020811f1769c538 -->
7
7
 
8
8
  # connecting-apis-to-mcp
9
9
 
@@ -42,11 +42,14 @@ Author in `server.ts`, then `noodle validate` → fix cited errors (see `compile
42
42
 
43
43
  ## Connectors
44
44
 
45
- Declare connectors as data, not imperative code:
45
+ Declare typed connectors:
46
46
 
47
- - **HTTP**: `connector("id").version("1.0.0").http({ baseUrl, allowedOrigins, auth, operations })` with per-operation `request`/`response` mapping using `${args...}` / `${response...}` expressions.
47
+ - **HTTP**: `connector("id").version("1.0.0").http({ baseUrl, allowedOrigins, auth, operations })`; map request/response with `${args...}` / `${response...}`. Use `${execution.id}` for provider idempotency, never model input. Optional `evidence: { outcome: "${response.execution_outcome}", reference: "${response.id}" }` classifies completed/rejected/accepted/unknown; reference is a bounded opaque ID, never a bearer URL or payload. No automatic action retry.
48
48
  - **MCP**: `connector("id").version("1.0.0").mcp({ endpoint, allowedOrigins, auth?, operations })` where each operation freezes the separate upstream `tool` wire name plus input/output schema. Import with `noodle import mcp`; do not hand-copy a live surface or call `tools/list` at runtime.
49
49
  - **Compute**: `connector("id").version("1.0.0").compute(name, { input, output, calls?, run })` — a self-contained, sandboxed function (no imports/closure capture) that may call allowlisted operations via `callOperation`.
50
+ - **Explicit helpers**: `run: (input, host) => ...` can use `host.time.parse(iso)`, `host.time.format(epochMs)`, `host.time.parts(epochMs, timeZone)` and `host.digest(text, "hex")` (or `"base32hex"`). They convert bounded explicit data; there is no ambient clock. Pass trusted `context.temporal.instant` through fulfilment when current time is needed. `examples/weather` demonstrates a stable digest fallback for provider records without IDs.
51
+ - **Expected HTTP errors**: declare `responses: { "409": { response: { status: "conflict" }, evidence: { outcome: "rejected" } } }` alongside the ordinary success `response`. Explicit 4xx overrides exclude 401/403/429; validate against the same output schema. Undeclared errors still fail. Overrides never inherit successful completion evidence or introduce action retries.
52
+ - **Coordinated external actions**: a compute action may declare `coordination: { connectionId, namespace, key: "${args.resource}", reference: "${execution.id}" }` with a bounded execution deadline. It requires an installed application with a live bound connection and durable service coordination. Read `host.coordination.acquired` before writing; a blocked invocation may inspect `previous` through a declared read and call `host.resolveCoordination()` only after exact source proof, then require a fresh invocation/confirmation. The runtime permits at most one nested action when acquired and zero when blocked, even after recovery. Report explicit completed/rejected/unknown evidence with `host.reportOutcome(...)`; a successful return alone never unlocks uncertainty. Do not create an external-record collection for this.
50
53
 
51
54
  Tools record connector calls into a flow; recording is not execution. Do not branch on runtime outputs with native `if` — use declarative `when(...)` conditions.
52
55
 
@@ -58,6 +61,7 @@ not imported or forwarded. The runtime opens one guarded session for one operati
58
61
  credential, and closes it; it does not act as an agent for upstream sampling, roots, or elicitation.
59
62
 
60
63
  HTTP connector auth variants: `bearer` (`{ kind: "bearer", secret: secret("API_TOKEN") }`), `apiKey` (`{ kind: "apiKey", header: "X-API-Key", secret: secret("API_KEY") }`), `clientCredentials`, `delegatedOAuth`, `delegatedSessionCookie`, and `delegatedTokenExchange` (per-user calls to your own API — see "Delegated downstream auth" below). Use managed `secret(...)` / `variable(...)` refs for all values that differ by org/app/env.
64
+ An application-owned adapter may require its own service credential in addition to the operator account credential. Declare `http.transportAuth: { kind: "apiKey", header: "X-Adapter-Key", secret: secret("ADAPTER_SERVICE_KEY") }` alongside bound account credential profiles; the credential broker supplies the two independently. Never put either credential in tool arguments or ordinary headers, and never reuse an inbound MCP bearer. This capability does not imply a provider requires two credentials.
61
65
 
62
66
  When one connector needs independently selectable accounts, declare catalog `credentialProfiles` plus each operation’s accepted `credentials.profiles`, then bind each `server.use` alias with `bind(connector, { profile, connection: connection("logical_id", managedSecret(secret("NAME"), { scopes, audience })) })`. The alias is the stable account boundary; never put provider account ids, labels, or credential values in it. `gmailConnector()` is the curated Gmail catalog helper; reuse it under independent aliases and accept canonical `accounts` arrays in tools (one account for writes, or an explicitly ordered supported combination for reads). See the bundled `gmail-multi-account` flagship. Bound managed secrets are supported by hosted execution. For deployed-server access to Google APIs, use `googleWorkloadIdentity({ provider: variable("GOOGLE_WIF_PROVIDER"), access: { kind: "direct" } })`, or add `serviceAccountImpersonation` with a managed service-account email. This is keyless Google Workload Identity Federation: exact Google scopes/audience come from the catalog operation, while `noodle auth google prepare|status|doctor|revoke` owns operator lifecycle. See the bundled `google-bigquery` flagship. `externalExchange()` is runnable only when the deployment operator injects an exact HTTPS provider endpoint/origin/audience and durable shared subject-pin store through service ports; Noodle sends a short-lived platform-signed deployment workload assertion and accepts only a bounded bearer response. Provider implementations must consume assertion replay ids through durable shared atomic storage across instances and restarts. There is intentionally no hosted enrollment or provider CRUD surface yet. The provider wire contract is public, but its conformance kit is workspace/source-only and is not an installable npm package. Bound `clientCredentials(...)` remains fail-closed until its provider slice lands.
63
67
 
@@ -408,6 +412,12 @@ Adapt the representative arguments and assertions when business contracts change
408
412
 
409
413
  Author managed config as `secret("NAME")` / `variable("NAME")` and operate it with `noodle secrets set` / `noodle variables set` (scoped org/app/env). Never inline secret values in `server.ts`, tests, or generated files.
410
414
 
415
+ For business-editable configuration, declare `const guestExperience = variable("GUEST_EXPERIENCE", { schema: z.object({ notice: z.string().max(500) }), default: { notice: "Welcome" }, portal: { label: "Guest experience" }, requiredFor: ["show_menu"] })` and register it in `server(..., { variables: [guestExperience], ... }, tools)`. Use the whole ref or `guestExperience.field("notice")` in ordinary fulfilment/connector arguments. `.field()` selects a schema-declared object property, can chain for nested objects, and retains the parent variable and full configuration snapshot; it never reads operator data at author time. Keep confirmed action arguments shallow enough for complete review; do not label ordinary settings sensitive to bypass the review. The default is reusable safe intent; each business supplies its own values without editing source. Only explicit `portal` metadata exposes a setting. Name-only references and declared variables without `portal` remain technical configuration; secrets remain credential slots. See the bundled `acme-bistro` source.
416
+
417
+ Business schemas must be bounded: booleans, finite bounded numbers, bounded text, string enums, bounded arrays, and closed objects. Put defaults in the declaration, not inside Zod schema defaults; custom transforms/refinements and arbitrary schema code cannot run in the shared runtime. `requiredFor` names existing tools whose invocation needs the value; unresolved settings must leave only dependent capabilities unavailable. Publisher compilation does not require a future buyer’s values. Application code enforces business rules server-side; exposing a control or placing the rule in a prompt is insufficient.
418
+
419
+ For an installed application, use the same `noodle variables list|resolve|set|delete` family with `--installation <id> --org <org> --runtime cloud|other`; do not combine it with app/env/scope flags or secrets. Inspection shows schema metadata, provenance, readiness and revision without saved values. Set inputs are JSON (including quotes for strings), read the current projection and save atomically; `--expected-revision <digest>` pins an explicit prior inspection. Delete resets to the current declared default or unset state. Business-administrator permission is required for mutations, conflicts never retry writes, and mutation output excludes values.
420
+
411
421
  ## Embedded assistant
412
422
 
413
423
  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.
@@ -445,8 +455,13 @@ The managed crawler and managed index are the defaults and need no configuration
445
455
  ## Managed collections
446
456
 
447
457
  Use `managedCollection(name, { title, description, schemaVersion, record })` when an application needs reusable typed intent for business records that Noodle may later hold. Pass it through `server(..., { collections: [...] }, definitions)`. `record` is one bounded, closed Zod object; names use lowercase letters, numbers, and underscores. Keep payment-card, credentials, passport/government identity, health, and biometric fields out of this surface.
458
+ Native record controls are independent: `management: { assignment: true }`, `{ notes: true }`, both, or neither. Status is an ordinary application field such as `progress: z.enum(["received", "reviewing", "handled"]).default("received")`; no framework transition graph exists. Declare `publicFields` explicitly (default empty), `editableFields` for authorized staff (default all schema properties), optional field labels/help, `summaryFields`, `filterFields` and `sortFields`. References must name actual fields and filters/sorts select scalars. Public callers cannot set staff-only fields; a required private field needs a valid creation default. Staff updates merge only admitted fields and revalidate the complete record. See the notes-only `acme-bistro` collection.
459
+ Operator record queries use `noodle solutions records list --filters '[{"field":"progress","value":"received"}]' --sort-field progress`. Only declared scalar equality/sort fields apply. Payload queries scan at most 10,000 candidates; narrow `--created-at-from`/`--created-at-to` if the API returns `query_limit_exceeded`. Ordinary listing/export has no such scan cap. Cursor reuse requires unchanged query/schema and anchor revision. An administrator can explicitly migrate an eligible historical request with `records migrate-schema ... --expected-revision N`; never implement read-time rewrites.
460
+
461
+ Omitting `source` makes Noodle authoritative for the collection. To project a read-only collection from an outside system, bind an HTTP connector in `server(..., { use: [...] })` and add `source: { connector: connector.ref(), scan: "scan_operation" }`. The compiler requires the exact normalized scan contract and the same record schema. Noodle ingests a one-way replica; create, update, and delete in the outside system remain ordinary application tools with their own confirmation and policy.
448
462
 
449
- This declaration compiles schema metadata only. It does not create a submit tool, grant access, select retention or residency, provision storage, or make records available to MCP or the embedded assistant. Operators bind lifecycle and authority separately. Until the service intake path is shipped, keep live business operations on their existing connector tools.
463
+ For an explicitly authored native operation, bind `use: { records: noodlePlatform.records.v1 }` and call `connectors.records.submitRecord({ collection: "guest_requests", payload: input })` from an ordinary confirmed tool. Submission accepts only public fields and returns a receipt. `createRecord`, `getRecord`, `listRecords`, `updateRecord`, and `deleteRecord` require a verified platform caller with a live business grant; updates/deletes require the current revision. `updateRecord({ collection, id, expectedRevision, patch, unset: ["optional_field"] })` removes named optional editable fields; omitted keys stay unchanged, `null` is data, and overlap with `patch`, required fields or undeclared fields is rejected. Runtime identity supplies write idempotency and admission; never accept those controls as model arguments. An uninstalled collection is unavailable, including during local tool execution.
464
+ A collection declaration does not create a submit tool, grant access, select retention or residency, provision storage, or expose records to MCP or an embedded assistant. Operators activate the definition and configure lifecycle, access, and any external binding. A connector does not become a collection unless the app explicitly supplies the source contract, and an external collection never becomes a writable mirror.
450
465
 
451
466
  ## Boundaries
452
467
 
@@ -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.100.0 hash:0e06e11254563b6a -->
6
+ <!-- noodle-skill version:0.102.0 hash:0e06e11254563b6a -->
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.100.0 hash:8d75ad13f4b3120a -->
6
+ <!-- noodle-skill version:0.102.0 hash:8d75ad13f4b3120a -->
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.100.0 hash:3a1e14ff9b98ddbd -->
6
+ <!-- noodle-skill version:0.102.0 hash:3a1e14ff9b98ddbd -->
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.100.0 hash:a21b2ed9997f9454 -->
6
+ <!-- noodle-skill version:0.102.0 hash:a21b2ed9997f9454 -->
7
7
 
8
8
  # designing-mcp-products
9
9
 
@@ -42,11 +42,14 @@ Author in `server.ts`, then `noodle validate` → fix cited errors (see `compile
42
42
 
43
43
  ## Connectors
44
44
 
45
- Declare connectors as data, not imperative code:
45
+ Declare typed connectors:
46
46
 
47
- - **HTTP**: `connector("id").version("1.0.0").http({ baseUrl, allowedOrigins, auth, operations })` with per-operation `request`/`response` mapping using `${args...}` / `${response...}` expressions.
47
+ - **HTTP**: `connector("id").version("1.0.0").http({ baseUrl, allowedOrigins, auth, operations })`; map request/response with `${args...}` / `${response...}`. Use `${execution.id}` for provider idempotency, never model input. Optional `evidence: { outcome: "${response.execution_outcome}", reference: "${response.id}" }` classifies completed/rejected/accepted/unknown; reference is a bounded opaque ID, never a bearer URL or payload. No automatic action retry.
48
48
  - **MCP**: `connector("id").version("1.0.0").mcp({ endpoint, allowedOrigins, auth?, operations })` where each operation freezes the separate upstream `tool` wire name plus input/output schema. Import with `noodle import mcp`; do not hand-copy a live surface or call `tools/list` at runtime.
49
49
  - **Compute**: `connector("id").version("1.0.0").compute(name, { input, output, calls?, run })` — a self-contained, sandboxed function (no imports/closure capture) that may call allowlisted operations via `callOperation`.
50
+ - **Explicit helpers**: `run: (input, host) => ...` can use `host.time.parse(iso)`, `host.time.format(epochMs)`, `host.time.parts(epochMs, timeZone)` and `host.digest(text, "hex")` (or `"base32hex"`). They convert bounded explicit data; there is no ambient clock. Pass trusted `context.temporal.instant` through fulfilment when current time is needed. `examples/weather` demonstrates a stable digest fallback for provider records without IDs.
51
+ - **Expected HTTP errors**: declare `responses: { "409": { response: { status: "conflict" }, evidence: { outcome: "rejected" } } }` alongside the ordinary success `response`. Explicit 4xx overrides exclude 401/403/429; validate against the same output schema. Undeclared errors still fail. Overrides never inherit successful completion evidence or introduce action retries.
52
+ - **Coordinated external actions**: a compute action may declare `coordination: { connectionId, namespace, key: "${args.resource}", reference: "${execution.id}" }` with a bounded execution deadline. It requires an installed application with a live bound connection and durable service coordination. Read `host.coordination.acquired` before writing; a blocked invocation may inspect `previous` through a declared read and call `host.resolveCoordination()` only after exact source proof, then require a fresh invocation/confirmation. The runtime permits at most one nested action when acquired and zero when blocked, even after recovery. Report explicit completed/rejected/unknown evidence with `host.reportOutcome(...)`; a successful return alone never unlocks uncertainty. Do not create an external-record collection for this.
50
53
 
51
54
  Tools record connector calls into a flow; recording is not execution. Do not branch on runtime outputs with native `if` — use declarative `when(...)` conditions.
52
55
 
@@ -58,6 +61,7 @@ not imported or forwarded. The runtime opens one guarded session for one operati
58
61
  credential, and closes it; it does not act as an agent for upstream sampling, roots, or elicitation.
59
62
 
60
63
  HTTP connector auth variants: `bearer` (`{ kind: "bearer", secret: secret("API_TOKEN") }`), `apiKey` (`{ kind: "apiKey", header: "X-API-Key", secret: secret("API_KEY") }`), `clientCredentials`, `delegatedOAuth`, `delegatedSessionCookie`, and `delegatedTokenExchange` (per-user calls to your own API — see "Delegated downstream auth" below). Use managed `secret(...)` / `variable(...)` refs for all values that differ by org/app/env.
64
+ An application-owned adapter may require its own service credential in addition to the operator account credential. Declare `http.transportAuth: { kind: "apiKey", header: "X-Adapter-Key", secret: secret("ADAPTER_SERVICE_KEY") }` alongside bound account credential profiles; the credential broker supplies the two independently. Never put either credential in tool arguments or ordinary headers, and never reuse an inbound MCP bearer. This capability does not imply a provider requires two credentials.
61
65
 
62
66
  When one connector needs independently selectable accounts, declare catalog `credentialProfiles` plus each operation’s accepted `credentials.profiles`, then bind each `server.use` alias with `bind(connector, { profile, connection: connection("logical_id", managedSecret(secret("NAME"), { scopes, audience })) })`. The alias is the stable account boundary; never put provider account ids, labels, or credential values in it. `gmailConnector()` is the curated Gmail catalog helper; reuse it under independent aliases and accept canonical `accounts` arrays in tools (one account for writes, or an explicitly ordered supported combination for reads). See the bundled `gmail-multi-account` flagship. Bound managed secrets are supported by hosted execution. For deployed-server access to Google APIs, use `googleWorkloadIdentity({ provider: variable("GOOGLE_WIF_PROVIDER"), access: { kind: "direct" } })`, or add `serviceAccountImpersonation` with a managed service-account email. This is keyless Google Workload Identity Federation: exact Google scopes/audience come from the catalog operation, while `noodle auth google prepare|status|doctor|revoke` owns operator lifecycle. See the bundled `google-bigquery` flagship. `externalExchange()` is runnable only when the deployment operator injects an exact HTTPS provider endpoint/origin/audience and durable shared subject-pin store through service ports; Noodle sends a short-lived platform-signed deployment workload assertion and accepts only a bounded bearer response. Provider implementations must consume assertion replay ids through durable shared atomic storage across instances and restarts. There is intentionally no hosted enrollment or provider CRUD surface yet. The provider wire contract is public, but its conformance kit is workspace/source-only and is not an installable npm package. Bound `clientCredentials(...)` remains fail-closed until its provider slice lands.
63
67
 
@@ -408,6 +412,12 @@ Adapt the representative arguments and assertions when business contracts change
408
412
 
409
413
  Author managed config as `secret("NAME")` / `variable("NAME")` and operate it with `noodle secrets set` / `noodle variables set` (scoped org/app/env). Never inline secret values in `server.ts`, tests, or generated files.
410
414
 
415
+ For business-editable configuration, declare `const guestExperience = variable("GUEST_EXPERIENCE", { schema: z.object({ notice: z.string().max(500) }), default: { notice: "Welcome" }, portal: { label: "Guest experience" }, requiredFor: ["show_menu"] })` and register it in `server(..., { variables: [guestExperience], ... }, tools)`. Use the whole ref or `guestExperience.field("notice")` in ordinary fulfilment/connector arguments. `.field()` selects a schema-declared object property, can chain for nested objects, and retains the parent variable and full configuration snapshot; it never reads operator data at author time. Keep confirmed action arguments shallow enough for complete review; do not label ordinary settings sensitive to bypass the review. The default is reusable safe intent; each business supplies its own values without editing source. Only explicit `portal` metadata exposes a setting. Name-only references and declared variables without `portal` remain technical configuration; secrets remain credential slots. See the bundled `acme-bistro` source.
416
+
417
+ Business schemas must be bounded: booleans, finite bounded numbers, bounded text, string enums, bounded arrays, and closed objects. Put defaults in the declaration, not inside Zod schema defaults; custom transforms/refinements and arbitrary schema code cannot run in the shared runtime. `requiredFor` names existing tools whose invocation needs the value; unresolved settings must leave only dependent capabilities unavailable. Publisher compilation does not require a future buyer’s values. Application code enforces business rules server-side; exposing a control or placing the rule in a prompt is insufficient.
418
+
419
+ For an installed application, use the same `noodle variables list|resolve|set|delete` family with `--installation <id> --org <org> --runtime cloud|other`; do not combine it with app/env/scope flags or secrets. Inspection shows schema metadata, provenance, readiness and revision without saved values. Set inputs are JSON (including quotes for strings), read the current projection and save atomically; `--expected-revision <digest>` pins an explicit prior inspection. Delete resets to the current declared default or unset state. Business-administrator permission is required for mutations, conflicts never retry writes, and mutation output excludes values.
420
+
411
421
  ## Embedded assistant
412
422
 
413
423
  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.
@@ -445,8 +455,13 @@ The managed crawler and managed index are the defaults and need no configuration
445
455
  ## Managed collections
446
456
 
447
457
  Use `managedCollection(name, { title, description, schemaVersion, record })` when an application needs reusable typed intent for business records that Noodle may later hold. Pass it through `server(..., { collections: [...] }, definitions)`. `record` is one bounded, closed Zod object; names use lowercase letters, numbers, and underscores. Keep payment-card, credentials, passport/government identity, health, and biometric fields out of this surface.
458
+ Native record controls are independent: `management: { assignment: true }`, `{ notes: true }`, both, or neither. Status is an ordinary application field such as `progress: z.enum(["received", "reviewing", "handled"]).default("received")`; no framework transition graph exists. Declare `publicFields` explicitly (default empty), `editableFields` for authorized staff (default all schema properties), optional field labels/help, `summaryFields`, `filterFields` and `sortFields`. References must name actual fields and filters/sorts select scalars. Public callers cannot set staff-only fields; a required private field needs a valid creation default. Staff updates merge only admitted fields and revalidate the complete record. See the notes-only `acme-bistro` collection.
459
+ Operator record queries use `noodle solutions records list --filters '[{"field":"progress","value":"received"}]' --sort-field progress`. Only declared scalar equality/sort fields apply. Payload queries scan at most 10,000 candidates; narrow `--created-at-from`/`--created-at-to` if the API returns `query_limit_exceeded`. Ordinary listing/export has no such scan cap. Cursor reuse requires unchanged query/schema and anchor revision. An administrator can explicitly migrate an eligible historical request with `records migrate-schema ... --expected-revision N`; never implement read-time rewrites.
460
+
461
+ Omitting `source` makes Noodle authoritative for the collection. To project a read-only collection from an outside system, bind an HTTP connector in `server(..., { use: [...] })` and add `source: { connector: connector.ref(), scan: "scan_operation" }`. The compiler requires the exact normalized scan contract and the same record schema. Noodle ingests a one-way replica; create, update, and delete in the outside system remain ordinary application tools with their own confirmation and policy.
448
462
 
449
- This declaration compiles schema metadata only. It does not create a submit tool, grant access, select retention or residency, provision storage, or make records available to MCP or the embedded assistant. Operators bind lifecycle and authority separately. Until the service intake path is shipped, keep live business operations on their existing connector tools.
463
+ For an explicitly authored native operation, bind `use: { records: noodlePlatform.records.v1 }` and call `connectors.records.submitRecord({ collection: "guest_requests", payload: input })` from an ordinary confirmed tool. Submission accepts only public fields and returns a receipt. `createRecord`, `getRecord`, `listRecords`, `updateRecord`, and `deleteRecord` require a verified platform caller with a live business grant; updates/deletes require the current revision. `updateRecord({ collection, id, expectedRevision, patch, unset: ["optional_field"] })` removes named optional editable fields; omitted keys stay unchanged, `null` is data, and overlap with `patch`, required fields or undeclared fields is rejected. Runtime identity supplies write idempotency and admission; never accept those controls as model arguments. An uninstalled collection is unavailable, including during local tool execution.
464
+ A collection declaration does not create a submit tool, grant access, select retention or residency, provision storage, or expose records to MCP or an embedded assistant. Operators activate the definition and configure lifecycle, access, and any external binding. A connector does not become a collection unless the app explicitly supplies the source contract, and an external collection never becomes a writable mirror.
450
465
 
451
466
  ## Boundaries
452
467
 
@@ -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.100.0 hash:d554d661ed7ac7be -->
6
+ <!-- noodle-skill version:0.102.0 hash:d554d661ed7ac7be -->
7
7
 
8
8
  # embedding-mcp-assistants
9
9
 
@@ -42,11 +42,14 @@ Author in `server.ts`, then `noodle validate` → fix cited errors (see `compile
42
42
 
43
43
  ## Connectors
44
44
 
45
- Declare connectors as data, not imperative code:
45
+ Declare typed connectors:
46
46
 
47
- - **HTTP**: `connector("id").version("1.0.0").http({ baseUrl, allowedOrigins, auth, operations })` with per-operation `request`/`response` mapping using `${args...}` / `${response...}` expressions.
47
+ - **HTTP**: `connector("id").version("1.0.0").http({ baseUrl, allowedOrigins, auth, operations })`; map request/response with `${args...}` / `${response...}`. Use `${execution.id}` for provider idempotency, never model input. Optional `evidence: { outcome: "${response.execution_outcome}", reference: "${response.id}" }` classifies completed/rejected/accepted/unknown; reference is a bounded opaque ID, never a bearer URL or payload. No automatic action retry.
48
48
  - **MCP**: `connector("id").version("1.0.0").mcp({ endpoint, allowedOrigins, auth?, operations })` where each operation freezes the separate upstream `tool` wire name plus input/output schema. Import with `noodle import mcp`; do not hand-copy a live surface or call `tools/list` at runtime.
49
49
  - **Compute**: `connector("id").version("1.0.0").compute(name, { input, output, calls?, run })` — a self-contained, sandboxed function (no imports/closure capture) that may call allowlisted operations via `callOperation`.
50
+ - **Explicit helpers**: `run: (input, host) => ...` can use `host.time.parse(iso)`, `host.time.format(epochMs)`, `host.time.parts(epochMs, timeZone)` and `host.digest(text, "hex")` (or `"base32hex"`). They convert bounded explicit data; there is no ambient clock. Pass trusted `context.temporal.instant` through fulfilment when current time is needed. `examples/weather` demonstrates a stable digest fallback for provider records without IDs.
51
+ - **Expected HTTP errors**: declare `responses: { "409": { response: { status: "conflict" }, evidence: { outcome: "rejected" } } }` alongside the ordinary success `response`. Explicit 4xx overrides exclude 401/403/429; validate against the same output schema. Undeclared errors still fail. Overrides never inherit successful completion evidence or introduce action retries.
52
+ - **Coordinated external actions**: a compute action may declare `coordination: { connectionId, namespace, key: "${args.resource}", reference: "${execution.id}" }` with a bounded execution deadline. It requires an installed application with a live bound connection and durable service coordination. Read `host.coordination.acquired` before writing; a blocked invocation may inspect `previous` through a declared read and call `host.resolveCoordination()` only after exact source proof, then require a fresh invocation/confirmation. The runtime permits at most one nested action when acquired and zero when blocked, even after recovery. Report explicit completed/rejected/unknown evidence with `host.reportOutcome(...)`; a successful return alone never unlocks uncertainty. Do not create an external-record collection for this.
50
53
 
51
54
  Tools record connector calls into a flow; recording is not execution. Do not branch on runtime outputs with native `if` — use declarative `when(...)` conditions.
52
55
 
@@ -58,6 +61,7 @@ not imported or forwarded. The runtime opens one guarded session for one operati
58
61
  credential, and closes it; it does not act as an agent for upstream sampling, roots, or elicitation.
59
62
 
60
63
  HTTP connector auth variants: `bearer` (`{ kind: "bearer", secret: secret("API_TOKEN") }`), `apiKey` (`{ kind: "apiKey", header: "X-API-Key", secret: secret("API_KEY") }`), `clientCredentials`, `delegatedOAuth`, `delegatedSessionCookie`, and `delegatedTokenExchange` (per-user calls to your own API — see "Delegated downstream auth" below). Use managed `secret(...)` / `variable(...)` refs for all values that differ by org/app/env.
64
+ An application-owned adapter may require its own service credential in addition to the operator account credential. Declare `http.transportAuth: { kind: "apiKey", header: "X-Adapter-Key", secret: secret("ADAPTER_SERVICE_KEY") }` alongside bound account credential profiles; the credential broker supplies the two independently. Never put either credential in tool arguments or ordinary headers, and never reuse an inbound MCP bearer. This capability does not imply a provider requires two credentials.
61
65
 
62
66
  When one connector needs independently selectable accounts, declare catalog `credentialProfiles` plus each operation’s accepted `credentials.profiles`, then bind each `server.use` alias with `bind(connector, { profile, connection: connection("logical_id", managedSecret(secret("NAME"), { scopes, audience })) })`. The alias is the stable account boundary; never put provider account ids, labels, or credential values in it. `gmailConnector()` is the curated Gmail catalog helper; reuse it under independent aliases and accept canonical `accounts` arrays in tools (one account for writes, or an explicitly ordered supported combination for reads). See the bundled `gmail-multi-account` flagship. Bound managed secrets are supported by hosted execution. For deployed-server access to Google APIs, use `googleWorkloadIdentity({ provider: variable("GOOGLE_WIF_PROVIDER"), access: { kind: "direct" } })`, or add `serviceAccountImpersonation` with a managed service-account email. This is keyless Google Workload Identity Federation: exact Google scopes/audience come from the catalog operation, while `noodle auth google prepare|status|doctor|revoke` owns operator lifecycle. See the bundled `google-bigquery` flagship. `externalExchange()` is runnable only when the deployment operator injects an exact HTTPS provider endpoint/origin/audience and durable shared subject-pin store through service ports; Noodle sends a short-lived platform-signed deployment workload assertion and accepts only a bounded bearer response. Provider implementations must consume assertion replay ids through durable shared atomic storage across instances and restarts. There is intentionally no hosted enrollment or provider CRUD surface yet. The provider wire contract is public, but its conformance kit is workspace/source-only and is not an installable npm package. Bound `clientCredentials(...)` remains fail-closed until its provider slice lands.
63
67
 
@@ -408,6 +412,12 @@ Adapt the representative arguments and assertions when business contracts change
408
412
 
409
413
  Author managed config as `secret("NAME")` / `variable("NAME")` and operate it with `noodle secrets set` / `noodle variables set` (scoped org/app/env). Never inline secret values in `server.ts`, tests, or generated files.
410
414
 
415
+ For business-editable configuration, declare `const guestExperience = variable("GUEST_EXPERIENCE", { schema: z.object({ notice: z.string().max(500) }), default: { notice: "Welcome" }, portal: { label: "Guest experience" }, requiredFor: ["show_menu"] })` and register it in `server(..., { variables: [guestExperience], ... }, tools)`. Use the whole ref or `guestExperience.field("notice")` in ordinary fulfilment/connector arguments. `.field()` selects a schema-declared object property, can chain for nested objects, and retains the parent variable and full configuration snapshot; it never reads operator data at author time. Keep confirmed action arguments shallow enough for complete review; do not label ordinary settings sensitive to bypass the review. The default is reusable safe intent; each business supplies its own values without editing source. Only explicit `portal` metadata exposes a setting. Name-only references and declared variables without `portal` remain technical configuration; secrets remain credential slots. See the bundled `acme-bistro` source.
416
+
417
+ Business schemas must be bounded: booleans, finite bounded numbers, bounded text, string enums, bounded arrays, and closed objects. Put defaults in the declaration, not inside Zod schema defaults; custom transforms/refinements and arbitrary schema code cannot run in the shared runtime. `requiredFor` names existing tools whose invocation needs the value; unresolved settings must leave only dependent capabilities unavailable. Publisher compilation does not require a future buyer’s values. Application code enforces business rules server-side; exposing a control or placing the rule in a prompt is insufficient.
418
+
419
+ For an installed application, use the same `noodle variables list|resolve|set|delete` family with `--installation <id> --org <org> --runtime cloud|other`; do not combine it with app/env/scope flags or secrets. Inspection shows schema metadata, provenance, readiness and revision without saved values. Set inputs are JSON (including quotes for strings), read the current projection and save atomically; `--expected-revision <digest>` pins an explicit prior inspection. Delete resets to the current declared default or unset state. Business-administrator permission is required for mutations, conflicts never retry writes, and mutation output excludes values.
420
+
411
421
  ## Embedded assistant
412
422
 
413
423
  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.
@@ -445,8 +455,13 @@ The managed crawler and managed index are the defaults and need no configuration
445
455
  ## Managed collections
446
456
 
447
457
  Use `managedCollection(name, { title, description, schemaVersion, record })` when an application needs reusable typed intent for business records that Noodle may later hold. Pass it through `server(..., { collections: [...] }, definitions)`. `record` is one bounded, closed Zod object; names use lowercase letters, numbers, and underscores. Keep payment-card, credentials, passport/government identity, health, and biometric fields out of this surface.
458
+ Native record controls are independent: `management: { assignment: true }`, `{ notes: true }`, both, or neither. Status is an ordinary application field such as `progress: z.enum(["received", "reviewing", "handled"]).default("received")`; no framework transition graph exists. Declare `publicFields` explicitly (default empty), `editableFields` for authorized staff (default all schema properties), optional field labels/help, `summaryFields`, `filterFields` and `sortFields`. References must name actual fields and filters/sorts select scalars. Public callers cannot set staff-only fields; a required private field needs a valid creation default. Staff updates merge only admitted fields and revalidate the complete record. See the notes-only `acme-bistro` collection.
459
+ Operator record queries use `noodle solutions records list --filters '[{"field":"progress","value":"received"}]' --sort-field progress`. Only declared scalar equality/sort fields apply. Payload queries scan at most 10,000 candidates; narrow `--created-at-from`/`--created-at-to` if the API returns `query_limit_exceeded`. Ordinary listing/export has no such scan cap. Cursor reuse requires unchanged query/schema and anchor revision. An administrator can explicitly migrate an eligible historical request with `records migrate-schema ... --expected-revision N`; never implement read-time rewrites.
460
+
461
+ Omitting `source` makes Noodle authoritative for the collection. To project a read-only collection from an outside system, bind an HTTP connector in `server(..., { use: [...] })` and add `source: { connector: connector.ref(), scan: "scan_operation" }`. The compiler requires the exact normalized scan contract and the same record schema. Noodle ingests a one-way replica; create, update, and delete in the outside system remain ordinary application tools with their own confirmation and policy.
448
462
 
449
- This declaration compiles schema metadata only. It does not create a submit tool, grant access, select retention or residency, provision storage, or make records available to MCP or the embedded assistant. Operators bind lifecycle and authority separately. Until the service intake path is shipped, keep live business operations on their existing connector tools.
463
+ For an explicitly authored native operation, bind `use: { records: noodlePlatform.records.v1 }` and call `connectors.records.submitRecord({ collection: "guest_requests", payload: input })` from an ordinary confirmed tool. Submission accepts only public fields and returns a receipt. `createRecord`, `getRecord`, `listRecords`, `updateRecord`, and `deleteRecord` require a verified platform caller with a live business grant; updates/deletes require the current revision. `updateRecord({ collection, id, expectedRevision, patch, unset: ["optional_field"] })` removes named optional editable fields; omitted keys stay unchanged, `null` is data, and overlap with `patch`, required fields or undeclared fields is rejected. Runtime identity supplies write idempotency and admission; never accept those controls as model arguments. An uninstalled collection is unavailable, including during local tool execution.
464
+ A collection declaration does not create a submit tool, grant access, select retention or residency, provision storage, or expose records to MCP or an embedded assistant. Operators activate the definition and configure lifecycle, access, and any external binding. A connector does not become a collection unless the app explicitly supplies the source contract, and an external collection never becomes a writable mirror.
450
465
 
451
466
  ## Boundaries
452
467
 
@@ -1,55 +1,22 @@
1
- # Acme Bistro — end-to-end ordering with payment-only handoff
1
+ # Acme Bistro — ordering with payment handoff
2
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 view-backed `tool` menu/cart with app-only `tool` cart helpers and a model-visible
7
- `create_checkout` tool backed by `handoff.allowedDomains`.
3
+ Fictional [`menu/cart`](src/server.ts) with off-app payment: card data stays outside the app.
8
4
 
9
- It also declares a reusable `guest_requests` managed-collection schema. In this foundation slice the
10
- declaration compiles schema intent only: storage lifecycle, access, and a public submit route are bound by
11
- the hosting service separately, and no submit tool is generated.
5
+ `GUEST_EXPERIENCE` settings use `guestExperience.field('notice')` to select a typed business value; native `guest_requests` demonstrate status, field exposure and notes. `submit_guest_request` requires an authorized installation and returns a receipt
6
+ for staff review. The installed skill's `references/authoring-workflow.md` owns setup and source contracts.
7
+ External collections declare a bounded connector scan; provider changes remain ordinary tools.
12
8
 
13
- Capability slot: **end-to-end in-chat transaction + payment-only handoff**, plus a worked **design-first**
14
- deliverable set (`design/` a UX Document, a single-file HTML wireframe with an embedded OpenAI Apps SDK
15
- compliance audit, and a Recommended API contract). It sets the quality bar the `noodle-seed` skill's
16
- `references/experience-design.md` and `references/app-directory-compliance.md` teach. (Distinct from
17
- `food-ordering`, which is the broad widget-composition proof; this one owns the design-first end-to-end +
18
- compliance exemplar.)
9
+ Staff can clear optional `guestReference` in Portal or an authored
10
+ `connectors.records.updateRecord({ collection: 'guest_requests', id, expectedRevision, patch: {}, unset: ['guestReference'] })`.
11
+ Required fields cannot be removed; `null` is a value, not deletion.
19
12
 
20
- ## Design deliverables (the standard to match)
13
+ ## Design deliverables
21
14
 
22
- - [`design/UX-Document.md`](design/UX-Document.md) — the house-style UX Document.
23
- - [`design/wireframe.html`](design/wireframe.html) — the single-file wireframe (open in a browser) with the
24
- embedded OpenAI Apps SDK compliance audit.
25
- - [`design/api-contract.md`](design/api-contract.md) — the Recommended API shapes for the partner's kitchen/
26
- ordering backend.
15
+ - [UX Document](design/UX-Document.md)
16
+ - [Browser wireframe and compliance audit](design/wireframe.html)
17
+ - [Partner API contract](design/api-contract.md)
27
18
 
28
- ## Local author loop
19
+ ## Run
29
20
 
30
- ```sh
31
- noodle validate
32
- noodle test
33
- noodle dev
34
- ```
35
-
36
- In another terminal:
37
-
38
- ```sh
39
- noodle tools list
40
- noodle tools call show_menu --args '{"customer":"Asha"}'
41
- noodle tools call create_checkout --args '{"customer":"Asha","cartToken":"cart_1","total":36}'
42
- noodle check --target chatgpt
43
- ```
44
-
45
- ## Deploy
46
-
47
- ```sh
48
- noodle link --org demo --app acme-bistro
49
- noodle deploy --access owner-only
50
- noodle open
51
- ```
52
-
53
- This example has no connector secrets and does not include tokens, caller-key mechanisms, or
54
- `.env.noodle` values. The menu, prices, and URLs are fictional; payment is handled off-app on
55
- `acme.example`, never in chat.
21
+ Use `noodle validate`, `noodle test`, and `noodle dev` for the local menu/cart.
22
+ Native submission requires installed storage, grants and public intake.
@@ -1,15 +1,14 @@
1
- import { annotations, managedCollection, server, tool, z } from '@noodleseed/one';
1
+ import {
2
+ annotations,
3
+ managedCollection,
4
+ noodlePlatform,
5
+ server,
6
+ tool,
7
+ variable,
8
+ z,
9
+ } from '@noodleseed/one';
2
10
 
3
- // Acme Bistro is a fictional restaurant. This app is deliberately END-TO-END: the customer browses the
4
- // menu and builds the order in chat, and the order completes in chat — only *payment* hands off, via a
5
- // checkout deep link (the card never touches the app). It is the flagship for the end-to-end pattern.
6
- //
7
- // Authoring notes:
8
- // - A tool `fulfil` is *recorded*, not run as live JS. Inline inputs directly as `${input.x}` into
9
- // output strings; do not transform them (no arithmetic/encode/filter) or substitution breaks. The
10
- // cart total is summed in the widget (live React), not in a `fulfil`. The menu below is static data.
11
- // - Tool inputs stay business-facing. `__noodleIntent` is reserved for Noodle's optional serve-time
12
- // analytics adapter and is removed before `fulfil`, so applications never declare or handle it.
11
+ // Fictional ordering app. Payment uses a checkout link; native guest requests require installation.
13
12
 
14
13
  const menu = [
15
14
  { id: 'stone_pizza', name: 'Stone-baked Margherita', price: 14, kind: 'Mains' },
@@ -21,6 +20,14 @@ const menu = [
21
20
 
22
21
  const itemId = z.enum(['stone_pizza', 'roast_bowl', 'house_salad', 'lemon_tart', 'sparkling']);
23
22
 
23
+ // Operators configure the notice without redeploying.
24
+ const guestExperience = variable('GUEST_EXPERIENCE', {
25
+ schema: z.object({ notice: z.string().max(500) }),
26
+ default: { notice: 'Ask us about dietary requirements before placing your order.' },
27
+ portal: { label: 'Guest experience', group: 'Guest experience' },
28
+ requiredFor: ['show_menu'],
29
+ });
30
+
24
31
  const menuItemOutput = z.object({
25
32
  id: z.string(),
26
33
  name: z.string(),
@@ -28,15 +35,28 @@ const menuItemOutput = z.object({
28
35
  kind: z.string(),
29
36
  });
30
37
 
38
+ const guestRequestRecord = z.object({
39
+ locationReference: z.string().min(1).max(120),
40
+ requestType: z.enum(['reservation_help', 'accessibility', 'dietary_question', 'other']),
41
+ summary: z.string().min(1).max(1000),
42
+ guestReference: z.string().max(120).optional(),
43
+ progress: z.enum(['received', 'reviewing', 'handled']).default('received'),
44
+ });
45
+
31
46
  const guestRequests = managedCollection('guest_requests', {
32
47
  title: 'Guest requests',
33
48
  description: 'Guest service requests that restaurant staff can review and resolve.',
34
49
  schemaVersion: 1,
35
- record: z.object({
36
- locationReference: z.string().min(1).max(120),
37
- requestType: z.enum(['reservation_help', 'accessibility', 'dietary_question', 'other']),
38
- summary: z.string().min(1).max(1000),
39
- }),
50
+ // No source is declared, so Noodle is authoritative. Outside-owned records would name an exact
51
+ // connector scan contract here; changes in that outside system would remain ordinary tools.
52
+ record: guestRequestRecord,
53
+ management: { notes: true },
54
+ publicFields: ['locationReference', 'requestType', 'summary'],
55
+ editableFields: ['locationReference', 'requestType', 'summary', 'guestReference', 'progress'],
56
+ fields: { progress: { label: 'Progress' }, summary: { label: 'Guest request' } },
57
+ summaryFields: ['requestType', 'summary', 'progress'],
58
+ filterFields: ['progress'],
59
+ sortFields: ['progress'],
40
60
  });
41
61
 
42
62
  // Tool annotations for host planners: the menu read is read-only; cart edits are local writes; checkout
@@ -65,8 +85,28 @@ export default server(
65
85
  },
66
86
  // Reusable business-record intent. Storage, lifecycle, access, and public intake bind separately.
67
87
  collections: [guestRequests],
88
+ use: { records: noodlePlatform.records.v1 },
89
+ variables: [guestExperience],
68
90
  },
69
91
  [
92
+ tool('submit_guest_request', {
93
+ title: 'Submit a guest request',
94
+ description: 'Record a guest request for staff review; this does not confirm a reservation.',
95
+ annotations: annotations.localAction({ destructive: false, confirm: true }),
96
+ input: guestRequestRecord.pick({ locationReference: true, requestType: true, summary: true }),
97
+ output: z.object({ recordId: z.string() }),
98
+ fulfil: ({ input, connectors }) => {
99
+ const receipt = connectors.records.submitRecord({
100
+ collection: 'guest_requests',
101
+ payload: {
102
+ locationReference: input.locationReference,
103
+ requestType: input.requestType,
104
+ summary: input.summary,
105
+ },
106
+ });
107
+ return { recordId: receipt.recordId };
108
+ },
109
+ }),
70
110
  tool('show_menu', {
71
111
  title: 'Show the menu',
72
112
  description: 'Show the Acme Bistro menu and render the ordering widget.',
@@ -75,6 +115,7 @@ export default server(
75
115
  output: z.object({
76
116
  status: z.string(),
77
117
  customer: z.string(),
118
+ serviceNotice: z.string().max(500),
78
119
  // Bounded list: the menu is a fixed catalog, so the ceiling is declared on the shape rather
79
120
  // than taken as a pagination input. `noodle check` reports `tool_design_output_bounds`.
80
121
  items: z.array(menuItemOutput).max(50),
@@ -82,6 +123,7 @@ export default server(
82
123
  fulfil: ({ input }) => ({
83
124
  status: `Acme Bistro menu is ready for ${input.customer}. Build the order here; pay at checkout.`,
84
125
  customer: input.customer,
126
+ serviceNotice: guestExperience.field('notice'),
85
127
  items: menu,
86
128
  }),
87
129
  viewTitle: 'Order at Acme Bistro',