@frontmcp/sdk 1.0.0-beta.1 → 1.0.0-beta.11
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/agent/agent.instance.d.ts +2 -2
- package/agent/agent.instance.d.ts.map +1 -1
- package/agent/agent.scope.d.ts +5 -4
- package/agent/agent.scope.d.ts.map +1 -1
- package/agent/flows/call-agent.flow.d.ts.map +1 -1
- package/app/instances/app.esm.instance.d.ts +7 -4
- package/app/instances/app.esm.instance.d.ts.map +1 -1
- package/app/instances/app.local.instance.d.ts +3 -3
- package/app/instances/app.local.instance.d.ts.map +1 -1
- package/app/instances/app.remote.instance.d.ts +7 -4
- package/app/instances/app.remote.instance.d.ts.map +1 -1
- package/auth/auth.registry.d.ts +2 -2
- package/auth/auth.registry.d.ts.map +1 -1
- package/auth/instances/instance.remote-primary-auth.d.ts.map +1 -1
- package/auth/session/utils/session-id.utils.d.ts +9 -6
- package/auth/session/utils/session-id.utils.d.ts.map +1 -1
- package/common/decorators/agent.decorator.d.ts +32 -7
- package/common/decorators/agent.decorator.d.ts.map +1 -1
- package/common/decorators/job.decorator.d.ts +56 -7
- package/common/decorators/job.decorator.d.ts.map +1 -1
- package/common/decorators/prompt.decorator.d.ts +7 -1
- package/common/decorators/prompt.decorator.d.ts.map +1 -1
- package/common/decorators/resource.decorator.d.ts +12 -2
- package/common/decorators/resource.decorator.d.ts.map +1 -1
- package/common/decorators/skill.decorator.d.ts.map +1 -1
- package/common/decorators/tool.decorator.d.ts +33 -42
- package/common/decorators/tool.decorator.d.ts.map +1 -1
- package/common/entries/app.entry.d.ts +8 -5
- package/common/entries/app.entry.d.ts.map +1 -1
- package/common/entries/plugin.entry.d.ts +1 -2
- package/common/entries/plugin.entry.d.ts.map +1 -1
- package/common/entries/provider.entry.d.ts +1 -2
- package/common/entries/provider.entry.d.ts.map +1 -1
- package/common/entries/resource.entry.d.ts +13 -0
- package/common/entries/resource.entry.d.ts.map +1 -1
- package/common/entries/scope.entry.d.ts +36 -8
- package/common/entries/scope.entry.d.ts.map +1 -1
- package/common/interfaces/app.interface.d.ts +1 -4
- package/common/interfaces/app.interface.d.ts.map +1 -1
- package/common/interfaces/internal/registry.interface.d.ts +15 -83
- package/common/interfaces/internal/registry.interface.d.ts.map +1 -1
- package/common/interfaces/plugin.interface.d.ts +1 -3
- package/common/interfaces/plugin.interface.d.ts.map +1 -1
- package/common/interfaces/provider.interface.d.ts +1 -3
- package/common/interfaces/provider.interface.d.ts.map +1 -1
- package/common/interfaces/resource.interface.d.ts +38 -0
- package/common/interfaces/resource.interface.d.ts.map +1 -1
- package/common/interfaces/scope.interface.d.ts +2 -4
- package/common/interfaces/scope.interface.d.ts.map +1 -1
- package/common/interfaces/skill.interface.d.ts +16 -0
- package/common/interfaces/skill.interface.d.ts.map +1 -1
- package/common/metadata/agent.metadata.d.ts +37 -6
- package/common/metadata/agent.metadata.d.ts.map +1 -1
- package/common/records/skill.record.d.ts +2 -0
- package/common/records/skill.record.d.ts.map +1 -1
- package/common/types/options/elicitation/schema.d.ts +2 -4
- package/common/types/options/elicitation/schema.d.ts.map +1 -1
- package/common/types/options/ext-apps/index.d.ts +1 -1
- package/common/types/options/ext-apps/index.d.ts.map +1 -1
- package/common/types/options/ext-apps/interfaces.d.ts +55 -0
- package/common/types/options/ext-apps/interfaces.d.ts.map +1 -1
- package/common/types/options/ext-apps/schema.d.ts +3 -1
- package/common/types/options/ext-apps/schema.d.ts.map +1 -1
- package/common/types/options/ext-apps/typecheck.d.ts +2 -0
- package/common/types/options/ext-apps/typecheck.d.ts.map +1 -0
- package/common/types/options/http/schema.d.ts +3 -1
- package/common/types/options/http/schema.d.ts.map +1 -1
- package/common/types/options/http/typecheck.d.ts +2 -0
- package/common/types/options/http/typecheck.d.ts.map +1 -0
- package/common/types/options/logging/schema.d.ts +3 -2
- package/common/types/options/logging/schema.d.ts.map +1 -1
- package/common/types/options/redis/index.d.ts +1 -1
- package/common/types/options/redis/index.d.ts.map +1 -1
- package/common/types/options/redis/interfaces.d.ts +4 -0
- package/common/types/options/redis/interfaces.d.ts.map +1 -1
- package/common/types/options/redis/schema.d.ts +7 -4
- package/common/types/options/redis/schema.d.ts.map +1 -1
- package/common/types/options/redis/typecheck.d.ts +2 -0
- package/common/types/options/redis/typecheck.d.ts.map +1 -0
- package/common/types/options/skills-http/schema.d.ts +3 -2
- package/common/types/options/skills-http/schema.d.ts.map +1 -1
- package/common/types/options/skills-http/typecheck.d.ts +2 -0
- package/common/types/options/skills-http/typecheck.d.ts.map +1 -0
- package/common/types/options/sqlite/index.d.ts +1 -0
- package/common/types/options/sqlite/index.d.ts.map +1 -1
- package/common/types/options/sqlite/interfaces.d.ts +25 -0
- package/common/types/options/sqlite/interfaces.d.ts.map +1 -0
- package/common/types/options/sqlite/schema.d.ts +3 -1
- package/common/types/options/sqlite/schema.d.ts.map +1 -1
- package/common/types/options/sqlite/typecheck.d.ts +2 -0
- package/common/types/options/sqlite/typecheck.d.ts.map +1 -0
- package/common/utils/decide-request-intent.utils.d.ts.map +1 -1
- package/completion/flows/complete.flow.d.ts.map +1 -1
- package/elicitation/flows/elicitation-request.flow.d.ts.map +1 -1
- package/elicitation/flows/elicitation-result.flow.d.ts.map +1 -1
- package/elicitation/helpers/fallback.helper.d.ts.map +1 -1
- package/elicitation/send-elicitation-result.tool.d.ts.map +1 -1
- package/errors/index.d.ts +1 -1
- package/errors/index.d.ts.map +1 -1
- package/errors/transport.errors.d.ts +6 -0
- package/errors/transport.errors.d.ts.map +1 -1
- package/esm/index.mjs +836 -286
- package/flows/flow.instance.d.ts +2 -3
- package/flows/flow.instance.d.ts.map +1 -1
- package/front-mcp/front-mcp.d.ts +2 -2
- package/front-mcp/front-mcp.d.ts.map +1 -1
- package/front-mcp/front-mcp.providers.d.ts.map +1 -1
- package/hooks/hook.registry.d.ts +2 -2
- package/hooks/hook.registry.d.ts.map +1 -1
- package/index.js +1050 -499
- package/job/job.instance.d.ts +2 -2
- package/job/job.instance.d.ts.map +1 -1
- package/notification/notification.service.d.ts +5 -1
- package/notification/notification.service.d.ts.map +1 -1
- package/package.json +10 -10
- package/plugin/plugin.registry.d.ts +9 -4
- package/plugin/plugin.registry.d.ts.map +1 -1
- package/prompt/prompt.instance.d.ts +2 -2
- package/prompt/prompt.instance.d.ts.map +1 -1
- package/prompt/prompt.registry.d.ts +2 -2
- package/prompt/prompt.registry.d.ts.map +1 -1
- package/provider/provider.registry.d.ts +7 -9
- package/provider/provider.registry.d.ts.map +1 -1
- package/resource/flows/read-resource.flow.d.ts.map +1 -1
- package/resource/resource.instance.d.ts +22 -3
- package/resource/resource.instance.d.ts.map +1 -1
- package/resource/resource.registry.d.ts +2 -2
- package/resource/resource.registry.d.ts.map +1 -1
- package/scope/flows/http.request.flow.d.ts.map +1 -1
- package/scope/scope.instance.d.ts +4 -3
- package/scope/scope.instance.d.ts.map +1 -1
- package/skill/flows/http/skills-api.flow.d.ts.map +1 -1
- package/skill/flows/load-skill.flow.d.ts.map +1 -1
- package/skill/skill-http.utils.d.ts +4 -3
- package/skill/skill-http.utils.d.ts.map +1 -1
- package/skill/skill-md-parser.d.ts.map +1 -1
- package/skill/skill-storage.factory.d.ts +3 -3
- package/skill/skill-storage.factory.d.ts.map +1 -1
- package/skill/skill-validator.d.ts +2 -2
- package/skill/skill-validator.d.ts.map +1 -1
- package/skill/skill.instance.d.ts +6 -2
- package/skill/skill.instance.d.ts.map +1 -1
- package/skill/skill.registry.d.ts +2 -3
- package/skill/skill.registry.d.ts.map +1 -1
- package/skill/skill.utils.d.ts +11 -2
- package/skill/skill.utils.d.ts.map +1 -1
- package/tool/flows/call-tool.flow.d.ts.map +1 -1
- package/tool/flows/tools-list.flow.d.ts.map +1 -1
- package/tool/tool.instance.d.ts +2 -2
- package/tool/tool.instance.d.ts.map +1 -1
- package/tool/tool.registry.d.ts +2 -2
- package/tool/tool.registry.d.ts.map +1 -1
- package/transport/adapters/streamable-http-transport.d.ts +23 -0
- package/transport/adapters/streamable-http-transport.d.ts.map +1 -1
- package/transport/adapters/transport.local.adapter.d.ts +29 -1
- package/transport/adapters/transport.local.adapter.d.ts.map +1 -1
- package/transport/adapters/transport.sse.adapter.d.ts.map +1 -1
- package/transport/adapters/transport.streamable-http.adapter.d.ts +13 -4
- package/transport/adapters/transport.streamable-http.adapter.d.ts.map +1 -1
- package/transport/flows/handle.sse.flow.d.ts.map +1 -1
- package/transport/flows/handle.stateless-http.flow.d.ts.map +1 -1
- package/transport/flows/handle.streamable-http.flow.d.ts +50 -1
- package/transport/flows/handle.streamable-http.flow.d.ts.map +1 -1
- package/transport/mcp-handlers/initialize-request.handler.d.ts.map +1 -1
- package/transport/transport.local.d.ts +2 -0
- package/transport/transport.local.d.ts.map +1 -1
- package/transport/transport.registry.d.ts +8 -0
- package/transport/transport.registry.d.ts.map +1 -1
- package/transport/transport.remote.d.ts +2 -0
- package/transport/transport.remote.d.ts.map +1 -1
- package/transport/transport.types.d.ts +10 -0
- package/transport/transport.types.d.ts.map +1 -1
- package/workflow/workflow.instance.d.ts +2 -2
- package/workflow/workflow.instance.d.ts.map +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
2
|
import { ToolMetadata, ImageOutputSchema, AudioOutputSchema, ResourceOutputSchema, ResourceLinkOutputSchema, ToolInputType, ToolOutputType } from '../metadata';
|
|
3
3
|
import type { ToolUIConfig } from '../metadata/tool-ui.metadata';
|
|
4
|
+
import type { ConcurrencyConfigInput, RateLimitConfigInput, TimeoutConfigInput } from '@frontmcp/guard';
|
|
4
5
|
import z from 'zod';
|
|
5
6
|
import { ToolContext } from '../interfaces';
|
|
6
7
|
export type FrontMcpToolExecuteHandler<InSchema extends ToolInputType, OutSchema extends ToolOutputType, In = ToolInputOf<{
|
|
@@ -68,39 +69,17 @@ O>;
|
|
|
68
69
|
* The `ui` property accepts a `ToolUIConfig` from `@frontmcp/ui/types`
|
|
69
70
|
* for configuring interactive widget rendering.
|
|
70
71
|
*/
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
* - `widgetAccessible`: Enable MCP bridge for tool calls from widget
|
|
83
|
-
* - `displayMode`: 'inline' | 'fullscreen' | 'pip'
|
|
84
|
-
* - And more...
|
|
85
|
-
*
|
|
86
|
-
* @example HTML template builder with typed context
|
|
87
|
-
* ```typescript
|
|
88
|
-
* ui: {
|
|
89
|
-
* template: (ctx) => `<div>${ctx.helpers.escapeHtml(ctx.output.name)}</div>`,
|
|
90
|
-
* // ctx.output is typed based on outputSchema
|
|
91
|
-
* servingMode: 'inline',
|
|
92
|
-
* }
|
|
93
|
-
* ```
|
|
94
|
-
*
|
|
95
|
-
* @example React component
|
|
96
|
-
* ```typescript
|
|
97
|
-
* import WeatherCard from './weather-ui';
|
|
98
|
-
* ui: {
|
|
99
|
-
* template: WeatherCard,
|
|
100
|
-
* servingMode: 'static',
|
|
101
|
-
* }
|
|
102
|
-
* ```
|
|
103
|
-
*/
|
|
72
|
+
/**
|
|
73
|
+
* Tool metadata options with permissive guard config types for IDE IntelliSense.
|
|
74
|
+
*
|
|
75
|
+
* Guard fields (concurrency, rateLimit, timeout) use auto-generated Input types
|
|
76
|
+
* where all fields are optional. Required fields are validated at runtime by Zod.
|
|
77
|
+
* @see schemas.generated.ts in @frontmcp/guard
|
|
78
|
+
*/
|
|
79
|
+
export type ToolMetadataOptions<I extends __Shape, O extends __OutputSchema> = Omit<__ToolMetadataBase<I, O>, 'concurrency' | 'rateLimit' | 'timeout' | 'ui'> & {
|
|
80
|
+
concurrency?: ConcurrencyConfigInput;
|
|
81
|
+
rateLimit?: RateLimitConfigInput;
|
|
82
|
+
timeout?: TimeoutConfigInput;
|
|
104
83
|
ui?: ToolUIConfig<ToolInputOf<{
|
|
105
84
|
inputSchema: I;
|
|
106
85
|
}>, ToolOutputOf<{
|
|
@@ -133,21 +112,33 @@ type __MustParam<C extends __Ctor, In> = __IsAny<In> extends true ? unknown : __
|
|
|
133
112
|
expected_input_type: In;
|
|
134
113
|
actual_parameter_type: __Param<C>;
|
|
135
114
|
};
|
|
136
|
-
type __MustReturn<C extends __Ctor, Out> = __IsAny<Out> extends true ? unknown : __Unwrap<__Return<C
|
|
115
|
+
type __MustReturn<C extends __Ctor, Out> = __IsAny<Out> extends true ? unknown : __IsAny<__Unwrap<__Return<C>>> extends true ? {
|
|
116
|
+
'execute() return type error': "Return type must not be 'any'.";
|
|
117
|
+
expected_output_type: Out;
|
|
118
|
+
} : __Unwrap<__Return<C>> extends Out ? unknown : {
|
|
137
119
|
'execute() return type error': "The method's return type is not assignable to the expected output schema type.";
|
|
138
120
|
expected_output_type: Out;
|
|
139
121
|
'actual_return_type (unwrapped)': __Unwrap<__Return<C>>;
|
|
140
122
|
};
|
|
141
123
|
type __Rewrap<C extends __Ctor, In, Out> = C extends abstract new (...a: __A<C>) => __R<C> ? C & (abstract new (...a: __A<C>) => ToolContext<any, any, In, Out> & __R<C>) : C extends new (...a: __A<C>) => __R<C> ? C & (new (...a: __A<C>) => ToolContext<any, any, In, Out> & __R<C>) : never;
|
|
142
124
|
declare module '@frontmcp/sdk' {
|
|
143
|
-
function Tool<I extends __Shape, O extends __OutputSchema,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
125
|
+
function Tool<I extends __Shape, O extends __OutputSchema>(opts: ToolMetadataOptions<I, O> & {
|
|
126
|
+
outputSchema: O;
|
|
127
|
+
}): <C extends __Ctor>(cls: C & __MustExtendCtx<C> & __MustParam<C, ToolInputOf<{
|
|
128
|
+
inputSchema: I;
|
|
129
|
+
}>> & __MustReturn<C, ToolOutputOf<{
|
|
130
|
+
outputSchema: O;
|
|
131
|
+
}>>) => __Rewrap<C, ToolInputOf<{
|
|
132
|
+
inputSchema: I;
|
|
133
|
+
}>, ToolOutputOf<{
|
|
134
|
+
outputSchema: O;
|
|
135
|
+
}>>;
|
|
136
|
+
function Tool<I extends __Shape>(opts: ToolMetadataOptions<I, any> & {
|
|
149
137
|
outputSchema?: never;
|
|
150
|
-
}
|
|
151
|
-
|
|
138
|
+
}): <C extends __Ctor>(cls: C & __MustExtendCtx<C> & __MustParam<C, ToolInputOf<{
|
|
139
|
+
inputSchema: I;
|
|
140
|
+
}>> & __MustReturn<C, ToolOutputOf<{}>>) => __Rewrap<C, ToolInputOf<{
|
|
141
|
+
inputSchema: I;
|
|
142
|
+
}>, ToolOutputOf<{}>>;
|
|
152
143
|
}
|
|
153
144
|
//# sourceMappingURL=tool.decorator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.decorator.d.ts","sourceRoot":"","sources":["../../../src/common/decorators/tool.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EACL,YAAY,EAEZ,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,EACxB,aAAa,EACb,cAAc,EACf,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAyB5C,MAAM,MAAM,0BAA0B,CACpC,QAAQ,SAAS,aAAa,EAC9B,SAAS,SAAS,cAAc,EAChC,EAAE,GAAG,WAAW,CAAC;IAAE,WAAW,EAAE,QAAQ,CAAA;CAAE,CAAC,EAC3C,GAAG,GAAG,YAAY,CAAC;IAAE,YAAY,EAAE,SAAS,CAAA;CAAE,CAAC,IAC7C,CAAC,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,WAAW,CAAC,QAAQ,EAAE,SAAS,CAAC,KAAK,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;AAE7E;;GAEG;AACH,iBAAS,YAAY,CACnB,CAAC,SA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C,CAAC,EAAE,WAAW,CAAC;QAAE,WAAW,EAAE,CAAC,CAAA;KAAE,CAAC,CAAC,GAC/C,YAAY,CAAC,CAAC,EAAE,YAAY,CAAC;QAAE,YAAY,EAAE,CAAC,CAAA;KAAE,CAAC,CAAC,KACjD,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC;QAAE,WAAW,EAAE,CAAC,CAAA;KAAE,CAAC,EAAE,YAAY,CAAC;QAAE,YAAY,EAAE,CAAC,CAAA;KAAE,CAAC,CAAC,CAAC;IAIrF,SAAgB,IAAI,CAAC,CAAC,SAAS,OAAO,EACpC,IAAI,EAAE,mBAAmB,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG;QAAE,YAAY,CAAC,EAAE,KAAK,CAAA;KAAE,GAC3D,CAAC,CAAC,SAAS,MAAM,EAClB,GAAG,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,EAAE,WAAW,CAAC;QAAE,WAAW,EAAE,CAAC,CAAA;KAAE,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC,KAC9G,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC;QAAE,WAAW,EAAE,CAAC,CAAA;KAAE,CAAC,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC;CACrE"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { BaseEntry } from './base.entry';
|
|
2
2
|
import { AppRecord } from '../records';
|
|
3
|
-
import { AdapterRegistryInterface,
|
|
3
|
+
import { AdapterRegistryInterface, PluginRegistryInterface, ProviderRegistryInterface } from '../interfaces';
|
|
4
4
|
import type { SkillRegistryInterface } from '../../skill/skill.registry';
|
|
5
5
|
import { AppMetadata } from '../metadata';
|
|
6
|
-
|
|
6
|
+
import type ToolRegistry from '../../tool/tool.registry';
|
|
7
|
+
import type ResourceRegistry from '../../resource/resource.registry';
|
|
8
|
+
import type PromptRegistry from '../../prompt/prompt.registry';
|
|
9
|
+
export declare abstract class AppEntry<Metadata = AppMetadata> extends BaseEntry<AppRecord, unknown, Metadata> {
|
|
7
10
|
readonly id: string;
|
|
8
11
|
/**
|
|
9
12
|
* Whether this app instance is a remote MCP app.
|
|
@@ -15,9 +18,9 @@ export declare abstract class AppEntry<Metadata = AppMetadata> extends BaseEntry
|
|
|
15
18
|
abstract get providers(): ProviderRegistryInterface;
|
|
16
19
|
abstract get adapters(): AdapterRegistryInterface;
|
|
17
20
|
abstract get plugins(): PluginRegistryInterface;
|
|
18
|
-
abstract get tools():
|
|
19
|
-
abstract get resources():
|
|
20
|
-
abstract get prompts():
|
|
21
|
+
abstract get tools(): ToolRegistry;
|
|
22
|
+
abstract get resources(): ResourceRegistry;
|
|
23
|
+
abstract get prompts(): PromptRegistry;
|
|
21
24
|
abstract get skills(): SkillRegistryInterface;
|
|
22
25
|
}
|
|
23
26
|
//# sourceMappingURL=app.entry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.entry.d.ts","sourceRoot":"","sources":["../../../src/common/entries/app.entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,
|
|
1
|
+
{"version":3,"file":"app.entry.d.ts","sourceRoot":"","sources":["../../../src/common/entries/app.entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC7G,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,YAAY,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,gBAAgB,MAAM,kCAAkC,CAAC;AACrE,OAAO,KAAK,cAAc,MAAM,8BAA8B,CAAC;AAE/D,8BAAsB,QAAQ,CAAC,QAAQ,GAAG,WAAW,CAAE,SAAQ,SAAS,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC;IACpG,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,QAAQ,KAAK,SAAS,IAAI,yBAAyB,CAAC;IAEpD,QAAQ,KAAK,QAAQ,IAAI,wBAAwB,CAAC;IAElD,QAAQ,KAAK,OAAO,IAAI,uBAAuB,CAAC;IAEhD,QAAQ,KAAK,KAAK,IAAI,YAAY,CAAC;IAEnC,QAAQ,KAAK,SAAS,IAAI,gBAAgB,CAAC;IAE3C,QAAQ,KAAK,OAAO,IAAI,cAAc,CAAC;IAEvC,QAAQ,KAAK,MAAM,IAAI,sBAAsB,CAAC;CAC/C"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Token } from '@frontmcp/di';
|
|
2
2
|
import { BaseEntry } from './base.entry';
|
|
3
3
|
import { PluginRecord } from '../records';
|
|
4
|
-
import { PluginInterface } from '../interfaces';
|
|
5
4
|
import { PluginMetadata } from '../metadata';
|
|
6
|
-
export declare abstract class PluginEntry extends BaseEntry<PluginRecord,
|
|
5
|
+
export declare abstract class PluginEntry extends BaseEntry<PluginRecord, unknown, PluginMetadata> {
|
|
7
6
|
abstract get<T>(token: Token<T>): T;
|
|
8
7
|
}
|
|
9
8
|
//# sourceMappingURL=plugin.entry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.entry.d.ts","sourceRoot":"","sources":["../../../src/common/entries/plugin.entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"plugin.entry.d.ts","sourceRoot":"","sources":["../../../src/common/entries/plugin.entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,8BAAsB,WAAY,SAAQ,SAAS,CAAC,YAAY,EAAE,OAAO,EAAE,cAAc,CAAC;IACxF,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;CACpC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { BaseEntry } from './base.entry';
|
|
2
2
|
import type { ProviderRecord } from '../records';
|
|
3
|
-
import type { ProviderInterface } from '../interfaces';
|
|
4
3
|
import type { ProviderMetadata } from '../metadata';
|
|
5
|
-
declare abstract class ProviderEntry extends BaseEntry<ProviderRecord,
|
|
4
|
+
declare abstract class ProviderEntry extends BaseEntry<ProviderRecord, unknown, ProviderMetadata> {
|
|
6
5
|
}
|
|
7
6
|
export { ProviderEntry };
|
|
8
7
|
//# sourceMappingURL=provider.entry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.entry.d.ts","sourceRoot":"","sources":["../../../src/common/entries/provider.entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"provider.entry.d.ts","sourceRoot":"","sources":["../../../src/common/entries/provider.entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,uBAAe,aAAc,SAAQ,SAAS,CAAC,cAAc,EAAE,OAAO,EAAE,gBAAgB,CAAC;CAAG;AAE5F,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -5,6 +5,8 @@ import { ResourceMetadata, ResourceTemplateMetadata } from '../metadata';
|
|
|
5
5
|
import { ReadResourceResult, Request, Notification } from '@frontmcp/protocol';
|
|
6
6
|
import { RequestHandlerExtra } from '@frontmcp/protocol';
|
|
7
7
|
import { AuthInfo } from '@frontmcp/protocol';
|
|
8
|
+
import type { ResourceArgumentCompleter } from '../interfaces/resource.interface';
|
|
9
|
+
import ProviderRegistry from '../../provider/provider.registry';
|
|
8
10
|
export type ResourceReadExtra = RequestHandlerExtra<Request, Notification> & {
|
|
9
11
|
authInfo: AuthInfo;
|
|
10
12
|
};
|
|
@@ -43,6 +45,11 @@ export declare abstract class ResourceEntry<Params extends Record<string, string
|
|
|
43
45
|
* Whether this resource is a template (has uriTemplate instead of uri)
|
|
44
46
|
*/
|
|
45
47
|
isTemplate: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Get the provider registry for this resource.
|
|
50
|
+
* Used by flows to build context-aware providers for CONTEXT-scoped dependencies.
|
|
51
|
+
*/
|
|
52
|
+
abstract get providers(): ProviderRegistry;
|
|
46
53
|
/**
|
|
47
54
|
* Create a resource context (class or function wrapper).
|
|
48
55
|
* @param uri The actual URI being read (for templates, this includes resolved params)
|
|
@@ -67,5 +74,11 @@ export declare abstract class ResourceEntry<Params extends Record<string, string
|
|
|
67
74
|
matches: boolean;
|
|
68
75
|
params: Params;
|
|
69
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* Get an argument completer for resource template autocompletion.
|
|
79
|
+
* Override in subclasses to provide suggestions for template parameters.
|
|
80
|
+
* Returns null by default (no completion available).
|
|
81
|
+
*/
|
|
82
|
+
getArgumentCompleter(_argName: string): ResourceArgumentCompleter | null;
|
|
70
83
|
}
|
|
71
84
|
//# sourceMappingURL=resource.entry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.entry.d.ts","sourceRoot":"","sources":["../../../src/common/entries/resource.entry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"resource.entry.d.ts","sourceRoot":"","sources":["../../../src/common/entries/resource.entry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,KAAK,EAAE,yBAAyB,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,GAAG,oBAAoB;IAEvD;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,GAAG,EAAE,GAAG,GAAG,2BAA2B,CAAC,oBAAoB,CAAC;IAErF;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAEpE;;;;OAIG;IACH,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,yBAAyB,GAAG,IAAI;CAGzE"}
|
|
@@ -1,27 +1,55 @@
|
|
|
1
1
|
import { Token, Type } from '@frontmcp/di';
|
|
2
2
|
import { BaseEntry } from './base.entry';
|
|
3
3
|
import { ScopeRecord } from '../records';
|
|
4
|
-
import {
|
|
4
|
+
import { ProviderRegistryInterface, FrontMcpAuth, FlowInputOf, FlowOutputOf, FlowType, FrontMcpLogger } from '../interfaces';
|
|
5
5
|
import { FlowName, ScopeMetadata } from '../metadata';
|
|
6
6
|
import type { NotificationService } from '../../notification';
|
|
7
7
|
import type { SkillRegistryInterface } from '../../skill/skill.registry';
|
|
8
|
-
|
|
8
|
+
import type { ToolUIRegistry } from '../../tool/ui/ui-shared';
|
|
9
|
+
import type { TransportService } from '../../transport/transport.registry';
|
|
10
|
+
import type { ElicitationStore } from '../../elicitation/store/elicitation.store';
|
|
11
|
+
import type { GuardManager } from '@frontmcp/guard';
|
|
12
|
+
import type HookRegistry from '../../hooks/hook.registry';
|
|
13
|
+
import type { AuthRegistry } from '../../auth/auth.registry';
|
|
14
|
+
import type AppRegistry from '../../app/app.registry';
|
|
15
|
+
import type ToolRegistry from '../../tool/tool.registry';
|
|
16
|
+
import type ResourceRegistry from '../../resource/resource.registry';
|
|
17
|
+
import type PromptRegistry from '../../prompt/prompt.registry';
|
|
18
|
+
import type AgentRegistry from '../../agent/agent.registry';
|
|
19
|
+
export declare abstract class ScopeEntry extends BaseEntry<ScopeRecord, unknown, ScopeMetadata> {
|
|
9
20
|
abstract readonly id: string;
|
|
10
21
|
abstract readonly entryPath: string;
|
|
11
22
|
abstract readonly routeBase: string;
|
|
12
23
|
abstract readonly logger: FrontMcpLogger;
|
|
13
24
|
get fullPath(): string;
|
|
14
25
|
abstract get auth(): FrontMcpAuth;
|
|
15
|
-
abstract get hooks():
|
|
16
|
-
abstract get authProviders():
|
|
26
|
+
abstract get hooks(): HookRegistry;
|
|
27
|
+
abstract get authProviders(): AuthRegistry;
|
|
17
28
|
abstract get providers(): ProviderRegistryInterface;
|
|
18
|
-
abstract get apps():
|
|
19
|
-
abstract get tools():
|
|
20
|
-
abstract get resources():
|
|
21
|
-
abstract get prompts():
|
|
29
|
+
abstract get apps(): AppRegistry;
|
|
30
|
+
abstract get tools(): ToolRegistry;
|
|
31
|
+
abstract get resources(): ResourceRegistry;
|
|
32
|
+
abstract get prompts(): PromptRegistry;
|
|
22
33
|
abstract get skills(): SkillRegistryInterface;
|
|
23
34
|
abstract get notifications(): NotificationService;
|
|
35
|
+
abstract get agents(): AgentRegistry;
|
|
36
|
+
abstract get toolUI(): ToolUIRegistry | undefined;
|
|
37
|
+
abstract get transportService(): TransportService | undefined;
|
|
38
|
+
abstract get rateLimitManager(): GuardManager | undefined;
|
|
39
|
+
abstract get elicitationStore(): ElicitationStore | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Lifecycle callbacks registered by plugins via onServerStarted().
|
|
42
|
+
* Called after the HTTP server starts listening.
|
|
43
|
+
*/
|
|
44
|
+
private readonly lifecycleCallbacks;
|
|
45
|
+
/**
|
|
46
|
+
* Register a callback to run after the server has started.
|
|
47
|
+
* Plugins can use this for post-startup initialization (e.g., warming caches,
|
|
48
|
+
* starting background jobs, logging readiness).
|
|
49
|
+
*/
|
|
50
|
+
onServerStarted(callback: () => void | Promise<void>): void;
|
|
24
51
|
abstract registryFlows(...flows: FlowType[]): Promise<void>;
|
|
25
52
|
abstract runFlow<Name extends FlowName>(name: Name, input: FlowInputOf<Name>, additionalDeps?: Map<Token, Type>): Promise<FlowOutputOf<Name> | undefined>;
|
|
53
|
+
abstract runFlowForOutput<Name extends FlowName>(name: Name, input: FlowInputOf<Name>, additionalDeps?: Map<Token, Type>): Promise<FlowOutputOf<Name>>;
|
|
26
54
|
}
|
|
27
55
|
//# sourceMappingURL=scope.entry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.entry.d.ts","sourceRoot":"","sources":["../../../src/common/entries/scope.entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"scope.entry.d.ts","sourceRoot":"","sources":["../../../src/common/entries/scope.entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EACL,yBAAyB,EACzB,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,cAAc,EACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,KAAK,EAAE,YAAY,EAA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G,SAAS,CAAC;IAElD,QAAQ,KAAK,gBAAgB,IAAI,gBAAgB,GAAG,SAAS,CAAC;IAE9D,QAAQ,KAAK,gBAAgB,IAAI,YAAY,GAAG,SAAS,CAAC;IAE1D,QAAQ,KAAK,gBAAgB,IAAI,gBAAgB,GAAG,SAAS,CAAC;IAE9D;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAyC;IAE5E;;;;OAIG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAc3D,QAAQ,CAAC,aAAa,CAAC,GAAG,KAAK,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAE3D,QAAQ,CAAC,OAAO,CAAC,IAAI,SAAS,QAAQ,EACpC,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,EACxB,cAAc,CAAC,EAAE,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,GAChC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;IAE1C,QAAQ,CAAC,gBAAgB,CAAC,IAAI,SAAS,QAAQ,EAC7C,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,EACxB,cAAc,CAAC,EAAE,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,GAChC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;CAC/B"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { Type, ValueType } from '@frontmcp/di';
|
|
2
2
|
import { AppMetadata, RemoteAppMetadata } from '../metadata';
|
|
3
|
-
/** Marker interface for FrontMCP application classes */
|
|
4
|
-
export interface AppInterface {
|
|
5
|
-
}
|
|
6
3
|
export type AppValueType<Provide> = ValueType<Provide> & AppMetadata;
|
|
7
|
-
export type AppType<T
|
|
4
|
+
export type AppType<T = unknown> = Type<T> | AppValueType<T> | RemoteAppMetadata;
|
|
8
5
|
//# sourceMappingURL=app.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.interface.d.ts","sourceRoot":"","sources":["../../../src/common/interfaces/app.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE7D,
|
|
1
|
+
{"version":3,"file":"app.interface.d.ts","sourceRoot":"","sources":["../../../src/common/interfaces/app.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE7D,MAAM,MAAM,YAAY,CAAC,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,WAAW,CAAC;AAErE,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC"}
|
|
@@ -1,46 +1,19 @@
|
|
|
1
1
|
import { Token } from '@frontmcp/di';
|
|
2
|
-
import { ScopeEntry, FlowEntry,
|
|
3
|
-
import { FrontMcpAuth } from './primary-auth-provider.interface';
|
|
2
|
+
import { ScopeEntry, FlowEntry, ProviderEntry, PluginEntry, AdapterEntry, LoggerEntry } from '../../entries';
|
|
4
3
|
import { FlowName } from '../../metadata';
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
4
|
+
import type HookRegistryCls from '../../../hooks/hook.registry';
|
|
5
|
+
import type { AuthRegistry as AuthRegistryCls } from '../../../auth/auth.registry';
|
|
6
|
+
import type AppRegistryCls from '../../../app/app.registry';
|
|
7
|
+
import type ToolRegistryCls from '../../../tool/tool.registry';
|
|
8
|
+
import type ResourceRegistryCls from '../../../resource/resource.registry';
|
|
9
|
+
import type PromptRegistryCls from '../../../prompt/prompt.registry';
|
|
10
|
+
import type AgentRegistryCls from '../../../agent/agent.registry';
|
|
8
11
|
export interface ScopeRegistryInterface {
|
|
9
12
|
getScopes(): ScopeEntry[];
|
|
10
13
|
}
|
|
11
14
|
export interface FlowRegistryInterface {
|
|
12
15
|
getFlows(): FlowEntry<FlowName>[];
|
|
13
16
|
}
|
|
14
|
-
export interface HookRegistryInterface {
|
|
15
|
-
/**
|
|
16
|
-
* used to pull hooks registered by a class and related to that class only,
|
|
17
|
-
* like registering hooks on specific tool execution
|
|
18
|
-
* @param token
|
|
19
|
-
*/
|
|
20
|
-
getClsHooks(token: Token): HookEntry[];
|
|
21
|
-
/**
|
|
22
|
-
* Used to pull all hooks registered to specific flow by name,
|
|
23
|
-
* this is used to construct the flow graph and execute hooks in order
|
|
24
|
-
* @param flow
|
|
25
|
-
*/
|
|
26
|
-
getFlowHooks<Name extends FlowName>(flow: Name): HookEntry<FlowInputOf<Name>, Name, FlowStagesOf<Name>, FlowCtxOf<Name>>[];
|
|
27
|
-
/**
|
|
28
|
-
* Used to pull all hooks registered to specific flow and stage by name,
|
|
29
|
-
* this is used to construct the flow graph and execute hooks in order
|
|
30
|
-
* @param flow
|
|
31
|
-
* @param stage
|
|
32
|
-
*/
|
|
33
|
-
getFlowStageHooks<Name extends FlowName>(flow: Name, stage: FlowStagesOf<Name> | string): HookEntry<FlowInputOf<Name>, Name, FlowStagesOf<Name>, FlowCtxOf<Name>>[];
|
|
34
|
-
/**
|
|
35
|
-
* Used to pull hooks for a specific flow, optionally filtered by owner ID.
|
|
36
|
-
* Returns all hooks if no ownerId is provided, or only hooks belonging to
|
|
37
|
-
* the specified owner or global hooks (no owner) if ownerId is provided.
|
|
38
|
-
* @param flow
|
|
39
|
-
* @param ownerId
|
|
40
|
-
*/
|
|
41
|
-
getFlowHooksForOwner<Name extends FlowName>(flow: Name, ownerId?: string): HookEntry<FlowInputOf<Name>, Name, FlowStagesOf<Name>, FlowCtxOf<Name>>[];
|
|
42
|
-
registerHooks(embedded: boolean, ...records: HookRecord[]): Promise<void[]>;
|
|
43
|
-
}
|
|
44
17
|
export interface ProviderViews {
|
|
45
18
|
/** App-wide singletons, created at boot. Immutable from invoke's POV. */
|
|
46
19
|
global: ReadonlyMap<Token, unknown>;
|
|
@@ -54,13 +27,6 @@ export interface ProviderRegistryInterface {
|
|
|
54
27
|
getRegistries<T extends RegistryKind>(type: T): RegistryType[T][];
|
|
55
28
|
buildViews(session: any): Promise<ProviderViews>;
|
|
56
29
|
}
|
|
57
|
-
export interface AuthRegistryInterface {
|
|
58
|
-
getPrimary(): FrontMcpAuth;
|
|
59
|
-
getAuthProviders(): AuthProviderEntry[];
|
|
60
|
-
}
|
|
61
|
-
export interface AppRegistryInterface {
|
|
62
|
-
getApps(): AppEntry[];
|
|
63
|
-
}
|
|
64
30
|
export interface PluginRegistryInterface {
|
|
65
31
|
getPlugins(): PluginEntry[];
|
|
66
32
|
getPluginNames(): string[];
|
|
@@ -68,43 +34,9 @@ export interface PluginRegistryInterface {
|
|
|
68
34
|
export interface AdapterRegistryInterface {
|
|
69
35
|
getAdapters(): AdapterEntry[];
|
|
70
36
|
}
|
|
71
|
-
export interface ToolRegistryInterface {
|
|
72
|
-
owner: EntryOwnerRef;
|
|
73
|
-
getTools(includeHidden?: boolean): ToolEntry[];
|
|
74
|
-
getToolsForListing(supportsElicitation?: boolean): ToolEntry[];
|
|
75
|
-
getInlineTools(): ToolEntry<any, any>[];
|
|
76
|
-
subscribe(opts: {
|
|
77
|
-
immediate?: boolean;
|
|
78
|
-
filter?: (i: ToolEntry) => boolean;
|
|
79
|
-
}, cb: (evt: ToolChangeEvent) => void): () => void;
|
|
80
|
-
}
|
|
81
|
-
export interface ResourceRegistryInterface {
|
|
82
|
-
owner: EntryOwnerRef;
|
|
83
|
-
getResources(includeHidden?: boolean): ResourceEntry<any, any>[];
|
|
84
|
-
getResourceTemplates(): ResourceEntry<any, any>[];
|
|
85
|
-
getInlineResources(): ResourceEntry<any, any>[];
|
|
86
|
-
findResourceForUri(uri: string): {
|
|
87
|
-
instance: ResourceEntry<any, any>;
|
|
88
|
-
params: Record<string, string>;
|
|
89
|
-
} | undefined;
|
|
90
|
-
}
|
|
91
|
-
export interface PromptRegistryInterface {
|
|
92
|
-
owner: EntryOwnerRef;
|
|
93
|
-
getPrompts(includeHidden?: boolean): PromptEntry[];
|
|
94
|
-
getInlinePrompts(): PromptEntry[];
|
|
95
|
-
findByName(name: string): PromptEntry | undefined;
|
|
96
|
-
}
|
|
97
37
|
export interface LoggerRegistryInterface {
|
|
98
38
|
getLoggers(): LoggerEntry[];
|
|
99
39
|
}
|
|
100
|
-
export interface AgentRegistryInterface {
|
|
101
|
-
owner: EntryOwnerRef;
|
|
102
|
-
getAgents(includeHidden?: boolean): AgentEntry[];
|
|
103
|
-
getInlineAgents(): AgentEntry[];
|
|
104
|
-
findById(id: string): AgentEntry | undefined;
|
|
105
|
-
findByName(name: string): AgentEntry | undefined;
|
|
106
|
-
getVisibleAgentsFor(agentId: string): AgentEntry[];
|
|
107
|
-
}
|
|
108
40
|
export type GlobalRegistryKind = 'LoggerRegistry' | 'ScopeRegistry';
|
|
109
41
|
export type ScopedRegistryKind = 'AppRegistry' | 'AuthRegistry' | 'FlowRegistry' | 'HookRegistry';
|
|
110
42
|
export type AppRegistryKind = 'ProviderRegistry' | 'PluginRegistry' | 'AdapterRegistry' | 'ToolRegistry' | 'PromptRegistry' | 'ResourceRegistry' | 'AgentRegistry' | 'SkillRegistry' | 'JobRegistry' | 'WorkflowRegistry';
|
|
@@ -116,16 +48,16 @@ export type RegistryType = {
|
|
|
116
48
|
LoggerRegistry: LoggerRegistryInterface;
|
|
117
49
|
ScopeRegistry: ScopeRegistryInterface;
|
|
118
50
|
FlowRegistry: FlowRegistryInterface;
|
|
119
|
-
HookRegistry:
|
|
120
|
-
AppRegistry:
|
|
121
|
-
AuthRegistry:
|
|
51
|
+
HookRegistry: HookRegistryCls;
|
|
52
|
+
AppRegistry: AppRegistryCls;
|
|
53
|
+
AuthRegistry: AuthRegistryCls;
|
|
122
54
|
ProviderRegistry: ProviderRegistryInterface;
|
|
123
55
|
PluginRegistry: PluginRegistryInterface;
|
|
124
56
|
AdapterRegistry: AdapterRegistryInterface;
|
|
125
|
-
ToolRegistry:
|
|
126
|
-
ResourceRegistry:
|
|
127
|
-
PromptRegistry:
|
|
128
|
-
AgentRegistry:
|
|
57
|
+
ToolRegistry: ToolRegistryCls;
|
|
58
|
+
ResourceRegistry: ResourceRegistryCls;
|
|
59
|
+
PromptRegistry: PromptRegistryCls;
|
|
60
|
+
AgentRegistry: AgentRegistryCls;
|
|
129
61
|
SkillRegistry: SkillRegistryInterface;
|
|
130
62
|
JobRegistry: JobRegistryInterface;
|
|
131
63
|
WorkflowRegistry: WorkflowRegistryInterface;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.interface.d.ts","sourceRoot":"","sources":["../../../../src/common/interfaces/internal/registry.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,
|
|
1
|
+
{"version":3,"file":"registry.interface.d.ts","sourceRoot":"","sources":["../../../../src/common/interfaces/internal/registry.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,OAAO,KAAK,eAAe,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,IAAI,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,eAAe,MAAM,6BAA6B,CAAC;AAC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AM,MAAM,eAAe,GACvB,kBAAkB,GAClB,gBAAgB,GAChB,iBAAiB,GACjB,cAAc,GACd,gBAAgB,GAChB,kBAAkB,GAClB,eAAe,GACf,eAAe,GACf,aAAa,GACb,kBAAkB,CAAC;AAEvB,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,eAAe,CAAC;AAGrF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAErF,MAAM,MAAM,YAAY,GAAG;IACzB,cAAc,EAAE,uBAAuB,CAAC;IACxC,aAAa,EAAE,sBAAsB,CAAC;IACtC,YAAY,EAAE,qBAAqB,CAAC;IACpC,YAAY,EAAE,eAAe,CAAC;IAC9B,WAAW,EAAE,cAAc,CAAC;IAC5B,YAAY,EAAE,eAAe,CAAC;IAC9B,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C,cAAc,EAAE,uBAAuB,CAAC;IACxC,eAAe,EAAE,wBAAwB,CAAC;IAC1C,YAAY,EAAE,eAAe,CAAC;IAC9B,gBAAgB,EAAE,mBAAmB,CAAC;IACtC,cAAc,EAAE,iBAAiB,CAAC;IAClC,aAAa,EAAE,gBAAgB,CAAC;IAChC,aAAa,EAAE,sBAAsB,CAAC;IACtC,WAAW,EAAE,oBAAoB,CAAC;IAClC,gBAAgB,EAAE,yBAAyB,CAAC;CAC7C,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Type, Token, ValueType, ClassType, FactoryType } from '@frontmcp/di';
|
|
2
2
|
import { PluginMetadata } from '../metadata';
|
|
3
|
-
export interface PluginInterface {
|
|
4
|
-
}
|
|
5
3
|
export type PluginClassType<Provide> = ClassType<Provide> & PluginMetadata;
|
|
6
4
|
export type PluginValueType<Provide> = ValueType<Provide> & PluginMetadata;
|
|
7
5
|
export type PluginFactoryType<Provide, Tokens extends readonly Token[]> = FactoryType<Provide, Tokens> & PluginMetadata;
|
|
8
|
-
export type PluginType<Provide
|
|
6
|
+
export type PluginType<Provide = unknown> = Type<Provide> | PluginClassType<Provide> | PluginValueType<Provide> | PluginFactoryType<Provide, readonly any[]>;
|
|
9
7
|
//# sourceMappingURL=plugin.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.interface.d.ts","sourceRoot":"","sources":["../../../src/common/interfaces/plugin.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,
|
|
1
|
+
{"version":3,"file":"plugin.interface.d.ts","sourceRoot":"","sources":["../../../src/common/interfaces/plugin.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,eAAe,CAAC,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,cAAc,CAAC;AAC3E,MAAM,MAAM,eAAe,CAAC,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,cAAc,CAAC;AAC3E,MAAM,MAAM,iBAAiB,CAAC,OAAO,EAAE,MAAM,SAAS,SAAS,KAAK,EAAE,IAAI,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,cAAc,CAAC;AAExH,MAAM,MAAM,UAAU,CAAC,OAAO,GAAG,OAAO,IACpC,IAAI,CAAC,OAAO,CAAC,GACb,eAAe,CAAC,OAAO,CAAC,GACxB,eAAe,CAAC,OAAO,CAAC,GACxB,iBAAiB,CAAC,OAAO,EAAE,SAAS,GAAG,EAAE,CAAC,CAAC"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Type, Token, ValueType, ClassType, FactoryType, ClassToken } from '@frontmcp/di';
|
|
2
2
|
import { ProviderMetadata } from '../metadata';
|
|
3
|
-
export interface ProviderInterface {
|
|
4
|
-
}
|
|
5
3
|
export type ProviderClassType<Provide> = ClassType<Provide> & ProviderMetadata;
|
|
6
4
|
export type ProviderValueType<Provide> = ValueType<Provide> & ProviderMetadata;
|
|
7
5
|
export type ProviderFactoryType<Provide, Tokens extends readonly (ClassToken | Token)[]> = FactoryType<Provide, Tokens> & ProviderMetadata;
|
|
8
|
-
export type ProviderType<Provide
|
|
6
|
+
export type ProviderType<Provide = unknown, Tokens extends readonly (ClassToken | Token)[] = readonly (ClassToken | Token)[]> = Type<Provide> | ProviderClassType<Provide> | ProviderValueType<Provide> | ProviderFactoryType<Provide, Tokens>;
|
|
9
7
|
/**
|
|
10
8
|
* Helper to define factory providers without tuple widening.
|
|
11
9
|
* Enforces that `useFactory` params follow the `inject()` tokens (order + arity).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.interface.d.ts","sourceRoot":"","sources":["../../../src/common/interfaces/provider.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,
|
|
1
|
+
{"version":3,"file":"provider.interface.d.ts","sourceRoot":"","sources":["../../../src/common/interfaces/provider.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,MAAM,iBAAiB,CAAC,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,gBAAgB,CAAC;AAC/E,MAAM,MAAM,iBAAiB,CAAC,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,gBAAgB,CAAC;AAC/E,MAAM,MAAM,mBAAmB,CAAC,OAAO,EAAE,MAAM,SAAS,SAAS,CAAC,UAAU,GAAG,KAAK,CAAC,EAAE,IAAI,WAAW,CACpG,OAAO,EACP,MAAM,CACP,GACC,gBAAgB,CAAC;AAEnB,MAAM,MAAM,YAAY,CACtB,OAAO,GAAG,OAAO,EACjB,MAAM,SAAS,SAAS,CAAC,UAAU,GAAG,KAAK,CAAC,EAAE,GAAG,SAAS,CAAC,UAAU,GAAG,KAAK,CAAC,EAAE,IAC9E,IAAI,CAAC,OAAO,CAAC,GAAG,iBAAiB,CAAC,OAAO,CAAC,GAAG,iBAAiB,CAAC,OAAO,CAAC,GAAG,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAEnH;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,SAAS,SAAS,CAAC,UAAU,GAAG,KAAK,CAAC,EAAE,EACzF,GAAG,EAAE,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,GACxC,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,CAEtC"}
|
|
@@ -9,6 +9,23 @@ import { ExecutionContextBase, ExecutionContextBaseArgs } from './execution-cont
|
|
|
9
9
|
export interface ResourceInterface<Params extends Record<string, string> = Record<string, string>, Out = unknown> {
|
|
10
10
|
execute(uri: string, params: Params): Promise<Out>;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Result returned by a resource argument completer.
|
|
14
|
+
*/
|
|
15
|
+
export interface ResourceCompletionResult {
|
|
16
|
+
/** Completion suggestions matching the partial value */
|
|
17
|
+
values: string[];
|
|
18
|
+
/** Total number of matching values (for pagination) */
|
|
19
|
+
total?: number;
|
|
20
|
+
/** Whether more results exist beyond what was returned */
|
|
21
|
+
hasMore?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Function that provides completion suggestions for a resource template argument.
|
|
25
|
+
* @param partial - The partial value typed so far
|
|
26
|
+
* @returns Completion suggestions
|
|
27
|
+
*/
|
|
28
|
+
export type ResourceArgumentCompleter = (partial: string) => Promise<ResourceCompletionResult> | ResourceCompletionResult;
|
|
12
29
|
/**
|
|
13
30
|
* Function-style resource type.
|
|
14
31
|
* This represents resources created via resource() or resourceTemplate() builders.
|
|
@@ -52,6 +69,27 @@ export declare abstract class ResourceContext<Params extends Record<string, stri
|
|
|
52
69
|
private readonly _outputHistory;
|
|
53
70
|
constructor(args: ResourceCtorArgs<Params>);
|
|
54
71
|
abstract execute(uri: string, params: Params): Promise<Out>;
|
|
72
|
+
/**
|
|
73
|
+
* Override to provide autocompletion for resource template arguments.
|
|
74
|
+
* Called by the MCP `completion/complete` handler when a client requests
|
|
75
|
+
* suggestions for a template parameter.
|
|
76
|
+
*
|
|
77
|
+
* @param argName - The template parameter name (e.g., 'userId')
|
|
78
|
+
* @returns A completer function, or null if no completion is available for this argument
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```typescript
|
|
82
|
+
* getArgumentCompleter(argName: string): ResourceArgumentCompleter | null {
|
|
83
|
+
* if (argName === 'userId') {
|
|
84
|
+
* return async (partial) => ({
|
|
85
|
+
* values: await this.searchUsers(partial),
|
|
86
|
+
* });
|
|
87
|
+
* }
|
|
88
|
+
* return null;
|
|
89
|
+
* }
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
getArgumentCompleter(_argName: string): ResourceArgumentCompleter | null;
|
|
55
93
|
get output(): Out | undefined;
|
|
56
94
|
set output(v: Out | undefined);
|
|
57
95
|
get outputHistory(): ReadonlyArray<HistoryEntry<Out>>;
|