@corvio/cli 0.1.0-beta.27 → 0.1.0-beta.29
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 +1 -1
- package/dist/cli.js +11 -4
- package/dist/core.js +19 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ corvio sync init --dir ./knowledge --root-node-id <node_id> --json
|
|
|
21
21
|
corvio update check --json
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
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 local foreground prerequisites and reports package freshness, contract compatibility, installation ownership, every discoverable copy, and the fact that host loading is not observable. 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.
|
|
24
|
+
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 local foreground prerequisites and reports package freshness, contract compatibility, installation ownership, every discoverable copy, and the fact that host loading is not observable. 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. `corvio capabilities` reads only Corvio API capability and compatibility facts, so discovery remains usable in hosts that deny npm registry access. `corvio update check` is the explicit registry-backed version check; it never self-installs. See [the Corvio CLI guide](https://corvio.ai/developers/cli) for the full command and receipt contract.
|
|
25
25
|
|
|
26
26
|
CLI and Skill updates are independent. `corvio update check` checks the CLI package only. `corvio collaboration status` detects a missing,
|
|
27
27
|
incompatible, compatible-but-not-current, or conflicting local Skill, but never mutates host directories. Use
|
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.29";
|
|
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}`;
|
|
@@ -180,7 +180,7 @@ const COMMAND_HELP = Object.freeze({
|
|
|
180
180
|
questions: `Usage:\n corvio questions list [--limit <n>] [--cursor <cursor>] [--conversation-id <id>]\n corvio questions get <question-id>`,
|
|
181
181
|
conversations: `Usage:\n corvio conversations list [--limit <n>] [--cursor <cursor>]\n corvio conversations get <conversation-id>`,
|
|
182
182
|
search: `Usage: corvio search <query> [--limit <n>] [--page-id <id>] [--node-id <id>]`,
|
|
183
|
-
docs: `Usage:\n corvio docs list [--limit <n>] [--cursor <cursor>] [--lifecycle active|archived]\n corvio docs get <id> [--output <path>]\n corvio docs table-read <id> [--table-id <id>] [--after-row-id <id>] [--limit <1-100>]\n corvio docs table-mutate <id> --input <json> --yes [--operation-id <id>] [--change-summary <text>]\n corvio docs create --title <title> [--file <path>|--markdown <text>] [--parent-node-id <id>] [--idempotency-key <key>]\n corvio docs update <id> [--title <title>] [--file <path>|--markdown <text>] [--expected-revision <n>] [--change-summary <text>]\n corvio docs move <id> --parent-node-id <id>\n corvio docs archive <id> --yes\n corvio docs restore <id> --yes\n corvio docs share <id> --yes [--display-name <name>]\n corvio docs open <id>\n\nA selected Markdown file is uploaded once as a provenance-preserving Asset, then its source_asset_id becomes an editable Page without resending the body; inspect the returned document ID, node ID, revision, and URL. Other formats or semantic restructuring belong to \`corvio files organize\` or \`corvio ask --allow-actions\`. \`docs update\` replaces
|
|
183
|
+
docs: `Usage:\n corvio docs list [--limit <n>] [--cursor <cursor>] [--lifecycle active|archived]\n corvio docs get <id> [--output <path>]\n corvio docs table-read <id> [--table-id <id>] [--after-row-id <id>] [--limit <1-100>]\n corvio docs table-mutate <id> --input <json> --yes [--operation-id <id>] [--change-summary <text>]\n corvio docs create --title <title> [--file <path>|--markdown <text>] [--parent-node-id <id>] [--idempotency-key <key>]\n corvio docs update <id> [--title <title>] [--file <path>|--markdown <text>] [--expected-revision <n>] [--change-summary <text>]\n corvio docs move <id> --parent-node-id <id>\n corvio docs archive <id> --yes\n corvio docs restore <id> --yes\n corvio docs share <id> --yes [--display-name <name>]\n corvio docs open <id>\n\nA selected Markdown file is uploaded once as a provenance-preserving Asset, then its source_asset_id becomes an editable Page without resending the body; inspect the returned document ID, node ID, revision, and URL. Other formats or semantic restructuring belong to \`corvio files organize\` or \`corvio ask --allow-actions\`. \`docs update\` replaces a non-Project Page body: use it only when whole-body replacement is the smallest faithful change. A Project is a structure container, so direct body replacement returns \`project_structure_container_body_write_disabled\`; use \`files organize\` or \`ask --allow-actions\` for Work Model maintenance, or update a child Page. A title-only Project rename remains valid. Delegate large localized semantic edits, reorder, splice, or formatting to \`corvio ask --allow-actions\` with the canonical document handle. Use table-read plus table-mutate for bounded stable-ID cell updates or row appends without round-tripping a whole document. \`docs move\` accepts a non-Project document and a Project destination; Projects stay at the Workspace root and cannot be nested. Use \`corvio files organize\` or \`corvio ask --allow-actions\` when deeper structure needs semantic branch Pages and leaves. Agent-authenticated document changes require --change-summary and create a visible document-level comment after the guarded update. When a document/comment is the task owner, use \`corvio agent closeout\` to return verified work to that same collaboration surface and read it back.`,
|
|
184
184
|
projects: `Usage:\n corvio projects list [--limit <n>]\n corvio projects create --title <title> [--idempotency-key <key>]\n\nProjects are durable root-level grouping owners in the Corvio Docs tree and cannot be nested under another Project. Reuse a matching Project instead of creating one ceremonial Project per file; use semantic branch Pages and leaves for deeper Work Models. 'corvio folders' is an alias.`,
|
|
185
185
|
files: `Usage:\n corvio files list [--limit <n>]\n corvio files get <id> [--content]\n corvio files download <id> [--output <path>]\n corvio files upload --file <path> [--mime-type <type>] [--organize --instruction <text> --additional-asset-ids <id,id> --yes]\n corvio files organize <id> --instruction <text> --yes [--additional-asset-ids <id,id>] [--processing-profile auto|economy|standard|deep] [--scan-mode auto|always|off] [--skills-extraction-mode auto|always|off]\n corvio files operation <operation-id>\n corvio files resume <operation-id> --yes\n corvio files cancel <operation-id> --yes\n corvio files open <id>\n\nUse --content only when source facts are needed. It returns one bounded AI-safe projection with hash, completeness, and truncation receipts; it does not rewrite or materialize the original. Upload alone preserves the exact original, provenance, hash, policy, and stable Asset ID. Organization is a separate asynchronous value step: one coherent source set can produce reader-facing structure, source reconciliation, Memory candidates, and qualifying Project Skills. Pass --instruction a weak natural goal plus explicit user constraints and only authority facts needed to prevent wrong identity or scope. Keep source-derived facts in the source; do not precompute an outline, edit checklist, taxonomy, titles, artifact count, or sole leaf target from current visibility. For a newly finalized Asset that should enter a Work Model or Skill evaluation, use organize directly instead of duplicate ask requests just to await processing. Use 'files operation' to reach terminal and inspect output_document plus skills_evaluation; always requires evaluation but may correctly return evaluated_no_qualifying_skill. Resume reuses the same durable operation after resolving its blocker; cancel is idempotent.`,
|
|
186
186
|
sync: `Usage:\n corvio sync init --root-node-id <id> [--dir <path>] [--name <name>]\n corvio sync status|plan|pull [--dir <path>]\n corvio sync push --yes [--dir <path>]\n corvio sync resolve --conflict-id <id> --strategy use-remote|keep-local --yes [--dir <path>]`,
|
|
@@ -749,7 +749,10 @@ async function capabilities(options) {
|
|
|
749
749
|
workspace_selection: selection,
|
|
750
750
|
api: index,
|
|
751
751
|
principal: identity,
|
|
752
|
-
update: await buildUpdateStatus(index, {
|
|
752
|
+
update: await buildUpdateStatus(index, {
|
|
753
|
+
allowRegistryFailure: true,
|
|
754
|
+
checkRegistry: false,
|
|
755
|
+
}),
|
|
753
756
|
}, { json: options.json });
|
|
754
757
|
}
|
|
755
758
|
|
|
@@ -3124,7 +3127,10 @@ async function projects(options, action) {
|
|
|
3124
3127
|
writeResult(result, { json: options.json });
|
|
3125
3128
|
}
|
|
3126
3129
|
|
|
3127
|
-
async function buildUpdateStatus(
|
|
3130
|
+
async function buildUpdateStatus(
|
|
3131
|
+
index,
|
|
3132
|
+
{ allowRegistryFailure = false, checkRegistry = true } = {},
|
|
3133
|
+
) {
|
|
3128
3134
|
return resolveNpmUpdateStatus({
|
|
3129
3135
|
currentVersion: VERSION,
|
|
3130
3136
|
policy: index?.distribution?.workspace_cli || {
|
|
@@ -3133,6 +3139,7 @@ async function buildUpdateStatus(index, { allowRegistryFailure = false } = {}) {
|
|
|
3133
3139
|
},
|
|
3134
3140
|
userAgent: USER_AGENT,
|
|
3135
3141
|
allowRegistryFailure,
|
|
3142
|
+
checkRegistry,
|
|
3136
3143
|
});
|
|
3137
3144
|
}
|
|
3138
3145
|
|
package/dist/core.js
CHANGED
|
@@ -244,6 +244,7 @@ export async function resolveNpmUpdateStatus({
|
|
|
244
244
|
policy,
|
|
245
245
|
userAgent,
|
|
246
246
|
allowRegistryFailure = false,
|
|
247
|
+
checkRegistry = true,
|
|
247
248
|
fetchImpl = globalThis.fetch,
|
|
248
249
|
registryBase = process.env.CORVIO_NPM_REGISTRY_BASE || "https://registry.npmjs.org",
|
|
249
250
|
}) {
|
|
@@ -253,22 +254,24 @@ export async function resolveNpmUpdateStatus({
|
|
|
253
254
|
const encoded = encodeURIComponent(packageName).replace("%40", "@");
|
|
254
255
|
let latestVersion = null;
|
|
255
256
|
let registryError = null;
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
if (!response.ok) throw new Error(`npm registry returned ${response.status}`);
|
|
263
|
-
const metadata = await response.json();
|
|
264
|
-
latestVersion = String(metadata?.["dist-tags"]?.[distTag] || "").trim() || null;
|
|
265
|
-
} catch (error) {
|
|
266
|
-
registryError = error instanceof Error ? error.message : String(error);
|
|
267
|
-
if (!allowRegistryFailure) {
|
|
268
|
-
throw new CliError(`Unable to check npm for updates: ${registryError}`, {
|
|
269
|
-
code: "update_check_failed",
|
|
270
|
-
exitCode: EXIT.REMOTE,
|
|
257
|
+
if (checkRegistry) {
|
|
258
|
+
try {
|
|
259
|
+
const registry = String(registryBase).replace(/\/+$/, "");
|
|
260
|
+
const response = await fetchImpl(`${registry}/${encoded}`, {
|
|
261
|
+
headers: { accept: "application/json", "user-agent": userAgent },
|
|
262
|
+
signal: AbortSignal.timeout(2500),
|
|
271
263
|
});
|
|
264
|
+
if (!response.ok) throw new Error(`npm registry returned ${response.status}`);
|
|
265
|
+
const metadata = await response.json();
|
|
266
|
+
latestVersion = String(metadata?.["dist-tags"]?.[distTag] || "").trim() || null;
|
|
267
|
+
} catch (error) {
|
|
268
|
+
registryError = error instanceof Error ? error.message : String(error);
|
|
269
|
+
if (!allowRegistryFailure) {
|
|
270
|
+
throw new CliError(`Unable to check npm for updates: ${registryError}`, {
|
|
271
|
+
code: "update_check_failed",
|
|
272
|
+
exitCode: EXIT.REMOTE,
|
|
273
|
+
});
|
|
274
|
+
}
|
|
272
275
|
}
|
|
273
276
|
}
|
|
274
277
|
const minimum = String(policy.minimum_supported_version || "").trim() || null;
|
|
@@ -278,6 +281,7 @@ export async function resolveNpmUpdateStatus({
|
|
|
278
281
|
dist_tag: distTag,
|
|
279
282
|
current_version: currentVersion,
|
|
280
283
|
latest_published_version: latestVersion,
|
|
284
|
+
registry_checked: checkRegistry,
|
|
281
285
|
reviewed_version: String(policy.reviewed_version || "").trim() || null,
|
|
282
286
|
minimum_supported_version: minimum,
|
|
283
287
|
update_available: Boolean(latestVersion && compareVersions(latestVersion, currentVersion) > 0),
|