cyrus-edge-worker 0.2.37 → 0.2.39

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.
@@ -0,0 +1,79 @@
1
+ # Changelog Update (GitLab) - Document Changes
2
+
3
+ All verification checks have passed. Now update the changelog if the project uses one.
4
+
5
+ ## Your Tasks
6
+
7
+ ### 1. Push Current Branch and Create Draft MR
8
+ First, push the current branch (even if there are no new commits) and create a draft MR to get an MR number:
9
+
10
+ ```bash
11
+ # Push the branch to remote
12
+ git push -u origin HEAD
13
+
14
+ # Check if MR already exists, if not create a draft MR
15
+ # IMPORTANT: The --target-branch flag MUST match the base_branch from the issue context
16
+ glab mr view --output json 2>/dev/null || glab mr create --draft --target-branch [base_branch from context] --title "WIP: [brief description]" --description "Work in progress for [ISSUE-ID]. Full description to follow."
17
+ ```
18
+
19
+ Record the MR URL and number for use in the changelog entry.
20
+
21
+ ### 2. Check for Changelog Files
22
+ Check if the project has changelog files:
23
+ ```bash
24
+ ls -la CHANGELOG.md CHANGELOG.internal.md 2>/dev/null || echo "NO_CHANGELOG"
25
+ ```
26
+
27
+ **If no changelog files exist, complete with:** `Draft MR created at [MR URL]. No changelog files found.`
28
+
29
+ ### 3. Check for Existing Changelog Entry
30
+ If changelog files exist, check if there's already a changelog entry for this issue:
31
+ - Look in the `## [Unreleased]` section for entries mentioning the current Linear issue identifier
32
+ - If an entry already exists for this issue, you may update it to add the MR link, but do NOT add duplicate entries
33
+
34
+ ### 4. Update Changelog with MR Link
35
+ If changelog files exist and no entry exists (or entry needs MR link):
36
+
37
+ **For user-facing changes (CHANGELOG.md):**
38
+ - Add entry under `## [Unreleased]` in the appropriate subsection (`### Added`, `### Changed`, `### Fixed`, `### Removed`)
39
+ - Focus on end-user impact from the perspective of users running the CLI
40
+ - Be concise but descriptive about what users will experience differently
41
+ - Include both the Linear issue identifier AND the MR link
42
+ - Format: `- **Feature name** - Description. ([ISSUE-ID](https://linear.app/...), [!NUMBER](MR_URL))`
43
+
44
+ **For internal/technical changes (CHANGELOG.internal.md):**
45
+ - Add entry if the changes are internal development, refactors, or tooling updates
46
+ - Follow the same format as CHANGELOG.md
47
+
48
+ ## Important Notes
49
+
50
+ - **Create draft MR first** - this gives you the MR number to include in the changelog
51
+ - **Always specify `--target-branch`** - use the target branch from the `<base_branch>` tag in the issue context. Do NOT rely on the repository's default branch setting.
52
+ - **Only update changelogs if they exist** - not all projects use changelogs
53
+ - **Avoid duplicate entries** - check if an entry already exists for this issue before adding
54
+ - **Follow Keep a Changelog format** - https://keepachangelog.com/
55
+ - **Group related changes** - consolidate multiple commits into a single meaningful entry
56
+ - **Do NOT commit or push the changelog changes** - that happens in the next subroutine
57
+ - Take as many turns as needed to complete these tasks
58
+
59
+ ## Expected Output
60
+
61
+ **IMPORTANT: Do NOT post Linear comments.** Your output is for internal workflow only.
62
+
63
+ Provide a brief completion message (1 sentence max):
64
+
65
+ ```
66
+ Draft MR created at [MR URL]. Changelog updated for [ISSUE-ID].
67
+ ```
68
+
69
+ Or if no changelog exists:
70
+
71
+ ```
72
+ Draft MR created at [MR URL]. No changelog files found.
73
+ ```
74
+
75
+ Or if entry already existed:
76
+
77
+ ```
78
+ Draft MR created at [MR URL]. Changelog entry already exists for this issue.
79
+ ```
@@ -0,0 +1,106 @@
1
+ # GitLab MR - Merge Request Management
2
+
3
+ A draft MR exists and all changes have been committed and pushed. Now update the MR with a full description and optionally mark it as ready.
4
+
5
+ ## Your Tasks
6
+
7
+ ### 1. Get MR Information
8
+ First, get the current MR URL and verify the target branch:
9
+ ```bash
10
+ glab mr view --output json | jq -r '"\(.web_url) targeting \(.target_branch)"'
11
+ ```
12
+
13
+ **IMPORTANT**: Verify that the MR targets the correct target branch (from `<base_branch>` in the issue context). If it doesn't, update it:
14
+ ```bash
15
+ glab mr update --target-branch [correct target branch]
16
+ ```
17
+
18
+ ### 2. Update MR with Full Description
19
+ Update the MR with a comprehensive description:
20
+ ```bash
21
+ glab mr update --title "[descriptive title]" --description "[full description]"
22
+ ```
23
+
24
+ **IMPORTANT: Assignee attribution**
25
+ Check the `<assignee>` section from the issue context and add assignee information at the **very top** of the MR description, before the summary:
26
+
27
+ - If a `<gitlab_username>` or `<github_username>` is available, format as: `Assignee: @username ([Display Name](linear_profile_url))`
28
+ - If only a `<linear_profile_url>` is available (no username), format as: `Assignee: [Display Name](linear_profile_url)` using the `<linear_display_name>` and `<linear_profile_url>` values
29
+
30
+ Follow this with a blank line, then the rest of the description. If no assignee information is available at all, skip this step.
31
+
32
+ **IMPORTANT: Cyrus attribution marker**
33
+ You MUST include the following hidden HTML comment somewhere in the MR description (e.g. at the very end). This marker is used to identify Cyrus-authored MRs for tracking purposes:
34
+ ```
35
+ <!-- generated-by-cyrus -->
36
+ ```
37
+ This marker is invisible when rendered on GitLab but allows the webhook to detect that this MR was authored by Cyrus, even when the MR is created under a human user's GitLab account.
38
+
39
+ The MR description should include:
40
+ - Summary of changes
41
+ - Implementation approach
42
+ - Testing performed
43
+ - Any breaking changes or migration notes
44
+ - Link to the Linear issue
45
+
46
+ **IMPORTANT: Cyrus interaction tip**
47
+ At the end of the MR description (before the `<!-- generated-by-cyrus -->` marker), include a tip section using the following exact format:
48
+
49
+ ```
50
+ ---
51
+
52
+ > **Tip:** I will respond to comments that @ mention @{{gitlab_bot_username}} on this MR. You can also leave review comments, and I will automatically wake up to address each comment.
53
+ ```
54
+
55
+ This helps reviewers know how to interact with Cyrus directly on the MR.
56
+
57
+ Ensure the MR has a clear, descriptive title (remove "WIP:" or "Draft:" prefix if present).
58
+
59
+ ### 3. Mark MR as Ready (CONDITIONAL)
60
+
61
+ **CRITICAL**: Before marking the MR as ready, you MUST check the `<agent_guidance>` section in your context.
62
+
63
+ **DO NOT mark the MR as ready if ANY of the following conditions are true:**
64
+ - The agent guidance specifies `--draft` in MR creation commands
65
+ - The agent guidance mentions keeping MRs as drafts
66
+ - The user has explicitly requested the MR remain as a draft
67
+ - The project instructions specify draft MRs
68
+
69
+ **Only if none of the above conditions apply**, convert the draft MR to ready for review:
70
+ ```bash
71
+ glab mr update --ready
72
+ ```
73
+
74
+ ### 4. Final Checks
75
+ - Confirm the MR URL is valid and accessible
76
+ - Verify all commits are included in the MR
77
+ - Verify the MR targets the correct target branch (from `<base_branch>` in context)
78
+ - Check that CI/CD pipelines start running (if applicable)
79
+
80
+ ## Important Notes
81
+
82
+ - **A draft MR already exists** - you're updating it and optionally marking it ready
83
+ - **All commits are pushed** - the changelog already includes the MR link
84
+ - **Be thorough with the MR description** - it should be self-contained and informative
85
+ - **RESPECT AGENT GUIDANCE** - if guidance specifies draft MRs, do NOT mark as ready
86
+ - **Verify the correct target branch** - ensure MR targets the `<base_branch>` from context
87
+ - Take as many turns as needed to complete these tasks
88
+
89
+ ## Expected Output
90
+
91
+ **IMPORTANT: Do NOT post Linear comments.** Your output is for internal workflow only.
92
+
93
+ Provide a brief completion message (1 sentence max) that includes the MR URL and status:
94
+
95
+ If marked as ready:
96
+ ```
97
+ MR ready at [MR URL].
98
+ ```
99
+
100
+ If kept as draft (due to agent guidance or user request):
101
+ ```
102
+ Draft MR updated at [MR URL] (kept as draft per guidance).
103
+ ```
104
+
105
+ Example: "MR ready at https://gitlab.com/org/repo/-/merge_requests/123."
106
+ Example: "Draft MR updated at https://gitlab.com/org/repo/-/merge_requests/123 (kept as draft per guidance)."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cyrus-edge-worker",
3
- "version": "0.2.37",
3
+ "version": "0.2.39",
4
4
  "description": "Unified edge worker for processing Linear issues with Claude",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -16,23 +16,24 @@
16
16
  "@linear/sdk": "^64.0.0",
17
17
  "@ngrok/ngrok": "^1.5.1",
18
18
  "chokidar": "^4.0.3",
19
- "fastify": "^5.8.1",
19
+ "fastify": "^5.8.3",
20
20
  "fastify-mcp": "^2.1.0",
21
21
  "file-type": "^21.3.2",
22
22
  "ignore": "^7.0.5",
23
23
  "zod": "4.3.6",
24
- "cyrus-claude-runner": "0.2.37",
25
- "cyrus-cloudflare-tunnel-client": "0.2.37",
26
- "cyrus-core": "0.2.37",
27
- "cyrus-config-updater": "0.2.37",
28
- "cyrus-cursor-runner": "0.2.37",
29
- "cyrus-github-event-transport": "0.2.37",
30
- "cyrus-codex-runner": "0.2.37",
31
- "cyrus-gemini-runner": "0.2.37",
32
- "cyrus-slack-event-transport": "0.2.37",
33
- "cyrus-linear-event-transport": "0.2.37",
34
- "cyrus-mcp-tools": "0.2.37",
35
- "cyrus-simple-agent-runner": "0.2.37"
24
+ "cyrus-claude-runner": "0.2.39",
25
+ "cyrus-config-updater": "0.2.39",
26
+ "cyrus-core": "0.2.39",
27
+ "cyrus-codex-runner": "0.2.39",
28
+ "cyrus-cloudflare-tunnel-client": "0.2.39",
29
+ "cyrus-cursor-runner": "0.2.39",
30
+ "cyrus-gemini-runner": "0.2.39",
31
+ "cyrus-github-event-transport": "0.2.39",
32
+ "cyrus-gitlab-event-transport": "0.2.39",
33
+ "cyrus-mcp-tools": "0.2.39",
34
+ "cyrus-linear-event-transport": "0.2.39",
35
+ "cyrus-slack-event-transport": "0.2.39",
36
+ "cyrus-simple-agent-runner": "0.2.39"
36
37
  },
37
38
  "devDependencies": {
38
39
  "@types/node": "^20.0.0",