Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
7a557f9
Stage 0: scaffold peershell monorepo (npm workspaces)
tis24dev Jul 7, 2026
48debdf
Stage 1: jest+ts-jest test foundation + @peershell/protocol unit tests
tis24dev Jul 7, 2026
5a87048
Stage 1: shared WebSocketTransport + dev relay + end-to-end wire test
tis24dev Jul 7, 2026
3035061
Stage 1: Tabby host glue — ShareController, providers, service
tis24dev Jul 7, 2026
962c37e
Stage 2: MirrorController (guest logic) + host<->guest integration test
tis24dev Jul 7, 2026
c5b064e
Stage 2: MirrorSession + MirrorTabComponent + join flow
tis24dev Jul 7, 2026
5e24f5a
Stage 3: PIN challenge-response gate + keepalive + magic-link display
tis24dev Jul 8, 2026
8a96378
Stage 4: promote MirrorController to shared + HTTP tunnel
tis24dev Jul 8, 2026
8235f9a
Stage 4: browser web-client (xterm.js) self-contained build
tis24dev Jul 8, 2026
bc9a80a
Stage 4: host serves the embedded web-client over the tunnel
tis24dev Jul 8, 2026
aa51d85
Stage 5a: productionize relay into @peershell/server
tis24dev Jul 8, 2026
32a4068
Stage 6 server: accounts + auth-gate on create-session
tis24dev Jul 8, 2026
41de568
Stage 6 client: account modal + gate sharing behind login
tis24dev Jul 8, 2026
ae15160
Stage 7: send verification codes via Brevo (relay, not VM SMTP)
tis24dev Jul 8, 2026
9e65d6b
Stage 7: first-run no-E2E disclaimer dialog + server env docs
tis24dev Jul 8, 2026
8201b8b
Stage 7: settings tab with account management + live-shares dashboard
tis24dev Jul 8, 2026
0c5f9d3
Stage 7: single peershell toolbar button opening a popup menu
tis24dev Jul 8, 2026
ecd2806
Stage 7: CORS on the account REST API (+ OPTIONS preflight)
tis24dev Jul 8, 2026
c1f0c2f
Stage 7: "Create account" registers directly (one less step)
tis24dev Jul 8, 2026
5babfbd
Stage 7: default serverUrl to wss://panel.peershell.dev
tis24dev Jul 8, 2026
5181178
Stage 7: account UX — auto-verify without email, close on register, l…
tis24dev Jul 8, 2026
edde7f2
chore: gitignore local plugin packaging artifacts (build/, tabby-peer…
tis24dev Jul 8, 2026
8433c03
Stage 7: surface account request errors in the modal (network detail …
tis24dev Jul 9, 2026
a6de1e6
Stage 7: fix config write — mutate store.peershell.* instead of reass…
tis24dev Jul 9, 2026
645a31e
Stage 7: show only Log in in the menu when signed out
tis24dev Jul 9, 2026
63fca06
Stage 7: resolve focused terminal from SplitTabComponent for Share
tis24dev Jul 9, 2026
a1645ca
Stage 7: show PIN + magic-link in a persistent copyable modal (not a …
tis24dev Jul 9, 2026
4df2722
Stage 7: menu shows 'Stop sharing this terminal' when the focused tab…
tis24dev Jul 9, 2026
93905b0
Stage 7: robust focused-terminal resolution (fall back to tab termina…
tis24dev Jul 9, 2026
b530fff
Stage 7: end the host share when the guest disconnects (peer-left -> …
tis24dev Jul 9, 2026
05ef1c2
Stage 7: 10s grace window before closing a share on guest disconnect
tis24dev Jul 9, 2026
da5b05b
Stage 7: web-client auto-reconnects (cached PIN, ~12s window) to surv…
tis24dev Jul 9, 2026
c7ad7f4
Stage 7: mobile extra-keys bar in web-client (arrows/Esc/Tab/Ctrl/Alt…
tis24dev Jul 9, 2026
3d08999
Stage 7: minimal web dashboard + persistent share history
tis24dev Jul 9, 2026
dabf257
Stage 7: center the dashboard login block on screen
tis24dev Jul 9, 2026
92343ce
Stage 7: dashboard UI in English
tis24dev Jul 9, 2026
4818ab2
Stage 7: store passwords as salted scrypt hashes (memory-hard), never…
tis24dev Jul 9, 2026
a09010c
docs: add USER_GUIDE.md (end-user documentation for peershell)
tis24dev Jul 9, 2026
aa3a143
Stage 7: auto-stop a share with no connected guest within 300s
tis24dev Jul 9, 2026
ceaebd4
docs: note the 5-minute auto-stop for unused shares
tis24dev Jul 9, 2026
cc9e61f
Stage 7: dashboard settings (change password + enable/disable 2FA) + …
tis24dev Jul 9, 2026
8a59a7b
Stage 7: dashboard Settings split (Change password / 2FA buttons) + Q…
tis24dev Jul 9, 2026
669c4b9
chore: gitignore server/data runtime store
tis24dev Jul 9, 2026
808ce2e
Stage 7: settings as flat navigation (menu -> section -> back), no st…
tis24dev Jul 9, 2026
580c8d9
Stage 7: 2FA section shows status + activation date; button toggles e…
tis24dev Jul 9, 2026
bf7c45e
ci/release: align to sibling repos (tag pipeline, main protection, ar…
tis24dev Jul 9, 2026
5260710
chore: set version 0.1.0-beta
github-actions[bot] Jul 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: { ecmaVersion: 2020, sourceType: 'module' },
env: { node: true, browser: true, es2020: true },
plugins: ['@typescript-eslint'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
ignorePatterns: [
'node_modules/',
'**/dist/',
'build/',
'coverage/',
'**/*.map',
'**/*.html',
'server/src/qrcode.js', // vendored QR generator (third-party)
'clients/tabby/assets/', // generated web-client asset
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-this-alias': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', {
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
}],
},
overrides: [
// Ambient type shims mirror the host API and legitimately carry unused type params.
{ files: ['**/*.d.ts'], rules: { '@typescript-eslint/no-unused-vars': 'off' } },
],
}
4 changes: 4 additions & 0 deletions .github/keys/peershell_release.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE58hHI/hgG1Hs4xxQPr/EMCFXKlPq
O9wMvIYPCFHqu+f66BKJ6VQEpnjQj+2q2Axk6PcvvDuhGktlAx/qHEqnRQ==
-----END PUBLIC KEY-----
156 changes: 156 additions & 0 deletions .github/scripts/release-policy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
#!/usr/bin/env bash
# Shared release-gate helpers. Sourced by the release workflows. On write-credentialed
# jobs it is sourced from origin/main (the trusted base), never from the pushed tag tree.

RELEASE_TAG_REGEX='^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$'
# Unprotected trigger tag that starts a release. It deliberately does NOT match the
# protected v*.*.* ruleset, so it can be created/deleted freely; the real vX.Y.Z tag
# is created once on the squash commit by post-merge-release.
PR_TAG_REGEX='^pr-v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$'

# Workspace package.json files kept in lockstep (the "hybrid version-file"). The root
# package.json stays private at 0.0.0 and is NOT bumped. clients/tabby is canonical
# (the primary published artifact, tabby-peershell).
WORKSPACE_PKGS=(shared/package.json clients/web/package.json clients/tabby/package.json server/package.json)
CANONICAL_PKG='clients/tabby/package.json'

die() {
echo "::error::$*" >&2
exit 1
}

notice() {
echo "::notice::$*"
}

is_release_tag() {
[[ "${1:-}" =~ ${RELEASE_TAG_REGEX} ]]
}

validate_release_tag() {
local tag="${1:-}"
if ! is_release_tag "${tag}"; then
die "Invalid release tag '${tag}'. Allowed formats are vX.Y.Z and vX.Y.Z-<suffix>."
fi
}

# Any prerelease suffix (-rc1, -beta1, ...) marks a prerelease.
is_beta_tag() {
[[ "${1:-}" == *-* ]]
}

is_pr_tag() {
[[ "${1:-}" =~ ${PR_TAG_REGEX} ]]
}

# pr-vX.Y.Z -> vX.Y.Z (the release tag that will be CREATED at merge).
release_tag_from_pr_tag() {
local pr_tag="${1:-}"
if ! is_pr_tag "${pr_tag}"; then
die "Invalid trigger tag '${pr_tag}'. Expected pr-vX.Y.Z or pr-vX.Y.Z-<suffix>."
fi
printf '%s\n' "${pr_tag#pr-}"
}

version_from_tag() {
local tag="${1:-}"
validate_release_tag "${tag}"
printf '%s\n' "${tag#v}"
}

# Read the canonical workspace version at a git ref (via node, always present).
version_at_ref() {
local ref="${1:-}"
git show "${ref}:${CANONICAL_PKG}" \
| node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>process.stdout.write(String(JSON.parse(s).version)))'
}

# Rewrite .version in each workspace package.json (2-space indent + trailing newline).
set_version() {
local version="${1:-}"
local pkg
for pkg in "${WORKSPACE_PKGS[@]}"; do
node -e '
const fs = require("fs");
const [file, version] = process.argv.slice(1);
const j = JSON.parse(fs.readFileSync(file, "utf8"));
j.version = version;
fs.writeFileSync(file, JSON.stringify(j, null, 2) + "\n");
' "${pkg}" "${version}"
done
}

# Assert every workspace version at <ref> equals the tag version (the lockstep invariant).
assert_versions_match_tag() {
local ref="${1:-}"
local tag="${2:-}"
local expected pkg actual
expected="$(version_from_tag "${tag}")"
for pkg in "${WORKSPACE_PKGS[@]}"; do
actual="$(git show "${ref}:${pkg}" \
| node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>process.stdout.write(String(JSON.parse(s).version)))')"
if [[ "${actual}" != "${expected}" ]]; then
die "${pkg} version '${actual}' does not match tag '${tag}' (expected '${expected}')."
fi
done
}

extract_pr_marker() {
local marker="${1:-}"
PR_MARKER="${marker}" node -e '
const body = process.env.PR_BODY || "";
const marker = process.env.PR_MARKER.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
const re = new RegExp("^<!-- " + marker + ": ([^<\\n]+) -->$", "m");
const m = body.match(re);
if (!m) { process.exit(1); }
process.stdout.write(m[1].trim());
'
}

delete_remote_tag() {
local tag="${1:-}"
git push origin ":refs/tags/${tag}" || \
echo "::warning::Failed to delete tag ${tag} (non-fatal); it may need manual cleanup before this version can be re-released."
}

# Existence probes that DISTINGUISH absent from error (fail closed on error). Echo: present|absent|error.
remote_tag_state() {
local tag="${1:-}"
local rc=0
git ls-remote --exit-code --tags origin "refs/tags/${tag}" >/dev/null 2>&1 || rc=$?
case "${rc}" in
0) echo "present" ;;
2) echo "absent" ;;
*) echo "error" ;;
esac
}

remote_release_state() {
local tag="${1:-}"
local out
local rc=0
out="$(gh api "repos/${GITHUB_REPOSITORY}/releases/tags/${tag}" 2>&1)" || rc=$?
if [[ "${rc}" -eq 0 ]]; then
echo "present"
elif printf '%s' "${out}" | grep -qi 'HTTP 404\|Not Found'; then
echo "absent"
else
echo "error"
fi
}

assert_release_tag_absent() {
local tag="${1:-}"
case "$(remote_tag_state "${tag}")" in
present) die "Tag ${tag} already exists and is immutable." ;;
error) die "Could not determine whether tag ${tag} exists (git ls-remote failed); aborting." ;;
esac
}

assert_release_absent() {
local tag="${1:-}"
case "$(remote_release_state "${tag}")" in
present) die "Release ${tag} already exists." ;;
error) die "Could not determine whether release ${tag} exists (gh api failed); aborting." ;;
esac
}
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
pull_request:
branches:
- main
- dev
push:
branches:
- dev

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
name: ci
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install
run: npm ci || npm install

- name: Lint
run: npm run lint

- name: Build all (also typechecks every workspace)
run: npm run build:all

- name: Test
run: npm test

- name: Smoke
run: npm run test:smoke

- name: Version lockstep
run: node scripts/check-version-lockstep.mjs

- name: Dependency audit (advisory)
run: npm audit --audit-level=high || true
42 changes: 42 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CodeQL

# Static security analysis. On a PRIVATE repo, code scanning requires GitHub Advanced
# Security; without it the analyze step fails, so this workflow is NOT a required check
# (it runs best-effort). Make it required once the repo is public or GHAS is enabled.
on:
push:
branches:
- dev
- main
pull_request:
branches:
- dev
- main
schedule:
- cron: "30 4 * * 1"

permissions:
contents: read
security-events: write

concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true

jobs:
codeql:
name: codeql
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: javascript-typescript

- name: Analyze
uses: github/codeql-action/analyze@v3
Loading
Loading