mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-17 12:20:46 +08:00
feat: secure Telegram access and connect AI Office
This commit is contained in:
parent
e3ae772106
commit
b0606159e0
30 changed files with 2045 additions and 302 deletions
10
plugin-src/host/channels/office/index.mjs
Normal file
10
plugin-src/host/channels/office/index.mjs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { createProductionController } from './production.mjs';
|
||||
import { installOfficeRpc } from './rpc.mjs';
|
||||
|
||||
export async function apply(ctx, config = {}) {
|
||||
if (config.controller) return installOfficeRpc(ctx, config.controller, config.rpcAuthority);
|
||||
const production = await createProductionController(ctx, config, config.internals ?? {});
|
||||
const dispose = installOfficeRpc(ctx, production.controller, config.rpcAuthority);
|
||||
ctx.effect(() => async () => production.close(), 'dsh-im: close AI Office connector');
|
||||
return dispose;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue