@lingyao037/openclaw-lingyao-cli 0.9.0 → 0.9.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.
- package/dist/{accounts-BNuShH7y.d.ts → accounts-B9ijYIIu.d.ts} +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/index.d.ts +37 -14
- package/dist/index.js +38 -35
- package/dist/index.js.map +1 -1
- package/dist/setup-entry.d.ts +3 -0
- package/dist/setup-entry.js +3039 -0
- package/dist/setup-entry.js.map +1 -0
- package/openclaw.plugin.json +3 -0
- package/package.json +8 -2
|
@@ -329,4 +329,4 @@ interface PairingSession {
|
|
|
329
329
|
expiresAt: number;
|
|
330
330
|
}
|
|
331
331
|
|
|
332
|
-
export { AccountManager as A, type DeviceInfo as D, type FailedEntry as F, type HealthStatus as H, type LingyaoRuntime as L, type MemorySyncPayload as M, type NotifyPayload as N, type PairingCode as P, type QueuedMessage as Q, type SyncRequest as S, type TokenRefreshRequest as T, type WebSocketConnection as W, type
|
|
332
|
+
export { AccountManager as A, type DeviceInfo as D, type FailedEntry as F, type HealthStatus as H, type LingyaoRuntime as L, type MemorySyncPayload as M, type NotifyPayload as N, type PairingCode as P, type QueuedMessage as Q, type SyncRequest as S, type TokenRefreshRequest as T, type WebSocketConnection as W, type LingyaoAccountConfig as a, type DeviceToken as b, type SyncResponse as c, type LingyaoMessage as d, type LingyaoConfig as e, type AckRequest as f, type DiarySyncPayload as g, LINGYAO_SERVER_URL as h, type LingyaoAccount as i, MessageType as j, type NotifyAction as k, type NotifyRequest as l, type PairingConfirmRequest as m, type PairingConfirmResponse as n, type PollRequest as o, type PollResponse as p, type TokenRefreshResponse as q };
|
package/dist/cli.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { PluginRuntime, ChannelPlugin } from 'openclaw/plugin-sdk';
|
|
2
|
+
import { a as LingyaoAccountConfig, L as LingyaoRuntime, D as DeviceInfo, b as DeviceToken, A as AccountManager, S as SyncRequest, c as SyncResponse, d as LingyaoMessage, e as LingyaoConfig, N as NotifyPayload, H as HealthStatus } from './accounts-B9ijYIIu.js';
|
|
3
|
+
export { f as AckRequest, g as DiarySyncPayload, F as FailedEntry, h as LINGYAO_SERVER_URL, i as LingyaoAccount, M as MemorySyncPayload, j as MessageType, k as NotifyAction, l as NotifyRequest, P as PairingCode, m as PairingConfirmRequest, n as PairingConfirmResponse, o as PollRequest, p as PollResponse, Q as QueuedMessage, T as TokenRefreshRequest, q as TokenRefreshResponse, W as WebSocketConnection } from './accounts-B9ijYIIu.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Config Adapter - Account resolution, config validation
|
|
7
|
+
*
|
|
8
|
+
* serverUrl is NOT exposed to users — hardcoded as LINGYAO_SERVER_URL.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Resolved account after config resolution.
|
|
13
|
+
*/
|
|
14
|
+
interface ResolvedAccount {
|
|
15
|
+
readonly id: string;
|
|
16
|
+
readonly accountId?: string | null;
|
|
17
|
+
readonly enabled: boolean;
|
|
18
|
+
readonly dmPolicy: 'paired' | 'open' | 'deny';
|
|
19
|
+
readonly allowFrom: string[];
|
|
20
|
+
readonly gatewayId?: string;
|
|
21
|
+
readonly rawConfig: LingyaoAccountConfig;
|
|
22
|
+
}
|
|
5
23
|
|
|
6
24
|
/**
|
|
7
25
|
* 错误处理模块
|
|
@@ -965,15 +983,8 @@ declare function validateConfig(config: unknown): LingyaoConfig;
|
|
|
965
983
|
*/
|
|
966
984
|
declare function getDefaultConfig(): LingyaoConfig;
|
|
967
985
|
|
|
968
|
-
declare const
|
|
969
|
-
|
|
970
|
-
name: string;
|
|
971
|
-
description: string;
|
|
972
|
-
configSchema: openclaw_plugin_sdk.OpenClawPluginConfigSchema;
|
|
973
|
-
register: NonNullable<openclaw_plugin_sdk_core.OpenClawPluginDefinition["register"]>;
|
|
974
|
-
} & Pick<openclaw_plugin_sdk_core.OpenClawPluginDefinition, "kind">;
|
|
975
|
-
declare const register: (api: openclaw_plugin_sdk.OpenClawPluginApi) => void | Promise<void>;
|
|
976
|
-
|
|
986
|
+
declare const lingyaoPlugin: ChannelPlugin<ResolvedAccount>;
|
|
987
|
+
declare function initializeLingyaoRuntime(runtime: PluginRuntime): void;
|
|
977
988
|
/** @deprecated Use the default export (OpenClaw SDK entry) instead. */
|
|
978
989
|
declare function createPlugin(runtime: LingyaoRuntime, config?: Partial<LingyaoConfig>): Promise<LingyaoChannel>;
|
|
979
990
|
/** @deprecated Use openclaw.plugin.json for plugin metadata. */
|
|
@@ -991,4 +1002,16 @@ declare const pluginMetadata: {
|
|
|
991
1002
|
defaultConfig: LingyaoConfig;
|
|
992
1003
|
};
|
|
993
1004
|
|
|
994
|
-
|
|
1005
|
+
declare const plugin: {
|
|
1006
|
+
id: string;
|
|
1007
|
+
name: string;
|
|
1008
|
+
description: string;
|
|
1009
|
+
register(api: {
|
|
1010
|
+
runtime?: unknown;
|
|
1011
|
+
registerChannel: (params: {
|
|
1012
|
+
plugin: unknown;
|
|
1013
|
+
}) => void;
|
|
1014
|
+
}): void;
|
|
1015
|
+
};
|
|
1016
|
+
|
|
1017
|
+
export { type AgentMessage, DeviceInfo, DeviceToken, HealthStatus, LingyaoAccountConfig, LingyaoChannel, LingyaoConfig, LingyaoMessage, LingyaoRuntime, NotifyPayload, SyncRequest, SyncResponse, createPlugin, plugin as default, getDefaultConfig, initializeLingyaoRuntime, lingyaoPlugin, pluginMetadata, validateConfig };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
// src/
|
|
2
|
-
import {
|
|
3
|
-
defineChannelPluginEntry,
|
|
4
|
-
createChatChannelPlugin
|
|
5
|
-
} from "openclaw/plugin-sdk/core";
|
|
1
|
+
// src/api.ts
|
|
2
|
+
import { createChatChannelPlugin } from "openclaw/plugin-sdk/core";
|
|
6
3
|
|
|
7
4
|
// src/runtime.ts
|
|
8
5
|
import { readFileSync, writeFileSync, mkdirSync, existsSync, unlinkSync } from "fs";
|
|
@@ -3458,7 +3455,7 @@ function getDefaultConfig() {
|
|
|
3458
3455
|
};
|
|
3459
3456
|
}
|
|
3460
3457
|
|
|
3461
|
-
// src/
|
|
3458
|
+
// src/api.ts
|
|
3462
3459
|
var orchestrator = null;
|
|
3463
3460
|
function getOrchestrator() {
|
|
3464
3461
|
return orchestrator;
|
|
@@ -3469,7 +3466,6 @@ var messagingAdapter = createMessagingAdapter();
|
|
|
3469
3466
|
var gatewayAdapter = createGatewayAdapter(getOrchestrator);
|
|
3470
3467
|
var directoryAdapter = createDirectoryAdapter(getOrchestrator);
|
|
3471
3468
|
var outboundAdapter = createOutboundAdapter(getOrchestrator);
|
|
3472
|
-
var statusAdapter = null;
|
|
3473
3469
|
var securityOptions = {
|
|
3474
3470
|
dm: {
|
|
3475
3471
|
channelKey: "lingyao",
|
|
@@ -3523,8 +3519,8 @@ var meta = {
|
|
|
3523
3519
|
order: 50,
|
|
3524
3520
|
aliases: ["lingyao", "\u7075\u723B"]
|
|
3525
3521
|
};
|
|
3526
|
-
|
|
3527
|
-
|
|
3522
|
+
var lingyaoPlugin = {
|
|
3523
|
+
...createChatChannelPlugin({
|
|
3528
3524
|
base: {
|
|
3529
3525
|
id: "lingyao",
|
|
3530
3526
|
meta,
|
|
@@ -3535,31 +3531,18 @@ function buildPlugin() {
|
|
|
3535
3531
|
security: securityOptions,
|
|
3536
3532
|
pairing: pairingOptions,
|
|
3537
3533
|
outbound: outboundAdapter
|
|
3538
|
-
})
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3534
|
+
}),
|
|
3535
|
+
gateway: gatewayAdapter,
|
|
3536
|
+
status: void 0,
|
|
3537
|
+
directory: directoryAdapter,
|
|
3538
|
+
messaging: messagingAdapter
|
|
3539
|
+
};
|
|
3540
|
+
function initializeLingyaoRuntime(runtime) {
|
|
3541
|
+
const adapted = adaptPluginRuntime(runtime);
|
|
3542
|
+
setRuntime(adapted);
|
|
3543
|
+
orchestrator = new MultiAccountOrchestrator(adapted);
|
|
3544
|
+
lingyaoPlugin.status = createStatusAdapter(getOrchestrator, adapted);
|
|
3546
3545
|
}
|
|
3547
|
-
var plugin = buildPlugin();
|
|
3548
|
-
var entry = defineChannelPluginEntry({
|
|
3549
|
-
id: "lingyao",
|
|
3550
|
-
name: "Lingyao",
|
|
3551
|
-
description: "Lingyao Channel Plugin - bidirectional sync via lingyao.live server relay",
|
|
3552
|
-
plugin,
|
|
3553
|
-
setRuntime(runtime) {
|
|
3554
|
-
const adapted = adaptPluginRuntime(runtime);
|
|
3555
|
-
setRuntime(adapted);
|
|
3556
|
-
orchestrator = new MultiAccountOrchestrator(adapted);
|
|
3557
|
-
statusAdapter = createStatusAdapter(getOrchestrator, adapted);
|
|
3558
|
-
plugin.status = statusAdapter;
|
|
3559
|
-
}
|
|
3560
|
-
});
|
|
3561
|
-
var register = entry.register;
|
|
3562
|
-
var index_default = entry;
|
|
3563
3546
|
async function createPlugin(runtime, config = {}) {
|
|
3564
3547
|
const fullConfig = { ...getDefaultConfig(), ...config };
|
|
3565
3548
|
const validatedConfig = validateConfig(fullConfig);
|
|
@@ -3569,7 +3552,7 @@ async function createPlugin(runtime, config = {}) {
|
|
|
3569
3552
|
}
|
|
3570
3553
|
var pluginMetadata = {
|
|
3571
3554
|
name: "lingyao",
|
|
3572
|
-
version: "0.
|
|
3555
|
+
version: "0.9.1",
|
|
3573
3556
|
description: "Lingyao Channel Plugin - bidirectional sync via lingyao.live server relay",
|
|
3574
3557
|
type: "channel",
|
|
3575
3558
|
capabilities: {
|
|
@@ -3580,6 +3563,25 @@ var pluginMetadata = {
|
|
|
3580
3563
|
},
|
|
3581
3564
|
defaultConfig: getDefaultConfig()
|
|
3582
3565
|
};
|
|
3566
|
+
|
|
3567
|
+
// src/runtime-api.ts
|
|
3568
|
+
function setLingyaoRuntime(runtime) {
|
|
3569
|
+
initializeLingyaoRuntime(runtime);
|
|
3570
|
+
}
|
|
3571
|
+
|
|
3572
|
+
// src/index.ts
|
|
3573
|
+
var plugin = {
|
|
3574
|
+
id: "lingyao",
|
|
3575
|
+
name: "Lingyao",
|
|
3576
|
+
description: "Lingyao Channel Plugin - bidirectional sync via lingyao.live server relay",
|
|
3577
|
+
register(api) {
|
|
3578
|
+
if (api.runtime) {
|
|
3579
|
+
setLingyaoRuntime(api.runtime);
|
|
3580
|
+
}
|
|
3581
|
+
api.registerChannel({ plugin: lingyaoPlugin });
|
|
3582
|
+
}
|
|
3583
|
+
};
|
|
3584
|
+
var index_default = plugin;
|
|
3583
3585
|
export {
|
|
3584
3586
|
LINGYAO_SERVER_URL,
|
|
3585
3587
|
LingyaoChannel,
|
|
@@ -3587,8 +3589,9 @@ export {
|
|
|
3587
3589
|
createPlugin,
|
|
3588
3590
|
index_default as default,
|
|
3589
3591
|
getDefaultConfig,
|
|
3592
|
+
initializeLingyaoRuntime,
|
|
3593
|
+
lingyaoPlugin,
|
|
3590
3594
|
pluginMetadata,
|
|
3591
|
-
register,
|
|
3592
3595
|
validateConfig
|
|
3593
3596
|
};
|
|
3594
3597
|
//# sourceMappingURL=index.js.map
|