@vm0/cli 9.142.1 → 9.144.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-MB6EHK2G.js → chunk-75VR4R5J.js} +157 -32
- package/{chunk-MB6EHK2G.js.map → chunk-75VR4R5J.js.map} +1 -1
- package/index.js +11 -11
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/zero.js +219 -69
- package/zero.js.map +1 -1
|
@@ -74083,7 +74083,7 @@ if (DSN) {
|
|
|
74083
74083
|
init2({
|
|
74084
74084
|
dsn: DSN,
|
|
74085
74085
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
74086
|
-
release: "9.
|
|
74086
|
+
release: "9.144.0",
|
|
74087
74087
|
sendDefaultPii: false,
|
|
74088
74088
|
tracesSampleRate: 0,
|
|
74089
74089
|
shutdownTimeout: 500,
|
|
@@ -74102,7 +74102,7 @@ if (DSN) {
|
|
|
74102
74102
|
}
|
|
74103
74103
|
});
|
|
74104
74104
|
setContext("cli", {
|
|
74105
|
-
version: "9.
|
|
74105
|
+
version: "9.144.0",
|
|
74106
74106
|
command: process.argv.slice(2).join(" ")
|
|
74107
74107
|
});
|
|
74108
74108
|
setContext("runtime", {
|
|
@@ -97355,10 +97355,10 @@ var openai = {
|
|
|
97355
97355
|
}
|
|
97356
97356
|
};
|
|
97357
97357
|
|
|
97358
|
-
// ../../packages/connectors/src/connectors/
|
|
97358
|
+
// ../../packages/connectors/src/connectors/codex-oauth.ts
|
|
97359
97359
|
init_esm_shims();
|
|
97360
|
-
var
|
|
97361
|
-
"
|
|
97360
|
+
var codexOauth = {
|
|
97361
|
+
"codex-oauth": {
|
|
97362
97362
|
label: "ChatGPT (OAuth)",
|
|
97363
97363
|
category: "ai-general-models",
|
|
97364
97364
|
environmentMapping: {
|
|
@@ -100266,7 +100266,7 @@ var CONNECTOR_TYPES_DEF = {
|
|
|
100266
100266
|
...stripe,
|
|
100267
100267
|
...onyx,
|
|
100268
100268
|
...openai,
|
|
100269
|
-
...
|
|
100269
|
+
...codexOauth,
|
|
100270
100270
|
...similarweb,
|
|
100271
100271
|
...perplexity,
|
|
100272
100272
|
...pipedrive,
|
|
@@ -100716,8 +100716,7 @@ var logsListContract = c7.router({
|
|
|
100716
100716
|
headers: authHeadersSchema,
|
|
100717
100717
|
query: listQuerySchema.extend({
|
|
100718
100718
|
search: external_exports.string().optional(),
|
|
100719
|
-
|
|
100720
|
-
// canonical Zero agent ID
|
|
100719
|
+
agentId: external_exports.string().uuid().optional(),
|
|
100721
100720
|
name: external_exports.string().optional(),
|
|
100722
100721
|
since: external_exports.coerce.number().optional(),
|
|
100723
100722
|
status: logStatusSchema.optional(),
|
|
@@ -101351,8 +101350,7 @@ var logsSearchContract = c9.router({
|
|
|
101351
101350
|
headers: authHeadersSchema,
|
|
101352
101351
|
query: external_exports.object({
|
|
101353
101352
|
keyword: external_exports.string().min(1),
|
|
101354
|
-
|
|
101355
|
-
// canonical Zero agent ID
|
|
101353
|
+
agentId: external_exports.string().uuid().optional(),
|
|
101356
101354
|
runId: external_exports.string().optional(),
|
|
101357
101355
|
since: external_exports.coerce.number().optional(),
|
|
101358
101356
|
limit: external_exports.coerce.number().min(1).max(50).default(20),
|
|
@@ -101726,7 +101724,7 @@ var webhookCompleteContract = c11.router({
|
|
|
101726
101724
|
var webhookCheckpointsContract = c11.router({
|
|
101727
101725
|
/**
|
|
101728
101726
|
* POST /api/webhooks/agent/checkpoints
|
|
101729
|
-
* Create checkpoint for
|
|
101727
|
+
* Create a recoverable checkpoint for an agent run.
|
|
101730
101728
|
*/
|
|
101731
101729
|
create: {
|
|
101732
101730
|
method: "POST",
|
|
@@ -102233,8 +102231,7 @@ var zeroLogsSearchContract = c12.router({
|
|
|
102233
102231
|
headers: authHeadersSchema,
|
|
102234
102232
|
query: external_exports.object({
|
|
102235
102233
|
keyword: external_exports.string().min(1),
|
|
102236
|
-
|
|
102237
|
-
// canonical Zero agent ID
|
|
102234
|
+
agentId: external_exports.string().uuid().optional(),
|
|
102238
102235
|
runId: external_exports.string().optional(),
|
|
102239
102236
|
since: external_exports.coerce.number().optional(),
|
|
102240
102237
|
limit: external_exports.coerce.number().min(1).max(50).default(20),
|
|
@@ -102535,14 +102532,33 @@ var MODEL_PROVIDER_TYPES = {
|
|
|
102535
102532
|
],
|
|
102536
102533
|
defaultModel: "gpt-5.5"
|
|
102537
102534
|
},
|
|
102538
|
-
"
|
|
102535
|
+
"codex-oauth-token": {
|
|
102539
102536
|
framework: "codex",
|
|
102540
|
-
label: "ChatGPT (
|
|
102541
|
-
helpText: "
|
|
102537
|
+
label: "ChatGPT (Codex)",
|
|
102538
|
+
helpText: "Run `codex login` on your machine, then paste the resulting ~/.codex/auth.json contents to authorize ChatGPT (Plus / Pro / Business / Edu / Enterprise) for Codex.",
|
|
102542
102539
|
authMethods: {
|
|
102543
|
-
|
|
102544
|
-
|
|
102540
|
+
// Paste-based auth: client posts CODEX_AUTH_JSON, server parses it via
|
|
102541
|
+
// codex-auth-json-parser.ts and persists the four derived CHATGPT_*
|
|
102542
|
+
// fields. The raw blob is NEVER stored. The wire-shape secret
|
|
102543
|
+
// (CODEX_AUTH_JSON) is declared optional+serverOnly so the contract
|
|
102544
|
+
// accepts it on POST without persisting; the four CHATGPT_* fields are
|
|
102545
|
+
// the canonical stored secrets and the firewall layer reads from those.
|
|
102546
|
+
auth_json: {
|
|
102547
|
+
label: "Codex auth.json",
|
|
102548
|
+
helpText: "Run `codex login` locally, then paste the contents of ~/.codex/auth.json below.",
|
|
102545
102549
|
secrets: {
|
|
102550
|
+
CODEX_AUTH_JSON: {
|
|
102551
|
+
label: "auth.json contents",
|
|
102552
|
+
required: false,
|
|
102553
|
+
serverOnly: true,
|
|
102554
|
+
placeholder: '{"OPENAI_API_KEY":null,"tokens":{...}}',
|
|
102555
|
+
helpText: "Paste the entire contents of ~/.codex/auth.json"
|
|
102556
|
+
},
|
|
102557
|
+
// CHATGPT_ACCESS_TOKEN and CHATGPT_ACCOUNT_ID reach the sandbox env
|
|
102558
|
+
// as placeholder values (substituted by the firewall token-replacement
|
|
102559
|
+
// layer at egress) — keeping them non-serverOnly preserves the
|
|
102560
|
+
// placeholder injection path. CHATGPT_REFRESH_TOKEN and
|
|
102561
|
+
// CHATGPT_ID_TOKEN stay serverOnly per the #7365 invariant.
|
|
102546
102562
|
CHATGPT_ACCESS_TOKEN: {
|
|
102547
102563
|
label: "CHATGPT_ACCESS_TOKEN",
|
|
102548
102564
|
required: true
|
|
@@ -102564,7 +102580,7 @@ var MODEL_PROVIDER_TYPES = {
|
|
|
102564
102580
|
}
|
|
102565
102581
|
}
|
|
102566
102582
|
},
|
|
102567
|
-
defaultAuthMethod: "
|
|
102583
|
+
defaultAuthMethod: "auth_json",
|
|
102568
102584
|
environmentMapping: {
|
|
102569
102585
|
CHATGPT_ACCESS_TOKEN: "$secrets.CHATGPT_ACCESS_TOKEN",
|
|
102570
102586
|
CHATGPT_ACCOUNT_ID: "$secrets.CHATGPT_ACCOUNT_ID",
|
|
@@ -102699,7 +102715,7 @@ function getSelectableProviderTypes() {
|
|
|
102699
102715
|
}
|
|
102700
102716
|
var ANTHROPIC_API_BASE = "https://api.anthropic.com";
|
|
102701
102717
|
function getFirewallBaseUrl(type) {
|
|
102702
|
-
if (type === "
|
|
102718
|
+
if (type === "codex-oauth-token") {
|
|
102703
102719
|
return "https://chatgpt.com/backend-api/codex";
|
|
102704
102720
|
}
|
|
102705
102721
|
if (getFrameworkForType(type) === "codex") {
|
|
@@ -102808,8 +102824,8 @@ var MODEL_PROVIDER_FIREWALL_CONFIGS = {
|
|
|
102808
102824
|
// here only needs to be a stable, non-empty string the firewall can match
|
|
102809
102825
|
// and substitute. Account-id placeholder still equals #11877's literal
|
|
102810
102826
|
// since the architectural relationship across the two surfaces matters.
|
|
102811
|
-
"
|
|
102812
|
-
name: "model-provider:
|
|
102827
|
+
"codex-oauth-token": {
|
|
102828
|
+
name: "model-provider:codex-oauth-token",
|
|
102813
102829
|
apis: [
|
|
102814
102830
|
{
|
|
102815
102831
|
base: "https://chatgpt.com/backend-api/codex",
|
|
@@ -102847,7 +102863,7 @@ var modelProviderTypeSchema = external_exports.enum([
|
|
|
102847
102863
|
"zai-api-key",
|
|
102848
102864
|
"vercel-ai-gateway",
|
|
102849
102865
|
"openai-api-key",
|
|
102850
|
-
"
|
|
102866
|
+
"codex-oauth-token",
|
|
102851
102867
|
"azure-foundry",
|
|
102852
102868
|
"aws-bedrock",
|
|
102853
102869
|
"vm0"
|
|
@@ -102916,9 +102932,9 @@ var modelProviderResponseSchema = external_exports.object({
|
|
|
102916
102932
|
selectedModel: external_exports.string().nullable(),
|
|
102917
102933
|
createdAt: external_exports.string(),
|
|
102918
102934
|
updatedAt: external_exports.string(),
|
|
102919
|
-
// ChatGPT-only metadata populated by the
|
|
102935
|
+
// ChatGPT-only metadata populated by the codex-oauth-token callback.
|
|
102920
102936
|
// Other provider types omit these. Mirrors the server-side connector
|
|
102921
|
-
// shape in apps/web/src/lib/zero/connector/providers/
|
|
102937
|
+
// shape in apps/web/src/lib/zero/connector/providers/codex-oauth.ts.
|
|
102922
102938
|
// The corresponding server route lands in #11909; declared here so the
|
|
102923
102939
|
// platform UI does not have to bypass schema validation to read them.
|
|
102924
102940
|
workspaceName: external_exports.string().nullable().optional(),
|
|
@@ -102990,6 +103006,21 @@ var persistedAttachmentSchema = external_exports.object({
|
|
|
102990
103006
|
contentType: external_exports.string(),
|
|
102991
103007
|
size: external_exports.number()
|
|
102992
103008
|
});
|
|
103009
|
+
var pendingMessageSchema = external_exports.object({
|
|
103010
|
+
content: external_exports.string().nullable(),
|
|
103011
|
+
attachments: external_exports.array(persistedAttachmentSchema).nullable(),
|
|
103012
|
+
createdAt: external_exports.string(),
|
|
103013
|
+
updatedAt: external_exports.string()
|
|
103014
|
+
});
|
|
103015
|
+
var appendPendingMessageBodySchema = external_exports.object({
|
|
103016
|
+
content: external_exports.string().min(1).optional(),
|
|
103017
|
+
attachments: external_exports.array(persistedAttachmentSchema).min(1).optional()
|
|
103018
|
+
}).refine(
|
|
103019
|
+
(body) => {
|
|
103020
|
+
return body.content !== void 0 || body.attachments !== void 0;
|
|
103021
|
+
},
|
|
103022
|
+
{ message: "content or attachments is required" }
|
|
103023
|
+
);
|
|
102993
103024
|
var chatThreadListItemSchema = external_exports.object({
|
|
102994
103025
|
id: external_exports.string(),
|
|
102995
103026
|
title: external_exports.string().nullable(),
|
|
@@ -103089,6 +103120,7 @@ var chatThreadDetailSchema = external_exports.object({
|
|
|
103089
103120
|
updatedAt: external_exports.string(),
|
|
103090
103121
|
draftContent: external_exports.string().nullable().optional(),
|
|
103091
103122
|
draftAttachments: external_exports.array(persistedAttachmentSchema).nullable().optional(),
|
|
103123
|
+
pendingMessage: pendingMessageSchema.nullable().optional(),
|
|
103092
103124
|
/**
|
|
103093
103125
|
* Per-thread model override. Both fields set together or both null.
|
|
103094
103126
|
* When set, the send route uses this combination (overriding the agent
|
|
@@ -103249,6 +103281,56 @@ var chatThreadRenameContract = c13.router({
|
|
|
103249
103281
|
summary: "Rename a chat thread (suppresses automated title generation)"
|
|
103250
103282
|
}
|
|
103251
103283
|
});
|
|
103284
|
+
var chatThreadPendingMessageAppendContract = c13.router({
|
|
103285
|
+
append: {
|
|
103286
|
+
method: "POST",
|
|
103287
|
+
path: "/api/zero/chat-threads/:id/pending-message/append",
|
|
103288
|
+
headers: authHeadersSchema,
|
|
103289
|
+
pathParams: external_exports.object({ id: external_exports.string() }),
|
|
103290
|
+
body: appendPendingMessageBodySchema,
|
|
103291
|
+
responses: {
|
|
103292
|
+
200: external_exports.object({ pendingMessage: pendingMessageSchema }),
|
|
103293
|
+
400: apiErrorSchema,
|
|
103294
|
+
401: apiErrorSchema,
|
|
103295
|
+
404: apiErrorSchema
|
|
103296
|
+
},
|
|
103297
|
+
summary: "Append submitted content to a chat thread pending message"
|
|
103298
|
+
}
|
|
103299
|
+
});
|
|
103300
|
+
var chatThreadPendingMessageDeleteContract = c13.router({
|
|
103301
|
+
delete: {
|
|
103302
|
+
method: "DELETE",
|
|
103303
|
+
path: "/api/zero/chat-threads/:id/pending-message",
|
|
103304
|
+
headers: authHeadersSchema,
|
|
103305
|
+
pathParams: external_exports.object({ id: external_exports.string() }),
|
|
103306
|
+
body: c13.noBody(),
|
|
103307
|
+
responses: {
|
|
103308
|
+
204: c13.noBody(),
|
|
103309
|
+
401: apiErrorSchema,
|
|
103310
|
+
404: apiErrorSchema
|
|
103311
|
+
},
|
|
103312
|
+
summary: "Discard a chat thread pending message"
|
|
103313
|
+
}
|
|
103314
|
+
});
|
|
103315
|
+
var chatThreadPendingMessageRecallContract = c13.router({
|
|
103316
|
+
recall: {
|
|
103317
|
+
method: "POST",
|
|
103318
|
+
path: "/api/zero/chat-threads/:id/pending-message/recall",
|
|
103319
|
+
headers: authHeadersSchema,
|
|
103320
|
+
pathParams: external_exports.object({ id: external_exports.string() }),
|
|
103321
|
+
body: c13.noBody(),
|
|
103322
|
+
responses: {
|
|
103323
|
+
200: external_exports.object({
|
|
103324
|
+
draftContent: external_exports.string().nullable(),
|
|
103325
|
+
draftAttachments: external_exports.array(persistedAttachmentSchema).nullable(),
|
|
103326
|
+
pendingMessage: external_exports.null()
|
|
103327
|
+
}),
|
|
103328
|
+
401: apiErrorSchema,
|
|
103329
|
+
404: apiErrorSchema
|
|
103330
|
+
},
|
|
103331
|
+
summary: "Recall a chat thread pending message back into the draft"
|
|
103332
|
+
}
|
|
103333
|
+
});
|
|
103252
103334
|
var chatMessagesContract = c13.router({
|
|
103253
103335
|
send: {
|
|
103254
103336
|
method: "POST",
|
|
@@ -103326,7 +103408,7 @@ var chatSearchContract = c13.router({
|
|
|
103326
103408
|
headers: authHeadersSchema,
|
|
103327
103409
|
query: external_exports.object({
|
|
103328
103410
|
keyword: external_exports.string().min(1),
|
|
103329
|
-
|
|
103411
|
+
agentId: external_exports.string().uuid().optional(),
|
|
103330
103412
|
since: external_exports.coerce.number().optional(),
|
|
103331
103413
|
limit: external_exports.coerce.number().min(1).max(50).default(20),
|
|
103332
103414
|
before: external_exports.coerce.number().min(0).max(10).default(0),
|
|
@@ -103421,7 +103503,7 @@ async function searchZeroChat(options) {
|
|
|
103421
103503
|
const result = await client.search({
|
|
103422
103504
|
query: {
|
|
103423
103505
|
keyword: options.keyword,
|
|
103424
|
-
|
|
103506
|
+
agentId: options.agentId,
|
|
103425
103507
|
since: options.since,
|
|
103426
103508
|
limit: options.limit,
|
|
103427
103509
|
before: options.before,
|
|
@@ -103504,7 +103586,7 @@ async function searchLogs(options) {
|
|
|
103504
103586
|
const result = await client.searchLogs({
|
|
103505
103587
|
query: {
|
|
103506
103588
|
keyword: options.keyword,
|
|
103507
|
-
|
|
103589
|
+
agentId: options.agentId,
|
|
103508
103590
|
runId: options.runId,
|
|
103509
103591
|
since: options.since,
|
|
103510
103592
|
limit: options.limit,
|
|
@@ -105134,7 +105216,7 @@ async function listZeroLogs(options) {
|
|
|
105134
105216
|
const client = initClient(logsListContract, config4);
|
|
105135
105217
|
const result = await client.list({
|
|
105136
105218
|
query: {
|
|
105137
|
-
|
|
105219
|
+
agentId: options?.agentId,
|
|
105138
105220
|
status: options?.status,
|
|
105139
105221
|
since: options?.since,
|
|
105140
105222
|
limit: options?.limit,
|
|
@@ -105150,7 +105232,7 @@ async function searchZeroLogs(options) {
|
|
|
105150
105232
|
const result = await client.searchLogs({
|
|
105151
105233
|
query: {
|
|
105152
105234
|
keyword: options.keyword,
|
|
105153
|
-
|
|
105235
|
+
agentId: options.agentId,
|
|
105154
105236
|
runId: options.runId,
|
|
105155
105237
|
since: options.since,
|
|
105156
105238
|
limit: options.limit,
|
|
@@ -105506,6 +105588,43 @@ async function generateWebVoice(options) {
|
|
|
105506
105588
|
}
|
|
105507
105589
|
return await response.json();
|
|
105508
105590
|
}
|
|
105591
|
+
async function generateWebImage(options) {
|
|
105592
|
+
const baseUrl = await getBaseUrl();
|
|
105593
|
+
const token = await getActiveToken();
|
|
105594
|
+
if (!token) {
|
|
105595
|
+
throw new ApiRequestError("Not authenticated", "UNAUTHORIZED", 401);
|
|
105596
|
+
}
|
|
105597
|
+
const headers = {
|
|
105598
|
+
Authorization: `Bearer ${token}`,
|
|
105599
|
+
"Content-Type": "application/json"
|
|
105600
|
+
};
|
|
105601
|
+
const bypassSecret = process.env.VERCEL_AUTOMATION_BYPASS_SECRET;
|
|
105602
|
+
if (bypassSecret) {
|
|
105603
|
+
headers["x-vercel-protection-bypass"] = bypassSecret;
|
|
105604
|
+
}
|
|
105605
|
+
const response = await fetch(
|
|
105606
|
+
new URL("/api/zero/image-io/generate", baseUrl),
|
|
105607
|
+
{
|
|
105608
|
+
method: "POST",
|
|
105609
|
+
headers,
|
|
105610
|
+
body: JSON.stringify({
|
|
105611
|
+
prompt: options.prompt,
|
|
105612
|
+
...options.size ? { size: options.size } : {},
|
|
105613
|
+
...options.quality ? { quality: options.quality } : {},
|
|
105614
|
+
...options.background ? { background: options.background } : {},
|
|
105615
|
+
...options.outputFormat ? { outputFormat: options.outputFormat } : {}
|
|
105616
|
+
})
|
|
105617
|
+
}
|
|
105618
|
+
);
|
|
105619
|
+
if (!response.ok) {
|
|
105620
|
+
const { message, code } = await parseErrorBody(
|
|
105621
|
+
response,
|
|
105622
|
+
"Failed to generate image"
|
|
105623
|
+
);
|
|
105624
|
+
throw new ApiRequestError(message, code, response.status);
|
|
105625
|
+
}
|
|
105626
|
+
return await response.json();
|
|
105627
|
+
}
|
|
105509
105628
|
|
|
105510
105629
|
// src/lib/utils/prompt-utils.ts
|
|
105511
105630
|
init_esm_shims();
|
|
@@ -120310,6 +120429,11 @@ var FEATURE_SWITCHES = {
|
|
|
120310
120429
|
description: "Show an icon button in assistant message group actions that scrolls back to the start of that message group.",
|
|
120311
120430
|
enabled: false
|
|
120312
120431
|
},
|
|
120432
|
+
["queueMessage" /* QueueMessage */]: {
|
|
120433
|
+
maintainer: "linghan@vm0.ai",
|
|
120434
|
+
description: "Allow keyboard sends during an active chat thread run to append the draft to that thread's pending message queue.",
|
|
120435
|
+
enabled: false
|
|
120436
|
+
},
|
|
120313
120437
|
["chatThreadPin" /* ChatThreadPin */]: {
|
|
120314
120438
|
maintainer: "ethan@vm0.ai",
|
|
120315
120439
|
description: "Replace the sidebar's per-thread trash button with a kebab/pin menu that exposes Pin/Unpin and Delete. Pinned threads sort to the top of the agent's chat list. Mobile shows the menu trigger always; desktop shows it on hover.",
|
|
@@ -120373,7 +120497,7 @@ var FEATURE_SWITCHES = {
|
|
|
120373
120497
|
enabled: false,
|
|
120374
120498
|
enabledOrgIdHashes: STAFF_ORG_ID_HASHES
|
|
120375
120499
|
},
|
|
120376
|
-
["
|
|
120500
|
+
["codexOauthProvider" /* CodexOauthProvider */]: {
|
|
120377
120501
|
maintainer: "lancy@vm0.ai",
|
|
120378
120502
|
description: "Gate the ChatGPT-OAuth model provider in zero web (Epic #11872). When off, the 'Connect ChatGPT' tile is hidden in the add-provider dialog, server routes that initiate the OAuth dance return 404, and stale-provider UX is bypassed. Staff-only during rollout; per-user toggle via Lab.",
|
|
120379
120503
|
enabled: false,
|
|
@@ -121717,6 +121841,7 @@ export {
|
|
|
121717
121841
|
downloadWebFile,
|
|
121718
121842
|
uploadWebFile,
|
|
121719
121843
|
generateWebVoice,
|
|
121844
|
+
generateWebImage,
|
|
121720
121845
|
getInstructionsStorageName,
|
|
121721
121846
|
parseGitHubUrl,
|
|
121722
121847
|
getInstructionsFilename,
|
|
@@ -121763,4 +121888,4 @@ undici/lib/web/fetch/body.js:
|
|
|
121763
121888
|
undici/lib/web/websocket/frame.js:
|
|
121764
121889
|
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
|
121765
121890
|
*/
|
|
121766
|
-
//# sourceMappingURL=chunk-
|
|
121891
|
+
//# sourceMappingURL=chunk-75VR4R5J.js.map
|