sideby 0.16.1 → 0.18.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/README.md +7 -3
- package/ai-tasks.json +90 -0
- package/dist/build.json +1 -1
- package/dist/src/cli/commands.d.ts +25 -1
- package/dist/src/cli/commands.js +802 -15
- package/dist/src/cli/json-schemas.js +252 -1
- package/dist/src/cli/main.js +143 -4
- package/dist/src/core/after-install.d.ts +54 -0
- package/dist/src/core/after-install.js +78 -0
- package/dist/src/core/ask.d.ts +222 -0
- package/dist/src/core/ask.js +465 -0
- package/dist/src/core/attachments.d.ts +50 -0
- package/dist/src/core/attachments.js +442 -0
- package/dist/src/core/autostart.d.ts +118 -0
- package/dist/src/core/autostart.js +302 -0
- package/dist/src/core/brand-mark.d.ts +49 -11
- package/dist/src/core/brand-mark.js +116 -38
- package/dist/src/core/config.d.ts +102 -0
- package/dist/src/core/config.js +289 -11
- package/dist/src/core/desktop-app.d.ts +1 -1
- package/dist/src/core/desktop-app.js +2 -2
- package/dist/src/core/edit-settings.d.ts +24 -0
- package/dist/src/core/edit-settings.js +97 -0
- package/dist/src/core/handoff-brief.d.ts +4 -2
- package/dist/src/core/handoff-brief.js +6 -1
- package/dist/src/core/handoff-chain.d.ts +24 -0
- package/dist/src/core/handoff-chain.js +2 -0
- package/dist/src/core/handoff-run.d.ts +4 -3
- package/dist/src/core/handoff-run.js +14 -9
- package/dist/src/core/launch.d.ts +17 -4
- package/dist/src/core/launch.js +32 -24
- package/dist/src/core/local-build.d.ts +17 -5
- package/dist/src/core/local-build.js +61 -23
- package/dist/src/core/lock.d.ts +30 -0
- package/dist/src/core/lock.js +143 -0
- package/dist/src/core/probe.d.ts +78 -0
- package/dist/src/core/probe.js +127 -0
- package/dist/src/core/quota-levels.d.ts +6 -1
- package/dist/src/core/quota-levels.js +16 -5
- package/dist/src/core/same-login.d.ts +9 -4
- package/dist/src/core/same-login.js +9 -4
- package/dist/src/core/secret-file.d.ts +26 -0
- package/dist/src/core/secret-file.js +126 -7
- package/dist/src/core/task-spec.d.ts +95 -0
- package/dist/src/core/task-spec.js +209 -0
- package/dist/src/core/terminal.d.ts +93 -0
- package/dist/src/core/terminal.js +376 -0
- package/dist/src/core/update.d.ts +34 -12
- package/dist/src/core/update.js +96 -84
- package/dist/src/desktop/icon.js +12 -15
- package/dist/src/families/claude/ai-task.d.ts +8 -0
- package/dist/src/families/claude/ai-task.js +38 -0
- package/dist/src/families/claude/handoff-hook.js +4 -4
- package/dist/src/families/claude/index.js +6 -0
- package/dist/src/families/claude/quota-cache.d.ts +24 -7
- package/dist/src/families/claude/quota-cache.js +72 -21
- package/dist/src/families/codex/handoff-hook.js +4 -4
- package/dist/src/families/codex/index.js +16 -0
- package/dist/src/families/codex/login-key.d.ts +8 -0
- package/dist/src/families/codex/login-key.js +33 -0
- package/dist/src/families/grok/handoff-hook.js +4 -4
- package/dist/src/families/grok/index.js +4 -0
- package/dist/src/families/login-keys.d.ts +6 -0
- package/dist/src/families/login-keys.js +6 -0
- package/dist/src/families/pi/index.js +5 -0
- package/dist/src/handoff/hook.js +51 -30
- package/dist/src/handoff/levels.d.ts +24 -0
- package/dist/src/handoff/levels.js +70 -0
- package/dist/src/handoff/messages.d.ts +6 -3
- package/dist/src/handoff/messages.js +20 -7
- package/dist/src/handoff/reader.d.ts +6 -3
- package/dist/src/menubar/agent.d.ts +3 -0
- package/dist/src/menubar/agent.js +21 -0
- package/dist/src/menubar/script.d.ts +8 -0
- package/dist/src/menubar/script.js +457 -0
- package/dist/src/menubar/snapshot.d.ts +115 -0
- package/dist/src/menubar/snapshot.js +255 -0
- package/dist/src/menubar/strings.d.ts +87 -0
- package/dist/src/menubar/strings.js +88 -0
- package/dist/src/panel/background.js +15 -21
- package/dist/src/panel/handler.d.ts +41 -2
- package/dist/src/panel/handler.js +394 -10
- package/dist/src/panel/i18n.d.ts +205 -2
- package/dist/src/panel/i18n.js +441 -35
- package/dist/src/panel/page-logic.d.ts +301 -0
- package/dist/src/panel/page-logic.js +532 -0
- package/dist/src/panel/page-script.js +1135 -185
- package/dist/src/panel/page-styles.js +111 -32
- package/dist/src/panel/page.d.ts +12 -0
- package/dist/src/panel/page.js +7 -0
- package/dist/src/panel/server.d.ts +16 -2
- package/dist/src/panel/server.js +41 -13
- package/dist/src/plugins/check.d.ts +47 -0
- package/dist/src/plugins/check.js +544 -0
- package/dist/src/plugins/scaffold.d.ts +21 -0
- package/dist/src/plugins/scaffold.js +123 -0
- package/dist/src/quota/statusline-tap.js +1 -1
- package/dist/src/runtime.d.ts +19 -1
- package/dist/src/runtime.js +53 -14
- package/dist/src/types.d.ts +33 -0
- package/package.json +4 -3
- package/schemas/ask-choices.json +168 -0
- package/schemas/ask-print.json +87 -0
- package/schemas/ask.json +180 -0
- package/schemas/autostart.json +165 -0
- package/schemas/config-get.json +132 -0
- package/schemas/config-set.json +107 -0
- package/schemas/config.json +90 -7
- package/schemas/edit.json +119 -0
- package/schemas/error.json +4 -0
- package/schemas/families.json +4 -0
- package/schemas/key.json +93 -0
- package/schemas/list.json +4 -0
- package/schemas/local.json +1 -1
- package/schemas/menubar-snapshot.json +646 -0
- package/schemas/menubar-start.json +112 -0
- package/schemas/menubar.json +165 -0
- package/schemas/plugins-check.json +113 -0
- package/schemas/plugins-new.json +87 -0
- package/schemas/terminal.json +152 -0
- package/schemas/try.json +109 -0
- package/schemas/update.json +4 -0
- package/skills/sideby/SKILL.md +16 -6
- package/skills/sideby/references/accounts.md +1 -1
- package/skills/sideby/references/ai-tasks.md +126 -0
- package/skills/sideby/references/handoff.md +3 -1
- package/skills/sideby/references/panel.md +20 -0
- package/skills/sideby/references/update.md +1 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { SKILL_UPDATE } from './skill-check.js';
|
|
2
|
+
/**
|
|
3
|
+
* The skill step the new code runs by name. `--skill` updates only the installed skill: it never installs the CLI,
|
|
4
|
+
* even when the registry has moved on since the user confirmed.
|
|
5
|
+
*/
|
|
6
|
+
export const SKILL_SYNC = ['sideby', 'update', '--skill', '--yes'];
|
|
7
|
+
/** Runs the skills tool when the plan says the skill is outdated and sideby may; null when it did nothing. */
|
|
8
|
+
export async function runSkillUpdate(m, plan, env, onOutput) {
|
|
9
|
+
if (!plan?.outdated || !plan.canRun)
|
|
10
|
+
return null;
|
|
11
|
+
const [file, ...args] = SKILL_UPDATE;
|
|
12
|
+
const r = await m
|
|
13
|
+
.exec(file, args, { env, ...(onOutput ? { onOutput } : {}) })
|
|
14
|
+
.catch((e) => ({ code: 1, output: e instanceof Error ? e.message : String(e) }));
|
|
15
|
+
return r.code === 0
|
|
16
|
+
? { ok: true, message: 'updated the sideby skill' }
|
|
17
|
+
: { ok: false, message: `\`${plan.command}\` failed (exit ${r.code}); run it yourself to see why` };
|
|
18
|
+
}
|
|
19
|
+
async function autostartByName(m, home, env) {
|
|
20
|
+
// Never created here: only a login item `sideby autostart on` wrote is refreshed (ADR-0029).
|
|
21
|
+
const panel = (await m.autostartInstalled(home).catch(() => false))
|
|
22
|
+
? await m.refreshAutostart(env).catch(() => false)
|
|
23
|
+
: undefined;
|
|
24
|
+
// The menu bar item's login item records the same Node and entry (ADR-0034); not reported, and never created here.
|
|
25
|
+
if (await m.autostartInstalled(home, 'menubar').catch(() => false))
|
|
26
|
+
await m.refreshAutostart(env, 'menubar').catch(() => false);
|
|
27
|
+
return panel;
|
|
28
|
+
}
|
|
29
|
+
/** Runs the steps above in their order. Never throws, and a failed step never fails the install before it. */
|
|
30
|
+
export async function afterInstall(m, env, o) {
|
|
31
|
+
let freed = false;
|
|
32
|
+
const release = async () => {
|
|
33
|
+
if (freed)
|
|
34
|
+
return;
|
|
35
|
+
freed = true;
|
|
36
|
+
await o.release().catch(() => { });
|
|
37
|
+
};
|
|
38
|
+
try {
|
|
39
|
+
// By name, from the new code: the app records its own Node and entry and carries the icon of the version that
|
|
40
|
+
// wrote it. Only where one is installed.
|
|
41
|
+
const refreshedApp = !!o.app &&
|
|
42
|
+
(await m.appInstalled(o.home, env).catch(() => false)) &&
|
|
43
|
+
(await m.refreshApp(env).catch(() => false));
|
|
44
|
+
const refreshedAutostart = await (o.autostart ?? (() => autostartByName(m, o.home, env)))().catch(() => false);
|
|
45
|
+
const background = o.skillSync === 'background';
|
|
46
|
+
const plan = o.skill && o.skill !== 'by-name' ? o.skill.plan : undefined;
|
|
47
|
+
const due = o.skill === 'by-name' || (!!plan?.outdated && plan.canRun);
|
|
48
|
+
let skill = {};
|
|
49
|
+
// In place, under the lock, so a skill update never runs beside another install.
|
|
50
|
+
if (due && !background && plan) {
|
|
51
|
+
const r = await runSkillUpdate(m, plan, env, o.onOutput);
|
|
52
|
+
if (r)
|
|
53
|
+
skill = { skillUpdated: r.ok, skillMessage: r.message };
|
|
54
|
+
}
|
|
55
|
+
await release();
|
|
56
|
+
if (due && background)
|
|
57
|
+
skill = {
|
|
58
|
+
skillSyncStarted: await m.startDetached(SKILL_SYNC[0], SKILL_SYNC.slice(1), env).catch(() => false),
|
|
59
|
+
};
|
|
60
|
+
else if (due && !plan) {
|
|
61
|
+
const u = await m
|
|
62
|
+
.exec(SKILL_SYNC[0], SKILL_SYNC.slice(1), { env, ...(o.onOutput ? { onOutput: o.onOutput } : {}) })
|
|
63
|
+
.catch(() => ({ code: 1, output: '' }));
|
|
64
|
+
skill = { skillSynced: u.code === 0 };
|
|
65
|
+
}
|
|
66
|
+
const port = o.panelPort ? await o.panelPort().catch(() => null) : null;
|
|
67
|
+
const restartedPanel = port !== null && (await m.restartPanel(env, port).catch(() => false));
|
|
68
|
+
return {
|
|
69
|
+
restartedPanel,
|
|
70
|
+
refreshedApp,
|
|
71
|
+
...(refreshedAutostart === undefined ? {} : { refreshedAutostart }),
|
|
72
|
+
...skill,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
finally {
|
|
76
|
+
await release();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { taskPrompt } from '../panel/page-logic.ts';
|
|
2
|
+
import type { Runtime } from '../runtime.ts';
|
|
3
|
+
import type { Account, Env } from '../types.ts';
|
|
4
|
+
import { type Attachment } from './attachments.ts';
|
|
5
|
+
import { UserError } from './errors.ts';
|
|
6
|
+
import { type Paths } from './paths.ts';
|
|
7
|
+
import { type ProbeDeps } from './probe.ts';
|
|
8
|
+
import { type TerminalId } from './terminal.ts';
|
|
9
|
+
export declare function pickTaskAccount(rt: Runtime, opts?: {
|
|
10
|
+
family?: string;
|
|
11
|
+
account?: string;
|
|
12
|
+
}): Promise<{
|
|
13
|
+
account: Account;
|
|
14
|
+
} | {
|
|
15
|
+
reason: 'no-accounts' | 'none-signed-in' | 'all-full';
|
|
16
|
+
}>;
|
|
17
|
+
export interface TaskFile {
|
|
18
|
+
/** `run` starts the Host as `sideby run` does, from the Menu Bar Item (spec §3.31). */
|
|
19
|
+
kind: 'prompt' | 'login' | 'run';
|
|
20
|
+
account: string;
|
|
21
|
+
prompt?: string;
|
|
22
|
+
cwd: string;
|
|
23
|
+
/** The Panel's paths when it wrote the task; `ask --run` starts the Host with the same HOME, config and state. */
|
|
24
|
+
home?: string;
|
|
25
|
+
configDir?: string;
|
|
26
|
+
stateDir?: string;
|
|
27
|
+
/** Files attached to the task (spec §3.28 "附件"), saved under `ai/attachments/<task-id>/`; never their content. */
|
|
28
|
+
attachments?: {
|
|
29
|
+
path: string;
|
|
30
|
+
kind: 'image' | 'video';
|
|
31
|
+
}[];
|
|
32
|
+
/**
|
|
33
|
+
* The folder came from a Task Spec (ADR-0030): `cwd` is its real path, which must still be an existing folder inside
|
|
34
|
+
* `home` when the task is written and again when `ask --run` has changed into it.
|
|
35
|
+
*/
|
|
36
|
+
cwdInHome?: true;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Why `cwd` cannot be the folder of a Portal's task (ADR-0030), or its real path: it must be an absolute path whose
|
|
40
|
+
* real path is an existing directory inside the real `home`. A link, or a link in an ancestor, counts where it points.
|
|
41
|
+
*/
|
|
42
|
+
export declare function realCwdInHome(cwd: string, home: string): Promise<{
|
|
43
|
+
real: string;
|
|
44
|
+
} | {
|
|
45
|
+
why: string;
|
|
46
|
+
}>;
|
|
47
|
+
/** A Portal's task folder that stopped being a folder inside the HOME after it was checked. */
|
|
48
|
+
export declare function movedCwdError(why: string): UserError;
|
|
49
|
+
export declare function taskWorkDir(paths?: Paths): Promise<string>;
|
|
50
|
+
export declare const newTaskId: () => string;
|
|
51
|
+
export declare function writeTask(task: TaskFile, paths?: Paths, id?: string): Promise<string>;
|
|
52
|
+
/**
|
|
53
|
+
* The state folder `ask --run --state-dir` names, accepted only when it and its `ask` folder are real directories the
|
|
54
|
+
* user owns that nobody else can write (the `ask` folder private, as writeTask makes it). Anything else is refused.
|
|
55
|
+
*/
|
|
56
|
+
export declare function taskStateDir(dir: string): Promise<string>;
|
|
57
|
+
/**
|
|
58
|
+
* The Host arguments `ask --run` adds for a prompt task: `<imageArg>=<path>` per attached image for a Family that
|
|
59
|
+
* declares `imageArg` (spec §3.28 "附件"), then the prompt, always last. The `=` form keeps one value per option, so a
|
|
60
|
+
* Host option that takes several values cannot swallow the prompt. An image that is gone, or whose path holds a comma
|
|
61
|
+
* (a Host taking lists may split it), is left to the path in the prompt.
|
|
62
|
+
*/
|
|
63
|
+
export declare function taskHostArgs(rt: Runtime, task: TaskFile): Promise<string[]>;
|
|
64
|
+
/** `env` with the HOME and XDG folders the task was written under, so the Runtime sees what the Panel saw. */
|
|
65
|
+
export declare function taskEnv(task: TaskFile, env: Env): Env;
|
|
66
|
+
export declare function readTask(id: string, paths?: Pick<Paths, 'stateDir'>): Promise<TaskFile>;
|
|
67
|
+
export declare function terminals(rt: Runtime): Promise<{
|
|
68
|
+
installed: import("./terminal.ts").InstalledTerminal[];
|
|
69
|
+
preferred: string | null;
|
|
70
|
+
guess: {
|
|
71
|
+
id: TerminalId;
|
|
72
|
+
source: 'config' | 'env' | 'default';
|
|
73
|
+
};
|
|
74
|
+
terminals: {
|
|
75
|
+
id: TerminalId;
|
|
76
|
+
name: string;
|
|
77
|
+
bundleId: string | null;
|
|
78
|
+
app: string | null;
|
|
79
|
+
termPrograms: readonly string[];
|
|
80
|
+
marker?: string;
|
|
81
|
+
binary?: string;
|
|
82
|
+
installed: boolean;
|
|
83
|
+
}[];
|
|
84
|
+
}>;
|
|
85
|
+
export declare function setPreferredTerminal(rt: Runtime, id?: string): Promise<void>;
|
|
86
|
+
/** Saves `terminal.custom` after checking it names a program and both placeholders; selects it too. */
|
|
87
|
+
export declare function setCustomTerminal(rt: Runtime, template: string): Promise<void>;
|
|
88
|
+
export interface AiTaskInput {
|
|
89
|
+
task?: string;
|
|
90
|
+
text?: string;
|
|
91
|
+
context?: Parameters<typeof taskPrompt>[0]['context'];
|
|
92
|
+
lang?: string;
|
|
93
|
+
account?: string;
|
|
94
|
+
family?: string;
|
|
95
|
+
terminal?: string;
|
|
96
|
+
/** With an explicit `account`: save it as `ask.account`, the next default. */
|
|
97
|
+
remember?: boolean;
|
|
98
|
+
/** Panel uploads (`/api/ask/attach` ids) to attach. */
|
|
99
|
+
uploads?: string[];
|
|
100
|
+
/** The user's own files to attach (`sideby ask --attach`). */
|
|
101
|
+
files?: string[];
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* The `context` of an AI Task as a page or a Task Spec sends it (spec §3.28): only the strings and findings a Task
|
|
105
|
+
* Prompt shows; anything else is refused through `fail`, which makes the caller's error (a 400, a Task Spec error).
|
|
106
|
+
*/
|
|
107
|
+
export declare function taskContext(c: unknown, fail: (message: string) => Error): AiTaskInput['context'];
|
|
108
|
+
/** The attachments a prompt shown before the task exists lists: uploads still staged, the user's files in place. */
|
|
109
|
+
export declare function previewAttachments(rt: Runtime, input: AiTaskInput): Promise<Attachment[]>;
|
|
110
|
+
/** The language of a Task Prompt: the one asked for, else Chinese under a `zh` locale, else English. */
|
|
111
|
+
export declare function taskLang(rt: Runtime, lang?: string): string;
|
|
112
|
+
export declare function promptForTask(rt: Runtime, input: AiTaskInput, attachments?: readonly Attachment[]): {
|
|
113
|
+
prompt: string;
|
|
114
|
+
removedSecrets: boolean;
|
|
115
|
+
};
|
|
116
|
+
/** Machine-readable reasons an AI Task did not open; `detail` says what to do. */
|
|
117
|
+
export type AiTaskReason = 'no-accounts' | 'none-signed-in' | 'all-full' | 'not-installed' | 'automation-denied' | 'npx-cache' | 'unsafe-path' | 'failed' | 'unsupported-platform';
|
|
118
|
+
export declare const PICK_DETAIL: Record<'no-accounts' | 'none-signed-in' | 'all-full', string>;
|
|
119
|
+
export declare function startAiTask(rt: Runtime, input: AiTaskInput): Promise<{
|
|
120
|
+
schemaVersion: 1;
|
|
121
|
+
task: null;
|
|
122
|
+
account: null;
|
|
123
|
+
terminal: null;
|
|
124
|
+
opened: boolean;
|
|
125
|
+
command: null;
|
|
126
|
+
prompt: string;
|
|
127
|
+
reason: AiTaskReason;
|
|
128
|
+
detail: string;
|
|
129
|
+
removedSecrets: boolean;
|
|
130
|
+
attachments: Attachment[];
|
|
131
|
+
} | {
|
|
132
|
+
schemaVersion: 1;
|
|
133
|
+
task: string;
|
|
134
|
+
account: string;
|
|
135
|
+
terminal: string;
|
|
136
|
+
opened: boolean;
|
|
137
|
+
command: string;
|
|
138
|
+
reason?: AiTaskReason | undefined;
|
|
139
|
+
detail?: string | undefined;
|
|
140
|
+
prompt?: undefined;
|
|
141
|
+
removedSecrets: boolean;
|
|
142
|
+
attachments: Attachment[];
|
|
143
|
+
}>;
|
|
144
|
+
/**
|
|
145
|
+
* Picks the Account and opens the Preferred Terminal for a written Task Prompt, as every AI Task does (spec §3.28):
|
|
146
|
+
* sideby's own, and one a Portal hands over in a Task Spec (ADR-0030), which names its own `cwd`.
|
|
147
|
+
*/
|
|
148
|
+
export declare function openPromptTask(rt: Runtime, input: Pick<AiTaskInput, 'account' | 'family' | 'terminal' | 'remember'>, written: {
|
|
149
|
+
taskId: string;
|
|
150
|
+
prompt: string;
|
|
151
|
+
removedSecrets: boolean;
|
|
152
|
+
attachments: Attachment[];
|
|
153
|
+
cwd?: string;
|
|
154
|
+
}): Promise<{
|
|
155
|
+
schemaVersion: 1;
|
|
156
|
+
task: null;
|
|
157
|
+
account: null;
|
|
158
|
+
terminal: null;
|
|
159
|
+
opened: boolean;
|
|
160
|
+
command: null;
|
|
161
|
+
prompt: string;
|
|
162
|
+
reason: AiTaskReason;
|
|
163
|
+
detail: string;
|
|
164
|
+
removedSecrets: boolean;
|
|
165
|
+
attachments: Attachment[];
|
|
166
|
+
} | {
|
|
167
|
+
schemaVersion: 1;
|
|
168
|
+
task: string;
|
|
169
|
+
account: string;
|
|
170
|
+
terminal: string;
|
|
171
|
+
opened: boolean;
|
|
172
|
+
command: string;
|
|
173
|
+
reason?: AiTaskReason | undefined;
|
|
174
|
+
detail?: string | undefined;
|
|
175
|
+
prompt?: undefined;
|
|
176
|
+
removedSecrets: boolean;
|
|
177
|
+
attachments: Attachment[];
|
|
178
|
+
}>;
|
|
179
|
+
export declare function openLoginInTerminal(rt: Runtime, ref: string): Promise<{
|
|
180
|
+
schemaVersion: 1;
|
|
181
|
+
task: string;
|
|
182
|
+
account: string;
|
|
183
|
+
terminal: string;
|
|
184
|
+
opened: boolean;
|
|
185
|
+
command: string;
|
|
186
|
+
reason?: AiTaskReason | undefined;
|
|
187
|
+
detail?: string | undefined;
|
|
188
|
+
}>;
|
|
189
|
+
/** Starts an Account in the Preferred Terminal as `sideby run` would, in the HOME folder (spec §3.31). */
|
|
190
|
+
export declare function openRunInTerminal(rt: Runtime, ref: string): Promise<{
|
|
191
|
+
schemaVersion: 1;
|
|
192
|
+
task: string;
|
|
193
|
+
account: string;
|
|
194
|
+
terminal: string;
|
|
195
|
+
opened: boolean;
|
|
196
|
+
command: string;
|
|
197
|
+
reason?: AiTaskReason | undefined;
|
|
198
|
+
detail?: string | undefined;
|
|
199
|
+
}>;
|
|
200
|
+
/**
|
|
201
|
+
* What `try` will run for an Account, computed as `sideby run` would (Family defaults, config arguments) but without
|
|
202
|
+
* reading its Secret File or running `launch.before` hooks: nothing runs before the user agrees.
|
|
203
|
+
*/
|
|
204
|
+
export declare function tryPreview(rt: Runtime, ref: string): Promise<{
|
|
205
|
+
account: Account;
|
|
206
|
+
family: import("../types.ts").FamilyDef;
|
|
207
|
+
command: string[];
|
|
208
|
+
}>;
|
|
209
|
+
/**
|
|
210
|
+
* `sideby try` and the Panel (spec §3.28): runs the Family's probe once the way Launch starts the Host, in a temp
|
|
211
|
+
* folder under the task directory that is removed afterwards. The caller has already said it spends a few tokens. The
|
|
212
|
+
* launch is prepared once here, so `launch.before` hooks run once, and the command returned is what actually ran.
|
|
213
|
+
* `spawn` replaces the process start (tests); by default the Host runs with stdin ignored and is killed at the timeout.
|
|
214
|
+
*/
|
|
215
|
+
export declare function tryAccount(rt: Runtime, ref: string, spawn?: ProbeDeps['spawn']): Promise<{
|
|
216
|
+
ok: boolean;
|
|
217
|
+
exitCode: number | null;
|
|
218
|
+
output: string;
|
|
219
|
+
timedOut: boolean;
|
|
220
|
+
account: string;
|
|
221
|
+
command: string[];
|
|
222
|
+
}>;
|