Cassiiopeia/projectops / plugins/projectops-extras/skills/pro-remote-link
pro-remote-link
VerifiedGive one link to open a desktop agent app (Orca, Paseo) on this computer from outside: Orca through a cloudflared quick tunnel and its saved pairing link, Paseo through its relay pairing link. Use for 'Orca link', 'Orca URL', 'Orca tunnel', 'Paseo link', 'remote link', 'open from outside'.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.7 KB |
| harness/orca.md | markdown | 3.0 KB |
| harness/paseo.md | markdown | 4.3 KB |
| scripts/remote_apps/__init__.py | script | 961 B |
| scripts/remote_apps/orca.py | script | 1.6 KB |
| scripts/remote_apps/paseo.py | script | 7.5 KB |
| scripts/remote_link_cli.py | script | 11.2 KB |
| scripts/tunnel/__init__.py | script | 105 B |
| scripts/tunnel/links.py | script | 3.2 KB |
| scripts/tunnel/probe.py | script | 2.9 KB |
| scripts/tunnel/proc.py | script | 4.1 KB |
| scripts/tunnel/processes.py | script | 6.5 KB |
| scripts/tunnel/state.py | script | 2.3 KB |
scripts/tunnel/links.py
View on GitHub"""Store app access links and swap the tunnel host: replaces the old tunnel host inside a link without knowing the app's format
Replaces plain URLs and URLs inside base64(JSON) values. If a format change hides it, host_not_found (handled via the harness)
"""
from __future__ import annotations
import base64
import json
import re
import urllib.parse
from . import state
# Quick tunnel host name (to find the old address)
TUNNEL_HOST_PATTERN = re.compile(r"[a-z0-9-]+\.trycloudflare\.com")
# Chunks that look like base64 (length 40+)
ENCODED_CHUNK_PATTERN = re.compile(r"[A-Za-z0-9+/_-]{40,}={0,2}")
def link_path(app: str):
safe_name = re.sub(r"[^a-z0-9-]", "-", app.lower())
return state.STATE_DIR / f"link-{safe_name}.txt"
def save(app: str, link: str) -> None:
"""Save as an owner-only file (links may carry device auth values)"""
state.write_private(link_path(app), link.strip())
def load(app: str) -> str | None:
try:
text = link_path(app).read_text(encoding="utf-8").strip()
except OSError:
return None
return text or None
def _decode_chunk(chunk: str) -> tuple[str, bool, bool] | None:
"""(decoded text, was url-safe, had padding). None if not JSON"""
padded = chunk + "=" * (-len(chunk) % 4)
is_url_safe = "-" in chunk or "_" in chunk
decoder = base64.urlsafe_b64decode if is_url_safe else base64.b64decode
try:
text = decoder(padded).decode("utf-8")
json.loads(text)
except (ValueError, UnicodeDecodeError):
return None
return text, is_url_safe, chunk.endswith("=")
def _encode_chunk(text: str, is_url_safe: bool, is_padded: bool) -> str:
raw = text.encode("utf-8")
encoded = (base64.urlsafe_b64encode(raw) if is_url_safe else base64.b64encode(raw)).decode("ascii")
return encoded if is_padded else encoded.rstrip("=")
def retarget(link: str, new_host: str) -> tuple[str, int]:
"""Every trycloudflare host in the link > new_host. (new link, replacement count)"""
replaced = 0
def replace_hosts(text: str) -> str:
nonlocal replaced
updated, count = TUNNEL_HOST_PATTERN.subn(new_host, text)
replaced += count
return updated
# Undo one layer of percent-encoding to look inside (#pairing=orca%3A%2F%2F...)
is_quoted = "%3A" in link or "%3D" in link
working = urllib.parse.unquote(link) if is_quoted else link
def replace_encoded(match: re.Match) -> str:
decoded = _decode_chunk(match.group(0))
if decoded is None:
return match.group(0)
text, is_url_safe, is_padded = decoded
updated = replace_hosts(text)
return _encode_chunk(updated, is_url_safe, is_padded) if updated != text else match.group(0)
working = ENCODED_CHUNK_PATTERN.sub(replace_encoded, working)
working = replace_hosts(working)
if not is_quoted:
return working, replaced
# Re-wrap: encode only the value after the first # as before
if "#" in working:
head, fragment = working.split("#", 1)
if "=" in fragment:
key, value = fragment.split("=", 1)
return f"{head}#{key}={urllib.parse.quote(value, safe='')}", replaced
return urllib.parse.quote(working, safe=":/?#&="), replaced
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |