@kl-c/matrixos 0.1.22 → 0.1.24

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,11 @@
1
+ /**
2
+ * Load the gateway env file (`.klc-gateway.env`) into `process.env`.
3
+ *
4
+ * - Resolves the file path from `configDir` (falls back to `getConfigDir()`).
5
+ * - Warns and returns if the file is missing or unreadable — never throws.
6
+ * - Parses `KEY=VALUE` lines tolerating an optional leading `export ` and
7
+ * surrounding quotes.
8
+ * - By default, only sets keys that are NOT already present in `process.env`.
9
+ * Pass `force: true` to overwrite existing values (used during hot-reload).
10
+ */
11
+ export declare function loadGatewayEnvFile(configDir?: string, force?: boolean): void;
@@ -1,7 +1,12 @@
1
1
  export declare const GATEWAY_ENV_FILENAME = ".klc-gateway.env";
2
2
  /**
3
- * Write the Telegram bot token to a chmod-600 env file next to matrixos.json.
3
+ * Write an arbitrary KEY=VALUE pair to the chmod-600 env file next to matrixos.json.
4
4
  * The token is NEVER stored in matrixos.json — the gateway reads it via
5
- * `env:TELEGRAM_BOT_TOKEN` at runtime. Returns the written file path.
5
+ * `env:<KEY>` at runtime. Returns the written file path.
6
+ */
7
+ export declare function writeGatewayEnvToken(key: string, token: string): string;
8
+ /**
9
+ * Backward-compatible shim for Telegram (used by tui-installer / bun-install).
10
+ * Delegates to {@link writeGatewayEnvToken} with `TELEGRAM_BOT_TOKEN`.
6
11
  */
7
12
  export declare function writeGatewayEnv(token: string): string;
@@ -0,0 +1,12 @@
1
+ export interface GatewaySetTokenOptions {
2
+ readonly type: string;
3
+ readonly token?: string;
4
+ readonly interactive: boolean;
5
+ }
6
+ export declare function executeGatewaySetTokenCommand(args: {
7
+ readonly positional: readonly string[];
8
+ readonly options: GatewaySetTokenOptions;
9
+ }): Promise<{
10
+ readonly exitCode: 0 | 1;
11
+ readonly stdout: string;
12
+ }>;