@vibecodr/cli 0.2.9 → 0.2.11

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.11
4
+
5
+ - add `vibecodr call --timeout-sec <n>` as a local MCP transport timeout for long-running protected tool calls such as build-backed publish retries
6
+ - keep `--timeout-sec` out of server tool arguments so hosted MCP schemas remain authoritative
7
+
3
8
  ## 0.2.6
4
9
 
5
10
  - publish a fresh CLI version so GitHub and npm carry the same current release marker
@@ -98,17 +98,30 @@ async function listToolsWithRetry(context, allowLogin) {
98
98
  throw error;
99
99
  }
100
100
  }
101
+ function parseCallTimeoutSeconds(value) {
102
+ if (value === undefined)
103
+ return undefined;
104
+ if (typeof value !== "string" || !value.trim()) {
105
+ throw new CliError("usage.call_timeout_invalid", "--timeout-sec must be a positive number of seconds.", EXIT_CODES.usage);
106
+ }
107
+ const parsed = Number(value);
108
+ if (!Number.isFinite(parsed) || parsed <= 0) {
109
+ throw new CliError("usage.call_timeout_invalid", "--timeout-sec must be a positive number of seconds.", EXIT_CODES.usage);
110
+ }
111
+ return parsed;
112
+ }
101
113
  export async function runCallCommand(args, context) {
102
- if (showHelpIfRequested(args, context, "Usage: vibecodr call <tool-name> [--input-json <json>] [--input-file <path>] [--stdin] [--interactive] [--no-login] [--confirm]"))
114
+ if (showHelpIfRequested(args, context, "Usage: vibecodr call <tool-name> [--input-json <json>] [--input-file <path>] [--stdin] [--interactive] [--timeout-sec <seconds>] [--no-login] [--confirm]"))
103
115
  return;
104
116
  const { flags, positionals } = parseFlags(args, {
105
- valueFlags: ["input-json", "input-file"],
117
+ valueFlags: ["input-json", "input-file", "timeout-sec"],
106
118
  booleanFlags: ["stdin", "interactive", "no-login", "confirm"]
107
119
  });
108
120
  const toolName = positionals[0];
109
121
  if (!toolName) {
110
122
  throw new CliError("usage.tool_name_required", "A tool name is required.", EXIT_CODES.usage);
111
123
  }
124
+ const timeoutSeconds = parseCallTimeoutSeconds(flags["timeout-sec"]);
112
125
  let input = {};
113
126
  if (typeof flags["input-json"] === "string") {
114
127
  input = JSON.parse(flags["input-json"]);
@@ -133,7 +146,7 @@ export async function runCallCommand(args, context) {
133
146
  if (CONFIRMED_TOOL_NAMES.has(toolName)) {
134
147
  input = { ...input, confirmed: true };
135
148
  }
136
- const { result } = await callToolWithRetry(context, toolName, input, !flags["no-login"]);
149
+ const { result } = await callToolWithRetry(context, toolName, input, !flags["no-login"], timeoutSeconds === undefined ? undefined : { timeoutSeconds });
137
150
  context.output.success({
138
151
  schemaVersion: 1,
139
152
  tool: toolName,
package/docs/commands.md CHANGED
@@ -58,7 +58,7 @@ This always reads the live tool catalog from the MCP server.
58
58
 
59
59
  Syntax:
60
60
 
61
- `vibecodr call <tool-name> [--input-json <json>] [--input-file <path>] [--stdin] [--interactive] [--no-login] [--confirm]`
61
+ `vibecodr call <tool-name> [--input-json <json>] [--input-file <path>] [--stdin] [--interactive] [--timeout-sec <n>] [--no-login] [--confirm]`
62
62
 
63
63
  `--interactive` currently supports top-level scalar object fields.
64
64
 
@@ -66,6 +66,8 @@ For `quick_publish_creation` with `payload.importMode: "direct_files"`, pass fil
66
66
 
67
67
  Known mutating tools require explicit confirmation through `--confirm`. The CLI redacts secret, token, source, descriptor, and inline file-content fields from displayed arguments and results; the MCP gateway remains the authority boundary for OAuth, owner checks, confirmation, and output shaping.
68
68
 
69
+ Use `--timeout-sec <n>` when a protected tool is expected to run longer than the default client wait, such as a build-backed publish retry. This changes only the local MCP transport timeout and is not forwarded as a server tool argument.
70
+
69
71
  ### `upload`
70
72
 
71
73
  Syntax:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibecodr/cli",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "description": "Vibecodr CLI for login, live MCP tool discovery, and live tool invocation.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",