@vm0/cli 9.84.6 → 9.85.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-ANZUWHEL.js → chunk-JCPJKFQI.js} +49 -138
- package/chunk-JCPJKFQI.js.map +1 -0
- package/index.js +10 -10
- package/package.json +1 -1
- package/zero.js +88 -10
- package/zero.js.map +1 -1
- package/chunk-ANZUWHEL.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.85.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.85.0",
|
|
70
70
|
command: process.argv.slice(2).join(" ")
|
|
71
71
|
});
|
|
72
72
|
Sentry.setContext("runtime", {
|
|
@@ -3993,135 +3993,9 @@ var CONNECTOR_TYPES_DEF = {
|
|
|
3993
3993
|
}
|
|
3994
3994
|
};
|
|
3995
3995
|
var CONNECTOR_TYPES = CONNECTOR_TYPES_DEF;
|
|
3996
|
-
var connectorTypeSchema = z2.enum(
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
"atlassian",
|
|
4000
|
-
"axiom",
|
|
4001
|
-
"airtable",
|
|
4002
|
-
"asana",
|
|
4003
|
-
"calendly",
|
|
4004
|
-
"canva",
|
|
4005
|
-
"clickup",
|
|
4006
|
-
"cloudflare",
|
|
4007
|
-
"cloudinary",
|
|
4008
|
-
"close",
|
|
4009
|
-
"github",
|
|
4010
|
-
"gmail",
|
|
4011
|
-
"google-sheets",
|
|
4012
|
-
"hugging-face",
|
|
4013
|
-
"hume",
|
|
4014
|
-
"heygen",
|
|
4015
|
-
"hubspot",
|
|
4016
|
-
"google-docs",
|
|
4017
|
-
"google-drive",
|
|
4018
|
-
"google-calendar",
|
|
4019
|
-
"notion",
|
|
4020
|
-
"computer",
|
|
4021
|
-
"slack",
|
|
4022
|
-
"deel",
|
|
4023
|
-
"deepseek",
|
|
4024
|
-
"dify",
|
|
4025
|
-
"docusign",
|
|
4026
|
-
"dropbox",
|
|
4027
|
-
"linear",
|
|
4028
|
-
"intercom",
|
|
4029
|
-
"jam",
|
|
4030
|
-
"jotform",
|
|
4031
|
-
"line",
|
|
4032
|
-
"make",
|
|
4033
|
-
"metabase",
|
|
4034
|
-
"figma",
|
|
4035
|
-
"mercury",
|
|
4036
|
-
"minimax",
|
|
4037
|
-
"reddit",
|
|
4038
|
-
"strava",
|
|
4039
|
-
"neon",
|
|
4040
|
-
"gamma",
|
|
4041
|
-
"garmin-connect",
|
|
4042
|
-
"x",
|
|
4043
|
-
"vercel",
|
|
4044
|
-
"sentry",
|
|
4045
|
-
"intervals-icu",
|
|
4046
|
-
"xero",
|
|
4047
|
-
"monday",
|
|
4048
|
-
"supabase",
|
|
4049
|
-
"todoist",
|
|
4050
|
-
"webflow",
|
|
4051
|
-
"outlook-mail",
|
|
4052
|
-
"outlook-calendar",
|
|
4053
|
-
"meta-ads",
|
|
4054
|
-
"posthog",
|
|
4055
|
-
"stripe",
|
|
4056
|
-
"openai",
|
|
4057
|
-
"chatwoot",
|
|
4058
|
-
"similarweb",
|
|
4059
|
-
"mailchimp",
|
|
4060
|
-
"pdfco",
|
|
4061
|
-
"perplexity",
|
|
4062
|
-
"plausible",
|
|
4063
|
-
"productlane",
|
|
4064
|
-
"resend",
|
|
4065
|
-
"revenuecat",
|
|
4066
|
-
"pdf4me",
|
|
4067
|
-
"apify",
|
|
4068
|
-
"bright-data",
|
|
4069
|
-
"browserbase",
|
|
4070
|
-
"browserless",
|
|
4071
|
-
"fireflies",
|
|
4072
|
-
"firecrawl",
|
|
4073
|
-
"scrapeninja",
|
|
4074
|
-
"elevenlabs",
|
|
4075
|
-
"explorium",
|
|
4076
|
-
"devto",
|
|
4077
|
-
"fal",
|
|
4078
|
-
"granola",
|
|
4079
|
-
"podchaser",
|
|
4080
|
-
"pushinator",
|
|
4081
|
-
"qdrant",
|
|
4082
|
-
"qiita",
|
|
4083
|
-
"reportei",
|
|
4084
|
-
"serpapi",
|
|
4085
|
-
"zeptomail",
|
|
4086
|
-
"runway",
|
|
4087
|
-
"salesforce",
|
|
4088
|
-
"shortio",
|
|
4089
|
-
"streak",
|
|
4090
|
-
"supadata",
|
|
4091
|
-
"tavily",
|
|
4092
|
-
"tldv",
|
|
4093
|
-
"twenty",
|
|
4094
|
-
"youtube",
|
|
4095
|
-
"wrike",
|
|
4096
|
-
"zapier",
|
|
4097
|
-
"zapsign",
|
|
4098
|
-
"zendesk",
|
|
4099
|
-
"prisma-postgres",
|
|
4100
|
-
"bitrix",
|
|
4101
|
-
"brave-search",
|
|
4102
|
-
"cronlytic",
|
|
4103
|
-
"discord",
|
|
4104
|
-
"discord-webhook",
|
|
4105
|
-
"gitlab",
|
|
4106
|
-
"htmlcsstoimage",
|
|
4107
|
-
"imgur",
|
|
4108
|
-
"instantly",
|
|
4109
|
-
"instagram",
|
|
4110
|
-
"jira",
|
|
4111
|
-
"kommo",
|
|
4112
|
-
"lark",
|
|
4113
|
-
"mailsac",
|
|
4114
|
-
"minio",
|
|
4115
|
-
"pdforge",
|
|
4116
|
-
"slack-webhook",
|
|
4117
|
-
"spotify",
|
|
4118
|
-
"wix",
|
|
4119
|
-
"cal-com",
|
|
4120
|
-
"v0",
|
|
4121
|
-
"brevo",
|
|
4122
|
-
"customer-io",
|
|
4123
|
-
"loops"
|
|
4124
|
-
]);
|
|
3996
|
+
var connectorTypeSchema = z2.enum(
|
|
3997
|
+
Object.keys(CONNECTOR_TYPES_DEF)
|
|
3998
|
+
);
|
|
4125
3999
|
function getConnectorEnvironmentMapping(type) {
|
|
4126
4000
|
const config = CONNECTOR_TYPES[type];
|
|
4127
4001
|
return config.environmentMapping ?? config.oauth?.environmentMapping ?? config.bridgeMapping ?? {};
|
|
@@ -18441,6 +18315,20 @@ async function getComposeByName(name, org) {
|
|
|
18441
18315
|
}
|
|
18442
18316
|
handleError(result, `Compose not found: ${name}`);
|
|
18443
18317
|
}
|
|
18318
|
+
var UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
18319
|
+
async function resolveCompose(identifier, org) {
|
|
18320
|
+
if (UUID_PATTERN.test(identifier)) {
|
|
18321
|
+
try {
|
|
18322
|
+
return await getComposeById(identifier);
|
|
18323
|
+
} catch (error) {
|
|
18324
|
+
if (error instanceof ApiRequestError && error.status === 404) {
|
|
18325
|
+
return null;
|
|
18326
|
+
}
|
|
18327
|
+
throw error;
|
|
18328
|
+
}
|
|
18329
|
+
}
|
|
18330
|
+
return getComposeByName(identifier, org);
|
|
18331
|
+
}
|
|
18444
18332
|
async function getComposeById(id) {
|
|
18445
18333
|
const config = await getClientConfig();
|
|
18446
18334
|
const client = initClient(composesByIdContract, config);
|
|
@@ -19235,22 +19123,22 @@ async function disableZeroSchedule(params) {
|
|
|
19235
19123
|
}
|
|
19236
19124
|
handleError(result, `Failed to disable schedule "${params.name}"`);
|
|
19237
19125
|
}
|
|
19238
|
-
async function resolveZeroScheduleByAgent(
|
|
19239
|
-
const compose = await
|
|
19126
|
+
async function resolveZeroScheduleByAgent(agentIdentifier, scheduleName) {
|
|
19127
|
+
const compose = await resolveCompose(agentIdentifier);
|
|
19240
19128
|
if (!compose) {
|
|
19241
|
-
throw new Error(`Agent not found: ${
|
|
19129
|
+
throw new Error(`Agent not found: ${agentIdentifier}`);
|
|
19242
19130
|
}
|
|
19243
19131
|
const { schedules } = await listZeroSchedules();
|
|
19244
19132
|
const agentSchedules = schedules.filter((s) => s.agentId === compose.id);
|
|
19245
19133
|
if (agentSchedules.length === 0) {
|
|
19246
|
-
throw new Error(`No schedule found for agent "${
|
|
19134
|
+
throw new Error(`No schedule found for agent "${agentIdentifier}"`);
|
|
19247
19135
|
}
|
|
19248
19136
|
if (scheduleName) {
|
|
19249
19137
|
const match = agentSchedules.find((s) => s.name === scheduleName);
|
|
19250
19138
|
if (!match) {
|
|
19251
19139
|
const available2 = agentSchedules.map((s) => s.name).join(", ");
|
|
19252
19140
|
throw new Error(
|
|
19253
|
-
`Schedule "${scheduleName}" not found for agent "${
|
|
19141
|
+
`Schedule "${scheduleName}" not found for agent "${agentIdentifier}". Available schedules: ${available2}`
|
|
19254
19142
|
);
|
|
19255
19143
|
}
|
|
19256
19144
|
return match;
|
|
@@ -19260,10 +19148,30 @@ async function resolveZeroScheduleByAgent(agentName, scheduleName) {
|
|
|
19260
19148
|
}
|
|
19261
19149
|
const available = agentSchedules.map((s) => s.name).join(", ");
|
|
19262
19150
|
throw new Error(
|
|
19263
|
-
`Agent "${
|
|
19151
|
+
`Agent "${agentIdentifier}" has multiple schedules. Use --name to specify which one: ${available}`
|
|
19264
19152
|
);
|
|
19265
19153
|
}
|
|
19266
19154
|
|
|
19155
|
+
// src/lib/api/domains/zero-ask-user.ts
|
|
19156
|
+
import { initClient as initClient18 } from "@ts-rest/core";
|
|
19157
|
+
async function postAskUserQuestion(body) {
|
|
19158
|
+
const config = await getClientConfig();
|
|
19159
|
+
const client = initClient18(zeroAskUserQuestionContract, config);
|
|
19160
|
+
const result = await client.postQuestion({ body, headers: {} });
|
|
19161
|
+
if (result.status === 200) return result.body;
|
|
19162
|
+
handleError(result, "Failed to post question");
|
|
19163
|
+
}
|
|
19164
|
+
async function getAskUserAnswer(pendingId) {
|
|
19165
|
+
const config = await getClientConfig();
|
|
19166
|
+
const client = initClient18(zeroAskUserAnswerContract, config);
|
|
19167
|
+
const result = await client.getAnswer({
|
|
19168
|
+
query: { pendingId },
|
|
19169
|
+
headers: {}
|
|
19170
|
+
});
|
|
19171
|
+
if (result.status === 200) return result.body;
|
|
19172
|
+
handleError(result, "Failed to get answer");
|
|
19173
|
+
}
|
|
19174
|
+
|
|
19267
19175
|
// src/lib/utils/prompt-utils.ts
|
|
19268
19176
|
import prompts from "prompts";
|
|
19269
19177
|
function isInteractive() {
|
|
@@ -19392,6 +19300,7 @@ export {
|
|
|
19392
19300
|
getBaseUrl,
|
|
19393
19301
|
withErrorHandler,
|
|
19394
19302
|
getComposeByName,
|
|
19303
|
+
resolveCompose,
|
|
19395
19304
|
getComposeById,
|
|
19396
19305
|
getComposeVersion,
|
|
19397
19306
|
createOrUpdateCompose,
|
|
@@ -19461,10 +19370,12 @@ export {
|
|
|
19461
19370
|
getAgentEvents,
|
|
19462
19371
|
getNetworkLogs,
|
|
19463
19372
|
searchLogs,
|
|
19373
|
+
postAskUserQuestion,
|
|
19374
|
+
getAskUserAnswer,
|
|
19464
19375
|
isInteractive,
|
|
19465
19376
|
promptText,
|
|
19466
19377
|
promptConfirm,
|
|
19467
19378
|
promptSelect,
|
|
19468
19379
|
promptPassword
|
|
19469
19380
|
};
|
|
19470
|
-
//# sourceMappingURL=chunk-
|
|
19381
|
+
//# sourceMappingURL=chunk-JCPJKFQI.js.map
|