synap 0.1.0 → 0.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synap",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A CLI for externalizing your working memory",
5
5
  "main": "src/cli.js",
6
6
  "bin": {
@@ -2,17 +2,9 @@
2
2
 
3
3
  /**
4
4
  * postinstall.js - Run after npm install
5
- * Shows hints and optionally auto-updates the skill
5
+ * Auto-installs/updates the Claude skill
6
6
  */
7
7
 
8
- const fs = require('fs');
9
- const path = require('path');
10
- const os = require('os');
11
-
12
- const SKILL_NAME = 'synap-assistant';
13
- const TARGET_SKILL_DIR = path.join(os.homedir(), '.claude', 'skills', SKILL_NAME);
14
- const TARGET_SKILL_FILE = path.join(TARGET_SKILL_DIR, 'SKILL.md');
15
-
16
8
  // ANSI colors
17
9
  const CYAN = '\x1b[36m';
18
10
  const RESET = '\x1b[0m';
@@ -23,24 +15,19 @@ async function main() {
23
15
  console.log(`${BOLD}synap${RESET} - A CLI for externalizing your working memory`);
24
16
  console.log('');
25
17
 
26
- // Check if skill is installed
27
- if (fs.existsSync(TARGET_SKILL_FILE)) {
28
- try {
29
- const skillInstaller = require('../src/skill-installer');
30
- const result = await skillInstaller.install();
31
- if (result.installed) {
32
- console.log(`${CYAN}Skill auto-updated.${RESET}`);
33
- } else if (result.skipped) {
34
- console.log(`${CYAN}Skill already up to date.${RESET}`);
35
- } else if (result.needsForce) {
36
- console.log(`${CYAN}Skill modified locally.${RESET} Run 'synap install-skill --force' to update.`);
37
- }
38
- } catch (err) {
39
- console.log(`${CYAN}Skill update failed.${RESET} Run 'synap install-skill' to retry.`);
18
+ // Auto-install/update skill
19
+ try {
20
+ const skillInstaller = require('../src/skill-installer');
21
+ const result = await skillInstaller.install();
22
+ if (result.installed) {
23
+ console.log(`${CYAN}Claude skill installed.${RESET}`);
24
+ } else if (result.skipped) {
25
+ console.log(`${CYAN}Claude skill up to date.${RESET}`);
26
+ } else if (result.needsForce) {
27
+ console.log(`${CYAN}Skill modified locally.${RESET} Run 'synap install-skill --force' to update.`);
40
28
  }
41
- } else {
42
- console.log('To enable AI agent integration, run:');
43
- console.log(` ${CYAN}synap install-skill${RESET}`);
29
+ } catch (err) {
30
+ console.log(`${CYAN}Skill install failed.${RESET} Run 'synap install-skill' to retry.`);
44
31
  }
45
32
 
46
33
  console.log('');