@agentica/core 0.19.1 → 0.20.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.
Files changed (43) hide show
  1. package/lib/context/AgenticaOperation.d.ts +3 -4
  2. package/lib/context/internal/AgenticaOperationComposer.js +8 -1
  3. package/lib/context/internal/AgenticaOperationComposer.js.map +1 -1
  4. package/lib/context/internal/AgenticaOperationComposer.spec.js +39 -10
  5. package/lib/context/internal/AgenticaOperationComposer.spec.js.map +1 -1
  6. package/lib/functional/assertHttpLlmApplication.js +168 -168
  7. package/lib/functional/assertMcpController.d.ts +24 -0
  8. package/lib/functional/assertMcpController.js +1701 -0
  9. package/lib/functional/assertMcpController.js.map +1 -0
  10. package/lib/functional/validateHttpLlmApplication.js +148 -148
  11. package/lib/index.d.ts +1 -1
  12. package/lib/index.js +1 -1
  13. package/lib/index.js.map +1 -1
  14. package/lib/index.mjs +1993 -402
  15. package/lib/index.mjs.map +1 -1
  16. package/lib/orchestrate/call.js +11 -1
  17. package/lib/orchestrate/call.js.map +1 -1
  18. package/lib/orchestrate/initialize.js +60 -60
  19. package/lib/structures/IAgenticaController.d.ts +8 -4
  20. package/lib/structures/mcp/index.d.ts +0 -2
  21. package/lib/structures/mcp/index.js +0 -2
  22. package/lib/structures/mcp/index.js.map +1 -1
  23. package/package.json +3 -3
  24. package/src/context/AgenticaOperation.ts +5 -6
  25. package/src/context/internal/AgenticaOperationComposer.spec.ts +45 -14
  26. package/src/context/internal/AgenticaOperationComposer.ts +10 -2
  27. package/src/functional/assertMcpController.ts +49 -0
  28. package/src/index.ts +1 -1
  29. package/src/orchestrate/call.ts +14 -4
  30. package/src/structures/IAgenticaController.ts +9 -4
  31. package/src/structures/mcp/index.ts +0 -2
  32. package/lib/functional/assertMcpLlmApplication.d.ts +0 -18
  33. package/lib/functional/assertMcpLlmApplication.js +0 -74
  34. package/lib/functional/assertMcpLlmApplication.js.map +0 -1
  35. package/lib/structures/mcp/IMcpLlmApplication.d.ts +0 -9
  36. package/lib/structures/mcp/IMcpLlmApplication.js +0 -3
  37. package/lib/structures/mcp/IMcpLlmApplication.js.map +0 -1
  38. package/lib/structures/mcp/IMcpLlmFunction.d.ts +0 -17
  39. package/lib/structures/mcp/IMcpLlmFunction.js +0 -3
  40. package/lib/structures/mcp/IMcpLlmFunction.js.map +0 -1
  41. package/src/functional/assertMcpLlmApplication.ts +0 -32
  42. package/src/structures/mcp/IMcpLlmApplication.ts +0 -10
  43. package/src/structures/mcp/IMcpLlmFunction.ts +0 -19
@@ -1,74 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
- Object.defineProperty(exports, "__esModule", { value: true });
45
- exports.assertMcpLlmApplication = assertMcpLlmApplication;
46
- /**
47
- * Create an MCP LLM application instance with type assertion.
48
- *
49
- * Create an {@link IMcpLlmApplication} instance which represents
50
- * an MCP (Model Context Protocol) LLM application.
51
- *
52
- * @param props Properties to create the MCP LLM application instance
53
- * @param props.name Name of the MCP implementation.
54
- * @param props.url URL of the MCP server.
55
- * @param props.version Describes version of an MCP implementation.
56
- * @returns MCP LLM application instance
57
- * @author Samchon
58
- */
59
- function assertMcpLlmApplication(props) {
60
- return __awaiter(this, void 0, void 0, function* () {
61
- // for peerDependencies
62
- const { ListToolsResultSchema } = yield Promise.resolve().then(() => __importStar(require("@modelcontextprotocol/sdk/types.js")));
63
- const toolList = yield props.client.request({ method: "tools/list" }, ListToolsResultSchema);
64
- return {
65
- functions: toolList.tools.map(tool => ({
66
- name: tool.name,
67
- description: tool.description,
68
- parameters: tool.inputSchema,
69
- })),
70
- client: props.client,
71
- };
72
- });
73
- }
74
- //# sourceMappingURL=assertMcpLlmApplication.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assertMcpLlmApplication.js","sourceRoot":"","sources":["../../src/functional/assertMcpLlmApplication.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,0DAeC;AA5BD;;;;;;;;;;;;GAYG;AACH,SAAsB,uBAAuB,CAAC,KAE7C;;QACC,uBAAuB;QACvB,MAAM,EAAE,qBAAqB,EAAE,GAAG,wDAAa,oCAAoC,GAAC,CAAC;QAErF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,qBAAqB,CAAC,CAAC;QAC7F,OAAO;YACL,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACrC,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,UAAU,EAAE,IAAI,CAAC,WAAW;aAC7B,CAAC,CAAC;YACH,MAAM,EAAE,KAAK,CAAC,MAAM;SACrB,CAAC;IACJ,CAAC;CAAA"}
@@ -1,9 +0,0 @@
1
- import type { Client } from "@modelcontextprotocol/sdk/client/index.d.ts";
2
- import type { IMcpLlmFunction } from "./IMcpLlmFunction";
3
- /**
4
- * MCP LLM application.
5
- */
6
- export interface IMcpLlmApplication {
7
- client: Client;
8
- functions: IMcpLlmFunction[];
9
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IMcpLlmApplication.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IMcpLlmApplication.js","sourceRoot":"","sources":["../../../src/structures/mcp/IMcpLlmApplication.ts"],"names":[],"mappings":""}
@@ -1,17 +0,0 @@
1
- /**
2
- * MCP LLM function.
3
- */
4
- export interface IMcpLlmFunction {
5
- /**
6
- * Name of the function.
7
- */
8
- name: string;
9
- /**
10
- * Description of the function.
11
- */
12
- description?: string;
13
- /**
14
- * Parameters of the function.
15
- */
16
- parameters: object;
17
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IMcpLlmFunction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IMcpLlmFunction.js","sourceRoot":"","sources":["../../../src/structures/mcp/IMcpLlmFunction.ts"],"names":[],"mappings":""}
@@ -1,32 +0,0 @@
1
- import type { Client } from "@modelcontextprotocol/sdk/client/index.d.ts";
2
-
3
- import type { IMcpLlmApplication } from "../structures/mcp";
4
- /**
5
- * Create an MCP LLM application instance with type assertion.
6
- *
7
- * Create an {@link IMcpLlmApplication} instance which represents
8
- * an MCP (Model Context Protocol) LLM application.
9
- *
10
- * @param props Properties to create the MCP LLM application instance
11
- * @param props.name Name of the MCP implementation.
12
- * @param props.url URL of the MCP server.
13
- * @param props.version Describes version of an MCP implementation.
14
- * @returns MCP LLM application instance
15
- * @author Samchon
16
- */
17
- export async function assertMcpLlmApplication(props: {
18
- client: Client;
19
- }): Promise<IMcpLlmApplication> {
20
- // for peerDependencies
21
- const { ListToolsResultSchema } = await import("@modelcontextprotocol/sdk/types.js");
22
-
23
- const toolList = await props.client.request({ method: "tools/list" }, ListToolsResultSchema);
24
- return {
25
- functions: toolList.tools.map(tool => ({
26
- name: tool.name,
27
- description: tool.description,
28
- parameters: tool.inputSchema,
29
- })),
30
- client: props.client,
31
- };
32
- }
@@ -1,10 +0,0 @@
1
- import type { Client } from "@modelcontextprotocol/sdk/client/index.d.ts";
2
-
3
- import type { IMcpLlmFunction } from "./IMcpLlmFunction";
4
- /**
5
- * MCP LLM application.
6
- */
7
- export interface IMcpLlmApplication {
8
- client: Client;
9
- functions: IMcpLlmFunction[];
10
- }
@@ -1,19 +0,0 @@
1
- /**
2
- * MCP LLM function.
3
- */
4
- export interface IMcpLlmFunction {
5
- /**
6
- * Name of the function.
7
- */
8
- name: string;
9
-
10
- /**
11
- * Description of the function.
12
- */
13
- description?: string;
14
-
15
- /**
16
- * Parameters of the function.
17
- */
18
- parameters: object;
19
- }