poe-code 3.0.148 → 3.0.150

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.
@@ -4,15 +4,16 @@ source: >-
4
4
  gh api repos/{owner}/{repo}/dependabot/alerts --jq '[.[] |
5
5
  select(.state=="open")]'
6
6
  agent: claude-code
7
- # Available variables (each sourced Dependabot alert):
8
- # {{number}} - alert number
9
- # {{dependency.package.name}} - vulnerable package name
10
- # {{dependency.package.ecosystem}} - ecosystem (e.g. npm)
11
- # {{dependency.manifest_path}} - path to manifest (e.g. package.json)
12
- # {{security_advisory.ghsa_id}} - advisory ID
13
- # {{security_advisory.summary}} - short description
14
- # {{security_advisory.severity}} - low | medium | high | critical
15
- # {{security_advisory.description}} - full advisory description
16
- # {{security_vulnerability.first_patched_version.identifier}} - first safe version
7
+ # Source fields: number, dependency.package.{name,ecosystem}, dependency.manifest_path,
8
+ # security_advisory.{ghsa_id,summary,severity,description},
9
+ # security_vulnerability.first_patched_version.identifier (first safe version)
17
10
  ---
18
11
  Fix {{dependency.package.name}} ({{security_advisory.severity}}): {{security_advisory.summary}}
12
+
13
+ {{skill_github_cli}}
14
+
15
+ {{pull_request_guidelines}}
16
+
17
+ {{response_style}}
18
+
19
+ {{verify_before_responding}}
@@ -8,32 +8,23 @@ prefix:
8
8
  - "poe-code"
9
9
  - "poe-code-agent"
10
10
  - "@poe-code-agent"
11
- # Available variables:
12
- # {{url}} - full GitHub URL to the issue
13
- # {{repo}} - owner/repo (e.g. acme/my-app)
14
- # {{issue.number}} - issue number
15
- # {{issue.title}} - issue title
16
- # {{comment.author}} - login of the comment author
17
- # {{comment.body}} - body text of the triggering comment
18
11
  ---
19
12
  Read {{url}} and leave a visible GitHub response to the comment from {{comment.author}}: {{comment.body}}
20
13
 
21
14
  {{#pr.number}}
22
15
  - This comment is on pull request #{{pr.number}}.
23
- - If the comment asks for code changes or follow-up implementation, implement them on the current PR branch, update the existing PR, and comment with the result.
24
- - Do not open a new PR from a pull request comment unless updating the existing PR is impossible.
16
+ - If the comment asks for code changes, implement them on the current PR branch, update the existing PR, and comment with the result.
17
+ - Do not open a new PR unless updating the existing PR is impossible.
25
18
  {{/pr.number}}
26
19
  {{^pr.number}}
27
- - If the comment asks for code changes or follow-up implementation, make the changes, open or update a PR, and comment with the result.
20
+ - If the comment asks for code changes, open or update a PR and comment with the result.
28
21
  {{/pr.number}}
29
- - If the comment only needs guidance or clarification, reply directly and concisely.
30
- - If you cannot complete the request, comment with the blocker and the next concrete step.
22
+ - If blocked, comment with the blocker and next step.
31
23
 
32
- - Start with a direct answer or decision.
33
- - Keep it concise.
34
- - Use short Markdown sections only when they improve clarity.
24
+ {{skill_github_cli}}
35
25
 
36
- Before answering:
26
+ {{pull_request_guidelines}}
37
27
 
38
- - Inspect the checked-out repository
39
- - Verify every claim against the repo before you post it.
28
+ {{response_style}}
29
+
30
+ {{verify_before_responding}}
@@ -1,23 +1,15 @@
1
1
  ---
2
2
  label: "GitHub: Issue Handler"
3
- # Available variables:
4
- # {{url}} - full GitHub URL to the issue
5
- # {{repo}} - owner/repo (e.g. acme/my-app)
6
- # {{issue.number}} - issue number
7
- # {{issue.title}} - issue title
8
- # {{issue.body}} - issue body
9
3
  ---
10
4
  Read {{url}} and leave a visible GitHub response.
11
5
 
12
6
  - If the issue needs code changes, implement them, open or update a PR, and comment with the result.
13
- - If the issue is a question or needs only guidance, post a concise comment that directly answers it. Be practical, give examples.
14
- - If you cannot complete the request, comment with the blocker and the next concrete step.
7
+ - If blocked, comment with the blocker and next step.
15
8
 
16
- - Start with a direct answer or decision.
17
- - Keep it concise.
18
- - Use short Markdown sections only when they improve clarity.
9
+ {{skill_github_cli}}
19
10
 
20
- Before answering:
11
+ {{pull_request_guidelines}}
21
12
 
22
- - Inspect the checked-out repository
23
- - Verify every claim against the repo before you post it.
13
+ {{response_style}}
14
+
15
+ {{verify_before_responding}}
@@ -0,0 +1,25 @@
1
+ ---
2
+ label: "GitHub: Pull Request Comment Handler"
3
+ allow:
4
+ - OWNER
5
+ - MEMBER
6
+ - COLLABORATOR
7
+ prefix:
8
+ - "poe-code"
9
+ - "poe-code-agent"
10
+ - "@poe-code-agent"
11
+ ---
12
+ Read {{url}} and leave a visible GitHub response to the comment from {{comment.author}}: {{comment.body}}
13
+
14
+ - This comment is on pull request #{{pr.number}}.
15
+ - Implement changes on the current PR branch, update the existing PR, and comment with the result.
16
+ - Do not open a new PR unless updating the existing PR is impossible.
17
+ - If blocked, comment with the blocker and next step.
18
+
19
+ {{skill_github_cli}}
20
+
21
+ {{pull_request_guidelines}}
22
+
23
+ {{response_style}}
24
+
25
+ {{verify_before_responding}}
@@ -1,10 +1,12 @@
1
1
  ---
2
2
  label: "GitHub: Pull Request Handler"
3
- # Available variables:
4
- # {{url}} - full GitHub URL to the pull request
5
- # {{repo}} - owner/repo (e.g. acme/my-app)
6
- # {{pr.number}} - pull request number
7
- # {{pr.title}} - pull request title
8
- # {{pr.author}} - login of the PR author
9
3
  ---
10
4
  Read {{url}} and review the pull request.
5
+
6
+ {{skill_github_cli}}
7
+
8
+ {{code_review_guidelines}}
9
+
10
+ {{response_style}}
11
+
12
+ {{verify_before_responding}}
@@ -1,8 +1,12 @@
1
1
  ---
2
2
  label: "GitHub: Pull Request Update Handler"
3
- # Available variables:
4
- # {{url}} - full GitHub URL to the pull request
5
- # {{repo}} - owner/repo (e.g. acme/my-app)
6
- # {{pr.number}} - pull request number
7
3
  ---
8
4
  Read {{url}} and re-review the updated pull request.
5
+
6
+ {{skill_github_cli}}
7
+
8
+ {{code_review_guidelines}}
9
+
10
+ {{response_style}}
11
+
12
+ {{verify_before_responding}}
@@ -2,3 +2,11 @@
2
2
  label: "Scheduled: Update Dependencies"
3
3
  ---
4
4
  Update all dependencies to their latest compatible versions and open a pull request.
5
+
6
+ {{skill_github_cli}}
7
+
8
+ {{pull_request_guidelines}}
9
+
10
+ {{response_style}}
11
+
12
+ {{verify_before_responding}}
@@ -1,8 +1,15 @@
1
1
  ---
2
2
  label: "Scheduled: Update Documentation"
3
3
  ---
4
- Review all commits that landed during the last 24 hours and update the documentation to reflect the full day's changes.
4
+ Review all commits that landed during the last 24 hours and update the documentation to reflect the changes on branch `agent/update-documentation`.
5
5
 
6
- Use the branch `agent/update-documentation` for this automation.
7
- If there is already an open, unmerged PR for that branch, update that existing PR with the new documentation changes instead of opening a new PR.
8
- If the documentation is already correct, leave the repository unchanged and do not open or update a PR.
6
+ If there is already an open, unmerged PR for that branch, update that existing PR instead of opening a new one.
7
+ If the documentation is already correct, do not open or update a PR.
8
+
9
+ {{skill_github_cli}}
10
+
11
+ {{pull_request_guidelines}}
12
+
13
+ {{response_style}}
14
+
15
+ {{verify_before_responding}}
@@ -0,0 +1,23 @@
1
+ # Preview rendered prompt: poe-code github-workflows prompt-preview <name>
2
+
3
+ response_style: |
4
+ - Start with a direct answer or decision.
5
+ - Keep it concise.
6
+ - Use short Markdown sections only when they improve clarity.
7
+
8
+ verify_before_responding: |
9
+ Before responding:
10
+ - Inspect the checked-out repository.
11
+ - Verify every claim against the repo before you post it.
12
+
13
+ skill_github_cli: |
14
+ Use the `gh` CLI for all GitHub operations (issues, PRs, reviews, checks).
15
+
16
+ pull_request_guidelines: |
17
+ - One logical change per PR. Feel free to open multiple PRs.
18
+ - Follow the repo guidelines
19
+
20
+ code_review_guidelines: |
21
+ - Review every changed file, not just the diff summary.
22
+ - Verify the change follows existing patterns in the codebase. New abstractions need justification.
23
+ - Don't rubber-stamp. Request changes when there are real issues.
@@ -0,0 +1,25 @@
1
+ name: 'GitHub: Pull Request Comment Created'
2
+ on:
3
+ issue_comment:
4
+ types: [created]
5
+
6
+ # Keep these permissions in sync with the reusable workflow referenced below.
7
+ permissions:
8
+ contents: write
9
+ issues: write
10
+ pull-requests: write
11
+
12
+ jobs:
13
+ run:
14
+ if: github.event.issue.pull_request != null
15
+ uses: __UPSTREAM_REPO__/.github/workflows/gh-github-pull-request-comment-created.yml@main
16
+ secrets: inherit
17
+ with:
18
+ ISSUE_NUMBER: ${{ github.event.issue.number }}
19
+ ISSUE_STATE: ${{ github.event.issue.state }}
20
+ COMMENT_ID: ${{ github.event.comment.id }}
21
+ COMMENT_BODY: ${{ github.event.comment.body }}
22
+ COMMENT_AUTHOR: ${{ github.event.comment.user.login }}
23
+ COMMENT_AUTHOR_ASSOCIATION: ${{ github.event.comment.author_association }}
24
+ COMMENT_USER_TYPE: ${{ github.event.comment.user.type }}
25
+ GITHUB_REPOSITORY: ${{ github.repository }}
@@ -0,0 +1,179 @@
1
+ name: 'GitHub: Pull Request Comment Created'
2
+ on:
3
+ issue_comment:
4
+ types: [created]
5
+
6
+ concurrency:
7
+ group: ${{ github.workflow }}-${{ github.event.issue.number }}
8
+ cancel-in-progress: true
9
+
10
+ jobs:
11
+ guard:
12
+ if: github.event.issue.pull_request != null && github.event.issue.state == 'open' && github.event.comment.user.type != 'Bot'
13
+ runs-on: ubuntu-latest
14
+ env:
15
+ OUTPUT_FORMAT: terminal
16
+ outputs:
17
+ should_run: ${{ steps.guard_result.outputs.should_run }}
18
+ permissions:
19
+ contents: read
20
+ steps:
21
+ - name: Preflight
22
+ env:
23
+ POE_CODE_AGENT_APP_ID: ${{ secrets.POE_CODE_AGENT_APP_ID }}
24
+ POE_CODE_AGENT_PRIVATE_KEY: ${{ secrets.POE_CODE_AGENT_PRIVATE_KEY }}
25
+ POE_API_KEY: ${{ secrets.POE_API_KEY }}
26
+ run: |
27
+ missing=()
28
+ [ -z "$POE_CODE_AGENT_APP_ID" ] && missing+=("POE_CODE_AGENT_APP_ID")
29
+ [ -z "$POE_CODE_AGENT_PRIVATE_KEY" ] && missing+=("POE_CODE_AGENT_PRIVATE_KEY")
30
+ [ -z "$POE_API_KEY" ] && missing+=("POE_API_KEY")
31
+ if [ ${#missing[@]} -gt 0 ]; then
32
+ for name in "${missing[@]}"; do
33
+ echo "::error::Missing required secret: $name — add it in Settings → Secrets and variables → Actions"
34
+ done
35
+ exit 1
36
+ fi
37
+ - uses: actions/create-github-app-token@v1
38
+ id: app-token
39
+ with:
40
+ app-id: ${{ secrets.POE_CODE_AGENT_APP_ID }}
41
+ private-key: ${{ secrets.POE_CODE_AGENT_PRIVATE_KEY }}
42
+ - uses: actions/checkout@v4
43
+ with:
44
+ token: ${{ steps.app-token.outputs.token }}
45
+ - uses: actions/setup-node@v4
46
+ with:
47
+ node-version: 20
48
+ - run: npm install -g poe-code@latest
49
+ - id: allow_check
50
+ continue-on-error: true
51
+ run: poe-code github-workflows require-user-allow github-pull-request-comment-created
52
+ env:
53
+ POE_CODE_STDERR_LOGS: "1"
54
+ COMMENT_AUTHOR_ASSOCIATION: ${{ github.event.comment.author_association }}
55
+ - id: prefix_check
56
+ continue-on-error: true
57
+ run: poe-code github-workflows require-comment-prefix github-pull-request-comment-created
58
+ env:
59
+ POE_CODE_STDERR_LOGS: "1"
60
+ COMMENT_BODY: ${{ github.event.comment.body }}
61
+ - id: guard_result
62
+ run: |
63
+ if [ "${{ steps.allow_check.outcome }}" = "success" ] && [ "${{ steps.prefix_check.outcome }}" = "success" ]; then
64
+ echo "should_run=true" >> "$GITHUB_OUTPUT"
65
+ else
66
+ echo "should_run=false" >> "$GITHUB_OUTPUT"
67
+ fi
68
+
69
+ run:
70
+ needs: guard
71
+ if: needs.guard.outputs.should_run == 'true'
72
+ runs-on: ubuntu-latest
73
+ env:
74
+ OUTPUT_FORMAT: terminal
75
+ permissions:
76
+ contents: write
77
+ issues: write
78
+ pull-requests: write
79
+ steps:
80
+ - name: Preflight
81
+ env:
82
+ POE_CODE_AGENT_APP_ID: ${{ secrets.POE_CODE_AGENT_APP_ID }}
83
+ POE_CODE_AGENT_PRIVATE_KEY: ${{ secrets.POE_CODE_AGENT_PRIVATE_KEY }}
84
+ POE_API_KEY: ${{ secrets.POE_API_KEY }}
85
+ run: |
86
+ missing=()
87
+ [ -z "$POE_CODE_AGENT_APP_ID" ] && missing+=("POE_CODE_AGENT_APP_ID")
88
+ [ -z "$POE_CODE_AGENT_PRIVATE_KEY" ] && missing+=("POE_CODE_AGENT_PRIVATE_KEY")
89
+ [ -z "$POE_API_KEY" ] && missing+=("POE_API_KEY")
90
+ if [ ${#missing[@]} -gt 0 ]; then
91
+ for name in "${missing[@]}"; do
92
+ echo "::error::Missing required secret: $name — add it in Settings → Secrets and variables → Actions"
93
+ done
94
+ exit 1
95
+ fi
96
+ - uses: actions/create-github-app-token@v1
97
+ id: app-token
98
+ with:
99
+ app-id: ${{ secrets.POE_CODE_AGENT_APP_ID }}
100
+ private-key: ${{ secrets.POE_CODE_AGENT_PRIVATE_KEY }}
101
+ - uses: actions/checkout@v4
102
+ with:
103
+ token: ${{ steps.app-token.outputs.token }}
104
+ - uses: actions/setup-node@v4
105
+ with:
106
+ node-version: 20
107
+ - run: npm install -g poe-code@latest
108
+ - id: pr_context
109
+ uses: actions/github-script@v7
110
+ with:
111
+ github-token: ${{ steps.app-token.outputs.token }}
112
+ script: |
113
+ const response = await github.rest.pulls.get({
114
+ owner: context.repo.owner,
115
+ repo: context.repo.repo,
116
+ pull_number: Number("${{ github.event.issue.number }}")
117
+ });
118
+
119
+ const headRepo = response.data.head.repo?.full_name ?? "";
120
+ const currentRepo = `${context.repo.owner}/${context.repo.repo}`;
121
+ const isSameRepo = headRepo === currentRepo;
122
+
123
+ core.setOutput("pr_number", String(response.data.number ?? ""));
124
+ core.setOutput("pr_title", response.data.title ?? "");
125
+ core.setOutput("pr_author", response.data.user?.login ?? "");
126
+ core.setOutput("head_ref", isSameRepo ? (response.data.head.ref ?? "") : "");
127
+ - id: add_in_progress_reaction
128
+ continue-on-error: true
129
+ uses: actions/github-script@v7
130
+ with:
131
+ github-token: ${{ steps.app-token.outputs.token }}
132
+ script: |
133
+ const response = await github.rest.reactions.createForIssueComment({
134
+ owner: context.repo.owner,
135
+ repo: context.repo.repo,
136
+ comment_id: Number("${{ github.event.comment.id }}"),
137
+ content: "eyes"
138
+ });
139
+ core.setOutput("reaction_id", String(response.data.id ?? ""));
140
+ - if: steps.pr_context.outputs.head_ref != ''
141
+ id: checkout_pr_branch
142
+ uses: actions/checkout@v4
143
+ with:
144
+ ref: ${{ steps.pr_context.outputs.head_ref }}
145
+ token: ${{ steps.app-token.outputs.token }}
146
+ - if: steps.pr_context.outputs.head_ref == ''
147
+ id: checkout_default_branch
148
+ uses: actions/checkout@v4
149
+ with:
150
+ token: ${{ steps.app-token.outputs.token }}
151
+ - run: poe-code github-workflows prepare github-pull-request-comment-created
152
+ env:
153
+ POE_CODE_STDERR_LOGS: "1"
154
+ POE_API_KEY: ${{ secrets.POE_API_KEY }}
155
+ - run: poe-code github-workflows github-pull-request-comment-created --yes
156
+ env:
157
+ POE_CODE_STDERR_LOGS: "1"
158
+ POE_API_KEY: ${{ secrets.POE_API_KEY }}
159
+ GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
160
+ ISSUE_NUMBER: ${{ github.event.issue.number }}
161
+ PR_NUMBER: ${{ steps.pr_context.outputs.pr_number }}
162
+ PR_TITLE: ${{ steps.pr_context.outputs.pr_title }}
163
+ PR_AUTHOR: ${{ steps.pr_context.outputs.pr_author }}
164
+ COMMENT_BODY: ${{ github.event.comment.body }}
165
+ COMMENT_AUTHOR: ${{ github.event.comment.user.login }}
166
+ GITHUB_REPOSITORY: ${{ github.repository }}
167
+ - id: remove_in_progress_reaction
168
+ if: always() && steps.add_in_progress_reaction.outputs.reaction_id != ''
169
+ continue-on-error: true
170
+ uses: actions/github-script@v7
171
+ with:
172
+ github-token: ${{ steps.app-token.outputs.token }}
173
+ script: |
174
+ await github.rest.reactions.deleteForIssueComment({
175
+ owner: context.repo.owner,
176
+ repo: context.repo.repo,
177
+ comment_id: Number("${{ github.event.comment.id }}"),
178
+ reaction_id: Number("${{ steps.add_in_progress_reaction.outputs.reaction_id }}")
179
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poe-code",
3
- "version": "3.0.148",
3
+ "version": "3.0.150",
4
4
  "description": "CLI tool to configure Poe API for developer workflows.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",