@vm0/cli 9.82.2 → 9.83.0
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-Z7ZCVASY.js} +380 -58
- package/chunk-Z7ZCVASY.js.map +1 -0
- package/index.js +10 -10
- 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.0",
|
|
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.0",
|
|
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}`;
|
|
@@ -17020,6 +17323,11 @@ async function getBaseUrl() {
|
|
|
17020
17323
|
async function getClientConfig() {
|
|
17021
17324
|
const baseUrl = await getBaseUrl();
|
|
17022
17325
|
const baseHeaders = await getHeaders();
|
|
17326
|
+
const token = await getActiveToken();
|
|
17327
|
+
const isJwtToken = decodeCliTokenPayload(token) ?? decodeZeroTokenPayload(token);
|
|
17328
|
+
if (isJwtToken) {
|
|
17329
|
+
return { baseUrl, baseHeaders, jsonQuery: false };
|
|
17330
|
+
}
|
|
17023
17331
|
const activeOrg = await getActiveOrg();
|
|
17024
17332
|
if (!activeOrg) {
|
|
17025
17333
|
throw new Error(
|
|
@@ -17277,6 +17585,18 @@ async function deleteZeroOrg(slug) {
|
|
|
17277
17585
|
}
|
|
17278
17586
|
handleError(result, "Failed to delete organization");
|
|
17279
17587
|
}
|
|
17588
|
+
async function switchZeroOrg(slug) {
|
|
17589
|
+
const config = await getUserTokenClientConfig();
|
|
17590
|
+
const client = initClient4(cliAuthOrgContract, config);
|
|
17591
|
+
const result = await client.switchOrg({
|
|
17592
|
+
headers: { authorization: `Bearer ${await getToken()}` },
|
|
17593
|
+
body: { slug }
|
|
17594
|
+
});
|
|
17595
|
+
if (result.status === 200) {
|
|
17596
|
+
return result.body;
|
|
17597
|
+
}
|
|
17598
|
+
handleError(result, "Failed to switch organization");
|
|
17599
|
+
}
|
|
17280
17600
|
|
|
17281
17601
|
// src/lib/api/domains/zero-secrets.ts
|
|
17282
17602
|
import { initClient as initClient5 } from "@ts-rest/core";
|
|
@@ -17914,6 +18234,7 @@ async function promptPassword(message) {
|
|
|
17914
18234
|
|
|
17915
18235
|
export {
|
|
17916
18236
|
configureGlobalProxyFromEnv,
|
|
18237
|
+
decodeCliTokenPayload,
|
|
17917
18238
|
decodeZeroTokenPayload,
|
|
17918
18239
|
loadConfig,
|
|
17919
18240
|
saveConfig,
|
|
@@ -17988,6 +18309,7 @@ export {
|
|
|
17988
18309
|
removeZeroOrgMember,
|
|
17989
18310
|
leaveZeroOrg,
|
|
17990
18311
|
deleteZeroOrg,
|
|
18312
|
+
switchZeroOrg,
|
|
17991
18313
|
listZeroSecrets,
|
|
17992
18314
|
setZeroSecret,
|
|
17993
18315
|
deleteZeroSecret,
|
|
@@ -18032,4 +18354,4 @@ export {
|
|
|
18032
18354
|
promptSelect,
|
|
18033
18355
|
promptPassword
|
|
18034
18356
|
};
|
|
18035
|
-
//# sourceMappingURL=chunk-
|
|
18357
|
+
//# sourceMappingURL=chunk-Z7ZCVASY.js.map
|