@moxxy/plugin-channel-signal 0.41.3 → 0.42.1
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/pair-flow.d.ts +2 -1
- package/dist/pair-flow.d.ts.map +1 -1
- package/dist/pair-flow.js +10 -21
- package/dist/pair-flow.js.map +1 -1
- package/package.json +7 -7
- package/src/channel/voice.test.ts +2 -1
- package/src/pair-flow.ts +10 -25
- package/src/sidecar.test.ts +3 -2
- package/src/subcommands.test.ts +2 -1
package/dist/pair-flow.d.ts
CHANGED
|
@@ -13,7 +13,8 @@ import { type ChannelSubcommandContext } from '@moxxy/sdk';
|
|
|
13
13
|
* 4. Render that URI as a scannable QR (+ the raw URI).
|
|
14
14
|
* 5. On the phone: Signal → Settings → Linked Devices → Link New Device →
|
|
15
15
|
* scan; the channel stores the account and boots the daemon.
|
|
16
|
-
* 6.
|
|
16
|
+
* 6. Stop the pairing channel (it ran on the provider-less probe session) and
|
|
17
|
+
* start it for real with the configured model (`finishPairing`).
|
|
17
18
|
*/
|
|
18
19
|
export declare function runSignalPairFlow(ctx: ChannelSubcommandContext, overrides?: {
|
|
19
20
|
readonly allowedTools?: ReadonlyArray<string>;
|
package/dist/pair-flow.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pair-flow.d.ts","sourceRoot":"","sources":["../src/pair-flow.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"pair-flow.d.ts","sourceRoot":"","sources":["../src/pair-flow.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAQ1E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,wBAAwB,EAC7B,SAAS,GAAE;IAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CAAO,GAChE,OAAO,CAAC,MAAM,CAAC,CAkFjB"}
|
package/dist/pair-flow.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { log, outro, spinner } from '@clack/prompts';
|
|
2
2
|
import QRCode from 'qrcode';
|
|
3
|
-
import {
|
|
3
|
+
import { finishPairing } from '@moxxy/sdk';
|
|
4
4
|
import { SignalChannel } from './channel.js';
|
|
5
5
|
// Tiny zero-dep ANSI dim helper, so this flow stays inside the plugin.
|
|
6
6
|
const ANSI = process.stdout.isTTY && !process.env.NO_COLOR;
|
|
@@ -19,10 +19,12 @@ const dim = (s) => (ANSI ? `\x1b[2m${s}\x1b[22m` : s);
|
|
|
19
19
|
* 4. Render that URI as a scannable QR (+ the raw URI).
|
|
20
20
|
* 5. On the phone: Signal → Settings → Linked Devices → Link New Device →
|
|
21
21
|
* scan; the channel stores the account and boots the daemon.
|
|
22
|
-
* 6.
|
|
22
|
+
* 6. Stop the pairing channel (it ran on the provider-less probe session) and
|
|
23
|
+
* start it for real with the configured model (`finishPairing`).
|
|
23
24
|
*/
|
|
24
25
|
export async function runSignalPairFlow(ctx, overrides = {}) {
|
|
25
26
|
const session = ctx.session;
|
|
27
|
+
const startOptions = overrides.allowedTools ? { allowedTools: overrides.allowedTools } : undefined;
|
|
26
28
|
const channel = new SignalChannel({
|
|
27
29
|
vault: ctx.deps.vault,
|
|
28
30
|
...(typeof ctx.deps.options?.['account'] === 'string'
|
|
@@ -57,14 +59,7 @@ export async function runSignalPairFlow(ctx, overrides = {}) {
|
|
|
57
59
|
log.info('This machine is already linked to a Signal account. The channel is running; ' +
|
|
58
60
|
'to link a different account, remove this device from Signal → Linked Devices first, ' +
|
|
59
61
|
'then run `moxxy channels signal unpair` and pair again.');
|
|
60
|
-
|
|
61
|
-
await stopChannel();
|
|
62
|
-
return 0;
|
|
63
|
-
}
|
|
64
|
-
log.info('Press Ctrl+C to stop.');
|
|
65
|
-
installSignalHandlers(stopChannel, session);
|
|
66
|
-
await handle.running;
|
|
67
|
-
return 0;
|
|
62
|
+
return finishPairing(ctx, stopChannel, startOptions);
|
|
68
63
|
}
|
|
69
64
|
const uri = channel.requestUrl;
|
|
70
65
|
if (!uri) {
|
|
@@ -91,17 +86,11 @@ export async function runSignalPairFlow(ctx, overrides = {}) {
|
|
|
91
86
|
return 1;
|
|
92
87
|
}
|
|
93
88
|
spin.stop(`Linked ✓ — this machine is now a device of ${account}.`);
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
await stopChannel();
|
|
100
|
-
return 0;
|
|
101
|
-
}
|
|
102
|
-
log.info('Message your own "Note to Self" in Signal to talk to moxxy. The channel is running; press Ctrl+C to stop.');
|
|
103
|
-
await handle.running;
|
|
104
|
-
return 0;
|
|
89
|
+
// Drop the pairing-only Ctrl+C handlers first: their `process.exit` would
|
|
90
|
+
// otherwise cut the real channel (or an orchestrator) short.
|
|
91
|
+
removeSignalHandlers();
|
|
92
|
+
log.info('Message your own "Note to Self" in Signal to talk to moxxy.');
|
|
93
|
+
return finishPairing(ctx, stopChannel, startOptions);
|
|
105
94
|
}
|
|
106
95
|
function installSignalHandlers(stopChannel, session) {
|
|
107
96
|
let stopping = false;
|
package/dist/pair-flow.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pair-flow.js","sourceRoot":"","sources":["../src/pair-flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"pair-flow.js","sourceRoot":"","sources":["../src/pair-flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAiC,MAAM,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AC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IACF,MAAM,QAAQ,GAAG,GAAS,EAAE,CAAC,KAAK,QAAQ,EAAE,CAAC;IAC7C,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACjC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAClC,OAAO,GAAG,EAAE;QACV,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC3C,OAAO,CAAC,cAAc,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC9C,CAAC,CAAC;AACJ,CAAC;AAED,uEAAuE;AACvE,KAAK,UAAU,WAAW,CAAC,GAAW;IACpC,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,IAAI,CAAC;QACH,EAAE,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACrE,CAAC;IAAC,MAAM,CAAC;QACP,EAAE,GAAG,EAAE,CAAC;IACV,CAAC;IACD,oCAAoC;IACpC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,eAAe,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC7D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moxxy/plugin-channel-signal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.1",
|
|
4
4
|
"description": "Signal messenger channel for moxxy via a signal-cli JSON-RPC sidecar. Links as a secondary Signal device (QR pairing), drives the Session from allow-listed senders (Note to Self by default), and replies with buffered chunked sends. Autonomous allow-list permission model.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"moxxy",
|
|
@@ -67,16 +67,16 @@
|
|
|
67
67
|
"@clack/prompts": "1.8.1",
|
|
68
68
|
"qrcode": "^1.5.4",
|
|
69
69
|
"zod": "^3.25.76",
|
|
70
|
-
"@moxxy/
|
|
71
|
-
"@moxxy/
|
|
72
|
-
"@moxxy/sdk": "0.
|
|
73
|
-
"@moxxy/
|
|
70
|
+
"@moxxy/plugin-vault": "0.42.1",
|
|
71
|
+
"@moxxy/core": "0.42.1",
|
|
72
|
+
"@moxxy/sdk": "0.42.1",
|
|
73
|
+
"@moxxy/channel-kit": "0.42.1"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@types/node": "^22.
|
|
76
|
+
"@types/node": "^22.20.5",
|
|
77
77
|
"@types/qrcode": "^1.5.5",
|
|
78
78
|
"typescript": "^6.0.3",
|
|
79
|
-
"vitest": "^
|
|
79
|
+
"vitest": "^5.0.3",
|
|
80
80
|
"@moxxy/tsconfig": "0.0.0",
|
|
81
81
|
"@moxxy/vitest-preset": "0.0.0"
|
|
82
82
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as path from 'node:path';
|
|
1
2
|
import { describe, expect, it, vi } from 'vitest';
|
|
2
3
|
import type { ClientSession as Session } from '@moxxy/sdk';
|
|
3
4
|
import { MAX_AUDIO_BYTES, pickAudioAttachment, transcribeVoiceAttachment } from './voice.js';
|
|
@@ -123,7 +124,7 @@ describe('transcribeVoiceAttachment', () => {
|
|
|
123
124
|
attachmentsDir: '/data/attachments',
|
|
124
125
|
reply: r.reply,
|
|
125
126
|
readFile: async (p) => {
|
|
126
|
-
expect(p).toBe('/data/attachments
|
|
127
|
+
expect(p).toBe(path.join('/data/attachments', '12345.opus'));
|
|
127
128
|
return new Uint8Array([1, 2, 3]);
|
|
128
129
|
},
|
|
129
130
|
},
|
package/src/pair-flow.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { log, outro, spinner } from '@clack/prompts';
|
|
2
2
|
import QRCode from 'qrcode';
|
|
3
|
-
import {
|
|
3
|
+
import { finishPairing, type ChannelSubcommandContext } from '@moxxy/sdk';
|
|
4
4
|
import type { VaultStore } from '@moxxy/plugin-vault';
|
|
5
5
|
import { SignalChannel } from './channel.js';
|
|
6
6
|
|
|
@@ -22,13 +22,15 @@ const dim = (s: string): string => (ANSI ? `\x1b[2m${s}\x1b[22m` : s);
|
|
|
22
22
|
* 4. Render that URI as a scannable QR (+ the raw URI).
|
|
23
23
|
* 5. On the phone: Signal → Settings → Linked Devices → Link New Device →
|
|
24
24
|
* scan; the channel stores the account and boots the daemon.
|
|
25
|
-
* 6.
|
|
25
|
+
* 6. Stop the pairing channel (it ran on the provider-less probe session) and
|
|
26
|
+
* start it for real with the configured model (`finishPairing`).
|
|
26
27
|
*/
|
|
27
28
|
export async function runSignalPairFlow(
|
|
28
29
|
ctx: ChannelSubcommandContext,
|
|
29
30
|
overrides: { readonly allowedTools?: ReadonlyArray<string> } = {},
|
|
30
31
|
): Promise<number> {
|
|
31
32
|
const session = ctx.session;
|
|
33
|
+
const startOptions = overrides.allowedTools ? { allowedTools: overrides.allowedTools } : undefined;
|
|
32
34
|
const channel = new SignalChannel({
|
|
33
35
|
vault: ctx.deps.vault as VaultStore,
|
|
34
36
|
...(typeof ctx.deps.options?.['account'] === 'string'
|
|
@@ -69,14 +71,7 @@ export async function runSignalPairFlow(
|
|
|
69
71
|
'to link a different account, remove this device from Signal → Linked Devices first, ' +
|
|
70
72
|
'then run `moxxy channels signal unpair` and pair again.',
|
|
71
73
|
);
|
|
72
|
-
|
|
73
|
-
await stopChannel();
|
|
74
|
-
return 0;
|
|
75
|
-
}
|
|
76
|
-
log.info('Press Ctrl+C to stop.');
|
|
77
|
-
installSignalHandlers(stopChannel, session);
|
|
78
|
-
await handle.running;
|
|
79
|
-
return 0;
|
|
74
|
+
return finishPairing(ctx, stopChannel, startOptions);
|
|
80
75
|
}
|
|
81
76
|
|
|
82
77
|
const uri = channel.requestUrl;
|
|
@@ -110,21 +105,11 @@ export async function runSignalPairFlow(
|
|
|
110
105
|
}
|
|
111
106
|
spin.stop(`Linked ✓ — this machine is now a device of ${account}.`);
|
|
112
107
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
await stopChannel();
|
|
119
|
-
return 0;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
log.info(
|
|
123
|
-
'Message your own "Note to Self" in Signal to talk to moxxy. The channel is running; press Ctrl+C to stop.',
|
|
124
|
-
);
|
|
125
|
-
|
|
126
|
-
await handle.running;
|
|
127
|
-
return 0;
|
|
108
|
+
// Drop the pairing-only Ctrl+C handlers first: their `process.exit` would
|
|
109
|
+
// otherwise cut the real channel (or an orchestrator) short.
|
|
110
|
+
removeSignalHandlers();
|
|
111
|
+
log.info('Message your own "Note to Self" in Signal to talk to moxxy.');
|
|
112
|
+
return finishPairing(ctx, stopChannel, startOptions);
|
|
128
113
|
}
|
|
129
114
|
|
|
130
115
|
function installSignalHandlers(
|
package/src/sidecar.test.ts
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
startLinkProcess,
|
|
15
15
|
type SpawnedProcess,
|
|
16
16
|
} from './sidecar.js';
|
|
17
|
+
import { removeDirSync } from '@moxxy/vitest-preset/fs';
|
|
17
18
|
|
|
18
19
|
class FakeChild extends EventEmitter {
|
|
19
20
|
pid = 4242;
|
|
@@ -249,7 +250,7 @@ describe('findSignalCliOnPath', () => {
|
|
|
249
250
|
expect(findSignalCliOnPath({ PATH: undefined as unknown as string })).toBeNull();
|
|
250
251
|
expect(findSignalCliOnPath({})).toBeNull();
|
|
251
252
|
} finally {
|
|
252
|
-
|
|
253
|
+
removeDirSync(tmp);
|
|
253
254
|
}
|
|
254
255
|
});
|
|
255
256
|
|
|
@@ -260,7 +261,7 @@ describe('findSignalCliOnPath', () => {
|
|
|
260
261
|
fs.writeFileSync(bin, '#!/bin/sh\n', { mode: 0o755 });
|
|
261
262
|
expect(findSignalCliOnPath({ PATH: `/nonexistent${path.delimiter}${tmp}` })).toBe(bin);
|
|
262
263
|
} finally {
|
|
263
|
-
|
|
264
|
+
removeDirSync(tmp);
|
|
264
265
|
}
|
|
265
266
|
});
|
|
266
267
|
});
|
package/src/subcommands.test.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { VaultStore, createStaticKeySource, deriveKey, generateSalt } from '@mox
|
|
|
7
7
|
import type { ChannelDef } from '@moxxy/sdk';
|
|
8
8
|
import { buildSignalPlugin } from './index.js';
|
|
9
9
|
import { SIGNAL_ACCOUNT_KEY, SIGNAL_ALLOWED_SENDERS_KEY } from './keys.js';
|
|
10
|
+
import { removeDir } from '@moxxy/vitest-preset/fs';
|
|
10
11
|
|
|
11
12
|
let tmp: string;
|
|
12
13
|
let vault: VaultStore;
|
|
@@ -45,7 +46,7 @@ afterEach(async () => {
|
|
|
45
46
|
process.stdout.write = origStdoutWrite;
|
|
46
47
|
process.stderr.write = origStderrWrite;
|
|
47
48
|
vi.unstubAllEnvs();
|
|
48
|
-
await
|
|
49
|
+
await removeDir(tmp);
|
|
49
50
|
});
|
|
50
51
|
|
|
51
52
|
function ctx(
|