@vm0/cli 9.84.1 → 9.84.2
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-A5NPNEP5.js → chunk-UTY3UDKG.js} +167 -151
- package/{chunk-A5NPNEP5.js.map → chunk-UTY3UDKG.js.map} +1 -1
- package/index.js +10 -10
- package/package.json +1 -1
- package/zero.js +12 -4
- package/zero.js.map +1 -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.84.
|
|
50
|
+
release: "9.84.2",
|
|
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.84.
|
|
69
|
+
version: "9.84.2",
|
|
70
70
|
command: process.argv.slice(2).join(" ")
|
|
71
71
|
});
|
|
72
72
|
Sentry.setContext("runtime", {
|
|
@@ -11415,54 +11415,170 @@ var updateModelRequestSchema = z16.object({
|
|
|
11415
11415
|
});
|
|
11416
11416
|
|
|
11417
11417
|
// ../../packages/core/src/contracts/sessions.ts
|
|
11418
|
+
import { z as z18 } from "zod";
|
|
11419
|
+
|
|
11420
|
+
// ../../packages/core/src/contracts/chat-threads.ts
|
|
11418
11421
|
import { z as z17 } from "zod";
|
|
11419
11422
|
var c10 = initContract();
|
|
11423
|
+
var chatThreadListItemSchema = z17.object({
|
|
11424
|
+
id: z17.string(),
|
|
11425
|
+
title: z17.string().nullable(),
|
|
11426
|
+
preview: z17.string().nullable(),
|
|
11427
|
+
agentId: z17.string(),
|
|
11428
|
+
createdAt: z17.string(),
|
|
11429
|
+
updatedAt: z17.string()
|
|
11430
|
+
});
|
|
11431
|
+
var toolSummaryEntrySchema = z17.object({
|
|
11432
|
+
kind: z17.literal("tool"),
|
|
11433
|
+
name: z17.string(),
|
|
11434
|
+
input: z17.record(z17.string(), z17.unknown()).optional()
|
|
11435
|
+
});
|
|
11436
|
+
var textSummaryEntrySchema = z17.object({
|
|
11437
|
+
kind: z17.literal("text"),
|
|
11438
|
+
text: z17.string()
|
|
11439
|
+
});
|
|
11440
|
+
var summaryEntrySchema = z17.union([
|
|
11441
|
+
z17.string(),
|
|
11442
|
+
toolSummaryEntrySchema,
|
|
11443
|
+
textSummaryEntrySchema
|
|
11444
|
+
]);
|
|
11420
11445
|
var storedChatMessageSchema = z17.object({
|
|
11421
11446
|
role: z17.enum(["user", "assistant"]),
|
|
11422
11447
|
content: z17.string(),
|
|
11423
11448
|
runId: z17.string().optional(),
|
|
11424
|
-
|
|
11449
|
+
error: z17.string().optional(),
|
|
11450
|
+
summaries: z17.array(summaryEntrySchema).optional(),
|
|
11425
11451
|
createdAt: z17.string()
|
|
11426
11452
|
});
|
|
11427
|
-
var
|
|
11453
|
+
var unsavedRunSchema = z17.object({
|
|
11454
|
+
runId: z17.string(),
|
|
11455
|
+
status: z17.string(),
|
|
11456
|
+
prompt: z17.string(),
|
|
11457
|
+
error: z17.string().nullable()
|
|
11458
|
+
});
|
|
11459
|
+
var chatThreadDetailSchema = z17.object({
|
|
11428
11460
|
id: z17.string(),
|
|
11429
|
-
|
|
11430
|
-
|
|
11431
|
-
|
|
11432
|
-
|
|
11433
|
-
|
|
11461
|
+
title: z17.string().nullable(),
|
|
11462
|
+
agentId: z17.string(),
|
|
11463
|
+
chatMessages: z17.array(storedChatMessageSchema),
|
|
11464
|
+
latestSessionId: z17.string().nullable(),
|
|
11465
|
+
unsavedRuns: z17.array(unsavedRunSchema),
|
|
11434
11466
|
createdAt: z17.string(),
|
|
11435
11467
|
updatedAt: z17.string()
|
|
11436
11468
|
});
|
|
11437
|
-
var
|
|
11438
|
-
|
|
11439
|
-
|
|
11440
|
-
|
|
11441
|
-
|
|
11442
|
-
|
|
11469
|
+
var chatThreadsContract = c10.router({
|
|
11470
|
+
create: {
|
|
11471
|
+
method: "POST",
|
|
11472
|
+
path: "/api/zero/chat-threads",
|
|
11473
|
+
headers: authHeadersSchema,
|
|
11474
|
+
body: z17.object({
|
|
11475
|
+
agentId: z17.string().min(1),
|
|
11476
|
+
title: z17.string().optional()
|
|
11477
|
+
}),
|
|
11478
|
+
responses: {
|
|
11479
|
+
201: z17.object({
|
|
11480
|
+
id: z17.string(),
|
|
11481
|
+
title: z17.string().nullable(),
|
|
11482
|
+
createdAt: z17.string()
|
|
11483
|
+
}),
|
|
11484
|
+
401: apiErrorSchema
|
|
11485
|
+
},
|
|
11486
|
+
summary: "Create a new chat thread"
|
|
11487
|
+
},
|
|
11488
|
+
list: {
|
|
11489
|
+
method: "GET",
|
|
11490
|
+
path: "/api/zero/chat-threads",
|
|
11491
|
+
headers: authHeadersSchema,
|
|
11492
|
+
query: z17.object({
|
|
11493
|
+
agentId: z17.string().min(1, "agentId is required")
|
|
11494
|
+
}),
|
|
11495
|
+
responses: {
|
|
11496
|
+
200: z17.object({ threads: z17.array(chatThreadListItemSchema) }),
|
|
11497
|
+
401: apiErrorSchema
|
|
11498
|
+
},
|
|
11499
|
+
summary: "List chat threads for an agent"
|
|
11500
|
+
}
|
|
11443
11501
|
});
|
|
11444
|
-
var
|
|
11445
|
-
|
|
11446
|
-
|
|
11447
|
-
|
|
11502
|
+
var chatThreadByIdContract = c10.router({
|
|
11503
|
+
get: {
|
|
11504
|
+
method: "GET",
|
|
11505
|
+
path: "/api/zero/chat-threads/:id",
|
|
11506
|
+
headers: authHeadersSchema,
|
|
11507
|
+
pathParams: z17.object({ id: z17.string() }),
|
|
11508
|
+
responses: {
|
|
11509
|
+
200: chatThreadDetailSchema,
|
|
11510
|
+
401: apiErrorSchema,
|
|
11511
|
+
404: apiErrorSchema
|
|
11512
|
+
},
|
|
11513
|
+
summary: "Get chat thread detail with messages"
|
|
11514
|
+
}
|
|
11448
11515
|
});
|
|
11449
|
-
var
|
|
11450
|
-
|
|
11451
|
-
|
|
11516
|
+
var chatThreadRunsContract = c10.router({
|
|
11517
|
+
addRun: {
|
|
11518
|
+
method: "POST",
|
|
11519
|
+
path: "/api/zero/chat-threads/:id/runs",
|
|
11520
|
+
headers: authHeadersSchema,
|
|
11521
|
+
pathParams: z17.object({ id: z17.string() }),
|
|
11522
|
+
body: z17.object({
|
|
11523
|
+
runId: z17.string().min(1)
|
|
11524
|
+
}),
|
|
11525
|
+
responses: {
|
|
11526
|
+
204: c10.noBody(),
|
|
11527
|
+
401: apiErrorSchema,
|
|
11528
|
+
404: apiErrorSchema
|
|
11529
|
+
},
|
|
11530
|
+
summary: "Associate a run to a chat thread"
|
|
11531
|
+
}
|
|
11452
11532
|
});
|
|
11453
|
-
|
|
11454
|
-
|
|
11533
|
+
|
|
11534
|
+
// ../../packages/core/src/contracts/sessions.ts
|
|
11535
|
+
var c11 = initContract();
|
|
11536
|
+
var storedChatMessageSchema2 = z18.object({
|
|
11537
|
+
role: z18.enum(["user", "assistant"]),
|
|
11538
|
+
content: z18.string(),
|
|
11539
|
+
runId: z18.string().optional(),
|
|
11540
|
+
summaries: z18.array(summaryEntrySchema).optional(),
|
|
11541
|
+
createdAt: z18.string()
|
|
11455
11542
|
});
|
|
11456
|
-
var
|
|
11457
|
-
id:
|
|
11458
|
-
|
|
11459
|
-
conversationId:
|
|
11543
|
+
var sessionResponseSchema = z18.object({
|
|
11544
|
+
id: z18.string(),
|
|
11545
|
+
agentComposeId: z18.string(),
|
|
11546
|
+
conversationId: z18.string().nullable(),
|
|
11547
|
+
artifactName: z18.string().nullable(),
|
|
11548
|
+
secretNames: z18.array(z18.string()).nullable(),
|
|
11549
|
+
chatMessages: z18.array(storedChatMessageSchema2).optional(),
|
|
11550
|
+
createdAt: z18.string(),
|
|
11551
|
+
updatedAt: z18.string()
|
|
11552
|
+
});
|
|
11553
|
+
var sessionListItemSchema = z18.object({
|
|
11554
|
+
id: z18.string(),
|
|
11555
|
+
createdAt: z18.string(),
|
|
11556
|
+
updatedAt: z18.string(),
|
|
11557
|
+
messageCount: z18.number(),
|
|
11558
|
+
preview: z18.string().nullable()
|
|
11559
|
+
});
|
|
11560
|
+
var agentComposeSnapshotSchema = z18.object({
|
|
11561
|
+
agentComposeVersionId: z18.string(),
|
|
11562
|
+
vars: z18.record(z18.string(), z18.string()).optional(),
|
|
11563
|
+
secretNames: z18.array(z18.string()).optional()
|
|
11564
|
+
});
|
|
11565
|
+
var artifactSnapshotSchema2 = z18.object({
|
|
11566
|
+
artifactName: z18.string(),
|
|
11567
|
+
artifactVersion: z18.string()
|
|
11568
|
+
});
|
|
11569
|
+
var volumeVersionsSnapshotSchema2 = z18.object({
|
|
11570
|
+
versions: z18.record(z18.string(), z18.string())
|
|
11571
|
+
});
|
|
11572
|
+
var checkpointResponseSchema = z18.object({
|
|
11573
|
+
id: z18.string(),
|
|
11574
|
+
runId: z18.string(),
|
|
11575
|
+
conversationId: z18.string(),
|
|
11460
11576
|
agentComposeSnapshot: agentComposeSnapshotSchema,
|
|
11461
11577
|
artifactSnapshot: artifactSnapshotSchema2.nullable(),
|
|
11462
11578
|
volumeVersionsSnapshot: volumeVersionsSnapshotSchema2.nullable(),
|
|
11463
|
-
createdAt:
|
|
11579
|
+
createdAt: z18.string()
|
|
11464
11580
|
});
|
|
11465
|
-
var sessionsContract =
|
|
11581
|
+
var sessionsContract = c11.router({
|
|
11466
11582
|
/**
|
|
11467
11583
|
* GET /api/agent/sessions?agentComposeId=X
|
|
11468
11584
|
* List chat sessions for an agent
|
|
@@ -11471,17 +11587,17 @@ var sessionsContract = c10.router({
|
|
|
11471
11587
|
method: "GET",
|
|
11472
11588
|
path: "/api/agent/sessions",
|
|
11473
11589
|
headers: authHeadersSchema,
|
|
11474
|
-
query:
|
|
11475
|
-
agentComposeId:
|
|
11590
|
+
query: z18.object({
|
|
11591
|
+
agentComposeId: z18.string().min(1, "agentComposeId is required")
|
|
11476
11592
|
}),
|
|
11477
11593
|
responses: {
|
|
11478
|
-
200:
|
|
11594
|
+
200: z18.object({ sessions: z18.array(sessionListItemSchema) }),
|
|
11479
11595
|
401: apiErrorSchema
|
|
11480
11596
|
},
|
|
11481
11597
|
summary: "List chat sessions for an agent"
|
|
11482
11598
|
}
|
|
11483
11599
|
});
|
|
11484
|
-
var sessionsByIdContract =
|
|
11600
|
+
var sessionsByIdContract = c11.router({
|
|
11485
11601
|
/**
|
|
11486
11602
|
* GET /api/agent/sessions/:id
|
|
11487
11603
|
* Get session by ID
|
|
@@ -11490,8 +11606,8 @@ var sessionsByIdContract = c10.router({
|
|
|
11490
11606
|
method: "GET",
|
|
11491
11607
|
path: "/api/agent/sessions/:id",
|
|
11492
11608
|
headers: authHeadersSchema,
|
|
11493
|
-
pathParams:
|
|
11494
|
-
id:
|
|
11609
|
+
pathParams: z18.object({
|
|
11610
|
+
id: z18.string().min(1, "Session ID is required")
|
|
11495
11611
|
}),
|
|
11496
11612
|
responses: {
|
|
11497
11613
|
200: sessionResponseSchema,
|
|
@@ -11502,7 +11618,7 @@ var sessionsByIdContract = c10.router({
|
|
|
11502
11618
|
summary: "Get session by ID"
|
|
11503
11619
|
}
|
|
11504
11620
|
});
|
|
11505
|
-
var sessionMessagesContract =
|
|
11621
|
+
var sessionMessagesContract = c11.router({
|
|
11506
11622
|
/**
|
|
11507
11623
|
* POST /api/agent/sessions/:id/messages
|
|
11508
11624
|
* Append chat messages to a session
|
|
@@ -11511,20 +11627,20 @@ var sessionMessagesContract = c10.router({
|
|
|
11511
11627
|
method: "POST",
|
|
11512
11628
|
path: "/api/agent/sessions/:id/messages",
|
|
11513
11629
|
headers: authHeadersSchema,
|
|
11514
|
-
pathParams:
|
|
11515
|
-
id:
|
|
11630
|
+
pathParams: z18.object({
|
|
11631
|
+
id: z18.string().min(1, "Session ID is required")
|
|
11516
11632
|
}),
|
|
11517
|
-
body:
|
|
11518
|
-
messages:
|
|
11519
|
-
|
|
11520
|
-
role:
|
|
11521
|
-
content:
|
|
11522
|
-
runId:
|
|
11633
|
+
body: z18.object({
|
|
11634
|
+
messages: z18.array(
|
|
11635
|
+
z18.object({
|
|
11636
|
+
role: z18.enum(["user", "assistant"]),
|
|
11637
|
+
content: z18.string(),
|
|
11638
|
+
runId: z18.string().optional()
|
|
11523
11639
|
})
|
|
11524
11640
|
)
|
|
11525
11641
|
}),
|
|
11526
11642
|
responses: {
|
|
11527
|
-
200:
|
|
11643
|
+
200: z18.object({ success: z18.literal(true) }),
|
|
11528
11644
|
401: apiErrorSchema,
|
|
11529
11645
|
403: apiErrorSchema,
|
|
11530
11646
|
404: apiErrorSchema
|
|
@@ -11532,7 +11648,7 @@ var sessionMessagesContract = c10.router({
|
|
|
11532
11648
|
summary: "Append chat messages to a session"
|
|
11533
11649
|
}
|
|
11534
11650
|
});
|
|
11535
|
-
var checkpointsByIdContract =
|
|
11651
|
+
var checkpointsByIdContract = c11.router({
|
|
11536
11652
|
/**
|
|
11537
11653
|
* GET /api/agent/checkpoints/:id
|
|
11538
11654
|
* Get checkpoint by ID
|
|
@@ -11541,8 +11657,8 @@ var checkpointsByIdContract = c10.router({
|
|
|
11541
11657
|
method: "GET",
|
|
11542
11658
|
path: "/api/agent/checkpoints/:id",
|
|
11543
11659
|
headers: authHeadersSchema,
|
|
11544
|
-
pathParams:
|
|
11545
|
-
id:
|
|
11660
|
+
pathParams: z18.object({
|
|
11661
|
+
id: z18.string().min(1, "Checkpoint ID is required")
|
|
11546
11662
|
}),
|
|
11547
11663
|
responses: {
|
|
11548
11664
|
200: checkpointResponseSchema,
|
|
@@ -11554,106 +11670,6 @@ var checkpointsByIdContract = c10.router({
|
|
|
11554
11670
|
}
|
|
11555
11671
|
});
|
|
11556
11672
|
|
|
11557
|
-
// ../../packages/core/src/contracts/chat-threads.ts
|
|
11558
|
-
import { z as z18 } from "zod";
|
|
11559
|
-
var c11 = initContract();
|
|
11560
|
-
var chatThreadListItemSchema = z18.object({
|
|
11561
|
-
id: z18.string(),
|
|
11562
|
-
title: z18.string().nullable(),
|
|
11563
|
-
preview: z18.string().nullable(),
|
|
11564
|
-
agentId: z18.string(),
|
|
11565
|
-
createdAt: z18.string(),
|
|
11566
|
-
updatedAt: z18.string()
|
|
11567
|
-
});
|
|
11568
|
-
var storedChatMessageSchema2 = z18.object({
|
|
11569
|
-
role: z18.enum(["user", "assistant"]),
|
|
11570
|
-
content: z18.string(),
|
|
11571
|
-
runId: z18.string().optional(),
|
|
11572
|
-
error: z18.string().optional(),
|
|
11573
|
-
summaries: z18.array(z18.string()).optional(),
|
|
11574
|
-
createdAt: z18.string()
|
|
11575
|
-
});
|
|
11576
|
-
var unsavedRunSchema = z18.object({
|
|
11577
|
-
runId: z18.string(),
|
|
11578
|
-
status: z18.string(),
|
|
11579
|
-
prompt: z18.string(),
|
|
11580
|
-
error: z18.string().nullable()
|
|
11581
|
-
});
|
|
11582
|
-
var chatThreadDetailSchema = z18.object({
|
|
11583
|
-
id: z18.string(),
|
|
11584
|
-
title: z18.string().nullable(),
|
|
11585
|
-
agentId: z18.string(),
|
|
11586
|
-
chatMessages: z18.array(storedChatMessageSchema2),
|
|
11587
|
-
latestSessionId: z18.string().nullable(),
|
|
11588
|
-
unsavedRuns: z18.array(unsavedRunSchema),
|
|
11589
|
-
createdAt: z18.string(),
|
|
11590
|
-
updatedAt: z18.string()
|
|
11591
|
-
});
|
|
11592
|
-
var chatThreadsContract = c11.router({
|
|
11593
|
-
create: {
|
|
11594
|
-
method: "POST",
|
|
11595
|
-
path: "/api/zero/chat-threads",
|
|
11596
|
-
headers: authHeadersSchema,
|
|
11597
|
-
body: z18.object({
|
|
11598
|
-
agentId: z18.string().min(1),
|
|
11599
|
-
title: z18.string().optional()
|
|
11600
|
-
}),
|
|
11601
|
-
responses: {
|
|
11602
|
-
201: z18.object({
|
|
11603
|
-
id: z18.string(),
|
|
11604
|
-
title: z18.string().nullable(),
|
|
11605
|
-
createdAt: z18.string()
|
|
11606
|
-
}),
|
|
11607
|
-
401: apiErrorSchema
|
|
11608
|
-
},
|
|
11609
|
-
summary: "Create a new chat thread"
|
|
11610
|
-
},
|
|
11611
|
-
list: {
|
|
11612
|
-
method: "GET",
|
|
11613
|
-
path: "/api/zero/chat-threads",
|
|
11614
|
-
headers: authHeadersSchema,
|
|
11615
|
-
query: z18.object({
|
|
11616
|
-
agentId: z18.string().min(1, "agentId is required")
|
|
11617
|
-
}),
|
|
11618
|
-
responses: {
|
|
11619
|
-
200: z18.object({ threads: z18.array(chatThreadListItemSchema) }),
|
|
11620
|
-
401: apiErrorSchema
|
|
11621
|
-
},
|
|
11622
|
-
summary: "List chat threads for an agent"
|
|
11623
|
-
}
|
|
11624
|
-
});
|
|
11625
|
-
var chatThreadByIdContract = c11.router({
|
|
11626
|
-
get: {
|
|
11627
|
-
method: "GET",
|
|
11628
|
-
path: "/api/zero/chat-threads/:id",
|
|
11629
|
-
headers: authHeadersSchema,
|
|
11630
|
-
pathParams: z18.object({ id: z18.string() }),
|
|
11631
|
-
responses: {
|
|
11632
|
-
200: chatThreadDetailSchema,
|
|
11633
|
-
401: apiErrorSchema,
|
|
11634
|
-
404: apiErrorSchema
|
|
11635
|
-
},
|
|
11636
|
-
summary: "Get chat thread detail with messages"
|
|
11637
|
-
}
|
|
11638
|
-
});
|
|
11639
|
-
var chatThreadRunsContract = c11.router({
|
|
11640
|
-
addRun: {
|
|
11641
|
-
method: "POST",
|
|
11642
|
-
path: "/api/zero/chat-threads/:id/runs",
|
|
11643
|
-
headers: authHeadersSchema,
|
|
11644
|
-
pathParams: z18.object({ id: z18.string() }),
|
|
11645
|
-
body: z18.object({
|
|
11646
|
-
runId: z18.string().min(1)
|
|
11647
|
-
}),
|
|
11648
|
-
responses: {
|
|
11649
|
-
204: c11.noBody(),
|
|
11650
|
-
401: apiErrorSchema,
|
|
11651
|
-
404: apiErrorSchema
|
|
11652
|
-
},
|
|
11653
|
-
summary: "Associate a run to a chat thread"
|
|
11654
|
-
}
|
|
11655
|
-
});
|
|
11656
|
-
|
|
11657
11673
|
// ../../packages/core/src/contracts/runners.ts
|
|
11658
11674
|
import { z as z19 } from "zod";
|
|
11659
11675
|
var c12 = initContract();
|
|
@@ -16289,7 +16305,7 @@ var zeroSessionResponseSchema = z34.object({
|
|
|
16289
16305
|
conversationId: z34.string().nullable(),
|
|
16290
16306
|
artifactName: z34.string().nullable(),
|
|
16291
16307
|
secretNames: z34.array(z34.string()).nullable(),
|
|
16292
|
-
chatMessages: z34.array(
|
|
16308
|
+
chatMessages: z34.array(storedChatMessageSchema2).optional(),
|
|
16293
16309
|
createdAt: z34.string(),
|
|
16294
16310
|
updatedAt: z34.string()
|
|
16295
16311
|
});
|
|
@@ -18175,4 +18191,4 @@ export {
|
|
|
18175
18191
|
promptSelect,
|
|
18176
18192
|
promptPassword
|
|
18177
18193
|
};
|
|
18178
|
-
//# sourceMappingURL=chunk-
|
|
18194
|
+
//# sourceMappingURL=chunk-UTY3UDKG.js.map
|