agentica 0.1.0 → 0.12.5

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 (53) hide show
  1. package/README.md +67 -67
  2. package/bin/bases/Connector.d.ts +9 -0
  3. package/bin/bases/Connector.js +67 -0
  4. package/bin/bases/Connector.js.map +1 -0
  5. package/bin/bases/Package.d.ts +11 -0
  6. package/bin/bases/Package.js +74 -0
  7. package/bin/bases/Package.js.map +1 -0
  8. package/bin/bases/Tsconfig.d.ts +5 -0
  9. package/bin/bases/Tsconfig.js +135 -0
  10. package/bin/bases/Tsconfig.js.map +1 -0
  11. package/bin/executable/AgenticaStart.d.ts +7 -0
  12. package/bin/executable/AgenticaStart.js +324 -0
  13. package/bin/executable/AgenticaStart.js.map +1 -0
  14. package/bin/index.js +24 -43
  15. package/bin/index.js.map +1 -1
  16. package/bin/structures/IAgenticaStart.d.ts +31 -0
  17. package/bin/structures/IAgenticaStart.js +3 -0
  18. package/bin/structures/IAgenticaStart.js.map +1 -0
  19. package/bin/structures/IAgenticaStartOption.d.ts +13 -0
  20. package/bin/structures/IAgenticaStartOption.js +3 -0
  21. package/bin/structures/IAgenticaStartOption.js.map +1 -0
  22. package/bin/utils/capitalize.d.ts +1 -0
  23. package/bin/utils/capitalize.js +12 -0
  24. package/bin/utils/capitalize.js.map +1 -0
  25. package/bin/utils/createProjectDirectory.d.ts +3 -0
  26. package/bin/utils/createProjectDirectory.js +16 -0
  27. package/bin/utils/createProjectDirectory.js.map +1 -0
  28. package/bin/utils/getNpmPackages.d.ts +14 -0
  29. package/bin/utils/getNpmPackages.js +147 -0
  30. package/bin/utils/getNpmPackages.js.map +1 -0
  31. package/bin/utils/getQuestions.d.ts +8 -0
  32. package/bin/utils/getQuestions.js +45 -0
  33. package/bin/utils/getQuestions.js.map +1 -0
  34. package/bin/utils/types/PackageManager.d.ts +1 -0
  35. package/bin/utils/types/PackageManager.js +3 -0
  36. package/bin/utils/types/PackageManager.js.map +1 -0
  37. package/bin/utils/types/ProjectOption.d.ts +4 -0
  38. package/bin/utils/types/ProjectOption.js +3 -0
  39. package/bin/utils/types/ProjectOption.js.map +1 -0
  40. package/package.json +10 -3
  41. package/src/bases/Connector.ts +80 -0
  42. package/src/bases/Package.ts +75 -0
  43. package/src/bases/Tsconfig.ts +122 -0
  44. package/src/executable/AgenticaStart.ts +302 -0
  45. package/src/index.ts +39 -60
  46. package/src/structures/IAgenticaStart.ts +35 -0
  47. package/src/structures/IAgenticaStartOption.ts +13 -0
  48. package/src/utils/capitalize.ts +7 -0
  49. package/src/utils/createProjectDirectory.ts +14 -0
  50. package/src/utils/getNpmPackages.ts +46 -0
  51. package/src/utils/getQuestions.ts +48 -0
  52. package/src/utils/types/PackageManager.ts +1 -0
  53. package/src/utils/types/ProjectOption.ts +4 -0
package/README.md CHANGED
@@ -1,67 +1,67 @@
1
- # Agentica CLI Tool
2
- ```bash
3
- npx agentica start <directory>
4
- npx agentica backend <directory>
5
- npx agentica client <directory>
6
- ```
7
-
8
- [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/wrtnlabs/agentica/blob/master/LICENSE)
9
- [![npm version](https://img.shields.io/npm/v/agentica.svg)](https://www.npmjs.com/package/agentica)
10
- [![Downloads](https://img.shields.io/npm/dm/agentica.svg)](https://www.npmjs.com/package/agentica)
11
- [![Build Status](https://github.com/wrtnlabs/agentica/workflows/build/badge.svg)](https://github.com/wrtnlabs/agentica/actions?query=workflow%3Abuild)
12
-
13
- Agentica CLI Tool cloning boilerplate project.
14
-
15
- - `start`: a frontend application creating agent in browser
16
- - `backend`: backend application serving the agent through websocket protocol
17
- - `client`: frontend application connecting to above websocket server
18
-
19
-
20
-
21
-
22
- ## Introduction
23
- ![agentica-conceptual-diagram](https://github.com/user-attachments/assets/d7ebbd1f-04d3-4b0d-9e2a-234e29dd6c57)
24
-
25
- ```typescript
26
- import { Agentica } from "@agentica/core";
27
- import typia from "typia";
28
-
29
- const agent = new Agentica({
30
- controllers: [
31
- await fetch(
32
- "https://shopping-be.wrtn.ai/editor/swagger.json",
33
- ).then(r => r.json()),
34
- typia.llm.application<ShoppingCounselor>(),
35
- typia.llm.application<ShoppingPolicy>(),
36
- typia.llm.application<ShoppingSearchRag>(),
37
- ],
38
- });
39
- await agent.conversate("I wanna buy MacBook Pro");
40
- ```
41
-
42
- The simplest **Agentic AI** library, specialized in **LLM Function Calling**.
43
-
44
- Don't compose complicate agent graph or workflow, but just deliver **Swagger/OpenAPI** documents or **TypeScript class** types linearly to the `@agentica`. Then `@agentica` will do everything with the function calling.
45
-
46
- Look at the below demonstration, and feel how `@agentica` is easy and powerful.
47
-
48
- ```typescript
49
- import { Agentica } from "@agentica/core";
50
- import typia from "typia";
51
-
52
- const agent = new Agentica({
53
- controllers: [
54
- await fetch(
55
- "https://shopping-be.wrtn.ai/editor/swagger.json",
56
- ).then(r => r.json()),
57
- typia.llm.application<ShoppingCounselor>(),
58
- typia.llm.application<ShoppingPolicy>(),
59
- typia.llm.application<ShoppingSearchRag>(),
60
- ],
61
- });
62
- await agent.conversate("I wanna buy MacBook Pro");
63
- ```
64
-
65
- > https://github.com/user-attachments/assets/01604b53-aca4-41cb-91aa-3faf63549ea6
66
- >
67
- > Demonstration video of Shopping AI Chatbot
1
+ # Agentica CLI Tool
2
+ ```bash
3
+ npx agentica start <directory>
4
+ npx agentica backend <directory>
5
+ npx agentica client <directory>
6
+ ```
7
+
8
+ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/wrtnlabs/agentica/blob/master/LICENSE)
9
+ [![npm version](https://img.shields.io/npm/v/agentica.svg)](https://www.npmjs.com/package/agentica)
10
+ [![Downloads](https://img.shields.io/npm/dm/agentica.svg)](https://www.npmjs.com/package/agentica)
11
+ [![Build Status](https://github.com/wrtnlabs/agentica/workflows/build/badge.svg)](https://github.com/wrtnlabs/agentica/actions?query=workflow%3Abuild)
12
+
13
+ Agentica CLI Tool cloning boilerplate project.
14
+
15
+ - `start`: a frontend application creating agent in browser
16
+ - `backend`: backend application serving the agent through websocket protocol
17
+ - `client`: frontend application connecting to above websocket server
18
+
19
+
20
+
21
+
22
+ ## Introduction
23
+ ![agentica-conceptual-diagram](https://github.com/user-attachments/assets/d7ebbd1f-04d3-4b0d-9e2a-234e29dd6c57)
24
+
25
+ ```typescript
26
+ import { Agentica } from "@agentica/core";
27
+ import typia from "typia";
28
+
29
+ const agent = new Agentica({
30
+ controllers: [
31
+ await fetch(
32
+ "https://shopping-be.wrtn.ai/editor/swagger.json",
33
+ ).then(r => r.json()),
34
+ typia.llm.application<ShoppingCounselor>(),
35
+ typia.llm.application<ShoppingPolicy>(),
36
+ typia.llm.application<ShoppingSearchRag>(),
37
+ ],
38
+ });
39
+ await agent.conversate("I wanna buy MacBook Pro");
40
+ ```
41
+
42
+ The simplest **Agentic AI** library, specialized in **LLM Function Calling**.
43
+
44
+ Don't compose complicate agent graph or workflow, but just deliver **Swagger/OpenAPI** documents or **TypeScript class** types linearly to the `@agentica`. Then `@agentica` will do everything with the function calling.
45
+
46
+ Look at the below demonstration, and feel how `@agentica` is easy and powerful.
47
+
48
+ ```typescript
49
+ import { Agentica } from "@agentica/core";
50
+ import typia from "typia";
51
+
52
+ const agent = new Agentica({
53
+ controllers: [
54
+ await fetch(
55
+ "https://shopping-be.wrtn.ai/editor/swagger.json",
56
+ ).then(r => r.json()),
57
+ typia.llm.application<ShoppingCounselor>(),
58
+ typia.llm.application<ShoppingPolicy>(),
59
+ typia.llm.application<ShoppingSearchRag>(),
60
+ ],
61
+ });
62
+ await agent.conversate("I wanna buy MacBook Pro");
63
+ ```
64
+
65
+ > https://github.com/user-attachments/assets/01604b53-aca4-41cb-91aa-3faf63549ea6
66
+ >
67
+ > Demonstration video of Shopping AI Chatbot
@@ -0,0 +1,9 @@
1
+ export declare namespace Connector {
2
+ type Code = "import" | "connector";
3
+ const createAll: (input: {
4
+ services: string[];
5
+ }) => string;
6
+ const create: (code: Code) => (input: {
7
+ services: string[];
8
+ }) => string;
9
+ }
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Connector = void 0;
4
+ const capitalize_1 = require("../utils/capitalize");
5
+ var Connector;
6
+ (function (Connector) {
7
+ Connector.createAll = (input) => {
8
+ // Generate import statements for selected services
9
+ const serviceImports = Connector.create("import")({ services: input.services });
10
+ // Create Connector
11
+ const serviceConnectors = Connector.create("connector")({ services: input.services });
12
+ // Generate agentica code
13
+ const codeTemplate = `
14
+ import { Agentica } from "@agentica/core";
15
+ import typia from "typia";
16
+ import dotenv from "dotenv";
17
+ import { OpenAI } from "openai";
18
+ ${serviceImports}
19
+
20
+ dotenv.config();
21
+
22
+ export const agent = new Agentica({
23
+ model: "chatgpt",
24
+ vendor: {
25
+ api: new OpenAI({
26
+ apiKey: process.env.OPENAI_API_KEY!
27
+ }),
28
+ model: "gpt-4o-mini",
29
+ },
30
+ controllers: [
31
+ ${serviceConnectors}
32
+ ],
33
+ });
34
+ `;
35
+ return codeTemplate;
36
+ };
37
+ Connector.create = (code) => (input) => {
38
+ switch (code) {
39
+ case "import":
40
+ return createImport(input);
41
+ case "connector":
42
+ return createConnector(input);
43
+ }
44
+ };
45
+ const createConnector = (input) => {
46
+ const serviceConnectors = input.services
47
+ .map((service) => {
48
+ const serviceName = (0, capitalize_1.capitalize)(service);
49
+ return `{
50
+ name: "${serviceName} Connector",
51
+ protocol: "class",
52
+ application: typia.llm.application<${serviceName}Service, "chatgpt">(),
53
+ execute: new ${serviceName}Service(),
54
+ }`;
55
+ })
56
+ .join(",\n");
57
+ return serviceConnectors;
58
+ };
59
+ const createImport = (input) => {
60
+ // Generate import statements for selected services
61
+ const serviceImports = input.services
62
+ .map((service) => `import { ${(0, capitalize_1.capitalize)(service)}Service } from "@wrtnlabs/connector-${service}";`)
63
+ .join("\n");
64
+ return serviceImports;
65
+ };
66
+ })(Connector || (exports.Connector = Connector = {}));
67
+ //# sourceMappingURL=Connector.js.map
@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AAM,YAAY,GAAG,CAAC,KAA6B,EAAE,EAAE;QACrD,mDAAmD;QACnD,MAAM,cAAc,GAAG,KAAK,CAAC,QAAQ;aAClC,GAAG,CACF,CAAC,OAAO,EAAE,EAAE,CACV,YAAY,IAAA,uBAAU,EACpB,OAAO,CACR,uCAAuC,OAAO,IAAI,CACtD;aACA,IAAI,CAAC,IAAI,CAAC,CAAC;QAEd,OAAO,cAAc,CAAC;IACxB,CAAC,CAAC;AACJ,CAAC,EA7EgB,SAAS,yBAAT,SAAS,QA6EzB"}
@@ -0,0 +1,11 @@
1
+ import { PackageManager } from "../utils/types/PackageManager";
2
+ export declare namespace Package {
3
+ const create: (input: {
4
+ projectName: string;
5
+ projectPath: string;
6
+ }) => Promise<void>;
7
+ const installPackage: (packageManager: PackageManager) => (input: {
8
+ projectPath: string;
9
+ services: string[];
10
+ }) => void;
11
+ }
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.Package = void 0;
16
+ const child_process_1 = require("child_process");
17
+ const promises_1 = __importDefault(require("fs/promises"));
18
+ const path_1 = __importDefault(require("path"));
19
+ var Package;
20
+ (function (Package) {
21
+ Package.create = (input) => __awaiter(this, void 0, void 0, function* () {
22
+ const packageJson = {
23
+ name: input.projectName,
24
+ version: "0.0.1",
25
+ description: "",
26
+ scripts: {
27
+ build: "tsc",
28
+ dev: `ts-node ${input.projectName}/cli.ts`,
29
+ start: `node ${input.projectName}/cli.js`,
30
+ },
31
+ };
32
+ yield promises_1.default.writeFile(path_1.default.join(input.projectPath, "package.json"), JSON.stringify(packageJson, null, 2));
33
+ console.log("✅ package.json created");
34
+ });
35
+ Package.installPackage = (packageManager) => (input) => {
36
+ const installCmd = (pkg) => {
37
+ switch (packageManager) {
38
+ case "npm":
39
+ return `npm install ${pkg}`;
40
+ case "yarn":
41
+ return `yarn add ${pkg}`;
42
+ case "pnpm":
43
+ return `pnpm add ${pkg}`;
44
+ }
45
+ };
46
+ const dependencies = [
47
+ "openai",
48
+ "typia",
49
+ "dotenv",
50
+ "@agentica/core",
51
+ "readline",
52
+ ...input.services.map((s) => `@wrtnlabs/connector-${s}`),
53
+ ];
54
+ const devDependencies = ["ts-node", "typescript"];
55
+ // install existing dependencies
56
+ console.log("🚀 Installing existing dependencies...");
57
+ (0, child_process_1.execSync)(`${packageManager} install`, {
58
+ cwd: input.projectPath,
59
+ stdio: "inherit",
60
+ });
61
+ dependencies.forEach((dep) => {
62
+ console.log(`🚀 Installing ${dep}...`);
63
+ (0, child_process_1.execSync)(installCmd(dep), { cwd: input.projectPath, stdio: "inherit" });
64
+ });
65
+ devDependencies.forEach((dep) => {
66
+ console.log(`🚀 Installing ${dep}...`);
67
+ (0, child_process_1.execSync)(`${installCmd(dep)} -D`, {
68
+ cwd: input.projectPath,
69
+ stdio: "inherit",
70
+ });
71
+ });
72
+ };
73
+ })(Package || (exports.Package = Package = {}));
74
+ //# sourceMappingURL=Package.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Package.js","sourceRoot":"","sources":["../../src/bases/Package.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iDAAyC;AACzC,2DAA6B;AAC7B,gDAAwB;AAIxB,IAAiB,OAAO,CAoEvB;AApED,WAAiB,OAAO;IACT,cAAM,GAAG,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IAAA,wBAAQ,EAAC,GAAG,cAAc,UAAU,EAAE;YACpC,GAAG,EAAE,KAAK,CAAC,WAAW;YACtB,KAAK,EAAE,SAAS;SACjB,CAAC,CAAC;QAEH,YAAY,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YAC3B,OAAO,CAAC,GAAG,CAAC,iBAAiB,GAAG,KAAK,CAAC,CAAC;YACvC,IAAA,wBAAQ,EAAC,UAAU,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC1E,CAAC,CAAC,CAAC;QAEH,eAAe,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YAC9B,OAAO,CAAC,GAAG,CAAC,iBAAiB,GAAG,KAAK,CAAC,CAAC;YACvC,IAAA,wBAAQ,EAAC,GAAG,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE;gBAChC,GAAG,EAAE,KAAK,CAAC,WAAW;gBACtB,KAAK,EAAE,SAAS;aACjB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACN,CAAC,EApEgB,OAAO,uBAAP,OAAO,QAoEvB"}
@@ -0,0 +1,5 @@
1
+ export declare namespace Tsconfig {
2
+ const create: (input: {
3
+ projectPath: string;
4
+ }) => Promise<void>;
5
+ }
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.Tsconfig = void 0;
16
+ const promises_1 = __importDefault(require("fs/promises"));
17
+ const path_1 = __importDefault(require("path"));
18
+ var Tsconfig;
19
+ (function (Tsconfig) {
20
+ Tsconfig.create = (input) => __awaiter(this, void 0, void 0, function* () {
21
+ yield promises_1.default.writeFile(path_1.default.join(input.projectPath, "tsconfig.json"), tsconfig);
22
+ console.log("✅ tsconfig.json created");
23
+ });
24
+ const tsconfig = `{
25
+ "compilerOptions": {
26
+ /* Visit https://aka.ms/tsconfig to read more about this file */
27
+ /* Projects */
28
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
29
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
30
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
31
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
32
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
33
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
34
+ /* Language and Environment */
35
+ "target": "es2015" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
36
+ "lib": [
37
+ "ES2021"
38
+ ] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
39
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
40
+ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
41
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
42
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
43
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
44
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
45
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
46
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
47
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
48
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
49
+ /* Modules */
50
+ "module": "commonjs" /* Specify what module code is generated. */,
51
+ // "rootDir": "./", /* Specify the root folder within your source files. */
52
+ // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
53
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
54
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
55
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
56
+ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
57
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
58
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
59
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
60
+ // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
61
+ // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */
62
+ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
63
+ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
64
+ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
65
+ // "noUncheckedSideEffectImports": true, /* Check side effect imports. */
66
+ // "resolveJsonModule": true, /* Enable importing .json files. */
67
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
68
+ // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
69
+ /* JavaScript Support */
70
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
71
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
72
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
73
+ /* Emit */
74
+ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
75
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
76
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
77
+ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
78
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
79
+ // "noEmit": true, /* Disable emitting files from a compilation. */
80
+ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
81
+ "outDir": "./lib" /* Specify an output folder for all emitted files. */,
82
+ // "removeComments": true, /* Disable emitting comments. */
83
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
84
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
85
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
86
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
87
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
88
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
89
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
90
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
91
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
92
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
93
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
94
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
95
+ /* Interop Constraints */
96
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
97
+ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
98
+ // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
99
+ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
100
+ "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
101
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
102
+ "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
103
+ /* Type Checking */
104
+ "strict": true /* Enable all strict type-checking options. */,
105
+ // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
106
+ "strictNullChecks": true /* When type checking, take into account 'null' and 'undefined'. */,
107
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
108
+ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
109
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
110
+ // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */
111
+ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
112
+ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
113
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
114
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
115
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
116
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
117
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
118
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
119
+ // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
120
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
121
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
122
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
123
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
124
+ /* Completeness */
125
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
126
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */,
127
+ "plugins": [
128
+ {
129
+ "transform": "typia/lib/transform"
130
+ }
131
+ ]
132
+ }
133
+ }`;
134
+ })(Tsconfig || (exports.Tsconfig = Tsconfig = {}));
135
+ //# sourceMappingURL=Tsconfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tsconfig.js","sourceRoot":"","sources":["../../src/bases/Tsconfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2DAA6B;AAC7B,gDAAwB;AAExB,IAAiB,QAAQ,CAsHxB;AAtHD,WAAiB,QAAQ;IACV,eAAM,GAAG,CAAO,KAE5B,EAAiB,EAAE;QAClB,MAAM,kBAAE,CAAC,SAAS,CAAC,cAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,eAAe,CAAC,EAAE,QAAQ,CAAC,CAAC;QAC5E,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IACzC,CAAC,CAAA,CAAC;IAEF,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6GjB,CAAC;AACH,CAAC,EAtHgB,QAAQ,wBAAR,QAAQ,QAsHxB"}
@@ -0,0 +1,7 @@
1
+ import { IAgenticaStart } from "../structures/IAgenticaStart";
2
+ export declare namespace AgenticaStart {
3
+ /**
4
+ * Execute `start` command.
5
+ */
6
+ function execute({ projectName, options, }: IAgenticaStart.IExecuteInput): Promise<void>;
7
+ }