Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

module.exports = {
root: true,
parser: '@typescript-eslint/parser',
Expand Down
3 changes: 3 additions & 0 deletions .github/scripts/release-policy.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env bash
# Copyright (C) 2026 tis24dev
# SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0

# 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.

Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/license-header.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: License Headers

on:
push:
branches:
- main
pull_request:

defaults:
run:
shell: bash

permissions:
contents: read

jobs:
headers:
name: SPDX header check
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Checkout
uses: actions/checkout@v5

- name: Check SPDX PolyForm-Noncommercial-1.0.0 headers on TS/JS/shell sources
run: |
missing=0
while IFS= read -r f; do
case "$f" in
# third-party (MIT, (c) 2009 Kazuhiko Arase) — see NOTICE
server/src/qrcode.js) continue ;;
esac
if ! grep -Iq 'SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0' "$f"; then
echo "::error file=$f::missing SPDX PolyForm-Noncommercial-1.0.0 header"
missing=1
fi
done < <(git ls-files '*.ts' '*.mjs' '*.cjs' '*.js' '*.sh' '*.html')
exit $missing
332 changes: 131 additions & 201 deletions LICENSE

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
peershell — third-party attribution NOTICE
==========================================

peershell is licensed under the PolyForm Noncommercial License 1.0.0 (see
LICENSE). It bundles the following third-party component under its own license,
which is retained and to which the PolyForm Noncommercial terms do not apply:

- server/src/qrcode.js — "QR Code Generator for JavaScript"
Copyright (c) 2009 Kazuhiko Arase.
Licensed under the MIT License (http://www.opensource.org/licenses/mit-license.php).
The original MIT copyright and permission notice are preserved in the file header.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,16 @@ Authorise the domain in Brevo and add its **DKIM** records plus SPF (`include:sp

`tabby-peershell` is published to npm from `clients/tabby/` (keyword `tabby-plugin`, so Tabby's plugin
manager can find it). See `scripts/publish-plugins.mjs`.

## License

Copyright (C) 2026 tis24dev

Licensed under the [PolyForm Noncommercial License 1.0.0](LICENSE). You may use,
modify, and share this software for any noncommercial purpose, and contributions
back via pull request are welcome. Any commercial use requires a separate license
from the copyright holder. Previously released under Apache-2.0.

Bundled third-party components keep their own licenses; see [`NOTICE`](NOTICE).

See <https://polyformproject.org/licenses/noncommercial/1.0.0/> for the full terms.
4 changes: 2 additions & 2 deletions clients/tabby/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "tabby-peershell",
"version": "0.1.0-beta",
"version": "0.1.1-beta",
"description": "Share your terminal session anywhere (peershell): collaborative terminal for Tabby",
"keywords": [
"tabby-plugin"
],
"main": "dist/index.js",
"author": "tis24dev",
"license": "Apache-2.0",
"license": "PolyForm-Noncommercial-1.0.0",
"repository": "https://github.com/tis24dev/peershell",
"files": [
"dist",
Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/src/account/account.service.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

import { Injectable } from '@angular/core'
import { ConfigService } from 'tabby-core'

Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/src/account/login-modal.component.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

import { Component } from '@angular/core'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
import { AccountService, AccountApiResult } from './account.service'
Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

import { ConfigProvider } from 'tabby-core'

export class PeershellConfigProvider extends ConfigProvider {
Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/src/guest/mirrorSession.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

import { Injector } from '@angular/core'
import { Observable, Subject } from 'rxjs'
import { LogService } from 'tabby-core'
Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/src/guest/mirrorTab.component.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

import { Component, Injector, Input } from '@angular/core'
import { BaseTerminalTabComponent } from 'tabby-terminal'
import { SessionTransport, PinProvider } from '@peershell/protocol'
Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/src/host/share-info-modal.component.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

import { Component } from '@angular/core'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'

Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/src/host/shareController.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

/**
* Host side of a shared session. Deliberately Tabby-agnostic: it drives a SessionTransport and a
* small HostTerminal port, so it is fully unit-testable with mocks. PeershellService adapts a real
Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

/* eslint-disable @typescript-eslint/no-extraneous-class */
import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/src/providers/tabContextMenu.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

import { Injectable } from '@angular/core'
import { BaseTabComponent, TabContextMenuItemProvider, MenuItemOptions } from 'tabby-core'
import { BaseTerminalTabComponent } from 'tabby-terminal'
Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/src/providers/toolbarButtonProvider.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

import { Injectable } from '@angular/core'
import { ToolbarButtonProvider, ToolbarButton } from 'tabby-core'

Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/src/services/peershell.service.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

import { Injectable } from '@angular/core'
import { map, Subscription } from 'rxjs'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/src/settings/settings-tab.component.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

import { Component } from '@angular/core'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { ConfigService } from 'tabby-core'
Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/src/settings/settings-tab.provider.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

import { Injectable } from '@angular/core'
import { SettingsTabProvider } from 'tabby-settings'

Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/src/types/tabby.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

/**
* Minimal ambient type shims for the Tabby host packages we import. Lets the plugin build
* without compiling Tabby's full source tree (or installing all of Tabby's deps): the real
Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/test/hostGuest.integration.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

/**
* End-to-end interop of the two real controllers through the throwaway relay: ShareController (host,
* driving a mock terminal) <-> dev relay <-> MirrorController (guest, driving a mock sink). Verifies
Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/test/shareController.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

import { Subject } from 'rxjs'
import {
SessionTransport, ControlMessage, BinaryPayload, Channel, TransportState, base64ToUtf8, hashPin,
Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/test/smoke-load.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

// Stage 0+ smoke test: load the built UMD bundle the way Tabby would (nodeRequire) with the
// externalized host packages (@angular, tabby-*, rxjs, ...) generically stubbed, and instantiate
// the default NgModule. Confirms the bundle is valid, @peershell/protocol is inlined, decorators
Expand Down
5 changes: 5 additions & 0 deletions clients/tabby/webpack.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

// Self-contained plugin build. Mirrors Tabby's webpack.plugin.config.mjs but imports the toolchain
// from THIS repo's node_modules (the /opt/tabby checkout is source-only, not installed), and bundles
// our own code + @peershell/protocol (+ xterm later). Angular/RxJS/@ng-bootstrap/ngx-toastr/tabby-*
Expand Down
4 changes: 2 additions & 2 deletions clients/web/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@peershell/web-client",
"version": "0.1.0-beta",
"version": "0.1.1-beta",
"private": true,
"description": "peershell standalone browser client (xterm.js), served by the host over the tunnel",
"license": "Apache-2.0",
"license": "PolyForm-Noncommercial-1.0.0",
"scripts": {
"build": "webpack --config ./webpack.config.mjs",
"test": "echo \"(web-client: browser E2E; logic covered by @peershell/protocol tests)\""
Expand Down
5 changes: 5 additions & 0 deletions clients/web/src/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<!DOCTYPE html>
<!--
Copyright (C) 2026 tis24dev
SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
-->

<html lang="en">
<head>
<meta charset="utf-8">
Expand Down
5 changes: 5 additions & 0 deletions clients/web/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

import { Terminal } from '@xterm/xterm'
import { FitAddon } from '@xterm/addon-fit'
import '@xterm/xterm/css/xterm.css'
Expand Down
5 changes: 5 additions & 0 deletions clients/web/webpack.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

// Builds the browser web-client into a single self-contained dist/index.html (JS + CSS inlined),
// which the host embeds and serves over the reverse tunnel. Reuses @peershell/protocol from source.
import * as path from 'path'
Expand Down
5 changes: 5 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

/** Jest config for the monorepo (ts-jest, node env). Runs *.test.ts under shared/ and clients/. */
module.exports = {
testEnvironment: 'node',
Expand Down
5 changes: 5 additions & 0 deletions jest.setup.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

// jest-environment-node (Node 18) does not expose the Web Crypto global; the real runtimes
// (browsers, Electron renderer, Node >= 20) do. Provide it for tests so pinAuth can run.
if (!globalThis.crypto) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"description": "Take your terminal anywhere and work as if it were local",
"license": "Apache-2.0",
"license": "PolyForm-Noncommercial-1.0.0",
"repository": "https://github.com/tis24dev/peershell",
"workspaces": [
"shared",
Expand Down
5 changes: 5 additions & 0 deletions scripts/check-version-lockstep.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

// The publishable/workspace package.json versions must stay in lockstep (the release
// pipeline bumps them together). Fails CI if they diverge.
import { readFileSync } from 'node:fs'
Expand Down
5 changes: 5 additions & 0 deletions scripts/copy-web-asset.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env node
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

// Copies the built, self-contained web-client HTML into the Tabby plugin so it can
// be embedded (asset/source) and served over the outbound tunnel (httpTunnelHandler).
// Fails loudly if the source is missing so `build:all` never silently ships a stale/absent page.
Expand Down
5 changes: 5 additions & 0 deletions scripts/package-plugin.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

// Stage the loadable Tabby plugin (package.json + built dist/) and zip it to
// tabby-peershell.zip at the repo root. The web-client HTML is bundled into
// dist/index.js at build time, so only package.json + dist/ are needed.
Expand Down
5 changes: 5 additions & 0 deletions scripts/publish-plugins.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env node
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

// Publishes the Tabby plugin (clients/tabby -> npm "tabby-peershell") from the monorepo subdir.
// Verifies the bundle exists before publishing. Version bump/tagging is expected to be done
// beforehand (or by CI on a release tag). Kept intentionally small.
Expand Down
4 changes: 2 additions & 2 deletions server/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@peershell/server",
"version": "0.1.0-beta",
"version": "0.1.1-beta",
"private": true,
"description": "peershell rendezvous + blind relay + reverse HTTP tunnel (MVP; accounts/dashboard in Stage 6)",
"license": "Apache-2.0",
"license": "PolyForm-Noncommercial-1.0.0",
"main": "src/index.cjs",
"scripts": {
"start": "node src/index.cjs",
Expand Down
5 changes: 5 additions & 0 deletions server/src/index.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (C) 2026 tis24dev
* SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
*/

/**
* @peershell/server: rendezvous + blind relay + reverse HTTP tunnel + accounts.
*
Expand Down
Loading