@noodleseed/one 0.155.0 → 0.157.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/README.md +5 -1
- package/dist/assistant-embed-django-tests.d.ts +3 -0
- package/dist/assistant-embed-django-tests.d.ts.map +1 -0
- package/dist/assistant-embed-django-tests.js +140 -0
- package/dist/assistant-embed-django-tests.js.map +1 -0
- package/dist/assistant-embed-django.d.ts +4 -0
- package/dist/assistant-embed-django.d.ts.map +1 -0
- package/dist/assistant-embed-django.js +259 -0
- package/dist/assistant-embed-django.js.map +1 -0
- package/dist/assistant-embed-installation.d.ts +29 -0
- package/dist/assistant-embed-installation.d.ts.map +1 -0
- package/dist/assistant-embed-installation.js +124 -0
- package/dist/assistant-embed-installation.js.map +1 -0
- package/dist/assistant-embed-profile.d.ts +8 -0
- package/dist/assistant-embed-profile.d.ts.map +1 -0
- package/dist/assistant-embed-profile.js +150 -0
- package/dist/assistant-embed-profile.js.map +1 -0
- package/dist/assistant-embed-scaffold-template.d.ts +3 -2
- package/dist/assistant-embed-scaffold-template.d.ts.map +1 -1
- package/dist/assistant-embed-scaffold-template.js +39 -84
- package/dist/assistant-embed-scaffold-template.js.map +1 -1
- package/dist/assistant-embed-tests.d.ts +5 -0
- package/dist/assistant-embed-tests.d.ts.map +1 -0
- package/dist/assistant-embed-tests.js +106 -0
- package/dist/assistant-embed-tests.js.map +1 -0
- package/dist/assistant-embed-vue.d.ts +3 -0
- package/dist/assistant-embed-vue.d.ts.map +1 -0
- package/dist/assistant-embed-vue.js +77 -0
- package/dist/assistant-embed-vue.js.map +1 -0
- package/dist/commands/assistant-embed-ops.d.ts.map +1 -1
- package/dist/commands/assistant-embed-ops.js +112 -63
- package/dist/commands/assistant-embed-ops.js.map +1 -1
- package/dist/commands/author-loop.d.ts.map +1 -1
- package/dist/commands/author-loop.js +24 -28
- package/dist/commands/author-loop.js.map +1 -1
- package/dist/commands/deploy-first-flow.d.ts.map +1 -1
- package/dist/commands/deploy-first-flow.js +26 -15
- package/dist/commands/deploy-first-flow.js.map +1 -1
- package/dist/commands/deploy-preflight.d.ts +5 -0
- package/dist/commands/deploy-preflight.d.ts.map +1 -1
- package/dist/commands/deploy-preflight.js +44 -5
- package/dist/commands/deploy-preflight.js.map +1 -1
- package/dist/commands/local-readiness.d.ts +9 -1
- package/dist/commands/local-readiness.d.ts.map +1 -1
- package/dist/commands/local-readiness.js +74 -4
- package/dist/commands/local-readiness.js.map +1 -1
- package/dist/commands/project-setup.d.ts.map +1 -1
- package/dist/commands/project-setup.js +10 -15
- package/dist/commands/project-setup.js.map +1 -1
- package/dist/control-plane-request.d.ts +4 -0
- package/dist/control-plane-request.d.ts.map +1 -1
- package/dist/control-plane-request.js +40 -20
- package/dist/control-plane-request.js.map +1 -1
- package/dist/project-scaffold-model.d.ts +14 -0
- package/dist/project-scaffold-model.d.ts.map +1 -0
- package/dist/project-scaffold-model.js +36 -0
- package/dist/project-scaffold-model.js.map +1 -0
- package/dist/project-scaffold-templates.d.ts.map +1 -1
- package/dist/project-scaffold-templates.js +73 -39
- package/dist/project-scaffold-templates.js.map +1 -1
- package/dist/project-scaffold-test-template.d.ts +4 -0
- package/dist/project-scaffold-test-template.d.ts.map +1 -0
- package/dist/project-scaffold-test-template.js +89 -0
- package/dist/project-scaffold-test-template.js.map +1 -0
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +1 -2
- package/dist/project.js.map +1 -1
- package/dist/widget-focused-template.d.ts +1 -1
- package/dist/widget-focused-template.d.ts.map +1 -1
- package/dist/widget-focused-template.js +34 -12
- package/dist/widget-focused-template.js.map +1 -1
- package/dist/widget-scaffold-template.d.ts +1 -1
- package/dist/widget-scaffold-template.d.ts.map +1 -1
- package/dist/widget-scaffold-template.js +75 -43
- package/dist/widget-scaffold-template.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js +17 -3
- package/node_modules/@noodle-borg/agent-kit/dist/skill-app-playbook-ref.js +2 -2
- package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-refs.js +9 -12
- package/node_modules/@noodle-borg/agent-kit/dist/skill-connect-refs.js +2 -2
- package/node_modules/@noodle-borg/agent-kit/dist/skill-embedded-assistant-operations-ref.js +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-embedded-assistant-ref.js +32 -26
- package/node_modules/@noodle-borg/agent-kit/dist/skill-server-playbook-ref.js +2 -2
- package/node_modules/@noodle-borg/agent-kit/dist/skill-verification-ref.js +2 -1
- package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
- package/node_modules/@noodle-borg/assistant-gateway/package.json +1 -1
- package/node_modules/@noodle-borg/authoring/dist/assistant.d.ts +6 -0
- package/node_modules/@noodle-borg/authoring/dist/recording.d.ts +1 -1
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-assistant.js +10 -4
- package/node_modules/@noodle-borg/compiler/package.json +0 -1
- package/node_modules/@noodle-borg/deploy-client/dist/deploy-payload-size.js +6 -2
- package/node_modules/@noodle-borg/service/dist/registry-helpers.d.ts +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/deploy-preflight.js +193 -96
- package/node_modules/@noodle-borg/service/package.json +1 -1
- package/node_modules/@noodle-borg/wire-contracts/dist/index.d.ts +3 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/index.js +3 -0
- package/node_modules/@noodleseed/assistant/README.md +21 -23
- package/node_modules/@noodleseed/assistant/package.json +1 -1
- package/package.json +5 -4
- package/dist/saas-scaffold-template.d.ts +0 -4
- package/dist/saas-scaffold-template.d.ts.map +0 -1
- package/dist/saas-scaffold-template.js +0 -56
- package/dist/saas-scaffold-template.js.map +0 -1
- package/node_modules/tailwindcss/LICENSE +0 -21
- package/node_modules/tailwindcss/README.md +0 -36
- package/node_modules/tailwindcss/dist/chunk-5JIJA4QV.mjs +0 -1
- package/node_modules/tailwindcss/dist/chunk-HMCCH6MG.mjs +0 -1
- package/node_modules/tailwindcss/dist/chunk-X4GG3EDV.mjs +0 -1
- package/node_modules/tailwindcss/dist/colors-C__qRT83.d.ts +0 -347
- package/node_modules/tailwindcss/dist/colors.d.mts +0 -347
- package/node_modules/tailwindcss/dist/colors.d.ts +0 -5
- package/node_modules/tailwindcss/dist/colors.js +0 -1
- package/node_modules/tailwindcss/dist/colors.mjs +0 -1
- package/node_modules/tailwindcss/dist/default-theme.d.mts +0 -1199
- package/node_modules/tailwindcss/dist/default-theme.d.ts +0 -1199
- package/node_modules/tailwindcss/dist/default-theme.js +0 -1
- package/node_modules/tailwindcss/dist/default-theme.mjs +0 -1
- package/node_modules/tailwindcss/dist/flatten-color-palette.d.mts +0 -6
- package/node_modules/tailwindcss/dist/flatten-color-palette.d.ts +0 -6
- package/node_modules/tailwindcss/dist/flatten-color-palette.js +0 -1
- package/node_modules/tailwindcss/dist/flatten-color-palette.mjs +0 -1
- package/node_modules/tailwindcss/dist/lib.d.mts +0 -379
- package/node_modules/tailwindcss/dist/lib.d.ts +0 -3
- package/node_modules/tailwindcss/dist/lib.js +0 -38
- package/node_modules/tailwindcss/dist/lib.mjs +0 -38
- package/node_modules/tailwindcss/dist/plugin.d.mts +0 -11
- package/node_modules/tailwindcss/dist/plugin.d.ts +0 -134
- package/node_modules/tailwindcss/dist/plugin.js +0 -1
- package/node_modules/tailwindcss/dist/plugin.mjs +0 -1
- package/node_modules/tailwindcss/dist/resolve-config-B4yBzhca.d.ts +0 -29
- package/node_modules/tailwindcss/dist/resolve-config-QUZ9b-Gn.d.mts +0 -190
- package/node_modules/tailwindcss/dist/types-DWdTiksJ.d.mts +0 -128
- package/node_modules/tailwindcss/index.css +0 -944
- package/node_modules/tailwindcss/package.json +0 -89
- package/node_modules/tailwindcss/preflight.css +0 -393
- package/node_modules/tailwindcss/theme.css +0 -510
- package/node_modules/tailwindcss/utilities.css +0 -1
|
@@ -29,14 +29,14 @@ export function renderBuildAnMcpAppReference() {
|
|
|
29
29
|
'4. **Preserve fallback.** Every tool that launches a widget must still return useful text without the widget, so unsupported hosts and failed rendering remain usable.',
|
|
30
30
|
'5. **Decide product-guide coverage.** Record the required product-guide decision and its reason, then use `references/product-agent-guides.md` as the canonical selection and authoring guidance.',
|
|
31
31
|
'6. **Author and wire the App contract.** Follow `references/widgets-and-apps.md` for the canonical component guidance, view registration, hooks, state, CSP, tool visibility, and output shaping. Keep tool effects and confirmation semantics correct independently of the UI.',
|
|
32
|
-
'7. **Validate the local artifact.** Run `
|
|
32
|
+
'7. **Validate the local artifact.** Run the generated/adapted `npm test`, `noodle validate --json` and `noodle check --json`. Prove a representative result and negative case, not just registration. Synthetic preference previews do not save; replace their backend seam and verify the authorized effect before showing success.',
|
|
33
33
|
'8. **Inspect the experience.** Run `noodle devtools` and verify loading, empty, error, success, responsive layout, focus/keyboard behavior, and the text fallback.',
|
|
34
34
|
'9. **Escalate evidence only on request.** Run a host test only when the user requested host verification. Run host-specific compliance only when preparing that host submission; select the exact host-testing or compliance entry from the router lookup catalog only after that evidence level is explicitly requested.',
|
|
35
35
|
'',
|
|
36
36
|
'## Verification evidence',
|
|
37
37
|
'',
|
|
38
38
|
'- **Product:** the design spec states the user benefit, UI fit decision, and product-guide decision with its reason.',
|
|
39
|
-
'- **Server:**
|
|
39
|
+
'- **Server:** compilation, a representative call and negative input/authorization cases passed; report whether fixtures or a real authorized backend were used.',
|
|
40
40
|
'- **App contract:** `noodle check --json` succeeded.',
|
|
41
41
|
'- **Local UX:** `noodle devtools` exercised the relevant states and the useful text fallback without the widget.',
|
|
42
42
|
'- **Host/compliance:** report each requested host or compliance check with its evidence; report every unperformed higher level as not run.',
|
|
@@ -205,20 +205,14 @@ export function renderAuthoringWorkflowReference() {
|
|
|
205
205
|
'',
|
|
206
206
|
'## Tests',
|
|
207
207
|
'',
|
|
208
|
-
'
|
|
208
|
+
'Start from the generated `test/server.test.ts`, not a blank test file. `npm test` runs `vitest run --dir test` over the project-owned `test/` directory; skill-local example tests are reference material. The generated suite compiles the actual source/view, lists tools, asserts a representative result and rejects invalid input. It copies source into temporary fixture storage and uses synthetic configuration, never customer secrets or saved hosted targets. The HTTP profile proves one local backend read and zero extra calls for invalid input.',
|
|
209
209
|
'',
|
|
210
|
-
'```
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
'',
|
|
214
|
-
"describe('server', () => {",
|
|
215
|
-
" it('declares the expected tool surface', () => {",
|
|
216
|
-
" expect(app.name).toBe('support_assistant');",
|
|
217
|
-
' });',
|
|
218
|
-
'});',
|
|
210
|
+
'```sh',
|
|
211
|
+
'npm test',
|
|
212
|
+
'npm run agent:check',
|
|
219
213
|
'```',
|
|
220
214
|
'',
|
|
221
|
-
'
|
|
215
|
+
'Adapt the representative arguments and assertions when business contracts change; keep invalid-input and authorization cases. A name/export assertion or `noodle test --json` without `--tool` proves no useful call. After fixture tests pass, bind the real local configuration, run an authorized representative read, and use `noodle dev` for interactive checks. Never use a production mutation or fixture success as customer-readiness evidence.',
|
|
222
216
|
'',
|
|
223
217
|
'## Secrets and variables',
|
|
224
218
|
'',
|
|
@@ -568,7 +562,10 @@ const FLAGSHIP_EXAMPLES = [
|
|
|
568
562
|
'customer-auth',
|
|
569
563
|
'End-user OIDC, private customer API routing, route-bound confirmed actions, roles/scopes, and delegated credentials.',
|
|
570
564
|
],
|
|
571
|
-
[
|
|
565
|
+
[
|
|
566
|
+
'stateful-draft',
|
|
567
|
+
'Review and save a brief before signup; carry caller-scoped state into an account.',
|
|
568
|
+
],
|
|
572
569
|
['perplexity', 'A real SaaS API with bearer auth and a managed `secret`.'],
|
|
573
570
|
['bitcoin', 'API-key HTTP connector, custom auth header, and compute normalization.'],
|
|
574
571
|
[
|
|
@@ -203,7 +203,7 @@ export function renderConnectAnApiReference() {
|
|
|
203
203
|
'',
|
|
204
204
|
'### Set the secret for local runs',
|
|
205
205
|
'',
|
|
206
|
-
'Local
|
|
206
|
+
'Local authoring resolves explicit coordinates, then the complete project link, then deterministic local defaults; saved global coordinates do not redirect an unlinked project. Follow the diagnostic’s exact-target commands from the project directory for every missing secret and variable:',
|
|
207
207
|
'',
|
|
208
208
|
'```sh',
|
|
209
209
|
'# Canonical: writes to the effective local environment used by dev/test/devtools:',
|
|
@@ -220,7 +220,7 @@ export function renderConnectAnApiReference() {
|
|
|
220
220
|
'',
|
|
221
221
|
'### Prove real output',
|
|
222
222
|
'',
|
|
223
|
-
'`noodle validate` / `noodle test` prove a connector tool *compiles and registers* — not that its',
|
|
223
|
+
'`noodle validate` / `noodle test` without `--tool` prove a connector tool *compiles and registers* — not that its',
|
|
224
224
|
'mapping returns data. With the secret set, run a live read: `noodle tools call <read_tool> --args',
|
|
225
225
|
"'{…}'` executes the connector against the real API in-process. Confirm the mapped fields are populated,",
|
|
226
226
|
'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.',
|
|
@@ -11,7 +11,7 @@ export function renderEmbeddedAssistantOperationsReference() {
|
|
|
11
11
|
'noodle assistant embed --check --json --require-env EXAMPLE_DELEG_CLIENT_SECRET',
|
|
12
12
|
'```',
|
|
13
13
|
'',
|
|
14
|
-
'The check reports
|
|
14
|
+
'The check reports required and missing environment names, never their values. Use the exact command in an installed NOODLE-INTEGRATION.md, including its aliases and additional names, with the host environment exported; the CLI does not load application dotenv files. Pass `--surface public|mixed|authenticated` to match the deployment: `public` needs no backend client credentials. Public script-tag mounts need the service in `script-src`; the generated bundled React mount needs only `connect-src` and `frame-src` for that service. Unknown public mounts retain the conservative script check. CSP verifies an exact service origin, an env placeholder or a covering wildcard; dynamic expressions stay unverified. `--require-env` adds application-owned names and `--env-alias NAME=HOST_NAME` follows existing host naming.',
|
|
15
15
|
'',
|
|
16
16
|
'Read `evidence.levels` in order and stop at `evidence.firstUnproven`:',
|
|
17
17
|
'',
|
|
@@ -9,6 +9,7 @@ export function renderEmbeddedAssistantReference() {
|
|
|
9
9
|
'',
|
|
10
10
|
'- Architecture',
|
|
11
11
|
'- Select the architecture before code',
|
|
12
|
+
'- Install into the existing application',
|
|
12
13
|
'- Author and validate',
|
|
13
14
|
'- Product workflow guidance',
|
|
14
15
|
'- Customize the presentation',
|
|
@@ -68,6 +69,20 @@ export function renderEmbeddedAssistantReference() {
|
|
|
68
69
|
'',
|
|
69
70
|
'The architecture brief must state the selected topology, why it fits the named user and job, the two code owners and two local processes, credential and identity flow, routing authority, model owner, files expected to change, and the first requested evidence boundary. If identity/session ownership, exact origin, tenant-routing authority, model ownership, or evidence target is unavailable, return a blocked architecture brief naming the missing owner or decision and do not edit either codebase.',
|
|
70
71
|
'',
|
|
72
|
+
'## Install into the existing application',
|
|
73
|
+
'',
|
|
74
|
+
'Configure or reuse an existing capability before generating files. Public embedding uses the existing script or embed ID and needs no customer backend session/config route. Reuse application APIs and business functions; generate a thin handler only where the approved architecture identifies a missing stable boundary.',
|
|
75
|
+
'',
|
|
76
|
+
'For a supported host, first run `noodle assistant embed --framework nextjs --surface public --dry-run --json` in the customer application, substituting `authenticated` or `mixed` only for the selected surface. Read the returned recipe applicability, applicationSeams, generated contents/hashes, skipped conflicts and nextSteps. The output is an installation plan, not permission to change the repository.',
|
|
77
|
+
'',
|
|
78
|
+
'For the documented non-Node backend/static-frontend authenticated profile, discover the framework choice through `noodle commands --json` and follow the linked framework guide below. The installer supplies a session view, a fail-closed identity seam, real CSRF-enforced request tests, a browser wrapper and exact-destination CSRF transport tests. Keep the existing package managers, authentication middleware and same-origin proxy. Pass the existing CSRF token and user/tenant principalKey to the wrapper; the managed element supports injected fetch, so preserving CSRF does not require a custom renderer or Node production server. Unsupported combinations use the neutral contract, not a claimed qualified profile.',
|
|
79
|
+
'',
|
|
80
|
+
'Once local changes are authorized, rerun without `--dry-run`; never add `--force` to resolve a conflict automatically. Read the installed `NOODLE-INTEGRATION.md` and newly installed project skill before editing. Implement only the named session/business/mount seams and preserve the host framework, package manager, login and authorization. Mixed mode also requires an application-owned login transaction; the generated callback does not implement or verify that transaction.',
|
|
81
|
+
'',
|
|
82
|
+
'Use generated tests and independently maintained acceptance cases at the actual customer boundary. A static host check, a mock test or installed files cannot prove application authorization or production browser behavior. Missing identities, sandbox access, customer approval or a reachable service remain unverified. Record the exact application/Noodle revisions, package versions and environment for observed evidence; rerun affected checks after changes.',
|
|
83
|
+
'',
|
|
84
|
+
'Unsupported hosts use the framework-neutral integration contract below; do not claim they received a generated, qualified framework profile. Keep direct MCP and headless projections on the same TypeScript source, and preserve their separate identity requirements.',
|
|
85
|
+
'',
|
|
71
86
|
'## Author and validate',
|
|
72
87
|
'',
|
|
73
88
|
'`noodle init` and `noodle init --template widget` deliberately produce credential-free MCP Apps. Add an assistant declaration only when the product explicitly includes a customer-hosted assistant; do not make ordinary external-host widgets depend on model-provider settings.',
|
|
@@ -148,6 +163,16 @@ export function renderEmbeddedAssistantReference() {
|
|
|
148
163
|
'',
|
|
149
164
|
'#### Complete mixed-mode handoff',
|
|
150
165
|
'',
|
|
166
|
+
'For a small SaaS onboarding flow, first read the bundled [stateful-draft example](../examples/stateful-draft/README.md). Compose the existing capabilities; do not introduce an onboarding platform API, workflow engine, research pipeline, or second identity provider.',
|
|
167
|
+
'',
|
|
168
|
+
'Start from one useful result the visitor can see before signup. Ask only for missing information, one short question at a time. Show an editable preview, and offer an account only when it unlocks a meaningful next step. Keep the ordinary signup route available. Research and document parsing are optional enrichment, never required because the flow is conversational.',
|
|
169
|
+
'',
|
|
170
|
+
'Use a finite-TTL caller state handle only if the draft needs server persistence. Opt it into `claimOnAuthentication` when it should move to the verified account. An explicit typed read tool supplies the current revision; a typed patch tool sends that revision and the complete reviewed value. Widget state is a display cache, never proof of a save. A failed or missing result must not increment the revision, mark the draft saved, or silently retry a conflicting write.',
|
|
171
|
+
'',
|
|
172
|
+
'Keep the final business action in the customer API. Map the reviewed draft to its existing create/update operation after authentication, with confirmation and the backend’s existing authorization and idempotency. Ticket adoption transfers temporary state, not a CRM record or completed onboarding.',
|
|
173
|
+
'',
|
|
174
|
+
'Prove this journey before calling it ready: useful anonymous preview; actual saved state; cancelled/expired signup; verified signup with the same draft; a destination conflict without an automatic merge; and no business write merely because login succeeded. A synthetic login demonstrates the integration shape but is not evidence that the customer identity system is connected.',
|
|
175
|
+
'',
|
|
151
176
|
'1. **Capture the ticket.** The widget raises `assistant-sign-in-requested` with a single-use `signInTicket`. POST it to the host application same-origin backend and bind it to the short-lived login transaction; keep it out of query strings, logs, analytics, and durable browser storage.',
|
|
152
177
|
'2. **Use the existing login.** Send the visitor through the host application full-page redirect for sign-in or sign-up. Noodle never becomes the customer identity provider.',
|
|
153
178
|
'3. **Elevate on the backend.** After authentication, recover the bound ticket and call `createAssistantSession({ ..., signInTicket })` with the verified user, server-owned routing, backend client credentials, and the exact **origin the conversation will continue on**. The allowed destination may differ from the anonymous marketing origin; successful elevation rebinds the session to it.',
|
|
@@ -251,39 +276,20 @@ export function renderEmbeddedAssistantReference() {
|
|
|
251
276
|
'',
|
|
252
277
|
'Read the customer repository lockfile or `packageManager` field and install `@noodleseed/assistant` with that existing package manager; never introduce a second lockfile.',
|
|
253
278
|
'',
|
|
254
|
-
'
|
|
279
|
+
'Use the installed same-origin route and `createAssistantSessionHandler` from `@noodleseed/assistant/server`; do not regenerate guards, JSON parsing or token-exchange infrastructure. The only identity seam is `authenticateAssistantRequest` in `lib/noodle-assistant-auth.ts`.',
|
|
255
280
|
'',
|
|
256
|
-
'The route must return a JSON `401` for a signed-out caller rather than an HTML login redirect, require JSON, and compare the request against the exact configured Origin before exchange. The managed renderer sends same-origin cookies but does not invent an application CSRF token.
|
|
281
|
+
'The route must return a JSON `401` for a signed-out caller rather than an HTML login redirect, require JSON, and compare the request against the exact configured Origin before exchange. The managed renderer sends same-origin cookies but does not invent an application CSRF token. Preserve the host token-based CSRF middleware: inject a same-origin-only token fetch into the managed element before mounting, as the Django/Vue profile does; a custom renderer is not required. Invalid CSRF may correctly fail before authentication. Resolve claims and connector routes from the authenticated user and server-owned membership only.',
|
|
257
282
|
'',
|
|
258
283
|
'For the complete framework-neutral server-to-server HTTP exchange in a non-Node host, link to the [Django and Vue guide](https://docs.noodleseed.dev/docs/guides/embedded-assistant-django-vue); keep its framework-specific middleware and mounting mechanics there rather than copying them into agent instructions.',
|
|
259
284
|
'',
|
|
260
|
-
'
|
|
261
|
-
'
|
|
262
|
-
'',
|
|
263
|
-
'export async function POST(request: Request) {',
|
|
264
|
-
' const user = await requireCurrentUser(request);',
|
|
265
|
-
' const { context } = await request.json();',
|
|
266
|
-
' const session = await createAssistantSession({',
|
|
267
|
-
' serviceUrl: process.env.NOODLE_SERVICE_URL!,',
|
|
268
|
-
' clientId: process.env.NOODLE_ASSISTANT_CLIENT_ID!,',
|
|
269
|
-
' clientSecret: process.env.NOODLE_ASSISTANT_CLIENT_SECRET!,',
|
|
270
|
-
' origin: process.env.PUBLIC_APP_ORIGIN!,',
|
|
271
|
-
' user: {',
|
|
272
|
-
' id: user.id,',
|
|
273
|
-
' email: user.email,',
|
|
274
|
-
' roles: user.roles,',
|
|
275
|
-
' scopes: user.scopes,',
|
|
276
|
-
' },',
|
|
277
|
-
' context,',
|
|
278
|
-
' // Saved, backend-verified user preferences outrank browser hints.',
|
|
279
|
-
' preferences: { locale: user.locale, timeZone: user.timeZone },',
|
|
280
|
-
' });',
|
|
281
|
-
' return Response.json(session);',
|
|
282
|
-
'}',
|
|
283
|
-
'```',
|
|
285
|
+
'Return `AssistantSessionIdentity | null` from the adapter. Null means signed out; service failure must throw rather than masquerade as signed out. Derive `user`, claims, preferences and routes from the existing verified session/membership. The maintained handler owns exact-Origin/JSON checks, bounded flat context, no-store JSON failures, a 15-second deadline, no redirects and no exchange retries. For mixed-mode continuation, return a `signInTicket` only from the backend-bound login transaction; never take it directly from browser JSON.',
|
|
286
|
+
'',
|
|
287
|
+
'For saved presentation preferences, return `preferences: { locale: user.locale, timeZone: user.timeZone }` beside the verified `user`. Omit unknown values; browser hints are not verified account preferences.',
|
|
284
288
|
'',
|
|
285
289
|
'Authenticate before exchange. Pass backend-verified `user.roles` and OAuth-style `user.scopes` separately; they govern the same per-tool authorization rules as verified MCP bearer claims. Source `origin` from trusted server configuration or strictly match the request origin against the same exact allowlist; never accept an arbitrary request header. Treat page context as untrusted model context, never authorization. Forward the helper response unchanged.',
|
|
286
290
|
'',
|
|
291
|
+
"Run the generated `test/noodle-assistant.test.ts` with the application's Vitest runner (add the dev dependency using its existing package manager if absent). It tests the real generated route with synthetic identities. Separately exercise the real session function with signed-out, tenant-A, tenant-B and authorized fixtures before claiming integration proof. A green mock suite does not prove customer authorization.",
|
|
292
|
+
'',
|
|
287
293
|
'`serviceUrl` is the Noodle Seed control-plane base URL: the value `noodle assistant clients create` prints, also stored as `serviceUrl` in `deployment.json`. It is NOT the deployment MCP endpoint (`url`, which ends in `/v1/mcp` and rejects session exchange). Never probe or guess endpoints with real credentials.',
|
|
288
294
|
'',
|
|
289
295
|
'### Route customer endpoints from the backend',
|
|
@@ -30,7 +30,7 @@ export function renderBuildAnMcpServerReference() {
|
|
|
30
30
|
'5. **Author in TypeScript.** Follow `references/authoring-workflow.md` for connector and flow patterns, `references/tool-design.md` for the model-facing tool surface, and `references/sdk-surface.md` for exact builders. These are this route’s complete canonical support set; use the router lookup catalog only when observed evidence names a different concern.',
|
|
31
31
|
' MCP protocol versions are platform-owned and negotiated automatically at the serving endpoint. Do not add protocol-version settings to server options, `noodle.json`, app manifests, or deployment configuration.',
|
|
32
32
|
'6. **Validate and repair.** Run `noodle validate --json`. Parse `error.errors[]`, repair the cited `path`, and rerun validation. Consult the lookup catalog only for the specific reported error code; do not open another reference speculatively.',
|
|
33
|
-
'7. **Run
|
|
33
|
+
'7. **Run local behavior.** Start from the generated tests and run `npm test`: compile, tools/list, representative result and invalid-input rejection. `noodle test --json` without `--tool` is registration-only; repair failures before claiming a working capability.',
|
|
34
34
|
'8. **Prove external behavior.** For connector-backed reads, set credentials through the effective local target and run a safe representative `noodle tools call`. Confirm populated mapped fields from real output, not merely successful registration.',
|
|
35
35
|
'9. **Stop at the requested boundary.** Do not add an App, host test, hosted environment, publication work, or deployment unless the user requested that outcome. Deploy only when the selected route or the user explicitly requires it.',
|
|
36
36
|
'',
|
|
@@ -40,7 +40,7 @@ export function renderBuildAnMcpServerReference() {
|
|
|
40
40
|
'',
|
|
41
41
|
'- **Authoring:** the requested TypeScript behavior exists with typed inputs and outputs, and the product-guide decision and reason are recorded.',
|
|
42
42
|
'- **Compilation:** `noodle validate --json` returned success.',
|
|
43
|
-
'- **Local
|
|
43
|
+
'- **Local behavior:** the generated/adapted suite passed a representative call and a negative case. Synthetic fixtures prove only their configured behavior.',
|
|
44
44
|
'- **Connector reality:** a representative safe read via `noodle tools call` returned populated mapped fields. This is required for connector-backed work.',
|
|
45
45
|
'- **Higher levels:** explicitly report host, deployment, and production checks as not run unless they were separately requested and evidenced.',
|
|
46
46
|
'',
|
|
@@ -27,6 +27,7 @@ export function renderVerifyAndRecoverReference() {
|
|
|
27
27
|
'1. **Compile** — the TypeScript build and authoring import surface are valid.',
|
|
28
28
|
'2. **Validate** — `noodle validate --json` accepts the Noodle contract.',
|
|
29
29
|
'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`.',
|
|
30
|
+
' To prove a safe read, explicitly supply `--tool <read_tool> --args <json>` or use `noodle tools call <read_tool> --args <json> --json`. These commands fail on protocol/tool errors, missing or incomplete results, and a declared output-schema mismatch. `input_required` is not completion: use Devtools for interactive input, never fabricate approval or retry an uncertain write.',
|
|
30
31
|
'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.',
|
|
31
32
|
'5. **Real API** — a representative safe `noodle tools call` proves connector credentials, transport, observed mapping, and populated data.',
|
|
32
33
|
'6. **App compliance** — `noodle check --json` and local devtools prove the App contract and intended states.',
|
|
@@ -57,7 +58,7 @@ export function renderVerifyAndRecoverReference() {
|
|
|
57
58
|
'## Recovery paths',
|
|
58
59
|
'',
|
|
59
60
|
'- Compile/validation: repair the exact import, schema, or reported path, then rerun that command without freeform changes.',
|
|
60
|
-
'- Local boot/smoke: use the
|
|
61
|
+
'- Local boot/smoke: use all reported missing variable and secret names and the exact-target recovery commands together. Values stay outside the diagnostic. `error.detail.reason` identifies incomplete/failed operation evidence; RPC message/data and continuation state are deliberately not copied. A failed response does not prove a write was rolled back.',
|
|
61
62
|
'- Real API: distinguish authentication, reachability, legitimate empty results, and broken response mappings before changing code.',
|
|
62
63
|
'- App: repair the cited contract or state in `noodle check --json`, then confirm it in devtools before attempting a host.',
|
|
63
64
|
'- Host/deployment/production: confirm revision, target, identity, and configuration independently; do not infer one from another.',
|
|
@@ -290,6 +290,12 @@ export interface AssistantSurfaceConfig {
|
|
|
290
290
|
readonly webmcp?: {
|
|
291
291
|
readonly enabled?: boolean;
|
|
292
292
|
};
|
|
293
|
+
/**
|
|
294
|
+
* Present only on a public or mixed surface; an authenticated one never carries it.
|
|
295
|
+
*
|
|
296
|
+
* @see PublicWebsiteInput.continuity
|
|
297
|
+
*/
|
|
298
|
+
readonly continuity?: AssistantContinuityDeclaration;
|
|
293
299
|
}
|
|
294
300
|
export interface EmbeddedAssistantConfig extends AssistantUiOptions {
|
|
295
301
|
readonly model: AssistantModel;
|
|
@@ -2,7 +2,7 @@ import type { ConnectorRef } from './connectors.js';
|
|
|
2
2
|
import type { AmbientContextOptions } from './context.js';
|
|
3
3
|
import type { ResourceContext, ToolOptions } from './server.js';
|
|
4
4
|
export type SymbolicScope = Ref & Record<string, Ref>;
|
|
5
|
-
export type ConnectorClient = Record<string, (args?: Readonly<Record<string, unknown>>) =>
|
|
5
|
+
export type ConnectorClient = Record<string, (args?: Readonly<Record<string, unknown>>) => SymbolicScope>;
|
|
6
6
|
type RecordedStep = {
|
|
7
7
|
readonly id: string;
|
|
8
8
|
readonly use: string;
|
|
@@ -383,15 +383,15 @@ export const ASSISTANT_COMMAND = {
|
|
|
383
383
|
subcommand({
|
|
384
384
|
...SUBCOMMAND_FIELDS,
|
|
385
385
|
name: 'embed',
|
|
386
|
-
summary: '
|
|
386
|
+
summary: 'Install the selected website integration with explicit application-owned seams and verification guidance.',
|
|
387
387
|
flags: [
|
|
388
388
|
flag({
|
|
389
389
|
...FLAG_FIELDS,
|
|
390
390
|
name: 'framework',
|
|
391
391
|
type: 'string',
|
|
392
392
|
value: '<framework>',
|
|
393
|
-
summary: 'Embedding
|
|
394
|
-
constraints: { choices: ['nextjs'], default: 'nextjs' },
|
|
393
|
+
summary: 'Embedding profile: nextjs or authenticated django-vue.',
|
|
394
|
+
constraints: { choices: ['nextjs', 'django-vue'], default: 'nextjs' },
|
|
395
395
|
}),
|
|
396
396
|
flag({
|
|
397
397
|
...FLAG_FIELDS,
|
|
@@ -407,6 +407,12 @@ export const ASSISTANT_COMMAND = {
|
|
|
407
407
|
type: 'boolean',
|
|
408
408
|
summary: 'Overwrite user-modified scaffold files.',
|
|
409
409
|
}),
|
|
410
|
+
flag({
|
|
411
|
+
...FLAG_FIELDS,
|
|
412
|
+
name: 'dry-run',
|
|
413
|
+
type: 'boolean',
|
|
414
|
+
summary: 'Preview generated files, hashes, conflicts, and next steps without writing files.',
|
|
415
|
+
}),
|
|
410
416
|
flag({
|
|
411
417
|
...FLAG_FIELDS,
|
|
412
418
|
name: 'no-agents',
|
|
@@ -432,7 +438,7 @@ export const ASSISTANT_COMMAND = {
|
|
|
432
438
|
name: 'surface',
|
|
433
439
|
type: 'string',
|
|
434
440
|
value: '<mode>',
|
|
435
|
-
summary: 'Surface
|
|
441
|
+
summary: 'Surface to install or check; public omits backend exchange, mixed adds the existing-login handoff.',
|
|
436
442
|
constraints: { choices: ['authenticated', 'public', 'mixed'], default: 'authenticated' },
|
|
437
443
|
}),
|
|
438
444
|
flag({
|
|
@@ -9,8 +9,12 @@ function largestWidgetContributors(manifest) {
|
|
|
9
9
|
try {
|
|
10
10
|
const parsed = JSON.parse(manifest);
|
|
11
11
|
const contributors = (parsed.widgets ?? [])
|
|
12
|
-
.
|
|
13
|
-
|
|
12
|
+
.flatMap((widget) => {
|
|
13
|
+
const html = widget.html ?? widget.view?.compiledHtml;
|
|
14
|
+
return typeof widget.name === 'string' && typeof html === 'string'
|
|
15
|
+
? [{ name: widget.name, bytes: Buffer.byteLength(html) }]
|
|
16
|
+
: [];
|
|
17
|
+
})
|
|
14
18
|
.sort((left, right) => right.bytes - left.bytes)
|
|
15
19
|
.slice(0, 3);
|
|
16
20
|
return contributors.length === 0
|
|
@@ -15,7 +15,7 @@ export type ActiveDeployProvenance = {
|
|
|
15
15
|
readonly ownerSubject: string | undefined;
|
|
16
16
|
} | undefined;
|
|
17
17
|
/** Resolve the durable owner binding while keeping legacy creator-only records readable. */
|
|
18
|
-
export declare function deploymentOwnerSubject(record: DeployRecord): string | undefined;
|
|
18
|
+
export declare function deploymentOwnerSubject(record: Pick<DeployRecord, 'ownerSubject' | 'createdBySubject'>): string | undefined;
|
|
19
19
|
export declare function missingCapabilityErrors(required: readonly CapabilityName[], available: readonly CapabilityName[]): readonly DeployError[];
|
|
20
20
|
export declare function missingSecretErrors(bindings: readonly SecretBinding[], secrets: Readonly<Record<string, string>>): DeployError[];
|
|
21
21
|
export declare function missingVariableErrors(bindings: readonly string[], variables: Readonly<Record<string, string>>): DeployError[];
|