@lingyao037/openclaw-lingyao-cli 0.9.8 → 1.0.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/dist/cli.d.ts +78 -2
- package/dist/index.d.ts +4 -978
- package/dist/index.js +10 -1008
- package/dist/index.js.map +1 -1
- package/dist/setup-entry.d.ts +2 -2
- package/dist/setup-entry.js +6 -47
- package/dist/setup-entry.js.map +1 -1
- package/dist/{status-BaZOYVZY.d.ts → status-CS7AsRlS.d.ts} +1 -1
- package/dist/{types-D3SmE-b0.d.ts → types-BZMU9mea.d.ts} +1 -1
- package/openclaw.plugin.json +2 -1
- package/package.json +1 -1
- package/dist/accounts-t-QtF58y.d.ts +0 -80
package/dist/cli.d.ts
CHANGED
|
@@ -1,5 +1,81 @@
|
|
|
1
|
-
import { L as LingyaoRuntime, H as HealthStatus } from './types-
|
|
2
|
-
|
|
1
|
+
import { L as LingyaoRuntime, a as LingyaoAccount, D as DeviceToken, b as DeviceInfo, H as HealthStatus } from './types-BZMU9mea.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Account storage and management
|
|
5
|
+
*/
|
|
6
|
+
declare class AccountManager {
|
|
7
|
+
private runtime;
|
|
8
|
+
private accounts;
|
|
9
|
+
private pendingPairings;
|
|
10
|
+
constructor(runtime: LingyaoRuntime);
|
|
11
|
+
/**
|
|
12
|
+
* Initialize account manager from storage
|
|
13
|
+
*/
|
|
14
|
+
initialize(): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Get account by device ID
|
|
17
|
+
*/
|
|
18
|
+
getAccount(deviceId: string): LingyaoAccount | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Get account by device token
|
|
21
|
+
*/
|
|
22
|
+
getAccountByToken(token: string): LingyaoAccount | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Get all active accounts
|
|
25
|
+
*/
|
|
26
|
+
getActiveAccounts(): LingyaoAccount[];
|
|
27
|
+
/**
|
|
28
|
+
* Create a new pairing session
|
|
29
|
+
*/
|
|
30
|
+
createPairingSession(code: string, expiresAt: number): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Get pairing session by code
|
|
33
|
+
*/
|
|
34
|
+
getPairingSession(code: string): PairingSession | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Remove a pending pairing (e.g. expired or cancelled)
|
|
37
|
+
*/
|
|
38
|
+
deletePendingPairing(code: string): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Confirm pairing and create account
|
|
41
|
+
*/
|
|
42
|
+
confirmPairing(pairingCode: string, deviceToken: DeviceToken, deviceInfo: DeviceInfo): Promise<LingyaoAccount | null>;
|
|
43
|
+
/**
|
|
44
|
+
* Update account's last seen timestamp
|
|
45
|
+
*/
|
|
46
|
+
updateLastSeen(deviceId: string): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Revoke an account
|
|
49
|
+
*/
|
|
50
|
+
revokeAccount(deviceId: string): Promise<boolean>;
|
|
51
|
+
/**
|
|
52
|
+
* Manually add a device by deviceId (user-initiated pairing).
|
|
53
|
+
* No pairing code or deviceToken required — the user explicitly
|
|
54
|
+
* trusts this device from the OpenClaw CLI.
|
|
55
|
+
*/
|
|
56
|
+
addDevice(deviceId: string, deviceInfo: DeviceInfo): Promise<LingyaoAccount>;
|
|
57
|
+
/**
|
|
58
|
+
* Refresh device token
|
|
59
|
+
*/
|
|
60
|
+
refreshDeviceToken(deviceId: string, newToken: DeviceToken): Promise<boolean>;
|
|
61
|
+
/**
|
|
62
|
+
* Clean up expired accounts
|
|
63
|
+
*/
|
|
64
|
+
cleanupExpired(): Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Save accounts to storage
|
|
67
|
+
*/
|
|
68
|
+
private saveAccounts;
|
|
69
|
+
/**
|
|
70
|
+
* Save pending pairings to storage
|
|
71
|
+
*/
|
|
72
|
+
private savePendingPairings;
|
|
73
|
+
}
|
|
74
|
+
interface PairingSession {
|
|
75
|
+
code: string;
|
|
76
|
+
createdAt: number;
|
|
77
|
+
expiresAt: number;
|
|
78
|
+
}
|
|
3
79
|
|
|
4
80
|
/**
|
|
5
81
|
* Probe status levels
|