@frontmcp/sdk 1.3.0 → 1.4.1
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 +65 -60
- package/agent/agent.scope.d.ts +164 -0
- package/agent/agent.scope.d.ts.map +1 -1
- package/app/instances/app.esm.instance.d.ts.map +1 -1
- package/app/instances/app.remote.instance.d.ts.map +1 -1
- package/auth/auth-ui/auth-ui.contract.d.ts +149 -0
- package/auth/auth-ui/auth-ui.contract.d.ts.map +1 -0
- package/auth/auth-ui/auth-ui.registry.d.ts +151 -0
- package/auth/auth-ui/auth-ui.registry.d.ts.map +1 -0
- package/auth/auth-ui/auth-ui.render.d.ts +49 -0
- package/auth/auth-ui/auth-ui.render.d.ts.map +1 -0
- package/auth/auth-ui/auth-ui.state.d.ts +62 -0
- package/auth/auth-ui/auth-ui.state.d.ts.map +1 -0
- package/auth/auth-ui/index.d.ts +24 -0
- package/auth/auth-ui/index.d.ts.map +1 -0
- package/auth/auth.registry.d.ts.map +1 -1
- package/auth/authorized-apps.utils.d.ts +51 -0
- package/auth/authorized-apps.utils.d.ts.map +1 -0
- package/auth/consent-tools.helper.d.ts +26 -0
- package/auth/consent-tools.helper.d.ts.map +1 -0
- package/auth/consent.utils.d.ts +62 -0
- package/auth/consent.utils.d.ts.map +1 -0
- package/auth/credentials/credentials.context-extension.d.ts +63 -0
- package/auth/credentials/credentials.context-extension.d.ts.map +1 -0
- package/auth/credentials/credentials.providers.d.ts +40 -0
- package/auth/credentials/credentials.providers.d.ts.map +1 -0
- package/auth/credentials/index.d.ts +3 -0
- package/auth/credentials/index.d.ts.map +1 -0
- package/auth/flows/auth.verify.flow.d.ts.map +1 -1
- package/auth/flows/oauth.auth-ui.flow.d.ts +53 -0
- package/auth/flows/oauth.auth-ui.flow.d.ts.map +1 -0
- package/auth/flows/oauth.authorize.flow.d.ts +51 -9
- package/auth/flows/oauth.authorize.flow.d.ts.map +1 -1
- package/auth/flows/oauth.callback.flow.d.ts +118 -5
- package/auth/flows/oauth.callback.flow.d.ts.map +1 -1
- package/auth/flows/oauth.connect.flow.d.ts +89 -0
- package/auth/flows/oauth.connect.flow.d.ts.map +1 -0
- package/auth/flows/oauth.provider-callback.flow.d.ts +34 -4
- package/auth/flows/oauth.provider-callback.flow.d.ts.map +1 -1
- package/auth/flows/oauth.register.flow.d.ts +16 -20
- package/auth/flows/oauth.register.flow.d.ts.map +1 -1
- package/auth/flows/oauth.token.flow.d.ts +2 -2
- package/auth/flows/oauth.token.flow.d.ts.map +1 -1
- package/auth/flows/oauth.userinfo.flow.d.ts +67 -0
- package/auth/flows/oauth.userinfo.flow.d.ts.map +1 -0
- package/auth/flows/session.verify.flow.d.ts +2 -2
- package/auth/flows/session.verify.flow.d.ts.map +1 -1
- package/auth/flows/well-known.jwks.flow.d.ts +3 -3
- package/auth/flows/well-known.oauth-authorization-server.flow.d.ts +3 -2
- package/auth/flows/well-known.oauth-authorization-server.flow.d.ts.map +1 -1
- package/auth/flows/well-known.prm.flow.d.ts +1 -1
- package/auth/flows/well-known.prm.flow.d.ts.map +1 -1
- package/auth/instances/instance.local-primary-auth.d.ts +226 -12
- package/auth/instances/instance.local-primary-auth.d.ts.map +1 -1
- package/auth/secure-store/index.d.ts +3 -0
- package/auth/secure-store/index.d.ts.map +1 -0
- package/auth/secure-store/secure-store.context-extension.d.ts +61 -0
- package/auth/secure-store/secure-store.context-extension.d.ts.map +1 -0
- package/auth/secure-store/secure-store.providers.d.ts +36 -0
- package/auth/secure-store/secure-store.providers.d.ts.map +1 -0
- package/common/decorators/agent.decorator.d.ts +32 -0
- package/common/decorators/agent.decorator.d.ts.map +1 -1
- package/common/decorators/app.decorator.d.ts.map +1 -1
- package/common/decorators/front-mcp.decorator.d.ts.map +1 -1
- package/common/decorators/skill.decorator.d.ts.map +1 -1
- package/common/decorators/tool.decorator.d.ts +44 -0
- package/common/decorators/tool.decorator.d.ts.map +1 -1
- package/common/entries/scope.entry.d.ts +7 -0
- package/common/entries/scope.entry.d.ts.map +1 -1
- package/common/entries/skill.entry.d.ts +22 -1
- package/common/entries/skill.entry.d.ts.map +1 -1
- package/common/entries/tool.entry.d.ts +17 -0
- package/common/entries/tool.entry.d.ts.map +1 -1
- package/common/interfaces/internal/primary-auth-provider.interface.d.ts +18 -0
- package/common/interfaces/internal/primary-auth-provider.interface.d.ts.map +1 -1
- package/common/interfaces/tool.interface.d.ts +26 -0
- package/common/interfaces/tool.interface.d.ts.map +1 -1
- package/common/metadata/app.metadata.d.ts +472 -0
- package/common/metadata/app.metadata.d.ts.map +1 -1
- package/common/metadata/front-mcp.metadata.d.ts +1773 -52
- package/common/metadata/front-mcp.metadata.d.ts.map +1 -1
- package/common/metadata/index.d.ts +1 -0
- package/common/metadata/index.d.ts.map +1 -1
- package/common/metadata/output-policy.d.ts +82 -0
- package/common/metadata/output-policy.d.ts.map +1 -0
- package/common/metadata/skill.metadata.d.ts +45 -1
- package/common/metadata/skill.metadata.d.ts.map +1 -1
- package/common/metadata/tool-ui.metadata.d.ts +1 -1
- package/common/metadata/tool-ui.metadata.d.ts.map +1 -1
- package/common/metadata/tool.metadata.d.ts +65 -0
- package/common/metadata/tool.metadata.d.ts.map +1 -1
- package/common/schemas/http-output.schema.d.ts +25 -25
- package/common/schemas/http-output.schema.d.ts.map +1 -1
- package/common/tokens/app.tokens.d.ts.map +1 -1
- package/common/tokens/front-mcp.tokens.d.ts.map +1 -1
- package/common/tokens/skill.tokens.d.ts +2 -0
- package/common/tokens/skill.tokens.d.ts.map +1 -1
- package/common/tokens/tool.tokens.d.ts +1 -0
- package/common/tokens/tool.tokens.d.ts.map +1 -1
- package/common/types/auth/session.types.d.ts +2 -2
- package/common/types/options/auth/index.d.ts +4 -4
- package/common/types/options/auth/index.d.ts.map +1 -1
- package/common/types/options/auth/interfaces.d.ts +1 -1
- package/common/types/options/auth/interfaces.d.ts.map +1 -1
- package/common/types/options/auth/orchestrated.schema.d.ts +1 -1
- package/common/types/options/auth/orchestrated.schema.d.ts.map +1 -1
- package/common/types/options/auth/shared.schemas.d.ts +2 -2
- package/common/types/options/auth/shared.schemas.d.ts.map +1 -1
- package/common/types/options/http/index.d.ts +1 -1
- package/common/types/options/http/index.d.ts.map +1 -1
- package/common/types/options/http/interfaces.d.ts +56 -1
- package/common/types/options/http/interfaces.d.ts.map +1 -1
- package/common/types/options/http/schema.d.ts +15 -0
- package/common/types/options/http/schema.d.ts.map +1 -1
- package/common/types/options/session/schema.d.ts +3 -3
- package/common/types/options/transport/schema.d.ts +1 -1
- package/common/utils/caller-dir.utils.d.ts +15 -0
- package/common/utils/caller-dir.utils.d.ts.map +1 -0
- package/common/utils/index.d.ts +1 -0
- package/common/utils/index.d.ts.map +1 -1
- package/errors/index.d.ts +3 -1
- package/errors/index.d.ts.map +1 -1
- package/errors/mcp.error.d.ts +36 -2
- package/errors/mcp.error.d.ts.map +1 -1
- package/errors/tool-credentials-required.error.d.ts +70 -0
- package/errors/tool-credentials-required.error.d.ts.map +1 -0
- package/esm/index.mjs +6553 -2688
- package/flows/flow.instance.d.ts.map +1 -1
- package/front-mcp/front-mcp.d.ts +52 -32
- package/front-mcp/front-mcp.d.ts.map +1 -1
- package/front-mcp/front-mcp.providers.d.ts +700 -8
- package/front-mcp/front-mcp.providers.d.ts.map +1 -1
- package/index.d.ts +29 -4
- package/index.d.ts.map +1 -1
- package/index.js +7138 -3307
- package/package.json +28 -29
- package/scope/flows/http.request.flow.d.ts +18 -1
- package/scope/flows/http.request.flow.d.ts.map +1 -1
- package/scope/optional-dependency.util.d.ts +39 -0
- package/scope/optional-dependency.util.d.ts.map +1 -0
- package/scope/scope.instance.d.ts +17 -0
- package/scope/scope.instance.d.ts.map +1 -1
- package/scope/scope.utils.d.ts.map +1 -1
- package/server/adapters/express.host.adapter.d.ts.map +1 -1
- package/server/custom-routes.helper.d.ts +81 -0
- package/server/custom-routes.helper.d.ts.map +1 -0
- package/skill/flows/http/llm-full-txt.flow.d.ts +1 -1
- package/skill/flows/http/llm-txt.flow.d.ts +1 -1
- package/skill/flows/http/skills-api.flow.d.ts +18 -1
- package/skill/flows/http/skills-api.flow.d.ts.map +1 -1
- package/skill/flows/load-skill.flow.d.ts +7 -0
- package/skill/flows/load-skill.flow.d.ts.map +1 -1
- package/skill/flows/search-skills.flow.d.ts +13 -0
- package/skill/flows/search-skills.flow.d.ts.map +1 -1
- package/skill/index.d.ts +1 -0
- package/skill/index.d.ts.map +1 -1
- package/skill/sep-2640/resources/skill-file.resource.d.ts.map +1 -1
- package/skill/sep-2640/resources/skill-index.resource.d.ts.map +1 -1
- package/skill/sep-2640/resources/skill-md.resource.d.ts.map +1 -1
- package/skill/sep-2640/sep-2640.per-skill.d.ts.map +1 -1
- package/skill/skill-authorities.helper.d.ts +100 -0
- package/skill/skill-authorities.helper.d.ts.map +1 -0
- package/skill/skill.instance.d.ts.map +1 -1
- package/skill/skill.registry.d.ts +34 -0
- package/skill/skill.registry.d.ts.map +1 -1
- package/task/helpers/cli-task-runner.d.ts.map +1 -1
- package/tool/flows/call-tool.flow.d.ts +26 -1
- package/tool/flows/call-tool.flow.d.ts.map +1 -1
- package/tool/flows/tool-credentials.gate.d.ts +31 -0
- package/tool/flows/tool-credentials.gate.d.ts.map +1 -0
- package/tool/flows/tools-list.flow.d.ts.map +1 -1
- package/tool/tool.instance.d.ts.map +1 -1
- package/tool/ui/index.d.ts +1 -1
- package/tool/ui/index.d.ts.map +1 -1
- package/tool/ui/ui-resource.handler.d.ts.map +1 -1
- package/tool/ui/ui-shared.d.ts +33 -1
- package/tool/ui/ui-shared.d.ts.map +1 -1
- package/transport/adapters/transport.local.adapter.d.ts.map +1 -1
- package/transport/flows/handle.sse.flow.d.ts +1 -1
- package/transport/flows/handle.streamable-http.flow.d.ts +58 -1
- package/transport/flows/handle.streamable-http.flow.d.ts.map +1 -1
- package/transport/mcp-handlers/call-tool-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/read-resource-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/skills-list-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/skills-load-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/skills-search-request.handler.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -1,46 +1,45 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# @frontmcp/sdk
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
**Build production-grade [MCP](https://modelcontextprotocol.io) servers in TypeScript — decorators, DI, and Streamable HTTP, batteries included.**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@frontmcp/sdk)
|
|
8
|
+
[](https://nodejs.org)
|
|
9
|
+
[](https://github.com/agentfront/frontmcp/blob/main/LICENSE)
|
|
10
|
+
|
|
11
|
+
[Docs][docs-home] • [Quickstart][docs-quickstart] • [SDK Reference][docs-sdk-ref]
|
|
4
12
|
|
|
5
|
-
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
FrontMCP turns the Model Context Protocol into a typed, declarative framework. You
|
|
18
|
+
write `@Tool`, `@Resource`, and `@App` classes; the SDK handles the protocol,
|
|
19
|
+
transport, sessions, auth, dependency injection, and execution flow — so the same
|
|
20
|
+
server runs on your laptop and ships to production unchanged.
|
|
6
21
|
|
|
7
22
|
## Install
|
|
8
23
|
|
|
9
24
|
```bash
|
|
25
|
+
npx frontmcp create my-app # scaffold a new project (recommended)
|
|
26
|
+
# …or add to an existing one:
|
|
10
27
|
npm install @frontmcp/sdk
|
|
11
28
|
```
|
|
12
29
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
##
|
|
16
|
-
|
|
17
|
-
- **`@FrontMcp` server** — single decorator configures info, apps, HTTP, logging, session, auth ([docs][docs-server])
|
|
18
|
-
- **`@App`** — group tools, resources, prompts into isolated domains ([docs][docs-apps])
|
|
19
|
-
- **`@Tool`** — typed actions with Zod input schemas, class or function style ([docs][docs-tools])
|
|
20
|
-
- **`@Resource`** — read-only data with static and template URIs ([docs][docs-resources])
|
|
21
|
-
- **`@Prompt`** — reusable message templates returning `GetPromptResult` ([docs][docs-prompts])
|
|
22
|
-
- **`@Agent`** — orchestrated multi-step tool chains ([docs][docs-agents])
|
|
23
|
-
- **Elicitation** — request structured user input mid-flow ([docs][docs-elicitation])
|
|
24
|
-
- **Skills** — HTTP-discoverable tool manifests for agent marketplaces ([docs][docs-skills])
|
|
25
|
-
- **5 context classes** — `ToolContext`, `ResourceContext`, `PromptContext`, `AgentContext`, `HookContext`
|
|
26
|
-
- **Direct client** — `create()`, `connect()`, `connectOpenAI()`, `connectClaude()`, `connectLangChain()`, `connectVercelAI()` ([docs][docs-direct])
|
|
27
|
-
- **Authentication** — Remote OAuth, Local OAuth, JWKS, DCR, per-app auth surfaces ([docs][docs-auth])
|
|
28
|
-
- **Sessions** — stateful / stateless modes, JWT or UUID transport IDs
|
|
29
|
-
- **Hooks** — tool, list-tools, HTTP, resource, prompt hook families ([docs][docs-hooks])
|
|
30
|
-
- **Ext-Apps** — mount external MCP servers as sub-apps ([docs][docs-ext-apps])
|
|
31
|
-
- **Providers / DI** — scoped injection with GLOBAL and CONTEXT scopes ([docs][docs-providers])
|
|
32
|
-
- **ConfigPlugin** — load `frontmcp.yaml` / `frontmcp.json` config files ([docs][docs-config])
|
|
33
|
-
- **Transport** — Streamable HTTP + SSE ([docs][docs-transport])
|
|
34
|
-
|
|
35
|
-
## Quick Example
|
|
30
|
+
Requires **Node.js 24+**. Full guide → [Installation][docs-install].
|
|
31
|
+
|
|
32
|
+
## Quick example
|
|
36
33
|
|
|
37
34
|
```ts
|
|
38
35
|
import 'reflect-metadata';
|
|
39
|
-
|
|
36
|
+
|
|
40
37
|
import { z } from 'zod';
|
|
41
38
|
|
|
39
|
+
import { App, FrontMcp, Tool, ToolContext } from '@frontmcp/sdk';
|
|
40
|
+
|
|
42
41
|
@Tool({ name: 'greet', inputSchema: { name: z.string() } })
|
|
43
|
-
class GreetTool {
|
|
42
|
+
class GreetTool extends ToolContext {
|
|
44
43
|
async execute({ name }: { name: string }) {
|
|
45
44
|
return `Hello, ${name}!`;
|
|
46
45
|
}
|
|
@@ -53,26 +52,34 @@ class HelloApp {}
|
|
|
53
52
|
export default class Server {}
|
|
54
53
|
```
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
##
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
|
|
55
|
+
Run `npm run dev` and point any MCP client at it. Full walkthrough → [Quickstart][docs-quickstart].
|
|
56
|
+
|
|
57
|
+
## What you get
|
|
58
|
+
|
|
59
|
+
- **Build** — `@FrontMcp` server, `@App` domains, and typed `@Tool` / `@Resource` /
|
|
60
|
+
`@Prompt` primitives with Zod schemas; `@Agent` multi-step chains and `@Provider`
|
|
61
|
+
dependency injection.
|
|
62
|
+
([Tools][docs-tools] · [Resources][docs-resources] · [Prompts][docs-prompts] · [Agents][docs-agents] · [Providers][docs-providers])
|
|
63
|
+
- **Secure** — Remote & Local OAuth, JWKS, Dynamic Client Registration, per-app auth,
|
|
64
|
+
and stateful / stateless sessions.
|
|
65
|
+
([Authentication][docs-auth])
|
|
66
|
+
- **Operate** — Streamable HTTP + SSE transport, capability discovery, elicitation,
|
|
67
|
+
lifecycle hooks, and HTTP-discoverable skill manifests.
|
|
68
|
+
([Transport][docs-transport] · [Discovery][docs-discovery] · [Elicitation][docs-elicitation] · [Hooks][docs-hooks] · [Skills][docs-skills])
|
|
69
|
+
- **Extend & embed** — plugins (Cache, Remember, CodeCall, Dashboard), the OpenAPI
|
|
70
|
+
adapter, mounting external MCP servers as sub-apps, and an in-process Direct Client
|
|
71
|
+
(`connectOpenAI` / `connectClaude` / `connectLangChain`).
|
|
72
|
+
([Plugins][docs-plugins] · [Adapters][docs-adapters] · [Ext-Apps][docs-ext-apps] · [Direct Client][docs-direct])
|
|
73
|
+
- **Ship anywhere** — one codebase deploys to Node, Vercel, AWS Lambda, Cloudflare
|
|
74
|
+
Workers, or a serverless bundle.
|
|
75
|
+
([Deployment][docs-deploy])
|
|
76
|
+
|
|
77
|
+
→ Everything is documented at **[docs.agentfront.dev/frontmcp][docs-home]**.
|
|
78
|
+
|
|
79
|
+
## Related packages
|
|
80
|
+
|
|
81
|
+
- [`@frontmcp/cli`](../cli) — scaffolding and dev tooling (`frontmcp create`, `dev`, `build`)
|
|
82
|
+
- [`@frontmcp/auth`](../auth) — authentication, OAuth, JWKS, credential vault
|
|
76
83
|
- [`@frontmcp/adapters`](../adapters) — OpenAPI adapter
|
|
77
84
|
- [`@frontmcp/plugins`](../plugins) — Cache, Remember, CodeCall, Dashboard
|
|
78
85
|
- [`@frontmcp/testing`](../testing) — E2E testing framework
|
|
@@ -80,29 +87,27 @@ export default class Server {}
|
|
|
80
87
|
|
|
81
88
|
## License
|
|
82
89
|
|
|
83
|
-
Apache-2.0
|
|
90
|
+
[Apache-2.0](../../LICENSE)
|
|
84
91
|
|
|
85
92
|
<!-- links -->
|
|
86
93
|
|
|
94
|
+
[docs-home]: https://docs.agentfront.dev/frontmcp 'FrontMCP Docs'
|
|
87
95
|
[docs-install]: https://docs.agentfront.dev/frontmcp/getting-started/installation
|
|
88
96
|
[docs-quickstart]: https://docs.agentfront.dev/frontmcp/getting-started/quickstart
|
|
89
|
-
[docs-
|
|
90
|
-
[docs-apps]: https://docs.agentfront.dev/frontmcp/servers/apps
|
|
97
|
+
[docs-sdk-ref]: https://docs.agentfront.dev/frontmcp/sdk-reference/overview
|
|
91
98
|
[docs-tools]: https://docs.agentfront.dev/frontmcp/servers/tools
|
|
92
99
|
[docs-resources]: https://docs.agentfront.dev/frontmcp/servers/resources
|
|
93
100
|
[docs-prompts]: https://docs.agentfront.dev/frontmcp/servers/prompts
|
|
94
101
|
[docs-agents]: https://docs.agentfront.dev/frontmcp/servers/agents
|
|
95
|
-
[docs-
|
|
96
|
-
[docs-skills]: https://docs.agentfront.dev/frontmcp/servers/skills
|
|
102
|
+
[docs-providers]: https://docs.agentfront.dev/frontmcp/extensibility/providers
|
|
97
103
|
[docs-auth]: https://docs.agentfront.dev/frontmcp/authentication/overview
|
|
98
|
-
[docs-remote]: https://docs.agentfront.dev/frontmcp/authentication/remote
|
|
99
|
-
[docs-local]: https://docs.agentfront.dev/frontmcp/authentication/local
|
|
100
|
-
[docs-direct]: https://docs.agentfront.dev/frontmcp/deployment/direct-client
|
|
101
104
|
[docs-transport]: https://docs.agentfront.dev/frontmcp/deployment/transport
|
|
102
|
-
[docs-
|
|
105
|
+
[docs-discovery]: https://docs.agentfront.dev/frontmcp/servers/discovery
|
|
106
|
+
[docs-elicitation]: https://docs.agentfront.dev/frontmcp/servers/elicitation
|
|
103
107
|
[docs-hooks]: https://docs.agentfront.dev/frontmcp/extensibility/hooks
|
|
104
|
-
[docs-
|
|
105
|
-
[docs-
|
|
108
|
+
[docs-skills]: https://docs.agentfront.dev/frontmcp/servers/skills
|
|
109
|
+
[docs-plugins]: https://docs.agentfront.dev/frontmcp/plugins/overview
|
|
110
|
+
[docs-adapters]: https://docs.agentfront.dev/frontmcp/adapters/overview
|
|
111
|
+
[docs-ext-apps]: https://docs.agentfront.dev/frontmcp/servers/ext-apps
|
|
112
|
+
[docs-direct]: https://docs.agentfront.dev/frontmcp/deployment/direct-client
|
|
106
113
|
[docs-deploy]: https://docs.agentfront.dev/frontmcp/deployment/local-dev-server
|
|
107
|
-
[docs-production]: https://docs.agentfront.dev/frontmcp/deployment/production-build
|
|
108
|
-
[docs-sdk-ref]: https://docs.agentfront.dev/frontmcp/sdk-reference/overview
|
package/agent/agent.scope.d.ts
CHANGED
|
@@ -112,6 +112,8 @@ export declare class AgentScope {
|
|
|
112
112
|
userInfoEndpoint?: string | undefined;
|
|
113
113
|
} | undefined;
|
|
114
114
|
} | {
|
|
115
|
+
requireEmail: boolean;
|
|
116
|
+
anonymousSubject: string;
|
|
115
117
|
tokenStorage: "memory" | {
|
|
116
118
|
redis: {
|
|
117
119
|
host: string;
|
|
@@ -122,10 +124,69 @@ export declare class AgentScope {
|
|
|
122
124
|
defaultTtlMs: number;
|
|
123
125
|
password?: string | undefined;
|
|
124
126
|
};
|
|
127
|
+
} | {
|
|
128
|
+
sqlite: {
|
|
129
|
+
path: string;
|
|
130
|
+
encryption?: {
|
|
131
|
+
secret: string;
|
|
132
|
+
} | undefined;
|
|
133
|
+
ttlCleanupIntervalMs?: number | undefined;
|
|
134
|
+
walMode?: boolean | undefined;
|
|
135
|
+
};
|
|
125
136
|
};
|
|
126
137
|
allowDefaultPublic: boolean;
|
|
127
138
|
anonymousScopes: string[];
|
|
128
139
|
mode: "local";
|
|
140
|
+
login?: {
|
|
141
|
+
title?: string | undefined;
|
|
142
|
+
subtitle?: string | undefined;
|
|
143
|
+
logoUri?: string | undefined;
|
|
144
|
+
fields?: Record<string, {
|
|
145
|
+
type: "text" | "email" | "password" | "select" | "hidden";
|
|
146
|
+
label?: string | undefined;
|
|
147
|
+
required?: boolean | undefined;
|
|
148
|
+
placeholder?: string | undefined;
|
|
149
|
+
options?: {
|
|
150
|
+
value: string;
|
|
151
|
+
label: string;
|
|
152
|
+
}[] | undefined;
|
|
153
|
+
}> | undefined;
|
|
154
|
+
render?: ((ctx: import("libs/auth/dist/options/interfaces").LoginRenderContext) => string) | undefined;
|
|
155
|
+
subject?: {
|
|
156
|
+
fromField?: string | undefined;
|
|
157
|
+
strategy?: "per-session" | "per-account" | undefined;
|
|
158
|
+
} | undefined;
|
|
159
|
+
} | undefined;
|
|
160
|
+
authenticate?: import("libs/auth/dist/options/interfaces").AuthenticateFn | undefined;
|
|
161
|
+
providers?: {
|
|
162
|
+
id: string;
|
|
163
|
+
clientId: string;
|
|
164
|
+
name?: string | undefined;
|
|
165
|
+
authorizationEndpoint?: string | undefined;
|
|
166
|
+
authorizeUrl?: string | undefined;
|
|
167
|
+
tokenEndpoint?: string | undefined;
|
|
168
|
+
tokenUrl?: string | undefined;
|
|
169
|
+
clientSecret?: string | undefined;
|
|
170
|
+
scopes?: string[] | undefined;
|
|
171
|
+
userInfoEndpoint?: string | undefined;
|
|
172
|
+
jwksUri?: string | undefined;
|
|
173
|
+
}[] | undefined;
|
|
174
|
+
dcr?: {
|
|
175
|
+
enabled?: boolean | undefined;
|
|
176
|
+
allowedRedirectUris?: string[] | undefined;
|
|
177
|
+
allowedClientIds?: string[] | undefined;
|
|
178
|
+
initialAccessToken?: string | undefined;
|
|
179
|
+
clients?: {
|
|
180
|
+
clientId: string;
|
|
181
|
+
redirectUris: string[];
|
|
182
|
+
tokenEndpointAuthMethod: "none" | "client_secret_basic" | "client_secret_post";
|
|
183
|
+
grantTypes: ("authorization_code" | "refresh_token")[];
|
|
184
|
+
responseTypes: "code"[];
|
|
185
|
+
clientSecret?: string | undefined;
|
|
186
|
+
clientName?: string | undefined;
|
|
187
|
+
scope?: string | undefined;
|
|
188
|
+
}[] | undefined;
|
|
189
|
+
} | undefined;
|
|
129
190
|
local?: {
|
|
130
191
|
signKey?: Uint8Array<ArrayBuffer> | import("libs/auth/dist/common/jwt.types").JWK | undefined;
|
|
131
192
|
jwks?: {
|
|
@@ -133,6 +194,49 @@ export declare class AgentScope {
|
|
|
133
194
|
} | undefined;
|
|
134
195
|
issuer?: string | undefined;
|
|
135
196
|
} | undefined;
|
|
197
|
+
secureStore?: "memory" | {
|
|
198
|
+
sqlite: {
|
|
199
|
+
path: string;
|
|
200
|
+
encryption?: {
|
|
201
|
+
secret: string;
|
|
202
|
+
} | undefined;
|
|
203
|
+
ttlCleanupIntervalMs?: number | undefined;
|
|
204
|
+
walMode?: boolean | undefined;
|
|
205
|
+
};
|
|
206
|
+
scope?: "user" | "session" | "global" | undefined;
|
|
207
|
+
ttlMs?: number | undefined;
|
|
208
|
+
encryption?: {
|
|
209
|
+
pepper?: string | undefined;
|
|
210
|
+
} | undefined;
|
|
211
|
+
} | {
|
|
212
|
+
redis: {
|
|
213
|
+
host: string;
|
|
214
|
+
port: number;
|
|
215
|
+
db: number;
|
|
216
|
+
tls: boolean;
|
|
217
|
+
keyPrefix: string;
|
|
218
|
+
defaultTtlMs: number;
|
|
219
|
+
password?: string | undefined;
|
|
220
|
+
};
|
|
221
|
+
scope?: "user" | "session" | "global" | undefined;
|
|
222
|
+
ttlMs?: number | undefined;
|
|
223
|
+
encryption?: {
|
|
224
|
+
pepper?: string | undefined;
|
|
225
|
+
} | undefined;
|
|
226
|
+
} | {
|
|
227
|
+
backend: import("libs/auth/dist/options/interfaces").SecureStoreCustomBackend;
|
|
228
|
+
scope?: "user" | "session" | "global" | undefined;
|
|
229
|
+
ttlMs?: number | undefined;
|
|
230
|
+
encryption?: {
|
|
231
|
+
pepper?: string | undefined;
|
|
232
|
+
} | undefined;
|
|
233
|
+
} | {
|
|
234
|
+
scope?: "user" | "session" | "global" | undefined;
|
|
235
|
+
ttlMs?: number | undefined;
|
|
236
|
+
encryption?: {
|
|
237
|
+
pepper?: string | undefined;
|
|
238
|
+
} | undefined;
|
|
239
|
+
} | undefined;
|
|
136
240
|
publicAccess?: {
|
|
137
241
|
tools: string[] | "all";
|
|
138
242
|
prompts: string[] | "all";
|
|
@@ -151,6 +255,8 @@ export declare class AgentScope {
|
|
|
151
255
|
} | undefined;
|
|
152
256
|
federatedAuth?: {
|
|
153
257
|
stateValidation: "format" | "strict";
|
|
258
|
+
minProviders?: number | undefined;
|
|
259
|
+
requiredProviders?: string[] | undefined;
|
|
154
260
|
} | undefined;
|
|
155
261
|
refresh?: {
|
|
156
262
|
enabled: boolean;
|
|
@@ -194,6 +300,8 @@ export declare class AgentScope {
|
|
|
194
300
|
maxRedirects: number;
|
|
195
301
|
} | undefined;
|
|
196
302
|
} | undefined;
|
|
303
|
+
ui?: Partial<Record<"error" | "login" | "consent" | "incremental" | "federated", string>> | undefined;
|
|
304
|
+
extras?: Record<string, import("libs/auth/dist/options/interfaces").AuthExtraHandler> | undefined;
|
|
197
305
|
} | {
|
|
198
306
|
tokenStorage: "memory" | {
|
|
199
307
|
redis: {
|
|
@@ -205,6 +313,15 @@ export declare class AgentScope {
|
|
|
205
313
|
defaultTtlMs: number;
|
|
206
314
|
password?: string | undefined;
|
|
207
315
|
};
|
|
316
|
+
} | {
|
|
317
|
+
sqlite: {
|
|
318
|
+
path: string;
|
|
319
|
+
encryption?: {
|
|
320
|
+
secret: string;
|
|
321
|
+
} | undefined;
|
|
322
|
+
ttlCleanupIntervalMs?: number | undefined;
|
|
323
|
+
walMode?: boolean | undefined;
|
|
324
|
+
};
|
|
208
325
|
};
|
|
209
326
|
allowDefaultPublic: boolean;
|
|
210
327
|
anonymousScopes: string[];
|
|
@@ -217,6 +334,49 @@ export declare class AgentScope {
|
|
|
217
334
|
} | undefined;
|
|
218
335
|
issuer?: string | undefined;
|
|
219
336
|
} | undefined;
|
|
337
|
+
secureStore?: "memory" | {
|
|
338
|
+
sqlite: {
|
|
339
|
+
path: string;
|
|
340
|
+
encryption?: {
|
|
341
|
+
secret: string;
|
|
342
|
+
} | undefined;
|
|
343
|
+
ttlCleanupIntervalMs?: number | undefined;
|
|
344
|
+
walMode?: boolean | undefined;
|
|
345
|
+
};
|
|
346
|
+
scope?: "user" | "session" | "global" | undefined;
|
|
347
|
+
ttlMs?: number | undefined;
|
|
348
|
+
encryption?: {
|
|
349
|
+
pepper?: string | undefined;
|
|
350
|
+
} | undefined;
|
|
351
|
+
} | {
|
|
352
|
+
redis: {
|
|
353
|
+
host: string;
|
|
354
|
+
port: number;
|
|
355
|
+
db: number;
|
|
356
|
+
tls: boolean;
|
|
357
|
+
keyPrefix: string;
|
|
358
|
+
defaultTtlMs: number;
|
|
359
|
+
password?: string | undefined;
|
|
360
|
+
};
|
|
361
|
+
scope?: "user" | "session" | "global" | undefined;
|
|
362
|
+
ttlMs?: number | undefined;
|
|
363
|
+
encryption?: {
|
|
364
|
+
pepper?: string | undefined;
|
|
365
|
+
} | undefined;
|
|
366
|
+
} | {
|
|
367
|
+
backend: import("libs/auth/dist/options/interfaces").SecureStoreCustomBackend;
|
|
368
|
+
scope?: "user" | "session" | "global" | undefined;
|
|
369
|
+
ttlMs?: number | undefined;
|
|
370
|
+
encryption?: {
|
|
371
|
+
pepper?: string | undefined;
|
|
372
|
+
} | undefined;
|
|
373
|
+
} | {
|
|
374
|
+
scope?: "user" | "session" | "global" | undefined;
|
|
375
|
+
ttlMs?: number | undefined;
|
|
376
|
+
encryption?: {
|
|
377
|
+
pepper?: string | undefined;
|
|
378
|
+
} | undefined;
|
|
379
|
+
} | undefined;
|
|
220
380
|
publicAccess?: {
|
|
221
381
|
tools: string[] | "all";
|
|
222
382
|
prompts: string[] | "all";
|
|
@@ -235,6 +395,8 @@ export declare class AgentScope {
|
|
|
235
395
|
} | undefined;
|
|
236
396
|
federatedAuth?: {
|
|
237
397
|
stateValidation: "format" | "strict";
|
|
398
|
+
minProviders?: number | undefined;
|
|
399
|
+
requiredProviders?: string[] | undefined;
|
|
238
400
|
} | undefined;
|
|
239
401
|
refresh?: {
|
|
240
402
|
enabled: boolean;
|
|
@@ -278,6 +440,8 @@ export declare class AgentScope {
|
|
|
278
440
|
maxRedirects: number;
|
|
279
441
|
} | undefined;
|
|
280
442
|
} | undefined;
|
|
443
|
+
ui?: Partial<Record<"error" | "login" | "consent" | "incremental" | "federated", string>> | undefined;
|
|
444
|
+
extras?: Record<string, import("libs/auth/dist/options/interfaces").AuthExtraHandler> | undefined;
|
|
281
445
|
clientId?: string | undefined;
|
|
282
446
|
clientSecret?: string | undefined;
|
|
283
447
|
scopes?: string[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.scope.d.ts","sourceRoot":"","sources":["../../src/agent/agent.scope.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAiB,KAAK,KAAK,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CA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I,OAAO,CAAC,IAAI,CAAC;IAWhC;;OAEG;IACH,OAAO,CAAC,2BAA2B;IAkBnC;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAoB3B;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAejC;;OAEG;IACH,OAAO,CAAC,aAAa;IAOrB;;OAEG;YACW,+BAA+B;CAgF9C"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-owned Auth-UI write-shape (#469).
|
|
3
|
+
*
|
|
4
|
+
* This is the SERVER side of the auth-page JSON-serialization boundary. The
|
|
5
|
+
* authorize/callback flows BUILD an {@link AuthFlowState} here and the page
|
|
6
|
+
* builder INJECTS it as `window.__FRONTMCP_AUTH__`; the CLIENT (in the browser)
|
|
7
|
+
* reads the matching read-shape from `@frontmcp/ui/auth`.
|
|
8
|
+
*
|
|
9
|
+
* These types + constants are deliberately a LOCAL copy of the client contract
|
|
10
|
+
* (`@frontmcp/ui/auth`'s `contract.ts`) rather than an import: the SDK must NOT
|
|
11
|
+
* depend on `@frontmcp/ui` (a React package) just to share a handful of plain
|
|
12
|
+
* data shapes + two string literals. Server-owned write-shape + client-owned
|
|
13
|
+
* read-shape across a JSON boundary is intentional. The `demo-e2e-local-auth`
|
|
14
|
+
* e2e asserts the emitted `window.__FRONTMCP_AUTH__` wire shape, which guards
|
|
15
|
+
* against the two copies drifting.
|
|
16
|
+
*
|
|
17
|
+
* @packageDocumentation
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Which built-in authorization page slot a component renders. Must match
|
|
21
|
+
* `AuthSlot` in `@frontmcp/ui/auth`.
|
|
22
|
+
*/
|
|
23
|
+
export type AuthSlot = 'login' | 'consent' | 'incremental' | 'federated' | 'error';
|
|
24
|
+
/** HTTP method the auth submit/extra requests use. Matches `@frontmcp/ui/auth`. */
|
|
25
|
+
export type AuthSubmitMethod = 'GET' | 'POST';
|
|
26
|
+
/**
|
|
27
|
+
* A selectable authentication provider surfaced on the federated-login slot.
|
|
28
|
+
* Matches `AuthProvider` in `@frontmcp/ui/auth`. Only display + selection fields
|
|
29
|
+
* are exposed; nothing secret is ever included.
|
|
30
|
+
*/
|
|
31
|
+
export interface AuthProvider {
|
|
32
|
+
/** Stable provider id submitted back as a `providers` value. */
|
|
33
|
+
id: string;
|
|
34
|
+
/** Human-readable provider name for display. */
|
|
35
|
+
name: string;
|
|
36
|
+
/** Optional provider authorize URL (transparent/remote providers only). */
|
|
37
|
+
url?: string;
|
|
38
|
+
/** Auth mode label (e.g. `local`, `transparent`, `remote`). */
|
|
39
|
+
mode?: string;
|
|
40
|
+
/** App ids associated with this provider (filtered of internal sentinels). */
|
|
41
|
+
appIds?: string[];
|
|
42
|
+
/** Whether this is the primary/parent provider (pre-checked by default). */
|
|
43
|
+
primary?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* A selectable tool surfaced on the consent slot. Matches `AuthTool` in
|
|
47
|
+
* `@frontmcp/ui/auth`. The `id` is the effective runtime tool id.
|
|
48
|
+
*/
|
|
49
|
+
export interface AuthTool {
|
|
50
|
+
/** Effective runtime tool id (submitted back as a `tools` value). */
|
|
51
|
+
id: string;
|
|
52
|
+
/** Display name. */
|
|
53
|
+
name: string;
|
|
54
|
+
/** Optional description. */
|
|
55
|
+
description?: string;
|
|
56
|
+
/** Owning app id (for grouping). */
|
|
57
|
+
appId?: string;
|
|
58
|
+
/** Owning app display name (for grouping). */
|
|
59
|
+
appName?: string;
|
|
60
|
+
/** Whether the tool is pre-selected. */
|
|
61
|
+
defaultSelected?: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The serialized authorization-flow state the server INJECTS (write-shape).
|
|
65
|
+
* Must match `AuthFlowState` in `@frontmcp/ui/auth` (the client read-shape).
|
|
66
|
+
*
|
|
67
|
+
* NO PII is part of the contract. `clientName`/`clientId` are OAuth client
|
|
68
|
+
* identifiers (not end-user identity); identity values the user enters are
|
|
69
|
+
* carried by the developer's own form fields — never serialized here.
|
|
70
|
+
*/
|
|
71
|
+
export interface AuthFlowState {
|
|
72
|
+
/** Which page slot this state is for. */
|
|
73
|
+
slot: AuthSlot;
|
|
74
|
+
/** The pending authorization id (`pending_auth_id`). */
|
|
75
|
+
pendingAuthId?: string;
|
|
76
|
+
/** OAuth client display name (CIMD `client_name` or the raw client id). */
|
|
77
|
+
clientName?: string;
|
|
78
|
+
/** OAuth `client_id`. */
|
|
79
|
+
clientId?: string;
|
|
80
|
+
/** Requested OAuth scopes (split from the `scope` param). */
|
|
81
|
+
scopes?: string[];
|
|
82
|
+
/** Validated OAuth `redirect_uri`. */
|
|
83
|
+
redirectUri?: string;
|
|
84
|
+
/** RFC 8707 `resource` indicator, when supplied. */
|
|
85
|
+
resource?: string;
|
|
86
|
+
/** Human-readable error text for the `error` slot (or a failed submit re-render). */
|
|
87
|
+
error?: string;
|
|
88
|
+
/** Anti-CSRF token minted at SSR time; the client echoes it back. */
|
|
89
|
+
csrfToken?: string;
|
|
90
|
+
/** Absolute or app-relative URL the finish submit posts to. */
|
|
91
|
+
submitUrl?: string;
|
|
92
|
+
/** HTTP method for the finish submit. Defaults to `GET`. */
|
|
93
|
+
submitMethod?: AuthSubmitMethod;
|
|
94
|
+
/** Optional dedicated URL for `submitExtra` (the auth-extra endpoint). */
|
|
95
|
+
extraUrl?: string;
|
|
96
|
+
/** Providers offered on the `federated` slot. */
|
|
97
|
+
providers?: AuthProvider[];
|
|
98
|
+
/** Tools offered on the `consent` slot. */
|
|
99
|
+
tools?: AuthTool[];
|
|
100
|
+
/** Server-side accumulators for multi-step inputs, keyed by extra name. */
|
|
101
|
+
addedItems?: Record<string, unknown[]>;
|
|
102
|
+
/** Free-form, slot-specific extras the server passes to the component. */
|
|
103
|
+
extras?: Record<string, unknown>;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Result of an auth-extra (`auth.extras[name]`) validated-field round-trip, as
|
|
107
|
+
* the server returns it. Matches `AuthExtraResult` in `@frontmcp/ui/auth`.
|
|
108
|
+
*/
|
|
109
|
+
export interface AuthExtraResult {
|
|
110
|
+
/** Whether the server accepted the field. */
|
|
111
|
+
ok: boolean;
|
|
112
|
+
/** Human-readable validation error when `ok` is false. */
|
|
113
|
+
error?: string;
|
|
114
|
+
/** Updated server-side accumulators (keyed by extra name) after a successful add. */
|
|
115
|
+
addedItems?: Record<string, unknown[]>;
|
|
116
|
+
/** Free-form side-effect data the server chooses to return. */
|
|
117
|
+
sideEffects?: Record<string, unknown>;
|
|
118
|
+
}
|
|
119
|
+
/** A file-based custom auth-UI slot source (resolved `.tsx`/`.jsx`). */
|
|
120
|
+
export interface AuthUiFileSource {
|
|
121
|
+
/** Absolute path to a `.tsx` / `.jsx` component file (default export). */
|
|
122
|
+
file: string;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* The global property name the server injects the {@link AuthFlowState} under.
|
|
126
|
+
* MUST match `AUTH_FLOW_GLOBAL_KEY` in `@frontmcp/ui/auth`.
|
|
127
|
+
*/
|
|
128
|
+
export declare const AUTH_FLOW_GLOBAL_KEY: "__FRONTMCP_AUTH__";
|
|
129
|
+
/**
|
|
130
|
+
* The mount id the server SSRs the auth component into (and the client hydrates
|
|
131
|
+
* onto). MUST match `DEFAULT_AUTH_MOUNT_ID` in `@frontmcp/ui/auth`.
|
|
132
|
+
*/
|
|
133
|
+
export declare const AUTH_MOUNT_ID = "frontmcp-auth-root";
|
|
134
|
+
/**
|
|
135
|
+
* Wire-field marker names the server-side {@link AuthFlowState} builders write
|
|
136
|
+
* into `extras` (federated/incremental markers + the target app id). These are
|
|
137
|
+
* the exact params `oauth.callback.flow.ts` reads. The full vocabulary lives in
|
|
138
|
+
* `@frontmcp/ui/auth`'s `AUTH_WIRE_FIELDS`; the server only needs the few keys
|
|
139
|
+
* its builders emit.
|
|
140
|
+
*/
|
|
141
|
+
export declare const AUTH_WIRE_FIELDS: {
|
|
142
|
+
/** Marks a federated submission. */
|
|
143
|
+
readonly federated: "federated";
|
|
144
|
+
/** Marks an incremental authorization. */
|
|
145
|
+
readonly incremental: "incremental";
|
|
146
|
+
/** Target app id for incremental authorization. */
|
|
147
|
+
readonly appId: "app_id";
|
|
148
|
+
};
|
|
149
|
+
//# sourceMappingURL=auth-ui.contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-ui.contract.d.ts","sourceRoot":"","sources":["../../../src/auth/auth-ui/auth-ui.contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,OAAO,CAAC;AAEnF,mFAAmF;AACnF,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,MAAM,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,gEAAgE;IAChE,EAAE,EAAE,MAAM,CAAC;IACX,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,qEAAqE;IACrE,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,a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