@aisa-one/cli 0.3.0 → 0.5.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/CHANGELOG.md +143 -1
- package/LICENSE +21 -0
- package/README.md +151 -162
- package/dist/api.d.ts +10 -0
- package/dist/api.js +14 -3
- package/dist/catalog.d.ts +1 -18
- package/dist/catalog.js +1 -24
- package/dist/cli-error.d.ts +17 -0
- package/dist/cli-error.js +25 -0
- package/dist/cli-guidance.d.ts +14 -0
- package/dist/cli-guidance.js +55 -0
- package/dist/commands/account.d.ts +17 -0
- package/dist/commands/account.js +45 -1
- package/dist/commands/api.d.ts +0 -11
- package/dist/commands/api.js +6 -175
- package/dist/commands/auth.d.ts +2 -1
- package/dist/commands/auth.js +43 -9
- package/dist/commands/brand-logos.d.ts +6 -0
- package/dist/commands/brand-logos.js +21 -0
- package/dist/commands/configCmd.js +8 -3
- package/dist/commands/connect-shared.d.ts +136 -0
- package/dist/commands/connect-shared.js +143 -0
- package/dist/commands/connect-t2.d.ts +18 -0
- package/dist/commands/connect-t2.js +1599 -0
- package/dist/commands/connect-terminal.d.ts +65 -0
- package/dist/commands/connect-terminal.js +822 -0
- package/dist/commands/connect.d.ts +31 -0
- package/dist/commands/connect.js +3181 -0
- package/dist/commands/flow.d.ts +685 -0
- package/dist/commands/flow.js +697 -0
- package/dist/commands/install.d.ts +91 -0
- package/dist/commands/install.js +258 -0
- package/dist/commands/llm-config.d.ts +103 -0
- package/dist/commands/llm-config.js +452 -0
- package/dist/commands/manifest.d.ts +68 -0
- package/dist/commands/manifest.js +90 -0
- package/dist/commands/mcp.d.ts +59 -0
- package/dist/commands/mcp.js +122 -44
- package/dist/commands/oauth-login.d.ts +33 -0
- package/dist/commands/oauth-login.js +333 -0
- package/dist/commands/prompt.d.ts +96 -0
- package/dist/commands/prompt.js +397 -0
- package/dist/commands/serve-results.d.ts +61 -0
- package/dist/commands/serve-results.js +245 -0
- package/dist/commands/serve-signin.d.ts +28 -0
- package/dist/commands/serve-signin.js +90 -0
- package/dist/commands/signin-page.d.ts +49 -0
- package/dist/commands/signin-page.js +250 -0
- package/dist/commands/skills.js +87 -50
- package/dist/commands/tool-help.d.ts +69 -0
- package/dist/commands/tool-help.js +189 -0
- package/dist/commands/tool-input.d.ts +22 -0
- package/dist/commands/tool-input.js +220 -0
- package/dist/commands/tools.d.ts +12 -0
- package/dist/commands/tools.js +307 -0
- package/dist/commands/update.d.ts +11 -0
- package/dist/commands/update.js +92 -0
- package/dist/commands/vscode.d.ts +65 -0
- package/dist/commands/vscode.js +173 -0
- package/dist/commands/wrappers.d.ts +23 -0
- package/dist/commands/wrappers.js +102 -0
- package/dist/completion.js +3 -80
- package/dist/config.js +76 -2
- package/dist/constants.d.ts +51 -38
- package/dist/constants.js +53 -109
- package/dist/index.js +152 -355
- package/dist/json-text.d.ts +12 -0
- package/dist/json-text.js +60 -0
- package/dist/router.d.ts +39 -0
- package/dist/router.js +59 -0
- package/dist/skills-registry.js +12 -3
- package/dist/utils/banner.d.ts +9 -0
- package/dist/utils/banner.js +41 -0
- package/dist/utils/browser.d.ts +19 -0
- package/dist/utils/browser.js +31 -0
- package/dist/utils/exec.d.ts +43 -0
- package/dist/utils/exec.js +61 -0
- package/dist/utils/http.d.ts +53 -0
- package/dist/utils/http.js +124 -0
- package/dist/utils/install-method.d.ts +36 -0
- package/dist/utils/install-method.js +48 -0
- package/dist/utils/journal.d.ts +57 -0
- package/dist/utils/journal.js +188 -0
- package/dist/utils/key-check.d.ts +20 -0
- package/dist/utils/key-check.js +24 -0
- package/dist/utils/update-check.d.ts +23 -0
- package/dist/utils/update-check.js +116 -0
- package/dist/utils/width.d.ts +32 -0
- package/dist/utils/width.js +73 -0
- package/package.json +8 -4
- package/vscode-extension/README.md +6 -0
- package/vscode-extension/aisa-vscode.vsix +0 -0
- package/dist/commands/finance.d.ts +0 -17
- package/dist/commands/finance.js +0 -342
- package/dist/commands/run.d.ts +0 -28
- package/dist/commands/run.js +0 -182
- package/dist/commands/search.d.ts +0 -9
- package/dist/commands/search.js +0 -81
- package/dist/commands/twitter.d.ts +0 -138
- package/dist/commands/twitter.js +0 -374
- package/dist/commands/video.d.ts +0 -49
- package/dist/commands/video.js +0 -311
package/dist/constants.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.5.0";
|
|
2
2
|
/** Root of the platform. Per-surface bases are derived in api.ts#resolveBases. */
|
|
3
3
|
export declare const BASE_URL = "https://api.aisa.one";
|
|
4
4
|
export declare const ENV_VAR_NAME = "AISA_API_KEY";
|
|
@@ -7,15 +7,47 @@ export declare const ENV_VAR_NAME = "AISA_API_KEY";
|
|
|
7
7
|
* exist and where they live. The CLI deliberately knows no server list of its
|
|
8
8
|
* own: servers ship and retire on the platform side, and reading the manifest
|
|
9
9
|
* at setup time means a new server works without a CLI release (the same
|
|
10
|
-
* philosophy as
|
|
10
|
+
* philosophy as live catalog/MCP discovery, applied to the fast-moving side).
|
|
11
11
|
*
|
|
12
12
|
* History: until v0.2.4 this file hardcoded MCP_URL = "https://docs.aisa.one/mcp",
|
|
13
13
|
* a host that does not resolve — every `aisa mcp setup` wrote a dead entry into
|
|
14
14
|
* users' configs, and nothing noticed because the command had no tests.
|
|
15
15
|
*/
|
|
16
16
|
export declare const MCP_MANIFEST_URL = "https://aisa.one/.well-known/mcp.json";
|
|
17
|
+
/**
|
|
18
|
+
* The live server index, served by the MCP host itself.
|
|
19
|
+
*
|
|
20
|
+
* Preferred over the manifest above, which is generated offline and committed
|
|
21
|
+
* by hand: being a snapshot it drifts. Measured 2026-08-25 it named 11 servers
|
|
22
|
+
* and 188 tools while mcp.aisa.one was serving 14 and 260 — agentmail (49
|
|
23
|
+
* tools), seo (21) and creator-discovery (2) missing outright, so every user
|
|
24
|
+
* of this CLI was offered 72 fewer tools than exist.
|
|
25
|
+
*
|
|
26
|
+
* It is also 12 KB against the manifest's 137 KB. Most of that difference is
|
|
27
|
+
* tool names, of which this CLI uses exactly one thing: `tools.length`, to
|
|
28
|
+
* print a count. The index carries `toolCount` instead; a client that wants
|
|
29
|
+
* the names is about to connect anyway, and `tools/list` is authoritative.
|
|
30
|
+
*
|
|
31
|
+
* The manifest stays as the fallback — this endpoint is newer than some
|
|
32
|
+
* deployments — and as the public document for readers who want the roadmap
|
|
33
|
+
* of planned servers, which a running process cannot honestly report.
|
|
34
|
+
*/
|
|
35
|
+
export declare const MCP_CATALOG_URL = "https://mcp.aisa.one/servers";
|
|
17
36
|
/** Mintlify's docs-search MCP (3 tools: search/read/feedback). Unauthenticated. */
|
|
18
37
|
export declare const DOCS_MCP_URL = "https://aisa.one/docs/mcp";
|
|
38
|
+
/** Where credit is added. Payment always finishes in a browser — Stripe's
|
|
39
|
+
* hosted page owns the card details, and 3-D Secure needs one. */
|
|
40
|
+
/** The account surface. Printed where someone can act on it, not linked. */
|
|
41
|
+
export declare const CONSOLE_URL = "https://console.aisa.one";
|
|
42
|
+
export declare const CONSOLE_BILLING_URL = "https://console.aisa.one/billing";
|
|
43
|
+
/** Anthropic-shaped base for Claude Code: it appends /v1/messages itself. */
|
|
44
|
+
export declare const LLM_BASE_URL = "https://api.aisa.one";
|
|
45
|
+
/** Codex speaks the Responses API and appends /responses, so it needs the
|
|
46
|
+
* /v1 root rather than the host. */
|
|
47
|
+
export declare const LLM_RESPONSES_BASE_URL = "https://api.aisa.one/v1";
|
|
48
|
+
/** The provider name written into Codex's config.toml. Frozen: renaming it
|
|
49
|
+
* orphans the block we would otherwise remove cleanly. */
|
|
50
|
+
export declare const AISA_PROVIDER_ID = "aisa";
|
|
19
51
|
/**
|
|
20
52
|
* Servers configured by default. Eleven entries per client is a lot of config;
|
|
21
53
|
* these five cover the broadest agent needs, and `--all` configures everything
|
|
@@ -23,16 +55,15 @@ export declare const DOCS_MCP_URL = "https://aisa.one/docs/mcp";
|
|
|
23
55
|
*/
|
|
24
56
|
export declare const MCP_DEFAULT_SLUGS: readonly string[];
|
|
25
57
|
/**
|
|
26
|
-
*
|
|
27
|
-
* /v1beta for Gemini). Everything else is an integration API under /apis/v1.
|
|
58
|
+
* Why one and not five.
|
|
28
59
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
60
|
+
* Each server is its own OAuth resource — the authorization URL carries
|
|
61
|
+
* `resource=https://mcp.aisa.one/<slug>/mcp` (RFC 8707) — so a keyless
|
|
62
|
+
* install authorises once per server. Defaulting to five meant five browser
|
|
63
|
+
* round trips before anything worked, observed 2026-08-20. Web search is the
|
|
64
|
+
* one every agent reaches for; the rest are one tick away, and a configured
|
|
65
|
+
* API key skips authorization for all of them anyway.
|
|
34
66
|
*/
|
|
35
|
-
export declare const LLM_ROUTE_PREFIXES: readonly string[];
|
|
36
67
|
export declare const AGENT_DIRS: Record<string, string>;
|
|
37
68
|
/**
|
|
38
69
|
* Per-client config shape. This is the part v0.2.4 got wrong even apart from
|
|
@@ -47,37 +78,19 @@ export declare const MCP_CONFIGS: Record<string, {
|
|
|
47
78
|
shape: "url" | "stdio";
|
|
48
79
|
}>;
|
|
49
80
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* CoinGecko keys everything by id ("bitcoin"), not symbol ("BTC"), and dozens
|
|
53
|
-
* of unrelated tokens share popular symbols — resolving by symbol alone would
|
|
54
|
-
* happily return the price of the wrong coin. This table covers the symbols
|
|
55
|
-
* people actually type; anything else falls back to an explicit lookup.
|
|
56
|
-
*/
|
|
57
|
-
export declare const COINGECKO_IDS: Record<string, string>;
|
|
58
|
-
/**
|
|
59
|
-
* Models routed to /v1/video/generations, and the request body each one wants.
|
|
81
|
+
* Windsurf was here until 2026-08-25 and was removed, not because it cannot be
|
|
82
|
+
* configured but because being listed did harm on a machine without it.
|
|
60
83
|
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
84
|
+
* `detectClients()` decides a client is present by whether the parent of its
|
|
85
|
+
* config path exists. `aisa mcp setup` with no --agent wrote to every entry in
|
|
86
|
+
* this table regardless of what was installed — so on a machine with no
|
|
87
|
+
* Windsurf it created ~/.codeium/windsurf/, and the next `aisa connect`
|
|
88
|
+
* offered a Windsurf card for an editor that was never there. A stale entry in
|
|
89
|
+
* this table is not inert: it is an input to detection.
|
|
64
90
|
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* later, after billing, so the CLI refuses up front instead.
|
|
91
|
+
* The T2 page had already been filtering it out by hand, which was the same
|
|
92
|
+
* observation reached one layer too late.
|
|
68
93
|
*/
|
|
69
|
-
export type VideoFamily = "bailian" | "seedance";
|
|
70
|
-
export interface VideoModelSpec {
|
|
71
|
-
family: VideoFamily;
|
|
72
|
-
requiresMedia?: MediaType;
|
|
73
|
-
}
|
|
74
|
-
/** Accepted values for `input.media[].type` (enumerated by the upstream error). */
|
|
75
|
-
export declare const MEDIA_TYPES: readonly ["first_frame", "last_frame", "driving_audio", "first_clip"];
|
|
76
|
-
export type MediaType = (typeof MEDIA_TYPES)[number];
|
|
77
|
-
export declare const VIDEO_MODELS: Record<string, VideoModelSpec>;
|
|
78
|
-
export declare const DEFAULT_VIDEO_MODEL = "wan2.7-t2v";
|
|
79
|
-
/** Model families are matched by prefix so new revisions work without a release. */
|
|
80
|
-
export declare function videoModelSpec(model: string): VideoModelSpec;
|
|
81
94
|
/**
|
|
82
95
|
* Client-side grouping of integration providers.
|
|
83
96
|
*
|
package/dist/constants.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const VERSION = "0.
|
|
1
|
+
export const VERSION = "0.5.0";
|
|
2
2
|
/** Root of the platform. Per-surface bases are derived in api.ts#resolveBases. */
|
|
3
3
|
export const BASE_URL = "https://api.aisa.one";
|
|
4
4
|
export const ENV_VAR_NAME = "AISA_API_KEY";
|
|
@@ -7,50 +7,63 @@ export const ENV_VAR_NAME = "AISA_API_KEY";
|
|
|
7
7
|
* exist and where they live. The CLI deliberately knows no server list of its
|
|
8
8
|
* own: servers ship and retire on the platform side, and reading the manifest
|
|
9
9
|
* at setup time means a new server works without a CLI release (the same
|
|
10
|
-
* philosophy as
|
|
10
|
+
* philosophy as live catalog/MCP discovery, applied to the fast-moving side).
|
|
11
11
|
*
|
|
12
12
|
* History: until v0.2.4 this file hardcoded MCP_URL = "https://docs.aisa.one/mcp",
|
|
13
13
|
* a host that does not resolve — every `aisa mcp setup` wrote a dead entry into
|
|
14
14
|
* users' configs, and nothing noticed because the command had no tests.
|
|
15
15
|
*/
|
|
16
16
|
export const MCP_MANIFEST_URL = "https://aisa.one/.well-known/mcp.json";
|
|
17
|
+
/**
|
|
18
|
+
* The live server index, served by the MCP host itself.
|
|
19
|
+
*
|
|
20
|
+
* Preferred over the manifest above, which is generated offline and committed
|
|
21
|
+
* by hand: being a snapshot it drifts. Measured 2026-08-25 it named 11 servers
|
|
22
|
+
* and 188 tools while mcp.aisa.one was serving 14 and 260 — agentmail (49
|
|
23
|
+
* tools), seo (21) and creator-discovery (2) missing outright, so every user
|
|
24
|
+
* of this CLI was offered 72 fewer tools than exist.
|
|
25
|
+
*
|
|
26
|
+
* It is also 12 KB against the manifest's 137 KB. Most of that difference is
|
|
27
|
+
* tool names, of which this CLI uses exactly one thing: `tools.length`, to
|
|
28
|
+
* print a count. The index carries `toolCount` instead; a client that wants
|
|
29
|
+
* the names is about to connect anyway, and `tools/list` is authoritative.
|
|
30
|
+
*
|
|
31
|
+
* The manifest stays as the fallback — this endpoint is newer than some
|
|
32
|
+
* deployments — and as the public document for readers who want the roadmap
|
|
33
|
+
* of planned servers, which a running process cannot honestly report.
|
|
34
|
+
*/
|
|
35
|
+
export const MCP_CATALOG_URL = "https://mcp.aisa.one/servers";
|
|
17
36
|
/** Mintlify's docs-search MCP (3 tools: search/read/feedback). Unauthenticated. */
|
|
18
37
|
export const DOCS_MCP_URL = "https://aisa.one/docs/mcp";
|
|
38
|
+
/** Where credit is added. Payment always finishes in a browser — Stripe's
|
|
39
|
+
* hosted page owns the card details, and 3-D Secure needs one. */
|
|
40
|
+
/** The account surface. Printed where someone can act on it, not linked. */
|
|
41
|
+
export const CONSOLE_URL = "https://console.aisa.one";
|
|
42
|
+
export const CONSOLE_BILLING_URL = "https://console.aisa.one/billing";
|
|
43
|
+
/** Anthropic-shaped base for Claude Code: it appends /v1/messages itself. */
|
|
44
|
+
export const LLM_BASE_URL = "https://api.aisa.one";
|
|
45
|
+
/** Codex speaks the Responses API and appends /responses, so it needs the
|
|
46
|
+
* /v1 root rather than the host. */
|
|
47
|
+
export const LLM_RESPONSES_BASE_URL = "https://api.aisa.one/v1";
|
|
48
|
+
/** The provider name written into Codex's config.toml. Frozen: renaming it
|
|
49
|
+
* orphans the block we would otherwise remove cleanly. */
|
|
50
|
+
export const AISA_PROVIDER_ID = "aisa";
|
|
19
51
|
/**
|
|
20
52
|
* Servers configured by default. Eleven entries per client is a lot of config;
|
|
21
53
|
* these five cover the broadest agent needs, and `--all` configures everything
|
|
22
54
|
* the manifest lists as live.
|
|
23
55
|
*/
|
|
24
|
-
export const MCP_DEFAULT_SLUGS = [
|
|
25
|
-
"web-search",
|
|
26
|
-
"twitter-api",
|
|
27
|
-
"crypto-market-data",
|
|
28
|
-
"marketpulse",
|
|
29
|
-
"stock-pulse",
|
|
30
|
-
];
|
|
56
|
+
export const MCP_DEFAULT_SLUGS = ["web-search"];
|
|
31
57
|
/**
|
|
32
|
-
*
|
|
33
|
-
* /v1beta for Gemini). Everything else is an integration API under /apis/v1.
|
|
58
|
+
* Why one and not five.
|
|
34
59
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
60
|
+
* Each server is its own OAuth resource — the authorization URL carries
|
|
61
|
+
* `resource=https://mcp.aisa.one/<slug>/mcp` (RFC 8707) — so a keyless
|
|
62
|
+
* install authorises once per server. Defaulting to five meant five browser
|
|
63
|
+
* round trips before anything worked, observed 2026-08-20. Web search is the
|
|
64
|
+
* one every agent reaches for; the rest are one tick away, and a configured
|
|
65
|
+
* API key skips authorization for all of them anyway.
|
|
40
66
|
*/
|
|
41
|
-
export const LLM_ROUTE_PREFIXES = [
|
|
42
|
-
"chat",
|
|
43
|
-
"responses",
|
|
44
|
-
"embeddings",
|
|
45
|
-
"messages",
|
|
46
|
-
"models",
|
|
47
|
-
"rerank",
|
|
48
|
-
"classify",
|
|
49
|
-
"images",
|
|
50
|
-
"credits",
|
|
51
|
-
"video",
|
|
52
|
-
"v1beta",
|
|
53
|
-
];
|
|
54
67
|
export const AGENT_DIRS = {
|
|
55
68
|
claude: "~/.claude/skills/",
|
|
56
69
|
cursor: "~/.cursor/skills/",
|
|
@@ -74,90 +87,21 @@ export const MCP_CONFIGS = {
|
|
|
74
87
|
key: "mcpServers",
|
|
75
88
|
shape: "stdio",
|
|
76
89
|
},
|
|
77
|
-
windsurf: {
|
|
78
|
-
path: "~/.codeium/windsurf/mcp_config.json",
|
|
79
|
-
key: "mcpServers",
|
|
80
|
-
shape: "stdio",
|
|
81
|
-
},
|
|
82
90
|
};
|
|
83
91
|
/**
|
|
84
|
-
*
|
|
92
|
+
* Windsurf was here until 2026-08-25 and was removed, not because it cannot be
|
|
93
|
+
* configured but because being listed did harm on a machine without it.
|
|
94
|
+
*
|
|
95
|
+
* `detectClients()` decides a client is present by whether the parent of its
|
|
96
|
+
* config path exists. `aisa mcp setup` with no --agent wrote to every entry in
|
|
97
|
+
* this table regardless of what was installed — so on a machine with no
|
|
98
|
+
* Windsurf it created ~/.codeium/windsurf/, and the next `aisa connect`
|
|
99
|
+
* offered a Windsurf card for an editor that was never there. A stale entry in
|
|
100
|
+
* this table is not inert: it is an input to detection.
|
|
85
101
|
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* happily return the price of the wrong coin. This table covers the symbols
|
|
89
|
-
* people actually type; anything else falls back to an explicit lookup.
|
|
102
|
+
* The T2 page had already been filtering it out by hand, which was the same
|
|
103
|
+
* observation reached one layer too late.
|
|
90
104
|
*/
|
|
91
|
-
export const COINGECKO_IDS = {
|
|
92
|
-
btc: "bitcoin",
|
|
93
|
-
eth: "ethereum",
|
|
94
|
-
usdt: "tether",
|
|
95
|
-
bnb: "binancecoin",
|
|
96
|
-
sol: "solana",
|
|
97
|
-
usdc: "usd-coin",
|
|
98
|
-
xrp: "ripple",
|
|
99
|
-
doge: "dogecoin",
|
|
100
|
-
ada: "cardano",
|
|
101
|
-
trx: "tron",
|
|
102
|
-
avax: "avalanche-2",
|
|
103
|
-
shib: "shiba-inu",
|
|
104
|
-
dot: "polkadot",
|
|
105
|
-
link: "chainlink",
|
|
106
|
-
bch: "bitcoin-cash",
|
|
107
|
-
near: "near",
|
|
108
|
-
matic: "matic-network",
|
|
109
|
-
ltc: "litecoin",
|
|
110
|
-
icp: "internet-computer",
|
|
111
|
-
uni: "uniswap",
|
|
112
|
-
leo: "leo-token",
|
|
113
|
-
dai: "dai",
|
|
114
|
-
etc: "ethereum-classic",
|
|
115
|
-
apt: "aptos",
|
|
116
|
-
render: "render-token",
|
|
117
|
-
hbar: "hedera-hashgraph",
|
|
118
|
-
fil: "filecoin",
|
|
119
|
-
arb: "arbitrum",
|
|
120
|
-
atom: "cosmos",
|
|
121
|
-
imx: "immutable-x",
|
|
122
|
-
op: "optimism",
|
|
123
|
-
vet: "vechain",
|
|
124
|
-
inj: "injective-protocol",
|
|
125
|
-
sui: "sui",
|
|
126
|
-
ton: "the-open-network",
|
|
127
|
-
pepe: "pepe",
|
|
128
|
-
tao: "bittensor",
|
|
129
|
-
sei: "sei-network",
|
|
130
|
-
aave: "aave",
|
|
131
|
-
algo: "algorand",
|
|
132
|
-
xlm: "stellar",
|
|
133
|
-
cro: "crypto-com-chain",
|
|
134
|
-
mnt: "mantle",
|
|
135
|
-
wld: "worldcoin-wld",
|
|
136
|
-
};
|
|
137
|
-
/** Accepted values for `input.media[].type` (enumerated by the upstream error). */
|
|
138
|
-
export const MEDIA_TYPES = ["first_frame", "last_frame", "driving_audio", "first_clip"];
|
|
139
|
-
export const VIDEO_MODELS = {
|
|
140
|
-
"wan2.7-t2v": { family: "bailian" },
|
|
141
|
-
"wan2.7-i2v": { family: "bailian", requiresMedia: "first_frame" },
|
|
142
|
-
"wan2.7-r2v": { family: "bailian", requiresMedia: "first_clip" },
|
|
143
|
-
"happyhorse-1.1-t2v": { family: "bailian" },
|
|
144
|
-
"happyhorse-1.1-i2v": { family: "bailian", requiresMedia: "first_frame" },
|
|
145
|
-
"happyhorse-1.1-r2v": { family: "bailian", requiresMedia: "first_clip" },
|
|
146
|
-
"dreamina-seedance-2-0-260128": { family: "seedance" },
|
|
147
|
-
"dreamina-seedance-2-0-fast-260128": { family: "seedance" },
|
|
148
|
-
};
|
|
149
|
-
export const DEFAULT_VIDEO_MODEL = "wan2.7-t2v";
|
|
150
|
-
/** Model families are matched by prefix so new revisions work without a release. */
|
|
151
|
-
export function videoModelSpec(model) {
|
|
152
|
-
if (VIDEO_MODELS[model])
|
|
153
|
-
return VIDEO_MODELS[model];
|
|
154
|
-
const family = model.startsWith("dreamina-seedance") ? "seedance" : "bailian";
|
|
155
|
-
if (/-i2v\b|-i2v$/.test(model))
|
|
156
|
-
return { family, requiresMedia: "first_frame" };
|
|
157
|
-
if (/-r2v\b|-r2v$/.test(model))
|
|
158
|
-
return { family, requiresMedia: "first_clip" };
|
|
159
|
-
return { family };
|
|
160
|
-
}
|
|
161
105
|
/**
|
|
162
106
|
* Client-side grouping of integration providers.
|
|
163
107
|
*
|