botapp-cli 0.2.1 → 0.2.2

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.
@@ -0,0 +1,32 @@
1
+ import { Command } from 'commander';
2
+
3
+ interface DaemonProfile {
4
+ /** Stable key under `profiles:` in the YAML, derived from the server
5
+ * hostname (e.g. `local`, `cloud`, `api-botapp-ai`). Optional on
6
+ * inputs to `saveDaemonProfile` — auto-derived when absent. Always
7
+ * populated on values returned from `loadDaemonProfile(s)`. */
8
+ alias?: string;
9
+ server: string;
10
+ daemonId: string;
11
+ daemonName: string;
12
+ token: string;
13
+ }
14
+ declare function loadDaemonProfiles(): DaemonProfile[];
15
+ /** Back-compat: return the first paired profile, or null. */
16
+ declare function loadDaemonProfile(): DaemonProfile | null;
17
+ /** Find a profile by alias OR server URL (case-insensitive, trailing slash tolerant). */
18
+ declare function findDaemonProfile(serverOrAlias: string): DaemonProfile | null;
19
+ /**
20
+ * Upsert a daemon profile keyed by server URL. Replaces any prior entry
21
+ * for the same server (so re-pairing the same server doesn't duplicate)
22
+ * but preserves entries for other servers — the killer feature for
23
+ * users who pair both a local dev server and a remote one.
24
+ */
25
+ declare function saveDaemonProfile(input: DaemonProfile): DaemonProfile;
26
+ declare function removeDaemonProfile(serverOrAlias: string): boolean;
27
+
28
+ declare function runDaemonConnectionLoop(profile: DaemonProfile): Promise<void>;
29
+
30
+ declare const program: Command;
31
+
32
+ export { type DaemonProfile, findDaemonProfile, loadDaemonProfile, loadDaemonProfiles, program, removeDaemonProfile, runDaemonConnectionLoop, saveDaemonProfile };