@viraatdas/rudder 3.9.1 → 3.9.4
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/assets/skills/google-cloud/SKILL.md +70 -6
- package/assets/skills/google-cloud/scripts/gcp.mjs +9 -3
- package/assets/skills/namecheap/SKILL.md +130 -0
- package/assets/skills/namecheap/scripts/__pycache__/namecheapcpython-314.pyc +0 -0
- package/assets/skills/namecheap/scripts/namecheap +785 -0
- package/dist/agent-skills.d.ts +2 -0
- package/dist/agent-skills.js +18 -2
- package/dist/agent-skills.js.map +1 -1
- package/dist/attach-session.d.ts +8 -0
- package/dist/attach-session.js +28 -1
- package/dist/attach-session.js.map +1 -1
- package/dist/cloud.js +14 -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/terminal-theme.d.ts +21 -0
- package/dist/terminal-theme.js +64 -0
- package/dist/terminal-theme.js.map +1 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type TerminalColors = {
|
|
2
|
+
fg: string | null;
|
|
3
|
+
bg: string | null;
|
|
4
|
+
};
|
|
5
|
+
/** Ask the terminal for its colors and to report appearance changes. */
|
|
6
|
+
export declare const THEME_QUERY = "\u001B]10;?\u001B\\\u001B]11;?\u001B\\";
|
|
7
|
+
export declare const THEME_REPORTS_ON = "\u001B[?2031h";
|
|
8
|
+
export declare const THEME_REPORTS_OFF = "\u001B[?2031l";
|
|
9
|
+
export declare class TerminalThemeWatcher {
|
|
10
|
+
colors: TerminalColors;
|
|
11
|
+
private readonly ask;
|
|
12
|
+
private readonly changed;
|
|
13
|
+
constructor(ask: () => void, changed: (colors: TerminalColors) => void);
|
|
14
|
+
get known(): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Take color replies and appearance notices out of a chunk of input and
|
|
17
|
+
* return the keys that are left. Terminals answer in one write, so a reply
|
|
18
|
+
* split across chunks is not stitched; it passes through as keys.
|
|
19
|
+
*/
|
|
20
|
+
filter(data: Buffer): Buffer;
|
|
21
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// The laptop terminal's colors, for agents running on the cloud machine.
|
|
2
|
+
//
|
|
3
|
+
// opencode, Codex and Claude Code's auto theme pick light or dark by asking
|
|
4
|
+
// the terminal for its background (OSC 11) and, if they asked for mode 2031,
|
|
5
|
+
// hear when it changes (`CSI ? 997 ; 1|2 n`). On the cloud machine the
|
|
6
|
+
// terminal they ask is the dashboard's, which has no colors of its own, so they
|
|
7
|
+
// always came up dark. The attach client asks the REAL terminal, takes the
|
|
8
|
+
// answers out of the key stream, and reports them; the machine writes them
|
|
9
|
+
// where every dashboard there reads them and answers its agents from them.
|
|
10
|
+
/** Ask the terminal for its colors and to report appearance changes. */
|
|
11
|
+
export const THEME_QUERY = "\x1b]10;?\x1b\\\x1b]11;?\x1b\\";
|
|
12
|
+
export const THEME_REPORTS_ON = "\x1b[?2031h";
|
|
13
|
+
export const THEME_REPORTS_OFF = "\x1b[?2031l";
|
|
14
|
+
// `ESC ] 10|11 ; rgb:RRRR/GGGG/BBBB` ended by BEL or ST; 1 to 4 hex digits each.
|
|
15
|
+
const COLOR_REPLY = /\x1b\](1[01]);rgb:([0-9a-fA-F]{1,4})\/([0-9a-fA-F]{1,4})\/([0-9a-fA-F]{1,4})(?:\x07|\x1b\\)/g;
|
|
16
|
+
// The appearance changed (1 dark, 2 light): ask for the colors again.
|
|
17
|
+
const THEME_CHANGED = /\x1b\[\?997;[12]n/g;
|
|
18
|
+
function channel(hex) {
|
|
19
|
+
// Scale 1 to 4 hex digits to 8 bits, as xterm does.
|
|
20
|
+
const max = (1 << (hex.length * 4)) - 1;
|
|
21
|
+
return Math.round((parseInt(hex, 16) / max) * 255).toString(16).padStart(2, "0");
|
|
22
|
+
}
|
|
23
|
+
export class TerminalThemeWatcher {
|
|
24
|
+
colors = { fg: null, bg: null };
|
|
25
|
+
ask;
|
|
26
|
+
changed;
|
|
27
|
+
constructor(ask, changed) {
|
|
28
|
+
this.ask = ask;
|
|
29
|
+
this.changed = changed;
|
|
30
|
+
}
|
|
31
|
+
get known() {
|
|
32
|
+
return this.colors.bg !== null;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Take color replies and appearance notices out of a chunk of input and
|
|
36
|
+
* return the keys that are left. Terminals answer in one write, so a reply
|
|
37
|
+
* split across chunks is not stitched; it passes through as keys.
|
|
38
|
+
*/
|
|
39
|
+
filter(data) {
|
|
40
|
+
const text = data.toString("latin1");
|
|
41
|
+
if (!text.includes("\x1b]1") && !text.includes("\x1b[?997;")) {
|
|
42
|
+
return data;
|
|
43
|
+
}
|
|
44
|
+
const next = { ...this.colors };
|
|
45
|
+
let rest = text.replace(COLOR_REPLY, (_match, which, r, g, b) => {
|
|
46
|
+
next[which === "10" ? "fg" : "bg"] = `#${channel(r)}${channel(g)}${channel(b)}`;
|
|
47
|
+
return "";
|
|
48
|
+
});
|
|
49
|
+
let reask = false;
|
|
50
|
+
rest = rest.replace(THEME_CHANGED, () => {
|
|
51
|
+
reask = true;
|
|
52
|
+
return "";
|
|
53
|
+
});
|
|
54
|
+
if (next.fg !== this.colors.fg || next.bg !== this.colors.bg) {
|
|
55
|
+
this.colors = next;
|
|
56
|
+
this.changed(next);
|
|
57
|
+
}
|
|
58
|
+
if (reask) {
|
|
59
|
+
this.ask();
|
|
60
|
+
}
|
|
61
|
+
return rest.length === text.length ? data : Buffer.from(rest, "latin1");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=terminal-theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal-theme.js","sourceRoot":"","sources":["../src/terminal-theme.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,4EAA4E;AAC5E,6EAA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