@descix/cli 2.0.4 → 3.0.0
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/bin/descix.js +20 -15
- package/lib/commands/model-config.js +3 -4
- package/package.json +2 -2
- package/templates/agent-claude.md +2 -2
package/bin/descix.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Combines CLI and MCP functionality with unified authentication.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { Command } from 'commander';
|
|
10
|
+
import { Command, Option } from 'commander';
|
|
11
11
|
import chalk from 'chalk';
|
|
12
12
|
import { DeSciXApiClient } from '../lib/api-client.js';
|
|
13
13
|
import { requireAuth } from '../lib/auth-guard.js';
|
|
@@ -1663,7 +1663,8 @@ appCommand
|
|
|
1663
1663
|
// ============ App: set-default-model (WS-CONFIG-BOOTSTRAP-FIX item #10) ============
|
|
1664
1664
|
//
|
|
1665
1665
|
// Updates Community/{c}/Apps/{a}.default_app_model. Per CEO inheritance chain:
|
|
1666
|
-
//
|
|
1666
|
+
// request intelligence_level > kb.kb_model_override > app.default_app_model > the level's model
|
|
1667
|
+
// (there is no separate default model: the default is the model of DEFAULT_INTELLIGENCE_LEVEL)
|
|
1667
1668
|
//
|
|
1668
1669
|
// --clear deletes the field via FieldValue.delete() (NOT null) so the resolver falls through
|
|
1669
1670
|
// cleanly to per-level platform defaults.
|
|
@@ -1672,13 +1673,13 @@ appCommand
|
|
|
1672
1673
|
.command('set-default-model')
|
|
1673
1674
|
.description('Set or clear App.default_app_model (model used when no KB override is set)')
|
|
1674
1675
|
.requiredOption('-a, --app <app_id>', 'App ID (e.g. unk-cos)')
|
|
1675
|
-
.option('-m, --model <model_name>', '
|
|
1676
|
+
.option('-m, --model <model_name>', 'Model name (e.g. gemini-3.8-flash). Mutually exclusive with --clear.')
|
|
1676
1677
|
.option('--clear', 'Delete App.default_app_model via FieldValue.delete() (resets to platform-default inheritance)')
|
|
1677
1678
|
.addHelpText('after', `
|
|
1678
|
-
NOTE:
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
"
|
|
1679
|
+
NOTE: A pinned model is paired with a thinking_level, and which levels exist is a
|
|
1680
|
+
property of the MODEL. The server refuses, by name, a (model, thinking_level) pair
|
|
1681
|
+
it does not support. The current intelligence levels (each names its own model and
|
|
1682
|
+
thinking_level) are printed under "Per-level" after this command runs.
|
|
1682
1683
|
`)
|
|
1683
1684
|
.action(async (options) => {
|
|
1684
1685
|
try {
|
|
@@ -1820,12 +1821,12 @@ kbCommand
|
|
|
1820
1821
|
.description('Set KB.kb_model_override (per-KB model selection)')
|
|
1821
1822
|
.requiredOption('-a, --app <app_id>', 'App ID')
|
|
1822
1823
|
.requiredOption('-k, --kb <kb_name>', 'KB name')
|
|
1823
|
-
.requiredOption('-m, --model <model_name>', '
|
|
1824
|
+
.requiredOption('-m, --model <model_name>', 'Model name (e.g. gemini-3.8-flash)')
|
|
1824
1825
|
.addHelpText('after', `
|
|
1825
|
-
NOTE:
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
"
|
|
1826
|
+
NOTE: A pinned model is paired with a thinking_level, and which levels exist is a
|
|
1827
|
+
property of the MODEL. The server refuses, by name, a (model, thinking_level) pair
|
|
1828
|
+
it does not support. The current intelligence levels (each names its own model and
|
|
1829
|
+
thinking_level) are printed under "Per-level" after this command runs.
|
|
1829
1830
|
`)
|
|
1830
1831
|
.action(async (options) => {
|
|
1831
1832
|
try {
|
|
@@ -3360,11 +3361,15 @@ program
|
|
|
3360
3361
|
.option('--apps <ids>', 'Comma-separated app IDs for cross-app query')
|
|
3361
3362
|
.option('--level <n>', 'Intelligence level (1-5)', parseInt)
|
|
3362
3363
|
.option('--model <name>', 'Explicit model override')
|
|
3363
|
-
.option('--thinking <
|
|
3364
|
+
.option('--thinking-level <level>', 'Thinking level for this call: minimal, low, medium or high. The server refuses a level the resolved model does not support.')
|
|
3365
|
+
.addOption(new Option('--thinking <budget>').hideHelp())
|
|
3364
3366
|
.option('--tokens', 'Show token usage in response footer')
|
|
3365
3367
|
.option('--new', 'Start a new conversation (clear session)')
|
|
3366
3368
|
.action(async (questionArgs, options) => {
|
|
3367
3369
|
try {
|
|
3370
|
+
if (options.thinking !== undefined) {
|
|
3371
|
+
throw new Error('--thinking (a token budget) was removed. Use --thinking-level <level>, one of minimal, low, medium, high.');
|
|
3372
|
+
}
|
|
3368
3373
|
const apiClient = new DeSciXApiClient();
|
|
3369
3374
|
await requireAuth(apiClient);
|
|
3370
3375
|
|
|
@@ -3390,7 +3395,7 @@ program
|
|
|
3390
3395
|
user_input: question,
|
|
3391
3396
|
intelligence_level: options.level,
|
|
3392
3397
|
model: options.model,
|
|
3393
|
-
|
|
3398
|
+
thinking_level: options.thinkingLevel,
|
|
3394
3399
|
streaming: false
|
|
3395
3400
|
});
|
|
3396
3401
|
const result = response.message || response;
|
|
@@ -3497,7 +3502,7 @@ program
|
|
|
3497
3502
|
streaming: false,
|
|
3498
3503
|
intelligence_level: options.level,
|
|
3499
3504
|
model: options.model,
|
|
3500
|
-
|
|
3505
|
+
thinking_level: options.thinkingLevel,
|
|
3501
3506
|
};
|
|
3502
3507
|
|
|
3503
3508
|
if (useMultiKb) {
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
* - descix kb set-override-model -a <app_id> -k <kb_name> -m <model_name> [--env=dev|demo|prod]
|
|
8
8
|
* - descix kb clear-override-model -a <app_id> -k <kb_name> [--env=dev|demo|prod]
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* Resolver order (the server owns it; this CLI prints the chain the server reports):
|
|
11
|
+
* request intelligence_level > kb.kb_model_override (+ its thinking_level) > app.default_app_model > the level's model
|
|
12
|
+
* There is no separate default model: the default is the model of the platform's default intelligence level.
|
|
12
13
|
*
|
|
13
14
|
* --clear flows use FieldValue.delete() server-side (NOT null) per tripwire #2.
|
|
14
15
|
*
|
|
@@ -110,12 +111,10 @@ function identityFromApiClient(apiClient) {
|
|
|
110
111
|
function printResolution({ app_id, resolution }) {
|
|
111
112
|
if (!resolution) return;
|
|
112
113
|
const dam = resolution.default_app_model === null ? 'null' : `"${resolution.default_app_model}"`;
|
|
113
|
-
const dai = resolution.default_ai_model ? `"${resolution.default_ai_model}"` : 'null';
|
|
114
114
|
|
|
115
115
|
console.log(chalk.cyan('\nResolution chain that will apply going forward:'));
|
|
116
116
|
console.log(chalk.gray(` ${resolution.chain}`));
|
|
117
117
|
console.log(chalk.gray(` app.default_app_model = ${dam}`));
|
|
118
|
-
console.log(chalk.gray(` utils.DEFAULT_AI_MODEL = ${dai}`));
|
|
119
118
|
|
|
120
119
|
const levels = resolution.intelligence_levels || {};
|
|
121
120
|
const levelKeys = Object.keys(levels).sort();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descix/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "DeSciX CLI and MCP Server - Unified command-line interface for DeSciX platform",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"googleapis": "^170.1.0",
|
|
41
41
|
"inquirer": "^12.1.0",
|
|
42
42
|
"ora": "^9.0.0",
|
|
43
|
-
"@descix/platform-api": "^
|
|
43
|
+
"@descix/platform-api": "^4.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"acorn": "^8.18.0"
|
|
@@ -288,7 +288,7 @@ You are bonded to cloud knowledge bases. **BEFORE starting any task**, query the
|
|
|
288
288
|
|
|
289
289
|
**Multi-app query (preferred — richer context):**
|
|
290
290
|
```bash
|
|
291
|
-
descix chat --apps APP1,APP2 -q "YOUR SPECIFIC QUESTION" --level 3 --thinking
|
|
291
|
+
descix chat --apps APP1,APP2 -q "YOUR SPECIFIC QUESTION" --level 3 --thinking-level low --tokens
|
|
292
292
|
```
|
|
293
293
|
|
|
294
294
|
**Single-app query:**
|
|
@@ -303,7 +303,7 @@ ask_question_to_app({ app_id: "APP_ID", user_input: "YOUR SPECIFIC QUESTION" })
|
|
|
303
303
|
|
|
304
304
|
**Query parameters:**
|
|
305
305
|
- `--level 1-5` — intelligence (1=fast lookup, 3=balanced, 5=deep reasoning)
|
|
306
|
-
- `--thinking
|
|
306
|
+
- `--thinking-level minimal|low|medium|high` — how much the model thinks; the server refuses a level the resolved model does not support
|
|
307
307
|
- `--tokens` — show token usage in response
|
|
308
308
|
- Omit `--new` to continue the session thread (Gemini remembers context)
|
|
309
309
|
|