vigthoria-cli 1.13.10 → 1.13.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/dist/utils/api.js CHANGED
@@ -183,7 +183,12 @@ export function sanitizeUserFacingErrorText(input) {
183
183
  return '';
184
184
  }
185
185
  const withoutTags = raw.replace(/<[^>]+>/g, ' ');
186
- return sanitizeUserFacingPathText(withoutTags).replace(/\s+/g, ' ').trim();
186
+ return sanitizeUserFacingPathText(withoutTags)
187
+ .replace(/\\[nr]/g, ' ')
188
+ .replace(/https?:\/\/(?:localhost|127\.0\.0\.1)(?::\d+)?(?:\/[^\s'")\]]*)?/gi, 'internal AI service')
189
+ .replace(/\b(?:deepseek|openrouter)\/[A-Za-z0-9._/-]+\b/gi, 'cloud model')
190
+ .replace(/\s+/g, ' ')
191
+ .trim();
187
192
  }
188
193
  const TRUSTED_TOKEN_HOST_PATTERN = /(^|\.)vigthoria\.io$/i;
189
194
  function isLoopbackHost(hostname) {
@@ -2658,6 +2663,13 @@ menu {
2658
2663
  const ranked = buildSemanticContext(rootPath, requestFocus, 60).topFiles.map((file) => file.path);
2659
2664
  const changes = getChangedFiles(rootPath, candidatePaths);
2660
2665
  const ordered = new Set();
2666
+ // Resume state must outrank semantic source ranking. The previous
2667
+ // implementation initialized orderedPaths with agentStatePaths, then
2668
+ // replaced it here with candidatePaths only. Since candidatePaths
2669
+ // intentionally excludes .vigthoria, every successful semantic pass
2670
+ // silently dropped progress.json and forced /continue to re-plan.
2671
+ for (const filePath of agentStatePaths)
2672
+ ordered.add(filePath);
2661
2673
  for (const filePath of changes.changed)
2662
2674
  ordered.add(filePath);
2663
2675
  for (const filePath of ranked)
@@ -2673,7 +2685,7 @@ menu {
2673
2685
  };
2674
2686
  }
2675
2687
  catch {
2676
- orderedPaths = candidatePaths;
2688
+ orderedPaths = [...agentStatePaths, ...candidatePaths];
2677
2689
  }
2678
2690
  summary.fileCount = snapshot.fileCount;
2679
2691
  summary.files = orderedPaths.slice(0, 40);
@@ -4070,6 +4082,10 @@ document.addEventListener('DOMContentLoaded', () => {
4070
4082
  events,
4071
4083
  files: streamedFiles,
4072
4084
  partial: true,
4085
+ terminal_error: {
4086
+ message: event.message || 'V3 agent returned an error',
4087
+ code: event.code || event.error_code || null,
4088
+ },
4073
4089
  };
4074
4090
  }
4075
4091
  throw new Error(event.message || 'V3 agent returned an error');
@@ -4228,6 +4244,32 @@ document.addEventListener('DOMContentLoaded', () => {
4228
4244
  const contextId = data.context_id || response.headers.get('x-context-id') || requestExecutionContext.contextId || null;
4229
4245
  const mcpContextId = response.headers.get('x-mcp-context-id') || requestExecutionContext.mcpContextId || null;
4230
4246
  this.recoverAgentWorkspaceFiles(executionContext, data.files || {}, expectedFiles);
4247
+ if (data.terminal_error) {
4248
+ // A pre-existing local project is not proof that this run produced
4249
+ // valid output. Preserve real streamed mutations, but never run or
4250
+ // report a preview gate after a terminal planner/executor error.
4251
+ const failedPreviewGate = {
4252
+ required: false,
4253
+ passed: false,
4254
+ skipped: true,
4255
+ error: 'Agent execution failed before preview validation.',
4256
+ };
4257
+ return this.finalizeV3AgentWorkflowResponse(data, {
4258
+ content: '',
4259
+ taskId: data.task_id || null,
4260
+ contextId,
4261
+ backendUrl: baseUrl,
4262
+ partial: true,
4263
+ metadata: {
4264
+ source: 'v3-agent',
4265
+ mode: 'agent',
4266
+ contextId,
4267
+ mcpContextId,
4268
+ previewGate: failedPreviewGate,
4269
+ workflowError: data.terminal_error,
4270
+ },
4271
+ });
4272
+ }
4231
4273
  await this.waitForAgentWorkspaceSettle(executionContext, { expectedFiles });
4232
4274
  await this.ensureAgentFrontendPolish(message, executionContext);
4233
4275
  const previewGate = await this.runTemplateServicePreviewGate(message, executionContext);
package/install.ps1 CHANGED
@@ -5,7 +5,7 @@
5
5
  $ErrorActionPreference = "Stop"
6
6
 
7
7
  # Configuration
8
- $CLI_VERSION = "1.13.10"
8
+ $CLI_VERSION = "1.13.9"
9
9
  $INSTALL_DIR = "$env:USERPROFILE\.vigthoria"
10
10
  $NPM_PACKAGE = "vigthoria-cli"
11
11
  $GIT_PACKAGE_URL = "git+https://market.vigthoria.io/vigthoria/vigthoria-cli.git"
package/install.sh CHANGED
@@ -26,13 +26,12 @@ else
26
26
  fi
27
27
 
28
28
  # Configuration
29
- CLI_VERSION="1.13.10"
29
+ CLI_VERSION="1.13.9"
30
30
  INSTALL_DIR="$HOME/.vigthoria"
31
31
  REPO_URL="https://market.vigthoria.io/vigthoria/vigthoria-cli"
32
32
  GIT_PACKAGE_URL="git+https://market.vigthoria.io/vigthoria/vigthoria-cli.git"
33
33
  MANIFEST_URL="${VIGTHORIA_UPDATE_MANIFEST_URL:-https://extension.vigthoria.io/downloads/manifest.json}"
34
34
  HOSTED_TARBALL_URL="https://extension.vigthoria.io/downloads/vigthoria-cli-${CLI_VERSION}.tgz"
35
- HOSTED_TARBALL_SHA256=""
36
35
 
37
36
  resolve_release_manifest() {
38
37
  if ! command -v curl >/dev/null 2>&1 || ! command -v python3 >/dev/null 2>&1; then
@@ -53,34 +52,24 @@ try:
53
52
  stable = (data.get('channels') or {}).get('stable') or {}
54
53
  version = str(stable.get('version') or '').strip()
55
54
  url = str(stable.get('url') or '').strip()
56
- sha256 = str(stable.get('sha256') or '').strip().lower()
57
55
  if version:
58
56
  print(version)
59
57
  if url:
60
58
  print(url)
61
- if sha256:
62
- print(sha256)
63
59
  except Exception:
64
60
  pass
65
61
  " 2>/dev/null || true)"
66
62
 
67
63
  if [[ -n "$resolved" ]]; then
68
- # macOS ships Bash 3.2, which does not provide mapfile/readarray.
69
- # Parse the two-line response with POSIX sed instead.
70
- manifest_version="$(printf '%s\n' "$resolved" | sed -n '1p')"
71
- manifest_url="$(printf '%s\n' "$resolved" | sed -n '2p')"
72
- manifest_sha256="$(printf '%s\n' "$resolved" | sed -n '3p')"
73
- if [[ -n "$manifest_version" ]]; then
74
- CLI_VERSION="$manifest_version"
64
+ mapfile -t _manifest_lines <<< "$resolved"
65
+ if [[ -n "${_manifest_lines[0]:-}" ]]; then
66
+ CLI_VERSION="${_manifest_lines[0]}"
75
67
  fi
76
- if [[ -n "$manifest_url" ]]; then
77
- HOSTED_TARBALL_URL="$manifest_url"
78
- elif [[ -n "$manifest_version" ]]; then
68
+ if [[ -n "${_manifest_lines[1]:-}" ]]; then
69
+ HOSTED_TARBALL_URL="${_manifest_lines[1]}"
70
+ elif [[ -n "${_manifest_lines[0]:-}" ]]; then
79
71
  HOSTED_TARBALL_URL="https://extension.vigthoria.io/downloads/vigthoria-cli-${CLI_VERSION}.tgz"
80
72
  fi
81
- if [[ "$manifest_sha256" =~ ^[a-f0-9]{64}$ ]]; then
82
- HOSTED_TARBALL_SHA256="$manifest_sha256"
83
- fi
84
73
  fi
85
74
  }
86
75
 
@@ -188,32 +177,10 @@ install_cli() {
188
177
  # Create install directory
189
178
  mkdir -p "$INSTALL_DIR"
190
179
 
191
- # Option 1: Download and verify the exact hosted release package.
192
- if [[ -n "$HOSTED_TARBALL_SHA256" ]]; then
193
- echo "Downloading checksum-verified hosted release package..."
194
- RELEASE_TMP_DIR="$(mktemp -d "${TMPDIR:-/tmp}/vigthoria-cli-install.XXXXXX")"
195
- RELEASE_ARCHIVE="$RELEASE_TMP_DIR/vigthoria-cli-${CLI_VERSION}.tgz"
196
- if ! curl -fsSL "$HOSTED_TARBALL_URL" -o "$RELEASE_ARCHIVE"; then
197
- rm -rf "$RELEASE_TMP_DIR"
198
- echo -e "${RED}✗ Failed to download verified release package${NC}"
199
- exit 1
200
- fi
201
- if command -v shasum >/dev/null 2>&1; then
202
- ACTUAL_SHA256="$(shasum -a 256 "$RELEASE_ARCHIVE" | awk '{print $1}')"
203
- elif command -v sha256sum >/dev/null 2>&1; then
204
- ACTUAL_SHA256="$(sha256sum "$RELEASE_ARCHIVE" | awk '{print $1}')"
205
- else
206
- rm -rf "$RELEASE_TMP_DIR"
207
- echo -e "${RED}✗ SHA-256 verification tool is unavailable${NC}"
208
- exit 1
209
- fi
210
- if [[ "$ACTUAL_SHA256" != "$HOSTED_TARBALL_SHA256" ]]; then
211
- rm -rf "$RELEASE_TMP_DIR"
212
- echo -e "${RED}✗ Release checksum verification failed${NC}"
213
- exit 1
214
- fi
215
- npm install -g --force "$RELEASE_ARCHIVE"
216
- rm -rf "$RELEASE_TMP_DIR"
180
+ # Option 1: Install the hosted release package.
181
+ if curl -fsI "$HOSTED_TARBALL_URL" > /dev/null 2>&1; then
182
+ echo "Installing hosted release package..."
183
+ npm install -g --force "$HOSTED_TARBALL_URL"
217
184
  elif npm view vigthoria-cli version &> /dev/null; then
218
185
  echo "Installing from npm registry..."
219
186
  npm install -g --force vigthoria-cli
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vigthoria-cli",
3
- "version": "1.13.10",
3
+ "version": "1.13.11",
4
4
  "description": "Vigthoria Coder CLI - AI-powered terminal coding assistant",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",