@inferencesh/sdk 0.6.48 → 0.6.49
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/dist/api/agents.d.ts +3 -0
- package/dist/api/artifacts.d.ts +72 -0
- package/dist/api/artifacts.js +116 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/types.d.ts +849 -359
- package/dist/types.js +145 -99
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export interface InternalToolsConfig {
|
|
|
9
9
|
skills?: boolean;
|
|
10
10
|
host_context?: boolean;
|
|
11
11
|
meta?: boolean;
|
|
12
|
+
artifact?: boolean;
|
|
13
|
+
spawn?: boolean;
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
14
16
|
* AgentTool represents a unified tool that can be used by an agent
|
|
@@ -490,6 +492,12 @@ export interface SecretCreateRequest {
|
|
|
490
492
|
value: string;
|
|
491
493
|
description?: string;
|
|
492
494
|
provider?: string;
|
|
495
|
+
/**
|
|
496
|
+
* ConnectionScope is who the credential this key activates belongs to —
|
|
497
|
+
* chosen once, here; scope is immutable after creation. Empty = the
|
|
498
|
+
* provider's default (team). Requires the matching admin role.
|
|
499
|
+
*/
|
|
500
|
+
connection_scope?: CredentialScope;
|
|
493
501
|
}
|
|
494
502
|
export interface SecretUpdateRequest {
|
|
495
503
|
value: string;
|
|
@@ -815,6 +823,22 @@ export declare const ScopeKnowledgeRead: Scope;
|
|
|
815
823
|
* Empty scopes = full access (for backwards compatibility with existing keys).
|
|
816
824
|
*/
|
|
817
825
|
export declare const ScopeKnowledgeWrite: Scope;
|
|
826
|
+
/**
|
|
827
|
+
* Action-level scopes for Artifacts (published HTML/Markdown pages)
|
|
828
|
+
*/
|
|
829
|
+
export declare const ScopeArtifacts: Scope;
|
|
830
|
+
/**
|
|
831
|
+
* API Key Scopes - hierarchical permission system.
|
|
832
|
+
* Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
|
|
833
|
+
* Empty scopes = full access (for backwards compatibility with existing keys).
|
|
834
|
+
*/
|
|
835
|
+
export declare const ScopeArtifactsRead: Scope;
|
|
836
|
+
/**
|
|
837
|
+
* API Key Scopes - hierarchical permission system.
|
|
838
|
+
* Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
|
|
839
|
+
* Empty scopes = full access (for backwards compatibility with existing keys).
|
|
840
|
+
*/
|
|
841
|
+
export declare const ScopeArtifactsWrite: Scope;
|
|
818
842
|
/**
|
|
819
843
|
* Action-level scopes for User profile
|
|
820
844
|
*/
|
|
@@ -853,6 +877,7 @@ export declare const ScopeGroupIntegrations: ScopeGroup;
|
|
|
853
877
|
export declare const ScopeGroupEngines: ScopeGroup;
|
|
854
878
|
export declare const ScopeGroupApiKeys: ScopeGroup;
|
|
855
879
|
export declare const ScopeGroupKnowledge: ScopeGroup;
|
|
880
|
+
export declare const ScopeGroupArtifacts: ScopeGroup;
|
|
856
881
|
export declare const ScopeGroupUser: ScopeGroup;
|
|
857
882
|
export declare const ScopeGroupSettings: ScopeGroup;
|
|
858
883
|
/**
|
|
@@ -940,6 +965,13 @@ export interface AppFunction {
|
|
|
940
965
|
description?: string;
|
|
941
966
|
input_schema: any;
|
|
942
967
|
output_schema: any;
|
|
968
|
+
/**
|
|
969
|
+
* Capabilities implied by the function's declared types, derived by
|
|
970
|
+
* engine discovery at deploy (e.g. "llm" when the function takes an
|
|
971
|
+
* LLMInput and returns an LLMOutput). Promoted onto the version's
|
|
972
|
+
* metadata by AppVersion.DeriveCapabilities.
|
|
973
|
+
*/
|
|
974
|
+
capabilities?: string[];
|
|
943
975
|
}
|
|
944
976
|
/**
|
|
945
977
|
* AppImages holds developer-provided images for the app.
|
|
@@ -1104,6 +1136,313 @@ export interface PublicAppStoreDTO {
|
|
|
1104
1136
|
page_id?: string;
|
|
1105
1137
|
pricing_description?: string;
|
|
1106
1138
|
}
|
|
1139
|
+
/**
|
|
1140
|
+
* ResourceImages is the display-image set every listable resource carries:
|
|
1141
|
+
* a card image for grids, a thumbnail for dense rows, a banner for headers.
|
|
1142
|
+
* AppImages and AgentImages predate this and hold the same three fields;
|
|
1143
|
+
* they should collapse onto this type, but aliasing them changes what
|
|
1144
|
+
* gotypegen emits for existing consumers, so that migration is separate.
|
|
1145
|
+
*/
|
|
1146
|
+
export interface ResourceImages {
|
|
1147
|
+
card: string;
|
|
1148
|
+
thumbnail: string;
|
|
1149
|
+
banner: string;
|
|
1150
|
+
}
|
|
1151
|
+
/**
|
|
1152
|
+
* ArtifactDTO is the API shape of an artifact entry.
|
|
1153
|
+
*/
|
|
1154
|
+
export interface ArtifactDTO extends BaseModelDTO, PermissionModelDTO {
|
|
1155
|
+
/**
|
|
1156
|
+
* Namespace is the owning team's username, copied at creation. Immutable.
|
|
1157
|
+
*/
|
|
1158
|
+
namespace: string;
|
|
1159
|
+
/**
|
|
1160
|
+
* Name is the slug within the namespace. Immutable.
|
|
1161
|
+
*/
|
|
1162
|
+
name: string;
|
|
1163
|
+
title: string;
|
|
1164
|
+
description?: string;
|
|
1165
|
+
favicon?: string;
|
|
1166
|
+
type: ArtifactType;
|
|
1167
|
+
/**
|
|
1168
|
+
* Images are the cover images shown in galleries and headers, same as
|
|
1169
|
+
* apps and agents. The favicon stays the rendered page's tab icon.
|
|
1170
|
+
*/
|
|
1171
|
+
images: ResourceImages;
|
|
1172
|
+
/**
|
|
1173
|
+
* VersionID points at the latest published version.
|
|
1174
|
+
*/
|
|
1175
|
+
version_id: string;
|
|
1176
|
+
version?: ArtifactVersionDTO;
|
|
1177
|
+
/**
|
|
1178
|
+
* SharedVersionID pins the version viewers see. Empty = always latest.
|
|
1179
|
+
*/
|
|
1180
|
+
shared_version_id?: string;
|
|
1181
|
+
/**
|
|
1182
|
+
* Capabilities declared by the latest version (runtime features the page
|
|
1183
|
+
* may use). Reserved for the artifact runtime; opaque to the API.
|
|
1184
|
+
*/
|
|
1185
|
+
capabilities?: {
|
|
1186
|
+
[key: string]: any;
|
|
1187
|
+
};
|
|
1188
|
+
views: number;
|
|
1189
|
+
/**
|
|
1190
|
+
* URL is the canonical viewer URL for this artifact.
|
|
1191
|
+
*/
|
|
1192
|
+
url?: string;
|
|
1193
|
+
}
|
|
1194
|
+
/**
|
|
1195
|
+
* ArtifactVersionDTO is one immutable publish of an artifact.
|
|
1196
|
+
*/
|
|
1197
|
+
export interface ArtifactVersionDTO extends BaseModelDTO {
|
|
1198
|
+
artifact_id: string;
|
|
1199
|
+
/**
|
|
1200
|
+
* Number is the 1-based publish sequence within the artifact.
|
|
1201
|
+
*/
|
|
1202
|
+
number: number;
|
|
1203
|
+
/**
|
|
1204
|
+
* Content is the stored source file (uri/hash/size). The inline `content`
|
|
1205
|
+
* field is only populated on write requests, never on reads — use the
|
|
1206
|
+
* /content endpoint to fetch the body.
|
|
1207
|
+
*/
|
|
1208
|
+
content: KnowledgeFile;
|
|
1209
|
+
content_hash: string;
|
|
1210
|
+
/**
|
|
1211
|
+
* MD5 is the lowercase hex MD5 of the UTF-8 source; SizeBytes its byte
|
|
1212
|
+
* length. Both let a DLP consumer dedupe without downloading.
|
|
1213
|
+
*/
|
|
1214
|
+
md5: string;
|
|
1215
|
+
size_bytes: number;
|
|
1216
|
+
label?: string;
|
|
1217
|
+
notes?: string;
|
|
1218
|
+
/**
|
|
1219
|
+
* Provenance — same conventions as knowledge versions.
|
|
1220
|
+
*/
|
|
1221
|
+
origin?: string;
|
|
1222
|
+
generated_by?: string;
|
|
1223
|
+
capabilities?: {
|
|
1224
|
+
[key: string]: any;
|
|
1225
|
+
};
|
|
1226
|
+
created_by_user_id?: string;
|
|
1227
|
+
}
|
|
1228
|
+
/**
|
|
1229
|
+
* ArtifactCreateRequest is the body for POST /artifacts. Creates the entry
|
|
1230
|
+
* and its first version. When an artifact with the same name already exists
|
|
1231
|
+
* in the caller's namespace a new version is published instead.
|
|
1232
|
+
*/
|
|
1233
|
+
export interface ArtifactCreateRequest {
|
|
1234
|
+
/**
|
|
1235
|
+
* Name is optional; derived from Title when empty.
|
|
1236
|
+
*/
|
|
1237
|
+
name?: string;
|
|
1238
|
+
title: string;
|
|
1239
|
+
description?: string;
|
|
1240
|
+
favicon?: string;
|
|
1241
|
+
type?: ArtifactType;
|
|
1242
|
+
images?: ResourceImages;
|
|
1243
|
+
/**
|
|
1244
|
+
* Content is the page source (HTML body/document or Markdown).
|
|
1245
|
+
*/
|
|
1246
|
+
content: string;
|
|
1247
|
+
/**
|
|
1248
|
+
* ContentEncoding is "base64" when Content is base64-encoded UTF-8. Use it
|
|
1249
|
+
* from browsers and CLIs: edge firewalls reject raw <script> in JSON bodies.
|
|
1250
|
+
*/
|
|
1251
|
+
content_encoding?: string;
|
|
1252
|
+
label?: string;
|
|
1253
|
+
notes?: string;
|
|
1254
|
+
origin?: string;
|
|
1255
|
+
generated_by?: string;
|
|
1256
|
+
capabilities?: {
|
|
1257
|
+
[key: string]: any;
|
|
1258
|
+
};
|
|
1259
|
+
/**
|
|
1260
|
+
* BaseVersionID is the version this content was built on. When the
|
|
1261
|
+
* artifact has moved past it, the publish is refused instead of
|
|
1262
|
+
* discarding whatever landed in between. Leave it empty to publish
|
|
1263
|
+
* unconditionally.
|
|
1264
|
+
*/
|
|
1265
|
+
base_version_id?: string;
|
|
1266
|
+
/**
|
|
1267
|
+
* Force publishes over a newer version anyway, discarding it. Only ever
|
|
1268
|
+
* set this because a person said to discard that specific version.
|
|
1269
|
+
*/
|
|
1270
|
+
force?: boolean;
|
|
1271
|
+
}
|
|
1272
|
+
/**
|
|
1273
|
+
* ArtifactUpdateRequest is the body for POST /artifacts/{id}. Metadata only;
|
|
1274
|
+
* content changes go through ArtifactPublishRequest.
|
|
1275
|
+
*/
|
|
1276
|
+
export interface ArtifactUpdateRequest {
|
|
1277
|
+
title?: string;
|
|
1278
|
+
description?: string;
|
|
1279
|
+
favicon?: string;
|
|
1280
|
+
/**
|
|
1281
|
+
* Images replaces the whole cover-image set when present.
|
|
1282
|
+
*/
|
|
1283
|
+
images?: ResourceImages;
|
|
1284
|
+
/**
|
|
1285
|
+
* SharedVersionID pins the version viewers see. Pass "" to share latest.
|
|
1286
|
+
*/
|
|
1287
|
+
shared_version_id?: string;
|
|
1288
|
+
}
|
|
1289
|
+
/**
|
|
1290
|
+
* ArtifactPublishRequest is the body for POST /artifacts/{id}/versions.
|
|
1291
|
+
*/
|
|
1292
|
+
export interface ArtifactPublishRequest {
|
|
1293
|
+
content: string;
|
|
1294
|
+
/**
|
|
1295
|
+
* ContentEncoding is "base64" when Content is base64-encoded UTF-8.
|
|
1296
|
+
*/
|
|
1297
|
+
content_encoding?: string;
|
|
1298
|
+
label?: string;
|
|
1299
|
+
notes?: string;
|
|
1300
|
+
origin?: string;
|
|
1301
|
+
generated_by?: string;
|
|
1302
|
+
capabilities?: {
|
|
1303
|
+
[key: string]: any;
|
|
1304
|
+
};
|
|
1305
|
+
/**
|
|
1306
|
+
* Title/Favicon/Description may be refreshed alongside a publish.
|
|
1307
|
+
*/
|
|
1308
|
+
title?: string;
|
|
1309
|
+
description?: string;
|
|
1310
|
+
favicon?: string;
|
|
1311
|
+
images?: ResourceImages;
|
|
1312
|
+
/**
|
|
1313
|
+
* BaseVersionID is the version this content was built on. When the
|
|
1314
|
+
* artifact has moved past it, the publish is refused instead of
|
|
1315
|
+
* discarding whatever landed in between. Leave it empty to publish
|
|
1316
|
+
* unconditionally.
|
|
1317
|
+
*/
|
|
1318
|
+
base_version_id?: string;
|
|
1319
|
+
/**
|
|
1320
|
+
* Force publishes over a newer version anyway, discarding it. Only ever
|
|
1321
|
+
* set this because a person said to discard that specific version.
|
|
1322
|
+
*/
|
|
1323
|
+
force?: boolean;
|
|
1324
|
+
}
|
|
1325
|
+
/**
|
|
1326
|
+
* ArtifactContentResponse is the JSON form of an artifact version body.
|
|
1327
|
+
*/
|
|
1328
|
+
export interface ArtifactContentResponse {
|
|
1329
|
+
artifact_id: string;
|
|
1330
|
+
version_id: string;
|
|
1331
|
+
number: number;
|
|
1332
|
+
type: ArtifactType;
|
|
1333
|
+
title: string;
|
|
1334
|
+
content: string;
|
|
1335
|
+
content_hash: string;
|
|
1336
|
+
md5: string;
|
|
1337
|
+
size_bytes: number;
|
|
1338
|
+
}
|
|
1339
|
+
/**
|
|
1340
|
+
* ArtifactDataDTO is one document in an artifact's store.
|
|
1341
|
+
*/
|
|
1342
|
+
export interface ArtifactDataDTO {
|
|
1343
|
+
collection: string;
|
|
1344
|
+
doc_id: string;
|
|
1345
|
+
data: {
|
|
1346
|
+
[key: string]: any;
|
|
1347
|
+
};
|
|
1348
|
+
updated_at: string;
|
|
1349
|
+
/**
|
|
1350
|
+
* OwnerUserID is set for documents private to one viewer.
|
|
1351
|
+
*/
|
|
1352
|
+
owner_user_id?: string;
|
|
1353
|
+
}
|
|
1354
|
+
/**
|
|
1355
|
+
* ArtifactDataRequest addresses one document, or a collection when DocID is
|
|
1356
|
+
* empty (list).
|
|
1357
|
+
*/
|
|
1358
|
+
export interface ArtifactDataRequest {
|
|
1359
|
+
collection: string;
|
|
1360
|
+
doc_id?: string;
|
|
1361
|
+
/**
|
|
1362
|
+
* Data is the document body for set and update.
|
|
1363
|
+
*/
|
|
1364
|
+
data?: {
|
|
1365
|
+
[key: string]: any;
|
|
1366
|
+
};
|
|
1367
|
+
/**
|
|
1368
|
+
* Limit caps a list; the server clamps it.
|
|
1369
|
+
*/
|
|
1370
|
+
limit?: number;
|
|
1371
|
+
}
|
|
1372
|
+
/**
|
|
1373
|
+
* ArtifactDataListResponse is a page of documents from one collection.
|
|
1374
|
+
*/
|
|
1375
|
+
export interface ArtifactDataListResponse {
|
|
1376
|
+
collection: string;
|
|
1377
|
+
documents: ArtifactDataDTO[];
|
|
1378
|
+
count: number;
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* ArtifactViewerDTO is what the user capability tells a page about whoever
|
|
1382
|
+
* has it open. It carries no credential and no email.
|
|
1383
|
+
*/
|
|
1384
|
+
export interface ArtifactViewerDTO {
|
|
1385
|
+
/**
|
|
1386
|
+
* SignedIn is false for someone opening a public link without an account.
|
|
1387
|
+
*/
|
|
1388
|
+
signed_in: boolean;
|
|
1389
|
+
user_id?: string;
|
|
1390
|
+
name?: string;
|
|
1391
|
+
avatar_url?: string;
|
|
1392
|
+
/**
|
|
1393
|
+
* CanEdit reports whether this viewer may publish new versions.
|
|
1394
|
+
*/
|
|
1395
|
+
can_edit: boolean;
|
|
1396
|
+
}
|
|
1397
|
+
/**
|
|
1398
|
+
* ArtifactAssetDTO describes one file stored beside an artifact. URL is
|
|
1399
|
+
* absolute and is the only way a page may reference the bytes: the page has
|
|
1400
|
+
* no network of its own, and the CSP names this origin only when the
|
|
1401
|
+
* artifact declared the assets capability.
|
|
1402
|
+
*/
|
|
1403
|
+
export interface ArtifactAssetDTO {
|
|
1404
|
+
asset_id: string;
|
|
1405
|
+
filename?: string;
|
|
1406
|
+
content_type?: string;
|
|
1407
|
+
size_bytes: number;
|
|
1408
|
+
url: string;
|
|
1409
|
+
created_at: string;
|
|
1410
|
+
uploaded_by_user_id?: string;
|
|
1411
|
+
}
|
|
1412
|
+
/**
|
|
1413
|
+
* ArtifactAssetListResponse is the body of the asset listing.
|
|
1414
|
+
*/
|
|
1415
|
+
export interface ArtifactAssetListResponse {
|
|
1416
|
+
assets: ArtifactAssetDTO[];
|
|
1417
|
+
count: number;
|
|
1418
|
+
/**
|
|
1419
|
+
* TotalBytes is what this artifact's assets occupy, against the budget
|
|
1420
|
+
* an upload is refused for exceeding.
|
|
1421
|
+
*/
|
|
1422
|
+
total_bytes: number;
|
|
1423
|
+
/**
|
|
1424
|
+
* BudgetBytes is the ceiling for one artifact.
|
|
1425
|
+
*/
|
|
1426
|
+
budget_bytes: number;
|
|
1427
|
+
}
|
|
1428
|
+
/**
|
|
1429
|
+
* ArtifactFrameDTO is what the viewer embeds. EmbedURL is for an iframe on
|
|
1430
|
+
* the app; TopURL is the same page opened directly. Both point at the
|
|
1431
|
+
* user-content domain, never the API.
|
|
1432
|
+
* When Exchange is true the URL carries a short-lived signed token that the
|
|
1433
|
+
* content origin swaps for a cookie scoped to that origin and then redirects
|
|
1434
|
+
* to the document, so the token leaves the address bar. When false the page
|
|
1435
|
+
* is public and no credential is needed.
|
|
1436
|
+
*/
|
|
1437
|
+
export interface ArtifactFrameDTO {
|
|
1438
|
+
artifact_id: string;
|
|
1439
|
+
version_id: string;
|
|
1440
|
+
version_short_id: string;
|
|
1441
|
+
embed_url: string;
|
|
1442
|
+
top_url: string;
|
|
1443
|
+
exchange: boolean;
|
|
1444
|
+
expires_at?: string;
|
|
1445
|
+
}
|
|
1107
1446
|
/**
|
|
1108
1447
|
* AuthSessionDTO is a safe representation of AuthSession for API responses.
|
|
1109
1448
|
*/
|
|
@@ -1187,6 +1526,12 @@ export interface BountyProgramDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
1187
1526
|
max_per_day: number;
|
|
1188
1527
|
proof_type: string;
|
|
1189
1528
|
proof_min_length: number;
|
|
1529
|
+
/**
|
|
1530
|
+
* RequiresPaymentMethod withholds the reward until the claimant's team has
|
|
1531
|
+
* a saved payment method. The claim itself is refused with 402
|
|
1532
|
+
* payment_method_required (survey answers are still recorded).
|
|
1533
|
+
*/
|
|
1534
|
+
requires_payment_method: boolean;
|
|
1190
1535
|
status: string;
|
|
1191
1536
|
notice_text: string;
|
|
1192
1537
|
notice_cooldown_hours: number;
|
|
@@ -1298,6 +1643,11 @@ export interface CursorListRequest {
|
|
|
1298
1643
|
fields: string[];
|
|
1299
1644
|
permissions: string[];
|
|
1300
1645
|
include_others: boolean;
|
|
1646
|
+
/**
|
|
1647
|
+
* IncludePrivate: an owner or admin of the selected team asks for every
|
|
1648
|
+
* row the team owns, private ones included. Audited; ignored for others.
|
|
1649
|
+
*/
|
|
1650
|
+
include_private?: boolean;
|
|
1301
1651
|
}
|
|
1302
1652
|
/**
|
|
1303
1653
|
* CursorListResponse represents a cursor-based paginated response
|
|
@@ -1448,7 +1798,10 @@ export interface WorkerRAM {
|
|
|
1448
1798
|
* EntitlementDTO for API responses
|
|
1449
1799
|
*/
|
|
1450
1800
|
export interface EntitlementDTO extends BaseModelDTO {
|
|
1801
|
+
scope: EntitlementScope;
|
|
1451
1802
|
team_id: string;
|
|
1803
|
+
org_id?: string;
|
|
1804
|
+
user_id?: string;
|
|
1452
1805
|
resource: EntitlementResource;
|
|
1453
1806
|
type: EntitlementType;
|
|
1454
1807
|
enabled: boolean;
|
|
@@ -2092,77 +2445,6 @@ export interface SkillStoreListingDTO {
|
|
|
2092
2445
|
uses: number;
|
|
2093
2446
|
tags?: string[];
|
|
2094
2447
|
}
|
|
2095
|
-
/**
|
|
2096
|
-
* LifecycleHookConfig registers a handler for an agent lifecycle event.
|
|
2097
|
-
* Stored on AgentVersion alongside Tools and Skills.
|
|
2098
|
-
*/
|
|
2099
|
-
export interface LifecycleHookConfig {
|
|
2100
|
-
event: HookEvent;
|
|
2101
|
-
type: HookHandlerType;
|
|
2102
|
-
handler?: string;
|
|
2103
|
-
async?: boolean;
|
|
2104
|
-
timeout?: number;
|
|
2105
|
-
/**
|
|
2106
|
-
* Gate-specific fields (type: "gate")
|
|
2107
|
-
*/
|
|
2108
|
-
default_resolution?: InterruptResolution;
|
|
2109
|
-
}
|
|
2110
|
-
/**
|
|
2111
|
-
* LifecycleHookPayload is sent to hook handlers on lifecycle events.
|
|
2112
|
-
*/
|
|
2113
|
-
export interface LifecycleHookPayload {
|
|
2114
|
-
event: HookEvent;
|
|
2115
|
-
timestamp: string;
|
|
2116
|
-
agent_id: string;
|
|
2117
|
-
chat_id: string;
|
|
2118
|
-
run_id?: string;
|
|
2119
|
-
turn_count: number;
|
|
2120
|
-
data?: any;
|
|
2121
|
-
}
|
|
2122
|
-
/**
|
|
2123
|
-
* LifecycleHookResponse is returned by hook handlers.
|
|
2124
|
-
* All fields are optional — an empty 200 response is equivalent to {decision: "allow"}.
|
|
2125
|
-
*/
|
|
2126
|
-
export interface LifecycleHookResponse {
|
|
2127
|
-
inject?: ContextInjection;
|
|
2128
|
-
decision?: HookDecision;
|
|
2129
|
-
reason?: string;
|
|
2130
|
-
override?: any;
|
|
2131
|
-
system?: string;
|
|
2132
|
-
}
|
|
2133
|
-
/**
|
|
2134
|
-
* ContextInjection adds ephemeral content to the agent's context window.
|
|
2135
|
-
* Injections are stored as ChatMessages and filtered at context-build time.
|
|
2136
|
-
*/
|
|
2137
|
-
export interface ContextInjection {
|
|
2138
|
-
content: string;
|
|
2139
|
-
role?: string;
|
|
2140
|
-
ttl_turns?: number;
|
|
2141
|
-
dedup_key?: string;
|
|
2142
|
-
}
|
|
2143
|
-
/**
|
|
2144
|
-
* ToolCallEventData is the typed payload for agent.tool_call events.
|
|
2145
|
-
*/
|
|
2146
|
-
export interface ToolCallEventData {
|
|
2147
|
-
tool: string;
|
|
2148
|
-
arguments?: {
|
|
2149
|
-
[key: string]: any;
|
|
2150
|
-
};
|
|
2151
|
-
}
|
|
2152
|
-
/**
|
|
2153
|
-
* ToolResultEventData is the typed payload for agent.tool_result events.
|
|
2154
|
-
*/
|
|
2155
|
-
export interface ToolResultEventData {
|
|
2156
|
-
tool: string;
|
|
2157
|
-
status: string;
|
|
2158
|
-
result?: string;
|
|
2159
|
-
}
|
|
2160
|
-
/**
|
|
2161
|
-
* ErrorEventData is the typed payload for agent.error events.
|
|
2162
|
-
*/
|
|
2163
|
-
export interface ErrorEventData {
|
|
2164
|
-
error: string;
|
|
2165
|
-
}
|
|
2166
2448
|
/**
|
|
2167
2449
|
* ElicitationCapability advertises which elicitation modes the client handles.
|
|
2168
2450
|
* An empty struct is equivalent to form-only for backward compatibility.
|
|
@@ -2329,9 +2611,9 @@ export type StringSlice = string[];
|
|
|
2329
2611
|
export interface MCPServerDTO {
|
|
2330
2612
|
id: string;
|
|
2331
2613
|
user_id: string;
|
|
2332
|
-
user
|
|
2614
|
+
user?: UserRelationDTO;
|
|
2333
2615
|
team_id: string;
|
|
2334
|
-
team
|
|
2616
|
+
team?: TeamRelationDTO;
|
|
2335
2617
|
org_id?: string;
|
|
2336
2618
|
visibility: Visibility;
|
|
2337
2619
|
slug: string;
|
|
@@ -2454,9 +2736,59 @@ export interface PageDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
2454
2736
|
publish_at?: string;
|
|
2455
2737
|
}
|
|
2456
2738
|
/**
|
|
2457
|
-
*
|
|
2739
|
+
* CommentDTO for API responses
|
|
2458
2740
|
*/
|
|
2459
|
-
export interface
|
|
2741
|
+
export interface CommentDTO extends BaseModelDTO, PermissionModelDTO {
|
|
2742
|
+
/**
|
|
2743
|
+
* ResourceType and ResourceID address what is commented on ("artifacts",
|
|
2744
|
+
* "pages"). PageID stays for the page comment API that predates them.
|
|
2745
|
+
*/
|
|
2746
|
+
resource_type: string;
|
|
2747
|
+
resource_id: string;
|
|
2748
|
+
page_id: string;
|
|
2749
|
+
content: string;
|
|
2750
|
+
parent_comment_id?: string;
|
|
2751
|
+
children: CommentDTO[];
|
|
2752
|
+
status: CommentStatus;
|
|
2753
|
+
resolved_at?: string;
|
|
2754
|
+
resolved_by_user_id?: string;
|
|
2755
|
+
/**
|
|
2756
|
+
* AgentActivated reports whether an agent may reply to or resolve this
|
|
2757
|
+
* thread. Reading is always allowed to anyone who can read the resource.
|
|
2758
|
+
*/
|
|
2759
|
+
agent_activated: boolean;
|
|
2760
|
+
agent_activated_by_user_id?: string;
|
|
2761
|
+
/**
|
|
2762
|
+
* AuthorAgentID attributes a reply written by an agent on a person's
|
|
2763
|
+
* behalf; clients render it as "agent, via <user>".
|
|
2764
|
+
*/
|
|
2765
|
+
author_agent_id?: string;
|
|
2766
|
+
}
|
|
2767
|
+
/**
|
|
2768
|
+
* ArtifactCommentCreateRequest posts a thread or a reply on an artifact.
|
|
2769
|
+
*/
|
|
2770
|
+
export interface ArtifactCommentCreateRequest {
|
|
2771
|
+
content: string;
|
|
2772
|
+
/**
|
|
2773
|
+
* ParentCommentID replies into an existing thread; omit to start one.
|
|
2774
|
+
*/
|
|
2775
|
+
parent_comment_id?: string;
|
|
2776
|
+
/**
|
|
2777
|
+
* SendToAgent activates the thread for agents in the same call, which is
|
|
2778
|
+
* what a "send to agent" affordance does.
|
|
2779
|
+
*/
|
|
2780
|
+
send_to_agent?: boolean;
|
|
2781
|
+
}
|
|
2782
|
+
/**
|
|
2783
|
+
* ArtifactCommentThreadDTO is one thread: its root plus replies in order.
|
|
2784
|
+
*/
|
|
2785
|
+
export interface ArtifactCommentThreadDTO extends CommentDTO {
|
|
2786
|
+
replies: CommentDTO[];
|
|
2787
|
+
}
|
|
2788
|
+
/**
|
|
2789
|
+
* MenuDTO for API responses
|
|
2790
|
+
*/
|
|
2791
|
+
export interface MenuDTO extends BaseModelDTO, PermissionModelDTO {
|
|
2460
2792
|
name: string;
|
|
2461
2793
|
slug: string;
|
|
2462
2794
|
description: string;
|
|
@@ -2811,6 +3143,37 @@ export interface SubscriptionDTO extends BaseModelDTO {
|
|
|
2811
3143
|
cancel_at_period_end: boolean;
|
|
2812
3144
|
credits_per_period: number;
|
|
2813
3145
|
}
|
|
3146
|
+
/**
|
|
3147
|
+
* SurveyResponseDTO is the API representation of a survey response.
|
|
3148
|
+
*/
|
|
3149
|
+
export interface SurveyResponseDTO extends BaseModelDTO, PermissionModelDTO {
|
|
3150
|
+
question_id: string;
|
|
3151
|
+
response: string;
|
|
3152
|
+
agent?: string;
|
|
3153
|
+
source?: string;
|
|
3154
|
+
context?: string;
|
|
3155
|
+
}
|
|
3156
|
+
/**
|
|
3157
|
+
* SubmitSurveyResponse is returned when submitting a survey answer.
|
|
3158
|
+
* GrantedAmount is the credit reward in microcents (0 if no reward was earned).
|
|
3159
|
+
* RewardBlockedReason is set when the answer was recorded but the reward was
|
|
3160
|
+
* withheld by policy (see RewardBlockedPaymentMethodRequired).
|
|
3161
|
+
*/
|
|
3162
|
+
export interface SubmitSurveyResponse {
|
|
3163
|
+
response: SurveyResponseDTO;
|
|
3164
|
+
granted_amount?: number;
|
|
3165
|
+
reward_blocked_reason?: string;
|
|
3166
|
+
}
|
|
3167
|
+
/**
|
|
3168
|
+
* SubmitSurveyRequest is used to submit a single survey answer.
|
|
3169
|
+
*/
|
|
3170
|
+
export interface SubmitSurveyRequest {
|
|
3171
|
+
question_id: string;
|
|
3172
|
+
response: string;
|
|
3173
|
+
agent?: string;
|
|
3174
|
+
source?: string;
|
|
3175
|
+
context?: string;
|
|
3176
|
+
}
|
|
2814
3177
|
/**
|
|
2815
3178
|
* Hardware/System related types
|
|
2816
3179
|
*/
|
|
@@ -3169,6 +3532,11 @@ export interface UsageEventDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
3169
3532
|
export interface UserDTO extends BaseModelDTO {
|
|
3170
3533
|
default_team_id: string;
|
|
3171
3534
|
role: Role;
|
|
3535
|
+
/**
|
|
3536
|
+
* ManagedByOrgID: set for enterprise-managed accounts (no personal team,
|
|
3537
|
+
* cannot create teams/orgs).
|
|
3538
|
+
*/
|
|
3539
|
+
managed_by_org_id?: string;
|
|
3172
3540
|
email: string;
|
|
3173
3541
|
name: string;
|
|
3174
3542
|
full_name: string;
|
|
@@ -3230,6 +3598,11 @@ export declare const A2UIBadge: A2UIComponentType;
|
|
|
3230
3598
|
export declare const A2UISpacer: A2UIComponentType;
|
|
3231
3599
|
export declare const A2UIChart: A2UIComponentType;
|
|
3232
3600
|
export declare const A2UIForm: A2UIComponentType;
|
|
3601
|
+
/**
|
|
3602
|
+
* Artifact embeds a published artifact (sandboxed page) with a link to
|
|
3603
|
+
* the viewer. Rendered from the artifact's /render endpoint.
|
|
3604
|
+
*/
|
|
3605
|
+
export declare const A2UIArtifact: A2UIComponentType;
|
|
3233
3606
|
/**
|
|
3234
3607
|
* A2UIComponent is the universal component representation.
|
|
3235
3608
|
* Children are string IDs (flat adjacency list), not nested objects.
|
|
@@ -3248,17 +3621,17 @@ export interface A2UIComponent {
|
|
|
3248
3621
|
/**
|
|
3249
3622
|
* Text
|
|
3250
3623
|
*/
|
|
3251
|
-
text?:
|
|
3624
|
+
text?: A2UIBound;
|
|
3252
3625
|
variant?: string;
|
|
3253
3626
|
/**
|
|
3254
3627
|
* Image
|
|
3255
3628
|
*/
|
|
3256
|
-
url?:
|
|
3629
|
+
url?: A2UIBound;
|
|
3257
3630
|
fit?: string;
|
|
3258
3631
|
/**
|
|
3259
3632
|
* Icon
|
|
3260
3633
|
*/
|
|
3261
|
-
name?:
|
|
3634
|
+
name?: A2UIBound;
|
|
3262
3635
|
/**
|
|
3263
3636
|
* Divider
|
|
3264
3637
|
*/
|
|
@@ -3273,7 +3646,7 @@ export interface A2UIComponent {
|
|
|
3273
3646
|
* TextField
|
|
3274
3647
|
*/
|
|
3275
3648
|
label?: string;
|
|
3276
|
-
value?:
|
|
3649
|
+
value?: A2UIBound;
|
|
3277
3650
|
textFieldType?: string;
|
|
3278
3651
|
validationRegexp?: string;
|
|
3279
3652
|
placeholder?: string;
|
|
@@ -3292,7 +3665,7 @@ export interface A2UIComponent {
|
|
|
3292
3665
|
* ChoicePicker
|
|
3293
3666
|
*/
|
|
3294
3667
|
options?: A2UIChoiceOption[];
|
|
3295
|
-
selections?:
|
|
3668
|
+
selections?: A2UIBound;
|
|
3296
3669
|
maxAllowedSelections?: number;
|
|
3297
3670
|
/**
|
|
3298
3671
|
* Modal
|
|
@@ -3332,7 +3705,16 @@ export interface A2UIComponent {
|
|
|
3332
3705
|
* Extension: Form
|
|
3333
3706
|
*/
|
|
3334
3707
|
onSubmitAction?: A2UIAction;
|
|
3708
|
+
/**
|
|
3709
|
+
* Extension: Artifact
|
|
3710
|
+
*/
|
|
3711
|
+
artifactId?: string;
|
|
3712
|
+
artifactVersionId?: string;
|
|
3713
|
+
artifactTitle?: string;
|
|
3714
|
+
artifactUrl?: string;
|
|
3715
|
+
artifactFavicon?: string;
|
|
3335
3716
|
}
|
|
3717
|
+
export type A2UIBound = string | number | boolean | A2UIBoundValue;
|
|
3336
3718
|
/**
|
|
3337
3719
|
* A2UIBoundValue is either a literal or a data model path reference.
|
|
3338
3720
|
*/
|
|
@@ -3365,164 +3747,6 @@ export interface A2UISurface {
|
|
|
3365
3747
|
components: A2UIComponent[];
|
|
3366
3748
|
dataModel?: any;
|
|
3367
3749
|
}
|
|
3368
|
-
/**
|
|
3369
|
-
* AgentEventType identifies what happened in an agent run.
|
|
3370
|
-
* These are the backbone protocol events — every consumer (A2A, SDK, frontend)
|
|
3371
|
-
* projects from this set.
|
|
3372
|
-
*/
|
|
3373
|
-
export type AgentEventType = string;
|
|
3374
|
-
/**
|
|
3375
|
-
* Run lifecycle
|
|
3376
|
-
*/
|
|
3377
|
-
export declare const AgentEventRunStarted: AgentEventType;
|
|
3378
|
-
export declare const AgentEventRunStateChanged: AgentEventType;
|
|
3379
|
-
/**
|
|
3380
|
-
* Turn lifecycle
|
|
3381
|
-
*/
|
|
3382
|
-
export declare const AgentEventTurnStarted: AgentEventType;
|
|
3383
|
-
export declare const AgentEventTurnCompleted: AgentEventType;
|
|
3384
|
-
/**
|
|
3385
|
-
* Content streaming — structural wrapper; high-frequency token deltas
|
|
3386
|
-
* still flow via the existing DeltaEvent channel for efficiency.
|
|
3387
|
-
*/
|
|
3388
|
-
export declare const AgentEventContentDelta: AgentEventType;
|
|
3389
|
-
/**
|
|
3390
|
-
* Tool lifecycle
|
|
3391
|
-
*/
|
|
3392
|
-
export declare const AgentEventToolStarted: AgentEventType;
|
|
3393
|
-
export declare const AgentEventToolCompleted: AgentEventType;
|
|
3394
|
-
/**
|
|
3395
|
-
* Approval flow
|
|
3396
|
-
*/
|
|
3397
|
-
export declare const AgentEventApprovalRequired: AgentEventType;
|
|
3398
|
-
export declare const AgentEventApprovalResolved: AgentEventType;
|
|
3399
|
-
/**
|
|
3400
|
-
* Hook lifecycle
|
|
3401
|
-
*/
|
|
3402
|
-
export declare const AgentEventHookExecuted: AgentEventType;
|
|
3403
|
-
/**
|
|
3404
|
-
* Usage
|
|
3405
|
-
*/
|
|
3406
|
-
export declare const AgentEventUsageUpdated: AgentEventType;
|
|
3407
|
-
/**
|
|
3408
|
-
* Context management
|
|
3409
|
-
*/
|
|
3410
|
-
export declare const AgentEventContextCompacted: AgentEventType;
|
|
3411
|
-
/**
|
|
3412
|
-
* Errors
|
|
3413
|
-
*/
|
|
3414
|
-
export declare const AgentEventError: AgentEventType;
|
|
3415
|
-
/**
|
|
3416
|
-
* AgentEvent is the backbone protocol event for agent runs.
|
|
3417
|
-
* Published to "runs:<runID>" and "chats:<chatID>" keys on the event bus.
|
|
3418
|
-
*/
|
|
3419
|
-
export interface AgentEvent {
|
|
3420
|
-
id: string;
|
|
3421
|
-
type: AgentEventType;
|
|
3422
|
-
run_id: string;
|
|
3423
|
-
chat_id: string;
|
|
3424
|
-
agent_id?: string;
|
|
3425
|
-
timestamp: string;
|
|
3426
|
-
payload?: any;
|
|
3427
|
-
}
|
|
3428
|
-
export interface RunStartedPayload {
|
|
3429
|
-
agent_id: string;
|
|
3430
|
-
agent_version_id?: string;
|
|
3431
|
-
user_message_id?: string;
|
|
3432
|
-
}
|
|
3433
|
-
export interface RunStateChangedPayload {
|
|
3434
|
-
from_state: AgentRunState;
|
|
3435
|
-
to_state: AgentRunState;
|
|
3436
|
-
error?: string;
|
|
3437
|
-
}
|
|
3438
|
-
export interface TurnStartedPayload {
|
|
3439
|
-
turn_index: number;
|
|
3440
|
-
model?: string;
|
|
3441
|
-
}
|
|
3442
|
-
export interface TurnCompletedPayload {
|
|
3443
|
-
turn_index: number;
|
|
3444
|
-
tool_count: number;
|
|
3445
|
-
has_output: boolean;
|
|
3446
|
-
stop_reason?: string;
|
|
3447
|
-
}
|
|
3448
|
-
export interface ContentDeltaPayload {
|
|
3449
|
-
kind: ContentDeltaKind;
|
|
3450
|
-
delta: string;
|
|
3451
|
-
}
|
|
3452
|
-
export type ContentDeltaKind = string;
|
|
3453
|
-
export declare const ContentDeltaText: ContentDeltaKind;
|
|
3454
|
-
export declare const ContentDeltaReasoning: ContentDeltaKind;
|
|
3455
|
-
export interface ToolStartedPayload {
|
|
3456
|
-
tool_invocation_id: string;
|
|
3457
|
-
tool_name: string;
|
|
3458
|
-
tool_type?: ToolType;
|
|
3459
|
-
display_name?: string;
|
|
3460
|
-
arguments?: StringEncodedMap;
|
|
3461
|
-
}
|
|
3462
|
-
export interface ToolCompletedPayload {
|
|
3463
|
-
tool_invocation_id: string;
|
|
3464
|
-
tool_name: string;
|
|
3465
|
-
status: ToolInvocationStatus;
|
|
3466
|
-
result?: string;
|
|
3467
|
-
duration_ms?: number;
|
|
3468
|
-
}
|
|
3469
|
-
export interface ApprovalRequiredPayload {
|
|
3470
|
-
tool_invocation_id: string;
|
|
3471
|
-
tool_name: string;
|
|
3472
|
-
arguments?: StringEncodedMap;
|
|
3473
|
-
reason: InterruptReason;
|
|
3474
|
-
}
|
|
3475
|
-
export interface ApprovalResolvedPayload {
|
|
3476
|
-
tool_invocation_id: string;
|
|
3477
|
-
tool_name: string;
|
|
3478
|
-
decision: string;
|
|
3479
|
-
reason?: string;
|
|
3480
|
-
}
|
|
3481
|
-
export interface HookExecutedPayload {
|
|
3482
|
-
hook_event: HookEvent;
|
|
3483
|
-
decision: HookDecision;
|
|
3484
|
-
reason?: string;
|
|
3485
|
-
duration_ms?: number;
|
|
3486
|
-
}
|
|
3487
|
-
export interface UsageUpdatedPayload {
|
|
3488
|
-
prompt_tokens: number;
|
|
3489
|
-
completion_tokens: number;
|
|
3490
|
-
total_tokens: number;
|
|
3491
|
-
reasoning_tokens?: number;
|
|
3492
|
-
cost_usd?: number;
|
|
3493
|
-
}
|
|
3494
|
-
export interface ContextCompactedPayload {
|
|
3495
|
-
before_tokens: number;
|
|
3496
|
-
after_tokens: number;
|
|
3497
|
-
}
|
|
3498
|
-
export interface ErrorPayload {
|
|
3499
|
-
message: string;
|
|
3500
|
-
code?: string;
|
|
3501
|
-
}
|
|
3502
|
-
/**
|
|
3503
|
-
* AgentRunState tracks the lifecycle of an agent run (one user→agent turn).
|
|
3504
|
-
* Maps to A2A TaskState and AG-UI Run outcome for protocol compliance.
|
|
3505
|
-
*/
|
|
3506
|
-
export type AgentRunState = string;
|
|
3507
|
-
export declare const AgentRunStateSubmitted: AgentRunState;
|
|
3508
|
-
export declare const AgentRunStateWorking: AgentRunState;
|
|
3509
|
-
export declare const AgentRunStateInputRequired: AgentRunState;
|
|
3510
|
-
export declare const AgentRunStateAuthRequired: AgentRunState;
|
|
3511
|
-
export declare const AgentRunStateCompleted: AgentRunState;
|
|
3512
|
-
export declare const AgentRunStateFailed: AgentRunState;
|
|
3513
|
-
export declare const AgentRunStateCanceled: AgentRunState;
|
|
3514
|
-
export declare const AgentRunStateRejected: AgentRunState;
|
|
3515
|
-
/**
|
|
3516
|
-
* InterruptReason describes why an agent run is in an interrupted state.
|
|
3517
|
-
* Aligns with AG-UI interrupt outcome reasons.
|
|
3518
|
-
*/
|
|
3519
|
-
export type InterruptReason = string;
|
|
3520
|
-
export declare const InterruptReasonToolApproval: InterruptReason;
|
|
3521
|
-
export declare const InterruptReasonClientTool: InterruptReason;
|
|
3522
|
-
export declare const InterruptReasonWidget: InterruptReason;
|
|
3523
|
-
export declare const InterruptReasonAuth: InterruptReason;
|
|
3524
|
-
export declare const InterruptReasonConfirmation: InterruptReason;
|
|
3525
|
-
export declare const InterruptReasonHookGate: InterruptReason;
|
|
3526
3750
|
export type AppCategory = string;
|
|
3527
3751
|
export declare const AppCategoryImage: AppCategory;
|
|
3528
3752
|
export declare const AppCategoryVideo: AppCategory;
|
|
@@ -3563,6 +3787,13 @@ export declare const VisibilityUnlisted: Visibility;
|
|
|
3563
3787
|
export type Permission = string;
|
|
3564
3788
|
export declare const PermRead: Permission;
|
|
3565
3789
|
export declare const PermWrite: Permission;
|
|
3790
|
+
/**
|
|
3791
|
+
* PermUse is execute intent: run an app, load a skill/knowledge into an
|
|
3792
|
+
* agent context, invoke an MCP tool. Distinct from read — a public
|
|
3793
|
+
* resource is readable by everyone, but whether this caller may USE it is
|
|
3794
|
+
* governed by their team/org usage policy (reach, INF-808).
|
|
3795
|
+
*/
|
|
3796
|
+
export declare const PermUse: Permission;
|
|
3566
3797
|
export type SubscriptionStatus = string;
|
|
3567
3798
|
export declare const SubscriptionStatusTrialing: SubscriptionStatus;
|
|
3568
3799
|
export declare const SubscriptionStatusActive: SubscriptionStatus;
|
|
@@ -3584,6 +3815,16 @@ export declare const EntitlementSourceAddon: EntitlementSource;
|
|
|
3584
3815
|
export type EntitlementType = string;
|
|
3585
3816
|
export declare const EntitlementTypeBoolean: EntitlementType;
|
|
3586
3817
|
export declare const EntitlementTypeLimit: EntitlementType;
|
|
3818
|
+
/**
|
|
3819
|
+
* EntitlementScope is who an entitlement row applies to (INF-799). The scope's
|
|
3820
|
+
* owner columns (team_id / org_id / user_id) identify the owner, mirroring the
|
|
3821
|
+
* ownership pattern used across the codebase; resolution matches all scopes
|
|
3822
|
+
* visible from an AuthContext in one query and mergeEntitlements arbitrates.
|
|
3823
|
+
*/
|
|
3824
|
+
export type EntitlementScope = string;
|
|
3825
|
+
export declare const EntitlementScopeOrg: EntitlementScope;
|
|
3826
|
+
export declare const EntitlementScopeTeam: EntitlementScope;
|
|
3827
|
+
export declare const EntitlementScopeMember: EntitlementScope;
|
|
3587
3828
|
export type EnforcementMode = string;
|
|
3588
3829
|
export declare const EnforcementBlock: EnforcementMode;
|
|
3589
3830
|
export declare const EnforcementWarn: EnforcementMode;
|
|
@@ -3664,9 +3905,6 @@ export interface IntegrationContext {
|
|
|
3664
3905
|
integration_type?: IntegrationType;
|
|
3665
3906
|
integration_metadata?: any;
|
|
3666
3907
|
}
|
|
3667
|
-
export type StringEncodedMap = {
|
|
3668
|
-
[key: string]: any;
|
|
3669
|
-
};
|
|
3670
3908
|
/**
|
|
3671
3909
|
* EngineStatus represents the status of an engine.
|
|
3672
3910
|
*/
|
|
@@ -3829,90 +4067,31 @@ export declare const GraphEdgeTypeSupersedes: GraphEdgeType;
|
|
|
3829
4067
|
export declare const GraphEdgeTypeInput: GraphEdgeType;
|
|
3830
4068
|
export declare const GraphEdgeTypeOutput: GraphEdgeType;
|
|
3831
4069
|
/**
|
|
3832
|
-
*
|
|
4070
|
+
* MergeStrategy defines how a delta field should be merged by consumers.
|
|
3833
4071
|
*/
|
|
3834
|
-
export type
|
|
3835
|
-
export declare const
|
|
3836
|
-
export declare const
|
|
3837
|
-
export declare const
|
|
3838
|
-
export declare const
|
|
4072
|
+
export type MergeStrategy = string;
|
|
4073
|
+
export declare const MergeStrategyConcat: MergeStrategy;
|
|
4074
|
+
export declare const MergeStrategyReplace: MergeStrategy;
|
|
4075
|
+
export declare const MergeStrategyIndexed: MergeStrategy;
|
|
4076
|
+
export declare const MergeStrategyNested: MergeStrategy;
|
|
3839
4077
|
/**
|
|
3840
|
-
*
|
|
4078
|
+
* StreamDelta is the marker base for all streaming delta types.
|
|
4079
|
+
* Types embedding StreamDelta are routed through the delta channel.
|
|
3841
4080
|
*/
|
|
3842
|
-
export
|
|
3843
|
-
|
|
3844
|
-
export declare const InterruptResolutionDeny: InterruptResolution;
|
|
4081
|
+
export interface StreamDelta {
|
|
4082
|
+
}
|
|
3845
4083
|
/**
|
|
3846
|
-
*
|
|
4084
|
+
* LLMOutput is the output envelope from an LLM provider task.
|
|
4085
|
+
* This is the contract between chat apps (sdk-py) and the agent runtime (go/api).
|
|
3847
4086
|
*/
|
|
3848
|
-
export
|
|
3849
|
-
|
|
3850
|
-
|
|
4087
|
+
export interface LLMOutput {
|
|
4088
|
+
response: string;
|
|
4089
|
+
reasoning?: string;
|
|
4090
|
+
tool_calls?: ToolCall[];
|
|
4091
|
+
usage?: LLMUsage;
|
|
4092
|
+
}
|
|
3851
4093
|
/**
|
|
3852
|
-
*
|
|
3853
|
-
* Events fire at well-defined points in the turn cycle, giving external
|
|
3854
|
-
* handlers the ability to observe, inject context, or halt execution.
|
|
3855
|
-
*/
|
|
3856
|
-
export type HookEvent = string;
|
|
3857
|
-
export declare const HookEventAgentStart: HookEvent;
|
|
3858
|
-
export declare const HookEventTurnStart: HookEvent;
|
|
3859
|
-
export declare const HookEventToolCall: HookEvent;
|
|
3860
|
-
export declare const HookEventToolResult: HookEvent;
|
|
3861
|
-
export declare const HookEventTurnComplete: HookEvent;
|
|
3862
|
-
export declare const HookEventAgentError: HookEvent;
|
|
3863
|
-
export declare const HookEventAgentComplete: HookEvent;
|
|
3864
|
-
export declare const HookEventAgentIdle: HookEvent;
|
|
3865
|
-
export declare const HookEventPreCompact: HookEvent;
|
|
3866
|
-
export declare const HookEventPostCompact: HookEvent;
|
|
3867
|
-
/**
|
|
3868
|
-
* HookEventDefinition describes a lifecycle hook event and its capabilities.
|
|
3869
|
-
*/
|
|
3870
|
-
export interface HookEventDefinition {
|
|
3871
|
-
event: HookEvent;
|
|
3872
|
-
description: string;
|
|
3873
|
-
can_gate: boolean;
|
|
3874
|
-
}
|
|
3875
|
-
/**
|
|
3876
|
-
* HookDecision is the handler's verdict on whether execution should continue.
|
|
3877
|
-
*/
|
|
3878
|
-
export type HookDecision = string;
|
|
3879
|
-
export declare const HookDecisionAllow: HookDecision;
|
|
3880
|
-
export declare const HookDecisionDeny: HookDecision;
|
|
3881
|
-
export declare const HookDecisionStop: HookDecision;
|
|
3882
|
-
export declare const HookDecisionSuspend: HookDecision;
|
|
3883
|
-
/**
|
|
3884
|
-
* HookHandlerType distinguishes how a lifecycle hook is executed.
|
|
3885
|
-
*/
|
|
3886
|
-
export type HookHandlerType = string;
|
|
3887
|
-
export declare const HookHandlerWebhook: HookHandlerType;
|
|
3888
|
-
export declare const HookHandlerTask: HookHandlerType;
|
|
3889
|
-
export declare const HookHandlerGate: HookHandlerType;
|
|
3890
|
-
/**
|
|
3891
|
-
* MergeStrategy defines how a delta field should be merged by consumers.
|
|
3892
|
-
*/
|
|
3893
|
-
export type MergeStrategy = string;
|
|
3894
|
-
export declare const MergeStrategyConcat: MergeStrategy;
|
|
3895
|
-
export declare const MergeStrategyReplace: MergeStrategy;
|
|
3896
|
-
export declare const MergeStrategyIndexed: MergeStrategy;
|
|
3897
|
-
export declare const MergeStrategyNested: MergeStrategy;
|
|
3898
|
-
/**
|
|
3899
|
-
* StreamDelta is the marker base for all streaming delta types.
|
|
3900
|
-
* Types embedding StreamDelta are routed through the delta channel.
|
|
3901
|
-
*/
|
|
3902
|
-
export interface StreamDelta {
|
|
3903
|
-
}
|
|
3904
|
-
/**
|
|
3905
|
-
* LLMOutput is the output envelope from an LLM provider task.
|
|
3906
|
-
* This is the contract between chat apps (sdk-py) and the agent runtime (go/api).
|
|
3907
|
-
*/
|
|
3908
|
-
export interface LLMOutput {
|
|
3909
|
-
response: string;
|
|
3910
|
-
reasoning?: string;
|
|
3911
|
-
tool_calls?: ToolCall[];
|
|
3912
|
-
usage?: LLMUsage;
|
|
3913
|
-
}
|
|
3914
|
-
/**
|
|
3915
|
-
* LLMDelta is a streaming delta for LLMOutput.
|
|
4094
|
+
* LLMDelta is a streaming delta for LLMOutput.
|
|
3916
4095
|
*/
|
|
3917
4096
|
export interface LLMDelta extends StreamDelta {
|
|
3918
4097
|
response: string;
|
|
@@ -4020,14 +4199,15 @@ export interface ResponseFormat {
|
|
|
4020
4199
|
}
|
|
4021
4200
|
/**
|
|
4022
4201
|
* LLMSettings is everything that configures a generation independent of the
|
|
4023
|
-
* conversation:
|
|
4202
|
+
* conversation: context, sampling, system prompt, tools and output
|
|
4024
4203
|
* constraints. Embedded (tstype extends) by BaseLLMInput — an agent's stored
|
|
4025
4204
|
* configuration — and LLMInput — a single call — so a field added here
|
|
4026
4205
|
* reaches both, and the call is built from the configuration by one
|
|
4027
4206
|
* assignment.
|
|
4207
|
+
* Which model runs is not a setting: the app is the model. An app that
|
|
4208
|
+
* fronts several models (a router) declares its own `model` input.
|
|
4028
4209
|
*/
|
|
4029
4210
|
export interface LLMSettings {
|
|
4030
|
-
model?: string;
|
|
4031
4211
|
context_size: number;
|
|
4032
4212
|
temperature?: number;
|
|
4033
4213
|
top_p?: number;
|
|
@@ -4103,29 +4283,11 @@ export declare const PageTypeDoc: PageType;
|
|
|
4103
4283
|
export declare const PageTypeBlog: PageType;
|
|
4104
4284
|
export declare const PageTypePage: PageType;
|
|
4105
4285
|
export declare const PageTypeAnnouncement: PageType;
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
export
|
|
4110
|
-
export declare const
|
|
4111
|
-
export declare const ToolInvocationStatusInProgress: ToolInvocationStatus;
|
|
4112
|
-
export declare const ToolInvocationStatusAwaitingInput: ToolInvocationStatus;
|
|
4113
|
-
export declare const ToolInvocationStatusAwaitingApproval: ToolInvocationStatus;
|
|
4114
|
-
export declare const ToolInvocationStatusCompleted: ToolInvocationStatus;
|
|
4115
|
-
export declare const ToolInvocationStatusFailed: ToolInvocationStatus;
|
|
4116
|
-
export declare const ToolInvocationStatusCancelled: ToolInvocationStatus;
|
|
4117
|
-
/**
|
|
4118
|
-
* ToolType represents the type of tool (used in both AgentTool definition and ToolInvocation)
|
|
4119
|
-
*/
|
|
4120
|
-
export type ToolType = string;
|
|
4121
|
-
export declare const ToolTypeApp: ToolType;
|
|
4122
|
-
export declare const ToolTypeAgent: ToolType;
|
|
4123
|
-
export declare const ToolTypeHook: ToolType;
|
|
4124
|
-
export declare const ToolTypeHTTP: ToolType;
|
|
4125
|
-
export declare const ToolTypeCall: ToolType;
|
|
4126
|
-
export declare const ToolTypeMCP: ToolType;
|
|
4127
|
-
export declare const ToolTypeClient: ToolType;
|
|
4128
|
-
export declare const ToolTypeInternal: ToolType;
|
|
4286
|
+
export type CommentStatus = number;
|
|
4287
|
+
export declare const CommentStatusUnknown: CommentStatus;
|
|
4288
|
+
export declare const CommentStatusDraft: CommentStatus;
|
|
4289
|
+
export declare const CommentStatusPublished: CommentStatus;
|
|
4290
|
+
export declare const CommentStatusArchived: CommentStatus;
|
|
4129
4291
|
export type InstanceCloudProvider = string;
|
|
4130
4292
|
export declare const CloudAWS: InstanceCloudProvider;
|
|
4131
4293
|
export declare const CloudAmaya: InstanceCloudProvider;
|
|
@@ -4236,6 +4398,12 @@ export declare const KnowledgeLifecyclePermanent: KnowledgeLifecycle;
|
|
|
4236
4398
|
export declare const KnowledgeLifecycleDecay: KnowledgeLifecycle;
|
|
4237
4399
|
export declare const KnowledgeLifecycleDraft: KnowledgeLifecycle;
|
|
4238
4400
|
export declare const KnowledgeLifecycleDeprecated: KnowledgeLifecycle;
|
|
4401
|
+
/**
|
|
4402
|
+
* ArtifactType is the source format of an artifact page.
|
|
4403
|
+
*/
|
|
4404
|
+
export type ArtifactType = string;
|
|
4405
|
+
export declare const ArtifactTypeHTML: ArtifactType;
|
|
4406
|
+
export declare const ArtifactTypeMarkdown: ArtifactType;
|
|
4239
4407
|
export type FilterOperator = string;
|
|
4240
4408
|
export declare const OpEqual: FilterOperator;
|
|
4241
4409
|
export declare const OpNotEqual: FilterOperator;
|
|
@@ -4512,6 +4680,14 @@ export type TeamType = string;
|
|
|
4512
4680
|
export declare const TeamTypePersonal: TeamType;
|
|
4513
4681
|
export declare const TeamTypeTeam: TeamType;
|
|
4514
4682
|
export declare const TeamTypeSystem: TeamType;
|
|
4683
|
+
/**
|
|
4684
|
+
* TeamTypeOrg is an organization's own workspace. Its id is the org's
|
|
4685
|
+
* id, its org_id points at itself, its members are the org's admins, and
|
|
4686
|
+
* it owns what the org owns: the payer row, billing settings, org-scope
|
|
4687
|
+
* credentials. Minted by org creation only; never archived while member
|
|
4688
|
+
* teams exist.
|
|
4689
|
+
*/
|
|
4690
|
+
export declare const TeamTypeOrg: TeamType;
|
|
4515
4691
|
export type TeamStatus = string;
|
|
4516
4692
|
export declare const TeamStatusActive: TeamStatus;
|
|
4517
4693
|
export declare const TeamStatusSuspended: TeamStatus;
|
|
@@ -4520,6 +4696,335 @@ export type TeamRole = string;
|
|
|
4520
4696
|
export declare const TeamRoleOwner: TeamRole;
|
|
4521
4697
|
export declare const TeamRoleAdmin: TeamRole;
|
|
4522
4698
|
export declare const TeamRoleMember: TeamRole;
|
|
4699
|
+
export type Role = string;
|
|
4700
|
+
export declare const RoleGuest: Role;
|
|
4701
|
+
export declare const RoleUser: Role;
|
|
4702
|
+
export declare const RoleAdmin: Role;
|
|
4703
|
+
export declare const RoleSystem: Role;
|
|
4704
|
+
/**
|
|
4705
|
+
* UtilityConfig defines a flow utility node — gate, selector, merge, or custom CEL.
|
|
4706
|
+
*/
|
|
4707
|
+
export interface UtilityConfig {
|
|
4708
|
+
preset: string;
|
|
4709
|
+
expression?: string;
|
|
4710
|
+
gate?: GateCondition;
|
|
4711
|
+
selector?: SelectorConfig;
|
|
4712
|
+
constant?: any;
|
|
4713
|
+
}
|
|
4714
|
+
/**
|
|
4715
|
+
* AgentEventType identifies what happened in an agent run.
|
|
4716
|
+
* These are the backbone protocol events — every consumer (A2A, SDK, frontend)
|
|
4717
|
+
* projects from this set.
|
|
4718
|
+
*/
|
|
4719
|
+
export type AgentEventType = string;
|
|
4720
|
+
/**
|
|
4721
|
+
* Run lifecycle
|
|
4722
|
+
*/
|
|
4723
|
+
export declare const AgentEventRunStarted: AgentEventType;
|
|
4724
|
+
export declare const AgentEventRunStateChanged: AgentEventType;
|
|
4725
|
+
/**
|
|
4726
|
+
* Turn lifecycle
|
|
4727
|
+
*/
|
|
4728
|
+
export declare const AgentEventTurnStarted: AgentEventType;
|
|
4729
|
+
export declare const AgentEventTurnCompleted: AgentEventType;
|
|
4730
|
+
/**
|
|
4731
|
+
* Content streaming — structural wrapper; high-frequency token deltas
|
|
4732
|
+
* still flow via the existing DeltaEvent channel for efficiency.
|
|
4733
|
+
*/
|
|
4734
|
+
export declare const AgentEventContentDelta: AgentEventType;
|
|
4735
|
+
/**
|
|
4736
|
+
* Tool lifecycle
|
|
4737
|
+
*/
|
|
4738
|
+
export declare const AgentEventToolStarted: AgentEventType;
|
|
4739
|
+
export declare const AgentEventToolCompleted: AgentEventType;
|
|
4740
|
+
/**
|
|
4741
|
+
* Approval flow
|
|
4742
|
+
*/
|
|
4743
|
+
export declare const AgentEventApprovalRequired: AgentEventType;
|
|
4744
|
+
export declare const AgentEventApprovalResolved: AgentEventType;
|
|
4745
|
+
/**
|
|
4746
|
+
* Hook lifecycle
|
|
4747
|
+
*/
|
|
4748
|
+
export declare const AgentEventHookExecuted: AgentEventType;
|
|
4749
|
+
/**
|
|
4750
|
+
* Usage
|
|
4751
|
+
*/
|
|
4752
|
+
export declare const AgentEventUsageUpdated: AgentEventType;
|
|
4753
|
+
/**
|
|
4754
|
+
* Context management
|
|
4755
|
+
*/
|
|
4756
|
+
export declare const AgentEventContextCompacted: AgentEventType;
|
|
4757
|
+
/**
|
|
4758
|
+
* Errors
|
|
4759
|
+
*/
|
|
4760
|
+
export declare const AgentEventError: AgentEventType;
|
|
4761
|
+
/**
|
|
4762
|
+
* AgentEvent is the backbone protocol event for agent runs.
|
|
4763
|
+
* Published to "runs:<runID>" and "chats:<chatID>" keys on the event bus.
|
|
4764
|
+
*/
|
|
4765
|
+
export interface AgentEvent {
|
|
4766
|
+
id: string;
|
|
4767
|
+
type: AgentEventType;
|
|
4768
|
+
run_id: string;
|
|
4769
|
+
chat_id: string;
|
|
4770
|
+
agent_id?: string;
|
|
4771
|
+
timestamp: string;
|
|
4772
|
+
payload?: any;
|
|
4773
|
+
}
|
|
4774
|
+
export interface RunStartedPayload {
|
|
4775
|
+
agent_id: string;
|
|
4776
|
+
agent_version_id?: string;
|
|
4777
|
+
user_message_id?: string;
|
|
4778
|
+
}
|
|
4779
|
+
export interface RunStateChangedPayload {
|
|
4780
|
+
from_state: AgentRunState;
|
|
4781
|
+
to_state: AgentRunState;
|
|
4782
|
+
error?: string;
|
|
4783
|
+
}
|
|
4784
|
+
export interface TurnStartedPayload {
|
|
4785
|
+
turn_index: number;
|
|
4786
|
+
model?: string;
|
|
4787
|
+
}
|
|
4788
|
+
export interface TurnCompletedPayload {
|
|
4789
|
+
turn_index: number;
|
|
4790
|
+
tool_count: number;
|
|
4791
|
+
has_output: boolean;
|
|
4792
|
+
stop_reason?: string;
|
|
4793
|
+
}
|
|
4794
|
+
export interface ContentDeltaPayload {
|
|
4795
|
+
kind: ContentDeltaKind;
|
|
4796
|
+
delta: string;
|
|
4797
|
+
}
|
|
4798
|
+
export type ContentDeltaKind = string;
|
|
4799
|
+
export declare const ContentDeltaText: ContentDeltaKind;
|
|
4800
|
+
export declare const ContentDeltaReasoning: ContentDeltaKind;
|
|
4801
|
+
export interface ToolStartedPayload {
|
|
4802
|
+
tool_invocation_id: string;
|
|
4803
|
+
tool_name: string;
|
|
4804
|
+
tool_type?: ToolType;
|
|
4805
|
+
display_name?: string;
|
|
4806
|
+
arguments?: StringEncodedMap;
|
|
4807
|
+
}
|
|
4808
|
+
export interface ToolCompletedPayload {
|
|
4809
|
+
tool_invocation_id: string;
|
|
4810
|
+
tool_name: string;
|
|
4811
|
+
status: ToolInvocationStatus;
|
|
4812
|
+
result?: string;
|
|
4813
|
+
duration_ms?: number;
|
|
4814
|
+
}
|
|
4815
|
+
export interface ApprovalRequiredPayload {
|
|
4816
|
+
tool_invocation_id: string;
|
|
4817
|
+
tool_name: string;
|
|
4818
|
+
arguments?: StringEncodedMap;
|
|
4819
|
+
reason: InterruptReason;
|
|
4820
|
+
}
|
|
4821
|
+
export interface ApprovalResolvedPayload {
|
|
4822
|
+
tool_invocation_id: string;
|
|
4823
|
+
tool_name: string;
|
|
4824
|
+
decision: string;
|
|
4825
|
+
reason?: string;
|
|
4826
|
+
}
|
|
4827
|
+
export interface HookExecutedPayload {
|
|
4828
|
+
hook_event: HookEvent;
|
|
4829
|
+
decision: HookDecision;
|
|
4830
|
+
reason?: string;
|
|
4831
|
+
duration_ms?: number;
|
|
4832
|
+
}
|
|
4833
|
+
export interface UsageUpdatedPayload {
|
|
4834
|
+
prompt_tokens: number;
|
|
4835
|
+
completion_tokens: number;
|
|
4836
|
+
total_tokens: number;
|
|
4837
|
+
reasoning_tokens?: number;
|
|
4838
|
+
cost_usd?: number;
|
|
4839
|
+
}
|
|
4840
|
+
export interface ContextCompactedPayload {
|
|
4841
|
+
before_tokens: number;
|
|
4842
|
+
after_tokens: number;
|
|
4843
|
+
}
|
|
4844
|
+
export interface ErrorPayload {
|
|
4845
|
+
message: string;
|
|
4846
|
+
code?: string;
|
|
4847
|
+
}
|
|
4848
|
+
/**
|
|
4849
|
+
* AgentRunState tracks the lifecycle of an agent run (one user→agent turn).
|
|
4850
|
+
* Maps to A2A TaskState and AG-UI Run outcome for protocol compliance.
|
|
4851
|
+
*/
|
|
4852
|
+
export type AgentRunState = string;
|
|
4853
|
+
export declare const AgentRunStateSubmitted: AgentRunState;
|
|
4854
|
+
export declare const AgentRunStateWorking: AgentRunState;
|
|
4855
|
+
export declare const AgentRunStateInputRequired: AgentRunState;
|
|
4856
|
+
export declare const AgentRunStateAuthRequired: AgentRunState;
|
|
4857
|
+
export declare const AgentRunStateCompleted: AgentRunState;
|
|
4858
|
+
export declare const AgentRunStateFailed: AgentRunState;
|
|
4859
|
+
export declare const AgentRunStateCanceled: AgentRunState;
|
|
4860
|
+
export declare const AgentRunStateRejected: AgentRunState;
|
|
4861
|
+
/**
|
|
4862
|
+
* InterruptReason describes why an agent run is in an interrupted state.
|
|
4863
|
+
* Aligns with AG-UI interrupt outcome reasons.
|
|
4864
|
+
*/
|
|
4865
|
+
export type InterruptReason = string;
|
|
4866
|
+
export declare const InterruptReasonToolApproval: InterruptReason;
|
|
4867
|
+
export declare const InterruptReasonClientTool: InterruptReason;
|
|
4868
|
+
export declare const InterruptReasonWidget: InterruptReason;
|
|
4869
|
+
export declare const InterruptReasonAuth: InterruptReason;
|
|
4870
|
+
export declare const InterruptReasonConfirmation: InterruptReason;
|
|
4871
|
+
export declare const InterruptReasonHookGate: InterruptReason;
|
|
4872
|
+
export type StringEncodedMap = {
|
|
4873
|
+
[key: string]: any;
|
|
4874
|
+
};
|
|
4875
|
+
/**
|
|
4876
|
+
* InterruptStatus tracks the lifecycle of an interrupt gate.
|
|
4877
|
+
*/
|
|
4878
|
+
export type InterruptStatus = string;
|
|
4879
|
+
export declare const InterruptStatusPending: InterruptStatus;
|
|
4880
|
+
export declare const InterruptStatusResolved: InterruptStatus;
|
|
4881
|
+
export declare const InterruptStatusExpired: InterruptStatus;
|
|
4882
|
+
export declare const InterruptStatusCancelled: InterruptStatus;
|
|
4883
|
+
/**
|
|
4884
|
+
* InterruptResolution records how a pending interrupt was resolved.
|
|
4885
|
+
*/
|
|
4886
|
+
export type InterruptResolution = string;
|
|
4887
|
+
export declare const InterruptResolutionAllow: InterruptResolution;
|
|
4888
|
+
export declare const InterruptResolutionDeny: InterruptResolution;
|
|
4889
|
+
/**
|
|
4890
|
+
* InterruptResourceType identifies the kind of resource an interrupt gates.
|
|
4891
|
+
*/
|
|
4892
|
+
export type InterruptResourceType = string;
|
|
4893
|
+
export declare const InterruptResourceToolInvocation: InterruptResourceType;
|
|
4894
|
+
export declare const InterruptResourceHookEvent: InterruptResourceType;
|
|
4895
|
+
/**
|
|
4896
|
+
* HookEvent is a lifecycle event in the agent conversation loop.
|
|
4897
|
+
* Events fire at well-defined points in the turn cycle, giving external
|
|
4898
|
+
* handlers the ability to observe, inject context, or halt execution.
|
|
4899
|
+
*/
|
|
4900
|
+
export type HookEvent = string;
|
|
4901
|
+
export declare const HookEventAgentStart: HookEvent;
|
|
4902
|
+
export declare const HookEventTurnStart: HookEvent;
|
|
4903
|
+
export declare const HookEventToolCall: HookEvent;
|
|
4904
|
+
export declare const HookEventToolResult: HookEvent;
|
|
4905
|
+
export declare const HookEventTurnComplete: HookEvent;
|
|
4906
|
+
export declare const HookEventAgentError: HookEvent;
|
|
4907
|
+
export declare const HookEventAgentComplete: HookEvent;
|
|
4908
|
+
export declare const HookEventAgentIdle: HookEvent;
|
|
4909
|
+
export declare const HookEventPreCompact: HookEvent;
|
|
4910
|
+
export declare const HookEventPostCompact: HookEvent;
|
|
4911
|
+
/**
|
|
4912
|
+
* HookEventDefinition describes a lifecycle hook event and its capabilities.
|
|
4913
|
+
*/
|
|
4914
|
+
export interface HookEventDefinition {
|
|
4915
|
+
event: HookEvent;
|
|
4916
|
+
description: string;
|
|
4917
|
+
can_gate: boolean;
|
|
4918
|
+
}
|
|
4919
|
+
/**
|
|
4920
|
+
* HookDecision is the handler's verdict on whether execution should continue.
|
|
4921
|
+
*/
|
|
4922
|
+
export type HookDecision = string;
|
|
4923
|
+
export declare const HookDecisionAllow: HookDecision;
|
|
4924
|
+
export declare const HookDecisionDeny: HookDecision;
|
|
4925
|
+
export declare const HookDecisionStop: HookDecision;
|
|
4926
|
+
export declare const HookDecisionSuspend: HookDecision;
|
|
4927
|
+
/**
|
|
4928
|
+
* HookHandlerType distinguishes how a lifecycle hook is executed.
|
|
4929
|
+
*/
|
|
4930
|
+
export type HookHandlerType = string;
|
|
4931
|
+
export declare const HookHandlerWebhook: HookHandlerType;
|
|
4932
|
+
export declare const HookHandlerTask: HookHandlerType;
|
|
4933
|
+
export declare const HookHandlerGate: HookHandlerType;
|
|
4934
|
+
/**
|
|
4935
|
+
* LifecycleHookConfig registers a handler for an agent lifecycle event.
|
|
4936
|
+
* Stored on AgentVersion alongside Tools and Skills.
|
|
4937
|
+
*/
|
|
4938
|
+
export interface LifecycleHookConfig {
|
|
4939
|
+
event: HookEvent;
|
|
4940
|
+
type: HookHandlerType;
|
|
4941
|
+
handler?: string;
|
|
4942
|
+
async?: boolean;
|
|
4943
|
+
timeout?: number;
|
|
4944
|
+
/**
|
|
4945
|
+
* Gate-specific fields (type: "gate")
|
|
4946
|
+
*/
|
|
4947
|
+
default_resolution?: InterruptResolution;
|
|
4948
|
+
}
|
|
4949
|
+
/**
|
|
4950
|
+
* LifecycleHookPayload is sent to hook handlers on lifecycle events.
|
|
4951
|
+
*/
|
|
4952
|
+
export interface LifecycleHookPayload {
|
|
4953
|
+
event: HookEvent;
|
|
4954
|
+
timestamp: string;
|
|
4955
|
+
agent_id: string;
|
|
4956
|
+
chat_id: string;
|
|
4957
|
+
run_id?: string;
|
|
4958
|
+
turn_count: number;
|
|
4959
|
+
data?: any;
|
|
4960
|
+
}
|
|
4961
|
+
/**
|
|
4962
|
+
* LifecycleHookResponse is returned by hook handlers.
|
|
4963
|
+
* All fields are optional — an empty 200 response is equivalent to {decision: "allow"}.
|
|
4964
|
+
*/
|
|
4965
|
+
export interface LifecycleHookResponse {
|
|
4966
|
+
inject?: ContextInjection;
|
|
4967
|
+
decision?: HookDecision;
|
|
4968
|
+
reason?: string;
|
|
4969
|
+
override?: any;
|
|
4970
|
+
system?: string;
|
|
4971
|
+
}
|
|
4972
|
+
/**
|
|
4973
|
+
* ContextInjection adds ephemeral content to the agent's context window.
|
|
4974
|
+
* Injections are stored as ChatMessages and filtered at context-build time.
|
|
4975
|
+
*/
|
|
4976
|
+
export interface ContextInjection {
|
|
4977
|
+
content: string;
|
|
4978
|
+
role?: string;
|
|
4979
|
+
ttl_turns?: number;
|
|
4980
|
+
dedup_key?: string;
|
|
4981
|
+
}
|
|
4982
|
+
/**
|
|
4983
|
+
* ToolCallEventData is the typed payload for agent.tool_call events.
|
|
4984
|
+
*/
|
|
4985
|
+
export interface ToolCallEventData {
|
|
4986
|
+
tool: string;
|
|
4987
|
+
arguments?: {
|
|
4988
|
+
[key: string]: any;
|
|
4989
|
+
};
|
|
4990
|
+
}
|
|
4991
|
+
/**
|
|
4992
|
+
* ToolResultEventData is the typed payload for agent.tool_result events.
|
|
4993
|
+
*/
|
|
4994
|
+
export interface ToolResultEventData {
|
|
4995
|
+
tool: string;
|
|
4996
|
+
status: string;
|
|
4997
|
+
result?: string;
|
|
4998
|
+
}
|
|
4999
|
+
/**
|
|
5000
|
+
* ErrorEventData is the typed payload for agent.error events.
|
|
5001
|
+
*/
|
|
5002
|
+
export interface ErrorEventData {
|
|
5003
|
+
error: string;
|
|
5004
|
+
}
|
|
5005
|
+
/**
|
|
5006
|
+
* ToolInvocationStatus represents the execution status of a tool invocation
|
|
5007
|
+
*/
|
|
5008
|
+
export type ToolInvocationStatus = string;
|
|
5009
|
+
export declare const ToolInvocationStatusPending: ToolInvocationStatus;
|
|
5010
|
+
export declare const ToolInvocationStatusInProgress: ToolInvocationStatus;
|
|
5011
|
+
export declare const ToolInvocationStatusAwaitingInput: ToolInvocationStatus;
|
|
5012
|
+
export declare const ToolInvocationStatusAwaitingApproval: ToolInvocationStatus;
|
|
5013
|
+
export declare const ToolInvocationStatusCompleted: ToolInvocationStatus;
|
|
5014
|
+
export declare const ToolInvocationStatusFailed: ToolInvocationStatus;
|
|
5015
|
+
export declare const ToolInvocationStatusCancelled: ToolInvocationStatus;
|
|
5016
|
+
/**
|
|
5017
|
+
* ToolType represents the type of tool (used in both AgentTool definition and ToolInvocation)
|
|
5018
|
+
*/
|
|
5019
|
+
export type ToolType = string;
|
|
5020
|
+
export declare const ToolTypeApp: ToolType;
|
|
5021
|
+
export declare const ToolTypeAgent: ToolType;
|
|
5022
|
+
export declare const ToolTypeHook: ToolType;
|
|
5023
|
+
export declare const ToolTypeHTTP: ToolType;
|
|
5024
|
+
export declare const ToolTypeCall: ToolType;
|
|
5025
|
+
export declare const ToolTypeMCP: ToolType;
|
|
5026
|
+
export declare const ToolTypeClient: ToolType;
|
|
5027
|
+
export declare const ToolTypeInternal: ToolType;
|
|
4523
5028
|
/**
|
|
4524
5029
|
* ToolCallType represents the type field on a tool call (wire format).
|
|
4525
5030
|
*/
|
|
@@ -4630,18 +5135,3 @@ export interface ToolParameterProperty {
|
|
|
4630
5135
|
items?: ToolParameterProperty;
|
|
4631
5136
|
required?: string[];
|
|
4632
5137
|
}
|
|
4633
|
-
export type Role = string;
|
|
4634
|
-
export declare const RoleGuest: Role;
|
|
4635
|
-
export declare const RoleUser: Role;
|
|
4636
|
-
export declare const RoleAdmin: Role;
|
|
4637
|
-
export declare const RoleSystem: Role;
|
|
4638
|
-
/**
|
|
4639
|
-
* UtilityConfig defines a flow utility node — gate, selector, merge, or custom CEL.
|
|
4640
|
-
*/
|
|
4641
|
-
export interface UtilityConfig {
|
|
4642
|
-
preset: string;
|
|
4643
|
-
expression?: string;
|
|
4644
|
-
gate?: GateCondition;
|
|
4645
|
-
selector?: SelectorConfig;
|
|
4646
|
-
constant?: any;
|
|
4647
|
-
}
|