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.
Files changed (65) hide show
  1. package/README.md +20 -4
  2. package/dist/commands/completion.js +1 -1
  3. package/dist/commands/config-cmd.js +32 -17
  4. package/dist/commands/doctor.js +6 -5
  5. package/dist/commands/home.js +4 -2
  6. package/dist/commands/login.js +201 -39
  7. package/dist/config/config.js +103 -14
  8. package/dist/core/client.js +16 -2
  9. package/dist/core/device-auth.js +41 -9
  10. package/dist/program.js +21 -1
  11. package/package.json +2 -2
  12. package/skill/SKILL.md +13 -1
  13. package/skill/commands/account.md +19 -5
  14. package/dist/src/ai/experts.js +0 -115
  15. package/dist/src/ai/llm.js +0 -88
  16. package/dist/src/ai/plan-card.js +0 -79
  17. package/dist/src/ai/wizard.js +0 -104
  18. package/dist/src/cli.js +0 -7
  19. package/dist/src/commands/account.js +0 -27
  20. package/dist/src/commands/ai.js +0 -113
  21. package/dist/src/commands/batch.js +0 -148
  22. package/dist/src/commands/completion.js +0 -84
  23. package/dist/src/commands/config-cmd.js +0 -84
  24. package/dist/src/commands/docs.js +0 -30
  25. package/dist/src/commands/doctor.js +0 -94
  26. package/dist/src/commands/generate.js +0 -81
  27. package/dist/src/commands/home.js +0 -68
  28. package/dist/src/commands/login.js +0 -225
  29. package/dist/src/commands/make.js +0 -142
  30. package/dist/src/commands/mcp.js +0 -194
  31. package/dist/src/commands/process-groups.js +0 -164
  32. package/dist/src/commands/shared.js +0 -75
  33. package/dist/src/commands/task.js +0 -127
  34. package/dist/src/commands/topup.js +0 -61
  35. package/dist/src/commands/view.js +0 -97
  36. package/dist/src/config/config.js +0 -79
  37. package/dist/src/config/context.js +0 -44
  38. package/dist/src/config/history.js +0 -104
  39. package/dist/src/core/client.js +0 -120
  40. package/dist/src/core/download.js +0 -107
  41. package/dist/src/core/errors.js +0 -64
  42. package/dist/src/core/output.js +0 -72
  43. package/dist/src/core/requests.js +0 -169
  44. package/dist/src/core/task-service.js +0 -161
  45. package/dist/src/core/upload.js +0 -36
  46. package/dist/src/core/viewer-assets.js +0 -24
  47. package/dist/src/core/viewer.js +0 -59
  48. package/dist/src/core/watch.js +0 -41
  49. package/dist/src/i18n.js +0 -19
  50. package/dist/src/knowledge/chains.js +0 -152
  51. package/dist/src/knowledge/error-catalog.js +0 -91
  52. package/dist/src/knowledge/models.js +0 -110
  53. package/dist/src/knowledge/params.js +0 -174
  54. package/dist/src/knowledge/scenarios.js +0 -112
  55. package/dist/src/pipeline/make.js +0 -233
  56. package/dist/src/pipeline/runner.js +0 -73
  57. package/dist/src/pipeline/stdin.js +0 -40
  58. package/dist/src/program.js +0 -147
  59. package/dist/src/types.js +0 -2
  60. package/dist/src/util/input-detect.js +0 -92
  61. package/dist/src/util/notify.js +0 -17
  62. package/dist/src/util/open.js +0 -18
  63. package/dist/src/util/spinner.js +0 -62
  64. package/dist/src/util/term-image.js +0 -28
  65. package/dist/src/version.js +0 -10
@@ -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
- }
@@ -1,10 +0,0 @@
1
- import { readFileSync } from 'node:fs';
2
- export function cliVersion() {
3
- try {
4
- const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
5
- return pkg.version ?? '0.0.0';
6
- }
7
- catch {
8
- return '0.0.0';
9
- }
10
- }