openmates 0.18.0-alpha.20 → 0.18.0-alpha.22

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/README.md CHANGED
@@ -54,6 +54,21 @@ openmates whoami --json
54
54
  The CLI displays a QR code or pair PIN. Approve it in the OpenMates web app.
55
55
  During login, the CLI never asks for your account password.
56
56
 
57
+ Switch to a dev account using an isolated profile; upgrading to an alpha release
58
+ preserves your existing login and does not change the API server:
59
+
60
+ ```bash
61
+ openmates --profile dev --api-url https://api.dev.openmates.org login
62
+ export OPENMATES_PROFILE=dev
63
+ openmates whoami
64
+ ```
65
+
66
+ Approve pairing in the dev web app with your dev account. The profile saves the
67
+ API URL. Run `unset OPENMATES_PROFILE` to return to the default profile, keeping
68
+ its existing production login. Without an environment selection, pass
69
+ `--profile dev` on each dev command. Release/update channels and login profiles
70
+ are independent.
71
+
57
72
  Create a new account from the terminal:
58
73
 
59
74
  ```bash
@@ -81735,18 +81735,26 @@ async function handleCodeRun(client, flags, apiKey) {
81735
81735
  try {
81736
81736
  finalStatus = await streamCodeRunToTerminal(url, flags.json === true);
81737
81737
  } catch (err) {
81738
- if (!streamAuth.fallbackToken || streamAuth.fallbackToken === streamAuth.token) throw err;
81739
- const fallbackUrl = buildCodeRunStreamUrl({
81740
- apiUrl: client.apiUrl,
81741
- executionId: result.execution_id,
81742
- sessionId: streamAuth.sessionId,
81743
- token: streamAuth.fallbackToken
81744
- });
81745
- finalStatus = await streamCodeRunToTerminal(fallbackUrl, flags.json === true);
81738
+ try {
81739
+ if (!streamAuth.fallbackToken || streamAuth.fallbackToken === streamAuth.token) throw err;
81740
+ const fallbackUrl = buildCodeRunStreamUrl({
81741
+ apiUrl: client.apiUrl,
81742
+ executionId: result.execution_id,
81743
+ sessionId: streamAuth.sessionId,
81744
+ token: streamAuth.fallbackToken
81745
+ });
81746
+ finalStatus = await streamCodeRunToTerminal(fallbackUrl, flags.json === true);
81747
+ } catch {
81748
+ usedStream = false;
81749
+ process.stderr.write(`Code Run live stream unavailable; polling execution ${result.execution_id}. No new run started.
81750
+ `);
81751
+ finalStatus = await pollCodeRunStatus(client, result.status_path, apiKey, flags.json === true);
81752
+ }
81746
81753
  }
81747
81754
  } else {
81748
81755
  finalStatus = await pollCodeRunStatus(client, result.status_path, apiKey, flags.json === true);
81749
81756
  }
81757
+ if (usedStream) finalStatus = await client.getCodeRunStatus(result.status_path, apiKey);
81750
81758
  const localFiles = finalStatus.status === "finished" && finalStatus.exit_code === 0 ? await downloadGeneratedFiles(finalStatus, downloadOptions) : [];
81751
81759
  if (flags.json === true) {
81752
81760
  printJson2({ ...result, final: finalStatus, ...localFiles.length ? { local_files: localFiles } : {} });
@@ -84188,7 +84196,7 @@ function parseArgs(argv) {
84188
84196
  const positionals = [];
84189
84197
  const flags = {};
84190
84198
  for (let i = 0; i < argv.length; i += 1) {
84191
- const arg = argv[i];
84199
+ const arg = ["-v", "-version"].includes(argv[i]) ? "--version" : argv[i];
84192
84200
  if (!arg.startsWith("--")) {
84193
84201
  positionals.push(arg);
84194
84202
  continue;
@@ -86241,7 +86249,10 @@ Use @mentions in chat messages:
86241
86249
  openmates chats new "@Code-Projects review my architecture"`);
86242
86250
  }
86243
86251
  function printHelp() {
86244
- console.log(`OpenMates CLI
86252
+ const version = getCliPackageVersion();
86253
+ const releaseBranch = version === "unknown" ? "unknown" : version.includes("-") ? "dev" : "main";
86254
+ console.log(`OpenMates CLI ${version}
86255
+ Release branch: ${releaseBranch}
86245
86256
 
86246
86257
  Commands:
86247
86258
  openmates login Pair-auth login
@@ -86285,13 +86296,15 @@ Flags:
86285
86296
  --profile <name> Use an isolated login profile (also OPENMATES_PROFILE)
86286
86297
  --api-url <url> Override API base URL (default: installed self-host server, then https://api.openmates.org)
86287
86298
  --api-key <key> Optional API key override (or set OPENMATES_API_KEY)
86288
- --version Show CLI version and update availability
86299
+ --version, -v, -version Show CLI version and update availability
86289
86300
  --help Show contextual help for any command`);
86290
86301
  }
86291
86302
  function printVersionHelp() {
86292
86303
  console.log(`OpenMates CLI version command:
86293
86304
  openmates version [--json]
86294
86305
  openmates --version [--json]
86306
+ openmates -v [--json]
86307
+ openmates -version [--json]
86295
86308
 
86296
86309
  Prints the installed CLI version, checks the latest npm version, and shows the
86297
86310
  upgrade command when an update is available.
package/dist/cli.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  resolveProjectContext,
12
12
  serializeToYaml,
13
13
  shouldRequireTrustedAccountGuard
14
- } from "./chunk-VJRT2LPY.js";
14
+ } from "./chunk-YRJHL6CY.js";
15
15
  import "./chunk-IWKP55ZB.js";
16
16
  import "./chunk-BBKJZ23O.js";
17
17
  export {
package/dist/index.js CHANGED
@@ -42,7 +42,7 @@ import {
42
42
  selectAssistantMessagesForSpeech,
43
43
  serializeToYaml,
44
44
  summarizeAssistantSpeech
45
- } from "./chunk-VJRT2LPY.js";
45
+ } from "./chunk-YRJHL6CY.js";
46
46
  import "./chunk-IWKP55ZB.js";
47
47
  import "./chunk-BBKJZ23O.js";
48
48
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmates",
3
- "version": "0.18.0-alpha.20",
3
+ "version": "0.18.0-alpha.22",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",