@vm0/cli 9.84.7 → 9.85.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-2D3ANUQI.js → chunk-FEUDHROP.js} +47 -10
- package/chunk-FEUDHROP.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-2D3ANUQI.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.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.85.1",
|
|
70
70
|
command: process.argv.slice(2).join(" ")
|
|
71
71
|
});
|
|
72
72
|
Sentry.setContext("runtime", {
|
|
@@ -1988,7 +1988,7 @@ var CONNECTOR_TYPES_DEF = {
|
|
|
1988
1988
|
authMethods: {
|
|
1989
1989
|
"api-token": {
|
|
1990
1990
|
label: "API Key",
|
|
1991
|
-
helpText: "1. Log in to [Gamma](https://gamma.app)
|
|
1991
|
+
helpText: "1. Log in to [Gamma](https://gamma.app)\n2. Go to [API Keys](https://gamma.app/settings/api-keys) (Settings > API Keys)\n3. Click **Create API key**\n4. Copy the key (it is only shown once)",
|
|
1992
1992
|
secrets: {
|
|
1993
1993
|
GAMMA_TOKEN: {
|
|
1994
1994
|
label: "API Key",
|
|
@@ -18315,6 +18315,20 @@ async function getComposeByName(name, org) {
|
|
|
18315
18315
|
}
|
|
18316
18316
|
handleError(result, `Compose not found: ${name}`);
|
|
18317
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
|
+
}
|
|
18318
18332
|
async function getComposeById(id) {
|
|
18319
18333
|
const config = await getClientConfig();
|
|
18320
18334
|
const client = initClient(composesByIdContract, config);
|
|
@@ -19109,22 +19123,22 @@ async function disableZeroSchedule(params) {
|
|
|
19109
19123
|
}
|
|
19110
19124
|
handleError(result, `Failed to disable schedule "${params.name}"`);
|
|
19111
19125
|
}
|
|
19112
|
-
async function resolveZeroScheduleByAgent(
|
|
19113
|
-
const compose = await
|
|
19126
|
+
async function resolveZeroScheduleByAgent(agentIdentifier, scheduleName) {
|
|
19127
|
+
const compose = await resolveCompose(agentIdentifier);
|
|
19114
19128
|
if (!compose) {
|
|
19115
|
-
throw new Error(`Agent not found: ${
|
|
19129
|
+
throw new Error(`Agent not found: ${agentIdentifier}`);
|
|
19116
19130
|
}
|
|
19117
19131
|
const { schedules } = await listZeroSchedules();
|
|
19118
19132
|
const agentSchedules = schedules.filter((s) => s.agentId === compose.id);
|
|
19119
19133
|
if (agentSchedules.length === 0) {
|
|
19120
|
-
throw new Error(`No schedule found for agent "${
|
|
19134
|
+
throw new Error(`No schedule found for agent "${agentIdentifier}"`);
|
|
19121
19135
|
}
|
|
19122
19136
|
if (scheduleName) {
|
|
19123
19137
|
const match = agentSchedules.find((s) => s.name === scheduleName);
|
|
19124
19138
|
if (!match) {
|
|
19125
19139
|
const available2 = agentSchedules.map((s) => s.name).join(", ");
|
|
19126
19140
|
throw new Error(
|
|
19127
|
-
`Schedule "${scheduleName}" not found for agent "${
|
|
19141
|
+
`Schedule "${scheduleName}" not found for agent "${agentIdentifier}". Available schedules: ${available2}`
|
|
19128
19142
|
);
|
|
19129
19143
|
}
|
|
19130
19144
|
return match;
|
|
@@ -19134,10 +19148,30 @@ async function resolveZeroScheduleByAgent(agentName, scheduleName) {
|
|
|
19134
19148
|
}
|
|
19135
19149
|
const available = agentSchedules.map((s) => s.name).join(", ");
|
|
19136
19150
|
throw new Error(
|
|
19137
|
-
`Agent "${
|
|
19151
|
+
`Agent "${agentIdentifier}" has multiple schedules. Use --name to specify which one: ${available}`
|
|
19138
19152
|
);
|
|
19139
19153
|
}
|
|
19140
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
|
+
|
|
19141
19175
|
// src/lib/utils/prompt-utils.ts
|
|
19142
19176
|
import prompts from "prompts";
|
|
19143
19177
|
function isInteractive() {
|
|
@@ -19266,6 +19300,7 @@ export {
|
|
|
19266
19300
|
getBaseUrl,
|
|
19267
19301
|
withErrorHandler,
|
|
19268
19302
|
getComposeByName,
|
|
19303
|
+
resolveCompose,
|
|
19269
19304
|
getComposeById,
|
|
19270
19305
|
getComposeVersion,
|
|
19271
19306
|
createOrUpdateCompose,
|
|
@@ -19335,10 +19370,12 @@ export {
|
|
|
19335
19370
|
getAgentEvents,
|
|
19336
19371
|
getNetworkLogs,
|
|
19337
19372
|
searchLogs,
|
|
19373
|
+
postAskUserQuestion,
|
|
19374
|
+
getAskUserAnswer,
|
|
19338
19375
|
isInteractive,
|
|
19339
19376
|
promptText,
|
|
19340
19377
|
promptConfirm,
|
|
19341
19378
|
promptSelect,
|
|
19342
19379
|
promptPassword
|
|
19343
19380
|
};
|
|
19344
|
-
//# sourceMappingURL=chunk-
|
|
19381
|
+
//# sourceMappingURL=chunk-FEUDHROP.js.map
|