@vertesia/common 1.5.0-dev.20260901.045442Z → 1.5.0-dev.20260905.011013Z
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.
- package/lib/api-contract/components.generated.json +38 -10
- package/lib/api-schemas/agent-runs.d.ts +40 -0
- package/lib/api-schemas/agent-runs.d.ts.map +1 -1
- package/lib/api-schemas/app-lifecycle.d.ts +1 -0
- package/lib/api-schemas/app-lifecycle.d.ts.map +1 -1
- package/lib/api-schemas/app-lifecycle.js +8 -0
- package/lib/api-schemas/app-lifecycle.js.map +1 -1
- package/lib/api-schemas/app-runtime.d.ts +112 -0
- package/lib/api-schemas/app-runtime.d.ts.map +1 -1
- package/lib/api-schemas/content.d.ts +40 -0
- package/lib/api-schemas/content.d.ts.map +1 -1
- package/lib/api-schemas/document-processing.d.ts +24 -0
- package/lib/api-schemas/document-processing.d.ts.map +1 -1
- package/lib/api-schemas/embeddings.d.ts +5 -0
- package/lib/api-schemas/embeddings.d.ts.map +1 -1
- package/lib/api-schemas/embeddings.js +12 -1
- package/lib/api-schemas/embeddings.js.map +1 -1
- package/lib/api-schemas/events.d.ts +72 -0
- package/lib/api-schemas/events.d.ts.map +1 -1
- package/lib/api-schemas/interaction.d.ts +385 -0
- package/lib/api-schemas/interaction.d.ts.map +1 -1
- package/lib/api-schemas/interaction.js +17 -1
- package/lib/api-schemas/interaction.js.map +1 -1
- package/lib/api-schemas/project-configuration.d.ts +80 -0
- package/lib/api-schemas/project-configuration.d.ts.map +1 -1
- package/lib/api-schemas/project.d.ts +120 -0
- package/lib/api-schemas/project.d.ts.map +1 -1
- package/lib/api-schemas/registry.d.ts +1263 -0
- package/lib/api-schemas/registry.d.ts.map +1 -1
- package/lib/api-schemas/store.d.ts +400 -0
- package/lib/api-schemas/store.d.ts.map +1 -1
- package/lib/api-schemas/workflow-runs.d.ts +16 -0
- package/lib/api-schemas/workflow-runs.d.ts.map +1 -1
- package/lib/appgen.d.ts +3 -0
- package/lib/appgen.d.ts.map +1 -0
- package/lib/appgen.js +3 -0
- package/lib/appgen.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/store/intake-policy-schema.generated.d.ts.map +1 -1
- package/lib/store/intake-policy-schema.generated.js +5 -1
- package/lib/store/intake-policy-schema.generated.js.map +1 -1
- package/lib/vertesia-common.js +2 -2
- package/lib/vertesia-common.js.map +1 -1
- package/package.json +3 -3
- package/src/api-contract/components.generated.json +38 -10
- package/src/api-schemas/app-lifecycle.ts +9 -0
- package/src/api-schemas/embeddings.ts +14 -1
- package/src/api-schemas/environment.contract.test.ts +15 -0
- package/src/api-schemas/interaction.contract.test.ts +31 -0
- package/src/api-schemas/interaction.ts +17 -1
- package/src/api-schemas/llumiverse.contract.test.ts +16 -0
- package/src/appgen.ts +4 -0
- package/src/index.ts +1 -0
- package/src/store/intake-policy-schema.generated.ts +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertesia/common",
|
|
3
|
-
"version": "1.5.0-dev.
|
|
3
|
+
"version": "1.5.0-dev.20260905.011013Z",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"ajv": "^8.20.0",
|
|
37
37
|
"ajv-formats": "^3.0.1",
|
|
38
38
|
"zod": "^4.4.3",
|
|
39
|
-
"@llumiverse/common": "1.5.0-dev.
|
|
39
|
+
"@llumiverse/common": "1.5.0-dev.20260905.004250Z"
|
|
40
40
|
},
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"ai",
|
|
52
52
|
"typescript"
|
|
53
53
|
],
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "ea74a29f6885cec132eec4b6b319e40137df3b40",
|
|
55
55
|
"scripts": {
|
|
56
56
|
"lint": "biome lint src",
|
|
57
57
|
"test": "vitest run",
|
|
@@ -2771,7 +2771,9 @@
|
|
|
2771
2771
|
"enum": [
|
|
2772
2772
|
"text_to_video",
|
|
2773
2773
|
"image_to_video",
|
|
2774
|
-
"reference_to_video"
|
|
2774
|
+
"reference_to_video",
|
|
2775
|
+
"edit",
|
|
2776
|
+
"extend"
|
|
2775
2777
|
]
|
|
2776
2778
|
},
|
|
2777
2779
|
"aspect_ratio": {
|
|
@@ -2785,6 +2787,15 @@
|
|
|
2785
2787
|
"type": "integer",
|
|
2786
2788
|
"minimum": 3,
|
|
2787
2789
|
"maximum": 10
|
|
2790
|
+
},
|
|
2791
|
+
"resolution": {
|
|
2792
|
+
"type": "string",
|
|
2793
|
+
"enum": [
|
|
2794
|
+
"360p",
|
|
2795
|
+
"720p",
|
|
2796
|
+
"1080p",
|
|
2797
|
+
"4k"
|
|
2798
|
+
]
|
|
2788
2799
|
}
|
|
2789
2800
|
},
|
|
2790
2801
|
"required": [
|
|
@@ -7342,6 +7353,14 @@
|
|
|
7342
7353
|
],
|
|
7343
7354
|
"additionalProperties": false
|
|
7344
7355
|
},
|
|
7356
|
+
"SupportedEmbeddingTypes": {
|
|
7357
|
+
"type": "string",
|
|
7358
|
+
"enum": [
|
|
7359
|
+
"text",
|
|
7360
|
+
"image",
|
|
7361
|
+
"properties"
|
|
7362
|
+
]
|
|
7363
|
+
},
|
|
7345
7364
|
"EmbeddingsApiInput": {
|
|
7346
7365
|
"oneOf": [
|
|
7347
7366
|
{
|
|
@@ -7381,8 +7400,13 @@
|
|
|
7381
7400
|
"$ref": "#/components/schemas/EmbeddingsApiInput"
|
|
7382
7401
|
}
|
|
7383
7402
|
},
|
|
7403
|
+
"embedding_type": {
|
|
7404
|
+
"$ref": "#/components/schemas/SupportedEmbeddingTypes",
|
|
7405
|
+
"description": "Logical project embedding type. This distinguishes properties embeddings from text inputs when the server resolves an omitted model from project settings."
|
|
7406
|
+
},
|
|
7384
7407
|
"model": {
|
|
7385
|
-
"type": "string"
|
|
7408
|
+
"type": "string",
|
|
7409
|
+
"description": "Explicit model override intended for validating a configuration before it is saved. Normal callers should omit this field and provide embedding_type so the project model is resolved."
|
|
7386
7410
|
},
|
|
7387
7411
|
"task_type": {
|
|
7388
7412
|
"$ref": "#/components/schemas/EmbeddingTaskType"
|
|
@@ -13463,6 +13487,13 @@
|
|
|
13463
13487
|
},
|
|
13464
13488
|
"message": {
|
|
13465
13489
|
"type": "string"
|
|
13490
|
+
},
|
|
13491
|
+
"results": {
|
|
13492
|
+
"type": "array",
|
|
13493
|
+
"items": {
|
|
13494
|
+
"$ref": "#/components/schemas/ToolResult"
|
|
13495
|
+
},
|
|
13496
|
+
"description": "Tool results owed to the model, delivered with this message."
|
|
13466
13497
|
}
|
|
13467
13498
|
},
|
|
13468
13499
|
"required": [
|
|
@@ -17182,6 +17213,11 @@
|
|
|
17182
17213
|
"$ref": "#/components/schemas/AppScaffoldModule"
|
|
17183
17214
|
}
|
|
17184
17215
|
},
|
|
17216
|
+
"appgen_package_spec": {
|
|
17217
|
+
"type": "string",
|
|
17218
|
+
"pattern": "^(?:latest|dev|dev-[0-9]+\\.[0-9]+|snapshot-[0-9a-f]{7}|[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?)$",
|
|
17219
|
+
"description": "Optional Vertesia SDK version or package track for this scaffold. Overrides the deployment default."
|
|
17220
|
+
},
|
|
17185
17221
|
"create_version": {
|
|
17186
17222
|
"type": "boolean",
|
|
17187
17223
|
"description": "Start an initial app version build after the source has been pushed. Defaults to true."
|
|
@@ -27592,14 +27628,6 @@
|
|
|
27592
27628
|
],
|
|
27593
27629
|
"additionalProperties": false
|
|
27594
27630
|
},
|
|
27595
|
-
"SupportedEmbeddingTypes": {
|
|
27596
|
-
"type": "string",
|
|
27597
|
-
"enum": [
|
|
27598
|
-
"text",
|
|
27599
|
-
"image",
|
|
27600
|
-
"properties"
|
|
27601
|
-
]
|
|
27602
|
-
},
|
|
27603
27631
|
"StartContentObjectExportRequest": {
|
|
27604
27632
|
"type": "object",
|
|
27605
27633
|
"properties": {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { APPGEN_PACKAGE_SPEC_PATTERN } from '../appgen.js';
|
|
2
3
|
import { AppAccessControlSchema, AppAvailableInSchema, MCPToolAnnotationsSchema } from './apps.js';
|
|
3
4
|
import { EventCategorySchema } from './audit-trail.js';
|
|
4
5
|
|
|
@@ -404,6 +405,14 @@ export const StartAppScaffoldRequestSchema = z
|
|
|
404
405
|
title: z.string().optional(),
|
|
405
406
|
description: z.string().optional(),
|
|
406
407
|
modules: z.array(AppScaffoldModuleSchema).optional(),
|
|
408
|
+
appgen_package_spec: z
|
|
409
|
+
.string()
|
|
410
|
+
.regex(APPGEN_PACKAGE_SPEC_PATTERN)
|
|
411
|
+
.meta({
|
|
412
|
+
description:
|
|
413
|
+
'Optional Vertesia SDK version or package track for this scaffold. Overrides the deployment default.',
|
|
414
|
+
})
|
|
415
|
+
.optional(),
|
|
407
416
|
create_version: z
|
|
408
417
|
.boolean()
|
|
409
418
|
.meta({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EmbeddingTaskTypeSchema } from '@llumiverse/common/schemas';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
import { SupportedEmbeddingTypesSchema } from './content.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* The request half of `POST /environments/:envId/embeddings`.
|
|
@@ -83,7 +84,19 @@ export const EmbeddingsApiInputSchema = z
|
|
|
83
84
|
export const EmbeddingsApiRequestSchema = z
|
|
84
85
|
.strictObject({
|
|
85
86
|
inputs: z.array(EmbeddingsApiInputSchema),
|
|
86
|
-
|
|
87
|
+
embedding_type: SupportedEmbeddingTypesSchema.meta({
|
|
88
|
+
description:
|
|
89
|
+
'Logical project embedding type. This distinguishes properties embeddings from text inputs when ' +
|
|
90
|
+
'the server resolves an omitted model from project settings.',
|
|
91
|
+
}).optional(),
|
|
92
|
+
model: z
|
|
93
|
+
.string()
|
|
94
|
+
.meta({
|
|
95
|
+
description:
|
|
96
|
+
'Explicit model override intended for validating a configuration before it is saved. Normal ' +
|
|
97
|
+
'callers should omit this field and provide embedding_type so the project model is resolved.',
|
|
98
|
+
})
|
|
99
|
+
.optional(),
|
|
87
100
|
task_type: EmbeddingTaskTypeSchema.optional(),
|
|
88
101
|
dimensions: z.number().optional(),
|
|
89
102
|
})
|
|
@@ -165,6 +165,21 @@ describe('the embeddings request', () => {
|
|
|
165
165
|
// adding the constraint would newly reject a request the document has always described.
|
|
166
166
|
expect(validateApiRequest('EmbeddingsApiRequest', { inputs: [] }).valid).toBe(true);
|
|
167
167
|
});
|
|
168
|
+
|
|
169
|
+
it('accepts the logical project embedding type and rejects unknown types', () => {
|
|
170
|
+
expect(
|
|
171
|
+
validateApiRequest('EmbeddingsApiRequest', {
|
|
172
|
+
embedding_type: 'properties',
|
|
173
|
+
inputs: [{ type: 'text', text: '{}' }],
|
|
174
|
+
}).valid,
|
|
175
|
+
).toBe(true);
|
|
176
|
+
expect(
|
|
177
|
+
validateApiRequest('EmbeddingsApiRequest', {
|
|
178
|
+
embedding_type: 'audio',
|
|
179
|
+
inputs: [{ type: 'audio', source: { url: 'gs://b/o' } }],
|
|
180
|
+
}).valid,
|
|
181
|
+
).toBe(false);
|
|
182
|
+
});
|
|
168
183
|
});
|
|
169
184
|
|
|
170
185
|
function enumOf(component: 'SupportedProviders'): string[] {
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
PromptSegmentDefSchema,
|
|
16
16
|
ResolvedCatalogInteractionSchema,
|
|
17
17
|
} from './interaction.js';
|
|
18
|
+
import { validateApiRequest } from './registry.js';
|
|
18
19
|
|
|
19
20
|
describe('conversation state contract', () => {
|
|
20
21
|
it('publishes the tool catalog storage scope used to resolve tool references', () => {
|
|
@@ -228,3 +229,33 @@ describe('interaction contracts', () => {
|
|
|
228
229
|
).toBe(true);
|
|
229
230
|
});
|
|
230
231
|
});
|
|
232
|
+
|
|
233
|
+
describe('user message payload contract', () => {
|
|
234
|
+
const base = {
|
|
235
|
+
run: { id: 'run-1', account: 'acc-1', project: 'proj-1' },
|
|
236
|
+
environment: 'env-1',
|
|
237
|
+
options: { model: 'model-1' },
|
|
238
|
+
tools: [],
|
|
239
|
+
message: 'Search the other collection instead.',
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
it('accepts tool results owed to the model alongside the message', () => {
|
|
243
|
+
// A stop or an approval denial can leave results undelivered. They have to travel with
|
|
244
|
+
// the message that resumes the conversation: the payload is strict, so before `results`
|
|
245
|
+
// existed here the server rejected them and the work was silently dropped.
|
|
246
|
+
const result = validateApiRequest('UserMessagePayload', {
|
|
247
|
+
...base,
|
|
248
|
+
results: [{ tool_use_id: 'search-1', content: 'found 3 docs', is_error: false }],
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
expect(result.valid).toBe(true);
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
it('still accepts a message with no owed results', () => {
|
|
255
|
+
expect(validateApiRequest('UserMessagePayload', base).valid).toBe(true);
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
it('stays closed to undeclared fields', () => {
|
|
259
|
+
expect(validateApiRequest('UserMessagePayload', { ...base, unsupported: true }).valid).toBe(false);
|
|
260
|
+
});
|
|
261
|
+
});
|
|
@@ -2453,7 +2453,23 @@ export const ToolResultsPayloadSchema = z
|
|
|
2453
2453
|
.meta({ id: 'ToolResultsPayload' });
|
|
2454
2454
|
|
|
2455
2455
|
export const UserMessagePayloadSchema = z
|
|
2456
|
-
.strictObject({
|
|
2456
|
+
.strictObject({
|
|
2457
|
+
...resumeConversationFields,
|
|
2458
|
+
message: z.string(),
|
|
2459
|
+
/**
|
|
2460
|
+
* Tool results still owed to the model when the user message is sent.
|
|
2461
|
+
*
|
|
2462
|
+
* A conversation can be interrupted — the user stops the run, or a tool approval is
|
|
2463
|
+
* denied — while a tool batch has already produced results, or while `tool_use` blocks
|
|
2464
|
+
* are outstanding. Providers require a `tool_result` for every `tool_use` before the
|
|
2465
|
+
* next turn, so those results have to travel with the message that resumes the
|
|
2466
|
+
* conversation rather than in a separate turn of their own.
|
|
2467
|
+
*/
|
|
2468
|
+
results: z
|
|
2469
|
+
.array(ToolResultSchema)
|
|
2470
|
+
.optional()
|
|
2471
|
+
.meta({ description: 'Tool results owed to the model, delivered with this message.' }),
|
|
2472
|
+
})
|
|
2457
2473
|
.meta({ id: 'UserMessagePayload' });
|
|
2458
2474
|
|
|
2459
2475
|
export const ExecutionResponseSchema = z
|
|
@@ -111,6 +111,22 @@ describe('the ModelOptions closure is published whole and enforced closed', () =
|
|
|
111
111
|
).toBe(true);
|
|
112
112
|
expect(validate({ _option_id: 'openai-text', extra_body: ['invalid'] })).toBe(false);
|
|
113
113
|
});
|
|
114
|
+
|
|
115
|
+
it('accepts Gemini Omni task and resolution options through the run request contract', () => {
|
|
116
|
+
const result = validateApiRequest('RunCreatePayload', {
|
|
117
|
+
interaction: 'GenerateVideo',
|
|
118
|
+
config: {
|
|
119
|
+
model: 'locations/global/publishers/google/models/gemini-omni-1.1-flash-preview',
|
|
120
|
+
model_options: {
|
|
121
|
+
_option_id: 'vertexai-gemini-omni-video',
|
|
122
|
+
task: 'extend',
|
|
123
|
+
resolution: '4k',
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
expect(result.valid ? [] : result.errors).toEqual([]);
|
|
129
|
+
});
|
|
114
130
|
});
|
|
115
131
|
|
|
116
132
|
describe('the JSONSchema closure is published open, because a JSON Schema is open', () => {
|
package/src/appgen.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export const APPGEN_PACKAGE_SPEC_PATTERN_SOURCE =
|
|
2
|
+
'^(?:latest|dev|dev-[0-9]+\\.[0-9]+|snapshot-[0-9a-f]{7}|[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?)$';
|
|
3
|
+
|
|
4
|
+
export const APPGEN_PACKAGE_SPEC_PATTERN = new RegExp(APPGEN_PACKAGE_SPEC_PATTERN_SOURCE);
|
package/src/index.ts
CHANGED
|
@@ -1592,7 +1592,7 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
|
|
|
1592
1592
|
},
|
|
1593
1593
|
task: {
|
|
1594
1594
|
type: 'string',
|
|
1595
|
-
enum: ['text_to_video', 'image_to_video', 'reference_to_video'],
|
|
1595
|
+
enum: ['text_to_video', 'image_to_video', 'reference_to_video', 'edit', 'extend'],
|
|
1596
1596
|
},
|
|
1597
1597
|
aspect_ratio: {
|
|
1598
1598
|
type: 'string',
|
|
@@ -1603,6 +1603,10 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
|
|
|
1603
1603
|
minimum: 3,
|
|
1604
1604
|
maximum: 10,
|
|
1605
1605
|
},
|
|
1606
|
+
resolution: {
|
|
1607
|
+
type: 'string',
|
|
1608
|
+
enum: ['360p', '720p', '1080p', '4k'],
|
|
1609
|
+
},
|
|
1606
1610
|
},
|
|
1607
1611
|
required: ['_option_id'],
|
|
1608
1612
|
additionalProperties: false,
|