brainiac-discord 0.0.15 → 0.0.16

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: 7091fddf5aa23196f3e031d6830549eca0463e29fad37433d4683a7c8cb816f7
4
- data.tar.gz: 1b1bf72a7180aa002c06a18774e65e36550fab21a0c7ec1dc02498454e1c9b2c
3
+ metadata.gz: afab8518a3314e7873e2bec99ba79f7efeedf1b45b80be5ccc9d0654d0b64b77
4
+ data.tar.gz: a39348b184343d375313e1ca30e746165690562a729bac532e9880af4a9b540c
5
5
  SHA512:
6
- metadata.gz: e1ed0e106262c3cd09c04d00cc918db60fa04c52651c45365daa2af1d1bf658e7ba619f8ecc60f3c841893802ceeb6c4fa18eca8f875bee5c0b3acc18cce26b5
7
- data.tar.gz: d124b1ed107451cf7c48e9815ba8e9fa049d891c91f78c000f7d2b46945053c7c710c29d15983c02ecf33cc73f0e0343942ee4ba777fa6c84bce474ae3a7456a
6
+ metadata.gz: aecb0bff2e82096ba8ec67c7a862a9316025030fa999d87c323f023a95ab463807c0dcf1eac5b7055b1d6307f346acf80fd08ae0805bf21c7e248fc29e3f35b5
7
+ data.tar.gz: aeb1f966c703cbf553d50535dcf6768ef1af4fc38443c47b0e0d4544dd11c42d5cf31049ccc86a7a8d6efdfd7e256e9f02c898cac9792ebc82732c243ba4692b
@@ -61,6 +61,7 @@ module Brainiac
61
61
 
62
62
  reload_projects!
63
63
  reload_agent_registry!
64
+ reload_profiles! if defined?(reload_profiles!)
64
65
  Config.reload!
65
66
  return unless authorize_user(discord_user, discord_user_id, message, channel_id, message_id, agent_name, bot_token)
66
67
 
@@ -605,7 +606,8 @@ module Brainiac
605
606
  meta_file: meta_file, model: model, effort: effort, actual_resume: actual_resume,
606
607
  resolved: resolved, project_config: project_config,
607
608
  session_key: session_key, supersede_key: supersede_key,
608
- attachment_paths: attachment_paths, timestamp: timestamp, response_dir: response_dir
609
+ attachment_paths: attachment_paths, timestamp: timestamp, response_dir: response_dir,
610
+ profile: parse_inline_tags(clean_content)[:profile]
609
611
  )
610
612
  end
611
613
 
@@ -904,7 +906,7 @@ module Brainiac
904
906
  def spawn_agent(agent_key:, agent_name:, bot_token:, channel_id:, message_id:, discord_user:,
905
907
  work_dir:, prompt_file:, response_file:, meta_file:, model:, effort:,
906
908
  actual_resume:, resolved:, project_config:,
907
- session_key:, supersede_key:, attachment_paths:, timestamp:, response_dir:)
909
+ session_key:, supersede_key:, attachment_paths:, timestamp:, response_dir:, profile: nil)
908
910
  agent_config_name = agent_key.downcase.gsub(/[^a-z0-9-]/, "-")
909
911
  log_file = File.join(response_dir, "discord-agent-#{timestamp}-#{agent_key}-#{message_id}.log")
910
912
 
@@ -920,6 +922,10 @@ module Brainiac
920
922
 
921
923
  spawn_env = {}
922
924
  agent_env = agent_env_for(agent_name)
925
+ # Profile env (named bundle, e.g. an alternate kiro-cli account via
926
+ # XDG_DATA_HOME). An explicitly-requested [profile:X] wins over agent
927
+ # env; the default profile is only a fallback. See core profiles.rb.
928
+ agent_env = profile_spawn_env(agent_env, profile) if defined?(profile_spawn_env)
923
929
  unless agent_env.empty?
924
930
  spawn_env.merge!(agent_env)
925
931
  LOG.info "[Discord:#{agent_name}] Injecting #{agent_env.size} env var(s): #{agent_env.keys.join(", ")}" if defined?(LOG)
@@ -3,7 +3,7 @@
3
3
  module Brainiac
4
4
  module Plugins
5
5
  module Discord
6
- VERSION = "0.0.15"
6
+ VERSION = "0.0.16"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brainiac-discord
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Davis