@vertesia/cli 0.82.1 → 0.82.3

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 (177) hide show
  1. package/lib/apps/commands.d.ts +11 -0
  2. package/lib/apps/commands.d.ts.map +1 -0
  3. package/lib/apps/commands.js +246 -0
  4. package/lib/apps/commands.js.map +1 -0
  5. package/lib/apps/index.d.ts +3 -0
  6. package/lib/apps/index.d.ts.map +1 -0
  7. package/lib/apps/index.js +93 -0
  8. package/lib/apps/index.js.map +1 -0
  9. package/lib/artifacts/commands.d.ts +6 -0
  10. package/lib/artifacts/commands.d.ts.map +1 -0
  11. package/lib/artifacts/commands.js +75 -0
  12. package/lib/artifacts/commands.js.map +1 -0
  13. package/lib/artifacts/index.d.ts +3 -0
  14. package/lib/artifacts/index.d.ts.map +1 -0
  15. package/lib/artifacts/index.js +33 -0
  16. package/lib/artifacts/index.js.map +1 -0
  17. package/lib/client.d.ts +12 -0
  18. package/lib/client.d.ts.map +1 -0
  19. package/lib/client.js +44 -0
  20. package/lib/client.js.map +1 -0
  21. package/lib/codegen/CodeBuilder.d.ts +16 -0
  22. package/lib/codegen/CodeBuilder.d.ts.map +1 -0
  23. package/lib/codegen/CodeBuilder.js +115 -0
  24. package/lib/codegen/CodeBuilder.js.map +1 -0
  25. package/lib/codegen/InteractionVersion.d.ts +29 -0
  26. package/lib/codegen/InteractionVersion.d.ts.map +1 -0
  27. package/lib/codegen/InteractionVersion.js +94 -0
  28. package/lib/codegen/InteractionVersion.js.map +1 -0
  29. package/lib/codegen/index.d.ts +3 -0
  30. package/lib/codegen/index.d.ts.map +1 -0
  31. package/lib/codegen/index.js +30 -0
  32. package/lib/codegen/index.js.map +1 -0
  33. package/lib/codegen/template.d.ts +3 -0
  34. package/lib/codegen/template.d.ts.map +1 -0
  35. package/lib/codegen/template.js +28 -0
  36. package/lib/codegen/template.js.map +1 -0
  37. package/lib/codegen/utils.d.ts +2 -0
  38. package/lib/codegen/utils.d.ts.map +1 -0
  39. package/lib/codegen/utils.js +4 -0
  40. package/lib/codegen/utils.js.map +1 -0
  41. package/lib/datagen/index.d.ts +3 -0
  42. package/lib/datagen/index.d.ts.map +1 -0
  43. package/lib/datagen/index.js +81 -0
  44. package/lib/datagen/index.js.map +1 -0
  45. package/lib/envs/index.d.ts +3 -0
  46. package/lib/envs/index.d.ts.map +1 -0
  47. package/lib/envs/index.js +23 -0
  48. package/lib/envs/index.js.map +1 -0
  49. package/lib/index.d.ts +2 -0
  50. package/lib/index.d.ts.map +1 -0
  51. package/lib/index.js +181 -0
  52. package/lib/index.js.map +1 -0
  53. package/lib/interactions/index.d.ts +3 -0
  54. package/lib/interactions/index.d.ts.map +1 -0
  55. package/lib/interactions/index.js +35 -0
  56. package/lib/interactions/index.js.map +1 -0
  57. package/lib/memory/index.d.ts +3 -0
  58. package/lib/memory/index.d.ts.map +1 -0
  59. package/lib/memory/index.js +15 -0
  60. package/lib/memory/index.js.map +1 -0
  61. package/lib/objects/commands.d.ts +15 -0
  62. package/lib/objects/commands.d.ts.map +1 -0
  63. package/lib/objects/commands.js +273 -0
  64. package/lib/objects/commands.js.map +1 -0
  65. package/lib/objects/index.d.ts +3 -0
  66. package/lib/objects/index.d.ts.map +1 -0
  67. package/lib/objects/index.js +43 -0
  68. package/lib/objects/index.js.map +1 -0
  69. package/lib/package.d.ts +8 -0
  70. package/lib/package.d.ts.map +1 -0
  71. package/lib/package.js +63 -0
  72. package/lib/package.js.map +1 -0
  73. package/lib/profiles/commands.d.ts +20 -0
  74. package/lib/profiles/commands.d.ts.map +1 -0
  75. package/lib/profiles/commands.js +191 -0
  76. package/lib/profiles/commands.js.map +1 -0
  77. package/lib/profiles/index.d.ts +65 -0
  78. package/lib/profiles/index.d.ts.map +1 -0
  79. package/lib/profiles/index.js +324 -0
  80. package/lib/profiles/index.js.map +1 -0
  81. package/lib/profiles/server/cors.d.ts +3 -0
  82. package/lib/profiles/server/cors.d.ts.map +1 -0
  83. package/lib/profiles/server/cors.js +18 -0
  84. package/lib/profiles/server/cors.js.map +1 -0
  85. package/lib/profiles/server/index.d.ts +12 -0
  86. package/lib/profiles/server/index.d.ts.map +1 -0
  87. package/lib/profiles/server/index.js +134 -0
  88. package/lib/profiles/server/index.js.map +1 -0
  89. package/lib/profiles/server/server.d.ts +4 -0
  90. package/lib/profiles/server/server.d.ts.map +1 -0
  91. package/lib/profiles/server/server.js +32 -0
  92. package/lib/profiles/server/server.js.map +1 -0
  93. package/lib/projects/index.d.ts +3 -0
  94. package/lib/projects/index.d.ts.map +1 -0
  95. package/lib/projects/index.js +17 -0
  96. package/lib/projects/index.js.map +1 -0
  97. package/lib/run/executor.d.ts +22 -0
  98. package/lib/run/executor.d.ts.map +1 -0
  99. package/lib/run/executor.js +182 -0
  100. package/lib/run/executor.js.map +1 -0
  101. package/lib/run/index.d.ts +3 -0
  102. package/lib/run/index.d.ts.map +1 -0
  103. package/lib/run/index.js +192 -0
  104. package/lib/run/index.js.map +1 -0
  105. package/lib/runs/index.d.ts +3 -0
  106. package/lib/runs/index.d.ts.map +1 -0
  107. package/lib/runs/index.js +48 -0
  108. package/lib/runs/index.js.map +1 -0
  109. package/lib/utils/console.d.ts +42 -0
  110. package/lib/utils/console.d.ts.map +1 -0
  111. package/lib/utils/console.js +256 -0
  112. package/lib/utils/console.js.map +1 -0
  113. package/lib/utils/stdio.d.ts +7 -0
  114. package/lib/utils/stdio.d.ts.map +1 -0
  115. package/lib/utils/stdio.js +35 -0
  116. package/lib/utils/stdio.js.map +1 -0
  117. package/lib/worker/commands.d.ts +11 -0
  118. package/lib/worker/commands.d.ts.map +1 -0
  119. package/lib/worker/commands.js +173 -0
  120. package/lib/worker/commands.js.map +1 -0
  121. package/lib/worker/connect.d.ts +7 -0
  122. package/lib/worker/connect.d.ts.map +1 -0
  123. package/lib/worker/connect.js +68 -0
  124. package/lib/worker/connect.js.map +1 -0
  125. package/lib/worker/docker-credential.d.ts +2 -0
  126. package/lib/worker/docker-credential.d.ts.map +1 -0
  127. package/lib/worker/docker-credential.js +50 -0
  128. package/lib/worker/docker-credential.js.map +1 -0
  129. package/lib/worker/docker.d.ts +10 -0
  130. package/lib/worker/docker.d.ts.map +1 -0
  131. package/lib/worker/docker.js +93 -0
  132. package/lib/worker/docker.js.map +1 -0
  133. package/lib/worker/index.d.ts +3 -0
  134. package/lib/worker/index.d.ts.map +1 -0
  135. package/lib/worker/index.js +90 -0
  136. package/lib/worker/index.js.map +1 -0
  137. package/lib/worker/project.d.ts +58 -0
  138. package/lib/worker/project.d.ts.map +1 -0
  139. package/lib/worker/project.js +148 -0
  140. package/lib/worker/project.js.map +1 -0
  141. package/lib/worker/refresh.d.ts +6 -0
  142. package/lib/worker/refresh.d.ts.map +1 -0
  143. package/lib/worker/refresh.js +47 -0
  144. package/lib/worker/refresh.js.map +1 -0
  145. package/lib/worker/registry.d.ts +7 -0
  146. package/lib/worker/registry.d.ts.map +1 -0
  147. package/lib/worker/registry.js +47 -0
  148. package/lib/worker/registry.js.map +1 -0
  149. package/lib/worker/version.d.ts +2 -0
  150. package/lib/worker/version.d.ts.map +1 -0
  151. package/lib/worker/version.js +4 -0
  152. package/lib/worker/version.js.map +1 -0
  153. package/lib/workflows/commands.d.ts +14 -0
  154. package/lib/workflows/commands.d.ts.map +1 -0
  155. package/lib/workflows/commands.js +243 -0
  156. package/lib/workflows/commands.js.map +1 -0
  157. package/lib/workflows/index.d.ts +3 -0
  158. package/lib/workflows/index.d.ts.map +1 -0
  159. package/lib/workflows/index.js +117 -0
  160. package/lib/workflows/index.js.map +1 -0
  161. package/lib/workflows/json-loader.d.ts +3 -0
  162. package/lib/workflows/json-loader.d.ts.map +1 -0
  163. package/lib/workflows/json-loader.js +16 -0
  164. package/lib/workflows/json-loader.js.map +1 -0
  165. package/lib/workflows/streams.d.ts +2 -0
  166. package/lib/workflows/streams.d.ts.map +1 -0
  167. package/lib/workflows/streams.js +419 -0
  168. package/lib/workflows/streams.js.map +1 -0
  169. package/lib/workflows/ts-loader.d.ts +3 -0
  170. package/lib/workflows/ts-loader.d.ts.map +1 -0
  171. package/lib/workflows/ts-loader.js +94 -0
  172. package/lib/workflows/ts-loader.js.map +1 -0
  173. package/lib/workflows/validation.d.ts +6 -0
  174. package/lib/workflows/validation.d.ts.map +1 -0
  175. package/lib/workflows/validation.js +22 -0
  176. package/lib/workflows/validation.js.map +1 -0
  177. package/package.json +7 -7
package/lib/index.js ADDED
@@ -0,0 +1,181 @@
1
+ import { setupMemoCommand } from '@vertesia/memory-cli';
2
+ import { Command } from 'commander';
3
+ import { registerAppsCommand } from './apps/index.js';
4
+ import { registerArtifactsCommand } from './artifacts/index.js';
5
+ import runExport from './codegen/index.js';
6
+ import { genTestData } from './datagen/index.js';
7
+ import { listEnvironments } from './envs/index.js';
8
+ import { listInteractions } from './interactions/index.js';
9
+ import { getPublishMemoryAction } from './memory/index.js';
10
+ import { registerObjectsCommand } from './objects/index.js';
11
+ import { getVersion, upgrade } from './package.js';
12
+ import { createProfile, deleteProfile, listProfiles, showActiveAuthToken, showProfile, tryRefreshToken, updateCurrentProfile, updateProfile, useProfile } from './profiles/commands.js';
13
+ import { getConfigFile } from './profiles/index.js';
14
+ import { listProjects } from './projects/index.js';
15
+ import runInteraction from './run/index.js';
16
+ import { runHistory } from './runs/index.js';
17
+ import { registerWorkerCommand } from './worker/index.js';
18
+ import { registerWorkflowsCommand } from './workflows/index.js';
19
+ //warnIfNotLatest();
20
+ const program = new Command();
21
+ program.version(getVersion());
22
+ program.command("upgrade")
23
+ .description("Upgrade to the latest version of the CLI")
24
+ .option("-y, --yes", "Skip the confirmation prompt")
25
+ .action((options = {}) => upgrade(options.yes));
26
+ program.command("projects")
27
+ .description("List the projects you have access to")
28
+ .action(() => {
29
+ listProjects(program);
30
+ });
31
+ const authRoot = program.command("auth")
32
+ .description("Manage authentication");
33
+ authRoot.command("token")
34
+ .description("Show the auth token used by the current selected profile.")
35
+ .action(() => {
36
+ showActiveAuthToken();
37
+ });
38
+ authRoot.command("refresh")
39
+ .description("Refresh the auth token used by the current profile. An alias to 'vertesia profiles refresh'.")
40
+ .action(() => {
41
+ updateCurrentProfile();
42
+ });
43
+ program.command("envs [envId]")
44
+ .description("List the environments you have access to")
45
+ .action((envId, options) => {
46
+ listEnvironments(program, envId, options);
47
+ });
48
+ program.command("interactions [interaction]")
49
+ .description("List the interactions available in the current project")
50
+ .action((interactionId, options) => {
51
+ listInteractions(program, interactionId, options);
52
+ });
53
+ program.command("datagen <interaction>")
54
+ .description("Generate test input data, given an interaction ID")
55
+ .option('-e, --env [envId]', 'The environment ID to use to generating the test data')
56
+ .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.')
57
+ .option('-t, --temperature [value]', 'The temperature used to generating the test data.')
58
+ .option('--max-tokens [max-tokens]', 'The maximum number of tokens to generate')
59
+ .option('--top-p [top-p]', 'The top P value to use')
60
+ .option('--top-k [top-k]', 'The top K value to use')
61
+ .option('--presence-penalty [presence-penalty]', 'The presence penalty value to use')
62
+ .option('--frequency-penalty [frequency-penalty]', 'The frequency penalty value to use')
63
+ .option('--stop-sequence [stop-sequence]', 'A comma separated list of sequences to stop the generation')
64
+ .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.')
65
+ .option('-o, --output [file]', 'A file to save the generated test data. If not specified the data will be printed to stdout.')
66
+ .option('-c, --count [value]', 'The number of data objects to generate', '1')
67
+ .option('--message [value]', 'An optional message')
68
+ .action((interactionId, options) => {
69
+ genTestData(program, interactionId, options);
70
+ });
71
+ program.command("codegen [interactionName]")
72
+ .description("Generate code given an interaction name of for all the interactions in the project if no interaction is specified.")
73
+ .option('--versions [versions]', 'A comma separated list of version selectors to include. A version selector is either a version number or "draft". The default is "draft"', "draft")
74
+ .option('-a, -all', 'When used, all the interaction versions will be exported')
75
+ .option('-d, --dir [file]', 'The output directory if any. Default to "./interactions" if not specified.', './interactions')
76
+ .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')
77
+ .action((interactionName, options) => runExport(program, interactionName, options));
78
+ program.command("run <interaction>")
79
+ .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")
80
+ .option('-i, --input [file]', 'The input data if any. If no file path is specified it will read from stdin')
81
+ .option('-o, --output [file]', 'The output file if any. If not specified it will print to stdout')
82
+ .option('-d, --data [json]', 'Inline data as a JSON string. If specified takes precedence over --input')
83
+ .option('-T, --tags [tags]', 'A comma separated list of tags to add to the execution run')
84
+ .option('-t, --temperature [temperature]', 'The temperature to use')
85
+ .option('--max-tokens [max-tokens]', 'The maximum number of tokens to generate')
86
+ .option('--top-p [top-p]', 'The top P value to use')
87
+ .option('--top-k [top-k]', 'The top K value to use')
88
+ .option('--presence-penalty [presence-penalty]', 'The presence penalty value to use')
89
+ .option('--frequency-penalty [frequency-penalty]', 'The frequency penalty value to use')
90
+ .option('--stop-sequence [stop-sequence]', 'A comma separated list of sequences to stop the generation')
91
+ .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.')
92
+ .option('-m, --model [model]', 'The model to use. Optional.')
93
+ .option('-e, --env [environmentId]', 'The environment Id to use. Optional.')
94
+ .option('-S, --no-stream', 'When used, the output will be printed only when the execution is complete')
95
+ .option('-c, --count [count]', 'The number of times to run the interaction', '1')
96
+ .option('-v, --verbose', 'Only used in no streaming mode. Instead of printing a progress it will print details about each executed run.')
97
+ .option('--jsonl', 'Write output in jsonl. The default is to write the json. Ignored when only one run is executed')
98
+ .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)
99
+ .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.')
100
+ .option('--by-id', 'When used, the interaction is selected by ID instead of by name')
101
+ .action((interaction, options) => runInteraction(program, interaction, options));
102
+ program.command("runs [interactionId]")
103
+ .description('Search the run history for specific execution runs')
104
+ .option('-t, --tags [tags]', 'A comma separated list of tags to filter the run history')
105
+ .option('--status [status]', 'A status to filter on')
106
+ .option('-e, --env [environmentId]', 'Filter by environment')
107
+ .option('-m, --model [model]', 'Filter by model')
108
+ .option('-q, --query [query]', 'A lucene query')
109
+ .option('-l, --limit [limit]', 'The maximum number of runs to return in a page', "100")
110
+ .option('-P, --page [page]', 'The page number to return (starting from 0)', "0")
111
+ .option('-f, --format [format]', 'The output format: json, jsonl or csv.', 'json')
112
+ .option("-o, --output [file]", "The output file if any. If not specified it will print to stdout")
113
+ .option("--before [date]", "Filter runs before the given date. The date must be in ISO format")
114
+ .option("--after [date]", "Filter runs after the given date. The date must be in ISO format")
115
+ .action((interactionId, options) => {
116
+ runHistory(program, interactionId, options);
117
+ });
118
+ const memoCmd = program.command("memo");
119
+ setupMemoCommand(memoCmd, getPublishMemoryAction(program));
120
+ registerWorkerCommand(program);
121
+ registerAppsCommand(program);
122
+ registerArtifactsCommand(program);
123
+ const profilesRoot = program.command("profiles")
124
+ .description("Manage configuration profiles")
125
+ .action(() => {
126
+ listProfiles();
127
+ });
128
+ profilesRoot.command('show [name]')
129
+ .description("Show the configured profiles or the profile with the given name")
130
+ .action((name) => {
131
+ showProfile(name);
132
+ });
133
+ profilesRoot.command('use [name]')
134
+ .description("Switch to another configuration profile")
135
+ .action((name) => {
136
+ useProfile(name);
137
+ });
138
+ profilesRoot.command('add [name]')
139
+ .alias('create')
140
+ .option("-t, --target <env>", "The target environment for the profile. Possible values are: local, dev, staging, prod or an URL for custom servers.")
141
+ .option("-k, --apikey <key>", "The API key to use for the profile")
142
+ .option("-p, --project <project>", "The project ID to use for the profile")
143
+ .option("-a, --account <account>", "The account ID to use for the profile")
144
+ .description("Create a new configuration profile")
145
+ .action((name, options) => {
146
+ createProfile(name, options || {});
147
+ });
148
+ profilesRoot.command('edit [name]')
149
+ .alias('update')
150
+ .description("Edit an existing configuration profile")
151
+ .action((name) => {
152
+ updateProfile(name);
153
+ });
154
+ profilesRoot.command('refresh')
155
+ .description("Refresh token for the current configuration profile")
156
+ .action(() => {
157
+ updateCurrentProfile();
158
+ });
159
+ profilesRoot.command('delete <name>')
160
+ .description("delete an existing configuration profile")
161
+ .action((name) => {
162
+ deleteProfile(name);
163
+ });
164
+ profilesRoot.command('file')
165
+ .description("print the configuration file path")
166
+ .action(() => {
167
+ console.log(getConfigFile('profiles.json'));
168
+ });
169
+ registerObjectsCommand(program);
170
+ registerWorkflowsCommand(program);
171
+ program.parseAsync(process.argv).catch(err => {
172
+ console.error(err);
173
+ process.exit(1);
174
+ });
175
+ process.on("unhandledRejection", (err) => {
176
+ if (err.status === 401) { // token expired?
177
+ console.error("ERROR", err);
178
+ tryRefreshToken();
179
+ }
180
+ });
181
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,cAA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C,MAAM,KAAK,GAAG,EAAE,CAAC,CAAC,iBAAiB;QACvC,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC5B,eAAe,EAAE,CAAC;IACtB,CAAC;AACL,CAAC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interactions/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,iBAgBvH"}
@@ -0,0 +1,35 @@
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 async function listInteractions(program, interactionId, options) {
6
+ const client = await getClient(program);
7
+ if (!interactionId) {
8
+ const interactions = await client.interactions.list();
9
+ interactions.map(interaction => {
10
+ console.log(textToPascalCase(interaction.name) + ` [${interaction.id}]`);
11
+ });
12
+ return;
13
+ }
14
+ const interaction = await client.interactions.retrieve(interactionId);
15
+ if (interaction.status === InteractionStatus.draft) {
16
+ const versions = await client.interactions.listVersions(interactionId);
17
+ printInteraction(interaction, versions, options);
18
+ }
19
+ else {
20
+ printInteraction(interaction, [], options);
21
+ }
22
+ }
23
+ function printInteraction(interaction, versions, _options) {
24
+ console.log(colors.bold(interaction.name) + " [" + interaction.id + "]");
25
+ console.log(colors.bold("Description:"), interaction.description || 'n/a');
26
+ console.log(colors.bold("Class name:"), textToPascalCase(interaction.name));
27
+ console.log(colors.bold("Status:"), interaction.status);
28
+ console.log(colors.bold("Version:"), interaction.version);
29
+ console.log(colors.bold("Tags:"), interaction.tags && interaction.tags.length > 0 ? interaction.tags.join(", ") : "n/a");
30
+ if (interaction.status === InteractionStatus.draft) {
31
+ versions.sort((a, b) => a.version - b.version);
32
+ console.log(colors.bold("Published Versions:"), versions.length > 0 ? versions.map(v => v.version).join(", ") : "n/a");
33
+ }
34
+ }
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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,CAAC,KAAK,UAAU,gBAAgB,CAAC,OAAgB,EAAE,aAAiC,EAAE,OAA4B;IACpH,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,CAAC;IACxC,IAAI,CAAC,aAAa,EAAE,CAAC;QACjB,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QACtD,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;YAC3B,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,KAAK,WAAW,CAAC,EAAE,GAAG,CAAC,CAAC;QAC7E,CAAC,CAAC,CAAC;QACH,OAAO;IACX,CAAC;IACD,MAAM,WAAW,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IACtE,IAAI,WAAW,CAAC,MAAM,KAAK,iBAAiB,CAAC,KAAK,EAAE,CAAC;QACjD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,aAAa,CA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G,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"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare function getPublishMemoryAction(program: Command): (file: string, name: string) => Promise<string>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/memory/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,IACrC,MAAM,MAAM,EAAE,MAAM,MAAM,qBAI3C"}
@@ -0,0 +1,15 @@
1
+ import { NodeStreamSource } from "@vertesia/client/node";
2
+ import { createReadStream } from "fs";
3
+ import { getClient } from "../client.js";
4
+ export function getPublishMemoryAction(program) {
5
+ return async (file, name) => {
6
+ const client = await getClient(program);
7
+ return publishMemory(client, file, name);
8
+ };
9
+ }
10
+ async function publishMemory(client, file, name) {
11
+ const stream = createReadStream(file);
12
+ const path = await client.files.uploadMemoryPack(new NodeStreamSource(stream, name, "application/gzip"));
13
+ return path;
14
+ }
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/memory/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,IAAI,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,UAAU,sBAAsB,CAAC,OAAgB;IACnD,OAAO,KAAK,EAAE,IAAY,EAAE,IAAY,EAAE,EAAE;QACxC,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,CAAC;QACxC,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,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,gBAAgB,CAAC,MAAM,EACxE,IAAI,EACJ,kBAAkB,CACrB,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AAChB,CAAC"}
@@ -0,0 +1,15 @@
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
+ export declare function downloadObjectContent(program: Command, objectId: string, options: Record<string, any>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CAAC,iBAIhG;AAGD,wBAAsB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,iBAIhH;AAED,wBAAsB,SAAS,CAAC,OAAO,EAAE,OAAO,kBAU/C;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,OAGvD;AAED,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,iBA2B3G"}
@@ -0,0 +1,273 @@
1
+ import { NodeStreamSource } from "@vertesia/client/node";
2
+ import enquirer from "enquirer";
3
+ import { createReadStream, createWriteStream } from "node:fs";
4
+ import { readdir, stat } from "node:fs/promises";
5
+ import { glob } from 'glob';
6
+ import mime from "mime";
7
+ import { basename, join, resolve } from "path";
8
+ import { pipeline } from "stream/promises";
9
+ import { Readable } from "stream";
10
+ import { getClient } from "../client.js";
11
+ const { prompt } = enquirer;
12
+ const AUTOMATIC_TYPE_SELECTION = "auto";
13
+ const AUTOMATIC_TYPE_SELECTION_DESC = "Auto (Vertesia will analyze the file and select the most appropriate type)";
14
+ const TYPE_SELECTION_ERROR = "TypeSelectionError";
15
+ function splitInChunksWithSize(arr, size) {
16
+ if (size < 1) {
17
+ return [];
18
+ }
19
+ const chunks = [];
20
+ const len = arr.length;
21
+ let i = 0;
22
+ while (i < len) {
23
+ chunks.push(arr.slice(i, i + size));
24
+ i += size;
25
+ }
26
+ return chunks;
27
+ }
28
+ function splitInChunks(arr, chunksCount) {
29
+ if (arr.length < 1) {
30
+ return [];
31
+ }
32
+ if (chunksCount <= arr.length) {
33
+ const size = Math.ceil(arr.length / chunksCount);
34
+ return splitInChunksWithSize(arr, size);
35
+ }
36
+ else {
37
+ return [arr];
38
+ }
39
+ }
40
+ async function listFilesInDirectory(dir, recursive = false) {
41
+ return await readdir(dir, {
42
+ withFileTypes: true,
43
+ recursive,
44
+ }).then((entries) => entries.filter(ent => {
45
+ // exclude hidden files and include only file with extensions
46
+ return ent.isFile() && ent.name.lastIndexOf('.') > 0;
47
+ }).map(ent => {
48
+ // In Node.js 22+, use parentPath; fallback to dir for older versions
49
+ const parentPath = 'parentPath' in ent ? ent.parentPath : dir;
50
+ return join(parentPath, ent.name);
51
+ }));
52
+ }
53
+ export async function createObject(program, files, options) {
54
+ if (files.length === 0) {
55
+ return "No files specified";
56
+ }
57
+ else if (files.length > 1) {
58
+ const types = await listTypes(program);
59
+ const questions = [];
60
+ if (!options.type) {
61
+ questions.push({
62
+ type: 'select',
63
+ name: 'type',
64
+ message: "Select a Type",
65
+ choices: types,
66
+ limit: 10,
67
+ result() {
68
+ return this.focused.value;
69
+ }
70
+ });
71
+ const response = await prompt(questions);
72
+ options.type = response.type;
73
+ }
74
+ else {
75
+ const searchedType = findTypeValue(types, options.type);
76
+ if (searchedType === TYPE_SELECTION_ERROR) {
77
+ console.error(`${options.type} is not an existing type`);
78
+ process.exit(2);
79
+ }
80
+ options.type = searchedType;
81
+ }
82
+ if (options.type === AUTOMATIC_TYPE_SELECTION) {
83
+ delete options.type;
84
+ }
85
+ return createObjectFromFiles(program, files, options);
86
+ }
87
+ else {
88
+ let file = files[0];
89
+ if (file.indexOf('*') > -1) {
90
+ const files = await glob(file);
91
+ return createObjectFromFiles(program, files, options);
92
+ }
93
+ else if (file.includes("://")) {
94
+ return createObjectFromExternalSource(await getClient(program), file, options);
95
+ }
96
+ else {
97
+ file = resolve(file);
98
+ let stats;
99
+ try {
100
+ stats = await stat(file);
101
+ }
102
+ catch (err) {
103
+ if (err.code === 'ENOENT') {
104
+ console.error('No such file or directory: ', file);
105
+ process.exit(2);
106
+ }
107
+ console.error(err);
108
+ process.exit(2);
109
+ }
110
+ const types = await listTypes(program);
111
+ const questions = [];
112
+ if (stats.isFile()) {
113
+ if (!options.type) {
114
+ questions.push({
115
+ type: 'select',
116
+ name: 'type',
117
+ message: "Select a Type",
118
+ choices: types,
119
+ limit: 10,
120
+ result() {
121
+ return this.focused.value;
122
+ }
123
+ });
124
+ const response = await prompt(questions);
125
+ options.type = response.type;
126
+ }
127
+ else {
128
+ const searchedType = findTypeValue(types, options.type);
129
+ if (searchedType === TYPE_SELECTION_ERROR) {
130
+ console.error(`${options.type} is not an existing type`);
131
+ process.exit(2);
132
+ }
133
+ options.type = searchedType;
134
+ }
135
+ if (options.type === AUTOMATIC_TYPE_SELECTION) {
136
+ delete options.type;
137
+ }
138
+ return createObjectFromFile(program, file, options);
139
+ }
140
+ else if (stats.isDirectory()) {
141
+ questions.push({
142
+ type: 'select',
143
+ name: 'type',
144
+ message: "Select a Type (the type will be used for all the files in the directory)",
145
+ choices: types,
146
+ limit: 10,
147
+ result() {
148
+ return this.focused.value;
149
+ }
150
+ });
151
+ const response = await prompt(questions);
152
+ options.type = response.type;
153
+ if (options.type === AUTOMATIC_TYPE_SELECTION) {
154
+ delete options.type;
155
+ }
156
+ const files = await listFilesInDirectory(file, options.recursive || false);
157
+ return createObjectFromFiles(program, files, options);
158
+ }
159
+ }
160
+ }
161
+ }
162
+ export async function createObjectFromFiles(program, files, options) {
163
+ if (!options)
164
+ options = {};
165
+ // split in 10 chunks
166
+ const chunks = splitInChunks(files, 10);
167
+ Promise.all(chunks.map(async (chunk) => {
168
+ for (const file of chunk) {
169
+ await createObjectFromFile(program, file, options);
170
+ }
171
+ }));
172
+ }
173
+ export async function createObjectFromFile(program, file, options) {
174
+ const client = await getClient(program);
175
+ let res;
176
+ if (file.startsWith("s3://") || file.startsWith("gs://")) {
177
+ res = await createObjectFromExternalSource(client, file, options);
178
+ }
179
+ else {
180
+ res = await createObjectFromLocalFile(client, file, options);
181
+ }
182
+ console.log('Created object', res.id);
183
+ return res;
184
+ }
185
+ export async function createObjectFromLocalFile(client, file, options) {
186
+ const fileName = basename(file);
187
+ const stream = createReadStream(file);
188
+ const content = new NodeStreamSource(stream, fileName);
189
+ const mime_type = mime.getType(file);
190
+ if (mime_type) {
191
+ content.type = mime_type;
192
+ }
193
+ const res = await client.objects.create({
194
+ name: options.name || fileName,
195
+ type: options.type,
196
+ location: options.path,
197
+ content: content,
198
+ });
199
+ return res;
200
+ }
201
+ async function createObjectFromExternalSource(client, uri, options) {
202
+ return client.objects.createFromExternalSource(uri, {
203
+ name: options.name,
204
+ type: options.type,
205
+ location: options.path,
206
+ });
207
+ }
208
+ export async function updateObject(program, objectId, type, _options) {
209
+ const types = await listTypes(program);
210
+ var searchedType = findTypeValue(types, type);
211
+ if (searchedType === TYPE_SELECTION_ERROR) {
212
+ console.error(`${type} is not an existing type`);
213
+ process.exit(2);
214
+ }
215
+ if (searchedType === AUTOMATIC_TYPE_SELECTION) {
216
+ searchedType = undefined;
217
+ }
218
+ const payload = { type: searchedType };
219
+ const client = await getClient(program);
220
+ console.log(await client.objects.update(objectId, payload));
221
+ }
222
+ export async function deleteObject(program, objectId, _options) {
223
+ const client = await getClient(program);
224
+ await client.objects.delete(objectId);
225
+ }
226
+ export async function getObject(program, objectId, _options) {
227
+ const client = await getClient(program);
228
+ const object = await client.objects.retrieve(objectId);
229
+ console.log(object);
230
+ }
231
+ //@ts-ignore
232
+ export async function listObjects(program, folderPath, _options) {
233
+ const client = await getClient(program);
234
+ const objects = await client.objects.list();
235
+ console.log(objects.map(o => `${o.id}\t ${o.name}`).join('\n'));
236
+ }
237
+ export async function listTypes(program) {
238
+ const types = [];
239
+ types.push({ name: AUTOMATIC_TYPE_SELECTION_DESC, value: AUTOMATIC_TYPE_SELECTION });
240
+ const client = await getClient(program);
241
+ const platformTypes = await client.types.list();
242
+ for (const type of platformTypes) {
243
+ types.push({ name: type.name, value: type.id });
244
+ }
245
+ return types;
246
+ }
247
+ export function findTypeValue(types, name) {
248
+ const type = types.find(type => type.name === name || type.id === name);
249
+ return type ? type.value : TYPE_SELECTION_ERROR;
250
+ }
251
+ export async function downloadObjectContent(program, objectId, options) {
252
+ const client = await getClient(program);
253
+ // Get object to find content source and name
254
+ const object = await client.objects.retrieve(objectId);
255
+ const contentSource = await client.objects.getContentSource(objectId);
256
+ if (!contentSource?.source) {
257
+ console.error("Object has no downloadable content");
258
+ process.exit(1);
259
+ }
260
+ // Get download URL and stream content
261
+ const { url } = await client.files.getDownloadUrl(contentSource.source);
262
+ const response = await fetch(url);
263
+ if (!response.ok || !response.body) {
264
+ console.error(`Failed to download: ${response.statusText}`);
265
+ process.exit(1);
266
+ }
267
+ const outputPath = options.output || object.name;
268
+ const nodeStream = Readable.fromWeb(response.body);
269
+ const writeStream = createWriteStream(outputPath);
270
+ await pipeline(nodeStream, writeStream);
271
+ console.log(`Downloaded to: ${outputPath}`);
272
+ }
273
+ //# sourceMappingURL=commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/objects/commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAS,gBAAgB,EAAE,iBAAiB,EAAe,MAAM,SAAS,CAAC;AAClF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC;AAE5B,MAAM,wBAAwB,GAAG,MAAM,CAAC;AACxC,MAAM,6BAA6B,GAAG,4EAA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CAAC,IAAW,CAAC,CAAC;IAC1D,MAAM,WAAW,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAClD,MAAM,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAExC,OAAO,CAAC,GAAG,CAAC,kBAAkB,UAAU,EAAE,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare function registerObjectsCommand(program: Command): void;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/objects/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,QA0CtD"}