brainiac-fizzy 0.0.19 → 0.0.20
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/lib/brainiac/plugins/fizzy/delegators.rb +2 -2
- data/lib/brainiac/plugins/fizzy/handlers/assignment.rb +4 -4
- data/lib/brainiac/plugins/fizzy/handlers/comments.rb +6 -4
- data/lib/brainiac/plugins/fizzy/helpers.rb +2 -2
- data/lib/brainiac/plugins/fizzy/hooks.rb +2 -1
- data/lib/brainiac/plugins/fizzy/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: b22cbc7ee87173e942ed06f8c2c913017a58d305938267e72acfb4c4c5e25e84
|
|
4
|
+
data.tar.gz: b2408edb59cf13713cd2931233c64d84a9a02a638fb3e3ef88ec155bf03c9397
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5b751238e7115a6d3f375878eb2f68fb4c5b95b004587edd826f8652108fe771598ab9940b85a0f4d567d2a356753148cdd50fe9b1cf02f5752739773c259213
|
|
7
|
+
data.tar.gz: 8438490f58ee985aa9953a20d0727c36ffde30abd5b677f343a295d2eb80d68a759efc0772f0175bdf426fd811c79560082ef1b72ef128b42addb6901ee49436
|
|
@@ -29,8 +29,8 @@ def fetch_intent_context(card_number, repo_path:, agent_name: nil)
|
|
|
29
29
|
Brainiac::Plugins::Fizzy::Helpers.fetch_intent_context(card_number, repo_path: repo_path, agent_name: agent_name)
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
def move_card_to_column(card_number, column_name, project_config:, agent_name: nil)
|
|
33
|
-
Brainiac::Plugins::Fizzy::Helpers.move_card_to_column(card_number, column_name, project_config: project_config, agent_name: agent_name)
|
|
32
|
+
def move_card_to_column(card_number, column_name, project_config:, agent_name: nil, board_key: nil)
|
|
33
|
+
Brainiac::Plugins::Fizzy::Helpers.move_card_to_column(card_number, column_name, project_config: project_config, agent_name: agent_name, board_key: board_key)
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
def append_fizzy_comment_footer(card_number, project_config:, agent_name: nil, since: nil)
|
|
@@ -62,7 +62,7 @@ def handle_card_assigned(payload, board_key: nil)
|
|
|
62
62
|
card_number: card_number, card_internal_id: card_internal_id, title: title, tags: tags,
|
|
63
63
|
branch: branch, worktree_path: worktree_path, project_config: project_config, project_key: project_key,
|
|
64
64
|
agent_name: assigned_agent, model: initial_model,
|
|
65
|
-
effort: initial_effort, cli_provider_override: initial_cli
|
|
65
|
+
effort: initial_effort, cli_provider_override: initial_cli, board_key: board_key
|
|
66
66
|
)
|
|
67
67
|
end
|
|
68
68
|
|
|
@@ -123,7 +123,7 @@ def setup_assigned_worktree(repo_path, branch, card_internal_id, card_number, pr
|
|
|
123
123
|
end
|
|
124
124
|
|
|
125
125
|
def dispatch_assigned_card(card_number:, card_internal_id:, title:, tags:, branch:, worktree_path:,
|
|
126
|
-
project_config:, project_key:, agent_name:, model:, effort:, cli_provider_override:)
|
|
126
|
+
project_config:, project_key:, agent_name:, model:, effort:, cli_provider_override:, board_key: nil)
|
|
127
127
|
card_context = prefetch_card_context(card_number, repo_path: project_config["repo_path"], agent_name: agent_name)
|
|
128
128
|
planning_info = detect_planning_mode(text: title, tags: tags, card_internal_id: card_internal_id, card_number: card_number)
|
|
129
129
|
|
|
@@ -152,11 +152,11 @@ def dispatch_assigned_card(card_number:, card_internal_id:, title:, tags:, branc
|
|
|
152
152
|
project_config: project_config, chdir: worktree_path,
|
|
153
153
|
log_name: "assigned-#{card_number}", model: model, effort: effort,
|
|
154
154
|
agent_name: agent_name, card_number: card_number, source: :fizzy,
|
|
155
|
-
source_context: { card_number: card_number, dispatched_at: Time.now },
|
|
155
|
+
source_context: { card_number: card_number, board_key: board_key, dispatched_at: Time.now },
|
|
156
156
|
cli_provider: cli_provider_override)
|
|
157
157
|
register_session(card_key, pid, log_file: log_file, supersede_key: card_key, agent_name: agent_name)
|
|
158
158
|
|
|
159
|
-
Thread.new { move_card_to_column(card_number, "right_now", project_config: project_config, agent_name: agent_name) }
|
|
159
|
+
Thread.new { move_card_to_column(card_number, "right_now", project_config: project_config, agent_name: agent_name, board_key: board_key) }
|
|
160
160
|
|
|
161
161
|
[200, { status: "processed", card: card_number, branch: branch, project: project_key, agent: agent_name }.to_json]
|
|
162
162
|
end
|
|
@@ -18,6 +18,7 @@ CommentContext = Struct.new(
|
|
|
18
18
|
:project_config, :project_key, :card_number, :worktree,
|
|
19
19
|
:model, :effort, :deploy_intent, :cli_provider_override,
|
|
20
20
|
:comment_vars, :card_tags, :worktree_override, :fresh,
|
|
21
|
+
:board_key,
|
|
21
22
|
keyword_init: true
|
|
22
23
|
)
|
|
23
24
|
|
|
@@ -67,7 +68,7 @@ def handle_comment(payload, board_key: nil)
|
|
|
67
68
|
card_info: card_info, comment_id: comment_id, creator_name: creator_name,
|
|
68
69
|
creator_is_agent: creator_is_agent, mentioned_agent: mentioned_agent,
|
|
69
70
|
agent_name: agent_name, is_cross_agent_mention: is_cross_agent_mention,
|
|
70
|
-
project_config: project_config, project_key: project_key
|
|
71
|
+
project_config: project_config, project_key: project_key, board_key: board_key
|
|
71
72
|
)
|
|
72
73
|
|
|
73
74
|
# --- Intent gate (mirrors brainiac-discord pattern) ---
|
|
@@ -101,7 +102,7 @@ end
|
|
|
101
102
|
|
|
102
103
|
def build_comment_context(eventable:, plain_text:, tags:, card_internal_id:, card_info:, comment_id:, creator_name:,
|
|
103
104
|
creator_is_agent:, mentioned_agent:, agent_name:, is_cross_agent_mention:,
|
|
104
|
-
project_config:, project_key:)
|
|
105
|
+
project_config:, project_key:, board_key: nil)
|
|
105
106
|
deploy_intent = tags[:deploy_intent]
|
|
106
107
|
LOG.info "[Deploy] Detected [deploy#{":#{deploy_intent}" unless deploy_intent == :auto}] tag on card #{card_internal_id}" if deploy_intent
|
|
107
108
|
|
|
@@ -137,6 +138,7 @@ def build_comment_context(eventable:, plain_text:, tags:, card_internal_id:, car
|
|
|
137
138
|
creator_is_agent: creator_is_agent, mentioned_agent: mentioned_agent,
|
|
138
139
|
agent_name: agent_name, is_cross_agent_mention: is_cross_agent_mention,
|
|
139
140
|
project_config: project_config, project_key: project_key,
|
|
141
|
+
board_key: board_key,
|
|
140
142
|
model: effective_model,
|
|
141
143
|
effort: effective_effort,
|
|
142
144
|
deploy_intent: deploy_intent,
|
|
@@ -554,13 +556,13 @@ def dispatch_followup_comment(ctx, card_key:, card_number:, work_dir:)
|
|
|
554
556
|
source: :fizzy, cli_provider: ctx.cli_provider_override, resume: should_resume,
|
|
555
557
|
source_context: {
|
|
556
558
|
card_number: card_number, card_internal_id: ctx.card_internal_id,
|
|
557
|
-
deploy_intent: ctx.deploy_intent, dispatched_at: Time.now
|
|
559
|
+
deploy_intent: ctx.deploy_intent, board_key: ctx.board_key, dispatched_at: Time.now
|
|
558
560
|
})
|
|
559
561
|
return [200, { status: "dispatch_failed", agent: ctx.agent_name, card: card_number }.to_json] unless pid
|
|
560
562
|
|
|
561
563
|
register_session(card_key, pid, log_file: log_file, supersede_key: card_key, agent_name: ctx.agent_name)
|
|
562
564
|
|
|
563
|
-
Thread.new { move_card_to_column(card_number, "right_now", project_config: ctx.project_config, agent_name: ctx.agent_name) }
|
|
565
|
+
Thread.new { move_card_to_column(card_number, "right_now", project_config: ctx.project_config, agent_name: ctx.agent_name, board_key: ctx.board_key) }
|
|
564
566
|
|
|
565
567
|
{ status: "follow_up", card: card_number, card_internal_id: ctx.card_internal_id,
|
|
566
568
|
worktree: work_dir, project: ctx.project_key }
|
|
@@ -92,8 +92,8 @@ module Brainiac
|
|
|
92
92
|
nil
|
|
93
93
|
end
|
|
94
94
|
|
|
95
|
-
def move_card_to_column(card_number, column_name, project_config:, agent_name: nil)
|
|
96
|
-
board_key
|
|
95
|
+
def move_card_to_column(card_number, column_name, project_config:, agent_name: nil, board_key: nil)
|
|
96
|
+
board_key ||= Config.board_key_for_project(project_config)
|
|
97
97
|
column_id = Config.board_column_id(board_key, column_name) if board_key
|
|
98
98
|
return unless column_id
|
|
99
99
|
|
|
@@ -38,7 +38,8 @@ module Brainiac
|
|
|
38
38
|
unless ctx[:skip_column_move] || work_item_merged?(card_number)
|
|
39
39
|
Helpers.move_card_to_column(card_number, "needs_review",
|
|
40
40
|
project_config: ctx[:project_config],
|
|
41
|
-
agent_name: ctx[:agent_name]
|
|
41
|
+
agent_name: ctx[:agent_name],
|
|
42
|
+
board_key: ctx[:source_context]&.dig(:board_key))
|
|
42
43
|
record_self_move(card_number)
|
|
43
44
|
end
|
|
44
45
|
|