openloops 0.7.0 → 0.7.2
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/CHANGELOG.md +22 -0
- package/dist/db/indexes/mcp-servers.js +2 -1
- package/dist/db/indexes/mcp-servers.mjs +2 -1
- package/dist/harness/agent.d.ts +1 -2
- package/dist/harness/agent.js +15 -9
- package/dist/harness/agent.mjs +15 -9
- package/dist/services/automations/runner/automation-runner.js +1 -3
- package/dist/services/automations/runner/automation-runner.mjs +1 -3
- package/dist/services/mcp-servers/admin/index.d.ts +1 -0
- package/dist/services/mcp-servers/admin/index.js +22 -0
- package/dist/services/mcp-servers/admin/index.mjs +1 -0
- package/dist/services/mcp-servers/admin/module.d.ts +10 -0
- package/dist/services/mcp-servers/admin/module.js +55 -0
- package/dist/services/mcp-servers/admin/module.mjs +27 -0
- package/dist/services/mcp-servers/admin/use-cases/create-internal-mcp.use-case.d.ts +12 -0
- package/dist/services/mcp-servers/admin/use-cases/create-internal-mcp.use-case.js +50 -0
- package/dist/services/mcp-servers/admin/use-cases/create-internal-mcp.use-case.mjs +26 -0
- package/dist/services/mcp-servers/admin/use-cases/delete-internal-mcp.use-case.d.ts +13 -0
- package/dist/services/mcp-servers/admin/use-cases/delete-internal-mcp.use-case.js +44 -0
- package/dist/services/mcp-servers/admin/use-cases/delete-internal-mcp.use-case.mjs +20 -0
- package/dist/services/mcp-servers/admin/use-cases/get-internal-mcp-by-id.use-case.d.ts +12 -0
- package/dist/services/mcp-servers/admin/use-cases/get-internal-mcp-by-id.use-case.js +41 -0
- package/dist/services/mcp-servers/admin/use-cases/get-internal-mcp-by-id.use-case.mjs +17 -0
- package/dist/services/mcp-servers/admin/use-cases/list-internal-mcps.use-case.d.ts +16 -0
- package/dist/services/mcp-servers/admin/use-cases/list-internal-mcps.use-case.js +42 -0
- package/dist/services/mcp-servers/admin/use-cases/list-internal-mcps.use-case.mjs +18 -0
- package/dist/services/mcp-servers/admin/use-cases/update-internal-mcp.use-case.d.ts +13 -0
- package/dist/services/mcp-servers/admin/use-cases/update-internal-mcp.use-case.js +59 -0
- package/dist/services/mcp-servers/admin/use-cases/update-internal-mcp.use-case.mjs +35 -0
- package/dist/services/mcp-servers/entities/mcpserver.entity.d.ts +10 -1
- package/dist/services/mcp-servers/entities/mcpserver.entity.js +28 -3
- package/dist/services/mcp-servers/entities/mcpserver.entity.mjs +28 -3
- package/dist/services/mcp-servers/internal.d.ts +7 -0
- package/dist/services/mcp-servers/internal.js +32 -0
- package/dist/services/mcp-servers/internal.mjs +8 -0
- package/dist/services/mcp-servers/repositories/mcpserver.repository.d.ts +8 -0
- package/dist/services/mcp-servers/repositories/mcpserver.repository.js +23 -3
- package/dist/services/mcp-servers/repositories/mcpserver.repository.mjs +24 -4
- package/dist/services/mcp-servers/use-cases/list-mcpservers-by-user.use-case.js +2 -0
- package/dist/services/mcp-servers/use-cases/list-mcpservers-by-user.use-case.mjs +2 -0
- package/dist/services/mcp-servers/use-cases/update-mcpserver.use-case.js +1 -1
- package/dist/services/mcp-servers/use-cases/update-mcpserver.use-case.mjs +1 -1
- package/docs/agent.md +1 -1
- package/docs/automations.md +23 -6
- package/docs/configuration.md +0 -1
- package/docs/mcp-servers.md +84 -1
- package/examples/automations/run-automation-worker.ts +8 -0
- package/examples/mcps/create-mcp.ts +1 -0
- package/examples/mcps/internal-mcp-admin.ts +43 -0
- package/examples/mcps/internal-mcp.ts +14 -3
- package/examples/mcps/update-mcp.ts +1 -1
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `openloops` are written here, newest first. The format follows [Keep a Changelog](https://keepachangelog.com) and the versions follow [semantic versioning](https://semver.org), where a minor version can still break the API while the package is in beta. Changes before 0.4.0 are not recorded here, see the commits and the tags.
|
|
4
4
|
|
|
5
|
+
## Unreleased
|
|
6
|
+
|
|
7
|
+
This version breaks the API of the internal MCP servers in automations. Before, the runner sent one token for the whole deployment, from `INTERNAL_MCP_TOKEN`. Now each internal server declares its own. To migrate: delete `INTERNAL_MCP_TOKEN` and, in each internal server that used `{{token}}` in automations, add `autonomousToken: process.env.<YOUR_VARIABLE>` with the token of the service account that it needs. Read [automations](docs/automations.md#internal-mcp-servers-in-an-automation).
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Internal MCP servers stored in the database**, managed from a back office. `createInternalMcp`, `updateInternalMcp`, `getInternalMcpById`, `listInternalMcps` and `deleteInternalMcp` in the new entry point `openloops/mcps/admin`, all for admins only. The agent loads the enabled ones in every run next to the ones declared in code, with the same rules: trusted, no manifest review, destructive tools still ask. `{{token}}` in a header uses the token of the run, a token written in the header is sent as it is. Read [MCP servers](docs/mcp-servers.md#internal-servers-stored-in-the-database).
|
|
12
|
+
- `internal` and `enabled` in `McpServerProps`. A record without them is a normal server, so no migration is needed.
|
|
13
|
+
- A unique index on the name of the internal servers: run `ensureIndexes`.
|
|
14
|
+
- `autonomousToken` in the internal MCP servers, declared in code (`InternalMcp`) or stored (`createInternalMcp` and `updateInternalMcp`). It is the token of a service account, used for `{{token}}` only in an autonomous run that brings no token for that server, and then the agent sends the id of the user in `X-User-Id`. An interactive run never uses it. It is temporary, until the integrations give the runner the token of the owner.
|
|
15
|
+
- `environment` in `McpServerProps`, an optional text for every MCP server, internal or not, to say which environment it belongs to. It is only a label. The functions of `openloops/mcps` and of `openloops/mcps/admin` accept it, and a blank text removes it.
|
|
16
|
+
|
|
17
|
+
### Removed
|
|
18
|
+
|
|
19
|
+
- `INTERNAL_MCP_TOKEN` and the `serviceToken` parameter of `Agent.run`. Use `autonomousToken` in each internal MCP server.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- The functions of `openloops/mcps` never see an internal server, not even for an admin, and ignore `internal` and `enabled` in the payload of a user.
|
|
24
|
+
- `listMcpServersByUser` failed because it sent no scope to the repository, now it lists the servers of the user.
|
|
25
|
+
- The connection errors of an internal server mask the values of its headers in the logs.
|
|
26
|
+
|
|
5
27
|
## 0.7.0
|
|
6
28
|
|
|
7
29
|
This version breaks the API of the entities, of the repository, of the results of the use cases and of the authentication, and removes `tsyringe`. The tokens that 0.6 issued (logins and event automations) stop working: issue new ones. Read [authentication](docs/authentication.md). The parameters of the use cases do not change, except for `updateChat`, which accepts `unset`.
|
|
@@ -22,7 +22,8 @@ __export(mcp_servers_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(mcp_servers_exports);
|
|
24
24
|
const mcpServers = [
|
|
25
|
-
{ key: { ownerId: 1 } }
|
|
25
|
+
{ key: { ownerId: 1 } },
|
|
26
|
+
{ key: { name: 1 }, unique: true, partialFilterExpression: { internal: true } }
|
|
26
27
|
];
|
|
27
28
|
// Annotate the CommonJS export names for ESM import in node:
|
|
28
29
|
0 && (module.exports = {
|
package/dist/harness/agent.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface InternalMcp {
|
|
|
10
10
|
name: string;
|
|
11
11
|
url: string;
|
|
12
12
|
headers?: Record<string, string>;
|
|
13
|
+
autonomousToken?: string;
|
|
13
14
|
}
|
|
14
15
|
export declare const AGENT_ERROR_CODES: {
|
|
15
16
|
readonly NODE_NOT_FOUND: "AGENT_NODE_NOT_FOUND";
|
|
@@ -54,7 +55,6 @@ export declare class Agent {
|
|
|
54
55
|
private _internalMcps;
|
|
55
56
|
private _mcps;
|
|
56
57
|
private mcpTokens;
|
|
57
|
-
private serviceToken?;
|
|
58
58
|
private mcpListing?;
|
|
59
59
|
private mcpListingFailed;
|
|
60
60
|
private _preHooks;
|
|
@@ -91,7 +91,6 @@ export declare class Agent {
|
|
|
91
91
|
currentUser: CurrentUser;
|
|
92
92
|
currentSession?: CurrentSession;
|
|
93
93
|
mcpTokens?: Record<string, string>;
|
|
94
|
-
serviceToken?: string;
|
|
95
94
|
}): Promise<{
|
|
96
95
|
data: Chat;
|
|
97
96
|
error?: undefined;
|
package/dist/harness/agent.js
CHANGED
|
@@ -37,6 +37,7 @@ var import_skills = require("./skills");
|
|
|
37
37
|
var import_input_check = require("../guardrails/input/input-check.js");
|
|
38
38
|
var import_create_block_input_oversize = require("../guardrails/input/create-block-input-oversize.js");
|
|
39
39
|
var import_mcp_servers = require("../services/mcp-servers/index.js");
|
|
40
|
+
var import_internal = require("../services/mcp-servers/internal.js");
|
|
40
41
|
var import_rank_tools_by_keywords = require("./utils/rank-tools-by-keywords");
|
|
41
42
|
var import_agent_state = require("./agent-state");
|
|
42
43
|
var import_workspace = require("./workspace");
|
|
@@ -72,7 +73,6 @@ class Agent {
|
|
|
72
73
|
_internalMcps = [];
|
|
73
74
|
_mcps = [];
|
|
74
75
|
mcpTokens = {};
|
|
75
|
-
serviceToken;
|
|
76
76
|
mcpListing;
|
|
77
77
|
mcpListingFailed = false;
|
|
78
78
|
_preHooks = [];
|
|
@@ -148,7 +148,7 @@ class Agent {
|
|
|
148
148
|
}
|
|
149
149
|
async run(props) {
|
|
150
150
|
try {
|
|
151
|
-
const { input, options, currentUser, currentSession, mcpTokens
|
|
151
|
+
const { input, options, currentUser, currentSession, mcpTokens } = props || {};
|
|
152
152
|
const { chatId, message } = input || {};
|
|
153
153
|
this.logger.debug(input, "[AGENT] Agent started");
|
|
154
154
|
if (!this._loop?.nodes || !this._loop?.initialNode) throw new Error("[AGENT] Loop is missing");
|
|
@@ -172,7 +172,6 @@ class Agent {
|
|
|
172
172
|
this.currentMessage = message;
|
|
173
173
|
this.chatOptions = options;
|
|
174
174
|
this.mcpTokens = mcpTokens ?? {};
|
|
175
|
-
this.serviceToken = serviceToken;
|
|
176
175
|
this.model = void 0;
|
|
177
176
|
this.thinkingEffort = void 0;
|
|
178
177
|
if (options?.thinkingEffort !== void 0 && !(0, import_llm_types.isSelectableThinkingEffort)(options.thinkingEffort)) throw new Error(`[AGENT] thinkingEffort must be one of ${import_llm_types.SELECTABLE_THINKING_EFFORTS.join(", ")}`);
|
|
@@ -488,10 +487,17 @@ Ref: ${guard.ref}`, { source: "harness", excludeFromContext: true });
|
|
|
488
487
|
}
|
|
489
488
|
async listMcps() {
|
|
490
489
|
if (!this.currentUser) return;
|
|
491
|
-
|
|
490
|
+
const internals = [...this._internalMcps];
|
|
491
|
+
try {
|
|
492
|
+
for (const mcp of await (0, import_internal.listActiveInternalMcps)()) if (!internals.some((candidate) => candidate.name === mcp.name)) internals.push(mcp);
|
|
493
|
+
} catch (error) {
|
|
494
|
+
this.logger.error({ error: error?.message ?? error }, "[AGENT] Failed to list the internal MCP servers");
|
|
495
|
+
this.mcpListingFailed = true;
|
|
496
|
+
}
|
|
497
|
+
this._mcps = internals.map((mcp) => this.toInternalEntry(mcp));
|
|
492
498
|
try {
|
|
493
499
|
const response = await (0, import_mcp_servers.listAllMcpServersByUser)({ currentUser: this.currentUser });
|
|
494
|
-
const reserved = new Set(
|
|
500
|
+
const reserved = new Set(internals.map((mcp) => mcp.name));
|
|
495
501
|
const stored = response.items.filter((props) => {
|
|
496
502
|
if (!reserved.has(props.name)) return true;
|
|
497
503
|
this.logger.error({ mcpServer: props.name }, "[AGENT] A server of the user was ignored because its name belongs to an internal MCP");
|
|
@@ -524,7 +530,7 @@ Ref: ${guard.ref}`, { source: "harness", excludeFromContext: true });
|
|
|
524
530
|
const headers = { ...mcp.headers };
|
|
525
531
|
if (!Object.values(headers).some((value) => value.includes(TOKEN_PLACEHOLDER))) return headers;
|
|
526
532
|
const own = this.mcpTokens[mcp.name];
|
|
527
|
-
const token = own || this.
|
|
533
|
+
const token = own || (this.executionMode === "autonomous" ? mcp.autonomousToken : void 0);
|
|
528
534
|
const userId = this.currentUser?.userId;
|
|
529
535
|
if (!token || !userId) return void 0;
|
|
530
536
|
for (const [name, value] of Object.entries(headers)) headers[name] = value.split(TOKEN_PLACEHOLDER).join(token);
|
|
@@ -534,9 +540,9 @@ Ref: ${guard.ref}`, { source: "harness", excludeFromContext: true });
|
|
|
534
540
|
}
|
|
535
541
|
return headers;
|
|
536
542
|
}
|
|
537
|
-
mask(error) {
|
|
543
|
+
mask(error, entry) {
|
|
538
544
|
let text = error instanceof Error ? error.message : String(error);
|
|
539
|
-
for (const secret of [...Object.values(this.mcpTokens),
|
|
545
|
+
for (const secret of [...Object.values(this.mcpTokens), ...Object.values(entry?.server.headers ?? {})]) if (secret) text = text.split(secret).join("***");
|
|
540
546
|
return text;
|
|
541
547
|
}
|
|
542
548
|
mcpIndex() {
|
|
@@ -582,7 +588,7 @@ Ref: ${guard.ref}`, { source: "harness", excludeFromContext: true });
|
|
|
582
588
|
await this.reviewMcp(entry, manifest);
|
|
583
589
|
return;
|
|
584
590
|
} catch (error) {
|
|
585
|
-
this.logger.error({ error: entry.internal ? this.mask(error) : error, mcpServer: entry.name, attempt: attempt + 1 }, "[AGENT] Failed to connect MCP server");
|
|
591
|
+
this.logger.error({ error: entry.internal ? this.mask(error, entry) : error, mcpServer: entry.name, attempt: attempt + 1 }, "[AGENT] Failed to connect MCP server");
|
|
586
592
|
await Promise.resolve().then(() => entry.server.disconnect()).catch(() => void 0);
|
|
587
593
|
const delay = MCP_CONNECT_RETRY_DELAYS_MS[attempt];
|
|
588
594
|
if (delay === void 0) break;
|
package/dist/harness/agent.mjs
CHANGED
|
@@ -21,6 +21,7 @@ import { approvalRequest, confirmationGate, mcpChangeReview, autonomousAnswer }
|
|
|
21
21
|
import { inputCheck } from "../guardrails/input/input-check.js";
|
|
22
22
|
import { createBlockInputOversize } from "../guardrails/input/create-block-input-oversize.js";
|
|
23
23
|
import { listAllMcpServersByUser, verifyMcpServerConnection, decideMcpServerTrust } from "../services/mcp-servers/index.js";
|
|
24
|
+
import { listActiveInternalMcps } from "../services/mcp-servers/internal.js";
|
|
24
25
|
import { rankToolsByKeywords } from "./utils/rank-tools-by-keywords";
|
|
25
26
|
import { AgentStatus } from "./agent-state";
|
|
26
27
|
import { AgentWorkspace } from "./workspace";
|
|
@@ -56,7 +57,6 @@ class Agent {
|
|
|
56
57
|
_internalMcps = [];
|
|
57
58
|
_mcps = [];
|
|
58
59
|
mcpTokens = {};
|
|
59
|
-
serviceToken;
|
|
60
60
|
mcpListing;
|
|
61
61
|
mcpListingFailed = false;
|
|
62
62
|
_preHooks = [];
|
|
@@ -132,7 +132,7 @@ class Agent {
|
|
|
132
132
|
}
|
|
133
133
|
async run(props) {
|
|
134
134
|
try {
|
|
135
|
-
const { input, options, currentUser, currentSession, mcpTokens
|
|
135
|
+
const { input, options, currentUser, currentSession, mcpTokens } = props || {};
|
|
136
136
|
const { chatId, message } = input || {};
|
|
137
137
|
this.logger.debug(input, "[AGENT] Agent started");
|
|
138
138
|
if (!this._loop?.nodes || !this._loop?.initialNode) throw new Error("[AGENT] Loop is missing");
|
|
@@ -156,7 +156,6 @@ class Agent {
|
|
|
156
156
|
this.currentMessage = message;
|
|
157
157
|
this.chatOptions = options;
|
|
158
158
|
this.mcpTokens = mcpTokens ?? {};
|
|
159
|
-
this.serviceToken = serviceToken;
|
|
160
159
|
this.model = void 0;
|
|
161
160
|
this.thinkingEffort = void 0;
|
|
162
161
|
if (options?.thinkingEffort !== void 0 && !isSelectableThinkingEffort(options.thinkingEffort)) throw new Error(`[AGENT] thinkingEffort must be one of ${SELECTABLE_THINKING_EFFORTS.join(", ")}`);
|
|
@@ -472,10 +471,17 @@ Ref: ${guard.ref}`, { source: "harness", excludeFromContext: true });
|
|
|
472
471
|
}
|
|
473
472
|
async listMcps() {
|
|
474
473
|
if (!this.currentUser) return;
|
|
475
|
-
|
|
474
|
+
const internals = [...this._internalMcps];
|
|
475
|
+
try {
|
|
476
|
+
for (const mcp of await listActiveInternalMcps()) if (!internals.some((candidate) => candidate.name === mcp.name)) internals.push(mcp);
|
|
477
|
+
} catch (error) {
|
|
478
|
+
this.logger.error({ error: error?.message ?? error }, "[AGENT] Failed to list the internal MCP servers");
|
|
479
|
+
this.mcpListingFailed = true;
|
|
480
|
+
}
|
|
481
|
+
this._mcps = internals.map((mcp) => this.toInternalEntry(mcp));
|
|
476
482
|
try {
|
|
477
483
|
const response = await listAllMcpServersByUser({ currentUser: this.currentUser });
|
|
478
|
-
const reserved = new Set(
|
|
484
|
+
const reserved = new Set(internals.map((mcp) => mcp.name));
|
|
479
485
|
const stored = response.items.filter((props) => {
|
|
480
486
|
if (!reserved.has(props.name)) return true;
|
|
481
487
|
this.logger.error({ mcpServer: props.name }, "[AGENT] A server of the user was ignored because its name belongs to an internal MCP");
|
|
@@ -508,7 +514,7 @@ Ref: ${guard.ref}`, { source: "harness", excludeFromContext: true });
|
|
|
508
514
|
const headers = { ...mcp.headers };
|
|
509
515
|
if (!Object.values(headers).some((value) => value.includes(TOKEN_PLACEHOLDER))) return headers;
|
|
510
516
|
const own = this.mcpTokens[mcp.name];
|
|
511
|
-
const token = own || this.
|
|
517
|
+
const token = own || (this.executionMode === "autonomous" ? mcp.autonomousToken : void 0);
|
|
512
518
|
const userId = this.currentUser?.userId;
|
|
513
519
|
if (!token || !userId) return void 0;
|
|
514
520
|
for (const [name, value] of Object.entries(headers)) headers[name] = value.split(TOKEN_PLACEHOLDER).join(token);
|
|
@@ -518,9 +524,9 @@ Ref: ${guard.ref}`, { source: "harness", excludeFromContext: true });
|
|
|
518
524
|
}
|
|
519
525
|
return headers;
|
|
520
526
|
}
|
|
521
|
-
mask(error) {
|
|
527
|
+
mask(error, entry) {
|
|
522
528
|
let text = error instanceof Error ? error.message : String(error);
|
|
523
|
-
for (const secret of [...Object.values(this.mcpTokens),
|
|
529
|
+
for (const secret of [...Object.values(this.mcpTokens), ...Object.values(entry?.server.headers ?? {})]) if (secret) text = text.split(secret).join("***");
|
|
524
530
|
return text;
|
|
525
531
|
}
|
|
526
532
|
mcpIndex() {
|
|
@@ -566,7 +572,7 @@ Ref: ${guard.ref}`, { source: "harness", excludeFromContext: true });
|
|
|
566
572
|
await this.reviewMcp(entry, manifest);
|
|
567
573
|
return;
|
|
568
574
|
} catch (error) {
|
|
569
|
-
this.logger.error({ error: entry.internal ? this.mask(error) : error, mcpServer: entry.name, attempt: attempt + 1 }, "[AGENT] Failed to connect MCP server");
|
|
575
|
+
this.logger.error({ error: entry.internal ? this.mask(error, entry) : error, mcpServer: entry.name, attempt: attempt + 1 }, "[AGENT] Failed to connect MCP server");
|
|
570
576
|
await Promise.resolve().then(() => entry.server.disconnect()).catch(() => void 0);
|
|
571
577
|
const delay = MCP_CONNECT_RETRY_DELAYS_MS[attempt];
|
|
572
578
|
if (delay === void 0) break;
|
|
@@ -25,7 +25,6 @@ module.exports = __toCommonJS(automation_runner_exports);
|
|
|
25
25
|
var import_node_crypto = require("node:crypto");
|
|
26
26
|
var import_node_os = require("node:os");
|
|
27
27
|
var import_logger = require("../../../common/logger/index.js");
|
|
28
|
-
var import_secret_manager = require("../../../common/utils/secret-manager.js");
|
|
29
28
|
var import_base = require("../../../common/base/index.js");
|
|
30
29
|
var import_agent = require("../../../harness/agent.js");
|
|
31
30
|
var import_loop = require("../../../loops/agi/loop.js");
|
|
@@ -161,8 +160,7 @@ class AutomationRunner {
|
|
|
161
160
|
input: { message: (0, import_event_message.buildMessage)(automation.instructions, run.payload), chatId },
|
|
162
161
|
options: { executionMode: "autonomous", ...model },
|
|
163
162
|
currentUser,
|
|
164
|
-
currentSession: import_base.CurrentSession.fromJSON({ location: { timezone: currentUser.preferences?.timezone?.ianaIdentifier } })
|
|
165
|
-
serviceToken: process.env.INTERNAL_MCP_TOKEN ? import_secret_manager.secretManager.get("INTERNAL_MCP_TOKEN") : void 0
|
|
163
|
+
currentSession: import_base.CurrentSession.fromJSON({ location: { timezone: currentUser.preferences?.timezone?.ianaIdentifier } })
|
|
166
164
|
});
|
|
167
165
|
const chat = result.data;
|
|
168
166
|
const state = chat?.state;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { randomBytes } from "node:crypto";
|
|
2
2
|
import { hostname } from "node:os";
|
|
3
3
|
import { Logger } from "../../../common/logger/index.js";
|
|
4
|
-
import { secretManager } from "../../../common/utils/secret-manager.js";
|
|
5
4
|
import { CurrentUser, CurrentSession } from "../../../common/base/index.js";
|
|
6
5
|
import { Agent } from "../../../harness/agent.js";
|
|
7
6
|
import { AgiLoop } from "../../../loops/agi/loop.js";
|
|
@@ -137,8 +136,7 @@ class AutomationRunner {
|
|
|
137
136
|
input: { message: buildMessage(automation.instructions, run.payload), chatId },
|
|
138
137
|
options: { executionMode: "autonomous", ...model },
|
|
139
138
|
currentUser,
|
|
140
|
-
currentSession: CurrentSession.fromJSON({ location: { timezone: currentUser.preferences?.timezone?.ianaIdentifier } })
|
|
141
|
-
serviceToken: process.env.INTERNAL_MCP_TOKEN ? secretManager.get("INTERNAL_MCP_TOKEN") : void 0
|
|
139
|
+
currentSession: CurrentSession.fromJSON({ location: { timezone: currentUser.preferences?.timezone?.ianaIdentifier } })
|
|
142
140
|
});
|
|
143
141
|
const chat = result.data;
|
|
144
142
|
const state = chat?.state;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './module';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var admin_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(admin_exports);
|
|
18
|
+
__reExport(admin_exports, require("./module"), module.exports);
|
|
19
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
20
|
+
0 && (module.exports = {
|
|
21
|
+
...require("./module")
|
|
22
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./module";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Params as CParams, Output as COutput } from './use-cases/create-internal-mcp.use-case';
|
|
2
|
+
import { Params as UParams, Output as UOutput } from './use-cases/update-internal-mcp.use-case';
|
|
3
|
+
import { Params as GParams, Output as GOutput } from './use-cases/get-internal-mcp-by-id.use-case';
|
|
4
|
+
import { Params as LParams, Output as LOutput } from './use-cases/list-internal-mcps.use-case';
|
|
5
|
+
import { Params as DParams, Output as DOutput } from './use-cases/delete-internal-mcp.use-case';
|
|
6
|
+
export declare function createInternalMcp(props: CParams): Promise<COutput>;
|
|
7
|
+
export declare function updateInternalMcp(props: UParams): Promise<UOutput>;
|
|
8
|
+
export declare function getInternalMcpById(props: GParams): Promise<GOutput>;
|
|
9
|
+
export declare function listInternalMcps(props: LParams): Promise<LOutput>;
|
|
10
|
+
export declare function deleteInternalMcp(props: DParams): Promise<DOutput>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var module_exports = {};
|
|
20
|
+
__export(module_exports, {
|
|
21
|
+
createInternalMcp: () => createInternalMcp,
|
|
22
|
+
deleteInternalMcp: () => deleteInternalMcp,
|
|
23
|
+
getInternalMcpById: () => getInternalMcpById,
|
|
24
|
+
listInternalMcps: () => listInternalMcps,
|
|
25
|
+
updateInternalMcp: () => updateInternalMcp
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(module_exports);
|
|
28
|
+
var import_create_internal_mcp = require("./use-cases/create-internal-mcp.use-case");
|
|
29
|
+
var import_update_internal_mcp = require("./use-cases/update-internal-mcp.use-case");
|
|
30
|
+
var import_get_internal_mcp_by_id = require("./use-cases/get-internal-mcp-by-id.use-case");
|
|
31
|
+
var import_list_internal_mcps = require("./use-cases/list-internal-mcps.use-case");
|
|
32
|
+
var import_delete_internal_mcp = require("./use-cases/delete-internal-mcp.use-case");
|
|
33
|
+
async function createInternalMcp(props) {
|
|
34
|
+
return new import_create_internal_mcp.CreateInternalMcpUseCase().execute(props);
|
|
35
|
+
}
|
|
36
|
+
async function updateInternalMcp(props) {
|
|
37
|
+
return new import_update_internal_mcp.UpdateInternalMcpUseCase().execute(props);
|
|
38
|
+
}
|
|
39
|
+
async function getInternalMcpById(props) {
|
|
40
|
+
return new import_get_internal_mcp_by_id.GetInternalMcpByIdUseCase().execute(props);
|
|
41
|
+
}
|
|
42
|
+
async function listInternalMcps(props) {
|
|
43
|
+
return new import_list_internal_mcps.ListInternalMcpsUseCase().execute(props);
|
|
44
|
+
}
|
|
45
|
+
async function deleteInternalMcp(props) {
|
|
46
|
+
return new import_delete_internal_mcp.DeleteInternalMcpUseCase().execute(props);
|
|
47
|
+
}
|
|
48
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
+
0 && (module.exports = {
|
|
50
|
+
createInternalMcp,
|
|
51
|
+
deleteInternalMcp,
|
|
52
|
+
getInternalMcpById,
|
|
53
|
+
listInternalMcps,
|
|
54
|
+
updateInternalMcp
|
|
55
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CreateInternalMcpUseCase } from "./use-cases/create-internal-mcp.use-case";
|
|
2
|
+
import { UpdateInternalMcpUseCase } from "./use-cases/update-internal-mcp.use-case";
|
|
3
|
+
import { GetInternalMcpByIdUseCase } from "./use-cases/get-internal-mcp-by-id.use-case";
|
|
4
|
+
import { ListInternalMcpsUseCase } from "./use-cases/list-internal-mcps.use-case";
|
|
5
|
+
import { DeleteInternalMcpUseCase } from "./use-cases/delete-internal-mcp.use-case";
|
|
6
|
+
async function createInternalMcp(props) {
|
|
7
|
+
return new CreateInternalMcpUseCase().execute(props);
|
|
8
|
+
}
|
|
9
|
+
async function updateInternalMcp(props) {
|
|
10
|
+
return new UpdateInternalMcpUseCase().execute(props);
|
|
11
|
+
}
|
|
12
|
+
async function getInternalMcpById(props) {
|
|
13
|
+
return new GetInternalMcpByIdUseCase().execute(props);
|
|
14
|
+
}
|
|
15
|
+
async function listInternalMcps(props) {
|
|
16
|
+
return new ListInternalMcpsUseCase().execute(props);
|
|
17
|
+
}
|
|
18
|
+
async function deleteInternalMcp(props) {
|
|
19
|
+
return new DeleteInternalMcpUseCase().execute(props);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
createInternalMcp,
|
|
23
|
+
deleteInternalMcp,
|
|
24
|
+
getInternalMcpById,
|
|
25
|
+
listInternalMcps,
|
|
26
|
+
updateInternalMcp
|
|
27
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseUseCase, BaseUseCaseParams } from '../../../../common/base/base.use-case.js';
|
|
2
|
+
import { McpServerProps } from '../../entities';
|
|
3
|
+
import { McpServerRepository } from '../../repositories';
|
|
4
|
+
export interface Params extends BaseUseCaseParams {
|
|
5
|
+
payload?: Pick<McpServerProps, 'name' | 'url' | 'headers' | 'enabled' | 'environment' | 'autonomousToken'>;
|
|
6
|
+
}
|
|
7
|
+
export type Output = McpServerProps;
|
|
8
|
+
export declare class CreateInternalMcpUseCase extends BaseUseCase<Params, Output> {
|
|
9
|
+
private readonly mcpServerRepository;
|
|
10
|
+
constructor(mcpServerRepository?: McpServerRepository);
|
|
11
|
+
execute(params: Params): Promise<Output>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var create_internal_mcp_use_case_exports = {};
|
|
20
|
+
__export(create_internal_mcp_use_case_exports, {
|
|
21
|
+
CreateInternalMcpUseCase: () => CreateInternalMcpUseCase
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(create_internal_mcp_use_case_exports);
|
|
24
|
+
var import_base = require("../../../../common/base/base.use-case.js");
|
|
25
|
+
var import_repositories = require("../../../../common/repositories/index.js");
|
|
26
|
+
var import_entities = require("../../entities");
|
|
27
|
+
var import_repositories2 = require("../../repositories");
|
|
28
|
+
class CreateInternalMcpUseCase extends import_base.BaseUseCase {
|
|
29
|
+
constructor(mcpServerRepository = new import_repositories2.McpServerRepository()) {
|
|
30
|
+
super();
|
|
31
|
+
this.mcpServerRepository = mcpServerRepository;
|
|
32
|
+
}
|
|
33
|
+
mcpServerRepository;
|
|
34
|
+
async execute(params) {
|
|
35
|
+
const { payload, currentUser } = params;
|
|
36
|
+
const scope = params.scope ?? import_repositories.Scope.asAdmin(currentUser);
|
|
37
|
+
if (!payload?.name || !payload?.url) this.throwHttpError({ statusCode: 400, errorMessage: "An internal MCP needs a name and a url" });
|
|
38
|
+
if (await this.mcpServerRepository.findInternalByName(payload.name, scope)) {
|
|
39
|
+
this.throwHttpError({ statusCode: 409, errorMessage: `There is already an internal MCP named "${payload.name}"` });
|
|
40
|
+
}
|
|
41
|
+
const { name, url, headers, enabled, environment, autonomousToken } = payload;
|
|
42
|
+
const mcpServer = import_entities.McpServer.fromJSON({ name, url, headers, enabled, environment, autonomousToken, type: "http" }).initializeInternal();
|
|
43
|
+
await this.mcpServerRepository.create(mcpServer, scope);
|
|
44
|
+
return mcpServer.toJSON();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
CreateInternalMcpUseCase
|
|
50
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseUseCase } from "../../../../common/base/base.use-case.js";
|
|
2
|
+
import { Scope } from "../../../../common/repositories/index.js";
|
|
3
|
+
import { McpServer } from "../../entities";
|
|
4
|
+
import { McpServerRepository } from "../../repositories";
|
|
5
|
+
class CreateInternalMcpUseCase extends BaseUseCase {
|
|
6
|
+
constructor(mcpServerRepository = new McpServerRepository()) {
|
|
7
|
+
super();
|
|
8
|
+
this.mcpServerRepository = mcpServerRepository;
|
|
9
|
+
}
|
|
10
|
+
mcpServerRepository;
|
|
11
|
+
async execute(params) {
|
|
12
|
+
const { payload, currentUser } = params;
|
|
13
|
+
const scope = params.scope ?? Scope.asAdmin(currentUser);
|
|
14
|
+
if (!payload?.name || !payload?.url) this.throwHttpError({ statusCode: 400, errorMessage: "An internal MCP needs a name and a url" });
|
|
15
|
+
if (await this.mcpServerRepository.findInternalByName(payload.name, scope)) {
|
|
16
|
+
this.throwHttpError({ statusCode: 409, errorMessage: `There is already an internal MCP named "${payload.name}"` });
|
|
17
|
+
}
|
|
18
|
+
const { name, url, headers, enabled, environment, autonomousToken } = payload;
|
|
19
|
+
const mcpServer = McpServer.fromJSON({ name, url, headers, enabled, environment, autonomousToken, type: "http" }).initializeInternal();
|
|
20
|
+
await this.mcpServerRepository.create(mcpServer, scope);
|
|
21
|
+
return mcpServer.toJSON();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
CreateInternalMcpUseCase
|
|
26
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseUseCase, BaseUseCaseParams } from '../../../../common/base/base.use-case.js';
|
|
2
|
+
import { McpServerRepository } from '../../repositories';
|
|
3
|
+
export interface Params extends BaseUseCaseParams {
|
|
4
|
+
id: string;
|
|
5
|
+
}
|
|
6
|
+
export interface Output {
|
|
7
|
+
deletedCount: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class DeleteInternalMcpUseCase extends BaseUseCase<Params, Output> {
|
|
10
|
+
private readonly mcpServerRepository;
|
|
11
|
+
constructor(mcpServerRepository?: McpServerRepository);
|
|
12
|
+
execute(params: Params): Promise<Output>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var delete_internal_mcp_use_case_exports = {};
|
|
20
|
+
__export(delete_internal_mcp_use_case_exports, {
|
|
21
|
+
DeleteInternalMcpUseCase: () => DeleteInternalMcpUseCase
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(delete_internal_mcp_use_case_exports);
|
|
24
|
+
var import_base = require("../../../../common/base/base.use-case.js");
|
|
25
|
+
var import_repositories = require("../../../../common/repositories/index.js");
|
|
26
|
+
var import_repositories2 = require("../../repositories");
|
|
27
|
+
class DeleteInternalMcpUseCase extends import_base.BaseUseCase {
|
|
28
|
+
constructor(mcpServerRepository = new import_repositories2.McpServerRepository()) {
|
|
29
|
+
super();
|
|
30
|
+
this.mcpServerRepository = mcpServerRepository;
|
|
31
|
+
}
|
|
32
|
+
mcpServerRepository;
|
|
33
|
+
async execute(params) {
|
|
34
|
+
const { id, currentUser } = params;
|
|
35
|
+
if (!id) throw new Error("Missing id");
|
|
36
|
+
const deletedCount = await this.mcpServerRepository.deleteInternalById(id, params.scope ?? import_repositories.Scope.asAdmin(currentUser));
|
|
37
|
+
if (!deletedCount) this.throwHttpError({ statusCode: 404, errorMessage: "{{resource_not_found}}" });
|
|
38
|
+
return { deletedCount };
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
DeleteInternalMcpUseCase
|
|
44
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseUseCase } from "../../../../common/base/base.use-case.js";
|
|
2
|
+
import { Scope } from "../../../../common/repositories/index.js";
|
|
3
|
+
import { McpServerRepository } from "../../repositories";
|
|
4
|
+
class DeleteInternalMcpUseCase extends BaseUseCase {
|
|
5
|
+
constructor(mcpServerRepository = new McpServerRepository()) {
|
|
6
|
+
super();
|
|
7
|
+
this.mcpServerRepository = mcpServerRepository;
|
|
8
|
+
}
|
|
9
|
+
mcpServerRepository;
|
|
10
|
+
async execute(params) {
|
|
11
|
+
const { id, currentUser } = params;
|
|
12
|
+
if (!id) throw new Error("Missing id");
|
|
13
|
+
const deletedCount = await this.mcpServerRepository.deleteInternalById(id, params.scope ?? Scope.asAdmin(currentUser));
|
|
14
|
+
if (!deletedCount) this.throwHttpError({ statusCode: 404, errorMessage: "{{resource_not_found}}" });
|
|
15
|
+
return { deletedCount };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
DeleteInternalMcpUseCase
|
|
20
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseUseCase, BaseUseCaseParams } from '../../../../common/base/base.use-case.js';
|
|
2
|
+
import { McpServerProps } from '../../entities';
|
|
3
|
+
import { McpServerRepository } from '../../repositories';
|
|
4
|
+
export interface Params extends BaseUseCaseParams {
|
|
5
|
+
id: string;
|
|
6
|
+
}
|
|
7
|
+
export type Output = McpServerProps | null;
|
|
8
|
+
export declare class GetInternalMcpByIdUseCase extends BaseUseCase<Params, Output> {
|
|
9
|
+
private readonly mcpServerRepository;
|
|
10
|
+
constructor(mcpServerRepository?: McpServerRepository);
|
|
11
|
+
execute(params: Params): Promise<Output>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var get_internal_mcp_by_id_use_case_exports = {};
|
|
20
|
+
__export(get_internal_mcp_by_id_use_case_exports, {
|
|
21
|
+
GetInternalMcpByIdUseCase: () => GetInternalMcpByIdUseCase
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(get_internal_mcp_by_id_use_case_exports);
|
|
24
|
+
var import_base = require("../../../../common/base/base.use-case.js");
|
|
25
|
+
var import_repositories = require("../../../../common/repositories/index.js");
|
|
26
|
+
var import_repositories2 = require("../../repositories");
|
|
27
|
+
class GetInternalMcpByIdUseCase extends import_base.BaseUseCase {
|
|
28
|
+
constructor(mcpServerRepository = new import_repositories2.McpServerRepository()) {
|
|
29
|
+
super();
|
|
30
|
+
this.mcpServerRepository = mcpServerRepository;
|
|
31
|
+
}
|
|
32
|
+
mcpServerRepository;
|
|
33
|
+
async execute(params) {
|
|
34
|
+
const { id, currentUser } = params;
|
|
35
|
+
return await this.mcpServerRepository.findInternalById(id, params.scope ?? import_repositories.Scope.asAdmin(currentUser));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
GetInternalMcpByIdUseCase
|
|
41
|
+
});
|