@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.
- package/README.md +17 -0
- package/dist/auth/adapter.js +9 -6
- package/dist/auth/routes.js +3 -2
- package/dist/build/compiler.js +1 -1
- package/dist/infrastructure/bundle.js +16 -3
- package/dist/infrastructure/generate.js +9 -1
- package/dist/infrastructure/generateAuth.js +51 -0
- package/dist/infrastructure/wrangler.js +19 -4
- package/dist/kernel/binds.d.ts +0 -3
- package/dist/kernel/contracts.d.ts +1 -1
- package/dist/kernel/contracts.js +4 -4
- package/dist/kernel/dialect/common.d.ts +0 -1
- package/dist/kernel/driver/postgres.js +3 -2
- package/dist/kernel/mcp-apps.js +1 -1
- package/dist/kernel/mcp-handler.js +1 -1
- package/dist/kernel/mcp.d.ts +5 -1
- package/dist/kernel/mcp.js +2 -1
- package/dist/kernel/scalars.js +3 -2
- package/dist/kernel/web-index.js +40 -0
- package/dist/kernel/web.js +3 -37
- package/dist/usecase/publishing.js +1 -1
- package/dist/usecase/site.js +0 -1
- package/dist/usecase/validation.js +8 -0
- package/docs/examples/README.md +1 -1
- package/docs/examples/app-shell/README.md +6 -2
- package/docs/examples/app-shell/package.json +3 -3
- package/docs/examples/app-shell/src/auth.ts +3 -2
- package/docs/examples/app-shell/src/service.ts +2 -2
- package/docs/examples/club-events/manifests/club-events.yaml +7 -0
- package/docs/examples/club-events/src/handlers.ts +1 -1
- package/docs/examples/purchasing/manifests/purchasing.yaml +16 -0
- package/docs/examples/purchasing/src/handlers.ts +1 -1
- package/docs/handbook/cloudflare/authentication.md +21 -4
- package/docs/handbook/cloudflare/chatgpt-sites.md +4 -2
- package/docs/handbook/cloudflare/deploy-and-operate.md +24 -1
- package/docs/handbook/cloudflare/media-r2.md +2 -3
- package/docs/handbook/cloudflare/service-entry.md +14 -4
- package/docs/handbook/concepts/runtime-and-adapters.md +1 -1
- package/docs/handbook/examples/hub.md +1 -1
- package/docs/handbook/guides/agent-setup.md +4 -4
- package/docs/handbook/guides/agent-workflow-acceptance.md +222 -0
- package/docs/handbook/guides/mcp-apps.md +78 -1
- package/docs/handbook/guides/native-admin.md +4 -0
- package/docs/handbook/guides/oauth.md +58 -0
- package/docs/handbook/guides/typed-queries.md +35 -0
- package/docs/handbook/reference/procedure.md +1 -1
- package/docs/handbook/reference/surface.md +6 -2
- package/docs/handbook/reference/trigger.md +9 -0
- package/docs/handbook/releases/index.md +3 -3
- package/docs/handbook/start/project-and-cli.md +9 -1
- package/docs/skills/develop/SKILL.md +43 -16
- package/docs/skills/integrate/SKILL.md +4 -9
- package/docs/skills/provision/SKILL.md +15 -12
- package/docs/skills/update/SKILL.md +19 -18
- package/package.json +2 -2
- package/skills/README.md +1 -1
- package/skills/mantle/SKILL.md +35 -13
- package/skills/mantle/references/local-testing.md +5 -0
- package/skills/mantle/references/website.md +6 -4
- package/docs/skills/develop/mcp-app.md +0 -39
- 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
|