@centillex/desk 0.2.0

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.
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # Centillex Desk
2
+
3
+ Pack. Move. Work.
4
+
5
+ Pack your workspace, supported settings, and sessions, then move your work
6
+ between Claude, Codex, Qoder, and Bob.
7
+
8
+ ```sh
9
+ npm i -g @centillex/desk
10
+ desk --version
11
+ ```
12
+
13
+ Supports Linux and macOS on x64 and ARM64. On Windows, install inside WSL using
14
+ Linux Node.js and npm. There is no native Windows executable in this release.
15
+ Node.js 20 or newer is needed for npm installation. Leave optional dependencies
16
+ and install scripts enabled so npm can select and install the native executable.
17
+
18
+ The installed `desk` command is a Go binary built with `CGO_ENABLED=0`. SQLite is
19
+ embedded using `modernc.org/sqlite`. Running Desk needs no Node.js, external SQLite
20
+ library, SQLite CLI, or C toolchain. Install the target AI agent separately.
21
+
22
+ After stopping your source agent and other project writers:
23
+
24
+ ```sh
25
+ cd /path/to/project
26
+ desk pack --from=claude
27
+ desk move --to=codex
28
+ desk ls
29
+ desk ps
30
+ ```
31
+
32
+ Without a pack ID, `move` uses the newest saved pack for the current directory.
33
+ Packs default to `~/.desk/store`; set `DESK_HOME` to use `$DESK_HOME/store`.
34
+
35
+ Read the [documentation](https://docs.centillex.com/desk/) for supported agents,
36
+ capture limits, storage, and native session continuation.
37
+
38
+ Report bugs and request features in the [public issue tracker](https://github.com/centillex/desk/issues).
39
+
40
+ Copyright 2026 Centillex Co., Ltd. All rights reserved.
package/bin/desk ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ console.error('Desk native binary has not been installed. Enable install scripts and run: npm rebuild -g @centillex/desk');
4
+ process.exitCode = 1;
package/install.cjs ADDED
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+ const fs = require('node:fs');
3
+ const path = require('node:path');
4
+ const crypto = require('node:crypto');
5
+ const pkg = require('./package.json');
6
+
7
+ function install() {
8
+ const platform = `${process.platform}-${process.arch}`;
9
+ const name = `@centillex/desk-${platform}`;
10
+ if (!Object.hasOwn(pkg.optionalDependencies, name)) {
11
+ throw new Error(`Unsupported platform ${platform}. Use Linux or macOS on x64/ARM64. On Windows, install from a WSL Linux terminal using Linux Node.js and npm.`);
12
+ }
13
+ let manifestPath;
14
+ try {
15
+ manifestPath = require.resolve(`${name}/package.json`);
16
+ } catch {
17
+ throw new Error(`Missing ${name}@${pkg.version}. Reinstall @centillex/desk with optional dependencies enabled (npm install -g @centillex/desk --include=optional).`);
18
+ }
19
+ const native = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
20
+ if (native.name !== name || native.version !== pkg.version) {
21
+ throw new Error(`Expected ${name}@${pkg.version}; reinstall @centillex/desk.`);
22
+ }
23
+ const root = path.dirname(manifestPath);
24
+ const source = path.join(root, 'bin', 'desk');
25
+ const data = fs.readFileSync(source);
26
+ const expected = fs.readFileSync(path.join(root, 'desk.sha256'), 'utf8').trim();
27
+ const actual = crypto.createHash('sha256').update(data).digest('hex');
28
+ if (!/^[a-f0-9]{64}$/.test(expected) || expected !== actual) {
29
+ throw new Error(`Binary checksum mismatch for ${name}; reinstall @centillex/desk.`);
30
+ }
31
+ // Replace the installation stub with the real Go executable. No Node launcher
32
+ // or SQLite helper is needed when the user subsequently runs `desk`.
33
+ const destination = path.join(__dirname, 'bin', 'desk');
34
+ const temporary = `${destination}.${process.pid}.tmp`;
35
+ try {
36
+ fs.writeFileSync(temporary, data, { mode: 0o755, flag: 'wx' });
37
+ fs.renameSync(temporary, destination);
38
+ } finally {
39
+ fs.rmSync(temporary, { force: true });
40
+ }
41
+ }
42
+ try {
43
+ install();
44
+ } catch (error) {
45
+ console.error(`Desk installation failed: ${error.message}`);
46
+ process.exitCode = 1;
47
+ }
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@centillex/desk",
3
+ "version": "0.2.0",
4
+ "description": "Pack your workspace and move work between AI agents.",
5
+ "license": "UNLICENSED",
6
+ "homepage": "https://docs.centillex.com/desk/",
7
+ "bugs": { "url": "https://github.com/centillex/desk/issues" },
8
+ "bin": { "desk": "bin/desk" },
9
+ "files": ["bin/desk", "install.cjs", "README.md"],
10
+ "scripts": { "postinstall": "node install.cjs" },
11
+ "engines": { "node": ">=20" },
12
+ "os": ["linux", "darwin"],
13
+ "cpu": ["x64", "arm64"],
14
+ "optionalDependencies": {
15
+ "@centillex/desk-linux-x64": "0.2.0",
16
+ "@centillex/desk-linux-arm64": "0.2.0",
17
+ "@centillex/desk-darwin-x64": "0.2.0",
18
+ "@centillex/desk-darwin-arm64": "0.2.0"
19
+ },
20
+ "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" }
21
+ }