@aotter/mantle 0.2.0-alpha.8 → 0.2.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +17 -0
  2. package/dist/auth/adapter.js +9 -6
  3. package/dist/auth/routes.js +3 -2
  4. package/dist/build/compiler.js +1 -1
  5. package/dist/infrastructure/bundle.js +16 -3
  6. package/dist/infrastructure/generate.js +9 -1
  7. package/dist/infrastructure/generateAuth.js +51 -0
  8. package/dist/infrastructure/wrangler.js +19 -4
  9. package/dist/kernel/binds.d.ts +0 -3
  10. package/dist/kernel/contracts.d.ts +1 -1
  11. package/dist/kernel/contracts.js +4 -4
  12. package/dist/kernel/dialect/common.d.ts +0 -1
  13. package/dist/kernel/driver/postgres.js +3 -2
  14. package/dist/kernel/mcp-apps.js +1 -1
  15. package/dist/kernel/mcp-handler.js +1 -1
  16. package/dist/kernel/mcp.d.ts +5 -1
  17. package/dist/kernel/mcp.js +2 -1
  18. package/dist/kernel/scalars.js +3 -2
  19. package/dist/kernel/web-index.js +40 -0
  20. package/dist/kernel/web.js +3 -37
  21. package/dist/usecase/publishing.js +1 -1
  22. package/dist/usecase/site.js +0 -1
  23. package/dist/usecase/validation.js +8 -0
  24. package/docs/examples/README.md +1 -1
  25. package/docs/examples/app-shell/README.md +6 -2
  26. package/docs/examples/app-shell/package.json +3 -3
  27. package/docs/examples/app-shell/src/auth.ts +3 -2
  28. package/docs/examples/app-shell/src/service.ts +2 -2
  29. package/docs/examples/club-events/manifests/club-events.yaml +7 -0
  30. package/docs/examples/club-events/src/handlers.ts +1 -1
  31. package/docs/examples/purchasing/manifests/purchasing.yaml +16 -0
  32. package/docs/examples/purchasing/src/handlers.ts +1 -1
  33. package/docs/handbook/cloudflare/authentication.md +21 -4
  34. package/docs/handbook/cloudflare/chatgpt-sites.md +4 -2
  35. package/docs/handbook/cloudflare/deploy-and-operate.md +24 -1
  36. package/docs/handbook/cloudflare/media-r2.md +2 -3
  37. package/docs/handbook/cloudflare/service-entry.md +14 -4
  38. package/docs/handbook/concepts/runtime-and-adapters.md +1 -1
  39. package/docs/handbook/examples/hub.md +1 -1
  40. package/docs/handbook/guides/agent-setup.md +4 -4
  41. package/docs/handbook/guides/agent-workflow-acceptance.md +222 -0
  42. package/docs/handbook/guides/mcp-apps.md +78 -1
  43. package/docs/handbook/guides/native-admin.md +4 -0
  44. package/docs/handbook/guides/oauth.md +58 -0
  45. package/docs/handbook/guides/typed-queries.md +35 -0
  46. package/docs/handbook/reference/procedure.md +1 -1
  47. package/docs/handbook/reference/surface.md +6 -2
  48. package/docs/handbook/reference/trigger.md +9 -0
  49. package/docs/handbook/releases/index.md +3 -3
  50. package/docs/handbook/start/project-and-cli.md +9 -1
  51. package/docs/skills/develop/SKILL.md +43 -16
  52. package/docs/skills/integrate/SKILL.md +4 -9
  53. package/docs/skills/provision/SKILL.md +15 -12
  54. package/docs/skills/update/SKILL.md +19 -18
  55. package/package.json +2 -2
  56. package/skills/README.md +1 -1
  57. package/skills/mantle/SKILL.md +35 -13
  58. package/skills/mantle/references/local-testing.md +5 -0
  59. package/skills/mantle/references/website.md +6 -4
  60. package/docs/skills/develop/mcp-app.md +0 -39
  61. package/skills/.keep +0 -0
@@ -1,39 +0,0 @@
1
- # Recipe: an MCP App for members
2
-
3
- ## Native applications
4
-
5
- Read the installed MCP App contract. The SDK's generic hook attaches only the resources the app selects;
6
- only selected modules enter the service.
7
-
8
- ```ts
9
- import type { McpApps } from '@aotter/mantle/mcp';
10
- import { mcp } from '../generated/mcp.js';
11
- const memberApp: McpApps = { resources: [{
12
- uri: 'ui://shop/my-orders',
13
- name: 'my-orders-app',
14
- renders: ['my_orders'], // the tool for the declared public View my-orders
15
- html: async () => (await import('./member-app.js')).memberHtml,
16
- }] };
17
- const tools = mcp({ db, caller, handlers, apps: { public: memberApp } });
18
- ```
19
-
20
- Each endpoint accepts one contributor or an array. The separate
21
- `@aotter/mantle-admin` package contributes its admin App through this same
22
- `apps.admin` hook; it owns `ui://mantle-admin/…`. App resources use their own
23
- `ui://<app>/…` namespace. Duplicate resource URI/name, conflicting `renders`,
24
- or `renders`/`appOnly` naming an unavailable endpoint tool (or a Procedure for
25
- `appOnly`) fail when `mcp(...)` is built; with a request-bound tool table, the
26
- tool names are checked on the first matching request. Only clients that
27
- declare no MCP Apps support see no UI resources; a request that advertises no
28
- capabilities at all is treated as supported.
29
-
30
- Use `renders` for a declared tool; `appOnly` optionally hides it from non-UI
31
- clients. Import HTML lazily; it carries no secrets or caller data. Tool results
32
- use the caller's SQL policy, and an App cannot authorize a hidden admin tool.
33
- Generic interaction components and controllers remain in `@aotter/mantle-ui`;
34
- Admin-specific controllers/catalogues belong to `@aotter/mantle-admin`.
35
-
36
- Verify tools/list metadata, resources/read, actual tool calls and a host-rendered
37
- member App. Test anonymous/member isolation and resource conflicts. Never retry
38
- unknown writes blindly; retain OCC and re-read state after an uncertain outcome.
39
- Commit generated output and run generation with `--check` before deployment.
package/skills/.keep DELETED
File without changes