@vm0/cli 9.82.2 → 9.83.1
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/{chunk-2RXB3R33.js → chunk-5BLBSO2W.js} +520 -115
- package/chunk-5BLBSO2W.js.map +1 -0
- package/index.js +15 -103
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/zero.js +77 -63
- package/zero.js.map +1 -1
- package/chunk-2RXB3R33.js.map +0 -1
|
@@ -47,7 +47,7 @@ if (DSN) {
|
|
|
47
47
|
Sentry.init({
|
|
48
48
|
dsn: DSN,
|
|
49
49
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
50
|
-
release: "9.
|
|
50
|
+
release: "9.83.1",
|
|
51
51
|
sendDefaultPii: false,
|
|
52
52
|
tracesSampleRate: 0,
|
|
53
53
|
shutdownTimeout: 500,
|
|
@@ -66,7 +66,7 @@ if (DSN) {
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
Sentry.setContext("cli", {
|
|
69
|
-
version: "9.
|
|
69
|
+
version: "9.83.1",
|
|
70
70
|
command: process.argv.slice(2).join(" ")
|
|
71
71
|
});
|
|
72
72
|
Sentry.setContext("runtime", {
|
|
@@ -541,7 +541,7 @@ var apifyFirewall = {
|
|
|
541
541
|
},
|
|
542
542
|
apis: [
|
|
543
543
|
{
|
|
544
|
-
base: "https://api.apify.com
|
|
544
|
+
base: "https://api.apify.com",
|
|
545
545
|
auth: {
|
|
546
546
|
headers: {
|
|
547
547
|
Authorization: "Bearer ${{ secrets.APIFY_TOKEN }}"
|
|
@@ -645,7 +645,7 @@ var brevoFirewall = {
|
|
|
645
645
|
},
|
|
646
646
|
apis: [
|
|
647
647
|
{
|
|
648
|
-
base: "https://api.brevo.com
|
|
648
|
+
base: "https://api.brevo.com",
|
|
649
649
|
auth: {
|
|
650
650
|
headers: {
|
|
651
651
|
"api-key": "${{ secrets.BREVO_TOKEN }}"
|
|
@@ -857,7 +857,7 @@ var clickupFirewall = {
|
|
|
857
857
|
},
|
|
858
858
|
apis: [
|
|
859
859
|
{
|
|
860
|
-
base: "https://api.clickup.com/api
|
|
860
|
+
base: "https://api.clickup.com/api",
|
|
861
861
|
auth: {
|
|
862
862
|
headers: {
|
|
863
863
|
Authorization: "${{ secrets.CLICKUP_TOKEN }}"
|
|
@@ -883,7 +883,7 @@ var closeFirewall = {
|
|
|
883
883
|
},
|
|
884
884
|
apis: [
|
|
885
885
|
{
|
|
886
|
-
base: "https://api.close.com/api
|
|
886
|
+
base: "https://api.close.com/api",
|
|
887
887
|
auth: {
|
|
888
888
|
headers: {
|
|
889
889
|
Authorization: "Bearer ${{ secrets.CLOSE_TOKEN }}"
|
|
@@ -1481,6 +1481,36 @@ var falFirewall = {
|
|
|
1481
1481
|
FAL_TOKEN: "Vm0PlaceHolder00:sk_live_Vm0PlaceHolder00000000000000"
|
|
1482
1482
|
},
|
|
1483
1483
|
apis: [
|
|
1484
|
+
{
|
|
1485
|
+
base: "https://fal.run",
|
|
1486
|
+
auth: {
|
|
1487
|
+
headers: {
|
|
1488
|
+
Authorization: "Key ${{ secrets.FAL_TOKEN }}"
|
|
1489
|
+
}
|
|
1490
|
+
},
|
|
1491
|
+
permissions: [
|
|
1492
|
+
{
|
|
1493
|
+
name: "unrestricted",
|
|
1494
|
+
description: "Allow all endpoints",
|
|
1495
|
+
rules: ["ANY /{path*}"]
|
|
1496
|
+
}
|
|
1497
|
+
]
|
|
1498
|
+
},
|
|
1499
|
+
{
|
|
1500
|
+
base: "https://queue.fal.run",
|
|
1501
|
+
auth: {
|
|
1502
|
+
headers: {
|
|
1503
|
+
Authorization: "Key ${{ secrets.FAL_TOKEN }}"
|
|
1504
|
+
}
|
|
1505
|
+
},
|
|
1506
|
+
permissions: [
|
|
1507
|
+
{
|
|
1508
|
+
name: "unrestricted",
|
|
1509
|
+
description: "Allow all endpoints",
|
|
1510
|
+
rules: ["ANY /{path*}"]
|
|
1511
|
+
}
|
|
1512
|
+
]
|
|
1513
|
+
},
|
|
1484
1514
|
{
|
|
1485
1515
|
base: "https://api.fal.ai",
|
|
1486
1516
|
auth: {
|
|
@@ -5234,7 +5264,7 @@ var granolaFirewall = {
|
|
|
5234
5264
|
},
|
|
5235
5265
|
apis: [
|
|
5236
5266
|
{
|
|
5237
|
-
base: "https://api.granola.ai",
|
|
5267
|
+
base: "https://public-api.granola.ai",
|
|
5238
5268
|
auth: {
|
|
5239
5269
|
headers: {
|
|
5240
5270
|
Authorization: "Bearer ${{ secrets.GRANOLA_TOKEN }}"
|
|
@@ -6332,7 +6362,7 @@ var loopsFirewall = {
|
|
|
6332
6362
|
},
|
|
6333
6363
|
apis: [
|
|
6334
6364
|
{
|
|
6335
|
-
base: "https://app.loops.so/api
|
|
6365
|
+
base: "https://app.loops.so/api",
|
|
6336
6366
|
auth: {
|
|
6337
6367
|
headers: {
|
|
6338
6368
|
Authorization: "Bearer ${{ secrets.LOOPS_TOKEN }}"
|
|
@@ -6488,7 +6518,7 @@ var neonFirewall = {
|
|
|
6488
6518
|
},
|
|
6489
6519
|
apis: [
|
|
6490
6520
|
{
|
|
6491
|
-
base: "https://console.neon.tech/api
|
|
6521
|
+
base: "https://console.neon.tech/api",
|
|
6492
6522
|
auth: {
|
|
6493
6523
|
headers: {
|
|
6494
6524
|
Authorization: "Bearer ${{ secrets.NEON_TOKEN }}"
|
|
@@ -6514,7 +6544,7 @@ var notionFirewall = {
|
|
|
6514
6544
|
},
|
|
6515
6545
|
apis: [
|
|
6516
6546
|
{
|
|
6517
|
-
base: "https://api.notion.com
|
|
6547
|
+
base: "https://api.notion.com",
|
|
6518
6548
|
auth: {
|
|
6519
6549
|
headers: {
|
|
6520
6550
|
Authorization: "Bearer ${{ secrets.NOTION_TOKEN }}"
|
|
@@ -6529,68 +6559,73 @@ var notionFirewall = {
|
|
|
6529
6559
|
{
|
|
6530
6560
|
name: "insert_comments",
|
|
6531
6561
|
description: "Create comments",
|
|
6532
|
-
rules: ["POST /comments"]
|
|
6562
|
+
rules: ["POST /v1/comments"]
|
|
6533
6563
|
},
|
|
6534
6564
|
{
|
|
6535
6565
|
name: "insert_content",
|
|
6536
6566
|
description: "Create pages, databases, blocks, data sources, and upload files",
|
|
6537
6567
|
rules: [
|
|
6538
|
-
"PATCH /blocks/{block_id}/children",
|
|
6539
|
-
"POST /data_sources",
|
|
6540
|
-
"POST /databases",
|
|
6541
|
-
"POST /file_uploads",
|
|
6542
|
-
"POST /file_uploads/{file_upload_id}/complete",
|
|
6543
|
-
"POST /file_uploads/{file_upload_id}/send",
|
|
6544
|
-
"POST /pages",
|
|
6545
|
-
"POST /views",
|
|
6546
|
-
"POST /views/{view_id}/queries"
|
|
6568
|
+
"PATCH /v1/blocks/{block_id}/children",
|
|
6569
|
+
"POST /v1/data_sources",
|
|
6570
|
+
"POST /v1/databases",
|
|
6571
|
+
"POST /v1/file_uploads",
|
|
6572
|
+
"POST /v1/file_uploads/{file_upload_id}/complete",
|
|
6573
|
+
"POST /v1/file_uploads/{file_upload_id}/send",
|
|
6574
|
+
"POST /v1/pages",
|
|
6575
|
+
"POST /v1/views",
|
|
6576
|
+
"POST /v1/views/{view_id}/queries"
|
|
6547
6577
|
]
|
|
6548
6578
|
},
|
|
6549
6579
|
{
|
|
6550
6580
|
name: "read_comments",
|
|
6551
6581
|
description: "Read comments",
|
|
6552
|
-
rules: ["GET /comments", "GET /comments/{comment_id}"]
|
|
6582
|
+
rules: ["GET /v1/comments", "GET /v1/comments/{comment_id}"]
|
|
6553
6583
|
},
|
|
6554
6584
|
{
|
|
6555
6585
|
name: "read_content",
|
|
6556
6586
|
description: "Read pages, databases, blocks, data sources, and files",
|
|
6557
6587
|
rules: [
|
|
6558
|
-
"GET /blocks/{block_id}",
|
|
6559
|
-
"GET /blocks/{block_id}/children",
|
|
6560
|
-
"GET /
|
|
6561
|
-
"
|
|
6562
|
-
"
|
|
6563
|
-
"GET /
|
|
6564
|
-
"GET /
|
|
6565
|
-
"GET /file_uploads
|
|
6566
|
-
"GET /
|
|
6567
|
-
"GET /pages/{page_id}
|
|
6568
|
-
"GET /pages/{page_id}/
|
|
6569
|
-
"
|
|
6570
|
-
"
|
|
6571
|
-
"GET /views
|
|
6572
|
-
"GET /views/{view_id}
|
|
6588
|
+
"GET /v1/blocks/{block_id}",
|
|
6589
|
+
"GET /v1/blocks/{block_id}/children",
|
|
6590
|
+
"GET /v1/custom_emojis",
|
|
6591
|
+
"GET /v1/data_sources/{data_source_id}",
|
|
6592
|
+
"POST /v1/data_sources/{data_source_id}/query",
|
|
6593
|
+
"GET /v1/data_sources/{data_source_id}/templates",
|
|
6594
|
+
"GET /v1/databases/{database_id}",
|
|
6595
|
+
"GET /v1/file_uploads",
|
|
6596
|
+
"GET /v1/file_uploads/{file_upload_id}",
|
|
6597
|
+
"GET /v1/pages/{page_id}",
|
|
6598
|
+
"GET /v1/pages/{page_id}/markdown",
|
|
6599
|
+
"GET /v1/pages/{page_id}/properties/{property_id}",
|
|
6600
|
+
"POST /v1/search",
|
|
6601
|
+
"GET /v1/views",
|
|
6602
|
+
"GET /v1/views/{view_id}",
|
|
6603
|
+
"GET /v1/views/{view_id}/queries/{query_id}"
|
|
6573
6604
|
]
|
|
6574
6605
|
},
|
|
6575
6606
|
{
|
|
6576
6607
|
name: "read_users",
|
|
6577
6608
|
description: "Read user information",
|
|
6578
|
-
rules: [
|
|
6609
|
+
rules: [
|
|
6610
|
+
"GET /v1/users",
|
|
6611
|
+
"GET /v1/users/me",
|
|
6612
|
+
"GET /v1/users/{user_id}"
|
|
6613
|
+
]
|
|
6579
6614
|
},
|
|
6580
6615
|
{
|
|
6581
6616
|
name: "update_content",
|
|
6582
6617
|
description: "Update and delete pages, databases, blocks, and data sources",
|
|
6583
6618
|
rules: [
|
|
6584
|
-
"PATCH /blocks/{block_id}",
|
|
6585
|
-
"DELETE /blocks/{block_id}",
|
|
6586
|
-
"PATCH /data_sources/{data_source_id}",
|
|
6587
|
-
"PATCH /databases/{database_id}",
|
|
6588
|
-
"PATCH /pages/{page_id}",
|
|
6589
|
-
"PATCH /pages/{page_id}/markdown",
|
|
6590
|
-
"POST /pages/{page_id}/move",
|
|
6591
|
-
"PATCH /views/{view_id}",
|
|
6592
|
-
"DELETE /views/{view_id}",
|
|
6593
|
-
"DELETE /views/{view_id}/queries/{query_id}"
|
|
6619
|
+
"PATCH /v1/blocks/{block_id}",
|
|
6620
|
+
"DELETE /v1/blocks/{block_id}",
|
|
6621
|
+
"PATCH /v1/data_sources/{data_source_id}",
|
|
6622
|
+
"PATCH /v1/databases/{database_id}",
|
|
6623
|
+
"PATCH /v1/pages/{page_id}",
|
|
6624
|
+
"PATCH /v1/pages/{page_id}/markdown",
|
|
6625
|
+
"POST /v1/pages/{page_id}/move",
|
|
6626
|
+
"PATCH /v1/views/{view_id}",
|
|
6627
|
+
"DELETE /v1/views/{view_id}",
|
|
6628
|
+
"DELETE /v1/views/{view_id}/queries/{query_id}"
|
|
6594
6629
|
]
|
|
6595
6630
|
}
|
|
6596
6631
|
]
|
|
@@ -6711,7 +6746,7 @@ var pdfcoFirewall = {
|
|
|
6711
6746
|
},
|
|
6712
6747
|
apis: [
|
|
6713
6748
|
{
|
|
6714
|
-
base: "https://api.pdf.co
|
|
6749
|
+
base: "https://api.pdf.co",
|
|
6715
6750
|
auth: {
|
|
6716
6751
|
headers: {
|
|
6717
6752
|
"x-api-key": "${{ secrets.PDFCO_TOKEN }}"
|
|
@@ -7197,7 +7232,7 @@ var shortioFirewall = {
|
|
|
7197
7232
|
base: "https://api.short.io",
|
|
7198
7233
|
auth: {
|
|
7199
7234
|
headers: {
|
|
7200
|
-
Authorization: "${{ secrets.SHORTIO_TOKEN }}"
|
|
7235
|
+
Authorization: "Bearer ${{ secrets.SHORTIO_TOKEN }}"
|
|
7201
7236
|
}
|
|
7202
7237
|
},
|
|
7203
7238
|
permissions: [
|
|
@@ -9095,8 +9130,8 @@ var builtinFirewalls = {
|
|
|
9095
9130
|
confluence: confluenceFirewall,
|
|
9096
9131
|
cronlytic: cronlyticFirewall,
|
|
9097
9132
|
"customer-io": customerIoFirewall,
|
|
9098
|
-
deepseek: deepseekFirewall,
|
|
9099
9133
|
deel: deelFirewall,
|
|
9134
|
+
deepseek: deepseekFirewall,
|
|
9100
9135
|
devto: devtoFirewall,
|
|
9101
9136
|
discord: discordFirewall,
|
|
9102
9137
|
dropbox: dropboxFirewall,
|
|
@@ -9147,8 +9182,8 @@ var builtinFirewalls = {
|
|
|
9147
9182
|
plausible: plausibleFirewall,
|
|
9148
9183
|
podchaser: podchaserFirewall,
|
|
9149
9184
|
posthog: posthogFirewall,
|
|
9150
|
-
productlane: productlaneFirewall,
|
|
9151
9185
|
"prisma-postgres": prismaPostgresFirewall,
|
|
9186
|
+
productlane: productlaneFirewall,
|
|
9152
9187
|
pushinator: pushinatorFirewall,
|
|
9153
9188
|
qiita: qiitaFirewall,
|
|
9154
9189
|
reddit: redditFirewall,
|
|
@@ -9849,7 +9884,8 @@ var logsListContract = c2.router({
|
|
|
9849
9884
|
name: z5.string().optional(),
|
|
9850
9885
|
org: z5.string().optional(),
|
|
9851
9886
|
status: logStatusSchema.optional(),
|
|
9852
|
-
triggerSource: triggerSourceSchema.optional()
|
|
9887
|
+
triggerSource: triggerSourceSchema.optional(),
|
|
9888
|
+
scheduleId: z5.string().uuid().optional()
|
|
9853
9889
|
}),
|
|
9854
9890
|
responses: {
|
|
9855
9891
|
200: logsListResponseSchema,
|
|
@@ -11070,6 +11106,34 @@ var cliAuthTokenContract = c7.router({
|
|
|
11070
11106
|
summary: "Exchange device code for access token"
|
|
11071
11107
|
}
|
|
11072
11108
|
});
|
|
11109
|
+
var apiErrorResponseSchema = z11.object({
|
|
11110
|
+
error: z11.object({ message: z11.string(), code: z11.string() })
|
|
11111
|
+
});
|
|
11112
|
+
var cliAuthOrgContract = c7.router({
|
|
11113
|
+
/**
|
|
11114
|
+
* POST /api/cli/auth/org
|
|
11115
|
+
* Switch active organization and get new CLI JWT
|
|
11116
|
+
*/
|
|
11117
|
+
switchOrg: {
|
|
11118
|
+
method: "POST",
|
|
11119
|
+
path: "/api/cli/auth/org",
|
|
11120
|
+
headers: authHeadersSchema,
|
|
11121
|
+
body: z11.object({ slug: z11.string().min(1) }),
|
|
11122
|
+
responses: {
|
|
11123
|
+
200: z11.object({
|
|
11124
|
+
access_token: z11.string(),
|
|
11125
|
+
token_type: z11.literal("Bearer"),
|
|
11126
|
+
expires_in: z11.number(),
|
|
11127
|
+
org_slug: z11.string()
|
|
11128
|
+
}),
|
|
11129
|
+
400: oauthErrorSchema,
|
|
11130
|
+
401: apiErrorResponseSchema,
|
|
11131
|
+
403: apiErrorResponseSchema,
|
|
11132
|
+
404: apiErrorResponseSchema
|
|
11133
|
+
},
|
|
11134
|
+
summary: "Switch active organization and get new CLI JWT"
|
|
11135
|
+
}
|
|
11136
|
+
});
|
|
11073
11137
|
|
|
11074
11138
|
// ../../packages/core/src/contracts/auth.ts
|
|
11075
11139
|
import { z as z12 } from "zod";
|
|
@@ -11445,10 +11509,10 @@ var MODEL_PROVIDER_TYPES = {
|
|
|
11445
11509
|
defaultModel: "claude-sonnet-4.6"
|
|
11446
11510
|
}
|
|
11447
11511
|
};
|
|
11448
|
-
var
|
|
11449
|
-
|
|
11450
|
-
|
|
11451
|
-
|
|
11512
|
+
var HIDDEN_PROVIDER_LIST = ["aws-bedrock", "azure-foundry"];
|
|
11513
|
+
var HIDDEN_PROVIDER_TYPES = new Set(
|
|
11514
|
+
HIDDEN_PROVIDER_LIST
|
|
11515
|
+
);
|
|
11452
11516
|
function getSelectableProviderTypes() {
|
|
11453
11517
|
return Object.keys(MODEL_PROVIDER_TYPES).filter(
|
|
11454
11518
|
(type) => !HIDDEN_PROVIDER_TYPES.has(type)
|
|
@@ -11869,7 +11933,7 @@ var chatThreadRunsContract = c11.router({
|
|
|
11869
11933
|
runId: z18.string().min(1)
|
|
11870
11934
|
}),
|
|
11871
11935
|
responses: {
|
|
11872
|
-
204:
|
|
11936
|
+
204: c11.noBody(),
|
|
11873
11937
|
401: apiErrorSchema,
|
|
11874
11938
|
404: apiErrorSchema
|
|
11875
11939
|
},
|
|
@@ -15443,6 +15507,19 @@ var onboardingStatusContract = c15.router({
|
|
|
15443
15507
|
summary: "Get onboarding status for current user"
|
|
15444
15508
|
}
|
|
15445
15509
|
});
|
|
15510
|
+
var onboardingCompleteContract = c15.router({
|
|
15511
|
+
complete: {
|
|
15512
|
+
method: "POST",
|
|
15513
|
+
path: "/api/zero/onboarding/complete",
|
|
15514
|
+
headers: authHeadersSchema,
|
|
15515
|
+
body: c15.noBody(),
|
|
15516
|
+
responses: {
|
|
15517
|
+
200: z24.object({ ok: z24.boolean() }),
|
|
15518
|
+
401: apiErrorSchema
|
|
15519
|
+
},
|
|
15520
|
+
summary: "Mark member onboarding as complete"
|
|
15521
|
+
}
|
|
15522
|
+
});
|
|
15446
15523
|
|
|
15447
15524
|
// ../../packages/core/src/contracts/skills.ts
|
|
15448
15525
|
import { z as z25 } from "zod";
|
|
@@ -16273,6 +16350,24 @@ var zeroSchedulesEnableContract = c24.router({
|
|
|
16273
16350
|
summary: "Disable schedule (zero proxy)"
|
|
16274
16351
|
}
|
|
16275
16352
|
});
|
|
16353
|
+
var zeroScheduleRunContract = c24.router({
|
|
16354
|
+
run: {
|
|
16355
|
+
method: "POST",
|
|
16356
|
+
path: "/api/zero/schedules/run",
|
|
16357
|
+
headers: authHeadersSchema,
|
|
16358
|
+
body: z31.object({
|
|
16359
|
+
scheduleId: z31.string().uuid("Invalid schedule ID")
|
|
16360
|
+
}),
|
|
16361
|
+
responses: {
|
|
16362
|
+
201: z31.object({ runId: z31.string() }),
|
|
16363
|
+
400: apiErrorSchema,
|
|
16364
|
+
401: apiErrorSchema,
|
|
16365
|
+
404: apiErrorSchema,
|
|
16366
|
+
409: apiErrorSchema
|
|
16367
|
+
},
|
|
16368
|
+
summary: "Execute a schedule immediately (run now)"
|
|
16369
|
+
}
|
|
16370
|
+
});
|
|
16276
16371
|
|
|
16277
16372
|
// ../../packages/core/src/contracts/zero-model-providers.ts
|
|
16278
16373
|
import { z as z32 } from "zod";
|
|
@@ -16681,6 +16776,214 @@ var zeroUsageMembersContract = c30.router({
|
|
|
16681
16776
|
}
|
|
16682
16777
|
});
|
|
16683
16778
|
|
|
16779
|
+
// ../../packages/core/src/contracts/zero-team.ts
|
|
16780
|
+
import { z as z38 } from "zod";
|
|
16781
|
+
var c31 = initContract();
|
|
16782
|
+
var teamComposeItemSchema = z38.object({
|
|
16783
|
+
id: z38.string(),
|
|
16784
|
+
displayName: z38.string().nullable(),
|
|
16785
|
+
description: z38.string().nullable(),
|
|
16786
|
+
sound: z38.string().nullable(),
|
|
16787
|
+
headVersionId: z38.string().nullable(),
|
|
16788
|
+
updatedAt: z38.string()
|
|
16789
|
+
});
|
|
16790
|
+
var zeroTeamContract = c31.router({
|
|
16791
|
+
list: {
|
|
16792
|
+
method: "GET",
|
|
16793
|
+
path: "/api/zero/team",
|
|
16794
|
+
headers: authHeadersSchema,
|
|
16795
|
+
responses: {
|
|
16796
|
+
200: z38.array(teamComposeItemSchema),
|
|
16797
|
+
401: apiErrorSchema,
|
|
16798
|
+
403: apiErrorSchema,
|
|
16799
|
+
404: apiErrorSchema
|
|
16800
|
+
},
|
|
16801
|
+
summary: "List all agents in the user's active org"
|
|
16802
|
+
}
|
|
16803
|
+
});
|
|
16804
|
+
|
|
16805
|
+
// ../../packages/core/src/contracts/zero-integrations-slack.ts
|
|
16806
|
+
import { z as z39 } from "zod";
|
|
16807
|
+
var c32 = initContract();
|
|
16808
|
+
var slackEnvironmentSchema = z39.object({
|
|
16809
|
+
requiredSecrets: z39.array(z39.string()),
|
|
16810
|
+
requiredVars: z39.array(z39.string()),
|
|
16811
|
+
missingSecrets: z39.array(z39.string()),
|
|
16812
|
+
missingVars: z39.array(z39.string())
|
|
16813
|
+
});
|
|
16814
|
+
var slackOrgStatusSchema = z39.object({
|
|
16815
|
+
isConnected: z39.boolean(),
|
|
16816
|
+
isInstalled: z39.boolean().optional(),
|
|
16817
|
+
workspaceName: z39.string().nullable().optional(),
|
|
16818
|
+
isAdmin: z39.boolean(),
|
|
16819
|
+
installUrl: z39.string().nullable().optional(),
|
|
16820
|
+
connectUrl: z39.string().nullable().optional(),
|
|
16821
|
+
defaultAgentName: z39.string().nullable().optional(),
|
|
16822
|
+
agentOrgSlug: z39.string().nullable().optional(),
|
|
16823
|
+
environment: slackEnvironmentSchema.optional()
|
|
16824
|
+
});
|
|
16825
|
+
var zeroIntegrationsSlackContract = c32.router({
|
|
16826
|
+
getStatus: {
|
|
16827
|
+
method: "GET",
|
|
16828
|
+
path: "/api/zero/integrations/slack",
|
|
16829
|
+
headers: authHeadersSchema,
|
|
16830
|
+
responses: {
|
|
16831
|
+
200: slackOrgStatusSchema,
|
|
16832
|
+
401: apiErrorSchema
|
|
16833
|
+
},
|
|
16834
|
+
summary: "Get org-scoped Slack workspace info"
|
|
16835
|
+
},
|
|
16836
|
+
disconnect: {
|
|
16837
|
+
method: "DELETE",
|
|
16838
|
+
path: "/api/zero/integrations/slack",
|
|
16839
|
+
headers: authHeadersSchema,
|
|
16840
|
+
body: c32.noBody(),
|
|
16841
|
+
query: z39.object({
|
|
16842
|
+
action: z39.string().optional()
|
|
16843
|
+
}),
|
|
16844
|
+
responses: {
|
|
16845
|
+
200: z39.object({ ok: z39.boolean() }),
|
|
16846
|
+
401: apiErrorSchema,
|
|
16847
|
+
403: apiErrorSchema,
|
|
16848
|
+
404: apiErrorSchema
|
|
16849
|
+
},
|
|
16850
|
+
summary: "Disconnect or uninstall Slack workspace"
|
|
16851
|
+
}
|
|
16852
|
+
});
|
|
16853
|
+
|
|
16854
|
+
// ../../packages/core/src/contracts/zero-slack-connect.ts
|
|
16855
|
+
import { z as z40 } from "zod";
|
|
16856
|
+
var c33 = initContract();
|
|
16857
|
+
var slackConnectStatusSchema = z40.object({
|
|
16858
|
+
isConnected: z40.boolean(),
|
|
16859
|
+
isAdmin: z40.boolean(),
|
|
16860
|
+
workspaceName: z40.string().nullable().optional(),
|
|
16861
|
+
defaultAgentName: z40.string().nullable().optional()
|
|
16862
|
+
});
|
|
16863
|
+
var slackConnectResponseSchema = z40.object({
|
|
16864
|
+
success: z40.boolean(),
|
|
16865
|
+
connectionId: z40.string(),
|
|
16866
|
+
role: z40.string()
|
|
16867
|
+
});
|
|
16868
|
+
var zeroSlackConnectContract = c33.router({
|
|
16869
|
+
getStatus: {
|
|
16870
|
+
method: "GET",
|
|
16871
|
+
path: "/api/zero/integrations/slack/connect",
|
|
16872
|
+
headers: authHeadersSchema,
|
|
16873
|
+
responses: {
|
|
16874
|
+
200: slackConnectStatusSchema,
|
|
16875
|
+
401: apiErrorSchema
|
|
16876
|
+
},
|
|
16877
|
+
summary: "Check user Slack connection status"
|
|
16878
|
+
},
|
|
16879
|
+
connect: {
|
|
16880
|
+
method: "POST",
|
|
16881
|
+
path: "/api/zero/integrations/slack/connect",
|
|
16882
|
+
headers: authHeadersSchema,
|
|
16883
|
+
body: z40.object({
|
|
16884
|
+
workspaceId: z40.string().min(1),
|
|
16885
|
+
slackUserId: z40.string().min(1),
|
|
16886
|
+
channelId: z40.string().optional(),
|
|
16887
|
+
threadTs: z40.string().optional()
|
|
16888
|
+
}),
|
|
16889
|
+
responses: {
|
|
16890
|
+
200: slackConnectResponseSchema,
|
|
16891
|
+
400: apiErrorSchema,
|
|
16892
|
+
401: apiErrorSchema,
|
|
16893
|
+
403: apiErrorSchema,
|
|
16894
|
+
404: apiErrorSchema
|
|
16895
|
+
},
|
|
16896
|
+
summary: "Connect user to Slack workspace"
|
|
16897
|
+
}
|
|
16898
|
+
});
|
|
16899
|
+
|
|
16900
|
+
// ../../packages/core/src/contracts/zero-slack-channels.ts
|
|
16901
|
+
import { z as z41 } from "zod";
|
|
16902
|
+
var c34 = initContract();
|
|
16903
|
+
var slackChannelSchema = z41.object({
|
|
16904
|
+
id: z41.string(),
|
|
16905
|
+
name: z41.string()
|
|
16906
|
+
});
|
|
16907
|
+
var zeroSlackChannelsContract = c34.router({
|
|
16908
|
+
list: {
|
|
16909
|
+
method: "GET",
|
|
16910
|
+
path: "/api/zero/slack/channels",
|
|
16911
|
+
headers: authHeadersSchema,
|
|
16912
|
+
responses: {
|
|
16913
|
+
200: z41.object({ channels: z41.array(slackChannelSchema) }),
|
|
16914
|
+
401: apiErrorSchema,
|
|
16915
|
+
404: apiErrorSchema
|
|
16916
|
+
},
|
|
16917
|
+
summary: "List Slack channels where bot is a member"
|
|
16918
|
+
}
|
|
16919
|
+
});
|
|
16920
|
+
|
|
16921
|
+
// ../../packages/core/src/contracts/zero-queue-position.ts
|
|
16922
|
+
import { z as z42 } from "zod";
|
|
16923
|
+
var c35 = initContract();
|
|
16924
|
+
var queuePositionResponseSchema = z42.object({
|
|
16925
|
+
position: z42.number(),
|
|
16926
|
+
total: z42.number()
|
|
16927
|
+
});
|
|
16928
|
+
var zeroQueuePositionContract = c35.router({
|
|
16929
|
+
getPosition: {
|
|
16930
|
+
method: "GET",
|
|
16931
|
+
path: "/api/zero/queue-position",
|
|
16932
|
+
headers: authHeadersSchema,
|
|
16933
|
+
query: z42.object({
|
|
16934
|
+
runId: z42.string().min(1, "runId is required")
|
|
16935
|
+
}),
|
|
16936
|
+
responses: {
|
|
16937
|
+
200: queuePositionResponseSchema,
|
|
16938
|
+
400: apiErrorSchema,
|
|
16939
|
+
401: apiErrorSchema,
|
|
16940
|
+
404: apiErrorSchema
|
|
16941
|
+
},
|
|
16942
|
+
summary: "Get queue position for a run"
|
|
16943
|
+
}
|
|
16944
|
+
});
|
|
16945
|
+
|
|
16946
|
+
// ../../packages/core/src/contracts/zero-member-credit-cap.ts
|
|
16947
|
+
import { z as z43 } from "zod";
|
|
16948
|
+
var c36 = initContract();
|
|
16949
|
+
var memberCreditCapResponseSchema = z43.object({
|
|
16950
|
+
userId: z43.string(),
|
|
16951
|
+
creditCap: z43.number().nullable(),
|
|
16952
|
+
creditEnabled: z43.boolean()
|
|
16953
|
+
});
|
|
16954
|
+
var zeroMemberCreditCapContract = c36.router({
|
|
16955
|
+
get: {
|
|
16956
|
+
method: "GET",
|
|
16957
|
+
path: "/api/zero/org/members/credit-cap",
|
|
16958
|
+
headers: authHeadersSchema,
|
|
16959
|
+
query: z43.object({
|
|
16960
|
+
userId: z43.string().min(1, "userId is required")
|
|
16961
|
+
}),
|
|
16962
|
+
responses: {
|
|
16963
|
+
200: memberCreditCapResponseSchema,
|
|
16964
|
+
400: apiErrorSchema,
|
|
16965
|
+
401: apiErrorSchema
|
|
16966
|
+
},
|
|
16967
|
+
summary: "Get member credit cap"
|
|
16968
|
+
},
|
|
16969
|
+
set: {
|
|
16970
|
+
method: "PUT",
|
|
16971
|
+
path: "/api/zero/org/members/credit-cap",
|
|
16972
|
+
headers: authHeadersSchema,
|
|
16973
|
+
body: z43.object({
|
|
16974
|
+
userId: z43.string().min(1),
|
|
16975
|
+
creditCap: z43.number().int().positive().nullable()
|
|
16976
|
+
}),
|
|
16977
|
+
responses: {
|
|
16978
|
+
200: memberCreditCapResponseSchema,
|
|
16979
|
+
400: apiErrorSchema,
|
|
16980
|
+
401: apiErrorSchema,
|
|
16981
|
+
403: apiErrorSchema
|
|
16982
|
+
},
|
|
16983
|
+
summary: "Set or clear member credit cap"
|
|
16984
|
+
}
|
|
16985
|
+
});
|
|
16986
|
+
|
|
16684
16987
|
// ../../packages/core/src/storage-names.ts
|
|
16685
16988
|
function getInstructionsStorageName(agentName) {
|
|
16686
16989
|
return `agent-instructions@${agentName}`;
|
|
@@ -16996,11 +17299,7 @@ var ApiRequestError = class extends Error {
|
|
|
16996
17299
|
this.name = "ApiRequestError";
|
|
16997
17300
|
}
|
|
16998
17301
|
};
|
|
16999
|
-
|
|
17000
|
-
const token = await getActiveToken();
|
|
17001
|
-
if (!token) {
|
|
17002
|
-
throw new ApiRequestError("Not authenticated", "UNAUTHORIZED", 401);
|
|
17003
|
-
}
|
|
17302
|
+
function buildHeaders(token) {
|
|
17004
17303
|
const headers = {
|
|
17005
17304
|
Authorization: `Bearer ${token}`
|
|
17006
17305
|
};
|
|
@@ -17019,7 +17318,15 @@ async function getBaseUrl() {
|
|
|
17019
17318
|
}
|
|
17020
17319
|
async function getClientConfig() {
|
|
17021
17320
|
const baseUrl = await getBaseUrl();
|
|
17022
|
-
const
|
|
17321
|
+
const token = await getActiveToken();
|
|
17322
|
+
if (!token) {
|
|
17323
|
+
throw new ApiRequestError("Not authenticated", "UNAUTHORIZED", 401);
|
|
17324
|
+
}
|
|
17325
|
+
const baseHeaders = buildHeaders(token);
|
|
17326
|
+
const jwtPayload = decodeCliTokenPayload(token) ?? decodeZeroTokenPayload(token);
|
|
17327
|
+
if (jwtPayload) {
|
|
17328
|
+
return { baseUrl, baseHeaders, jsonQuery: false };
|
|
17329
|
+
}
|
|
17023
17330
|
const activeOrg = await getActiveOrg();
|
|
17024
17331
|
if (!activeOrg) {
|
|
17025
17332
|
throw new Error(
|
|
@@ -17277,6 +17584,18 @@ async function deleteZeroOrg(slug) {
|
|
|
17277
17584
|
}
|
|
17278
17585
|
handleError(result, "Failed to delete organization");
|
|
17279
17586
|
}
|
|
17587
|
+
async function switchZeroOrg(slug) {
|
|
17588
|
+
const config = await getUserTokenClientConfig();
|
|
17589
|
+
const client = initClient4(cliAuthOrgContract, config);
|
|
17590
|
+
const result = await client.switchOrg({
|
|
17591
|
+
headers: {},
|
|
17592
|
+
body: { slug }
|
|
17593
|
+
});
|
|
17594
|
+
if (result.status === 200) {
|
|
17595
|
+
return result.body;
|
|
17596
|
+
}
|
|
17597
|
+
handleError(result, "Failed to switch organization");
|
|
17598
|
+
}
|
|
17280
17599
|
|
|
17281
17600
|
// src/lib/api/domains/zero-secrets.ts
|
|
17282
17601
|
import { initClient as initClient5 } from "@ts-rest/core";
|
|
@@ -17422,11 +17741,97 @@ async function deleteZeroComputerConnector() {
|
|
|
17422
17741
|
handleError(result, "Computer connector not found");
|
|
17423
17742
|
}
|
|
17424
17743
|
|
|
17425
|
-
// src/lib/api/domains/
|
|
17744
|
+
// src/lib/api/domains/logs.ts
|
|
17426
17745
|
import { initClient as initClient8 } from "@ts-rest/core";
|
|
17746
|
+
async function getSystemLog(runId, options) {
|
|
17747
|
+
const config = await getClientConfig();
|
|
17748
|
+
const client = initClient8(runSystemLogContract, config);
|
|
17749
|
+
const result = await client.getSystemLog({
|
|
17750
|
+
params: { id: runId },
|
|
17751
|
+
query: {
|
|
17752
|
+
since: options?.since,
|
|
17753
|
+
limit: options?.limit,
|
|
17754
|
+
order: options?.order
|
|
17755
|
+
}
|
|
17756
|
+
});
|
|
17757
|
+
if (result.status === 200) {
|
|
17758
|
+
return result.body;
|
|
17759
|
+
}
|
|
17760
|
+
handleError(result, "Failed to fetch system log");
|
|
17761
|
+
}
|
|
17762
|
+
async function getMetrics(runId, options) {
|
|
17763
|
+
const config = await getClientConfig();
|
|
17764
|
+
const client = initClient8(runMetricsContract, config);
|
|
17765
|
+
const result = await client.getMetrics({
|
|
17766
|
+
params: { id: runId },
|
|
17767
|
+
query: {
|
|
17768
|
+
since: options?.since,
|
|
17769
|
+
limit: options?.limit,
|
|
17770
|
+
order: options?.order
|
|
17771
|
+
}
|
|
17772
|
+
});
|
|
17773
|
+
if (result.status === 200) {
|
|
17774
|
+
return result.body;
|
|
17775
|
+
}
|
|
17776
|
+
handleError(result, "Failed to fetch metrics");
|
|
17777
|
+
}
|
|
17778
|
+
async function getAgentEvents(runId, options) {
|
|
17779
|
+
const config = await getClientConfig();
|
|
17780
|
+
const client = initClient8(runAgentEventsContract, config);
|
|
17781
|
+
const result = await client.getAgentEvents({
|
|
17782
|
+
params: { id: runId },
|
|
17783
|
+
query: {
|
|
17784
|
+
since: options?.since,
|
|
17785
|
+
limit: options?.limit,
|
|
17786
|
+
order: options?.order
|
|
17787
|
+
}
|
|
17788
|
+
});
|
|
17789
|
+
if (result.status === 200) {
|
|
17790
|
+
return result.body;
|
|
17791
|
+
}
|
|
17792
|
+
handleError(result, "Failed to fetch agent events");
|
|
17793
|
+
}
|
|
17794
|
+
async function getNetworkLogs(runId, options) {
|
|
17795
|
+
const config = await getClientConfig();
|
|
17796
|
+
const client = initClient8(runNetworkLogsContract, config);
|
|
17797
|
+
const result = await client.getNetworkLogs({
|
|
17798
|
+
params: { id: runId },
|
|
17799
|
+
query: {
|
|
17800
|
+
since: options?.since,
|
|
17801
|
+
limit: options?.limit,
|
|
17802
|
+
order: options?.order
|
|
17803
|
+
}
|
|
17804
|
+
});
|
|
17805
|
+
if (result.status === 200) {
|
|
17806
|
+
return result.body;
|
|
17807
|
+
}
|
|
17808
|
+
handleError(result, "Failed to fetch network logs");
|
|
17809
|
+
}
|
|
17810
|
+
async function searchLogs(options) {
|
|
17811
|
+
const config = await getClientConfig();
|
|
17812
|
+
const client = initClient8(logsSearchContract, config);
|
|
17813
|
+
const result = await client.searchLogs({
|
|
17814
|
+
query: {
|
|
17815
|
+
keyword: options.keyword,
|
|
17816
|
+
agent: options.agent,
|
|
17817
|
+
runId: options.runId,
|
|
17818
|
+
since: options.since,
|
|
17819
|
+
limit: options.limit,
|
|
17820
|
+
before: options.before,
|
|
17821
|
+
after: options.after
|
|
17822
|
+
}
|
|
17823
|
+
});
|
|
17824
|
+
if (result.status === 200) {
|
|
17825
|
+
return result.body;
|
|
17826
|
+
}
|
|
17827
|
+
handleError(result, "Failed to search logs");
|
|
17828
|
+
}
|
|
17829
|
+
|
|
17830
|
+
// src/lib/api/domains/runs.ts
|
|
17831
|
+
import { initClient as initClient9 } from "@ts-rest/core";
|
|
17427
17832
|
async function createRun(body) {
|
|
17428
17833
|
const config = await getClientConfig();
|
|
17429
|
-
const client =
|
|
17834
|
+
const client = initClient9(runsMainContract, config);
|
|
17430
17835
|
const result = await client.create({ body });
|
|
17431
17836
|
if (result.status === 201) {
|
|
17432
17837
|
return result.body;
|
|
@@ -17435,7 +17840,7 @@ async function createRun(body) {
|
|
|
17435
17840
|
}
|
|
17436
17841
|
async function getEvents(runId, options) {
|
|
17437
17842
|
const config = await getClientConfig();
|
|
17438
|
-
const client =
|
|
17843
|
+
const client = initClient9(runEventsContract, config);
|
|
17439
17844
|
const result = await client.getEvents({
|
|
17440
17845
|
params: { id: runId },
|
|
17441
17846
|
query: {
|
|
@@ -17450,7 +17855,7 @@ async function getEvents(runId, options) {
|
|
|
17450
17855
|
}
|
|
17451
17856
|
async function listRuns(params) {
|
|
17452
17857
|
const config = await getClientConfig();
|
|
17453
|
-
const client =
|
|
17858
|
+
const client = initClient9(runsMainContract, config);
|
|
17454
17859
|
const result = await client.list({
|
|
17455
17860
|
query: {
|
|
17456
17861
|
status: params?.status,
|
|
@@ -17467,7 +17872,7 @@ async function listRuns(params) {
|
|
|
17467
17872
|
}
|
|
17468
17873
|
async function getRunQueue() {
|
|
17469
17874
|
const config = await getClientConfig();
|
|
17470
|
-
const client =
|
|
17875
|
+
const client = initClient9(runsQueueContract, config);
|
|
17471
17876
|
const result = await client.getQueue({ headers: {} });
|
|
17472
17877
|
if (result.status === 200) {
|
|
17473
17878
|
return result.body;
|
|
@@ -17476,7 +17881,7 @@ async function getRunQueue() {
|
|
|
17476
17881
|
}
|
|
17477
17882
|
async function cancelRun(runId) {
|
|
17478
17883
|
const config = await getClientConfig();
|
|
17479
|
-
const client =
|
|
17884
|
+
const client = initClient9(runsCancelContract, config);
|
|
17480
17885
|
const result = await client.cancel({
|
|
17481
17886
|
params: { id: runId }
|
|
17482
17887
|
});
|
|
@@ -17487,10 +17892,10 @@ async function cancelRun(runId) {
|
|
|
17487
17892
|
}
|
|
17488
17893
|
|
|
17489
17894
|
// src/lib/api/domains/sessions.ts
|
|
17490
|
-
import { initClient as
|
|
17895
|
+
import { initClient as initClient10 } from "@ts-rest/core";
|
|
17491
17896
|
async function getSession(sessionId) {
|
|
17492
17897
|
const config = await getClientConfig();
|
|
17493
|
-
const client =
|
|
17898
|
+
const client = initClient10(sessionsByIdContract, config);
|
|
17494
17899
|
const result = await client.getById({
|
|
17495
17900
|
params: { id: sessionId }
|
|
17496
17901
|
});
|
|
@@ -17503,7 +17908,7 @@ async function getSession(sessionId) {
|
|
|
17503
17908
|
}
|
|
17504
17909
|
async function getCheckpoint(checkpointId) {
|
|
17505
17910
|
const config = await getClientConfig();
|
|
17506
|
-
const client =
|
|
17911
|
+
const client = initClient10(checkpointsByIdContract, config);
|
|
17507
17912
|
const result = await client.getById({
|
|
17508
17913
|
params: { id: checkpointId }
|
|
17509
17914
|
});
|
|
@@ -17514,10 +17919,10 @@ async function getCheckpoint(checkpointId) {
|
|
|
17514
17919
|
}
|
|
17515
17920
|
|
|
17516
17921
|
// src/lib/api/domains/storages.ts
|
|
17517
|
-
import { initClient as
|
|
17922
|
+
import { initClient as initClient11 } from "@ts-rest/core";
|
|
17518
17923
|
async function prepareStorage(body) {
|
|
17519
17924
|
const config = await getClientConfig();
|
|
17520
|
-
const client =
|
|
17925
|
+
const client = initClient11(storagesPrepareContract, config);
|
|
17521
17926
|
const result = await client.prepare({ body });
|
|
17522
17927
|
if (result.status === 200) {
|
|
17523
17928
|
return result.body;
|
|
@@ -17526,7 +17931,7 @@ async function prepareStorage(body) {
|
|
|
17526
17931
|
}
|
|
17527
17932
|
async function commitStorage(body) {
|
|
17528
17933
|
const config = await getClientConfig();
|
|
17529
|
-
const client =
|
|
17934
|
+
const client = initClient11(storagesCommitContract, config);
|
|
17530
17935
|
const result = await client.commit({ body });
|
|
17531
17936
|
if (result.status === 200) {
|
|
17532
17937
|
return result.body;
|
|
@@ -17535,7 +17940,7 @@ async function commitStorage(body) {
|
|
|
17535
17940
|
}
|
|
17536
17941
|
async function getStorageDownload(query) {
|
|
17537
17942
|
const config = await getClientConfig();
|
|
17538
|
-
const client =
|
|
17943
|
+
const client = initClient11(storagesDownloadContract, config);
|
|
17539
17944
|
const result = await client.download({
|
|
17540
17945
|
query: {
|
|
17541
17946
|
name: query.name,
|
|
@@ -17550,7 +17955,7 @@ async function getStorageDownload(query) {
|
|
|
17550
17955
|
}
|
|
17551
17956
|
async function listStorages(query) {
|
|
17552
17957
|
const config = await getClientConfig();
|
|
17553
|
-
const client =
|
|
17958
|
+
const client = initClient11(storagesListContract, config);
|
|
17554
17959
|
const result = await client.list({ query });
|
|
17555
17960
|
if (result.status === 200) {
|
|
17556
17961
|
return result.body;
|
|
@@ -17559,10 +17964,10 @@ async function listStorages(query) {
|
|
|
17559
17964
|
}
|
|
17560
17965
|
|
|
17561
17966
|
// src/lib/api/domains/zero-org-secrets.ts
|
|
17562
|
-
import { initClient as
|
|
17967
|
+
import { initClient as initClient12 } from "@ts-rest/core";
|
|
17563
17968
|
async function listZeroOrgSecrets() {
|
|
17564
17969
|
const config = await getClientConfig();
|
|
17565
|
-
const client =
|
|
17970
|
+
const client = initClient12(zeroSecretsContract, config);
|
|
17566
17971
|
const result = await client.list({ headers: {} });
|
|
17567
17972
|
if (result.status === 200) {
|
|
17568
17973
|
return result.body;
|
|
@@ -17571,7 +17976,7 @@ async function listZeroOrgSecrets() {
|
|
|
17571
17976
|
}
|
|
17572
17977
|
async function setZeroOrgSecret(body) {
|
|
17573
17978
|
const config = await getClientConfig();
|
|
17574
|
-
const client =
|
|
17979
|
+
const client = initClient12(zeroSecretsContract, config);
|
|
17575
17980
|
const result = await client.set({ body });
|
|
17576
17981
|
if (result.status === 200 || result.status === 201) {
|
|
17577
17982
|
return result.body;
|
|
@@ -17580,7 +17985,7 @@ async function setZeroOrgSecret(body) {
|
|
|
17580
17985
|
}
|
|
17581
17986
|
async function deleteZeroOrgSecret(name) {
|
|
17582
17987
|
const config = await getClientConfig();
|
|
17583
|
-
const client =
|
|
17988
|
+
const client = initClient12(zeroSecretsByNameContract, config);
|
|
17584
17989
|
const result = await client.delete({
|
|
17585
17990
|
params: { name }
|
|
17586
17991
|
});
|
|
@@ -17591,10 +17996,10 @@ async function deleteZeroOrgSecret(name) {
|
|
|
17591
17996
|
}
|
|
17592
17997
|
|
|
17593
17998
|
// src/lib/api/domains/zero-org-variables.ts
|
|
17594
|
-
import { initClient as
|
|
17999
|
+
import { initClient as initClient13 } from "@ts-rest/core";
|
|
17595
18000
|
async function listZeroOrgVariables() {
|
|
17596
18001
|
const config = await getClientConfig();
|
|
17597
|
-
const client =
|
|
18002
|
+
const client = initClient13(zeroVariablesContract, config);
|
|
17598
18003
|
const result = await client.list({ headers: {} });
|
|
17599
18004
|
if (result.status === 200) {
|
|
17600
18005
|
return result.body;
|
|
@@ -17603,7 +18008,7 @@ async function listZeroOrgVariables() {
|
|
|
17603
18008
|
}
|
|
17604
18009
|
async function setZeroOrgVariable(body) {
|
|
17605
18010
|
const config = await getClientConfig();
|
|
17606
|
-
const client =
|
|
18011
|
+
const client = initClient13(zeroVariablesContract, config);
|
|
17607
18012
|
const result = await client.set({ body });
|
|
17608
18013
|
if (result.status === 200 || result.status === 201) {
|
|
17609
18014
|
return result.body;
|
|
@@ -17612,7 +18017,7 @@ async function setZeroOrgVariable(body) {
|
|
|
17612
18017
|
}
|
|
17613
18018
|
async function deleteZeroOrgVariable(name) {
|
|
17614
18019
|
const config = await getClientConfig();
|
|
17615
|
-
const client =
|
|
18020
|
+
const client = initClient13(zeroVariablesByNameContract, config);
|
|
17616
18021
|
const result = await client.delete({
|
|
17617
18022
|
params: { name }
|
|
17618
18023
|
});
|
|
@@ -17623,10 +18028,10 @@ async function deleteZeroOrgVariable(name) {
|
|
|
17623
18028
|
}
|
|
17624
18029
|
|
|
17625
18030
|
// src/lib/api/domains/zero-org-model-providers.ts
|
|
17626
|
-
import { initClient as
|
|
18031
|
+
import { initClient as initClient14 } from "@ts-rest/core";
|
|
17627
18032
|
async function listZeroOrgModelProviders() {
|
|
17628
18033
|
const config = await getClientConfig();
|
|
17629
|
-
const client =
|
|
18034
|
+
const client = initClient14(zeroModelProvidersMainContract, config);
|
|
17630
18035
|
const result = await client.list({ headers: {} });
|
|
17631
18036
|
if (result.status === 200) {
|
|
17632
18037
|
return result.body;
|
|
@@ -17635,7 +18040,7 @@ async function listZeroOrgModelProviders() {
|
|
|
17635
18040
|
}
|
|
17636
18041
|
async function upsertZeroOrgModelProvider(body) {
|
|
17637
18042
|
const config = await getClientConfig();
|
|
17638
|
-
const client =
|
|
18043
|
+
const client = initClient14(zeroModelProvidersMainContract, config);
|
|
17639
18044
|
const result = await client.upsert({ body });
|
|
17640
18045
|
if (result.status === 200 || result.status === 201) {
|
|
17641
18046
|
return result.body;
|
|
@@ -17644,7 +18049,7 @@ async function upsertZeroOrgModelProvider(body) {
|
|
|
17644
18049
|
}
|
|
17645
18050
|
async function deleteZeroOrgModelProvider(type) {
|
|
17646
18051
|
const config = await getClientConfig();
|
|
17647
|
-
const client =
|
|
18052
|
+
const client = initClient14(zeroModelProvidersByTypeContract, config);
|
|
17648
18053
|
const result = await client.delete({
|
|
17649
18054
|
params: { type }
|
|
17650
18055
|
});
|
|
@@ -17655,7 +18060,7 @@ async function deleteZeroOrgModelProvider(type) {
|
|
|
17655
18060
|
}
|
|
17656
18061
|
async function setZeroOrgModelProviderDefault(type) {
|
|
17657
18062
|
const config = await getClientConfig();
|
|
17658
|
-
const client =
|
|
18063
|
+
const client = initClient14(zeroModelProvidersDefaultContract, config);
|
|
17659
18064
|
const result = await client.setDefault({
|
|
17660
18065
|
params: { type }
|
|
17661
18066
|
});
|
|
@@ -17666,7 +18071,7 @@ async function setZeroOrgModelProviderDefault(type) {
|
|
|
17666
18071
|
}
|
|
17667
18072
|
async function updateZeroOrgModelProviderModel(type, selectedModel) {
|
|
17668
18073
|
const config = await getClientConfig();
|
|
17669
|
-
const client =
|
|
18074
|
+
const client = initClient14(zeroModelProvidersUpdateModelContract, config);
|
|
17670
18075
|
const result = await client.updateModel({
|
|
17671
18076
|
params: { type },
|
|
17672
18077
|
body: { selectedModel }
|
|
@@ -17678,52 +18083,52 @@ async function updateZeroOrgModelProviderModel(type, selectedModel) {
|
|
|
17678
18083
|
}
|
|
17679
18084
|
|
|
17680
18085
|
// src/lib/api/domains/zero-agents.ts
|
|
17681
|
-
import { initClient as
|
|
18086
|
+
import { initClient as initClient15 } from "@ts-rest/core";
|
|
17682
18087
|
async function createZeroAgent(body) {
|
|
17683
18088
|
const config = await getClientConfig();
|
|
17684
|
-
const client =
|
|
18089
|
+
const client = initClient15(zeroAgentsMainContract, config);
|
|
17685
18090
|
const result = await client.create({ body });
|
|
17686
18091
|
if (result.status === 201) return result.body;
|
|
17687
18092
|
handleError(result, "Failed to create zero agent");
|
|
17688
18093
|
}
|
|
17689
18094
|
async function listZeroAgents() {
|
|
17690
18095
|
const config = await getClientConfig();
|
|
17691
|
-
const client =
|
|
18096
|
+
const client = initClient15(zeroAgentsMainContract, config);
|
|
17692
18097
|
const result = await client.list({ headers: {} });
|
|
17693
18098
|
if (result.status === 200) return result.body;
|
|
17694
18099
|
handleError(result, "Failed to list zero agents");
|
|
17695
18100
|
}
|
|
17696
18101
|
async function getZeroAgent(id) {
|
|
17697
18102
|
const config = await getClientConfig();
|
|
17698
|
-
const client =
|
|
18103
|
+
const client = initClient15(zeroAgentsByIdContract, config);
|
|
17699
18104
|
const result = await client.get({ params: { id } });
|
|
17700
18105
|
if (result.status === 200) return result.body;
|
|
17701
18106
|
handleError(result, `Zero agent "${id}" not found`);
|
|
17702
18107
|
}
|
|
17703
18108
|
async function updateZeroAgent(id, body) {
|
|
17704
18109
|
const config = await getClientConfig();
|
|
17705
|
-
const client =
|
|
18110
|
+
const client = initClient15(zeroAgentsByIdContract, config);
|
|
17706
18111
|
const result = await client.update({ params: { id }, body });
|
|
17707
18112
|
if (result.status === 200) return result.body;
|
|
17708
18113
|
handleError(result, `Failed to update zero agent "${id}"`);
|
|
17709
18114
|
}
|
|
17710
18115
|
async function deleteZeroAgent(id) {
|
|
17711
18116
|
const config = await getClientConfig();
|
|
17712
|
-
const client =
|
|
18117
|
+
const client = initClient15(zeroAgentsByIdContract, config);
|
|
17713
18118
|
const result = await client.delete({ params: { id } });
|
|
17714
18119
|
if (result.status === 204) return;
|
|
17715
18120
|
handleError(result, `Zero agent "${id}" not found`);
|
|
17716
18121
|
}
|
|
17717
18122
|
async function getZeroAgentInstructions(id) {
|
|
17718
18123
|
const config = await getClientConfig();
|
|
17719
|
-
const client =
|
|
18124
|
+
const client = initClient15(zeroAgentInstructionsContract, config);
|
|
17720
18125
|
const result = await client.get({ params: { id } });
|
|
17721
18126
|
if (result.status === 200) return result.body;
|
|
17722
18127
|
handleError(result, `Failed to get instructions for zero agent "${id}"`);
|
|
17723
18128
|
}
|
|
17724
18129
|
async function updateZeroAgentInstructions(id, content) {
|
|
17725
18130
|
const config = await getClientConfig();
|
|
17726
|
-
const client =
|
|
18131
|
+
const client = initClient15(zeroAgentInstructionsContract, config);
|
|
17727
18132
|
const result = await client.update({
|
|
17728
18133
|
params: { id },
|
|
17729
18134
|
body: { content }
|
|
@@ -17733,10 +18138,10 @@ async function updateZeroAgentInstructions(id, content) {
|
|
|
17733
18138
|
}
|
|
17734
18139
|
|
|
17735
18140
|
// src/lib/api/domains/integrations-slack.ts
|
|
17736
|
-
import { initClient as
|
|
18141
|
+
import { initClient as initClient16 } from "@ts-rest/core";
|
|
17737
18142
|
async function sendSlackMessage(body) {
|
|
17738
18143
|
const config = await getClientConfig();
|
|
17739
|
-
const client =
|
|
18144
|
+
const client = initClient16(integrationsSlackMessageContract, config);
|
|
17740
18145
|
const result = await client.sendMessage({ body, headers: {} });
|
|
17741
18146
|
if (result.status === 200) {
|
|
17742
18147
|
return result.body;
|
|
@@ -17745,10 +18150,10 @@ async function sendSlackMessage(body) {
|
|
|
17745
18150
|
}
|
|
17746
18151
|
|
|
17747
18152
|
// src/lib/api/domains/zero-schedules.ts
|
|
17748
|
-
import { initClient as
|
|
18153
|
+
import { initClient as initClient17 } from "@ts-rest/core";
|
|
17749
18154
|
async function deployZeroSchedule(body) {
|
|
17750
18155
|
const config = await getClientConfig();
|
|
17751
|
-
const client =
|
|
18156
|
+
const client = initClient17(zeroSchedulesMainContract, config);
|
|
17752
18157
|
const result = await client.deploy({ body });
|
|
17753
18158
|
if (result.status === 200 || result.status === 201) {
|
|
17754
18159
|
return result.body;
|
|
@@ -17757,7 +18162,7 @@ async function deployZeroSchedule(body) {
|
|
|
17757
18162
|
}
|
|
17758
18163
|
async function listZeroSchedules() {
|
|
17759
18164
|
const config = await getClientConfig();
|
|
17760
|
-
const client =
|
|
18165
|
+
const client = initClient17(zeroSchedulesMainContract, config);
|
|
17761
18166
|
const result = await client.list({ headers: {} });
|
|
17762
18167
|
if (result.status === 200) {
|
|
17763
18168
|
return result.body;
|
|
@@ -17766,7 +18171,7 @@ async function listZeroSchedules() {
|
|
|
17766
18171
|
}
|
|
17767
18172
|
async function deleteZeroSchedule(params) {
|
|
17768
18173
|
const config = await getClientConfig();
|
|
17769
|
-
const client =
|
|
18174
|
+
const client = initClient17(zeroSchedulesByNameContract, config);
|
|
17770
18175
|
const result = await client.delete({
|
|
17771
18176
|
params: { name: params.name },
|
|
17772
18177
|
query: { agentId: params.agentId }
|
|
@@ -17778,7 +18183,7 @@ async function deleteZeroSchedule(params) {
|
|
|
17778
18183
|
}
|
|
17779
18184
|
async function enableZeroSchedule(params) {
|
|
17780
18185
|
const config = await getClientConfig();
|
|
17781
|
-
const client =
|
|
18186
|
+
const client = initClient17(zeroSchedulesEnableContract, config);
|
|
17782
18187
|
const result = await client.enable({
|
|
17783
18188
|
params: { name: params.name },
|
|
17784
18189
|
body: { agentId: params.agentId }
|
|
@@ -17790,7 +18195,7 @@ async function enableZeroSchedule(params) {
|
|
|
17790
18195
|
}
|
|
17791
18196
|
async function disableZeroSchedule(params) {
|
|
17792
18197
|
const config = await getClientConfig();
|
|
17793
|
-
const client =
|
|
18198
|
+
const client = initClient17(zeroSchedulesEnableContract, config);
|
|
17794
18199
|
const result = await client.disable({
|
|
17795
18200
|
params: { name: params.name },
|
|
17796
18201
|
body: { agentId: params.agentId }
|
|
@@ -17914,6 +18319,7 @@ async function promptPassword(message) {
|
|
|
17914
18319
|
|
|
17915
18320
|
export {
|
|
17916
18321
|
configureGlobalProxyFromEnv,
|
|
18322
|
+
decodeCliTokenPayload,
|
|
17917
18323
|
decodeZeroTokenPayload,
|
|
17918
18324
|
loadConfig,
|
|
17919
18325
|
saveConfig,
|
|
@@ -17925,11 +18331,6 @@ export {
|
|
|
17925
18331
|
volumeConfigSchema,
|
|
17926
18332
|
agentDefinitionSchema,
|
|
17927
18333
|
ALL_RUN_STATUSES,
|
|
17928
|
-
runSystemLogContract,
|
|
17929
|
-
runMetricsContract,
|
|
17930
|
-
runAgentEventsContract,
|
|
17931
|
-
runNetworkLogsContract,
|
|
17932
|
-
logsSearchContract,
|
|
17933
18334
|
MODEL_PROVIDER_TYPES,
|
|
17934
18335
|
getSelectableProviderTypes,
|
|
17935
18336
|
hasAuthMethods,
|
|
@@ -17959,8 +18360,6 @@ export {
|
|
|
17959
18360
|
parseSkillFrontmatter,
|
|
17960
18361
|
ApiRequestError,
|
|
17961
18362
|
getBaseUrl,
|
|
17962
|
-
getClientConfig,
|
|
17963
|
-
handleError,
|
|
17964
18363
|
withErrorHandler,
|
|
17965
18364
|
getComposeByName,
|
|
17966
18365
|
getComposeById,
|
|
@@ -17988,6 +18387,7 @@ export {
|
|
|
17988
18387
|
removeZeroOrgMember,
|
|
17989
18388
|
leaveZeroOrg,
|
|
17990
18389
|
deleteZeroOrg,
|
|
18390
|
+
switchZeroOrg,
|
|
17991
18391
|
listZeroSecrets,
|
|
17992
18392
|
setZeroSecret,
|
|
17993
18393
|
deleteZeroSecret,
|
|
@@ -18026,10 +18426,15 @@ export {
|
|
|
18026
18426
|
enableZeroSchedule,
|
|
18027
18427
|
disableZeroSchedule,
|
|
18028
18428
|
resolveZeroScheduleByAgent,
|
|
18429
|
+
getSystemLog,
|
|
18430
|
+
getMetrics,
|
|
18431
|
+
getAgentEvents,
|
|
18432
|
+
getNetworkLogs,
|
|
18433
|
+
searchLogs,
|
|
18029
18434
|
isInteractive,
|
|
18030
18435
|
promptText,
|
|
18031
18436
|
promptConfirm,
|
|
18032
18437
|
promptSelect,
|
|
18033
18438
|
promptPassword
|
|
18034
18439
|
};
|
|
18035
|
-
//# sourceMappingURL=chunk-
|
|
18440
|
+
//# sourceMappingURL=chunk-5BLBSO2W.js.map
|