@corvio/cli 0.1.0-beta.38 → 0.1.0-beta.39

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 (2) hide show
  1. package/dist/cli.js +79 -9
  2. package/package.json +1 -1
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.38";
42
+ const VERSION = "0.1.0-beta.39";
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}`;
@@ -170,7 +170,7 @@ Usage:
170
170
  corvio auth login|status|logout
171
171
  corvio workspaces list|use|current|create [id]
172
172
  corvio capabilities
173
- corvio collaboration status [--project <path>] [--provider codex|claude_code|copilot]
173
+ corvio collaboration status [--project <path>] [--provider codex|claude_code|copilot|grok_build|muse_code]
174
174
  corvio ask --prompt <text> [--file <path>] [--asset-ids <id,id>] [--conversation-id <id>] [--allow-actions] [--processing-profile auto|economy|standard|deep]
175
175
  corvio agents list|connect|create|update|rotate [id]
176
176
  corvio agent claim|renew|complete|fail|comments|comment|reply|status|closeout|run [id]
@@ -199,10 +199,10 @@ const COMMAND_HELP = Object.freeze({
199
199
  auth: `Usage: corvio auth login|status|logout\n\nAuthenticate with a user-level device link, inspect the current principal, or revoke the stored credential.`,
200
200
  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.`,
201
201
  capabilities: `Usage: corvio capabilities [--json]\n\nShow live API resources, principal scopes, selected Workspace status, and CLI compatibility.`,
202
- 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.`,
202
+ collaboration: `Usage:\n corvio collaboration status [--project <path>] [--provider codex|claude_code|copilot|grok_build|muse_code|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 when available and preserve project/global scope. Muse Code and Grok Build inspect their native and shared Agent Skill roots; WorkBuddy inspection is read-only. The CLI cannot prove that the current host task loaded a particular copy, or whether remote MCP or host memory is active.`,
203
203
  ask: `Usage: corvio ask --prompt <text> [--file <path>] [--asset-ids <id,id>] [--conversation-id <id>] [--sources workspace,web,memory] [--allow-actions] [--background] [--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\nAnswer-only is the default: omit --allow-actions; there is no --mode option. Keep the user's natural question unchanged, then append the smallest complete decision-relevant context or stable handles as a separate clause. A carried Project handle normally bounds a cross-branch question without enumerating all descendants. Handles are evidence addresses: do not invent a comparison rubric, prescribe reasoning steps, substitute another user objective, or turn current Tree labels into a detailed task plan. Unless the user chose them, do not invent taxonomy, titles, artifact count, or Corvio's internal plan; Corvio chooses the cognitive structure and carriers. In a bounded read-only continuation, start this foreground command exactly once when a trusted current-task or prior receipt already proves this authenticated CLI and exact Workspace; do not launch an identical Question concurrently or retry before terminal exit. If the shell tool yields a running-session handle, wait on that exact handle until the CLI exits instead of answering from prior context. It returns the terminal Question without model-visible polling. Use --background for work that should outlive the current shell; it returns one durable operation immediately. Inspect it with questions operation, stop it with questions cancel, and use the terminal conversation_id for a corrected follow-up instead of silently changing an in-flight objective. Transport continuity does not prove a cheaper processing profile; leave processing on auto unless the remaining transformation independently justifies another profile. Do not install, probe, or switch to the CLI only to avoid MCP polling, and do not extend it to an unbound Workspace. --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.`,
204
- 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.`,
205
- 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.`,
204
+ agents: `Usage:\n corvio agents list\n corvio agents connect [--provider codex|claude_code|copilot|grok_build] [--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|grok_build|grok_bot|muse|muse_code|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.`,
205
+ 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|grok_build|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.`,
206
206
  questions: `Usage:\n corvio questions list [--limit <n>] [--cursor <cursor>] [--conversation-id <id>]\n corvio questions get <question-id>\n corvio questions operation <operation-id> [--after-cursor <n>] [--wait-until-terminal] [--timeout-seconds <1-7200>]\n corvio questions cancel <operation-id> --yes\n\nA Question operation is the durable owner for background work. operation returns only new user-visible milestones after --after-cursor and never exposes hidden reasoning or provisional answer text. --wait-until-terminal keeps deterministic polling in this process and returns a typed deadline receipt if the local deadline expires. cancel is idempotent; treat cancellation_requested as non-terminal and verify cancelled before telling the user the task stopped. Cancellation does not roll back effects that already settled. To correct the objective, stop or finish the current operation, then use corvio ask --conversation-id <conversation_id> so the new Question is an explicit successor.`,
207
207
  conversations: `Usage:\n corvio conversations list [--limit <n>] [--cursor <cursor>]\n corvio conversations get <conversation-id>`,
208
208
  search: `Usage: corvio search <query> [--limit <n>] [--page-id <id>] [--node-id <id>]`,
@@ -970,6 +970,20 @@ async function inspectCollaborationGuidance(provider, projectRoot, liveContract,
970
970
  },
971
971
  );
972
972
  }
973
+ if (provider === "grok_build") {
974
+ candidates.push(
975
+ { scope: "project_grok", source: "project_skill", priority: 300, path: join(projectRoot, ".grok", "skills", "corvio-operate-workspace", "SKILL.md") },
976
+ { scope: "user_grok", source: "user_skill", priority: 200, path: join(homedir(), ".grok", "skills", "corvio-operate-workspace", "SKILL.md") },
977
+ );
978
+ }
979
+ if (provider === "muse_code") {
980
+ candidates.push({
981
+ scope: "user_muse",
982
+ source: "user_skill",
983
+ priority: 200,
984
+ path: join(String(process.env.XDG_CONFIG_HOME || join(homedir(), ".config")), "muse", "skills", "corvio-operate-workspace", "SKILL.md"),
985
+ });
986
+ }
973
987
  const found = [];
974
988
  for (const candidate of candidates) {
975
989
  try {
@@ -1051,6 +1065,10 @@ async function inspectCollaborationGuidance(provider, projectRoot, liveContract,
1051
1065
  let updateAction = null;
1052
1066
  if (provider === "workbuddy" && refreshAvailable) {
1053
1067
  updateAction = workbuddyAction || "Download the official Skill ZIP, replace it in WorkBuddy, then start a fresh conversation.";
1068
+ } else if (provider === "grok_build" && refreshAvailable) {
1069
+ updateAction = "Install the official Corvio Agent Plugin from its verified source, or place the verified Skill under .agents/skills, then start a fresh Grok Build session.";
1070
+ } else if (provider === "muse_code" && refreshAvailable) {
1071
+ updateAction = "Extract the official Corvio Skill archive, validate it, then run muse skills install <skill-directory> --scope user and start a fresh Muse Code session.";
1054
1072
  } else if (packageStatus === "multiple_copies_conflict") {
1055
1073
  updateAction = "Resolve the reported effective scopes explicitly; do not overwrite either copy by assumption.";
1056
1074
  } else if (pluginManaged && refreshAvailable) {
@@ -1094,8 +1112,8 @@ async function collaborationStatus(options) {
1094
1112
  fallbackToActive: false,
1095
1113
  });
1096
1114
  const provider = String(options.provider || credential?.metadata?.provider || "codex");
1097
- if (!["codex", "claude_code", "copilot", "workbuddy"].includes(provider)) {
1098
- throw new CliError("--provider must be codex, claude_code, copilot, or workbuddy.", {
1115
+ if (!["codex", "claude_code", "copilot", "grok_build", "muse_code", "workbuddy"].includes(provider)) {
1116
+ throw new CliError("--provider must be codex, claude_code, copilot, grok_build, muse_code, or workbuddy.", {
1099
1117
  code: "invalid_provider",
1100
1118
  });
1101
1119
  }
@@ -1109,7 +1127,7 @@ async function collaborationStatus(options) {
1109
1127
  const runnerState = await readAgentRunnerState();
1110
1128
  const listener = bindingId ? dictLike(runnerState?.listeners?.[bindingId]) : {};
1111
1129
  const listenerStatus = processIsRunning(Number(listener.pid)) ? "listening" : "offline";
1112
- const requiresProjectAgent = provider !== "workbuddy";
1130
+ const requiresProjectAgent = !["workbuddy", "muse_code"].includes(provider);
1113
1131
  let status = "ready";
1114
1132
  if (!credential && requiresProjectAgent) status = "needs_connection";
1115
1133
  else if (!serverVersion) status = "contract_unavailable";
@@ -1522,7 +1540,7 @@ async function resolveProjectRuntimeBinding(options, provider) {
1522
1540
  permission_profile: permissionProfile,
1523
1541
  trigger_policy: triggerPolicy,
1524
1542
  // These are observed provider capabilities, not security controls. Codex,
1525
- // Claude Code, and Copilot do not expose one common switch that can safely
1543
+ // Claude Code, Copilot, and Grok Build do not expose one common switch that can safely
1526
1544
  // separate project and personal instructions, memories, and connectors.
1527
1545
  // Host file authority is enforced separately by permission_profile.
1528
1546
  skills_scope: "project_and_personal",
@@ -1536,6 +1554,7 @@ async function probeAgentProvider(provider, projectRoot) {
1536
1554
  codex: { executable: "codex", versionArgs: ["--version"], authArgs: ["login", "status"] },
1537
1555
  claude_code: { executable: "claude", versionArgs: ["--version"], authArgs: ["auth", "status"] },
1538
1556
  copilot: { executable: "copilot", versionArgs: ["--version"], authArgs: null },
1557
+ grok_build: { executable: "grok", versionArgs: ["--version"], authArgs: null },
1539
1558
  };
1540
1559
  const spec = specs[provider];
1541
1560
  if (!spec) {
@@ -1567,6 +1586,32 @@ async function probeAgentProvider(provider, projectRoot) {
1567
1586
  return { provider, ready: false, version: version.stdout.trim(), reason: "Copilot did not complete its authenticated headless readiness check." };
1568
1587
  }
1569
1588
  }
1589
+ if (provider === "grok_build") {
1590
+ const authProbe = await runProviderCommand("grok", [
1591
+ "--no-auto-update",
1592
+ "--sandbox",
1593
+ "read-only",
1594
+ "--permission-mode",
1595
+ "dontAsk",
1596
+ "--allow",
1597
+ "Read",
1598
+ "--allow",
1599
+ "Grep",
1600
+ "--deny",
1601
+ "Edit",
1602
+ "--deny",
1603
+ "Bash(*)",
1604
+ "--cwd",
1605
+ projectRoot,
1606
+ "-p",
1607
+ "Return exactly READY and do not use tools.",
1608
+ "--output-format",
1609
+ "plain",
1610
+ ], { cwd: projectRoot, maximumBytes: 64 * 1024 });
1611
+ if (!/\bREADY\b/.test(authProbe.stdout)) {
1612
+ return { provider, ready: false, version: version.stdout.trim(), reason: "Grok Build did not complete its authenticated headless readiness check." };
1613
+ }
1614
+ }
1570
1615
  return { provider, ready: true, version: version.stdout.trim() };
1571
1616
  }
1572
1617
 
@@ -1731,6 +1776,8 @@ async function agents(options, action, id) {
1731
1776
  ? "my-claude"
1732
1777
  : provider === "copilot"
1733
1778
  ? "my-copilot"
1779
+ : provider === "grok_build"
1780
+ ? "my-grok"
1734
1781
  : "my-agent";
1735
1782
  const connect = (recoverCredential) => api.request("/agents:connect", {
1736
1783
  method: "POST",
@@ -2103,6 +2150,29 @@ async function runStructuredProvider({ provider, prompt, schema, binding, reques
2103
2150
  ...(binding.connector_scope === "off" ? ["--disable-builtin-mcps"] : []),
2104
2151
  ...permissionArgs,
2105
2152
  ], { maximumBytes: 2 * 1024 * 1024, cwd: projectRoot });
2153
+ } else if (provider === "grok_build") {
2154
+ const sandbox = profile === "danger_full_access"
2155
+ ? "off"
2156
+ : profile === "workspace_write"
2157
+ ? "workspace"
2158
+ : "read-only";
2159
+ const permissionArgs = profile === "danger_full_access"
2160
+ ? ["--always-approve"]
2161
+ : profile === "workspace_write"
2162
+ ? ["--permission-mode", "dontAsk", "--allow", "Read", "--allow", "Grep", "--allow", "Edit", "--allow", "Bash(*)"]
2163
+ : ["--permission-mode", "dontAsk", "--allow", "Read", "--allow", "Grep", "--deny", "Edit", "--deny", "Bash(*)"];
2164
+ result = await runProviderCommand("grok", [
2165
+ "--no-auto-update",
2166
+ "--sandbox",
2167
+ sandbox,
2168
+ ...permissionArgs,
2169
+ "--cwd",
2170
+ projectRoot,
2171
+ "-p",
2172
+ prompt,
2173
+ "--output-format",
2174
+ "json",
2175
+ ], { maximumBytes: 2 * 1024 * 1024, cwd: projectRoot });
2106
2176
  } else {
2107
2177
  throw new CliError("A custom provider requires --handler <executable>.", {
2108
2178
  code: "agent_handler_required",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corvio/cli",
3
- "version": "0.1.0-beta.38",
3
+ "version": "0.1.0-beta.39",
4
4
  "description": "Official Corvio Workspace CLI for questions, knowledge search, documents, and Agent workflows.",
5
5
  "type": "module",
6
6
  "bin": {