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.
Files changed (174) hide show
  1. package/dist/index.js +6 -2
  2. package/dist/index.js.map +2 -2
  3. package/dist/prompts/github-issue-opened.md +7 -1
  4. package/dist/prompts/github-pull-request-opened.md +4 -0
  5. package/dist/prompts/github-pull-request-synchronized.md +4 -0
  6. package/dist/variables.yaml +46 -1
  7. package/dist/workflow-templates/github-issue-opened.caller.yml +1 -0
  8. package/dist/workflow-templates/github-issue-opened.ejected.yml +52 -0
  9. package/dist/workflow-templates/github-pull-request-opened.caller.yml +1 -0
  10. package/dist/workflow-templates/github-pull-request-opened.ejected.yml +52 -0
  11. package/dist/workflow-templates/github-pull-request-synchronized.caller.yml +1 -0
  12. package/dist/workflow-templates/github-pull-request-synchronized.ejected.yml +52 -0
  13. package/package.json +6 -2
  14. package/packages/cmdkit/dist/cli.compile-check.d.ts +1 -0
  15. package/packages/cmdkit/dist/cli.compile-check.js +26 -0
  16. package/packages/cmdkit/dist/cli.d.ts +12 -0
  17. package/packages/cmdkit/dist/cli.js +2306 -0
  18. package/packages/cmdkit/dist/cli.js.map +7 -0
  19. package/packages/cmdkit/dist/index.compile-check.d.ts +1 -0
  20. package/packages/cmdkit/dist/index.compile-check.js +50 -0
  21. package/packages/cmdkit/dist/index.d.ts +164 -0
  22. package/packages/cmdkit/dist/index.js +518 -0
  23. package/packages/cmdkit/dist/index.js.map +7 -0
  24. package/packages/cmdkit/dist/mcp.compile-check.d.ts +1 -0
  25. package/packages/cmdkit/dist/mcp.compile-check.js +26 -0
  26. package/packages/cmdkit/dist/mcp.d.ts +16 -0
  27. package/packages/cmdkit/dist/mcp.js +1153 -0
  28. package/packages/cmdkit/dist/mcp.js.map +7 -0
  29. package/packages/cmdkit/dist/renderer.d.ts +5 -0
  30. package/packages/cmdkit/dist/renderer.js +164 -0
  31. package/packages/cmdkit/dist/renderer.js.map +7 -0
  32. package/packages/cmdkit/dist/sdk.compile-check.d.ts +1 -0
  33. package/packages/cmdkit/dist/sdk.compile-check.js +79 -0
  34. package/packages/cmdkit/dist/sdk.d.ts +63 -0
  35. package/packages/cmdkit/dist/sdk.js +314 -0
  36. package/packages/cmdkit/dist/sdk.js.map +7 -0
  37. package/packages/cmdkit-schema/dist/index.compile-check.d.ts +1 -0
  38. package/packages/cmdkit-schema/dist/index.compile-check.js +11 -0
  39. package/packages/cmdkit-schema/dist/index.d.ts +81 -0
  40. package/packages/cmdkit-schema/dist/index.js +130 -0
  41. package/packages/design-system/dist/acp/components.d.ts +11 -0
  42. package/packages/design-system/dist/acp/components.js +121 -0
  43. package/packages/design-system/dist/acp/index.d.ts +3 -0
  44. package/packages/design-system/dist/acp/index.js +2 -0
  45. package/packages/design-system/dist/acp/writer.d.ts +13 -0
  46. package/packages/design-system/dist/acp/writer.js +21 -0
  47. package/packages/design-system/dist/components/command-errors.d.ts +16 -0
  48. package/packages/design-system/dist/components/command-errors.js +22 -0
  49. package/packages/design-system/dist/components/help-formatter.d.ts +20 -0
  50. package/packages/design-system/dist/components/help-formatter.js +27 -0
  51. package/packages/design-system/dist/components/index.d.ts +10 -0
  52. package/packages/design-system/dist/components/index.js +7 -0
  53. package/packages/design-system/dist/components/logger.d.ts +11 -0
  54. package/packages/design-system/dist/components/logger.js +60 -0
  55. package/packages/design-system/dist/components/symbols.d.ts +12 -0
  56. package/packages/design-system/dist/components/symbols.js +71 -0
  57. package/packages/design-system/dist/components/table.d.ts +13 -0
  58. package/packages/design-system/dist/components/table.js +74 -0
  59. package/packages/design-system/dist/components/text.d.ts +14 -0
  60. package/packages/design-system/dist/components/text.js +104 -0
  61. package/packages/design-system/dist/dashboard/ansi.d.ts +18 -0
  62. package/packages/design-system/dist/dashboard/ansi.js +298 -0
  63. package/packages/design-system/dist/dashboard/buffer.d.ts +25 -0
  64. package/packages/design-system/dist/dashboard/buffer.js +189 -0
  65. package/packages/design-system/dist/dashboard/components/border.d.ts +9 -0
  66. package/packages/design-system/dist/dashboard/components/border.js +123 -0
  67. package/packages/design-system/dist/dashboard/components/footer.d.ts +8 -0
  68. package/packages/design-system/dist/dashboard/components/footer.js +58 -0
  69. package/packages/design-system/dist/dashboard/components/output-pane.d.ts +21 -0
  70. package/packages/design-system/dist/dashboard/components/output-pane.js +323 -0
  71. package/packages/design-system/dist/dashboard/components/stats-pane.d.ts +7 -0
  72. package/packages/design-system/dist/dashboard/components/stats-pane.js +120 -0
  73. package/packages/design-system/dist/dashboard/dashboard.d.ts +20 -0
  74. package/packages/design-system/dist/dashboard/dashboard.js +187 -0
  75. package/packages/design-system/dist/dashboard/demo.d.ts +13 -0
  76. package/packages/design-system/dist/dashboard/demo.js +145 -0
  77. package/packages/design-system/dist/dashboard/index.d.ts +7 -0
  78. package/packages/design-system/dist/dashboard/index.js +3 -0
  79. package/packages/design-system/dist/dashboard/keymap.d.ts +3 -0
  80. package/packages/design-system/dist/dashboard/keymap.js +114 -0
  81. package/packages/design-system/dist/dashboard/layout.d.ts +25 -0
  82. package/packages/design-system/dist/dashboard/layout.js +79 -0
  83. package/packages/design-system/dist/dashboard/snapshot.d.ts +10 -0
  84. package/packages/design-system/dist/dashboard/snapshot.js +72 -0
  85. package/packages/design-system/dist/dashboard/store.d.ts +9 -0
  86. package/packages/design-system/dist/dashboard/store.js +107 -0
  87. package/packages/design-system/dist/dashboard/terminal.d.ts +35 -0
  88. package/packages/design-system/dist/dashboard/terminal.js +215 -0
  89. package/packages/design-system/dist/dashboard/types.d.ts +45 -0
  90. package/packages/design-system/dist/dashboard/types.js +1 -0
  91. package/packages/design-system/dist/index.d.ts +33 -0
  92. package/packages/design-system/dist/index.js +31 -0
  93. package/packages/design-system/dist/internal/output-format.d.ts +6 -0
  94. package/packages/design-system/dist/internal/output-format.js +22 -0
  95. package/packages/design-system/dist/internal/strip-ansi.d.ts +1 -0
  96. package/packages/design-system/dist/internal/strip-ansi.js +3 -0
  97. package/packages/design-system/dist/internal/theme-detect.d.ts +11 -0
  98. package/packages/design-system/dist/internal/theme-detect.js +49 -0
  99. package/packages/design-system/dist/prompts/index.d.ts +66 -0
  100. package/packages/design-system/dist/prompts/index.js +132 -0
  101. package/packages/design-system/dist/prompts/primitives/cancel.d.ts +2 -0
  102. package/packages/design-system/dist/prompts/primitives/cancel.js +9 -0
  103. package/packages/design-system/dist/prompts/primitives/intro.d.ts +1 -0
  104. package/packages/design-system/dist/prompts/primitives/intro.js +15 -0
  105. package/packages/design-system/dist/prompts/primitives/log.d.ts +18 -0
  106. package/packages/design-system/dist/prompts/primitives/log.js +101 -0
  107. package/packages/design-system/dist/prompts/primitives/note.d.ts +1 -0
  108. package/packages/design-system/dist/prompts/primitives/note.js +39 -0
  109. package/packages/design-system/dist/prompts/primitives/outro.d.ts +1 -0
  110. package/packages/design-system/dist/prompts/primitives/outro.js +16 -0
  111. package/packages/design-system/dist/prompts/primitives/spinner.d.ts +6 -0
  112. package/packages/design-system/dist/prompts/primitives/spinner.js +74 -0
  113. package/packages/design-system/dist/prompts/theme.d.ts +11 -0
  114. package/packages/design-system/dist/prompts/theme.js +12 -0
  115. package/packages/design-system/dist/static/index.d.ts +4 -0
  116. package/packages/design-system/dist/static/index.js +2 -0
  117. package/packages/design-system/dist/static/menu.d.ts +11 -0
  118. package/packages/design-system/dist/static/menu.js +36 -0
  119. package/packages/design-system/dist/static/spinner.d.ts +14 -0
  120. package/packages/design-system/dist/static/spinner.js +46 -0
  121. package/packages/design-system/dist/terminal-markdown/ast.d.ts +84 -0
  122. package/packages/design-system/dist/terminal-markdown/ast.js +1 -0
  123. package/packages/design-system/dist/terminal-markdown/demo-content.d.ts +2 -0
  124. package/packages/design-system/dist/terminal-markdown/demo-content.js +139 -0
  125. package/packages/design-system/dist/terminal-markdown/index.d.ts +6 -0
  126. package/packages/design-system/dist/terminal-markdown/index.js +8 -0
  127. package/packages/design-system/dist/terminal-markdown/parser/block.d.ts +6 -0
  128. package/packages/design-system/dist/terminal-markdown/parser/block.js +1205 -0
  129. package/packages/design-system/dist/terminal-markdown/parser/frontmatter.d.ts +6 -0
  130. package/packages/design-system/dist/terminal-markdown/parser/frontmatter.js +395 -0
  131. package/packages/design-system/dist/terminal-markdown/parser/inline.d.ts +6 -0
  132. package/packages/design-system/dist/terminal-markdown/parser/inline.js +1087 -0
  133. package/packages/design-system/dist/terminal-markdown/parser.d.ts +5 -0
  134. package/packages/design-system/dist/terminal-markdown/parser.js +13 -0
  135. package/packages/design-system/dist/terminal-markdown/renderer.d.ts +6 -0
  136. package/packages/design-system/dist/terminal-markdown/renderer.js +572 -0
  137. package/packages/design-system/dist/terminal-markdown/testing/theme-render-fixture.d.ts +1 -0
  138. package/packages/design-system/dist/terminal-markdown/testing/theme-render-fixture.js +27 -0
  139. package/packages/design-system/dist/tokens/colors.d.ts +35 -0
  140. package/packages/design-system/dist/tokens/colors.js +34 -0
  141. package/packages/design-system/dist/tokens/index.d.ts +4 -0
  142. package/packages/design-system/dist/tokens/index.js +4 -0
  143. package/packages/design-system/dist/tokens/spacing.d.ts +6 -0
  144. package/packages/design-system/dist/tokens/spacing.js +6 -0
  145. package/packages/design-system/dist/tokens/typography.d.ts +7 -0
  146. package/packages/design-system/dist/tokens/typography.js +8 -0
  147. package/packages/design-system/dist/tokens/widths.d.ts +5 -0
  148. package/packages/design-system/dist/tokens/widths.js +5 -0
  149. package/packages/tiny-stdio-mcp-server/dist/content/audio.d.ts +14 -0
  150. package/packages/tiny-stdio-mcp-server/dist/content/audio.js +76 -0
  151. package/packages/tiny-stdio-mcp-server/dist/content/convert.d.ts +16 -0
  152. package/packages/tiny-stdio-mcp-server/dist/content/convert.js +42 -0
  153. package/packages/tiny-stdio-mcp-server/dist/content/file-type.d.ts +11 -0
  154. package/packages/tiny-stdio-mcp-server/dist/content/file-type.js +93 -0
  155. package/packages/tiny-stdio-mcp-server/dist/content/file.d.ts +26 -0
  156. package/packages/tiny-stdio-mcp-server/dist/content/file.js +94 -0
  157. package/packages/tiny-stdio-mcp-server/dist/content/image.d.ts +14 -0
  158. package/packages/tiny-stdio-mcp-server/dist/content/image.js +64 -0
  159. package/packages/tiny-stdio-mcp-server/dist/content/index.d.ts +5 -0
  160. package/packages/tiny-stdio-mcp-server/dist/content/index.js +8 -0
  161. package/packages/tiny-stdio-mcp-server/dist/content/mime.d.ts +1 -0
  162. package/packages/tiny-stdio-mcp-server/dist/content/mime.js +1 -0
  163. package/packages/tiny-stdio-mcp-server/dist/index.d.ts +9 -0
  164. package/packages/tiny-stdio-mcp-server/dist/index.js +7 -0
  165. package/packages/tiny-stdio-mcp-server/dist/jsonrpc.d.ts +14 -0
  166. package/packages/tiny-stdio-mcp-server/dist/jsonrpc.js +99 -0
  167. package/packages/tiny-stdio-mcp-server/dist/schema.d.ts +19 -0
  168. package/packages/tiny-stdio-mcp-server/dist/schema.js +18 -0
  169. package/packages/tiny-stdio-mcp-server/dist/server.d.ts +13 -0
  170. package/packages/tiny-stdio-mcp-server/dist/server.js +226 -0
  171. package/packages/tiny-stdio-mcp-server/dist/testing.d.ts +7 -0
  172. package/packages/tiny-stdio-mcp-server/dist/testing.js +20 -0
  173. package/packages/tiny-stdio-mcp-server/dist/types.d.ts +119 -0
  174. 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
- - If the issue needs code changes, implement them, open or update a PR, and comment with the result.
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
 
@@ -1,5 +1,9 @@
1
1
  ---
2
2
  label: "GitHub: Pull Request Handler"
3
+ allow:
4
+ - OWNER
5
+ - MEMBER
6
+ - COLLABORATOR
3
7
  ---
4
8
  Read {{url}} and review the pull request.
5
9
 
@@ -1,5 +1,9 @@
1
1
  ---
2
2
  label: "GitHub: Pull Request Update Handler"
3
+ allow:
4
+ - OWNER
5
+ - MEMBER
6
+ - COLLABORATOR
3
7
  ---
4
8
  Read {{url}} and re-review the updated pull request.
5
9
 
@@ -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
- - Don't rubber-stamp. Request changes when there are real issues.
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
@@ -14,4 +14,5 @@ jobs:
14
14
  secrets: inherit
15
15
  with:
16
16
  PR_NUMBER: ${{ github.event.pull_request.number }}
17
+ COMMENT_AUTHOR_ASSOCIATION: ${{ github.event.pull_request.author_association }}
17
18
  GITHUB_REPOSITORY: ${{ github.repository }}
@@ -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.178",
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 {};