Remote Control blocked `/previews/*`, so a phone or browser paired through the tunnel had no web preview at all: the entry was hidden and the agent's dev server stayed out of reach. Previews now work there, behind a host setting that is on by default. A preview's sandboxed document sends neither the device cookie nor a usable `Origin`, so the Remote Control gate admits a live `/previews/<token>/…` capability on its token alone, as local listeners already do, while the host's Web previews switch is on. The ingress, which refused every WebSocket, now admits preview upgrades only: `admitRemoteUpgrade()` parses the target exactly as the preview proxy does and the manager hands the socket to the application's path-preview upgrade handler, never to the shared upgrade event (so `/previews/<token>/../../sidecars/…` cannot reach another handler). Every other upgrade still gets 404. The switch lives in Settings → Remote Access → Remote Control. Only the host can change it (`PUT /api/remote-control/previews`); the registry stores only the opt-out. Turning it off refuses later preview requests, including the Referer-based root-relative asset fallback, and closes live preview WebSockets; remote `/api/meta` then reports `previewsUnavailable`, which hides Open web preview on paired devices. Exposing previews through a public tunnel makes their address a bearer credential, so path-proxied preview responses now carry `Content-Security-Policy: sandbox` with the iframe's own flags (one shared constant, `previews/sandbox.ts`) and `Referrer-Policy: same-origin`, on every content type. A preview document opened outside its iframe stays an opaque origin instead of running with CodeNomad's origin and device cookie, and the capability path stays out of Referer headers to other sites. Such a standalone document then behaves like the preview iframe: its root-relative resources rely on the runtime bridge's path rewriting, without the Referer fallback. The per-token preview.localhost host keeps its own origin and headers. Help (Remote Control, mobile and client overview pages, all ten locales), dev-docs/REMOTE_CONTROL.md, architecture.md and UI_SHELL.md describe the behavior; the switch label and caption are translated in all locales. Validation: a Remote Control surface test drives the real application through the ingress: a preview page and an `Origin: null` form post work without a device cookie and carry the sandbox and referrer headers, unknown tokens and non-preview or dot-segment upgrades get 404, a preview WebSocket upgrades, a paired device cannot change the switch, and turning it off closes the live WebSocket, refuses the preview and its Referer asset fallback, and flags the metadata. Registry, metadata and proxy tests cover persistence of the opt-out, the flag and the headers per entry point; browser tests cover the switch and the conversation header with previews on and off.
14 KiB
CodeNomad मद्दत
आफ्नो OpenCode सेवासँग हालको CodeNomad डेस्कटप वा ब्राउजर कार्यस्थान चलाउन यो गाइड प्रयोग गर्नुहोस्। यसले CodeNomad का नियन्त्रण, कार्यान्वयनका सीमा र पुनःप्राप्तिमा ध्यान दिन्छ—OpenCode कन्फिगरेसन सिकाउने सामग्री वा संस्करणको अभिलेखमा होइन।
पहिले यो पढ्नुहोस्
CodeNomad ले तपाईंको कार्यस्थानलाई एउटा साझा OpenCode पृष्ठभूमि सेवासँग जोड्छ। सत्र र सन्देश OpenCode का हुन्; ट्याब, कम्पोजरका मस्यौदा र लेआउट CodeNomad क्लाइन्टका हुन्। ट्याब बन्द गर्दा परियोजना CodeNomad मा बन्द हुन्छ, तर सत्र OpenCode मा चलिरहन्छन् र परियोजना फेरि खोल्दा भेटिन्छन्। CodeNomad बन्द गर्नु OpenCode रोक्नु होइन।
- होस्टका आवश्यकता र OpenCode सेटअप जाँच्नुहोस्।
- परियोजना खोल्नुहोस्, त्यसपछि कुराकानीका Agent, Model र Thinking नियन्त्रण रोज्नुहोस्।
- प्रमाणिकरण विवरण बदल्नु, सेवा पुनः सुरु गर्नु वा इतिहास मेट्नुअघि प्रभावित दायरा जाँच्नुहोस्। अरू क्लाइन्टले पनि त्यही नेटिभ सेवा प्रयोग गर्न सक्छन्।
सार्वजनिक मद्दत साइट CodeNomad, यसको ब्याकएन्ड वा लगइनबिना चल्छ। डेस्कटपको मद्दत → CodeNomad मद्दत र कमाण्ड प्यालेटको मद्दत खोल्नुहोस् ले यसलाई हालको UI भाषामा छुट्टै खोल्छन्। भाषा बदल्दा सुरक्षित कुराकानी अनुवाद हुँदैनन्।
स्थानीय डेस्कटप क्लाइन्टमा सेटिङहरू ले नेटिभ प्राथमिकताहरू विन्डो खोल्छ; ब्राउजर र रिमोट क्लाइन्टले भित्रैका सेटिङ प्रयोग गर्छन्। सेटिङहरू → प्रदायकहरू जस्ता मार्गले दुवैमा एउटै सेटिङ खण्ड जनाउँछन्।
तयार होस्टमा स्वतन्त्र ब्राउजर कार्यस्थानका लागि सर्भर गाइड ले यो सुरुवात र यसका प्रमाणीकरण/TLS आवश्यकताहरू बताउँछ:
npx @neuralnomads/codenomad --generate-token --launch
आफ्नो क्लाइन्ट रोज्नुहोस्
| क्षमता | स्थानीय डेस्कटप | प्रत्यक्ष ब्राउजर वा रिमोट सर्भर विन्डो | Remote Control बाट जोडिएको उपकरण |
|---|---|---|---|
| परियोजना, कुराकानी, फाइल र इतिहास | ब्याकएन्डका फोल्डर र नेटिभ सत्र | जोडिएको सर्भरका फोल्डर र सत्र | होस्टका अधिकृत कार्यस्थान सतहहरू |
| नेटिभ Preferences र डेस्कटप विन्डो | उपलब्ध | ब्राउजर/रिमोट सेटिङ क्लाइन्टमै रहन्छन् | होस्टमा मात्र हुने डेस्कटप नियन्त्रण उपलब्ध हुँदैनन् |
| सत्रको ब्राउजर पूर्वावलोकन | Electron र Windows Tauri मा नेटिभ; अन्य Tauri प्लेटफर्ममा iframe | उपलब्ध भएमा iframe | होस्टले वेब पूर्वावलोकन अनुमति दिँदा iframe (पूर्वनिर्धारित) |
| नेटिभ डेस्कटप/ब्राउजर स्वचालन | स्वामित्व भएका स्थानीय विन्डो/पूर्वावलोकन | नेटिभ डेस्कटप स्वचालनको विकल्प होइन | होस्टमा मात्र हुने स्वचालन endpoint उपलब्ध हुँदैनन् |
| प्रमाणीकरण | स्थानीय bootstrap वा पासवर्ड सत्र | सर्भर पासवर्ड सत्र | जोडिएको उपकरणको प्रमाणिकरण विवरण |
| PWA स्थापना | नेटिभ एप वा ब्राउजर प्रयोग गर्नुहोस् | ब्राउजरमा निर्भर; सुरक्षित सन्दर्भ आवश्यक | ब्राउजरमा निर्भर; जोडी बनाउनु अझै आवश्यक |
ठ्याक्कै सीमाका लागि ब्राउजर पूर्वावलोकन र SideCars, Remote Control र मोबाइल/PWA हेर्नुहोस्। रिमोट विन्डोले तपाईंको उपकरणको फाइल प्रणालीलाई सर्भर कार्यस्थान बनाउँदैन।
अवस्था कसको स्वामित्वमा छ बुझ्नुहोस्
| शब्द | CodeNomad मा अर्थ |
|---|---|
| परियोजना ट्याब / कार्यस्थान / इन्स्ट्यान्स | स्पष्ट रूपमा खोलिएको फोल्डरसँग CodeNomad को जडान; धेरै ट्याबले साझा सेवा प्रयोग गर्न सक्छन्। |
| कुराकानी / सत्र | आफ्नो डाइरेक्टरीसँग सम्बन्धित नेटिभ OpenCode इतिहास र कार्यान्वयन। |
| परिवार | कुराकानी र त्यसका सबै तहका उप-सत्र; स्थानान्तरण, गतिविधि, Yolo र Mission नियन्त्रणमा सान्दर्भिक। |
| Worktree | ब्राउज वा सत्र राख्न चयन गरिएको स्वामित्वभित्रको रिपोजिटरी checkout। यसलाई ब्राउज गर्दा कुराकानी सर्दैन। |
| Location | OpenCode को डाइरेक्टरी-दायराको नेटिभ रनटाइम सन्दर्भ; परियोजना ट्याब बन्द गर्दा CodeNomad ले यसलाई हटाउँदैन। यसको आयु OpenCode ले व्यवस्थापन गर्छ। |
| CodeNomad ब्याकएन्ड | कार्यस्थान, Git, प्रमाणीकरण र क्लाइन्ट जडान दिने सर्भर। यसको खाता र वातावरणले ब्याकएन्डको फाइल प्रणाली पहुँच निर्धारण गर्छन्। |
| कन्फिगरेसन | सर्भरको config डाइरेक्टरीभित्रका CodeNomad सेटिङ; Global/Project OpenCode सेटिङको आफ्नै नेटिभ दायरा हुन्छ। |
| विन्डो | आफ्नै ट्याब, नेभिगेसन, मस्यौदा र पुनर्स्थापित दृश्य। नेटिभ इतिहास साझा हुन्छ, हरेक विन्डोका लागि प्रतिलिपि हुँदैन। |
| डेस्कटप डेटा प्रोफाइल | सेटिङहरूमा रोजिएको नेटिभ/क्लाइन्ट भण्डारण; यसले OpenCode सत्र वा सबै साझा कन्फिगरेसन स्वतः अलग गर्दैन। |
कार्यस्थानको मूलले CodeNomad ले खोल्ने फोल्डर सीमित गर्छ; यो एजेन्ट sandbox होइन। होस्ट सार्वजनिक गर्नु वा उपकरणलाई व्यापक पहुँच दिनुअघि सुरक्षा समीक्षा गर्नुहोस्।
कामअनुसार हेर्नुहोस्
| काम | गाइड |
|---|---|
| कार्यस्थान स्थापना वा serve गर्ने | स्थापना, सर्भर सन्दर्भ, नेटवर्क र TLS |
| checkout र कुराकानीबीच काम गर्ने | परियोजना, कुराकानी, फाइल |
| इतिहास खोज्ने वा सुरक्षित सफाइ गर्ने | इतिहास |
| नेटिभ प्रश्न र अनुमति उत्तर दिने | अनुमति |
| सीमित वा दैनिक काम समन्वय गर्ने | मिसन |
| कार्यान्वयन र एकीकरण कन्फिगर गर्ने | OpenCode, प्रदायक, एकीकरण |
| अर्को उपकरण जोड्ने | Remote Control, सुरक्षा, मोबाइल |
| कार्यस्थान अनुकूल बनाउने | सेटिङ, सर्टकट, आवाज, विस्तार |
| नेटिभ एप व्यवस्थापन गर्ने | डेस्कटप, ब्राउजर पूर्वावलोकन र SideCars, अपडेट |
| समस्या पत्ता लगाउने वा योगदान गर्ने | समस्या समाधान, सहयोग र स्रोत build |
काम नबदली निगरानी गर्नुहोस्
Status प्यानलले सक्रिय सत्रको प्रदायक प्रयोग र नेटिभ पृष्ठभूमि Shell देखाउँछ। कुराकानीको स्थिति र उप-सत्र गतिविधिले काम गरिरहेका, संक्षिप्त भइरहेका र इनपुट पर्खिरहेका सत्र चिनाउँछन्। पृष्ठभूमि Shell निगरानी गर्नु कम्पोजरबाट Shell अनुरोध पठाउनु वा छुट्टै होस्ट गरिएको टर्मिनल SideCar प्रयोग गर्नुभन्दा फरक हो।
- चयन गरिएको कुराकानीको Location का लागि (वा कुराकानी चयन नभए खुला कार्यस्थानका लागि) स्थिति → पृष्ठभूमि शेलहरू खोल्नुहोस्।
- उपलब्ध भए आदेश, shell, डाइरेक्टरी, स्थिति, PID र exit code जाँच्नुहोस्; उपलब्ध नेटिभ आउटपुटका लागि आउटपुट हेर्नुहोस् रोज्नुहोस्।
- हटाउन, चलिरहेको बेला रोक्नुहोस् र हटाउनुहोस्, वा सकिएपछि हटाउनुहोस् प्रयोग गरी लक्ष्य पुष्टि गर्नुहोस्।
चलिरहेको Shell हटाउँदा त्यो प्रक्रिया रोकिन्छ; यसको आउटपुट विन्डो बन्द गर्दा रोकिँदैन। रिफ्रेस/पुनःजडानले छुटेका आउटपुट event पुनर्निर्माण नगरी हालको नेटिभ अवस्था पढ्छ।
नेटिभ परिवर्तन, पुनःजडान र दृश्यको मागपछि प्रदर्शन snapshot ताजा हुन्छन्। ती सुनिश्चित replay log होइनन्। नतिजा अनिश्चित भए परिवर्तन दोहोर्याउनुअघि आधिकारिक अवस्था रिफ्रेस गर्नुहोस्; सूचना वा event छुट्यो भन्दै फेरि नपठाउनुहोस्।