x_aeon_agents 2.0.4 → 2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee491e3709d878a677bb2468858a77b652a8abb2252adee3360250fa97cfb124
4
- data.tar.gz: f3931b321d6543788ce76f600497e752f68c02e37a5898840bf2cc691a1c091a
3
+ metadata.gz: 5f92902d46f24df17a53a218985801e0e9bf46a7f68baca87fc0f51bcc941409
4
+ data.tar.gz: e7f3821af21c86e308b690de3ca85943663a2e5fceed95a20cc361b7de595002
5
5
  SHA512:
6
- metadata.gz: 30126b405563c4315ecdc3a02161c5194f98dca77198343b9818d99992a44c5b35a0f55526c42e75bd0b8216f46b381876f6f63e40cad44fcae92a76ef6af5f7
7
- data.tar.gz: 732494caa45af12147985e009e5ee70553ed5621eaca5ad6dbedc97976d9f0ddd899efb8dc812f0e4b8ceb9e222feed3213146a9b8685bbeb96d63bb0e17b63c
6
+ metadata.gz: dbbf138ea84abc33f30b04c9bef997eae604ce88dbb572968a9198973e32b0f8be95d276047e0c60ddb53a0773badf70972e3d59faffb533ecb77eed421b6fac
7
+ data.tar.gz: 79e7d6a39eab32a6813f6f10af4cf09640032ca0f2a061b2727116b196e78574268ea055ab117e6890985b8997b6b2c503c94e6a32881f5004396c622114cc0c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ # [v2.2.0](https://github.com/Muriel-Salvan/x_aeon_agents/compare/v2.1.0...v2.2.0) (2026-10-26 12:38:46)
2
+
3
+ ### Features
4
+
5
+ * [feat: add non-interactive answer fallback for agents](https://github.com/Muriel-Salvan/x_aeon_agents/commit/fc2e01beb4f7b88ae6a5ba97af5ca69422147632)
6
+
7
+ # [v2.1.0](https://github.com/Muriel-Salvan/x_aeon_agents/compare/v2.0.4...v2.1.0) (2026-10-22 13:25:41)
8
+
9
+ ## Global changes
10
+ ### Patches
11
+
12
+ * [feat(skill-installer): add global skills installation support](https://github.com/Muriel-Salvan/x_aeon_agents/commit/165088bc2cbd077cb3ccd781c51d9a590cef0b80)
13
+
14
+ ## Changes for skill-installer
15
+ ### Features
16
+
17
+ * [feat(skill-installer): add global skills installation support](https://github.com/Muriel-Salvan/x_aeon_agents/commit/165088bc2cbd077cb3ccd781c51d9a590cef0b80)
18
+
1
19
  # [v2.0.4](https://github.com/Muriel-Salvan/x_aeon_agents/compare/v2.0.3...v2.0.4) (2026-10-22 11:31:50)
2
20
 
3
21
  ### Patches
@@ -35,10 +35,16 @@ module XAeonAgents
35
35
  #
36
36
  # @param base [Class] The base class prepending this mixin
37
37
  def self.prepended(base)
38
- base.prepend ComposableAgents::Mixins::ArtifactContract unless base.ancestors.include?(ComposableAgents::Mixins::ArtifactContract)
39
- base.prepend ComposableAgents::Mixins::Resumable unless base.ancestors.include?(ComposableAgents::Mixins::Resumable)
38
+ mixins_to_prepend = [
39
+ ComposableAgents::Mixins::ArtifactContract,
40
+ ComposableAgents::Mixins::Resumable
41
+ ]
42
+ mixins_to_prepend << ComposableAgents::Mixins::UserInteraction if base.is_a?(ComposableAgents::Cline::Agent)
43
+ mixins_to_prepend << ComposableAgents::Mixins::AiAgentUserInteraction if base.is_a?(ComposableAgents::AiAgents::Agent)
44
+ mixins_to_prepend.each { |mixin| base.prepend mixin unless base.ancestors.include?(mixin) }
40
45
  # Make sure we always prepend at the top our initializer that sets all defaults
41
46
  base.prepend(
47
+ # TODO: Move this module into a dedicated mixin class and Ruby file.
42
48
  Module.new do
43
49
  # Constructor
44
50
  #
@@ -126,6 +132,20 @@ module XAeonAgents
126
132
  block&.call
127
133
  end
128
134
  end
135
+
136
+ # Answer an agent's question
137
+ #
138
+ # @param question [String] The agent's question
139
+ # @return [String] The answer that should be sent back to the agent
140
+ def answer_to(question)
141
+ if Config.interactive
142
+ super
143
+ else
144
+ 'You are running in non-interactive mode, so no human user is available to answer this question. ' \
145
+ 'Please continue using your best judgment and your existing knowledge to determine the most ' \
146
+ 'appropriate answer, and proceed with the task without further user input.'
147
+ end
148
+ end
129
149
  end
130
150
  )
131
151
  end
@@ -10,7 +10,13 @@ module XAeonAgents
10
10
  #
11
11
  # @return [Hash{Symbol => Object}] Set of input artifacts description, per artifact name
12
12
  def input_artifacts_contracts
13
- { agent: 'Agent name to be used to install skills' }
13
+ {
14
+ agent: 'Agent name to be used to install skills',
15
+ global: {
16
+ description: 'Install skills globally instead of in the project',
17
+ optional: true
18
+ }
19
+ }
14
20
  end
15
21
 
16
22
  # Constructor
@@ -22,9 +28,10 @@ module XAeonAgents
22
28
 
23
29
  # Execute the agent to install skills from the .skills manifest.
24
30
  #
25
- # @param agent [String] Agent name to be used to install skills
31
+ # @param agent [String, Symbol] Agent name to be used to install skills
32
+ # @param global [Boolean] Install skills globally (in the user home directory) instead of in the project
26
33
  # @return [Hash{Symbol => Object}] Output artifacts content
27
- def run(agent: 'cline')
34
+ def run(agent: 'cline', global: false)
28
35
  super
29
36
  agent_name = agent.to_sym
30
37
  original_no_color = ENV.fetch('NO_COLOR', nil)
@@ -39,7 +46,8 @@ module XAeonAgents
39
46
  install_skills_recursive(
40
47
  repo_desc[4..].strip,
41
48
  skills_desc[12..].split(',').map(&:strip),
42
- agent_name
49
+ agent_name,
50
+ global:
43
51
  )
44
52
  end
45
53
 
@@ -49,22 +57,34 @@ module XAeonAgents
49
57
 
50
58
  private
51
59
 
60
+ # Directory in which skills are installed for the given agent.
61
+ #
62
+ # @param _agent [Symbol] Agent to use
63
+ # @param global [Boolean] Whether skills are installed globally
64
+ # @return [String] Skills directory path
65
+ def skills_dir_for(_agent, global)
66
+ # TODO: Adapt to other kinds of agents, or get the directory from skillkit itself.
67
+ if global
68
+ File.join(Dir.home, '.cline', 'skills')
69
+ else
70
+ File.join(Dir.pwd, '.cline', 'skills')
71
+ end
72
+ end
73
+
52
74
  # Install skills using skillkit, including dependencies recursively.
53
75
  #
54
76
  # @param repo [String] Repository
55
77
  # @param skills [Array<String>] Skills to install
56
78
  # @param agent [Symbol] Agent to use
57
- def install_skills_recursive(repo, skills, agent)
79
+ # @param global [Boolean] Whether skills are installed globally
80
+ def install_skills_recursive(repo, skills, agent, global: false)
58
81
  return if skills.empty?
59
82
 
60
- agents_config = {
61
- cline: { skills_dir: '.cline/skills' }
62
- }
63
- skills_dir = agents_config[agent][:skills_dir]
83
+ skills_dir = skills_dir_for(agent, global)
64
84
 
65
85
  task(:install_skills, name: 'Install skills', intent: "Install skills #{repo} / #{skills.join(',')}") do
66
- Helpers.run_cmd("skillkit install #{repo} --yes --skills=#{skills.join(',')} --agent=#{agent}")
67
- fix_skills_metadata(skills, agent)
86
+ Helpers.run_cmd("skillkit install #{repo} --yes --skills=#{skills.join(',')} --agent=#{agent}#{' --global' if global}")
87
+ fix_skills_metadata(skills, skills_dir)
68
88
 
69
89
  # Resolve dependencies
70
90
  deps_per_repo = {}
@@ -82,20 +102,17 @@ module XAeonAgents
82
102
  end
83
103
  end
84
104
 
85
- deps_per_repo.each { |dep_repo, dep_skills| install_skills_recursive(dep_repo, dep_skills, agent) }
105
+ deps_per_repo.each { |dep_repo, dep_skills| install_skills_recursive(dep_repo, dep_skills, agent, global:) }
86
106
  end
87
107
  end
88
108
 
89
109
  # Fix the .skillkit.json subpath property after skillkit install.
90
110
  #
91
111
  # @param skills [Array<String>] Installed skills
92
- # @param agent [Symbol] Agent used
93
- def fix_skills_metadata(skills, agent)
112
+ # @param skills_dir [String] Directory in which skills are installed
113
+ def fix_skills_metadata(skills, skills_dir)
94
114
  require 'json'
95
115
 
96
- agents_config = { cline: { skills_dir: '.cline/skills' } }
97
- skills_dir = agents_config[agent][:skills_dir]
98
-
99
116
  skills.each do |skill_name|
100
117
  json_file = "#{skills_dir}/#{skill_name}/.skillkit.json"
101
118
  json = JSON.parse(File.read(json_file))
@@ -333,13 +333,16 @@ module XAeonAgents
333
333
  $ xaa install-skills
334
334
 
335
335
  $ xaa install-skills --agent cline
336
+
337
+ $ xaa install-skills --global
336
338
  LONGDESC
337
339
  option :agent, type: :string, default: 'cline', desc: 'Agent name to be used to install skills'
340
+ option :global, type: :boolean, default: false, desc: 'Install skills globally instead of in the project'
338
341
  # Installs skills and their dependencies from the .skills manifest.
339
342
  def install_skills
340
- Agents::SkillInstallerAgent.new(session_id: options[:session_id]).run(
341
- agent: options[:agent].to_sym
342
- )
343
+ kwargs = { agent: options[:agent].to_sym }
344
+ kwargs[:global] = true if options[:global]
345
+ Agents::SkillInstallerAgent.new(session_id: options[:session_id]).run(**kwargs)
343
346
  end
344
347
 
345
348
  # --------------------------------------------------------------------------- #
@@ -2,5 +2,5 @@ module XAeonAgents
2
2
  # @!group Global API
3
3
 
4
4
  # Gem version
5
- VERSION = '2.0.4'
5
+ VERSION = '2.2.0'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: x_aeon_agents
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muriel Salvan