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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: afab8518a3314e7873e2bec99ba79f7efeedf1b45b80be5ccc9d0654d0b64b77
|
|
4
|
+
data.tar.gz: a39348b184343d375313e1ca30e746165690562a729bac532e9880af4a9b540c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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)
|