@corvio/cli 0.1.0-beta.32 → 0.1.0-beta.33

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 +4 -2
  2. package/dist/cli.js +82 -9
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -24,8 +24,10 @@ corvio update check --json
24
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
- incompatible, compatible-but-not-current, or conflicting local Skill, but never mutates host directories. Use
28
- `corvio collaboration status --provider workbuddy --json --no-input` to inspect WorkBuddy's manual copy at
27
+ incompatible, compatible-but-not-current, or conflicting local Skill, but never mutates host directories. Non-current receipts include one
28
+ compact Agent notice and a source-aware action; current copies stay quiet. For standalone Skill refreshes,
29
+ the command pins the verified installer, selects exactly one provider, preserves project/global scope, and returns a verification command.
30
+ Use `corvio collaboration status --provider workbuddy --json --no-input` to inspect WorkBuddy's manual copy at
29
31
  `~/.workbuddy/skills/corvio-operate-workspace/`; this does not prove which bytes a running WorkBuddy conversation loaded. The canonical
30
32
  website ZIP is a static local copy and is not update-tracked by `npx skills update`; reinstall from the same source and scope, then start a
31
33
  fresh host session. Until a reviewed WorkBuddy marketplace listing is live, a WorkBuddy upload is an unmanaged manual install and cannot
package/dist/cli.js CHANGED
@@ -39,14 +39,15 @@ import {
39
39
  agentCredentialPath,
40
40
  } from "./core.js";
41
41
 
42
- const VERSION = "0.1.0-beta.32";
42
+ const VERSION = "0.1.0-beta.33";
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}`;
46
46
  const MAX_UPLOAD_BYTES = 100 * 1024 * 1024;
47
47
  const MAX_SYNC_FILES = 2_000;
48
48
  const MAX_MARKDOWN_CHARACTERS = 120_000;
49
- const CORVIO_SKILL_INSTALL_COMMAND = "npx skills add https://corvio.ai/developers/skills/corvio-operate-workspace/corvio-operate-workspace.zip";
49
+ const CORVIO_SKILL_ARCHIVE = "https://corvio.ai/developers/skills/corvio-operate-workspace/corvio-operate-workspace.zip";
50
+ const AGENT_SKILLS_INSTALLER_VERSION = "1.5.23";
50
51
  const GLOBAL_OPTIONS = Object.freeze([
51
52
  "api-base",
52
53
  "workspace",
@@ -173,7 +174,7 @@ const COMMAND_HELP = Object.freeze({
173
174
  auth: `Usage: corvio auth login|status|logout\n\nAuthenticate with a user-level device link, inspect the current principal, or revoke the stored credential.`,
174
175
  workspaces: `Usage:\n corvio workspaces list\n corvio workspaces use <workspace-id>\n corvio workspaces current\n corvio workspaces create --name <name> [--kind personal|team]\n\nWorkspace status and blocked capability reasons are returned with each item.`,
175
176
  capabilities: `Usage: corvio capabilities [--json]\n\nShow live API resources, principal scopes, selected Workspace status, and CLI compatibility.`,
176
- collaboration: `Usage:\n corvio collaboration status [--project <path>] [--provider codex|claude_code|copilot|workbuddy]\n\nCheck local Corvio prerequisites and every discoverable Corvio Skill copy. Package freshness, contract compatibility, update ownership, and host loading are separate facts. WorkBuddy inspection is read-only and never changes ~/.workbuddy. The CLI cannot prove that the current host task loaded a particular copy, or whether remote MCP or host memory is active.`,
177
+ collaboration: `Usage:\n corvio collaboration status [--project <path>] [--provider codex|claude_code|copilot|workbuddy]\n\nCheck local Corvio prerequisites and every discoverable Corvio Skill copy. Current copies stay quiet; non-current receipts include one compact Agent notice and a source-aware next action. Standalone refresh commands pin the verified installer, select exactly one provider, and preserve project/global scope. WorkBuddy inspection is read-only and never changes ~/.workbuddy. The CLI cannot prove that the current host task loaded a particular copy, or whether remote MCP or host memory is active.`,
177
178
  ask: `Usage: corvio ask --prompt <text> [--file <path>] [--asset-ids <id,id>] [--conversation-id <id>] [--sources workspace,web,memory] [--allow-actions] [--processing-profile auto|economy|standard|deep] [--max-processing-profile economy|standard|deep] [--scan-mode auto|always|off] [--skills-extraction-mode auto|always|off] [--caller-model <host-model>] [--context-file <json>] [--idempotency-key <key>]\n\nPass the user's natural goal, complete decision-relevant context, and explicit constraints. Unless the user chose them, do not invent taxonomy, titles, artifact count, or Corvio's internal plan; Corvio chooses the cognitive structure and carriers. --file retains the selected local file, verifies its hash, and attaches the finalized Asset to this exact question. --asset-ids attaches already-retained Corvio Assets. Use --allow-actions when Corvio should create the Page, Spreadsheet, Presentation, Code, HTML Artifact, Memory, or qualifying Project Skill that best serves the result. A continuation handle is subject evidence, not necessarily the durable write destination: for a reusable pattern or method, resolve the fitting same-scope Memory or Skill owner before admitting or merging it. Read the terminal Question receipt and use artifact.url or links.primary_artifact verbatim; reader_output artifacts are deliverables, structure_container artifacts are hierarchy, and node_id is never a document URL. Upload alone is not evidence of interpretation. Skill extraction mode always requires --allow-actions and an evidence-backed decision, not forced Skill creation; answer-only questions may use auto or off.`,
178
179
  agents: `Usage:\n corvio agents list\n corvio agents connect [--provider codex|claude_code|copilot] [--project <path>] [--permission-profile read_only|workspace_write|danger_full_access] [--trigger-policy owner_only|workspace_members] [--display-name <name>] [--recover-credential] [--no-listen]\n corvio agents create --handle <handle> --display-name <name> [--provider codex|claude_code|copilot|custom] [--permissions read,comment,edit]\n corvio agents update <id> [--display-name <name>] [--status active|paused|revoked] [--permissions <list>]\n corvio agents rotate <id>\n\n'connect' binds the current Git project (or --project path) to one stable personal Agent. Repeating it is idempotent; another project creates another Agent. It reports provider/CLI, listener, and local Skill prerequisites separately; run corvio collaboration status after installing or refreshing the Skill. The CLI cannot prove that the current host task loaded those surfaces. The default workspace_write profile is limited by the provider's native sandbox. owner_only is the safe trigger default. Secrets and absolute project paths stay local.`,
179
180
  agent: `Usage:\n corvio agent claim [--worker-id <id>] [--wait-seconds <0-30>]\n corvio agent renew <event-id> --lease-token <token> [--lease-seconds <30-900>]\n corvio agent complete <event-id> --lease-token <token> [--result-file <json>]\n corvio agent fail <event-id> --lease-token <token> --error <message>\n corvio agent mentions --document-id <id> [--query <name>]\n corvio agent comments --document-id <id>\n corvio agent comment --document-id <id> --body <text> [--selection-file <json>] [--start-new-chain] [--idempotency-key <key>]\n corvio agent reply <thread-id> --document-id <id> --body <text> [--source-event-id <id> --source-event-lease-token <token>|--start-new-chain] [--idempotency-key <key>]\n corvio agent status <thread-id> --document-id <id> --status open|resolved\n corvio agent closeout --document-id <id> [--thread-id <id>] --body <verified-result> [--status open|resolved] [--idempotency-key <key>]\n corvio agent run [--provider codex|claude_code|copilot|custom] [--handler <executable>] [--agent <id>] [--once] [--processing-profile auto|economy|standard|deep] [--max-processing-profile economy|standard|deep] [--scan-mode auto|always|off] [--skills-extraction-mode auto|always|off] [--caller-model <host-model>]\n\nUse mentions before commenting when the target is uncertain; aliases resolve to stable user or Agent IDs and ambiguity fails closed. Use closeout when a Corvio document or comment owned the task: it returns the verified result to that surface and reads document/comments back. Agent-to-Agent comments require either a claimed source event or explicit --start-new-chain. The runner iteratively exchanges origin-scoped evidence with Corvio Query/Writer, then invokes the bound provider inside its local project. Local code changes use the recorded provider permission profile; complex Corvio document changes belong to Query/Writer. Provider children never receive Corvio credentials.`,
@@ -813,6 +814,58 @@ function collaborationRevisionAtLeast(actual, minimum) {
813
814
  return true;
814
815
  }
815
816
 
817
+ function skillInstallerAgent(provider) {
818
+ return {
819
+ codex: "codex",
820
+ claude_code: "claude-code",
821
+ copilot: "github-copilot",
822
+ }[provider] || null;
823
+ }
824
+
825
+ function scopedSkillInstallCommand(provider, evaluated) {
826
+ const agent = skillInstallerAgent(provider);
827
+ if (!agent) return null;
828
+ const projectScoped = !evaluated.length || evaluated.some((item) => item.scope.startsWith("project_"));
829
+ const globalFlag = projectScoped ? "" : " --global";
830
+ return `npx --yes skills@${AGENT_SKILLS_INSTALLER_VERSION} add ${CORVIO_SKILL_ARCHIVE} --agent ${agent} --skill corvio-operate-workspace --yes${globalFlag}`;
831
+ }
832
+
833
+ function collaborationAgentNotice(guidance) {
834
+ const status = guidance.package_status;
835
+ if (status === "current") return null;
836
+ if (status === "compatible_update_available") {
837
+ return {
838
+ code: "corvio_legacy_compatible",
839
+ message: `This host is using Corvio ${guidance.discovered_copies[0]?.release_version || guidance.discovered_copies[0]?.contract_revision || "legacy guidance"}; ${guidance.expected_release_version || guidance.expected_contract_version} is current. It may continue, but Beta feedback should identify this session as legacy.`,
840
+ continue_allowed: true,
841
+ recommended_action: guidance.install_command || guidance.update_action,
842
+ show_once_per_session: true,
843
+ };
844
+ }
845
+ if (status === "freshness_unverified") {
846
+ return {
847
+ code: "corvio_freshness_unverified",
848
+ message: `The loaded Corvio copy declares the current contract, but upstream package integrity could not be verified (${guidance.upstream_manifest_status}).`,
849
+ continue_allowed: true,
850
+ recommended_action: "Retry the status check before claiming this host is current; do not describe manifest retrieval failure as a stale install.",
851
+ show_once_per_session: true,
852
+ };
853
+ }
854
+ const messages = {
855
+ missing: "Corvio guidance is not installed in the effective host scope.",
856
+ multiple_copies_conflict: "Multiple effective Corvio copies disagree. Resolve the reported scopes before relying on the guidance.",
857
+ update_required: "The effective Corvio guidance is unsupported or differs from the official package.",
858
+ contract_unavailable: "The current Corvio collaboration contract could not be loaded.",
859
+ };
860
+ return {
861
+ code: `corvio_${status}`,
862
+ message: messages[status] || "Corvio host guidance is not ready.",
863
+ continue_allowed: false,
864
+ recommended_action: guidance.install_command || guidance.update_action || "Inspect the reported source and retry before continuing.",
865
+ show_once_per_session: true,
866
+ };
867
+ }
868
+
816
869
  async function loadOfficialSkillManifest(liveContract) {
817
870
  const manifestUrl = String(dictLike(dictLike(liveContract?.distribution).official_skill).manifest || "").trim();
818
871
  if (!manifestUrl) return { status: "unavailable", manifest: {} };
@@ -959,6 +1012,23 @@ async function inspectCollaborationGuidance(provider, projectRoot, liveContract,
959
1012
  const refreshAvailable = new Set([
960
1013
  "missing", "compatible_update_available", "update_required", "multiple_copies_conflict",
961
1014
  ]).has(packageStatus);
1015
+ const pluginManaged = evaluated.some((item) => item.source === "plugin_cache");
1016
+ const installCommand = provider !== "workbuddy"
1017
+ && refreshAvailable
1018
+ && packageStatus !== "multiple_copies_conflict"
1019
+ && !pluginManaged
1020
+ ? scopedSkillInstallCommand(provider, evaluated)
1021
+ : null;
1022
+ let updateAction = null;
1023
+ if (provider === "workbuddy" && refreshAvailable) {
1024
+ updateAction = workbuddyAction || "Download the official Skill ZIP, replace it in WorkBuddy, then start a fresh conversation.";
1025
+ } else if (packageStatus === "multiple_copies_conflict") {
1026
+ updateAction = "Resolve the reported effective scopes explicitly; do not overwrite either copy by assumption.";
1027
+ } else if (pluginManaged && refreshAvailable) {
1028
+ const channel = provider === "codex" ? "codex_marketplace" : "claude_code_marketplace";
1029
+ updateAction = dictLike(dictLike(distribution.host_channels)[channel]).action
1030
+ || "Use the host marketplace/plugin update flow, then start a fresh session.";
1031
+ }
962
1032
  return {
963
1033
  status,
964
1034
  package_status: packageStatus,
@@ -979,12 +1049,10 @@ async function inspectCollaborationGuidance(provider, projectRoot, liveContract,
979
1049
  current_scopes: current.map((item) => item.scope),
980
1050
  compatible_scopes: compatible.map((item) => item.scope),
981
1051
  discovered_copies: found,
982
- install_command: provider !== "workbuddy" && refreshAvailable
983
- ? CORVIO_SKILL_INSTALL_COMMAND
984
- : null,
985
- update_action: provider === "workbuddy" && refreshAvailable
986
- ? workbuddyAction || "Download the official Skill ZIP, replace it in WorkBuddy, then start a fresh conversation."
987
- : null,
1052
+ install_command: installCommand,
1053
+ install_scope: installCommand ? (installCommand.endsWith(" --global") ? "global" : "project") : null,
1054
+ update_action: updateAction,
1055
+ verification_command: refreshAvailable ? `corvio collaboration status --provider ${provider} --project . --json --no-input` : null,
988
1056
  };
989
1057
  }
990
1058
 
@@ -1022,9 +1090,13 @@ async function collaborationStatus(options) {
1022
1090
  if (!credential && requiresProjectAgent) nextActions.push(`corvio agents connect --provider ${provider} --project .`);
1023
1091
  if (guidance.install_command) nextActions.push(guidance.install_command);
1024
1092
  if (guidance.update_action) nextActions.push(guidance.update_action);
1093
+ if ((guidance.install_command || guidance.update_action) && guidance.verification_command) {
1094
+ nextActions.push(guidance.verification_command);
1095
+ }
1025
1096
  if (!serverVersion) nextActions.push("corvio update check --json");
1026
1097
  const localPrerequisitesReady = status === "ready";
1027
1098
  const hostIntegration = dictLike(liveContract.host_integration);
1099
+ const agentNotice = collaborationAgentNotice(guidance);
1028
1100
  writeResult({
1029
1101
  status,
1030
1102
  local_prerequisites_ready: localPrerequisitesReady,
@@ -1063,6 +1135,7 @@ async function collaborationStatus(options) {
1063
1135
  ? hostIntegration.decision_points
1064
1136
  : [],
1065
1137
  },
1138
+ ...(agentNotice ? { agent_notice: agentNotice } : {}),
1066
1139
  next_actions: nextActions,
1067
1140
  }, { json: options.json });
1068
1141
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corvio/cli",
3
- "version": "0.1.0-beta.32",
3
+ "version": "0.1.0-beta.33",
4
4
  "description": "Official Corvio Workspace CLI for questions, knowledge search, documents, and Agent workflows.",
5
5
  "type": "module",
6
6
  "bin": {