@vertesia/common 1.4.0 → 1.5.0-dev.20260713.113008Z
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/access-control.d.ts +31 -6
- package/lib/access-control.d.ts.map +1 -1
- package/lib/access-control.js +12 -2
- package/lib/access-control.js.map +1 -1
- package/lib/apikey.d.ts +29 -5
- package/lib/apikey.d.ts.map +1 -1
- package/lib/apikey.js.map +1 -1
- package/lib/apps.d.ts +78 -4
- package/lib/apps.d.ts.map +1 -1
- package/lib/apps.js +2 -0
- package/lib/apps.js.map +1 -1
- package/lib/audit-trail.d.ts +15 -2
- package/lib/audit-trail.d.ts.map +1 -1
- package/lib/audit-trail.js +20 -0
- package/lib/audit-trail.js.map +1 -1
- package/lib/environment.d.ts +7 -0
- package/lib/environment.d.ts.map +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/integrations.d.ts +13 -1
- package/lib/integrations.d.ts.map +1 -1
- package/lib/integrations.js.map +1 -1
- package/lib/platform-event-validation.d.ts +45 -0
- package/lib/platform-event-validation.d.ts.map +1 -0
- package/lib/platform-event-validation.js +323 -0
- package/lib/platform-event-validation.js.map +1 -0
- package/lib/platform-event.d.ts +665 -0
- package/lib/platform-event.d.ts.map +1 -0
- package/lib/platform-event.js +2 -0
- package/lib/platform-event.js.map +1 -0
- package/lib/project.d.ts +32 -0
- package/lib/project.d.ts.map +1 -1
- package/lib/project.js.map +1 -1
- package/lib/prompt.d.ts +1 -0
- package/lib/prompt.d.ts.map +1 -1
- package/lib/prompt.js.map +1 -1
- package/lib/query.d.ts +1 -0
- package/lib/query.d.ts.map +1 -1
- package/lib/rate-limiter.d.ts +72 -0
- package/lib/rate-limiter.d.ts.map +1 -1
- package/lib/roles/types.d.ts +1 -1
- package/lib/roles/types.js +1 -1
- package/lib/secrets.d.ts +59 -0
- package/lib/secrets.d.ts.map +1 -1
- package/lib/store/agent-run.d.ts +17 -1
- package/lib/store/agent-run.d.ts.map +1 -1
- package/lib/store/process-validation.js +19 -0
- package/lib/store/process-validation.js.map +1 -1
- package/lib/store/store.d.ts +234 -10
- package/lib/store/store.d.ts.map +1 -1
- package/lib/store/store.js +3 -1
- package/lib/store/store.js.map +1 -1
- package/lib/store/workflow.d.ts +6 -5
- package/lib/store/workflow.d.ts.map +1 -1
- package/lib/store/workflow.js.map +1 -1
- package/lib/sts-token-types.d.ts +1 -0
- package/lib/sts-token-types.d.ts.map +1 -1
- package/lib/sts-token-types.js.map +1 -1
- package/lib/user.d.ts +36 -1
- package/lib/user.d.ts.map +1 -1
- package/lib/user.js +39 -0
- package/lib/user.js.map +1 -1
- package/lib/vertesia-common.js +3 -2
- package/lib/vertesia-common.js.map +1 -1
- package/package.json +4 -7
- package/src/access-control.ts +31 -6
- package/src/apikey.ts +29 -5
- package/src/apps.ts +87 -4
- package/src/audit-trail.ts +34 -18
- package/src/environment.ts +7 -0
- package/src/index.ts +25 -0
- package/src/integrations.ts +14 -1
- package/src/platform-event-validation.test.ts +225 -0
- package/src/platform-event-validation.ts +359 -0
- package/src/platform-event.ts +771 -0
- package/src/project.ts +38 -0
- package/src/prompt.ts +1 -0
- package/src/query.ts +1 -0
- package/src/rate-limiter.ts +78 -0
- package/src/roles/types.ts +1 -1
- package/src/secrets.ts +69 -0
- package/src/store/agent-run.ts +22 -1
- package/src/store/process-validation.test.ts +62 -0
- package/src/store/process-validation.ts +18 -0
- package/src/store/store.ts +263 -10
- package/src/store/workflow.ts +7 -5
- package/src/sts-token-types.ts +1 -0
- package/src/user.ts +49 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertesia/common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0-dev.20260713.113008Z",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -17,17 +17,14 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"
|
|
21
|
-
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
22
|
-
"@rollup/plugin-terser": "^1.0.0",
|
|
23
|
-
"rollup": "^4.61.1",
|
|
20
|
+
"rolldown": "1.1.3",
|
|
24
21
|
"typescript": "^6.0.3",
|
|
25
22
|
"vitest": "^4.1.9",
|
|
26
23
|
"@vertesia/tsconfig": "0.1.0"
|
|
27
24
|
},
|
|
28
25
|
"dependencies": {
|
|
29
26
|
"ajv": "^8.20.0",
|
|
30
|
-
"@llumiverse/common": "1.
|
|
27
|
+
"@llumiverse/common": "1.5.0-dev"
|
|
31
28
|
},
|
|
32
29
|
"repository": {
|
|
33
30
|
"type": "git",
|
|
@@ -47,7 +44,7 @@
|
|
|
47
44
|
"test": "vitest run",
|
|
48
45
|
"typecheck:test": "tsc -p tsconfig.test.json --noEmit",
|
|
49
46
|
"clean:lib": "rimraf ./lib ./tsconfig.tsbuildinfo",
|
|
50
|
-
"build": "pnpm run clean:lib && tsc -p tsconfig.json && pnpm exec
|
|
47
|
+
"build": "pnpm run clean:lib && tsc -p tsconfig.json && pnpm exec rolldown -c rolldown.config.js",
|
|
51
48
|
"clean": "rimraf ./node_modules ./lib ./tsconfig.tsbuildinfo"
|
|
52
49
|
}
|
|
53
50
|
}
|
package/src/access-control.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Access control interfaces
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type {
|
|
7
|
+
import type { AbacScope } from './roles/types.js';
|
|
8
8
|
|
|
9
9
|
export enum Permission {
|
|
10
10
|
int_read = 'interaction:read',
|
|
@@ -67,8 +67,18 @@ export enum AccessControlResourceType {
|
|
|
67
67
|
account = 'account',
|
|
68
68
|
interaction = 'interaction',
|
|
69
69
|
app = 'application',
|
|
70
|
-
/**
|
|
71
|
-
|
|
70
|
+
/**
|
|
71
|
+
* Dynamic resource matching by property conditions at query time. The role
|
|
72
|
+
* partitions (content, future tasks/etc.) determine which kind of object
|
|
73
|
+
* the conditions match — selected via `AceConditions.scope`.
|
|
74
|
+
*
|
|
75
|
+
* NOTE: the string value remains `'content_set'` for backward compatibility
|
|
76
|
+
* with stored ACEs and JWTs. The wire/DB rename to `'resource_set'` is a
|
|
77
|
+
* separate concern (deferred). Until then, code reads
|
|
78
|
+
* `AccessControlResourceType.resource_set` but the value on the wire stays
|
|
79
|
+
* `'content_set'`.
|
|
80
|
+
*/
|
|
81
|
+
resource_set = 'content_set',
|
|
72
82
|
}
|
|
73
83
|
|
|
74
84
|
export enum AccessControlPrincipalType {
|
|
@@ -102,17 +112,32 @@ export type PropertyConditions = Record<string, PropertyConditionValue>;
|
|
|
102
112
|
/**
|
|
103
113
|
* Conditions attached to an ACE for dynamic matching.
|
|
104
114
|
* - `principal_props`: matched against user/group properties at token time (PrincipalSet).
|
|
105
|
-
* - `resource_props`: matched against
|
|
115
|
+
* - `resource_props`: matched against object properties at query time (ResourceSet).
|
|
106
116
|
*/
|
|
107
117
|
export interface AceConditions {
|
|
108
118
|
/** Property conditions matched against user/group properties at token time (PrincipalSet). */
|
|
109
119
|
principal_props?: PropertyConditions;
|
|
110
|
-
/** Property conditions matched against
|
|
120
|
+
/** Property conditions matched against object properties at query time (ResourceSet). */
|
|
111
121
|
resource_props?: PropertyConditions;
|
|
122
|
+
/**
|
|
123
|
+
* Kind of object the `resource_props` matches. Used to disambiguate which
|
|
124
|
+
* partition's roles apply (e.g. content roles vs task roles) and to form
|
|
125
|
+
* the JWT `content_security` key prefix (`{scope}:{verb}`). Absent →
|
|
126
|
+
* `'document'` (default; emits bare `read`/`write`/`delete` keys for
|
|
127
|
+
* backward compatibility).
|
|
128
|
+
*/
|
|
129
|
+
scope?: AbacScope;
|
|
112
130
|
}
|
|
113
131
|
|
|
114
132
|
export interface AccessControlEntry {
|
|
115
|
-
|
|
133
|
+
/**
|
|
134
|
+
* Role name. Typed as `string` because role names now span multiple
|
|
135
|
+
* partitions: `SystemRoles` enum values for system-domain roles, and bare
|
|
136
|
+
* strings for ABAC-domain roles (e.g. `'content:reader'`,
|
|
137
|
+
* `'content:writer'`, `'content:manager'`). Mongoose schema validates the
|
|
138
|
+
* value against the registered role catalog via `getAllRoleNames()`.
|
|
139
|
+
*/
|
|
140
|
+
role: string;
|
|
116
141
|
resource_type: AccessControlResourceType;
|
|
117
142
|
resource: string; //objectId
|
|
118
143
|
principal_type: AccessControlPrincipalType;
|
package/src/apikey.ts
CHANGED
|
@@ -4,14 +4,28 @@ import type { ProjectRef, SystemRoles } from './project.js';
|
|
|
4
4
|
import type { AccountRef } from './user.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* Presence of this object
|
|
7
|
+
* Per-scope, per-verb property-condition arrays that narrow content visibility
|
|
8
|
+
* at query time. Each value array uses $or semantics — any matching condition
|
|
9
|
+
* set grants access. Presence of this object switches content access from
|
|
10
|
+
* allow-all to restrict mode.
|
|
11
|
+
*
|
|
12
|
+
* The bare keys `read`/`write`/`delete` apply to the default `'document'`
|
|
13
|
+
* scope. They also receive entries emitted by system-role ABAC ACEs (which
|
|
14
|
+
* predate the scope concept).
|
|
15
|
+
*
|
|
16
|
+
* Non-default scopes appear as prefixed keys: `'collection:read'`,
|
|
17
|
+
* `'collection:write'`, `'task:read'`, etc. — the prefix is the
|
|
18
|
+
* `AceConditions.scope` value, the suffix is the verb derived from the
|
|
19
|
+
* ABAC role's permission set.
|
|
20
|
+
*
|
|
21
|
+
* Consumers that aren't scope-aware can keep reading only the bare keys.
|
|
10
22
|
*/
|
|
11
23
|
export interface ContentSecurity {
|
|
12
24
|
read?: PropertyConditions[];
|
|
13
25
|
write?: PropertyConditions[];
|
|
14
26
|
delete?: PropertyConditions[];
|
|
27
|
+
/** Scope-prefixed entries: `'collection:read'`, `'task:write'`, etc. */
|
|
28
|
+
[scopedKey: string]: PropertyConditions[] | undefined;
|
|
15
29
|
}
|
|
16
30
|
|
|
17
31
|
export enum ApiKeyTypes {
|
|
@@ -107,12 +121,22 @@ export interface AuthTokenPayload {
|
|
|
107
121
|
groups?: UserGroupRef[]; //group ids
|
|
108
122
|
|
|
109
123
|
/** Content security conditions keyed by permission (read/write/delete).
|
|
110
|
-
* Presence triggers restrict mode: project:* is dropped from security filters.
|
|
124
|
+
* Presence triggers restrict mode: project:* is dropped from security filters.
|
|
125
|
+
*
|
|
126
|
+
* Transitional: this field is being renamed to `abac` (see [[pending-migrations]]).
|
|
127
|
+
* Both fields are typed so consumers can dual-read during the transition.
|
|
128
|
+
* Only one will ever be populated in a given token. */
|
|
111
129
|
content_security?: ContentSecurity;
|
|
130
|
+
/**
|
|
131
|
+
* New name for `content_security`. Consumers should prefer this field and
|
|
132
|
+
* fall back to `content_security`. Sts will be flipped to emit this field
|
|
133
|
+
* once all consumers have shipped their dual-read.
|
|
134
|
+
*/
|
|
135
|
+
abac?: ContentSecurity;
|
|
112
136
|
|
|
113
137
|
/**
|
|
114
138
|
* API endpoints information to be used with this token.
|
|
115
|
-
* Either
|
|
139
|
+
* Either an API domain like 'api.vertesia.io' | 'api-preview.vertesia.io' | 'api.us1.vertesia.io' | 'local'
|
|
116
140
|
* or explicit studio, store, and token URLs.
|
|
117
141
|
*/
|
|
118
142
|
endpoints?:
|
package/src/apps.ts
CHANGED
|
@@ -40,11 +40,17 @@ export interface AppUIConfig {
|
|
|
40
40
|
*/
|
|
41
41
|
src: string;
|
|
42
42
|
/**
|
|
43
|
-
* The isolation strategy. If not specified it defaults to shadow
|
|
43
|
+
* The isolation strategy. If not specified it defaults to shadow.
|
|
44
44
|
* - shadow - use Shadow DOM to fully isolate the plugin from the host.
|
|
45
|
-
* - css -
|
|
45
|
+
* - css - inject the plugin's styles (minus the preflight) into the host document;
|
|
46
|
+
* lighter but styles may conflict with the host.
|
|
46
47
|
*/
|
|
47
48
|
isolation?: 'shadow' | 'css';
|
|
49
|
+
/**
|
|
50
|
+
* When true the host modifies the app's css at load time to attempt to fix broken
|
|
51
|
+
* or missing styles. Only takes effect in css isolation mode. Defaults to false.
|
|
52
|
+
*/
|
|
53
|
+
css_rebuild?: boolean;
|
|
48
54
|
/**
|
|
49
55
|
* Navigation items for the app's sidebar UI.
|
|
50
56
|
* Only applicable for apps with UI capability in shell contexts (ie. CompositeApp shell).
|
|
@@ -758,10 +764,21 @@ export interface AppManifest extends AppManifestData {
|
|
|
758
764
|
id: string;
|
|
759
765
|
/** The owning account. Undefined for apps imported from a master region. */
|
|
760
766
|
account?: string;
|
|
767
|
+
/** Source metadata for generated or synced app manifests. */
|
|
768
|
+
source?: AppManifestSource;
|
|
761
769
|
created_at: string;
|
|
762
770
|
updated_at: string;
|
|
763
771
|
}
|
|
764
772
|
|
|
773
|
+
export interface AppManifestSource {
|
|
774
|
+
kind: 'git';
|
|
775
|
+
git: {
|
|
776
|
+
url: string;
|
|
777
|
+
default_branch?: string;
|
|
778
|
+
development_branch?: string;
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
|
|
765
782
|
/**
|
|
766
783
|
* Binding between an MCP collection and an OAuth provider created at install time.
|
|
767
784
|
* Stored on AppInstallation so the runtime can look up the correct OAuth provider by ID,
|
|
@@ -1056,6 +1073,10 @@ export interface CompositeAppSwitchersOverrides {
|
|
|
1056
1073
|
|
|
1057
1074
|
/**
|
|
1058
1075
|
* Header button visibility overrides for the CompositeApp header.
|
|
1076
|
+
*
|
|
1077
|
+
* @deprecated Superseded by `CompositeAppConfig.headerMenu` (free-form header items).
|
|
1078
|
+
* Retained for backward compatibility and to seed the default header menu when no
|
|
1079
|
+
* `headerMenu` has been configured yet.
|
|
1059
1080
|
*/
|
|
1060
1081
|
export interface CompositeAppHeaderOverrides {
|
|
1061
1082
|
/** Whether to hide the App Portal button (defaults to false) */
|
|
@@ -1068,6 +1089,10 @@ export interface CompositeAppHeaderOverrides {
|
|
|
1068
1089
|
|
|
1069
1090
|
/**
|
|
1070
1091
|
* User menu overrides for the CompositeApp.
|
|
1092
|
+
*
|
|
1093
|
+
* @deprecated Superseded by the `user_menu` item in `CompositeAppConfig.headerMenu`.
|
|
1094
|
+
* Retained for backward compatibility and to seed the default header menu when no
|
|
1095
|
+
* `headerMenu` has been configured yet.
|
|
1071
1096
|
*/
|
|
1072
1097
|
export interface CompositeAppUserMenuOverrides {
|
|
1073
1098
|
/** Whether to hide the User Menu (defaults to false) */
|
|
@@ -1189,6 +1214,51 @@ export interface CompositeAppHomePlugin {
|
|
|
1189
1214
|
appRoute?: string;
|
|
1190
1215
|
}
|
|
1191
1216
|
|
|
1217
|
+
// ============================================================================
|
|
1218
|
+
// Header Menu Types
|
|
1219
|
+
// ============================================================================
|
|
1220
|
+
|
|
1221
|
+
/**
|
|
1222
|
+
* Discriminator for a header item.
|
|
1223
|
+
* The four built-ins (`app_portal`, `docs`, `help`, `user_menu`) seed the default
|
|
1224
|
+
* header and cannot be deleted (only hidden/customized); `custom` items are fully
|
|
1225
|
+
* user-defined buttons.
|
|
1226
|
+
*/
|
|
1227
|
+
export type CompositeAppHeaderItemKind = 'app_portal' | 'docs' | 'help' | 'user_menu' | 'custom';
|
|
1228
|
+
|
|
1229
|
+
/** Where a header link opens. */
|
|
1230
|
+
export type CompositeAppHeaderItemTarget = '_self' | '_blank';
|
|
1231
|
+
|
|
1232
|
+
/** Stable identifiers for the built-in header items. */
|
|
1233
|
+
export const COMPOSITE_APP_HEADER_BUILTIN_IDS = ['app_portal', 'docs', 'help', 'user_menu'] as const;
|
|
1234
|
+
|
|
1235
|
+
/**
|
|
1236
|
+
* A single button in the CompositeApp header bar.
|
|
1237
|
+
*
|
|
1238
|
+
* Unlike sidebar nav-items, header items are free-form and not tied to an installed
|
|
1239
|
+
* app: each is a labelled, icon-bearing button linking to a route or external URL.
|
|
1240
|
+
* The `user_menu` item is special — it renders the account dropdown, so its `icon`,
|
|
1241
|
+
* `href`, and `target` are ignored.
|
|
1242
|
+
*/
|
|
1243
|
+
export interface CompositeAppHeaderItem {
|
|
1244
|
+
/** Stable unique identifier. Built-ins use their kind as id (e.g. "app_portal"). */
|
|
1245
|
+
id: string;
|
|
1246
|
+
/** Item kind. `custom` for user-added buttons; otherwise one of the four built-ins. */
|
|
1247
|
+
kind: CompositeAppHeaderItemKind;
|
|
1248
|
+
/** Display label, used as the button tooltip / accessible name. */
|
|
1249
|
+
label: string;
|
|
1250
|
+
/** Lucide icon name or SVG content string. Ignored for `user_menu`. */
|
|
1251
|
+
icon?: string;
|
|
1252
|
+
/** Destination route ("/...") or external URL. Ignored for `user_menu`. */
|
|
1253
|
+
href?: string;
|
|
1254
|
+
/** Where to open the link (defaults to "_self"). Ignored for `user_menu`. */
|
|
1255
|
+
target?: CompositeAppHeaderItemTarget;
|
|
1256
|
+
/** When true, this item is hidden from the header. */
|
|
1257
|
+
hidden?: boolean;
|
|
1258
|
+
/** Optional access control settings for this header item. */
|
|
1259
|
+
permissions?: CompositeAppNavItemPermissions;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1192
1262
|
/**
|
|
1193
1263
|
* CompositeApp shell configuration.
|
|
1194
1264
|
* This is the main configuration interface for storing CompositeApp settings.
|
|
@@ -1212,10 +1282,23 @@ export interface CompositeAppConfig {
|
|
|
1212
1282
|
switchers?: CompositeAppSwitchersOverrides;
|
|
1213
1283
|
/** Optional sidebar display overrides */
|
|
1214
1284
|
sidebar?: CompositeAppSidebarOverrides;
|
|
1215
|
-
/**
|
|
1285
|
+
/**
|
|
1286
|
+
* @deprecated Use `headerMenu` instead. Optional header button visibility overrides.
|
|
1287
|
+
* Still read to seed `headerMenu` defaults for configs saved before the header menu existed.
|
|
1288
|
+
*/
|
|
1216
1289
|
header?: CompositeAppHeaderOverrides;
|
|
1217
|
-
/**
|
|
1290
|
+
/**
|
|
1291
|
+
* @deprecated Use the `user_menu` item in `headerMenu` instead. Optional user menu overrides.
|
|
1292
|
+
* Still read to seed `headerMenu` defaults for configs saved before the header menu existed.
|
|
1293
|
+
*/
|
|
1218
1294
|
userMenu?: CompositeAppUserMenuOverrides;
|
|
1295
|
+
/**
|
|
1296
|
+
* Optional free-form header menu. When present, the header renders from this ordered
|
|
1297
|
+
* list instead of the legacy `header`/`userMenu` flags. Built-in items (App Portal,
|
|
1298
|
+
* Docs, Help, User Menu) can be hidden/relabeled/re-icon'd/redirected; custom items
|
|
1299
|
+
* are arbitrary buttons.
|
|
1300
|
+
*/
|
|
1301
|
+
headerMenu?: CompositeAppHeaderItem[];
|
|
1219
1302
|
/** Optional theme overrides (e.g. disable dark mode) */
|
|
1220
1303
|
theme?: CompositeAppThemeOverrides;
|
|
1221
1304
|
/** Optional home page override. When set, redirects "/" to the specified app route instead of the dashboard. Send null to unset. */
|
package/src/audit-trail.ts
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
import type { EventCategory } from './platform-event.js';
|
|
2
|
+
|
|
3
|
+
export const AUDIT_ACTIONS = [
|
|
2
4
|
// CRUD operations
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
'create',
|
|
6
|
+
'update',
|
|
7
|
+
'delete',
|
|
8
|
+
'bulk_create',
|
|
9
|
+
'bulk_change_type',
|
|
10
|
+
'bulk_update',
|
|
11
|
+
'bulk_delete',
|
|
12
|
+
'attach',
|
|
13
|
+
'detach',
|
|
14
|
+
'credentials_fill',
|
|
15
|
+
'credentials_totp_generation',
|
|
16
|
+
'publish',
|
|
17
|
+
'unpublish',
|
|
16
18
|
// Billable operations
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
'inference',
|
|
20
|
+
'embedding',
|
|
21
|
+
'image_generation',
|
|
22
|
+
] as const;
|
|
23
|
+
|
|
24
|
+
export type KnownAuditAction = (typeof AUDIT_ACTIONS)[number];
|
|
25
|
+
export type AuditAction = KnownAuditAction | (string & {});
|
|
20
26
|
|
|
21
27
|
/** Billable audit actions for cost analytics queries */
|
|
22
|
-
export const BILLABLE_AUDIT_ACTIONS
|
|
28
|
+
export const BILLABLE_AUDIT_ACTIONS = ['inference', 'embedding', 'image_generation'] satisfies KnownAuditAction[];
|
|
23
29
|
|
|
24
30
|
/**
|
|
25
31
|
* Generic metering entry attached to audit events.
|
|
@@ -39,6 +45,16 @@ export interface AuditMeter {
|
|
|
39
45
|
|
|
40
46
|
export interface AuditTrailEvent {
|
|
41
47
|
event_type: 'audit';
|
|
48
|
+
event_id?: string;
|
|
49
|
+
event_category?: EventCategory;
|
|
50
|
+
source?: string | null;
|
|
51
|
+
root_event_id?: string;
|
|
52
|
+
caused_by_event_id?: string;
|
|
53
|
+
hop_count?: number;
|
|
54
|
+
audit_trail?: boolean;
|
|
55
|
+
replay_of?: string;
|
|
56
|
+
replay_root_event_id?: string;
|
|
57
|
+
replayed_by?: string;
|
|
42
58
|
action: AuditAction;
|
|
43
59
|
resource_type: string;
|
|
44
60
|
resource_id: string;
|
package/src/environment.ts
CHANGED
|
@@ -166,6 +166,13 @@ export interface ExecutionEnvironmentConfigUpdatePayload {
|
|
|
166
166
|
config?: MediatorEnvConfig | LoadBalancingEnvConfig;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
+
export interface EnableEnvironmentModelPayload {
|
|
170
|
+
/**
|
|
171
|
+
* Provider model ID to resolve from the environment's available model listing.
|
|
172
|
+
*/
|
|
173
|
+
model_id: string;
|
|
174
|
+
}
|
|
175
|
+
|
|
169
176
|
export interface MigrateInteractionsPayload {
|
|
170
177
|
/**
|
|
171
178
|
* The new environment ID to set in the Interactions
|
package/src/index.ts
CHANGED
|
@@ -27,6 +27,8 @@ export * from './oauth-server.js';
|
|
|
27
27
|
export * from './Progress.js';
|
|
28
28
|
export * from './payload.js';
|
|
29
29
|
export * from './pending-asks.js';
|
|
30
|
+
export * from './platform-event.js';
|
|
31
|
+
export * from './platform-event-validation.js';
|
|
30
32
|
export * from './principal-context.js';
|
|
31
33
|
export * from './project.js';
|
|
32
34
|
export * from './prompt.js';
|
|
@@ -38,6 +40,29 @@ export * from './runs.js';
|
|
|
38
40
|
export * from './secrets.js';
|
|
39
41
|
export * from './skill.js';
|
|
40
42
|
export * from './store/index.js';
|
|
43
|
+
export type {
|
|
44
|
+
ContentObjectExportArtifact,
|
|
45
|
+
ContentObjectExportArtifactFile,
|
|
46
|
+
ContentObjectExportProgress,
|
|
47
|
+
ContentObjectExportResult,
|
|
48
|
+
ContentObjectExportStatusResponse,
|
|
49
|
+
DeleteContentObjectExportResponse,
|
|
50
|
+
ExportContentObjectsFilter,
|
|
51
|
+
ExportContentObjectsIncludeOptions,
|
|
52
|
+
ExportedContentObjectRecord,
|
|
53
|
+
ListContentObjectExportsResponse,
|
|
54
|
+
StartContentObjectExportRequest,
|
|
55
|
+
StartContentObjectExportResponse,
|
|
56
|
+
ZenoBulkContentObjectExportComposeRequest,
|
|
57
|
+
ZenoBulkContentObjectExportPlanRequest,
|
|
58
|
+
ZenoBulkContentObjectExportPlanResponse,
|
|
59
|
+
ZenoBulkContentObjectExportRequest,
|
|
60
|
+
ZenoBulkContentObjectExportShardRange,
|
|
61
|
+
ZenoBulkContentObjectExportShardRequest,
|
|
62
|
+
ZenoBulkContentObjectExportShardResult,
|
|
63
|
+
ZenoBulkContentObjectExportSplitShardRequest,
|
|
64
|
+
ZenoBulkContentObjectExportSplitShardResponse,
|
|
65
|
+
} from './store/store.js';
|
|
41
66
|
export * from './sts-token-types.js';
|
|
42
67
|
export * from './tenant.js';
|
|
43
68
|
export * from './tool-execution.js';
|
package/src/integrations.ts
CHANGED
|
@@ -18,8 +18,21 @@ export interface GladiaConfigurationWithSecrets extends GladiaConfiguration {
|
|
|
18
18
|
api_key?: string;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
export interface GithubConfigurationInput extends IntegrationConfigurationBase<SupportedIntegrations.github> {
|
|
22
|
+
/** Numeric GitHub App id used to mint installation tokens (non-secret). */
|
|
23
|
+
github_app_id?: string;
|
|
24
|
+
/** Allow-list of `owner/name` repos the bot may mint installation tokens for (default-deny when empty). */
|
|
25
|
+
allowed_repositories?: string[];
|
|
26
|
+
/** GitHub App private key (PEM). Write-only; never returned. Empty string clears it. */
|
|
27
|
+
private_key?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
21
30
|
export interface GithubConfiguration extends IntegrationConfigurationBase<SupportedIntegrations.github> {
|
|
31
|
+
/** Numeric GitHub App id used to mint installation tokens (non-secret). */
|
|
32
|
+
github_app_id?: string;
|
|
22
33
|
allowed_repositories: string[];
|
|
34
|
+
/** True when a GitHub App private key is stored for the project (the key itself is never returned). */
|
|
35
|
+
has_github_app_private_key?: boolean;
|
|
23
36
|
}
|
|
24
37
|
|
|
25
38
|
export interface AwsConfiguration extends IntegrationConfigurationBase<SupportedIntegrations.aws> {
|
|
@@ -168,7 +181,7 @@ export enum SupportedIntegrations {
|
|
|
168
181
|
*/
|
|
169
182
|
export type ProjectIntegrationConfigRequest =
|
|
170
183
|
| GladiaConfigurationInput
|
|
171
|
-
|
|
|
184
|
+
| GithubConfigurationInput
|
|
172
185
|
| AwsConfiguration
|
|
173
186
|
| MagicPdfConfiguration
|
|
174
187
|
| SerperConfigurationInput
|