@viraatdas/rudder 3.2.1 → 3.3.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/cloud.js +49 -2
- package/dist/cloud.js.map +1 -1
- package/dist/native/darwin-arm64/rudder-native +0 -0
- package/dist/native/darwin-x64/rudder-native +0 -0
- package/dist/native/linux-x64/rudder-native +0 -0
- package/dist/paste-bridge.d.ts +36 -0
- package/dist/paste-bridge.js +279 -0
- package/dist/paste-bridge.js.map +1 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const PASTE_UPLOAD_MAX_BYTES: number;
|
|
2
|
+
export type ClipboardContents = {
|
|
3
|
+
files: string[];
|
|
4
|
+
} | {
|
|
5
|
+
image: string;
|
|
6
|
+
} | null;
|
|
7
|
+
export type PasteBridgeOptions = {
|
|
8
|
+
send: (data: Buffer) => void;
|
|
9
|
+
/** Upload one local file, resolve to its path on the cloud machine. */
|
|
10
|
+
upload: (file: string, name: string) => Promise<string>;
|
|
11
|
+
readClipboard?: () => Promise<ClipboardContents>;
|
|
12
|
+
status?: (text: string | null) => void;
|
|
13
|
+
};
|
|
14
|
+
/** Ctrl+V, as a plain control byte or in the kitty keyboard encoding. */
|
|
15
|
+
export declare function isCtrlV(data: Buffer): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The local files a paste names, or null when it is anything else. Every
|
|
18
|
+
* token must be an existing regular file, so a pasted snippet that merely
|
|
19
|
+
* mentions a path is never rewritten. Handles what terminals produce for a
|
|
20
|
+
* drop: 'quoted', "quoted", backslash-escaped spaces, file:// urls.
|
|
21
|
+
*/
|
|
22
|
+
export declare function pastedLocalFiles(text: string, home?: string): string[] | null;
|
|
23
|
+
export declare class PasteBridge {
|
|
24
|
+
private readonly options;
|
|
25
|
+
/** Pass everything straight through (a target that cannot take uploads). */
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
private busy;
|
|
28
|
+
private pending;
|
|
29
|
+
constructor(options: PasteBridgeOptions);
|
|
30
|
+
/** Every keystroke chunk for the cloud goes through here, in order. */
|
|
31
|
+
forward(data: Buffer): void;
|
|
32
|
+
private jobFor;
|
|
33
|
+
private fromClipboard;
|
|
34
|
+
private uploadAll;
|
|
35
|
+
}
|
|
36
|
+
export declare function readLocalClipboard(): Promise<ClipboardContents>;
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
// Pasting files from this computer into a dashboard on the cloud machine.
|
|
2
|
+
//
|
|
3
|
+
// An agent on the home machine reads ITS clipboard and ITS disk: Claude Code's
|
|
4
|
+
// Ctrl+V runs xclip there (no clipboard, nothing pasted), and a screenshot
|
|
5
|
+
// dragged into the terminal arrives as a path like /Users/me/Desktop/shot.png
|
|
6
|
+
// that does not exist there. So the attach client looks at what is about to go
|
|
7
|
+
// up, and when it is a clipboard image (Ctrl+V) or a paste made only of local
|
|
8
|
+
// file paths, it uploads the files first (the phone's upload route, into the
|
|
9
|
+
// repo's .rudder/uploads) and sends the cloud paths as a paste instead. Claude
|
|
10
|
+
// Code and Codex both turn a pasted image path into an attached image; the
|
|
11
|
+
// dashboard's task box turns it into an [Image #N] chip.
|
|
12
|
+
//
|
|
13
|
+
// Everything else goes straight through, untouched and unbuffered.
|
|
14
|
+
import { execFile } from "node:child_process";
|
|
15
|
+
import fs from "node:fs";
|
|
16
|
+
import os from "node:os";
|
|
17
|
+
import path from "node:path";
|
|
18
|
+
export const PASTE_UPLOAD_MAX_BYTES = 25 * 1024 * 1024;
|
|
19
|
+
const PASTE_BEGIN = "\x1b[200~";
|
|
20
|
+
const PASTE_END = "\x1b[201~";
|
|
21
|
+
const MAX_FILES = 20;
|
|
22
|
+
/** Ctrl+V, as a plain control byte or in the kitty keyboard encoding. */
|
|
23
|
+
export function isCtrlV(data) {
|
|
24
|
+
if (data.length === 1 && data[0] === 0x16) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
return /^\x1b\[118(?::\d*)*;5(?::1)?u$/.test(data.toString("latin1"));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The local files a paste names, or null when it is anything else. Every
|
|
31
|
+
* token must be an existing regular file, so a pasted snippet that merely
|
|
32
|
+
* mentions a path is never rewritten. Handles what terminals produce for a
|
|
33
|
+
* drop: 'quoted', "quoted", backslash-escaped spaces, file:// urls.
|
|
34
|
+
*/
|
|
35
|
+
export function pastedLocalFiles(text, home = os.homedir()) {
|
|
36
|
+
const tokens = shellTokens(text.trim());
|
|
37
|
+
if (!tokens || tokens.length === 0 || tokens.length > MAX_FILES) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
const files = [];
|
|
41
|
+
for (let token of tokens) {
|
|
42
|
+
if (token.startsWith("file://")) {
|
|
43
|
+
try {
|
|
44
|
+
token = decodeURIComponent(new URL(token).pathname);
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (token.startsWith("~/")) {
|
|
51
|
+
token = path.join(home, token.slice(2));
|
|
52
|
+
}
|
|
53
|
+
if (!path.isAbsolute(token)) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
const stat = fs.statSync(token);
|
|
58
|
+
if (!stat.isFile() || stat.size === 0 || stat.size > PASTE_UPLOAD_MAX_BYTES) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
files.push(token);
|
|
66
|
+
}
|
|
67
|
+
return files;
|
|
68
|
+
}
|
|
69
|
+
function shellTokens(text) {
|
|
70
|
+
if (!text || /[\x00-\x08\x0b-\x1f\x7f]/.test(text)) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
const tokens = [];
|
|
74
|
+
let current = "";
|
|
75
|
+
let inToken = false;
|
|
76
|
+
let quote = null;
|
|
77
|
+
for (let i = 0; i < text.length; i += 1) {
|
|
78
|
+
const ch = text[i];
|
|
79
|
+
if (quote) {
|
|
80
|
+
if (ch === quote) {
|
|
81
|
+
quote = null;
|
|
82
|
+
}
|
|
83
|
+
else if (ch === "\\" && quote === "\"" && i + 1 < text.length) {
|
|
84
|
+
current += text[++i];
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
current += ch;
|
|
88
|
+
}
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
if (ch === "'" || ch === "\"") {
|
|
92
|
+
quote = ch;
|
|
93
|
+
inToken = true;
|
|
94
|
+
}
|
|
95
|
+
else if (ch === "\\" && i + 1 < text.length) {
|
|
96
|
+
current += text[++i];
|
|
97
|
+
inToken = true;
|
|
98
|
+
}
|
|
99
|
+
else if (/\s/.test(ch)) {
|
|
100
|
+
if (inToken) {
|
|
101
|
+
tokens.push(current);
|
|
102
|
+
}
|
|
103
|
+
current = "";
|
|
104
|
+
inToken = false;
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
current += ch;
|
|
108
|
+
inToken = true;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (quote) {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
if (inToken) {
|
|
115
|
+
tokens.push(current);
|
|
116
|
+
}
|
|
117
|
+
return tokens;
|
|
118
|
+
}
|
|
119
|
+
export class PasteBridge {
|
|
120
|
+
options;
|
|
121
|
+
/** Pass everything straight through (a target that cannot take uploads). */
|
|
122
|
+
disabled = false;
|
|
123
|
+
busy = false;
|
|
124
|
+
pending = [];
|
|
125
|
+
constructor(options) {
|
|
126
|
+
this.options = options;
|
|
127
|
+
}
|
|
128
|
+
/** Every keystroke chunk for the cloud goes through here, in order. */
|
|
129
|
+
forward(data) {
|
|
130
|
+
if (this.busy) {
|
|
131
|
+
this.pending.push(data);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const job = this.disabled ? null : this.jobFor(data);
|
|
135
|
+
if (!job) {
|
|
136
|
+
this.options.send(data);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
this.busy = true;
|
|
140
|
+
void job.then((replacement) => {
|
|
141
|
+
this.options.send(replacement ?? data);
|
|
142
|
+
}).catch((error) => {
|
|
143
|
+
this.options.send(data);
|
|
144
|
+
this.options.status?.(`Could not send that file to the cloud: ${error.message}`);
|
|
145
|
+
setTimeout(() => this.options.status?.(null), 4000).unref?.();
|
|
146
|
+
}).finally(() => {
|
|
147
|
+
this.busy = false;
|
|
148
|
+
const queued = this.pending;
|
|
149
|
+
this.pending = [];
|
|
150
|
+
for (const chunk of queued) {
|
|
151
|
+
this.forward(chunk);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
jobFor(data) {
|
|
156
|
+
if (isCtrlV(data)) {
|
|
157
|
+
if (!this.options.readClipboard) {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
return this.fromClipboard();
|
|
161
|
+
}
|
|
162
|
+
const text = data.toString("utf8");
|
|
163
|
+
let inner = text;
|
|
164
|
+
let bracketed = false;
|
|
165
|
+
if (text.startsWith(PASTE_BEGIN) && text.endsWith(PASTE_END)) {
|
|
166
|
+
inner = text.slice(PASTE_BEGIN.length, text.length - PASTE_END.length);
|
|
167
|
+
bracketed = true;
|
|
168
|
+
}
|
|
169
|
+
else if (text.length < 4 || !/^['"~\/f]/.test(text)) {
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
const files = pastedLocalFiles(inner);
|
|
173
|
+
if (!files) {
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
const trailing = /\s$/.test(inner) ? " " : "";
|
|
177
|
+
return this.uploadAll(files).then((remote) => {
|
|
178
|
+
const body = remote.join(" ") + trailing;
|
|
179
|
+
return Buffer.from(bracketed ? PASTE_BEGIN + body + PASTE_END : body, "utf8");
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
async fromClipboard() {
|
|
183
|
+
const contents = await this.options.readClipboard().catch(() => null);
|
|
184
|
+
if (!contents) {
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
let remote;
|
|
188
|
+
if ("image" in contents) {
|
|
189
|
+
try {
|
|
190
|
+
remote = await this.uploadAll([contents.image], "image");
|
|
191
|
+
}
|
|
192
|
+
finally {
|
|
193
|
+
fs.rmSync(contents.image, { force: true });
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
remote = await this.uploadAll(contents.files);
|
|
198
|
+
}
|
|
199
|
+
return Buffer.from(PASTE_BEGIN + remote.join(" ") + PASTE_END, "utf8");
|
|
200
|
+
}
|
|
201
|
+
async uploadAll(files, kind = "file") {
|
|
202
|
+
const noun = kind === "image" ? "image" : files.length === 1 ? path.basename(files[0]) : `${files.length} files`;
|
|
203
|
+
this.options.status?.(`Sending ${noun} to the cloud...`);
|
|
204
|
+
try {
|
|
205
|
+
const remote = [];
|
|
206
|
+
for (const file of files) {
|
|
207
|
+
remote.push(await this.options.upload(file, kind === "image" ? "clipboard.png" : path.basename(file)));
|
|
208
|
+
}
|
|
209
|
+
return remote;
|
|
210
|
+
}
|
|
211
|
+
finally {
|
|
212
|
+
this.options.status?.(null);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
// The clipboard of THIS computer: files copied in Finder win, then an image
|
|
217
|
+
// (a screenshot, "Copy Image"), the same order Claude Code uses locally.
|
|
218
|
+
export async function readLocalClipboard() {
|
|
219
|
+
const out = path.join(os.tmpdir(), `rudder-clip-${process.pid}-${Date.now()}.png`);
|
|
220
|
+
if (process.platform === "darwin") {
|
|
221
|
+
const raw = await run("osascript", ["-l", "JavaScript", "-e", MAC_CLIPBOARD_SCRIPT, out]).catch(() => "");
|
|
222
|
+
try {
|
|
223
|
+
const parsed = JSON.parse(raw.trim() || "{}");
|
|
224
|
+
const files = (parsed.files ?? []).filter((file) => pastedLocalFiles(JSON.stringify(file)) !== null);
|
|
225
|
+
if (files.length) {
|
|
226
|
+
return { files };
|
|
227
|
+
}
|
|
228
|
+
if (parsed.image && fs.existsSync(parsed.image) && fs.statSync(parsed.image).size > 0) {
|
|
229
|
+
return { image: parsed.image };
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
catch {
|
|
233
|
+
// not JSON: no clipboard we can use
|
|
234
|
+
}
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
if (process.platform === "linux") {
|
|
238
|
+
for (const [cmd, args] of [["wl-paste", ["--type", "image/png"]], ["xclip", ["-selection", "clipboard", "-t", "image/png", "-o"]]]) {
|
|
239
|
+
const bytes = await runBytes(cmd, [...args]).catch(() => null);
|
|
240
|
+
if (bytes && bytes.length > 8 && bytes.subarray(1, 4).toString("latin1") === "PNG") {
|
|
241
|
+
fs.writeFileSync(out, bytes, { mode: 0o600 });
|
|
242
|
+
return { image: out };
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return null;
|
|
247
|
+
}
|
|
248
|
+
const MAC_CLIPBOARD_SCRIPT = `
|
|
249
|
+
ObjC.import('AppKit');
|
|
250
|
+
function run(argv) {
|
|
251
|
+
const pb = $.NSPasteboard.generalPasteboard;
|
|
252
|
+
const opts = $.NSDictionary.dictionaryWithObjectForKey($.NSNumber.numberWithBool(true), $.NSPasteboardURLReadingFileURLsOnlyKey);
|
|
253
|
+
const urls = pb.readObjectsForClassesOptions($.NSArray.arrayWithObject($.NSURL), opts);
|
|
254
|
+
const files = [];
|
|
255
|
+
if (urls && !urls.isNil()) {
|
|
256
|
+
for (let i = 0; i < urls.count; i++) files.push(urls.objectAtIndex(i).path.js);
|
|
257
|
+
}
|
|
258
|
+
if (files.length) return JSON.stringify({ files });
|
|
259
|
+
const types = ObjC.deepUnwrap(pb.types) || [];
|
|
260
|
+
const imageTypes = ['public.png', 'public.tiff', 'public.jpeg', 'com.apple.pict'];
|
|
261
|
+
if (!types.some((t) => imageTypes.includes(t))) return '{}';
|
|
262
|
+
const image = $.NSImage.alloc.initWithPasteboard(pb);
|
|
263
|
+
if (image.isNil()) return '{}';
|
|
264
|
+
const rep = $.NSBitmapImageRep.imageRepWithData(image.TIFFRepresentation);
|
|
265
|
+
const png = rep.representationUsingTypeProperties($.NSBitmapImageFileTypePNG, $({}));
|
|
266
|
+
if (!png.writeToFileAtomically(argv[0], true)) return '{}';
|
|
267
|
+
return JSON.stringify({ image: argv[0] });
|
|
268
|
+
}`;
|
|
269
|
+
function run(cmd, args) {
|
|
270
|
+
return new Promise((resolve, reject) => {
|
|
271
|
+
execFile(cmd, args, { timeout: 5000, maxBuffer: 1024 * 1024 }, (error, stdout) => (error ? reject(error) : resolve(String(stdout))));
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
function runBytes(cmd, args) {
|
|
275
|
+
return new Promise((resolve, reject) => {
|
|
276
|
+
execFile(cmd, args, { timeout: 5000, maxBuffer: PASTE_UPLOAD_MAX_BYTES, encoding: "buffer" }, (error, stdout) => (error ? reject(error) : resolve(stdout)));
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
//# sourceMappingURL=paste-bridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paste-bridge.js","sourceRoot":"","sources":["../src/paste-bridge.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,+EAA+E;AAC/E,2EAA2E;AAC3E,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,6EAA6E;AAC7E,+EAA+E;AAC/E,2EAA2E;AAC3E,yDAAyD;AACzD,EAAE;AACF,mEAAmE;AAEnE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,MAAM,sBAAsB,GAAG,EA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