@catladder/cli 0.0.0-main-4fc3c2ec → 0.0.0-main-b67a4ad4

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.
@@ -6061,7 +6061,7 @@ exports.createJobsForAgentContext = createJobsForAgentContext;
6061
6061
  "use strict";
6062
6062
 
6063
6063
  // prompts.ts — MCP-only, DRY, review-first-then-push, CI diagnosis (no retries), self-mention guard,
6064
- // event prompt supports review-on-demand via manual "agent-review" job or fallback MR review.
6064
+ // conversations-aware: always read the thread first (issues & MRs), reply inline, avoid duplicates.
6065
6065
  // Prevents double-runs: event-triggered work cancels any running "agent-review" job on the MR's own pipeline.
6066
6066
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6067
6067
  exports.getMergeRequestPrompt = exports.getEventPrompt = void 0;
@@ -6085,6 +6085,30 @@ const goldenRules = ({ agentUserName }) => `
6085
6085
  - Keep actions minimal and idempotent. Avoid duplicate comments or duplicate MRs.
6086
6086
  - Use ONE stable \`source_branch\` per run; do not regenerate its name later.
6087
6087
  `;
6088
+ /* ---------- NEW: conversation intake + threading rules ---------- */
6089
+ const conversationsIntake = ({ agentUserName }) => `
6090
+ ## Conversations Intake & Threading (MANDATORY before acting)
6091
+ Always load and reason about the current conversation to avoid duplicates and to respond in the right place.
6092
+
6093
+ ### What to fetch
6094
+ - **MRs**: Use \`mr_discussions({ projectId: $CI_PROJECT_ID, mergeRequestIid })\` to load all threads and notes.
6095
+ - **Issues**: If an issue-discussions/listing tool exists, use it. If not available in \`gitlab-mcp\`, rely on the **event payload** and **your last note ids** if present; otherwise post a single concise note acknowledging the limitation and proceed.
6096
+
6097
+ ### How to use it
6098
+ 1) **Detect review/answer context**:
6099
+ - Identify the **latest human note** in the thread (exclude notes authored by "${agentUserName}").
6100
+ - If the latest human note **replies to you** (mentions you or is in a discussion you started), reply **in the same discussion**.
6101
+ 2) **De-duplication**:
6102
+ - If your most recent message is the **last message overall** and **no one else replied** since, prefer **updating your last note** instead of posting a new one:
6103
+ - Use \`update_merge_request_note\` or \`update_issue_note\` accordingly.
6104
+ 3) **Reply placement**:
6105
+ - For MR code discussions: reply **inline in the same discussion** (preserve thread context).
6106
+ - For general/MR overview threads: add a single consolidated reply (avoid multiple scattered notes).
6107
+ 4) **Sanitize before write**:
6108
+ - Apply the Self-mention Guard, then post.
6109
+ 5) **If conversations list is unavailable**:
6110
+ - Post one short note: that you cannot fetch the full conversation due to missing MCP capability, then proceed minimally (no spam).
6111
+ `;
6088
6112
  const selfMentionGuard = ({ agentUserName }) => `
6089
6113
  ## Self-mention Guard (mandatory preflight for ALL writes)
6090
6114
  Before ANY call that writes text (comment/create/update MR/issue/commit message), sanitize the text:
@@ -6125,11 +6149,11 @@ const mcpOnly = () => `
6125
6149
  - list_issues({ projectId, state?: "opened"|"closed", scope?: "all"|... })
6126
6150
 
6127
6151
  - **Branch & Files**
6128
- - create_branch({ projectId, branchName, ref }) // ref = default branch or SHA
6152
+ - create_branch({ projectId, branchName, ref })
6129
6153
  - push_files({ projectId, branch, commitMessage, files: [{ filePath, content }] })
6130
6154
  - create_or_update_file({ projectId, branch, filePath, content, commitMessage })
6131
6155
  - get_file_contents({ projectId, ref, path })
6132
- - get_branch_diffs({ projectId, from, to }) // compare refs
6156
+ - get_branch_diffs({ projectId, from, to })
6133
6157
 
6134
6158
  - **Merge Requests**
6135
6159
  - create_merge_request({ projectId, sourceBranch, targetBranch, title, description, assigneeUsernames?: string[] })
@@ -6164,8 +6188,7 @@ From \`event_json\`, extract:
6164
6188
  - note_id if present (\`#note_<id>\`)
6165
6189
  - description/body text, state, author \`user_username\`, timestamps
6166
6190
  - project id/path; detect default branch via \`get_merge_request\`/context as needed
6167
-
6168
- If any key is missing, choose the safest minimal action or briefly explain via a comment.
6191
+ - If available: the discussion id / thread context of the note to enable inline replies.
6169
6192
  `;
6170
6193
  /* Helper used by Single-Runner Guard and Review-on-Demand to find the MR’s own pipeline */
6171
6194
  const resolveMrPipeline = () => `
@@ -6181,7 +6204,6 @@ Given \`mr_iid\`:
6181
6204
  4) The chosen pipeline becomes \`mr_pipeline_id\`. Use it for all job queries/plays/cancels related to this MR.
6182
6205
  - If no pipeline is found, post a short MR note explaining that no pipeline was located for the current MR head and proceed with review actions without CI job control.
6183
6206
  `;
6184
- // Updated: operate on the MR’s pipeline, not the event pipeline
6185
6207
  const singleRunnerGuard = () => `
6186
6208
  ## Single-Runner Guard (event-triggered work on an existing MR)
6187
6209
  Before entering MR Review Mode from an event:
@@ -6223,6 +6245,7 @@ If the issue/note text **asks for a review** (case-insensitive tokens like: "rev
6223
6245
  - \`list_pipeline_jobs({ projectId: $CI_PROJECT_ID, pipelineId: mr_pipeline_id })\`.
6224
6246
  - If any job has \`status = "manual"\` **and** its \`name\` ends with "agent-review":
6225
6247
  - Trigger via \`play_pipeline_job({ projectId: $CI_PROJECT_ID, jobId })\`.
6248
+ - **Conversations Intake**: run the section above to determine **where** to post the confirmation (prefer replying in the same thread that requested review).
6226
6249
  - Post a short comment confirming you triggered the review job (sanitize).
6227
6250
  - **Stop** further review actions.
6228
6251
 
@@ -6236,22 +6259,25 @@ const eventWorkflow = ({ agentUserName }) => `
6236
6259
  ## High-Reliability Workflow (sequence + postconditions)
6237
6260
  Follow this order for any change work:
6238
6261
 
6262
+ 0) **Conversations Intake (MANDATORY)**:
6263
+ - For MR targets: call \`mr_discussions\` and apply the rules in **Conversations Intake & Threading**.
6264
+ - For issue targets: attempt to load notes if supported; otherwise rely on event context and post one concise note acknowledging the limitation.
6265
+
6239
6266
  1) **Acknowledge** with a short comment on the issue/MR thread (\`create_note\`), **unless the last actor is you**.
6240
6267
  2) **Discover default branch** (e.g., "main") — infer from repo/MR context if needed.
6241
6268
  3) **Create a working branch** from default (stable name, e.g., \`fix/issue-<iid>-<slug>\` or \`feat/issue-<iid>-<slug>\`) via \`create_branch\`.
6242
6269
  4) **Write changes → commit → push to remote branch** via \`push_files\` (or \`create_or_update_file\`).
6243
6270
  5) **Verify push landed**:
6244
- - Fetch latest state (optional: \`get_file_contents\`/log) and capture a short SHA from the branch head if exposed by the host.
6245
- - Compare default vs \`source_branch\` via \`get_branch_diffs({ from: "<default>", to: "<source>" })\` and ensure there are diffs.
6271
+ - Fetch latest state and ensure diffs via \`get_branch_diffs({ from: "<default>", to: "<source>" })\`.
6246
6272
  6) **Create or update MR** ONLY if there is a non-empty diff via \`create_merge_request\`.
6247
6273
  - Include \`Closes #<issue_iid>\` in MR description when applicable.
6248
6274
  - **Assign the MR to yourself**: \`assigneeUsernames: ["${agentUserName}"]\`.
6249
- 7) **Follow-up comment** with branch name, any commit short SHA you can obtain, files changed count (approx by diffs), and MR link via \`create_note\`, **unless the last actor is you**.
6275
+ 7) **Follow-up comment** with branch name, any commit short SHA you can obtain, files changed count (approx by diffs), and MR link via \`create_note\`, **unless the last actor is you**. Place this **in the relevant conversation thread** (see Intake rules).
6250
6276
  8) **If verification fails**:
6251
6277
  - Do NOT create the MR.
6252
6278
  - Comment the exact failure and retry once with a fresh branch name. If still failing, comment and stop.
6253
6279
 
6254
- For Q&A-only (no code changes), just post a concise, helpful answer on the same issue/MR (sanitize first).
6280
+ For Q&A-only (no code changes), run **Conversations Intake** first, then post a single concise, helpful answer **in the correct thread** (sanitize).
6255
6281
  `;
6256
6282
  /* ---------- MR-review specific (shared with both prompts) ---------- */
6257
6283
  const mrScope = ({ agentUserName }) => `
@@ -6268,7 +6294,7 @@ Follow this sequence with verification at each step:
6268
6294
  1) **Collect context**
6269
6295
  - Get MR metadata via \`get_merge_request({ projectId: $CI_PROJECT_ID, mergeRequestIid })\`.
6270
6296
  - Fetch the full changeset/diffs via \`get_merge_request_diffs\` (or \`list_merge_request_diffs\`) and open discussions via \`mr_discussions\`.
6271
- - Read existing notes to avoid duplication.
6297
+ - **Conversations Intake**: analyze discussions to find latest human notes, detect replies to the agent, and decide between inline reply vs updating your prior note.
6272
6298
 
6273
6299
  2) **Code review**
6274
6300
  - Identify required changes (bugs, tests, style, security, perf, docs).
@@ -6282,12 +6308,12 @@ Follow this sequence with verification at each step:
6282
6308
  - Apply minimal, safe changes; keep commits small and clear.
6283
6309
  - **Push** to the MR's **source branch** via \`push_files\` (or \`create_or_update_file\`).
6284
6310
  - **Verify push landed** using \`get_branch_diffs({ from: "<target_branch>", to: "<source_branch>" })\` and ensure there are diffs.
6285
- - Post a follow-up MR note summarizing what changed and why (sanitize).
6311
+ - Post a follow-up MR note summarizing what changed and why, **in the appropriate thread** (sanitize).
6286
6312
  `;
6287
6313
  const ciInspection = () => `
6288
6314
  4) **CI jobs (diagnose only; no job retries)**
6289
- - To analyze CI context during review triggered from events, prefer the **MR pipeline** (not the event pipeline).
6290
- - If you are in MR Review Mode and have \`mr_pipeline_id\` (from **Resolve MR Pipeline**):
6315
+ - Prefer the **MR pipeline** (not the event pipeline).
6316
+ - If you have \`mr_pipeline_id\` (from **Resolve MR Pipeline**):
6291
6317
  - \`list_pipeline_jobs({ projectId: $CI_PROJECT_ID, pipelineId: mr_pipeline_id })\`.
6292
6318
  - Consider **only** jobs with \`status = "failed"\` and \`allow_failure = false\`.
6293
6319
  - For each such job:
@@ -6328,11 +6354,12 @@ $(cat $TRIGGER_PAYLOAD)
6328
6354
  ${identity(ctx)}
6329
6355
  ${goldenRules(ctx)}
6330
6356
  ${selfMentionGuard(ctx)}
6357
+ ${conversationsIntake(ctx)} <!-- NEW: mandatory before acting -->
6331
6358
  ${eventSelfParse()}
6332
- ${resolveMrPipeline()} <!-- new helper used by review/cancel paths -->
6333
- ${singleRunnerGuard()} <!-- operates on MR pipeline, not event pipeline -->
6359
+ ${resolveMrPipeline()} <!-- used by review/cancel paths -->
6360
+ ${singleRunnerGuard()} <!-- operates on MR pipeline, not event pipeline -->
6334
6361
  ${reviewOnDemandFromEvents()}
6335
- ${mrReviewBundle(ctx)} <!-- included so the agent can execute it when review intent is true -->
6362
+ ${mrReviewBundle(ctx)} <!-- agent can execute when review intent is true -->
6336
6363
  ${eventWorkflow(ctx)}
6337
6364
  ${commentGuidelines()}
6338
6365
  ${mcpOnly()}
@@ -6352,6 +6379,7 @@ description: $CI_MERGE_REQUEST_DESCRIPTION
6352
6379
  ${mrScope(ctx)}
6353
6380
  ${goldenRules(ctx)}
6354
6381
  ${selfMentionGuard(ctx)}
6382
+ ${conversationsIntake(ctx)} <!-- NEW: always read MR discussions -->
6355
6383
  ${mrWorkflow()}
6356
6384
  ${ciInspection()}
6357
6385
  ${commentGuidelines()}
@@ -2134,10 +2134,13 @@ const setupAgentWebhook = async (instance, projectId, agentName, triggerToken) =
2134
2134
  merge_request_title: "{{merge_request.title}}",
2135
2135
  merge_request_source_branch: "{{merge_request.source_branch}}",
2136
2136
  merge_request_time_estimate: "{{merge_request.time_estimate}}",
2137
+ // FIXME: may cause issues with gitlab webhooks when there are double quotes in the description
2137
2138
  //merge_request_description: "{{merge_request.description}}",
2138
2139
  merge_request_merge_status: "{{merge_request.merge_status}}",
2139
2140
  merge_request_last_commit_title: "{{merge_request.last_commit.title}}",
2140
- merge_request_last_commit_message: "{{merge_request.last_commit.message}}",
2141
+ // FIXME: may cause issues with gitlab webhooks when there are double quotes in the message
2142
+ //merge_request_last_commit_message:
2143
+ // "{{merge_request.last_commit.message}}",
2141
2144
  merge_request_last_commit_author_name: "{{merge_request.last_commit.author.name}}",
2142
2145
  merge_request_last_commit_author_email: "{{merge_request.last_commit.author.email}}",
2143
2146
  },
@@ -9289,7 +9292,7 @@ exports.createJobsForAgentContext = createJobsForAgentContext;
9289
9292
  "use strict";
9290
9293
 
9291
9294
  // prompts.ts — MCP-only, DRY, review-first-then-push, CI diagnosis (no retries), self-mention guard,
9292
- // event prompt supports review-on-demand via manual "agent-review" job or fallback MR review.
9295
+ // conversations-aware: always read the thread first (issues & MRs), reply inline, avoid duplicates.
9293
9296
  // Prevents double-runs: event-triggered work cancels any running "agent-review" job on the MR's own pipeline.
9294
9297
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9295
9298
  exports.getMergeRequestPrompt = exports.getEventPrompt = void 0;
@@ -9313,6 +9316,30 @@ const goldenRules = ({ agentUserName }) => `
9313
9316
  - Keep actions minimal and idempotent. Avoid duplicate comments or duplicate MRs.
9314
9317
  - Use ONE stable \`source_branch\` per run; do not regenerate its name later.
9315
9318
  `;
9319
+ /* ---------- NEW: conversation intake + threading rules ---------- */
9320
+ const conversationsIntake = ({ agentUserName }) => `
9321
+ ## Conversations Intake & Threading (MANDATORY before acting)
9322
+ Always load and reason about the current conversation to avoid duplicates and to respond in the right place.
9323
+
9324
+ ### What to fetch
9325
+ - **MRs**: Use \`mr_discussions({ projectId: $CI_PROJECT_ID, mergeRequestIid })\` to load all threads and notes.
9326
+ - **Issues**: If an issue-discussions/listing tool exists, use it. If not available in \`gitlab-mcp\`, rely on the **event payload** and **your last note ids** if present; otherwise post a single concise note acknowledging the limitation and proceed.
9327
+
9328
+ ### How to use it
9329
+ 1) **Detect review/answer context**:
9330
+ - Identify the **latest human note** in the thread (exclude notes authored by "${agentUserName}").
9331
+ - If the latest human note **replies to you** (mentions you or is in a discussion you started), reply **in the same discussion**.
9332
+ 2) **De-duplication**:
9333
+ - If your most recent message is the **last message overall** and **no one else replied** since, prefer **updating your last note** instead of posting a new one:
9334
+ - Use \`update_merge_request_note\` or \`update_issue_note\` accordingly.
9335
+ 3) **Reply placement**:
9336
+ - For MR code discussions: reply **inline in the same discussion** (preserve thread context).
9337
+ - For general/MR overview threads: add a single consolidated reply (avoid multiple scattered notes).
9338
+ 4) **Sanitize before write**:
9339
+ - Apply the Self-mention Guard, then post.
9340
+ 5) **If conversations list is unavailable**:
9341
+ - Post one short note: that you cannot fetch the full conversation due to missing MCP capability, then proceed minimally (no spam).
9342
+ `;
9316
9343
  const selfMentionGuard = ({ agentUserName }) => `
9317
9344
  ## Self-mention Guard (mandatory preflight for ALL writes)
9318
9345
  Before ANY call that writes text (comment/create/update MR/issue/commit message), sanitize the text:
@@ -9353,11 +9380,11 @@ const mcpOnly = () => `
9353
9380
  - list_issues({ projectId, state?: "opened"|"closed", scope?: "all"|... })
9354
9381
 
9355
9382
  - **Branch & Files**
9356
- - create_branch({ projectId, branchName, ref }) // ref = default branch or SHA
9383
+ - create_branch({ projectId, branchName, ref })
9357
9384
  - push_files({ projectId, branch, commitMessage, files: [{ filePath, content }] })
9358
9385
  - create_or_update_file({ projectId, branch, filePath, content, commitMessage })
9359
9386
  - get_file_contents({ projectId, ref, path })
9360
- - get_branch_diffs({ projectId, from, to }) // compare refs
9387
+ - get_branch_diffs({ projectId, from, to })
9361
9388
 
9362
9389
  - **Merge Requests**
9363
9390
  - create_merge_request({ projectId, sourceBranch, targetBranch, title, description, assigneeUsernames?: string[] })
@@ -9392,8 +9419,7 @@ From \`event_json\`, extract:
9392
9419
  - note_id if present (\`#note_<id>\`)
9393
9420
  - description/body text, state, author \`user_username\`, timestamps
9394
9421
  - project id/path; detect default branch via \`get_merge_request\`/context as needed
9395
-
9396
- If any key is missing, choose the safest minimal action or briefly explain via a comment.
9422
+ - If available: the discussion id / thread context of the note to enable inline replies.
9397
9423
  `;
9398
9424
  /* Helper used by Single-Runner Guard and Review-on-Demand to find the MR’s own pipeline */
9399
9425
  const resolveMrPipeline = () => `
@@ -9409,7 +9435,6 @@ Given \`mr_iid\`:
9409
9435
  4) The chosen pipeline becomes \`mr_pipeline_id\`. Use it for all job queries/plays/cancels related to this MR.
9410
9436
  - If no pipeline is found, post a short MR note explaining that no pipeline was located for the current MR head and proceed with review actions without CI job control.
9411
9437
  `;
9412
- // Updated: operate on the MR’s pipeline, not the event pipeline
9413
9438
  const singleRunnerGuard = () => `
9414
9439
  ## Single-Runner Guard (event-triggered work on an existing MR)
9415
9440
  Before entering MR Review Mode from an event:
@@ -9451,6 +9476,7 @@ If the issue/note text **asks for a review** (case-insensitive tokens like: "rev
9451
9476
  - \`list_pipeline_jobs({ projectId: $CI_PROJECT_ID, pipelineId: mr_pipeline_id })\`.
9452
9477
  - If any job has \`status = "manual"\` **and** its \`name\` ends with "agent-review":
9453
9478
  - Trigger via \`play_pipeline_job({ projectId: $CI_PROJECT_ID, jobId })\`.
9479
+ - **Conversations Intake**: run the section above to determine **where** to post the confirmation (prefer replying in the same thread that requested review).
9454
9480
  - Post a short comment confirming you triggered the review job (sanitize).
9455
9481
  - **Stop** further review actions.
9456
9482
 
@@ -9464,22 +9490,25 @@ const eventWorkflow = ({ agentUserName }) => `
9464
9490
  ## High-Reliability Workflow (sequence + postconditions)
9465
9491
  Follow this order for any change work:
9466
9492
 
9493
+ 0) **Conversations Intake (MANDATORY)**:
9494
+ - For MR targets: call \`mr_discussions\` and apply the rules in **Conversations Intake & Threading**.
9495
+ - For issue targets: attempt to load notes if supported; otherwise rely on event context and post one concise note acknowledging the limitation.
9496
+
9467
9497
  1) **Acknowledge** with a short comment on the issue/MR thread (\`create_note\`), **unless the last actor is you**.
9468
9498
  2) **Discover default branch** (e.g., "main") — infer from repo/MR context if needed.
9469
9499
  3) **Create a working branch** from default (stable name, e.g., \`fix/issue-<iid>-<slug>\` or \`feat/issue-<iid>-<slug>\`) via \`create_branch\`.
9470
9500
  4) **Write changes → commit → push to remote branch** via \`push_files\` (or \`create_or_update_file\`).
9471
9501
  5) **Verify push landed**:
9472
- - Fetch latest state (optional: \`get_file_contents\`/log) and capture a short SHA from the branch head if exposed by the host.
9473
- - Compare default vs \`source_branch\` via \`get_branch_diffs({ from: "<default>", to: "<source>" })\` and ensure there are diffs.
9502
+ - Fetch latest state and ensure diffs via \`get_branch_diffs({ from: "<default>", to: "<source>" })\`.
9474
9503
  6) **Create or update MR** ONLY if there is a non-empty diff via \`create_merge_request\`.
9475
9504
  - Include \`Closes #<issue_iid>\` in MR description when applicable.
9476
9505
  - **Assign the MR to yourself**: \`assigneeUsernames: ["${agentUserName}"]\`.
9477
- 7) **Follow-up comment** with branch name, any commit short SHA you can obtain, files changed count (approx by diffs), and MR link via \`create_note\`, **unless the last actor is you**.
9506
+ 7) **Follow-up comment** with branch name, any commit short SHA you can obtain, files changed count (approx by diffs), and MR link via \`create_note\`, **unless the last actor is you**. Place this **in the relevant conversation thread** (see Intake rules).
9478
9507
  8) **If verification fails**:
9479
9508
  - Do NOT create the MR.
9480
9509
  - Comment the exact failure and retry once with a fresh branch name. If still failing, comment and stop.
9481
9510
 
9482
- For Q&A-only (no code changes), just post a concise, helpful answer on the same issue/MR (sanitize first).
9511
+ For Q&A-only (no code changes), run **Conversations Intake** first, then post a single concise, helpful answer **in the correct thread** (sanitize).
9483
9512
  `;
9484
9513
  /* ---------- MR-review specific (shared with both prompts) ---------- */
9485
9514
  const mrScope = ({ agentUserName }) => `
@@ -9496,7 +9525,7 @@ Follow this sequence with verification at each step:
9496
9525
  1) **Collect context**
9497
9526
  - Get MR metadata via \`get_merge_request({ projectId: $CI_PROJECT_ID, mergeRequestIid })\`.
9498
9527
  - Fetch the full changeset/diffs via \`get_merge_request_diffs\` (or \`list_merge_request_diffs\`) and open discussions via \`mr_discussions\`.
9499
- - Read existing notes to avoid duplication.
9528
+ - **Conversations Intake**: analyze discussions to find latest human notes, detect replies to the agent, and decide between inline reply vs updating your prior note.
9500
9529
 
9501
9530
  2) **Code review**
9502
9531
  - Identify required changes (bugs, tests, style, security, perf, docs).
@@ -9510,12 +9539,12 @@ Follow this sequence with verification at each step:
9510
9539
  - Apply minimal, safe changes; keep commits small and clear.
9511
9540
  - **Push** to the MR's **source branch** via \`push_files\` (or \`create_or_update_file\`).
9512
9541
  - **Verify push landed** using \`get_branch_diffs({ from: "<target_branch>", to: "<source_branch>" })\` and ensure there are diffs.
9513
- - Post a follow-up MR note summarizing what changed and why (sanitize).
9542
+ - Post a follow-up MR note summarizing what changed and why, **in the appropriate thread** (sanitize).
9514
9543
  `;
9515
9544
  const ciInspection = () => `
9516
9545
  4) **CI jobs (diagnose only; no job retries)**
9517
- - To analyze CI context during review triggered from events, prefer the **MR pipeline** (not the event pipeline).
9518
- - If you are in MR Review Mode and have \`mr_pipeline_id\` (from **Resolve MR Pipeline**):
9546
+ - Prefer the **MR pipeline** (not the event pipeline).
9547
+ - If you have \`mr_pipeline_id\` (from **Resolve MR Pipeline**):
9519
9548
  - \`list_pipeline_jobs({ projectId: $CI_PROJECT_ID, pipelineId: mr_pipeline_id })\`.
9520
9549
  - Consider **only** jobs with \`status = "failed"\` and \`allow_failure = false\`.
9521
9550
  - For each such job:
@@ -9556,11 +9585,12 @@ $(cat $TRIGGER_PAYLOAD)
9556
9585
  ${identity(ctx)}
9557
9586
  ${goldenRules(ctx)}
9558
9587
  ${selfMentionGuard(ctx)}
9588
+ ${conversationsIntake(ctx)} <!-- NEW: mandatory before acting -->
9559
9589
  ${eventSelfParse()}
9560
- ${resolveMrPipeline()} <!-- new helper used by review/cancel paths -->
9561
- ${singleRunnerGuard()} <!-- operates on MR pipeline, not event pipeline -->
9590
+ ${resolveMrPipeline()} <!-- used by review/cancel paths -->
9591
+ ${singleRunnerGuard()} <!-- operates on MR pipeline, not event pipeline -->
9562
9592
  ${reviewOnDemandFromEvents()}
9563
- ${mrReviewBundle(ctx)} <!-- included so the agent can execute it when review intent is true -->
9593
+ ${mrReviewBundle(ctx)} <!-- agent can execute when review intent is true -->
9564
9594
  ${eventWorkflow(ctx)}
9565
9595
  ${commentGuidelines()}
9566
9596
  ${mcpOnly()}
@@ -9580,6 +9610,7 @@ description: $CI_MERGE_REQUEST_DESCRIPTION
9580
9610
  ${mrScope(ctx)}
9581
9611
  ${goldenRules(ctx)}
9582
9612
  ${selfMentionGuard(ctx)}
9613
+ ${conversationsIntake(ctx)} <!-- NEW: always read MR discussions -->
9583
9614
  ${mrWorkflow()}
9584
9615
  ${ciInspection()}
9585
9616
  ${commentGuidelines()}
@@ -67,10 +67,13 @@ const setupAgentWebhook = async (instance, projectId, agentName, triggerToken) =
67
67
  merge_request_title: "{{merge_request.title}}",
68
68
  merge_request_source_branch: "{{merge_request.source_branch}}",
69
69
  merge_request_time_estimate: "{{merge_request.time_estimate}}",
70
+ // FIXME: may cause issues with gitlab webhooks when there are double quotes in the description
70
71
  //merge_request_description: "{{merge_request.description}}",
71
72
  merge_request_merge_status: "{{merge_request.merge_status}}",
72
73
  merge_request_last_commit_title: "{{merge_request.last_commit.title}}",
73
- merge_request_last_commit_message: "{{merge_request.last_commit.message}}",
74
+ // FIXME: may cause issues with gitlab webhooks when there are double quotes in the message
75
+ //merge_request_last_commit_message:
76
+ // "{{merge_request.last_commit.message}}",
74
77
  merge_request_last_commit_author_name: "{{merge_request.last_commit.author.name}}",
75
78
  merge_request_last_commit_author_email: "{{merge_request.last_commit.author.email}}",
76
79
  },
@@ -1 +1 @@
1
- {"version":3,"file":"setupAgents.js","sourceRoot":"","sources":["../../../../../../../../src/apps/cli/commands/project/setup/setupAgents.ts"],"names":[],"mappings":";;;AACA,wDAA8E;AAC9E,6EAA0E;AAC1E,oFAAmF;AACnF,4CAAmD;AAyDnD,MAAM,iBAAiB,GAAG,KAAK,EAC7B,QAAyB,EACzB,SAAiB,EACQ,EAAE;IAC3B,OAAO,MAAM,IAAA,wBAAe,EAAC,QAAQ,EAAE,YAAY,SAAS,WAAW,CAAC,CAAC;AAC3E,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,KAAK,EAC9B,QAAyB,EACzB,SAAiB,EACjB,SAAiB,EACF,EAAE;IACjB,MAAM,IAAA,wBAAe,EACnB,QAAQ,EACR,YAAY,SAAS,aAAa,SAAS,EAAE,EAC7C,SAAS,EACT,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,KAAK,EAC9B,QAAyB,EACzB,SAAiB,EACjB,WAAmB,EACI,EAAE;IACzB,OAAO,MAAM,IAAA,wBAAe,EAC1B,QAAQ,EACR,YAAY,SAAS,WAAW,EAChC,EAAE,WAAW,EAAE,EACf,MAAM,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,KAAK,EACxB,QAAyB,EACzB,SAAiB,EACG,EAAE;IACtB,OAAO,MAAM,IAAA,wBAAe,EAAC,QAAQ,EAAE,YAAY,SAAS,QAAQ,CAAC,CAAC;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CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,QAAQ,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;QACvD,OAAO;IACT,CAAC;IAED,KAAK,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,IAAI,YAAY,EAAE,CAAC;QACpD,IAAI,WAAW,CAAC,IAAI,KAAK,QAAQ,IAAI,WAAW,EAAE,CAAC;YACjD,MAAM,UAAU,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;IAED,QAAQ,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;IAC7C,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjB,QAAQ,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;IAC1C,QAAQ,CAAC,GAAG,CAAC,+DAA+D,CAAC,CAAC;IAC9E,QAAQ,CAAC,GAAG,CAAC,gDAAgD,CAAC,CAAC;IAC/D,QAAQ,CAAC,GAAG,CACV,6EAA6E,CAC9E,CAAC;IACF,QAAQ,CAAC,GAAG,CACV,oGAAoG,CACrG,CAAC;AACJ,CAAC,CAAC;AA/BW,QAAA,WAAW,eA+BtB"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  // prompts.ts — MCP-only, DRY, review-first-then-push, CI diagnosis (no retries), self-mention guard,
3
- // event prompt supports review-on-demand via manual "agent-review" job or fallback MR review.
3
+ // conversations-aware: always read the thread first (issues & MRs), reply inline, avoid duplicates.
4
4
  // Prevents double-runs: event-triggered work cancels any running "agent-review" job on the MR's own pipeline.
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getMergeRequestPrompt = exports.getEventPrompt = void 0;
@@ -24,6 +24,30 @@ const goldenRules = ({ agentUserName }) => `
24
24
  - Keep actions minimal and idempotent. Avoid duplicate comments or duplicate MRs.
25
25
  - Use ONE stable \`source_branch\` per run; do not regenerate its name later.
26
26
  `;
27
+ /* ---------- NEW: conversation intake + threading rules ---------- */
28
+ const conversationsIntake = ({ agentUserName }) => `
29
+ ## Conversations Intake & Threading (MANDATORY before acting)
30
+ Always load and reason about the current conversation to avoid duplicates and to respond in the right place.
31
+
32
+ ### What to fetch
33
+ - **MRs**: Use \`mr_discussions({ projectId: $CI_PROJECT_ID, mergeRequestIid })\` to load all threads and notes.
34
+ - **Issues**: If an issue-discussions/listing tool exists, use it. If not available in \`gitlab-mcp\`, rely on the **event payload** and **your last note ids** if present; otherwise post a single concise note acknowledging the limitation and proceed.
35
+
36
+ ### How to use it
37
+ 1) **Detect review/answer context**:
38
+ - Identify the **latest human note** in the thread (exclude notes authored by "${agentUserName}").
39
+ - If the latest human note **replies to you** (mentions you or is in a discussion you started), reply **in the same discussion**.
40
+ 2) **De-duplication**:
41
+ - If your most recent message is the **last message overall** and **no one else replied** since, prefer **updating your last note** instead of posting a new one:
42
+ - Use \`update_merge_request_note\` or \`update_issue_note\` accordingly.
43
+ 3) **Reply placement**:
44
+ - For MR code discussions: reply **inline in the same discussion** (preserve thread context).
45
+ - For general/MR overview threads: add a single consolidated reply (avoid multiple scattered notes).
46
+ 4) **Sanitize before write**:
47
+ - Apply the Self-mention Guard, then post.
48
+ 5) **If conversations list is unavailable**:
49
+ - Post one short note: that you cannot fetch the full conversation due to missing MCP capability, then proceed minimally (no spam).
50
+ `;
27
51
  const selfMentionGuard = ({ agentUserName }) => `
28
52
  ## Self-mention Guard (mandatory preflight for ALL writes)
29
53
  Before ANY call that writes text (comment/create/update MR/issue/commit message), sanitize the text:
@@ -64,11 +88,11 @@ const mcpOnly = () => `
64
88
  - list_issues({ projectId, state?: "opened"|"closed", scope?: "all"|... })
65
89
 
66
90
  - **Branch & Files**
67
- - create_branch({ projectId, branchName, ref }) // ref = default branch or SHA
91
+ - create_branch({ projectId, branchName, ref })
68
92
  - push_files({ projectId, branch, commitMessage, files: [{ filePath, content }] })
69
93
  - create_or_update_file({ projectId, branch, filePath, content, commitMessage })
70
94
  - get_file_contents({ projectId, ref, path })
71
- - get_branch_diffs({ projectId, from, to }) // compare refs
95
+ - get_branch_diffs({ projectId, from, to })
72
96
 
73
97
  - **Merge Requests**
74
98
  - create_merge_request({ projectId, sourceBranch, targetBranch, title, description, assigneeUsernames?: string[] })
@@ -103,8 +127,7 @@ From \`event_json\`, extract:
103
127
  - note_id if present (\`#note_<id>\`)
104
128
  - description/body text, state, author \`user_username\`, timestamps
105
129
  - project id/path; detect default branch via \`get_merge_request\`/context as needed
106
-
107
- If any key is missing, choose the safest minimal action or briefly explain via a comment.
130
+ - If available: the discussion id / thread context of the note to enable inline replies.
108
131
  `;
109
132
  /* Helper used by Single-Runner Guard and Review-on-Demand to find the MR’s own pipeline */
110
133
  const resolveMrPipeline = () => `
@@ -120,7 +143,6 @@ Given \`mr_iid\`:
120
143
  4) The chosen pipeline becomes \`mr_pipeline_id\`. Use it for all job queries/plays/cancels related to this MR.
121
144
  - If no pipeline is found, post a short MR note explaining that no pipeline was located for the current MR head and proceed with review actions without CI job control.
122
145
  `;
123
- // Updated: operate on the MR’s pipeline, not the event pipeline
124
146
  const singleRunnerGuard = () => `
125
147
  ## Single-Runner Guard (event-triggered work on an existing MR)
126
148
  Before entering MR Review Mode from an event:
@@ -162,6 +184,7 @@ If the issue/note text **asks for a review** (case-insensitive tokens like: "rev
162
184
  - \`list_pipeline_jobs({ projectId: $CI_PROJECT_ID, pipelineId: mr_pipeline_id })\`.
163
185
  - If any job has \`status = "manual"\` **and** its \`name\` ends with "agent-review":
164
186
  - Trigger via \`play_pipeline_job({ projectId: $CI_PROJECT_ID, jobId })\`.
187
+ - **Conversations Intake**: run the section above to determine **where** to post the confirmation (prefer replying in the same thread that requested review).
165
188
  - Post a short comment confirming you triggered the review job (sanitize).
166
189
  - **Stop** further review actions.
167
190
 
@@ -175,22 +198,25 @@ const eventWorkflow = ({ agentUserName }) => `
175
198
  ## High-Reliability Workflow (sequence + postconditions)
176
199
  Follow this order for any change work:
177
200
 
201
+ 0) **Conversations Intake (MANDATORY)**:
202
+ - For MR targets: call \`mr_discussions\` and apply the rules in **Conversations Intake & Threading**.
203
+ - For issue targets: attempt to load notes if supported; otherwise rely on event context and post one concise note acknowledging the limitation.
204
+
178
205
  1) **Acknowledge** with a short comment on the issue/MR thread (\`create_note\`), **unless the last actor is you**.
179
206
  2) **Discover default branch** (e.g., "main") — infer from repo/MR context if needed.
180
207
  3) **Create a working branch** from default (stable name, e.g., \`fix/issue-<iid>-<slug>\` or \`feat/issue-<iid>-<slug>\`) via \`create_branch\`.
181
208
  4) **Write changes → commit → push to remote branch** via \`push_files\` (or \`create_or_update_file\`).
182
209
  5) **Verify push landed**:
183
- - Fetch latest state (optional: \`get_file_contents\`/log) and capture a short SHA from the branch head if exposed by the host.
184
- - Compare default vs \`source_branch\` via \`get_branch_diffs({ from: "<default>", to: "<source>" })\` and ensure there are diffs.
210
+ - Fetch latest state and ensure diffs via \`get_branch_diffs({ from: "<default>", to: "<source>" })\`.
185
211
  6) **Create or update MR** ONLY if there is a non-empty diff via \`create_merge_request\`.
186
212
  - Include \`Closes #<issue_iid>\` in MR description when applicable.
187
213
  - **Assign the MR to yourself**: \`assigneeUsernames: ["${agentUserName}"]\`.
188
- 7) **Follow-up comment** with branch name, any commit short SHA you can obtain, files changed count (approx by diffs), and MR link via \`create_note\`, **unless the last actor is you**.
214
+ 7) **Follow-up comment** with branch name, any commit short SHA you can obtain, files changed count (approx by diffs), and MR link via \`create_note\`, **unless the last actor is you**. Place this **in the relevant conversation thread** (see Intake rules).
189
215
  8) **If verification fails**:
190
216
  - Do NOT create the MR.
191
217
  - Comment the exact failure and retry once with a fresh branch name. If still failing, comment and stop.
192
218
 
193
- For Q&A-only (no code changes), just post a concise, helpful answer on the same issue/MR (sanitize first).
219
+ For Q&A-only (no code changes), run **Conversations Intake** first, then post a single concise, helpful answer **in the correct thread** (sanitize).
194
220
  `;
195
221
  /* ---------- MR-review specific (shared with both prompts) ---------- */
196
222
  const mrScope = ({ agentUserName }) => `
@@ -207,7 +233,7 @@ Follow this sequence with verification at each step:
207
233
  1) **Collect context**
208
234
  - Get MR metadata via \`get_merge_request({ projectId: $CI_PROJECT_ID, mergeRequestIid })\`.
209
235
  - Fetch the full changeset/diffs via \`get_merge_request_diffs\` (or \`list_merge_request_diffs\`) and open discussions via \`mr_discussions\`.
210
- - Read existing notes to avoid duplication.
236
+ - **Conversations Intake**: analyze discussions to find latest human notes, detect replies to the agent, and decide between inline reply vs updating your prior note.
211
237
 
212
238
  2) **Code review**
213
239
  - Identify required changes (bugs, tests, style, security, perf, docs).
@@ -221,12 +247,12 @@ Follow this sequence with verification at each step:
221
247
  - Apply minimal, safe changes; keep commits small and clear.
222
248
  - **Push** to the MR's **source branch** via \`push_files\` (or \`create_or_update_file\`).
223
249
  - **Verify push landed** using \`get_branch_diffs({ from: "<target_branch>", to: "<source_branch>" })\` and ensure there are diffs.
224
- - Post a follow-up MR note summarizing what changed and why (sanitize).
250
+ - Post a follow-up MR note summarizing what changed and why, **in the appropriate thread** (sanitize).
225
251
  `;
226
252
  const ciInspection = () => `
227
253
  4) **CI jobs (diagnose only; no job retries)**
228
- - To analyze CI context during review triggered from events, prefer the **MR pipeline** (not the event pipeline).
229
- - If you are in MR Review Mode and have \`mr_pipeline_id\` (from **Resolve MR Pipeline**):
254
+ - Prefer the **MR pipeline** (not the event pipeline).
255
+ - If you have \`mr_pipeline_id\` (from **Resolve MR Pipeline**):
230
256
  - \`list_pipeline_jobs({ projectId: $CI_PROJECT_ID, pipelineId: mr_pipeline_id })\`.
231
257
  - Consider **only** jobs with \`status = "failed"\` and \`allow_failure = false\`.
232
258
  - For each such job:
@@ -267,11 +293,12 @@ $(cat $TRIGGER_PAYLOAD)
267
293
  ${identity(ctx)}
268
294
  ${goldenRules(ctx)}
269
295
  ${selfMentionGuard(ctx)}
296
+ ${conversationsIntake(ctx)} <!-- NEW: mandatory before acting -->
270
297
  ${eventSelfParse()}
271
- ${resolveMrPipeline()} <!-- new helper used by review/cancel paths -->
272
- ${singleRunnerGuard()} <!-- operates on MR pipeline, not event pipeline -->
298
+ ${resolveMrPipeline()} <!-- used by review/cancel paths -->
299
+ ${singleRunnerGuard()} <!-- operates on MR pipeline, not event pipeline -->
273
300
  ${reviewOnDemandFromEvents()}
274
- ${mrReviewBundle(ctx)} <!-- included so the agent can execute it when review intent is true -->
301
+ ${mrReviewBundle(ctx)} <!-- agent can execute when review intent is true -->
275
302
  ${eventWorkflow(ctx)}
276
303
  ${commentGuidelines()}
277
304
  ${mcpOnly()}
@@ -291,6 +318,7 @@ description: $CI_MERGE_REQUEST_DESCRIPTION
291
318
  ${mrScope(ctx)}
292
319
  ${goldenRules(ctx)}
293
320
  ${selfMentionGuard(ctx)}
321
+ ${conversationsIntake(ctx)} <!-- NEW: always read MR discussions -->
294
322
  ${mrWorkflow()}
295
323
  ${ciInspection()}
296
324
  ${commentGuidelines()}
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../../../../pipeline/src/pipeline/agent/prompts.ts"],"names":[],"mappings":";AAAA,qGAAqG;AACrG,8FAA8F;AAC9F,8GAA8G;;;AAI9G,yCAAyC;AAEzC,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC;;;CAGpB,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,EAAE,aAAa,EAAO,EAAE,EAAE,CAAC;;6BAEhB,aAAa;CACzC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,EAAE,aAAa,EAAO,EAAE,EAAE,CAAC;;;;8BAIlB,aAAa;;;;;;CAM1C,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,EAAE,aAAa,EAAO,EAAE,EAAE,CAAC;;;;;qCAKhB,aAAa;;;;;;yDAMO,aAAa;;CAErE,CAAC;AAEF,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC;;;;;;;;CAQ/B,CAAC;AAEF,8EAA8E;AAC9E,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;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