@rsrsai/cli 1.0.6-dev.37034009625

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +43 -0
  3. package/bin/cli.js +71 -0
  4. package/package.json +30 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 respire
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # @rsrsai/cli
2
+
3
+ The launcher selects the platform binary package and forwards arguments to `rsrs`. Packages include the executable, runtime libraries and notices.
4
+
5
+ ```sh
6
+ npm i -g @rsrsai/cli
7
+ # Or: pnpm add -g @rsrsai/cli
8
+ rsrs doctor
9
+ rsrs --help
10
+ ```
11
+
12
+ | Platform | Package |
13
+ | --- | --- |
14
+ | Linux x64, musl (default) | `@rsrsai/linux-x64` |
15
+ | Linux arm64, musl (default) | `@rsrsai/linux-arm64` |
16
+ | Linux x64, glibc | `@rsrsai/linux-x64-gnu` |
17
+ | Linux arm64, glibc | `@rsrsai/linux-arm64-gnu` |
18
+ | Apple Silicon | `@rsrsai/macos-arm64` |
19
+ | Windows x64 | `@rsrsai/win-x64` |
20
+ | Windows arm64 | `@rsrsai/win-arm64` |
21
+
22
+ `artifact-manifest.json` defines targets and names. Intel Mac is unsupported.
23
+ Linux keeps the static musl package as its default. On a glibc distribution,
24
+ select the GNU build explicitly; the same choice applies to npm and pnpm:
25
+
26
+ ```sh
27
+ RSRS_LIBC=glibc rsrs doctor
28
+ RSRS_LIBC=musl rsrs doctor
29
+ # Persist the selection for this shell:
30
+ export RSRS_LIBC=glibc
31
+ ```
32
+
33
+ The glibc packages require a compatible glibc host; they do not run on Alpine.
34
+ If optional packages were omitted during installation, install the selected
35
+ platform package at the same version as `@rsrsai/cli`.
36
+ See [CLI source](https://github.com/risense-ai/respire-cli) for builds and runtime guides.
37
+
38
+ | Boundary | Behavior |
39
+ | --- | --- |
40
+ | Models | Separately installed with upstream licenses and source records |
41
+ | Runtime | Host manages lifecycle; sandbox uses authenticated client requests |
42
+ | Sync | Host-side login; encrypted server storage |
43
+ | Core binary | Separate license from the MIT launcher/binding |
package/bin/cli.js ADDED
@@ -0,0 +1,71 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ // Locate the platform package binary and forward CLI arguments.
4
+ const { spawnSync } = require('child_process');
5
+ const path = require('path');
6
+ const { existsSync } = require('fs');
7
+
8
+ const PKGS = {
9
+ 'linux-x64': '@rsrsai/linux-x64',
10
+ 'linux-arm64': '@rsrsai/linux-arm64',
11
+ 'darwin-arm64': '@rsrsai/macos-arm64',
12
+ 'win32-x64': '@rsrsai/win-x64',
13
+ 'win32-arm64': '@rsrsai/win-arm64',
14
+ };
15
+
16
+ const key = `${process.platform}-${process.arch}`;
17
+ let pkg = PKGS[key];
18
+ if (process.platform === 'linux') {
19
+ const libc = process.env.RSRS_LIBC || 'musl';
20
+ if (libc !== 'musl' && libc !== 'glibc') {
21
+ console.error('rsrs: RSRS_LIBC must be musl or glibc.');
22
+ process.exit(1);
23
+ }
24
+ if (pkg && libc === 'glibc') pkg += '-gnu';
25
+ }
26
+ if (!pkg) {
27
+ if (key === 'darwin-x64') {
28
+ console.error(
29
+ 'rsrs: Intel Mac is unsupported.\n' +
30
+ ' Use Apple Silicon (arm64), Linux or Windows.\n' +
31
+ ' See https://github.com/risense-ai/respire-cli#use-and-distribution'
32
+ );
33
+ } else {
34
+ console.error(`rsrs: unsupported platform ${key} (supported: ${Object.keys(PKGS).join(' ')})`);
35
+ }
36
+ process.exit(1);
37
+ }
38
+
39
+ const exe = process.platform === 'win32' ? 'rsrs.exe' : 'rsrs';
40
+ function resolveBin(pkgName, exeName) {
41
+ try {
42
+ return require.resolve(`${pkgName}/bin/${exeName}`);
43
+ } catch {
44
+ /* optional dep missing or installed as a global sibling */
45
+ }
46
+ const rel = path.join(...pkgName.split('/'), 'bin', exeName);
47
+ let dir = __dirname;
48
+ for (let i = 0; i < 12; i++) {
49
+ const hits = [path.join(dir, 'node_modules', rel), path.join(dir, rel)];
50
+ for (const p of hits) {
51
+ if (existsSync(p)) return p;
52
+ }
53
+ const parent = path.dirname(dir);
54
+ if (parent === dir) break;
55
+ dir = parent;
56
+ }
57
+ return null;
58
+ }
59
+ const bin = resolveBin(pkg, exe);
60
+ if (!bin) {
61
+ console.error(`rsrs: platform package ${pkg} is missing. Install: npm i -g ${pkg}`);
62
+ process.exit(1);
63
+ }
64
+
65
+ // UI assets are embedded at compile time; no runtime web-dist lookup is needed.
66
+ const r = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit', env: process.env });
67
+ if (r.error) {
68
+ console.error(`rsrs: ${r.error.message}`);
69
+ process.exit(1);
70
+ }
71
+ process.exit(r.status ?? 1);
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@rsrsai/cli",
3
+ "version": "1.0.6-dev.37034009625",
4
+ "description": "rsrs CLI — encrypted cross-device AI memory",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/risense-ai/respire-cli.git"
9
+ },
10
+ "bin": {
11
+ "rsrs": "./bin/cli.js"
12
+ },
13
+ "files": [
14
+ "bin",
15
+ "README.md",
16
+ "LICENSE"
17
+ ],
18
+ "engines": {
19
+ "node": ">=16"
20
+ },
21
+ "optionalDependencies": {
22
+ "@rsrsai/linux-x64-gnu": "1.0.6-dev.37034009625",
23
+ "@rsrsai/linux-arm64-gnu": "1.0.6-dev.37034009625",
24
+ "@rsrsai/linux-x64": "1.0.6-dev.37034009625",
25
+ "@rsrsai/linux-arm64": "1.0.6-dev.37034009625",
26
+ "@rsrsai/macos-arm64": "1.0.6-dev.37034009625",
27
+ "@rsrsai/win-x64": "1.0.6-dev.37034009625",
28
+ "@rsrsai/win-arm64": "1.0.6-dev.37034009625"
29
+ }
30
+ }