poe-code 3.0.178 → 3.0.180
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.
- package/dist/index.js +6 -2
- package/dist/index.js.map +2 -2
- package/dist/prompts/github-issue-opened.md +7 -1
- package/dist/prompts/github-pull-request-opened.md +4 -0
- package/dist/prompts/github-pull-request-synchronized.md +4 -0
- package/dist/variables.yaml +46 -1
- package/dist/workflow-templates/github-issue-opened.caller.yml +1 -0
- package/dist/workflow-templates/github-issue-opened.ejected.yml +52 -0
- package/dist/workflow-templates/github-pull-request-opened.caller.yml +1 -0
- package/dist/workflow-templates/github-pull-request-opened.ejected.yml +52 -0
- package/dist/workflow-templates/github-pull-request-synchronized.caller.yml +1 -0
- package/dist/workflow-templates/github-pull-request-synchronized.ejected.yml +52 -0
- package/package.json +6 -2
- package/packages/cmdkit/dist/cli.compile-check.d.ts +1 -0
- package/packages/cmdkit/dist/cli.compile-check.js +26 -0
- package/packages/cmdkit/dist/cli.d.ts +12 -0
- package/packages/cmdkit/dist/cli.js +2306 -0
- package/packages/cmdkit/dist/cli.js.map +7 -0
- package/packages/cmdkit/dist/index.compile-check.d.ts +1 -0
- package/packages/cmdkit/dist/index.compile-check.js +50 -0
- package/packages/cmdkit/dist/index.d.ts +164 -0
- package/packages/cmdkit/dist/index.js +518 -0
- package/packages/cmdkit/dist/index.js.map +7 -0
- package/packages/cmdkit/dist/mcp.compile-check.d.ts +1 -0
- package/packages/cmdkit/dist/mcp.compile-check.js +26 -0
- package/packages/cmdkit/dist/mcp.d.ts +16 -0
- package/packages/cmdkit/dist/mcp.js +1153 -0
- package/packages/cmdkit/dist/mcp.js.map +7 -0
- package/packages/cmdkit/dist/renderer.d.ts +5 -0
- package/packages/cmdkit/dist/renderer.js +164 -0
- package/packages/cmdkit/dist/renderer.js.map +7 -0
- package/packages/cmdkit/dist/sdk.compile-check.d.ts +1 -0
- package/packages/cmdkit/dist/sdk.compile-check.js +79 -0
- package/packages/cmdkit/dist/sdk.d.ts +63 -0
- package/packages/cmdkit/dist/sdk.js +314 -0
- package/packages/cmdkit/dist/sdk.js.map +7 -0
- package/packages/cmdkit-schema/dist/index.compile-check.d.ts +1 -0
- package/packages/cmdkit-schema/dist/index.compile-check.js +11 -0
- package/packages/cmdkit-schema/dist/index.d.ts +81 -0
- package/packages/cmdkit-schema/dist/index.js +130 -0
- package/packages/design-system/dist/acp/components.d.ts +11 -0
- package/packages/design-system/dist/acp/components.js +121 -0
- package/packages/design-system/dist/acp/index.d.ts +3 -0
- package/packages/design-system/dist/acp/index.js +2 -0
- package/packages/design-system/dist/acp/writer.d.ts +13 -0
- package/packages/design-system/dist/acp/writer.js +21 -0
- package/packages/design-system/dist/components/command-errors.d.ts +16 -0
- package/packages/design-system/dist/components/command-errors.js +22 -0
- package/packages/design-system/dist/components/help-formatter.d.ts +20 -0
- package/packages/design-system/dist/components/help-formatter.js +27 -0
- package/packages/design-system/dist/components/index.d.ts +10 -0
- package/packages/design-system/dist/components/index.js +7 -0
- package/packages/design-system/dist/components/logger.d.ts +11 -0
- package/packages/design-system/dist/components/logger.js +60 -0
- package/packages/design-system/dist/components/symbols.d.ts +12 -0
- package/packages/design-system/dist/components/symbols.js +71 -0
- package/packages/design-system/dist/components/table.d.ts +13 -0
- package/packages/design-system/dist/components/table.js +74 -0
- package/packages/design-system/dist/components/text.d.ts +14 -0
- package/packages/design-system/dist/components/text.js +104 -0
- package/packages/design-system/dist/dashboard/ansi.d.ts +18 -0
- package/packages/design-system/dist/dashboard/ansi.js +298 -0
- package/packages/design-system/dist/dashboard/buffer.d.ts +25 -0
- package/packages/design-system/dist/dashboard/buffer.js +189 -0
- package/packages/design-system/dist/dashboard/components/border.d.ts +9 -0
- package/packages/design-system/dist/dashboard/components/border.js +123 -0
- package/packages/design-system/dist/dashboard/components/footer.d.ts +8 -0
- package/packages/design-system/dist/dashboard/components/footer.js +58 -0
- package/packages/design-system/dist/dashboard/components/output-pane.d.ts +21 -0
- package/packages/design-system/dist/dashboard/components/output-pane.js +323 -0
- package/packages/design-system/dist/dashboard/components/stats-pane.d.ts +7 -0
- package/packages/design-system/dist/dashboard/components/stats-pane.js +120 -0
- package/packages/design-system/dist/dashboard/dashboard.d.ts +20 -0
- package/packages/design-system/dist/dashboard/dashboard.js +187 -0
- package/packages/design-system/dist/dashboard/demo.d.ts +13 -0
- package/packages/design-system/dist/dashboard/demo.js +145 -0
- package/packages/design-system/dist/dashboard/index.d.ts +7 -0
- package/packages/design-system/dist/dashboard/index.js +3 -0
- package/packages/design-system/dist/dashboard/keymap.d.ts +3 -0
- package/packages/design-system/dist/dashboard/keymap.js +114 -0
- package/packages/design-system/dist/dashboard/layout.d.ts +25 -0
- package/packages/design-system/dist/dashboard/layout.js +79 -0
- package/packages/design-system/dist/dashboard/snapshot.d.ts +10 -0
- package/packages/design-system/dist/dashboard/snapshot.js +72 -0
- package/packages/design-system/dist/dashboard/store.d.ts +9 -0
- package/packages/design-system/dist/dashboard/store.js +107 -0
- package/packages/design-system/dist/dashboard/terminal.d.ts +35 -0
- package/packages/design-system/dist/dashboard/terminal.js +215 -0
- package/packages/design-system/dist/dashboard/types.d.ts +45 -0
- package/packages/design-system/dist/dashboard/types.js +1 -0
- package/packages/design-system/dist/index.d.ts +33 -0
- package/packages/design-system/dist/index.js +31 -0
- package/packages/design-system/dist/internal/output-format.d.ts +6 -0
- package/packages/design-system/dist/internal/output-format.js +22 -0
- package/packages/design-system/dist/internal/strip-ansi.d.ts +1 -0
- package/packages/design-system/dist/internal/strip-ansi.js +3 -0
- package/packages/design-system/dist/internal/theme-detect.d.ts +11 -0
- package/packages/design-system/dist/internal/theme-detect.js +49 -0
- package/packages/design-system/dist/prompts/index.d.ts +66 -0
- package/packages/design-system/dist/prompts/index.js +132 -0
- package/packages/design-system/dist/prompts/primitives/cancel.d.ts +2 -0
- package/packages/design-system/dist/prompts/primitives/cancel.js +9 -0
- package/packages/design-system/dist/prompts/primitives/intro.d.ts +1 -0
- package/packages/design-system/dist/prompts/primitives/intro.js +15 -0
- package/packages/design-system/dist/prompts/primitives/log.d.ts +18 -0
- package/packages/design-system/dist/prompts/primitives/log.js +101 -0
- package/packages/design-system/dist/prompts/primitives/note.d.ts +1 -0
- package/packages/design-system/dist/prompts/primitives/note.js +39 -0
- package/packages/design-system/dist/prompts/primitives/outro.d.ts +1 -0
- package/packages/design-system/dist/prompts/primitives/outro.js +16 -0
- package/packages/design-system/dist/prompts/primitives/spinner.d.ts +6 -0
- package/packages/design-system/dist/prompts/primitives/spinner.js +74 -0
- package/packages/design-system/dist/prompts/theme.d.ts +11 -0
- package/packages/design-system/dist/prompts/theme.js +12 -0
- package/packages/design-system/dist/static/index.d.ts +4 -0
- package/packages/design-system/dist/static/index.js +2 -0
- package/packages/design-system/dist/static/menu.d.ts +11 -0
- package/packages/design-system/dist/static/menu.js +36 -0
- package/packages/design-system/dist/static/spinner.d.ts +14 -0
- package/packages/design-system/dist/static/spinner.js +46 -0
- package/packages/design-system/dist/terminal-markdown/ast.d.ts +84 -0
- package/packages/design-system/dist/terminal-markdown/ast.js +1 -0
- package/packages/design-system/dist/terminal-markdown/demo-content.d.ts +2 -0
- package/packages/design-system/dist/terminal-markdown/demo-content.js +139 -0
- package/packages/design-system/dist/terminal-markdown/index.d.ts +6 -0
- package/packages/design-system/dist/terminal-markdown/index.js +8 -0
- package/packages/design-system/dist/terminal-markdown/parser/block.d.ts +6 -0
- package/packages/design-system/dist/terminal-markdown/parser/block.js +1205 -0
- package/packages/design-system/dist/terminal-markdown/parser/frontmatter.d.ts +6 -0
- package/packages/design-system/dist/terminal-markdown/parser/frontmatter.js +395 -0
- package/packages/design-system/dist/terminal-markdown/parser/inline.d.ts +6 -0
- package/packages/design-system/dist/terminal-markdown/parser/inline.js +1087 -0
- package/packages/design-system/dist/terminal-markdown/parser.d.ts +5 -0
- package/packages/design-system/dist/terminal-markdown/parser.js +13 -0
- package/packages/design-system/dist/terminal-markdown/renderer.d.ts +6 -0
- package/packages/design-system/dist/terminal-markdown/renderer.js +572 -0
- package/packages/design-system/dist/terminal-markdown/testing/theme-render-fixture.d.ts +1 -0
- package/packages/design-system/dist/terminal-markdown/testing/theme-render-fixture.js +27 -0
- package/packages/design-system/dist/tokens/colors.d.ts +35 -0
- package/packages/design-system/dist/tokens/colors.js +34 -0
- package/packages/design-system/dist/tokens/index.d.ts +4 -0
- package/packages/design-system/dist/tokens/index.js +4 -0
- package/packages/design-system/dist/tokens/spacing.d.ts +6 -0
- package/packages/design-system/dist/tokens/spacing.js +6 -0
- package/packages/design-system/dist/tokens/typography.d.ts +7 -0
- package/packages/design-system/dist/tokens/typography.js +8 -0
- package/packages/design-system/dist/tokens/widths.d.ts +5 -0
- package/packages/design-system/dist/tokens/widths.js +5 -0
- package/packages/tiny-stdio-mcp-server/dist/content/audio.d.ts +14 -0
- package/packages/tiny-stdio-mcp-server/dist/content/audio.js +76 -0
- package/packages/tiny-stdio-mcp-server/dist/content/convert.d.ts +16 -0
- package/packages/tiny-stdio-mcp-server/dist/content/convert.js +42 -0
- package/packages/tiny-stdio-mcp-server/dist/content/file-type.d.ts +11 -0
- package/packages/tiny-stdio-mcp-server/dist/content/file-type.js +93 -0
- package/packages/tiny-stdio-mcp-server/dist/content/file.d.ts +26 -0
- package/packages/tiny-stdio-mcp-server/dist/content/file.js +94 -0
- package/packages/tiny-stdio-mcp-server/dist/content/image.d.ts +14 -0
- package/packages/tiny-stdio-mcp-server/dist/content/image.js +64 -0
- package/packages/tiny-stdio-mcp-server/dist/content/index.d.ts +5 -0
- package/packages/tiny-stdio-mcp-server/dist/content/index.js +8 -0
- package/packages/tiny-stdio-mcp-server/dist/content/mime.d.ts +1 -0
- package/packages/tiny-stdio-mcp-server/dist/content/mime.js +1 -0
- package/packages/tiny-stdio-mcp-server/dist/index.d.ts +9 -0
- package/packages/tiny-stdio-mcp-server/dist/index.js +7 -0
- package/packages/tiny-stdio-mcp-server/dist/jsonrpc.d.ts +14 -0
- package/packages/tiny-stdio-mcp-server/dist/jsonrpc.js +99 -0
- package/packages/tiny-stdio-mcp-server/dist/schema.d.ts +19 -0
- package/packages/tiny-stdio-mcp-server/dist/schema.js +18 -0
- package/packages/tiny-stdio-mcp-server/dist/server.d.ts +13 -0
- package/packages/tiny-stdio-mcp-server/dist/server.js +226 -0
- package/packages/tiny-stdio-mcp-server/dist/testing.d.ts +7 -0
- package/packages/tiny-stdio-mcp-server/dist/testing.js +20 -0
- package/packages/tiny-stdio-mcp-server/dist/types.d.ts +119 -0
- package/packages/tiny-stdio-mcp-server/dist/types.js +16 -0
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
label: "GitHub: Issue Handler"
|
|
3
|
+
allow:
|
|
4
|
+
- OWNER
|
|
5
|
+
- MEMBER
|
|
6
|
+
- COLLABORATOR
|
|
3
7
|
---
|
|
4
8
|
Read {{url}} and leave a visible GitHub response.
|
|
5
9
|
|
|
6
|
-
-
|
|
10
|
+
- First assess if the issue is actionable: it must have a title that conveys intent AND a body with enough detail to understand the request. Empty bodies, one-word titles that are not a real product name, and gibberish do not qualify.
|
|
11
|
+
- If the issue is not actionable, post a short comment explaining what's missing (e.g. "Closing: the body is empty and the title alone doesn't describe a reproducible issue. Please reopen with steps to reproduce or a clear feature request.") and close the issue with `gh issue close`. Do not apply labels.
|
|
12
|
+
- If the issue is actionable and needs code changes, implement them, open or update a PR, and comment with the result.
|
|
7
13
|
- If blocked, comment with the blocker and next step.
|
|
8
14
|
- When posting any multiline GitHub comment or PR body, write it with a quoted heredoc and pass it to `gh` with `--body-file` instead of an inline `--body` string.
|
|
9
15
|
|
package/dist/variables.yaml
CHANGED
|
@@ -23,4 +23,49 @@ pull_request_guidelines: |
|
|
|
23
23
|
code_review_guidelines: |
|
|
24
24
|
- Review every changed file, not just the diff summary.
|
|
25
25
|
- Verify the change follows existing patterns in the codebase. New abstractions need justification.
|
|
26
|
-
-
|
|
26
|
+
- Leave small inline comments on the specific lines that need attention. When you can show the fix directly, use GitHub's `suggestion` code block so the author can apply it with one click.
|
|
27
|
+
- Keep the summary comment extremely short: either "LGTM" or "Requested changes: <one-line reason>". Details belong in the inline comments.
|
|
28
|
+
- Err on the side of approving. Only request changes when there is a security issue, a clear correctness bug, or a regression. Style preferences, naming bikesheds, and speculative concerns belong as non-blocking inline comments.
|
|
29
|
+
- Post the review in a single API call so the inline comments and the summary land together. Use `gh api` with `POST /repos/{owner}/{repo}/pulls/{pr}/reviews` and pass the comments in the body.
|
|
30
|
+
- Example — approve with a single inline note:
|
|
31
|
+
```sh
|
|
32
|
+
gh api --method POST -H "Accept: application/vnd.github+json" \
|
|
33
|
+
repos/OWNER/REPO/pulls/PR_NUMBER/reviews \
|
|
34
|
+
--input - <<'JSON'
|
|
35
|
+
{
|
|
36
|
+
"event": "APPROVE",
|
|
37
|
+
"body": "LGTM",
|
|
38
|
+
"comments": [
|
|
39
|
+
{ "path": "src/foo.ts", "line": 42, "body": "Nit: consider renaming to `parseX`." }
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
JSON
|
|
43
|
+
```
|
|
44
|
+
- Example — a one-click suggestion on a specific line:
|
|
45
|
+
```sh
|
|
46
|
+
gh api --method POST -H "Accept: application/vnd.github+json" \
|
|
47
|
+
repos/OWNER/REPO/pulls/PR_NUMBER/reviews \
|
|
48
|
+
--input - <<'JSON'
|
|
49
|
+
{
|
|
50
|
+
"event": "APPROVE",
|
|
51
|
+
"body": "LGTM",
|
|
52
|
+
"comments": [
|
|
53
|
+
{ "path": "src/foo.ts", "line": 42, "body": "```suggestion\nreturn parseX(value);\n```" }
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
JSON
|
|
57
|
+
```
|
|
58
|
+
- Example — request changes for a security issue only:
|
|
59
|
+
```sh
|
|
60
|
+
gh api --method POST -H "Accept: application/vnd.github+json" \
|
|
61
|
+
repos/OWNER/REPO/pulls/PR_NUMBER/reviews \
|
|
62
|
+
--input - <<'JSON'
|
|
63
|
+
{
|
|
64
|
+
"event": "REQUEST_CHANGES",
|
|
65
|
+
"body": "Requested changes: unsanitized input flows into shell.",
|
|
66
|
+
"comments": [
|
|
67
|
+
{ "path": "src/run.ts", "line": 17, "body": "Shell injection: pass args as an array to `spawn` instead of concatenating into a string." }
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
JSON
|
|
71
|
+
```
|
|
@@ -17,4 +17,5 @@ jobs:
|
|
|
17
17
|
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
|
18
18
|
ISSUE_TITLE: ${{ github.event.issue.title }}
|
|
19
19
|
ISSUE_BODY: ${{ github.event.issue.body }}
|
|
20
|
+
COMMENT_AUTHOR_ASSOCIATION: ${{ github.event.issue.author_association }}
|
|
20
21
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
@@ -8,7 +8,59 @@ concurrency:
|
|
|
8
8
|
cancel-in-progress: true
|
|
9
9
|
|
|
10
10
|
jobs:
|
|
11
|
+
guard:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
env:
|
|
14
|
+
OUTPUT_FORMAT: terminal
|
|
15
|
+
outputs:
|
|
16
|
+
should_run: ${{ steps.guard_result.outputs.should_run }}
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
steps:
|
|
20
|
+
- name: Preflight
|
|
21
|
+
env:
|
|
22
|
+
POE_CODE_AGENT_APP_ID: ${{ secrets.POE_CODE_AGENT_APP_ID }}
|
|
23
|
+
POE_CODE_AGENT_PRIVATE_KEY: ${{ secrets.POE_CODE_AGENT_PRIVATE_KEY }}
|
|
24
|
+
POE_API_KEY: ${{ secrets.POE_API_KEY }}
|
|
25
|
+
run: |
|
|
26
|
+
missing=()
|
|
27
|
+
[ -z "$POE_CODE_AGENT_APP_ID" ] && missing+=("POE_CODE_AGENT_APP_ID")
|
|
28
|
+
[ -z "$POE_CODE_AGENT_PRIVATE_KEY" ] && missing+=("POE_CODE_AGENT_PRIVATE_KEY")
|
|
29
|
+
[ -z "$POE_API_KEY" ] && missing+=("POE_API_KEY")
|
|
30
|
+
if [ ${#missing[@]} -gt 0 ]; then
|
|
31
|
+
for name in "${missing[@]}"; do
|
|
32
|
+
echo "::error::Missing required secret: $name — add it in Settings → Secrets and variables → Actions"
|
|
33
|
+
done
|
|
34
|
+
exit 1
|
|
35
|
+
fi
|
|
36
|
+
- uses: actions/create-github-app-token@v1
|
|
37
|
+
id: app-token
|
|
38
|
+
with:
|
|
39
|
+
app-id: ${{ secrets.POE_CODE_AGENT_APP_ID }}
|
|
40
|
+
private-key: ${{ secrets.POE_CODE_AGENT_PRIVATE_KEY }}
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
with:
|
|
43
|
+
token: ${{ steps.app-token.outputs.token }}
|
|
44
|
+
- uses: actions/setup-node@v4
|
|
45
|
+
with:
|
|
46
|
+
node-version: 20
|
|
47
|
+
- run: npm install -g poe-code@latest
|
|
48
|
+
- id: allow_check
|
|
49
|
+
continue-on-error: true
|
|
50
|
+
run: poe-code github-workflows require-user-allow github-issue-opened
|
|
51
|
+
env:
|
|
52
|
+
POE_CODE_STDERR_LOGS: "1"
|
|
53
|
+
COMMENT_AUTHOR_ASSOCIATION: ${{ github.event.issue.author_association }}
|
|
54
|
+
- id: guard_result
|
|
55
|
+
run: |
|
|
56
|
+
if [ "${{ steps.allow_check.outcome }}" = "success" ]; then
|
|
57
|
+
echo "should_run=true" >> "$GITHUB_OUTPUT"
|
|
58
|
+
else
|
|
59
|
+
echo "should_run=false" >> "$GITHUB_OUTPUT"
|
|
60
|
+
fi
|
|
11
61
|
run:
|
|
62
|
+
needs: guard
|
|
63
|
+
if: needs.guard.outputs.should_run == 'true'
|
|
12
64
|
runs-on: ubuntu-latest
|
|
13
65
|
permissions:
|
|
14
66
|
contents: write
|
|
@@ -16,4 +16,5 @@ jobs:
|
|
|
16
16
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
17
17
|
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
18
18
|
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
|
|
19
|
+
COMMENT_AUTHOR_ASSOCIATION: ${{ github.event.pull_request.author_association }}
|
|
19
20
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
@@ -4,7 +4,59 @@ on:
|
|
|
4
4
|
types: [opened, ready_for_review]
|
|
5
5
|
|
|
6
6
|
jobs:
|
|
7
|
+
guard:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
env:
|
|
10
|
+
OUTPUT_FORMAT: terminal
|
|
11
|
+
outputs:
|
|
12
|
+
should_run: ${{ steps.guard_result.outputs.should_run }}
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
steps:
|
|
16
|
+
- name: Preflight
|
|
17
|
+
env:
|
|
18
|
+
POE_CODE_AGENT_APP_ID: ${{ secrets.POE_CODE_AGENT_APP_ID }}
|
|
19
|
+
POE_CODE_AGENT_PRIVATE_KEY: ${{ secrets.POE_CODE_AGENT_PRIVATE_KEY }}
|
|
20
|
+
POE_API_KEY: ${{ secrets.POE_API_KEY }}
|
|
21
|
+
run: |
|
|
22
|
+
missing=()
|
|
23
|
+
[ -z "$POE_CODE_AGENT_APP_ID" ] && missing+=("POE_CODE_AGENT_APP_ID")
|
|
24
|
+
[ -z "$POE_CODE_AGENT_PRIVATE_KEY" ] && missing+=("POE_CODE_AGENT_PRIVATE_KEY")
|
|
25
|
+
[ -z "$POE_API_KEY" ] && missing+=("POE_API_KEY")
|
|
26
|
+
if [ ${#missing[@]} -gt 0 ]; then
|
|
27
|
+
for name in "${missing[@]}"; do
|
|
28
|
+
echo "::error::Missing required secret: $name — add it in Settings → Secrets and variables → Actions"
|
|
29
|
+
done
|
|
30
|
+
exit 1
|
|
31
|
+
fi
|
|
32
|
+
- uses: actions/create-github-app-token@v1
|
|
33
|
+
id: app-token
|
|
34
|
+
with:
|
|
35
|
+
app-id: ${{ secrets.POE_CODE_AGENT_APP_ID }}
|
|
36
|
+
private-key: ${{ secrets.POE_CODE_AGENT_PRIVATE_KEY }}
|
|
37
|
+
- uses: actions/checkout@v4
|
|
38
|
+
with:
|
|
39
|
+
token: ${{ steps.app-token.outputs.token }}
|
|
40
|
+
- uses: actions/setup-node@v4
|
|
41
|
+
with:
|
|
42
|
+
node-version: 20
|
|
43
|
+
- run: npm install -g poe-code@latest
|
|
44
|
+
- id: allow_check
|
|
45
|
+
continue-on-error: true
|
|
46
|
+
run: poe-code github-workflows require-user-allow github-pull-request-opened
|
|
47
|
+
env:
|
|
48
|
+
POE_CODE_STDERR_LOGS: "1"
|
|
49
|
+
COMMENT_AUTHOR_ASSOCIATION: ${{ github.event.pull_request.author_association }}
|
|
50
|
+
- id: guard_result
|
|
51
|
+
run: |
|
|
52
|
+
if [ "${{ steps.allow_check.outcome }}" = "success" ]; then
|
|
53
|
+
echo "should_run=true" >> "$GITHUB_OUTPUT"
|
|
54
|
+
else
|
|
55
|
+
echo "should_run=false" >> "$GITHUB_OUTPUT"
|
|
56
|
+
fi
|
|
7
57
|
run:
|
|
58
|
+
needs: guard
|
|
59
|
+
if: needs.guard.outputs.should_run == 'true'
|
|
8
60
|
runs-on: ubuntu-latest
|
|
9
61
|
permissions:
|
|
10
62
|
contents: read
|
|
@@ -4,7 +4,59 @@ on:
|
|
|
4
4
|
types: [synchronize]
|
|
5
5
|
|
|
6
6
|
jobs:
|
|
7
|
+
guard:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
env:
|
|
10
|
+
OUTPUT_FORMAT: terminal
|
|
11
|
+
outputs:
|
|
12
|
+
should_run: ${{ steps.guard_result.outputs.should_run }}
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
steps:
|
|
16
|
+
- name: Preflight
|
|
17
|
+
env:
|
|
18
|
+
POE_CODE_AGENT_APP_ID: ${{ secrets.POE_CODE_AGENT_APP_ID }}
|
|
19
|
+
POE_CODE_AGENT_PRIVATE_KEY: ${{ secrets.POE_CODE_AGENT_PRIVATE_KEY }}
|
|
20
|
+
POE_API_KEY: ${{ secrets.POE_API_KEY }}
|
|
21
|
+
run: |
|
|
22
|
+
missing=()
|
|
23
|
+
[ -z "$POE_CODE_AGENT_APP_ID" ] && missing+=("POE_CODE_AGENT_APP_ID")
|
|
24
|
+
[ -z "$POE_CODE_AGENT_PRIVATE_KEY" ] && missing+=("POE_CODE_AGENT_PRIVATE_KEY")
|
|
25
|
+
[ -z "$POE_API_KEY" ] && missing+=("POE_API_KEY")
|
|
26
|
+
if [ ${#missing[@]} -gt 0 ]; then
|
|
27
|
+
for name in "${missing[@]}"; do
|
|
28
|
+
echo "::error::Missing required secret: $name — add it in Settings → Secrets and variables → Actions"
|
|
29
|
+
done
|
|
30
|
+
exit 1
|
|
31
|
+
fi
|
|
32
|
+
- uses: actions/create-github-app-token@v1
|
|
33
|
+
id: app-token
|
|
34
|
+
with:
|
|
35
|
+
app-id: ${{ secrets.POE_CODE_AGENT_APP_ID }}
|
|
36
|
+
private-key: ${{ secrets.POE_CODE_AGENT_PRIVATE_KEY }}
|
|
37
|
+
- uses: actions/checkout@v4
|
|
38
|
+
with:
|
|
39
|
+
token: ${{ steps.app-token.outputs.token }}
|
|
40
|
+
- uses: actions/setup-node@v4
|
|
41
|
+
with:
|
|
42
|
+
node-version: 20
|
|
43
|
+
- run: npm install -g poe-code@latest
|
|
44
|
+
- id: allow_check
|
|
45
|
+
continue-on-error: true
|
|
46
|
+
run: poe-code github-workflows require-user-allow github-pull-request-synchronized
|
|
47
|
+
env:
|
|
48
|
+
POE_CODE_STDERR_LOGS: "1"
|
|
49
|
+
COMMENT_AUTHOR_ASSOCIATION: ${{ github.event.pull_request.author_association }}
|
|
50
|
+
- id: guard_result
|
|
51
|
+
run: |
|
|
52
|
+
if [ "${{ steps.allow_check.outcome }}" = "success" ]; then
|
|
53
|
+
echo "should_run=true" >> "$GITHUB_OUTPUT"
|
|
54
|
+
else
|
|
55
|
+
echo "should_run=false" >> "$GITHUB_OUTPUT"
|
|
56
|
+
fi
|
|
7
57
|
run:
|
|
58
|
+
needs: guard
|
|
59
|
+
if: needs.guard.outputs.should_run == 'true'
|
|
8
60
|
runs-on: ubuntu-latest
|
|
9
61
|
permissions:
|
|
10
62
|
contents: read
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "poe-code",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.180",
|
|
4
4
|
"description": "CLI tool to configure Poe API for developer workflows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -95,7 +95,11 @@
|
|
|
95
95
|
"tiny-stdio-mcp-test-server": "packages/tiny-stdio-mcp-test-server/dist/cli.js"
|
|
96
96
|
},
|
|
97
97
|
"files": [
|
|
98
|
-
"dist"
|
|
98
|
+
"dist",
|
|
99
|
+
"packages/cmdkit/dist",
|
|
100
|
+
"packages/cmdkit-schema/dist",
|
|
101
|
+
"packages/design-system/dist",
|
|
102
|
+
"packages/tiny-stdio-mcp-server/dist"
|
|
99
103
|
],
|
|
100
104
|
"engines": {
|
|
101
105
|
"node": ">=20"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { S } from "@poe-code/cmdkit-schema";
|
|
2
|
+
import { defineCommand, defineGroup } from "./index.js";
|
|
3
|
+
import { runCLI } from "./cli.js";
|
|
4
|
+
const ignoredCommand = defineCommand({
|
|
5
|
+
name: "deploy",
|
|
6
|
+
params: S.Object({
|
|
7
|
+
name: S.String(),
|
|
8
|
+
}),
|
|
9
|
+
handler: async () => null,
|
|
10
|
+
});
|
|
11
|
+
const ignoredRoot = defineGroup({
|
|
12
|
+
name: "root",
|
|
13
|
+
children: [ignoredCommand],
|
|
14
|
+
});
|
|
15
|
+
const ignoredOptions = {
|
|
16
|
+
casing: "kebab",
|
|
17
|
+
version: "1.0.0",
|
|
18
|
+
};
|
|
19
|
+
const ignoredServiceOptions = {
|
|
20
|
+
services: {
|
|
21
|
+
marker: "value",
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
void runCLI(ignoredRoot, ignoredOptions);
|
|
25
|
+
void runCLI([ignoredRoot], ignoredOptions);
|
|
26
|
+
void ignoredServiceOptions;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Group } from "./index.js";
|
|
2
|
+
type Casing = "kebab" | "snake";
|
|
3
|
+
export interface RunCLIOptions<TServices extends object = Record<string, unknown>> {
|
|
4
|
+
apiVersion?: string;
|
|
5
|
+
casing?: Casing;
|
|
6
|
+
rootDisplayName?: string;
|
|
7
|
+
rootUsageName?: string;
|
|
8
|
+
services?: TServices;
|
|
9
|
+
version?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function runCLI<TServices extends object = Record<string, unknown>>(roots: Group<TServices> | Group<TServices>[], options?: RunCLIOptions<TServices>): Promise<void>;
|
|
12
|
+
export {};
|