relmio 0.5.0 → 0.7.0
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/CHANGELOG.md +50 -0
- package/README.md +42 -414
- package/docs/architecture.md +21 -9
- package/docs/faq.md +45 -0
- package/docs/getting-started.md +38 -0
- package/docs/local-endpoints-spec.md +128 -13
- package/docs/local-endpoints.md +129 -26
- package/docs/reference.md +77 -0
- package/docs/security.md +74 -15
- package/docs/troubleshooting.md +33 -0
- package/docs/vps-and-n8n.md +30 -0
- package/package.json +1 -1
- package/src/domain/local-endpoints.js +183 -13
- package/src/gateway/codex-chat.js +754 -0
- package/src/services/codex-login.js +11 -3
- package/src/services/local-chat-test.js +361 -0
- package/src/services/local-installer.js +94 -14
- package/src/ui/local.css +115 -1
- package/src/ui/local.html +119 -8
- package/src/ui/local.js +362 -38
- package/src/web/server.js +134 -4
package/src/ui/local.css
CHANGED
|
@@ -365,6 +365,115 @@
|
|
|
365
365
|
font-weight: 700;
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
+
.chat-tester {
|
|
369
|
+
display: grid;
|
|
370
|
+
gap: 1rem;
|
|
371
|
+
margin-top: 1.25rem;
|
|
372
|
+
padding: 1rem;
|
|
373
|
+
border: 1px solid var(--accent-border);
|
|
374
|
+
border-radius: var(--radius);
|
|
375
|
+
background: var(--accent-soft);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.chat-tester-heading {
|
|
379
|
+
display: flex;
|
|
380
|
+
align-items: flex-start;
|
|
381
|
+
justify-content: space-between;
|
|
382
|
+
gap: 1rem;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.chat-tester-heading h3 {
|
|
386
|
+
margin: 0.2rem 0 0;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.chat-tester-heading p:not(.section-label) {
|
|
390
|
+
margin: 0.45rem 0 0;
|
|
391
|
+
color: var(--text-muted);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.chat-tester-heading .section-label {
|
|
395
|
+
margin: 0;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.chat-tester-form fieldset {
|
|
399
|
+
display: grid;
|
|
400
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
401
|
+
gap: 0.875rem;
|
|
402
|
+
margin: 0;
|
|
403
|
+
padding: 0;
|
|
404
|
+
border: 0;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.chat-tester-form legend {
|
|
408
|
+
grid-column: 1 / -1;
|
|
409
|
+
width: 100%;
|
|
410
|
+
margin-bottom: 0.5rem;
|
|
411
|
+
font-weight: 800;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.chat-tester-form .button,
|
|
415
|
+
.chat-tester-message-form .button {
|
|
416
|
+
margin-top: 0.875rem;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.chat-tester-status,
|
|
420
|
+
.chat-tester-error {
|
|
421
|
+
margin: 0;
|
|
422
|
+
padding: 0.75rem 0.875rem;
|
|
423
|
+
border-radius: var(--radius-sm);
|
|
424
|
+
font-size: 0.875rem;
|
|
425
|
+
overflow-wrap: anywhere;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.chat-tester-status {
|
|
429
|
+
border: 1px solid var(--accent-border);
|
|
430
|
+
background: var(--surface);
|
|
431
|
+
color: var(--text-muted);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.chat-tester-error {
|
|
435
|
+
border: 1px solid var(--warning-border);
|
|
436
|
+
background: var(--warning-soft);
|
|
437
|
+
color: var(--warning);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.chat-tester-transcript {
|
|
441
|
+
display: grid;
|
|
442
|
+
gap: 0.75rem;
|
|
443
|
+
max-height: 28rem;
|
|
444
|
+
margin: 0;
|
|
445
|
+
padding: 0;
|
|
446
|
+
overflow: auto;
|
|
447
|
+
list-style: none;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.chat-tester-turn {
|
|
451
|
+
max-width: min(100%, 46rem);
|
|
452
|
+
padding: 0.75rem 0.875rem;
|
|
453
|
+
border: 1px solid var(--border-strong);
|
|
454
|
+
border-radius: var(--radius-sm);
|
|
455
|
+
background: var(--surface);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.chat-tester-turn-assistant {
|
|
459
|
+
border-color: var(--accent-border);
|
|
460
|
+
background: var(--accent-soft);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.chat-tester-turn strong {
|
|
464
|
+
display: block;
|
|
465
|
+
margin-bottom: 0.25rem;
|
|
466
|
+
font-size: 0.75rem;
|
|
467
|
+
letter-spacing: 0.02em;
|
|
468
|
+
text-transform: uppercase;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.chat-tester-turn p {
|
|
472
|
+
margin: 0;
|
|
473
|
+
overflow-wrap: anywhere;
|
|
474
|
+
white-space: pre-wrap;
|
|
475
|
+
}
|
|
476
|
+
|
|
368
477
|
.local-wizard a.button {
|
|
369
478
|
text-decoration: none;
|
|
370
479
|
}
|
|
@@ -379,10 +488,15 @@
|
|
|
379
488
|
@media (max-width: 48rem) {
|
|
380
489
|
.target-picker,
|
|
381
490
|
.local-fields,
|
|
382
|
-
.local-review-grid
|
|
491
|
+
.local-review-grid,
|
|
492
|
+
.chat-tester-form fieldset {
|
|
383
493
|
grid-template-columns: minmax(0, 1fr);
|
|
384
494
|
}
|
|
385
495
|
|
|
496
|
+
.chat-tester-heading {
|
|
497
|
+
flex-direction: column;
|
|
498
|
+
}
|
|
499
|
+
|
|
386
500
|
.review-details div {
|
|
387
501
|
grid-template-columns: minmax(0, 1fr);
|
|
388
502
|
gap: 0.2rem;
|
package/src/ui/local.html
CHANGED
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
<section class="intro" aria-labelledby="page-title">
|
|
93
93
|
<h1 id="page-title">Run Relmio on localhost</h1>
|
|
94
94
|
<p class="lede">
|
|
95
|
-
Choose the official credential path that matches your client.
|
|
96
|
-
options run in
|
|
95
|
+
Choose the official credential path that matches your client. All
|
|
96
|
+
three options run in hardened Docker containers and bind only to
|
|
97
97
|
<code>127.0.0.1</code>.
|
|
98
98
|
</p>
|
|
99
99
|
</section>
|
|
@@ -142,6 +142,13 @@
|
|
|
142
142
|
hidden
|
|
143
143
|
>
|
|
144
144
|
<span id="global-error-text"></span>
|
|
145
|
+
<a
|
|
146
|
+
id="local-image-build-troubleshooting"
|
|
147
|
+
href="https://relmio.vercel.app/docs/troubleshooting#local-image-build-failed"
|
|
148
|
+
target="_blank"
|
|
149
|
+
rel="noopener noreferrer"
|
|
150
|
+
hidden
|
|
151
|
+
>View troubleshooting</a>
|
|
145
152
|
</div>
|
|
146
153
|
</div>
|
|
147
154
|
</aside>
|
|
@@ -200,6 +207,20 @@
|
|
|
200
207
|
</span>
|
|
201
208
|
</span>
|
|
202
209
|
</label>
|
|
210
|
+
|
|
211
|
+
<label class="target-card warning-card">
|
|
212
|
+
<input type="radio" name="target" value="codex-chat" />
|
|
213
|
+
<span class="target-card-copy">
|
|
214
|
+
<strong>Codex Chat Adapter</strong>
|
|
215
|
+
<span class="target-meta">Experimental · trusted local backends or development servers only</span>
|
|
216
|
+
<span>
|
|
217
|
+
Relmio-specific authenticated <code>POST /chat</code>, backed by
|
|
218
|
+
official Codex App Server and ChatGPT sign-in. This is not an
|
|
219
|
+
OpenAI-compatible <code>/v1</code> endpoint and browser bundles
|
|
220
|
+
must never connect to it.
|
|
221
|
+
</span>
|
|
222
|
+
</span>
|
|
223
|
+
</label>
|
|
203
224
|
</fieldset>
|
|
204
225
|
|
|
205
226
|
<div class="field-grid local-fields">
|
|
@@ -358,8 +379,8 @@
|
|
|
358
379
|
</div>
|
|
359
380
|
|
|
360
381
|
<aside id="codex-install-warning" class="high-trust-warning" hidden>
|
|
361
|
-
<strong>High-trust capability</strong>
|
|
362
|
-
<p>
|
|
382
|
+
<strong id="codex-install-warning-title">High-trust capability</strong>
|
|
383
|
+
<p id="codex-install-warning-detail">
|
|
363
384
|
Anyone holding the generated client credential can control Codex
|
|
364
385
|
inside its isolated container, act through your signed-in ChatGPT
|
|
365
386
|
session, and may be able to recover that container's ChatGPT session
|
|
@@ -445,10 +466,8 @@
|
|
|
445
466
|
</dl>
|
|
446
467
|
|
|
447
468
|
<aside id="codex-production-warning" class="high-trust-warning" hidden>
|
|
448
|
-
<strong>Experimental
|
|
449
|
-
<p>
|
|
450
|
-
Codex App Server WebSocket is experimental and unsupported for production workloads.
|
|
451
|
-
</p>
|
|
469
|
+
<strong id="codex-production-warning-title">Experimental Codex integration</strong>
|
|
470
|
+
<p id="codex-production-warning-detail"></p>
|
|
452
471
|
</aside>
|
|
453
472
|
|
|
454
473
|
<section id="codex-login" class="codex-login" aria-labelledby="codex-login-title" hidden>
|
|
@@ -492,6 +511,98 @@
|
|
|
492
511
|
</div>
|
|
493
512
|
</section>
|
|
494
513
|
|
|
514
|
+
<section
|
|
515
|
+
id="chat-tester"
|
|
516
|
+
class="chat-tester"
|
|
517
|
+
aria-labelledby="chat-tester-title"
|
|
518
|
+
hidden
|
|
519
|
+
>
|
|
520
|
+
<div class="chat-tester-heading">
|
|
521
|
+
<div>
|
|
522
|
+
<p class="section-label">Local-only tester</p>
|
|
523
|
+
<h3 id="chat-tester-title">Test this local Chat Adapter</h3>
|
|
524
|
+
<p>
|
|
525
|
+
Relmio sends this browser only to its same-origin local wizard.
|
|
526
|
+
The wizard then calls the literal loopback adapter address.
|
|
527
|
+
</p>
|
|
528
|
+
</div>
|
|
529
|
+
<button
|
|
530
|
+
id="chat-tester-reset"
|
|
531
|
+
class="button secondary"
|
|
532
|
+
type="button"
|
|
533
|
+
>
|
|
534
|
+
Forget tester
|
|
535
|
+
</button>
|
|
536
|
+
</div>
|
|
537
|
+
|
|
538
|
+
<form id="chat-tester-secure-form" class="chat-tester-form">
|
|
539
|
+
<fieldset>
|
|
540
|
+
<legend>Secure a temporary test session</legend>
|
|
541
|
+
<label class="field">
|
|
542
|
+
<span>Adapter base URL</span>
|
|
543
|
+
<input
|
|
544
|
+
id="chat-tester-endpoint"
|
|
545
|
+
type="url"
|
|
546
|
+
inputmode="url"
|
|
547
|
+
autocomplete="off"
|
|
548
|
+
spellcheck="false"
|
|
549
|
+
maxlength="64"
|
|
550
|
+
placeholder="http://127.0.0.1:14501"
|
|
551
|
+
pattern="http:\/\/127\.0\.0\.1:[1-9][0-9]{0,4}\/?"
|
|
552
|
+
required
|
|
553
|
+
/>
|
|
554
|
+
<small>Literal <code>http://127.0.0.1:PORT</code> only.</small>
|
|
555
|
+
</label>
|
|
556
|
+
<label class="field">
|
|
557
|
+
<span>Client credential</span>
|
|
558
|
+
<input
|
|
559
|
+
id="chat-tester-credential"
|
|
560
|
+
type="password"
|
|
561
|
+
autocomplete="off"
|
|
562
|
+
autocapitalize="none"
|
|
563
|
+
spellcheck="false"
|
|
564
|
+
maxlength="512"
|
|
565
|
+
required
|
|
566
|
+
/>
|
|
567
|
+
<small id="chat-tester-security-note">
|
|
568
|
+
The field is cleared as soon as you secure it. Encryption prevents accidental transit/storage exposure but not a compromised browser, extension, or local machine.
|
|
569
|
+
</small>
|
|
570
|
+
</label>
|
|
571
|
+
</fieldset>
|
|
572
|
+
<button id="chat-tester-secure" class="button primary" type="submit">
|
|
573
|
+
Secure credential for this test
|
|
574
|
+
</button>
|
|
575
|
+
</form>
|
|
576
|
+
|
|
577
|
+
<form id="chat-tester-message-form" class="chat-tester-message-form" hidden>
|
|
578
|
+
<label class="field" for="chat-tester-input">
|
|
579
|
+
<span>Message</span>
|
|
580
|
+
<textarea
|
|
581
|
+
id="chat-tester-input"
|
|
582
|
+
rows="3"
|
|
583
|
+
maxlength="8192"
|
|
584
|
+
spellcheck="true"
|
|
585
|
+
required
|
|
586
|
+
></textarea>
|
|
587
|
+
</label>
|
|
588
|
+
<button id="chat-tester-send" class="button primary" type="submit">
|
|
589
|
+
Send test message
|
|
590
|
+
</button>
|
|
591
|
+
</form>
|
|
592
|
+
|
|
593
|
+
<p id="chat-tester-status" class="chat-tester-status" role="status" aria-live="polite">
|
|
594
|
+
Secure the local client credential to begin.
|
|
595
|
+
</p>
|
|
596
|
+
<p id="chat-tester-error" class="chat-tester-error" role="alert" hidden></p>
|
|
597
|
+
<ol
|
|
598
|
+
id="chat-tester-transcript"
|
|
599
|
+
class="chat-tester-transcript"
|
|
600
|
+
role="log"
|
|
601
|
+
aria-live="polite"
|
|
602
|
+
aria-label="Local adapter test transcript"
|
|
603
|
+
></ol>
|
|
604
|
+
</section>
|
|
605
|
+
|
|
495
606
|
<aside id="client-warning" class="final-note"></aside>
|
|
496
607
|
|
|
497
608
|
<div class="actions">
|