@vertesia/common 0.79.0 → 0.79.1

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 (100) hide show
  1. package/lib/cjs/access-control.js +3 -3
  2. package/lib/cjs/access-control.js.map +1 -1
  3. package/lib/cjs/apikey.js +1 -0
  4. package/lib/cjs/apikey.js.map +1 -1
  5. package/lib/cjs/index.js +1 -0
  6. package/lib/cjs/index.js.map +1 -1
  7. package/lib/cjs/interaction.js +12 -2
  8. package/lib/cjs/interaction.js.map +1 -1
  9. package/lib/cjs/prompt.js +0 -1
  10. package/lib/cjs/prompt.js.map +1 -1
  11. package/lib/cjs/store/store.js +13 -1
  12. package/lib/cjs/store/store.js.map +1 -1
  13. package/lib/cjs/store/workflow.js.map +1 -1
  14. package/lib/cjs/sts-token-types.js.map +1 -1
  15. package/lib/cjs/utils/schemas.js +27 -5
  16. package/lib/cjs/utils/schemas.js.map +1 -1
  17. package/lib/esm/access-control.js +3 -3
  18. package/lib/esm/access-control.js.map +1 -1
  19. package/lib/esm/apikey.js +1 -0
  20. package/lib/esm/apikey.js.map +1 -1
  21. package/lib/esm/index.js +1 -0
  22. package/lib/esm/index.js.map +1 -1
  23. package/lib/esm/interaction.js +11 -1
  24. package/lib/esm/interaction.js.map +1 -1
  25. package/lib/esm/prompt.js +0 -1
  26. package/lib/esm/prompt.js.map +1 -1
  27. package/lib/esm/store/store.js +12 -0
  28. package/lib/esm/store/store.js.map +1 -1
  29. package/lib/esm/store/workflow.js.map +1 -1
  30. package/lib/esm/sts-token-types.js.map +1 -1
  31. package/lib/esm/utils/schemas.js +26 -5
  32. package/lib/esm/utils/schemas.js.map +1 -1
  33. package/lib/tsconfig.tsbuildinfo +1 -1
  34. package/lib/types/Progress.d.ts +1 -0
  35. package/lib/types/access-control.d.ts +4 -3
  36. package/lib/types/access-control.d.ts.map +1 -1
  37. package/lib/types/analytics.d.ts +1 -0
  38. package/lib/types/apikey.d.ts +7 -2
  39. package/lib/types/apikey.d.ts.map +1 -1
  40. package/lib/types/apps.d.ts +8 -0
  41. package/lib/types/apps.d.ts.map +1 -1
  42. package/lib/types/common.d.ts +1 -0
  43. package/lib/types/environment.d.ts +1 -0
  44. package/lib/types/facets.d.ts +1 -0
  45. package/lib/types/group.d.ts +1 -0
  46. package/lib/types/index.d.ts +2 -0
  47. package/lib/types/index.d.ts.map +1 -1
  48. package/lib/types/integrations.d.ts +1 -0
  49. package/lib/types/interaction.d.ts +253 -18
  50. package/lib/types/interaction.d.ts.map +1 -1
  51. package/lib/types/json-schema.d.ts +1 -0
  52. package/lib/types/json.d.ts +1 -0
  53. package/lib/types/meters.d.ts +1 -0
  54. package/lib/types/model_utility.d.ts +1 -0
  55. package/lib/types/payload.d.ts +1 -0
  56. package/lib/types/project.d.ts +6 -5
  57. package/lib/types/project.d.ts.map +1 -1
  58. package/lib/types/prompt.d.ts +16 -8
  59. package/lib/types/prompt.d.ts.map +1 -1
  60. package/lib/types/query.d.ts +3 -0
  61. package/lib/types/query.d.ts.map +1 -1
  62. package/lib/types/rate-limiter.d.ts +1 -0
  63. package/lib/types/refs.d.ts +1 -0
  64. package/lib/types/runs.d.ts +1 -0
  65. package/lib/types/store/activity-catalog.d.ts +1 -0
  66. package/lib/types/store/agent.d.ts +1 -0
  67. package/lib/types/store/collections.d.ts +5 -2
  68. package/lib/types/store/collections.d.ts.map +1 -1
  69. package/lib/types/store/common.d.ts +1 -0
  70. package/lib/types/store/doc-analyzer.d.ts +1 -0
  71. package/lib/types/store/dsl-workflow.d.ts +1 -0
  72. package/lib/types/store/index.d.ts +1 -0
  73. package/lib/types/store/object-types.d.ts +1 -0
  74. package/lib/types/store/signals.d.ts +1 -0
  75. package/lib/types/store/store.d.ts +29 -5
  76. package/lib/types/store/store.d.ts.map +1 -1
  77. package/lib/types/store/temporalio.d.ts +1 -0
  78. package/lib/types/store/workflow.d.ts +65 -8
  79. package/lib/types/store/workflow.d.ts.map +1 -1
  80. package/lib/types/sts-token-types.d.ts +4 -0
  81. package/lib/types/sts-token-types.d.ts.map +1 -1
  82. package/lib/types/tenant.d.ts +1 -0
  83. package/lib/types/training.d.ts +1 -0
  84. package/lib/types/transient-tokens.d.ts +1 -0
  85. package/lib/types/user.d.ts +1 -0
  86. package/lib/types/utils/auth.d.ts +1 -0
  87. package/lib/types/utils/schemas.d.ts +5 -3
  88. package/lib/types/utils/schemas.d.ts.map +1 -1
  89. package/lib/types/utils/type-helpers.d.ts +1 -0
  90. package/lib/types/versions.d.ts +1 -0
  91. package/lib/vertesia-common.js +1 -1
  92. package/lib/vertesia-common.js.map +1 -1
  93. package/package.json +38 -38
  94. package/src/access-control.ts +1 -0
  95. package/src/project.ts +5 -5
  96. package/src/query.ts +2 -0
  97. package/src/store/collections.ts +4 -2
  98. package/src/store/store.ts +29 -11
  99. package/src/store/workflow.ts +28 -2
  100. package/LICENSE +0 -13
package/package.json CHANGED
@@ -1,40 +1,40 @@
1
1
  {
2
- "name": "@vertesia/common",
3
- "version": "0.79.0",
4
- "type": "module",
5
- "types": "./lib/types/index.d.ts",
6
- "files": [
7
- "lib",
8
- "src",
9
- "tsconfig.dist.json"
10
- ],
11
- "exports": {
2
+ "name": "@vertesia/common",
3
+ "version": "0.79.1",
4
+ "type": "module",
12
5
  "types": "./lib/types/index.d.ts",
13
- "import": "./lib/esm/index.js",
14
- "require": "./lib/cjs/index.js"
15
- },
16
- "devDependencies": {
17
- "@rollup/plugin-commonjs": "^28.0.3",
18
- "@rollup/plugin-node-resolve": "^16.0.1",
19
- "@rollup/plugin-typescript": "^12.1.2",
20
- "@types/json-schema": "^7.0.15",
21
- "rollup": "^4.40.2",
22
- "rollup-plugin-terser": "^7.0.2",
23
- "ts-dual-module": "^0.6.3",
24
- "typescript": "^5.0.2",
25
- "vitest": "^3.0.9"
26
- },
27
- "dependencies": {
28
- "ajv": "^8.16.0",
29
- "json-schema": "^0.4.0",
30
- "@llumiverse/common": "0.22.0"
31
- },
32
- "ts_dual_module": {
33
- "outDir": "lib"
34
- },
35
- "scripts": {
36
- "test": "vitest run",
37
- "build": "pnpm exec tsmod build && pnpm exec rollup -c",
38
- "clean": "rimraf ./node_modules ./lib ./tsconfig.tsbuildinfo"
39
- }
40
- }
6
+ "files": [
7
+ "lib",
8
+ "src",
9
+ "tsconfig.dist.json"
10
+ ],
11
+ "scripts": {
12
+ "test": "vitest run",
13
+ "build": "pnpm exec tsmod build && pnpm exec rollup -c",
14
+ "clean": "rimraf ./node_modules ./lib ./tsconfig.tsbuildinfo"
15
+ },
16
+ "exports": {
17
+ "types": "./lib/types/index.d.ts",
18
+ "import": "./lib/esm/index.js",
19
+ "require": "./lib/cjs/index.js"
20
+ },
21
+ "devDependencies": {
22
+ "@rollup/plugin-commonjs": "^28.0.3",
23
+ "@rollup/plugin-node-resolve": "^16.0.1",
24
+ "@rollup/plugin-typescript": "^12.1.2",
25
+ "@types/json-schema": "^7.0.15",
26
+ "rollup": "^4.40.2",
27
+ "rollup-plugin-terser": "^7.0.2",
28
+ "ts-dual-module": "^0.6.3",
29
+ "typescript": "^5.0.2",
30
+ "vitest": "^3.0.9"
31
+ },
32
+ "dependencies": {
33
+ "@llumiverse/common": "workspace:*",
34
+ "ajv": "^8.16.0",
35
+ "json-schema": "^0.4.0"
36
+ },
37
+ "ts_dual_module": {
38
+ "outDir": "lib"
39
+ }
40
+ }
@@ -42,6 +42,7 @@ export enum Permission {
42
42
 
43
43
  workflow_run = "workflow:run",
44
44
  workflow_admin = "workflow:admin",
45
+ workflow_superadmin = "workflow:superadmin",
45
46
 
46
47
  /**
47
48
  * whether the user has access to Sutdio App.
package/src/project.ts CHANGED
@@ -140,11 +140,11 @@ export const ProjectRefPopulate = "id name account";
140
140
 
141
141
  export interface EmbeddingsStatusResponse {
142
142
  status: string;
143
- embeddingRunsInProgress: number;
144
- totalRunsInProgress: number;
145
- totalIndexableObjects: number;
146
- embeddingsModels: string[];
147
- objectsWithEmbeddings: number;
143
+ embeddingRunsInProgress?: number;
144
+ totalRunsInProgress?: number;
145
+ totalIndexableObjects?: number;
146
+ embeddingsModels?: string[];
147
+ objectsWithEmbeddings?: number;
148
148
  vectorIndex: {
149
149
  status: "READY" | "PENDING" | "DELETING" | "ABSENT",
150
150
  name?: string,
package/src/query.ts CHANGED
@@ -69,6 +69,8 @@ export interface InteractionSearchQuery extends SimpleSearchQuery {
69
69
  prompt?: string;
70
70
  tags?: string[];
71
71
  version?: string;
72
+ model?: string;
73
+ environment?: string;
72
74
  }
73
75
 
74
76
  export interface RunSearchQuery extends SimpleSearchQuery {
@@ -31,9 +31,10 @@ export interface CollectionItem extends BaseObject {
31
31
  // A ref to the object type
32
32
  type?: ContentObjectTypeRef;
33
33
  /**
34
- * The parent collection if any
34
+ * The parent collections if any.
35
+ * A collection can have multiple parents.
35
36
  */
36
- parent?: string | null;
37
+ parents?: string[] | null;
37
38
  /**
38
39
  * The table layout to use for the collection.
39
40
  * The layout defined in the type could serve as a fallback if not defined here.
@@ -63,6 +64,7 @@ export interface DynamicCollection extends Collection {
63
64
  }
64
65
 
65
66
  export interface CollectionSearchPayload {
67
+ parent?: string | null;
66
68
  dynamic?: boolean;
67
69
  status?: CollectionStatus;
68
70
  limit?: number;
@@ -34,13 +34,14 @@ export interface ContentObject<T = any> extends ContentObjectItem<T> {
34
34
  security?: Record<string, string[]>; // Security field for granular permissions
35
35
  }
36
36
 
37
- export type ContentNature =
38
- | "video"
39
- | "image"
40
- | "audio"
41
- | "document"
42
- | "code"
43
- | "other";
37
+ export enum ContentNature {
38
+ Video = "video",
39
+ Image = "image",
40
+ Audio = "audio",
41
+ Document = "document",
42
+ Code = "code",
43
+ Other = "other"
44
+ }
44
45
 
45
46
  export interface Dimensions {
46
47
  width: number;
@@ -76,17 +77,29 @@ export interface TemporalMediaMetadata extends ContentMetadata {
76
77
  }
77
78
 
78
79
  export interface ImageMetadata extends ContentMetadata {
79
- type: "image";
80
+ type: ContentNature.Image;
80
81
  dimensions?: Dimensions;
81
82
  }
82
83
 
83
84
  export interface AudioMetadata extends TemporalMediaMetadata {
84
- type: "audio";
85
+ type: ContentNature.Audio;
86
+ }
87
+
88
+ export interface VideoRendition {
89
+ name: string;
90
+ dimensions: Dimensions;
91
+ content: ContentSource
85
92
  }
86
93
 
94
+ export const POSTER_RENDITION_NAME = "Poster";
95
+ export const AUDIO_RENDITION_NAME = "Audio";
96
+ export const WEB_VIDEO_RENDITION_NAME = "Web";
97
+
87
98
  export interface VideoMetadata extends TemporalMediaMetadata {
88
- type: "video";
99
+ type: ContentNature.Video;
89
100
  dimensions?: Dimensions;
101
+ renditions?: VideoRendition[];
102
+ hasAudio?: boolean;
90
103
  }
91
104
 
92
105
  export interface TextSection {
@@ -96,7 +109,7 @@ export interface TextSection {
96
109
  }
97
110
 
98
111
  export interface DocumentMetadata extends ContentMetadata {
99
- type: "document";
112
+ type: ContentNature.Document;
100
113
  page_count?: number;
101
114
  content_processor?: {
102
115
  type?: string;
@@ -338,6 +351,11 @@ export interface WorkflowRule extends WorkflowRuleItem {
338
351
  * When set to true the rule will not be updated by the system
339
352
  */
340
353
  customer_override?: boolean;
354
+
355
+ /**
356
+ * Optional task queue name to use when starting workflows for this rule
357
+ */
358
+ task_queue?: string;
341
359
  }
342
360
 
343
361
  export interface CreateWorkflowRulePayload extends UploadWorkflowRulePayload {
@@ -1,5 +1,5 @@
1
1
  import { JSONSchema4 } from "json-schema";
2
- import { InteractionRef } from "../interaction.js";
2
+ import { ConversationVisibility, InteractionRef } from "../interaction.js";
3
3
 
4
4
  export enum ContentEventName {
5
5
  create = "create",
@@ -202,6 +202,11 @@ export interface ListWorkflowRunsPayload {
202
202
  */
203
203
  initiated_by?: string;
204
204
 
205
+ /**
206
+ * The interaction name used to filter conversations.
207
+ */
208
+ interaction?: string;
209
+
205
210
  /**
206
211
  * Lucene query string to search for the workflow runs.
207
212
  * This is a full text search on the workflow run history.
@@ -301,6 +306,16 @@ export interface WorkflowRun {
301
306
  * An interaction is used to start the agent, the data is stored on temporal "vars"
302
307
  */
303
308
  interactions?: InteractionRef[];
309
+ /**
310
+ * The visibility of the workflow run.
311
+ * - 'private': Only visible to the user who initiated the workflow
312
+ * - 'project': Visible to all users in the project
313
+ */
314
+ visibility?: ConversationVisibility;
315
+ /**
316
+ * A brief summary of the conversation workflow.
317
+ */
318
+ topic?: string;
304
319
  }
305
320
 
306
321
  export interface WorkflowRunWithDetails extends WorkflowRun {
@@ -335,11 +350,12 @@ export interface WorkflowInteraction {
335
350
  tools: [],
336
351
  interaction: string,
337
352
  environment: string,
338
- prompt_data: JSONSchema4,
353
+ data: JSONSchema4,
339
354
  interactive: boolean,
340
355
  interactionParamsSchema?: JSONSchema4
341
356
  debug_mode?: boolean;
342
357
  collection_id?: string;
358
+ config: Record<string, any>;
343
359
  }
344
360
 
345
361
  export interface MultiDocumentsInteractionParams extends Omit<WorkflowExecutionPayload, "config"> {
@@ -421,3 +437,13 @@ export interface Plan {
421
437
  }
422
438
 
423
439
  export const LOW_PRIORITY_TASK_QUEUE = "low_priority";
440
+
441
+ /**
442
+ * Payload for applying actions to a workflow run (e.g., cancel, terminate).
443
+ */
444
+ export interface WorkflowActionPayload {
445
+ /**
446
+ * Optional reason for the action.
447
+ */
448
+ reason?: string;
449
+ }
package/LICENSE DELETED
@@ -1,13 +0,0 @@
1
- Copyright 2024 Composable
2
-
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
-
7
- http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
13
- limitations under the License.