twinclaw 1.0.1 → 1.0.2

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 (2) hide show
  1. package/bin/postinstall.js +29 -0
  2. package/package.json +4 -2
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ import { spawn } from 'node:child_process';
3
+ import path from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
5
+
6
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
7
+ const packageRoot = path.resolve(__dirname, '..');
8
+
9
+ function runTwinbotCli(args) {
10
+ return new Promise((resolve) => {
11
+ const distEntry = path.join(packageRoot, 'dist', 'index.js');
12
+
13
+ const child = spawn(process.execPath, [distEntry, ...args], {
14
+ cwd: packageRoot,
15
+ env: process.env,
16
+ stdio: 'inherit',
17
+ shell: true,
18
+ });
19
+
20
+ child.on('close', (code) => {
21
+ process.exit(code ?? 1);
22
+ });
23
+ });
24
+ }
25
+
26
+ console.log('\nšŸŽ‰ TwinClaw installed successfully!\n');
27
+ console.log('Running onboarding wizard...\n');
28
+
29
+ runTwinbotCli(['onboard']);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twinclaw",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "TwinClaw - Windows-first agentic AI gateway with proactive memory and multimodal hooks.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -16,9 +16,11 @@
16
16
  "mcp-servers.json",
17
17
  "skill-packages.json",
18
18
  "skill-packages.lock.json",
19
- "twinclaw.default.json"
19
+ "twinclaw.default.json",
20
+ "bin/postinstall.js"
20
21
  ],
21
22
  "scripts": {
23
+ "postinstall": "node bin/postinstall.js",
22
24
  "twinclaw": "tsx src/index.ts",
23
25
  "dev": "tsx watch src/index.ts",
24
26
  "start": "tsx src/index.ts",