@vertesia/common 1.5.0-dev.20260901.052906Z → 1.5.0-dev.20260910.051115Z
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 +177 -13
- 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/cost-analytics.d.ts +38 -0
- package/lib/api-schemas/cost-analytics.d.ts.map +1 -1
- package/lib/api-schemas/cost-analytics.js +31 -1
- package/lib/api-schemas/cost-analytics.js.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 +404 -0
- package/lib/api-schemas/interaction.d.ts.map +1 -1
- package/lib/api-schemas/interaction.js +26 -2
- 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 +1320 -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/lib/workflow-analytics.d.ts +3 -1
- package/lib/workflow-analytics.d.ts.map +1 -1
- package/lib/workflow-analytics.js +2 -0
- package/lib/workflow-analytics.js.map +1 -1
- package/package.json +3 -3
- package/src/api-contract/components.generated.json +177 -13
- package/src/api-schemas/app-lifecycle.ts +9 -0
- package/src/api-schemas/cost-analytics.ts +34 -1
- 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 +54 -0
- package/src/api-schemas/interaction.ts +26 -2
- 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/src/workflow-analytics.ts +2 -0
|
@@ -14,7 +14,9 @@ import {
|
|
|
14
14
|
InteractionUpdatePayloadSchema,
|
|
15
15
|
PromptSegmentDefSchema,
|
|
16
16
|
ResolvedCatalogInteractionSchema,
|
|
17
|
+
RunClonePayloadSchema,
|
|
17
18
|
} from './interaction.js';
|
|
19
|
+
import { validateApiRequest } from './registry.js';
|
|
18
20
|
|
|
19
21
|
describe('conversation state contract', () => {
|
|
20
22
|
it('publishes the tool catalog storage scope used to resolve tool references', () => {
|
|
@@ -228,3 +230,55 @@ describe('interaction contracts', () => {
|
|
|
228
230
|
).toBe(true);
|
|
229
231
|
});
|
|
230
232
|
});
|
|
233
|
+
|
|
234
|
+
describe('user message payload contract', () => {
|
|
235
|
+
const base = {
|
|
236
|
+
run: { id: 'run-1', account: 'acc-1', project: 'proj-1' },
|
|
237
|
+
environment: 'env-1',
|
|
238
|
+
options: { model: 'model-1' },
|
|
239
|
+
tools: [],
|
|
240
|
+
message: 'Search the other collection instead.',
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
it('accepts tool results owed to the model alongside the message', () => {
|
|
244
|
+
// A stop or an approval denial can leave results undelivered. They have to travel with
|
|
245
|
+
// the message that resumes the conversation: the payload is strict, so before `results`
|
|
246
|
+
// existed here the server rejected them and the work was silently dropped.
|
|
247
|
+
const result = validateApiRequest('UserMessagePayload', {
|
|
248
|
+
...base,
|
|
249
|
+
results: [{ tool_use_id: 'search-1', content: 'found 3 docs', is_error: false }],
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
expect(result.valid).toBe(true);
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
it('still accepts a message with no owed results', () => {
|
|
256
|
+
expect(validateApiRequest('UserMessagePayload', base).valid).toBe(true);
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
it('stays closed to undeclared fields', () => {
|
|
260
|
+
expect(validateApiRequest('UserMessagePayload', { ...base, unsupported: true }).valid).toBe(false);
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
describe('inference workflow attribution', () => {
|
|
265
|
+
it('keeps required clone workflow identifiers free of execution deprecation metadata', () => {
|
|
266
|
+
const workflow = RunClonePayloadSchema.shape.workflow.shape;
|
|
267
|
+
expect(workflow.run_id.meta()?.deprecated).toBeUndefined();
|
|
268
|
+
expect(workflow.workflow_id.meta()?.deprecated).toBeUndefined();
|
|
269
|
+
});
|
|
270
|
+
it('accepts root agent attribution on execution and clone requests', () => {
|
|
271
|
+
const workflow = { run_id: 'child-run', workflow_id: 'workstream:parent:child', agent_run_id: 'root-agent' };
|
|
272
|
+
expect(validateApiRequest('ExecutionRunWorkflow', workflow).valid).toBe(true);
|
|
273
|
+
expect(validateApiRequest('RunClonePayload', { source_run_id: 'source', workflow }).valid).toBe(true);
|
|
274
|
+
expect(
|
|
275
|
+
validateApiRequest('ExecutionRunWorkflow', { run_id: 'legacy', workflow_id: 'AgentRun:legacy' }).valid,
|
|
276
|
+
).toBe(true);
|
|
277
|
+
});
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
describe('background inference telemetry contract', () => {
|
|
281
|
+
it('accepts the background call type in the generated runtime contract', () => {
|
|
282
|
+
expect(validateApiRequest('LlmCallType', 'background').valid).toBe(true);
|
|
283
|
+
});
|
|
284
|
+
});
|
|
@@ -304,6 +304,9 @@ export const TemplateTypeSchema = z.enum(TemplateType).meta({ id: 'TemplateType'
|
|
|
304
304
|
|
|
305
305
|
export const ExecutionRunWorkflowSchema = z
|
|
306
306
|
.strictObject({
|
|
307
|
+
agent_run_id: z.string().optional().meta({
|
|
308
|
+
description: 'Root agent run owning this inference, including inference performed by child workstreams.',
|
|
309
|
+
}),
|
|
307
310
|
rate_limit_id: z
|
|
308
311
|
.string()
|
|
309
312
|
.meta({
|
|
@@ -2453,7 +2456,23 @@ export const ToolResultsPayloadSchema = z
|
|
|
2453
2456
|
.meta({ id: 'ToolResultsPayload' });
|
|
2454
2457
|
|
|
2455
2458
|
export const UserMessagePayloadSchema = z
|
|
2456
|
-
.strictObject({
|
|
2459
|
+
.strictObject({
|
|
2460
|
+
...resumeConversationFields,
|
|
2461
|
+
message: z.string(),
|
|
2462
|
+
/**
|
|
2463
|
+
* Tool results still owed to the model when the user message is sent.
|
|
2464
|
+
*
|
|
2465
|
+
* A conversation can be interrupted — the user stops the run, or a tool approval is
|
|
2466
|
+
* denied — while a tool batch has already produced results, or while `tool_use` blocks
|
|
2467
|
+
* are outstanding. Providers require a `tool_result` for every `tool_use` before the
|
|
2468
|
+
* next turn, so those results have to travel with the message that resumes the
|
|
2469
|
+
* conversation rather than in a separate turn of their own.
|
|
2470
|
+
*/
|
|
2471
|
+
results: z
|
|
2472
|
+
.array(ToolResultSchema)
|
|
2473
|
+
.optional()
|
|
2474
|
+
.meta({ description: 'Tool results owed to the model, delivered with this message.' }),
|
|
2475
|
+
})
|
|
2457
2476
|
.meta({ id: 'UserMessagePayload' });
|
|
2458
2477
|
|
|
2459
2478
|
export const ExecutionResponseSchema = z
|
|
@@ -2461,6 +2480,7 @@ export const ExecutionResponseSchema = z
|
|
|
2461
2480
|
result: z.array(CompletionResultSchema),
|
|
2462
2481
|
token_usage: ExecutionTokenUsageSchema.optional(),
|
|
2463
2482
|
prompt_cache_diagnostic: PromptCacheDiagnosticSchema.optional(),
|
|
2483
|
+
service_tier: z.string().meta({ description: 'Processing tier actually used by the provider' }).optional(),
|
|
2464
2484
|
tool_use: z.array(ToolUseSchema).optional(),
|
|
2465
2485
|
finish_reason: z.string().optional(),
|
|
2466
2486
|
error: z
|
|
@@ -2527,6 +2547,10 @@ export const ComputeRunFacetsResponseSchema = z
|
|
|
2527
2547
|
export const RunClonePayloadSchema = z
|
|
2528
2548
|
.strictObject({
|
|
2529
2549
|
source_run_id: z.string(),
|
|
2530
|
-
workflow: z.strictObject({
|
|
2550
|
+
workflow: z.strictObject({
|
|
2551
|
+
run_id: z.string(),
|
|
2552
|
+
workflow_id: z.string(),
|
|
2553
|
+
agent_run_id: ExecutionRunWorkflowSchema.shape.agent_run_id,
|
|
2554
|
+
}),
|
|
2531
2555
|
})
|
|
2532
2556
|
.meta({ id: 'RunClonePayload' });
|
|
@@ -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,
|
|
@@ -32,6 +32,8 @@ export enum LlmCallType {
|
|
|
32
32
|
Checkpoint = 'checkpoint',
|
|
33
33
|
/** Nested interaction call from within tools */
|
|
34
34
|
NestedInteraction = 'nested_interaction',
|
|
35
|
+
/** Background inference attributed to an agent, such as topic generation */
|
|
36
|
+
Background = 'background',
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
/**
|