@arthai/agents 1.0.10 → 1.0.12

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 (48) hide show
  1. package/VERSION +1 -1
  2. package/dist/plugins/canvas/.claude-plugin/plugin.json +1 -1
  3. package/dist/plugins/canvas/VERSION +1 -1
  4. package/dist/plugins/canvas/hooks/hooks.json +12 -0
  5. package/dist/plugins/canvas/hooks/project-setup.sh +18 -12
  6. package/dist/plugins/compass/.claude-plugin/plugin.json +1 -1
  7. package/dist/plugins/compass/VERSION +1 -1
  8. package/dist/plugins/compass/hooks/hooks.json +12 -0
  9. package/dist/plugins/compass/hooks/project-setup.sh +18 -12
  10. package/dist/plugins/counsel/.claude-plugin/plugin.json +1 -1
  11. package/dist/plugins/counsel/VERSION +1 -1
  12. package/dist/plugins/counsel/hooks/hooks.json +12 -0
  13. package/dist/plugins/counsel/hooks/project-setup.sh +18 -12
  14. package/dist/plugins/cruise/.claude-plugin/plugin.json +1 -1
  15. package/dist/plugins/cruise/VERSION +1 -1
  16. package/dist/plugins/cruise/hooks/hooks.json +12 -0
  17. package/dist/plugins/cruise/hooks/project-setup.sh +18 -12
  18. package/dist/plugins/forge/.claude-plugin/plugin.json +1 -1
  19. package/dist/plugins/forge/VERSION +1 -1
  20. package/dist/plugins/forge/hooks/hooks.json +10 -0
  21. package/dist/plugins/forge/hooks/project-setup.sh +18 -12
  22. package/dist/plugins/prime/.claude-plugin/plugin.json +1 -1
  23. package/dist/plugins/prime/VERSION +1 -1
  24. package/dist/plugins/prime/hooks/hooks.json +22 -12
  25. package/dist/plugins/prime/hooks/project-setup.sh +18 -12
  26. package/dist/plugins/prism/.claude-plugin/plugin.json +1 -1
  27. package/dist/plugins/prism/VERSION +1 -1
  28. package/dist/plugins/prism/hooks/hooks.json +12 -0
  29. package/dist/plugins/prism/hooks/project-setup.sh +18 -12
  30. package/dist/plugins/scalpel/.claude-plugin/plugin.json +1 -1
  31. package/dist/plugins/scalpel/VERSION +1 -1
  32. package/dist/plugins/scalpel/hooks/hooks.json +12 -0
  33. package/dist/plugins/scalpel/hooks/project-setup.sh +18 -12
  34. package/dist/plugins/sentinel/.claude-plugin/plugin.json +1 -1
  35. package/dist/plugins/sentinel/VERSION +1 -1
  36. package/dist/plugins/sentinel/hooks/hooks.json +12 -0
  37. package/dist/plugins/sentinel/hooks/project-setup.sh +18 -12
  38. package/dist/plugins/shield/.claude-plugin/plugin.json +1 -1
  39. package/dist/plugins/shield/VERSION +1 -1
  40. package/dist/plugins/shield/hooks/hooks.json +21 -11
  41. package/dist/plugins/shield/hooks/project-setup.sh +18 -12
  42. package/dist/plugins/spark/.claude-plugin/plugin.json +1 -1
  43. package/dist/plugins/spark/VERSION +1 -1
  44. package/dist/plugins/spark/hooks/hooks.json +12 -0
  45. package/dist/plugins/spark/hooks/project-setup.sh +18 -12
  46. package/hook-defs.json +2 -1
  47. package/hooks/project-setup.sh +18 -12
  48. package/package.json +1 -1
@@ -12,6 +12,18 @@
12
12
  ]
13
13
  }
14
14
  ],
15
+ "UserPromptSubmit": [
16
+ {
17
+ "matcher": "",
18
+ "hooks": [
19
+ {
20
+ "type": "command",
21
+ "command": "${CLAUDE_PLUGIN_ROOT}/hooks/project-setup.sh",
22
+ "timeout": 5
23
+ }
24
+ ]
25
+ }
26
+ ],
15
27
  "PostToolUse": [
16
28
  {
17
29
  "matcher": "Bash",
@@ -37,11 +37,13 @@ MANAGED_START="<!-- >>> claude-agents toolkit (DO NOT EDIT THIS BLOCK) >>> -->"
37
37
  MANAGED_END="<!-- <<< claude-agents toolkit <<< -->"
38
38
  GITIGNORE_START="# >>> claude-agents managed (DO NOT EDIT THIS BLOCK) >>>"
39
39
 
40
- # Check marker file — skip if current version is already set up
40
+ # Check marker file — skip SETUP if current version is already done
41
+ # But ALWAYS run license check (even if setup is done)
42
+ SETUP_NEEDED=true
41
43
  if [ -f "$MARKER_FILE" ]; then
42
44
  STORED_VERSION=$(cat "$MARKER_FILE" 2>/dev/null | tr -d '[:space:]' || echo "")
43
45
  if [ "$STORED_VERSION" = "$TOOLKIT_VERSION" ]; then
44
- exit 0
46
+ SETUP_NEEDED=false
45
47
  fi
46
48
  fi
47
49
 
@@ -60,16 +62,16 @@ LICENSE_KEY="${ARTHAI_LICENSE_KEY:-}"
60
62
  [ -z "$LICENSE_KEY" ] && [ -f "$REAL_HOME/.arthai/license" ] && LICENSE_KEY=$(cat "$REAL_HOME/.arthai/license" 2>/dev/null | tr -d '[:space:]')
61
63
 
62
64
  if [ -z "$LICENSE_KEY" ]; then
63
- echo "LICENSE REQUIRED — No license key found for marketplace plugin."
64
- echo "Run: npx @arthai/agents activate ARTH-XXXX-XXXX-XXXX-XXXX"
65
- echo "Get a key: productive@getarth.ai"
66
- exit 0
65
+ echo "LICENSE REQUIRED — No license key found for marketplace plugin." >&2
66
+ echo "Run: npx @arthai/agents activate ARTH-XXXX-XXXX-XXXX-XXXX" >&2
67
+ echo "Get a key: productive@getarth.ai" >&2
68
+ exit 2
67
69
  fi
68
70
 
69
71
  # Validate format
70
72
  if ! echo "$LICENSE_KEY" | grep -qE "$KEY_FORMAT"; then
71
- echo "LICENSE INVALID — Key format incorrect."
72
- exit 0
73
+ echo "LICENSE INVALID — Key format incorrect." >&2
74
+ exit 2
73
75
  fi
74
76
 
75
77
  # Check cache (24h TTL)
@@ -97,9 +99,9 @@ if ! $LICENSE_VALID; then
97
99
  echo "$NOW" > "$LICENSE_CACHE"
98
100
  else
99
101
  # Definitive invalid — no fallback
100
- echo "LICENSE INVALID — Key not recognized."
101
- echo "Check your key or get one at productive@getarth.ai"
102
- exit 0
102
+ echo "LICENSE INVALID — Key not recognized." >&2
103
+ echo "Check your key or get one at productive@getarth.ai" >&2
104
+ exit 2
103
105
  fi
104
106
  else
105
107
  # Network error — allow gracefully (don't block on Worker outage)
@@ -108,9 +110,13 @@ if ! $LICENSE_VALID; then
108
110
  fi
109
111
 
110
112
  # ---------------------------------------------------------------------------
111
- # Project setup (only runs if license is valid)
113
+ # Project setup (only runs if license is valid AND setup is needed)
112
114
  # ---------------------------------------------------------------------------
113
115
 
116
+ if ! $SETUP_NEEDED; then
117
+ exit 0
118
+ fi
119
+
114
120
  CLAUDE_MD="$PROJECT_DIR/CLAUDE.md"
115
121
  GITIGNORE="$PROJECT_DIR/.gitignore"
116
122
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "scalpel",
3
3
  "description": "Surgical bug fixing — targeted fixes, CI repair, issue triage",
4
- "version": "1.0.10",
4
+ "version": "1.0.12",
5
5
  "author": {
6
6
  "name": "Arth AI"
7
7
  }
@@ -1 +1 @@
1
- 1.0.10
1
+ 1.0.12
@@ -12,6 +12,18 @@
12
12
  ]
13
13
  }
14
14
  ],
15
+ "UserPromptSubmit": [
16
+ {
17
+ "matcher": "",
18
+ "hooks": [
19
+ {
20
+ "type": "command",
21
+ "command": "${CLAUDE_PLUGIN_ROOT}/hooks/project-setup.sh",
22
+ "timeout": 5
23
+ }
24
+ ]
25
+ }
26
+ ],
15
27
  "PreToolUse": [
16
28
  {
17
29
  "matcher": "Edit",
@@ -37,11 +37,13 @@ MANAGED_START="<!-- >>> claude-agents toolkit (DO NOT EDIT THIS BLOCK) >>> -->"
37
37
  MANAGED_END="<!-- <<< claude-agents toolkit <<< -->"
38
38
  GITIGNORE_START="# >>> claude-agents managed (DO NOT EDIT THIS BLOCK) >>>"
39
39
 
40
- # Check marker file — skip if current version is already set up
40
+ # Check marker file — skip SETUP if current version is already done
41
+ # But ALWAYS run license check (even if setup is done)
42
+ SETUP_NEEDED=true
41
43
  if [ -f "$MARKER_FILE" ]; then
42
44
  STORED_VERSION=$(cat "$MARKER_FILE" 2>/dev/null | tr -d '[:space:]' || echo "")
43
45
  if [ "$STORED_VERSION" = "$TOOLKIT_VERSION" ]; then
44
- exit 0
46
+ SETUP_NEEDED=false
45
47
  fi
46
48
  fi
47
49
 
@@ -60,16 +62,16 @@ LICENSE_KEY="${ARTHAI_LICENSE_KEY:-}"
60
62
  [ -z "$LICENSE_KEY" ] && [ -f "$REAL_HOME/.arthai/license" ] && LICENSE_KEY=$(cat "$REAL_HOME/.arthai/license" 2>/dev/null | tr -d '[:space:]')
61
63
 
62
64
  if [ -z "$LICENSE_KEY" ]; then
63
- echo "LICENSE REQUIRED — No license key found for marketplace plugin."
64
- echo "Run: npx @arthai/agents activate ARTH-XXXX-XXXX-XXXX-XXXX"
65
- echo "Get a key: productive@getarth.ai"
66
- exit 0
65
+ echo "LICENSE REQUIRED — No license key found for marketplace plugin." >&2
66
+ echo "Run: npx @arthai/agents activate ARTH-XXXX-XXXX-XXXX-XXXX" >&2
67
+ echo "Get a key: productive@getarth.ai" >&2
68
+ exit 2
67
69
  fi
68
70
 
69
71
  # Validate format
70
72
  if ! echo "$LICENSE_KEY" | grep -qE "$KEY_FORMAT"; then
71
- echo "LICENSE INVALID — Key format incorrect."
72
- exit 0
73
+ echo "LICENSE INVALID — Key format incorrect." >&2
74
+ exit 2
73
75
  fi
74
76
 
75
77
  # Check cache (24h TTL)
@@ -97,9 +99,9 @@ if ! $LICENSE_VALID; then
97
99
  echo "$NOW" > "$LICENSE_CACHE"
98
100
  else
99
101
  # Definitive invalid — no fallback
100
- echo "LICENSE INVALID — Key not recognized."
101
- echo "Check your key or get one at productive@getarth.ai"
102
- exit 0
102
+ echo "LICENSE INVALID — Key not recognized." >&2
103
+ echo "Check your key or get one at productive@getarth.ai" >&2
104
+ exit 2
103
105
  fi
104
106
  else
105
107
  # Network error — allow gracefully (don't block on Worker outage)
@@ -108,9 +110,13 @@ if ! $LICENSE_VALID; then
108
110
  fi
109
111
 
110
112
  # ---------------------------------------------------------------------------
111
- # Project setup (only runs if license is valid)
113
+ # Project setup (only runs if license is valid AND setup is needed)
112
114
  # ---------------------------------------------------------------------------
113
115
 
116
+ if ! $SETUP_NEEDED; then
117
+ exit 0
118
+ fi
119
+
114
120
  CLAUDE_MD="$PROJECT_DIR/CLAUDE.md"
115
121
  GITIGNORE="$PROJECT_DIR/.gitignore"
116
122
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sentinel",
3
3
  "description": "Operations and reliability — SRE, incidents, deploy monitoring",
4
- "version": "1.0.10",
4
+ "version": "1.0.12",
5
5
  "author": {
6
6
  "name": "Arth AI"
7
7
  }
@@ -1 +1 @@
1
- 1.0.10
1
+ 1.0.12
@@ -12,6 +12,18 @@
12
12
  ]
13
13
  }
14
14
  ],
15
+ "UserPromptSubmit": [
16
+ {
17
+ "matcher": "",
18
+ "hooks": [
19
+ {
20
+ "type": "command",
21
+ "command": "${CLAUDE_PLUGIN_ROOT}/hooks/project-setup.sh",
22
+ "timeout": 5
23
+ }
24
+ ]
25
+ }
26
+ ],
15
27
  "PostToolUse": [
16
28
  {
17
29
  "matcher": "Bash",
@@ -37,11 +37,13 @@ MANAGED_START="<!-- >>> claude-agents toolkit (DO NOT EDIT THIS BLOCK) >>> -->"
37
37
  MANAGED_END="<!-- <<< claude-agents toolkit <<< -->"
38
38
  GITIGNORE_START="# >>> claude-agents managed (DO NOT EDIT THIS BLOCK) >>>"
39
39
 
40
- # Check marker file — skip if current version is already set up
40
+ # Check marker file — skip SETUP if current version is already done
41
+ # But ALWAYS run license check (even if setup is done)
42
+ SETUP_NEEDED=true
41
43
  if [ -f "$MARKER_FILE" ]; then
42
44
  STORED_VERSION=$(cat "$MARKER_FILE" 2>/dev/null | tr -d '[:space:]' || echo "")
43
45
  if [ "$STORED_VERSION" = "$TOOLKIT_VERSION" ]; then
44
- exit 0
46
+ SETUP_NEEDED=false
45
47
  fi
46
48
  fi
47
49
 
@@ -60,16 +62,16 @@ LICENSE_KEY="${ARTHAI_LICENSE_KEY:-}"
60
62
  [ -z "$LICENSE_KEY" ] && [ -f "$REAL_HOME/.arthai/license" ] && LICENSE_KEY=$(cat "$REAL_HOME/.arthai/license" 2>/dev/null | tr -d '[:space:]')
61
63
 
62
64
  if [ -z "$LICENSE_KEY" ]; then
63
- echo "LICENSE REQUIRED — No license key found for marketplace plugin."
64
- echo "Run: npx @arthai/agents activate ARTH-XXXX-XXXX-XXXX-XXXX"
65
- echo "Get a key: productive@getarth.ai"
66
- exit 0
65
+ echo "LICENSE REQUIRED — No license key found for marketplace plugin." >&2
66
+ echo "Run: npx @arthai/agents activate ARTH-XXXX-XXXX-XXXX-XXXX" >&2
67
+ echo "Get a key: productive@getarth.ai" >&2
68
+ exit 2
67
69
  fi
68
70
 
69
71
  # Validate format
70
72
  if ! echo "$LICENSE_KEY" | grep -qE "$KEY_FORMAT"; then
71
- echo "LICENSE INVALID — Key format incorrect."
72
- exit 0
73
+ echo "LICENSE INVALID — Key format incorrect." >&2
74
+ exit 2
73
75
  fi
74
76
 
75
77
  # Check cache (24h TTL)
@@ -97,9 +99,9 @@ if ! $LICENSE_VALID; then
97
99
  echo "$NOW" > "$LICENSE_CACHE"
98
100
  else
99
101
  # Definitive invalid — no fallback
100
- echo "LICENSE INVALID — Key not recognized."
101
- echo "Check your key or get one at productive@getarth.ai"
102
- exit 0
102
+ echo "LICENSE INVALID — Key not recognized." >&2
103
+ echo "Check your key or get one at productive@getarth.ai" >&2
104
+ exit 2
103
105
  fi
104
106
  else
105
107
  # Network error — allow gracefully (don't block on Worker outage)
@@ -108,9 +110,13 @@ if ! $LICENSE_VALID; then
108
110
  fi
109
111
 
110
112
  # ---------------------------------------------------------------------------
111
- # Project setup (only runs if license is valid)
113
+ # Project setup (only runs if license is valid AND setup is needed)
112
114
  # ---------------------------------------------------------------------------
113
115
 
116
+ if ! $SETUP_NEEDED; then
117
+ exit 0
118
+ fi
119
+
114
120
  CLAUDE_MD="$PROJECT_DIR/CLAUDE.md"
115
121
  GITIGNORE="$PROJECT_DIR/.gitignore"
116
122
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shield",
3
3
  "description": "Safety guardrails — bash guards, edit protection, session bootstrap",
4
- "version": "1.0.10",
4
+ "version": "1.0.12",
5
5
  "author": {
6
6
  "name": "Arth AI"
7
7
  }
@@ -1 +1 @@
1
- 1.0.10
1
+ 1.0.12
@@ -22,29 +22,41 @@
22
22
  ]
23
23
  }
24
24
  ],
25
- "PreToolUse": [
25
+ "UserPromptSubmit": [
26
26
  {
27
- "matcher": "Bash",
27
+ "matcher": "",
28
28
  "hooks": [
29
29
  {
30
30
  "type": "command",
31
- "command": "${CLAUDE_PLUGIN_ROOT}/hooks/pre-bash-guard.sh",
31
+ "command": "${CLAUDE_PLUGIN_ROOT}/hooks/project-setup.sh",
32
32
  "timeout": 5
33
33
  }
34
34
  ]
35
35
  },
36
36
  {
37
- "matcher": "Edit",
37
+ "matcher": "",
38
38
  "hooks": [
39
39
  {
40
40
  "type": "command",
41
- "command": "${CLAUDE_PLUGIN_ROOT}/hooks/pre-edit-guard.sh",
41
+ "command": "${CLAUDE_PLUGIN_ROOT}/hooks/triage-router.sh",
42
+ "timeout": 5
43
+ }
44
+ ]
45
+ }
46
+ ],
47
+ "PreToolUse": [
48
+ {
49
+ "matcher": "Bash",
50
+ "hooks": [
51
+ {
52
+ "type": "command",
53
+ "command": "${CLAUDE_PLUGIN_ROOT}/hooks/pre-bash-guard.sh",
42
54
  "timeout": 5
43
55
  }
44
56
  ]
45
57
  },
46
58
  {
47
- "matcher": "Write",
59
+ "matcher": "Edit",
48
60
  "hooks": [
49
61
  {
50
62
  "type": "command",
@@ -52,15 +64,13 @@
52
64
  "timeout": 5
53
65
  }
54
66
  ]
55
- }
56
- ],
57
- "UserPromptSubmit": [
67
+ },
58
68
  {
59
- "matcher": "",
69
+ "matcher": "Write",
60
70
  "hooks": [
61
71
  {
62
72
  "type": "command",
63
- "command": "${CLAUDE_PLUGIN_ROOT}/hooks/triage-router.sh",
73
+ "command": "${CLAUDE_PLUGIN_ROOT}/hooks/pre-edit-guard.sh",
64
74
  "timeout": 5
65
75
  }
66
76
  ]
@@ -37,11 +37,13 @@ MANAGED_START="<!-- >>> claude-agents toolkit (DO NOT EDIT THIS BLOCK) >>> -->"
37
37
  MANAGED_END="<!-- <<< claude-agents toolkit <<< -->"
38
38
  GITIGNORE_START="# >>> claude-agents managed (DO NOT EDIT THIS BLOCK) >>>"
39
39
 
40
- # Check marker file — skip if current version is already set up
40
+ # Check marker file — skip SETUP if current version is already done
41
+ # But ALWAYS run license check (even if setup is done)
42
+ SETUP_NEEDED=true
41
43
  if [ -f "$MARKER_FILE" ]; then
42
44
  STORED_VERSION=$(cat "$MARKER_FILE" 2>/dev/null | tr -d '[:space:]' || echo "")
43
45
  if [ "$STORED_VERSION" = "$TOOLKIT_VERSION" ]; then
44
- exit 0
46
+ SETUP_NEEDED=false
45
47
  fi
46
48
  fi
47
49
 
@@ -60,16 +62,16 @@ LICENSE_KEY="${ARTHAI_LICENSE_KEY:-}"
60
62
  [ -z "$LICENSE_KEY" ] && [ -f "$REAL_HOME/.arthai/license" ] && LICENSE_KEY=$(cat "$REAL_HOME/.arthai/license" 2>/dev/null | tr -d '[:space:]')
61
63
 
62
64
  if [ -z "$LICENSE_KEY" ]; then
63
- echo "LICENSE REQUIRED — No license key found for marketplace plugin."
64
- echo "Run: npx @arthai/agents activate ARTH-XXXX-XXXX-XXXX-XXXX"
65
- echo "Get a key: productive@getarth.ai"
66
- exit 0
65
+ echo "LICENSE REQUIRED — No license key found for marketplace plugin." >&2
66
+ echo "Run: npx @arthai/agents activate ARTH-XXXX-XXXX-XXXX-XXXX" >&2
67
+ echo "Get a key: productive@getarth.ai" >&2
68
+ exit 2
67
69
  fi
68
70
 
69
71
  # Validate format
70
72
  if ! echo "$LICENSE_KEY" | grep -qE "$KEY_FORMAT"; then
71
- echo "LICENSE INVALID — Key format incorrect."
72
- exit 0
73
+ echo "LICENSE INVALID — Key format incorrect." >&2
74
+ exit 2
73
75
  fi
74
76
 
75
77
  # Check cache (24h TTL)
@@ -97,9 +99,9 @@ if ! $LICENSE_VALID; then
97
99
  echo "$NOW" > "$LICENSE_CACHE"
98
100
  else
99
101
  # Definitive invalid — no fallback
100
- echo "LICENSE INVALID — Key not recognized."
101
- echo "Check your key or get one at productive@getarth.ai"
102
- exit 0
102
+ echo "LICENSE INVALID — Key not recognized." >&2
103
+ echo "Check your key or get one at productive@getarth.ai" >&2
104
+ exit 2
103
105
  fi
104
106
  else
105
107
  # Network error — allow gracefully (don't block on Worker outage)
@@ -108,9 +110,13 @@ if ! $LICENSE_VALID; then
108
110
  fi
109
111
 
110
112
  # ---------------------------------------------------------------------------
111
- # Project setup (only runs if license is valid)
113
+ # Project setup (only runs if license is valid AND setup is needed)
112
114
  # ---------------------------------------------------------------------------
113
115
 
116
+ if ! $SETUP_NEEDED; then
117
+ exit 0
118
+ fi
119
+
114
120
  CLAUDE_MD="$PROJECT_DIR/CLAUDE.md"
115
121
  GITIGNORE="$PROJECT_DIR/.gitignore"
116
122
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "spark",
3
3
  "description": "Project setup and onboarding — calibrate, scan, bootstrap",
4
- "version": "1.0.10",
4
+ "version": "1.0.12",
5
5
  "author": {
6
6
  "name": "Arth AI"
7
7
  }
@@ -1 +1 @@
1
- 1.0.10
1
+ 1.0.12
@@ -21,6 +21,18 @@
21
21
  }
22
22
  ]
23
23
  }
24
+ ],
25
+ "UserPromptSubmit": [
26
+ {
27
+ "matcher": "",
28
+ "hooks": [
29
+ {
30
+ "type": "command",
31
+ "command": "${CLAUDE_PLUGIN_ROOT}/hooks/project-setup.sh",
32
+ "timeout": 5
33
+ }
34
+ ]
35
+ }
24
36
  ]
25
37
  }
26
38
  }
@@ -37,11 +37,13 @@ MANAGED_START="<!-- >>> claude-agents toolkit (DO NOT EDIT THIS BLOCK) >>> -->"
37
37
  MANAGED_END="<!-- <<< claude-agents toolkit <<< -->"
38
38
  GITIGNORE_START="# >>> claude-agents managed (DO NOT EDIT THIS BLOCK) >>>"
39
39
 
40
- # Check marker file — skip if current version is already set up
40
+ # Check marker file — skip SETUP if current version is already done
41
+ # But ALWAYS run license check (even if setup is done)
42
+ SETUP_NEEDED=true
41
43
  if [ -f "$MARKER_FILE" ]; then
42
44
  STORED_VERSION=$(cat "$MARKER_FILE" 2>/dev/null | tr -d '[:space:]' || echo "")
43
45
  if [ "$STORED_VERSION" = "$TOOLKIT_VERSION" ]; then
44
- exit 0
46
+ SETUP_NEEDED=false
45
47
  fi
46
48
  fi
47
49
 
@@ -60,16 +62,16 @@ LICENSE_KEY="${ARTHAI_LICENSE_KEY:-}"
60
62
  [ -z "$LICENSE_KEY" ] && [ -f "$REAL_HOME/.arthai/license" ] && LICENSE_KEY=$(cat "$REAL_HOME/.arthai/license" 2>/dev/null | tr -d '[:space:]')
61
63
 
62
64
  if [ -z "$LICENSE_KEY" ]; then
63
- echo "LICENSE REQUIRED — No license key found for marketplace plugin."
64
- echo "Run: npx @arthai/agents activate ARTH-XXXX-XXXX-XXXX-XXXX"
65
- echo "Get a key: productive@getarth.ai"
66
- exit 0
65
+ echo "LICENSE REQUIRED — No license key found for marketplace plugin." >&2
66
+ echo "Run: npx @arthai/agents activate ARTH-XXXX-XXXX-XXXX-XXXX" >&2
67
+ echo "Get a key: productive@getarth.ai" >&2
68
+ exit 2
67
69
  fi
68
70
 
69
71
  # Validate format
70
72
  if ! echo "$LICENSE_KEY" | grep -qE "$KEY_FORMAT"; then
71
- echo "LICENSE INVALID — Key format incorrect."
72
- exit 0
73
+ echo "LICENSE INVALID — Key format incorrect." >&2
74
+ exit 2
73
75
  fi
74
76
 
75
77
  # Check cache (24h TTL)
@@ -97,9 +99,9 @@ if ! $LICENSE_VALID; then
97
99
  echo "$NOW" > "$LICENSE_CACHE"
98
100
  else
99
101
  # Definitive invalid — no fallback
100
- echo "LICENSE INVALID — Key not recognized."
101
- echo "Check your key or get one at productive@getarth.ai"
102
- exit 0
102
+ echo "LICENSE INVALID — Key not recognized." >&2
103
+ echo "Check your key or get one at productive@getarth.ai" >&2
104
+ exit 2
103
105
  fi
104
106
  else
105
107
  # Network error — allow gracefully (don't block on Worker outage)
@@ -108,9 +110,13 @@ if ! $LICENSE_VALID; then
108
110
  fi
109
111
 
110
112
  # ---------------------------------------------------------------------------
111
- # Project setup (only runs if license is valid)
113
+ # Project setup (only runs if license is valid AND setup is needed)
112
114
  # ---------------------------------------------------------------------------
113
115
 
116
+ if ! $SETUP_NEEDED; then
117
+ exit 0
118
+ fi
119
+
114
120
  CLAUDE_MD="$PROJECT_DIR/CLAUDE.md"
115
121
  GITIGNORE="$PROJECT_DIR/.gitignore"
116
122
 
package/hook-defs.json CHANGED
@@ -123,7 +123,8 @@
123
123
  "project-setup": {
124
124
  "script": "project-setup.sh",
125
125
  "entries": [
126
- {"event": "SessionStart", "matcher": "", "timeout": 10}
126
+ {"event": "SessionStart", "matcher": "", "timeout": 10},
127
+ {"event": "UserPromptSubmit", "matcher": "", "timeout": 5}
127
128
  ]
128
129
  },
129
130
  "escalation-guard": {
@@ -37,11 +37,13 @@ MANAGED_START="<!-- >>> claude-agents toolkit (DO NOT EDIT THIS BLOCK) >>> -->"
37
37
  MANAGED_END="<!-- <<< claude-agents toolkit <<< -->"
38
38
  GITIGNORE_START="# >>> claude-agents managed (DO NOT EDIT THIS BLOCK) >>>"
39
39
 
40
- # Check marker file — skip if current version is already set up
40
+ # Check marker file — skip SETUP if current version is already done
41
+ # But ALWAYS run license check (even if setup is done)
42
+ SETUP_NEEDED=true
41
43
  if [ -f "$MARKER_FILE" ]; then
42
44
  STORED_VERSION=$(cat "$MARKER_FILE" 2>/dev/null | tr -d '[:space:]' || echo "")
43
45
  if [ "$STORED_VERSION" = "$TOOLKIT_VERSION" ]; then
44
- exit 0
46
+ SETUP_NEEDED=false
45
47
  fi
46
48
  fi
47
49
 
@@ -60,16 +62,16 @@ LICENSE_KEY="${ARTHAI_LICENSE_KEY:-}"
60
62
  [ -z "$LICENSE_KEY" ] && [ -f "$REAL_HOME/.arthai/license" ] && LICENSE_KEY=$(cat "$REAL_HOME/.arthai/license" 2>/dev/null | tr -d '[:space:]')
61
63
 
62
64
  if [ -z "$LICENSE_KEY" ]; then
63
- echo "LICENSE REQUIRED — No license key found for marketplace plugin."
64
- echo "Run: npx @arthai/agents activate ARTH-XXXX-XXXX-XXXX-XXXX"
65
- echo "Get a key: productive@getarth.ai"
66
- exit 0
65
+ echo "LICENSE REQUIRED — No license key found for marketplace plugin." >&2
66
+ echo "Run: npx @arthai/agents activate ARTH-XXXX-XXXX-XXXX-XXXX" >&2
67
+ echo "Get a key: productive@getarth.ai" >&2
68
+ exit 2
67
69
  fi
68
70
 
69
71
  # Validate format
70
72
  if ! echo "$LICENSE_KEY" | grep -qE "$KEY_FORMAT"; then
71
- echo "LICENSE INVALID — Key format incorrect."
72
- exit 0
73
+ echo "LICENSE INVALID — Key format incorrect." >&2
74
+ exit 2
73
75
  fi
74
76
 
75
77
  # Check cache (24h TTL)
@@ -97,9 +99,9 @@ if ! $LICENSE_VALID; then
97
99
  echo "$NOW" > "$LICENSE_CACHE"
98
100
  else
99
101
  # Definitive invalid — no fallback
100
- echo "LICENSE INVALID — Key not recognized."
101
- echo "Check your key or get one at productive@getarth.ai"
102
- exit 0
102
+ echo "LICENSE INVALID — Key not recognized." >&2
103
+ echo "Check your key or get one at productive@getarth.ai" >&2
104
+ exit 2
103
105
  fi
104
106
  else
105
107
  # Network error — allow gracefully (don't block on Worker outage)
@@ -108,9 +110,13 @@ if ! $LICENSE_VALID; then
108
110
  fi
109
111
 
110
112
  # ---------------------------------------------------------------------------
111
- # Project setup (only runs if license is valid)
113
+ # Project setup (only runs if license is valid AND setup is needed)
112
114
  # ---------------------------------------------------------------------------
113
115
 
116
+ if ! $SETUP_NEEDED; then
117
+ exit 0
118
+ fi
119
+
114
120
  CLAUDE_MD="$PROJECT_DIR/CLAUDE.md"
115
121
  GITIGNORE="$PROJECT_DIR/.gitignore"
116
122
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arthai/agents",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "AI-powered development toolkit for Claude Code — agents, skills, and hooks",
5
5
  "bin": {
6
6
  "arthai": "bin/cli.js"