@ftai/ftai-plugin-ft-bot 0.0.0-stage → 0.4.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/lib/runner.js ADDED
@@ -0,0 +1,143 @@
1
+ import { spawn } from 'node:child_process';
2
+ import { createInterface } from 'node:readline';
3
+ import { PROTOCOL } from "./download.js";
4
+ export function launchRunner(executable, state, request, onConnection = () => { }, chats) {
5
+ const child = spawn(executable, ['--state-dir', state, 'plugin'], {
6
+ stdio: ['pipe', 'pipe', 'pipe'], windowsHide: true,
7
+ });
8
+ // Credentials go over stdin, never argv, logs or the renderer's persisted preferences.
9
+ child.stdin.on('error', () => { });
10
+ child.stdin.write(`${JSON.stringify(request)}\n`);
11
+ if (request.type !== 'run')
12
+ child.stdin.end();
13
+ child.stderr.resume();
14
+ let value;
15
+ let received = false;
16
+ let failure;
17
+ let closing = false;
18
+ const active = new Map();
19
+ let stopping;
20
+ const stopChats = () => {
21
+ for (const abort of active.values())
22
+ abort.abort();
23
+ return stopping ??= Promise.resolve(chats?.stop()).finally(() => { stopping = undefined; });
24
+ };
25
+ const chatRequest = async (id, action) => {
26
+ const abort = new AbortController();
27
+ if (active.has(id))
28
+ throw new Error('Duplicate chat request.');
29
+ active.set(id, abort);
30
+ let result;
31
+ try {
32
+ if (stopping)
33
+ await stopping;
34
+ abort.signal.throwIfAborted();
35
+ if (closing)
36
+ throw new Error('The plugin is stopping.');
37
+ if (!chats)
38
+ throw new Error('Local chats require FtAi Desktop with plugin contract 2.1.');
39
+ result = await chats.request(id, action, abort.signal);
40
+ }
41
+ catch (error) {
42
+ result = { error: error.message,
43
+ outcome_unknown: action.type === 'create' || (action.type === 'resume' && action.prompt !== null),
44
+ message_id: action.type === 'create' || (action.type === 'resume' && action.prompt !== null) ? `ft-bot-${id}` : null,
45
+ session_id: action.type === 'create' ? `session-ft-bot-${id}` : 'session_id' in action ? action.session_id : null };
46
+ }
47
+ finally {
48
+ active.delete(id);
49
+ }
50
+ let line = JSON.stringify({ type: 'chat_result', id, result });
51
+ if (Buffer.byteLength(line) > 1024 * 1024 - 1) {
52
+ line = JSON.stringify({ type: 'chat_result', id, result: { error: 'Local chat response exceeds the transport limit.' } });
53
+ }
54
+ if (!child.stdin.destroyed && !child.stdin.writableEnded)
55
+ child.stdin.write(`${line}\n`);
56
+ };
57
+ const lines = createInterface({ input: child.stdout });
58
+ let outputBytes = 0;
59
+ child.stdout.on('data', (chunk) => {
60
+ outputBytes += chunk.length;
61
+ if (outputBytes > 1024 * 1024) {
62
+ failure = new Error('Runner output limit exceeded.');
63
+ child.kill();
64
+ }
65
+ });
66
+ lines.on('line', line => {
67
+ try {
68
+ const message = JSON.parse(line);
69
+ outputBytes = 0;
70
+ if (message.type === 'connection' && ['connecting', 'connected', 'reconnecting'].includes(message.status)) {
71
+ outputBytes = 0;
72
+ onConnection(message.status);
73
+ }
74
+ else if (message.type === 'chat_request' && request.type === 'run' && typeof message.id === 'string' && message.action) {
75
+ void chatRequest(message.id, message.action).catch(() => { child.stdin.end(); });
76
+ }
77
+ else if (message.type === 'chat_cancel' && typeof message.id === 'string') {
78
+ active.get(message.id)?.abort();
79
+ }
80
+ else if (message.type === 'chat_stop') {
81
+ void stopChats().catch(error => { failure = error; child.stdin.end(); });
82
+ }
83
+ else if (message.type === 'result') {
84
+ received = true;
85
+ value = message.value;
86
+ }
87
+ else if (message.type === 'error' && typeof message.message === 'string') {
88
+ failure = new Error(message.message);
89
+ child.stdin.end();
90
+ }
91
+ else
92
+ throw new Error('Invalid runner response.');
93
+ }
94
+ catch {
95
+ failure = new Error('Invalid runner response. Download the current runner from the gateway.');
96
+ child.stdin.end();
97
+ }
98
+ });
99
+ let forceStop;
100
+ const done = new Promise((resolve, reject) => {
101
+ child.on('error', error => { failure = error; });
102
+ child.on('close', async (code) => {
103
+ clearTimeout(forceStop);
104
+ lines.close();
105
+ closing = true;
106
+ try {
107
+ await stopChats();
108
+ }
109
+ catch (error) {
110
+ failure ??= error;
111
+ }
112
+ if (failure)
113
+ reject(failure);
114
+ else if (code !== 0 || !received)
115
+ reject(new Error('Runner exited unexpectedly. Download the current runner from the gateway.'));
116
+ else
117
+ resolve(value);
118
+ });
119
+ });
120
+ // Attach a handler immediately: shutdown can race a caller awaiting a different operation.
121
+ void done.catch(() => { });
122
+ return {
123
+ done,
124
+ async stop() {
125
+ closing = true;
126
+ void stopChats().catch(error => { failure ??= error; });
127
+ child.stdin.end();
128
+ forceStop ??= setTimeout(() => child.kill('SIGKILL'), 20_000);
129
+ await done.catch(() => { });
130
+ clearTimeout(forceStop);
131
+ },
132
+ };
133
+ }
134
+ export function computerStatus(value) {
135
+ const status = value;
136
+ if (!status || status.bridge !== 3 || status.protocol !== PROTOCOL || typeof status.platform !== 'string'
137
+ || typeof status.arch !== 'string' || !(status.device_id === null || typeof status.device_id === 'string')
138
+ || !(status.server === null || typeof status.server === 'string') || !status.desktop || typeof status.desktop !== 'object') {
139
+ throw new Error('The runner does not support this plugin. Download the current runner from the gateway.');
140
+ }
141
+ return status;
142
+ }
143
+ //# sourceMappingURL=runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner.js","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAOxC,MAAM,UAAU,YAAY,CAAC,UAAkB,EAAE,KAAa,EAAE,OAAsB,EACpF,eAA6C,GAAG,EAAE,GAAE,CAAC,EAAE,KAAgB;IACvE,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC,aAAa,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE;QAChE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,EAAE,IAAI;KACnD,CAAC,CAAA;I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SAAS,CAAC,EAAE,MAAM,CAAC,CAAA;YAC7D,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;YAC1B,YAAY,CAAC,SAAS,CAAC,CAAA;QACzB,CAAC;KACF,CAAA;AACH,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,MAAM,MAAM,GAAG,KAAuB,CAAA;IACtC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ;WACpG,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,KAAK,IAAI,IAAI,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ,CAAC;WACvG,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QAC7H,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAA;IAC3G,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC"}
package/lib/types.d.ts ADDED
@@ -0,0 +1,27 @@
1
+ export declare const DEFAULT_GATEWAY = "https://ftai.chat/ft-bot/api";
2
+ export type Connection = 'stopped' | 'connecting' | 'connected' | 'reconnecting' | 'error';
3
+ export interface ComputerStatus {
4
+ bridge: number;
5
+ protocol: number;
6
+ platform: string;
7
+ arch: string;
8
+ server: string | null;
9
+ device_id: string | null;
10
+ desktop: Record<string, unknown>;
11
+ }
12
+ export interface PluginStatus {
13
+ server: string;
14
+ installed: boolean;
15
+ enabled: boolean;
16
+ busy: boolean;
17
+ connection: Connection;
18
+ computer: ComputerStatus | null;
19
+ error: string | null;
20
+ }
21
+ declare module '@ftai/plugin-sdk/host' {
22
+ interface RemoteErrorDetailsMap {
23
+ 'ft-bot/operation-failed': {
24
+ reason: string;
25
+ };
26
+ }
27
+ }
package/lib/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export const DEFAULT_GATEWAY = 'https://ftai.chat/ft-bot/api';
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,8BAA8B,CAAA"}
package/locale/en.json ADDED
@@ -0,0 +1 @@
1
+ { "meta": { "title": "Ft Bot", "description": "Local computer access for your WeCom bot." } }
@@ -0,0 +1 @@
1
+ { "meta": { "title": "Ft Bot", "description": "让企业微信中的机器人访问本地电脑。" } }
package/package.json CHANGED
@@ -1,6 +1,61 @@
1
1
  {
2
2
  "name": "@ftai/ftai-plugin-ft-bot",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.4.0",
4
+ "description": "Local computer access for Ft Bot.",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./lib/index.d.ts",
10
+ "default": "./lib/index.js"
11
+ },
12
+ "./types": {
13
+ "types": "./lib/types.d.ts",
14
+ "default": "./lib/types.js"
15
+ },
16
+ "./remote": {
17
+ "types": "./lib/remote.d.ts",
18
+ "default": "./lib/remote.js"
19
+ },
20
+ "./package.json": "./package.json"
21
+ },
22
+ "files": [
23
+ "lib",
24
+ "locale"
25
+ ],
26
+ "ftai": {
27
+ "contract": "^2.1.0",
28
+ "host": "./lib/index.js",
29
+ "client": {
30
+ "entry": "./lib/client.js",
31
+ "external": [
32
+ "@ftai/client-app",
33
+ "@ftai/client-react"
34
+ ]
35
+ }
36
+ },
37
+ "devDependencies": {
38
+ "@ftai/plugin-sdk": "2.0.0",
39
+ "@tabler/icons-react": "3.46.0",
40
+ "@types/node": "^22.0.0",
41
+ "@types/react": "18.3.31",
42
+ "@types/react-dom": "18.3.7",
43
+ "cordis": "4.0.0-rc.12",
44
+ "react": "18.3.1",
45
+ "react-dom": "18.3.1",
46
+ "typescript": "~6.0.3",
47
+ "vite": "^8.3.6",
48
+ "ws": "^8.22.2"
49
+ },
50
+ "engines": {
51
+ "node": ">=22.12"
52
+ },
53
+ "dependencies": {
54
+ "fflate": "^0.8.3"
55
+ },
56
+ "scripts": {
57
+ "build": "tsc -p tsconfig.json && ftai-plugin-remote && tsc -p tsconfig.client.json && vite build",
58
+ "test": "node --test tests/*.test.mjs",
59
+ "test:integration": "node --test tests/integration.mjs"
60
+ }
6
61
  }