@vm0/cli 9.83.2 → 9.84.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-37AJL4NM.js → chunk-T4MRFLKK.js} +5493 -5790
- package/chunk-T4MRFLKK.js.map +1 -0
- package/index.js +12 -13
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/zero.js +88 -76
- package/zero.js.map +1 -1
- package/chunk-37AJL4NM.js.map +0 -1
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
createZeroAgent,
|
|
10
10
|
createZeroComputerConnector,
|
|
11
11
|
createZeroConnectorSession,
|
|
12
|
-
decodeCliTokenPayload,
|
|
13
12
|
decodeZeroTokenPayload,
|
|
14
13
|
deleteZeroAgent,
|
|
15
14
|
deleteZeroComputerConnector,
|
|
@@ -30,6 +29,7 @@ import {
|
|
|
30
29
|
getBaseUrl,
|
|
31
30
|
getComposeByName,
|
|
32
31
|
getConnectorDerivedNames,
|
|
32
|
+
getConnectorTypeForSecretName,
|
|
33
33
|
getCustomModelPlaceholder,
|
|
34
34
|
getDefaultAuthMethod,
|
|
35
35
|
getDefaultModel,
|
|
@@ -82,10 +82,10 @@ import {
|
|
|
82
82
|
updateZeroUserPreferences,
|
|
83
83
|
upsertZeroOrgModelProvider,
|
|
84
84
|
withErrorHandler
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-T4MRFLKK.js";
|
|
86
86
|
|
|
87
87
|
// src/zero.ts
|
|
88
|
-
import { Command as
|
|
88
|
+
import { Command as Command57 } from "commander";
|
|
89
89
|
|
|
90
90
|
// src/commands/zero/org/index.ts
|
|
91
91
|
import { Command as Command23 } from "commander";
|
|
@@ -129,16 +129,10 @@ var setCommand = new Command2().name("set").description("Rename your organizatio
|
|
|
129
129
|
);
|
|
130
130
|
}
|
|
131
131
|
const org = await updateZeroOrg({ slug, force: true });
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
token: result.access_token,
|
|
137
|
-
activeOrg: result.org_slug
|
|
138
|
-
});
|
|
139
|
-
} else {
|
|
140
|
-
await saveConfig({ activeOrg: org.slug });
|
|
141
|
-
}
|
|
132
|
+
const result = await switchZeroOrg(org.slug);
|
|
133
|
+
await saveConfig({
|
|
134
|
+
token: result.access_token
|
|
135
|
+
});
|
|
142
136
|
console.log(chalk2.green(`\u2713 Organization updated to ${org.slug}`));
|
|
143
137
|
console.log();
|
|
144
138
|
console.log("Your agents will now be namespaced as:");
|
|
@@ -182,16 +176,10 @@ var useCommand = new Command4().name("use").description("Switch to a different o
|
|
|
182
176
|
if (!target) {
|
|
183
177
|
throw new Error(`Organization '${slug}' not found or not accessible.`);
|
|
184
178
|
}
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
token: result.access_token,
|
|
190
|
-
activeOrg: result.org_slug
|
|
191
|
-
});
|
|
192
|
-
} else {
|
|
193
|
-
await saveConfig({ activeOrg: slug });
|
|
194
|
-
}
|
|
179
|
+
const result = await switchZeroOrg(slug);
|
|
180
|
+
await saveConfig({
|
|
181
|
+
token: result.access_token
|
|
182
|
+
});
|
|
195
183
|
console.log(chalk4.green(`\u2713 Switched to organization: ${slug}`));
|
|
196
184
|
})
|
|
197
185
|
);
|
|
@@ -244,7 +232,7 @@ var leaveCommand = new Command8().name("leave").description("Leave the current o
|
|
|
244
232
|
await leaveZeroOrg();
|
|
245
233
|
const { orgs } = await listZeroOrgs();
|
|
246
234
|
if (orgs.length === 0) {
|
|
247
|
-
await saveConfig({
|
|
235
|
+
await saveConfig({ token: void 0 });
|
|
248
236
|
console.log(chalk8.green("\u2713 Left organization."));
|
|
249
237
|
console.log(
|
|
250
238
|
chalk8.yellow("No remaining organizations. Run: vm0 auth login")
|
|
@@ -252,16 +240,10 @@ var leaveCommand = new Command8().name("leave").description("Leave the current o
|
|
|
252
240
|
return;
|
|
253
241
|
}
|
|
254
242
|
const nextOrg = orgs[0].slug;
|
|
255
|
-
const
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
token: result.access_token,
|
|
260
|
-
activeOrg: result.org_slug
|
|
261
|
-
});
|
|
262
|
-
} else {
|
|
263
|
-
await saveConfig({ activeOrg: nextOrg });
|
|
264
|
-
}
|
|
243
|
+
const result = await switchZeroOrg(nextOrg);
|
|
244
|
+
await saveConfig({
|
|
245
|
+
token: result.access_token
|
|
246
|
+
});
|
|
265
247
|
console.log(chalk8.green(`\u2713 Left organization. Switched to: ${nextOrg}`));
|
|
266
248
|
})
|
|
267
249
|
);
|
|
@@ -1832,8 +1814,36 @@ var disconnectCommand = new Command33().name("disconnect").description("Disconne
|
|
|
1832
1814
|
// src/commands/zero/connector/index.ts
|
|
1833
1815
|
var zeroConnectorCommand = new Command34().name("connector").description("Manage third-party service connections").addCommand(listCommand6).addCommand(statusCommand2).addCommand(connectCommand).addCommand(disconnectCommand);
|
|
1834
1816
|
|
|
1835
|
-
// src/commands/zero/
|
|
1817
|
+
// src/commands/zero/doctor/index.ts
|
|
1818
|
+
import { Command as Command36 } from "commander";
|
|
1819
|
+
|
|
1820
|
+
// src/commands/zero/doctor/missing-token.ts
|
|
1836
1821
|
import { Command as Command35 } from "commander";
|
|
1822
|
+
var missingTokenCommand = new Command35().name("missing-token").description(
|
|
1823
|
+
"Diagnose a missing token and find the connector that provides it"
|
|
1824
|
+
).argument("<token-name>", "The environment variable / token name to look up").action(
|
|
1825
|
+
withErrorHandler(async (tokenName) => {
|
|
1826
|
+
const connectorType = getConnectorTypeForSecretName(tokenName);
|
|
1827
|
+
if (!connectorType) {
|
|
1828
|
+
throw new Error(
|
|
1829
|
+
`Unknown token: ${tokenName} \u2014 not managed by any connector`
|
|
1830
|
+
);
|
|
1831
|
+
}
|
|
1832
|
+
const { label } = CONNECTOR_TYPES[connectorType];
|
|
1833
|
+
const baseUrl = await getApiUrl();
|
|
1834
|
+
const agentId = process.env.ZERO_AGENT_ID;
|
|
1835
|
+
const path = agentId ? `/team/${agentId}` : "/team";
|
|
1836
|
+
const url = `${baseUrl}${path}?tab=connectors`;
|
|
1837
|
+
console.log(`${tokenName} is provided by the ${label} connector.`);
|
|
1838
|
+
console.log(`Ask the user to connect it at: ${url}`);
|
|
1839
|
+
})
|
|
1840
|
+
);
|
|
1841
|
+
|
|
1842
|
+
// src/commands/zero/doctor/index.ts
|
|
1843
|
+
var zeroDoctorCommand = new Command36().name("doctor").description("Diagnostic tools for troubleshooting agent issues").addCommand(missingTokenCommand);
|
|
1844
|
+
|
|
1845
|
+
// src/commands/zero/preference/index.ts
|
|
1846
|
+
import { Command as Command37 } from "commander";
|
|
1837
1847
|
import chalk31 from "chalk";
|
|
1838
1848
|
function detectTimezone2() {
|
|
1839
1849
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
@@ -1890,7 +1900,7 @@ System timezone detected: ${detectedTz}`));
|
|
|
1890
1900
|
}
|
|
1891
1901
|
}
|
|
1892
1902
|
}
|
|
1893
|
-
var zeroPreferenceCommand = new
|
|
1903
|
+
var zeroPreferenceCommand = new Command37().name("preference").description("View or update your preferences").option("--timezone <timezone>", "IANA timezone (e.g., America/New_York)").action(
|
|
1894
1904
|
withErrorHandler(async (opts) => {
|
|
1895
1905
|
const updates = buildUpdates(opts);
|
|
1896
1906
|
if (updates) {
|
|
@@ -1915,10 +1925,10 @@ var zeroPreferenceCommand = new Command35().name("preference").description("View
|
|
|
1915
1925
|
);
|
|
1916
1926
|
|
|
1917
1927
|
// src/commands/zero/schedule/index.ts
|
|
1918
|
-
import { Command as
|
|
1928
|
+
import { Command as Command44 } from "commander";
|
|
1919
1929
|
|
|
1920
1930
|
// src/commands/zero/schedule/setup.ts
|
|
1921
|
-
import { Command as
|
|
1931
|
+
import { Command as Command38 } from "commander";
|
|
1922
1932
|
import chalk32 from "chalk";
|
|
1923
1933
|
var FREQUENCY_CHOICES = [
|
|
1924
1934
|
{ title: "Daily", value: "daily", description: "Run every day" },
|
|
@@ -2349,7 +2359,7 @@ async function handleScheduleEnabling(params) {
|
|
|
2349
2359
|
showEnableHint(agentName);
|
|
2350
2360
|
}
|
|
2351
2361
|
}
|
|
2352
|
-
var setupCommand2 = new
|
|
2362
|
+
var setupCommand2 = new Command38().name("setup").description("Create or edit a schedule for a zero agent").argument("<agent-name>", "Agent name to configure schedule for").option("-n, --name <schedule-name>", 'Schedule name (default: "default")').option("-f, --frequency <type>", "Frequency: daily|weekly|monthly|once|loop").option("-t, --time <HH:MM>", "Time to run (24-hour format)").option("-d, --day <day>", "Day of week (mon-sun) or day of month (1-31)").option("-i, --interval <seconds>", "Interval in seconds for loop mode").option("-z, --timezone <tz>", "IANA timezone").option("-p, --prompt <text>", "Prompt to run").option("--artifact-name <name>", "Artifact name", "artifact").option("-e, --enable", "Enable schedule immediately after creation").option("--notify-email", "Enable email notifications (default: true)").option("--no-notify-email", "Disable email notifications").option("--notify-slack", "Enable Slack notifications (default: true)").option("--no-notify-slack", "Disable Slack notifications").action(
|
|
2353
2363
|
withErrorHandler(async (agentName, options) => {
|
|
2354
2364
|
const compose = await getComposeByName(agentName);
|
|
2355
2365
|
if (!compose) {
|
|
@@ -2430,9 +2440,9 @@ var setupCommand2 = new Command36().name("setup").description("Create or edit a
|
|
|
2430
2440
|
);
|
|
2431
2441
|
|
|
2432
2442
|
// src/commands/zero/schedule/list.ts
|
|
2433
|
-
import { Command as
|
|
2443
|
+
import { Command as Command39 } from "commander";
|
|
2434
2444
|
import chalk33 from "chalk";
|
|
2435
|
-
var listCommand7 = new
|
|
2445
|
+
var listCommand7 = new Command39().name("list").alias("ls").description("List all zero schedules").action(
|
|
2436
2446
|
withErrorHandler(async () => {
|
|
2437
2447
|
const result = await listZeroSchedules();
|
|
2438
2448
|
if (result.schedules.length === 0) {
|
|
@@ -2481,7 +2491,7 @@ var listCommand7 = new Command37().name("list").alias("ls").description("List al
|
|
|
2481
2491
|
);
|
|
2482
2492
|
|
|
2483
2493
|
// src/commands/zero/schedule/status.ts
|
|
2484
|
-
import { Command as
|
|
2494
|
+
import { Command as Command40 } from "commander";
|
|
2485
2495
|
import chalk34 from "chalk";
|
|
2486
2496
|
function formatDateTimeStyled(dateStr) {
|
|
2487
2497
|
if (!dateStr) return chalk34.dim("-");
|
|
@@ -2540,7 +2550,7 @@ function printTimeSchedule(schedule) {
|
|
|
2540
2550
|
console.log(`${"Failures:".padEnd(16)}${failureText}`);
|
|
2541
2551
|
}
|
|
2542
2552
|
}
|
|
2543
|
-
var statusCommand3 = new
|
|
2553
|
+
var statusCommand3 = new Command40().name("status").description("Show detailed status of a zero schedule").argument("<agent-name>", "Agent name").option(
|
|
2544
2554
|
"-n, --name <schedule-name>",
|
|
2545
2555
|
"Schedule name (required when agent has multiple schedules)"
|
|
2546
2556
|
).action(
|
|
@@ -2559,9 +2569,9 @@ var statusCommand3 = new Command38().name("status").description("Show detailed s
|
|
|
2559
2569
|
);
|
|
2560
2570
|
|
|
2561
2571
|
// src/commands/zero/schedule/delete.ts
|
|
2562
|
-
import { Command as
|
|
2572
|
+
import { Command as Command41 } from "commander";
|
|
2563
2573
|
import chalk35 from "chalk";
|
|
2564
|
-
var deleteCommand3 = new
|
|
2574
|
+
var deleteCommand3 = new Command41().name("delete").alias("rm").description("Delete a zero schedule").argument("<agent-name>", "Agent name").option(
|
|
2565
2575
|
"-n, --name <schedule-name>",
|
|
2566
2576
|
"Schedule name (required when agent has multiple schedules)"
|
|
2567
2577
|
).option("-y, --yes", "Skip confirmation prompt").action(
|
|
@@ -2594,9 +2604,9 @@ var deleteCommand3 = new Command39().name("delete").alias("rm").description("Del
|
|
|
2594
2604
|
);
|
|
2595
2605
|
|
|
2596
2606
|
// src/commands/zero/schedule/enable.ts
|
|
2597
|
-
import { Command as
|
|
2607
|
+
import { Command as Command42 } from "commander";
|
|
2598
2608
|
import chalk36 from "chalk";
|
|
2599
|
-
var enableCommand = new
|
|
2609
|
+
var enableCommand = new Command42().name("enable").description("Enable a zero schedule").argument("<agent-name>", "Agent name").option(
|
|
2600
2610
|
"-n, --name <schedule-name>",
|
|
2601
2611
|
"Schedule name (required when agent has multiple schedules)"
|
|
2602
2612
|
).action(
|
|
@@ -2614,9 +2624,9 @@ var enableCommand = new Command40().name("enable").description("Enable a zero sc
|
|
|
2614
2624
|
);
|
|
2615
2625
|
|
|
2616
2626
|
// src/commands/zero/schedule/disable.ts
|
|
2617
|
-
import { Command as
|
|
2627
|
+
import { Command as Command43 } from "commander";
|
|
2618
2628
|
import chalk37 from "chalk";
|
|
2619
|
-
var disableCommand = new
|
|
2629
|
+
var disableCommand = new Command43().name("disable").description("Disable a zero schedule").argument("<agent-name>", "Agent name").option(
|
|
2620
2630
|
"-n, --name <schedule-name>",
|
|
2621
2631
|
"Schedule name (required when agent has multiple schedules)"
|
|
2622
2632
|
).action(
|
|
@@ -2634,15 +2644,15 @@ var disableCommand = new Command41().name("disable").description("Disable a zero
|
|
|
2634
2644
|
);
|
|
2635
2645
|
|
|
2636
2646
|
// src/commands/zero/schedule/index.ts
|
|
2637
|
-
var zeroScheduleCommand = new
|
|
2647
|
+
var zeroScheduleCommand = new Command44().name("schedule").description("Manage zero agent schedules").addCommand(setupCommand2).addCommand(listCommand7).addCommand(statusCommand3).addCommand(deleteCommand3).addCommand(enableCommand).addCommand(disableCommand);
|
|
2638
2648
|
|
|
2639
2649
|
// src/commands/zero/secret/index.ts
|
|
2640
|
-
import { Command as
|
|
2650
|
+
import { Command as Command48 } from "commander";
|
|
2641
2651
|
|
|
2642
2652
|
// src/commands/zero/secret/list.ts
|
|
2643
|
-
import { Command as
|
|
2653
|
+
import { Command as Command45 } from "commander";
|
|
2644
2654
|
import chalk38 from "chalk";
|
|
2645
|
-
var listCommand8 = new
|
|
2655
|
+
var listCommand8 = new Command45().name("list").alias("ls").description("List all secrets").action(
|
|
2646
2656
|
withErrorHandler(async () => {
|
|
2647
2657
|
const result = await listZeroSecrets();
|
|
2648
2658
|
if (result.secrets.length === 0) {
|
|
@@ -2695,9 +2705,9 @@ var listCommand8 = new Command43().name("list").alias("ls").description("List al
|
|
|
2695
2705
|
);
|
|
2696
2706
|
|
|
2697
2707
|
// src/commands/zero/secret/set.ts
|
|
2698
|
-
import { Command as
|
|
2708
|
+
import { Command as Command46 } from "commander";
|
|
2699
2709
|
import chalk39 from "chalk";
|
|
2700
|
-
var setCommand4 = new
|
|
2710
|
+
var setCommand4 = new Command46().name("set").description("Create or update a secret").argument("<name>", "Secret name (uppercase, e.g., MY_API_KEY)").option(
|
|
2701
2711
|
"-b, --body <value>",
|
|
2702
2712
|
"Secret value (required in non-interactive mode)"
|
|
2703
2713
|
).option("-d, --description <description>", "Optional description").action(
|
|
@@ -2743,9 +2753,9 @@ var setCommand4 = new Command44().name("set").description("Create or update a se
|
|
|
2743
2753
|
);
|
|
2744
2754
|
|
|
2745
2755
|
// src/commands/zero/secret/delete.ts
|
|
2746
|
-
import { Command as
|
|
2756
|
+
import { Command as Command47 } from "commander";
|
|
2747
2757
|
import chalk40 from "chalk";
|
|
2748
|
-
var deleteCommand4 = new
|
|
2758
|
+
var deleteCommand4 = new Command47().name("delete").description("Delete a secret").argument("<name>", "Secret name to delete").option("-y, --yes", "Skip confirmation prompt").action(
|
|
2749
2759
|
withErrorHandler(async (name, options) => {
|
|
2750
2760
|
if (!options.yes) {
|
|
2751
2761
|
if (!isInteractive()) {
|
|
@@ -2766,19 +2776,19 @@ var deleteCommand4 = new Command45().name("delete").description("Delete a secret
|
|
|
2766
2776
|
);
|
|
2767
2777
|
|
|
2768
2778
|
// src/commands/zero/secret/index.ts
|
|
2769
|
-
var zeroSecretCommand = new
|
|
2779
|
+
var zeroSecretCommand = new Command48().name("secret").description("Manage secrets").addCommand(listCommand8).addCommand(setCommand4).addCommand(deleteCommand4);
|
|
2770
2780
|
|
|
2771
2781
|
// src/commands/zero/slack/index.ts
|
|
2772
|
-
import { Command as
|
|
2782
|
+
import { Command as Command51 } from "commander";
|
|
2773
2783
|
|
|
2774
2784
|
// src/commands/zero/slack/message/index.ts
|
|
2775
|
-
import { Command as
|
|
2785
|
+
import { Command as Command50 } from "commander";
|
|
2776
2786
|
|
|
2777
2787
|
// src/commands/zero/slack/message/send.ts
|
|
2778
2788
|
import { readFileSync as readFileSync3 } from "fs";
|
|
2779
|
-
import { Command as
|
|
2789
|
+
import { Command as Command49 } from "commander";
|
|
2780
2790
|
import chalk41 from "chalk";
|
|
2781
|
-
var sendCommand = new
|
|
2791
|
+
var sendCommand = new Command49().name("send").description("Send a message to a Slack channel").requiredOption("-c, --channel <id>", "Channel ID").option("-t, --text <message>", "Message text").option("--thread <ts>", "Thread timestamp for replies").option("--blocks <json>", "Block Kit JSON string").action(
|
|
2782
2792
|
withErrorHandler(
|
|
2783
2793
|
async (options) => {
|
|
2784
2794
|
let text = options.text;
|
|
@@ -2818,16 +2828,16 @@ var sendCommand = new Command47().name("send").description("Send a message to a
|
|
|
2818
2828
|
);
|
|
2819
2829
|
|
|
2820
2830
|
// src/commands/zero/slack/message/index.ts
|
|
2821
|
-
var zeroSlackMessageCommand = new
|
|
2831
|
+
var zeroSlackMessageCommand = new Command50().name("message").description("Manage Slack messages").addCommand(sendCommand);
|
|
2822
2832
|
|
|
2823
2833
|
// src/commands/zero/slack/index.ts
|
|
2824
|
-
var zeroSlackCommand = new
|
|
2834
|
+
var zeroSlackCommand = new Command51().name("slack").description("Manage Slack integrations").addCommand(zeroSlackMessageCommand);
|
|
2825
2835
|
|
|
2826
2836
|
// src/commands/zero/variable/index.ts
|
|
2827
|
-
import { Command as
|
|
2837
|
+
import { Command as Command55 } from "commander";
|
|
2828
2838
|
|
|
2829
2839
|
// src/commands/zero/variable/list.ts
|
|
2830
|
-
import { Command as
|
|
2840
|
+
import { Command as Command52 } from "commander";
|
|
2831
2841
|
import chalk42 from "chalk";
|
|
2832
2842
|
function truncateValue2(value, maxLength = 60) {
|
|
2833
2843
|
if (value.length <= maxLength) {
|
|
@@ -2835,7 +2845,7 @@ function truncateValue2(value, maxLength = 60) {
|
|
|
2835
2845
|
}
|
|
2836
2846
|
return value.slice(0, maxLength - 15) + "... [truncated]";
|
|
2837
2847
|
}
|
|
2838
|
-
var listCommand9 = new
|
|
2848
|
+
var listCommand9 = new Command52().name("list").alias("ls").description("List all variables").action(
|
|
2839
2849
|
withErrorHandler(async () => {
|
|
2840
2850
|
const result = await listZeroVariables();
|
|
2841
2851
|
if (result.variables.length === 0) {
|
|
@@ -2863,9 +2873,9 @@ var listCommand9 = new Command50().name("list").alias("ls").description("List al
|
|
|
2863
2873
|
);
|
|
2864
2874
|
|
|
2865
2875
|
// src/commands/zero/variable/set.ts
|
|
2866
|
-
import { Command as
|
|
2876
|
+
import { Command as Command53 } from "commander";
|
|
2867
2877
|
import chalk43 from "chalk";
|
|
2868
|
-
var setCommand5 = new
|
|
2878
|
+
var setCommand5 = new Command53().name("set").description("Create or update a variable").argument("<name>", "Variable name (uppercase, e.g., MY_VAR)").argument("<value>", "Variable value").option("-d, --description <description>", "Optional description").action(
|
|
2869
2879
|
withErrorHandler(
|
|
2870
2880
|
async (name, value, options) => {
|
|
2871
2881
|
let variable;
|
|
@@ -2891,9 +2901,9 @@ var setCommand5 = new Command51().name("set").description("Create or update a va
|
|
|
2891
2901
|
);
|
|
2892
2902
|
|
|
2893
2903
|
// src/commands/zero/variable/delete.ts
|
|
2894
|
-
import { Command as
|
|
2904
|
+
import { Command as Command54 } from "commander";
|
|
2895
2905
|
import chalk44 from "chalk";
|
|
2896
|
-
var deleteCommand5 = new
|
|
2906
|
+
var deleteCommand5 = new Command54().name("delete").description("Delete a variable").argument("<name>", "Variable name to delete").option("-y, --yes", "Skip confirmation prompt").action(
|
|
2897
2907
|
withErrorHandler(async (name, options) => {
|
|
2898
2908
|
if (!options.yes) {
|
|
2899
2909
|
if (!isInteractive()) {
|
|
@@ -2914,10 +2924,10 @@ var deleteCommand5 = new Command52().name("delete").description("Delete a variab
|
|
|
2914
2924
|
);
|
|
2915
2925
|
|
|
2916
2926
|
// src/commands/zero/variable/index.ts
|
|
2917
|
-
var zeroVariableCommand = new
|
|
2927
|
+
var zeroVariableCommand = new Command55().name("variable").description("Manage variables").addCommand(listCommand9).addCommand(setCommand5).addCommand(deleteCommand5);
|
|
2918
2928
|
|
|
2919
2929
|
// src/commands/zero/whoami.ts
|
|
2920
|
-
import { Command as
|
|
2930
|
+
import { Command as Command56 } from "commander";
|
|
2921
2931
|
import chalk45 from "chalk";
|
|
2922
2932
|
function isInsideSandbox() {
|
|
2923
2933
|
return !!process.env.ZERO_AGENT_ID;
|
|
@@ -2954,7 +2964,7 @@ async function showLocalInfo() {
|
|
|
2954
2964
|
console.log(` Active: ${activeOrg}`);
|
|
2955
2965
|
}
|
|
2956
2966
|
}
|
|
2957
|
-
var zeroWhoamiCommand = new
|
|
2967
|
+
var zeroWhoamiCommand = new Command56().name("whoami").description("Show current identity and environment information").action(
|
|
2958
2968
|
withErrorHandler(async () => {
|
|
2959
2969
|
if (isInsideSandbox()) {
|
|
2960
2970
|
await showSandboxInfo();
|
|
@@ -2968,6 +2978,7 @@ var zeroWhoamiCommand = new Command54().name("whoami").description("Show current
|
|
|
2968
2978
|
var COMMAND_CAPABILITY_MAP = {
|
|
2969
2979
|
agent: "agent:read",
|
|
2970
2980
|
schedule: "schedule:read",
|
|
2981
|
+
doctor: null,
|
|
2971
2982
|
slack: "slack:write",
|
|
2972
2983
|
whoami: null
|
|
2973
2984
|
};
|
|
@@ -2975,6 +2986,7 @@ var DEFAULT_COMMANDS = [
|
|
|
2975
2986
|
zeroOrgCommand,
|
|
2976
2987
|
zeroAgentCommand,
|
|
2977
2988
|
zeroConnectorCommand,
|
|
2989
|
+
zeroDoctorCommand,
|
|
2978
2990
|
zeroPreferenceCommand,
|
|
2979
2991
|
zeroScheduleCommand,
|
|
2980
2992
|
zeroSecretCommand,
|
|
@@ -2996,8 +3008,8 @@ function registerZeroCommands(prog, commands) {
|
|
|
2996
3008
|
prog.addCommand(cmd, hidden ? { hidden: true } : {});
|
|
2997
3009
|
}
|
|
2998
3010
|
}
|
|
2999
|
-
var program = new
|
|
3000
|
-
program.name("zero").description("Zero CLI - Manage your zero platform").version("9.
|
|
3011
|
+
var program = new Command57();
|
|
3012
|
+
program.name("zero").description("Zero CLI - Manage your zero platform").version("9.84.0");
|
|
3001
3013
|
if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {
|
|
3002
3014
|
configureGlobalProxyFromEnv();
|
|
3003
3015
|
registerZeroCommands(program);
|