@frontmcp/nx 0.0.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/LICENSE +201 -0
- package/README.md +135 -0
- package/executors/build/build.impl.d.ts +5 -0
- package/executors/build/build.impl.js +27 -0
- package/executors/build/build.impl.js.map +1 -0
- package/executors/build/schema.d.ts +5 -0
- package/executors/build/schema.js +3 -0
- package/executors/build/schema.js.map +1 -0
- package/executors/build/schema.json +22 -0
- package/executors/build-exec/build-exec.impl.d.ts +5 -0
- package/executors/build-exec/build-exec.impl.js +25 -0
- package/executors/build-exec/build-exec.impl.js.map +1 -0
- package/executors/build-exec/schema.d.ts +4 -0
- package/executors/build-exec/schema.js +3 -0
- package/executors/build-exec/schema.js.map +1 -0
- package/executors/build-exec/schema.json +11 -0
- package/executors/deploy/deploy.impl.d.ts +5 -0
- package/executors/deploy/deploy.impl.js +33 -0
- package/executors/deploy/deploy.impl.js.map +1 -0
- package/executors/deploy/schema.d.ts +3 -0
- package/executors/deploy/schema.js +3 -0
- package/executors/deploy/schema.js.map +1 -0
- package/executors/deploy/schema.json +14 -0
- package/executors/dev/dev.impl.d.ts +6 -0
- package/executors/dev/dev.impl.js +30 -0
- package/executors/dev/dev.impl.js.map +1 -0
- package/executors/dev/schema.d.ts +4 -0
- package/executors/dev/schema.js +3 -0
- package/executors/dev/schema.js.map +1 -0
- package/executors/dev/schema.json +11 -0
- package/executors/executor-context.d.ts +19 -0
- package/executors/executor-context.js +3 -0
- package/executors/executor-context.js.map +1 -0
- package/executors/inspector/inspector.impl.d.ts +5 -0
- package/executors/inspector/inspector.impl.js +28 -0
- package/executors/inspector/inspector.impl.js.map +1 -0
- package/executors/inspector/schema.d.ts +3 -0
- package/executors/inspector/schema.js +3 -0
- package/executors/inspector/schema.js.map +1 -0
- package/executors/inspector/schema.json +10 -0
- package/executors/serve/schema.d.ts +5 -0
- package/executors/serve/schema.js +3 -0
- package/executors/serve/schema.js.map +1 -0
- package/executors/serve/schema.json +12 -0
- package/executors/serve/serve.impl.d.ts +5 -0
- package/executors/serve/serve.impl.js +34 -0
- package/executors/serve/serve.impl.js.map +1 -0
- package/executors/test/schema.d.ts +7 -0
- package/executors/test/schema.js +3 -0
- package/executors/test/schema.js.map +1 -0
- package/executors/test/schema.json +14 -0
- package/executors/test/test.impl.d.ts +5 -0
- package/executors/test/test.impl.js +31 -0
- package/executors/test/test.impl.js.map +1 -0
- package/executors.json +39 -0
- package/generators/adapter/adapter.d.ts +4 -0
- package/generators/adapter/adapter.js +18 -0
- package/generators/adapter/adapter.js.map +1 -0
- package/generators/adapter/files/__fileName__.adapter.ts__tmpl__ +20 -0
- package/generators/adapter/schema.d.ts +6 -0
- package/generators/adapter/schema.js +3 -0
- package/generators/adapter/schema.js.map +1 -0
- package/generators/adapter/schema.json +32 -0
- package/generators/agent/agent.d.ts +4 -0
- package/generators/agent/agent.js +27 -0
- package/generators/agent/agent.js.map +1 -0
- package/generators/agent/files/__fileName__.agent.ts__tmpl__ +17 -0
- package/generators/agent/schema.d.ts +8 -0
- package/generators/agent/schema.js +3 -0
- package/generators/agent/schema.js.map +1 -0
- package/generators/agent/schema.json +41 -0
- package/generators/app/app.d.ts +4 -0
- package/generators/app/app.js +21 -0
- package/generators/app/app.js.map +1 -0
- package/generators/app/files/jest.config.ts__tmpl__ +21 -0
- package/generators/app/files/project.json__tmpl__ +37 -0
- package/generators/app/files/src/__fileName__.app.ts__tmpl__ +9 -0
- package/generators/app/files/src/main.ts__tmpl__ +9 -0
- package/generators/app/files/src/tools/hello.tool.ts__tmpl__ +14 -0
- package/generators/app/files/tsconfig.json__tmpl__ +17 -0
- package/generators/app/files/tsconfig.lib.json__tmpl__ +11 -0
- package/generators/app/files/tsconfig.spec.json__tmpl__ +10 -0
- package/generators/app/lib/index.d.ts +2 -0
- package/generators/app/lib/index.js +6 -0
- package/generators/app/lib/index.js.map +1 -0
- package/generators/app/lib/normalize-options.d.ts +12 -0
- package/generators/app/lib/normalize-options.js +20 -0
- package/generators/app/lib/normalize-options.js.map +1 -0
- package/generators/app/schema.d.ts +6 -0
- package/generators/app/schema.js +3 -0
- package/generators/app/schema.js.map +1 -0
- package/generators/app/schema.json +33 -0
- package/generators/auth-provider/auth-provider.d.ts +4 -0
- package/generators/auth-provider/auth-provider.js +22 -0
- package/generators/auth-provider/auth-provider.js.map +1 -0
- package/generators/auth-provider/files/__fileName__.auth-provider.ts__tmpl__ +27 -0
- package/generators/auth-provider/schema.d.ts +7 -0
- package/generators/auth-provider/schema.js +3 -0
- package/generators/auth-provider/schema.js.map +1 -0
- package/generators/auth-provider/schema.json +50 -0
- package/generators/flow/files/__fileName__.flow.ts__tmpl__ +31 -0
- package/generators/flow/flow.d.ts +4 -0
- package/generators/flow/flow.js +18 -0
- package/generators/flow/flow.js.map +1 -0
- package/generators/flow/schema.d.ts +6 -0
- package/generators/flow/schema.js +3 -0
- package/generators/flow/schema.js.map +1 -0
- package/generators/flow/schema.json +32 -0
- package/generators/job/files/__fileName__.job.ts__tmpl__ +19 -0
- package/generators/job/job.d.ts +4 -0
- package/generators/job/job.js +18 -0
- package/generators/job/job.js.map +1 -0
- package/generators/job/schema.d.ts +6 -0
- package/generators/job/schema.js +3 -0
- package/generators/job/schema.js.map +1 -0
- package/generators/job/schema.json +32 -0
- package/generators/lib/files/adapter/src/__fileName__.adapter.ts__tmpl__ +19 -0
- package/generators/lib/files/adapter/src/index.ts__tmpl__ +1 -0
- package/generators/lib/files/generic/src/__fileName__.ts__tmpl__ +5 -0
- package/generators/lib/files/generic/src/index.ts__tmpl__ +1 -0
- package/generators/lib/files/plugin/src/__fileName__.plugin.ts__tmpl__ +19 -0
- package/generators/lib/files/plugin/src/index.ts__tmpl__ +1 -0
- package/generators/lib/files/tool-register/src/__fileName__.tools.ts__tmpl__ +20 -0
- package/generators/lib/files/tool-register/src/index.ts__tmpl__ +1 -0
- package/generators/lib/lib/index.d.ts +2 -0
- package/generators/lib/lib/index.js +6 -0
- package/generators/lib/lib/index.js.map +1 -0
- package/generators/lib/lib/normalize-options.d.ts +15 -0
- package/generators/lib/lib/normalize-options.js +31 -0
- package/generators/lib/lib/normalize-options.js.map +1 -0
- package/generators/lib/lib.d.ts +4 -0
- package/generators/lib/lib.js +37 -0
- package/generators/lib/lib.js.map +1 -0
- package/generators/lib/schema.d.ts +9 -0
- package/generators/lib/schema.js +3 -0
- package/generators/lib/schema.js.map +1 -0
- package/generators/lib/schema.json +59 -0
- package/generators/plugin/files/__fileName__.context-extension.ts__tmpl__ +33 -0
- package/generators/plugin/files/__fileName__.plugin.ts__tmpl__ +19 -0
- package/generators/plugin/plugin.d.ts +4 -0
- package/generators/plugin/plugin.js +29 -0
- package/generators/plugin/plugin.js.map +1 -0
- package/generators/plugin/schema.d.ts +7 -0
- package/generators/plugin/schema.js +3 -0
- package/generators/plugin/schema.js.map +1 -0
- package/generators/plugin/schema.json +37 -0
- package/generators/prompt/files/__fileName__.prompt.ts__tmpl__ +25 -0
- package/generators/prompt/prompt.d.ts +4 -0
- package/generators/prompt/prompt.js +25 -0
- package/generators/prompt/prompt.js.map +1 -0
- package/generators/prompt/schema.d.ts +7 -0
- package/generators/prompt/schema.js +3 -0
- package/generators/prompt/schema.js.map +1 -0
- package/generators/prompt/schema.json +36 -0
- package/generators/provider/files/__fileName__.provider.ts__tmpl__ +15 -0
- package/generators/provider/provider.d.ts +4 -0
- package/generators/provider/provider.js +22 -0
- package/generators/provider/provider.js.map +1 -0
- package/generators/provider/schema.d.ts +7 -0
- package/generators/provider/schema.js +3 -0
- package/generators/provider/schema.js.map +1 -0
- package/generators/provider/schema.json +38 -0
- package/generators/resource/files/__fileName__.resource.ts__tmpl__ +43 -0
- package/generators/resource/resource.d.ts +4 -0
- package/generators/resource/resource.js +20 -0
- package/generators/resource/resource.js.map +1 -0
- package/generators/resource/schema.d.ts +7 -0
- package/generators/resource/schema.js +3 -0
- package/generators/resource/schema.js.map +1 -0
- package/generators/resource/schema.json +37 -0
- package/generators/server/files/cloudflare/wrangler.toml__tmpl__ +6 -0
- package/generators/server/files/common/project.json__tmpl__ +25 -0
- package/generators/server/files/common/src/main.ts__tmpl__ +9 -0
- package/generators/server/files/common/tsconfig.json__tmpl__ +14 -0
- package/generators/server/files/common/tsconfig.lib.json__tmpl__ +11 -0
- package/generators/server/files/lambda/template.yaml__tmpl__ +27 -0
- package/generators/server/files/node/Dockerfile__tmpl__ +17 -0
- package/generators/server/files/node/__dot__dockerignore__tmpl__ +8 -0
- package/generators/server/files/node/docker-compose.yml__tmpl__ +28 -0
- package/generators/server/files/vercel/vercel.json__tmpl__ +15 -0
- package/generators/server/lib/index.d.ts +2 -0
- package/generators/server/lib/index.js +6 -0
- package/generators/server/lib/index.js.map +1 -0
- package/generators/server/lib/normalize-options.d.ts +14 -0
- package/generators/server/lib/normalize-options.js +25 -0
- package/generators/server/lib/normalize-options.js.map +1 -0
- package/generators/server/schema.d.ts +9 -0
- package/generators/server/schema.js +3 -0
- package/generators/server/schema.js.map +1 -0
- package/generators/server/schema.json +62 -0
- package/generators/server/server.d.ts +4 -0
- package/generators/server/server.js +28 -0
- package/generators/server/server.js.map +1 -0
- package/generators/skill/files/__fileName__.skill.ts__tmpl__ +16 -0
- package/generators/skill/schema.d.ts +7 -0
- package/generators/skill/schema.js +3 -0
- package/generators/skill/schema.js.map +1 -0
- package/generators/skill/schema.json +36 -0
- package/generators/skill/skill.d.ts +4 -0
- package/generators/skill/skill.js +25 -0
- package/generators/skill/skill.js.map +1 -0
- package/generators/tool/files/__fileName__.tool.ts__tmpl__ +19 -0
- package/generators/tool/schema.d.ts +6 -0
- package/generators/tool/schema.js +3 -0
- package/generators/tool/schema.js.map +1 -0
- package/generators/tool/schema.json +32 -0
- package/generators/tool/tool.d.ts +4 -0
- package/generators/tool/tool.js +18 -0
- package/generators/tool/tool.js.map +1 -0
- package/generators/workflow/files/__fileName__.workflow.ts__tmpl__ +23 -0
- package/generators/workflow/schema.d.ts +6 -0
- package/generators/workflow/schema.js +3 -0
- package/generators/workflow/schema.js.map +1 -0
- package/generators/workflow/schema.json +32 -0
- package/generators/workflow/workflow.d.ts +4 -0
- package/generators/workflow/workflow.js +18 -0
- package/generators/workflow/workflow.js.map +1 -0
- package/generators/workspace/files/__dot__gitignore__tmpl__ +28 -0
- package/generators/workspace/files/__dot__prettierrc__tmpl__ +6 -0
- package/generators/workspace/files/nx.json__tmpl__ +52 -0
- package/generators/workspace/files/package.json__tmpl__ +46 -0
- package/generators/workspace/files/tsconfig.base.json__tmpl__ +24 -0
- package/generators/workspace/lib/index.d.ts +2 -0
- package/generators/workspace/lib/index.js +6 -0
- package/generators/workspace/lib/index.js.map +1 -0
- package/generators/workspace/lib/normalize-options.d.ts +5 -0
- package/generators/workspace/lib/normalize-options.js +14 -0
- package/generators/workspace/lib/normalize-options.js.map +1 -0
- package/generators/workspace/schema.d.ts +7 -0
- package/generators/workspace/schema.js +3 -0
- package/generators/workspace/schema.js.map +1 -0
- package/generators/workspace/schema.json +42 -0
- package/generators/workspace/workspace.d.ts +4 -0
- package/generators/workspace/workspace.js +47 -0
- package/generators/workspace/workspace.js.map +1 -0
- package/generators.json +84 -0
- package/index.d.ts +16 -0
- package/index.js +44 -0
- package/index.js.map +1 -0
- package/package.json +24 -0
- package/utils/add-dependencies.d.ts +2 -0
- package/utils/add-dependencies.js +8 -0
- package/utils/add-dependencies.js.map +1 -0
- package/utils/names.d.ts +5 -0
- package/utils/names.js +27 -0
- package/utils/names.js.map +1 -0
- package/utils/normalize-options.d.ts +16 -0
- package/utils/normalize-options.js +30 -0
- package/utils/normalize-options.js.map +1 -0
- package/utils/versions.d.ts +5 -0
- package/utils/versions.js +65 -0
- package/utils/versions.js.map +1 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { FrontMcp } from '@frontmcp/sdk';
|
|
3
|
+
import { <%= className %>App } from './<%= fileName %>.app';
|
|
4
|
+
|
|
5
|
+
@FrontMcp({
|
|
6
|
+
info: { name: '<%= className %>', version: '0.1.0' },
|
|
7
|
+
apps: [<%= className %>App],
|
|
8
|
+
})
|
|
9
|
+
export default class Server {}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Tool, ToolContext } from '@frontmcp/sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
@Tool({
|
|
5
|
+
name: 'hello',
|
|
6
|
+
description: 'Say hello to someone',
|
|
7
|
+
inputSchema: { name: z.string().describe('Name to greet') },
|
|
8
|
+
outputSchema: { message: z.string() },
|
|
9
|
+
})
|
|
10
|
+
export default class HelloTool extends ToolContext {
|
|
11
|
+
async execute(input: { name: string }) {
|
|
12
|
+
return { message: `Hello, ${input.name}!` };
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"forceConsistentCasingInFileNames": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"emitDecoratorMetadata": true,
|
|
9
|
+
"experimentalDecorators": true
|
|
10
|
+
},
|
|
11
|
+
"files": [],
|
|
12
|
+
"include": [],
|
|
13
|
+
"references": [
|
|
14
|
+
{ "path": "./tsconfig.lib.json" },
|
|
15
|
+
{ "path": "./tsconfig.spec.json" }
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "../../dist/out-tsc",
|
|
5
|
+
"module": "commonjs",
|
|
6
|
+
"moduleResolution": "NodeNext",
|
|
7
|
+
"types": ["jest", "node"]
|
|
8
|
+
},
|
|
9
|
+
"include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"]
|
|
10
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeOptions = void 0;
|
|
4
|
+
var normalize_options_js_1 = require("./normalize-options.js");
|
|
5
|
+
Object.defineProperty(exports, "normalizeOptions", { enumerable: true, get: function () { return normalize_options_js_1.normalizeOptions; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generators/app/lib/index.ts"],"names":[],"mappings":";;;AAAA,+DAA0D;AAAjD,wHAAA,gBAAgB,OAAA","sourcesContent":["export { normalizeOptions } from './normalize-options.js';\nexport type { NormalizedAppOptions } from './normalize-options.js';\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AppGeneratorSchema } from '../schema.js';
|
|
2
|
+
export interface NormalizedAppOptions {
|
|
3
|
+
name: string;
|
|
4
|
+
projectName: string;
|
|
5
|
+
projectRoot: string;
|
|
6
|
+
className: string;
|
|
7
|
+
fileName: string;
|
|
8
|
+
propertyName: string;
|
|
9
|
+
parsedTags: string[];
|
|
10
|
+
skipFormat: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function normalizeOptions(schema: AppGeneratorSchema): NormalizedAppOptions;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeOptions = normalizeOptions;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
function normalizeOptions(schema) {
|
|
6
|
+
const { className, fileName, propertyName } = (0, devkit_1.names)(schema.name);
|
|
7
|
+
const projectRoot = schema.directory ?? (0, devkit_1.joinPathFragments)('apps', fileName);
|
|
8
|
+
const parsedTags = schema.tags ? schema.tags.split(',').map((t) => t.trim()) : ['scope:apps'];
|
|
9
|
+
return {
|
|
10
|
+
name: schema.name,
|
|
11
|
+
projectName: fileName,
|
|
12
|
+
projectRoot,
|
|
13
|
+
className,
|
|
14
|
+
fileName,
|
|
15
|
+
propertyName,
|
|
16
|
+
parsedTags,
|
|
17
|
+
skipFormat: schema.skipFormat ?? false,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=normalize-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../src/generators/app/lib/normalize-options.ts"],"names":[],"mappings":";;AAcA,4CAeC;AA7BD,uCAAsD;AActD,SAAgB,gBAAgB,CAAC,MAA0B;IACzD,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,IAAA,cAAK,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACjE,MAAM,WAAW,GAAG,MAAM,CAAC,SAAS,IAAI,IAAA,0BAAiB,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC5E,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IAE9F,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,WAAW,EAAE,QAAQ;QACrB,WAAW;QACX,SAAS;QACT,QAAQ;QACR,YAAY;QACZ,UAAU;QACV,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,KAAK;KACvC,CAAC;AACJ,CAAC","sourcesContent":["import { names, joinPathFragments } from '@nx/devkit';\nimport type { AppGeneratorSchema } from '../schema.js';\n\nexport interface NormalizedAppOptions {\n name: string;\n projectName: string;\n projectRoot: string;\n className: string;\n fileName: string;\n propertyName: string;\n parsedTags: string[];\n skipFormat: boolean;\n}\n\nexport function normalizeOptions(schema: AppGeneratorSchema): NormalizedAppOptions {\n const { className, fileName, propertyName } = names(schema.name);\n const projectRoot = schema.directory ?? joinPathFragments('apps', fileName);\n const parsedTags = schema.tags ? schema.tags.split(',').map((t) => t.trim()) : ['scope:apps'];\n\n return {\n name: schema.name,\n projectName: fileName,\n projectRoot,\n className,\n fileName,\n propertyName,\n parsedTags,\n skipFormat: schema.skipFormat ?? false,\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/generators/app/schema.ts"],"names":[],"mappings":"","sourcesContent":["export interface AppGeneratorSchema {\n name: string;\n directory?: string;\n tags?: string;\n skipFormat?: boolean;\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "FrontMcpApp",
|
|
4
|
+
"title": "FrontMCP Application Generator",
|
|
5
|
+
"description": "Generate a FrontMCP application",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The name of the application",
|
|
11
|
+
"$default": { "$source": "argv", "index": 0 },
|
|
12
|
+
"x-prompt": "What name would you like for the application?",
|
|
13
|
+
"x-priority": "important"
|
|
14
|
+
},
|
|
15
|
+
"directory": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "The directory of the application (default: apps/<name>)",
|
|
18
|
+
"x-priority": "important"
|
|
19
|
+
},
|
|
20
|
+
"tags": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Comma-separated tags for the project",
|
|
23
|
+
"x-priority": "internal"
|
|
24
|
+
},
|
|
25
|
+
"skipFormat": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"description": "Skip formatting files",
|
|
28
|
+
"default": false,
|
|
29
|
+
"x-priority": "internal"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"required": ["name"]
|
|
33
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type Tree, type GeneratorCallback } from '@nx/devkit';
|
|
2
|
+
import type { AuthProviderGeneratorSchema } from './schema.js';
|
|
3
|
+
export declare function authProviderGenerator(tree: Tree, schema: AuthProviderGeneratorSchema): Promise<GeneratorCallback | void>;
|
|
4
|
+
export default authProviderGenerator;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.authProviderGenerator = authProviderGenerator;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const normalize_options_js_1 = require("../../utils/normalize-options.js");
|
|
7
|
+
async function authProviderGenerator(tree, schema) {
|
|
8
|
+
const options = (0, normalize_options_js_1.normalizePrimitiveOptions)(tree, schema, 'auth');
|
|
9
|
+
const authType = schema.type ?? 'bearer';
|
|
10
|
+
const constantName = (0, devkit_1.names)(schema.name).constantName;
|
|
11
|
+
(0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, 'files'), options.directory, {
|
|
12
|
+
...options,
|
|
13
|
+
authType,
|
|
14
|
+
constantName,
|
|
15
|
+
tmpl: '',
|
|
16
|
+
});
|
|
17
|
+
if (!schema.skipFormat) {
|
|
18
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = authProviderGenerator;
|
|
22
|
+
//# sourceMappingURL=auth-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-provider.js","sourceRoot":"","sources":["../../../../src/generators/auth-provider/auth-provider.ts"],"names":[],"mappings":";;AAKA,sDAkBC;AAvBD,uCAAkG;AAClG,+BAA4B;AAE5B,2EAA6E;AAEtE,KAAK,UAAU,qBAAqB,CACzC,IAAU,EACV,MAAmC;IAEnC,MAAM,OAAO,GAAG,IAAA,gDAAyB,EAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAChE,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,IAAI,QAAQ,CAAC;IACzC,MAAM,YAAY,GAAG,IAAA,cAAK,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC;IAErD,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAA,WAAI,EAAC,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,EAAE;QAC/D,GAAG,OAAO;QACV,QAAQ;QACR,YAAY;QACZ,IAAI,EAAE,EAAE;KACT,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;AACH,CAAC;AAED,kBAAe,qBAAqB,CAAC","sourcesContent":["import { type Tree, formatFiles, generateFiles, names, type GeneratorCallback } from '@nx/devkit';\nimport { join } from 'path';\nimport type { AuthProviderGeneratorSchema } from './schema.js';\nimport { normalizePrimitiveOptions } from '../../utils/normalize-options.js';\n\nexport async function authProviderGenerator(\n tree: Tree,\n schema: AuthProviderGeneratorSchema,\n): Promise<GeneratorCallback | void> {\n const options = normalizePrimitiveOptions(tree, schema, 'auth');\n const authType = schema.type ?? 'bearer';\n const constantName = names(schema.name).constantName;\n\n generateFiles(tree, join(__dirname, 'files'), options.directory, {\n ...options,\n authType,\n constantName,\n tmpl: '',\n });\n\n if (!schema.skipFormat) {\n await formatFiles(tree);\n }\n}\n\nexport default authProviderGenerator;\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AuthProvider } from '@frontmcp/sdk';
|
|
2
|
+
|
|
3
|
+
@AuthProvider({
|
|
4
|
+
name: '<%= name %>',
|
|
5
|
+
type: '<%= authType %>',
|
|
6
|
+
})
|
|
7
|
+
export class <%= className %>AuthProvider {
|
|
8
|
+
async headers(): Promise<Record<string, string>> {
|
|
9
|
+
<% if (authType === 'bearer') { %> const token = process.env.<%= constantName %>_TOKEN ?? '';
|
|
10
|
+
return { Authorization: `Bearer ${token}` };
|
|
11
|
+
<% } else if (authType === 'api-key') { %> const apiKey = process.env.<%= constantName %>_API_KEY ?? '';
|
|
12
|
+
return { 'X-API-Key': apiKey };
|
|
13
|
+
<% } else if (authType === 'basic') { %> const username = process.env.<%= constantName %>_USERNAME ?? '';
|
|
14
|
+
const password = process.env.<%= constantName %>_PASSWORD ?? '';
|
|
15
|
+
const encoded = Buffer.from(`${username}:${password}`).toString('base64');
|
|
16
|
+
return { Authorization: `Basic ${encoded}` };
|
|
17
|
+
<% } else if (authType === 'oauth') { %> // TODO: implement OAuth token retrieval
|
|
18
|
+
const accessToken = '';
|
|
19
|
+
return { Authorization: `Bearer ${accessToken}` };
|
|
20
|
+
<% } else { %> // TODO: implement custom auth headers
|
|
21
|
+
return {};
|
|
22
|
+
<% } %> }
|
|
23
|
+
<% if (authType === 'oauth') { %>
|
|
24
|
+
async refreshToken(): Promise<void> {
|
|
25
|
+
// TODO: implement token refresh logic
|
|
26
|
+
}
|
|
27
|
+
<% } %>}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/generators/auth-provider/schema.ts"],"names":[],"mappings":"","sourcesContent":["export interface AuthProviderGeneratorSchema {\n name: string;\n project: string;\n type?: 'oauth' | 'api-key' | 'bearer' | 'basic' | 'custom';\n directory?: string;\n skipFormat?: boolean;\n}\n"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "FrontMcpAuthProvider",
|
|
4
|
+
"title": "FrontMCP Auth Provider Generator",
|
|
5
|
+
"description": "Generate an @AuthProvider class",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The name of the auth provider",
|
|
11
|
+
"$default": { "$source": "argv", "index": 0 },
|
|
12
|
+
"x-prompt": "What name would you like for the auth provider?",
|
|
13
|
+
"x-priority": "important"
|
|
14
|
+
},
|
|
15
|
+
"project": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "The project to add the auth provider to",
|
|
18
|
+
"x-dropdown": "projects",
|
|
19
|
+
"x-priority": "important"
|
|
20
|
+
},
|
|
21
|
+
"type": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "The authentication type",
|
|
24
|
+
"enum": ["oauth", "api-key", "bearer", "basic", "custom"],
|
|
25
|
+
"default": "bearer",
|
|
26
|
+
"x-prompt": {
|
|
27
|
+
"message": "What type of authentication?",
|
|
28
|
+
"type": "list",
|
|
29
|
+
"items": [
|
|
30
|
+
{ "value": "oauth", "label": "OAuth 2.0" },
|
|
31
|
+
{ "value": "api-key", "label": "API Key" },
|
|
32
|
+
{ "value": "bearer", "label": "Bearer Token" },
|
|
33
|
+
{ "value": "basic", "label": "Basic Auth" },
|
|
34
|
+
{ "value": "custom", "label": "Custom" }
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"x-priority": "important"
|
|
38
|
+
},
|
|
39
|
+
"directory": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "Subdirectory within src/auth/"
|
|
42
|
+
},
|
|
43
|
+
"skipFormat": {
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"default": false,
|
|
46
|
+
"x-priority": "internal"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"required": ["name", "project"]
|
|
50
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Flow, FlowBase } from '@frontmcp/sdk';
|
|
2
|
+
|
|
3
|
+
@Flow({
|
|
4
|
+
name: '<%= name %>',
|
|
5
|
+
description: 'TODO: describe what this flow does',
|
|
6
|
+
plan: {
|
|
7
|
+
steps: ['pre', 'execute', 'post', 'finalize'],
|
|
8
|
+
},
|
|
9
|
+
})
|
|
10
|
+
export default class <%= className %>Flow extends FlowBase {
|
|
11
|
+
async pre(): Promise<void> {
|
|
12
|
+
// TODO: pre-processing logic
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async execute(): Promise<void> {
|
|
16
|
+
// TODO: main execution logic
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async post(): Promise<void> {
|
|
20
|
+
// TODO: post-processing logic
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async finalize(): Promise<void> {
|
|
24
|
+
// TODO: finalization logic
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async error(err: Error): Promise<void> {
|
|
28
|
+
// TODO: error handling logic
|
|
29
|
+
throw err;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.flowGenerator = flowGenerator;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const normalize_options_js_1 = require("../../utils/normalize-options.js");
|
|
7
|
+
async function flowGenerator(tree, schema) {
|
|
8
|
+
const options = (0, normalize_options_js_1.normalizePrimitiveOptions)(tree, schema, 'flows');
|
|
9
|
+
(0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, 'files'), options.directory, {
|
|
10
|
+
...options,
|
|
11
|
+
tmpl: '',
|
|
12
|
+
});
|
|
13
|
+
if (!schema.skipFormat) {
|
|
14
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.default = flowGenerator;
|
|
18
|
+
//# sourceMappingURL=flow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow.js","sourceRoot":"","sources":["../../../../src/generators/flow/flow.ts"],"names":[],"mappings":";;AAKA,sCAWC;AAhBD,uCAA2F;AAC3F,+BAA4B;AAE5B,2EAA6E;AAEtE,KAAK,UAAU,aAAa,CAAC,IAAU,EAAE,MAA2B;IACzE,MAAM,OAAO,GAAG,IAAA,gDAAyB,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAEjE,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAA,WAAI,EAAC,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,EAAE;QAC/D,GAAG,OAAO;QACV,IAAI,EAAE,EAAE;KACT,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;AACH,CAAC;AAED,kBAAe,aAAa,CAAC","sourcesContent":["import { type Tree, formatFiles, generateFiles, type GeneratorCallback } from '@nx/devkit';\nimport { join } from 'path';\nimport type { FlowGeneratorSchema } from './schema.js';\nimport { normalizePrimitiveOptions } from '../../utils/normalize-options.js';\n\nexport async function flowGenerator(tree: Tree, schema: FlowGeneratorSchema): Promise<GeneratorCallback | void> {\n const options = normalizePrimitiveOptions(tree, schema, 'flows');\n\n generateFiles(tree, join(__dirname, 'files'), options.directory, {\n ...options,\n tmpl: '',\n });\n\n if (!schema.skipFormat) {\n await formatFiles(tree);\n }\n}\n\nexport default flowGenerator;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/generators/flow/schema.ts"],"names":[],"mappings":"","sourcesContent":["export interface FlowGeneratorSchema {\n name: string;\n project: string;\n directory?: string;\n skipFormat?: boolean;\n}\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "FrontMcpFlow",
|
|
4
|
+
"title": "FrontMCP Flow Generator",
|
|
5
|
+
"description": "Generate a @Flow class extending FlowBase",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The name of the flow",
|
|
11
|
+
"$default": { "$source": "argv", "index": 0 },
|
|
12
|
+
"x-prompt": "What name would you like for the flow?",
|
|
13
|
+
"x-priority": "important"
|
|
14
|
+
},
|
|
15
|
+
"project": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "The project to add the flow to",
|
|
18
|
+
"x-dropdown": "projects",
|
|
19
|
+
"x-priority": "important"
|
|
20
|
+
},
|
|
21
|
+
"directory": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Subdirectory within src/flows/"
|
|
24
|
+
},
|
|
25
|
+
"skipFormat": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"default": false,
|
|
28
|
+
"x-priority": "internal"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"required": ["name", "project"]
|
|
32
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Job, JobContext } from '@frontmcp/sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
@Job({
|
|
5
|
+
name: '<%= name %>',
|
|
6
|
+
description: 'TODO: describe what this job does',
|
|
7
|
+
inputSchema: {
|
|
8
|
+
value: z.string().describe('TODO: replace with actual input'),
|
|
9
|
+
},
|
|
10
|
+
outputSchema: {
|
|
11
|
+
result: z.string().describe('TODO: replace with actual output'),
|
|
12
|
+
},
|
|
13
|
+
})
|
|
14
|
+
export default class <%= className %>Job extends JobContext {
|
|
15
|
+
async execute(input: { value: string }) {
|
|
16
|
+
// Full SDK access: this.scope.tools, this.scope.agents, etc.
|
|
17
|
+
return { result: `Processed: ${input.value}` };
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.jobGenerator = jobGenerator;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const normalize_options_js_1 = require("../../utils/normalize-options.js");
|
|
7
|
+
async function jobGenerator(tree, schema) {
|
|
8
|
+
const options = (0, normalize_options_js_1.normalizePrimitiveOptions)(tree, schema, 'jobs');
|
|
9
|
+
(0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, 'files'), options.directory, {
|
|
10
|
+
...options,
|
|
11
|
+
tmpl: '',
|
|
12
|
+
});
|
|
13
|
+
if (!schema.skipFormat) {
|
|
14
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.default = jobGenerator;
|
|
18
|
+
//# sourceMappingURL=job.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job.js","sourceRoot":"","sources":["../../../../src/generators/job/job.ts"],"names":[],"mappings":";;AAKA,oCAWC;AAhBD,uCAA2F;AAC3F,+BAA4B;AAE5B,2EAA6E;AAEtE,KAAK,UAAU,YAAY,CAAC,IAAU,EAAE,MAA0B;IACvE,MAAM,OAAO,GAAG,IAAA,gDAAyB,EAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAEhE,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAA,WAAI,EAAC,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,EAAE;QAC/D,GAAG,OAAO;QACV,IAAI,EAAE,EAAE;KACT,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;AACH,CAAC;AAED,kBAAe,YAAY,CAAC","sourcesContent":["import { type Tree, formatFiles, generateFiles, type GeneratorCallback } from '@nx/devkit';\nimport { join } from 'path';\nimport type { JobGeneratorSchema } from './schema.js';\nimport { normalizePrimitiveOptions } from '../../utils/normalize-options.js';\n\nexport async function jobGenerator(tree: Tree, schema: JobGeneratorSchema): Promise<GeneratorCallback | void> {\n const options = normalizePrimitiveOptions(tree, schema, 'jobs');\n\n generateFiles(tree, join(__dirname, 'files'), options.directory, {\n ...options,\n tmpl: '',\n });\n\n if (!schema.skipFormat) {\n await formatFiles(tree);\n }\n}\n\nexport default jobGenerator;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/generators/job/schema.ts"],"names":[],"mappings":"","sourcesContent":["export interface JobGeneratorSchema {\n name: string;\n project: string;\n directory?: string;\n skipFormat?: boolean;\n}\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "FrontMcpJob",
|
|
4
|
+
"title": "FrontMCP Job Generator",
|
|
5
|
+
"description": "Generate a @Job class",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The name of the job",
|
|
11
|
+
"$default": { "$source": "argv", "index": 0 },
|
|
12
|
+
"x-prompt": "What name would you like for the job?",
|
|
13
|
+
"x-priority": "important"
|
|
14
|
+
},
|
|
15
|
+
"project": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "The project to add the job to",
|
|
18
|
+
"x-dropdown": "projects",
|
|
19
|
+
"x-priority": "important"
|
|
20
|
+
},
|
|
21
|
+
"directory": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Subdirectory within src/jobs/"
|
|
24
|
+
},
|
|
25
|
+
"skipFormat": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"default": false,
|
|
28
|
+
"x-priority": "internal"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"required": ["name", "project"]
|
|
32
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Adapter, DynamicAdapter, type AdapterFetchResult } from '@frontmcp/sdk';
|
|
2
|
+
|
|
3
|
+
export interface <%= className %>AdapterOptions {
|
|
4
|
+
// TODO: define adapter options
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@Adapter({
|
|
8
|
+
name: '<%= fileName %>',
|
|
9
|
+
description: 'TODO: describe what this adapter does',
|
|
10
|
+
})
|
|
11
|
+
export class <%= className %>Adapter extends DynamicAdapter<<%= className %>AdapterOptions> {
|
|
12
|
+
async fetch(): Promise<AdapterFetchResult> {
|
|
13
|
+
return {
|
|
14
|
+
tools: [],
|
|
15
|
+
resources: [],
|
|
16
|
+
prompts: [],
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { <%= className %>Adapter } from './<%= fileName %>.adapter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { <%= className %> } from './<%= fileName %>';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Plugin, DynamicPlugin, type PluginRegistrationContext } from '@frontmcp/sdk';
|
|
2
|
+
|
|
3
|
+
export interface <%= className %>PluginOptions {
|
|
4
|
+
// TODO: define plugin options
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@Plugin({
|
|
8
|
+
name: '<%= fileName %>',
|
|
9
|
+
description: 'TODO: describe what this plugin does',
|
|
10
|
+
})
|
|
11
|
+
export class <%= className %>Plugin extends DynamicPlugin<<%= className %>PluginOptions> {
|
|
12
|
+
async dynamicProviders() {
|
|
13
|
+
return [];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async onRegister(ctx: PluginRegistrationContext): Promise<void> {
|
|
17
|
+
// TODO: register tools, resources, prompts
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { <%= className %>Plugin } from './<%= fileName %>.plugin';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Tool, ToolContext } from '@frontmcp/sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
@Tool({
|
|
5
|
+
name: '<%= fileName %>_example',
|
|
6
|
+
description: 'Example tool from <%= className %> register',
|
|
7
|
+
inputSchema: { value: z.string() },
|
|
8
|
+
outputSchema: { result: z.string() },
|
|
9
|
+
})
|
|
10
|
+
export class ExampleTool extends ToolContext {
|
|
11
|
+
async execute(input: { value: string }) {
|
|
12
|
+
return { result: input.value };
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Export all tools from this register.
|
|
18
|
+
* Add them to your App's tools array: `tools: [...<%= className %>Tools]`
|
|
19
|
+
*/
|
|
20
|
+
export const <%= className %>Tools = [ExampleTool];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { <%= className %>Tools } from './<%= fileName %>.tools';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeOptions = void 0;
|
|
4
|
+
var normalize_options_js_1 = require("./normalize-options.js");
|
|
5
|
+
Object.defineProperty(exports, "normalizeOptions", { enumerable: true, get: function () { return normalize_options_js_1.normalizeOptions; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generators/lib/lib/index.ts"],"names":[],"mappings":";;;AAAA,+DAA0D;AAAjD,wHAAA,gBAAgB,OAAA","sourcesContent":["export { normalizeOptions } from './normalize-options.js';\nexport type { NormalizedLibOptions } from './normalize-options.js';\n"]}
|