brainiac 0.0.20 → 0.0.22
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 +4 -4
- data/Gemfile.lock +2 -2
- data/lib/brainiac/handlers/shared/git.rb +14 -0
- data/lib/brainiac/helpers.rb +4 -4
- data/lib/brainiac/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d2f6f6333947e353250c4376dda8ca73b5a664b9abfbbb749a9436155c078bfa
|
|
4
|
+
data.tar.gz: 59287d2abad5f87518d4d892f60a91980ac539dc7d04f0a5f9051e18109c257d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 103697dfedeee51f027d37adfba26e15d0372e24c6f7bcca0af06d53e40999e79757ed0c28e52e921b2f2ca44068ccabb5e5282b8b39afe6825a67165084e2ed
|
|
7
|
+
data.tar.gz: c2a6a2f76bddfe3c7a2b1db7f4d9a16484285d935f4e9b7fd2ef78c669934e4901537c43263f9206517626a3632f8204897f753ada2be7b89c8f9a1faa463451
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
brainiac (0.0.
|
|
4
|
+
brainiac (0.0.22)
|
|
5
5
|
puma (~> 7.2)
|
|
6
6
|
rackup (~> 2.3)
|
|
7
7
|
sinatra (~> 4.1)
|
|
@@ -84,7 +84,7 @@ DEPENDENCIES
|
|
|
84
84
|
CHECKSUMS
|
|
85
85
|
ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
|
|
86
86
|
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
|
|
87
|
-
brainiac (0.0.
|
|
87
|
+
brainiac (0.0.22)
|
|
88
88
|
json (2.19.9) sha256=9b9025b7cdddafa38d316eca0b2358488e42d417045c1b90d216a9fefe46b79a
|
|
89
89
|
language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
|
|
90
90
|
lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
|
|
@@ -156,6 +156,20 @@ def create_or_reuse_worktree(repo_path:, branch:, base_ref: nil, worktree_path:
|
|
|
156
156
|
worktree_path
|
|
157
157
|
end
|
|
158
158
|
|
|
159
|
+
# Find an existing worktree for a card by scanning the filesystem.
|
|
160
|
+
def find_worktree_for_card(card_number, repo_path:)
|
|
161
|
+
return nil unless card_number
|
|
162
|
+
|
|
163
|
+
repo_dir = File.dirname(repo_path)
|
|
164
|
+
repo_base = File.basename(repo_path)
|
|
165
|
+
candidates = Dir.glob(File.join(repo_dir, "#{repo_base}--fizzy-#{card_number}-*")).select { |d| File.directory?(d) }
|
|
166
|
+
return nil if candidates.empty?
|
|
167
|
+
|
|
168
|
+
worktree = candidates.first
|
|
169
|
+
branch = File.basename(worktree).sub("#{repo_base}--", "")
|
|
170
|
+
{ worktree: worktree, branch: branch }
|
|
171
|
+
end
|
|
172
|
+
|
|
159
173
|
# Clean up all worktrees associated with a work item (primary + cross-agent review).
|
|
160
174
|
# Safe: skips worktrees with uncommitted changes.
|
|
161
175
|
def cleanup_work_item_worktrees(card_number, repo_path:, primary_worktree: nil, primary_branch: nil)
|
data/lib/brainiac/helpers.rb
CHANGED
|
@@ -652,8 +652,8 @@ def check_brainiac_restart(head_before, status_before, chdir, project_key_for_re
|
|
|
652
652
|
end
|
|
653
653
|
end
|
|
654
654
|
|
|
655
|
-
def detect_model(project_config, tags: [], text: "")
|
|
656
|
-
resolved = resolve_project_cli_config(project_config)
|
|
655
|
+
def detect_model(project_config, tags: [], text: "", cli_provider_override: nil)
|
|
656
|
+
resolved = resolve_project_cli_config(project_config, cli_provider_override: cli_provider_override)
|
|
657
657
|
allowed_models = resolved["allowed_models"] || {}
|
|
658
658
|
return resolved["agent_model"] if allowed_models.empty?
|
|
659
659
|
|
|
@@ -674,8 +674,8 @@ end
|
|
|
674
674
|
# Returns the effort level string (e.g. "high") or nil.
|
|
675
675
|
# If the requested level isn't supported by the current model, returns the closest
|
|
676
676
|
# lower level from allowed_efforts.
|
|
677
|
-
def detect_effort(project_config, tags: [], text: "")
|
|
678
|
-
resolved = resolve_project_cli_config(project_config)
|
|
677
|
+
def detect_effort(project_config, tags: [], text: "", cli_provider_override: nil)
|
|
678
|
+
resolved = resolve_project_cli_config(project_config, cli_provider_override: cli_provider_override)
|
|
679
679
|
allowed = resolved["allowed_efforts"] || %w[low medium high xhigh max]
|
|
680
680
|
|
|
681
681
|
# Inline tag: [effort:high] — works in any channel
|
data/lib/brainiac/version.rb
CHANGED