vigthoria-cli 1.13.7 → 1.13.8
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 +1 -1
- package/dist/commands/chat.js +10 -12
- package/dist/commands/wallet.js +6 -7
- package/dist/utils/api.js +2 -0
- package/dist/utils/config.js +4 -1
- package/install.ps1 +1 -1
- package/install.sh +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -99,7 +99,7 @@ If you see `ENOTFOUND registry.npmjs.org`, try these solutions:
|
|
|
99
99
|
4. **Direct tarball download:**
|
|
100
100
|
```bash
|
|
101
101
|
# Download directly
|
|
102
|
-
npm install -g https://coder.vigthoria.io/releases/vigthoria-cli-
|
|
102
|
+
npm install -g https://coder.vigthoria.io/releases/vigthoria-cli-latest.tgz
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
5. **Use Git clone method (no npm registry needed):**
|
package/dist/commands/chat.js
CHANGED
|
@@ -402,16 +402,6 @@ export class ChatCommand {
|
|
|
402
402
|
routeReason: `balanced-4b-router → ${this.lastAgentRoute.taskKind}`,
|
|
403
403
|
};
|
|
404
404
|
}
|
|
405
|
-
if (this.config.shouldUseCloudForHeavyTask(prompt)) {
|
|
406
|
-
return {
|
|
407
|
-
selectedModel: 'cloud',
|
|
408
|
-
explicitModel: false,
|
|
409
|
-
heavyTask: true,
|
|
410
|
-
cloudEligible: true,
|
|
411
|
-
cloudSelected: true,
|
|
412
|
-
routeReason: 'heavy-enterprise-task',
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
405
|
return {
|
|
416
406
|
selectedModel: 'agent',
|
|
417
407
|
explicitModel: false,
|
|
@@ -1322,7 +1312,15 @@ export class ChatCommand {
|
|
|
1322
1312
|
const toolCalls = Number.isFinite(Number(event.tool_calls)) ? Number(event.tool_calls) : 0;
|
|
1323
1313
|
const chars = Number.isFinite(Number(event.content_chars)) ? Number(event.content_chars) : 0;
|
|
1324
1314
|
const finish = event.finish_reason ? `, ${this.sanitizeServerPath(String(event.finish_reason))}` : '';
|
|
1325
|
-
|
|
1315
|
+
const billing = event.billing && typeof event.billing === 'object' ? event.billing : null;
|
|
1316
|
+
const billingSuffix = billing
|
|
1317
|
+
? billing.billingMode === 'master_admin'
|
|
1318
|
+
? chalk.gray(' · Master Admin audited access')
|
|
1319
|
+
: billing.status === 'settlement_pending'
|
|
1320
|
+
? chalk.yellow(` · ${Number(billing.reservedCredits || 0)} ⓥ reserved (settlement pending)`)
|
|
1321
|
+
: chalk.yellow(` · ${Number(billing.actualCredits || 0)} ⓥ charged${billing.balanceAfter != null ? ` · ${Number(billing.balanceAfter)} ⓥ remaining` : ''}`)
|
|
1322
|
+
: '';
|
|
1323
|
+
process.stderr.write(chalk.cyan(' [Model] ') + `${model}: produced ${toolCalls} tool call${toolCalls === 1 ? '' : 's'}${chars ? `, ${chars} chars` : ''}${finish}${billingSuffix}\n`);
|
|
1326
1324
|
spinner.start();
|
|
1327
1325
|
spinner.text = toolCalls > 0 ? 'Executing model-selected tools...' : 'Processing model response...';
|
|
1328
1326
|
return;
|
|
@@ -3059,7 +3057,7 @@ export class ChatCommand {
|
|
|
3059
3057
|
console.log(chalk.gray(`Reason: ${routingPolicy.routeReason}`));
|
|
3060
3058
|
console.log(chalk.gray(`Model: ${routingPolicy.selectedModel}`));
|
|
3061
3059
|
console.log(chalk.gray('Remote Engine Session: true'));
|
|
3062
|
-
console.log(chalk.gray(`Cloud
|
|
3060
|
+
console.log(chalk.gray(`Cloud PAYG Available: ${routingPolicy.cloudEligible}`));
|
|
3063
3061
|
console.log(chalk.gray(`Cloud Selected: ${routingPolicy.cloudSelected}`));
|
|
3064
3062
|
if (routingPolicy.heavyTask) {
|
|
3065
3063
|
console.log(chalk.gray(`Task Complexity: HEAVY`));
|
package/dist/commands/wallet.js
CHANGED
|
@@ -159,16 +159,15 @@ export class WalletCommand {
|
|
|
159
159
|
if (data.isMasterAdmin) {
|
|
160
160
|
console.log(` Access: ${chalk.bold.green('Master Admin — unlimited cloud access')}`);
|
|
161
161
|
}
|
|
162
|
-
else if (data.hasGrant) {
|
|
163
|
-
const models = data.grantDetails?.allowedModels === '*' ? 'All models' : data.grantDetails?.allowedModels;
|
|
164
|
-
const exp = data.grantDetails?.expiresAt ? ` (expires ${new Date(data.grantDetails.expiresAt).toLocaleDateString()})` : '';
|
|
165
|
-
console.log(` Access: ${chalk.green(`Granted — ${models}${exp}`)}`);
|
|
166
|
-
}
|
|
167
162
|
else if (data.cloudAccessAllowed) {
|
|
168
|
-
console.log(` Access: ${chalk.yellow('
|
|
163
|
+
console.log(` Access: ${chalk.yellow('Pay as you go — explicit selection and wallet credits required')}`);
|
|
164
|
+
console.log(` Balance: ${chalk.bold.yellow(Number(data.balance || 0).toLocaleString())} ⓥ`);
|
|
165
|
+
if (data.hasGrant) {
|
|
166
|
+
console.log(chalk.gray(' Model grant: active (billing still applies)'));
|
|
167
|
+
}
|
|
169
168
|
}
|
|
170
169
|
else {
|
|
171
|
-
console.log(` Access: ${chalk.red('
|
|
170
|
+
console.log(` Access: ${chalk.red('Unavailable for this account')}`);
|
|
172
171
|
}
|
|
173
172
|
console.log('');
|
|
174
173
|
if (data.cloudModels) {
|
package/dist/utils/api.js
CHANGED
|
@@ -4768,6 +4768,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
4768
4768
|
model: resolvedModel,
|
|
4769
4769
|
maxTokens: this.config.get('preferences').maxTokens,
|
|
4770
4770
|
temperature: 0.7,
|
|
4771
|
+
cloudConsent: this.isCloudModelId(resolvedModel),
|
|
4771
4772
|
});
|
|
4772
4773
|
if (response.data.success !== false) {
|
|
4773
4774
|
const content = response.data.response || response.data.message || response.data.content;
|
|
@@ -4798,6 +4799,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
4798
4799
|
model: resolvedModel,
|
|
4799
4800
|
maxTokens: this.config.get('preferences').maxTokens,
|
|
4800
4801
|
temperature: 0.7,
|
|
4802
|
+
cloudConsent: this.isCloudModelId(resolvedModel),
|
|
4801
4803
|
}, {
|
|
4802
4804
|
timeout: 180000,
|
|
4803
4805
|
httpsAgent: this._httpsAgent ?? undefined,
|
package/dist/utils/config.js
CHANGED
|
@@ -147,7 +147,10 @@ export class Config {
|
|
|
147
147
|
return Config.OPERATOR_PLANS.has(this.getNormalizedPlan());
|
|
148
148
|
}
|
|
149
149
|
hasCloudAccess() {
|
|
150
|
-
|
|
150
|
+
// Cloud model visibility means the authenticated user may explicitly
|
|
151
|
+
// request PAYG execution. It never implies free access; the server
|
|
152
|
+
// atomically reserves wallet credits for every provider call.
|
|
153
|
+
return this.isAuthenticated();
|
|
151
154
|
}
|
|
152
155
|
getConfigPath() {
|
|
153
156
|
return this.store.path;
|
package/install.ps1
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
$ErrorActionPreference = "Stop"
|
|
6
6
|
|
|
7
7
|
# Configuration
|
|
8
|
-
$CLI_VERSION = "1.13.
|
|
8
|
+
$CLI_VERSION = "1.13.8"
|
|
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,7 +26,7 @@ else
|
|
|
26
26
|
fi
|
|
27
27
|
|
|
28
28
|
# Configuration
|
|
29
|
-
CLI_VERSION="1.13.
|
|
29
|
+
CLI_VERSION="1.13.8"
|
|
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"
|