@aisa-one/cli 0.2.4 → 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 +172 -1
- package/LICENSE +21 -0
- package/README.md +163 -169
- 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 +79 -2
- package/dist/commands/mcp.js +262 -48
- 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 +78 -38
- package/dist/constants.js +80 -102
- package/dist/index.js +155 -357
- 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
|
@@ -0,0 +1,685 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What `aisa connect` asks, in the order it asks it — as data.
|
|
3
|
+
*
|
|
4
|
+
* The page and the terminal are two renderers of this file, not two programs
|
|
5
|
+
* that happen to agree. Before it existed they were the latter: every sentence
|
|
6
|
+
* on the T2 page lived inside a template string (82% of that file is markup),
|
|
7
|
+
* so the terminal carried a hand-written paraphrase of the same choices. Two
|
|
8
|
+
* copies of the same wording drift, and nothing catches it — there is no test
|
|
9
|
+
* that can compare a sentence in HTML against a sentence in a log line.
|
|
10
|
+
*
|
|
11
|
+
* So copy lives here, beside the structure it belongs to. A step that the page
|
|
12
|
+
* renders as a card and the terminal renders as a numbered menu is still one
|
|
13
|
+
* step, with one question and one set of options.
|
|
14
|
+
*
|
|
15
|
+
* ── Language ──────────────────────────────────────────────────────────────
|
|
16
|
+
* Every user-facing string is a `Text`: `{ en, zh }`. This is a product
|
|
17
|
+
* surface, not the machine-readable one — `aisa manifest`, MCP tool
|
|
18
|
+
* descriptions and OpenAPI summaries stay English-only, per the workspace
|
|
19
|
+
* convention, because those are read by agents everywhere. What a person sees
|
|
20
|
+
* while choosing is a different audience.
|
|
21
|
+
*
|
|
22
|
+
* The chosen language is stored by the CLI (see config.ts), not in the
|
|
23
|
+
* browser: the page is served by this process, and a language kept only in
|
|
24
|
+
* localStorage would leave the terminal in English while the page is in
|
|
25
|
+
* Chinese — the exact split this file exists to prevent.
|
|
26
|
+
*
|
|
27
|
+
* ── Scope ─────────────────────────────────────────────────────────────────
|
|
28
|
+
* Step 2 (Your agent) is here now. The remaining steps still render from
|
|
29
|
+
* connect-t2.ts and are being moved one at a time, each behind the byte-exact
|
|
30
|
+
* page snapshots in tests/connect-snapshot.test.ts.
|
|
31
|
+
*/
|
|
32
|
+
export declare const LANGS: readonly ["en", "zh"];
|
|
33
|
+
export type Lang = (typeof LANGS)[number];
|
|
34
|
+
/** One string in every language it is offered in. */
|
|
35
|
+
export interface Text {
|
|
36
|
+
en: string;
|
|
37
|
+
zh: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function t(text: Text, lang: Lang): string;
|
|
40
|
+
/**
|
|
41
|
+
* Resolve the language for this run: explicit flag, then what was chosen and
|
|
42
|
+
* remembered, then the OS, then English.
|
|
43
|
+
*
|
|
44
|
+
* The OS check is deliberately loose — `zh_CN.UTF-8`, `zh-Hans`, `zh_TW` all
|
|
45
|
+
* mean a reader who would rather not be handed English.
|
|
46
|
+
*/
|
|
47
|
+
export declare function resolveLang(flag?: string, stored?: string, env?: NodeJS.ProcessEnv): Lang;
|
|
48
|
+
/** A choice within a step. `detail` is the sentence under the label. */
|
|
49
|
+
export interface FlowOption {
|
|
50
|
+
id: string;
|
|
51
|
+
label: Text;
|
|
52
|
+
detail?: Text;
|
|
53
|
+
/** Shown instead of `detail` when the thing is not installed. */
|
|
54
|
+
absentDetail?: Text;
|
|
55
|
+
}
|
|
56
|
+
export interface FlowStep {
|
|
57
|
+
id: string;
|
|
58
|
+
n: number;
|
|
59
|
+
title: Text;
|
|
60
|
+
sub: Text;
|
|
61
|
+
question: Text;
|
|
62
|
+
lede?: Text;
|
|
63
|
+
}
|
|
64
|
+
export declare const STEP_AGENT: FlowStep;
|
|
65
|
+
/**
|
|
66
|
+
* Fixed card order, whatever is or is not installed: the terminal agents
|
|
67
|
+
* first, then the editors, then the web targets. Order is part of the flow,
|
|
68
|
+
* not of one renderer — a menu that renumbers itself between the page and the
|
|
69
|
+
* terminal would make "pick 2" mean two different things.
|
|
70
|
+
*/
|
|
71
|
+
export declare const AGENT_ORDER: readonly ["claude-code", "codex", "opencode", "vscode", "cursor", "claude-desktop", "claude-ai"];
|
|
72
|
+
export declare function agentRank(id: string): number;
|
|
73
|
+
/** Badges on an agent card. The terminal renders the same three states. */
|
|
74
|
+
export declare const AGENT_BADGE: {
|
|
75
|
+
detected: {
|
|
76
|
+
en: string;
|
|
77
|
+
zh: string;
|
|
78
|
+
};
|
|
79
|
+
absent: {
|
|
80
|
+
en: string;
|
|
81
|
+
zh: string;
|
|
82
|
+
};
|
|
83
|
+
web: {
|
|
84
|
+
en: string;
|
|
85
|
+
zh: string;
|
|
86
|
+
};
|
|
87
|
+
notFound: {
|
|
88
|
+
en: string;
|
|
89
|
+
zh: string;
|
|
90
|
+
};
|
|
91
|
+
soon: {
|
|
92
|
+
en: string;
|
|
93
|
+
zh: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
export declare const AGENT_SIDE_TITLES: {
|
|
97
|
+
how: {
|
|
98
|
+
en: string;
|
|
99
|
+
zh: string;
|
|
100
|
+
};
|
|
101
|
+
have: {
|
|
102
|
+
en: string;
|
|
103
|
+
zh: string;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
/** Offer to install a missing agent, with the exact command that will run. */
|
|
107
|
+
/** Fill {name} placeholders. Keeps punctuation inside the translated string. */
|
|
108
|
+
export declare function fill(text: Text, lang: Lang, vars: Record<string, string | number>): string;
|
|
109
|
+
export declare function installOffer(command: string, lang: Lang): string;
|
|
110
|
+
/**
|
|
111
|
+
* What connecting each agent actually does, in its own terms.
|
|
112
|
+
*
|
|
113
|
+
* These name the real mechanism — `claude mcp add`, a provider block in
|
|
114
|
+
* config.toml — because the question a reader has at this step is "what are
|
|
115
|
+
* you about to do to my machine", and the honest answer is the command.
|
|
116
|
+
*/
|
|
117
|
+
export declare const AGENT_NOTES: Record<string, Text>;
|
|
118
|
+
/**
|
|
119
|
+
* The answer to "will this break what I already have", per agent.
|
|
120
|
+
*
|
|
121
|
+
* Asked on this step rather than later because it is what decides whether
|
|
122
|
+
* someone continues at all.
|
|
123
|
+
*/
|
|
124
|
+
export declare const AGENT_HAVE_NOTES: Record<string, Text>;
|
|
125
|
+
/**
|
|
126
|
+
* The six steps, and one glyph each.
|
|
127
|
+
*
|
|
128
|
+
* `icon` is for the terminal only. The page has a numbered rail down its left
|
|
129
|
+
* edge — position, colour and a tick already say which step you are on, and a
|
|
130
|
+
* sixth signal would be decoration. A terminal has none of that: the headers
|
|
131
|
+
* scroll past in one column of text, and after two of them "3/6" and "4/6"
|
|
132
|
+
* are the same shape. The glyph is what the eye finds when scrolling back.
|
|
133
|
+
*
|
|
134
|
+
* One per step and never repeated, so it identifies rather than decorates.
|
|
135
|
+
* Deliberately not the marks the journal already uses for outcomes
|
|
136
|
+
* (✅ ⚠️ ❌ ℹ️) — a step heading is not a result.
|
|
137
|
+
*/
|
|
138
|
+
export declare const STEP_TITLES: Array<{
|
|
139
|
+
n: number;
|
|
140
|
+
title: Text;
|
|
141
|
+
sub: Text;
|
|
142
|
+
icon: string;
|
|
143
|
+
}>;
|
|
144
|
+
export declare const STEP_WELCOME: {
|
|
145
|
+
h1: {
|
|
146
|
+
en: string;
|
|
147
|
+
zh: string;
|
|
148
|
+
};
|
|
149
|
+
lede: {
|
|
150
|
+
en: string;
|
|
151
|
+
zh: string;
|
|
152
|
+
};
|
|
153
|
+
tiles: {
|
|
154
|
+
h3: {
|
|
155
|
+
en: string;
|
|
156
|
+
zh: string;
|
|
157
|
+
};
|
|
158
|
+
p: {
|
|
159
|
+
en: string;
|
|
160
|
+
zh: string;
|
|
161
|
+
};
|
|
162
|
+
}[];
|
|
163
|
+
};
|
|
164
|
+
export declare const STEP_MODELS: {
|
|
165
|
+
h1: {
|
|
166
|
+
en: string;
|
|
167
|
+
zh: string;
|
|
168
|
+
};
|
|
169
|
+
lede: {
|
|
170
|
+
en: string;
|
|
171
|
+
zh: string;
|
|
172
|
+
};
|
|
173
|
+
callout: {
|
|
174
|
+
en: string;
|
|
175
|
+
zh: string;
|
|
176
|
+
};
|
|
177
|
+
rerun: {
|
|
178
|
+
en: string;
|
|
179
|
+
zh: string;
|
|
180
|
+
};
|
|
181
|
+
h2Prefix: {
|
|
182
|
+
en: string;
|
|
183
|
+
zh: string;
|
|
184
|
+
};
|
|
185
|
+
h2Suffix: {
|
|
186
|
+
en: string;
|
|
187
|
+
zh: string;
|
|
188
|
+
};
|
|
189
|
+
yourAgent: {
|
|
190
|
+
en: string;
|
|
191
|
+
zh: string;
|
|
192
|
+
};
|
|
193
|
+
recommended: {
|
|
194
|
+
en: string;
|
|
195
|
+
zh: string;
|
|
196
|
+
};
|
|
197
|
+
freshSwitch: {
|
|
198
|
+
name: {
|
|
199
|
+
en: string;
|
|
200
|
+
zh: string;
|
|
201
|
+
};
|
|
202
|
+
brief: {
|
|
203
|
+
en: string;
|
|
204
|
+
zh: string;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
notNow: {
|
|
208
|
+
name: {
|
|
209
|
+
en: string;
|
|
210
|
+
zh: string;
|
|
211
|
+
};
|
|
212
|
+
briefFresh: {
|
|
213
|
+
en: string;
|
|
214
|
+
zh: string;
|
|
215
|
+
};
|
|
216
|
+
briefDetected: {
|
|
217
|
+
en: string;
|
|
218
|
+
zh: string;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
backup: {
|
|
222
|
+
name: {
|
|
223
|
+
en: string;
|
|
224
|
+
zh: string;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
switchIt: {
|
|
228
|
+
name: {
|
|
229
|
+
en: string;
|
|
230
|
+
zh: string;
|
|
231
|
+
};
|
|
232
|
+
brief: {
|
|
233
|
+
en: string;
|
|
234
|
+
zh: string;
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
warn: {
|
|
238
|
+
head: {
|
|
239
|
+
en: string;
|
|
240
|
+
zh: string;
|
|
241
|
+
};
|
|
242
|
+
body: {
|
|
243
|
+
en: string;
|
|
244
|
+
zh: string;
|
|
245
|
+
};
|
|
246
|
+
fix: {
|
|
247
|
+
en: string;
|
|
248
|
+
zh: string;
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
/** Why the Models step has nothing to offer a file-configured client. */
|
|
253
|
+
export declare const FILE_MODEL_NOTE: Record<string, Text>;
|
|
254
|
+
/** Backup-mode consent copy, per client — the same contract T1 shows. */
|
|
255
|
+
export declare const BACKUP_COPY: Record<string, Text>;
|
|
256
|
+
export declare const STEP_CAPS: {
|
|
257
|
+
h1: {
|
|
258
|
+
en: string;
|
|
259
|
+
zh: string;
|
|
260
|
+
};
|
|
261
|
+
ledeTail: {
|
|
262
|
+
en: string;
|
|
263
|
+
zh: string;
|
|
264
|
+
};
|
|
265
|
+
pickArea: {
|
|
266
|
+
en: string;
|
|
267
|
+
zh: string;
|
|
268
|
+
};
|
|
269
|
+
selectAll: {
|
|
270
|
+
en: string;
|
|
271
|
+
zh: string;
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* The counts sentence as one string, because punctuation is not shared
|
|
275
|
+
* between languages: joining "N", "areas", ", " in code produced
|
|
276
|
+
* "2 个领域, 2 个 server, 48 个工具." — Chinese text with ASCII commas and a
|
|
277
|
+
* full stop. Whatever varies goes in as a placeholder instead.
|
|
278
|
+
*/
|
|
279
|
+
counts: {
|
|
280
|
+
en: string;
|
|
281
|
+
zh: string;
|
|
282
|
+
};
|
|
283
|
+
/** Category tile meta: "3 servers · 47 tools". */
|
|
284
|
+
tileMeta: {
|
|
285
|
+
en: string;
|
|
286
|
+
zh: string;
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* A placeholder both renderers can fill. The page used to carry
|
|
290
|
+
* <b id="mModel"></b> here and fill it with script — which left the
|
|
291
|
+
* terminal printing "AIsa()" with nothing inside, because stripping tags is
|
|
292
|
+
* all it can do with markup meant for the other surface.
|
|
293
|
+
*/
|
|
294
|
+
serversWord: {
|
|
295
|
+
en: string;
|
|
296
|
+
zh: string;
|
|
297
|
+
};
|
|
298
|
+
serverWord: {
|
|
299
|
+
en: string;
|
|
300
|
+
zh: string;
|
|
301
|
+
};
|
|
302
|
+
toolsWord: {
|
|
303
|
+
en: string;
|
|
304
|
+
zh: string;
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
/** Shown for a file-configured client that has no note of its own. */
|
|
308
|
+
export declare const FILE_MODEL_FALLBACK: Text;
|
|
309
|
+
export declare const CATEGORY_BLURB: Record<string, Text>;
|
|
310
|
+
export declare const STEP_INSTALL: {
|
|
311
|
+
h1: {
|
|
312
|
+
en: string;
|
|
313
|
+
zh: string;
|
|
314
|
+
};
|
|
315
|
+
lede: {
|
|
316
|
+
en: string;
|
|
317
|
+
zh: string;
|
|
318
|
+
};
|
|
319
|
+
authKeyed: {
|
|
320
|
+
en: string;
|
|
321
|
+
zh: string;
|
|
322
|
+
};
|
|
323
|
+
authFresh: {
|
|
324
|
+
en: string;
|
|
325
|
+
zh: string;
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
export declare const STEP_DONE: {
|
|
329
|
+
eyebrow: {
|
|
330
|
+
en: string;
|
|
331
|
+
zh: string;
|
|
332
|
+
};
|
|
333
|
+
h1: {
|
|
334
|
+
en: string;
|
|
335
|
+
zh: string;
|
|
336
|
+
};
|
|
337
|
+
lede: {
|
|
338
|
+
en: string;
|
|
339
|
+
zh: string;
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
export declare const RUNTIME_COPY: {
|
|
343
|
+
readonly nothingSelected: {
|
|
344
|
+
readonly en: "Nothing selected yet — pick at least one server.";
|
|
345
|
+
readonly zh: "还没有选择 —— 至少选一个 server。";
|
|
346
|
+
};
|
|
347
|
+
readonly planBackup: {
|
|
348
|
+
readonly "claude-code": {
|
|
349
|
+
readonly en: "Install the claude-aisa command";
|
|
350
|
+
readonly zh: "安装 claude-aisa 命令";
|
|
351
|
+
};
|
|
352
|
+
readonly codex: {
|
|
353
|
+
readonly en: "Add the aisa profile and codex-aisa";
|
|
354
|
+
readonly zh: "添加 aisa profile 和 codex-aisa";
|
|
355
|
+
};
|
|
356
|
+
readonly vscode: {
|
|
357
|
+
readonly en: "Add AIsa models to VS Code chat";
|
|
358
|
+
readonly zh: "把 AIsa 模型加进 VS Code 聊天";
|
|
359
|
+
};
|
|
360
|
+
readonly other: {
|
|
361
|
+
readonly en: "Add AIsa as a backup provider";
|
|
362
|
+
readonly zh: "把 AIsa 添加为备用 provider";
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
readonly planBackupNote: {
|
|
366
|
+
readonly en: "your current setup stays untouched";
|
|
367
|
+
readonly zh: "你现有的配置原封不动";
|
|
368
|
+
};
|
|
369
|
+
readonly ledeFailed: {
|
|
370
|
+
readonly en: "Some steps did not complete — the details are in the list; your results page explains how to retry.";
|
|
371
|
+
readonly zh: "有些步骤没有完成 —— 明细在上面的列表里,结果页会说明怎么重试。";
|
|
372
|
+
};
|
|
373
|
+
readonly ledeAllRan: {
|
|
374
|
+
readonly en: "Everything ran. Your results, balance and try-it-now prompts are on the last step.";
|
|
375
|
+
readonly zh: "全部执行完毕。结果、余额和可以直接试的提示语都在最后一步。";
|
|
376
|
+
};
|
|
377
|
+
readonly backupIntact: {
|
|
378
|
+
readonly en: "Your usual setup is untouched.";
|
|
379
|
+
readonly zh: "你平时用的配置原封不动。";
|
|
380
|
+
};
|
|
381
|
+
readonly backupOpencode: {
|
|
382
|
+
readonly en: "Pick <code>aisa/…</code> from opencode's model list whenever you want AIsa.";
|
|
383
|
+
readonly zh: "想用 AIsa 的时候,在 opencode 的模型列表里选 <code>aisa/…</code> 即可。";
|
|
384
|
+
};
|
|
385
|
+
readonly backupBin: {
|
|
386
|
+
readonly en: "Run <code>{bin}</code> whenever you want AIsa's models; delete that one file to remove it.";
|
|
387
|
+
readonly zh: "想用 AIsa 的模型时就跑 <code>{bin}</code>;删掉那一个文件就等于移除。";
|
|
388
|
+
};
|
|
389
|
+
readonly noKeyStored: {
|
|
390
|
+
readonly en: "No key stored here — run <code>aisa login</code>, then copy it from <code>~/.aisa/key</code>.";
|
|
391
|
+
readonly zh: "本机没有存 key —— 先跑 <code>aisa login</code>,再从 <code>~/.aisa/key</code> 复制。";
|
|
392
|
+
};
|
|
393
|
+
readonly cannotStartApp: {
|
|
394
|
+
readonly en: "Could not start {name} — open it from your Applications folder.";
|
|
395
|
+
readonly zh: "无法启动 {name} —— 请从应用程序文件夹里手动打开。";
|
|
396
|
+
};
|
|
397
|
+
readonly cannotOpenTerminal: {
|
|
398
|
+
readonly en: "Could not open a terminal — run <b><code>{bin}</code></b> in any terminal.";
|
|
399
|
+
readonly zh: "无法打开终端 —— 在任意终端里跑 <b><code>{bin}</code></b>。";
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
/** Flatten RUNTIME_COPY to plain strings for the page script. */
|
|
403
|
+
export declare function runtimeCopy(lang: Lang): Record<string, unknown>;
|
|
404
|
+
/** What each language calls itself — never translated. */
|
|
405
|
+
export declare const LANG_LABEL: Record<Lang, string>;
|
|
406
|
+
export declare const NAV: {
|
|
407
|
+
back: {
|
|
408
|
+
en: string;
|
|
409
|
+
zh: string;
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
/** The forward button, worded for the step it leads out of. */
|
|
413
|
+
export declare const NEXT_WORD: Record<number, Text>;
|
|
414
|
+
/** The last gate before anything is written. */
|
|
415
|
+
export declare const CONFIRM: {
|
|
416
|
+
heading: {
|
|
417
|
+
en: string;
|
|
418
|
+
zh: string;
|
|
419
|
+
};
|
|
420
|
+
agent: {
|
|
421
|
+
en: string;
|
|
422
|
+
zh: string;
|
|
423
|
+
};
|
|
424
|
+
models: {
|
|
425
|
+
en: string;
|
|
426
|
+
zh: string;
|
|
427
|
+
};
|
|
428
|
+
capabilities: {
|
|
429
|
+
en: string;
|
|
430
|
+
zh: string;
|
|
431
|
+
};
|
|
432
|
+
/**
|
|
433
|
+
* A word, not a keystroke. Everything up to here was reversible browsing;
|
|
434
|
+
* this is the point where files on the machine change, and a prompt you can
|
|
435
|
+
* clear with a stray return is the wrong shape for it.
|
|
436
|
+
*/
|
|
437
|
+
/**
|
|
438
|
+
* A picker rather than a typed word.
|
|
439
|
+
*
|
|
440
|
+
* Typing was the first shape, and it fought the arrow-key steps beside it:
|
|
441
|
+
* keys left in the buffer by the picker arrived at readline as empty lines,
|
|
442
|
+
* which re-asked, which read again — the prompt repeated down the screen
|
|
443
|
+
* and tangled with the one after it. One input method for the whole flow.
|
|
444
|
+
*
|
|
445
|
+
* The deliberateness is kept by where the cursor starts: on "go back", so
|
|
446
|
+
* a stray return changes nothing.
|
|
447
|
+
*/
|
|
448
|
+
apply: {
|
|
449
|
+
en: string;
|
|
450
|
+
zh: string;
|
|
451
|
+
};
|
|
452
|
+
goBack: {
|
|
453
|
+
en: string;
|
|
454
|
+
zh: string;
|
|
455
|
+
};
|
|
456
|
+
ask: {
|
|
457
|
+
en: string;
|
|
458
|
+
zh: string;
|
|
459
|
+
};
|
|
460
|
+
cancelled: {
|
|
461
|
+
en: string;
|
|
462
|
+
zh: string;
|
|
463
|
+
};
|
|
464
|
+
/** n means change something, not give up — the run is still yours. */
|
|
465
|
+
backToEdit: {
|
|
466
|
+
en: string;
|
|
467
|
+
zh: string;
|
|
468
|
+
};
|
|
469
|
+
};
|
|
470
|
+
/** The last question: run something now, or hand the terminal back. */
|
|
471
|
+
export declare const LAUNCH: {
|
|
472
|
+
question: {
|
|
473
|
+
en: string;
|
|
474
|
+
zh: string;
|
|
475
|
+
};
|
|
476
|
+
exit: {
|
|
477
|
+
en: string;
|
|
478
|
+
zh: string;
|
|
479
|
+
};
|
|
480
|
+
/** Says what it does: the page goes with it. Claiming the page survives
|
|
481
|
+
* was true only while the process lingered, which is what made Exit feel
|
|
482
|
+
* broken — it did not exit. */
|
|
483
|
+
exitNote: {
|
|
484
|
+
en: string;
|
|
485
|
+
zh: string;
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
/** Shown on a page a newer run has taken over. */
|
|
489
|
+
/**
|
|
490
|
+
* How a run introduces the two surfaces it is about to use.
|
|
491
|
+
*
|
|
492
|
+
* The console case used to lead with what was missing — "no browser on this
|
|
493
|
+
* machine" — which reads like a fault report for something that is not a
|
|
494
|
+
* fault at all. A server without a desktop is a perfectly ordinary place to
|
|
495
|
+
* run this, and the terminal is a first-class way through the flow, not a
|
|
496
|
+
* consolation. So it is introduced as a mode, by name, and the sentence
|
|
497
|
+
* after it gets on with the work.
|
|
498
|
+
*/
|
|
499
|
+
export declare const SURFACE: {
|
|
500
|
+
readonly pageTitle: {
|
|
501
|
+
readonly en: "Open this page to choose";
|
|
502
|
+
readonly zh: "打开这个页面来选择";
|
|
503
|
+
};
|
|
504
|
+
readonly opening: {
|
|
505
|
+
readonly en: "opening your browser… (or answer here — both stay in step)";
|
|
506
|
+
readonly zh: "正在打开浏览器…(也可以直接在这里回答 —— 两边始终同步)";
|
|
507
|
+
};
|
|
508
|
+
readonly urlOnly: {
|
|
509
|
+
readonly en: "open the URL above, or answer here — both stay in step";
|
|
510
|
+
readonly zh: "打开上面的地址,或者直接在这里回答 —— 两边始终同步";
|
|
511
|
+
};
|
|
512
|
+
readonly consoleTitle: {
|
|
513
|
+
readonly en: "Console mode";
|
|
514
|
+
readonly zh: "控制台模式";
|
|
515
|
+
};
|
|
516
|
+
readonly consoleBody: {
|
|
517
|
+
readonly en: "The browser view is not open here, so we will do this together in the terminal — the same questions, and it is very easy. Off we go.";
|
|
518
|
+
readonly zh: "这里没有开浏览器界面,我们就用命令行一起把它选完 —— 问题都一样,非常简单。这就开始。";
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
/**
|
|
522
|
+
* Signing in from a machine whose browser is somewhere else.
|
|
523
|
+
*
|
|
524
|
+
* Clerk offers authorization_code and refresh_token and nothing else — no
|
|
525
|
+
* device grant — so there is no "type this short code" flow to reach for.
|
|
526
|
+
* What there is works, but only if the person is told plainly that the last
|
|
527
|
+
* page is *supposed* to fail: they are being asked to copy an address out of
|
|
528
|
+
* a browser that is showing an error, which nobody does unless told to.
|
|
529
|
+
*/
|
|
530
|
+
export declare const SIGNIN: {
|
|
531
|
+
readonly start: {
|
|
532
|
+
readonly en: "Signing in to AIsa…";
|
|
533
|
+
readonly zh: "正在登录 AIsa…";
|
|
534
|
+
};
|
|
535
|
+
readonly willOpen: {
|
|
536
|
+
readonly en: "Your browser will open — approve the sign-in there.";
|
|
537
|
+
readonly zh: "浏览器就要打开了 —— 在那里确认登录。";
|
|
538
|
+
};
|
|
539
|
+
readonly ifNot: {
|
|
540
|
+
readonly en: "If it does not open, visit:";
|
|
541
|
+
readonly zh: "如果没有自动打开,访问:";
|
|
542
|
+
};
|
|
543
|
+
readonly here: {
|
|
544
|
+
readonly en: "This machine has no browser, so sign in on the one in front of you.";
|
|
545
|
+
readonly zh: "这台机器上没有浏览器,请在你面前那台电脑上登录。";
|
|
546
|
+
};
|
|
547
|
+
readonly step1: {
|
|
548
|
+
readonly en: "1. Open this address there:";
|
|
549
|
+
readonly zh: "1. 在那台电脑上打开这个地址:";
|
|
550
|
+
};
|
|
551
|
+
readonly step2: {
|
|
552
|
+
readonly en: "2. Sign in. A page then shows you a short block of text — press Copy.";
|
|
553
|
+
readonly zh: "2. 登录。之后会出现一个页面,上面有一小段文字 —— 点「复制」。";
|
|
554
|
+
};
|
|
555
|
+
readonly step3: {
|
|
556
|
+
readonly en: "3. Paste it below.";
|
|
557
|
+
readonly zh: "3. 粘贴到下面。";
|
|
558
|
+
};
|
|
559
|
+
readonly prompt: {
|
|
560
|
+
readonly en: "Paste it here: ";
|
|
561
|
+
readonly zh: "粘贴到这里: ";
|
|
562
|
+
};
|
|
563
|
+
readonly badPaste: {
|
|
564
|
+
readonly en: "that does not look like the redirect — it should contain code=";
|
|
565
|
+
readonly zh: "这看起来不是那个跳转地址 —— 里面应该有 code=";
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
/** What the browser is told when a sign-in lands back on this machine. */
|
|
569
|
+
export declare const SIGNIN_PAGE: {
|
|
570
|
+
readonly ok: {
|
|
571
|
+
readonly title: {
|
|
572
|
+
readonly en: "Signed in";
|
|
573
|
+
readonly zh: "登录成功";
|
|
574
|
+
};
|
|
575
|
+
readonly body: {
|
|
576
|
+
readonly en: "Your key has been created on the machine you started from. You can close this tab.";
|
|
577
|
+
readonly zh: "key 已经在你发起登录的那台机器上生成好了。可以关掉这个标签页了。";
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
readonly failed: {
|
|
581
|
+
readonly title: {
|
|
582
|
+
readonly en: "Sign-in was not completed";
|
|
583
|
+
readonly zh: "登录没有完成";
|
|
584
|
+
};
|
|
585
|
+
readonly body: {
|
|
586
|
+
readonly en: "Nothing was changed. Return to your terminal and try again.";
|
|
587
|
+
readonly zh: "什么都没有改动。回到终端重新试一次。";
|
|
588
|
+
};
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
export declare const SUPERSEDED: {
|
|
592
|
+
title: {
|
|
593
|
+
en: string;
|
|
594
|
+
zh: string;
|
|
595
|
+
};
|
|
596
|
+
/** The other way a page ends: nobody replaced it, its time ran out. */
|
|
597
|
+
expiringTitle: {
|
|
598
|
+
en: string;
|
|
599
|
+
zh: string;
|
|
600
|
+
};
|
|
601
|
+
expiringBody: {
|
|
602
|
+
en: string;
|
|
603
|
+
zh: string;
|
|
604
|
+
};
|
|
605
|
+
body: {
|
|
606
|
+
en: string;
|
|
607
|
+
zh: string;
|
|
608
|
+
};
|
|
609
|
+
seconds: {
|
|
610
|
+
en: string;
|
|
611
|
+
zh: string;
|
|
612
|
+
};
|
|
613
|
+
closed: {
|
|
614
|
+
en: string;
|
|
615
|
+
zh: string;
|
|
616
|
+
};
|
|
617
|
+
/**
|
|
618
|
+
* The two lines every ending carries, whatever ended.
|
|
619
|
+
*
|
|
620
|
+
* A surface that is closing has the reader's attention and nothing left to
|
|
621
|
+
* spend it on — which is the one moment these are useful rather than in the
|
|
622
|
+
* way. Both are addresses, not buttons: a button is clicked once and
|
|
623
|
+
* forgotten, while `console.aisa.one` and `aisa connect` are things someone
|
|
624
|
+
* can still type next week. That is the whole point of putting them here.
|
|
625
|
+
*/
|
|
626
|
+
console: {
|
|
627
|
+
en: string;
|
|
628
|
+
zh: string;
|
|
629
|
+
};
|
|
630
|
+
consoleDomain: string;
|
|
631
|
+
againBefore: {
|
|
632
|
+
en: string;
|
|
633
|
+
zh: string;
|
|
634
|
+
};
|
|
635
|
+
againCmd: string;
|
|
636
|
+
againAfter: {
|
|
637
|
+
en: string;
|
|
638
|
+
zh: string;
|
|
639
|
+
};
|
|
640
|
+
};
|
|
641
|
+
/**
|
|
642
|
+
* The second tab, once the sign-in is done.
|
|
643
|
+
*
|
|
644
|
+
* A sign-in started from inside `connect` opens a new tab, and that tab has
|
|
645
|
+
* to end somewhere. Ending it on "you can close this tab" is right for
|
|
646
|
+
* standalone `aisa login`, where closing it is the whole of what is left —
|
|
647
|
+
* but wrong here, where a setup is still running one tab over and the reader
|
|
648
|
+
* has just been sent away from it. This page goes back instead.
|
|
649
|
+
*/
|
|
650
|
+
export declare const RETURN_PAGE: {
|
|
651
|
+
readonly ok: {
|
|
652
|
+
readonly title: {
|
|
653
|
+
readonly en: "Signed in";
|
|
654
|
+
readonly zh: "登录成功";
|
|
655
|
+
};
|
|
656
|
+
readonly body: {
|
|
657
|
+
readonly en: "Taking you back to your setup — it carries on from where it was.";
|
|
658
|
+
readonly zh: "正在带你回到刚才的配置流程 —— 会从原来的位置继续。";
|
|
659
|
+
};
|
|
660
|
+
};
|
|
661
|
+
readonly failed: {
|
|
662
|
+
readonly title: {
|
|
663
|
+
readonly en: "Sign-in was not completed";
|
|
664
|
+
readonly zh: "登录没有完成";
|
|
665
|
+
};
|
|
666
|
+
readonly body: {
|
|
667
|
+
readonly en: "Nothing was changed. Go back to your setup and try the sign-in again.";
|
|
668
|
+
readonly zh: "什么都没有改动。回到配置流程再登录一次。";
|
|
669
|
+
};
|
|
670
|
+
};
|
|
671
|
+
readonly stale: {
|
|
672
|
+
readonly title: {
|
|
673
|
+
readonly en: "Nothing is waiting for this";
|
|
674
|
+
readonly zh: "这次回调已经没人在等了";
|
|
675
|
+
};
|
|
676
|
+
readonly body: {
|
|
677
|
+
readonly en: "This sign-in has already been answered. Back to your setup.";
|
|
678
|
+
readonly zh: "这次登录已经处理过了。回到你的配置流程。";
|
|
679
|
+
};
|
|
680
|
+
};
|
|
681
|
+
readonly link: {
|
|
682
|
+
readonly en: "Back to your setup";
|
|
683
|
+
readonly zh: "回到配置流程";
|
|
684
|
+
};
|
|
685
|
+
};
|