{"_id":"@airterm/protocol","_rev":"4-8388e2efee9b89ba51046b78cbd18c17","name":"@airterm/protocol","dist-tags":{"latest":"0.5.0"},"versions":{"0.2.0":{"name":"@airterm/protocol","version":"0.2.0","keywords":["terminal","e2ee","noise-protocol"],"license":"MIT","_id":"@airterm/protocol@0.2.0","maintainers":[{"name":"nazmulpcc","email":"n@zmul.dev"}],"homepage":"https://airterm.app","bugs":{"url":"https://github.com/nazmulpcc/airterm-cli/issues"},"dist":{"shasum":"77f8561857157ee7ded2e96cda47c1c2d47e8211","tarball":"https://registry.npmjs.org/@airterm/protocol/-/protocol-0.2.0.tgz","fileCount":27,"integrity":"sha512-gOwMq9ZisHM4frYpWJu2JOCfighsgH41gH7J8BIM7LHOEq0lrkzfgho80SAAwAghUSFPs9r60Ul9genbNtl0ug==","signatures":[{"sig":"MEUCIQCGZwQ85L6tg/CjLF0jlTc7R1MZo30BSkGqQuW7nK7XRQIgVAhIXfdCSiXyz+/OveVpT6IemwnpFS3WTP8cbh54/fU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":89472},"type":"module","engines":{"node":">=22.12"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"63ac841baa2482c2802d7847609afbc002635443","scripts":{"test":"vitest run","build":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.json && vite build --config vite.browser.config.ts","prepack":"npm run build","types:check":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"nazmulpcc","email":"n@zmul.dev"},"repository":{"url":"git+https://github.com/nazmulpcc/airterm-cli.git","type":"git","directory":"packages/protocol"},"_npmVersion":"11.19.0","description":"Shared browser and Node.js protocol implementation for AirTerm","directories":{},"sideEffects":false,"_nodeVersion":"26.7.0","dependencies":{"noise-handshake":"4.2.0","sodium-javascript":"0.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/protocol_0.2.0_1788609933360_0.13657137526846097","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@airterm/protocol","version":"0.3.0","keywords":["terminal","e2ee","noise-protocol"],"license":"MIT","_id":"@airterm/protocol@0.3.0","maintainers":[{"name":"nazmulpcc","email":"n@zmul.dev"}],"homepage":"https://airterm.app","bugs":{"url":"https://github.com/nazmulpcc/airterm-cli/issues"},"dist":{"shasum":"530dffb2a41efbbe15e7752c07d84c065ecb17a5","tarball":"https://registry.npmjs.org/@airterm/protocol/-/protocol-0.3.0.tgz","fileCount":55,"integrity":"sha512-ByesGEMigB954Vw5XqquoFZVL7ibDKKD+tBE/VRRcZDbsy7HUYbkT7bpfHbS5RStm1iqsblfReaNz0z7dD2chQ==","signatures":[{"sig":"MEQCIG5tQWMI9+Q4V18w+RkoCwghm9a3oSLEGDAJbsVF8tRUAiAgxqszt+99/XfqAxqM5o3SzA1eoRCTJ/Ng3kfun2IQaw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCID27hu6f8SxLq2wKvzn1AarUSafIxQabykZe4bpC7aJ+AiABWlZEORs6SXITIe2rO/s3twKyKhPeUSl/m9d4izU9iw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":174294},"type":"module","engines":{"node":">=22.12"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"cd9d879fe3a1bdf69a707fa65421b6987fbe7db4","scripts":{"test":"vitest run","build":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.json && vite build --config vite.browser.config.ts","prepack":"npm run build","types:check":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"nazmulpcc","email":"n@zmul.dev"},"repository":{"url":"git+https://github.com/nazmulpcc/airterm-cli.git","type":"git","directory":"packages/protocol"},"_npmVersion":"11.19.0","description":"Shared browser and Node.js protocol implementation for AirTerm","directories":{},"sideEffects":false,"_nodeVersion":"26.7.0","dependencies":{"noise-handshake":"4.2.0","sodium-javascript":"0.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/protocol_0.3.0_1788616056306_0.8151073950781547","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@airterm/protocol","version":"0.4.0","keywords":["terminal","e2ee","noise-protocol"],"license":"MIT","_id":"@airterm/protocol@0.4.0","maintainers":[{"name":"nazmulpcc","email":"n@zmul.dev"}],"homepage":"https://airterm.app","bugs":{"url":"https://github.com/nazmulpcc/airterm-cli/issues"},"dist":{"shasum":"529469d173ec1b06fa2e94113b4c546953e1ba24","tarball":"https://registry.npmjs.org/@airterm/protocol/-/protocol-0.4.0.tgz","fileCount":71,"integrity":"sha512-/U9AlsicfRdDVmwv7RUBNNVeNlr/fFyZdAfQ6E5sQIuXjLi21kjSnB2nzJo/3Y0Ea9lk2DVzZJ+Ii8N6hx0tbQ==","signatures":[{"sig":"MEYCIQD7+38hEujVwoGFxsCJnlpypPWfMVgdFXk70ldamQ7i9wIhAIvthaBSa6XS2EqPjj5mi75AvGu1IwYQpT2ozOYM5Mh3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCBO/0/M0IDzrsn+ahmzmC8UVdmhUIpbQlsS4X2mocN/gIgBnd/dYBtbRIczB2Ii4nnc1aVVHsyqgi8xpkSJDn5Kck=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":229146},"type":"module","engines":{"node":">=22.12"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"9e34d8b9ede6450319f0b6af684fe357c5a9fcf1","scripts":{"test":"vitest run","build":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.json && vite build --config vite.browser.config.ts","prepack":"npm run build","types:check":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"nazmulpcc","email":"n@zmul.dev"},"repository":{"url":"git+https://github.com/nazmulpcc/airterm-cli.git","type":"git","directory":"packages/protocol"},"_npmVersion":"11.19.0","description":"Shared browser and Node.js protocol implementation for AirTerm","directories":{},"sideEffects":false,"_nodeVersion":"26.7.0","dependencies":{"noise-handshake":"4.2.0","sodium-javascript":"0.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/protocol_0.4.0_1788782375425_0.7880356070240107","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"_id":"@airterm/protocol@0.5.0","bugs":{"url":"https://github.com/nazmulpcc/airterm-cli/issues"},"dist":{"shasum":"ec76acc3997128275ef3b30017898ad46fcf1bc6","tarball":"https://registry.npmjs.org/@airterm/protocol/-/protocol-0.5.0.tgz","fileCount":75,"integrity":"sha512-kXW5vBWUm1NPUKPKENxHz1jLNNKljM5efFYy5zwFHWVVBbko/f3IACi0zY/v9FzLqt1aqLX+zIWZcGCER+KAdg==","signatures":[{"sig":"MEUCIEAiG73A0TMQEUUZRwbfdJ5ueK3Ubmguv6SSW1eDI559AiEAxJyus8qEJgySJDgs6AfXy4n18W4btvBiXeJwxdBgqkc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGe52Iflyt4rDEbzDSCfpVt2KR02z3dmJrOcKBgJHqxgAiB/QWb/aQ1VaiKd5oGn0/Z62O+iPbzpXjnACTZJsNsS/A=="}],"unpackedSize":239849},"name":"@airterm/protocol","type":"module","engines":{"node":">=22.12"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"48e5a1264e6d0406197e356a7ec1051386119064","license":"MIT","scripts":{"test":"vitest run","build":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.json && vite build --config vite.browser.config.ts","prepack":"npm run build","types:check":"tsc -p tsconfig.json --noEmit"},"version":"0.5.0","_npmUser":{"name":"nazmulpcc","email":"n@zmul.dev"},"homepage":"https://airterm.app","keywords":["terminal","e2ee","noise-protocol"],"repository":{"url":"git+https://github.com/nazmulpcc/airterm-cli.git","type":"git","directory":"packages/protocol"},"_npmVersion":"11.19.0","description":"Shared browser and Node.js protocol implementation for AirTerm","directories":{},"maintainers":[{"name":"nazmulpcc","email":"n@zmul.dev"}],"sideEffects":false,"_nodeVersion":"26.7.0","dependencies":{"noise-handshake":"4.2.0","sodium-javascript":"0.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/protocol_0.5.0_1788878598446_0.25140363245412245"}}},"time":{"created":"2026-09-05T12:05:33.127Z","modified":"2026-09-08T14:43:18.759Z","0.2.0":"2026-09-05T12:05:33.499Z","0.3.0":"2026-09-05T13:47:36.406Z","0.4.0":"2026-09-07T11:59:35.544Z","0.5.0":"2026-09-08T14:43:18.523Z"},"bugs":{"url":"https://github.com/nazmulpcc/airterm-cli/issues"},"license":"MIT","homepage":"https://airterm.app","keywords":["terminal","e2ee","noise-protocol"],"repository":{"url":"git+https://github.com/nazmulpcc/airterm-cli.git","type":"git","directory":"packages/protocol"},"description":"Shared browser and Node.js protocol implementation for AirTerm","maintainers":[{"name":"nazmulpcc","email":"n@zmul.dev"}],"readme":"# @airterm/protocol\n\nBrowser-safe AirTerm protocol primitives shared by the web client and CLI agent.\nThe package implements capability URLs, HKDF key separation, Noise transport,\nbinary framing, and terminal message codecs for protocol version 1.\n\nIts additive streaming-transfer extension uses feature negotiation, 64-bit\noffsets, bounded acknowledgement windows, and purpose-specific policies for\nencrypted terminal fonts and clipboard images. Receivers can stream directly\nto disk, allowing later file-transfer features to grow without replacing the\nwire format.\n\n```sh\nnpm install @airterm/protocol\n```\n\nAirTerm uses `Noise_NNpsk0_25519_ChaChaPoly_BLAKE2b`. Applications should import\nthe public APIs from the package root.\n\n```ts\nimport { deriveCapabilityKeys, NoiseTransport } from '@airterm/protocol';\n```\n\nRequires Node.js 22.12 or newer for Node-based consumers. Browser consumers need\nWeb Crypto and WebAssembly support.\n\n## Direct transport extension\n\nProtocol v1 framing is unchanged. `SessionDescription` advertises `p2p-v1`;\npeers must explicitly accept it before using inner types 21 (`P2PControl`),\n22 (`OutputAck`), and 23 (`RecoveryComplete`). Older peers remain on relay.\nAcceptance can enable byte-offset recovery without attempting WebRTC.\n\n`EncryptedConnection` owns each path's Noise state and bounded outbound queue.\nRelay and direct paths have independent handshakes. Direct handshake binding\nincludes the session ID, relay pairing ID, and random negotiation ID. Signaling\nand handoff coordination travel inside relay encryption. The gateway requires\nno SDP/ICE parsing or protocol changes. Exactly one path carries application\ndata; acknowledgement and lifecycle coordination may still use relay.\n\nSDP is limited to 32 KiB, candidates to 2 KiB each and 64 per peer, and signaling\nto 256 KiB per peer. Direct frames are encrypted once, then fragmented into\nmessages no larger than 16 KiB. Receivers assemble one bounded frame at a time.\nNegotiation has a ten-second deadline, transfer draining thirty seconds, and\nhandoff two seconds. Ambiguous handoffs require a fresh relay pairing.\n\nOutput acknowledgements refer to contiguous PTY byte offsets consumed by the\nterminal renderer, not merely received by the socket. Never acknowledge across\na gap, reuse a cipher after failure, or replay uncertain terminal input.\n\n## Account encryption envelopes (0.4 prerelease)\n\nThe vault and pairing exports are additive application envelopes; terminal protocol v1 framing is unchanged. Vaults use RSA-OAEP-3072/SHA-256, AES-256-GCM, and context-bound HKDF. Version 1 fixes passphrase Argon2id parameters at 64 MiB, three iterations, one lane, 16-byte salt, and 32-byte output; browser derivation lives in the application worker. Unknown fields, algorithms, versions, sizes, or substituted account/session context must fail closed.\n\nExactly one primary vault wrapper and one user-held recovery wrapper are supported. The pairing encryption secret is distinct from the polling credential and never reaches the server. These primitives do not authenticate a downloaded browser application or provide an independent cryptographic audit.\n\nThe backend pins a reproducible prerelease tarball until separately authorized registry publication. Publish the protocol before any CLI release that depends on it; do not relabel a prerelease artifact as an already published version.\n","readmeFilename":"README.md"}