@mduan/paseo-cli 0.11.0-fork.4 → 0.11.0-fork.5

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.
Files changed (25) hide show
  1. package/node_modules/@getpaseo/client/dist/daemon-client.d.ts +4 -0
  2. package/node_modules/@getpaseo/client/dist/daemon-client.js +1 -0
  3. package/node_modules/@getpaseo/client/package.json +3 -3
  4. package/node_modules/@getpaseo/highlight/package.json +1 -1
  5. package/node_modules/@getpaseo/plugin/package.json +3 -3
  6. package/node_modules/@getpaseo/protocol/dist/messages.d.ts +16 -0
  7. package/node_modules/@getpaseo/protocol/dist/messages.js +9 -0
  8. package/node_modules/@getpaseo/protocol/package.json +1 -1
  9. package/node_modules/@getpaseo/relay/package.json +1 -1
  10. package/node_modules/@getpaseo/server/dist/server/builtin-plugins/package.json +1 -1
  11. package/node_modules/@getpaseo/server/dist/server/terminal/terminal-manager.d.ts +2 -1
  12. package/node_modules/@getpaseo/server/dist/server/terminal/terminal-manager.js +1 -0
  13. package/node_modules/@getpaseo/server/dist/server/terminal/terminal-session-controller.js +1 -0
  14. package/node_modules/@getpaseo/server/dist/server/terminal/terminal-worker-protocol.d.ts +2 -1
  15. package/node_modules/@getpaseo/server/dist/server/terminal/terminal.d.ts +5 -0
  16. package/node_modules/@getpaseo/server/dist/server/terminal/terminal.js +21 -7
  17. package/node_modules/@getpaseo/server/dist/server/web-ui/_expo/static/js/web/{index-7d1ebd536b50ed8d734f6b88b86b8822.js → index-dcbfa9f4d3298e0528a0fe45fc8d33ab.js} +6 -6
  18. package/node_modules/@getpaseo/server/dist/server/web-ui/_expo/static/js/web/index-dcbfa9f4d3298e0528a0fe45fc8d33ab.js.br +0 -0
  19. package/node_modules/@getpaseo/server/dist/server/web-ui/_expo/static/js/web/{index-7d1ebd536b50ed8d734f6b88b86b8822.js.gz → index-dcbfa9f4d3298e0528a0fe45fc8d33ab.js.gz} +0 -0
  20. package/node_modules/@getpaseo/server/dist/server/web-ui/index.html +1 -1
  21. package/node_modules/@getpaseo/server/dist/server/web-ui/index.html.br +0 -0
  22. package/node_modules/@getpaseo/server/dist/server/web-ui/index.html.gz +0 -0
  23. package/node_modules/@getpaseo/server/package.json +6 -6
  24. package/package.json +7 -7
  25. package/node_modules/@getpaseo/server/dist/server/web-ui/_expo/static/js/web/index-7d1ebd536b50ed8d734f6b88b86b8822.js.br +0 -0
@@ -1257,6 +1257,10 @@ export declare class DaemonClient {
1257
1257
  rows: number;
1258
1258
  cols: number;
1259
1259
  };
1260
+ colors?: {
1261
+ foreground: string;
1262
+ background: string;
1263
+ };
1260
1264
  }): Promise<CreateTerminalPayload>;
1261
1265
  renameTerminal(input: RenameTerminalInput): Promise<RenameTerminalResult>;
1262
1266
  /**
@@ -4028,6 +4028,7 @@ export class DaemonClient {
4028
4028
  args: options?.args,
4029
4029
  ...(options?.workspaceId !== undefined ? { workspaceId: options.workspaceId } : {}),
4030
4030
  ...(options?.size !== undefined ? { size: options.size } : {}),
4031
+ ...(options?.colors !== undefined ? { colors: options.colors } : {}),
4031
4032
  requestId: resolvedRequestId,
4032
4033
  });
4033
4034
  return this.sendCorrelatedRequest({
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/client",
3
- "version": "0.11.0-fork.4",
3
+ "version": "0.11.0-fork.5",
4
4
  "description": "Paseo client SDK package",
5
5
  "files": [
6
6
  "dist",
@@ -44,7 +44,7 @@
44
44
  "vitest": "^4.1.6"
45
45
  },
46
46
  "dependencies": {
47
- "@getpaseo/protocol": "0.11.0-fork.4",
48
- "@getpaseo/relay": "0.11.0-fork.4"
47
+ "@getpaseo/protocol": "0.11.0-fork.5",
48
+ "@getpaseo/relay": "0.11.0-fork.5"
49
49
  }
50
50
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/highlight",
3
- "version": "0.11.0-fork.4",
3
+ "version": "0.11.0-fork.5",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/*.map",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/plugin",
3
- "version": "0.11.0-fork.4",
3
+ "version": "0.11.0-fork.5",
4
4
  "description": "Paseo plugin SDK package",
5
5
  "files": [
6
6
  "dist",
@@ -66,8 +66,8 @@
66
66
  "test": "vitest run"
67
67
  },
68
68
  "devDependencies": {
69
- "@getpaseo/client": "0.11.0-fork.4",
70
- "@getpaseo/protocol": "0.11.0-fork.4",
69
+ "@getpaseo/client": "0.11.0-fork.5",
70
+ "@getpaseo/protocol": "0.11.0-fork.5",
71
71
  "@types/node": "^20.9.0",
72
72
  "@types/react": "~19.2.0",
73
73
  "react": "19.1.0",
@@ -4392,6 +4392,10 @@ export declare const CreateTerminalRequestSchema: z.ZodObject<{
4392
4392
  rows: z.ZodNumber;
4393
4393
  cols: z.ZodNumber;
4394
4394
  }, z.core.$strip>>;
4395
+ colors: z.ZodOptional<z.ZodObject<{
4396
+ foreground: z.ZodString;
4397
+ background: z.ZodString;
4398
+ }, z.core.$strip>>;
4395
4399
  requestId: z.ZodString;
4396
4400
  }, z.core.$strip>;
4397
4401
  export declare const RenameTerminalRequestSchema: z.ZodObject<{
@@ -7310,6 +7314,10 @@ export declare const SessionInboundMessageSchema: z.ZodDiscriminatedUnion<[z.Zod
7310
7314
  rows: z.ZodNumber;
7311
7315
  cols: z.ZodNumber;
7312
7316
  }, z.core.$strip>>;
7317
+ colors: z.ZodOptional<z.ZodObject<{
7318
+ foreground: z.ZodString;
7319
+ background: z.ZodString;
7320
+ }, z.core.$strip>>;
7313
7321
  requestId: z.ZodString;
7314
7322
  }, z.core.$strip>, z.ZodObject<{
7315
7323
  type: z.ZodLiteral<"terminal.rename.request">;
@@ -37164,6 +37172,10 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
37164
37172
  rows: z.ZodNumber;
37165
37173
  cols: z.ZodNumber;
37166
37174
  }, z.core.$strip>>;
37175
+ colors: z.ZodOptional<z.ZodObject<{
37176
+ foreground: z.ZodString;
37177
+ background: z.ZodString;
37178
+ }, z.core.$strip>>;
37167
37179
  requestId: z.ZodString;
37168
37180
  }, z.core.$strip>, z.ZodObject<{
37169
37181
  type: z.ZodLiteral<"terminal.rename.request">;
@@ -52168,6 +52180,10 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
52168
52180
  rows: z.ZodNumber;
52169
52181
  cols: z.ZodNumber;
52170
52182
  }, z.core.$strip>>;
52183
+ colors: z.ZodOptional<z.ZodObject<{
52184
+ foreground: z.ZodString;
52185
+ background: z.ZodString;
52186
+ }, z.core.$strip>>;
52171
52187
  requestId: z.ZodString;
52172
52188
  }, z.core.$strip>, z.ZodObject<{
52173
52189
  type: z.ZodLiteral<"terminal.rename.request">;
@@ -2554,6 +2554,15 @@ export const CreateTerminalRequestSchema = z.object({
2554
2554
  cols: z.number().int().positive(),
2555
2555
  })
2556
2556
  .optional(),
2557
+ // Viewer's terminal colors as #rrggbb, answered to OSC 10/11/12 color queries so TUIs like
2558
+ // Codex pick a light or dark palette that matches what the app renders. Daemons without it
2559
+ // answer with a fixed dark palette.
2560
+ colors: z
2561
+ .object({
2562
+ foreground: z.string(),
2563
+ background: z.string(),
2564
+ })
2565
+ .optional(),
2557
2566
  requestId: z.string(),
2558
2567
  });
2559
2568
  export const RenameTerminalRequestSchema = z.object({
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/protocol",
3
- "version": "0.11.0-fork.4",
3
+ "version": "0.11.0-fork.5",
4
4
  "description": "Paseo shared protocol schemas and wire types",
5
5
  "files": [
6
6
  "dist",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/relay",
3
- "version": "0.11.0-fork.4",
3
+ "version": "0.11.0-fork.5",
4
4
  "description": "Paseo relay for bridging daemon and client connections",
5
5
  "files": [
6
6
  "dist",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/builtin-plugins",
3
- "version": "0.11.0-fork.4",
3
+ "version": "0.11.0-fork.5",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,4 +1,4 @@
1
- import { type TerminalSession, type TerminalStateSnapshot, type TerminalStateSnapshotOptions } from "./terminal.js";
1
+ import { type TerminalColors, type TerminalSession, type TerminalStateSnapshot, type TerminalStateSnapshotOptions } from "./terminal.js";
2
2
  import { type CaptureTerminalLinesResult } from "./terminal-capture.js";
3
3
  import type { TerminalActivity, TerminalActivityState } from "@getpaseo/protocol/terminal-activity";
4
4
  export interface TerminalListItem {
@@ -44,6 +44,7 @@ export interface TerminalManager {
44
44
  args?: string[];
45
45
  rows?: number;
46
46
  cols?: number;
47
+ colors?: TerminalColors;
47
48
  activityToken?: string;
48
49
  activityUrl?: string | null;
49
50
  }): Promise<TerminalSession>;
@@ -212,6 +212,7 @@ export function createTerminalManager(managerOptions = {}) {
212
212
  ...(options.args ? { args: options.args } : {}),
213
213
  ...(options.rows !== undefined ? { rows: options.rows } : {}),
214
214
  ...(options.cols !== undefined ? { cols: options.cols } : {}),
215
+ ...(options.colors ? { colors: options.colors } : {}),
215
216
  ...(mergedEnv ? { env: mergedEnv } : {}),
216
217
  activityEnv,
217
218
  }));
@@ -370,6 +370,7 @@ export class TerminalSessionController {
370
370
  args: msg.args,
371
371
  rows: msg.size?.rows,
372
372
  cols: msg.size?.cols,
373
+ colors: msg.colors,
373
374
  });
374
375
  this.emit({
375
376
  type: "create_terminal_response",
@@ -1,4 +1,4 @@
1
- import type { TerminalExitInfo, ServerMessage, ClientMessage, TerminalStateSnapshot, TerminalStateSnapshotOptions } from "./terminal.js";
1
+ import type { TerminalExitInfo, ServerMessage, ClientMessage, TerminalColors, TerminalStateSnapshot, TerminalStateSnapshotOptions } from "./terminal.js";
2
2
  import type { TerminalState } from "@getpaseo/protocol/messages";
3
3
  import type { TerminalActivity, TerminalActivityState } from "@getpaseo/protocol/terminal-activity";
4
4
  import type { CaptureTerminalLinesResult } from "./terminal-capture.js";
@@ -21,6 +21,7 @@ export interface WorkerCreateTerminalOptions {
21
21
  args?: string[];
22
22
  rows?: number;
23
23
  cols?: number;
24
+ colors?: TerminalColors;
24
25
  activityToken?: string;
25
26
  activityUrl?: string | null;
26
27
  }
@@ -1,5 +1,9 @@
1
1
  import type { TerminalState } from "@getpaseo/protocol/messages";
2
2
  import type { TerminalActivity, TerminalActivityState } from "@getpaseo/protocol/terminal-activity";
3
+ export interface TerminalColors {
4
+ foreground: string;
5
+ background: string;
6
+ }
3
7
  export interface TerminalExitInfo {
4
8
  exitCode: number | null;
5
9
  signal: number | null;
@@ -97,6 +101,7 @@ export interface CreateTerminalOptions {
97
101
  title?: string;
98
102
  command?: string;
99
103
  args?: string[];
104
+ colors?: TerminalColors;
100
105
  }
101
106
  interface BuildTerminalEnvironmentInput {
102
107
  shell: string;
@@ -22,11 +22,25 @@ let nodePtySpawnHelperChecked = false;
22
22
  const TERMINAL_TITLE_DEBOUNCE_MS = 150;
23
23
  const TERMINAL_EXIT_OUTPUT_LINE_LIMIT = 12;
24
24
  const TERMINAL_EXIT_OUTPUT_CHAR_LIMIT = 16000;
25
- const TERMINAL_OSC_COLOR_QUERY_RESPONSES = new Map([
26
- [10, "rgb:e6e6/e6e6/e6e6"],
27
- [11, "rgb:0b0b/0b0b/0b0b"],
28
- [12, "rgb:e6e6/e6e6/e6e6"],
29
- ]);
25
+ const DEFAULT_OSC_FOREGROUND = "rgb:e6e6/e6e6/e6e6";
26
+ const DEFAULT_OSC_BACKGROUND = "rgb:0b0b/0b0b/0b0b";
27
+ // OSC color replies use the X11 `rgb:rrrr/gggg/bbbb` form.
28
+ function toOscRgb(hex) {
29
+ const match = hex && /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(hex);
30
+ return match
31
+ ? `rgb:${match[1].repeat(2)}/${match[2].repeat(2)}/${match[3].repeat(2)}`
32
+ : undefined;
33
+ }
34
+ // OSC 10 = foreground, 11 = background, 12 = cursor.
35
+ function buildOscColorQueryResponses(colors) {
36
+ const foreground = toOscRgb(colors?.foreground) ?? DEFAULT_OSC_FOREGROUND;
37
+ const background = toOscRgb(colors?.background) ?? DEFAULT_OSC_BACKGROUND;
38
+ return new Map([
39
+ [10, foreground],
40
+ [11, background],
41
+ [12, foreground],
42
+ ]);
43
+ }
30
44
  function parseCommandFinishedOsc(data) {
31
45
  // OSC 633 is terminal control traffic, but a foreground command can still
32
46
  // print arbitrary control bytes. Keep this boundary to the exact VS Code
@@ -634,7 +648,7 @@ function extractLastOutputLinesFromText(text, limit) {
634
648
  return lines.slice(-limit);
635
649
  }
636
650
  export async function createTerminal(options) {
637
- const { cwd, workspaceId, shell, env = {}, activityEnv = {}, rows = 24, cols = 80, name = "Terminal", title: presetTitle, command, args = [], } = options;
651
+ const { cwd, workspaceId, shell, env = {}, activityEnv = {}, rows = 24, cols = 80, name = "Terminal", title: presetTitle, command, args = [], colors, } = options;
638
652
  const resolvedShell = shell ?? resolveDefaultTerminalShell();
639
653
  const id = options.id ?? randomUUID();
640
654
  const listeners = new Set();
@@ -771,7 +785,7 @@ export async function createTerminal(options) {
771
785
  ptyProcess.write(`\x1b[?${buffer.cursorY + 1};${buffer.cursorX + 1}R`);
772
786
  return true;
773
787
  });
774
- for (const [code, response] of TERMINAL_OSC_COLOR_QUERY_RESPONSES) {
788
+ for (const [code, response] of buildOscColorQueryResponses(colors)) {
775
789
  terminal.parser.registerOscHandler(code, (data) => {
776
790
  if (data.trim() !== "?") {
777
791
  return false;