diff --git a/.eslintrc.cjs b/.eslintrc.cjs index fb7ea14..0c223ae 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + module.exports = { root: true, parser: '@typescript-eslint/parser', diff --git a/.github/scripts/release-policy.sh b/.github/scripts/release-policy.sh index 90dacdf..a773891 100755 --- a/.github/scripts/release-policy.sh +++ b/.github/scripts/release-policy.sh @@ -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. diff --git a/.github/workflows/license-header.yml b/.github/workflows/license-header.yml new file mode 100644 index 0000000..6bd12cd --- /dev/null +++ b/.github/workflows/license-header.yml @@ -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 diff --git a/LICENSE b/LICENSE index 261eeb9..1a71cb6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,131 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +# PolyForm Noncommercial License 1.0.0 + + + +## Acceptance + +In order to get any license under these terms, you must agree +to them as both strict obligations and conditions to all +your licenses. + +## Copyright License + +The licensor grants you a copyright license for the +software to do everything you might do with the software +that would otherwise infringe the licensor's copyright +in it for any permitted purpose. However, you may +only distribute the software according to [Distribution +License](#distribution-license) and make changes or new works +based on the software according to [Changes and New Works +License](#changes-and-new-works-license). + +## Distribution License + +The licensor grants you an additional copyright license +to distribute copies of the software. Your license +to distribute covers distributing the software with +changes and new works permitted by [Changes and New Works +License](#changes-and-new-works-license). + +## Notices + +You must ensure that anyone who gets a copy of any part of +the software from you also gets a copy of these terms or the +URL for them above, as well as copies of any plain-text lines +beginning with `Required Notice:` that the licensor provided +with the software. For example: + +> Required Notice: Copyright Yoyodyne, Inc. (http://example.com) + +## Changes and New Works License + +The licensor grants you an additional copyright license to +make changes and new works based on the software for any +permitted purpose. + +## Patent License + +The licensor grants you a patent license for the software that +covers patent claims the licensor can license, or becomes able +to license, that you would infringe by using the software. + +## Noncommercial Purposes + +Any noncommercial purpose is a permitted purpose. + +## Personal Uses + +Personal use for research, experiment, and testing for +the benefit of public knowledge, personal study, private +entertainment, hobby projects, amateur pursuits, or religious +observance, without any anticipated commercial application, +is use for a permitted purpose. + +## Noncommercial Organizations + +Use by any charitable organization, educational institution, +public research organization, public safety or health +organization, environmental protection organization, +or government institution is use for a permitted purpose +regardless of the source of funding or obligations resulting +from the funding. + +## Fair Use + +You may have "fair use" rights for the software under the +law. These terms do not limit them. + +## No Other Rights + +These terms do not allow you to sublicense or transfer any of +your licenses to anyone else, or prevent the licensor from +granting licenses to anyone else. These terms do not imply +any other licenses. + +## Patent Defense + +If you make any written claim that the software infringes or +contributes to infringement of any patent, your patent license +for the software granted under these terms ends immediately. If +your company makes such a claim, your patent license ends +immediately for work on behalf of your company. + +## Violations + +The first time you are notified in writing that you have +violated any of these terms, or done anything with the software +not covered by your licenses, your licenses can nonetheless +continue if you come into full compliance with these terms, +and take practical steps to correct past violations, within +32 days of receiving notice. Otherwise, all your licenses +end immediately. + +## No Liability + +***As far as the law allows, the software comes as is, without +any warranty or condition, and the licensor will not be liable +to you for any damages arising out of these terms or the use +or nature of the software, under any kind of legal claim.*** + +## Definitions + +The **licensor** is the individual or entity offering these +terms, and the **software** is the software the licensor makes +available under these terms. + +**You** refers to the individual or entity agreeing to these +terms. + +**Your company** is any legal entity, sole proprietorship, +or other kind of organization that you work for, plus all +organizations that have control over, are under the control of, +or are under common control with that organization. **Control** +means ownership of substantially all the assets of an entity, +or the power to direct its management and policies by vote, +contract, or otherwise. Control can be direct or indirect. + +**Your licenses** are all the licenses granted to you for the +software under these terms. + +**Use** means anything you do with the software requiring one +of your licenses. diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..80e228b --- /dev/null +++ b/NOTICE @@ -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. diff --git a/README.md b/README.md index 4031578..d3a9707 100644 --- a/README.md +++ b/README.md @@ -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 for the full terms. diff --git a/clients/tabby/package.json b/clients/tabby/package.json index 5c58fd5..79cf33c 100644 --- a/clients/tabby/package.json +++ b/clients/tabby/package.json @@ -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", diff --git a/clients/tabby/src/account/account.service.ts b/clients/tabby/src/account/account.service.ts index b346fb8..8b23d63 100644 --- a/clients/tabby/src/account/account.service.ts +++ b/clients/tabby/src/account/account.service.ts @@ -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' diff --git a/clients/tabby/src/account/login-modal.component.ts b/clients/tabby/src/account/login-modal.component.ts index 2b9d5c6..71a71db 100644 --- a/clients/tabby/src/account/login-modal.component.ts +++ b/clients/tabby/src/account/login-modal.component.ts @@ -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' diff --git a/clients/tabby/src/config.ts b/clients/tabby/src/config.ts index ca84563..fa35671 100644 --- a/clients/tabby/src/config.ts +++ b/clients/tabby/src/config.ts @@ -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 { diff --git a/clients/tabby/src/guest/mirrorSession.ts b/clients/tabby/src/guest/mirrorSession.ts index 3cc8067..9b90809 100644 --- a/clients/tabby/src/guest/mirrorSession.ts +++ b/clients/tabby/src/guest/mirrorSession.ts @@ -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' diff --git a/clients/tabby/src/guest/mirrorTab.component.ts b/clients/tabby/src/guest/mirrorTab.component.ts index 435a014..975e579 100644 --- a/clients/tabby/src/guest/mirrorTab.component.ts +++ b/clients/tabby/src/guest/mirrorTab.component.ts @@ -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' diff --git a/clients/tabby/src/host/share-info-modal.component.ts b/clients/tabby/src/host/share-info-modal.component.ts index a3816fc..4c7666e 100644 --- a/clients/tabby/src/host/share-info-modal.component.ts +++ b/clients/tabby/src/host/share-info-modal.component.ts @@ -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' diff --git a/clients/tabby/src/host/shareController.ts b/clients/tabby/src/host/shareController.ts index 71fd484..a223b7b 100644 --- a/clients/tabby/src/host/shareController.ts +++ b/clients/tabby/src/host/shareController.ts @@ -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 diff --git a/clients/tabby/src/index.ts b/clients/tabby/src/index.ts index 01034f0..1edc764 100644 --- a/clients/tabby/src/index.ts +++ b/clients/tabby/src/index.ts @@ -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' diff --git a/clients/tabby/src/providers/tabContextMenu.ts b/clients/tabby/src/providers/tabContextMenu.ts index 0371ae1..05ebda5 100644 --- a/clients/tabby/src/providers/tabContextMenu.ts +++ b/clients/tabby/src/providers/tabContextMenu.ts @@ -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' diff --git a/clients/tabby/src/providers/toolbarButtonProvider.ts b/clients/tabby/src/providers/toolbarButtonProvider.ts index 0f7d013..dae65dc 100644 --- a/clients/tabby/src/providers/toolbarButtonProvider.ts +++ b/clients/tabby/src/providers/toolbarButtonProvider.ts @@ -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' diff --git a/clients/tabby/src/services/peershell.service.ts b/clients/tabby/src/services/peershell.service.ts index 3d00b60..a691e3b 100644 --- a/clients/tabby/src/services/peershell.service.ts +++ b/clients/tabby/src/services/peershell.service.ts @@ -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' diff --git a/clients/tabby/src/settings/settings-tab.component.ts b/clients/tabby/src/settings/settings-tab.component.ts index 5fca94a..9b809e0 100644 --- a/clients/tabby/src/settings/settings-tab.component.ts +++ b/clients/tabby/src/settings/settings-tab.component.ts @@ -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' diff --git a/clients/tabby/src/settings/settings-tab.provider.ts b/clients/tabby/src/settings/settings-tab.provider.ts index 8508d25..84088f7 100644 --- a/clients/tabby/src/settings/settings-tab.provider.ts +++ b/clients/tabby/src/settings/settings-tab.provider.ts @@ -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' diff --git a/clients/tabby/src/types/tabby.d.ts b/clients/tabby/src/types/tabby.d.ts index 5ef7801..60e0935 100644 --- a/clients/tabby/src/types/tabby.d.ts +++ b/clients/tabby/src/types/tabby.d.ts @@ -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 diff --git a/clients/tabby/test/hostGuest.integration.test.ts b/clients/tabby/test/hostGuest.integration.test.ts index 128f0b5..b3675ca 100644 --- a/clients/tabby/test/hostGuest.integration.test.ts +++ b/clients/tabby/test/hostGuest.integration.test.ts @@ -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 diff --git a/clients/tabby/test/shareController.test.ts b/clients/tabby/test/shareController.test.ts index 5b57539..684831a 100644 --- a/clients/tabby/test/shareController.test.ts +++ b/clients/tabby/test/shareController.test.ts @@ -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, diff --git a/clients/tabby/test/smoke-load.cjs b/clients/tabby/test/smoke-load.cjs index 7138f31..d55dbb2 100644 --- a/clients/tabby/test/smoke-load.cjs +++ b/clients/tabby/test/smoke-load.cjs @@ -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 diff --git a/clients/tabby/webpack.config.mjs b/clients/tabby/webpack.config.mjs index 5dea8f0..2117a9c 100644 --- a/clients/tabby/webpack.config.mjs +++ b/clients/tabby/webpack.config.mjs @@ -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-* diff --git a/clients/web/package.json b/clients/web/package.json index 32f5d6e..bebf1ae 100644 --- a/clients/web/package.json +++ b/clients/web/package.json @@ -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)\"" diff --git a/clients/web/src/index.html b/clients/web/src/index.html index 14708fb..43fd24b 100644 --- a/clients/web/src/index.html +++ b/clients/web/src/index.html @@ -1,4 +1,9 @@ + + diff --git a/clients/web/src/index.ts b/clients/web/src/index.ts index 1af2a90..8cab620 100644 --- a/clients/web/src/index.ts +++ b/clients/web/src/index.ts @@ -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' diff --git a/clients/web/webpack.config.mjs b/clients/web/webpack.config.mjs index 435f0b8..7380d06 100644 --- a/clients/web/webpack.config.mjs +++ b/clients/web/webpack.config.mjs @@ -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' diff --git a/jest.config.cjs b/jest.config.cjs index a6f7baa..a9fd7f5 100644 --- a/jest.config.cjs +++ b/jest.config.cjs @@ -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', diff --git a/jest.setup.cjs b/jest.setup.cjs index da91d3b..e1cf740 100644 --- a/jest.setup.cjs +++ b/jest.setup.cjs @@ -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) { diff --git a/package.json b/package.json index c73d25c..255da92 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/scripts/check-version-lockstep.mjs b/scripts/check-version-lockstep.mjs index 69f72e4..e314aa8 100644 --- a/scripts/check-version-lockstep.mjs +++ b/scripts/check-version-lockstep.mjs @@ -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' diff --git a/scripts/copy-web-asset.mjs b/scripts/copy-web-asset.mjs index 96294be..ba9e5c5 100644 --- a/scripts/copy-web-asset.mjs +++ b/scripts/copy-web-asset.mjs @@ -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. diff --git a/scripts/package-plugin.mjs b/scripts/package-plugin.mjs index cc3e5e6..c83bbbf 100644 --- a/scripts/package-plugin.mjs +++ b/scripts/package-plugin.mjs @@ -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. diff --git a/scripts/publish-plugins.mjs b/scripts/publish-plugins.mjs index 6e24d7a..a20a465 100644 --- a/scripts/publish-plugins.mjs +++ b/scripts/publish-plugins.mjs @@ -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. diff --git a/server/package.json b/server/package.json index b5c5213..db4acf4 100644 --- a/server/package.json +++ b/server/package.json @@ -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", diff --git a/server/src/index.cjs b/server/src/index.cjs index b9527ed..b5914b1 100644 --- a/server/src/index.cjs +++ b/server/src/index.cjs @@ -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. * diff --git a/shared/package.json b/shared/package.json index ada27ff..8dcc929 100644 --- a/shared/package.json +++ b/shared/package.json @@ -1,8 +1,8 @@ { "name": "@peershell/protocol", - "version": "0.1.0-beta", + "version": "0.1.1-beta", "description": "peershell wire protocol: framework-neutral, shared by all clients and the server", - "license": "Apache-2.0", + "license": "PolyForm-Noncommercial-1.0.0", "repository": "https://github.com/tis24dev/peershell", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/shared/src/api.ts b/shared/src/api.ts index 542863f..d59164c 100644 --- a/shared/src/api.ts +++ b/shared/src/api.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + /** * Transport abstraction + small shared validators. The transport is framework-neutral (callback * based); the Tabby plugin adapts it to RxJS internally, the web/mobile clients use it directly. diff --git a/shared/src/base64.ts b/shared/src/base64.ts index b6c2a1e..12c8313 100644 --- a/shared/src/base64.ts +++ b/shared/src/base64.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + /** * Portable base64 (btoa/atob are globals in browsers, Electron renderer, and Node >= 16). * Used for the VT snapshot payload in the `snapshot` control message. diff --git a/shared/src/httpTunnelHandler.ts b/shared/src/httpTunnelHandler.ts index 3dc25dd..5a951f2 100644 --- a/shared/src/httpTunnelHandler.ts +++ b/shared/src/httpTunnelHandler.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + /** * Host side of the reverse HTTP tunnel. The server forwards a browser's page request as an * `http-get` frame over the host's outbound WS; the host answers with `http-response` carrying the diff --git a/shared/src/index.ts b/shared/src/index.ts index b4a7734..17a5cd0 100644 --- a/shared/src/index.ts +++ b/shared/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + export * from './protocol' export * from './api' export * from './pinAuth' diff --git a/shared/src/mirrorController.ts b/shared/src/mirrorController.ts index 4cd7018..8d0cdd2 100644 --- a/shared/src/mirrorController.ts +++ b/shared/src/mirrorController.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + /** * Guest side of a shared session. Framework-neutral (drives a SessionTransport + a small MirrorSink * port + a PIN provider), so it is reused by the Tabby plugin (via MirrorSession) and the web-client diff --git a/shared/src/pinAuth.ts b/shared/src/pinAuth.ts index db6caa4..8deccd7 100644 --- a/shared/src/pinAuth.ts +++ b/shared/src/pinAuth.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + /** * Per-session PIN challenge-response. The raw PIN never crosses the wire: the host sends a * fresh single-use `nonce`, the peer replies with `H(pin, nonce)`, the host verifies locally. diff --git a/shared/src/protocol.ts b/shared/src/protocol.ts index aa18bef..ded8f6b 100644 --- a/shared/src/protocol.ts +++ b/shared/src/protocol.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + /** * peershell wire protocol: control messages + binary terminal framing. * Framework-neutral (no Angular/RxJS/Node-Buffer). See PROTOCOL.md for the spec. diff --git a/shared/src/utf8Splitter.ts b/shared/src/utf8Splitter.ts index 2975da6..d2d6124 100644 --- a/shared/src/utf8Splitter.ts +++ b/shared/src/utf8Splitter.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + /** * Reassembles UTF-8 text from a byte stream where multibyte codepoints may be split * across frames. Wraps a streaming TextDecoder (available in browsers and Node >= 18). diff --git a/shared/src/websocketTransport.ts b/shared/src/websocketTransport.ts index 41715b9..866a3fe 100644 --- a/shared/src/websocketTransport.ts +++ b/shared/src/websocketTransport.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + /** * SessionTransport over a WebSocket. Framework-neutral: uses the global `WebSocket` by default * (Electron renderer + browsers), or an injected implementation (e.g. the `ws` package in Node tests). diff --git a/shared/test/auth.integration.test.ts b/shared/test/auth.integration.test.ts index ca11320..ae0b97a 100644 --- a/shared/test/auth.integration.test.ts +++ b/shared/test/auth.integration.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + /** * Stage 6 server: account REST (register/verify/login/2FA/logout/rate-limit) + WS auth-gate on * create-session. Runs the real server ephemeral (in-memory store) with requireAuth ON. diff --git a/shared/test/email.test.ts b/shared/test/email.test.ts index 1714ea8..ef61072 100644 --- a/shared/test/email.test.ts +++ b/shared/test/email.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + /** Stage 7: verification-code delivery (Brevo relay) with a mock-log fallback. No network. */ // eslint-disable-next-line @typescript-eslint/no-var-requires const server = require('../../server/src/index.cjs') as { diff --git a/shared/test/httpTunnelHandler.test.ts b/shared/test/httpTunnelHandler.test.ts index d6bffb4..3f1de32 100644 --- a/shared/test/httpTunnelHandler.test.ts +++ b/shared/test/httpTunnelHandler.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + import { HttpTunnelHandler, SessionTransport, ControlMessage, BinaryPayload, Channel, TransportState, base64ToUtf8, } from '../src' diff --git a/shared/test/mirrorController.test.ts b/shared/test/mirrorController.test.ts index 36e37d6..02c941b 100644 --- a/shared/test/mirrorController.test.ts +++ b/shared/test/mirrorController.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + import { MirrorController, MirrorSink, PinProvider, SessionTransport, ControlMessage, BinaryPayload, Channel, TransportState, utf8ToBase64, hashPin, diff --git a/shared/test/pinAuth.test.ts b/shared/test/pinAuth.test.ts index fe6300e..b6be1ea 100644 --- a/shared/test/pinAuth.test.ts +++ b/shared/test/pinAuth.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + import { hashPin, verifyPin, generateNonce, isAcceptablePin } from '../src/pinAuth' describe('pinAuth challenge-response', () => { diff --git a/shared/test/protocol.test.ts b/shared/test/protocol.test.ts index 8af5825..50db362 100644 --- a/shared/test/protocol.test.ts +++ b/shared/test/protocol.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + import { encodeBinaryFrame, decodeBinaryFrame, Channel, BINARY_HEADER_BYTES, encodeControl, decodeControl, PROTOCOL_VERSION, diff --git a/shared/test/transport.integration.test.ts b/shared/test/transport.integration.test.ts index e9e9bee..08e8688 100644 --- a/shared/test/transport.integration.test.ts +++ b/shared/test/transport.integration.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + /** * End-to-end wire test: two WebSocketTransport instances talk through the throwaway dev relay, * exercising the full Stage 1-3 handshake (hello -> create/join -> PIN challenge-response -> diff --git a/shared/test/tunnel.integration.test.ts b/shared/test/tunnel.integration.test.ts index d8b00fc..536c930 100644 --- a/shared/test/tunnel.integration.test.ts +++ b/shared/test/tunnel.integration.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + /** * Reverse HTTP tunnel end-to-end: a Node HTTP client GETs the host's magic-link on the relay; the * relay forwards http-get down the host's outbound WS; the host's HttpTunnelHandler serves the diff --git a/shared/test/utf8Splitter.test.ts b/shared/test/utf8Splitter.test.ts index 79cfbcc..282f31d 100644 --- a/shared/test/utf8Splitter.test.ts +++ b/shared/test/utf8Splitter.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + import { Utf8Splitter } from '../src/utf8Splitter' import { isValidRoomCode, isAllowedTunnelPath } from '../src/api' diff --git a/shared/test/websocketTransport.test.ts b/shared/test/websocketTransport.test.ts index 9477909..a8ab77f 100644 --- a/shared/test/websocketTransport.test.ts +++ b/shared/test/websocketTransport.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2026 tis24dev + * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 + */ + import { WebSocketTransport, WebSocketCtor, WebSocketLike } from '../src/websocketTransport' import { encodeControl, encodeBinaryFrame, Channel } from '../src/protocol'