@noodleseed/agent-kit 0.34.0 → 0.36.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 +129 -29
- package/package.json +1 -1
- package/skills/claude-code/SKILL.md +48 -29
- package/skills/claude-code/examples/acme-bistro/README.md +1 -1
- package/skills/claude-code/examples/customer-auth/README.md +7 -0
- package/skills/claude-code/examples/gmail-multi-account/README.md +46 -0
- package/skills/claude-code/examples/gmail-multi-account/noodle.json +4 -0
- package/skills/claude-code/examples/gmail-multi-account/package.json +16 -0
- package/skills/claude-code/examples/gmail-multi-account/src/server.ts +485 -0
- package/skills/claude-code/examples/gmail-multi-account/test/server.test.ts +271 -0
- package/skills/claude-code/examples/gmail-multi-account/vitest.config.ts +28 -0
- package/skills/claude-code/references/app-directory-compliance.md +59 -0
- package/skills/claude-code/references/authoring-workflow.md +3 -1
- package/skills/claude-code/references/build-an-mcp-app.md +52 -0
- package/skills/claude-code/references/build-an-mcp-server.md +54 -0
- package/skills/claude-code/references/compile-errors.md +4 -0
- package/skills/claude-code/references/connect-an-api.md +60 -20
- package/skills/claude-code/references/deploy-and-ops.md +15 -79
- package/skills/claude-code/references/embedded-assistant.md +1 -1
- package/skills/claude-code/references/examples.md +1 -0
- package/skills/claude-code/references/experience-design.md +1 -1
- package/skills/claude-code/references/inspect-hosted.md +26 -0
- package/skills/claude-code/references/publishing.md +15 -17
- package/skills/claude-code/references/sdk-surface.md +6 -0
- package/skills/claude-code/references/verify-and-recover.md +65 -0
- package/skills/codex/SKILL.md +48 -29
- package/skills/codex/examples/acme-bistro/README.md +1 -1
- package/skills/codex/examples/customer-auth/README.md +7 -0
- package/skills/codex/examples/gmail-multi-account/README.md +46 -0
- package/skills/codex/examples/gmail-multi-account/noodle.json +4 -0
- package/skills/codex/examples/gmail-multi-account/package.json +16 -0
- package/skills/codex/examples/gmail-multi-account/src/server.ts +485 -0
- package/skills/codex/examples/gmail-multi-account/test/server.test.ts +271 -0
- package/skills/codex/examples/gmail-multi-account/vitest.config.ts +28 -0
- package/skills/codex/references/app-directory-compliance.md +59 -0
- package/skills/codex/references/authoring-workflow.md +3 -1
- package/skills/codex/references/build-an-mcp-app.md +52 -0
- package/skills/codex/references/build-an-mcp-server.md +54 -0
- package/skills/codex/references/compile-errors.md +4 -0
- package/skills/codex/references/connect-an-api.md +60 -20
- package/skills/codex/references/deploy-and-ops.md +15 -79
- package/skills/codex/references/embedded-assistant.md +1 -1
- package/skills/codex/references/examples.md +1 -0
- package/skills/codex/references/experience-design.md +1 -1
- package/skills/codex/references/inspect-hosted.md +26 -0
- package/skills/codex/references/publishing.md +15 -17
- package/skills/codex/references/sdk-surface.md +6 -0
- package/skills/codex/references/verify-and-recover.md +65 -0
- package/skills/claude-code/references/chatgpt-compliance.md +0 -63
- package/skills/codex/references/chatgpt-compliance.md +0 -63
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Outcome
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
drift. Probe the live API, learn the real shape, then encode it as a `connector`. The loop:
|
|
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.
|
|
5
4
|
|
|
6
5
|
## Contents
|
|
7
6
|
|
|
7
|
+
- Use when
|
|
8
|
+
- Do not use when
|
|
9
|
+
- Required inputs
|
|
10
|
+
- Workflow
|
|
8
11
|
- Secure the key first
|
|
9
12
|
- Probe the live API
|
|
10
13
|
- Model the connector from the observed shape
|
|
@@ -13,9 +16,30 @@ drift. Probe the live API, learn the real shape, then encode it as a `connector`
|
|
|
13
16
|
- Design intent tools
|
|
14
17
|
- Set the secret for local runs
|
|
15
18
|
- Prove real output
|
|
16
|
-
-
|
|
19
|
+
- Verification evidence
|
|
20
|
+
- Recovery paths
|
|
21
|
+
- Stop conditions
|
|
17
22
|
|
|
18
|
-
##
|
|
23
|
+
## Use when
|
|
24
|
+
|
|
25
|
+
- The user provides credentials, a reachable API, or an OpenAPI document and wants real MCP behavior backed by it.
|
|
26
|
+
- Existing connector behavior compiles but still needs proof against the actual service and data shape.
|
|
27
|
+
|
|
28
|
+
## Do not use when
|
|
29
|
+
|
|
30
|
+
- The task is a local/static MCP capability with no external data source.
|
|
31
|
+
- The user only wants a widget, deployment, publication, or diagnosis unrelated to API behavior; select that route.
|
|
32
|
+
- Required credentials or authority are unavailable. Do not bypass authentication or substitute fabricated payloads for live evidence.
|
|
33
|
+
|
|
34
|
+
## Required inputs
|
|
35
|
+
|
|
36
|
+
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.
|
|
37
|
+
|
|
38
|
+
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.
|
|
39
|
+
|
|
40
|
+
## Workflow
|
|
41
|
+
|
|
42
|
+
### Secure the key first
|
|
19
43
|
|
|
20
44
|
Never inline or log the key. Have the user put it in an environment variable, then store it as a
|
|
21
45
|
managed secret and reference it only as `secret(...)`:
|
|
@@ -28,7 +52,7 @@ noodle secrets set SOME_API_KEY --runtime local --from-env SOME_API_KEY # same
|
|
|
28
52
|
In `server.ts` the key is only ever `secret("SOME_API_KEY")` — keep the raw value out of code, tests,
|
|
29
53
|
prompts, logs, and generated files.
|
|
30
54
|
|
|
31
|
-
|
|
55
|
+
### Probe the live API
|
|
32
56
|
|
|
33
57
|
Learn the actual response shape empirically. Two ways — capture one real example response per endpoint
|
|
34
58
|
you will use, and read its field names, nesting, array shapes, pagination, and id-vs-label fields:
|
|
@@ -40,7 +64,7 @@ you will use, and read its field names, nesting, array shapes, pagination, and i
|
|
|
40
64
|
'${response}' }`), `noodle secrets set` the key, then `noodle tools call` it to see the real payload
|
|
41
65
|
in-process.
|
|
42
66
|
|
|
43
|
-
|
|
67
|
+
### Model the connector from the observed shape
|
|
44
68
|
|
|
45
69
|
Encode the API as an HTTP connector, mapping only the fields you actually saw into a small typed
|
|
46
70
|
`output`:
|
|
@@ -56,7 +80,7 @@ Encode the API as an HTTP connector, mapping only the fields you actually saw in
|
|
|
56
80
|
The full connector shape, every `auth.kind`, and compute connectors are in
|
|
57
81
|
`references/authoring-workflow.md`.
|
|
58
82
|
|
|
59
|
-
|
|
83
|
+
### Return a list
|
|
60
84
|
|
|
61
85
|
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:
|
|
62
86
|
|
|
@@ -87,7 +111,7 @@ pagination: {
|
|
|
87
111
|
response: { tasks: '${response.items}' },
|
|
88
112
|
```
|
|
89
113
|
|
|
90
|
-
|
|
114
|
+
### Create, update, delete
|
|
91
115
|
|
|
92
116
|
Pair the read/list with the mutations your intent tools need:
|
|
93
117
|
- **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.
|
|
@@ -117,14 +141,14 @@ close_task: {
|
|
|
117
141
|
},
|
|
118
142
|
```
|
|
119
143
|
|
|
120
|
-
|
|
144
|
+
### Design intent tools
|
|
121
145
|
|
|
122
|
-
|
|
146
|
+
Create intent-shaped tools around what the user says, not 1:1 around endpoints. Pair an id-taking action with a
|
|
123
147
|
find/search operation that returns `{ id, label }` summaries so the model resolves text → id itself,
|
|
124
148
|
and map each response to a few labelled fields the model can speak from. See the "Design tools for the
|
|
125
149
|
model" section of `references/authoring-workflow.md`.
|
|
126
150
|
|
|
127
|
-
|
|
151
|
+
### Set the secret for local runs
|
|
128
152
|
|
|
129
153
|
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:
|
|
130
154
|
|
|
@@ -137,17 +161,33 @@ noodle secrets set SOME_API_KEY --runtime local --scope env --org <org> --app <a
|
|
|
137
161
|
|
|
138
162
|
Local secrets live in `./.env.noodle` (never commit it). A required `secret(...)` or `variable(...)` that cannot resolve fails boot closed. `noodle tools call` / `noodle test` / `noodle dev` / `noodle devtools` stop before exposing an empty endpoint and print the exact effective target plus recovery command.
|
|
139
163
|
|
|
140
|
-
|
|
164
|
+
### Prove real output
|
|
141
165
|
|
|
142
166
|
`noodle validate` / `noodle test` prove a connector tool *compiles and registers* — not that its
|
|
143
167
|
mapping returns data. With the secret set, run a live read: `noodle tools call <read_tool> --args
|
|
144
168
|
'{…}'` executes the connector against the real API in-process. Confirm the mapped fields are populated,
|
|
145
|
-
not `undefined`; if they are empty, fix
|
|
146
|
-
Only run a live write
|
|
169
|
+
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.
|
|
170
|
+
Only run a live write after explicit user approval and when a safe test target and expected effect are known.
|
|
171
|
+
|
|
172
|
+
## Verification evidence
|
|
173
|
+
|
|
174
|
+
- **Credential path:** the raw credential remained in an environment variable and the managed `secret(...)` path for the same effective local target.
|
|
175
|
+
- **Observed shape:** a representative safe live read established the real fields, nesting, arrays, pagination, and empty-result behavior used by the mapping.
|
|
176
|
+
- **Local proof:** `noodle validate --json` and `noodle test --json` succeeded, then `noodle tools call` returned populated mapped fields or an intentionally verified empty result.
|
|
177
|
+
- **Writes:** name the approval and safe target used, or report writes as not run.
|
|
178
|
+
- **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.
|
|
179
|
+
|
|
180
|
+
## Recovery paths
|
|
181
|
+
|
|
182
|
+
- Authentication failure: verify the connector auth kind, managed secret name, and effective local target without printing the credential.
|
|
183
|
+
- Successful HTTP call with `undefined` fields: compare the mapping with one sanitized observed response, correct the path, and rerun the same read.
|
|
184
|
+
- 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.
|
|
185
|
+
- 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.
|
|
186
|
+
- Repeated external failure: stop after bounded attempts and report the sanitized status, endpoint class, evidence already proven, and exact external action needed.
|
|
147
187
|
|
|
148
|
-
##
|
|
188
|
+
## Stop conditions
|
|
149
189
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
190
|
+
- Stop complete when the representative safe read returns populated mapped fields or an intentionally verified empty result through the same effective local target.
|
|
191
|
+
- Stop before a live write without explicit approval, a known effect, and a safe target.
|
|
192
|
+
- Stop blocked when credentials, a reachable service, a representative input, or a required private schema is unavailable.
|
|
193
|
+
- Do not continue into App design, deployment, or publication unless the user requested that next outcome; route to the corresponding primary playbook instead.
|
|
@@ -1,89 +1,25 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Hosted mutation authorization
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> This route changes hosted or external state. Use it only when the current user request explicitly authorizes the exact mutation and target.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- Link and target
|
|
7
|
-
- Deploy and inspect
|
|
8
|
-
- Installed Developer plugin handoff
|
|
9
|
-
- Eject path (portable manifest)
|
|
10
|
-
- Connect into a host
|
|
11
|
-
- Access modes
|
|
12
|
-
- Org and members
|
|
13
|
-
- Config and observability
|
|
14
|
-
- Agent-safe CLI recipes
|
|
15
|
-
- Analytics
|
|
5
|
+
## Route boundary
|
|
16
6
|
|
|
17
|
-
|
|
7
|
+
- Select this route only for the exact hosted mutation the user requested.
|
|
8
|
+
- Route inspection, diagnosis, preparation, validation, testing, and other read-only work to their read-only references. Those requests do not authorize a mutation.
|
|
9
|
+
- Authentication, target binding, configuration, access changes, deployment, connection writes, and rollback are separate mutations. Authorization for one does not imply another.
|
|
18
10
|
|
|
19
|
-
|
|
11
|
+
## Authorization check
|
|
20
12
|
|
|
21
|
-
|
|
13
|
+
Before any mutation, require the current request to name both the action and its complete target. A mutation-capable target consists of an explicit organization, application, and environment. When the environment is absent, stop and ask for it instead of applying a default, reusing local state, or selecting a target implicitly.
|
|
22
14
|
|
|
23
|
-
|
|
15
|
+
Do not broaden a request to prepare, inspect, diagnose, or validate into permission to authenticate, bind a target, change configuration or access, deploy, connect, submit, or roll back.
|
|
24
16
|
|
|
25
|
-
##
|
|
17
|
+
## Command and service contract
|
|
26
18
|
|
|
27
|
-
|
|
19
|
+
Use `references/cli-commands.md` as the generated command, flag, and exit-code contract. Consult the live command catalog before acting, and treat the service response as the authority for resulting hosted state. This reference intentionally does not duplicate operational command sequences, defaults, or status semantics.
|
|
28
20
|
|
|
29
|
-
##
|
|
21
|
+
## Evidence and stop conditions
|
|
30
22
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
`noodle export manifest [--output <file>]` compiles the entrypoint locally and emits the portable, vendor-neutral manifest JSON — no service, no login, no account. A Noodle app is just `src/server.ts` plus this manifest: the user can read it, diff it, and keep it.
|
|
36
|
-
|
|
37
|
-
## Connect into a host
|
|
38
|
-
|
|
39
|
-
Once deployed, register the server as a tool in a host with `noodle connect <host>` (`claude-code`, `codex`, `chatgpt`, `cursor`, `vscode`, `claude`, `inspector`) — it prints the exact config to paste.
|
|
40
|
-
|
|
41
|
-
- **Claude Code / Claude Desktop** (verified) — add the `mcpServers` block, or one-shot `claude mcp add-json noodle-server '<json>'`:
|
|
42
|
-
|
|
43
|
-
```json
|
|
44
|
-
{
|
|
45
|
-
"mcpServers": {
|
|
46
|
-
"noodle-server": { "type": "https", "url": "https://<app>.mcp.noodleseed.dev" }
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
- **Codex / Cursor / VS Code** — the same `mcpServers` block is emitted as a starting point (these hosts' config formats are not officially documented). Wiring a deployed Noodle server into Codex means registering that block in Codex's MCP config.
|
|
52
|
-
- **ChatGPT / Claude.ai** — no config file: open the host's Settings → Connectors → Add custom connector, paste the MCP URL, then authenticate.
|
|
53
|
-
- `noodle connect codex|claude-code --write` writes the project-local agent files (only these two targets).
|
|
54
|
-
|
|
55
|
-
## Access modes
|
|
56
|
-
|
|
57
|
-
`noodle access set owner-only|org-members|authenticated|customers` controls who can call the deployed server. Hosted access is identity-based; never add static data-plane keys.
|
|
58
|
-
|
|
59
|
-
## Org and members
|
|
60
|
-
|
|
61
|
-
`noodle orgs list|create` and `noodle members list|add|remove --org <slug>` manage organizations and membership.
|
|
62
|
-
|
|
63
|
-
## Config and observability
|
|
64
|
-
|
|
65
|
-
Manage runtime config with `noodle secrets` / `noodle variables` (scoped org/app/env). Operators use `noodle logs`, `noodle audit`, and `noodle policy` for logs, governance audit, and policy.
|
|
66
|
-
|
|
67
|
-
## Agent-safe CLI recipes
|
|
68
|
-
|
|
69
|
-
Use explicit flags in headless runs so commands never wait for a prompt:
|
|
70
|
-
|
|
71
|
-
```sh
|
|
72
|
-
noodle link --org acme --app support-assistant --env prod
|
|
73
|
-
noodle secrets set CRM_TOKEN --scope env --org acme --app support-assistant --env prod --from-env CRM_TOKEN
|
|
74
|
-
noodle secrets set CRM_CERT --scope env --org acme --app support-assistant --env prod --from-file ./cert.pem
|
|
75
|
-
printf %s "$CRM_TOKEN" | noodle secrets set CRM_TOKEN --scope env --org acme --app support-assistant --env prod --from-stdin
|
|
76
|
-
noodle variables set CRM_BASE_URL --scope env --org acme --app support-assistant --env prod --value https://crm.example.com
|
|
77
|
-
noodle secrets list --scope env --org acme --app support-assistant --env prod --json
|
|
78
|
-
noodle validate --json
|
|
79
|
-
noodle test --json
|
|
80
|
-
noodle deploy --json
|
|
81
|
-
noodle smoke --json
|
|
82
|
-
noodle agents doctor --json
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
`secrets resolve` is for local diagnostics only; do not print resolved values into prompts, logs, tests, or docs. Prefer `--from-env`, `--from-file`, or `--from-stdin` over inline `--value` for sensitive values. Variables may use `--value` when the value is non-secret.
|
|
86
|
-
|
|
87
|
-
## Analytics (verify after deploy, debug errors)
|
|
88
|
-
|
|
89
|
-
After a deploy gets traffic, verify with `noodle metrics --agent-output` — it returns a `health` verdict (`ok`/`attention`), a one-line summary, and `attention[]` items each carrying the exact next command. When a tool errors, drill in with `noodle events --tool <name> --json` (filters: `--status tool_error|mcp_error`, `--client <name>`); `noodle events --session <id> --json` replays one session chronologically. `--json` on both returns the full payload; human runs get the branded report. Two-tier errors: `tool_error` is recoverable (handed back to the model), `mcp_error` needs attention (protocol/timeout/internal). Wire edge-triggered webhooks on error share, error count, calls, or p95 latency with `noodle alerts add|list|remove|test`.
|
|
23
|
+
- Stop before execution when the action or complete target is missing.
|
|
24
|
+
- After an authorized mutation, report only the state evidenced by the command and service response.
|
|
25
|
+
- Do not claim host behavior, production health, or successful external registration without direct evidence at that layer.
|
|
@@ -184,7 +184,7 @@ The callback records declarative fulfilment at author time; the shared runtime e
|
|
|
184
184
|
|
|
185
185
|
## Structured missing input
|
|
186
186
|
|
|
187
|
-
A tool authored with `ctx.elicit({ id, message, input })` produces `input_requested` when it reaches missing input. Built-in and headless renderers present it and call `respond(id, { action: "accept", content })`; decline/cancel stop. Accepted content is schema-validated and completed steps are not rerun; invalid content returns `arg_invalid` and keeps the interaction pending. Elicitation gathers an input and does not approve a later write. Every interactive flow collects elicited input before its first connector operation; every eligible `input_requested` precedes `tool_proposed`. In a `confirm: true` flow, the final proposal reviews original input, elicited values, and the sole exact connector action
|
|
187
|
+
A tool authored with `ctx.elicit({ id, message, input })` produces `input_requested` when it reaches missing input. Built-in and headless renderers present it and call `respond(id, { action: "accept", content })`; decline/cancel stop. Accepted content is schema-validated and completed steps are not rerun; invalid content returns `arg_invalid` and keeps the interaction pending. Elicitation gathers an input and does not approve a later write. Every interactive flow collects elicited input before its first connector operation; every eligible `input_requested` precedes `tool_proposed`. In a `confirm: true` flow, the final proposal reviews original input, elicited values, and the sole exact eligible connector action. Conditional branches may declare candidate actions and later reads only when preparation resolves exactly one action, discloses later eligible operations, and fails with `invalid_confirmation_flow` for zero or multiple actions. Accept is bound to that action. Bidirectional MCP maps missing input to standard `elicitation/create`. On a stateless host, a linked MCP App presents the same normal-user form and re-calls the tool through standard `tools/call`, carrying replay answers in request `_meta` so approval copy contains only business fields; without Apps, the model receives the exact structured schema and an advertised reserved retry field. Both paths replay only the operation-free input prefix and never expose runtime continuation or environment state. Setting `interactions: { confirmationFallback: "host" }` explicitly trusts native host approval only after every elicited field is collected and only when confirmation transport is unavailable; it still uses the same prepared-action safety path. Embedded/headless confirmation remains Noodle-owned. Omitted or false annotations execute directly; hints never gate.
|
|
188
188
|
|
|
189
189
|
## Verified session context (identity and claims)
|
|
190
190
|
|
|
@@ -15,6 +15,7 @@ Paths are relative to this skill directory. Assets (images/fonts) are omitted fr
|
|
|
15
15
|
| `acme-tasks` | A two-way productivity app designed around its top-3 prioritized flows (capture/prioritize/complete), with a design-first flow spec + wireframe. | `examples/acme-tasks/src/server.ts` + `design/` |
|
|
16
16
|
| `acme-bistro` | End-to-end ordering with a payment-only handoff; ships a gold-standard `design/` set (UX doc, wireframe with compliance audit, API contract). | `examples/acme-bistro/src/server.ts` + `design/` |
|
|
17
17
|
| `customer-auth` | End-user (customer) auth via OIDC/Firebase bridge with delegated credentials. | `examples/customer-auth/src/server.ts` |
|
|
18
|
+
| `gmail-multi-account` | One curated Gmail connector reused by two account bindings, canonical account arrays, exact mutation confirmation, and an accompanying personal-automation skill. | `examples/gmail-multi-account/src/server.ts` |
|
|
18
19
|
|
|
19
20
|
## In the repository only — `examples/<name>/` on GitHub
|
|
20
21
|
|
|
@@ -126,7 +126,7 @@ The design phase produces up to three artifacts — worked gold-standard version
|
|
|
126
126
|
architecture, demo scope, success metrics, and future enhancements — opening on the funnel-boundary
|
|
127
127
|
line every scope debate resolves against.
|
|
128
128
|
- **Wireframe** — the single-file HTML alignment artifact (anatomy above) with the embedded compliance
|
|
129
|
-
audit; see `references/
|
|
129
|
+
audit; see `references/app-directory-compliance.md`.
|
|
130
130
|
- **API contract** — when the partner's backend must be built or wrapped. Escalate: (1) the MCP
|
|
131
131
|
tool→call-sequence map (always); (2) "Recommended API Shapes" — concrete request/response JSON per
|
|
132
132
|
tool, including the hardest nested case; (3) a full OpenAPI spec for transactional apps. Contract
|
|
@@ -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, use its deployment inspection or diagnosis tool only for the selected org/app/env. Treat it as 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.
|
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
# Publish to app directories
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> Preparation is read-only unless the current user request explicitly authorizes the exact deploy, access change, host write, or submission target. A request to prepare must report missing readiness work and stop before mutation.
|
|
4
|
+
|
|
5
|
+
Directory requirements evolve. Identify the requested directory first and verify its current official requirements before preparing directory-specific evidence.
|
|
4
6
|
|
|
5
7
|
## Contents
|
|
6
8
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
9
|
+
- Shared readiness gate
|
|
10
|
+
- Directory-specific evidence
|
|
11
|
+
- Submission boundary
|
|
10
12
|
|
|
11
|
-
##
|
|
13
|
+
## Shared readiness gate
|
|
12
14
|
|
|
13
15
|
Before any submission:
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
4. Polish the listing surface: tool descriptions, widget titles, and the `server` branding tokens are what reviewers and users see.
|
|
17
|
+
Use `references/app-directory-compliance.md` as this route’s canonical shared compliance checklist.
|
|
18
|
+
|
|
19
|
+
Prepare evidence for a reachable production MCP endpoint, accurate capability descriptions and schemas, useful fallback behavior, realistic positive and negative tests, data minimization, privacy disclosures, support ownership, and any interactive surface the directory will review.
|
|
19
20
|
|
|
20
|
-
##
|
|
21
|
+
## Directory-specific evidence
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
Read the selected directory’s current official submission documentation at review time. Record each additional requirement separately from the shared checklist, including listing fields, identity verification, test credentials, screenshots, policy declarations, review limits, and appeal or resubmission steps. Never project one directory’s requirements onto another.
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
- The submission form asks for the app name, logo, description, company and privacy policy URLs, MCP server URL and tool information, screenshots, test prompts with expected responses, and localization details.
|
|
26
|
-
- One version may be published and one in review at a time; to revise a pending submission, cancel the review and resubmit rather than creating a new app.
|
|
27
|
-
- Review combines automated checks and manual evaluation; rejections come with feedback — fix and resubmit, or reply to appeal. An approved app is also distributed as a Codex plugin.
|
|
25
|
+
When a requirement cannot be verified from the selected directory’s current documentation or direct review evidence, mark it unknown instead of borrowing a rule from another host.
|
|
28
26
|
|
|
29
|
-
##
|
|
27
|
+
## Submission boundary
|
|
30
28
|
|
|
31
|
-
|
|
29
|
+
Preparation is read-only. Deployment, access changes, directory registration, and final submission each require explicit authorization for the exact target. Report remaining evidence gaps and stop when that authority or required directory access is absent.
|
|
@@ -50,7 +50,13 @@ Platform helper connectors are explicit subpath imports from `@noodleseed/one/pl
|
|
|
50
50
|
|
|
51
51
|
### Other
|
|
52
52
|
|
|
53
|
+
- `bind`
|
|
54
|
+
- `clientCredentials`
|
|
55
|
+
- `connection`
|
|
53
56
|
- `embeddedAssistant`
|
|
57
|
+
- `externalExchange`
|
|
58
|
+
- `gmailConnector`
|
|
59
|
+
- `managedSecret`
|
|
54
60
|
- `openAICompatible`
|
|
55
61
|
|
|
56
62
|
## Authoring signatures
|
|
@@ -0,0 +1,65 @@
|
|
|
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 and exercises registration.
|
|
26
|
+
4. **Real API** — a representative safe `noodle tools call` proves connector credentials, transport, observed mapping, and populated data.
|
|
27
|
+
5. **App compliance** — `noodle check --json` and local devtools prove the App contract and intended states.
|
|
28
|
+
6. **Host** — the requested host connects, invokes the expected capability, and renders useful fallback/UI behavior.
|
|
29
|
+
7. **Deploy** — the requested hosted revision and configuration exist and report healthy at the deployment layer.
|
|
30
|
+
8. **Production health** — the live production endpoint and requested user journey are observed on the intended revision.
|
|
31
|
+
|
|
32
|
+
For the first failing layer:
|
|
33
|
+
|
|
34
|
+
1. Read the process exit code or status first. If machine JSON exists, parse it before reading human prose or editing files.
|
|
35
|
+
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.
|
|
36
|
+
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.
|
|
37
|
+
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.
|
|
38
|
+
5. Rerun only the same evidence layer that failed. Once it passes, continue upward only to the user-requested level.
|
|
39
|
+
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.
|
|
40
|
+
|
|
41
|
+
## Verification evidence
|
|
42
|
+
|
|
43
|
+
Report a compact ledger for every exercised layer: command/action, target, result, and the evidence it establishes. Claim only the highest contiguous passing layer.
|
|
44
|
+
|
|
45
|
+
- Compile success does not prove runtime behavior.
|
|
46
|
+
- Validation and local smoke do not prove a real API mapping or credential path.
|
|
47
|
+
- Local evidence does not prove hosted or host behavior.
|
|
48
|
+
- Deployment existence does not prove production health or a user journey.
|
|
49
|
+
- Report every requested but unperformed or blocked higher layer as not run, with the reason.
|
|
50
|
+
|
|
51
|
+
## Recovery paths
|
|
52
|
+
|
|
53
|
+
- Compile/validation: repair the exact import, schema, or reported path, then rerun that command without freeform changes.
|
|
54
|
+
- Local boot/smoke: use the structured startup error to correct the effective target, config, or entrypoint before retrying.
|
|
55
|
+
- Real API: distinguish authentication, reachability, legitimate empty results, and broken response mappings before changing code.
|
|
56
|
+
- App: repair the cited contract or state in `noodle check --json`, then confirm it in devtools before attempting a host.
|
|
57
|
+
- Host/deployment/production: confirm revision, target, identity, and configuration independently; do not infer one from another.
|
|
58
|
+
- Repeated external failure: preserve passing evidence and report the sanitized failure, required authority or external state, owner, and exact next action.
|
|
59
|
+
|
|
60
|
+
## Stop conditions
|
|
61
|
+
|
|
62
|
+
- Stop complete when the user-requested evidence level and every dependency below it pass in the current target.
|
|
63
|
+
- Stop blocked when progress requires credentials, approval, host access, deployment authority, production access, or an external-state change not available in scope.
|
|
64
|
+
- Stop after two evidence-backed repair attempts with the same failure signature at one layer; do not hide repetition behind unrelated edits.
|
|
65
|
+
- Never claim fixed or working without rerunning the failed layer, and never upgrade compile, local, deployment, or stale historical evidence into a stronger claim.
|
package/skills/codex/SKILL.md
CHANGED
|
@@ -3,55 +3,73 @@ 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.
|
|
6
|
+
<!-- noodle-skill version:0.36.0 hash:75dd0f6f85b04858 -->
|
|
7
7
|
|
|
8
8
|
# Noodle Seed
|
|
9
9
|
|
|
10
10
|
Build, validate, test, deploy, and operate Noodle Seed MCP servers and apps authored in TypeScript with the `noodle` CLI. Author from the configured entrypoint (usually `server.ts`); keep the authoring surface TypeScript-only.
|
|
11
11
|
|
|
12
|
-
Use this skill for local Noodle Seed
|
|
12
|
+
Use this skill for project-local Noodle Seed authoring in the active coding host; preserve generated and user instruction boundaries.
|
|
13
|
+
|
|
14
|
+
If the request is unrelated to the Noodle MCP surface, stop here: follow the project's normal instructions and run no Noodle lifecycle commands.
|
|
13
15
|
|
|
14
16
|
**Installed-plugin execution.** When this skill is supplied by the Noodle Developer plugin, preserve the managed invocation path established by the plugin bootstrap and invoke every `noodle` command through that host bundle's managed launcher. Do not install or update a global CLI. Noodle guides and operates the lifecycle; you write and test the application source in the user's project.
|
|
15
17
|
|
|
16
|
-
##
|
|
18
|
+
## Route the request
|
|
19
|
+
|
|
20
|
+
Choose exactly one primary route from the user outcome below. Read that primary reference in full, then begin the work. Read supporting references only when the primary workflow sends you there or the named evidence exposes that concern. Stop discovery once the route is selected.
|
|
21
|
+
|
|
22
|
+
Apply this precedence when wording overlaps: diagnosis of an existing failure takes the verification route; an MCP App/UI outcome takes the App route; external API integration from credentials, a URL, or an API specification takes precedence over generic server building; hosted inspection is the read-only route; hosted mutation requires the explicitly requested deployment route.
|
|
23
|
+
|
|
24
|
+
Negative routing examples: “Inspect hosted logs/status” → `inspect-hosted` (read-only). “Prepare for deployment” → the applicable build or verification route and stop with a handoff; preparation does not authorize `link`, hosted config, deployment, rollback, host writes, or submission. “Keep this local” → a build or verification route, never a hosted route.
|
|
17
25
|
|
|
18
|
-
|
|
26
|
+
| User outcome | Primary reference | Supporting references only when needed | Done when |
|
|
27
|
+
| :--- | :--- | :--- | :--- |
|
|
28
|
+
| Create or extend a headless MCP server whose external API contract is already modeled | `references/build-an-mcp-server.md` | `references/authoring-workflow.md`, `references/sdk-surface.md` | The requested server behavior is locally validated and tested; connector reads have real-output evidence. |
|
|
29
|
+
| Connect a real API when credentials or an API specification are available | `references/connect-an-api.md` | `references/authoring-workflow.md` | A representative live read returns populated, intentionally mapped fields without exposing credentials. |
|
|
30
|
+
| Build or change an MCP App, widget, or host-visible UI | `references/build-an-mcp-app.md` | `references/experience-design.md`, `references/widgets-and-apps.md` | The UI has a stated user benefit, passes the requested checks, and degrades to useful text. |
|
|
31
|
+
| Validate, test, diagnose, or recover a failing local or hosted project | `references/verify-and-recover.md` | `references/agent-contract.md`, `references/compile-errors.md` | The failing evidence layer is repaired and rerun, or the remaining blocker and exact next action are reported. |
|
|
32
|
+
| Inspect or diagnose hosted status, logs, metrics, events, or deployment metadata read-only | `references/inspect-hosted.md` | None | The requested hosted evidence is reported without changing target, configuration, access, or deployment state. |
|
|
33
|
+
| Deploy, configure, connect with writes, change access, or roll back a hosted MCP service when explicitly requested | `references/deploy-and-ops.md` | `references/cli-commands.md` | The requested hosted state is evidenced without claiming unperformed host or production checks. |
|
|
34
|
+
| Embed a Noodle assistant in an existing SaaS or web application | `references/embedded-assistant.md` | `references/authoring-workflow.md` | The requested embed boundary works with verified identity and credential separation at the tested level. |
|
|
35
|
+
| Prepare or submit an integration to a host directory | `references/publishing.md` | `references/app-directory-compliance.md` | The requested submission evidence is complete and any host-review uncertainty is explicit. |
|
|
36
|
+
| Report a Noodle Seed bug, documentation gap, or product improvement | `references/feedback.md` | None | A sanitized command is shown to the user and is submitted only after explicit approval. |
|
|
19
37
|
|
|
20
|
-
|
|
38
|
+
## Common machine loop
|
|
21
39
|
|
|
22
|
-
|
|
40
|
+
The cold-agent commands speak the `--json` envelope. Parse machine state instead of scraping human prose; `references/agent-contract.md` owns the envelope and exit codes.
|
|
23
41
|
|
|
24
|
-
1. **Discover** — `noodle commands --json
|
|
25
|
-
2. **Author** —
|
|
26
|
-
3. **Validate** — `noodle validate --json`;
|
|
27
|
-
4. **
|
|
28
|
-
5. **
|
|
29
|
-
6. **
|
|
30
|
-
7. **Apps/widgets/embed** — `noodle check --json` (add `--target chatgpt|claude|embedded-assistant`), then `noodle devtools`; use `references/widgets-and-apps.md` for MCP Apps and `references/embedded-assistant.md` for a SaaS embed.
|
|
31
|
-
8. **Deploy** — `noodle deploy`; auth fails clean with `error.next` = `noodle login` (see `references/deploy-and-ops.md`).
|
|
32
|
-
9. **Wire into a host** — `noodle connect <codex|claude-code|chatgpt>` (prove it in a real host per `references/test-in-hosts.md`; debug symptoms with `references/troubleshooting.md`).
|
|
33
|
-
10. **Health** — `noodle metrics --agent-output`: a health verdict plus the exact next command per attention item.
|
|
42
|
+
1. **Discover** — use `noodle commands --json` when the required command or flags are uncertain; don't read CLI source.
|
|
43
|
+
2. **Author** — for build routes, edit the configured TypeScript entrypoint, usually `src/server.ts`.
|
|
44
|
+
3. **Validate** — run `noodle validate --json`; repair each `error.errors[]` item at its `path`, then re-run `noodle validate --json`.
|
|
45
|
+
4. **Smoke** — run `noodle test --json` after validation passes.
|
|
46
|
+
5. **Prove the requested level** — connector routes require a safe live read with `noodle tools call`; App routes require `noodle check --json` and `noodle devtools`; hosted or host actions run only when the selected route and current user request authorize that exact level.
|
|
47
|
+
6. **Report evidence** — claim only the highest level actually exercised and name anything not run.
|
|
34
48
|
|
|
35
|
-
##
|
|
49
|
+
## Reference lookup catalog
|
|
36
50
|
|
|
37
|
-
|
|
51
|
+
This is a lookup catalog, not a discovery checklist. Return here only when the selected primary route names a missing technical detail:
|
|
38
52
|
|
|
39
53
|
- `references/agent-contract.md` — the `--json` envelope, exit codes, and the three output modes.
|
|
40
54
|
- `references/sdk-surface.md` — what to import from `@noodleseed/one` and which builder to use.
|
|
41
55
|
- `references/cli-commands.md` — every `noodle` command, grouped by area.
|
|
42
56
|
- `references/compile-errors.md` — fix `noodle validate` errors by code.
|
|
43
|
-
- `references/
|
|
44
|
-
- `references/
|
|
45
|
-
- `references/
|
|
46
|
-
- `references/
|
|
47
|
-
- `references/
|
|
48
|
-
- `references/
|
|
49
|
-
- `references/
|
|
50
|
-
- `references/
|
|
51
|
-
- `references/
|
|
52
|
-
- `references/
|
|
57
|
+
- `references/build-an-mcp-server.md` — outcome-first workflow for a focused, tested, model-facing MCP product.
|
|
58
|
+
- `references/authoring-workflow.md` — input paths, fit checks, connector patterns, authentication, tool design, testing, and managed config.
|
|
59
|
+
- `references/embedded-assistant.md` — HTTPS origins, managed model config, deploy sequencing, session exchange, browser mounting, and credential boundaries.
|
|
60
|
+
- `references/connect-an-api.md` — secure credentials, probe the live API, model the observed shape, and prove real output.
|
|
61
|
+
- `references/build-an-mcp-app.md` — product-fit, output-boundary, fallback, and evidence workflow for an MCP App.
|
|
62
|
+
- `references/experience-design.md` — design an app experience: funnel boundary, grounding, two users, display modes, and wireframe.
|
|
63
|
+
- `references/widgets-and-apps.md` — MCP Apps, typed views, widget hooks, output shaping, and CSP.
|
|
64
|
+
- `references/test-in-hosts.md` — connect and test in real MCP hosts and protocol inspection clients.
|
|
65
|
+
- `references/verify-and-recover.md` — ordered evidence ladder, bounded repair, and honest completion claims.
|
|
66
|
+
- `references/troubleshooting.md` — runtime symptom to cause and fix, locally and hosted.
|
|
67
|
+
- `references/inspect-hosted.md` — read-only hosted status, logs, metrics, events, and deployment diagnosis.
|
|
68
|
+
- `references/deploy-and-ops.md` — explicitly authorized hosted link, config, deploy, access, connection writes, and rollback.
|
|
69
|
+
- `references/publishing.md` — prepare and submit to app and connector directories.
|
|
70
|
+
- `references/app-directory-compliance.md` — the pre-submission experience and policy checklist.
|
|
53
71
|
- `references/examples.md` — flagship example index and a canonical `server.ts`.
|
|
54
|
-
- `references/feedback.md` — draft sanitized product feedback
|
|
72
|
+
- `references/feedback.md` — draft sanitized product feedback and submit only with user approval.
|
|
55
73
|
|
|
56
74
|
## Product feedback
|
|
57
75
|
|
|
@@ -62,6 +80,7 @@ When you discover a bug, missing capability, misleading doc, or improvement idea
|
|
|
62
80
|
- Keep secrets, bearer tokens, refresh tokens, static access keys, `.env.noodle` values, and `~/.noodle/config.json` out of prompts, logs, docs, tests, and generated files.
|
|
63
81
|
- Do not hand-author manifest JSON/YAML, runtime artifacts, connector IR, or hosted asset metadata.
|
|
64
82
|
- Do not add static data-plane credential paths; hosted access is identity-based.
|
|
83
|
+
- Hosted mutation is opt-in. Run `link`, hosted secret/variable/config/access changes, deploy, rollback, host configuration writes, or directory submission only when the current user request explicitly authorizes the exact mutation and target. An inspect, prepare, validate, test, or local-only request grants no such authority; stop and ask before crossing that boundary.
|
|
65
84
|
|
|
66
85
|
## Customization
|
|
67
86
|
|
|
@@ -9,7 +9,7 @@ the app). It pairs a view-backed `tool` menu/cart with app-only `tool` cart help
|
|
|
9
9
|
Capability slot: **end-to-end in-chat transaction + payment-only handoff**, plus a worked **design-first**
|
|
10
10
|
deliverable set (`design/` — a UX Document, a single-file HTML wireframe with an embedded OpenAI Apps SDK
|
|
11
11
|
compliance audit, and a Recommended API contract). It sets the quality bar the `noodle-seed` skill's
|
|
12
|
-
`references/experience-design.md` and `references/
|
|
12
|
+
`references/experience-design.md` and `references/app-directory-compliance.md` teach. (Distinct from
|
|
13
13
|
`food-ordering`, which is the broad widget-composition proof; this one owns the design-first end-to-end +
|
|
14
14
|
compliance exemplar.)
|
|
15
15
|
|
|
@@ -29,6 +29,13 @@ callback.
|
|
|
29
29
|
|
|
30
30
|
## How delegated customer credentials are used
|
|
31
31
|
|
|
32
|
+
This flagship uses the legacy Firebase provider bridge because it is runnable today. That is distinct from
|
|
33
|
+
Core-v2 account-selecting connector aliases: those declare catalog `credentialProfiles` and bind each alias
|
|
34
|
+
with `bind(connector, { profile, connection })`. Hosted bound `managedSecret(...)` connections are runnable;
|
|
35
|
+
bound `externalExchange()` and `clientCredentials(...)` currently compile as portable metadata but fail
|
|
36
|
+
closed before secret or network access until their provider slice lands. Do not replace this example's
|
|
37
|
+
working delegated-session-cookie path with either unsupported bound exchange source.
|
|
38
|
+
|
|
32
39
|
The example has two declarations that work together:
|
|
33
40
|
|
|
34
41
|
```ts
|