nestjs-apcore 0.1.0
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 +304 -0
- package/dist/bridge/binding-loader.d.ts +33 -0
- package/dist/bridge/binding-loader.d.ts.map +1 -0
- package/dist/bridge/binding-loader.js +118 -0
- package/dist/bridge/binding-loader.js.map +1 -0
- package/dist/bridge/index.d.ts +3 -0
- package/dist/bridge/index.d.ts.map +1 -0
- package/dist/bridge/index.js +2 -0
- package/dist/bridge/index.js.map +1 -0
- package/dist/constants.d.ts +6 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +8 -0
- package/dist/constants.js.map +1 -0
- package/dist/core/apcore-executor.service.d.ts +42 -0
- package/dist/core/apcore-executor.service.d.ts.map +1 -0
- package/dist/core/apcore-executor.service.js +68 -0
- package/dist/core/apcore-executor.service.js.map +1 -0
- package/dist/core/apcore-registry.service.d.ts +52 -0
- package/dist/core/apcore-registry.service.d.ts.map +1 -0
- package/dist/core/apcore-registry.service.js +181 -0
- package/dist/core/apcore-registry.service.js.map +1 -0
- package/dist/core/apcore.module.d.ts +27 -0
- package/dist/core/apcore.module.d.ts.map +1 -0
- package/dist/core/apcore.module.js +105 -0
- package/dist/core/apcore.module.js.map +1 -0
- package/dist/decorators/ap-context.decorator.d.ts +2 -0
- package/dist/decorators/ap-context.decorator.d.ts.map +1 -0
- package/dist/decorators/ap-context.decorator.js +9 -0
- package/dist/decorators/ap-context.decorator.js.map +1 -0
- package/dist/decorators/ap-module.decorator.d.ts +3 -0
- package/dist/decorators/ap-module.decorator.d.ts.map +1 -0
- package/dist/decorators/ap-module.decorator.js +7 -0
- package/dist/decorators/ap-module.decorator.js.map +1 -0
- package/dist/decorators/ap-tool-scanner.service.d.ts +28 -0
- package/dist/decorators/ap-tool-scanner.service.d.ts.map +1 -0
- package/dist/decorators/ap-tool-scanner.service.js +166 -0
- package/dist/decorators/ap-tool-scanner.service.js.map +1 -0
- package/dist/decorators/ap-tool.decorator.d.ts +3 -0
- package/dist/decorators/ap-tool.decorator.d.ts.map +1 -0
- package/dist/decorators/ap-tool.decorator.js +7 -0
- package/dist/decorators/ap-tool.decorator.js.map +1 -0
- package/dist/decorators/index.d.ts +4 -0
- package/dist/decorators/index.d.ts.map +1 -0
- package/dist/decorators/index.js +4 -0
- package/dist/decorators/index.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/apcore-mcp.module.d.ts +28 -0
- package/dist/mcp/apcore-mcp.module.d.ts.map +1 -0
- package/dist/mcp/apcore-mcp.module.js +77 -0
- package/dist/mcp/apcore-mcp.module.js.map +1 -0
- package/dist/mcp/apcore-mcp.service.d.ts +53 -0
- package/dist/mcp/apcore-mcp.service.d.ts.map +1 -0
- package/dist/mcp/apcore-mcp.service.js +148 -0
- package/dist/mcp/apcore-mcp.service.js.map +1 -0
- package/dist/schema/adapters/dto.adapter.d.ts +44 -0
- package/dist/schema/adapters/dto.adapter.d.ts.map +1 -0
- package/dist/schema/adapters/dto.adapter.js +191 -0
- package/dist/schema/adapters/dto.adapter.js.map +1 -0
- package/dist/schema/adapters/json-schema.adapter.d.ts +30 -0
- package/dist/schema/adapters/json-schema.adapter.d.ts.map +1 -0
- package/dist/schema/adapters/json-schema.adapter.js +48 -0
- package/dist/schema/adapters/json-schema.adapter.js.map +1 -0
- package/dist/schema/adapters/schema-adapter.interface.d.ts +21 -0
- package/dist/schema/adapters/schema-adapter.interface.d.ts.map +1 -0
- package/dist/schema/adapters/schema-adapter.interface.js +2 -0
- package/dist/schema/adapters/schema-adapter.interface.js.map +1 -0
- package/dist/schema/adapters/typebox.adapter.d.ts +32 -0
- package/dist/schema/adapters/typebox.adapter.d.ts.map +1 -0
- package/dist/schema/adapters/typebox.adapter.js +46 -0
- package/dist/schema/adapters/typebox.adapter.js.map +1 -0
- package/dist/schema/adapters/zod.adapter.d.ts +16 -0
- package/dist/schema/adapters/zod.adapter.d.ts.map +1 -0
- package/dist/schema/adapters/zod.adapter.js +184 -0
- package/dist/schema/adapters/zod.adapter.js.map +1 -0
- package/dist/schema/schema-extractor.service.d.ts +58 -0
- package/dist/schema/schema-extractor.service.d.ts.map +1 -0
- package/dist/schema/schema-extractor.service.js +100 -0
- package/dist/schema/schema-extractor.service.js.map +1 -0
- package/dist/types.d.ts +106 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/id-generator.d.ts +41 -0
- package/dist/utils/id-generator.d.ts.map +1 -0
- package/dist/utils/id-generator.js +87 -0
- package/dist/utils/id-generator.js.map +1 -0
- package/package.json +100 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { TSchema } from '@sinclair/typebox';
|
|
2
|
+
import type { SchemaAdapter } from './adapters/schema-adapter.interface.js';
|
|
3
|
+
/**
|
|
4
|
+
* Thrown when no registered adapter is able to handle the provided input.
|
|
5
|
+
*/
|
|
6
|
+
export declare class SchemaExtractionError extends Error {
|
|
7
|
+
readonly name = "SchemaExtractionError";
|
|
8
|
+
constructor(message: string);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Orchestrator service that delegates schema detection, extraction, and
|
|
12
|
+
* JSON Schema conversion to a prioritised chain of {@link SchemaAdapter}s.
|
|
13
|
+
*
|
|
14
|
+
* Built-in adapters (tried in descending priority order):
|
|
15
|
+
*
|
|
16
|
+
* | Adapter | Priority |
|
|
17
|
+
* |--------------------|----------|
|
|
18
|
+
* | TypeBoxAdapter | 100 |
|
|
19
|
+
* | ZodAdapter | 50 |
|
|
20
|
+
* | JsonSchemaAdapter | 30 |
|
|
21
|
+
* | DtoAdapter | 20 |
|
|
22
|
+
*
|
|
23
|
+
* Custom adapters can be added via {@link registerAdapter} and will be
|
|
24
|
+
* inserted into the chain according to their priority value (highest first).
|
|
25
|
+
*/
|
|
26
|
+
export declare class SchemaExtractor {
|
|
27
|
+
private adapters;
|
|
28
|
+
constructor();
|
|
29
|
+
/**
|
|
30
|
+
* Register a custom adapter and re-sort the adapter chain by priority
|
|
31
|
+
* (highest first).
|
|
32
|
+
*/
|
|
33
|
+
registerAdapter(adapter: SchemaAdapter): void;
|
|
34
|
+
/**
|
|
35
|
+
* Returns the name of the first adapter whose `detect()` returns `true`
|
|
36
|
+
* for the given input, or `null` if no adapter matches.
|
|
37
|
+
*/
|
|
38
|
+
detect(input: unknown): string | null;
|
|
39
|
+
/**
|
|
40
|
+
* Extracts a TypeBox-compatible `TSchema` from the given input using the
|
|
41
|
+
* first matching adapter.
|
|
42
|
+
*
|
|
43
|
+
* @throws {SchemaExtractionError} If no adapter can handle the input.
|
|
44
|
+
*/
|
|
45
|
+
extract(input: unknown): TSchema;
|
|
46
|
+
/**
|
|
47
|
+
* Extracts a plain JSON Schema object from the given input using the
|
|
48
|
+
* first matching adapter.
|
|
49
|
+
*
|
|
50
|
+
* @throws {SchemaExtractionError} If no adapter can handle the input.
|
|
51
|
+
*/
|
|
52
|
+
extractJsonSchema(input: unknown): Record<string, unknown>;
|
|
53
|
+
/**
|
|
54
|
+
* Sort adapters in descending priority order (highest priority first).
|
|
55
|
+
*/
|
|
56
|
+
private sortAdapters;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=schema-extractor.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-extractor.service.d.ts","sourceRoot":"","sources":["../../src/schema/schema-extractor.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAM5E;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,SAAkB,IAAI,2BAA2B;gBAErC,OAAO,EAAE,MAAM;CAK5B;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAkB;;IAYlC;;;OAGG;IACH,eAAe,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAK7C;;;OAGG;IACH,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI;IASrC;;;;;OAKG;IACH,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAYhC;;;;;OAKG;IACH,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAY1D;;OAEG;IACH,OAAO,CAAC,YAAY;CAGrB"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { TypeBoxAdapter } from './adapters/typebox.adapter.js';
|
|
2
|
+
import { ZodAdapter } from './adapters/zod.adapter.js';
|
|
3
|
+
import { JsonSchemaAdapter } from './adapters/json-schema.adapter.js';
|
|
4
|
+
import { DtoAdapter } from './adapters/dto.adapter.js';
|
|
5
|
+
/**
|
|
6
|
+
* Thrown when no registered adapter is able to handle the provided input.
|
|
7
|
+
*/
|
|
8
|
+
export class SchemaExtractionError extends Error {
|
|
9
|
+
name = 'SchemaExtractionError';
|
|
10
|
+
constructor(message) {
|
|
11
|
+
super(message);
|
|
12
|
+
// Restore prototype chain (needed when targeting ES5 or when extending built-ins)
|
|
13
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Orchestrator service that delegates schema detection, extraction, and
|
|
18
|
+
* JSON Schema conversion to a prioritised chain of {@link SchemaAdapter}s.
|
|
19
|
+
*
|
|
20
|
+
* Built-in adapters (tried in descending priority order):
|
|
21
|
+
*
|
|
22
|
+
* | Adapter | Priority |
|
|
23
|
+
* |--------------------|----------|
|
|
24
|
+
* | TypeBoxAdapter | 100 |
|
|
25
|
+
* | ZodAdapter | 50 |
|
|
26
|
+
* | JsonSchemaAdapter | 30 |
|
|
27
|
+
* | DtoAdapter | 20 |
|
|
28
|
+
*
|
|
29
|
+
* Custom adapters can be added via {@link registerAdapter} and will be
|
|
30
|
+
* inserted into the chain according to their priority value (highest first).
|
|
31
|
+
*/
|
|
32
|
+
export class SchemaExtractor {
|
|
33
|
+
adapters;
|
|
34
|
+
constructor() {
|
|
35
|
+
this.adapters = [
|
|
36
|
+
new TypeBoxAdapter(),
|
|
37
|
+
new ZodAdapter(),
|
|
38
|
+
new JsonSchemaAdapter(),
|
|
39
|
+
new DtoAdapter(),
|
|
40
|
+
];
|
|
41
|
+
this.sortAdapters();
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Register a custom adapter and re-sort the adapter chain by priority
|
|
45
|
+
* (highest first).
|
|
46
|
+
*/
|
|
47
|
+
registerAdapter(adapter) {
|
|
48
|
+
this.adapters.push(adapter);
|
|
49
|
+
this.sortAdapters();
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Returns the name of the first adapter whose `detect()` returns `true`
|
|
53
|
+
* for the given input, or `null` if no adapter matches.
|
|
54
|
+
*/
|
|
55
|
+
detect(input) {
|
|
56
|
+
for (const adapter of this.adapters) {
|
|
57
|
+
if (adapter.detect(input)) {
|
|
58
|
+
return adapter.name;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Extracts a TypeBox-compatible `TSchema` from the given input using the
|
|
65
|
+
* first matching adapter.
|
|
66
|
+
*
|
|
67
|
+
* @throws {SchemaExtractionError} If no adapter can handle the input.
|
|
68
|
+
*/
|
|
69
|
+
extract(input) {
|
|
70
|
+
for (const adapter of this.adapters) {
|
|
71
|
+
if (adapter.detect(input)) {
|
|
72
|
+
return adapter.extract(input);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
throw new SchemaExtractionError('No adapter matched the provided input. ' +
|
|
76
|
+
'Ensure the input is a valid TypeBox, Zod, JSON Schema, or class-validator DTO schema.');
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Extracts a plain JSON Schema object from the given input using the
|
|
80
|
+
* first matching adapter.
|
|
81
|
+
*
|
|
82
|
+
* @throws {SchemaExtractionError} If no adapter can handle the input.
|
|
83
|
+
*/
|
|
84
|
+
extractJsonSchema(input) {
|
|
85
|
+
for (const adapter of this.adapters) {
|
|
86
|
+
if (adapter.detect(input)) {
|
|
87
|
+
return adapter.extractJsonSchema(input);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
throw new SchemaExtractionError('No adapter matched the provided input. ' +
|
|
91
|
+
'Ensure the input is a valid TypeBox, Zod, JSON Schema, or class-validator DTO schema.');
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Sort adapters in descending priority order (highest priority first).
|
|
95
|
+
*/
|
|
96
|
+
sortAdapters() {
|
|
97
|
+
this.adapters.sort((a, b) => b.priority - a.priority);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=schema-extractor.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-extractor.service.js","sourceRoot":"","sources":["../../src/schema/schema-extractor.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC5B,IAAI,GAAG,uBAAuB,CAAC;IAEjD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,kFAAkF;QAClF,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACpD,CAAC;CACF;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,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;YACvC,uFAAuF,CAC1F,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,YAAY;QAClB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;IACxD,CAAC;CACF"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export type { ModuleAnnotations, ModuleExample, Module, Context, Identity, ModuleDescriptor, } from 'apcore-js';
|
|
2
|
+
/** Annotations describing tool behavior characteristics. */
|
|
3
|
+
export interface ApToolAnnotations {
|
|
4
|
+
readonly?: boolean;
|
|
5
|
+
destructive?: boolean;
|
|
6
|
+
idempotent?: boolean;
|
|
7
|
+
requiresApproval?: boolean;
|
|
8
|
+
openWorld?: boolean;
|
|
9
|
+
streaming?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** Example entry for a tool invocation. */
|
|
12
|
+
export interface ApToolExample {
|
|
13
|
+
title: string;
|
|
14
|
+
inputs: Record<string, unknown>;
|
|
15
|
+
output: Record<string, unknown>;
|
|
16
|
+
description?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Options accepted by the @ApTool decorator. */
|
|
19
|
+
export interface ApToolOptions {
|
|
20
|
+
description: string;
|
|
21
|
+
id?: string | null;
|
|
22
|
+
inputSchema?: unknown | null;
|
|
23
|
+
outputSchema?: unknown | null;
|
|
24
|
+
annotations?: ApToolAnnotations | null;
|
|
25
|
+
tags?: string[];
|
|
26
|
+
documentation?: string | null;
|
|
27
|
+
examples?: ApToolExample[];
|
|
28
|
+
}
|
|
29
|
+
/** Options accepted by the @ApModule decorator. */
|
|
30
|
+
export interface ApModuleOptions {
|
|
31
|
+
namespace: string;
|
|
32
|
+
description?: string | null;
|
|
33
|
+
tags?: string[];
|
|
34
|
+
annotations?: ApToolAnnotations | null;
|
|
35
|
+
}
|
|
36
|
+
/** Options for ApcoreModule.forRoot(). */
|
|
37
|
+
export interface ApcoreModuleOptions {
|
|
38
|
+
extensionsDir?: string | null;
|
|
39
|
+
acl?: unknown | null;
|
|
40
|
+
middleware?: unknown[];
|
|
41
|
+
bindings?: string | null;
|
|
42
|
+
schema?: {
|
|
43
|
+
adapters?: string[];
|
|
44
|
+
strictOutput?: boolean;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/** Async options for ApcoreModule.forRootAsync(). */
|
|
48
|
+
export interface ApcoreModuleAsyncOptions {
|
|
49
|
+
imports?: unknown[];
|
|
50
|
+
useFactory: (...args: unknown[]) => Promise<ApcoreModuleOptions> | ApcoreModuleOptions;
|
|
51
|
+
inject?: unknown[];
|
|
52
|
+
}
|
|
53
|
+
/** Options for ApcoreMcpModule.forRoot(). */
|
|
54
|
+
export interface ApcoreMcpModuleOptions {
|
|
55
|
+
transport?: 'stdio' | 'streamable-http' | 'sse';
|
|
56
|
+
host?: string;
|
|
57
|
+
port?: number;
|
|
58
|
+
name?: string;
|
|
59
|
+
version?: string;
|
|
60
|
+
tags?: string[] | null;
|
|
61
|
+
prefix?: string | null;
|
|
62
|
+
explorer?: boolean;
|
|
63
|
+
explorerPrefix?: string;
|
|
64
|
+
allowExecute?: boolean;
|
|
65
|
+
dynamic?: boolean;
|
|
66
|
+
validateInputs?: boolean;
|
|
67
|
+
logLevel?: 'DEBUG' | 'INFO' | 'WARNING' | 'ERROR' | 'CRITICAL';
|
|
68
|
+
onStartup?: () => void | Promise<void>;
|
|
69
|
+
onShutdown?: () => void | Promise<void>;
|
|
70
|
+
metricsCollector?: {
|
|
71
|
+
exportPrometheus(): string;
|
|
72
|
+
};
|
|
73
|
+
authenticator?: import('apcore-mcp').Authenticator;
|
|
74
|
+
exemptPaths?: string[];
|
|
75
|
+
}
|
|
76
|
+
/** Async options for ApcoreMcpModule.forRootAsync(). */
|
|
77
|
+
export interface ApcoreMcpModuleAsyncOptions {
|
|
78
|
+
imports?: unknown[];
|
|
79
|
+
useFactory: (...args: unknown[]) => Promise<ApcoreMcpModuleOptions> | ApcoreMcpModuleOptions;
|
|
80
|
+
inject?: unknown[];
|
|
81
|
+
}
|
|
82
|
+
/** Options for registering a single method as an apcore module. */
|
|
83
|
+
export interface RegisterMethodOptions {
|
|
84
|
+
instance: object;
|
|
85
|
+
method: string;
|
|
86
|
+
description: string;
|
|
87
|
+
id?: string;
|
|
88
|
+
inputSchema?: unknown;
|
|
89
|
+
outputSchema?: unknown;
|
|
90
|
+
annotations?: ApToolAnnotations;
|
|
91
|
+
tags?: string[];
|
|
92
|
+
documentation?: string | null;
|
|
93
|
+
examples?: ApToolExample[];
|
|
94
|
+
}
|
|
95
|
+
/** Options for registering an entire service (multiple methods) at once. */
|
|
96
|
+
export interface RegisterServiceOptions {
|
|
97
|
+
instance: object;
|
|
98
|
+
description?: string;
|
|
99
|
+
methods: string[] | '*';
|
|
100
|
+
exclude?: string[];
|
|
101
|
+
namespace?: string;
|
|
102
|
+
annotations?: ApToolAnnotations;
|
|
103
|
+
tags?: string[];
|
|
104
|
+
methodOptions?: Record<string, Partial<RegisterMethodOptions>>;
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,MAAM,EACN,OAAO,EACP,QAAQ,EACR,gBAAgB,GACjB,MAAM,WAAW,CAAC;AAMnB,4DAA4D;AAC5D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,2CAA2C;AAC3C,MAAM,W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AAE,OAAO,EAAE,KACf,OAAO,CAAC,sBAAsB,CAAC,GAAG,sBAAsB,CAAC;IAC9D,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;CACpB;AAMD,mEAAmE;AACnE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED,4EAA4E;AAC5E,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC;CAChE"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalize a NestJS class name by stripping common framework suffixes
|
|
3
|
+
* and converting the remainder from PascalCase to snake_case.
|
|
4
|
+
*
|
|
5
|
+
* If the name consists *only* of a suffix (e.g. "Service"), it is
|
|
6
|
+
* returned as-is in lowercase rather than producing an empty string.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* normalizeClassName('EmailService') // 'email'
|
|
10
|
+
* normalizeClassName('MyGreatService') // 'my_great'
|
|
11
|
+
* normalizeClassName('HTTPClient') // 'http_client'
|
|
12
|
+
* normalizeClassName('email') // 'email'
|
|
13
|
+
*/
|
|
14
|
+
export declare function normalizeClassName(name: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Normalize a method name by converting camelCase to snake_case.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* normalizeMethodName('sendEmail') // 'send_email'
|
|
20
|
+
* normalizeMethodName('batchSend') // 'batch_send'
|
|
21
|
+
* normalizeMethodName('send') // 'send'
|
|
22
|
+
* normalizeMethodName('send_email') // 'send_email'
|
|
23
|
+
*/
|
|
24
|
+
export declare function normalizeMethodName(name: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Generate a fully-qualified module ID in the form "namespace.method".
|
|
27
|
+
*
|
|
28
|
+
* @param namespace - The class / namespace portion of the ID.
|
|
29
|
+
* @param method - The method portion of the ID.
|
|
30
|
+
* @param normalizeInputs - When true, applies {@link normalizeClassName}
|
|
31
|
+
* to `namespace` and {@link normalizeMethodName} to `method`.
|
|
32
|
+
* @param explicitId - If provided (non-null), returned as-is, bypassing
|
|
33
|
+
* all generation logic.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* generateModuleId('email', 'send') // 'email.send'
|
|
37
|
+
* generateModuleId('EmailService', 'sendEmail', true) // 'email.send_email'
|
|
38
|
+
* generateModuleId('any', 'thing', false, 'custom.override') // 'custom.override'
|
|
39
|
+
*/
|
|
40
|
+
export declare function generateModuleId(namespace: string, method: string, normalizeInputs?: boolean, explicitId?: string | null): string;
|
|
41
|
+
//# sourceMappingURL=id-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id-generator.d.ts","sourceRoot":"","sources":["../../src/utils/id-generator.ts"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAWvD;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,eAAe,CAAC,EAAE,OAAO,EACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB,MAAM,CASR"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NestJS suffixes to strip from class names during normalization.
|
|
3
|
+
*/
|
|
4
|
+
const NESTJS_SUFFIXES = [
|
|
5
|
+
'Service',
|
|
6
|
+
'Controller',
|
|
7
|
+
'Handler',
|
|
8
|
+
'Module',
|
|
9
|
+
'Provider',
|
|
10
|
+
'Gateway',
|
|
11
|
+
'Guard',
|
|
12
|
+
'Interceptor',
|
|
13
|
+
'Pipe',
|
|
14
|
+
'Filter',
|
|
15
|
+
];
|
|
16
|
+
/**
|
|
17
|
+
* Convert a PascalCase or camelCase string to snake_case.
|
|
18
|
+
*
|
|
19
|
+
* Handles consecutive uppercase letters (acronyms) by inserting an
|
|
20
|
+
* underscore before the last uppercase letter of the run when followed
|
|
21
|
+
* by a lowercase letter. For example: "HTTPClient" -> "http_client".
|
|
22
|
+
*/
|
|
23
|
+
function toSnakeCase(value) {
|
|
24
|
+
return value
|
|
25
|
+
.replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')
|
|
26
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1_$2')
|
|
27
|
+
.toLowerCase();
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Normalize a NestJS class name by stripping common framework suffixes
|
|
31
|
+
* and converting the remainder from PascalCase to snake_case.
|
|
32
|
+
*
|
|
33
|
+
* If the name consists *only* of a suffix (e.g. "Service"), it is
|
|
34
|
+
* returned as-is in lowercase rather than producing an empty string.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* normalizeClassName('EmailService') // 'email'
|
|
38
|
+
* normalizeClassName('MyGreatService') // 'my_great'
|
|
39
|
+
* normalizeClassName('HTTPClient') // 'http_client'
|
|
40
|
+
* normalizeClassName('email') // 'email'
|
|
41
|
+
*/
|
|
42
|
+
export function normalizeClassName(name) {
|
|
43
|
+
let stripped = name;
|
|
44
|
+
for (const suffix of NESTJS_SUFFIXES) {
|
|
45
|
+
if (name.endsWith(suffix) && name.length > suffix.length) {
|
|
46
|
+
stripped = name.slice(0, -suffix.length);
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return toSnakeCase(stripped);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Normalize a method name by converting camelCase to snake_case.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* normalizeMethodName('sendEmail') // 'send_email'
|
|
57
|
+
* normalizeMethodName('batchSend') // 'batch_send'
|
|
58
|
+
* normalizeMethodName('send') // 'send'
|
|
59
|
+
* normalizeMethodName('send_email') // 'send_email'
|
|
60
|
+
*/
|
|
61
|
+
export function normalizeMethodName(name) {
|
|
62
|
+
return toSnakeCase(name);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Generate a fully-qualified module ID in the form "namespace.method".
|
|
66
|
+
*
|
|
67
|
+
* @param namespace - The class / namespace portion of the ID.
|
|
68
|
+
* @param method - The method portion of the ID.
|
|
69
|
+
* @param normalizeInputs - When true, applies {@link normalizeClassName}
|
|
70
|
+
* to `namespace` and {@link normalizeMethodName} to `method`.
|
|
71
|
+
* @param explicitId - If provided (non-null), returned as-is, bypassing
|
|
72
|
+
* all generation logic.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* generateModuleId('email', 'send') // 'email.send'
|
|
76
|
+
* generateModuleId('EmailService', 'sendEmail', true) // 'email.send_email'
|
|
77
|
+
* generateModuleId('any', 'thing', false, 'custom.override') // 'custom.override'
|
|
78
|
+
*/
|
|
79
|
+
export function generateModuleId(namespace, method, normalizeInputs, explicitId) {
|
|
80
|
+
if (explicitId != null) {
|
|
81
|
+
return explicitId;
|
|
82
|
+
}
|
|
83
|
+
const ns = normalizeInputs ? normalizeClassName(namespace) : namespace;
|
|
84
|
+
const m = normalizeInputs ? normalizeMethodName(method) : method;
|
|
85
|
+
return `${ns}.${m}`;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=id-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id-generator.js","sourceRoot":"","sources":["../../src/utils/id-generator.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,eAAe,GAAG;IACtB,SAAS;IACT,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,UAAU;IACV,SAAS;IACT,OAAO;IACP,aAAa;IACb,MAAM;IACN,QAAQ;CACT,CAAC;AAEF;;;;;;GAMG;AACH,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO,KAAK;SACT,OAAO,CAAC,uBAAuB,EAAE,OAAO,CAAC;SACzC,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC;SACtC,WAAW,EAAE,CAAC;AACnB,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,IAAI,QAAQ,GAAG,IAAI,CAAC;IAEpB,KAAK,MAAM,MAAM,IAAI,eAAe,EAAE,CAAC;QACrC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;YACzD,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACzC,MAAM;QACR,CAAC;IACH,CAAC;IAED,OAAO,WAAW,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,gBAAgB,CAC9B,SAAiB,EACjB,MAAc,EACd,eAAyB,EACzB,UAA0B;IAE1B,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;QACvB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,MAAM,EAAE,GAAG,eAAe,CAAC,CAAC,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACvE,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAEjE,OAAO,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC;AACtB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nestjs-apcore",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "NestJS adapter for the apcore AI-Perceivable module ecosystem",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"README.md",
|
|
17
|
+
"LICENSE"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc -p tsconfig.build.json",
|
|
21
|
+
"dev": "tsc -p tsconfig.build.json --watch",
|
|
22
|
+
"test": "vitest run",
|
|
23
|
+
"test:watch": "vitest",
|
|
24
|
+
"test:coverage": "vitest run --coverage",
|
|
25
|
+
"typecheck": "tsc --noEmit",
|
|
26
|
+
"lint": "eslint src/ tests/",
|
|
27
|
+
"clean": "rm -rf dist"
|
|
28
|
+
},
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=18.0.0"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"@nestjs/common": ">=10.0.0",
|
|
34
|
+
"@nestjs/core": ">=10.0.0",
|
|
35
|
+
"reflect-metadata": ">=0.1.13",
|
|
36
|
+
"rxjs": ">=7.0.0"
|
|
37
|
+
},
|
|
38
|
+
"peerDependenciesMeta": {
|
|
39
|
+
"class-validator": {
|
|
40
|
+
"optional": true
|
|
41
|
+
},
|
|
42
|
+
"class-transformer": {
|
|
43
|
+
"optional": true
|
|
44
|
+
},
|
|
45
|
+
"zod": {
|
|
46
|
+
"optional": true
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
51
|
+
"apcore-js": "^0.6.0",
|
|
52
|
+
"apcore-mcp": "^0.7.0",
|
|
53
|
+
"js-yaml": "^4.1.0"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@nestjs/common": "^10.0.0",
|
|
57
|
+
"@nestjs/core": "^10.0.0",
|
|
58
|
+
"@nestjs/platform-express": "^10.0.0",
|
|
59
|
+
"@nestjs/testing": "^10.0.0",
|
|
60
|
+
"@sinclair/typebox": "^0.34.0",
|
|
61
|
+
"@types/js-yaml": "^4.0.0",
|
|
62
|
+
"@types/node": "^20.0.0",
|
|
63
|
+
"@vitest/coverage-v8": "^3.0.0",
|
|
64
|
+
"apdev-js": "^0.2.0",
|
|
65
|
+
"class-transformer": "^0.5.0",
|
|
66
|
+
"class-validator": "^0.14.0",
|
|
67
|
+
"reflect-metadata": "^0.2.0",
|
|
68
|
+
"rxjs": "^7.0.0",
|
|
69
|
+
"typescript": "^5.5.0",
|
|
70
|
+
"vitest": "^3.0.0",
|
|
71
|
+
"zod": "^3.23.0"
|
|
72
|
+
},
|
|
73
|
+
"keywords": [
|
|
74
|
+
"nestjs",
|
|
75
|
+
"apcore",
|
|
76
|
+
"mcp",
|
|
77
|
+
"model-context-protocol",
|
|
78
|
+
"ai",
|
|
79
|
+
"ai-tools",
|
|
80
|
+
"llm",
|
|
81
|
+
"openai",
|
|
82
|
+
"tool-calling",
|
|
83
|
+
"nestjs-module",
|
|
84
|
+
"decorator",
|
|
85
|
+
"typescript"
|
|
86
|
+
],
|
|
87
|
+
"author": "aipartnerup",
|
|
88
|
+
"homepage": "https://github.com/aipartnerup/nestjs-apcore#readme",
|
|
89
|
+
"repository": {
|
|
90
|
+
"type": "git",
|
|
91
|
+
"url": "https://github.com/aipartnerup/nestjs-apcore.git"
|
|
92
|
+
},
|
|
93
|
+
"bugs": {
|
|
94
|
+
"url": "https://github.com/aipartnerup/nestjs-apcore/issues"
|
|
95
|
+
},
|
|
96
|
+
"license": "Apache-2.0",
|
|
97
|
+
"apdev": {
|
|
98
|
+
"base_package": "nestjs-apcore"
|
|
99
|
+
}
|
|
100
|
+
}
|