@vertesia/cli 0.51.0 → 0.54.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 (157) hide show
  1. package/package.json +13 -5
  2. package/lib/agent/commands.d.ts +0 -11
  3. package/lib/agent/commands.d.ts.map +0 -1
  4. package/lib/agent/commands.js +0 -173
  5. package/lib/agent/commands.js.map +0 -1
  6. package/lib/agent/connect.d.ts +0 -7
  7. package/lib/agent/connect.d.ts.map +0 -1
  8. package/lib/agent/connect.js +0 -66
  9. package/lib/agent/connect.js.map +0 -1
  10. package/lib/agent/docker-credential.d.ts +0 -2
  11. package/lib/agent/docker-credential.d.ts.map +0 -1
  12. package/lib/agent/docker-credential.js +0 -50
  13. package/lib/agent/docker-credential.js.map +0 -1
  14. package/lib/agent/docker.d.ts +0 -10
  15. package/lib/agent/docker.d.ts.map +0 -1
  16. package/lib/agent/docker.js +0 -93
  17. package/lib/agent/docker.js.map +0 -1
  18. package/lib/agent/index.d.ts +0 -3
  19. package/lib/agent/index.d.ts.map +0 -1
  20. package/lib/agent/index.js +0 -89
  21. package/lib/agent/index.js.map +0 -1
  22. package/lib/agent/project.d.ts +0 -58
  23. package/lib/agent/project.d.ts.map +0 -1
  24. package/lib/agent/project.js +0 -148
  25. package/lib/agent/project.js.map +0 -1
  26. package/lib/agent/refresh.d.ts +0 -6
  27. package/lib/agent/refresh.d.ts.map +0 -1
  28. package/lib/agent/refresh.js +0 -27
  29. package/lib/agent/refresh.js.map +0 -1
  30. package/lib/agent/registry.d.ts +0 -7
  31. package/lib/agent/registry.d.ts.map +0 -1
  32. package/lib/agent/registry.js +0 -47
  33. package/lib/agent/registry.js.map +0 -1
  34. package/lib/agent/version.d.ts +0 -2
  35. package/lib/agent/version.d.ts.map +0 -1
  36. package/lib/agent/version.js +0 -4
  37. package/lib/agent/version.js.map +0 -1
  38. package/lib/client.d.ts +0 -4
  39. package/lib/client.d.ts.map +0 -1
  40. package/lib/client.js +0 -22
  41. package/lib/client.js.map +0 -1
  42. package/lib/codegen/CodeBuilder.d.ts +0 -16
  43. package/lib/codegen/CodeBuilder.d.ts.map +0 -1
  44. package/lib/codegen/CodeBuilder.js +0 -115
  45. package/lib/codegen/CodeBuilder.js.map +0 -1
  46. package/lib/codegen/InteractionVersion.d.ts +0 -29
  47. package/lib/codegen/InteractionVersion.d.ts.map +0 -1
  48. package/lib/codegen/InteractionVersion.js +0 -94
  49. package/lib/codegen/InteractionVersion.js.map +0 -1
  50. package/lib/codegen/index.d.ts +0 -3
  51. package/lib/codegen/index.d.ts.map +0 -1
  52. package/lib/codegen/index.js +0 -24
  53. package/lib/codegen/index.js.map +0 -1
  54. package/lib/codegen/template.d.ts +0 -3
  55. package/lib/codegen/template.d.ts.map +0 -1
  56. package/lib/codegen/template.js +0 -28
  57. package/lib/codegen/template.js.map +0 -1
  58. package/lib/codegen/utils.d.ts +0 -2
  59. package/lib/codegen/utils.d.ts.map +0 -1
  60. package/lib/codegen/utils.js +0 -4
  61. package/lib/codegen/utils.js.map +0 -1
  62. package/lib/datagen/index.d.ts +0 -3
  63. package/lib/datagen/index.d.ts.map +0 -1
  64. package/lib/datagen/index.js +0 -52
  65. package/lib/datagen/index.js.map +0 -1
  66. package/lib/envs/index.d.ts +0 -3
  67. package/lib/envs/index.d.ts.map +0 -1
  68. package/lib/envs/index.js +0 -24
  69. package/lib/envs/index.js.map +0 -1
  70. package/lib/index.d.ts +0 -2
  71. package/lib/index.d.ts.map +0 -1
  72. package/lib/index.js +0 -177
  73. package/lib/index.js.map +0 -1
  74. package/lib/interactions/index.d.ts +0 -3
  75. package/lib/interactions/index.d.ts.map +0 -1
  76. package/lib/interactions/index.js +0 -37
  77. package/lib/interactions/index.js.map +0 -1
  78. package/lib/memory/index.d.ts +0 -3
  79. package/lib/memory/index.d.ts.map +0 -1
  80. package/lib/memory/index.js +0 -16
  81. package/lib/memory/index.js.map +0 -1
  82. package/lib/objects/commands.d.ts +0 -14
  83. package/lib/objects/commands.d.ts.map +0 -1
  84. package/lib/objects/commands.js +0 -240
  85. package/lib/objects/commands.js.map +0 -1
  86. package/lib/objects/index.d.ts +0 -3
  87. package/lib/objects/index.d.ts.map +0 -1
  88. package/lib/objects/index.js +0 -37
  89. package/lib/objects/index.js.map +0 -1
  90. package/lib/package.d.ts +0 -8
  91. package/lib/package.d.ts.map +0 -1
  92. package/lib/package.js +0 -63
  93. package/lib/package.js.map +0 -1
  94. package/lib/profiles/commands.d.ts +0 -20
  95. package/lib/profiles/commands.d.ts.map +0 -1
  96. package/lib/profiles/commands.js +0 -191
  97. package/lib/profiles/commands.js.map +0 -1
  98. package/lib/profiles/index.d.ts +0 -65
  99. package/lib/profiles/index.d.ts.map +0 -1
  100. package/lib/profiles/index.js +0 -318
  101. package/lib/profiles/index.js.map +0 -1
  102. package/lib/profiles/server/cors.d.ts +0 -3
  103. package/lib/profiles/server/cors.d.ts.map +0 -1
  104. package/lib/profiles/server/cors.js +0 -18
  105. package/lib/profiles/server/cors.js.map +0 -1
  106. package/lib/profiles/server/index.d.ts +0 -12
  107. package/lib/profiles/server/index.d.ts.map +0 -1
  108. package/lib/profiles/server/index.js +0 -73
  109. package/lib/profiles/server/index.js.map +0 -1
  110. package/lib/profiles/server/server.d.ts +0 -4
  111. package/lib/profiles/server/server.d.ts.map +0 -1
  112. package/lib/profiles/server/server.js +0 -32
  113. package/lib/profiles/server/server.js.map +0 -1
  114. package/lib/projects/index.d.ts +0 -3
  115. package/lib/projects/index.d.ts.map +0 -1
  116. package/lib/projects/index.js +0 -13
  117. package/lib/projects/index.js.map +0 -1
  118. package/lib/run/executor.d.ts +0 -20
  119. package/lib/run/executor.d.ts.map +0 -1
  120. package/lib/run/executor.js +0 -118
  121. package/lib/run/executor.js.map +0 -1
  122. package/lib/run/index.d.ts +0 -3
  123. package/lib/run/index.d.ts.map +0 -1
  124. package/lib/run/index.js +0 -139
  125. package/lib/run/index.js.map +0 -1
  126. package/lib/runs/index.d.ts +0 -3
  127. package/lib/runs/index.d.ts.map +0 -1
  128. package/lib/runs/index.js +0 -48
  129. package/lib/runs/index.js.map +0 -1
  130. package/lib/utils/console.d.ts +0 -38
  131. package/lib/utils/console.d.ts.map +0 -1
  132. package/lib/utils/console.js +0 -191
  133. package/lib/utils/console.js.map +0 -1
  134. package/lib/utils/stdio.d.ts +0 -7
  135. package/lib/utils/stdio.d.ts.map +0 -1
  136. package/lib/utils/stdio.js +0 -35
  137. package/lib/utils/stdio.js.map +0 -1
  138. package/lib/workflows/commands.d.ts +0 -14
  139. package/lib/workflows/commands.d.ts.map +0 -1
  140. package/lib/workflows/commands.js +0 -196
  141. package/lib/workflows/commands.js.map +0 -1
  142. package/lib/workflows/index.d.ts +0 -3
  143. package/lib/workflows/index.d.ts.map +0 -1
  144. package/lib/workflows/index.js +0 -89
  145. package/lib/workflows/index.js.map +0 -1
  146. package/lib/workflows/json-loader.d.ts +0 -3
  147. package/lib/workflows/json-loader.d.ts.map +0 -1
  148. package/lib/workflows/json-loader.js +0 -16
  149. package/lib/workflows/json-loader.js.map +0 -1
  150. package/lib/workflows/ts-loader.d.ts +0 -3
  151. package/lib/workflows/ts-loader.d.ts.map +0 -1
  152. package/lib/workflows/ts-loader.js +0 -94
  153. package/lib/workflows/ts-loader.js.map +0 -1
  154. package/lib/workflows/validation.d.ts +0 -6
  155. package/lib/workflows/validation.d.ts.map +0 -1
  156. package/lib/workflows/validation.js +0 -22
  157. package/lib/workflows/validation.js.map +0 -1
@@ -1,94 +0,0 @@
1
- import { InteractionStatus, mergePromptsSchema } from "@vertesia/common";
2
- import { compile as compileSchema } from 'json-schema-to-typescript';
3
- import { join } from 'path';
4
- import { writeFile } from "../utils/stdio.js";
5
- import { processTemplate } from "./template.js";
6
- import { textToPascalCase } from "./utils.js";
7
- export function processInteractionTemplate(vars) {
8
- return processTemplate('interaction', { ...vars, date: new Date().toISOString() });
9
- }
10
- export class InteractionVersion {
11
- constructor(interaction) {
12
- Object.defineProperty(this, "interaction", {
13
- enumerable: true,
14
- configurable: true,
15
- writable: true,
16
- value: interaction
17
- });
18
- Object.defineProperty(this, "isDraft", {
19
- enumerable: true,
20
- configurable: true,
21
- writable: true,
22
- value: void 0
23
- });
24
- Object.defineProperty(this, "className", {
25
- enumerable: true,
26
- configurable: true,
27
- writable: true,
28
- value: void 0
29
- });
30
- this.isDraft = interaction.status === InteractionStatus.draft;
31
- this.className = textToPascalCase(interaction.name || '__Unknown');
32
- }
33
- get isLatest() {
34
- //TODO we no more support the latest version
35
- return false;
36
- //return this.interaction.latest;
37
- }
38
- get versionName() {
39
- return this.isDraft ? 'draft' : `v${this.interaction.version}`;
40
- }
41
- get fileName() {
42
- return `${this.versionName}.ts`;
43
- }
44
- async build(dir, opts) {
45
- const file = join(dir, this.fileName);
46
- writeFile(file, await this.genCode(opts));
47
- return file;
48
- }
49
- async genCode(opts) {
50
- const interaction = this.interaction;
51
- const className = this.className;
52
- const inputSchema = mergePromptsSchema(interaction);
53
- const outputSchema = interaction.result_schema;
54
- const out = [];
55
- const types = [];
56
- let inputTypeName = "any";
57
- let outputTypeName = "any";
58
- if (inputSchema) {
59
- inputTypeName = className + 'Props';
60
- const schemaType = await compileSchema(inputSchema, inputTypeName, {
61
- bannerComment: '',
62
- style: {
63
- tabWidth: 4,
64
- },
65
- additionalProperties: false
66
- });
67
- types.push(`/**\n * ${interaction.name} input type\n */`, schemaType);
68
- }
69
- if (outputSchema) {
70
- outputTypeName = className + 'Result';
71
- const schemaType = await compileSchema(outputSchema, outputTypeName, {
72
- bannerComment: '',
73
- style: {
74
- tabWidth: 4,
75
- },
76
- additionalProperties: false
77
- });
78
- types.push(`/**\n * ${interaction.name} result type\n */`, schemaType);
79
- }
80
- const vars = {
81
- className: className,
82
- id: interaction.id,
83
- projectId: opts.project,
84
- inputType: inputTypeName,
85
- outputType: outputTypeName,
86
- doc: interaction.description ? `${interaction.name}\n${interaction.description}` : interaction.name,
87
- date: new Date().toISOString(),
88
- types: types.join('\n')
89
- };
90
- out.push(processInteractionTemplate(vars));
91
- return out.join('\n');
92
- }
93
- }
94
- //# sourceMappingURL=InteractionVersion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InteractionVersion.js","sourceRoot":"","sources":["../../src/codegen/InteractionVersion.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACnG,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAmB9C,MAAM,UAAU,0BAA0B,CAAC,IAA6B;IACpE,OAAO,eAAe,CAAC,aAAa,EAAE,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACvF,CAAC;AAED,MAAM,OAAO,kBAAkB;IAK3B,YAAmB,WAAqC;QAA5C;;;;mBAAO,WAAW;WAA0B;QAHxD;;;;;WAAiB;QACjB;;;;;WAAkB;QAGd,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC,MAAM,KAAK,iBAAiB,CAAC,KAAK,CAAC;QAC9D,IAAI,CAAC,SAAS,GAAG,gBAAgB,CAAC,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,QAAQ;QACR,4CAA4C;QAC5C,OAAO,KAAK,CAAC;QACb,iCAAiC;IACrC,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;IACnE,CAAC;IACD,IAAI,QAAQ;QACR,OAA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AQ,EAAE,CAAC;iBACd;gBACD,oBAAoB,EAAE,KAAK;aAC9B,CAAC,CAAC;YACH,KAAK,CAAC,IAAI,CAAC,WAAW,WAAW,CAAC,IAAI,mBAAmB,EAAE,UAAU,CAAC,CAAC;QAC3E,CAAC;QACD,MAAM,IAAI,GAA4B;YAClC,SAAS,EAAE,SAAS;YACpB,EAAE,EAAE,WAAW,CAAC,EAAE;YAClB,SAAS,EAAE,IAAI,CAAC,OAAO;YACvB,SAAS,EAAE,aAAa;YACxB,UAAU,EAAE,cAAc;YAC1B,GAAG,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,IAAI,KAAK,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI;YACnG,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YAC9B,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;SAC1B,CAAC;QACF,GAAG,CAAC,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC,CAAC;QAE3C,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACJ"}
@@ -1,3 +0,0 @@
1
- import { Command } from "commander";
2
- export default function runExport(program: Command, interactionName: string | undefined, options: Record<string, any>): void;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/codegen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAuBpH"}
@@ -1,24 +0,0 @@
1
- import { getClient } from "../client.js";
2
- import { CodeBuilder } from "./CodeBuilder.js";
3
- export default function runExport(program, interactionName, options) {
4
- const client = getClient(program);
5
- if (!client.project) {
6
- console.error('No project id specified');
7
- process.exit(1);
8
- }
9
- const tags = options.tags ? options.tags.split(/\s*,\s*/) : undefined;
10
- const versions = options.versions ? options.versions.split(/\s*,\s*/) : ["draft", "latest"];
11
- const payload = {
12
- name: interactionName,
13
- tags: tags,
14
- versions: options.all ? [] : versions,
15
- };
16
- client.interactions.export(payload).then((interactions) => {
17
- new CodeBuilder().build(interactions, {
18
- dir: options.dir,
19
- project: client.project,
20
- exportVersion: options.export || undefined,
21
- });
22
- });
23
- }
24
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/codegen/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,OAAgB,EAAE,eAAmC,EAAE,OAA4B;IACjH,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IAElC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;QACzC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACtE,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAE5F,MAAM,OAAO,GAAG;QACZ,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;KACxC,CAAA;IACD,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE;QACtD,IAAI,WAAW,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE;YAClC,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,OAAO,EAAE,MAAM,CAAC,OAAQ;YACxB,aAAa,EAAE,OAAO,CAAC,MAAM,IAAI,SAAS;SAC7C,CAAC,CAAC;IACP,CAAC,CAAC,CAAA;AACN,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare function expandVariables(template: string, vars: Record<string, string>): string;
2
- export declare function processTemplate(name: string, vars: Record<string, string>): string;
3
- //# sourceMappingURL=template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/codegen/template.ts"],"names":[],"mappings":"AAOA,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAS7E;AAWD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAGzE"}
@@ -1,28 +0,0 @@
1
- import { readFileSync } from 'fs';
2
- import { packageDir } from '../package.js';
3
- const EXPR_RX = /\{\{\s*[a-zA-Z_][a-zA-Z_0-9]*\s*\}\}/g;
4
- const TEMPLATES = {};
5
- export function expandVariables(template, vars) {
6
- return template.replace(EXPR_RX, (match) => {
7
- const key = match.substring(2, match.length - 2).trim();
8
- if (key in vars) {
9
- return vars[key] || '';
10
- }
11
- else {
12
- return match;
13
- }
14
- });
15
- }
16
- function loadTemplate(name) {
17
- let content = TEMPLATES[name];
18
- if (!content) {
19
- content = readFileSync(`${packageDir}/templates/${name}.tpl`, 'utf8');
20
- TEMPLATES[name] = content;
21
- }
22
- return content;
23
- }
24
- export function processTemplate(name, vars) {
25
- const content = loadTemplate(name);
26
- return expandVariables(content, vars);
27
- }
28
- //# sourceMappingURL=template.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"template.js","sourceRoot":"","sources":["../../src/codegen/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,OAAO,GAAG,uCAAuC,CAAA;AAEvD,MAAM,SAAS,GAA2B,EAAE,CAAC;AAE7C,MAAM,UAAU,eAAe,CAAC,QAAgB,EAAE,IAA4B;IAC1E,OAAO,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;QACvC,MAAM,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;QACvD,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACd,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAA;QAC1B,CAAC;aAAM,CAAC;YACJ,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC,CAAC,CAAA;AACN,CAAC;AAED,SAAS,YAAY,CAAC,IAAY;IAC9B,IAAI,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,OAAO,GAAG,YAAY,CAAC,GAAG,UAAU,cAAc,IAAI,MAAM,EAAE,MAAM,CAAC,CAAA;QACrE,SAAS,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;IAC9B,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,IAA4B;IACtE,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACnC,OAAO,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC1C,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function textToPascalCase(text: string): string;
2
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/codegen/utils.ts"],"names":[],"mappings":"AACA,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,UAE5C"}
@@ -1,4 +0,0 @@
1
- export function textToPascalCase(text) {
2
- return text.trim().split(/\W/).map(w => w ? w[0].toUpperCase() + w.substring(1) : '').join('');
3
- }
4
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/codegen/utils.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,gBAAgB,CAAC,IAAY;IACzC,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAClG,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function genTestData(program: Command, interactionId: string, options: Record<string, any>): void;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/datagen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAapC,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QA0ChG"}
@@ -1,52 +0,0 @@
1
- import { resolve } from "path";
2
- import { getClient } from "../client.js";
3
- import { Spinner, restoreCursotOnExit } from "../utils/console.js";
4
- import { writeJsonFile } from "../utils/stdio.js";
5
- import { ConfigModes } from "@vertesia/common";
6
- function convertConfigMode(raw_config_mode) {
7
- const configStr = typeof raw_config_mode === 'string' ? raw_config_mode.toUpperCase() : "";
8
- return Object.values(ConfigModes).includes(configStr) ? configStr : undefined;
9
- }
10
- export function genTestData(program, interactionId, options) {
11
- const count = options.count ? parseInt(options.count) : 1;
12
- const message = options.message || undefined;
13
- const output = options.output || undefined;
14
- const spinner = new Spinner('dots');
15
- spinner.prefix = "Generating data. Please be patient ";
16
- spinner.start();
17
- //TODO: Support for other modalities, like images
18
- const model_options = {
19
- _option_id: "text-fallback",
20
- temperature: typeof options.temperature === 'string' ? parseFloat(options.temperature) : undefined,
21
- max_tokens: typeof options.maxTokens === 'string' ? parseInt(options.maxTokens) : undefined,
22
- top_p: typeof options.topP === 'string' ? parseFloat(options.topP) : undefined,
23
- top_k: typeof options.topK === 'string' ? parseInt(options.topK) : undefined,
24
- presence_penalty: typeof options.presencePenalty === 'string' ? parseFloat(options.presencePenalty) : undefined,
25
- frequency_penalty: typeof options.frequencyPenalty === 'string' ? parseFloat(options.frequencyPenalty) : undefined,
26
- stop_sequence: options.stopSequence ? options.stopSequence.trim().split(/\s*,\s*/) : undefined,
27
- };
28
- getClient(program).interactions.generateTestData(interactionId, {
29
- count,
30
- message,
31
- config: {
32
- environment: options.env,
33
- model: options.model || undefined,
34
- model_options: model_options,
35
- configMode: convertConfigMode(options.configMode),
36
- }
37
- }).then((result) => {
38
- spinner.done();
39
- if (output) {
40
- const file = resolve(output);
41
- writeJsonFile(file, result);
42
- console.log('Data saved in: ', output);
43
- }
44
- console.log();
45
- console.log(result);
46
- }).catch(err => {
47
- spinner.done(false);
48
- console.log('Failed to generate data:', err.message);
49
- });
50
- }
51
- restoreCursotOnExit();
52
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 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EAAE,EAAE;QACf,OAAO,CAAC,IAAI,EAAE,CAAC;QACf,IAAI,MAAM,EAAE,CAAC;YACT,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;YAC7B,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAC5B,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;QAC3C,CAAC;QACD,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;QACX,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;AACP,CAAC;AAED,mBAAmB,EAAE,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function listEnvirnments(program: Command, envId: string | undefined, options: Record<string, any>): void;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/envs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAYxG"}
package/lib/envs/index.js DELETED
@@ -1,24 +0,0 @@
1
- import { getClient } from "../client.js";
2
- import colors from "ansi-colors";
3
- export function listEnvirnments(program, envId, options) {
4
- if (envId) {
5
- getClient(program).environments.retrieve(envId).then((env) => {
6
- printEnv(env, options);
7
- });
8
- }
9
- else {
10
- getClient(program).environments.list().then((environments) => {
11
- environments.map(env => {
12
- console.log(env.name + ` [${env.id}]`);
13
- });
14
- });
15
- }
16
- }
17
- function printEnv(env, _options) {
18
- console.log(colors.bold(env.name) + " [" + env.id + "]");
19
- console.log(colors.bold("Provider:"), env.provider);
20
- console.log(colors.bold("Description:"), env.description || 'n/a');
21
- console.log(colors.bold("Default Model:"), env.default_model);
22
- console.log(colors.bold("Enabled Models:"), env.enabled_models && env.enabled_models.length > 0 ? env.enabled_models.map(model => model.name).join(", ") : "n/a");
23
- }
24
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/envs/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,MAAM,MAAM,aAAa,CAAC;AAGjC,MAAM,UAAU,eAAe,CAAC,OAAgB,EAAE,KAAyB,EAAE,OAA4B;IACrG,IAAI,KAAK,EAAE,CAAC;QACR,SAAS,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACzD,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;IACP,CAAC;SAAM,CAAC;QACJ,SAAS,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE;YACzD,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBACnB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,GAAG,KAAK,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;YAC3C,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACN,CAAC;AACL,CAAC;AAGD,SAAS,QAAQ,CAAC,GAAyB,EAAE,QAA6B;IACtE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,CAAA;IACxD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACpD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,GAAG,CAAC,WAAW,IAAI,KAAK,CAAC,CAAC;IACnE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;IAC9D,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,GAAG,CAAC,cAAc,IAAI,GAAG,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACtK,CAAC"}
package/lib/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/lib/index.js DELETED
@@ -1,177 +0,0 @@
1
- import { setupMemoCommand } from '@vertesia/memory-cli';
2
- import { Command } from 'commander';
3
- import { registerAgentCommand } from './agent/index.js';
4
- import runExport from './codegen/index.js';
5
- import { genTestData } from './datagen/index.js';
6
- import { listEnvirnments } from './envs/index.js';
7
- import { listInteractions } from './interactions/index.js';
8
- import { getPublishMemoryAction } from './memory/index.js';
9
- import { registerObjectsCommand } from './objects/index.js';
10
- import { getVersion, upgrade } from './package.js';
11
- import { createProfile, deleteProfile, listProfiles, showActiveAuthToken, showProfile, tryRrefreshToken, updateCurrentProfile, updateProfile, useProfile } from './profiles/commands.js';
12
- import { getConfigFile } from './profiles/index.js';
13
- import { listProjects } from './projects/index.js';
14
- import runInteraction from './run/index.js';
15
- import { runHistory } from './runs/index.js';
16
- import { registerWorkflowsCommand } from './workflows/index.js';
17
- //warnIfNotLatest();
18
- const program = new Command();
19
- program.version(getVersion());
20
- program.command("upgrade")
21
- .description("Upgrade to the latest version of the CLI")
22
- .option("-y, --yes", "Skip the confirmation prompt")
23
- .action((options = {}) => upgrade(options.yes));
24
- program.command("projects")
25
- .description("List the projects you have access to")
26
- .action(() => {
27
- listProjects(program);
28
- });
29
- const authRoot = program.command("auth")
30
- .description("Manage authentication");
31
- authRoot.command("token")
32
- .description("Show the auth token used by the current selected profile.")
33
- .action(() => {
34
- showActiveAuthToken();
35
- });
36
- authRoot.command("refresh")
37
- .description("Refresh the auth token used by the current profile. An alias to 'composable profiles refresh'.")
38
- .action(() => {
39
- updateCurrentProfile();
40
- });
41
- program.command("envs [envId]")
42
- .description("List the environments you have access to")
43
- .action((envId, options) => {
44
- listEnvirnments(program, envId, options);
45
- });
46
- program.command("interactions [interaction]")
47
- .description("List the interactions available in the current project")
48
- .action((interactionId, options) => {
49
- listInteractions(program, interactionId, options);
50
- });
51
- program.command("datagen <interaction>")
52
- .description("Generate test input data, given an interaction ID")
53
- .option('-e, --env [envId]', 'The environment ID to use to generating the test data')
54
- .option('-m, --model [model]', 'The model to use to generating the test data. If the selected environment has a default model then this option is optional.')
55
- .option('-t, --temperature [value]', 'The temperature used to generating the test data.')
56
- .option('--max-tokens [max-tokens]', 'The maximum number of tokens to generate')
57
- .option('--top-p [top-p]', 'The top P value to use')
58
- .option('--top-k [top-k]', 'The top K value to use')
59
- .option('--presence-penalty [presence-penalty]', 'The presence penalty value to use')
60
- .option('--frequency-penalty [frequency-penalty]', 'The frequency penalty value to use')
61
- .option('--stop-sequence [stop-sequence]', 'A comma separated list of sequences to stop the generation')
62
- .option('--config-mode [config-mode]', 'The configuration mode to use.Possible values are: "run_and_interaction_config", "run_config_only", "interaction_config_only". Optional. If not specified, "run_and_interaction_config" is used.')
63
- .option('-o, --output [file]', 'A file to save the generated test data. If not specified the data will be printed to stdout.')
64
- .option('-c, --count [value]', 'The number of data objects to generate', '1')
65
- .option('--message [value]', 'An optional message')
66
- .action((interactionId, options) => {
67
- genTestData(program, interactionId, options);
68
- });
69
- program.command("codegen [interactionName]")
70
- .description("Generate code given an interaction name of for all the interactions in the project if no interaction is specified.")
71
- .option('--versions [versions]', 'A comma separated list of version selectors to include. A version selector is either a version number or one of the "draft" or "latest" keywords. The default is "draft, latest"', "draft,latest")
72
- .option('-a, -all', 'When used, all the interaction versions will be exported')
73
- .option('-d, --dir [file]', 'The output directory if any. Default to "./interactions" if not specified.', './interactions')
74
- .option('-x, --export <version>', 'The version to export from index.ts. If not specified, the latest version will be exported or if no version is available, the draft version will be exported')
75
- .action((interactionName, options) => runExport(program, interactionName, options));
76
- program.command("run <interaction>")
77
- .description("Run an interaction by full name. The full name is composed by an optional namespace, a required endpoint name and an optional tag or version. Examples: name, namespace:name, namespace:name@version")
78
- .option('-i, --input [file]', 'The input data if any. If no file path is specified it will read from stdin')
79
- .option('-o, --output [file]', 'The output file if any. If not specified it will print to stdout')
80
- .option('-d, --data [json]', 'Inline data as a JSON string. If specified takes precendence over --input')
81
- .option('-T, --tags [tags]', 'A comma separated list of tags to add to the execution run')
82
- .option('-t, --temperature [temperature]', 'The temperature to use')
83
- .option('--max-tokens [max-tokens]', 'The maximum number of tokens to generate')
84
- .option('--top-p [top-p]', 'The top P value to use')
85
- .option('--top-k [top-k]', 'The top K value to use')
86
- .option('--presence-penalty [presence-penalty]', 'The presence penalty value to use')
87
- .option('--frequency-penalty [frequency-penalty]', 'The frequency penalty value to use')
88
- .option('--stop-sequence [stop-sequence]', 'A comma separated list of sequences to stop the generation')
89
- .option('--config-mode [config-mode]', 'The configuration mode to use.Possible values are: "run_and_interaction_config", "run_config_only", "interaction_config_only". Optional. If not specified, "run_and_interaction_config" is used.')
90
- .option('-m, --model [model]', 'The model to use. Optional.')
91
- .option('-e, --env [environmentId]', 'The environment Id to use. Optional.')
92
- .option('-S, --no-stream', 'When used, the output will be printed only when the execution is complete')
93
- .option('-c, --count [count]', 'The number of times to run the interaction', '1')
94
- .option('-v, --verbose', 'Only used in no streaming mode. Instead of printing a progress it will print details about each executed run.')
95
- .option('--jsonl', 'Write output in jsonl. The default is to write the json. Ignored when only one run is executed')
96
- .option('--data-only', 'Write down only the data returned by the LLM and not the entire execution run. This mode is forced when streaming', false)
97
- .option('-r, --run-data [level]', 'Override the level of storage for the run data. Possible values are: "standard", "restricted", or "debug". Optional. If not specified, it uses the level defined in Studio.')
98
- .option('--by-id', 'When used, the interaction is selected by ID instead of by name')
99
- .action((interaction, options) => runInteraction(program, interaction, options));
100
- program.command("runs [interactionId]")
101
- .description('Search the run history for specific execution runs')
102
- .option('-t, --tags [tags]', 'A comma separated list of tags to filter the run history')
103
- .option('--status [status]', 'A status to filter on')
104
- .option('-e, --env [environmentId]', 'Filter by environment')
105
- .option('-m, --model [model]', 'Filter by model')
106
- .option('-q, --query [query]', 'A lucene query')
107
- .option('-l, --limit [limit]', 'The maximum number of runs to return in a page', "100")
108
- .option('-P, --page [page]', 'The page number to return (starting from 0)', "0")
109
- .option('-f, --format [format]', 'The output format: json, jsonl or csv.', 'json')
110
- .option("-o, --output [file]", "The output file if any. If not specified it will print to stdout")
111
- .option("--before [date]", "Filter runs before the given date. The date must be in ISO format")
112
- .option("--after [date]", "Filter runs after the given date. The date must be in ISO format")
113
- .action((interactionId, options) => {
114
- runHistory(program, interactionId, options);
115
- });
116
- const memoCmd = program.command("memo");
117
- setupMemoCommand(memoCmd, getPublishMemoryAction(program));
118
- registerAgentCommand(program);
119
- const profilesRoot = program.command("profiles")
120
- .description("Manage configuration profiles")
121
- .action(() => {
122
- listProfiles();
123
- });
124
- profilesRoot.command('show [name]')
125
- .description("Show the configured profiles or the profile with the given name")
126
- .action((name) => {
127
- showProfile(name);
128
- });
129
- profilesRoot.command('use [name]')
130
- .description("Switch to another configuration profile")
131
- .action((name) => {
132
- useProfile(name);
133
- });
134
- profilesRoot.command('add [name]')
135
- .alias('create')
136
- .option("-t, --target <env>", "The target environment for the profile. Possible values are: local, dev, staging, prod or an URL for custom servers.")
137
- .option("-k, --apikey <key>", "The API key to use for the profile")
138
- .option("-p, --project <project>", "The project ID to use for the profile")
139
- .option("-a, --account <account>", "The account ID to use for the profile")
140
- .description("Create a new configuration profile")
141
- .action((name, options) => {
142
- createProfile(name, options || {});
143
- });
144
- profilesRoot.command('edit [name]')
145
- .alias('update')
146
- .description("Edit an existing configuration profile")
147
- .action((name) => {
148
- updateProfile(name);
149
- });
150
- profilesRoot.command('refresh')
151
- .description("Refresh token for the current configuration profile")
152
- .action(() => {
153
- updateCurrentProfile();
154
- });
155
- profilesRoot.command('delete <name>')
156
- .description("delete an existing configuration profile")
157
- .action((name) => {
158
- deleteProfile(name);
159
- });
160
- profilesRoot.command('file')
161
- .description("print the configuration file path")
162
- .action(() => {
163
- console.log(getConfigFile('profiles.json'));
164
- });
165
- registerObjectsCommand(program);
166
- registerWorkflowsCommand(program);
167
- program.parseAsync(process.argv).catch(err => {
168
- console.error(err);
169
- process.exit(1);
170
- });
171
- process.on("unhandledRejection", (err) => {
172
- if (err.status === 401) { // token expired?
173
- console.error("ERROROR", err);
174
- tryRrefreshToken();
175
- }
176
- });
177
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,eAAe,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AC,CAAC,CAAC;AAEH,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,GAAQ,EAAE,EAAE;IAC1C,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC,CAAC,iBAAiB;QACvC,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;QAC9B,gBAAgB,EAAE,CAAC;IACvB,CAAC;AACL,CAAC,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function listInteractions(program: Command, interactionId: string | undefined, options: Record<string, any>): Promise<void>;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interactions/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,iBAkBjH"}
@@ -1,37 +0,0 @@
1
- import { InteractionStatus } from "@vertesia/common";
2
- import colors from "ansi-colors";
3
- import { getClient } from "../client.js";
4
- import { textToPascalCase } from "../codegen/utils.js";
5
- export function listInteractions(program, interactionId, options) {
6
- const client = getClient(program);
7
- if (!interactionId) {
8
- return client.interactions.list().then((interactions) => {
9
- interactions.map(interaction => {
10
- console.log(textToPascalCase(interaction.name) + ` [${interaction.id}]`);
11
- });
12
- });
13
- }
14
- return client.interactions.retrieve(interactionId).then((interaction) => {
15
- if (interaction.status === InteractionStatus.draft) {
16
- client.interactions.listVersions(interactionId).then((versions) => {
17
- printInteraction(interaction, versions, options);
18
- });
19
- }
20
- else {
21
- printInteraction(interaction, [], options);
22
- }
23
- });
24
- }
25
- function printInteraction(interaction, versions, _options) {
26
- console.log(colors.bold(interaction.name) + " [" + interaction.id + "]");
27
- console.log(colors.bold("Description:"), interaction.description || 'n/a');
28
- console.log(colors.bold("Class name:"), textToPascalCase(interaction.name));
29
- console.log(colors.bold("Status:"), interaction.status);
30
- console.log(colors.bold("Version:"), interaction.version);
31
- console.log(colors.bold("Tags:"), interaction.tags && interaction.tags.length > 0 ? interaction.tags.join(", ") : "n/a");
32
- if (interaction.status === InteractionStatus.draft) {
33
- versions.sort((a, b) => a.version - b.version);
34
- console.log(colors.bold("Published Versions:"), versions.length > 0 ? versions.map(v => v.version).join(", ") : "n/a");
35
- }
36
- }
37
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interactions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAClF,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,UAAU,gBAAgB,CAAC,OAAgB,EAAE,aAAiC,EAAE,OAA4B;IAC9G,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IAClC,IAAI,CAAC,aAAa,EAAE,CAAC;QACjB,OAAO,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE;YACpD,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;gBAC3B,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,KAAK,WAAW,CAAC,EAAE,GAAG,CAAC,CAAC;YAC7E,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;IACD,OAAO,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE;QACpE,IAAI,WAAW,CAAC,MAAM,K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AC,CAAC;IACzH,IAAI,WAAW,CAAC,MAAM,KAAK,iBAAiB,CAAC,KAAK,EAAE,CAAC;QACjD,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;QAC/C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC3H,CAAC;AACL,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function getPublishMemoryAction(program: Command): (file: string, name: string) => Promise<string>;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/memory/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,UACrC,MAAM,QAAQ,MAAM,qBAIrC"}
@@ -1,16 +0,0 @@
1
- import { StreamSource } from "@vertesia/client";
2
- import { createReadStream } from "fs";
3
- import { readableToWebStream } from "node-web-stream-adapters";
4
- import { getClient } from "../client.js";
5
- export function getPublishMemoryAction(program) {
6
- return (file, name) => {
7
- const client = getClient(program);
8
- return publishMemory(client, file, name);
9
- };
10
- }
11
- async function publishMemory(client, file, name) {
12
- const stream = readableToWebStream(createReadStream(file));
13
- const path = await client.files.uploadMemoryPack(new StreamSource(stream, name, "application/gzip"));
14
- return path;
15
- }
16
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/memory/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,IAAI,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,UAAU,sBAAsB,CAAC,OAAgB;IACnD,OAAO,CAAC,IAAY,EAAE,IAAY,EAAE,EAAE;QAClC,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;QAClC,OAAO,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7C,CAAC,CAAA;AACL,CAAC;AAED,KAAK,UAAU,aAAa,CAAC,MAAsB,EAAE,IAAY,EAAE,IAAY;IAC3E,MAAM,MAAM,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3D,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,YAAY,CAAC,MAAM,EACpE,IAAI,EACJ,kBAAkB,CACrB,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AAChB,CAAC"}
@@ -1,14 +0,0 @@
1
- import { VertesiaClient } from "@vertesia/client";
2
- import { ContentObject } from "@vertesia/common";
3
- import { Command } from "commander";
4
- export declare function createObject(program: Command, files: string[], options: Record<string, any>): Promise<void | "No files specified" | ContentObject<any>>;
5
- export declare function createObjectFromFiles(program: Command, files: string[], options: Record<string, any>): Promise<void>;
6
- export declare function createObjectFromFile(program: Command, file: string, options: Record<string, any>): Promise<ContentObject<any>>;
7
- export declare function createObjectFromLocalFile(client: VertesiaClient, file: string, options: Record<string, any>): Promise<ContentObject<any>>;
8
- export declare function updateObject(program: Command, objectId: string, type: string, _options: Record<string, any>): Promise<void>;
9
- export declare function deleteObject(program: Command, objectId: string, _options: Record<string, any>): Promise<void>;
10
- export declare function getObject(program: Command, objectId: string, _options: Record<string, any>): Promise<void>;
11
- export declare function listObjects(program: Command, folderPath: string | undefined, _options: Record<string, any>): Promise<void>;
12
- export declare function listTypes(program: Command): Promise<any[]>;
13
- export declare function findTypeValue(types: any[], name: string): any;
14
- //# sourceMappingURL=commands.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/objects/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAgB,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAqD,MAAM,kBAAkB,CAAC;AACpG,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkDpC,wBAAsB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,6DA0GjG;AAED,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,iBAS1G;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,+BAUtG;AAED,wBAAsB,yBAAyB,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,+BAkBjH;AAUD,wBAAsB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,iBAYjH;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM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