@corvio/cli 0.1.0-beta.18 → 0.1.0-beta.19

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.
Files changed (3) hide show
  1. package/README.md +3 -2
  2. package/dist/cli.js +27 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Corvio Workspace CLI
2
2
 
3
- Official CLI for a user's Corvio Workspace. It supports an existing `CORVIO_API_KEY` and a browser device-link login.
3
+ Official CLI for a user's Corvio Workspace. It supports an existing `CORVIO_API_KEY` and a browser device-link login. In a connected
4
+ host, use the accompanying `corvio-operate-workspace` Skill so every non-trivial task begins with a lightweight Corvio grounding check.
4
5
 
5
6
  ```bash
6
7
  npm install --global @corvio/cli@beta
@@ -16,7 +17,7 @@ corvio sync init --dir ./knowledge --root-node-id <node_id> --json
16
17
  corvio update check --json
17
18
  ```
18
19
 
19
- When no environment key is configured, run `corvio auth login`. Login creates one user-level `cvu_` control-plane credential; it does not freeze the browser's current Workspace. Run `corvio agents connect --project .` from the project you want to expose. The command verifies the selected Codex, Claude Code, or Copilot host before server mutation, then idempotently creates or restores the Agent for that provider/device/project binding, grants current/future Workspace coverage under live membership/role and ACL limits, saves the one-time `cvg_` in a `0600` multi-binding registry, and starts that project's listener. `corvio collaboration status` then checks a separate foreground requirement: the current host must also discover the official Skill at the live server contract version. A listener receives inbound `@Agent` work; it does not make an unrelated foreground coding session collaborate automatically. Another project gets another Agent. Ordinary data commands prefer the binding whose root contains the current directory. Use `corvio workspaces use`, `--workspace`, and `--agent` as explicit routing/reproducibility controls. Legacy Workspace-bound `cvk_`, `cvg_`, and version-1 credential files remain compatible and are never widened. Local sync stores only credential-free handles and revision/hash baselines in `.corvio/state.json`; Markdown lives below `corvio_docs/`, and conflicts require explicit resolution. Update checks compare npm's published `beta` tag with the API compatibility policy but never self-install. See [the Corvio CLI guide](https://corvio.ai/developers/cli) for the full command and receipt contract.
20
+ When no environment key is configured, run `corvio auth login`. Login creates one user-level `cvu_` control-plane credential; it does not freeze the browser's current Workspace. Run `corvio agents connect --project .` from the project you want to expose. The command verifies the selected Codex, Claude Code, or Copilot host before server mutation, then idempotently creates or restores the Agent for that provider/device/project binding, grants current/future Workspace coverage under live membership/role and ACL limits, saves the one-time `cvg_` in a `0600` multi-binding registry, and starts that project's listener. `corvio collaboration status` then checks a separate foreground requirement: the current host must also discover the official Skill at the live server contract version. A listener receives inbound `@Agent` work; it does not make an unrelated foreground coding session collaborate automatically. Another project gets another Agent. Ordinary data commands prefer the binding whose root contains the current directory, then a locally confirmed selection, the account selection, the personal default, or one authorized candidate. They ask only on real ambiguity. Use `corvio workspaces use`, `--workspace`, and `--agent` as explicit routing/reproducibility controls. Legacy Workspace-bound `cvk_`, `cvg_`, and version-1 credential files remain compatible and are never widened. Local sync stores only credential-free handles and revision/hash baselines in `.corvio/state.json`; Markdown lives below `corvio_docs/`, and conflicts require explicit resolution. Update checks compare npm's published `beta` tag with the API compatibility policy but never self-install. See [the Corvio CLI guide](https://corvio.ai/developers/cli) for the full command and receipt contract.
20
21
 
21
22
  CLI and Skill updates are independent. `corvio update check` checks the CLI package only. `corvio collaboration status` detects a missing
22
23
  official Skill or a shared-contract mismatch, but not every content-only package revision. The canonical website zip is a static local
package/dist/cli.js CHANGED
@@ -39,7 +39,7 @@ import {
39
39
  agentCredentialPath,
40
40
  } from "./core.js";
41
41
 
42
- const VERSION = "0.1.0-beta.18";
42
+ const VERSION = "0.1.0-beta.19";
43
43
  const DEFAULT_API_BASE = "https://api.corvio.ai/v1";
44
44
  const DEFAULT_APP_BASE = "https://corvio.ai";
45
45
  const USER_AGENT = `corvio-cli/${VERSION}`;
@@ -380,7 +380,14 @@ function routingReceipt(selection, { continuity = false } = {}) {
380
380
  : preference?.provenance || selection?.source || "runtime",
381
381
  confidence: Number.isFinite(Number(preference?.confidence))
382
382
  ? Number(preference.confidence)
383
- : ["option", "environment", "legacy_credential", "single_candidate"].includes(selection?.source)
383
+ : [
384
+ "option",
385
+ "environment",
386
+ "legacy_credential",
387
+ "account_selection",
388
+ "personal_default",
389
+ "single_candidate",
390
+ ].includes(selection?.source)
384
391
  ? 1
385
392
  : 0.9,
386
393
  scope: preference?.scope || (continuity ? "conversation" : "operation"),
@@ -467,7 +474,24 @@ async function executionClient(options, { semanticText = "", continuityId = null
467
474
  });
468
475
  const response = await discovery.request("/workspaces");
469
476
  const workspaces = Array.isArray(response?.data) ? response.data : [];
470
- if (workspaces.length === 1) {
477
+ const accountSelectedId = `${response?.selected_workspace_id || ""}`.trim();
478
+ const selectedCandidates = workspaces.filter(
479
+ (workspace) => workspace.is_selected === true || (accountSelectedId && workspace.id === accountSelectedId),
480
+ );
481
+ const defaultCandidates = workspaces.filter((workspace) => workspace.is_default === true);
482
+ if (selectedCandidates.length === 1) {
483
+ selection = {
484
+ workspaceId: selectedCandidates[0].id,
485
+ workspaceName: selectedCandidates[0].name,
486
+ source: "account_selection",
487
+ };
488
+ } else if (defaultCandidates.length === 1) {
489
+ selection = {
490
+ workspaceId: defaultCandidates[0].id,
491
+ workspaceName: defaultCandidates[0].name,
492
+ source: "personal_default",
493
+ };
494
+ } else if (workspaces.length === 1) {
471
495
  selection = { workspaceId: workspaces[0].id, workspaceName: workspaces[0].name, source: "single_candidate" };
472
496
  } else if (workspaces.length > 1 && semanticText.trim()) {
473
497
  const normalized = semanticText.toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corvio/cli",
3
- "version": "0.1.0-beta.18",
3
+ "version": "0.1.0-beta.19",
4
4
  "description": "Official Corvio Workspace CLI for questions, knowledge search, documents, and Agent workflows.",
5
5
  "type": "module",
6
6
  "bin": {