@corvio/cli 0.1.0-beta.17 → 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.
- package/README.md +9 -2
- package/dist/cli.js +27 -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,13 @@ 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.
|
|
21
|
+
|
|
22
|
+
CLI and Skill updates are independent. `corvio update check` checks the CLI package only. `corvio collaboration status` detects a missing
|
|
23
|
+
official Skill or a shared-contract mismatch, but not every content-only package revision. The canonical website zip is a static local
|
|
24
|
+
copy and is not currently update-tracked by `npx skills update`; rerun its official `npx skills add` command in the same project/global
|
|
25
|
+
scope for exact freshness, start a new host session, then rerun `corvio collaboration status`. Remote MCP changes are server-delivered and
|
|
26
|
+
normally need only a refreshed host session unless new OAuth scopes require reauthorization.
|
|
20
27
|
|
|
21
28
|
The CLI rejects unknown/duplicate options and malformed integer bounds before network access. Normal API calls have a bounded timeout (`CORVIO_REQUEST_TIMEOUT_MS`, maximum ten minutes); only reads, explicit idempotency contracts, revision guards, and other owner-declared safe operations retry automatically. Document updates preflight the current revision when `--expected-revision` is omitted. When the executing principal is a connected Agent, `docs update` also requires `--change-summary`, creates a visible document-level comment after the guarded write, and returns its receipt; a comment failure is reported as a partial effect rather than silent success. When a Corvio document or comment supplied the task, use `corvio agent closeout` to return the verified outcome, optionally resolve the thread, and read both document and thread back. Downloads, uploads, and Markdown pulls verify SHA-256 receipts before replacing local files; local writes are atomic, remote default filenames cannot escape the current directory, and Sync refuses symbolic-link traversal while checkpointing each successful push.
|
|
22
29
|
|
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.
|
|
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
|
-
: [
|
|
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
|
-
|
|
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();
|