@chatbotkit/cli 1.26.3 → 1.27.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.
@@ -1,9 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatBlue = exports.RESET = exports.BLUE = void 0;
3
+ exports.formatYellow = exports.formatRed = exports.formatBlue = exports.RESET = exports.YELLOW = exports.RED = exports.BLUE = void 0;
4
4
  exports.BLUE = '\u001b[34m';
5
+ exports.RED = '\u001b[31m';
6
+ exports.YELLOW = '\u001b[33m';
5
7
  exports.RESET = '\u001b[0m';
6
8
  const formatBlue = (text) => {
7
9
  return `${exports.BLUE}${text}${exports.RESET}`;
8
10
  };
9
11
  exports.formatBlue = formatBlue;
12
+ const formatRed = (text) => {
13
+ return `${exports.RED}${text}${exports.RESET}`;
14
+ };
15
+ exports.formatRed = formatRed;
16
+ const formatYellow = (text) => {
17
+ return `${exports.YELLOW}${text}${exports.RESET}`;
18
+ };
19
+ exports.formatYellow = formatYellow;
@@ -1,3 +1,7 @@
1
1
  export const BLUE: "\u001B[34m";
2
+ export const RED: "\u001B[31m";
3
+ export const YELLOW: "\u001B[33m";
2
4
  export const RESET: "\u001B[0m";
3
5
  export function formatBlue(text: string): string;
6
+ export function formatRed(text: string): string;
7
+ export function formatYellow(text: string): string;
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.command = void 0;
4
+ const output_js_1 = require("../../output.cjs");
5
+ const child_process_1 = require("child_process");
6
+ const commander_1 = require("commander");
7
+ const fs_1 = require("fs");
8
+ const path_1 = require("path");
9
+ const url_1 = require("url");
10
+ const __dirname = (0, path_1.dirname)((0, url_1.fileURLToPath)(import.meta.url));
11
+ const loaderPath = (0, path_1.join)(__dirname, '..', '..', 'loader', 'index.js');
12
+ function resolveScriptPath(scriptPath) {
13
+ if ((0, path_1.isAbsolute)(scriptPath)) {
14
+ return scriptPath;
15
+ }
16
+ return (0, path_1.resolve)(process.cwd(), scriptPath);
17
+ }
18
+ async function runScript(scriptPath, scriptArgs) {
19
+ const absolutePath = resolveScriptPath(scriptPath);
20
+ if (!(0, fs_1.existsSync)(absolutePath)) {
21
+ (0, output_js_1.printError)(new output_js_1.CommandError(`Script not found: ${scriptPath}`));
22
+ }
23
+ return new Promise((resolve) => {
24
+ const child = (0, child_process_1.spawn)(process.execPath, [
25
+ '--import',
26
+ loaderPath,
27
+ absolutePath,
28
+ ...scriptArgs,
29
+ ], {
30
+ stdio: 'inherit',
31
+ env: {
32
+ ...process.env,
33
+ CBK_API_KEY: process.env.CBK_API_KEY || process.env.CHATBOTKIT_API_KEY,
34
+ },
35
+ cwd: process.cwd(),
36
+ });
37
+ child.on('close', (code) => {
38
+ resolve(code ?? 0);
39
+ });
40
+ child.on('error', (err) => {
41
+ (0, output_js_1.printError)(new output_js_1.CommandError(`Failed to run script: ${err.message}`));
42
+ });
43
+ });
44
+ }
45
+ exports.command = new commander_1.Command()
46
+ .name('run')
47
+ .description('Run a JavaScript file with @chatbotkit/* packages available')
48
+ .argument('<script>', 'Path to the JavaScript file to run')
49
+ .argument('[args...]', 'Arguments to pass to the script')
50
+ .allowUnknownOption(true)
51
+ .allowExcessArguments(true)
52
+ .helpOption('-h, --help', 'Display help for the run command')
53
+ .addHelpText('after', `
54
+ Examples:
55
+ $ cbk run script.js
56
+ $ cbk run ./scripts/deploy.js --env production
57
+ $ cbk run analyze.js data.json
58
+
59
+ Available packages (no installation required):
60
+ @chatbotkit/sdk - Main SDK for ChatBotKit API
61
+ @chatbotkit/agent - Agent utilities for building AI agents
62
+ @chatbotkit/fetch - Fetch utilities
63
+ @chatbotkit/cli - CLI utilities (Command, Option, Argument)
64
+
65
+ Example script:
66
+ import { ChatBotKit } from '@chatbotkit/sdk'
67
+ import { Command } from '@chatbotkit/cli'
68
+
69
+ const program = new Command()
70
+ .option('-e, --env <env>', 'Environment', 'production')
71
+ .parse()
72
+
73
+ const client = new ChatBotKit({
74
+ secret: process.env.CBK_API_KEY
75
+ })
76
+
77
+ console.log('Running in', program.opts().env)
78
+ `)
79
+ .action(async (script, args) => {
80
+ const exitCode = await runScript(script, args);
81
+ process.exit(exitCode);
82
+ });
83
+ exports.default = exports.command;
@@ -0,0 +1,3 @@
1
+ export const command: Command;
2
+ export default command;
3
+ import { Command } from 'commander';
@@ -1,13 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Argument = exports.Option = exports.Command = void 0;
3
4
  exports.default = cbk;
4
5
  const tslib_1 = require("tslib");
5
6
  const color_js_1 = require("./color.cjs");
6
7
  const index_js_1 = tslib_1.__importDefault(require("./command/agent/index.cjs"));
7
8
  const index_js_2 = tslib_1.__importDefault(require("./command/api/index.cjs"));
8
9
  const index_js_3 = tslib_1.__importDefault(require("./command/chat/index.cjs"));
9
- const index_js_4 = tslib_1.__importDefault(require("./command/solution/index.cjs"));
10
+ const index_js_4 = tslib_1.__importDefault(require("./command/run/index.cjs"));
11
+ const index_js_5 = tslib_1.__importDefault(require("./command/solution/index.cjs"));
10
12
  const commander_1 = require("commander");
13
+ Object.defineProperty(exports, "Argument", { enumerable: true, get: function () { return commander_1.Argument; } });
14
+ Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return commander_1.Command; } });
15
+ Object.defineProperty(exports, "Option", { enumerable: true, get: function () { return commander_1.Option; } });
11
16
  function printBanner() {
12
17
  console.log((0, color_js_1.formatBlue)(`
13
18
  .d8888b. 888888b. 888 d8P
@@ -32,5 +37,6 @@ async function cbk(argv = process.argv) {
32
37
  program.addCommand(index_js_1.default);
33
38
  program.addCommand(index_js_3.default);
34
39
  program.addCommand(index_js_4.default);
40
+ program.addCommand(index_js_5.default);
35
41
  program.parse(argv);
36
42
  }
@@ -1 +1,5 @@
1
1
  export default function cbk(argv?: string[]): Promise<void>;
2
+ import { Command } from 'commander';
3
+ import { Option } from 'commander';
4
+ import { Argument } from 'commander';
5
+ export { Command, Option, Argument };
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolve = resolve;
4
+ const fs_1 = require("fs");
5
+ const path_1 = require("path");
6
+ const url_1 = require("url");
7
+ const __dirname = (0, path_1.dirname)((0, url_1.fileURLToPath)(import.meta.url));
8
+ const cliRoot = (0, path_1.join)(__dirname, '..', '..');
9
+ const cliNodeModules = (0, path_1.join)(cliRoot, 'node_modules');
10
+ function resolvePackageExport(packagePath, subpath) {
11
+ const packageJsonPath = (0, path_1.join)(packagePath, 'package.json');
12
+ if (!(0, fs_1.existsSync)(packageJsonPath)) {
13
+ return null;
14
+ }
15
+ try {
16
+ const packageJson = JSON.parse((0, fs_1.readFileSync)(packageJsonPath, 'utf-8'));
17
+ const exportKey = subpath ? './' + subpath : '.';
18
+ if (packageJson.exports) {
19
+ const exportEntry = packageJson.exports[exportKey];
20
+ if (exportEntry) {
21
+ let importPath;
22
+ if (typeof exportEntry === 'string') {
23
+ importPath = exportEntry;
24
+ }
25
+ else if (exportEntry.import) {
26
+ importPath = exportEntry.import;
27
+ }
28
+ else if (exportEntry.default) {
29
+ importPath = exportEntry.default;
30
+ }
31
+ if (importPath) {
32
+ const resolved = (0, path_1.join)(packagePath, importPath);
33
+ if ((0, fs_1.existsSync)(resolved)) {
34
+ return resolved;
35
+ }
36
+ }
37
+ }
38
+ }
39
+ if (!subpath && packageJson.main) {
40
+ const resolved = (0, path_1.join)(packagePath, packageJson.main);
41
+ if ((0, fs_1.existsSync)(resolved)) {
42
+ return resolved;
43
+ }
44
+ }
45
+ if (!subpath) {
46
+ const indexPath = (0, path_1.join)(packagePath, 'index.js');
47
+ if ((0, fs_1.existsSync)(indexPath)) {
48
+ return indexPath;
49
+ }
50
+ }
51
+ }
52
+ catch {
53
+ }
54
+ return null;
55
+ }
56
+ async function resolve(specifier, context, nextResolve) {
57
+ if (specifier.startsWith('@chatbotkit/')) {
58
+ const parts = specifier.split('/');
59
+ const packageName = parts[0] + '/' + parts[1];
60
+ const subpath = parts.slice(2).join('/');
61
+ if (packageName === '@chatbotkit/cli') {
62
+ const resolved = resolvePackageExport(cliRoot, subpath);
63
+ if (resolved) {
64
+ return {
65
+ url: (0, url_1.pathToFileURL)(resolved).href,
66
+ shortCircuit: true,
67
+ };
68
+ }
69
+ }
70
+ const packagePath = (0, path_1.join)(cliNodeModules, packageName);
71
+ if ((0, fs_1.existsSync)(packagePath)) {
72
+ const resolved = resolvePackageExport(packagePath, subpath);
73
+ if (resolved) {
74
+ return {
75
+ url: (0, url_1.pathToFileURL)(resolved).href,
76
+ shortCircuit: true,
77
+ };
78
+ }
79
+ }
80
+ }
81
+ return nextResolve(specifier, context);
82
+ }
@@ -0,0 +1,4 @@
1
+ export function resolve(specifier: string, context: object, nextResolve: Function): Promise<{
2
+ url: string;
3
+ shortCircuit?: boolean;
4
+ }>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const node_module_1 = require("node:module");
4
+ const path_1 = require("path");
5
+ const url_1 = require("url");
6
+ const __dirname = (0, path_1.dirname)((0, url_1.fileURLToPath)(import.meta.url));
7
+ const hooksPath = (0, path_1.join)(__dirname, 'hooks.js');
8
+ (0, node_module_1.register)((0, url_1.pathToFileURL)(hooksPath).href, import.meta.url);
@@ -0,0 +1 @@
1
+ export {};
@@ -60,6 +60,7 @@ exports.BasicResourceConfigSchema = zod_1.z.object({
60
60
  exports.BlueprintResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
61
61
  type: zod_1.z.literal('blueprint'),
62
62
  properties: zod_1.z.object({
63
+ alias: zod_1.z.string().optional(),
63
64
  name: zod_1.z.string().optional(),
64
65
  description: zod_1.z.string().optional(),
65
66
  meta: zod_1.z.record(zod_1.z.unknown()).optional(),
@@ -69,6 +70,7 @@ exports.BlueprintResourceConfigSchema = exports.BasicResourceConfigSchema.extend
69
70
  exports.BotResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
70
71
  type: zod_1.z.literal('bot'),
71
72
  properties: zod_1.z.object({
73
+ alias: zod_1.z.string().optional(),
72
74
  name: zod_1.z.string().optional(),
73
75
  description: zod_1.z.string().optional(),
74
76
  meta: zod_1.z.record(zod_1.z.unknown()).optional(),
@@ -85,6 +87,7 @@ exports.BotResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
85
87
  exports.DatasetResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
86
88
  type: zod_1.z.literal('dataset'),
87
89
  properties: zod_1.z.object({
90
+ alias: zod_1.z.string().optional(),
88
91
  name: zod_1.z.string().optional(),
89
92
  description: zod_1.z.string().optional(),
90
93
  meta: zod_1.z.record(zod_1.z.unknown()).optional(),
@@ -104,6 +107,7 @@ exports.DatasetResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
104
107
  exports.FileResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
105
108
  type: zod_1.z.literal('file'),
106
109
  properties: zod_1.z.object({
110
+ alias: zod_1.z.string().optional(),
107
111
  name: zod_1.z.string().optional(),
108
112
  description: zod_1.z.string().optional(),
109
113
  meta: zod_1.z.record(zod_1.z.unknown()).optional(),
@@ -114,6 +118,7 @@ exports.FileResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
114
118
  exports.SecretResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
115
119
  type: zod_1.z.literal('secret'),
116
120
  properties: zod_1.z.object({
121
+ alias: zod_1.z.string().optional(),
117
122
  name: zod_1.z.string().optional(),
118
123
  description: zod_1.z.string().optional(),
119
124
  meta: zod_1.z.record(zod_1.z.unknown()).optional(),
@@ -130,6 +135,7 @@ exports.SecretResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
130
135
  exports.SkillsetResourceConfigSchema = exports.BasicResourceConfigSchema.extend({
131
136
  type: zod_1.z.literal('skillset'),
132
137
  properties: zod_1.z.object({
138
+ alias: zod_1.z.string().optional(),
133
139
  name: zod_1.z.string().optional(),
134
140
  description: zod_1.z.string().optional(),
135
141
  meta: zod_1.z.record(zod_1.z.unknown()).optional(),
@@ -1,3 +1,7 @@
1
1
  export const BLUE: "\u001B[34m";
2
+ export const RED: "\u001B[31m";
3
+ export const YELLOW: "\u001B[33m";
2
4
  export const RESET: "\u001B[0m";
3
5
  export function formatBlue(text: string): string;
6
+ export function formatRed(text: string): string;
7
+ export function formatYellow(text: string): string;
package/dist/esm/color.js CHANGED
@@ -1,5 +1,13 @@
1
1
  export const BLUE = '\u001b[34m';
2
+ export const RED = '\u001b[31m';
3
+ export const YELLOW = '\u001b[33m';
2
4
  export const RESET = '\u001b[0m';
3
5
  export const formatBlue = (text) => {
4
6
  return `${BLUE}${text}${RESET}`;
5
7
  };
8
+ export const formatRed = (text) => {
9
+ return `${RED}${text}${RESET}`;
10
+ };
11
+ export const formatYellow = (text) => {
12
+ return `${YELLOW}${text}${RESET}`;
13
+ };
@@ -0,0 +1,3 @@
1
+ export const command: Command;
2
+ export default command;
3
+ import { Command } from 'commander';
@@ -0,0 +1,80 @@
1
+ import { CommandError, printError } from '../../output.js';
2
+ import { spawn } from 'child_process';
3
+ import { Command } from 'commander';
4
+ import { existsSync } from 'fs';
5
+ import { dirname, isAbsolute, join, resolve } from 'path';
6
+ import { fileURLToPath } from 'url';
7
+ const __dirname = dirname(fileURLToPath(import.meta.url));
8
+ const loaderPath = join(__dirname, '..', '..', 'loader', 'index.js');
9
+ function resolveScriptPath(scriptPath) {
10
+ if (isAbsolute(scriptPath)) {
11
+ return scriptPath;
12
+ }
13
+ return resolve(process.cwd(), scriptPath);
14
+ }
15
+ async function runScript(scriptPath, scriptArgs) {
16
+ const absolutePath = resolveScriptPath(scriptPath);
17
+ if (!existsSync(absolutePath)) {
18
+ printError(new CommandError(`Script not found: ${scriptPath}`));
19
+ }
20
+ return new Promise((resolve) => {
21
+ const child = spawn(process.execPath, [
22
+ '--import',
23
+ loaderPath,
24
+ absolutePath,
25
+ ...scriptArgs,
26
+ ], {
27
+ stdio: 'inherit',
28
+ env: {
29
+ ...process.env,
30
+ CBK_API_KEY: process.env.CBK_API_KEY || process.env.CHATBOTKIT_API_KEY,
31
+ },
32
+ cwd: process.cwd(),
33
+ });
34
+ child.on('close', (code) => {
35
+ resolve(code ?? 0);
36
+ });
37
+ child.on('error', (err) => {
38
+ printError(new CommandError(`Failed to run script: ${err.message}`));
39
+ });
40
+ });
41
+ }
42
+ export const command = new Command()
43
+ .name('run')
44
+ .description('Run a JavaScript file with @chatbotkit/* packages available')
45
+ .argument('<script>', 'Path to the JavaScript file to run')
46
+ .argument('[args...]', 'Arguments to pass to the script')
47
+ .allowUnknownOption(true)
48
+ .allowExcessArguments(true)
49
+ .helpOption('-h, --help', 'Display help for the run command')
50
+ .addHelpText('after', `
51
+ Examples:
52
+ $ cbk run script.js
53
+ $ cbk run ./scripts/deploy.js --env production
54
+ $ cbk run analyze.js data.json
55
+
56
+ Available packages (no installation required):
57
+ @chatbotkit/sdk - Main SDK for ChatBotKit API
58
+ @chatbotkit/agent - Agent utilities for building AI agents
59
+ @chatbotkit/fetch - Fetch utilities
60
+ @chatbotkit/cli - CLI utilities (Command, Option, Argument)
61
+
62
+ Example script:
63
+ import { ChatBotKit } from '@chatbotkit/sdk'
64
+ import { Command } from '@chatbotkit/cli'
65
+
66
+ const program = new Command()
67
+ .option('-e, --env <env>', 'Environment', 'production')
68
+ .parse()
69
+
70
+ const client = new ChatBotKit({
71
+ secret: process.env.CBK_API_KEY
72
+ })
73
+
74
+ console.log('Running in', program.opts().env)
75
+ `)
76
+ .action(async (script, args) => {
77
+ const exitCode = await runScript(script, args);
78
+ process.exit(exitCode);
79
+ });
80
+ export default command;
@@ -1 +1,5 @@
1
1
  export default function cbk(argv?: string[]): Promise<void>;
2
+ import { Command } from 'commander';
3
+ import { Option } from 'commander';
4
+ import { Argument } from 'commander';
5
+ export { Command, Option, Argument };
package/dist/esm/index.js CHANGED
@@ -2,8 +2,10 @@ import { formatBlue } from './color.js';
2
2
  import agent from './command/agent/index.js';
3
3
  import command from './command/api/index.js';
4
4
  import chat from './command/chat/index.js';
5
+ import run from './command/run/index.js';
5
6
  import solution from './command/solution/index.js';
6
- import { Command } from 'commander';
7
+ import { Argument, Command, Option } from 'commander';
8
+ export { Command, Option, Argument };
7
9
  function printBanner() {
8
10
  console.log(formatBlue(`
9
11
  .d8888b. 888888b. 888 d8P
@@ -27,6 +29,7 @@ export default async function cbk(argv = process.argv) {
27
29
  program.addCommand(command);
28
30
  program.addCommand(agent);
29
31
  program.addCommand(chat);
32
+ program.addCommand(run);
30
33
  program.addCommand(solution);
31
34
  program.parse(argv);
32
35
  }
@@ -0,0 +1,4 @@
1
+ export function resolve(specifier: string, context: object, nextResolve: Function): Promise<{
2
+ url: string;
3
+ shortCircuit?: boolean;
4
+ }>;
@@ -0,0 +1,79 @@
1
+ import { existsSync, readFileSync } from 'fs';
2
+ import { dirname, join } from 'path';
3
+ import { fileURLToPath, pathToFileURL } from 'url';
4
+ const __dirname = dirname(fileURLToPath(import.meta.url));
5
+ const cliRoot = join(__dirname, '..', '..');
6
+ const cliNodeModules = join(cliRoot, 'node_modules');
7
+ function resolvePackageExport(packagePath, subpath) {
8
+ const packageJsonPath = join(packagePath, 'package.json');
9
+ if (!existsSync(packageJsonPath)) {
10
+ return null;
11
+ }
12
+ try {
13
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
14
+ const exportKey = subpath ? './' + subpath : '.';
15
+ if (packageJson.exports) {
16
+ const exportEntry = packageJson.exports[exportKey];
17
+ if (exportEntry) {
18
+ let importPath;
19
+ if (typeof exportEntry === 'string') {
20
+ importPath = exportEntry;
21
+ }
22
+ else if (exportEntry.import) {
23
+ importPath = exportEntry.import;
24
+ }
25
+ else if (exportEntry.default) {
26
+ importPath = exportEntry.default;
27
+ }
28
+ if (importPath) {
29
+ const resolved = join(packagePath, importPath);
30
+ if (existsSync(resolved)) {
31
+ return resolved;
32
+ }
33
+ }
34
+ }
35
+ }
36
+ if (!subpath && packageJson.main) {
37
+ const resolved = join(packagePath, packageJson.main);
38
+ if (existsSync(resolved)) {
39
+ return resolved;
40
+ }
41
+ }
42
+ if (!subpath) {
43
+ const indexPath = join(packagePath, 'index.js');
44
+ if (existsSync(indexPath)) {
45
+ return indexPath;
46
+ }
47
+ }
48
+ }
49
+ catch {
50
+ }
51
+ return null;
52
+ }
53
+ export async function resolve(specifier, context, nextResolve) {
54
+ if (specifier.startsWith('@chatbotkit/')) {
55
+ const parts = specifier.split('/');
56
+ const packageName = parts[0] + '/' + parts[1];
57
+ const subpath = parts.slice(2).join('/');
58
+ if (packageName === '@chatbotkit/cli') {
59
+ const resolved = resolvePackageExport(cliRoot, subpath);
60
+ if (resolved) {
61
+ return {
62
+ url: pathToFileURL(resolved).href,
63
+ shortCircuit: true,
64
+ };
65
+ }
66
+ }
67
+ const packagePath = join(cliNodeModules, packageName);
68
+ if (existsSync(packagePath)) {
69
+ const resolved = resolvePackageExport(packagePath, subpath);
70
+ if (resolved) {
71
+ return {
72
+ url: pathToFileURL(resolved).href,
73
+ shortCircuit: true,
74
+ };
75
+ }
76
+ }
77
+ }
78
+ return nextResolve(specifier, context);
79
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import { register } from 'node:module';
2
+ import { dirname, join } from 'path';
3
+ import { fileURLToPath, pathToFileURL } from 'url';
4
+ const __dirname = dirname(fileURLToPath(import.meta.url));
5
+ const hooksPath = join(__dirname, 'hooks.js');
6
+ register(pathToFileURL(hooksPath).href, import.meta.url);
@@ -40,6 +40,7 @@ export const ExtractIntegrationResourceConfigSchema: ResourceConfigSchemaFor<"ex
40
40
  export const McpServerIntegrationResourceConfigSchema: ResourceConfigSchemaFor<"mcpserverIntegration", import("@chatbotkit/sdk/integration/mcpserver/v1").McpServerIntegrationCreateRequest>;
41
41
  export const TwilioIntegrationResourceConfigSchema: ResourceConfigSchemaFor<"twilioIntegration", import("@chatbotkit/sdk/integration/twilio/v1").TwilioIntegrationCreateRequest>;
42
42
  export const ResourceConfigSchema: z.ZodUnion<[ResourceConfigSchemaFor<"blueprint", {
43
+ alias?: string;
43
44
  name?: string;
44
45
  description?: string;
45
46
  meta?: {
@@ -47,6 +48,7 @@ export const ResourceConfigSchema: z.ZodUnion<[ResourceConfigSchemaFor<"blueprin
47
48
  };
48
49
  visibility?: "private" | "protected" | "public";
49
50
  }>, ResourceConfigSchemaFor<"bot", import("@chatbotkit/sdk/bot/v1").BotCreateRequest>, ResourceConfigSchemaFor<"dataset", {
51
+ alias?: string;
50
52
  name?: string;
51
53
  description?: string;
52
54
  meta?: {
@@ -64,6 +66,7 @@ export const ResourceConfigSchema: z.ZodUnion<[ResourceConfigSchemaFor<"blueprin
64
66
  separators?: string;
65
67
  visibility?: "private" | "protected" | "public";
66
68
  }>, ResourceConfigSchemaFor<"file", {
69
+ alias?: string;
67
70
  name?: string;
68
71
  description?: string;
69
72
  meta?: {
@@ -72,6 +75,7 @@ export const ResourceConfigSchema: z.ZodUnion<[ResourceConfigSchemaFor<"blueprin
72
75
  blueprintId?: string;
73
76
  visibility?: "private" | "protected" | "public";
74
77
  }>, ResourceConfigSchemaFor<"secret", {
78
+ alias?: string;
75
79
  name?: string;
76
80
  description?: string;
77
81
  meta?: {
@@ -86,6 +90,7 @@ export const ResourceConfigSchema: z.ZodUnion<[ResourceConfigSchemaFor<"blueprin
86
90
  };
87
91
  visibility?: "private" | "protected" | "public";
88
92
  }>, ResourceConfigSchemaFor<"skillset", {
93
+ alias?: string;
89
94
  name?: string;
90
95
  description?: string;
91
96
  meta?: {
@@ -287,6 +292,7 @@ export const ResourceConfigSchema: z.ZodUnion<[ResourceConfigSchemaFor<"blueprin
287
292
  export const SolutionConfigSchema: z.ZodObject<{
288
293
  version: z.ZodLiteral<1>;
289
294
  resources: z.ZodArray<z.ZodUnion<[ResourceConfigSchemaFor<"blueprint", {
295
+ alias?: string;
290
296
  name?: string;
291
297
  description?: string;
292
298
  meta?: {
@@ -294,6 +300,7 @@ export const SolutionConfigSchema: z.ZodObject<{
294
300
  };
295
301
  visibility?: "private" | "protected" | "public";
296
302
  }>, ResourceConfigSchemaFor<"bot", import("@chatbotkit/sdk/bot/v1").BotCreateRequest>, ResourceConfigSchemaFor<"dataset", {
303
+ alias?: string;
297
304
  name?: string;
298
305
  description?: string;
299
306
  meta?: {
@@ -311,6 +318,7 @@ export const SolutionConfigSchema: z.ZodObject<{
311
318
  separators?: string;
312
319
  visibility?: "private" | "protected" | "public";
313
320
  }>, ResourceConfigSchemaFor<"file", {
321
+ alias?: string;
314
322
  name?: string;
315
323
  description?: string;
316
324
  meta?: {
@@ -319,6 +327,7 @@ export const SolutionConfigSchema: z.ZodObject<{
319
327
  blueprintId?: string;
320
328
  visibility?: "private" | "protected" | "public";
321
329
  }>, ResourceConfigSchemaFor<"secret", {
330
+ alias?: string;
322
331
  name?: string;
323
332
  description?: string;
324
333
  meta?: {
@@ -333,6 +342,7 @@ export const SolutionConfigSchema: z.ZodObject<{
333
342
  };
334
343
  visibility?: "private" | "protected" | "public";
335
344
  }>, ResourceConfigSchemaFor<"skillset", {
345
+ alias?: string;
336
346
  name?: string;
337
347
  description?: string;
338
348
  meta?: {
@@ -537,6 +547,7 @@ export const SolutionConfigSchema: z.ZodObject<{
537
547
  type: "blueprint";
538
548
  properties: {
539
549
  name?: string | undefined;
550
+ alias?: string | undefined;
540
551
  description?: string | undefined;
541
552
  meta?: {
542
553
  [key: string]: unknown;
@@ -555,6 +566,7 @@ export const SolutionConfigSchema: z.ZodObject<{
555
566
  skillsetId?: string | undefined;
556
567
  privacy?: boolean | undefined;
557
568
  moderation?: boolean | undefined;
569
+ alias?: string | undefined;
558
570
  description?: string | undefined;
559
571
  meta?: {
560
572
  [key: string]: unknown;
@@ -568,6 +580,7 @@ export const SolutionConfigSchema: z.ZodObject<{
568
580
  type: "dataset";
569
581
  properties: {
570
582
  name?: string | undefined;
583
+ alias?: string | undefined;
571
584
  description?: string | undefined;
572
585
  meta?: {
573
586
  [key: string]: unknown;
@@ -590,6 +603,7 @@ export const SolutionConfigSchema: z.ZodObject<{
590
603
  type: "file";
591
604
  properties: {
592
605
  name?: string | undefined;
606
+ alias?: string | undefined;
593
607
  description?: string | undefined;
594
608
  meta?: {
595
609
  [key: string]: unknown;
@@ -605,16 +619,17 @@ export const SolutionConfigSchema: z.ZodObject<{
605
619
  value?: string | undefined;
606
620
  type?: "plain" | "basic" | "bearer" | "oauth" | "template" | "reference" | undefined;
607
621
  name?: string | undefined;
622
+ alias?: string | undefined;
608
623
  description?: string | undefined;
609
624
  meta?: {
610
625
  [key: string]: unknown;
611
626
  } | undefined;
612
627
  visibility?: "private" | "protected" | "public" | undefined;
613
628
  blueprintId?: string | undefined;
614
- kind?: "shared" | "personal" | undefined;
615
629
  config?: {
616
630
  [key: string]: unknown;
617
631
  } | undefined;
632
+ kind?: "shared" | "personal" | undefined;
618
633
  };
619
634
  slug?: string | undefined;
620
635
  id?: string | undefined;
@@ -622,6 +637,7 @@ export const SolutionConfigSchema: z.ZodObject<{
622
637
  type: "skillset";
623
638
  properties: {
624
639
  name?: string | undefined;
640
+ alias?: string | undefined;
625
641
  description?: string | undefined;
626
642
  meta?: {
627
643
  [key: string]: unknown;
@@ -898,6 +914,7 @@ export const SolutionConfigSchema: z.ZodObject<{
898
914
  type: "blueprint";
899
915
  properties: {
900
916
  name?: string | undefined;
917
+ alias?: string | undefined;
901
918
  description?: string | undefined;
902
919
  meta?: {
903
920
  [key: string]: unknown;
@@ -916,6 +933,7 @@ export const SolutionConfigSchema: z.ZodObject<{
916
933
  skillsetId?: string | undefined;
917
934
  privacy?: boolean | undefined;
918
935
  moderation?: boolean | undefined;
936
+ alias?: string | undefined;
919
937
  description?: string | undefined;
920
938
  meta?: {
921
939
  [key: string]: unknown;
@@ -929,6 +947,7 @@ export const SolutionConfigSchema: z.ZodObject<{
929
947
  type: "dataset";
930
948
  properties: {
931
949
  name?: string | undefined;
950
+ alias?: string | undefined;
932
951
  description?: string | undefined;
933
952
  meta?: {
934
953
  [key: string]: unknown;
@@ -951,6 +970,7 @@ export const SolutionConfigSchema: z.ZodObject<{
951
970
  type: "file";
952
971
  properties: {
953
972
  name?: string | undefined;
973
+ alias?: string | undefined;
954
974
  description?: string | undefined;
955
975
  meta?: {
956
976
  [key: string]: unknown;
@@ -966,16 +986,17 @@ export const SolutionConfigSchema: z.ZodObject<{
966
986
  value?: string | undefined;
967
987
  type?: "plain" | "basic" | "bearer" | "oauth" | "template" | "reference" | undefined;
968
988
  name?: string | undefined;
989
+ alias?: string | undefined;
969
990
  description?: string | undefined;
970
991
  meta?: {
971
992
  [key: string]: unknown;
972
993
  } | undefined;
973
994
  visibility?: "private" | "protected" | "public" | undefined;
974
995
  blueprintId?: string | undefined;
975
- kind?: "shared" | "personal" | undefined;
976
996
  config?: {
977
997
  [key: string]: unknown;
978
998
  } | undefined;
999
+ kind?: "shared" | "personal" | undefined;
979
1000
  };
980
1001
  slug?: string | undefined;
981
1002
  id?: string | undefined;
@@ -983,6 +1004,7 @@ export const SolutionConfigSchema: z.ZodObject<{
983
1004
  type: "skillset";
984
1005
  properties: {
985
1006
  name?: string | undefined;
1007
+ alias?: string | undefined;
986
1008
  description?: string | undefined;
987
1009
  meta?: {
988
1010
  [key: string]: unknown;
@@ -1260,6 +1282,7 @@ export class Resource {
1260
1282
  type: "blueprint";
1261
1283
  properties: {
1262
1284
  name?: string | undefined;
1285
+ alias?: string | undefined;
1263
1286
  description?: string | undefined;
1264
1287
  meta?: {
1265
1288
  [key: string]: unknown;
@@ -1278,6 +1301,7 @@ export class Resource {
1278
1301
  skillsetId?: string | undefined;
1279
1302
  privacy?: boolean | undefined;
1280
1303
  moderation?: boolean | undefined;
1304
+ alias?: string | undefined;
1281
1305
  description?: string | undefined;
1282
1306
  meta?: {
1283
1307
  [key: string]: unknown;
@@ -1291,6 +1315,7 @@ export class Resource {
1291
1315
  type: "dataset";
1292
1316
  properties: {
1293
1317
  name?: string | undefined;
1318
+ alias?: string | undefined;
1294
1319
  description?: string | undefined;
1295
1320
  meta?: {
1296
1321
  [key: string]: unknown;
@@ -1313,6 +1338,7 @@ export class Resource {
1313
1338
  type: "file";
1314
1339
  properties: {
1315
1340
  name?: string | undefined;
1341
+ alias?: string | undefined;
1316
1342
  description?: string | undefined;
1317
1343
  meta?: {
1318
1344
  [key: string]: unknown;
@@ -1328,16 +1354,17 @@ export class Resource {
1328
1354
  value?: string | undefined;
1329
1355
  type?: "plain" | "basic" | "bearer" | "oauth" | "template" | "reference" | undefined;
1330
1356
  name?: string | undefined;
1357
+ alias?: string | undefined;
1331
1358
  description?: string | undefined;
1332
1359
  meta?: {
1333
1360
  [key: string]: unknown;
1334
1361
  } | undefined;
1335
1362
  visibility?: "private" | "protected" | "public" | undefined;
1336
1363
  blueprintId?: string | undefined;
1337
- kind?: "shared" | "personal" | undefined;
1338
1364
  config?: {
1339
1365
  [key: string]: unknown;
1340
1366
  } | undefined;
1367
+ kind?: "shared" | "personal" | undefined;
1341
1368
  };
1342
1369
  slug?: string | undefined;
1343
1370
  id?: string | undefined;
@@ -1345,6 +1372,7 @@ export class Resource {
1345
1372
  type: "skillset";
1346
1373
  properties: {
1347
1374
  name?: string | undefined;
1375
+ alias?: string | undefined;
1348
1376
  description?: string | undefined;
1349
1377
  meta?: {
1350
1378
  [key: string]: unknown;
@@ -1702,6 +1730,7 @@ export class Solution {
1702
1730
  type: "blueprint";
1703
1731
  properties: {
1704
1732
  name?: string | undefined;
1733
+ alias?: string | undefined;
1705
1734
  description?: string | undefined;
1706
1735
  meta?: {
1707
1736
  [key: string]: unknown;
@@ -1720,6 +1749,7 @@ export class Solution {
1720
1749
  skillsetId?: string | undefined;
1721
1750
  privacy?: boolean | undefined;
1722
1751
  moderation?: boolean | undefined;
1752
+ alias?: string | undefined;
1723
1753
  description?: string | undefined;
1724
1754
  meta?: {
1725
1755
  [key: string]: unknown;
@@ -1733,6 +1763,7 @@ export class Solution {
1733
1763
  type: "dataset";
1734
1764
  properties: {
1735
1765
  name?: string | undefined;
1766
+ alias?: string | undefined;
1736
1767
  description?: string | undefined;
1737
1768
  meta?: {
1738
1769
  [key: string]: unknown;
@@ -1755,6 +1786,7 @@ export class Solution {
1755
1786
  type: "file";
1756
1787
  properties: {
1757
1788
  name?: string | undefined;
1789
+ alias?: string | undefined;
1758
1790
  description?: string | undefined;
1759
1791
  meta?: {
1760
1792
  [key: string]: unknown;
@@ -1770,16 +1802,17 @@ export class Solution {
1770
1802
  value?: string | undefined;
1771
1803
  type?: "plain" | "basic" | "bearer" | "oauth" | "template" | "reference" | undefined;
1772
1804
  name?: string | undefined;
1805
+ alias?: string | undefined;
1773
1806
  description?: string | undefined;
1774
1807
  meta?: {
1775
1808
  [key: string]: unknown;
1776
1809
  } | undefined;
1777
1810
  visibility?: "private" | "protected" | "public" | undefined;
1778
1811
  blueprintId?: string | undefined;
1779
- kind?: "shared" | "personal" | undefined;
1780
1812
  config?: {
1781
1813
  [key: string]: unknown;
1782
1814
  } | undefined;
1815
+ kind?: "shared" | "personal" | undefined;
1783
1816
  };
1784
1817
  slug?: string | undefined;
1785
1818
  id?: string | undefined;
@@ -1787,6 +1820,7 @@ export class Solution {
1787
1820
  type: "skillset";
1788
1821
  properties: {
1789
1822
  name?: string | undefined;
1823
+ alias?: string | undefined;
1790
1824
  description?: string | undefined;
1791
1825
  meta?: {
1792
1826
  [key: string]: unknown;
@@ -50,6 +50,7 @@ export const BasicResourceConfigSchema = z.object({
50
50
  export const BlueprintResourceConfigSchema = BasicResourceConfigSchema.extend({
51
51
  type: z.literal('blueprint'),
52
52
  properties: z.object({
53
+ alias: z.string().optional(),
53
54
  name: z.string().optional(),
54
55
  description: z.string().optional(),
55
56
  meta: z.record(z.unknown()).optional(),
@@ -59,6 +60,7 @@ export const BlueprintResourceConfigSchema = BasicResourceConfigSchema.extend({
59
60
  export const BotResourceConfigSchema = BasicResourceConfigSchema.extend({
60
61
  type: z.literal('bot'),
61
62
  properties: z.object({
63
+ alias: z.string().optional(),
62
64
  name: z.string().optional(),
63
65
  description: z.string().optional(),
64
66
  meta: z.record(z.unknown()).optional(),
@@ -75,6 +77,7 @@ export const BotResourceConfigSchema = BasicResourceConfigSchema.extend({
75
77
  export const DatasetResourceConfigSchema = BasicResourceConfigSchema.extend({
76
78
  type: z.literal('dataset'),
77
79
  properties: z.object({
80
+ alias: z.string().optional(),
78
81
  name: z.string().optional(),
79
82
  description: z.string().optional(),
80
83
  meta: z.record(z.unknown()).optional(),
@@ -94,6 +97,7 @@ export const DatasetResourceConfigSchema = BasicResourceConfigSchema.extend({
94
97
  export const FileResourceConfigSchema = BasicResourceConfigSchema.extend({
95
98
  type: z.literal('file'),
96
99
  properties: z.object({
100
+ alias: z.string().optional(),
97
101
  name: z.string().optional(),
98
102
  description: z.string().optional(),
99
103
  meta: z.record(z.unknown()).optional(),
@@ -104,6 +108,7 @@ export const FileResourceConfigSchema = BasicResourceConfigSchema.extend({
104
108
  export const SecretResourceConfigSchema = BasicResourceConfigSchema.extend({
105
109
  type: z.literal('secret'),
106
110
  properties: z.object({
111
+ alias: z.string().optional(),
107
112
  name: z.string().optional(),
108
113
  description: z.string().optional(),
109
114
  meta: z.record(z.unknown()).optional(),
@@ -120,6 +125,7 @@ export const SecretResourceConfigSchema = BasicResourceConfigSchema.extend({
120
125
  export const SkillsetResourceConfigSchema = BasicResourceConfigSchema.extend({
121
126
  type: z.literal('skillset'),
122
127
  properties: z.object({
128
+ alias: z.string().optional(),
123
129
  name: z.string().optional(),
124
130
  description: z.string().optional(),
125
131
  meta: z.record(z.unknown()).optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatbotkit/cli",
3
- "version": "1.26.3",
3
+ "version": "1.27.0",
4
4
  "description": "ChatBotKit command line tools",
5
5
  "license": "ISC",
6
6
  "engines": {
@@ -1095,6 +1095,36 @@
1095
1095
  "default": "./dist/cjs/command/chat/index.cjs"
1096
1096
  }
1097
1097
  },
1098
+ "./command/run": {
1099
+ "import": {
1100
+ "types": "./dist/esm/command/run/index.d.ts",
1101
+ "default": "./dist/esm/command/run/index.js"
1102
+ },
1103
+ "require": {
1104
+ "types": "./dist/cjs/command/run/index.d.ts",
1105
+ "default": "./dist/cjs/command/run/index.cjs"
1106
+ }
1107
+ },
1108
+ "./command/run/index": {
1109
+ "import": {
1110
+ "types": "./dist/esm/command/run/index.d.ts",
1111
+ "default": "./dist/esm/command/run/index.js"
1112
+ },
1113
+ "require": {
1114
+ "types": "./dist/cjs/command/run/index.d.ts",
1115
+ "default": "./dist/cjs/command/run/index.cjs"
1116
+ }
1117
+ },
1118
+ "./command/run/index.js": {
1119
+ "import": {
1120
+ "types": "./dist/esm/command/run/index.d.ts",
1121
+ "default": "./dist/esm/command/run/index.js"
1122
+ },
1123
+ "require": {
1124
+ "types": "./dist/cjs/command/run/index.d.ts",
1125
+ "default": "./dist/cjs/command/run/index.cjs"
1126
+ }
1127
+ },
1098
1128
  "./command/solution": {
1099
1129
  "import": {
1100
1130
  "types": "./dist/esm/command/solution/index.d.ts",
@@ -1225,6 +1255,56 @@
1225
1255
  "default": "./dist/cjs/input.cjs"
1226
1256
  }
1227
1257
  },
1258
+ "./loader/hooks": {
1259
+ "import": {
1260
+ "types": "./dist/esm/loader/hooks.d.ts",
1261
+ "default": "./dist/esm/loader/hooks.js"
1262
+ },
1263
+ "require": {
1264
+ "types": "./dist/cjs/loader/hooks.d.ts",
1265
+ "default": "./dist/cjs/loader/hooks.cjs"
1266
+ }
1267
+ },
1268
+ "./loader/hooks.js": {
1269
+ "import": {
1270
+ "types": "./dist/esm/loader/hooks.d.ts",
1271
+ "default": "./dist/esm/loader/hooks.js"
1272
+ },
1273
+ "require": {
1274
+ "types": "./dist/cjs/loader/hooks.d.ts",
1275
+ "default": "./dist/cjs/loader/hooks.cjs"
1276
+ }
1277
+ },
1278
+ "./loader": {
1279
+ "import": {
1280
+ "types": "./dist/esm/loader/index.d.ts",
1281
+ "default": "./dist/esm/loader/index.js"
1282
+ },
1283
+ "require": {
1284
+ "types": "./dist/cjs/loader/index.d.ts",
1285
+ "default": "./dist/cjs/loader/index.cjs"
1286
+ }
1287
+ },
1288
+ "./loader/index": {
1289
+ "import": {
1290
+ "types": "./dist/esm/loader/index.d.ts",
1291
+ "default": "./dist/esm/loader/index.js"
1292
+ },
1293
+ "require": {
1294
+ "types": "./dist/cjs/loader/index.d.ts",
1295
+ "default": "./dist/cjs/loader/index.cjs"
1296
+ }
1297
+ },
1298
+ "./loader/index.js": {
1299
+ "import": {
1300
+ "types": "./dist/esm/loader/index.d.ts",
1301
+ "default": "./dist/esm/loader/index.js"
1302
+ },
1303
+ "require": {
1304
+ "types": "./dist/cjs/loader/index.d.ts",
1305
+ "default": "./dist/cjs/loader/index.cjs"
1306
+ }
1307
+ },
1228
1308
  "./output": {
1229
1309
  "import": {
1230
1310
  "types": "./dist/esm/output.d.ts",
@@ -1324,8 +1404,8 @@
1324
1404
  "js-yaml": "^4.1.0",
1325
1405
  "tslib": "^2.6.2",
1326
1406
  "zod": "^3.25.76",
1327
- "@chatbotkit/agent": "1.26.3",
1328
- "@chatbotkit/sdk": "1.26.3"
1407
+ "@chatbotkit/agent": "1.26.5",
1408
+ "@chatbotkit/sdk": "1.26.5"
1329
1409
  },
1330
1410
  "devDependencies": {
1331
1411
  "@types/js-yaml": "^4.0.9",