robisie 0.2.2 → 0.4.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 CHANGED
@@ -1,5 +1,40 @@
1
1
  # Historia zmian klienta / Client changelog
2
2
 
3
+ ## [0.4.0](https://github.com/chuppa12/robisie-app/compare/client-v0.3.0...client-v0.4.0) (2026-11-10)
4
+
5
+
6
+ ### Features
7
+
8
+ * **client:** doctor reads the project's review policy (enforced) ([7aa3501](https://github.com/chuppa12/robisie-app/commit/7aa35018a259ecbb126e0fde5542d524464eff17))
9
+ * **client:** doctor reads the project's review policy (enforced) from list_projects ([8f667b1](https://github.com/chuppa12/robisie-app/commit/8f667b12212330aedb39f0c989aa10da9c2d7b5e))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **client:** 0.3.1 local acceptance STOP isolation, review reason, Grok stderr, agent-install README, 10-min publish window ([076ad80](https://github.com/chuppa12/robisie-app/commit/076ad80f43392f107baad3d19fc3aada6bc0187f))
15
+ * **client:** doctor ignores a client.close() failure after a successful policy read ([c0ac19a](https://github.com/chuppa12/robisie-app/commit/c0ac19a460fa7be8ea0c7596c7a4c72ae2e627de))
16
+ * **client:** local acceptance HOLD applies only to a card still in_review ([8660384](https://github.com/chuppa12/robisie-app/commit/86603842269e88057eb80792fb73eb841c5fde9b))
17
+ * **client:** local acceptance STOP isolates the card, shows server reason and Grok stderr ([7e6cbd1](https://github.com/chuppa12/robisie-app/commit/7e6cbd181e04425ec913cc8fba047fc9bd43de2e))
18
+ * **client:** README agent-install block and 10-minute npm visibility window ([7c61223](https://github.com/chuppa12/robisie-app/commit/7c6122368e21113ff341cc414e1ee66a34096321))
19
+
20
+ ## [0.3.0](https://github.com/chuppa12/robisie-app/compare/client-v0.2.2...client-v0.3.0) (2026-11-10)
21
+
22
+
23
+ ### Features
24
+
25
+ * **client:** npx robisie login + poprawki 0.2.3 (NIE SCALAĆ przed migracją 0060) ([b384bfb](https://github.com/chuppa12/robisie-app/commit/b384bfb303bd35440bb2ee8d210ade4bd8cd9b30))
26
+ * **client:** wire login into init, doctor and launcher (E3b) ([1905ded](https://github.com/chuppa12/robisie-app/commit/1905ded276a9cc3bbf6cc3dcaab51ebe06507415))
27
+ * **login:** E3a — klient parowania kodem urządzenia (nowe pliki) ([906c6fb](https://github.com/chuppa12/robisie-app/commit/906c6fbddfcfd9df0d732338bd5643fb5653a971))
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * **client:** doctor i init nie chodza po przodkach katalogu stanu; smoke wydania inicjuje instalacje ([a77d7a2](https://github.com/chuppa12/robisie-app/commit/a77d7a203954d7ebf4396b621d9474546a6c90d9))
33
+ * **client:** keep uninstall without a manifest a no-op (existing contract) ([92e6cfc](https://github.com/chuppa12/robisie-app/commit/92e6cfccd80f322e8edea0937cca1c0d94620487))
34
+ * **client:** uninstall removes login files and keys; docs: retry/abandon via panel (E3b) ([0e82de2](https://github.com/chuppa12/robisie-app/commit/0e82de22fa5cec4797de97697b673b74c31dac7b))
35
+ * **receiver:** local receiver passes --reasoning-effort low (grok 1.0.13 rejects none) ([813f036](https://github.com/chuppa12/robisie-app/commit/813f03684bd75fd0deb8b7f002e8eee6407355fc))
36
+ * serialize device login with a persistent SQLite mutex ([b73aef8](https://github.com/chuppa12/robisie-app/commit/b73aef849326bb6c68ad6a981b6b12052571401a))
37
+
3
38
  ## [0.2.2](https://github.com/chuppa12/robisie-app/compare/client-v0.2.1...client-v0.2.2) (2026-11-10)
4
39
 
5
40
 
package/README.md CHANGED
@@ -6,6 +6,8 @@ Przewodniki: [PL — konto → odbiór → odinstalowanie](docs/README.md) · [E
6
6
 
7
7
  Konto i klucz są potrzebne do init i pracy ról. Osobne wejście to walidacja offline, gdy CLI jest dostępne: nie sprawdza instalacji, nie uruchamia dostawców i nie wymaga podawania UUID projektu. Osobno `npx robisie doctor --engine-config ./robisie.config.json` sprawdza offline strukturę konfiguracji i wejścia instalacji lokalnej: nie potwierdza UUID projektu, repo, modeli ani uruchomienia dostawców. Lokalne przewodniki są w `node_modules/robisie/docs/`.
8
8
 
9
+ Zamiast przepisywać klucze możesz uruchomić `npx robisie login`: polecenie wypisuje kod i link, Ty albo Twój agent zatwierdzacie parę kluczy A i B w przeglądarce zalogowanej do robisie.app, a klucze trafiają prosto do plików instalacji — w wersji dla testerów agent i właściciel na tym komputerze to jedna strefa zaufania (agent ma technicznie dostęp także do klucza B).
10
+
9
11
  ## Przed init — konto i pierwszy projekt
10
12
 
11
13
  Załóż konto i zaloguj się w https://robisie.app. Ekran „Zakładamy Twój projekt…” oznacza przygotowywanie projektu; poczekaj na „Twój projekt jest gotowy”. Ten ekran nie dowodzi dokładnie jednego projektu. Nie ma gwarantowanego czasu oczekiwania. Jeśli widzisz „To się przeciąga…”, wybierz „Sprawdź tablicę”: https://robisie.app/dashboard/plugins/planer.
package/dist/cli.d.ts CHANGED
@@ -14,6 +14,10 @@ export interface ParsedArgs {
14
14
  engineConfig: string | null;
15
15
  interval: number;
16
16
  once: boolean;
17
+ /** login: false = `--no-wait`. */
18
+ wait: boolean;
19
+ /** login: `--timeout` seconds; null = DEFAULT_LOGIN_TIMEOUT_SECONDS. */
20
+ timeout: number | null;
17
21
  }
18
22
  export declare function parseArgs(argv: readonly string[]): ParsedArgs;
19
23
  export declare function run(argv: readonly string[], ctx: Ctx): Promise<number>;
package/dist/cli.js CHANGED
@@ -6,15 +6,18 @@ import { AGENT_IDS, isAgentId } from "./agents.js";
6
6
  import { doctor, init, recoveryStep, uninstall } from "./commands.js";
7
7
  import { HELPER_SERVERS, PACKAGE_VERSION } from "./constants.js";
8
8
  import { RobisieError, errorMessage, nodeCtx } from "./context.js";
9
+ import { DEFAULT_LOGIN_TIMEOUT_SECONDS } from "./device-login.js";
9
10
  import { runFactory } from "./factory-run.js";
10
11
  import { checkInputs, inputDirectory, INPUTS_OK } from "./engine-inputs.js";
11
12
  import { isHelperServer, runHelper } from "./helpers.js";
13
+ import { closeInstallation, initNeedsLogin, login, openInstallation } from "./login.js";
12
14
  import { ROLE_IDS, ROLE_STEP } from "./manifest.js";
13
15
  import { doctorEngineConfig } from "./role-registry.js";
14
16
  const HELP = `robisie ${PACKAGE_VERSION} — łączy Twojego agenta z tablicą robisie
15
17
 
18
+ npx robisie login paruje instalację: kod i link zatwierdzasz w przeglądarce, klucze A i B trafiają prosto do plików
16
19
  npx robisie init klucze A (ROBISIE_KEY) i B (ROBISIE_REVIEW_KEY), osobne ukryte pytania + konfiguracja MCP + role klienta
17
- npx robisie doctor sprawdza A i B, wersję kontraktu i role; enforced: NIE SPRAWDZONO
20
+ npx robisie doctor sprawdza A i B, wersję kontraktu, role i politykę enforced projektu
18
21
  npx robisie uninstall usuwa wpisy robisie i role; zachowuje kopie zapasowe
19
22
  npx robisie factory run nadzoruje kolejne takty silnika (Linux, Node.js >=24)
20
23
  npx robisie mcp <${HELPER_SERVERS.join("|")}>
@@ -42,6 +45,14 @@ Opcje init:
42
45
  --role=rola=dostawca ta sama składnia; np. --role=builder=codex zachowuje resztę mapy
43
46
  --no-shell nie dopisuj ROBISIE_KEY i ROBISIE_REVIEW_KEY do profilu powłoki
44
47
  --key-stdin weź tylko klucz A z wejścia standardowego (np. printenv KLUCZ | npx robisie init --key-stdin)
48
+ Bez kluczy, bez terminala i bez --key-stdin init najpierw uruchamia npx robisie login.
49
+
50
+ Opcje login:
51
+ --no-wait tylko wypisz kod i link (albo wznów czekające parowanie) i zakończ kodem 2
52
+ --timeout <sekundy> ile czekać na zatwierdzenie: 1–3600, domyślnie ${DEFAULT_LOGIN_TIMEOUT_SECONDS}; także --timeout=600
53
+ Kody wyjścia: 0 = zalogowano (para zapisana i potwierdzona), 2 = parowanie czeka na zatwierdzenie
54
+ (to jeszcze nie jest zalogowanie — wznów: npx robisie login), 1 = błąd z następnym krokiem.
55
+ Po zalogowaniu init, doctor i factory run biorą klucze z plików instalacji, nie ze starego ENV.
45
56
  `;
46
57
  export function parseArgs(argv) {
47
58
  const args = [...argv];
@@ -55,9 +66,11 @@ export function parseArgs(argv) {
55
66
  let interval = 120;
56
67
  let intervalSet = false;
57
68
  let once = false;
69
+ let wait = true;
70
+ let timeout = null;
58
71
  // Help wins over everything else, so `init --help` never starts an install.
59
72
  if (argv.includes("--help") || argv.includes("-h"))
60
- return { command, help: true, target, agents: null, roles, shell, keyStdin, engineConfig, interval, once };
73
+ return { command, help: true, target, agents: null, roles, shell, keyStdin, engineConfig, interval, once, wait, timeout };
61
74
  if (command === "factory") {
62
75
  target = args.shift() ?? null;
63
76
  if (target !== "run")
@@ -128,14 +141,24 @@ export function parseArgs(argv) {
128
141
  }
129
142
  else if (command === "mcp" && target === null && !arg.startsWith("-"))
130
143
  target = arg;
144
+ else if (command === "login" && arg === "--no-wait")
145
+ wait = false;
146
+ else if (command === "login" && (arg === "--timeout" || arg.startsWith("--timeout="))) {
147
+ const value = arg === "--timeout" ? args.shift() ?? "" : arg.slice("--timeout=".length);
148
+ if (timeout !== null || !/^\d+$/.test(value) || Number(value) < 1 || Number(value) > 3600) {
149
+ throw new RobisieError("Opcja --timeout wymaga jednej liczby całkowitej sekund 1–3600.", "Zobacz `npx robisie help`.");
150
+ }
151
+ timeout = Number(value);
152
+ }
131
153
  else
132
154
  throw new RobisieError("Nieznana opcja argumentów CLI.", "Zobacz `npx robisie help`.");
133
155
  }
134
156
  if (once && intervalSet)
135
157
  throw new RobisieError("Opcje --once i --interval wykluczają się.", "Zobacz `npx robisie help`.");
136
- return { command, help: false, target, agents: agents.length > 0 ? agents : null, roles, shell, keyStdin, engineConfig, interval, once };
158
+ return { command, help: false, target, agents: agents.length > 0 ? agents : null, roles, shell, keyStdin, engineConfig, interval, once, wait, timeout };
137
159
  }
138
160
  export async function run(argv, ctx) {
161
+ let release = null;
139
162
  try {
140
163
  if (Number(process.versions.node.split(".")[0]) < 24) {
141
164
  throw new RobisieError("Polecenia robisie wymagają Node.js >=24.", "Zainstaluj Node.js 24 lub nowszy i ponów polecenie.");
@@ -145,6 +168,26 @@ export async function run(argv, ctx) {
145
168
  ctx.out(HELP);
146
169
  return 0;
147
170
  }
171
+ if (args.command === "login")
172
+ return await login(ctx, { wait: args.wait, timeoutSeconds: args.timeout ?? undefined });
173
+ if (args.command === "init" && initNeedsLogin(ctx, args.keyStdin)) {
174
+ const code = await login(ctx, { wait: true });
175
+ if (code !== 0)
176
+ return code;
177
+ }
178
+ const held = args.command === "init" ? "init"
179
+ : args.command === "factory" ? "factory run"
180
+ : args.command === "doctor" && args.engineConfig === null ? "doctor" : null;
181
+ if (held) {
182
+ const opened = await openInstallation(ctx, held);
183
+ ctx = opened.ctx;
184
+ release = opened.release;
185
+ // factory run holds the lock only while it reads the pair, never while the engine runs.
186
+ if (held === "factory run" && release) {
187
+ closeInstallation(ctx, release);
188
+ release = null;
189
+ }
190
+ }
148
191
  switch (args.command) {
149
192
  case "init":
150
193
  await init(ctx, { agents: args.agents, roles: args.roles, shell: args.shell, keyStdin: args.keyStdin, ...(args.engineConfig === null ? {} : { engineConfig: args.engineConfig }) });
@@ -209,6 +252,10 @@ export async function run(argv, ctx) {
209
252
  }
210
253
  return 1;
211
254
  }
255
+ finally {
256
+ if (release)
257
+ closeInstallation(ctx, release);
258
+ }
212
259
  }
213
260
  function isEntry() {
214
261
  try {
package/dist/commands.js CHANGED
@@ -6,13 +6,15 @@ import { AGENT_IDS, AGENT_LABELS, SHELL_EXPORT, agentPaths, agentOnPath, detectA
6
6
  import { HELPER_SERVERS, KEY_ENV, KEY_PATTERN, PACKAGE_NAME, PACKAGE_VERSION } from "./constants.js";
7
7
  import { RobisieError, errorMessage } from "./context.js";
8
8
  import { assertCodexEnvironment } from "./codex-env.js";
9
+ import { loginFiles } from "./device-login.js";
9
10
  import { reportDoctorDisk } from "./disk-guard.js";
10
11
  import { applyOp, assertCodexChange, checkRecovery, preserveFileStep, capture, entryPresent, fingerprint, prepareBlock, refusePrivateSymlink, renderBlock, restore, undoEntry } from "./fsops.js";
11
12
  import { HELPER_TOOLS, probeHelper } from "./helpers.js";
12
- import { clientPaths, ensurePrivateDir, readKey, readManifest, writeKey, writeManifest, roleProviders, ROLE_IDS, ROLE_STEP } from "./manifest.js";
13
+ import { clientPaths, ensurePrivateDir, loginFields, readKey, readManifest, writeKey, writeManifest, roleProviders, ROLE_IDS, ROLE_STEP } from "./manifest.js";
13
14
  import { assertCompatible, checkConnection, fetchContractVersion } from "./mcp.js";
14
15
  import { loadRoles, MANAGED_LINE, rolesDir } from "./roles.js";
15
16
  import { checkInputs, createInputs, INPUTS_OK, preflightInputs, selectInputDirectory } from "./engine-inputs.js";
17
+ import { PlanerClient } from "./planer-client.js";
16
18
  const NO_KEY_STEP = "Wygeneruj klucz worker na https://robisie.app/dashboard/connect; w zsh/bash wykonaj `unset ROBISIE_KEY`, potem lokalne `npx robisie init` i wklej klucz w ukrytym pytaniu (poza rozmową).";
17
19
  const KEY_FORMAT_STEP = `Skopiuj klucz jeszcze raz z https://robisie.app/dashboard/connect; ustaw poprawny ROBISIE_KEY w środowisku lokalnego init (poza rozmową i historią poleceń) albo przekaż klucz przez stdin z jawną flagą: \`npx robisie init --key-stdin\` (poza rozmową i historią poleceń). Następnie wczytaj zapisany klucz do bieżącej sesji POSIX z tym samym XDG_CONFIG_HOME: \`${SHELL_EXPORT}\`, potem uruchom \`npx robisie doctor\`.`;
18
20
  const ENV_KEY_FORMAT_STEP = `W zsh/bash wykonaj \`unset ROBISIE_KEY\` — ENV ma pierwszeństwo przed pytaniem, stdin i plikiem. ${KEY_FORMAT_STEP}`;
@@ -98,8 +100,10 @@ export async function init(ctx, options) {
98
100
  preflightInputs(inputs.directory, inputs.configPath);
99
101
  const paths = clientPaths(agentPaths(ctx).clientDir);
100
102
  const prior = readManifest(paths.manifest);
101
- const detected = options.agents ?? prior?.agents ?? detectAgents(ctx);
102
- const previousMap = prior ? roleProviders(prior) : roleProviders({ agents: detected });
103
+ // A manifest written only by `npx robisie login` records no agent choice yet.
104
+ const chosen = prior?.agents.length ? prior : null;
105
+ const detected = options.agents ?? chosen?.agents ?? detectAgents(ctx);
106
+ const previousMap = chosen ? roleProviders(chosen) : roleProviders({ agents: detected });
103
107
  let map = previousMap;
104
108
  if (options.roles && Object.keys(options.roles).length > 0) {
105
109
  const merged = { ...previousMap, ...options.roles };
@@ -145,7 +149,7 @@ export async function init(ctx, options) {
145
149
  const agents = [...new Set([...(prior?.agents ?? []), ...selected])];
146
150
  let changed = 0;
147
151
  // The record first, then the key and the changes: a disk that fills up cannot leave a key or a change uninstall does not know about.
148
- writeManifest(paths.dir, { agents, roleProviders: map, entries: [...done.values()] });
152
+ writeManifest(paths.dir, { ...loginFields(prior), agents, roleProviders: map, entries: [...done.values()] });
149
153
  writeKey(paths.dir, key);
150
154
  writeKey(paths.dir, reviewKey, "review-key");
151
155
  for (const { owner, op } of planned) {
@@ -156,7 +160,7 @@ export async function init(ctx, options) {
156
160
  done.set(id, { ...applied.entry, owner });
157
161
  try {
158
162
  // Recorded after every change (atomically), so even a killed init leaves uninstall a complete record.
159
- writeManifest(paths.dir, { agents, roleProviders: map, entries: [...done.values()] });
163
+ writeManifest(paths.dir, { ...loginFields(prior), agents, roleProviders: map, entries: [...done.values()] });
160
164
  }
161
165
  catch (error) {
162
166
  // The change is not on record, so uninstall could never undo it: take it back before failing.
@@ -322,7 +326,7 @@ function pairReadiness(ctx, fail) {
322
326
  }
323
327
  /** Returns the process exit code: 0 = all good, 1 = something needs one action. */
324
328
  export async function doctor(ctx) {
325
- ctx.out("! Polityka enforced: NIE SPRAWDZONO — klient nie ma API jej odczytu.");
329
+ let policyLine = "! Polityka enforced: NIE SPRAWDZONO — odczyt nieudany.";
326
330
  const problems = [];
327
331
  const fail = (line, nextStep) => {
328
332
  ctx.out(`✗ ${line}`);
@@ -384,10 +388,31 @@ export async function doctor(ctx) {
384
388
  if (connection.contractVersion)
385
389
  assertCompatible(connection.contractVersion);
386
390
  ctx.out(`✓ Połączenie działa: klucz otwiera tablicę (projektów: ${connection.projectCount}).`);
387
- if (connection.projectCount !== 1)
391
+ if (connection.projectCount !== 1) {
388
392
  fail(`CEO wymaga dokładnie 1 projektu (projektów: ${connection.projectCount}).`, ceoProjectStep(connection.projectCount));
393
+ policyLine = "! Polityka enforced: NIE SPRAWDZONO — brak jednoznacznego projektu.";
394
+ return;
395
+ }
396
+ try {
397
+ const client = new PlanerClient({ origin: ctx.origin, token: usableKey, fetch: ctx.fetch });
398
+ try {
399
+ await client.connect();
400
+ const projects = await client.listProjects();
401
+ const policy = projects.length === 1 ? projects[0]?.reviewPolicy : undefined;
402
+ policyLine = policy === "enforced" ? "✓ Polityka enforced: TAK"
403
+ : policy === "legacy" ? "! Polityka enforced: NIE (projekt ma politykę legacy) — odbiór B (accept_review) będzie odmawiany; poproś operatora Robisie o ustawienie enforced dla tego projektu"
404
+ : "! Polityka enforced: NIE SPRAWDZONO — serwer nie zwraca polityki.";
405
+ }
406
+ finally {
407
+ await client.close().catch(() => undefined);
408
+ }
409
+ }
410
+ catch {
411
+ policyLine = "! Polityka enforced: NIE SPRAWDZONO — odczyt nieudany.";
412
+ }
389
413
  });
390
414
  }
415
+ ctx.out(policyLine);
391
416
  await guard(async () => {
392
417
  if (!usableKey || !KEY_PATTERN.test(usableKey))
393
418
  return;
@@ -593,6 +618,8 @@ export function uninstall(ctx) {
593
618
  for (const dir of [paths.codexRoles, paths.roles])
594
619
  if (!removeEmptyDir(dir))
595
620
  leftovers.push(dir);
621
+ for (const path of loginFiles(paths.dir))
622
+ rmSync(path, { force: true });
596
623
  // The ledger lives inside paths.dir, so only the final rmdir requires removing it first.
597
624
  try {
598
625
  rmSync(paths.manifest, { force: true });
@@ -1,6 +1,6 @@
1
1
  /** Package identity and the server contract it speaks. */
2
2
  export declare const PACKAGE_NAME = "robisie";
3
- export declare const PACKAGE_VERSION = "0.2.2";
3
+ export declare const PACKAGE_VERSION = "0.4.0";
4
4
  /**
5
5
  * MAJOR of the agent-API contract this package understands.
6
6
  * PARITY: src/lib/mcp/contract-version.ts (AGENT_API_CONTRACT_VERSION) on the server.
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /** Package identity and the server contract it speaks. */
2
2
  export const PACKAGE_NAME = "robisie";
3
- export const PACKAGE_VERSION = "0.2.2"; // x-release-please-version
3
+ export const PACKAGE_VERSION = "0.4.0"; // x-release-please-version
4
4
  /**
5
5
  * MAJOR of the agent-API contract this package understands.
6
6
  * PARITY: src/lib/mcp/contract-version.ts (AGENT_API_CONTRACT_VERSION) on the server.
@@ -0,0 +1,48 @@
1
+ import { type Ctx } from "./context.js";
2
+ export declare const DEFAULT_LOGIN_TIMEOUT_SECONDS = 540;
3
+ export interface LoginIo {
4
+ now: () => number;
5
+ sleep: (ms: number) => Promise<void>;
6
+ hostname: string;
7
+ /** Legacy injection kept for callers; PID liveness never controls the SQLite mutex. */
8
+ processAlive: (pid: number, startedAt: number) => boolean;
9
+ }
10
+ export interface NewPair {
11
+ key: string;
12
+ installationId: string;
13
+ pairId: string;
14
+ }
15
+ /**
16
+ * The other places holding A (J5: `~/.claude.json` header, manifest fields). `capture` must return
17
+ * JSON-serialisable state; `restore` must write it back exactly and throw when it cannot.
18
+ */
19
+ export interface PairCopies {
20
+ capture: () => unknown;
21
+ apply: (pair: NewPair) => void;
22
+ restore: (captured: unknown) => void;
23
+ }
24
+ export interface LoginOptions {
25
+ /** false = `--no-wait`: start (or resume) the pairing, print code and link, exit 2. */
26
+ wait: boolean;
27
+ timeoutSeconds?: number;
28
+ displayName?: string;
29
+ /** Claim only (§5.2): the server decides whether this installation exists for the approving account. */
30
+ installationHint?: string | null;
31
+ copies?: PairCopies;
32
+ io?: Partial<LoginIo>;
33
+ }
34
+ /** Owned login files for uninstall, derived from the same paths used by pairing. */
35
+ export declare function loginFiles(dir: string): string[];
36
+ /**
37
+ * A single persistent SQLite file identifies this installation's mutex. The open transaction owns it
38
+ * until close/process death; the file is never renamed or removed. JSON is only last-owner diagnostics.
39
+ */
40
+ export declare function acquireInstallationLock(dir: string, command: string, io?: Pick<LoginIo, "now" | "hostname" | "processAlive">): () => void;
41
+ /**
42
+ * Finishes (or rolls back) an interrupted pair write. Every command calls it under the installation lock
43
+ * before touching the key files; while it throws, the keys in the files must not be used.
44
+ * Returns true when a journal was found and the pair is now saved and confirmed.
45
+ */
46
+ export declare function resumePairJournal(ctx: Ctx, dir: string, copies?: PairCopies): Promise<boolean>;
47
+ /** Exit codes (F10): 0 = pair saved and confirmed, 2 = still waiting for approval, 1 = failure. */
48
+ export declare function deviceLogin(ctx: Ctx, options: LoginOptions): Promise<0 | 1 | 2>;