@vm0/cli 9.107.2 → 9.109.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-AJN5ZMHZ.js → chunk-WJ6BDJIT.js} +266 -8770
- package/chunk-WJ6BDJIT.js.map +1 -0
- package/index.js +10 -10
- package/package.json +1 -1
- package/zero.js +205 -4
- package/zero.js.map +1 -1
- package/chunk-AJN5ZMHZ.js.map +0 -1
package/index.js
CHANGED
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
source_default,
|
|
71
71
|
volumeConfigSchema,
|
|
72
72
|
withErrorHandler
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-WJ6BDJIT.js";
|
|
74
74
|
|
|
75
75
|
// src/index.ts
|
|
76
76
|
init_esm_shims();
|
|
@@ -463,7 +463,7 @@ function getConfigPath() {
|
|
|
463
463
|
return join(homedir(), ".vm0", "config.json");
|
|
464
464
|
}
|
|
465
465
|
var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
|
|
466
|
-
console.log(source_default.bold(`VM0 CLI v${"9.
|
|
466
|
+
console.log(source_default.bold(`VM0 CLI v${"9.109.0"}`));
|
|
467
467
|
console.log();
|
|
468
468
|
const config = await loadConfig();
|
|
469
469
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -4492,7 +4492,7 @@ var composeCommand = new Command().name("compose").description("Create or update
|
|
|
4492
4492
|
options.autoUpdate = false;
|
|
4493
4493
|
}
|
|
4494
4494
|
if (options.autoUpdate !== false) {
|
|
4495
|
-
await startSilentUpgrade("9.
|
|
4495
|
+
await startSilentUpgrade("9.109.0");
|
|
4496
4496
|
}
|
|
4497
4497
|
try {
|
|
4498
4498
|
let result;
|
|
@@ -4572,7 +4572,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4572
4572
|
withErrorHandler(
|
|
4573
4573
|
async (identifier, prompt, options) => {
|
|
4574
4574
|
if (options.autoUpdate !== false) {
|
|
4575
|
-
await startSilentUpgrade("9.
|
|
4575
|
+
await startSilentUpgrade("9.109.0");
|
|
4576
4576
|
}
|
|
4577
4577
|
const { name, version } = parseIdentifier(identifier);
|
|
4578
4578
|
let composeId;
|
|
@@ -6313,7 +6313,7 @@ var cookAction = new Command().name("cook").description("Quick start: prepare, c
|
|
|
6313
6313
|
withErrorHandler(
|
|
6314
6314
|
async (prompt, options) => {
|
|
6315
6315
|
if (options.autoUpdate !== false) {
|
|
6316
|
-
const shouldExit = await checkAndUpgrade("9.
|
|
6316
|
+
const shouldExit = await checkAndUpgrade("9.109.0", prompt);
|
|
6317
6317
|
if (shouldExit) {
|
|
6318
6318
|
process.exit(0);
|
|
6319
6319
|
}
|
|
@@ -7080,13 +7080,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
7080
7080
|
if (latestVersion === null) {
|
|
7081
7081
|
throw new Error("Could not check for updates. Please try again later.");
|
|
7082
7082
|
}
|
|
7083
|
-
if (latestVersion === "9.
|
|
7084
|
-
console.log(source_default.green(`\u2713 Already up to date (${"9.
|
|
7083
|
+
if (latestVersion === "9.109.0") {
|
|
7084
|
+
console.log(source_default.green(`\u2713 Already up to date (${"9.109.0"})`));
|
|
7085
7085
|
return;
|
|
7086
7086
|
}
|
|
7087
7087
|
console.log(
|
|
7088
7088
|
source_default.yellow(
|
|
7089
|
-
`Current version: ${"9.
|
|
7089
|
+
`Current version: ${"9.109.0"} -> Latest version: ${latestVersion}`
|
|
7090
7090
|
)
|
|
7091
7091
|
);
|
|
7092
7092
|
console.log();
|
|
@@ -7113,7 +7113,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
7113
7113
|
const success = await performUpgrade(packageManager);
|
|
7114
7114
|
if (success) {
|
|
7115
7115
|
console.log(
|
|
7116
|
-
source_default.green(`\u2713 Upgraded from ${"9.
|
|
7116
|
+
source_default.green(`\u2713 Upgraded from ${"9.109.0"} to ${latestVersion}`)
|
|
7117
7117
|
);
|
|
7118
7118
|
return;
|
|
7119
7119
|
}
|
|
@@ -7180,7 +7180,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
|
|
|
7180
7180
|
|
|
7181
7181
|
// src/index.ts
|
|
7182
7182
|
var program = new Command();
|
|
7183
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
7183
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.109.0");
|
|
7184
7184
|
program.addCommand(authCommand);
|
|
7185
7185
|
program.addCommand(infoCommand);
|
|
7186
7186
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -11,9 +11,11 @@ import {
|
|
|
11
11
|
Option,
|
|
12
12
|
__toESM,
|
|
13
13
|
allowsCustomModel,
|
|
14
|
+
appendVoiceChatContextEvent,
|
|
14
15
|
completeSlackFileUpload,
|
|
15
16
|
configureGlobalProxyFromEnv,
|
|
16
17
|
connectorTypeSchema,
|
|
18
|
+
createPhoneCall,
|
|
17
19
|
createSkill,
|
|
18
20
|
createZeroAgent,
|
|
19
21
|
createZeroComputerConnector,
|
|
@@ -49,11 +51,13 @@ import {
|
|
|
49
51
|
getDefaultAuthMethod,
|
|
50
52
|
getDefaultModel,
|
|
51
53
|
getModels,
|
|
54
|
+
getPhoneCallDetail,
|
|
52
55
|
getScopeDiff,
|
|
53
56
|
getSecretsForAuthMethod,
|
|
54
57
|
getSelectableProviderTypes,
|
|
55
58
|
getSkill,
|
|
56
59
|
getToken,
|
|
60
|
+
getVoiceChatContextEvents,
|
|
57
61
|
getZeroAgent,
|
|
58
62
|
getZeroAgentInstructions,
|
|
59
63
|
getZeroAgentUserConnectors,
|
|
@@ -75,6 +79,7 @@ import {
|
|
|
75
79
|
isInteractive,
|
|
76
80
|
isUUID,
|
|
77
81
|
leaveZeroOrg,
|
|
82
|
+
listPhoneCalls,
|
|
78
83
|
listSkills,
|
|
79
84
|
listZeroAgents,
|
|
80
85
|
listZeroConnectors,
|
|
@@ -123,7 +128,7 @@ import {
|
|
|
123
128
|
upsertZeroOrgModelProvider,
|
|
124
129
|
withErrorHandler,
|
|
125
130
|
zeroAgentCustomSkillNameSchema
|
|
126
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-WJ6BDJIT.js";
|
|
127
132
|
|
|
128
133
|
// src/zero.ts
|
|
129
134
|
init_esm_shims();
|
|
@@ -5751,6 +5756,198 @@ Examples:
|
|
|
5751
5756
|
);
|
|
5752
5757
|
var zeroComputerUseCommand = new Command().name("computer-use").description("Remote desktop control for cloud agents").addCommand(hostCommand).addCommand(clientCommand);
|
|
5753
5758
|
|
|
5759
|
+
// src/commands/zero/phone/index.ts
|
|
5760
|
+
init_esm_shims();
|
|
5761
|
+
|
|
5762
|
+
// src/commands/zero/phone/call.ts
|
|
5763
|
+
init_esm_shims();
|
|
5764
|
+
var callCommand = new Command().name("call").description("Initiate an outbound phone call").argument(
|
|
5765
|
+
"<to-number>",
|
|
5766
|
+
"Phone number to call (E.164 format, e.g. +14155551234)"
|
|
5767
|
+
).option("--greeting <message>", "Initial greeting when the recipient answers").option(
|
|
5768
|
+
"--system-prompt <prompt>",
|
|
5769
|
+
"Override the agent's system prompt for this call"
|
|
5770
|
+
).action(
|
|
5771
|
+
withErrorHandler(
|
|
5772
|
+
async (toNumber, options) => {
|
|
5773
|
+
if (!/^\+[1-9]\d{1,14}$/.test(toNumber)) {
|
|
5774
|
+
console.error(
|
|
5775
|
+
source_default.red(
|
|
5776
|
+
"Invalid phone number format. Use E.164 (e.g. +14155551234)"
|
|
5777
|
+
)
|
|
5778
|
+
);
|
|
5779
|
+
process.exit(1);
|
|
5780
|
+
}
|
|
5781
|
+
const result = await createPhoneCall({
|
|
5782
|
+
toNumber,
|
|
5783
|
+
greeting: options.greeting,
|
|
5784
|
+
systemPrompt: options.systemPrompt
|
|
5785
|
+
});
|
|
5786
|
+
console.log(source_default.green("Call initiated"));
|
|
5787
|
+
console.log(` ${"Call ID:".padEnd(12)}${source_default.cyan(result.callId)}`);
|
|
5788
|
+
console.log(` ${"Status:".padEnd(12)}${result.status}`);
|
|
5789
|
+
}
|
|
5790
|
+
)
|
|
5791
|
+
);
|
|
5792
|
+
|
|
5793
|
+
// src/commands/zero/phone/record.ts
|
|
5794
|
+
init_esm_shims();
|
|
5795
|
+
function printTranscript(transcript) {
|
|
5796
|
+
if (Array.isArray(transcript)) {
|
|
5797
|
+
for (const entry of transcript) {
|
|
5798
|
+
if (typeof entry === "string") {
|
|
5799
|
+
console.log(` ${entry}`);
|
|
5800
|
+
} else if (typeof entry === "object" && entry !== null) {
|
|
5801
|
+
const e = entry;
|
|
5802
|
+
const role = e.role ?? e.speaker ?? "Unknown";
|
|
5803
|
+
const text = e.text ?? e.content ?? e.body ?? "";
|
|
5804
|
+
console.log(` ${source_default.dim(`[${role}]`)} ${text}`);
|
|
5805
|
+
}
|
|
5806
|
+
}
|
|
5807
|
+
} else if (typeof transcript === "string") {
|
|
5808
|
+
console.log(` ${transcript}`);
|
|
5809
|
+
} else {
|
|
5810
|
+
console.log(` ${JSON.stringify(transcript, null, 2)}`);
|
|
5811
|
+
}
|
|
5812
|
+
}
|
|
5813
|
+
function printCallInfo(call, callId) {
|
|
5814
|
+
console.log(
|
|
5815
|
+
` ${"Call ID:".padEnd(16)}${source_default.cyan(String(call.id ?? callId))}`
|
|
5816
|
+
);
|
|
5817
|
+
console.log(
|
|
5818
|
+
` ${"From:".padEnd(16)}${String(call.fromNumber ?? call.from_number ?? "")}`
|
|
5819
|
+
);
|
|
5820
|
+
console.log(
|
|
5821
|
+
` ${"To:".padEnd(16)}${String(call.toNumber ?? call.to_number ?? "")}`
|
|
5822
|
+
);
|
|
5823
|
+
console.log(` ${"Status:".padEnd(16)}${String(call.status ?? "")}`);
|
|
5824
|
+
console.log(
|
|
5825
|
+
` ${"Duration:".padEnd(16)}${String(call.durationSeconds ?? call.duration_seconds ?? "N/A")}s`
|
|
5826
|
+
);
|
|
5827
|
+
console.log(
|
|
5828
|
+
` ${"Started:".padEnd(16)}${String(call.startedAt ?? call.started_at ?? "")}`
|
|
5829
|
+
);
|
|
5830
|
+
}
|
|
5831
|
+
async function showCallDetail(callId) {
|
|
5832
|
+
const result = await getPhoneCallDetail(callId);
|
|
5833
|
+
console.log(source_default.bold("Call Detail"));
|
|
5834
|
+
console.log();
|
|
5835
|
+
printCallInfo(result.call, callId);
|
|
5836
|
+
console.log();
|
|
5837
|
+
console.log(source_default.bold("Transcript"));
|
|
5838
|
+
console.log();
|
|
5839
|
+
printTranscript(result.transcript);
|
|
5840
|
+
}
|
|
5841
|
+
async function showCallList(limit) {
|
|
5842
|
+
const result = await listPhoneCalls({ limit });
|
|
5843
|
+
if (result.data.length === 0) {
|
|
5844
|
+
console.log(source_default.dim("No phone calls found"));
|
|
5845
|
+
return;
|
|
5846
|
+
}
|
|
5847
|
+
console.log(source_default.bold("Recent Calls"));
|
|
5848
|
+
console.log();
|
|
5849
|
+
for (const call of result.data) {
|
|
5850
|
+
const id = String(call.id ?? "");
|
|
5851
|
+
const from = String(call.fromNumber ?? call.from_number ?? "");
|
|
5852
|
+
const to = String(call.toNumber ?? call.to_number ?? "");
|
|
5853
|
+
const status = String(call.status ?? "");
|
|
5854
|
+
const duration = call.durationSeconds ?? call.duration_seconds;
|
|
5855
|
+
const snippet = String(
|
|
5856
|
+
call.lastTranscriptSnippet ?? call.last_transcript_snippet ?? ""
|
|
5857
|
+
);
|
|
5858
|
+
console.log(` ${source_default.cyan(id)}`);
|
|
5859
|
+
console.log(
|
|
5860
|
+
` ${from} \u2192 ${to} ${source_default.dim(status)}${duration != null ? ` ${duration}s` : ""}`
|
|
5861
|
+
);
|
|
5862
|
+
if (snippet) {
|
|
5863
|
+
console.log(` ${source_default.dim(snippet.slice(0, 80))}`);
|
|
5864
|
+
}
|
|
5865
|
+
console.log();
|
|
5866
|
+
}
|
|
5867
|
+
console.log(
|
|
5868
|
+
source_default.dim(`Showing ${result.data.length} of ${result.total} call(s)`)
|
|
5869
|
+
);
|
|
5870
|
+
}
|
|
5871
|
+
var recordCommand = new Command().name("record").description("View phone call history and transcripts").argument("[call-id]", "Call ID to view details (omit to list recent calls)").option("-n, --limit <number>", "Number of calls to show", "10").action(
|
|
5872
|
+
withErrorHandler(
|
|
5873
|
+
async (callId, options) => {
|
|
5874
|
+
if (callId) {
|
|
5875
|
+
await showCallDetail(callId);
|
|
5876
|
+
} else {
|
|
5877
|
+
const limit = parseInt(options.limit, 10) || 10;
|
|
5878
|
+
await showCallList(limit);
|
|
5879
|
+
}
|
|
5880
|
+
}
|
|
5881
|
+
)
|
|
5882
|
+
);
|
|
5883
|
+
|
|
5884
|
+
// src/commands/zero/phone/index.ts
|
|
5885
|
+
var zeroPhoneCommand = new Command().name("phone").description("Make and manage phone calls").addCommand(callCommand).addCommand(recordCommand);
|
|
5886
|
+
|
|
5887
|
+
// src/commands/zero/voice-chat/index.ts
|
|
5888
|
+
init_esm_shims();
|
|
5889
|
+
|
|
5890
|
+
// src/commands/zero/voice-chat/context/index.ts
|
|
5891
|
+
init_esm_shims();
|
|
5892
|
+
|
|
5893
|
+
// src/commands/zero/voice-chat/context/get.ts
|
|
5894
|
+
init_esm_shims();
|
|
5895
|
+
var voiceChatContextGetCommand = new Command().name("get").description("Read shared context events for a voice-chat session").argument("<session-id>", "Voice-chat session ID").option(
|
|
5896
|
+
"--after <seq>",
|
|
5897
|
+
"Only return events after this sequence number",
|
|
5898
|
+
parseInt
|
|
5899
|
+
).action(
|
|
5900
|
+
withErrorHandler(async (sessionId, options) => {
|
|
5901
|
+
const data = await getVoiceChatContextEvents(sessionId, options.after);
|
|
5902
|
+
console.log(JSON.stringify(data, null, 2));
|
|
5903
|
+
})
|
|
5904
|
+
);
|
|
5905
|
+
|
|
5906
|
+
// src/commands/zero/voice-chat/context/append.ts
|
|
5907
|
+
init_esm_shims();
|
|
5908
|
+
import { readFileSync as readFileSync6 } from "fs";
|
|
5909
|
+
var voiceChatContextAppendCommand = new Command().name("append").description("Append an event to voice-chat shared context").argument("<session-id>", "Voice-chat session ID").requiredOption(
|
|
5910
|
+
"--source <source>",
|
|
5911
|
+
"Event source (system|user|talker|worker)"
|
|
5912
|
+
).requiredOption("--type <type>", "Event type").option(
|
|
5913
|
+
"--content <content>",
|
|
5914
|
+
"Event content (reads from stdin if not provided)"
|
|
5915
|
+
).addHelpText(
|
|
5916
|
+
"after",
|
|
5917
|
+
`
|
|
5918
|
+
Examples:
|
|
5919
|
+
Append with content: zero voice-chat context append <session-id> --source worker --type result --content "Done"
|
|
5920
|
+
Pipe from stdin: echo "Done" | zero voice-chat context append <session-id> --source worker --type result`
|
|
5921
|
+
).action(
|
|
5922
|
+
withErrorHandler(
|
|
5923
|
+
async (sessionId, options) => {
|
|
5924
|
+
let content = options.content;
|
|
5925
|
+
if (!content && process.stdin.isTTY === false) {
|
|
5926
|
+
content = readFileSync6("/dev/stdin", "utf8").trim();
|
|
5927
|
+
}
|
|
5928
|
+
const data = await appendVoiceChatContextEvent(sessionId, {
|
|
5929
|
+
source: options.source,
|
|
5930
|
+
type: options.type,
|
|
5931
|
+
content
|
|
5932
|
+
});
|
|
5933
|
+
console.log(JSON.stringify(data, null, 2));
|
|
5934
|
+
}
|
|
5935
|
+
)
|
|
5936
|
+
);
|
|
5937
|
+
|
|
5938
|
+
// src/commands/zero/voice-chat/context/index.ts
|
|
5939
|
+
var voiceChatContextCommand = new Command().name("context").description("Read and write voice-chat shared context").addCommand(voiceChatContextGetCommand).addCommand(voiceChatContextAppendCommand);
|
|
5940
|
+
|
|
5941
|
+
// src/commands/zero/voice-chat/index.ts
|
|
5942
|
+
var zeroVoiceChatCommand = new Command().name("voice-chat").description("Read and write voice-chat shared context events").addCommand(voiceChatContextCommand).addHelpText(
|
|
5943
|
+
"after",
|
|
5944
|
+
`
|
|
5945
|
+
Examples:
|
|
5946
|
+
Read all events: zero voice-chat context get <session-id>
|
|
5947
|
+
Read new events: zero voice-chat context get <session-id> --after 5
|
|
5948
|
+
Append an event: zero voice-chat context append <session-id> --source worker --type result --content "Done"`
|
|
5949
|
+
);
|
|
5950
|
+
|
|
5754
5951
|
// src/zero.ts
|
|
5755
5952
|
var COMMAND_CAPABILITY_MAP = {
|
|
5756
5953
|
agent: "agent:read",
|
|
@@ -5764,7 +5961,9 @@ var COMMAND_CAPABILITY_MAP = {
|
|
|
5764
5961
|
whoami: null,
|
|
5765
5962
|
"ask-user": null,
|
|
5766
5963
|
"developer-support": null,
|
|
5767
|
-
"computer-use": "computer-use:write"
|
|
5964
|
+
"computer-use": "computer-use:write",
|
|
5965
|
+
phone: "phone:write",
|
|
5966
|
+
"voice-chat": "voice-chat:write"
|
|
5768
5967
|
};
|
|
5769
5968
|
var DEFAULT_COMMANDS = [
|
|
5770
5969
|
zeroOrgCommand,
|
|
@@ -5782,7 +5981,9 @@ var DEFAULT_COMMANDS = [
|
|
|
5782
5981
|
zeroAskUserCommand,
|
|
5783
5982
|
zeroSkillCommand,
|
|
5784
5983
|
zeroDeveloperSupportCommand,
|
|
5785
|
-
zeroComputerUseCommand
|
|
5984
|
+
zeroComputerUseCommand,
|
|
5985
|
+
zeroPhoneCommand,
|
|
5986
|
+
zeroVoiceChatCommand
|
|
5786
5987
|
];
|
|
5787
5988
|
function shouldHideCommand(name, payload) {
|
|
5788
5989
|
if (!payload) return false;
|
|
@@ -5801,7 +6002,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
5801
6002
|
var program = new Command();
|
|
5802
6003
|
program.name("zero").description(
|
|
5803
6004
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
5804
|
-
).version("9.
|
|
6005
|
+
).version("9.109.0").addHelpText(
|
|
5805
6006
|
"after",
|
|
5806
6007
|
`
|
|
5807
6008
|
Examples:
|