@noodleseed/agent-kit 0.90.0 → 0.92.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.
- package/manifest.json +707 -275
- package/package.json +1 -1
- package/skills/claude-code/SKILL.md +1 -1
- package/skills/claude-code/authoring-mcp-servers/SKILL.md +4 -4
- package/skills/claude-code/authoring-mcp-servers/references/authoring-workflow.md +451 -0
- package/skills/claude-code/authoring-mcp-servers/references/build-an-mcp-server.md +56 -0
- package/skills/claude-code/authoring-mcp-servers/references/sdk-surface.md +258 -0
- package/skills/claude-code/building-mcp-apps/SKILL.md +4 -4
- package/skills/claude-code/building-mcp-apps/references/build-an-mcp-app.md +53 -0
- package/skills/claude-code/building-mcp-apps/references/experience-design.md +155 -0
- package/skills/claude-code/building-mcp-apps/references/widgets-and-apps.md +277 -0
- package/skills/claude-code/connecting-apis-to-mcp/SKILL.md +3 -3
- package/skills/claude-code/connecting-apis-to-mcp/references/authoring-workflow.md +451 -0
- package/skills/claude-code/connecting-apis-to-mcp/references/connect-an-api.md +245 -0
- package/skills/claude-code/creating-product-agent-guides/SKILL.md +2 -2
- package/skills/claude-code/creating-product-agent-guides/references/product-agent-guides.md +55 -0
- package/skills/claude-code/debugging-mcp-delivery/SKILL.md +4 -4
- package/skills/claude-code/debugging-mcp-delivery/references/inspect-hosted.md +26 -0
- package/skills/claude-code/debugging-mcp-delivery/references/troubleshooting.md +39 -0
- package/skills/claude-code/debugging-mcp-delivery/references/verify-and-recover.md +67 -0
- package/skills/claude-code/deploying-mcp-services/SKILL.md +3 -3
- package/skills/claude-code/deploying-mcp-services/references/cli-commands.md +106 -0
- package/skills/claude-code/deploying-mcp-services/references/deploy-and-ops.md +25 -0
- package/skills/claude-code/designing-mcp-products/SKILL.md +3 -3
- package/skills/claude-code/designing-mcp-products/references/authoring-workflow.md +451 -0
- package/skills/claude-code/designing-mcp-products/references/experience-design.md +155 -0
- package/skills/claude-code/embedding-mcp-assistants/SKILL.md +11 -10
- package/skills/claude-code/embedding-mcp-assistants/references/authoring-workflow.md +451 -0
- package/skills/claude-code/embedding-mcp-assistants/references/embedded-assistant.md +876 -0
- package/skills/claude-code/examples/acme-discovery/README.md +7 -5
- package/skills/claude-code/examples/customer-auth/README.md +200 -52
- package/skills/claude-code/examples/customer-auth/src/server.ts +3 -0
- package/skills/claude-code/examples/customer-auth/test/server.test.ts +6 -0
- package/skills/claude-code/examples/customer-auth/vitest.config.ts +6 -0
- package/skills/claude-code/examples/food-ordering/README.md +1 -1
- package/skills/claude-code/examples/food-ordering/src/server.ts +1 -0
- package/skills/claude-code/executing-noodle-plans/SKILL.md +1 -1
- package/skills/claude-code/publishing-mcp-integrations/SKILL.md +3 -3
- package/skills/claude-code/publishing-mcp-integrations/references/app-directory-compliance.md +59 -0
- package/skills/claude-code/publishing-mcp-integrations/references/publishing.md +63 -0
- package/skills/claude-code/references/authoring-workflow.md +8 -0
- package/skills/claude-code/references/embedded-assistant.md +259 -67
- package/skills/claude-code/references/sdk-surface.md +1 -1
- package/skills/claude-code/reporting-noodle-feedback/SKILL.md +2 -2
- package/skills/claude-code/reporting-noodle-feedback/references/feedback.md +80 -0
- package/skills/claude-code/verifying-mcp-delivery/SKILL.md +3 -3
- package/skills/claude-code/verifying-mcp-delivery/references/test-in-hosts.md +39 -0
- package/skills/claude-code/verifying-mcp-delivery/references/verify-and-recover.md +67 -0
- package/skills/claude-code/wrapping-existing-applications/SKILL.md +4 -4
- package/skills/claude-code/wrapping-existing-applications/references/authoring-workflow.md +451 -0
- package/skills/claude-code/wrapping-existing-applications/references/tool-design.md +107 -0
- package/skills/claude-code/wrapping-existing-applications/references/wrap-existing-app.md +65 -0
- package/skills/codex/SKILL.md +1 -1
- package/skills/codex/authoring-mcp-servers/SKILL.md +4 -4
- package/skills/codex/authoring-mcp-servers/references/authoring-workflow.md +451 -0
- package/skills/codex/authoring-mcp-servers/references/build-an-mcp-server.md +56 -0
- package/skills/codex/authoring-mcp-servers/references/sdk-surface.md +258 -0
- package/skills/codex/building-mcp-apps/SKILL.md +4 -4
- package/skills/codex/building-mcp-apps/references/build-an-mcp-app.md +53 -0
- package/skills/codex/building-mcp-apps/references/experience-design.md +155 -0
- package/skills/codex/building-mcp-apps/references/widgets-and-apps.md +277 -0
- package/skills/codex/connecting-apis-to-mcp/SKILL.md +3 -3
- package/skills/codex/connecting-apis-to-mcp/references/authoring-workflow.md +451 -0
- package/skills/codex/connecting-apis-to-mcp/references/connect-an-api.md +245 -0
- package/skills/codex/creating-product-agent-guides/SKILL.md +2 -2
- package/skills/codex/creating-product-agent-guides/references/product-agent-guides.md +55 -0
- package/skills/codex/debugging-mcp-delivery/SKILL.md +4 -4
- package/skills/codex/debugging-mcp-delivery/references/inspect-hosted.md +26 -0
- package/skills/codex/debugging-mcp-delivery/references/troubleshooting.md +39 -0
- package/skills/codex/debugging-mcp-delivery/references/verify-and-recover.md +67 -0
- package/skills/codex/deploying-mcp-services/SKILL.md +3 -3
- package/skills/codex/deploying-mcp-services/references/cli-commands.md +106 -0
- package/skills/codex/deploying-mcp-services/references/deploy-and-ops.md +25 -0
- package/skills/codex/designing-mcp-products/SKILL.md +3 -3
- package/skills/codex/designing-mcp-products/references/authoring-workflow.md +451 -0
- package/skills/codex/designing-mcp-products/references/experience-design.md +155 -0
- package/skills/codex/embedding-mcp-assistants/SKILL.md +11 -10
- package/skills/codex/embedding-mcp-assistants/references/authoring-workflow.md +451 -0
- package/skills/codex/embedding-mcp-assistants/references/embedded-assistant.md +876 -0
- package/skills/codex/examples/acme-discovery/README.md +7 -5
- package/skills/codex/examples/customer-auth/README.md +200 -52
- package/skills/codex/examples/customer-auth/src/server.ts +3 -0
- package/skills/codex/examples/customer-auth/test/server.test.ts +6 -0
- package/skills/codex/examples/customer-auth/vitest.config.ts +6 -0
- package/skills/codex/examples/food-ordering/README.md +1 -1
- package/skills/codex/examples/food-ordering/src/server.ts +1 -0
- package/skills/codex/executing-noodle-plans/SKILL.md +1 -1
- package/skills/codex/publishing-mcp-integrations/SKILL.md +3 -3
- package/skills/codex/publishing-mcp-integrations/references/app-directory-compliance.md +59 -0
- package/skills/codex/publishing-mcp-integrations/references/publishing.md +63 -0
- package/skills/codex/references/authoring-workflow.md +8 -0
- package/skills/codex/references/embedded-assistant.md +259 -67
- package/skills/codex/references/sdk-surface.md +1 -1
- package/skills/codex/reporting-noodle-feedback/SKILL.md +2 -2
- package/skills/codex/reporting-noodle-feedback/references/feedback.md +80 -0
- package/skills/codex/verifying-mcp-delivery/SKILL.md +3 -3
- package/skills/codex/verifying-mcp-delivery/references/test-in-hosts.md +39 -0
- package/skills/codex/verifying-mcp-delivery/references/verify-and-recover.md +67 -0
- package/skills/codex/wrapping-existing-applications/SKILL.md +4 -4
- package/skills/codex/wrapping-existing-applications/references/authoring-workflow.md +451 -0
- package/skills/codex/wrapping-existing-applications/references/tool-design.md +107 -0
- package/skills/codex/wrapping-existing-applications/references/wrap-existing-app.md +65 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
# Outcome
|
|
2
|
+
|
|
3
|
+
Connect a real API to a focused MCP product using managed credentials, mappings derived from observed responses, and representative live-read evidence. A connector that merely compiles is not complete.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- Use when
|
|
8
|
+
- Do not use when
|
|
9
|
+
- Required inputs
|
|
10
|
+
- Workflow
|
|
11
|
+
- Secure the key first
|
|
12
|
+
- Probe the live API
|
|
13
|
+
- Model the connector from the observed shape
|
|
14
|
+
- Import and curate an upstream MCP server
|
|
15
|
+
- Return a list
|
|
16
|
+
- Create, update, delete
|
|
17
|
+
- Design intent tools
|
|
18
|
+
- Set the secret for local runs
|
|
19
|
+
- Prove real output
|
|
20
|
+
- Verification evidence
|
|
21
|
+
- Recovery paths
|
|
22
|
+
- Stop conditions
|
|
23
|
+
|
|
24
|
+
## Use when
|
|
25
|
+
|
|
26
|
+
- The user provides credentials, a reachable API, an OpenAPI document, or an upstream MCP endpoint and wants real MCP behavior backed by it.
|
|
27
|
+
- Existing connector behavior compiles but still needs proof against the actual service and data shape.
|
|
28
|
+
|
|
29
|
+
## Do not use when
|
|
30
|
+
|
|
31
|
+
- The task is a local/static MCP capability with no external data source.
|
|
32
|
+
- The user only wants a widget, deployment, publication, or diagnosis unrelated to API behavior; select that route.
|
|
33
|
+
- Required credentials or authority are unavailable. Do not bypass authentication or substitute fabricated payloads for live evidence.
|
|
34
|
+
|
|
35
|
+
## Required inputs
|
|
36
|
+
|
|
37
|
+
Identify the API base URL, authentication scheme, one representative safe read, the user intent it serves, and either an OpenAPI document or one sanitized example response. For writes, also establish the effect, a safe test target, and explicit user approval before any live write.
|
|
38
|
+
|
|
39
|
+
Do not guess or invent a field, schema, endpoint, pagination contract, or authentication behavior. Documentation is a hypothesis until a representative live read confirms the response actually returned.
|
|
40
|
+
|
|
41
|
+
## Workflow
|
|
42
|
+
|
|
43
|
+
### Secure the key first
|
|
44
|
+
|
|
45
|
+
Never inline or log the key. Have the user put it in an environment variable, then store it as a
|
|
46
|
+
managed secret and reference it only as `secret(...)`:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
export SOME_API_KEY=… # the user sets this; it never appears in a file or prompt
|
|
50
|
+
noodle secrets set SOME_API_KEY --runtime local --from-env SOME_API_KEY # same effective target as local dev/test/devtools
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
In `server.ts` the key is only ever `secret("SOME_API_KEY")` — keep the raw value out of code, tests,
|
|
54
|
+
prompts, logs, and generated files.
|
|
55
|
+
|
|
56
|
+
### Probe the live API
|
|
57
|
+
|
|
58
|
+
Learn the actual response shape empirically. Two ways — capture one real example response per endpoint
|
|
59
|
+
you will use, and read its field names, nesting, array shapes, pagination, and id-vs-label fields:
|
|
60
|
+
|
|
61
|
+
- **With your own HTTP/shell tool** — call a representative read endpoint using the key **from the env
|
|
62
|
+
var**, never the literal (so it stays out of logs): `curl -H "Authorization: Bearer $SOME_API_KEY"
|
|
63
|
+
https://api.example.com/things`. Inspect the returned JSON.
|
|
64
|
+
- **Noodle-native** — author a minimal read operation that maps the whole body (`response: { raw:
|
|
65
|
+
'${response}' }`), `noodle secrets set` the key, then `noodle tools call` it to see the real payload
|
|
66
|
+
in-process.
|
|
67
|
+
|
|
68
|
+
### Model the connector from the observed shape
|
|
69
|
+
|
|
70
|
+
Encode the API as an HTTP connector, mapping only the fields you actually saw into a small typed
|
|
71
|
+
`output`:
|
|
72
|
+
|
|
73
|
+
- `connector("id").version("1.0.0").http({ baseUrl, allowedOrigins, auth, operations })`.
|
|
74
|
+
- `auth: { kind: 'bearer', secret: secret('SOME_API_KEY') }` — or `{ kind: 'apiKey', header: 'X-API-Key',
|
|
75
|
+
secret: secret('SOME_API_KEY') }`. Never put the credential in operation `headers`.
|
|
76
|
+
- Per operation: `method`, `path` (with `{id}` templates), `query: ["arg"]` for URL params, `input`,
|
|
77
|
+
`output`, and a `response` mapping whose `${response.path}` matches the real JSON — the parsed body is
|
|
78
|
+
bound directly to `${response}` (no `.body` envelope); use bracket indices for arrays
|
|
79
|
+
(`${response.results[0].id}`).
|
|
80
|
+
|
|
81
|
+
The full connector shape, every `auth.kind`, and compute connectors are in
|
|
82
|
+
`references/authoring-workflow.md`.
|
|
83
|
+
|
|
84
|
+
### Import and curate an upstream MCP server
|
|
85
|
+
|
|
86
|
+
Use an explicit import to discover the upstream tool surface once and generate TypeScript:
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
noodle import mcp https://store.example/api/mcp --name store --output store-app
|
|
90
|
+
# When import discovery needs a credential, read it only from the environment:
|
|
91
|
+
noodle import mcp https://store.example/api/mcp --name store \
|
|
92
|
+
--header-env Authorization=STORE_MCP_TOKEN
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The importer freezes upstream tool names and normalized schemas into `.mcp({ operations })`; it never
|
|
96
|
+
persists the import credential. Runtime calls only those declared operations and never runs `tools/list`.
|
|
97
|
+
MCP annotations are untrusted hints, so every generated tool starts as a destructive confirmed action.
|
|
98
|
+
Verify real behavior and deliberately narrow proven reads before accepting the generated source. Use
|
|
99
|
+
`noodle import mcp <url> --output <dir> --check` in CI to detect upstream additions, removals, or schema
|
|
100
|
+
changes without mutating source; its review labels drift additive, breaking, or metadata-only.
|
|
101
|
+
|
|
102
|
+
Treat the imported connector operation as a backing-system contract, not the public tool design. Publish
|
|
103
|
+
ordinary intent-shaped `tool(...)` capabilities with stable names and narrower schemas, normalize text or
|
|
104
|
+
large upstream output through compute, and attach a normal Noodle React `view` when UI helps. Upstream
|
|
105
|
+
`_meta`, resources, prompts, annotations, widgets, and CSP are never forwarded. A Noodle-owned widget may
|
|
106
|
+
therefore enrich a headless upstream tool without trusting upstream executable UI.
|
|
107
|
+
|
|
108
|
+
Managed endpoints require an exact managed origin allowlist. Configure each deployment with
|
|
109
|
+
`variable(...)` and `secret(...)`; inbound MCP/OAuth bearer tokens are never reusable upstream credentials.
|
|
110
|
+
The first release supports no auth, bearer, API key, and client credentials through the broker. Do not
|
|
111
|
+
invent a delegated-user OAuth shortcut for an upstream MCP server.
|
|
112
|
+
|
|
113
|
+
### Return a list
|
|
114
|
+
|
|
115
|
+
Most real tools return a variable-length list (search results, a user’s tasks). Bind the **whole array** — a single `${response.path}` returns the referenced value verbatim, arrays included:
|
|
116
|
+
|
|
117
|
+
```ts
|
|
118
|
+
// The API returns { results: [ { id, name, country, … }, … ] }
|
|
119
|
+
output: z.object({ places: z.array(z.unknown()) }),
|
|
120
|
+
response: { places: '${response.results}' },
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Three things that are easy to get subtly wrong:
|
|
124
|
+
|
|
125
|
+
- **A response mapping cannot iterate.** There is no per-item / `map` / `item` construct, so you cannot reshape `[{…30 fields}]` into `[{ id, label }]` inside a `response:` block — bind the whole array.
|
|
126
|
+
- **A tool's Zod `output` does not strip at runtime.** It only advertises the JSON Schema; the runtime returns your `fulfil` output verbatim, so `z.array(z.object({ id, label }))` will NOT drop extra element fields.
|
|
127
|
+
- **So narrow in a compute connector.** To reshape each element, synthesize a `label`, or normalize a missing array to `[]`, pass the whole array to a `.compute(...)` op whose `run` maps it (a connector is HTTP **or** compute, not both — use a second connector). To only *drop* known fields without reshaping, `projection: { hiddenFields: [...] }` deletes them from each element. Worked example: `examples/weather` — `search_list` binds the array, then `geo_places.narrow` reshapes to `{ id, label }` and normalizes no-results to `[]`; `examples/sharepoint-lists` shows the same pattern against a real API.
|
|
128
|
+
|
|
129
|
+
For a **paginated** API, collect across pages with a `pagination` config; the collected list is then `${response.items}`:
|
|
130
|
+
|
|
131
|
+
```ts
|
|
132
|
+
pagination: {
|
|
133
|
+
kind: 'cursor', // or 'pageNumber'
|
|
134
|
+
items: '${response.results}', // the array on ONE page
|
|
135
|
+
nextCursor: '${response.next_cursor}', // 'pageNumber' uses hasMore + pageParam instead
|
|
136
|
+
cursorParam: 'cursor',
|
|
137
|
+
maxPages: 5, maxItems: 100,
|
|
138
|
+
},
|
|
139
|
+
// items / nextCursor / hasMore run over ONE raw page; your response mapping runs over the
|
|
140
|
+
// collected aggregate, so the full list is:
|
|
141
|
+
response: { tasks: '${response.items}' },
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Bound exceptional response sizes
|
|
145
|
+
|
|
146
|
+
HTTP operations default to a 1 MiB decoded-response limit. Narrow the upstream query, paginate, or
|
|
147
|
+
reduce the requested dataset before raising it; a `response` mapping runs only after the raw body is
|
|
148
|
+
buffered. When representative evidence proves one operation legitimately needs more, grant only that
|
|
149
|
+
operation the required bytes, up to the 6 MiB authoring maximum:
|
|
150
|
+
|
|
151
|
+
```ts
|
|
152
|
+
search: {
|
|
153
|
+
type: 'read', method: 'GET', path: '/search',
|
|
154
|
+
limits: { maxResponseBytes: 6 * 1024 * 1024 },
|
|
155
|
+
// input / output / response omitted
|
|
156
|
+
},
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The inclusive limit counts decoded streamed bytes. `response_too_large` is a safe structured reason;
|
|
160
|
+
never copy a response body, header, URL, credential, or upstream error prose into user-visible output.
|
|
161
|
+
|
|
162
|
+
### Create, update, delete
|
|
163
|
+
|
|
164
|
+
Pair the read/list with the mutations your intent tools need:
|
|
165
|
+
- **Create / update** — `method: 'POST'` / `'PATCH'`; author the body as `request: { field: '${input.x}' }` (do not nest it under `body`). It is JSON by default; use `requestEncoding: 'form-urlencoded'` only when the API requires a URLSearchParams body. URL query params remain the operation-level `query: [...]` array.
|
|
166
|
+
- **Delete / close** — many endpoints return `204 No Content`. Set `responseType: 'empty'`, which enforces the status and binds `{}` (there is no body to map).
|
|
167
|
+
|
|
168
|
+
```ts
|
|
169
|
+
search_quotes: {
|
|
170
|
+
type: 'read', method: 'POST', path: '/quotes/search',
|
|
171
|
+
requestEncoding: 'form-urlencoded',
|
|
172
|
+
request: {
|
|
173
|
+
'from airport id': '${args.fromAirportId}',
|
|
174
|
+
'aircraft[categories]': '${args.categories}', // arrays become one JSON field
|
|
175
|
+
},
|
|
176
|
+
// input / output / response omitted
|
|
177
|
+
},
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
`form-urlencoded` accepts a request object, not a pre-encoded string. Noodle preserves field order,
|
|
181
|
+
omits `undefined`, stringifies primitive values, JSON-stringifies arrays/nested objects into one
|
|
182
|
+
field each, and owns the exact `application/x-www-form-urlencoded;charset=UTF-8` content type.
|
|
183
|
+
|
|
184
|
+
```ts
|
|
185
|
+
close_task: {
|
|
186
|
+
type: 'action', method: 'POST', path: '/tasks/{id}/close',
|
|
187
|
+
input: z.object({ id: z.string() }),
|
|
188
|
+
responseType: 'empty',
|
|
189
|
+
},
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Design intent tools
|
|
193
|
+
|
|
194
|
+
Create intent-shaped tools around what the user says, not 1:1 around endpoints. Pair an id-taking action with a
|
|
195
|
+
find/search operation that returns `{ id, label }` summaries so the model resolves text → id itself,
|
|
196
|
+
and map each response to a few labelled fields the model can speak from. See the "Design tools for the
|
|
197
|
+
model" section of `references/authoring-workflow.md`.
|
|
198
|
+
|
|
199
|
+
### Set the secret for local runs
|
|
200
|
+
|
|
201
|
+
Local `dev`, smoke commands, secrets, and variables resolve one effective target: explicit flags, then the project link, then the saved CLI target, then local defaults. Set the secret through that same target:
|
|
202
|
+
|
|
203
|
+
```sh
|
|
204
|
+
# Canonical: writes to the effective local environment used by dev/test/devtools:
|
|
205
|
+
noodle secrets set SOME_API_KEY --runtime local --from-env SOME_API_KEY
|
|
206
|
+
# Explicit flags remain available when intentionally testing a different local target:
|
|
207
|
+
noodle secrets set SOME_API_KEY --runtime local --scope env --org <org> --app <app> --env <env> --from-env SOME_API_KEY
|
|
208
|
+
# Configuring a deployed environment is a different store — say so:
|
|
209
|
+
noodle secrets set SOME_API_KEY --runtime cloud --scope env --org <org> --app <app> --env <env> --from-env SOME_API_KEY
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
`--runtime` is required whenever `--org`, `--app`, and `--env` together name a complete hosted target: a command that looks remote must never fall back to writing `.env.noodle`. Omitting it fails with `runtime_required` before anything is written.
|
|
213
|
+
|
|
214
|
+
Scoped local values live in `./.env.noodle`; the exact project-root `.env` is a read-only fallback for matching `secret("NAME")` / `variable("NAME")` declarations during local authoring. Never commit or print either file. Local authoring may read them only through this managed resolution path, and an interactive human `noodle deploy` may copy only missing declared `.env` names through its default-No import consent flow; agents and non-interactive runs use the value-free recovery commands instead. A required value that cannot resolve makes local commands stop before exposing an empty endpoint.
|
|
215
|
+
|
|
216
|
+
### Prove real output
|
|
217
|
+
|
|
218
|
+
`noodle validate` / `noodle test` prove a connector tool *compiles and registers* — not that its
|
|
219
|
+
mapping returns data. With the secret set, run a live read: `noodle tools call <read_tool> --args
|
|
220
|
+
'{…}'` executes the connector against the real API in-process. Confirm the mapped fields are populated,
|
|
221
|
+
not `undefined`; if they are empty, distinguish a legitimate empty result from a missing or incorrect mapping, fix `${response…}` paths against the real payload when needed, and re-run.
|
|
222
|
+
Only run a live write after explicit user approval and when a safe test target and expected effect are known.
|
|
223
|
+
|
|
224
|
+
## Verification evidence
|
|
225
|
+
|
|
226
|
+
- **Credential path:** the raw credential remained in an environment variable and the managed `secret(...)` path for the same effective local target.
|
|
227
|
+
- **Observed shape:** a representative safe live read established the real fields, nesting, arrays, pagination, and empty-result behavior used by the mapping.
|
|
228
|
+
- **Local proof:** `noodle validate --json` and `noodle test --json` succeeded, then `noodle tools call` returned populated mapped fields or an intentionally verified empty result.
|
|
229
|
+
- **Writes:** name the approval and safe target used, or report writes as not run.
|
|
230
|
+
- **Hosted boundary:** local proof does not prove hosted credentials, deployment health, or host behavior. Report hosted checks as not run unless a separate requested route exercised them.
|
|
231
|
+
|
|
232
|
+
## Recovery paths
|
|
233
|
+
|
|
234
|
+
- Authentication failure: verify the connector auth kind, managed secret name, and effective local target without printing the credential.
|
|
235
|
+
- Successful HTTP call with `undefined` fields: compare the mapping with one sanitized observed response, correct the path, and rerun the same read.
|
|
236
|
+
- Legitimate empty result: test a second known query or record the empty case as intentional; do not rewrite a correct mapping merely to manufacture data.
|
|
237
|
+
- Response too broad for the model: narrow it with response mapping, projection, or a separate compute connector; do not rely on a Zod output to strip runtime fields.
|
|
238
|
+
- Repeated external failure: stop after bounded attempts and report the sanitized status, endpoint class, evidence already proven, and exact external action needed.
|
|
239
|
+
|
|
240
|
+
## Stop conditions
|
|
241
|
+
|
|
242
|
+
- Stop complete when the representative safe read returns populated mapped fields or an intentionally verified empty result through the same effective local target.
|
|
243
|
+
- Stop before a live write without explicit approval, a known effect, and a safe target.
|
|
244
|
+
- Stop blocked when credentials, a reachable service, a representative input, or a required private schema is unavailable.
|
|
245
|
+
- Do not continue into App design, deployment, or publication unless the user requested that next outcome; route to the corresponding primary playbook instead.
|
|
@@ -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.
|
|
6
|
+
<!-- noodle-skill version:0.92.0 hash:0e06e11254563b6a -->
|
|
7
7
|
|
|
8
8
|
# creating-product-agent-guides
|
|
9
9
|
|
|
@@ -27,7 +27,7 @@ Create or revise one grounded TypeScript product guide, prove it locally, and pr
|
|
|
27
27
|
|
|
28
28
|
## Workflow
|
|
29
29
|
|
|
30
|
-
Read and follow the canonical playbook
|
|
30
|
+
Read and follow the canonical playbook at `references/product-agent-guides.md`. It owns the workflow; do not recreate it here or load the command catalog speculatively.
|
|
31
31
|
|
|
32
32
|
## Verification evidence
|
|
33
33
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Product agent guides
|
|
2
|
+
|
|
3
|
+
An `agentGuide` is the optional, host-neutral, TypeScript-only source for product-level workflow guidance beyond individual MCP capability descriptions. Noodle validates it and generates the App Package product skill; it does not invent the guide’s product judgment.
|
|
4
|
+
|
|
5
|
+
## Required decision
|
|
6
|
+
|
|
7
|
+
Do not wait for the user to name `agentGuide`. During every MCP server or App build, decide whether the product needs one and state the decision and reason in the design or handoff.
|
|
8
|
+
|
|
9
|
+
Author a guide when any of these conditions applies:
|
|
10
|
+
|
|
11
|
+
- A request for an App Package or app product skill requires one. A marketplace plugin or customer-agent distribution also needs this product source in addition to separate listing metadata.
|
|
12
|
+
- Multiple capabilities participate in one user workflow, especially when order or purpose matters.
|
|
13
|
+
- Safe or useful operation depends on product-specific ordering, grounding, clarification, boundaries, or representative examples that capability descriptions cannot express.
|
|
14
|
+
|
|
15
|
+
A product with a single self-explanatory capability may omit the guide when its description, schema, and annotations fully communicate safe use and there is no product-specific workflow or boundary to add. Tool count is a signal, not a rule: one ambiguous or consequential capability can still require a guide, while several independent self-explanatory capabilities may not.
|
|
16
|
+
|
|
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
|
+
|
|
19
|
+
## Scope boundaries
|
|
20
|
+
|
|
21
|
+
Noodle workflow skills teach a coding agent how to build and operate Noodle projects. The generated app product skill is team-local guidance for using one product. A marketplace plugin is a separate host distribution bundle.
|
|
22
|
+
|
|
23
|
+
Host-neutral distribution metadata, available target adapters, local exports, and deployment-bound archives are separate projections from the guide; use the live command catalog for exact target availability, and never claim that an export submitted or published itself. The deployed embedded assistant automatically consumes a compact authorization-aware guide projection. A direct external agent connected to the tenant MCP URL can discover the deployment skill through the modern draft MCP Skills extension when its host supports that extension; this is protocol delivery, not evidence of host support or marketplace installation.
|
|
24
|
+
|
|
25
|
+
## Creation workflow
|
|
26
|
+
|
|
27
|
+
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.
|
|
28
|
+
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.
|
|
29
|
+
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.
|
|
30
|
+
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.
|
|
31
|
+
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`.
|
|
32
|
+
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.
|
|
33
|
+
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.
|
|
34
|
+
|
|
35
|
+
## Authoring shape
|
|
36
|
+
|
|
37
|
+
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.
|
|
38
|
+
|
|
39
|
+
Keep identifiers within 200 characters and prose within 4,000 characters. A guide has at most 32 `useWhen` entries, 32 workflows, 64 steps per workflow, 64 boundaries, and 64 examples. The compiler rejects an App Package whose bounded derived MCP surface would still exceed its artifact ceiling.
|
|
40
|
+
|
|
41
|
+
Use `server.instructions` for concise global behavior that applies to every turn and caller. Put product workflow ordering, triggers, and workflow-specific permission guidance in `agentGuide`; global description, `useWhen`, and boundaries must be safe for every assistant surface. Noodle-owned workflow skills teach how to build and operate Noodle projects; a product guide teaches agents how to use this one deployed product. Compilation validates references and produces an App Package sibling while the RuntimeArtifact deliberately omits guide prose.
|
|
42
|
+
|
|
43
|
+
For a deployed embedded assistant, Noodle automatically derives bounded server-side model guidance from that App Package. Each turn retains only complete workflows supported by the session surface and the exact model-visible tools allowed for the verified roles and scopes. All managed, React, headless, and public-client renderers benefit without a new browser option; raw guide and skill files never enter the browser response. An unavailable or oversize projection is omitted without widening tools or failing the turn.
|
|
44
|
+
|
|
45
|
+
For a direct modern MCP connection, use the deployment tenant MCP URL and its existing OAuth flow; do not install a second skill or create another auth integration. `skills/list`, `skills/get`, and the related `resources/read` files are rebuilt from the same deployment package for the verified caller. Only complete workflows backed by currently authorized, model-visible tools and available resources or prompts survive; app-only helpers and forbidden tools stay out of both the workflow body and MCP-surface reference. The response is private with zero freshness, and each file has a caller-specific SHA-256 digest. A role or scope change can therefore change the next response and its digest, allowing a supporting host to require fresh approval. Legacy MCP clients and modern hosts without Skills support continue to use the ordinary capability surface.
|
|
46
|
+
|
|
47
|
+
## Local lifecycle
|
|
48
|
+
|
|
49
|
+
`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.
|
|
50
|
+
|
|
51
|
+
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.
|
|
52
|
+
|
|
53
|
+
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.
|
|
54
|
+
|
|
55
|
+
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.
|
|
@@ -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.
|
|
6
|
+
<!-- noodle-skill version:0.92.0 hash:8d75ad13f4b3120a -->
|
|
7
7
|
|
|
8
8
|
# debugging-mcp-delivery
|
|
9
9
|
|
|
@@ -27,9 +27,9 @@ Repair or isolate the first failing evidence layer while preserving everything a
|
|
|
27
27
|
|
|
28
28
|
## Workflow
|
|
29
29
|
|
|
30
|
-
Read and follow the canonical playbook
|
|
31
|
-
Load
|
|
32
|
-
Load
|
|
30
|
+
Read and follow the canonical playbook at `references/verify-and-recover.md`. It owns the workflow; do not recreate it here or load the command catalog speculatively.
|
|
31
|
+
Load the supporting reference at `references/troubleshooting.md` only when the playbook or observed evidence names that concern.
|
|
32
|
+
Load the supporting reference at `references/inspect-hosted.md` only when the playbook or observed evidence names that concern.
|
|
33
33
|
|
|
34
34
|
## Verification evidence
|
|
35
35
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Inspect hosted state
|
|
2
|
+
|
|
3
|
+
Read hosted evidence without changing target, credentials, configuration, access, host wiring, revisions, or directory state.
|
|
4
|
+
|
|
5
|
+
## Use when
|
|
6
|
+
|
|
7
|
+
- The user asks for hosted status, deployment metadata, health, logs, events, metrics, audit evidence, or diagnosis.
|
|
8
|
+
- The request is inspect-only, diagnose-only, or asks whether an existing deployment works.
|
|
9
|
+
|
|
10
|
+
## Authority boundary
|
|
11
|
+
|
|
12
|
+
This route is read-only. It never authorizes `login`, `logout`, `link`, `target set`, hosted secret/variable/config/access changes, `deploy`, `rollback`, host configuration writes, or directory submission. If evidence shows one of those actions is needed, report the exact proposed action and target, then stop for a new explicit user request.
|
|
13
|
+
|
|
14
|
+
## Workflow
|
|
15
|
+
|
|
16
|
+
1. Resolve the requested org, app, environment, and deployment from existing non-secret context. Do not change the effective target to make inspection easier.
|
|
17
|
+
2. Choose the narrowest read-only command: `noodle target show`, `noodle status`, `noodle inspect`, `noodle smoke`, `noodle metrics --agent-output`, `noodle events --json`, `noodle logs`, or `noodle audit`.
|
|
18
|
+
3. Prefer machine output when the selected command supports it. Record the target, revision/deployment ID, timestamp, result, and any request ID without exposing secrets or customer payloads.
|
|
19
|
+
4. When the installed Developer MCP is available, call `get_context` to read the signed-in user’s current organizations and roles. Resolve the intended organization from the request or project context, then pass that explicit `org` to every scoped inspection or diagnosis tool. Never infer a remote default, and never ask the user to preselect organizations during OAuth. Treat the connection as live evidence gathering, not mutation authority.
|
|
20
|
+
5. If a command fails, distinguish missing authentication/access from unhealthy application behavior. Do not repair, relink, redeploy, rotate config, or roll back under this route.
|
|
21
|
+
|
|
22
|
+
## Stop conditions
|
|
23
|
+
|
|
24
|
+
- Stop complete when the requested hosted fact is supported by current evidence and higher untested levels are named.
|
|
25
|
+
- Stop blocked when existing access cannot read the target or the requested evidence requires a host/user journey unavailable in scope.
|
|
26
|
+
- Stop for authorization when the next useful action would mutate local targeting, hosted state, host configuration, or directory state.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Troubleshooting in hosts
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- First moves
|
|
6
|
+
- Customer-auth metadata
|
|
7
|
+
- Symptom map
|
|
8
|
+
|
|
9
|
+
## First moves
|
|
10
|
+
|
|
11
|
+
Re-run the local gates before debugging in-host: `noodle validate`, `noodle check` (add `--target chatgpt` for ChatGPT-specific requirements), and `noodle doctor`. Confirm the CLI is current with `noodle update --check` and that the project-local skill is intact with `noodle agents doctor --json` — host metadata requirements evolve and fixes ship in the CLI/agent-kit. Never paste tokens, secrets, or `.env` / `.env.noodle` values into prompts or logs while debugging.
|
|
12
|
+
|
|
13
|
+
For protocol/conformance checks, the headless harness is `@mcpjam/cli`, not a `noodle` subcommand. Use it against a local `noodle dev` URL without an access token, or against hosted URLs through the host/OAuth flow printed by `noodle connect`.
|
|
14
|
+
|
|
15
|
+
## Customer-auth metadata
|
|
16
|
+
|
|
17
|
+
Adding `embeddedAssistant(...)` does not select the MCP access mode or authorization server. Before changing auth, inspect the exact active deployment with `noodle deployments list --org <org> --app <app> --env <env> --json` and match its active deployment ID, server version, and access mode to the endpoint being tested.
|
|
18
|
+
|
|
19
|
+
For `customers` access, Direct or federated customer auth must advertise the configured tenant issuer; a managed Noodle bridge must advertise the Noodle authorization server. Owner-only access advertises the platform authorization server. If a direct or federated `customers` deployment still advertises the platform issuer, treat it as `customer_auth_state_inconsistent` and escalate with the endpoint, active deployment ID, and sanitized protected-resource metadata. Do not proxy, rewrite, rotate, or redeploy to hide the mismatch. Never share bearer tokens, refresh tokens, client secrets, or credential files.
|
|
20
|
+
|
|
21
|
+
## Symptom map
|
|
22
|
+
|
|
23
|
+
| Symptom | Likely cause | Fix |
|
|
24
|
+
| :-- | :-- | :-- |
|
|
25
|
+
| Images, fonts, or styles don’t load inside the widget | The host sandbox silently blocks origins not declared in the widget CSP | Add every asset origin to `csp: { resourceDomains: [...] }` (fetch/XHR origins go in `connectDomains`, embedded iframes in `frameDomains`), then re-run `noodle check --target chatgpt` |
|
|
26
|
+
| ChatGPT warns “Widget CSP is not set” | The widget declares no `csp` | Declare `csp` on the widget with the exact origins it uses |
|
|
27
|
+
| ChatGPT warns “Widget domain is not set” | No `domain` on the widget (required for app-store submission) | Set `domain: "https://…"` (one https origin per app) on each widget |
|
|
28
|
+
| External links do nothing, or show a safe-link warning | Link opened outside the host bridge, or the target origin is not allowlisted | Use `useOpenExternal()` (never `window.open`) and add the target origins to the server-level `handoff.allowedDomains` |
|
|
29
|
+
| Tool succeeds but no widget appears | The tool has no view, or the host surface doesn’t support MCP Apps | Use `tool`, run `noodle check`, preview with `noodle devtools`; on non-Apps surfaces only the text/structured result renders |
|
|
30
|
+
| Widget shows stale or missing data | The widget reads `structuredContent`, which must match the `output` schema | Make `fulfil` return exactly the `output` shape (arrays and nested objects are supported); inspect the live result with `noodle devtools` |
|
|
31
|
+
| `useCallTool` fails from the widget | Tool name mismatch, or the helper tool is model-visible | List names with `noodle tools`; widget-only helpers must be declared with `tool` |
|
|
32
|
+
| `noodle validate` passes but React views fail to bundle (“requires Vite”) | Vite is missing from the app dependencies or its dependencies are not installed — widget bundling uses the app-local Vite | Run `npm install --save-dev vite`, then retry `noodle validate` / `noodle dev` / `noodle deploy` |
|
|
33
|
+
| Hosted endpoint returns 401 to probes | Expected: hosted servers challenge unauthenticated calls with OAuth metadata | Sign in from the host when prompted; widen who may call with `noodle access set` if testers are outside the org |
|
|
34
|
+
| Tools error only after deploy | Runtime/config differences surface hosted (secrets, connector reachability) | Run `noodle smoke`, then `noodle metrics --agent-output` and `noodle events --tool <name> --status tool_error --json`; check `noodle secrets list` scope |
|
|
35
|
+
| A connector tool validates and lists, but returns empty or `undefined` fields | The `response` mapping references a path the API does not return — usually the wrong root (a `.body` segment, when the parsed body is bound directly to `${response}`) or the wrong shape | Run `noodle tools call <name> --args <json>` with the secret set and compare the mapped result to the API’s real JSON; map from `${response.<path>}` (the body is `${response}`, there is no `.body`) and use bracket array indices (`${response.items[0].id}`) |
|
|
36
|
+
| A connector should return a list but returns one item, `undefined`, or the whole raw objects | A `${response.arr[0]…}` mapping picks ONE element; a response mapping cannot reshape array items and a tool’s Zod output does not strip them at runtime | Bind the whole array with `${response.<arr>}`, then narrow each element in a compute connector (`references/connect-an-api.md` → “Return a list”) |
|
|
37
|
+
| `noodle dev` boots but the loopback returns `-32600 "not found"` (or 404) for a valid server | A required `secret(...)` is unresolved — a missing secret fails compile *closed* at boot so nothing is served; the local secret was set at a scope `noodle dev` does not read | Run `noodle secrets set NAME --runtime local --from-env NAME`; local config and dev resolve the same effective target, and every author-loop command stops with the exact target/recovery command before exposing an empty endpoint (`references/connect-an-api.md` → “Set the secret for local runs”) |
|
|
38
|
+
| Need to invoke a tool from the terminal | Local tools run in-process; the `noodle` CLI is not a general MCP client for **deployed** URLs (there is no `call <url>` verb) | Locally, `noodle tools call <name> --args <json>` (also `noodle resources read` / `noodle prompts get`) runs the tool against the in-process runtime — with the secret set it executes the connector against the real API, so use it to prove mapped output. For a **deployed** URL use MCP Inspector or `npx @mcpjam/cli@latest tools call --url <url> ...` |
|
|
39
|
+
| One customer/session reports a bad answer or protocol error | The failure may be a model/tool error, host protocol error, or connector/runtime error | Run `noodle metrics --agent-output`, then `noodle events --tool <name> --status tool_error --json`; copy the `sessionId` into `noodle events --session <id> --json`, then match timestamps with `noodle logs` |
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Outcome
|
|
2
|
+
|
|
3
|
+
Identify the first failing evidence layer, repair only that layer, rerun it, and report the highest level actually proven. A successful lower layer must never be presented as proof of a higher one.
|
|
4
|
+
|
|
5
|
+
## Use when
|
|
6
|
+
|
|
7
|
+
- The user asks to validate, test, diagnose, recover, or establish whether a local or hosted Noodle Seed project works.
|
|
8
|
+
- A command, connector, App, host integration, deployment, or production check is failing or has uncertain evidence.
|
|
9
|
+
|
|
10
|
+
## Do not use when
|
|
11
|
+
|
|
12
|
+
- The primary request is to design or build a new product capability; select its build route and use this playbook only if evidence fails.
|
|
13
|
+
- The user asks for a higher-risk external action rather than diagnosis. This route does not grant deployment, publication, live-write, or merge authority.
|
|
14
|
+
|
|
15
|
+
## Required inputs
|
|
16
|
+
|
|
17
|
+
Capture the requested evidence level, the exact command or user-visible symptom, sanitized machine output, the environment/target, and the last known passing layer. Do not broaden the goal beyond the level the user asked to prove.
|
|
18
|
+
|
|
19
|
+
## Workflow
|
|
20
|
+
|
|
21
|
+
Use this ordered evidence ladder. Start at the last known passing layer or the lowest plausible failure; never jump upward over an unproven dependency:
|
|
22
|
+
|
|
23
|
+
1. **Compile** — the TypeScript build and authoring import surface are valid.
|
|
24
|
+
2. **Validate** — `noodle validate --json` accepts the Noodle contract.
|
|
25
|
+
3. **Local smoke** — `noodle test --json` starts the local runtime. Open apps exercise MCP registration; customer-auth apps must instead pass the anonymous 401 plus exact protected-resource metadata boundary and report `interactiveRequired: true`.
|
|
26
|
+
4. **Customer auth** — when customer auth is declared, run `noodle auth doctor src/server.ts --json` for metadata and JWKS readiness, then run `noodle devtools src/server.ts`, complete sign-in, and make one authenticated `tools/list` request or representative safe read. The doctor does not prove that registration or token issuance succeeds; the authenticated request proves issuer, signature, stable audience, and exact-resource binding together.
|
|
27
|
+
5. **Real API** — a representative safe `noodle tools call` proves connector credentials, transport, observed mapping, and populated data.
|
|
28
|
+
6. **App compliance** — `noodle check --json` and local devtools prove the App contract and intended states.
|
|
29
|
+
7. **Host** — the requested host connects, invokes the expected capability, and renders useful fallback/UI behavior.
|
|
30
|
+
8. **Deploy** — the requested hosted revision and configuration exist and report healthy at the deployment layer.
|
|
31
|
+
9. **Production health** — the live production endpoint and requested user journey are observed on the intended revision.
|
|
32
|
+
|
|
33
|
+
For the first failing layer:
|
|
34
|
+
|
|
35
|
+
1. Read the process exit code or status first. If machine JSON exists, parse it before reading human prose or editing files.
|
|
36
|
+
2. For validation envelopes, inspect every `error.errors[]` item and repair the field at its reported `path`. Use `references/agent-contract.md` for the envelope and `references/compile-errors.md` for the named error code.
|
|
37
|
+
3. Form one evidence-backed cause from the observed output. If the two canonical supports do not cover it, select one matching symptom from the router lookup catalog; do not scan every recovery path.
|
|
38
|
+
4. Make the smallest in-scope repair. Do not freeform re-edit adjacent code, change credentials, redeploy, or add product behavior without evidence and authority.
|
|
39
|
+
5. Rerun only the same evidence layer that failed. Once it passes, continue upward only to the user-requested level.
|
|
40
|
+
6. Stop after two evidence-backed repair attempts with the same failure signature, or immediately when the next action requires new authority or external state.
|
|
41
|
+
|
|
42
|
+
## Verification evidence
|
|
43
|
+
|
|
44
|
+
Report a compact ledger for every exercised layer: command/action, target, result, and the evidence it establishes. Claim only the highest contiguous passing layer.
|
|
45
|
+
|
|
46
|
+
- Compile success does not prove runtime behavior.
|
|
47
|
+
- Validation and local smoke do not prove a real API mapping or credential path.
|
|
48
|
+
- A protected-boundary smoke or passing auth doctor does not prove DCR, token issuance, token audience, or authenticated MCP access.
|
|
49
|
+
- Local evidence does not prove hosted or host behavior.
|
|
50
|
+
- Deployment existence does not prove production health or a user journey.
|
|
51
|
+
- Report every requested but unperformed or blocked higher layer as not run, with the reason.
|
|
52
|
+
|
|
53
|
+
## Recovery paths
|
|
54
|
+
|
|
55
|
+
- Compile/validation: repair the exact import, schema, or reported path, then rerun that command without freeform changes.
|
|
56
|
+
- Local boot/smoke: use the structured startup error to correct the effective target, config, or entrypoint before retrying.
|
|
57
|
+
- Real API: distinguish authentication, reachability, legitimate empty results, and broken response mappings before changing code.
|
|
58
|
+
- App: repair the cited contract or state in `noodle check --json`, then confirm it in devtools before attempting a host.
|
|
59
|
+
- Host/deployment/production: confirm revision, target, identity, and configuration independently; do not infer one from another.
|
|
60
|
+
- Repeated external failure: preserve passing evidence and report the sanitized failure, required authority or external state, owner, and exact next action.
|
|
61
|
+
|
|
62
|
+
## Stop conditions
|
|
63
|
+
|
|
64
|
+
- Stop complete when the user-requested evidence level and every dependency below it pass in the current target.
|
|
65
|
+
- Stop blocked when progress requires credentials, approval, host access, deployment authority, production access, or an external-state change not available in scope.
|
|
66
|
+
- Stop after two evidence-backed repair attempts with the same failure signature at one layer; do not hide repetition behind unrelated edits.
|
|
67
|
+
- Never claim fixed or working without rerunning the failed layer, and never upgrade compile, local, deployment, or stale historical evidence into a stronger claim.
|
|
@@ -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.
|
|
6
|
+
<!-- noodle-skill version:0.92.0 hash:3a1e14ff9b98ddbd -->
|
|
7
7
|
|
|
8
8
|
# deploying-mcp-services
|
|
9
9
|
|
|
@@ -27,8 +27,8 @@ Apply only the explicitly authorized hosted mutation to the explicit org, app, a
|
|
|
27
27
|
|
|
28
28
|
## Workflow
|
|
29
29
|
|
|
30
|
-
Read and follow the canonical playbook
|
|
31
|
-
Load
|
|
30
|
+
Read and follow the canonical playbook at `references/deploy-and-ops.md`. It owns the workflow; do not recreate it here or load the command catalog speculatively.
|
|
31
|
+
Load the supporting reference at `references/cli-commands.md` only when the playbook or observed evidence names that concern.
|
|
32
32
|
|
|
33
33
|
## Verification evidence
|
|
34
34
|
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# noodle CLI commands
|
|
2
|
+
|
|
3
|
+
Developer-facing `noodle` commands, grouped by area. Local authoring commands (`validate`, `test`, `dev`, `tools`, `resources`, `prompts`) need no login or link. Discover the exact command surface for the installed release with `noodle commands --json`.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- Authoring & validation
|
|
8
|
+
- Local run & inspect
|
|
9
|
+
- Hosted deploy & operations
|
|
10
|
+
- Org & members
|
|
11
|
+
- Managed config
|
|
12
|
+
- Governance & observability
|
|
13
|
+
- CLI maintenance
|
|
14
|
+
|
|
15
|
+
## Authoring & validation
|
|
16
|
+
|
|
17
|
+
| Command | What it does |
|
|
18
|
+
| :-- | :-- |
|
|
19
|
+
| `noodle start` | Guided first-run: sign in, scaffold, then deploy or run locally (`--json` for headless). |
|
|
20
|
+
| `noodle init` | Create a local Noodle project. |
|
|
21
|
+
| `noodle setup` | Reconcile project config and local agent files (dry-run unless `--write`). |
|
|
22
|
+
| `noodle doctor` | Check login, service, project, validation, and config. |
|
|
23
|
+
| `noodle agents` | Manage AI agent skills and project context (`setup`/`context`/`doctor`). |
|
|
24
|
+
| `noodle auth` | Use `auth google` for keyless Google workload identity; diagnose downstream credentials without a business-tool call. |
|
|
25
|
+
| `noodle docs` | Export docs in an LLM-readable format. |
|
|
26
|
+
| `noodle connect` | Print connection setup for an agent host (Claude Code, Codex, Cursor, etc.). |
|
|
27
|
+
| `noodle import` | Import an OpenAPI spec into a starter `server.ts`. |
|
|
28
|
+
| `noodle export` | Compile locally and write a portable manifest or target host-plugin archive (no service). |
|
|
29
|
+
| `noodle validate` | Author-time compile/schema/connector check; no service (`--json`, `--fix-prompt`). |
|
|
30
|
+
| `noodle check` | Check tool design (`tool_design_*`) and MCP Apps/widget readiness; no service. `--min-severity warn` shows only what needs fixing. |
|
|
31
|
+
| `noodle test` | Local compile plus a loopback MCP smoke. |
|
|
32
|
+
|
|
33
|
+
## Local run & inspect
|
|
34
|
+
|
|
35
|
+
| Command | What it does |
|
|
36
|
+
| :-- | :-- |
|
|
37
|
+
| `noodle tools` | List local tools via a loopback MCP smoke. |
|
|
38
|
+
| `noodle resources` | List local resources via a loopback MCP smoke. |
|
|
39
|
+
| `noodle prompts` | List local prompts via a loopback MCP smoke. |
|
|
40
|
+
| `noodle dev` | Run a local loopback runtime that serves + hot-reloads the manifest (no login). |
|
|
41
|
+
| `noodle devtools` | Preview local widget metadata and rendering. |
|
|
42
|
+
| `noodle design` | Inspects the latest finalized widget design brief (`inspect --latest --json`). |
|
|
43
|
+
|
|
44
|
+
## Hosted deploy & operations
|
|
45
|
+
|
|
46
|
+
| Command | What it does |
|
|
47
|
+
| :-- | :-- |
|
|
48
|
+
| `noodle link` | Bind this directory to a Noodle Seed Cloud target (org/app/env). |
|
|
49
|
+
| `noodle assistant` | Manage backend credentials for customer-branded embedded assistant clients. |
|
|
50
|
+
| `noodle deploy` | Deploy the server to Noodle Seed Cloud. |
|
|
51
|
+
| `noodle open` | Open or print the latest deployment URL. |
|
|
52
|
+
| `noodle status` | Show hosted deployment status. |
|
|
53
|
+
| `noodle inspect` | Inspect hosted deployment metadata without secret material. |
|
|
54
|
+
| `noodle smoke` | Run hosted readiness diagnostics and print external smoke commands. |
|
|
55
|
+
| `noodle rollback` | Roll back to a previous deployment. |
|
|
56
|
+
| `noodle archive` | Archive the whole app: endpoints answer 410 Gone; hard-deleted after the retention window. |
|
|
57
|
+
| `noodle restore` | Restore an archived app within the retention window. |
|
|
58
|
+
| `noodle access` | Set the access mode (owner-only\|org-members\|authenticated\|customers). |
|
|
59
|
+
| `noodle apps` | List or inspect hosted apps for an org (`apps list`/`apps inspect <app>`). |
|
|
60
|
+
| `noodle envs` | List or inspect environments for an app (`envs list`/`envs inspect <env>`). |
|
|
61
|
+
| `noodle deployments` | List or inspect individual deployments (`deployments list`/`deployments inspect <id>`). |
|
|
62
|
+
| `noodle distributions` | Publish immutable host archives, record their lifecycle, and operate bounded delivery. |
|
|
63
|
+
| `noodle service` | Query hosted service capabilities. |
|
|
64
|
+
| `noodle login` | Authenticate with Noodle Seed Cloud. |
|
|
65
|
+
| `noodle logout` | Clear saved credentials. |
|
|
66
|
+
| `noodle whoami` | Print the current authenticated user. |
|
|
67
|
+
| `noodle feedback` | Send sanitized product feedback (bug, idea, docs gap) to the Noodle Seed team. |
|
|
68
|
+
| `noodle github` | Connect, inspect, or disconnect the GitHub repository behind an app’s GitHub-native deploys (`connect`/`status`/`disconnect`; `connect` opens a browser install, `--repo` for headless). |
|
|
69
|
+
| `noodle target` | Show or set the deployment target (local\|cloud\|other). |
|
|
70
|
+
|
|
71
|
+
## Org & members
|
|
72
|
+
|
|
73
|
+
| Command | What it does |
|
|
74
|
+
| :-- | :-- |
|
|
75
|
+
| `noodle orgs` | List or create orgs. |
|
|
76
|
+
| `noodle members` | Manage org members (list/add/remove). |
|
|
77
|
+
|
|
78
|
+
## Managed config
|
|
79
|
+
|
|
80
|
+
| Command | What it does |
|
|
81
|
+
| :-- | :-- |
|
|
82
|
+
| `noodle secrets` | Manage managed secrets (set/list/delete/resolve) by org/app/env scope. |
|
|
83
|
+
| `noodle variables` | Manage managed variables (set/list/delete/resolve) by org/app/env scope. |
|
|
84
|
+
|
|
85
|
+
## Governance & observability
|
|
86
|
+
|
|
87
|
+
| Command | What it does |
|
|
88
|
+
| :-- | :-- |
|
|
89
|
+
| `noodle audit` | Operator governance audit status and event queries. |
|
|
90
|
+
| `noodle knowledge` | Operator-only knowledge components: list, status, and refresh (ADR 0202). |
|
|
91
|
+
| `noodle logs` | View service/deployment logs. |
|
|
92
|
+
| `noodle metrics` | MCP analytics for a deployed server (volume, sessions, latency percentiles, two-tier errors, tools, clients). Agents: `noodle metrics --agent-output` for a health verdict + next actions. |
|
|
93
|
+
| `noodle events` | The per-request MCP event stream with status/tool/client filters; `--session <id>` replays one session in order. Agents: add `--json` and filter (`--status tool_error\|mcp_error`) when debugging. |
|
|
94
|
+
| `noodle alerts` | Analytics alert rules (`add\|list\|remove\|test`): an edge-triggered webhook fires when error share, error count, calls, or p95 latency breaches. Webhook URLs are stored server-side and shown redacted. |
|
|
95
|
+
| `noodle intents` | Operate optional environment-scoped intent capture (`status\|enable\|disable\|list\|purge`); model participation is best-effort and purge is irreversible. |
|
|
96
|
+
| `noodle policy` | Manage policy (status/list/show/effective/simulate/suspend/quota/rate/...). |
|
|
97
|
+
|
|
98
|
+
## CLI maintenance
|
|
99
|
+
|
|
100
|
+
| Command | What it does |
|
|
101
|
+
| :-- | :-- |
|
|
102
|
+
| `noodle help` | Print CLI usage and command help. |
|
|
103
|
+
| `noodle version` | Print the installed CLI version. |
|
|
104
|
+
| `noodle commands` | Print the machine-readable command catalog (`--json`) or a compact human list. Agents: `noodle commands --json` for every command, subcommand, flag, and exit code without reading source. |
|
|
105
|
+
| `noodle features` | Print the versioned Claude, ChatGPT, and Embedded compatibility registry (`--json` or `--markdown`). |
|
|
106
|
+
| `noodle update` | Check for, install, or safely repair the CLI update. Agents: `noodle update --check --json`, then `noodle update --yes --json`; add `--repair` only when the check reports `repairSafe: true`. |
|