@vertesia/common 1.6.0-dev.20261014.015055Z → 1.6.0-dev.20261019.172735Z
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 +1203 -24
- package/lib/api-schemas/agent-runs.d.ts +50 -0
- package/lib/api-schemas/agent-runs.d.ts.map +1 -1
- package/lib/api-schemas/agent-runs.js +3 -3
- package/lib/api-schemas/agent-runs.js.map +1 -1
- package/lib/api-schemas/app-lifecycle.d.ts +126 -0
- package/lib/api-schemas/app-lifecycle.d.ts.map +1 -1
- package/lib/api-schemas/app-lifecycle.js +134 -1
- package/lib/api-schemas/app-lifecycle.js.map +1 -1
- package/lib/api-schemas/app-runtime.d.ts +466 -0
- package/lib/api-schemas/app-runtime.d.ts.map +1 -1
- package/lib/api-schemas/app-runtime.js +50 -1
- package/lib/api-schemas/app-runtime.js.map +1 -1
- package/lib/api-schemas/apps.d.ts +73 -0
- package/lib/api-schemas/apps.d.ts.map +1 -1
- package/lib/api-schemas/apps.js +41 -0
- package/lib/api-schemas/apps.js.map +1 -1
- package/lib/api-schemas/audit-trail.d.ts.map +1 -1
- package/lib/api-schemas/audit-trail.js +5 -5
- package/lib/api-schemas/audit-trail.js.map +1 -1
- package/lib/api-schemas/content.d.ts +25 -0
- package/lib/api-schemas/content.d.ts.map +1 -1
- package/lib/api-schemas/content.js +5 -5
- package/lib/api-schemas/content.js.map +1 -1
- package/lib/api-schemas/document-processing.d.ts +15 -0
- package/lib/api-schemas/document-processing.d.ts.map +1 -1
- package/lib/api-schemas/events.d.ts +45 -0
- package/lib/api-schemas/events.d.ts.map +1 -1
- package/lib/api-schemas/inference-profile.d.ts +30 -0
- package/lib/api-schemas/inference-profile.d.ts.map +1 -1
- package/lib/api-schemas/interaction.d.ts +395 -0
- package/lib/api-schemas/interaction.d.ts.map +1 -1
- package/lib/api-schemas/interaction.js +9 -7
- package/lib/api-schemas/interaction.js.map +1 -1
- package/lib/api-schemas/oauth-server.d.ts +128 -0
- package/lib/api-schemas/oauth-server.d.ts.map +1 -1
- package/lib/api-schemas/oauth-server.js +95 -2
- package/lib/api-schemas/oauth-server.js.map +1 -1
- package/lib/api-schemas/process.d.ts +11 -0
- package/lib/api-schemas/process.d.ts.map +1 -1
- package/lib/api-schemas/process.js +12 -0
- package/lib/api-schemas/process.js.map +1 -1
- package/lib/api-schemas/project-configuration.d.ts +50 -0
- package/lib/api-schemas/project-configuration.d.ts.map +1 -1
- package/lib/api-schemas/project.d.ts +75 -0
- package/lib/api-schemas/project.d.ts.map +1 -1
- package/lib/api-schemas/prompt.d.ts.map +1 -1
- package/lib/api-schemas/prompt.js +5 -2
- package/lib/api-schemas/prompt.js.map +1 -1
- package/lib/api-schemas/registry.d.ts +1266 -0
- package/lib/api-schemas/registry.d.ts.map +1 -1
- package/lib/api-schemas/registry.js +33 -3
- package/lib/api-schemas/registry.js.map +1 -1
- package/lib/api-schemas/schema-primitives.d.ts +8 -0
- package/lib/api-schemas/schema-primitives.d.ts.map +1 -1
- package/lib/api-schemas/schema-primitives.js +8 -0
- package/lib/api-schemas/schema-primitives.js.map +1 -1
- package/lib/api-schemas/store.d.ts +250 -0
- package/lib/api-schemas/store.d.ts.map +1 -1
- package/lib/api-schemas/store.js +3 -3
- package/lib/api-schemas/store.js.map +1 -1
- package/lib/api-schemas/task.d.ts.map +1 -1
- package/lib/api-schemas/task.js +3 -2
- package/lib/api-schemas/task.js.map +1 -1
- package/lib/api-schemas/workflow-runs.d.ts +10 -0
- package/lib/api-schemas/workflow-runs.d.ts.map +1 -1
- package/lib/apikey.d.ts +7 -0
- package/lib/apikey.d.ts.map +1 -1
- package/lib/apikey.js.map +1 -1
- package/lib/apps.d.ts +37 -1
- package/lib/apps.d.ts.map +1 -1
- package/lib/apps.js +74 -3
- package/lib/apps.js.map +1 -1
- package/lib/interaction.d.ts.map +1 -1
- package/lib/interaction.js.map +1 -1
- package/lib/oauth-server.d.ts +5 -0
- package/lib/oauth-server.d.ts.map +1 -1
- package/lib/store/index.d.ts +1 -0
- package/lib/store/index.d.ts.map +1 -1
- package/lib/store/index.js +1 -0
- package/lib/store/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 +1 -2
- package/lib/store/intake-policy-schema.generated.js.map +1 -1
- package/lib/store/text-limits.d.ts +18 -0
- package/lib/store/text-limits.d.ts.map +1 -0
- package/lib/store/text-limits.js +56 -0
- package/lib/store/text-limits.js.map +1 -0
- package/lib/vertesia-common.js +4 -2
- package/lib/vertesia-common.js.map +1 -1
- package/lib/wire-types.generated.d.ts +246 -2
- package/lib/wire-types.generated.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/api-contract/components.generated.json +1203 -24
- package/src/api-schemas/agent-runs.ts +3 -3
- package/src/api-schemas/app-lifecycle.ts +163 -1
- package/src/api-schemas/app-runtime.ts +54 -0
- package/src/api-schemas/apps.ts +46 -0
- package/src/api-schemas/audit-trail.ts +5 -5
- package/src/api-schemas/content.ts +5 -5
- package/src/api-schemas/interaction.ts +9 -7
- package/src/api-schemas/oauth-server.ts +103 -2
- package/src/api-schemas/process.ts +13 -0
- package/src/api-schemas/prompt.ts +5 -2
- package/src/api-schemas/registry.ts +52 -0
- package/src/api-schemas/schema-primitives.ts +9 -0
- package/src/api-schemas/store.ts +3 -3
- package/src/api-schemas/task.ts +3 -2
- package/src/apikey.ts +8 -0
- package/src/apps.ts +116 -3
- package/src/interaction.ts +1 -0
- package/src/oauth-server.ts +10 -0
- package/src/store/index.ts +1 -0
- package/src/store/intake-policy-schema.generated.ts +1 -2
- package/src/store/text-limits.ts +64 -0
- package/src/wire-types.generated.ts +266 -2
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
RecordProcessRunPayloadSchema,
|
|
37
37
|
} from './process.js';
|
|
38
38
|
import { AgentBudgetConfigurationSchema, AgentCheckpointConfigurationSchema } from './project-configuration.js';
|
|
39
|
-
import { nullableStringSchema } from './schema-primitives.js';
|
|
39
|
+
import { nullableStringSchema, PageCountSchema } from './schema-primitives.js';
|
|
40
40
|
import { InteractionExecutionConfigurationSchema } from './store.js';
|
|
41
41
|
|
|
42
42
|
// ----------------------------------------------------------------------------
|
|
@@ -1438,8 +1438,8 @@ export const ListAgentRunsQuerySchema = z
|
|
|
1438
1438
|
.string()
|
|
1439
1439
|
.meta({ description: 'Only return runs started at or before this date', format: 'date-time' })
|
|
1440
1440
|
.optional(),
|
|
1441
|
-
limit:
|
|
1442
|
-
offset:
|
|
1441
|
+
limit: PageCountSchema.meta({ description: 'Maximum number of results (default: 50)' }).optional(),
|
|
1442
|
+
offset: PageCountSchema.meta({ description: 'Offset for pagination' }).optional(),
|
|
1443
1443
|
cursor: z.string().meta({ description: 'Cursor for stable pagination' }).optional(),
|
|
1444
1444
|
schedule_id: z.string().meta({ description: 'Filter by schedule ID' }).optional(),
|
|
1445
1445
|
type: AgentRunTypeSchema.meta({ description: 'Filter by run type' }).optional(),
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { APPGEN_PACKAGE_SPEC_PATTERN } from '../appgen.js';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
AppAccessControlSchema,
|
|
5
|
+
AppAvailableInSchema,
|
|
6
|
+
AppSourceConfigSchema,
|
|
7
|
+
MCPToolAnnotationsSchema,
|
|
8
|
+
} from './apps.js';
|
|
4
9
|
import { EventCategorySchema } from './audit-trail.js';
|
|
5
10
|
import { AgentBudgetConfigurationSchema } from './project-configuration.js';
|
|
6
11
|
|
|
@@ -95,6 +100,12 @@ export const AppScaffoldModuleSchema = z
|
|
|
95
100
|
.enum(['service', 'assistant', 'content-app', 'examples'])
|
|
96
101
|
.meta({ id: 'AppScaffoldModule' });
|
|
97
102
|
|
|
103
|
+
export const AppScaffoldSourceModeSchema = z.enum(['generate', 'existing']).meta({
|
|
104
|
+
id: 'AppScaffoldSourceMode',
|
|
105
|
+
description:
|
|
106
|
+
'How App Builder should use a connected source repository. `generate` writes a starter app to an empty branch; `existing` only binds the repository.',
|
|
107
|
+
});
|
|
108
|
+
|
|
98
109
|
export const AppBuildTriggerSchema = z.enum(['ui', 'git_push', 'agent', 'api']).meta({ id: 'AppBuildTrigger' });
|
|
99
110
|
|
|
100
111
|
export const Extract_AppVersionGitRefType_branch_tag_commitSchema = z
|
|
@@ -405,6 +416,22 @@ export const AppVersionGitSourceSchema = z
|
|
|
405
416
|
})
|
|
406
417
|
.meta({ id: 'AppVersionGitSource' });
|
|
407
418
|
|
|
419
|
+
export const AppGithubRepositoryCreationSchema = z
|
|
420
|
+
.strictObject({
|
|
421
|
+
name: z
|
|
422
|
+
.string()
|
|
423
|
+
.trim()
|
|
424
|
+
.min(1)
|
|
425
|
+
.max(100)
|
|
426
|
+
.regex(/^[A-Za-z0-9][A-Za-z0-9._-]*$/)
|
|
427
|
+
.meta({ description: 'Name of the empty GitHub repository to create in the verified installation.' }),
|
|
428
|
+
private: z
|
|
429
|
+
.boolean()
|
|
430
|
+
.optional()
|
|
431
|
+
.meta({ description: 'Create a private repository. Defaults to true when omitted.' }),
|
|
432
|
+
})
|
|
433
|
+
.meta({ id: 'AppGithubRepositoryCreation' });
|
|
434
|
+
|
|
408
435
|
export const StartAppScaffoldRequestSchema = z
|
|
409
436
|
.strictObject({
|
|
410
437
|
app_id: z.string().meta({
|
|
@@ -431,9 +458,115 @@ export const StartAppScaffoldRequestSchema = z
|
|
|
431
458
|
description: 'Start an initial app version build after the source has been pushed. Defaults to true.',
|
|
432
459
|
})
|
|
433
460
|
.optional(),
|
|
461
|
+
source_mode: AppScaffoldSourceModeSchema.optional().meta({
|
|
462
|
+
description:
|
|
463
|
+
'Explicit source setup behavior for external repositories. Omit to retain the legacy automatic behavior.',
|
|
464
|
+
}),
|
|
465
|
+
source: AppSourceConfigSchema.optional().meta({
|
|
466
|
+
description:
|
|
467
|
+
'Source repository to bind to the app. Omit to create and scaffold a Vertesia-managed repository.',
|
|
468
|
+
}),
|
|
469
|
+
github_connection_id: z.string().optional().meta({
|
|
470
|
+
description: 'Short-lived proof that the current user verified the selected GitHub installation.',
|
|
471
|
+
}),
|
|
472
|
+
github_repository_creation: AppGithubRepositoryCreationSchema.optional().meta({
|
|
473
|
+
description:
|
|
474
|
+
'Create an empty repository in the verified GitHub installation before generating the app source.',
|
|
475
|
+
}),
|
|
434
476
|
})
|
|
435
477
|
.meta({ id: 'StartAppScaffoldRequest' });
|
|
436
478
|
|
|
479
|
+
export const AppGithubConfigurationSchema = z
|
|
480
|
+
.strictObject({
|
|
481
|
+
enabled: z.boolean(),
|
|
482
|
+
app_slug: z.string().optional(),
|
|
483
|
+
install_url: z.string().optional(),
|
|
484
|
+
relay_url: z.string().optional(),
|
|
485
|
+
})
|
|
486
|
+
.meta({ id: 'AppGithubConfiguration' });
|
|
487
|
+
|
|
488
|
+
export const StartAppGithubAuthorizationResponseSchema = z
|
|
489
|
+
.strictObject({ authorization_url: z.string() })
|
|
490
|
+
.meta({ id: 'StartAppGithubAuthorizationResponse' });
|
|
491
|
+
|
|
492
|
+
export const ExchangeAppGithubAuthorizationRequestSchema = z
|
|
493
|
+
.strictObject({ code: z.string(), state: z.string() })
|
|
494
|
+
.meta({ id: 'ExchangeAppGithubAuthorizationRequest' });
|
|
495
|
+
|
|
496
|
+
export const AppGithubRepositoriesQuerySchema = z
|
|
497
|
+
.strictObject({
|
|
498
|
+
connection_id: z.string().trim().min(1),
|
|
499
|
+
installation_id: z.string().trim().min(1),
|
|
500
|
+
})
|
|
501
|
+
.meta({ id: 'AppGithubRepositoriesQuery' });
|
|
502
|
+
|
|
503
|
+
export const AppGithubInstallationSchema = z
|
|
504
|
+
.strictObject({
|
|
505
|
+
id: z.string(),
|
|
506
|
+
account_login: z.string(),
|
|
507
|
+
account_type: z.string().optional(),
|
|
508
|
+
repository_selection: z.enum(['all', 'selected']),
|
|
509
|
+
})
|
|
510
|
+
.meta({ id: 'AppGithubInstallation' });
|
|
511
|
+
|
|
512
|
+
export const AppGithubAccountSchema = z
|
|
513
|
+
.strictObject({
|
|
514
|
+
login: z.string(),
|
|
515
|
+
account_type: z.string(),
|
|
516
|
+
avatar_url: z.string().optional(),
|
|
517
|
+
})
|
|
518
|
+
.meta({ id: 'AppGithubAccount' });
|
|
519
|
+
|
|
520
|
+
export const ExchangeAppGithubAuthorizationResponseSchema = z
|
|
521
|
+
.strictObject({
|
|
522
|
+
connection_id: z.string(),
|
|
523
|
+
installations: z.array(AppGithubInstallationSchema),
|
|
524
|
+
accounts: z.array(AppGithubAccountSchema),
|
|
525
|
+
})
|
|
526
|
+
.meta({ id: 'ExchangeAppGithubAuthorizationResponse' });
|
|
527
|
+
|
|
528
|
+
export const AppGithubRepositorySchema = z
|
|
529
|
+
.strictObject({
|
|
530
|
+
name: z.string(),
|
|
531
|
+
full_name: z.string(),
|
|
532
|
+
private: z.boolean(),
|
|
533
|
+
default_branch: z.string(),
|
|
534
|
+
html_url: z.string(),
|
|
535
|
+
})
|
|
536
|
+
.meta({ id: 'AppGithubRepository' });
|
|
537
|
+
|
|
538
|
+
export const AppGithubRepositoryListSchema = z
|
|
539
|
+
.strictObject({ repositories: z.array(AppGithubRepositorySchema) })
|
|
540
|
+
.meta({ id: 'AppGithubRepositoryList' });
|
|
541
|
+
|
|
542
|
+
export const AppGithubRepositorySetupQuerySchema = z
|
|
543
|
+
.strictObject({
|
|
544
|
+
connection_id: z.string().trim().min(1),
|
|
545
|
+
installation_id: z.string().trim().min(1),
|
|
546
|
+
repository: z.string().trim().min(1),
|
|
547
|
+
branch: z.string().trim().min(1),
|
|
548
|
+
})
|
|
549
|
+
.meta({ id: 'AppGithubRepositorySetupQuery' });
|
|
550
|
+
|
|
551
|
+
export const AppGithubBranchStateSchema = z
|
|
552
|
+
.strictObject({
|
|
553
|
+
name: z.string(),
|
|
554
|
+
exists: z.boolean(),
|
|
555
|
+
empty: z.boolean(),
|
|
556
|
+
})
|
|
557
|
+
.meta({ id: 'AppGithubBranchState' });
|
|
558
|
+
|
|
559
|
+
export const AppGithubRepositorySetupSchema = z
|
|
560
|
+
.strictObject({
|
|
561
|
+
default_branch: z.string(),
|
|
562
|
+
branches: z.array(z.string()),
|
|
563
|
+
selected_branch: AppGithubBranchStateSchema,
|
|
564
|
+
})
|
|
565
|
+
.meta({
|
|
566
|
+
id: 'AppGithubRepositorySetup',
|
|
567
|
+
description: 'Branch choices and write-safety state for a verified GitHub repository.',
|
|
568
|
+
});
|
|
569
|
+
|
|
437
570
|
export const StartAppDevelopmentTaskRequestSchema = z
|
|
438
571
|
.strictObject({
|
|
439
572
|
prompt: z.string().min(1).meta({ description: 'Development request passed to the App Builder parent.' }),
|
|
@@ -685,6 +818,7 @@ export const AppVersionStorageSchema = z
|
|
|
685
818
|
export const AppToolCollectionSchema = z
|
|
686
819
|
.strictObject({
|
|
687
820
|
name: z.string().meta({ description: 'The collection name' }),
|
|
821
|
+
collection_id: z.string().optional(),
|
|
688
822
|
description: z.string().meta({ description: 'Optional collection description' }).optional(),
|
|
689
823
|
tools: z.array(AgentToolDefinitionSchema).meta({ description: 'the tools provided by this collection' }),
|
|
690
824
|
})
|
|
@@ -855,6 +989,30 @@ export const UpsertAppVersionRequestSchema = z
|
|
|
855
989
|
export const AppInstallationPayloadSchema = z
|
|
856
990
|
.strictObject({
|
|
857
991
|
app_id: z.string(),
|
|
992
|
+
instance_key: z
|
|
993
|
+
.string()
|
|
994
|
+
.regex(/^[a-z][a-z0-9_-]{0,31}$/)
|
|
995
|
+
.optional(),
|
|
996
|
+
display_name: z.string().max(120).optional().meta({
|
|
997
|
+
description: 'Optional instance label. Send an empty string to clear the saved label; omit to preserve it.',
|
|
998
|
+
}),
|
|
999
|
+
namespace_overrides: z
|
|
1000
|
+
.record(
|
|
1001
|
+
z.string(),
|
|
1002
|
+
z
|
|
1003
|
+
.string()
|
|
1004
|
+
.max(24)
|
|
1005
|
+
.regex(/^[a-z]([a-z0-9]|_[a-z0-9])*_?$/),
|
|
1006
|
+
)
|
|
1007
|
+
.optional(),
|
|
1008
|
+
mcp_shared_parameters: z.record(z.string(), z.string().nullable()).optional().meta({
|
|
1009
|
+
description:
|
|
1010
|
+
'Shared MCP parameter overrides. Omitted values are retained; null clears an override or restores its default.',
|
|
1011
|
+
}),
|
|
1012
|
+
mcp_parameters: z.record(z.string(), z.record(z.string(), z.string().nullable())).optional().meta({
|
|
1013
|
+
description:
|
|
1014
|
+
'Installation parameter overrides by MCP collection id. Omit to preserve; null clears an override. Secret inputs are write-only.',
|
|
1015
|
+
}),
|
|
858
1016
|
settings: z.looseObject({}).optional(),
|
|
859
1017
|
access_control: z
|
|
860
1018
|
.union([AppAccessControlSchema, z.null()])
|
|
@@ -958,3 +1116,7 @@ export const SystemPackageQuerySchema = z
|
|
|
958
1116
|
.optional(),
|
|
959
1117
|
})
|
|
960
1118
|
.meta({ id: 'SystemPackageQuery' });
|
|
1119
|
+
|
|
1120
|
+
export const AppInstanceAvailabilitySchema = z
|
|
1121
|
+
.strictObject({ enabled: z.boolean() })
|
|
1122
|
+
.meta({ id: 'AppInstanceAvailability' });
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
AppSourceConfigSchema,
|
|
21
21
|
AppUIConfigSchema,
|
|
22
22
|
MCPOAuthConfigSchema,
|
|
23
|
+
McpConnectionParameterSchema,
|
|
23
24
|
ToolCollectionObjectSchema,
|
|
24
25
|
} from './apps.js';
|
|
25
26
|
import { AuditMeterSchema } from './audit-trail.js';
|
|
@@ -262,12 +263,28 @@ const appOAuthApprovalSchema = z.strictObject({
|
|
|
262
263
|
approved_at: z.string(),
|
|
263
264
|
});
|
|
264
265
|
|
|
266
|
+
const mcpConfigurationSchema = z.strictObject({
|
|
267
|
+
revision: z.string(),
|
|
268
|
+
values: z.record(z.string(), z.record(z.string(), z.string())),
|
|
269
|
+
configured_secrets: z.record(z.string(), z.array(z.string())),
|
|
270
|
+
shared_values: z.record(z.string(), z.string()).optional(),
|
|
271
|
+
configured_shared_secrets: z.array(z.string()).optional(),
|
|
272
|
+
});
|
|
273
|
+
|
|
265
274
|
export const AppInstallationSchema = z
|
|
266
275
|
.strictObject({
|
|
267
276
|
id: z.string(),
|
|
268
277
|
project: z.string(),
|
|
278
|
+
instance_key: z.string().optional(),
|
|
279
|
+
display_name: z.string().optional(),
|
|
280
|
+
installation_version: z.literal(1).optional(),
|
|
281
|
+
namespace_overrides: z.record(z.string(), z.string()).optional(),
|
|
282
|
+
reserved_namespaces: z.array(z.string()).min(1).optional(),
|
|
283
|
+
namespace_conflicts: z.array(z.string()).optional(),
|
|
269
284
|
manifest: z.string(),
|
|
285
|
+
mcp_configuration: mcpConfigurationSchema.optional(),
|
|
270
286
|
oauth_approval: appOAuthApprovalSchema.optional(),
|
|
287
|
+
oauth_client_id: z.string().optional(),
|
|
271
288
|
settings: z.looseObject({}).optional(),
|
|
272
289
|
tool_allowlist: z
|
|
273
290
|
.array(z.string())
|
|
@@ -336,9 +353,27 @@ export const AppDashboardDefinitionSchema = z
|
|
|
336
353
|
'Dashboard definition contributed by an app package.\n\nApp dashboard IDs are local to the app. The platform exposes them as `app:<app_name>:<id>` when listing or retrieving dashboards.',
|
|
337
354
|
});
|
|
338
355
|
|
|
356
|
+
export const AppOAuthClientConfigSchema = z
|
|
357
|
+
.strictObject({
|
|
358
|
+
redirect_uris: z.array(z.string().url()).min(1),
|
|
359
|
+
})
|
|
360
|
+
.meta({
|
|
361
|
+
id: 'AppOAuthClientConfig',
|
|
362
|
+
description:
|
|
363
|
+
'Standalone public PKCE OAuth. Installation automatically provisions an app client with these exact callback URLs.',
|
|
364
|
+
});
|
|
365
|
+
|
|
339
366
|
export const AppManifestDataSchema = z
|
|
340
367
|
.strictObject({
|
|
368
|
+
parameters: z
|
|
369
|
+
.record(z.string().regex(/^[a-z][a-z0-9_]*$/), McpConnectionParameterSchema)
|
|
370
|
+
.optional()
|
|
371
|
+
.meta({
|
|
372
|
+
description:
|
|
373
|
+
'Shared MCP installation parameters available to every collection. Collection-local names must not overlap.',
|
|
374
|
+
}),
|
|
341
375
|
oauth_scopes: z.array(z.string()).optional(),
|
|
376
|
+
oauth_client: AppOAuthClientConfigSchema.optional(),
|
|
342
377
|
name: z.string().meta({
|
|
343
378
|
description: 'The name of the app, used as the id in the system. Must be in kebab case (e.g. my-app).',
|
|
344
379
|
}),
|
|
@@ -519,7 +554,9 @@ export const CompositeAppMessageOverridesSchema = z
|
|
|
519
554
|
|
|
520
555
|
export const AppManifestSchema = z
|
|
521
556
|
.strictObject({
|
|
557
|
+
parameters: AppManifestDataSchema.shape.parameters,
|
|
522
558
|
oauth_scopes: z.array(z.string()).optional(),
|
|
559
|
+
oauth_client: AppOAuthClientConfigSchema.optional(),
|
|
523
560
|
edit_revision: EditRevisionSchema,
|
|
524
561
|
name: z.string().meta({
|
|
525
562
|
description: 'The name of the app, used as the id in the system. Must be in kebab case (e.g. my-app).',
|
|
@@ -639,7 +676,15 @@ export const AppInstallationWithManifestSchema = z
|
|
|
639
676
|
.strictObject({
|
|
640
677
|
id: z.string(),
|
|
641
678
|
project: z.string(),
|
|
679
|
+
instance_key: z.string().optional(),
|
|
680
|
+
display_name: z.string().optional(),
|
|
681
|
+
installation_version: z.literal(1).optional(),
|
|
682
|
+
namespace_overrides: z.record(z.string(), z.string()).optional(),
|
|
683
|
+
reserved_namespaces: z.array(z.string()).min(1).optional(),
|
|
684
|
+
namespace_conflicts: z.array(z.string()).optional(),
|
|
685
|
+
mcp_configuration: mcpConfigurationSchema.optional(),
|
|
642
686
|
oauth_approval: appOAuthApprovalSchema.optional(),
|
|
687
|
+
oauth_client_id: z.string().optional(),
|
|
643
688
|
settings: z.looseObject({}).optional(),
|
|
644
689
|
tool_allowlist: z
|
|
645
690
|
.array(z.string())
|
|
@@ -685,7 +730,15 @@ export const AppInstallationListEntrySchema = z
|
|
|
685
730
|
.strictObject({
|
|
686
731
|
id: z.string(),
|
|
687
732
|
project: z.string(),
|
|
733
|
+
instance_key: z.string().optional(),
|
|
734
|
+
display_name: z.string().optional(),
|
|
735
|
+
installation_version: z.literal(1).optional(),
|
|
736
|
+
namespace_overrides: z.record(z.string(), z.string()).optional(),
|
|
737
|
+
reserved_namespaces: z.array(z.string()).min(1).optional(),
|
|
738
|
+
namespace_conflicts: z.array(z.string()).optional(),
|
|
739
|
+
mcp_configuration: mcpConfigurationSchema.optional(),
|
|
688
740
|
oauth_approval: appOAuthApprovalSchema.optional(),
|
|
741
|
+
oauth_client_id: z.string().optional(),
|
|
689
742
|
settings: z.looseObject({}).optional(),
|
|
690
743
|
tool_allowlist: z
|
|
691
744
|
.array(z.string())
|
|
@@ -922,6 +975,7 @@ export const AppEventSubscriptionDefinitionSchema = z
|
|
|
922
975
|
|
|
923
976
|
export const AppPackageSchema = z
|
|
924
977
|
.strictObject({
|
|
978
|
+
oauth_client: AppOAuthClientConfigSchema.optional(),
|
|
925
979
|
oauth_scopes: z
|
|
926
980
|
.array(z.string())
|
|
927
981
|
.meta({ description: 'OAuth scopes requested by the app. Users must consent to project permissions.' })
|
package/src/api-schemas/apps.ts
CHANGED
|
@@ -208,10 +208,39 @@ const toolCollectionBaseShape = {
|
|
|
208
208
|
}),
|
|
209
209
|
};
|
|
210
210
|
|
|
211
|
+
const mcpParameterFields = {
|
|
212
|
+
title: z.string().optional(),
|
|
213
|
+
description: z.string().optional(),
|
|
214
|
+
required: z.boolean().optional(),
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
// Separate variants forbid plaintext defaults for secret parameters in the emitted contract too.
|
|
218
|
+
export const McpPublicParameterSchema = z
|
|
219
|
+
.strictObject({
|
|
220
|
+
...mcpParameterFields,
|
|
221
|
+
type: z.literal('string').optional(),
|
|
222
|
+
default: z.string().optional(),
|
|
223
|
+
})
|
|
224
|
+
.meta({ id: 'McpPublicParameter' });
|
|
225
|
+
export const McpSecretParameterSchema = z
|
|
226
|
+
.strictObject({
|
|
227
|
+
...mcpParameterFields,
|
|
228
|
+
type: z.literal('secret'),
|
|
229
|
+
})
|
|
230
|
+
.meta({ id: 'McpSecretParameter' });
|
|
231
|
+
export const McpConnectionParameterSchema = z
|
|
232
|
+
.union([McpPublicParameterSchema, McpSecretParameterSchema])
|
|
233
|
+
.meta({ id: 'McpConnectionParameter' });
|
|
234
|
+
|
|
211
235
|
export const MCPToolCollectionObjectSchema = z
|
|
212
236
|
.strictObject({
|
|
213
237
|
...toolCollectionBaseShape,
|
|
214
238
|
type: z.literal('mcp'),
|
|
239
|
+
parameters: z.record(z.string().regex(/^[a-z][a-z0-9_]*$/), McpConnectionParameterSchema).optional(),
|
|
240
|
+
headers: z.record(z.string(), z.string()).optional().meta({
|
|
241
|
+
description:
|
|
242
|
+
'HTTP header templates. Reference declared installation parameters with {{name}}. Never embed secrets.',
|
|
243
|
+
}),
|
|
215
244
|
id: z.string().meta({
|
|
216
245
|
description:
|
|
217
246
|
'Stable identifier for this collection. Used to key oauth_bindings on AppInstallation — ' +
|
|
@@ -318,9 +347,23 @@ export const ToolCollectionObjectSchema = z
|
|
|
318
347
|
.discriminatedUnion('type', [MCPToolCollectionObjectSchema, VertesiaSDKToolCollectionObjectSchema])
|
|
319
348
|
.meta({ id: 'ToolCollectionObject' });
|
|
320
349
|
|
|
350
|
+
export const AppGitSourceProviderSchema = z.enum(['vertesia', 'github']).meta({ id: 'AppGitSourceProvider' });
|
|
351
|
+
|
|
321
352
|
export const AppGitSourceConfigSchema = z
|
|
322
353
|
.strictObject({
|
|
354
|
+
provider: AppGitSourceProviderSchema.optional().meta({
|
|
355
|
+
description:
|
|
356
|
+
'Repository provider. Missing values are treated as `vertesia` for apps created before provider support.',
|
|
357
|
+
}),
|
|
323
358
|
url: z.string().optional(),
|
|
359
|
+
installation_id: z
|
|
360
|
+
.string()
|
|
361
|
+
.optional()
|
|
362
|
+
.meta({ description: 'Verified GitHub App installation id. Required when provider is `github`.' }),
|
|
363
|
+
repository: z
|
|
364
|
+
.string()
|
|
365
|
+
.optional()
|
|
366
|
+
.meta({ description: 'GitHub repository in `owner/name` form. Required when provider is `github`.' }),
|
|
324
367
|
default_branch: z.string().optional(),
|
|
325
368
|
production_branch: z.string().optional(),
|
|
326
369
|
development_branch: z.string().optional(),
|
|
@@ -343,7 +386,10 @@ export const AppManifestSourceSchema = z
|
|
|
343
386
|
.strictObject({
|
|
344
387
|
kind: z.literal('git'),
|
|
345
388
|
git: z.strictObject({
|
|
389
|
+
provider: AppGitSourceProviderSchema.optional(),
|
|
346
390
|
url: z.string(),
|
|
391
|
+
installation_id: z.string().optional(),
|
|
392
|
+
repository: z.string().optional(),
|
|
347
393
|
default_branch: z.string().optional(),
|
|
348
394
|
production_branch: z.string().optional(),
|
|
349
395
|
development_branch: z.string().optional(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { AUDIT_ACTIONS, AUDIT_AGGREGATION_DIMENSIONS } from '../audit-trail.js';
|
|
3
3
|
import { NumberValueMapSchema } from './interaction.js';
|
|
4
|
+
import { PageCountSchema } from './schema-primitives.js';
|
|
4
5
|
|
|
5
6
|
// The audit trail: the events `GET /audit-trail` pages through and the aggregation `POST
|
|
6
7
|
// /audit-trail/aggregate` computes over them.
|
|
@@ -244,11 +245,10 @@ export const AuditTrailQuerySchema = z
|
|
|
244
245
|
.optional(),
|
|
245
246
|
from: z.string().meta({ description: 'Start time (ISO string)' }).optional(),
|
|
246
247
|
to: z.string().meta({ description: 'End time (ISO string)' }).optional(),
|
|
247
|
-
limit:
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
offset: z.number().meta({ description: 'Pagination: offset' }).optional(),
|
|
248
|
+
limit: PageCountSchema.meta({
|
|
249
|
+
description: 'Pagination: number of items to return (default 50, max 200)',
|
|
250
|
+
}).optional(),
|
|
251
|
+
offset: PageCountSchema.meta({ description: 'Pagination: offset' }).optional(),
|
|
252
252
|
})
|
|
253
253
|
.meta({ id: 'AuditTrailQuery' });
|
|
254
254
|
|
|
@@ -7,7 +7,7 @@ import { ContentObjectStatus } from '../store/store.js';
|
|
|
7
7
|
import { ContentObjectTypeRefSchema } from './app-lifecycle.js';
|
|
8
8
|
import { StringArrayMapSchema } from './dashboard.js';
|
|
9
9
|
import { ComputedFacetResponseSchema, FacetSpecSchema, SortOptionSchema } from './interaction.js';
|
|
10
|
-
import { nullableStringSchema } from './schema-primitives.js';
|
|
10
|
+
import { nullableStringSchema, PageCountSchema } from './schema-primitives.js';
|
|
11
11
|
import { ColumnLayoutSchema, ContentObjectTypeSchema, EmbeddingTypeEnabledMapSchema } from './store.js';
|
|
12
12
|
|
|
13
13
|
export const scoreAggregationTypesSchema = z.enum(['rrf', 'rsf', 'smart']).meta({ id: 'scoreAggregationTypes' });
|
|
@@ -457,8 +457,8 @@ export const ComplexCollectionSearchQuerySchema = z
|
|
|
457
457
|
parent: nullableStringSchema.optional(),
|
|
458
458
|
dynamic: z.boolean().optional(),
|
|
459
459
|
status: CollectionStatusSchema.optional(),
|
|
460
|
-
limit:
|
|
461
|
-
offset:
|
|
460
|
+
limit: PageCountSchema.optional(),
|
|
461
|
+
offset: PageCountSchema.optional(),
|
|
462
462
|
name: z.string().optional(),
|
|
463
463
|
type: z.string().optional(),
|
|
464
464
|
types: z.array(z.string()).optional(),
|
|
@@ -1059,8 +1059,8 @@ export const CollectionMembersQuerySchema = z
|
|
|
1059
1059
|
.object({
|
|
1060
1060
|
status: z.string().optional(),
|
|
1061
1061
|
type: z.string().optional(),
|
|
1062
|
-
limit:
|
|
1063
|
-
offset:
|
|
1062
|
+
limit: PageCountSchema.optional(),
|
|
1063
|
+
offset: PageCountSchema.optional(),
|
|
1064
1064
|
})
|
|
1065
1065
|
.meta({ id: 'CollectionMembersQuery' });
|
|
1066
1066
|
|
|
@@ -28,7 +28,7 @@ import { InferenceProfileIdSchema, InferenceProfileSnapshotSchema } from './infe
|
|
|
28
28
|
import { AccountRefSchema } from './invites.js';
|
|
29
29
|
import { ProcessAgentExecutionPolicySchema } from './process-agent-policy.js';
|
|
30
30
|
import { AgentBudgetConfigurationSchema, AgentCheckpointConfigurationSchema } from './project-configuration.js';
|
|
31
|
-
import { EditRevisionSchema, ExpectedEditRevisionSchema } from './schema-primitives.js';
|
|
31
|
+
import { EditRevisionSchema, ExpectedEditRevisionSchema, PageCountSchema } from './schema-primitives.js';
|
|
32
32
|
import { InteractionExecutionConfigurationSchema, RunDataStorageLevelSchema } from './store.js';
|
|
33
33
|
|
|
34
34
|
/**
|
|
@@ -498,8 +498,8 @@ export const InteractionForkPayloadSchema = z
|
|
|
498
498
|
|
|
499
499
|
export const InteractionEndpointQuerySchema = z
|
|
500
500
|
.strictObject({
|
|
501
|
-
limit:
|
|
502
|
-
offset:
|
|
501
|
+
limit: PageCountSchema.optional(),
|
|
502
|
+
offset: PageCountSchema.optional(),
|
|
503
503
|
status: InteractionStatusSchema.optional(),
|
|
504
504
|
visibility: InteractionVisibilitySchema.optional(),
|
|
505
505
|
version: z.number().optional(),
|
|
@@ -701,8 +701,10 @@ export const RunSearchQuerySchema = z
|
|
|
701
701
|
*/
|
|
702
702
|
export const RunListQuerySchema = z
|
|
703
703
|
.strictObject({
|
|
704
|
-
|
|
705
|
-
|
|
704
|
+
// Already published as `integer`, so these keep that type and only gain the lower bound a find
|
|
705
|
+
// `skip` needs; a negative count failed there as a 500.
|
|
706
|
+
limit: z.number().int().min(0).meta({ description: 'Maximum number of runs to return.' }).optional(),
|
|
707
|
+
offset: z.number().int().min(0).meta({ description: 'Number of runs to skip.' }).optional(),
|
|
706
708
|
interaction: z
|
|
707
709
|
.array(z.string())
|
|
708
710
|
.meta({ description: 'Interaction ids, or in-code interaction names, to filter by.' })
|
|
@@ -1144,8 +1146,8 @@ export const RunSearchPayloadSchema = z
|
|
|
1144
1146
|
})
|
|
1145
1147
|
.optional(),
|
|
1146
1148
|
query: RunSearchQuerySchema.optional(),
|
|
1147
|
-
limit:
|
|
1148
|
-
offset:
|
|
1149
|
+
limit: PageCountSchema.optional(),
|
|
1150
|
+
offset: PageCountSchema.optional(),
|
|
1149
1151
|
select: z.string().optional(),
|
|
1150
1152
|
all_revisions: z.boolean().optional(),
|
|
1151
1153
|
from_root: z.string().optional(),
|