paneful 0.9.10 → 0.9.11

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.
@@ -46,6 +46,12 @@ func getWindowTitle(pid: pid_t) -> String {
46
46
  return title as? String ?? ""
47
47
  }
48
48
 
49
+ // Quick AX trust check mode: print status and exit
50
+ if CommandLine.arguments.contains("--check") {
51
+ print(AXIsProcessTrusted() ? "ok" : "needs-accessibility")
52
+ exit(0)
53
+ }
54
+
49
55
  setbuf(stdout, nil)
50
56
  setbuf(stderr, nil)
51
57
 
@@ -117,15 +123,19 @@ RunLoop.main.run()
117
123
  `;
118
124
  export class EditorMonitor {
119
125
  onChange;
126
+ onStatusChange;
120
127
  proc = null;
121
128
  destroyed = false;
122
129
  lineBuffer = '';
123
130
  cache = { projectName: null };
124
131
  restartTimer = null;
132
+ accessibilityProbeTimer = null;
125
133
  mode = 'osascript';
126
134
  compiling = false;
127
- constructor(onChange) {
135
+ lastNeedsAccessibility = false;
136
+ constructor(onChange, onStatusChange) {
128
137
  this.onChange = onChange;
138
+ this.onStatusChange = onStatusChange;
129
139
  }
130
140
  getState() {
131
141
  return this.cache;
@@ -173,11 +183,35 @@ export class EditorMonitor {
173
183
  catch { }
174
184
  }
175
185
  }
186
+ probeAccessibility() {
187
+ if (!existsSync(this.helperPath))
188
+ return;
189
+ execFile(this.helperPath, ['--check'], { timeout: 3000 }, (err, stdout) => {
190
+ if (this.destroyed)
191
+ return;
192
+ if (err)
193
+ return;
194
+ const needs = stdout.trim() === 'needs-accessibility';
195
+ this.cache = { ...this.cache, needsAccessibility: needs || undefined };
196
+ this.emitStatusChange(needs);
197
+ });
198
+ }
199
+ startAccessibilityProbe() {
200
+ this.probeAccessibility();
201
+ this.accessibilityProbeTimer = setInterval(() => this.probeAccessibility(), 5000);
202
+ }
203
+ stopAccessibilityProbe() {
204
+ if (this.accessibilityProbeTimer) {
205
+ clearInterval(this.accessibilityProbeTimer);
206
+ this.accessibilityProbeTimer = null;
207
+ }
208
+ }
176
209
  resume() {
177
210
  if (this.destroyed || this.proc)
178
211
  return;
179
212
  if (process.platform !== 'darwin')
180
213
  return;
214
+ this.startAccessibilityProbe();
181
215
  if (this.isHelperCurrent()) {
182
216
  this.mode = 'native';
183
217
  console.log('[editor-monitor] native helper is current, starting directly');
@@ -203,10 +237,12 @@ export class EditorMonitor {
203
237
  }
204
238
  }
205
239
  pause() {
240
+ this.stopAccessibilityProbe();
206
241
  this.stopProcess();
207
242
  }
208
243
  destroy() {
209
244
  this.destroyed = true;
245
+ this.stopAccessibilityProbe();
210
246
  this.stopProcess();
211
247
  }
212
248
  startProcess() {
@@ -252,12 +288,9 @@ export class EditorMonitor {
252
288
  proc.on('error', (err) => {
253
289
  if (this.proc !== proc)
254
290
  return;
255
- const msg = err.message || '';
256
- const needsAccess = msg.includes('not allowed assistive access') || msg.includes('1719');
257
- this.cache = { projectName: null, needsAccessibility: needsAccess || undefined };
258
291
  this.proc = null;
259
292
  if (currentMode === 'native') {
260
- console.log(`[editor-monitor] native helper error, falling back to osascript: ${msg}`);
293
+ console.log(`[editor-monitor] native helper error, falling back to osascript: ${err.message}`);
261
294
  this.mode = 'osascript';
262
295
  }
263
296
  this.scheduleRestart();
@@ -273,6 +306,12 @@ export class EditorMonitor {
273
306
  this.scheduleRestart();
274
307
  });
275
308
  }
309
+ emitStatusChange(needsAccessibility) {
310
+ if (needsAccessibility !== this.lastNeedsAccessibility) {
311
+ this.lastNeedsAccessibility = needsAccessibility;
312
+ this.onStatusChange?.(needsAccessibility);
313
+ }
314
+ }
276
315
  feedData(chunk) {
277
316
  this.lineBuffer += chunk.toString();
278
317
  const lines = this.lineBuffer.split('\n');
@@ -0,0 +1,79 @@
1
+ import { watch, readFileSync, unlinkSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+ const INBOX_FILE = 'inbox.json';
4
+ export class InboxMonitor {
5
+ dir;
6
+ onChange;
7
+ watcher = null;
8
+ destroyed = false;
9
+ debounceTimer = null;
10
+ constructor(dataDir, onChange) {
11
+ this.dir = dataDir;
12
+ this.onChange = onChange;
13
+ }
14
+ resume() {
15
+ if (this.destroyed || this.watcher)
16
+ return;
17
+ try {
18
+ this.watcher = watch(this.dir, (event, filename) => {
19
+ if (filename !== INBOX_FILE)
20
+ return;
21
+ if (event !== 'rename' && event !== 'change')
22
+ return;
23
+ this.scheduleRead();
24
+ });
25
+ this.watcher.on('error', () => {
26
+ this.stopWatcher();
27
+ });
28
+ }
29
+ catch {
30
+ // Directory may not exist yet — that's fine
31
+ }
32
+ }
33
+ pause() {
34
+ this.stopWatcher();
35
+ }
36
+ destroy() {
37
+ this.destroyed = true;
38
+ this.stopWatcher();
39
+ }
40
+ stopWatcher() {
41
+ if (this.debounceTimer) {
42
+ clearTimeout(this.debounceTimer);
43
+ this.debounceTimer = null;
44
+ }
45
+ if (this.watcher) {
46
+ this.watcher.close();
47
+ this.watcher = null;
48
+ }
49
+ }
50
+ scheduleRead() {
51
+ if (this.debounceTimer)
52
+ clearTimeout(this.debounceTimer);
53
+ this.debounceTimer = setTimeout(() => {
54
+ this.debounceTimer = null;
55
+ this.readAndProcess();
56
+ }, 50);
57
+ }
58
+ readAndProcess() {
59
+ const filePath = join(this.dir, INBOX_FILE);
60
+ try {
61
+ const raw = readFileSync(filePath, 'utf-8');
62
+ // Delete the file immediately after reading
63
+ try {
64
+ unlinkSync(filePath);
65
+ }
66
+ catch { }
67
+ const data = JSON.parse(raw);
68
+ if (data && Array.isArray(data.files) && data.files.length > 0) {
69
+ const files = data.files.filter((f) => typeof f === 'string');
70
+ if (files.length > 0) {
71
+ this.onChange(files);
72
+ }
73
+ }
74
+ }
75
+ catch {
76
+ // ENOENT, malformed JSON — ignore
77
+ }
78
+ }
79
+ }
@@ -446,7 +446,7 @@ async function startServer(devMode, port) {
446
446
  }
447
447
  const server = http.createServer(app);
448
448
  // WebSocket handler
449
- const wsHandler = new WsHandler(server, ptyManager, projectStore, { onIdle: () => shutdown() });
449
+ const wsHandler = new WsHandler(server, ptyManager, projectStore, dataDir(), { onIdle: () => shutdown() });
450
450
  app.get('/api/active-editor', (_req, res) => {
451
451
  res.json(wsHandler.getEditorState());
452
452
  });
@@ -4,6 +4,7 @@ import { PortMonitor } from './port-monitor.js';
4
4
  import { ClaudeMonitor } from './claude-monitor.js';
5
5
  import { GitMonitor } from './git-monitor.js';
6
6
  import { EditorMonitor } from './editor-monitor.js';
7
+ import { InboxMonitor } from './inbox-monitor.js';
7
8
  export class WsHandler {
8
9
  wss;
9
10
  client = null;
@@ -13,9 +14,10 @@ export class WsHandler {
13
14
  claudeMonitor;
14
15
  gitMonitor;
15
16
  editorMonitor;
17
+ inboxMonitor;
16
18
  idleTimer = null;
17
19
  onIdle;
18
- constructor(server, ptyManager, projectStore, options) {
20
+ constructor(server, ptyManager, projectStore, dataDir, options) {
19
21
  this.ptyManager = ptyManager;
20
22
  this.projectStore = projectStore;
21
23
  this.onIdle = options?.onIdle;
@@ -30,6 +32,11 @@ export class WsHandler {
30
32
  });
31
33
  this.editorMonitor = new EditorMonitor((projectName) => {
32
34
  this.send({ type: 'editor:active', projectName });
35
+ }, (needsAccessibility) => {
36
+ this.send({ type: 'editor:status', needsAccessibility });
37
+ });
38
+ this.inboxMonitor = new InboxMonitor(dataDir, (files) => {
39
+ this.send({ type: 'inbox:paste', files });
33
40
  });
34
41
  this.wss = new WebSocketServer({ noServer: true });
35
42
  server.on('upgrade', (req, socket, head) => {
@@ -64,10 +71,6 @@ export class WsHandler {
64
71
  if (Object.keys(statuses).length > 0) {
65
72
  this.send({ type: 'claude:status', statuses });
66
73
  }
67
- const editorState = this.editorMonitor.getState();
68
- if (editorState.projectName) {
69
- this.send({ type: 'editor:active', projectName: editorState.projectName });
70
- }
71
74
  ws.on('message', (raw) => {
72
75
  try {
73
76
  const msg = JSON.parse(raw.toString());
@@ -161,6 +164,24 @@ export class WsHandler {
161
164
  }
162
165
  break;
163
166
  }
167
+ case 'editor:sync': {
168
+ if (msg.enabled) {
169
+ this.editorMonitor.resume();
170
+ // Send cached state
171
+ const editorState = this.editorMonitor.getState();
172
+ if (editorState.projectName) {
173
+ this.send({ type: 'editor:active', projectName: editorState.projectName });
174
+ }
175
+ if (editorState.needsAccessibility) {
176
+ this.send({ type: 'editor:status', needsAccessibility: true });
177
+ }
178
+ }
179
+ else {
180
+ this.editorMonitor.pause();
181
+ this.send({ type: 'editor:status', needsAccessibility: false });
182
+ }
183
+ break;
184
+ }
164
185
  }
165
186
  }
166
187
  getEditorState() {
@@ -170,19 +191,22 @@ export class WsHandler {
170
191
  this.portMonitor.resume();
171
192
  this.claudeMonitor.resume();
172
193
  this.gitMonitor.resume();
173
- this.editorMonitor.resume();
194
+ // Editor monitor is started on-demand via editor:sync message
195
+ this.inboxMonitor.resume();
174
196
  }
175
197
  pauseMonitors() {
176
198
  this.portMonitor.pause();
177
199
  this.claudeMonitor.pause();
178
200
  this.gitMonitor.pause();
179
201
  this.editorMonitor.pause();
202
+ this.inboxMonitor.pause();
180
203
  }
181
204
  destroy() {
182
205
  this.portMonitor.destroy();
183
206
  this.claudeMonitor.destroy();
184
207
  this.gitMonitor.destroy();
185
208
  this.editorMonitor.destroy();
209
+ this.inboxMonitor.destroy();
186
210
  }
187
211
  handlePtySpawn(terminalId, projectId, cwd) {
188
212
  try {
@@ -0,0 +1,32 @@
1
+ *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-left-\[2px\]{left:-2px}.-right-0\.5{right:-.125rem}.-top-0\.5{top:-.125rem}.-top-\[2px\]{top:-2px}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-auto{margin-left:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-\[20vh\]{margin-top:20vh}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-1\/2{height:50%}.h-16{height:4rem}.h-2{height:.5rem}.h-4{height:1rem}.h-7{height:1.75rem}.h-9{height:2.25rem}.h-\[4px\]{height:4px}.h-\[8px\]{height:8px}.h-full{height:100%}.h-screen{height:100vh}.max-h-40{max-height:10rem}.max-h-72{max-height:18rem}.max-h-\[80vh\]{max-height:80vh}.min-h-0{min-height:0px}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-16{width:4rem}.w-2{width:.5rem}.w-80{width:20rem}.w-\[380px\]{width:380px}.w-\[400px\]{width:400px}.w-\[440px\]{width:440px}.w-\[4px\]{width:4px}.w-\[8px\]{width:8px}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.min-w-0{min-width:0px}.min-w-\[24px\]{min-width:24px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-col-resize{cursor:col-resize}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.scroll-my-8{scroll-margin-top:2rem;scroll-margin-bottom:2rem}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-\[var\(--accent\)\]{border-color:var(--accent)}.border-\[var\(--border\)\]{border-color:var(--border)}.border-\[var\(--danger\)\]{border-color:var(--danger)}.border-transparent{border-color:transparent}.bg-\[var\(--border\)\]{background-color:var(--border)}.bg-\[var\(--danger\)\]{background-color:var(--danger)}.bg-\[var\(--success\)\]{background-color:var(--success)}.bg-\[var\(--surface-0\)\]{background-color:var(--surface-0)}.bg-\[var\(--surface-1\)\]{background-color:var(--surface-1)}.bg-\[var\(--surface-2\)\]{background-color:var(--surface-2)}.bg-\[var\(--surface-3\)\]{background-color:var(--surface-3)}.bg-accent{background-color:var(--accent)}.bg-black\/50{background-color:#00000080}.bg-purple-500\/10{background-color:#a855f71a}.bg-purple-500\/20{background-color:#a855f733}.bg-transparent{background-color:transparent}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[5px\]{font-size:5px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-\[var\(--accent\)\]{color:var(--accent)}.text-\[var\(--danger\)\]{color:var(--danger)}.text-\[var\(--text-muted\)\]{color:var(--text-muted)}.text-\[var\(--text-primary\)\]{color:var(--text-primary)}.text-\[var\(--text-secondary\)\]{color:var(--text-secondary)}.text-accent{color:var(--accent)}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-purple-400\/50{color:#c084fc80}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.opacity-0{opacity:0}.opacity-40{opacity:.4}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_1px_0_var\(--border\)\]{--tw-shadow: 0 1px 0 var(--border);--tw-shadow-colored: 0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-\[var\(--accent\)\]{--tw-ring-color: var(--accent)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}:root{--surface-0: #0a0a0f;--surface-1: #111118;--surface-2: #1a1a24;--surface-3: #252532;--border: #2a2a3a;--border-focus: #5b5bd6;--accent: #5b5bd6;--accent-dim: #3a3a8c;--text-primary: #ececf1;--text-secondary: #a1a1b5;--text-muted: #6b6b80;--danger: #e5484d;--danger-dim: #3c1618;--success: #30a46c}[data-theme=light]{--surface-0: #ffffff;--surface-1: #f5f5f7;--surface-2: #ebebef;--surface-3: #dddde3;--border: #d0d0d8;--border-focus: #5b5bd6;--accent: #5b5bd6;--accent-dim: #e0e0ff;--text-primary: #1a1a2e;--text-secondary: #555570;--text-muted: #8888a0;--danger: #dc3545;--danger-dim: #fde8ea;--success: #1a8f5c}@media (prefers-color-scheme: light){[data-theme=system]{--surface-0: #ffffff;--surface-1: #f5f5f7;--surface-2: #ebebef;--surface-3: #dddde3;--border: #d0d0d8;--border-focus: #5b5bd6;--accent: #5b5bd6;--accent-dim: #e0e0ff;--text-primary: #1a1a2e;--text-secondary: #555570;--text-muted: #8888a0;--danger: #dc3545;--danger-dim: #fde8ea;--success: #1a8f5c}}*{margin:0;padding:0;box-sizing:border-box}html,body,#root{height:100%;width:100%;overflow:hidden;background:var(--surface-0);color:var(--text-primary);font-family:-apple-system,BlinkMacSystemFont,Inter,Segoe UI,sans-serif}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}.xterm{padding:4px 8px}.xterm-viewport::-webkit-scrollbar{width:6px}.xterm-viewport::-webkit-scrollbar-track{background:transparent}.xterm-viewport::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideIn{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideOut{0%{transform:translate(0)}to{transform:translate(-100%)}}.animate-fade-in{animation:fadeIn .15s ease-out}.placeholder\:text-\[var\(--text-muted\)\]::-moz-placeholder{color:var(--text-muted)}.placeholder\:text-\[var\(--text-muted\)\]::placeholder{color:var(--text-muted)}.hover\:bg-\[var\(--accent\)\]:hover{background-color:var(--accent)}.hover\:bg-\[var\(--danger-dim\)\]:hover{background-color:var(--danger-dim)}.hover\:bg-\[var\(--surface-2\)\]:hover{background-color:var(--surface-2)}.hover\:bg-\[var\(--surface-3\)\]:hover{background-color:var(--surface-3)}.hover\:bg-green-500\/10:hover{background-color:#22c55e1a}.hover\:text-\[var\(--danger\)\]:hover{color:var(--danger)}.hover\:text-\[var\(--success\)\]:hover{color:var(--success)}.hover\:text-\[var\(--text-primary\)\]:hover{color:var(--text-primary)}.hover\:text-\[var\(--text-secondary\)\]:hover{color:var(--text-secondary)}.hover\:text-yellow-400:hover{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-40:hover{opacity:.4}.hover\:opacity-90:hover{opacity:.9}.focus\:border-\[var\(--accent\)\]:focus{border-color:var(--accent)}.focus\:border-\[var\(--danger\)\]:focus{border-color:var(--danger)}.focus\:border-accent:focus{border-color:var(--accent)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.active\:cursor-grabbing:active{cursor:grabbing}.active\:bg-\[var\(--accent\)\]:active{background-color:var(--accent)}.active\:opacity-60:active{opacity:.6}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.group:hover .group-hover\:flex{display:flex}.group:hover .group-hover\:text-\[var\(--accent\)\]{color:var(--accent)}.group:active .group-active\:bg-accent{background-color:var(--accent)}@media (min-width: 640px){.sm\:inline{display:inline}.sm\:inline-flex{display:inline-flex}}/**
2
+ * Copyright (c) 2014 The xterm.js authors. All rights reserved.
3
+ * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
4
+ * https://github.com/chjj/term.js
5
+ * @license MIT
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in
15
+ * all copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ * THE SOFTWARE.
24
+ *
25
+ * Originally forked from (with the author's permission):
26
+ * Fabrice Bellard's javascript vt100 for jslinux:
27
+ * http://bellard.org/jslinux/
28
+ * Copyright (c) 2011 Fabrice Bellard
29
+ * The original design remains. The terminal itself
30
+ * has been extended to include xterm CSI codes, among
31
+ * other features.
32
+ */.xterm{cursor:text;position:relative;-moz-user-select:none;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::-moz-selection{color:transparent}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;-webkit-user-select:text;-moz-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:-moz-fit-content;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:double underline;text-decoration:double underline}.xterm-underline-3{-webkit-text-decoration:wavy underline;text-decoration:wavy underline}.xterm-underline-4{-webkit-text-decoration:dotted underline;text-decoration:dotted underline}.xterm-underline-5{-webkit-text-decoration:dashed underline;text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}