@corvio/cli 0.1.0-beta.15 → 0.1.0-beta.16

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 CHANGED
@@ -10,6 +10,8 @@ corvio agents connect --provider codex --project . --json
10
10
  corvio collaboration status --json --no-input
11
11
  corvio ask --prompt 'Summarize recurring launch risks' --json
12
12
  corvio files upload --file ./research.pdf --json
13
+ corvio files organize <asset_id> --instruction 'Create a reusable decision brief' --yes --json
14
+ corvio files operation <operation_id> --json
13
15
  corvio sync init --dir ./knowledge --root-node-id <node_id> --json
14
16
  corvio update check --json
15
17
  ```
@@ -18,6 +20,8 @@ When no environment key is configured, run `corvio auth login`. Login creates on
18
20
 
19
21
  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.
20
22
 
23
+ File organization is asynchronous. A queued organization receipt is progress, not completion: continue from its stable operation ID with `corvio files operation <operation_id>` and only report completion after the terminal receipt exposes the resulting artifacts, Skill evaluation, and durable links.
24
+
21
25
  ## Project Agent collaboration
22
26
 
23
27
  Connect the current project with the user credential. User and Agent credentials stay deliberately separate, and the secret is never printed, written into the project, or passed to the provider:
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.15";
42
+ const VERSION = "0.1.0-beta.16";
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}`;
@@ -69,7 +69,10 @@ const COMMAND_OPTIONS = Object.freeze({
69
69
  "workspaces:create": ["name", "kind", "description", "idempotency-key"],
70
70
  "capabilities:": [],
71
71
  "collaboration:status": ["project", "provider"],
72
- "ask:": ["prompt", "conversation-id", "sources", "allow-actions", "context-file", "idempotency-key"],
72
+ "ask:": [
73
+ "prompt", "conversation-id", "sources", "allow-actions", "context-file", "idempotency-key",
74
+ "processing-profile", "max-processing-profile", "scan-mode", "skills-extraction-mode", "caller-model",
75
+ ],
73
76
  "agents:list": ["include-revoked"],
74
77
  "agents:connect": [
75
78
  "handle", "display-name", "provider", "project", "permission-profile", "trigger-policy",
@@ -88,7 +91,10 @@ const COMMAND_OPTIONS = Object.freeze({
88
91
  "agent:reply": ["document-id", "id", "body", "source-event-id", "source-event-lease-token", "start-new-chain", "idempotency-key"],
89
92
  "agent:status": ["document-id", "id", "status"],
90
93
  "agent:closeout": ["document-id", "thread-id", "body", "status", "idempotency-key"],
91
- "agent:run": ["once", "handler", "provider", "worker-id", "lease-seconds", "wait-seconds", "sources", "project"],
94
+ "agent:run": [
95
+ "once", "handler", "provider", "worker-id", "lease-seconds", "wait-seconds", "sources", "project",
96
+ "processing-profile", "max-processing-profile", "scan-mode", "skills-extraction-mode", "caller-model",
97
+ ],
92
98
  "questions:list": ["limit", "cursor", "conversation-id"],
93
99
  "questions:get": ["id"],
94
100
  "conversations:list": ["limit", "cursor"],
@@ -108,8 +114,15 @@ const COMMAND_OPTIONS = Object.freeze({
108
114
  "files:list": ["limit"],
109
115
  "files:get": ["id"],
110
116
  "files:download": ["id", "output"],
111
- "files:upload": ["file", "mime-type"],
112
- "files:organize": ["id", "instruction", "target-root-node-id"],
117
+ "files:upload": [
118
+ "file", "mime-type", "organize", "instruction", "target-root-node-id", "additional-asset-ids",
119
+ "processing-profile", "max-processing-profile", "scan-mode", "skills-extraction-mode", "caller-model",
120
+ ],
121
+ "files:organize": [
122
+ "id", "additional-asset-ids", "instruction", "target-root-node-id",
123
+ "processing-profile", "max-processing-profile", "scan-mode", "skills-extraction-mode", "caller-model",
124
+ ],
125
+ "files:operation": ["id"],
113
126
  "files:open": ["id"],
114
127
  "sync:init": ["root-node-id", "dir", "name", "force"],
115
128
  "sync:status": ["dir"],
@@ -127,7 +140,7 @@ Usage:
127
140
  corvio workspaces list|use|current|create [id]
128
141
  corvio capabilities
129
142
  corvio collaboration status [--project <path>] [--provider codex|claude_code|copilot]
130
- corvio ask --prompt <text> [--conversation-id <id>] [--allow-actions]
143
+ corvio ask --prompt <text> [--conversation-id <id>] [--allow-actions] [--processing-profile auto|economy|standard|deep]
131
144
  corvio agents list|connect|create|update|rotate [id]
132
145
  corvio agent claim|renew|complete|fail|comments|comment|reply|status|closeout|run [id]
133
146
  corvio questions list|get [id]
@@ -135,7 +148,7 @@ Usage:
135
148
  corvio search <query>
136
149
  corvio docs list|get|create|update|move|archive|restore|share|open [id]
137
150
  corvio projects list|create
138
- corvio files list|get|download|upload|organize|open [id]
151
+ corvio files list|get|download|upload|organize|operation|open [id]
139
152
  corvio sync init|status|plan|pull|push|resolve
140
153
  corvio update check
141
154
 
@@ -156,15 +169,15 @@ const COMMAND_HELP = Object.freeze({
156
169
  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.`,
157
170
  capabilities: `Usage: corvio capabilities [--json]\n\nShow live API resources, principal scopes, selected Workspace status, and CLI compatibility.`,
158
171
  collaboration: `Usage:\n corvio collaboration status [--project <path>] [--provider codex|claude_code|copilot]\n\nVerify that the current project has a bound Corvio Agent, the official collaboration Skill is discoverable at the live contract version, and the inbound listener state is reported separately. This is the foreground work-loop readiness check; a listening process alone is not enough.`,
159
- ask: `Usage: corvio ask --prompt <text> [--conversation-id <id>] [--sources workspace,web,memory] [--allow-actions] [--context-file <json>] [--idempotency-key <key>]`,
172
+ ask: `Usage: corvio ask --prompt <text> [--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\nSkill extraction mode always requires --allow-actions; answer-only questions may use auto or off.`,
160
173
  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 foreground Skill readiness separately; run corvio collaboration status after installing or refreshing the Skill. 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.`,
161
- 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]\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.`,
174
+ 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.`,
162
175
  questions: `Usage:\n corvio questions list [--limit <n>] [--cursor <cursor>] [--conversation-id <id>]\n corvio questions get <question-id>`,
163
176
  conversations: `Usage:\n corvio conversations list [--limit <n>] [--cursor <cursor>]\n corvio conversations get <conversation-id>`,
164
177
  search: `Usage: corvio search <query> [--limit <n>] [--page-id <id>] [--node-id <id>]`,
165
178
  docs: `Usage:\n corvio docs list [--limit <n>] [--cursor <cursor>] [--lifecycle active|archived]\n corvio docs get <id> [--output <path>]\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\nDirect document commands operate on canonical Page/Markdown. Use \`corvio ask --allow-actions\` for Spreadsheet, Presentation, Code, HTML Artifact, or semantic organization. Agent-authenticated document updates 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.`,
166
179
  projects: `Usage:\n corvio projects list [--limit <n>]\n corvio projects create --title <title> [--idempotency-key <key>]\n\nProjects are durable grouping owners in the Corvio Docs tree. Reuse a matching Project instead of creating one ceremonial Project per file. 'corvio folders' is an alias.`,
167
- files: `Usage:\n corvio files list [--limit <n>]\n corvio files get <id>\n corvio files download <id> [--output <path>]\n corvio files upload --file <path> [--mime-type <type>]\n corvio files organize <id> --instruction <text> --yes [--target-root-node-id <id>]\n corvio files open <id>`,
180
+ files: `Usage:\n corvio files list [--limit <n>]\n corvio files get <id>\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 open <id>\n\nUpload alone preserves the original file. Organization is asynchronous: use 'files operation' to read its terminal result, derived artifacts, Skill evaluation, and links before claiming completion.`,
168
181
  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>]`,
169
182
  update: `Usage: corvio update check [--json]\n\nCompare this executable with the reviewed API policy and the npm beta dist-tag.`,
170
183
  });
@@ -225,6 +238,7 @@ function validateInvocation(options, positionals) {
225
238
  "files:get",
226
239
  "files:download",
227
240
  "files:organize",
241
+ "files:operation",
228
242
  "files:open",
229
243
  "agents:update",
230
244
  "agents:rotate",
@@ -883,14 +897,30 @@ async function ask(options, positionals) {
883
897
  const context = options["context-file"]
884
898
  ? await readJsonObject(options["context-file"], "--context-file")
885
899
  : null;
900
+ const processingProfile = enumOption(options, "processing-profile", ["auto", "economy", "standard", "deep"], "auto");
901
+ const maxProcessingProfile = optionalEnumOption(options, "max-processing-profile", ["economy", "standard", "deep"]);
902
+ const scanMode = enumOption(options, "scan-mode", ["auto", "always", "off"], "auto");
903
+ const skillsExtractionMode = enumOption(options, "skills-extraction-mode", ["auto", "always", "off"], "auto");
904
+ if (skillsExtractionMode === "always" && !options["allow-actions"]) {
905
+ throw new CliError("--skills-extraction-mode always requires --allow-actions.", {
906
+ code: "skills_extraction_requires_actions",
907
+ });
908
+ }
886
909
  const result = await api.request("/questions", {
887
910
  method: "POST",
888
- headers: { "idempotency-key": idempotencyKey(options) },
911
+ headers: {
912
+ "idempotency-key": idempotencyKey(options),
913
+ ...(options["caller-model"] ? { "x-corvio-caller-model": String(options["caller-model"]) } : {}),
914
+ },
889
915
  body: {
890
916
  prompt,
891
917
  conversation_id: options["conversation-id"] || null,
892
918
  mode: options["allow-actions"] ? "allow_actions" : "answer_only",
893
919
  sources: listOption(options, "sources", ["workspace", "web", "memory"]),
920
+ processing_profile: processingProfile,
921
+ max_processing_profile: maxProcessingProfile,
922
+ scan_mode: scanMode,
923
+ skills_extraction_mode: skillsExtractionMode,
894
924
  context,
895
925
  },
896
926
  timeoutMs: 330_000,
@@ -907,6 +937,21 @@ async function ask(options, positionals) {
907
937
  writeResult({ ...result, routing: execution.routing }, { json: options.json });
908
938
  }
909
939
 
940
+ function enumOption(options, name, allowed, fallback) {
941
+ const value = String(options[name] ?? fallback).trim().toLowerCase();
942
+ if (!allowed.includes(value)) {
943
+ throw new CliError(`--${name} must be one of: ${allowed.join(", ")}.`, {
944
+ code: `${name.replaceAll("-", "_")}_invalid`,
945
+ });
946
+ }
947
+ return value;
948
+ }
949
+
950
+ function optionalEnumOption(options, name, allowed) {
951
+ if (options[name] === undefined) return null;
952
+ return enumOption(options, name, allowed, null);
953
+ }
954
+
910
955
  function providerChildEnvironment(extra = {}) {
911
956
  const allowedNames = new Set([
912
957
  "PATH", "HOME", "USER", "LOGNAME", "SHELL", "TERM", "TMPDIR",
@@ -1815,6 +1860,11 @@ async function requestAgentCorvioQuestion(workspaceApi, event, leaseToken, {
1815
1860
  round,
1816
1861
  conversationId = null,
1817
1862
  priorTurn = null,
1863
+ processingProfile = "auto",
1864
+ maxProcessingProfile = null,
1865
+ scanMode = "auto",
1866
+ skillsExtractionMode = "auto",
1867
+ callerModel = null,
1818
1868
  }) {
1819
1869
  const question = await workspaceApi.request("/questions", {
1820
1870
  method: "POST",
@@ -1824,12 +1874,17 @@ async function requestAgentCorvioQuestion(workspaceApi, event, leaseToken, {
1824
1874
  : `agent-event:${event.id}:query:${round}`,
1825
1875
  "x-corvio-agent-event-id": event.id,
1826
1876
  "x-corvio-agent-event-lease-token": leaseToken,
1877
+ ...(callerModel ? { "x-corvio-caller-model": callerModel } : {}),
1827
1878
  },
1828
1879
  body: {
1829
1880
  prompt: instruction,
1830
1881
  ...(conversationId ? { conversation_id: conversationId } : {}),
1831
1882
  mode,
1832
1883
  sources: [],
1884
+ processing_profile: processingProfile,
1885
+ max_processing_profile: maxProcessingProfile,
1886
+ scan_mode: scanMode,
1887
+ skills_extraction_mode: skillsExtractionMode,
1833
1888
  context: {
1834
1889
  agent_event: agentEventContext(event),
1835
1890
  collaboration: event.context,
@@ -1961,11 +2016,24 @@ async function processClaimedAgentEvent(api, event, options) {
1961
2016
  const decision = options.handler
1962
2017
  ? { execution_target: "corvio_document", ...(await runAgentHandler(options.handler, event)) }
1963
2018
  : await runProjectProviderPlan(event, provider, binding);
2019
+ const questionExecution = {
2020
+ processingProfile: enumOption(options, "processing-profile", ["auto", "economy", "standard", "deep"], "auto"),
2021
+ maxProcessingProfile: optionalEnumOption(options, "max-processing-profile", ["economy", "standard", "deep"]),
2022
+ scanMode: enumOption(options, "scan-mode", ["auto", "always", "off"], "auto"),
2023
+ skillsExtractionMode: enumOption(options, "skills-extraction-mode", ["auto", "always", "off"], "auto"),
2024
+ callerModel: String(options["caller-model"] || "").trim() || null,
2025
+ };
2026
+ const initialQuestionMode =
2027
+ decision.execution_target === "corvio_document" ||
2028
+ questionExecution.skillsExtractionMode === "always"
2029
+ ? "allow_actions"
2030
+ : "answer_only";
1964
2031
  const workspaceApi = await agentClient(options, String(event.workspace_id || ""));
1965
2032
  let question = await requestAgentCorvioQuestion(workspaceApi, event, leaseToken, {
1966
2033
  instruction: decision.instruction,
1967
- mode: decision.execution_target === "corvio_document" ? "allow_actions" : "answer_only",
2034
+ mode: initialQuestionMode,
1968
2035
  round: 1,
2036
+ ...questionExecution,
1969
2037
  });
1970
2038
  const questions = [question];
1971
2039
  const instructions = new Set([decision.instruction.trim().toLowerCase()]);
@@ -1990,7 +2058,7 @@ async function processClaimedAgentEvent(api, event, options) {
1990
2058
  round: 1,
1991
2059
  question_id: question.id || null,
1992
2060
  conversation_id: question.conversation_id || null,
1993
- requested_mode: decision.execution_target === "corvio_document" ? "allow_actions" : "answer_only",
2061
+ requested_mode: initialQuestionMode,
1994
2062
  provider_outcome: providerExecution.outcome,
1995
2063
  next_action: providerExecution.next_action,
1996
2064
  }];
@@ -2026,13 +2094,17 @@ async function processClaimedAgentEvent(api, event, options) {
2026
2094
  break;
2027
2095
  }
2028
2096
  instructions.add(normalizedInstruction);
2029
- const requestedMode = providerExecution.corvio_mode;
2097
+ const requestedMode =
2098
+ questionExecution.skillsExtractionMode === "always"
2099
+ ? "allow_actions"
2100
+ : providerExecution.corvio_mode;
2030
2101
  question = await requestAgentCorvioQuestion(workspaceApi, event, leaseToken, {
2031
2102
  instruction: nextInstruction,
2032
2103
  mode: requestedMode,
2033
2104
  round: questions.length + 1,
2034
2105
  conversationId: question.conversation_id || null,
2035
2106
  priorTurn: providerExecution,
2107
+ ...questionExecution,
2036
2108
  });
2037
2109
  questions.push(question);
2038
2110
  providerExecution = await runProjectProviderExecution(
@@ -2830,25 +2902,46 @@ async function files(options, action, id) {
2830
2902
  exitCode: EXIT.REMOTE,
2831
2903
  });
2832
2904
  }
2905
+ if (options.organize) {
2906
+ requireConfirmation(options, "Starting semantic organization for the uploaded file");
2907
+ const organization = await api.request(`/files/${resourcePath(result.id)}:organize`, {
2908
+ method: "POST",
2909
+ headers: options["caller-model"] ? { "x-corvio-caller-model": String(options["caller-model"]) } : {},
2910
+ body: fileOrganizationBody(options),
2911
+ });
2912
+ result = { file: result, organization };
2913
+ }
2833
2914
  } else if (action === "organize") {
2834
2915
  requireConfirmation(options, "Starting a file organization run");
2835
2916
  result = await api.request(`/files/${resourcePath(assetId || option(options, "id", { required: true }))}:organize`, {
2836
2917
  method: "POST",
2837
- body: {
2838
- instruction: option(options, "instruction", { required: true }),
2839
- target_root_node_id: options["target-root-node-id"] || null,
2840
- },
2918
+ headers: options["caller-model"] ? { "x-corvio-caller-model": String(options["caller-model"]) } : {},
2919
+ body: fileOrganizationBody(options),
2841
2920
  });
2921
+ } else if (action === "operation") {
2922
+ result = await api.request(`/file-operations/${resourcePath(assetId || option(options, "id", { required: true }))}`);
2842
2923
  } else if (action === "open") {
2843
2924
  const targetId = assetId || option(options, "id", { required: true });
2844
2925
  const target = `${String(process.env.CORVIO_APP_BASE || DEFAULT_APP_BASE).replace(/\/+$/, "")}/app/a/${resourcePath(targetId)}`;
2845
2926
  result = { file_id: targetId, url: target, opened: options["no-input"] ? false : await openBrowser(target) };
2846
2927
  } else {
2847
- throw new CliError("files action must be list, get, download, upload, organize, or open.");
2928
+ throw new CliError("files action must be list, get, download, upload, organize, operation, or open.");
2848
2929
  }
2849
2930
  writeResult(result, { json: options.json });
2850
2931
  }
2851
2932
 
2933
+ function fileOrganizationBody(options) {
2934
+ return {
2935
+ instruction: option(options, "instruction", { required: true }),
2936
+ target_root_node_id: options["target-root-node-id"] || null,
2937
+ additional_asset_ids: listOption(options, "additional-asset-ids", []),
2938
+ processing_profile: enumOption(options, "processing-profile", ["auto", "economy", "standard", "deep"], "auto"),
2939
+ max_processing_profile: optionalEnumOption(options, "max-processing-profile", ["economy", "standard", "deep"]),
2940
+ scan_mode: enumOption(options, "scan-mode", ["auto", "always", "off"], "auto"),
2941
+ skills_extraction_mode: enumOption(options, "skills-extraction-mode", ["auto", "always", "off"], "auto"),
2942
+ };
2943
+ }
2944
+
2852
2945
  function sha256(content) {
2853
2946
  return createHash("sha256").update(content).digest("hex");
2854
2947
  }
package/dist/core.js CHANGED
@@ -93,6 +93,7 @@ export function parseArgv(argv) {
93
93
  "no-input",
94
94
  "yes",
95
95
  "allow-actions",
96
+ "organize",
96
97
  "private-link",
97
98
  "force",
98
99
  "once",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corvio/cli",
3
- "version": "0.1.0-beta.15",
3
+ "version": "0.1.0-beta.16",
4
4
  "description": "Official Corvio Workspace CLI for questions, knowledge search, documents, and Agent workflows.",
5
5
  "type": "module",
6
6
  "bin": {