-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathindex.ts
More file actions
103 lines (94 loc) · 3.3 KB
/
Copy pathindex.ts
File metadata and controls
103 lines (94 loc) · 3.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// Runtime framework for bailian-cli products. Agnostic to which commands exist:
// each entrypoint (bl / rag / …) injects its own command set via createCli().
// Entrypoint factory + identity
export { createCli } from "./create-cli.ts";
export type { Cli, CliOptions } from "./create-cli.ts";
// Command Pack product policy
export type {
CommandPackCredentialAccess,
CommandPackDefinition,
CommandPackPolicy,
} from "./command-packs/types.ts";
// Command routing
export { CommandRegistry } from "./registry.ts";
export type { Command, FlagDef, LocateResult } from "./registry.ts";
export { resolve } from "./resolve.ts";
export type { Resolution } from "./resolve.ts";
export { compose, type RunContext, type Middleware } from "./middleware.ts";
// Arg parsing
export { parsePath, parseFlags } from "./args.ts";
export type { ParsePathResult } from "./args.ts";
// Process-level setup / error handling
export { setupProxyFromEnv } from "./proxy.ts";
export { handleError } from "./error-handler.ts";
export { CLI_VERSION } from "./version.ts";
// Console URLs referenced by commands (e.g. auth/status, banner)
export {
BAILIAN_CONSOLE_ROOT,
BAILIAN_CONSOLE,
API_KEY_PAGE,
TOKEN_PLAN_PAGE,
MCP_WEBSEARCH_PAGE,
mcpMarketplaceDetailPage,
VOICE_TTS_PAGE,
} from "./urls.ts";
// Output facilities consumed by commands
export { emitResult, emitBare, emitRequestId } from "./output/output.ts";
export { formatTable } from "./output/table.ts";
export {
renderBoxTable,
renderGauge,
type BoxTableOptions,
type BarColumn,
type GaugeCell,
} from "./output/box-table.ts";
export { createSpinner, createProgressBar } from "./output/progress.ts";
export { printWelcomeBanner, printQuickStart } from "./output/banner.ts";
export { maybeShowStatusBar } from "./output/status-bar.ts";
export { displayWidth, padEnd } from "./output/cjk-width.ts";
export {
ansi,
isTerminal,
supportsColor,
type AnsiStyles,
type TextStyle,
} from "./output/color.ts";
// Utility facilities consumed by commands
export { poll } from "./utils/polling.ts";
export { downloadFile, formatBytes } from "./utils/download.ts";
export { runConcurrent, getConcurrency, downloadParallel } from "./utils/concurrent.ts";
export { resolveImageSize } from "./utils/image-size.ts";
export {
checkForUpdate,
getPendingUpdateNotification,
fetchLatestVersion,
NPM_PACKAGE,
NPM_REGISTRY,
} from "./utils/update-checker.ts";
export {
ensureBinaryPathEntries,
fetchBinaryChannelVersion,
fetchBinaryChannelManifest,
getBinaryBinRoot,
getBinaryCurrentPath,
getBinaryShareRoot,
getBinaryVersionsDir,
isValidUpdateTargetVersion,
normalizeBinaryVersion,
performBinaryUpdate,
pruneBinaryVersions,
readCurrentVersionDir,
resolveBinaryDownloadSpec,
switchCurrentToVersion,
} from "./utils/binary-update.ts";
export {
BOOL_FLAG_WATERMARK,
BOOL_FLAG_PROMPT_EXTEND_CLI_TRUE,
BOOL_FLAG_PROMPT_EXTEND_IMAGE_GENERATE,
BOOL_FLAG_PROMPT_EXTEND_API_DEFAULT,
} from "./utils/flag-descriptions.ts";
// Pipeline subsystem consumed by pipeline commands
export { initPipelineSteps } from "./pipeline/init.ts";
export { executePipeline, streamPipelineEvents } from "./pipeline/executor.ts";
export { collectPipelineIssues, collectPipelineHints } from "./pipeline/validation.ts";
export type { PipelineDefinition, PipelineLifecycleEvent } from "./pipeline/types.ts";