tripo-cli 0.1.0 → 0.2.1
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 +20 -4
- package/dist/commands/completion.js +1 -1
- package/dist/commands/config-cmd.js +32 -17
- package/dist/commands/doctor.js +6 -5
- package/dist/commands/home.js +4 -2
- package/dist/commands/login.js +201 -39
- package/dist/config/config.js +103 -14
- package/dist/core/client.js +16 -2
- package/dist/core/device-auth.js +41 -9
- package/dist/program.js +21 -1
- package/package.json +2 -2
- package/skill/SKILL.md +13 -1
- package/skill/commands/account.md +19 -5
- package/dist/src/ai/experts.js +0 -115
- package/dist/src/ai/llm.js +0 -88
- package/dist/src/ai/plan-card.js +0 -79
- package/dist/src/ai/wizard.js +0 -104
- package/dist/src/cli.js +0 -7
- package/dist/src/commands/account.js +0 -27
- package/dist/src/commands/ai.js +0 -113
- package/dist/src/commands/batch.js +0 -148
- package/dist/src/commands/completion.js +0 -84
- package/dist/src/commands/config-cmd.js +0 -84
- package/dist/src/commands/docs.js +0 -30
- package/dist/src/commands/doctor.js +0 -94
- package/dist/src/commands/generate.js +0 -81
- package/dist/src/commands/home.js +0 -68
- package/dist/src/commands/login.js +0 -225
- package/dist/src/commands/make.js +0 -142
- package/dist/src/commands/mcp.js +0 -194
- package/dist/src/commands/process-groups.js +0 -164
- package/dist/src/commands/shared.js +0 -75
- package/dist/src/commands/task.js +0 -127
- package/dist/src/commands/topup.js +0 -61
- package/dist/src/commands/view.js +0 -97
- package/dist/src/config/config.js +0 -79
- package/dist/src/config/context.js +0 -44
- package/dist/src/config/history.js +0 -104
- package/dist/src/core/client.js +0 -120
- package/dist/src/core/download.js +0 -107
- package/dist/src/core/errors.js +0 -64
- package/dist/src/core/output.js +0 -72
- package/dist/src/core/requests.js +0 -169
- package/dist/src/core/task-service.js +0 -161
- package/dist/src/core/upload.js +0 -36
- package/dist/src/core/viewer-assets.js +0 -24
- package/dist/src/core/viewer.js +0 -59
- package/dist/src/core/watch.js +0 -41
- package/dist/src/i18n.js +0 -19
- package/dist/src/knowledge/chains.js +0 -152
- package/dist/src/knowledge/error-catalog.js +0 -91
- package/dist/src/knowledge/models.js +0 -110
- package/dist/src/knowledge/params.js +0 -174
- package/dist/src/knowledge/scenarios.js +0 -112
- package/dist/src/pipeline/make.js +0 -233
- package/dist/src/pipeline/runner.js +0 -73
- package/dist/src/pipeline/stdin.js +0 -40
- package/dist/src/program.js +0 -147
- package/dist/src/types.js +0 -2
- package/dist/src/util/input-detect.js +0 -92
- package/dist/src/util/notify.js +0 -17
- package/dist/src/util/open.js +0 -18
- package/dist/src/util/spinner.js +0 -62
- package/dist/src/util/term-image.js +0 -28
- package/dist/src/version.js +0 -10
package/dist/src/util/spinner.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal stderr spinner. Interactive TTY gets an animated line; headless
|
|
3
|
-
* environments get sparse plain-text progress lines (never control codes).
|
|
4
|
-
*/
|
|
5
|
-
import pc from 'picocolors';
|
|
6
|
-
const FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
7
|
-
export function createSpinner(initialText, quiet = false) {
|
|
8
|
-
const isTTY = Boolean(process.stderr.isTTY);
|
|
9
|
-
let text = initialText;
|
|
10
|
-
let frame = 0;
|
|
11
|
-
let timer;
|
|
12
|
-
let lastPlainLog = 0;
|
|
13
|
-
const render = () => {
|
|
14
|
-
process.stderr.write(`\r\x1b[2K${pc.cyan(FRAMES[frame % FRAMES.length])} ${text}`);
|
|
15
|
-
frame++;
|
|
16
|
-
};
|
|
17
|
-
const clearLine = () => {
|
|
18
|
-
if (isTTY)
|
|
19
|
-
process.stderr.write('\r\x1b[2K');
|
|
20
|
-
};
|
|
21
|
-
if (!quiet && isTTY) {
|
|
22
|
-
render();
|
|
23
|
-
timer = setInterval(render, 100);
|
|
24
|
-
timer.unref?.();
|
|
25
|
-
}
|
|
26
|
-
else if (!quiet) {
|
|
27
|
-
process.stderr.write(`${initialText}\n`);
|
|
28
|
-
lastPlainLog = Date.now();
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
update(next) {
|
|
32
|
-
text = next;
|
|
33
|
-
if (quiet)
|
|
34
|
-
return;
|
|
35
|
-
if (!isTTY) {
|
|
36
|
-
// Throttle non-TTY progress to one line per 5s to keep logs readable.
|
|
37
|
-
if (Date.now() - lastPlainLog > 5000) {
|
|
38
|
-
process.stderr.write(`${next}\n`);
|
|
39
|
-
lastPlainLog = Date.now();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
succeed(finalText) {
|
|
44
|
-
if (timer)
|
|
45
|
-
clearInterval(timer);
|
|
46
|
-
clearLine();
|
|
47
|
-
if (!quiet)
|
|
48
|
-
process.stderr.write(`${pc.green('✓')} ${finalText}\n`);
|
|
49
|
-
},
|
|
50
|
-
fail(finalText) {
|
|
51
|
-
if (timer)
|
|
52
|
-
clearInterval(timer);
|
|
53
|
-
clearLine();
|
|
54
|
-
process.stderr.write(`${pc.red('✗')} ${finalText}\n`);
|
|
55
|
-
},
|
|
56
|
-
stop() {
|
|
57
|
-
if (timer)
|
|
58
|
-
clearInterval(timer);
|
|
59
|
-
clearLine();
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Inline image display for capable terminals (iTerm2 OSC 1337; Kitty graphics
|
|
3
|
-
* protocol consumers also honor the iTerm sequence via icat shims). Falls back
|
|
4
|
-
* to returning false so callers can open the system viewer instead.
|
|
5
|
-
*/
|
|
6
|
-
import { readFileSync } from 'node:fs';
|
|
7
|
-
import { basename } from 'node:path';
|
|
8
|
-
export function terminalSupportsInlineImages() {
|
|
9
|
-
if (!process.stdout.isTTY)
|
|
10
|
-
return false;
|
|
11
|
-
const program = process.env.TERM_PROGRAM ?? '';
|
|
12
|
-
const term = process.env.TERM ?? '';
|
|
13
|
-
return program === 'iTerm.app' || program === 'WezTerm' || term.includes('kitty');
|
|
14
|
-
}
|
|
15
|
-
export function printInlineImage(filePath, stream = process.stderr) {
|
|
16
|
-
if (!terminalSupportsInlineImages())
|
|
17
|
-
return false;
|
|
18
|
-
try {
|
|
19
|
-
const data = readFileSync(filePath);
|
|
20
|
-
const b64 = data.toString('base64');
|
|
21
|
-
const name = Buffer.from(basename(filePath)).toString('base64');
|
|
22
|
-
stream.write(`\x1b]1337;File=name=${name};size=${data.length};inline=1;width=40%:${b64}\x07\n`);
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
catch {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
}
|
package/dist/src/version.js
DELETED