@lenne.tech/nest-server 11.25.6 → 11.26.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/.claude/rules/configurable-features.md +2 -0
- package/CLAUDE.md +18 -0
- package/FRAMEWORK-API.md +48 -1
- package/dist/config.env.js +35 -1
- package/dist/config.env.js.map +1 -1
- package/dist/core/common/helpers/config.helper.js +2 -2
- package/dist/core/common/helpers/config.helper.js.map +1 -1
- package/dist/core/common/interceptors/check-security.interceptor.js +9 -2
- package/dist/core/common/interceptors/check-security.interceptor.js.map +1 -1
- package/dist/core/common/interfaces/server-options.interface.d.ts +89 -0
- package/dist/core/modules/ai/core-ai-mcp.controller.d.ts +21 -0
- package/dist/core/modules/ai/core-ai-mcp.controller.js +191 -0
- package/dist/core/modules/ai/core-ai-mcp.controller.js.map +1 -0
- package/dist/core/modules/ai/core-ai.controller.d.ts +90 -0
- package/dist/core/modules/ai/core-ai.controller.js +576 -0
- package/dist/core/modules/ai/core-ai.controller.js.map +1 -0
- package/dist/core/modules/ai/core-ai.module.d.ts +43 -0
- package/dist/core/modules/ai/core-ai.module.js +164 -0
- package/dist/core/modules/ai/core-ai.module.js.map +1 -0
- package/dist/core/modules/ai/core-ai.resolver.d.ts +84 -0
- package/dist/core/modules/ai/core-ai.resolver.js +530 -0
- package/dist/core/modules/ai/core-ai.resolver.js.map +1 -0
- package/dist/core/modules/ai/helpers/ai-mcp-oauth.helper.d.ts +7 -0
- package/dist/core/modules/ai/helpers/ai-mcp-oauth.helper.js +16 -0
- package/dist/core/modules/ai/helpers/ai-mcp-oauth.helper.js.map +1 -0
- package/dist/core/modules/ai/hooks/ai-hook.base.d.ts +10 -0
- package/dist/core/modules/ai/hooks/ai-hook.base.js +30 -0
- package/dist/core/modules/ai/hooks/ai-hook.base.js.map +1 -0
- package/dist/core/modules/ai/hooks/ai-hook.registry.d.ts +22 -0
- package/dist/core/modules/ai/hooks/ai-hook.registry.js +98 -0
- package/dist/core/modules/ai/hooks/ai-hook.registry.js.map +1 -0
- package/dist/core/modules/ai/index.d.ts +69 -0
- package/dist/core/modules/ai/index.js +86 -0
- package/dist/core/modules/ai/index.js.map +1 -0
- package/dist/core/modules/ai/inputs/core-ai-budget-limit-create.input.d.ts +5 -0
- package/dist/core/modules/ai/inputs/core-ai-budget-limit-create.input.js +43 -0
- package/dist/core/modules/ai/inputs/core-ai-budget-limit-create.input.js.map +1 -0
- package/dist/core/modules/ai/inputs/core-ai-budget-limit.input.d.ts +7 -0
- package/dist/core/modules/ai/inputs/core-ai-budget-limit.input.js +74 -0
- package/dist/core/modules/ai/inputs/core-ai-budget-limit.input.js.map +1 -0
- package/dist/core/modules/ai/inputs/core-ai-connection-create.input.d.ts +6 -0
- package/dist/core/modules/ai/inputs/core-ai-connection-create.input.js +49 -0
- package/dist/core/modules/ai/inputs/core-ai-connection-create.input.js.map +1 -0
- package/dist/core/modules/ai/inputs/core-ai-connection-preference.input.d.ts +6 -0
- package/dist/core/modules/ai/inputs/core-ai-connection-preference.input.js +60 -0
- package/dist/core/modules/ai/inputs/core-ai-connection-preference.input.js.map +1 -0
- package/dist/core/modules/ai/inputs/core-ai-connection.input.d.ts +23 -0
- package/dist/core/modules/ai/inputs/core-ai-connection.input.js +229 -0
- package/dist/core/modules/ai/inputs/core-ai-connection.input.js.map +1 -0
- package/dist/core/modules/ai/inputs/core-ai-conversation-create.input.d.ts +3 -0
- package/dist/core/modules/ai/inputs/core-ai-conversation-create.input.js +21 -0
- package/dist/core/modules/ai/inputs/core-ai-conversation-create.input.js.map +1 -0
- package/dist/core/modules/ai/inputs/core-ai-conversation.input.d.ts +4 -0
- package/dist/core/modules/ai/inputs/core-ai-conversation.input.js +42 -0
- package/dist/core/modules/ai/inputs/core-ai-conversation.input.js.map +1 -0
- package/dist/core/modules/ai/inputs/core-ai-prompt-create.input.d.ts +10 -0
- package/dist/core/modules/ai/inputs/core-ai-prompt-create.input.js +74 -0
- package/dist/core/modules/ai/inputs/core-ai-prompt-create.input.js.map +1 -0
- package/dist/core/modules/ai/inputs/core-ai-prompt-hint-create.input.d.ts +5 -0
- package/dist/core/modules/ai/inputs/core-ai-prompt-hint-create.input.js +41 -0
- package/dist/core/modules/ai/inputs/core-ai-prompt-hint-create.input.js.map +1 -0
- package/dist/core/modules/ai/inputs/core-ai-prompt-hint.input.d.ts +6 -0
- package/dist/core/modules/ai/inputs/core-ai-prompt-hint.input.js +63 -0
- package/dist/core/modules/ai/inputs/core-ai-prompt-hint.input.js.map +1 -0
- package/dist/core/modules/ai/inputs/core-ai-prompt-update.input.d.ts +10 -0
- package/dist/core/modules/ai/inputs/core-ai-prompt-update.input.js +70 -0
- package/dist/core/modules/ai/inputs/core-ai-prompt-update.input.js.map +1 -0
- package/dist/core/modules/ai/inputs/core-ai-prompt.input.d.ts +18 -0
- package/dist/core/modules/ai/inputs/core-ai-prompt.input.js +131 -0
- package/dist/core/modules/ai/inputs/core-ai-prompt.input.js.map +1 -0
- package/dist/core/modules/ai/inputs/core-ai-slot-create.input.d.ts +5 -0
- package/dist/core/modules/ai/inputs/core-ai-slot-create.input.js +41 -0
- package/dist/core/modules/ai/inputs/core-ai-slot-create.input.js.map +1 -0
- package/dist/core/modules/ai/inputs/core-ai-slot-update.input.d.ts +9 -0
- package/dist/core/modules/ai/inputs/core-ai-slot-update.input.js +91 -0
- package/dist/core/modules/ai/inputs/core-ai-slot-update.input.js.map +1 -0
- package/dist/core/modules/ai/interfaces/ai-hook.interface.d.ts +28 -0
- package/dist/core/modules/ai/interfaces/ai-hook.interface.js +3 -0
- package/dist/core/modules/ai/interfaces/ai-hook.interface.js.map +1 -0
- package/dist/core/modules/ai/interfaces/ai-placeholder.interface.d.ts +21 -0
- package/dist/core/modules/ai/interfaces/ai-placeholder.interface.js +3 -0
- package/dist/core/modules/ai/interfaces/ai-placeholder.interface.js.map +1 -0
- package/dist/core/modules/ai/interfaces/ai-tool.interface.d.ts +30 -0
- package/dist/core/modules/ai/interfaces/ai-tool.interface.js +3 -0
- package/dist/core/modules/ai/interfaces/ai-tool.interface.js.map +1 -0
- package/dist/core/modules/ai/interfaces/llm-provider.interface.d.ts +55 -0
- package/dist/core/modules/ai/interfaces/llm-provider.interface.js +3 -0
- package/dist/core/modules/ai/interfaces/llm-provider.interface.js.map +1 -0
- package/dist/core/modules/ai/interfaces/resolved-ai-connection.interface.d.ts +16 -0
- package/dist/core/modules/ai/interfaces/resolved-ai-connection.interface.js +3 -0
- package/dist/core/modules/ai/interfaces/resolved-ai-connection.interface.js.map +1 -0
- package/dist/core/modules/ai/models/core-ai-action.model.d.ts +6 -0
- package/dist/core/modules/ai/models/core-ai-action.model.js +44 -0
- package/dist/core/modules/ai/models/core-ai-action.model.js.map +1 -0
- package/dist/core/modules/ai/models/core-ai-available-connection.model.d.ts +8 -0
- package/dist/core/modules/ai/models/core-ai-available-connection.model.js +53 -0
- package/dist/core/modules/ai/models/core-ai-available-connection.model.js.map +1 -0
- package/dist/core/modules/ai/models/core-ai-budget-limit.model.d.ts +97 -0
- package/dist/core/modules/ai/models/core-ai-budget-limit.model.js +79 -0
- package/dist/core/modules/ai/models/core-ai-budget-limit.model.js.map +1 -0
- package/dist/core/modules/ai/models/core-ai-connection-preference.model.d.ts +91 -0
- package/dist/core/modules/ai/models/core-ai-connection-preference.model.js +67 -0
- package/dist/core/modules/ai/models/core-ai-connection-preference.model.js.map +1 -0
- package/dist/core/modules/ai/models/core-ai-connection.model.d.ts +200 -0
- package/dist/core/modules/ai/models/core-ai-connection.model.js +263 -0
- package/dist/core/modules/ai/models/core-ai-connection.model.js.map +1 -0
- package/dist/core/modules/ai/models/core-ai-conversation.model.d.ts +93 -0
- package/dist/core/modules/ai/models/core-ai-conversation.model.js +82 -0
- package/dist/core/modules/ai/models/core-ai-conversation.model.js.map +1 -0
- package/dist/core/modules/ai/models/core-ai-interaction.model.d.ts +133 -0
- package/dist/core/modules/ai/models/core-ai-interaction.model.js +137 -0
- package/dist/core/modules/ai/models/core-ai-interaction.model.js.map +1 -0
- package/dist/core/modules/ai/models/core-ai-message.model.d.ts +5 -0
- package/dist/core/modules/ai/models/core-ai-message.model.js +38 -0
- package/dist/core/modules/ai/models/core-ai-message.model.js.map +1 -0
- package/dist/core/modules/ai/models/core-ai-mode.model.d.ts +109 -0
- package/dist/core/modules/ai/models/core-ai-mode.model.js +100 -0
- package/dist/core/modules/ai/models/core-ai-mode.model.js.map +1 -0
- package/dist/core/modules/ai/models/core-ai-prompt-hint.model.d.ts +103 -0
- package/dist/core/modules/ai/models/core-ai-prompt-hint.model.js +89 -0
- package/dist/core/modules/ai/models/core-ai-prompt-hint.model.js.map +1 -0
- package/dist/core/modules/ai/models/core-ai-prompt.model.d.ts +122 -0
- package/dist/core/modules/ai/models/core-ai-prompt.model.js +117 -0
- package/dist/core/modules/ai/models/core-ai-prompt.model.js.map +1 -0
- package/dist/core/modules/ai/models/core-ai-response.model.d.ts +29 -0
- package/dist/core/modules/ai/models/core-ai-response.model.js +105 -0
- package/dist/core/modules/ai/models/core-ai-response.model.js.map +1 -0
- package/dist/core/modules/ai/models/core-ai-slot.model.d.ts +121 -0
- package/dist/core/modules/ai/models/core-ai-slot.model.js +119 -0
- package/dist/core/modules/ai/models/core-ai-slot.model.js.map +1 -0
- package/dist/core/modules/ai/models/core-ai-tool-grant.model.d.ts +103 -0
- package/dist/core/modules/ai/models/core-ai-tool-grant.model.js +88 -0
- package/dist/core/modules/ai/models/core-ai-tool-grant.model.js.map +1 -0
- package/dist/core/modules/ai/models/core-ai-tool-policy.model.d.ts +122 -0
- package/dist/core/modules/ai/models/core-ai-tool-policy.model.js +121 -0
- package/dist/core/modules/ai/models/core-ai-tool-policy.model.js.map +1 -0
- package/dist/core/modules/ai/models/core-ai-usage-info.model.d.ts +24 -0
- package/dist/core/modules/ai/models/core-ai-usage-info.model.js +127 -0
- package/dist/core/modules/ai/models/core-ai-usage-info.model.js.map +1 -0
- package/dist/core/modules/ai/models/core-ai-usage.model.d.ts +5 -0
- package/dist/core/modules/ai/models/core-ai-usage.model.js +38 -0
- package/dist/core/modules/ai/models/core-ai-usage.model.js.map +1 -0
- package/dist/core/modules/ai/providers/claude-cli.provider.d.ts +16 -0
- package/dist/core/modules/ai/providers/claude-cli.provider.js +151 -0
- package/dist/core/modules/ai/providers/claude-cli.provider.js.map +1 -0
- package/dist/core/modules/ai/providers/llm-provider.factory.d.ts +10 -0
- package/dist/core/modules/ai/providers/llm-provider.factory.js +45 -0
- package/dist/core/modules/ai/providers/llm-provider.factory.js.map +1 -0
- package/dist/core/modules/ai/providers/openai-compatible.provider.d.ts +32 -0
- package/dist/core/modules/ai/providers/openai-compatible.provider.js +236 -0
- package/dist/core/modules/ai/providers/openai-compatible.provider.js.map +1 -0
- package/dist/core/modules/ai/services/ai-crypto.service.d.ts +11 -0
- package/dist/core/modules/ai/services/ai-crypto.service.js +84 -0
- package/dist/core/modules/ai/services/ai-crypto.service.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai-budget.service.d.ts +42 -0
- package/dist/core/modules/ai/services/core-ai-budget.service.js +211 -0
- package/dist/core/modules/ai/services/core-ai-budget.service.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai-connection-preference.service.d.ts +18 -0
- package/dist/core/modules/ai/services/core-ai-connection-preference.service.js +53 -0
- package/dist/core/modules/ai/services/core-ai-connection-preference.service.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai-connection-resolver.service.d.ts +55 -0
- package/dist/core/modules/ai/services/core-ai-connection-resolver.service.js +177 -0
- package/dist/core/modules/ai/services/core-ai-connection-resolver.service.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai-connection.service.d.ts +43 -0
- package/dist/core/modules/ai/services/core-ai-connection.service.js +272 -0
- package/dist/core/modules/ai/services/core-ai-connection.service.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai-conversation.service.d.ts +26 -0
- package/dist/core/modules/ai/services/core-ai-conversation.service.js +72 -0
- package/dist/core/modules/ai/services/core-ai-conversation.service.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai-interaction.service.d.ts +13 -0
- package/dist/core/modules/ai/services/core-ai-interaction.service.js +52 -0
- package/dist/core/modules/ai/services/core-ai-interaction.service.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai-mcp-client.service.d.ts +51 -0
- package/dist/core/modules/ai/services/core-ai-mcp-client.service.js +123 -0
- package/dist/core/modules/ai/services/core-ai-mcp-client.service.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai-mcp-oauth.service.d.ts +68 -0
- package/dist/core/modules/ai/services/core-ai-mcp-oauth.service.js +279 -0
- package/dist/core/modules/ai/services/core-ai-mcp-oauth.service.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai-mcp.service.d.ts +22 -0
- package/dist/core/modules/ai/services/core-ai-mcp.service.js +59 -0
- package/dist/core/modules/ai/services/core-ai-mcp.service.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai-mode.service.d.ts +14 -0
- package/dist/core/modules/ai/services/core-ai-mode.service.js +56 -0
- package/dist/core/modules/ai/services/core-ai-mode.service.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai-placeholder.registry.d.ts +15 -0
- package/dist/core/modules/ai/services/core-ai-placeholder.registry.js +102 -0
- package/dist/core/modules/ai/services/core-ai-placeholder.registry.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai-prompt-builder.service.d.ts +42 -0
- package/dist/core/modules/ai/services/core-ai-prompt-builder.service.js +136 -0
- package/dist/core/modules/ai/services/core-ai-prompt-builder.service.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai-prompt-hint.service.d.ts +29 -0
- package/dist/core/modules/ai/services/core-ai-prompt-hint.service.js +98 -0
- package/dist/core/modules/ai/services/core-ai-prompt-hint.service.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai-prompt.service.d.ts +21 -0
- package/dist/core/modules/ai/services/core-ai-prompt.service.js +143 -0
- package/dist/core/modules/ai/services/core-ai-prompt.service.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai-slot.service.d.ts +51 -0
- package/dist/core/modules/ai/services/core-ai-slot.service.js +372 -0
- package/dist/core/modules/ai/services/core-ai-slot.service.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai-tool-grant.service.d.ts +22 -0
- package/dist/core/modules/ai/services/core-ai-tool-grant.service.js +97 -0
- package/dist/core/modules/ai/services/core-ai-tool-grant.service.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai-tool-policy.service.d.ts +23 -0
- package/dist/core/modules/ai/services/core-ai-tool-policy.service.js +102 -0
- package/dist/core/modules/ai/services/core-ai-tool-policy.service.js.map +1 -0
- package/dist/core/modules/ai/services/core-ai.service.d.ts +144 -0
- package/dist/core/modules/ai/services/core-ai.service.js +991 -0
- package/dist/core/modules/ai/services/core-ai.service.js.map +1 -0
- package/dist/core/modules/ai/tools/ai-tool.base.d.ts +15 -0
- package/dist/core/modules/ai/tools/ai-tool.base.js +30 -0
- package/dist/core/modules/ai/tools/ai-tool.base.js.map +1 -0
- package/dist/core/modules/ai/tools/ai-tool.registry.d.ts +19 -0
- package/dist/core/modules/ai/tools/ai-tool.registry.js +71 -0
- package/dist/core/modules/ai/tools/ai-tool.registry.js.map +1 -0
- package/dist/core/modules/ai/tools/ask-user-question.tool.d.ts +38 -0
- package/dist/core/modules/ai/tools/ask-user-question.tool.js +65 -0
- package/dist/core/modules/ai/tools/ask-user-question.tool.js.map +1 -0
- package/dist/core/modules/ai/tools/search-tools.tool.d.ts +24 -0
- package/dist/core/modules/ai/tools/search-tools.tool.js +68 -0
- package/dist/core/modules/ai/tools/search-tools.tool.js.map +1 -0
- package/dist/core/modules/error-code/error-codes.d.ts +81 -0
- package/dist/core/modules/error-code/error-codes.js +72 -0
- package/dist/core/modules/error-code/error-codes.js.map +1 -1
- package/dist/core.module.js +8 -0
- package/dist/core.module.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/server/modules/ai/ai-tools.module.d.ts +5 -0
- package/dist/server/modules/ai/ai-tools.module.js +36 -0
- package/dist/server/modules/ai/ai-tools.module.js.map +1 -0
- package/dist/server/modules/ai/tools/delete-user.tool.d.ts +30 -0
- package/dist/server/modules/ai/tools/delete-user.tool.js +49 -0
- package/dist/server/modules/ai/tools/delete-user.tool.js.map +1 -0
- package/dist/server/modules/ai/tools/find-users.tool.d.ts +30 -0
- package/dist/server/modules/ai/tools/find-users.tool.js +52 -0
- package/dist/server/modules/ai/tools/find-users.tool.js.map +1 -0
- package/dist/server/modules/ai/tools/get-user.tool.d.ts +26 -0
- package/dist/server/modules/ai/tools/get-user.tool.js +48 -0
- package/dist/server/modules/ai/tools/get-user.tool.js.map +1 -0
- package/dist/server/modules/ai/tools/update-user-job-title.tool.d.ts +32 -0
- package/dist/server/modules/ai/tools/update-user-job-title.tool.js +54 -0
- package/dist/server/modules/ai/tools/update-user-job-title.tool.js.map +1 -0
- package/dist/server/modules/error-code/error-codes.d.ts +9 -0
- package/dist/server/server.module.js +2 -0
- package/dist/server/server.module.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/docs/REQUEST-LIFECYCLE.md +10 -0
- package/migration-guides/11.25.x-to-11.26.0.md +278 -0
- package/package.json +2 -1
- package/src/config.env.ts +48 -1
- package/src/core/common/helpers/config.helper.ts +5 -2
- package/src/core/common/interceptors/check-security.interceptor.ts +13 -3
- package/src/core/common/interfaces/server-options.interface.ts +312 -0
- package/src/core/modules/ai/INTEGRATION-CHECKLIST.md +220 -0
- package/src/core/modules/ai/README.md +526 -0
- package/src/core/modules/ai/core-ai-mcp.controller.ts +223 -0
- package/src/core/modules/ai/core-ai.controller.ts +547 -0
- package/src/core/modules/ai/core-ai.module.ts +269 -0
- package/src/core/modules/ai/core-ai.resolver.ts +526 -0
- package/src/core/modules/ai/helpers/ai-mcp-oauth.helper.ts +35 -0
- package/src/core/modules/ai/hooks/ai-hook.base.ts +23 -0
- package/src/core/modules/ai/hooks/ai-hook.registry.ts +119 -0
- package/src/core/modules/ai/index.ts +70 -0
- package/src/core/modules/ai/inputs/core-ai-budget-limit-create.input.ts +27 -0
- package/src/core/modules/ai/inputs/core-ai-budget-limit.input.ts +52 -0
- package/src/core/modules/ai/inputs/core-ai-connection-create.input.ts +32 -0
- package/src/core/modules/ai/inputs/core-ai-connection-preference.input.ts +42 -0
- package/src/core/modules/ai/inputs/core-ai-connection.input.ts +235 -0
- package/src/core/modules/ai/inputs/core-ai-conversation-create.input.ts +13 -0
- package/src/core/modules/ai/inputs/core-ai-conversation.input.ts +33 -0
- package/src/core/modules/ai/inputs/core-ai-prompt-create.input.ts +50 -0
- package/src/core/modules/ai/inputs/core-ai-prompt-hint-create.input.ts +26 -0
- package/src/core/modules/ai/inputs/core-ai-prompt-hint.input.ts +43 -0
- package/src/core/modules/ai/inputs/core-ai-prompt-update.input.ts +42 -0
- package/src/core/modules/ai/inputs/core-ai-prompt.input.ts +144 -0
- package/src/core/modules/ai/inputs/core-ai-slot-create.input.ts +26 -0
- package/src/core/modules/ai/inputs/core-ai-slot-update.input.ts +65 -0
- package/src/core/modules/ai/interfaces/ai-hook.interface.ts +74 -0
- package/src/core/modules/ai/interfaces/ai-placeholder.interface.ts +49 -0
- package/src/core/modules/ai/interfaces/ai-tool.interface.ts +112 -0
- package/src/core/modules/ai/interfaces/llm-provider.interface.ts +187 -0
- package/src/core/modules/ai/interfaces/resolved-ai-connection.interface.ts +55 -0
- package/src/core/modules/ai/models/core-ai-action.model.ts +37 -0
- package/src/core/modules/ai/models/core-ai-available-connection.model.ts +42 -0
- package/src/core/modules/ai/models/core-ai-budget-limit.model.ts +82 -0
- package/src/core/modules/ai/models/core-ai-connection-preference.model.ts +72 -0
- package/src/core/modules/ai/models/core-ai-connection.model.ts +330 -0
- package/src/core/modules/ai/models/core-ai-conversation.model.ts +87 -0
- package/src/core/modules/ai/models/core-ai-interaction.model.ts +145 -0
- package/src/core/modules/ai/models/core-ai-message.model.ts +29 -0
- package/src/core/modules/ai/models/core-ai-mode.model.ts +93 -0
- package/src/core/modules/ai/models/core-ai-prompt-hint.model.ts +98 -0
- package/src/core/modules/ai/models/core-ai-prompt.model.ts +120 -0
- package/src/core/modules/ai/models/core-ai-response.model.ts +119 -0
- package/src/core/modules/ai/models/core-ai-slot.model.ts +146 -0
- package/src/core/modules/ai/models/core-ai-tool-grant.model.ts +87 -0
- package/src/core/modules/ai/models/core-ai-tool-policy.model.ts +115 -0
- package/src/core/modules/ai/models/core-ai-usage-info.model.ts +107 -0
- package/src/core/modules/ai/models/core-ai-usage.model.ts +29 -0
- package/src/core/modules/ai/providers/claude-cli.provider.ts +240 -0
- package/src/core/modules/ai/providers/llm-provider.factory.ts +63 -0
- package/src/core/modules/ai/providers/openai-compatible.provider.ts +329 -0
- package/src/core/modules/ai/services/ai-crypto.service.ts +120 -0
- package/src/core/modules/ai/services/core-ai-budget.service.ts +297 -0
- package/src/core/modules/ai/services/core-ai-connection-preference.service.ts +74 -0
- package/src/core/modules/ai/services/core-ai-connection-resolver.service.ts +308 -0
- package/src/core/modules/ai/services/core-ai-connection.service.ts +387 -0
- package/src/core/modules/ai/services/core-ai-conversation.service.ts +105 -0
- package/src/core/modules/ai/services/core-ai-interaction.service.ts +56 -0
- package/src/core/modules/ai/services/core-ai-mcp-client.service.ts +169 -0
- package/src/core/modules/ai/services/core-ai-mcp-oauth.service.ts +445 -0
- package/src/core/modules/ai/services/core-ai-mcp.service.ts +94 -0
- package/src/core/modules/ai/services/core-ai-mode.service.ts +43 -0
- package/src/core/modules/ai/services/core-ai-placeholder.registry.ts +123 -0
- package/src/core/modules/ai/services/core-ai-prompt-builder.service.ts +228 -0
- package/src/core/modules/ai/services/core-ai-prompt-hint.service.ts +133 -0
- package/src/core/modules/ai/services/core-ai-prompt.service.ts +164 -0
- package/src/core/modules/ai/services/core-ai-slot.service.ts +526 -0
- package/src/core/modules/ai/services/core-ai-tool-grant.service.ts +107 -0
- package/src/core/modules/ai/services/core-ai-tool-policy.service.ts +124 -0
- package/src/core/modules/ai/services/core-ai.service.ts +1396 -0
- package/src/core/modules/ai/tools/ai-tool.base.ts +46 -0
- package/src/core/modules/ai/tools/ai-tool.registry.ts +124 -0
- package/src/core/modules/ai/tools/ask-user-question.tool.ts +76 -0
- package/src/core/modules/ai/tools/search-tools.tool.ts +70 -0
- package/src/core/modules/error-code/error-codes.ts +86 -0
- package/src/core.module.ts +12 -0
- package/src/index.ts +6 -0
- package/src/server/modules/ai/ai-tools.module.ts +33 -0
- package/src/server/modules/ai/tools/delete-user.tool.ts +44 -0
- package/src/server/modules/ai/tools/find-users.tool.ts +49 -0
- package/src/server/modules/ai/tools/get-user.tool.ts +43 -0
- package/src/server/modules/ai/tools/update-user-job-title.tool.ts +62 -0
- package/src/server/server.module.ts +5 -0
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CoreAiResolver = void 0;
|
|
16
|
+
const graphql_1 = require("@nestjs/graphql");
|
|
17
|
+
const filter_args_1 = require("../../common/args/filter.args");
|
|
18
|
+
const graphql_service_options_decorator_1 = require("../../common/decorators/graphql-service-options.decorator");
|
|
19
|
+
const roles_decorator_1 = require("../../common/decorators/roles.decorator");
|
|
20
|
+
const role_enum_1 = require("../../common/enums/role.enum");
|
|
21
|
+
const request_context_service_1 = require("../../common/services/request-context.service");
|
|
22
|
+
const core_ai_budget_limit_create_input_1 = require("./inputs/core-ai-budget-limit-create.input");
|
|
23
|
+
const core_ai_budget_limit_input_1 = require("./inputs/core-ai-budget-limit.input");
|
|
24
|
+
const core_ai_connection_create_input_1 = require("./inputs/core-ai-connection-create.input");
|
|
25
|
+
const core_ai_connection_preference_input_1 = require("./inputs/core-ai-connection-preference.input");
|
|
26
|
+
const core_ai_connection_input_1 = require("./inputs/core-ai-connection.input");
|
|
27
|
+
const core_ai_conversation_create_input_1 = require("./inputs/core-ai-conversation-create.input");
|
|
28
|
+
const core_ai_prompt_hint_create_input_1 = require("./inputs/core-ai-prompt-hint-create.input");
|
|
29
|
+
const core_ai_prompt_hint_input_1 = require("./inputs/core-ai-prompt-hint.input");
|
|
30
|
+
const core_ai_prompt_create_input_1 = require("./inputs/core-ai-prompt-create.input");
|
|
31
|
+
const core_ai_prompt_update_input_1 = require("./inputs/core-ai-prompt-update.input");
|
|
32
|
+
const core_ai_slot_create_input_1 = require("./inputs/core-ai-slot-create.input");
|
|
33
|
+
const core_ai_slot_update_input_1 = require("./inputs/core-ai-slot-update.input");
|
|
34
|
+
const core_ai_prompt_input_1 = require("./inputs/core-ai-prompt.input");
|
|
35
|
+
const core_ai_available_connection_model_1 = require("./models/core-ai-available-connection.model");
|
|
36
|
+
const core_ai_budget_limit_model_1 = require("./models/core-ai-budget-limit.model");
|
|
37
|
+
const core_ai_connection_preference_model_1 = require("./models/core-ai-connection-preference.model");
|
|
38
|
+
const core_ai_connection_model_1 = require("./models/core-ai-connection.model");
|
|
39
|
+
const core_ai_conversation_model_1 = require("./models/core-ai-conversation.model");
|
|
40
|
+
const core_ai_interaction_model_1 = require("./models/core-ai-interaction.model");
|
|
41
|
+
const core_ai_prompt_hint_model_1 = require("./models/core-ai-prompt-hint.model");
|
|
42
|
+
const core_ai_prompt_model_1 = require("./models/core-ai-prompt.model");
|
|
43
|
+
const core_ai_slot_model_1 = require("./models/core-ai-slot.model");
|
|
44
|
+
const core_ai_response_model_1 = require("./models/core-ai-response.model");
|
|
45
|
+
const core_ai_usage_info_model_1 = require("./models/core-ai-usage-info.model");
|
|
46
|
+
const core_ai_budget_service_1 = require("./services/core-ai-budget.service");
|
|
47
|
+
const core_ai_connection_preference_service_1 = require("./services/core-ai-connection-preference.service");
|
|
48
|
+
const core_ai_connection_resolver_service_1 = require("./services/core-ai-connection-resolver.service");
|
|
49
|
+
const core_ai_connection_service_1 = require("./services/core-ai-connection.service");
|
|
50
|
+
const core_ai_conversation_service_1 = require("./services/core-ai-conversation.service");
|
|
51
|
+
const core_ai_interaction_service_1 = require("./services/core-ai-interaction.service");
|
|
52
|
+
const core_ai_prompt_hint_service_1 = require("./services/core-ai-prompt-hint.service");
|
|
53
|
+
const core_ai_prompt_service_1 = require("./services/core-ai-prompt.service");
|
|
54
|
+
const core_ai_slot_service_1 = require("./services/core-ai-slot.service");
|
|
55
|
+
const core_ai_service_1 = require("./services/core-ai.service");
|
|
56
|
+
let CoreAiResolver = class CoreAiResolver {
|
|
57
|
+
aiService;
|
|
58
|
+
connectionService;
|
|
59
|
+
conversationService;
|
|
60
|
+
interactionService;
|
|
61
|
+
budgetService;
|
|
62
|
+
connectionResolver;
|
|
63
|
+
preferenceService;
|
|
64
|
+
slotService;
|
|
65
|
+
promptHintService;
|
|
66
|
+
promptService;
|
|
67
|
+
constructor(aiService, connectionService, conversationService, interactionService, budgetService, connectionResolver, preferenceService, slotService, promptHintService, promptService) {
|
|
68
|
+
this.aiService = aiService;
|
|
69
|
+
this.connectionService = connectionService;
|
|
70
|
+
this.conversationService = conversationService;
|
|
71
|
+
this.interactionService = interactionService;
|
|
72
|
+
this.budgetService = budgetService;
|
|
73
|
+
this.connectionResolver = connectionResolver;
|
|
74
|
+
this.preferenceService = preferenceService;
|
|
75
|
+
this.slotService = slotService;
|
|
76
|
+
this.promptHintService = promptHintService;
|
|
77
|
+
this.promptService = promptService;
|
|
78
|
+
}
|
|
79
|
+
async aiPrompt(serviceOptions, input) {
|
|
80
|
+
return this.aiService.prompt(input, serviceOptions);
|
|
81
|
+
}
|
|
82
|
+
async createAiConnection(serviceOptions, input) {
|
|
83
|
+
return this.connectionService.create(input, { ...serviceOptions, inputType: core_ai_connection_create_input_1.CoreAiConnectionCreateInput });
|
|
84
|
+
}
|
|
85
|
+
async deleteAiConnection(serviceOptions, id) {
|
|
86
|
+
return this.connectionService.delete(id, serviceOptions);
|
|
87
|
+
}
|
|
88
|
+
async getAiConnection(serviceOptions, id) {
|
|
89
|
+
return this.connectionService.get(id, serviceOptions);
|
|
90
|
+
}
|
|
91
|
+
async findAiConnections(serviceOptions, args) {
|
|
92
|
+
return this.connectionService.find(args, { ...serviceOptions, inputType: filter_args_1.FilterArgs });
|
|
93
|
+
}
|
|
94
|
+
async detectAiConnectionCapabilities(serviceOptions, id) {
|
|
95
|
+
await this.connectionService.detectAndPersistCapabilities(id);
|
|
96
|
+
return this.connectionService.get(id, serviceOptions);
|
|
97
|
+
}
|
|
98
|
+
async updateAiConnection(serviceOptions, id, input) {
|
|
99
|
+
return this.connectionService.update(id, input, { ...serviceOptions, inputType: core_ai_connection_input_1.CoreAiConnectionInput });
|
|
100
|
+
}
|
|
101
|
+
async aiAvailableConnections(serviceOptions) {
|
|
102
|
+
return this.connectionResolver.listAvailable({
|
|
103
|
+
tenantId: request_context_service_1.RequestContext.getTenantId(),
|
|
104
|
+
userId: serviceOptions?.currentUser?.id,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
async aiSetUserConnection(serviceOptions, connectionId) {
|
|
108
|
+
const tenantId = request_context_service_1.RequestContext.getTenantId();
|
|
109
|
+
const userId = serviceOptions?.currentUser?.id;
|
|
110
|
+
await this.connectionResolver.setUserConnection(userId, connectionId, tenantId);
|
|
111
|
+
return this.connectionResolver.listAvailable({ tenantId, userId });
|
|
112
|
+
}
|
|
113
|
+
async setAiConnectionPreference(input) {
|
|
114
|
+
return this.connectionResolver.setPreference(input.scope, input.refId, input.connectionId, input.enforced ?? false);
|
|
115
|
+
}
|
|
116
|
+
async findAiConnectionPreferences(serviceOptions, args) {
|
|
117
|
+
return this.preferenceService.find(args, { ...serviceOptions, inputType: filter_args_1.FilterArgs });
|
|
118
|
+
}
|
|
119
|
+
async deleteAiConnectionPreference(serviceOptions, id) {
|
|
120
|
+
return this.preferenceService.delete(id, serviceOptions);
|
|
121
|
+
}
|
|
122
|
+
async createAiConversation(serviceOptions, input) {
|
|
123
|
+
return this.conversationService.create(input, { ...serviceOptions, inputType: core_ai_conversation_create_input_1.CoreAiConversationCreateInput });
|
|
124
|
+
}
|
|
125
|
+
async deleteAiConversation(serviceOptions, id) {
|
|
126
|
+
return this.conversationService.delete(id, {
|
|
127
|
+
...serviceOptions,
|
|
128
|
+
roles: [role_enum_1.RoleEnum.ADMIN, role_enum_1.RoleEnum.S_CREATOR, role_enum_1.RoleEnum.S_SELF],
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
async findAiConversations(serviceOptions) {
|
|
132
|
+
const currentUser = serviceOptions?.currentUser;
|
|
133
|
+
const filterQuery = currentUser?.roles?.includes(role_enum_1.RoleEnum.ADMIN) ? {} : { createdBy: currentUser?.id };
|
|
134
|
+
return this.conversationService.find({ filterQuery }, { ...serviceOptions, roles: [role_enum_1.RoleEnum.ADMIN, role_enum_1.RoleEnum.S_CREATOR, role_enum_1.RoleEnum.S_SELF], select: '-messages' });
|
|
135
|
+
}
|
|
136
|
+
async getAiConversation(serviceOptions, id) {
|
|
137
|
+
return this.conversationService.get(id, {
|
|
138
|
+
...serviceOptions,
|
|
139
|
+
roles: [role_enum_1.RoleEnum.ADMIN, role_enum_1.RoleEnum.S_CREATOR, role_enum_1.RoleEnum.S_SELF],
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
async findAiInteractions(serviceOptions, args) {
|
|
143
|
+
return this.interactionService.find(args, { ...serviceOptions, inputType: filter_args_1.FilterArgs });
|
|
144
|
+
}
|
|
145
|
+
async getAiInteraction(serviceOptions, id) {
|
|
146
|
+
return this.interactionService.get(id, serviceOptions);
|
|
147
|
+
}
|
|
148
|
+
async aiUsage(serviceOptions) {
|
|
149
|
+
return this.budgetService.getUsageInfo(serviceOptions?.currentUser?.id, request_context_service_1.RequestContext.getTenantId());
|
|
150
|
+
}
|
|
151
|
+
async createAiBudgetLimit(serviceOptions, input) {
|
|
152
|
+
return this.budgetService.create(input, { ...serviceOptions, inputType: core_ai_budget_limit_create_input_1.CoreAiBudgetLimitCreateInput });
|
|
153
|
+
}
|
|
154
|
+
async deleteAiBudgetLimit(serviceOptions, id) {
|
|
155
|
+
return this.budgetService.delete(id, serviceOptions);
|
|
156
|
+
}
|
|
157
|
+
async findAiBudgetLimits(serviceOptions, args) {
|
|
158
|
+
return this.budgetService.find(args, { ...serviceOptions, inputType: filter_args_1.FilterArgs });
|
|
159
|
+
}
|
|
160
|
+
async updateAiBudgetLimit(serviceOptions, id, input) {
|
|
161
|
+
return this.budgetService.update(id, input, { ...serviceOptions, inputType: core_ai_budget_limit_input_1.CoreAiBudgetLimitInput });
|
|
162
|
+
}
|
|
163
|
+
async createAiSlot(serviceOptions, input) {
|
|
164
|
+
return this.slotService.create(input, { ...serviceOptions, inputType: core_ai_slot_create_input_1.CoreAiSlotCreateInput });
|
|
165
|
+
}
|
|
166
|
+
async deleteAiSlot(serviceOptions, id) {
|
|
167
|
+
return this.slotService.delete(id, serviceOptions);
|
|
168
|
+
}
|
|
169
|
+
async findAiSlots(serviceOptions, args) {
|
|
170
|
+
return this.slotService.find(args, { ...serviceOptions, inputType: filter_args_1.FilterArgs });
|
|
171
|
+
}
|
|
172
|
+
async updateAiSlot(serviceOptions, id, input) {
|
|
173
|
+
return this.slotService.update(id, input, { ...serviceOptions, inputType: core_ai_slot_update_input_1.CoreAiSlotUpdateInput });
|
|
174
|
+
}
|
|
175
|
+
async createAiPromptHint(serviceOptions, input) {
|
|
176
|
+
return this.promptHintService.create(input, { ...serviceOptions, inputType: core_ai_prompt_hint_create_input_1.CoreAiPromptHintCreateInput });
|
|
177
|
+
}
|
|
178
|
+
async deleteAiPromptHint(serviceOptions, id) {
|
|
179
|
+
return this.promptHintService.delete(id, serviceOptions);
|
|
180
|
+
}
|
|
181
|
+
async findAiPromptHints(serviceOptions, args) {
|
|
182
|
+
return this.promptHintService.find(args, { ...serviceOptions, inputType: filter_args_1.FilterArgs });
|
|
183
|
+
}
|
|
184
|
+
async updateAiPromptHint(serviceOptions, id, input) {
|
|
185
|
+
return this.promptHintService.update(id, input, { ...serviceOptions, inputType: core_ai_prompt_hint_input_1.CoreAiPromptHintInput });
|
|
186
|
+
}
|
|
187
|
+
async findAiPrompts(serviceOptions) {
|
|
188
|
+
return this.promptService.listVisible(serviceOptions);
|
|
189
|
+
}
|
|
190
|
+
async createAiPrompt(serviceOptions, input) {
|
|
191
|
+
return this.promptService.create(input, { ...serviceOptions, inputType: core_ai_prompt_create_input_1.CoreAiPromptCreateInput });
|
|
192
|
+
}
|
|
193
|
+
async updateAiPrompt(serviceOptions, id, input) {
|
|
194
|
+
return this.promptService.update(id, input, { ...serviceOptions, inputType: core_ai_prompt_update_input_1.CoreAiPromptUpdateInput });
|
|
195
|
+
}
|
|
196
|
+
async deleteAiPrompt(serviceOptions, id) {
|
|
197
|
+
return this.promptService.delete(id, serviceOptions);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
exports.CoreAiResolver = CoreAiResolver;
|
|
201
|
+
__decorate([
|
|
202
|
+
(0, graphql_1.Mutation)(() => core_ai_response_model_1.CoreAiResponse, { description: 'Send a prompt to the AI assistant' }),
|
|
203
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
204
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
205
|
+
__param(1, (0, graphql_1.Args)('input')),
|
|
206
|
+
__metadata("design:type", Function),
|
|
207
|
+
__metadata("design:paramtypes", [Object, core_ai_prompt_input_1.CoreAiPromptInput]),
|
|
208
|
+
__metadata("design:returntype", Promise)
|
|
209
|
+
], CoreAiResolver.prototype, "aiPrompt", null);
|
|
210
|
+
__decorate([
|
|
211
|
+
(0, graphql_1.Mutation)(() => core_ai_connection_model_1.CoreAiConnection, { description: 'Create a new AI connection' }),
|
|
212
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
213
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
214
|
+
__param(1, (0, graphql_1.Args)('input')),
|
|
215
|
+
__metadata("design:type", Function),
|
|
216
|
+
__metadata("design:paramtypes", [Object, core_ai_connection_create_input_1.CoreAiConnectionCreateInput]),
|
|
217
|
+
__metadata("design:returntype", Promise)
|
|
218
|
+
], CoreAiResolver.prototype, "createAiConnection", null);
|
|
219
|
+
__decorate([
|
|
220
|
+
(0, graphql_1.Mutation)(() => core_ai_connection_model_1.CoreAiConnection, { description: 'Delete an AI connection' }),
|
|
221
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
222
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
223
|
+
__param(1, (0, graphql_1.Args)('id')),
|
|
224
|
+
__metadata("design:type", Function),
|
|
225
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
226
|
+
__metadata("design:returntype", Promise)
|
|
227
|
+
], CoreAiResolver.prototype, "deleteAiConnection", null);
|
|
228
|
+
__decorate([
|
|
229
|
+
(0, graphql_1.Query)(() => core_ai_connection_model_1.CoreAiConnection, { description: 'Get an AI connection by id' }),
|
|
230
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
231
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
232
|
+
__param(1, (0, graphql_1.Args)('id')),
|
|
233
|
+
__metadata("design:type", Function),
|
|
234
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
235
|
+
__metadata("design:returntype", Promise)
|
|
236
|
+
], CoreAiResolver.prototype, "getAiConnection", null);
|
|
237
|
+
__decorate([
|
|
238
|
+
(0, graphql_1.Query)(() => [core_ai_connection_model_1.CoreAiConnection], { description: 'Find AI connections' }),
|
|
239
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
240
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
241
|
+
__param(1, (0, graphql_1.Args)()),
|
|
242
|
+
__metadata("design:type", Function),
|
|
243
|
+
__metadata("design:paramtypes", [Object, filter_args_1.FilterArgs]),
|
|
244
|
+
__metadata("design:returntype", Promise)
|
|
245
|
+
], CoreAiResolver.prototype, "findAiConnections", null);
|
|
246
|
+
__decorate([
|
|
247
|
+
(0, graphql_1.Mutation)(() => core_ai_connection_model_1.CoreAiConnection, { description: 'Auto-detect and persist AI connection capabilities' }),
|
|
248
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
249
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
250
|
+
__param(1, (0, graphql_1.Args)('id')),
|
|
251
|
+
__metadata("design:type", Function),
|
|
252
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
253
|
+
__metadata("design:returntype", Promise)
|
|
254
|
+
], CoreAiResolver.prototype, "detectAiConnectionCapabilities", null);
|
|
255
|
+
__decorate([
|
|
256
|
+
(0, graphql_1.Mutation)(() => core_ai_connection_model_1.CoreAiConnection, { description: 'Update an AI connection' }),
|
|
257
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
258
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
259
|
+
__param(1, (0, graphql_1.Args)('id')),
|
|
260
|
+
__param(2, (0, graphql_1.Args)('input')),
|
|
261
|
+
__metadata("design:type", Function),
|
|
262
|
+
__metadata("design:paramtypes", [Object, String, core_ai_connection_input_1.CoreAiConnectionInput]),
|
|
263
|
+
__metadata("design:returntype", Promise)
|
|
264
|
+
], CoreAiResolver.prototype, "updateAiConnection", null);
|
|
265
|
+
__decorate([
|
|
266
|
+
(0, graphql_1.Query)(() => [core_ai_available_connection_model_1.CoreAiAvailableConnection], { description: 'List AI connections available to the current user' }),
|
|
267
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
268
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
269
|
+
__metadata("design:type", Function),
|
|
270
|
+
__metadata("design:paramtypes", [Object]),
|
|
271
|
+
__metadata("design:returntype", Promise)
|
|
272
|
+
], CoreAiResolver.prototype, "aiAvailableConnections", null);
|
|
273
|
+
__decorate([
|
|
274
|
+
(0, graphql_1.Mutation)(() => [core_ai_available_connection_model_1.CoreAiAvailableConnection], { description: 'Set the current user default AI connection' }),
|
|
275
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
276
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
277
|
+
__param(1, (0, graphql_1.Args)('connectionId')),
|
|
278
|
+
__metadata("design:type", Function),
|
|
279
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
280
|
+
__metadata("design:returntype", Promise)
|
|
281
|
+
], CoreAiResolver.prototype, "aiSetUserConnection", null);
|
|
282
|
+
__decorate([
|
|
283
|
+
(0, graphql_1.Mutation)(() => core_ai_connection_preference_model_1.CoreAiConnectionPreference, { description: 'Upsert an AI connection preference' }),
|
|
284
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
285
|
+
__param(0, (0, graphql_1.Args)('input')),
|
|
286
|
+
__metadata("design:type", Function),
|
|
287
|
+
__metadata("design:paramtypes", [core_ai_connection_preference_input_1.CoreAiConnectionPreferenceInput]),
|
|
288
|
+
__metadata("design:returntype", Promise)
|
|
289
|
+
], CoreAiResolver.prototype, "setAiConnectionPreference", null);
|
|
290
|
+
__decorate([
|
|
291
|
+
(0, graphql_1.Query)(() => [core_ai_connection_preference_model_1.CoreAiConnectionPreference], { description: 'Find AI connection preferences' }),
|
|
292
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
293
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
294
|
+
__param(1, (0, graphql_1.Args)()),
|
|
295
|
+
__metadata("design:type", Function),
|
|
296
|
+
__metadata("design:paramtypes", [Object, filter_args_1.FilterArgs]),
|
|
297
|
+
__metadata("design:returntype", Promise)
|
|
298
|
+
], CoreAiResolver.prototype, "findAiConnectionPreferences", null);
|
|
299
|
+
__decorate([
|
|
300
|
+
(0, graphql_1.Mutation)(() => core_ai_connection_preference_model_1.CoreAiConnectionPreference, { description: 'Delete an AI connection preference' }),
|
|
301
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
302
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
303
|
+
__param(1, (0, graphql_1.Args)('id')),
|
|
304
|
+
__metadata("design:type", Function),
|
|
305
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
306
|
+
__metadata("design:returntype", Promise)
|
|
307
|
+
], CoreAiResolver.prototype, "deleteAiConnectionPreference", null);
|
|
308
|
+
__decorate([
|
|
309
|
+
(0, graphql_1.Mutation)(() => core_ai_conversation_model_1.CoreAiConversation, { description: 'Create a new AI conversation' }),
|
|
310
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
311
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
312
|
+
__param(1, (0, graphql_1.Args)('input')),
|
|
313
|
+
__metadata("design:type", Function),
|
|
314
|
+
__metadata("design:paramtypes", [Object, core_ai_conversation_create_input_1.CoreAiConversationCreateInput]),
|
|
315
|
+
__metadata("design:returntype", Promise)
|
|
316
|
+
], CoreAiResolver.prototype, "createAiConversation", null);
|
|
317
|
+
__decorate([
|
|
318
|
+
(0, graphql_1.Mutation)(() => core_ai_conversation_model_1.CoreAiConversation, { description: 'Delete an AI conversation' }),
|
|
319
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
320
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
321
|
+
__param(1, (0, graphql_1.Args)('id')),
|
|
322
|
+
__metadata("design:type", Function),
|
|
323
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
324
|
+
__metadata("design:returntype", Promise)
|
|
325
|
+
], CoreAiResolver.prototype, "deleteAiConversation", null);
|
|
326
|
+
__decorate([
|
|
327
|
+
(0, graphql_1.Query)(() => [core_ai_conversation_model_1.CoreAiConversation], { description: 'Find AI conversations of the current user' }),
|
|
328
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
329
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
330
|
+
__metadata("design:type", Function),
|
|
331
|
+
__metadata("design:paramtypes", [Object]),
|
|
332
|
+
__metadata("design:returntype", Promise)
|
|
333
|
+
], CoreAiResolver.prototype, "findAiConversations", null);
|
|
334
|
+
__decorate([
|
|
335
|
+
(0, graphql_1.Query)(() => core_ai_conversation_model_1.CoreAiConversation, { description: 'Get an AI conversation by id' }),
|
|
336
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
337
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
338
|
+
__param(1, (0, graphql_1.Args)('id')),
|
|
339
|
+
__metadata("design:type", Function),
|
|
340
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
341
|
+
__metadata("design:returntype", Promise)
|
|
342
|
+
], CoreAiResolver.prototype, "getAiConversation", null);
|
|
343
|
+
__decorate([
|
|
344
|
+
(0, graphql_1.Query)(() => [core_ai_interaction_model_1.CoreAiInteraction], { description: 'Find AI interaction audit records' }),
|
|
345
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
346
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
347
|
+
__param(1, (0, graphql_1.Args)()),
|
|
348
|
+
__metadata("design:type", Function),
|
|
349
|
+
__metadata("design:paramtypes", [Object, filter_args_1.FilterArgs]),
|
|
350
|
+
__metadata("design:returntype", Promise)
|
|
351
|
+
], CoreAiResolver.prototype, "findAiInteractions", null);
|
|
352
|
+
__decorate([
|
|
353
|
+
(0, graphql_1.Query)(() => core_ai_interaction_model_1.CoreAiInteraction, { description: 'Get an AI interaction audit record by id' }),
|
|
354
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
355
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
356
|
+
__param(1, (0, graphql_1.Args)('id')),
|
|
357
|
+
__metadata("design:type", Function),
|
|
358
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
359
|
+
__metadata("design:returntype", Promise)
|
|
360
|
+
], CoreAiResolver.prototype, "getAiInteraction", null);
|
|
361
|
+
__decorate([
|
|
362
|
+
(0, graphql_1.Query)(() => core_ai_usage_info_model_1.CoreAiUsageInfo, { description: 'Token usage for the current user (and tenant)' }),
|
|
363
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
364
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
365
|
+
__metadata("design:type", Function),
|
|
366
|
+
__metadata("design:paramtypes", [Object]),
|
|
367
|
+
__metadata("design:returntype", Promise)
|
|
368
|
+
], CoreAiResolver.prototype, "aiUsage", null);
|
|
369
|
+
__decorate([
|
|
370
|
+
(0, graphql_1.Mutation)(() => core_ai_budget_limit_model_1.CoreAiBudgetLimit, { description: 'Create an AI budget limit' }),
|
|
371
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
372
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
373
|
+
__param(1, (0, graphql_1.Args)('input')),
|
|
374
|
+
__metadata("design:type", Function),
|
|
375
|
+
__metadata("design:paramtypes", [Object, core_ai_budget_limit_create_input_1.CoreAiBudgetLimitCreateInput]),
|
|
376
|
+
__metadata("design:returntype", Promise)
|
|
377
|
+
], CoreAiResolver.prototype, "createAiBudgetLimit", null);
|
|
378
|
+
__decorate([
|
|
379
|
+
(0, graphql_1.Mutation)(() => core_ai_budget_limit_model_1.CoreAiBudgetLimit, { description: 'Delete an AI budget limit' }),
|
|
380
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
381
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
382
|
+
__param(1, (0, graphql_1.Args)('id')),
|
|
383
|
+
__metadata("design:type", Function),
|
|
384
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
385
|
+
__metadata("design:returntype", Promise)
|
|
386
|
+
], CoreAiResolver.prototype, "deleteAiBudgetLimit", null);
|
|
387
|
+
__decorate([
|
|
388
|
+
(0, graphql_1.Query)(() => [core_ai_budget_limit_model_1.CoreAiBudgetLimit], { description: 'Find AI budget limits' }),
|
|
389
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
390
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
391
|
+
__param(1, (0, graphql_1.Args)()),
|
|
392
|
+
__metadata("design:type", Function),
|
|
393
|
+
__metadata("design:paramtypes", [Object, filter_args_1.FilterArgs]),
|
|
394
|
+
__metadata("design:returntype", Promise)
|
|
395
|
+
], CoreAiResolver.prototype, "findAiBudgetLimits", null);
|
|
396
|
+
__decorate([
|
|
397
|
+
(0, graphql_1.Mutation)(() => core_ai_budget_limit_model_1.CoreAiBudgetLimit, { description: 'Update an AI budget limit' }),
|
|
398
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
399
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
400
|
+
__param(1, (0, graphql_1.Args)('id')),
|
|
401
|
+
__param(2, (0, graphql_1.Args)('input')),
|
|
402
|
+
__metadata("design:type", Function),
|
|
403
|
+
__metadata("design:paramtypes", [Object, String, core_ai_budget_limit_input_1.CoreAiBudgetLimitInput]),
|
|
404
|
+
__metadata("design:returntype", Promise)
|
|
405
|
+
], CoreAiResolver.prototype, "updateAiBudgetLimit", null);
|
|
406
|
+
__decorate([
|
|
407
|
+
(0, graphql_1.Mutation)(() => core_ai_slot_model_1.CoreAiSlot, { description: 'Create an AI prompt template fragment' }),
|
|
408
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
409
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
410
|
+
__param(1, (0, graphql_1.Args)('input')),
|
|
411
|
+
__metadata("design:type", Function),
|
|
412
|
+
__metadata("design:paramtypes", [Object, core_ai_slot_create_input_1.CoreAiSlotCreateInput]),
|
|
413
|
+
__metadata("design:returntype", Promise)
|
|
414
|
+
], CoreAiResolver.prototype, "createAiSlot", null);
|
|
415
|
+
__decorate([
|
|
416
|
+
(0, graphql_1.Mutation)(() => core_ai_slot_model_1.CoreAiSlot, { description: 'Delete an AI prompt template fragment' }),
|
|
417
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
418
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
419
|
+
__param(1, (0, graphql_1.Args)('id')),
|
|
420
|
+
__metadata("design:type", Function),
|
|
421
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
422
|
+
__metadata("design:returntype", Promise)
|
|
423
|
+
], CoreAiResolver.prototype, "deleteAiSlot", null);
|
|
424
|
+
__decorate([
|
|
425
|
+
(0, graphql_1.Query)(() => [core_ai_slot_model_1.CoreAiSlot], { description: 'Find AI prompt template fragments' }),
|
|
426
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
427
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
428
|
+
__param(1, (0, graphql_1.Args)()),
|
|
429
|
+
__metadata("design:type", Function),
|
|
430
|
+
__metadata("design:paramtypes", [Object, filter_args_1.FilterArgs]),
|
|
431
|
+
__metadata("design:returntype", Promise)
|
|
432
|
+
], CoreAiResolver.prototype, "findAiSlots", null);
|
|
433
|
+
__decorate([
|
|
434
|
+
(0, graphql_1.Mutation)(() => core_ai_slot_model_1.CoreAiSlot, { description: 'Update an AI prompt template fragment' }),
|
|
435
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
436
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
437
|
+
__param(1, (0, graphql_1.Args)('id')),
|
|
438
|
+
__param(2, (0, graphql_1.Args)('input')),
|
|
439
|
+
__metadata("design:type", Function),
|
|
440
|
+
__metadata("design:paramtypes", [Object, String, core_ai_slot_update_input_1.CoreAiSlotUpdateInput]),
|
|
441
|
+
__metadata("design:returntype", Promise)
|
|
442
|
+
], CoreAiResolver.prototype, "updateAiSlot", null);
|
|
443
|
+
__decorate([
|
|
444
|
+
(0, graphql_1.Mutation)(() => core_ai_prompt_hint_model_1.CoreAiPromptHint, { description: 'Create a learned AI prompt hint' }),
|
|
445
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
446
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
447
|
+
__param(1, (0, graphql_1.Args)('input')),
|
|
448
|
+
__metadata("design:type", Function),
|
|
449
|
+
__metadata("design:paramtypes", [Object, core_ai_prompt_hint_create_input_1.CoreAiPromptHintCreateInput]),
|
|
450
|
+
__metadata("design:returntype", Promise)
|
|
451
|
+
], CoreAiResolver.prototype, "createAiPromptHint", null);
|
|
452
|
+
__decorate([
|
|
453
|
+
(0, graphql_1.Mutation)(() => core_ai_prompt_hint_model_1.CoreAiPromptHint, { description: 'Delete a learned AI prompt hint' }),
|
|
454
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
455
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
456
|
+
__param(1, (0, graphql_1.Args)('id')),
|
|
457
|
+
__metadata("design:type", Function),
|
|
458
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
459
|
+
__metadata("design:returntype", Promise)
|
|
460
|
+
], CoreAiResolver.prototype, "deleteAiPromptHint", null);
|
|
461
|
+
__decorate([
|
|
462
|
+
(0, graphql_1.Query)(() => [core_ai_prompt_hint_model_1.CoreAiPromptHint], { description: 'Find learned AI prompt hints' }),
|
|
463
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
464
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
465
|
+
__param(1, (0, graphql_1.Args)()),
|
|
466
|
+
__metadata("design:type", Function),
|
|
467
|
+
__metadata("design:paramtypes", [Object, filter_args_1.FilterArgs]),
|
|
468
|
+
__metadata("design:returntype", Promise)
|
|
469
|
+
], CoreAiResolver.prototype, "findAiPromptHints", null);
|
|
470
|
+
__decorate([
|
|
471
|
+
(0, graphql_1.Mutation)(() => core_ai_prompt_hint_model_1.CoreAiPromptHint, { description: 'Update a learned AI prompt hint' }),
|
|
472
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
473
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
474
|
+
__param(1, (0, graphql_1.Args)('id')),
|
|
475
|
+
__param(2, (0, graphql_1.Args)('input')),
|
|
476
|
+
__metadata("design:type", Function),
|
|
477
|
+
__metadata("design:paramtypes", [Object, String, core_ai_prompt_hint_input_1.CoreAiPromptHintInput]),
|
|
478
|
+
__metadata("design:returntype", Promise)
|
|
479
|
+
], CoreAiResolver.prototype, "updateAiPromptHint", null);
|
|
480
|
+
__decorate([
|
|
481
|
+
(0, graphql_1.Query)(() => [core_ai_prompt_model_1.CoreAiPrompt], { description: 'List AI user prompts visible to the current user' }),
|
|
482
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
483
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
484
|
+
__metadata("design:type", Function),
|
|
485
|
+
__metadata("design:paramtypes", [Object]),
|
|
486
|
+
__metadata("design:returntype", Promise)
|
|
487
|
+
], CoreAiResolver.prototype, "findAiPrompts", null);
|
|
488
|
+
__decorate([
|
|
489
|
+
(0, graphql_1.Mutation)(() => core_ai_prompt_model_1.CoreAiPrompt, { description: 'Create an AI user prompt' }),
|
|
490
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
491
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
492
|
+
__param(1, (0, graphql_1.Args)('input')),
|
|
493
|
+
__metadata("design:type", Function),
|
|
494
|
+
__metadata("design:paramtypes", [Object, core_ai_prompt_create_input_1.CoreAiPromptCreateInput]),
|
|
495
|
+
__metadata("design:returntype", Promise)
|
|
496
|
+
], CoreAiResolver.prototype, "createAiPrompt", null);
|
|
497
|
+
__decorate([
|
|
498
|
+
(0, graphql_1.Mutation)(() => core_ai_prompt_model_1.CoreAiPrompt, { description: 'Update an AI user prompt' }),
|
|
499
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
500
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
501
|
+
__param(1, (0, graphql_1.Args)('id')),
|
|
502
|
+
__param(2, (0, graphql_1.Args)('input')),
|
|
503
|
+
__metadata("design:type", Function),
|
|
504
|
+
__metadata("design:paramtypes", [Object, String, core_ai_prompt_update_input_1.CoreAiPromptUpdateInput]),
|
|
505
|
+
__metadata("design:returntype", Promise)
|
|
506
|
+
], CoreAiResolver.prototype, "updateAiPrompt", null);
|
|
507
|
+
__decorate([
|
|
508
|
+
(0, graphql_1.Mutation)(() => core_ai_prompt_model_1.CoreAiPrompt, { description: 'Delete an AI user prompt' }),
|
|
509
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
510
|
+
__param(0, (0, graphql_service_options_decorator_1.GraphQLServiceOptions)()),
|
|
511
|
+
__param(1, (0, graphql_1.Args)('id')),
|
|
512
|
+
__metadata("design:type", Function),
|
|
513
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
514
|
+
__metadata("design:returntype", Promise)
|
|
515
|
+
], CoreAiResolver.prototype, "deleteAiPrompt", null);
|
|
516
|
+
exports.CoreAiResolver = CoreAiResolver = __decorate([
|
|
517
|
+
(0, graphql_1.Resolver)(() => core_ai_response_model_1.CoreAiResponse),
|
|
518
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
519
|
+
__metadata("design:paramtypes", [core_ai_service_1.CoreAiService,
|
|
520
|
+
core_ai_connection_service_1.CoreAiConnectionService,
|
|
521
|
+
core_ai_conversation_service_1.CoreAiConversationService,
|
|
522
|
+
core_ai_interaction_service_1.CoreAiInteractionService,
|
|
523
|
+
core_ai_budget_service_1.CoreAiBudgetService,
|
|
524
|
+
core_ai_connection_resolver_service_1.CoreAiConnectionResolverService,
|
|
525
|
+
core_ai_connection_preference_service_1.CoreAiConnectionPreferenceService,
|
|
526
|
+
core_ai_slot_service_1.CoreAiSlotService,
|
|
527
|
+
core_ai_prompt_hint_service_1.CoreAiPromptHintService,
|
|
528
|
+
core_ai_prompt_service_1.CoreAiPromptService])
|
|
529
|
+
], CoreAiResolver);
|
|
530
|
+
//# sourceMappingURL=core-ai.resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-ai.resolver.js","sourceRoot":"","sources":["../../../../src/core/modules/ai/core-ai.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAAkE;AAElE,+DAA2D;AAC3D,iHAAkG;AAClG,6EAAgE;AAChE,4DAAwD;AAExD,2FAA+E;AAC/E,kGAA0F;AAC1F,oFAA6E;AAC7E,8FAAuF;AACvF,sGAA+F;AAC/F,gFAA0E;AAC1E,kGAA2F;AAC3F,gGAAwF;AACxF,kFAA2E;AAC3E,sFAA+E;AAC/E,sFAA+E;AAC/E,kFAA2E;AAC3E,kFAA2E;AAC3E,wEAAkE;AAClE,oGAAwF;AACxF,oFAAwE;AACxE,sGAA0F;AAC1F,gFAAqE;AACrE,oFAAyE;AACzE,kFAAuE;AACvE,kFAAsE;AACtE,wEAA6D;AAC7D,oEAAyD;AACzD,4EAAiE;AACjE,gFAAoE;AACpE,8EAAwE;AACxE,4GAAqG;AACrG,wGAAiG;AACjG,sFAAgF;AAChF,0FAAoF;AACpF,wFAAkF;AAClF,wFAAiF;AACjF,8EAAwE;AACxE,0EAAoE;AACpE,gEAA2D;AAcpD,IAAM,cAAc,GAApB,MAAM,cAAc;IAEJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAVrB,YACqB,SAAwB,EACxB,iBAA0C,EAC1C,mBAA8C,EAC9C,kBAA4C,EAC5C,aAAkC,EAClC,kBAAmD,EACnD,iBAAoD,EACpD,WAA8B,EAC9B,iBAA0C,EAC1C,aAAkC;QATlC,cAAS,GAAT,SAAS,CAAe;QACxB,sBAAiB,GAAjB,iBAAiB,CAAyB;QAC1C,wBAAmB,GAAnB,mBAAmB,CAA2B;QAC9C,uBAAkB,GAAlB,kBAAkB,CAA0B;QAC5C,kBAAa,GAAb,aAAa,CAAq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,cAAI,EAAC,OAAO,CAAC,CAAA;;6CAAQ,qDAAuB;;oDAG9C;AAKK;IAFL,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,mCAAY,EAAE,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;IACzE,IAAA,uBAAK,EAAC,oBAAQ,CAAC,MAAM,CAAC;IAEpB,WAAA,IAAA,yDAAqB,GAAE,CAAA;IACvB,WAAA,IAAA,cAAI,EAAC,IAAI,CAAC,CAAA;IACV,WAAA,IAAA,cAAI,EAAC,OAAO,CAAC,CAAA;;qDAAQ,qDAAuB;;oDAG9C;AAKK;IAFL,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,mCAAY,EAAE,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;IACzE,IAAA,uBAAK,EAAC,oBAAQ,CAAC,MAAM,CAAC;IAEpB,WAAA,IAAA,yDAAqB,GAAE,CAAA;IACvB,WAAA,IAAA,cAAI,EAAC,IAAI,CAAC,CAAA;;;;oDAGZ;yBArdU,cAAc;IAF1B,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;IAC9B,IAAA,uBAAK,EAAC,oBAAQ,CAAC,KAAK,CAAC;qCAGY,+BAAa;QACL,oDAAuB;QACrB,wDAAyB;QAC1B,sDAAwB;QAC7B,4CAAmB;QACd,qEAA+B;QAChC,yEAAiC;QACvC,wCAAiB;QACX,qDAAuB;QAC3B,4CAAmB;GAX5C,cAAc,CAsd1B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mountAiMcpOAuth = mountAiMcpOAuth;
|
|
4
|
+
const core_ai_mcp_oauth_service_1 = require("../services/core-ai-mcp-oauth.service");
|
|
5
|
+
async function mountAiMcpOAuth(app, options) {
|
|
6
|
+
const { mcpAuthRouter } = await Promise.resolve().then(() => require('@modelcontextprotocol/sdk/server/auth/router.js'));
|
|
7
|
+
const oauthService = app.get(core_ai_mcp_oauth_service_1.CoreAiMcpOAuthService);
|
|
8
|
+
const mcpPath = options.mcpPath ?? '/ai/mcp';
|
|
9
|
+
const router = mcpAuthRouter({
|
|
10
|
+
issuerUrl: new URL(options.baseUrl),
|
|
11
|
+
provider: oauthService.buildOAuthProvider(),
|
|
12
|
+
resourceServerUrl: new URL(`${options.baseUrl.replace(/\/$/, '')}${mcpPath}`),
|
|
13
|
+
});
|
|
14
|
+
app.use(router);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=ai-mcp-oauth.helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-mcp-oauth.helper.js","sourceRoot":"","sources":["../../../../../src/core/modules/ai/helpers/ai-mcp-oauth.helper.ts"],"names":[],"mappings":";;AAmBA,0CAeC;AAlCD,qFAA8E;AAmBvE,KAAK,UAAU,eAAe,CACnC,GAA+D,EAC/D,OAA8C;IAE9C,MAAM,EAAE,aAAa,EAAE,GAAG,2CAAa,iDAAiD,EAAC,CAAC;IAC1F,MAAM,YAAY,GAA0B,GAAG,CAAC,GAAG,CAAC,iDAAqB,CAAC,CAAC;IAC3E,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,SAAS,CAAC;IAE7C,MAAM,MAAM,GAAG,aAAa,CAAC;QAC3B,SAAS,EAAE,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC;QACnC,QAAQ,EAAE,YAAY,CAAC,kBAAkB,EAAS;QAClD,iBAAiB,EAAE,IAAI,GAAG,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC;KAC9E,CAAC,CAAC;IAEH,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Logger, OnModuleInit } from '@nestjs/common';
|
|
2
|
+
import { IAiHook } from '../interfaces/ai-hook.interface';
|
|
3
|
+
import { AiHookRegistry } from './ai-hook.registry';
|
|
4
|
+
export declare abstract class AiHookBase implements IAiHook, OnModuleInit {
|
|
5
|
+
protected readonly registry: AiHookRegistry;
|
|
6
|
+
protected readonly logger: Logger;
|
|
7
|
+
abstract readonly name: string;
|
|
8
|
+
protected constructor(registry: AiHookRegistry);
|
|
9
|
+
onModuleInit(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AiHookBase = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const ai_hook_registry_1 = require("./ai-hook.registry");
|
|
15
|
+
let AiHookBase = class AiHookBase {
|
|
16
|
+
registry;
|
|
17
|
+
logger = new common_1.Logger(this.constructor.name);
|
|
18
|
+
constructor(registry) {
|
|
19
|
+
this.registry = registry;
|
|
20
|
+
}
|
|
21
|
+
onModuleInit() {
|
|
22
|
+
this.registry.register(this);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.AiHookBase = AiHookBase;
|
|
26
|
+
exports.AiHookBase = AiHookBase = __decorate([
|
|
27
|
+
(0, common_1.Injectable)(),
|
|
28
|
+
__metadata("design:paramtypes", [ai_hook_registry_1.AiHookRegistry])
|
|
29
|
+
], AiHookBase);
|
|
30
|
+
//# sourceMappingURL=ai-hook.base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-hook.base.js","sourceRoot":"","sources":["../../../../../src/core/modules/ai/hooks/ai-hook.base.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAkE;AAGlE,yDAAoD;AAS7C,IAAe,UAAU,GAAzB,MAAe,UAAU;IAKW;IAJtB,MAAM,GAAG,IAAI,eAAM,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAI9D,YAAyC,QAAwB;QAAxB,aAAQ,GAAR,QAAQ,CAAgB;IAAG,CAAC;IAErE,YAAY;QACV,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF,CAAA;AAVqB,gCAAU;qBAAV,UAAU;IAD/B,IAAA,mBAAU,GAAE;qCAMwC,iCAAc;GAL7C,UAAU,CAU/B"}
|