@iaforged/context-code 1.0.77 → 1.0.79
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/README.md +68 -68
- package/cli.js +8515 -8515
- package/context-bootstrap.js +27 -27
- package/dist/src/bootstrap/state.js +3 -0
- package/dist/src/bridge/bridgeMain.js +40 -40
- package/dist/src/cli/print.js +12 -12
- package/dist/src/commands/agent/agent.js +8 -0
- package/dist/src/commands/commit-push-pr.js +55 -55
- package/dist/src/commands/createMovedToPluginCommand.js +9 -9
- package/dist/src/commands/init-verifiers.js +238 -238
- package/dist/src/commands/init.js +216 -216
- package/dist/src/commands/install.js +2 -2
- package/dist/src/commands/login/login.js +24 -10
- package/dist/src/commands/orchestrate/index.js +1 -1
- package/dist/src/commands/orchestrate/orchestrate.js +110 -24
- package/dist/src/commands/profile/profile.js +15 -1
- package/dist/src/commands/provider/index.js +1 -1
- package/dist/src/commands/provider/provider.js +34 -1
- package/dist/src/commands/review.js +22 -22
- package/dist/src/commands/run/index.js +2 -2
- package/dist/src/commands/run/run.js +63 -61
- package/dist/src/commands/team/index.js +1 -1
- package/dist/src/commands/team/team.js +84 -76
- package/dist/src/commands/team-auto/teamAuto.js +89 -29
- package/dist/src/commands/terminalSetup/terminalSetup.js +24 -24
- package/dist/src/commands/usage/index.js +7 -0
- package/dist/src/commands/usage/usage.js +5 -0
- package/dist/src/commands/workspace/workspace.js +39 -31
- package/dist/src/commands.js +0 -2
- package/dist/src/components/ConsoleOAuthFlow.js +92 -14
- package/dist/src/components/ModelPicker.js +2 -0
- package/dist/src/components/agents/generateAgent.js +92 -92
- package/dist/src/components/grove/Grove.js +10 -10
- package/dist/src/components/permissions/AskUserQuestionPermissionRequest/AskUserQuestionPermissionRequest.js +8 -8
- package/dist/src/constants/geminiOAuth.js +13 -0
- package/dist/src/constants/github-app.js +134 -134
- package/dist/src/constants/prompts.js +123 -123
- package/dist/src/coordinator/coordinatorMode.js +252 -252
- package/dist/src/hooks/useTypeahead.js +7 -7
- package/dist/src/ink/reconciler.js +7 -7
- package/dist/src/main.js +5 -5
- package/dist/src/memdir/findRelevantMemories.js +6 -6
- package/dist/src/services/MagicDocs/prompts.js +56 -56
- package/dist/src/services/PromptSuggestion/promptSuggestion.js +29 -29
- package/dist/src/services/SessionMemory/prompts.js +66 -66
- package/dist/src/services/api/openai.js +584 -21
- package/dist/src/services/limits/adapters/ollama.js +3 -3
- package/dist/src/services/oauth/geminiCli.js +107 -0
- package/dist/src/services/orchestration/execution/AgentTaskExecutor.js +5 -3
- package/dist/src/services/orchestration/execution/OrchestrationExecutionRuntime.js +18 -18
- package/dist/src/services/orchestration/global/reporting.js +2 -2
- package/dist/src/services/toolUseSummary/toolUseSummaryGenerator.js +9 -9
- package/dist/src/skills/bundled/batch.js +78 -78
- package/dist/src/skills/bundled/claudeApi.js +34 -34
- package/dist/src/skills/bundled/claudeInChrome.js +4 -4
- package/dist/src/skills/bundled/debug.js +36 -36
- package/dist/src/skills/bundled/scheduleRemoteAgents.js +151 -151
- package/dist/src/skills/bundled/skillify.js +132 -132
- package/dist/src/skills/bundled/stuck.js +53 -53
- package/dist/src/skills/bundled/updateConfig.js +418 -418
- package/dist/src/tasks/RemoteAgentTask/RemoteAgentTask.js +26 -26
- package/dist/src/tools/AgentTool/AgentTool.js +7 -7
- package/dist/src/tools/AgentTool/built-in/claudeCodeGuideAgent.js +67 -67
- package/dist/src/tools/AgentTool/built-in/exploreAgent.js +32 -32
- package/dist/src/tools/AgentTool/built-in/generalPurposeAgent.js +13 -13
- package/dist/src/tools/AgentTool/built-in/planAgent.js +49 -49
- package/dist/src/tools/AgentTool/built-in/statuslineSetup.js +129 -129
- package/dist/src/tools/AgentTool/built-in/verificationAgent.js +119 -119
- package/dist/src/tools/AgentTool/prompt.js +131 -131
- package/dist/src/tools/AgentTool/runAgent.js +9 -9
- package/dist/src/tools/BashTool/BashTool.js +10 -10
- package/dist/src/tools/BashTool/prompt.js +94 -94
- package/dist/src/tools/ConfigTool/prompt.js +29 -29
- package/dist/src/tools/EnterWorktreeTool/prompt.js +27 -27
- package/dist/src/tools/FileReadTool/prompt.js +12 -12
- package/dist/src/tools/PowerShellTool/prompt.js +82 -82
- package/dist/src/tools/RemoteTriggerTool/prompt.js +9 -9
- package/dist/src/tools/ScheduleCronTool/prompt.js +37 -37
- package/dist/src/tools/TeamCreateTool/prompt.js +110 -110
- package/dist/src/tools/TeamDeleteTool/prompt.js +13 -13
- package/dist/src/utils/advisor.js +15 -15
- package/dist/src/utils/api.js +2 -2
- package/dist/src/utils/auth.js +207 -2
- package/dist/src/utils/autoUpdater.js +18 -18
- package/dist/src/utils/bash/ShellSnapshot.js +86 -86
- package/dist/src/utils/bash/commands.js +61 -61
- package/dist/src/utils/claudeInChrome/prompt.js +53 -53
- package/dist/src/utils/claudeInChrome/setup.js +8 -8
- package/dist/src/utils/databaseMcp/server/queries.js +632 -632
- package/dist/src/utils/deepLink/registerProtocol.js +35 -35
- package/dist/src/utils/deepLink/terminalLauncher.js +12 -12
- package/dist/src/utils/hooks/execAgentHook.js +7 -7
- package/dist/src/utils/hooks/execPromptHook.js +4 -4
- package/dist/src/utils/hooks/skillImprovement.js +36 -36
- package/dist/src/utils/logoV2Utils.js +1 -1
- package/dist/src/utils/mcp/dateTimeParser.js +9 -9
- package/dist/src/utils/messages.js +191 -191
- package/dist/src/utils/model/model.js +18 -0
- package/dist/src/utils/model/modelOptions.js +51 -1
- package/dist/src/utils/model/modelStrings.js +5 -1
- package/dist/src/utils/model/modelSupportOverrides.js +3 -0
- package/dist/src/utils/model/providerBaseUrls.js +6 -1
- package/dist/src/utils/model/providerCatalog.js +64 -28
- package/dist/src/utils/model/providerModels.js +88 -17
- package/dist/src/utils/model/providerProfiles.js +8 -0
- package/dist/src/utils/model/providerProfilesDb.js +578 -393
- package/dist/src/utils/model/providerSwitch.js +12 -0
- package/dist/src/utils/model/providerWorkspaces.js +2 -0
- package/dist/src/utils/model/providers.js +65 -2
- package/dist/src/utils/orchestration/store/providerWorkspaceStore.js +3 -1
- package/dist/src/utils/orchestration/store/runStore.js +47 -47
- package/dist/src/utils/orchestration/store/teamStore.js +61 -61
- package/dist/src/utils/powershell/parser.js +253 -253
- package/dist/src/utils/sessionTitle.js +12 -12
- package/dist/src/utils/sideQuestion.js +17 -17
- package/dist/src/utils/status.js +1 -1
- package/dist/src/utils/swarm/backends/registry.js +9 -9
- package/dist/src/utils/telemetry/instrumentation.js +9 -9
- package/dist/src/utils/teleport.js +15 -15
- package/dist/src/utils/undercover.js +28 -28
- package/package.json +1 -1
|
@@ -8,16 +8,16 @@ import { Select } from '../CustomSelect/index.js';
|
|
|
8
8
|
import { Byline } from '../design-system/Byline.js';
|
|
9
9
|
import { Dialog } from '../design-system/Dialog.js';
|
|
10
10
|
import { KeyboardShortcutHint } from '../design-system/KeyboardShortcutHint.js';
|
|
11
|
-
const NEW_TERMS_ASCII = ` _____________
|
|
12
|
-
| \\ \\
|
|
13
|
-
| NEW TERMS \\__\\
|
|
14
|
-
| |
|
|
15
|
-
| ---------- |
|
|
16
|
-
| ---------- |
|
|
17
|
-
| ---------- |
|
|
18
|
-
| ---------- |
|
|
19
|
-
| ---------- |
|
|
20
|
-
| |
|
|
11
|
+
const NEW_TERMS_ASCII = ` _____________
|
|
12
|
+
| \\ \\
|
|
13
|
+
| NEW TERMS \\__\\
|
|
14
|
+
| |
|
|
15
|
+
| ---------- |
|
|
16
|
+
| ---------- |
|
|
17
|
+
| ---------- |
|
|
18
|
+
| ---------- |
|
|
19
|
+
| ---------- |
|
|
20
|
+
| |
|
|
21
21
|
|______________|`;
|
|
22
22
|
function GracePeriodContentBody() {
|
|
23
23
|
const $ = _c(9);
|
|
@@ -290,11 +290,11 @@ function AskUserQuestionPermissionRequestBody(t0) {
|
|
|
290
290
|
}
|
|
291
291
|
return `- "${q_1.question}"\n (No se proporcionó respuesta)`;
|
|
292
292
|
}).join("\n");
|
|
293
|
-
const feedback = `El usuario desea aclarar estas preguntas.
|
|
294
|
-
Esto significa que pueden tener información adicional, contexto o preguntas para ti.
|
|
295
|
-
Ten en cuenta su respuesta y reformula las preguntas si es apropiado.
|
|
296
|
-
Comienza preguntándoles qué desearían aclarar.
|
|
297
|
-
|
|
293
|
+
const feedback = `El usuario desea aclarar estas preguntas.
|
|
294
|
+
Esto significa que pueden tener información adicional, contexto o preguntas para ti.
|
|
295
|
+
Ten en cuenta su respuesta y reformula las preguntas si es apropiado.
|
|
296
|
+
Comienza preguntándoles qué desearían aclarar.
|
|
297
|
+
|
|
298
298
|
Preguntas realizadas:\n${questionsWithAnswers}`;
|
|
299
299
|
if (metadataSource) {
|
|
300
300
|
logEvent("tengu_ask_user_question_respond_to_claude", {
|
|
@@ -331,9 +331,9 @@ function AskUserQuestionPermissionRequestBody(t0) {
|
|
|
331
331
|
}
|
|
332
332
|
return `- "${q_2.question}"\n (No se proporcionó respuesta)`;
|
|
333
333
|
}).join("\n");
|
|
334
|
-
const feedback_0 = `El usuario ha indicado que ha proporcionado suficientes respuestas para la entrevista del plan.
|
|
335
|
-
Deja de hacer preguntas aclaratorias y procede a finalizar el plan con la información que tienes.
|
|
336
|
-
|
|
334
|
+
const feedback_0 = `El usuario ha indicado que ha proporcionado suficientes respuestas para la entrevista del plan.
|
|
335
|
+
Deja de hacer preguntas aclaratorias y procede a finalizar el plan con la información que tienes.
|
|
336
|
+
|
|
337
337
|
Preguntas realizadas y respuestas proporcionadas:\n${questionsWithAnswers_0}`;
|
|
338
338
|
if (metadataSource) {
|
|
339
339
|
logEvent("tengu_ask_user_question_finish_plan_interview", {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const decode = (value) => Buffer.from(value, 'base64').toString('utf8');
|
|
2
|
+
export const GEMINI_CLI_OAUTH_CLIENT_ID = decode('NjgxMjU1ODA5Mzk1LW9vOGZ0Mm9wcmRybnA5ZTNhcWY2YXYzaG1kaWIxMzVqLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29t');
|
|
3
|
+
export const GEMINI_CLI_OAUTH_CLIENT_SECRET = decode('R09DU1BYLTR1SGdNUG0tMW83U2stZ2VWNkN1NWNsWEZzeGw=');
|
|
4
|
+
export const GEMINI_CLI_OAUTH_AUTHORIZE_URL = 'https://accounts.google.com/o/oauth2/v2/auth';
|
|
5
|
+
export const GEMINI_CLI_OAUTH_TOKEN_URL = 'https://oauth2.googleapis.com/token';
|
|
6
|
+
export const GEMINI_CLI_OAUTH_CALLBACK_PATH = '/oauth2callback';
|
|
7
|
+
export const GEMINI_CLI_OAUTH_CALLBACK_PORT = 8085;
|
|
8
|
+
export const GEMINI_CLI_OAUTH_REDIRECT_URI = `http://localhost:${GEMINI_CLI_OAUTH_CALLBACK_PORT}${GEMINI_CLI_OAUTH_CALLBACK_PATH}`;
|
|
9
|
+
export const GEMINI_CLI_OAUTH_SCOPES = [
|
|
10
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
11
|
+
'https://www.googleapis.com/auth/userinfo.email',
|
|
12
|
+
'https://www.googleapis.com/auth/userinfo.profile',
|
|
13
|
+
];
|
|
@@ -1,139 +1,139 @@
|
|
|
1
1
|
export const PR_TITLE = 'Add Context Code GitHub Workflow';
|
|
2
2
|
export const GITHUB_ACTION_SETUP_DOCS_URL = 'https://github.com/anthropics/claude-code-action/blob/main/docs/setup.md';
|
|
3
|
-
export const WORKFLOW_CONTENT = `name: Context Code
|
|
4
|
-
|
|
5
|
-
on:
|
|
6
|
-
issue_comment:
|
|
7
|
-
types: [created]
|
|
8
|
-
pull_request_review_comment:
|
|
9
|
-
types: [created]
|
|
10
|
-
issues:
|
|
11
|
-
types: [opened, assigned]
|
|
12
|
-
pull_request_review:
|
|
13
|
-
types: [submitted]
|
|
14
|
-
|
|
15
|
-
jobs:
|
|
16
|
-
claude:
|
|
17
|
-
if: |
|
|
18
|
-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
19
|
-
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
20
|
-
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
|
|
21
|
-
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
|
|
22
|
-
runs-on: ubuntu-latest
|
|
23
|
-
permissions:
|
|
24
|
-
contents: read
|
|
25
|
-
pull-requests: read
|
|
26
|
-
issues: read
|
|
27
|
-
id-token: write
|
|
28
|
-
actions: read # Required for Claude to read CI results on PRs
|
|
29
|
-
steps:
|
|
30
|
-
- name: Checkout repository
|
|
31
|
-
uses: actions/checkout@v4
|
|
32
|
-
with:
|
|
33
|
-
fetch-depth: 1
|
|
34
|
-
|
|
35
|
-
- name: Run Context Code
|
|
36
|
-
id: claude
|
|
37
|
-
uses: anthropics/claude-code-action@v1
|
|
38
|
-
with:
|
|
39
|
-
anthropic_api_key: \${{ secrets.ANTHROPIC_API_KEY }}
|
|
40
|
-
|
|
41
|
-
# This is an optional setting that allows Claude to read CI results on PRs
|
|
42
|
-
additional_permissions: |
|
|
43
|
-
actions: read
|
|
44
|
-
|
|
45
|
-
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
|
|
46
|
-
# prompt: 'Update the pull request description to include a summary of changes.'
|
|
47
|
-
|
|
48
|
-
# Optional: Add claude_args to customize behavior and configuration
|
|
49
|
-
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
|
50
|
-
# or https://code.claude.com/docs/en/cli-reference for available options
|
|
51
|
-
# claude_args: '--allowed-tools Bash(gh pr:*)'
|
|
52
|
-
|
|
3
|
+
export const WORKFLOW_CONTENT = `name: Context Code
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
issue_comment:
|
|
7
|
+
types: [created]
|
|
8
|
+
pull_request_review_comment:
|
|
9
|
+
types: [created]
|
|
10
|
+
issues:
|
|
11
|
+
types: [opened, assigned]
|
|
12
|
+
pull_request_review:
|
|
13
|
+
types: [submitted]
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
claude:
|
|
17
|
+
if: |
|
|
18
|
+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
19
|
+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
20
|
+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
|
|
21
|
+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
permissions:
|
|
24
|
+
contents: read
|
|
25
|
+
pull-requests: read
|
|
26
|
+
issues: read
|
|
27
|
+
id-token: write
|
|
28
|
+
actions: read # Required for Claude to read CI results on PRs
|
|
29
|
+
steps:
|
|
30
|
+
- name: Checkout repository
|
|
31
|
+
uses: actions/checkout@v4
|
|
32
|
+
with:
|
|
33
|
+
fetch-depth: 1
|
|
34
|
+
|
|
35
|
+
- name: Run Context Code
|
|
36
|
+
id: claude
|
|
37
|
+
uses: anthropics/claude-code-action@v1
|
|
38
|
+
with:
|
|
39
|
+
anthropic_api_key: \${{ secrets.ANTHROPIC_API_KEY }}
|
|
40
|
+
|
|
41
|
+
# This is an optional setting that allows Claude to read CI results on PRs
|
|
42
|
+
additional_permissions: |
|
|
43
|
+
actions: read
|
|
44
|
+
|
|
45
|
+
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
|
|
46
|
+
# prompt: 'Update the pull request description to include a summary of changes.'
|
|
47
|
+
|
|
48
|
+
# Optional: Add claude_args to customize behavior and configuration
|
|
49
|
+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
|
50
|
+
# or https://code.claude.com/docs/en/cli-reference for available options
|
|
51
|
+
# claude_args: '--allowed-tools Bash(gh pr:*)'
|
|
52
|
+
|
|
53
53
|
`;
|
|
54
|
-
export const PR_BODY = `## 🤖 Installing Context Code GitHub App
|
|
55
|
-
|
|
56
|
-
This PR adds a GitHub Actions workflow that enables Context Code integration in our repository.
|
|
57
|
-
|
|
58
|
-
### What is Context Code?
|
|
59
|
-
|
|
60
|
-
[Context Code](https://claude.com/claude-code) is an AI coding agent that can help with:
|
|
61
|
-
- Bug fixes and improvements
|
|
62
|
-
- Documentation updates
|
|
63
|
-
- Implementing new features
|
|
64
|
-
- Code reviews and suggestions
|
|
65
|
-
- Writing tests
|
|
66
|
-
- And more!
|
|
67
|
-
|
|
68
|
-
### How it works
|
|
69
|
-
|
|
70
|
-
Once this PR is merged, we'll be able to interact with Claude by mentioning @claude in a pull request or issue comment.
|
|
71
|
-
Once the workflow is triggered, Claude will analyze the comment and surrounding context, and execute on the request in a GitHub action.
|
|
72
|
-
|
|
73
|
-
### Important Notes
|
|
74
|
-
|
|
75
|
-
- **This workflow won't take effect until this PR is merged**
|
|
76
|
-
- **@claude mentions won't work until after the merge is complete**
|
|
77
|
-
- The workflow runs automatically whenever Claude is mentioned in PR or issue comments
|
|
78
|
-
- Claude gets access to the entire PR or issue context including files, diffs, and previous comments
|
|
79
|
-
|
|
80
|
-
### Security
|
|
81
|
-
|
|
82
|
-
- Our Anthropic API key is securely stored as a GitHub Actions secret
|
|
83
|
-
- Only users with write access to the repository can trigger the workflow
|
|
84
|
-
- All Claude runs are stored in the GitHub Actions run history
|
|
85
|
-
- Claude's default tools are limited to reading/writing files and interacting with our repo by creating comments, branches, and commits.
|
|
86
|
-
- We can add more allowed tools by adding them to the workflow file like:
|
|
87
|
-
|
|
88
|
-
\`\`\`
|
|
89
|
-
allowed_tools: Bash(npm install),Bash(npm run build),Bash(npm run lint),Bash(npm run test)
|
|
90
|
-
\`\`\`
|
|
91
|
-
|
|
92
|
-
There's more information in the [Context Code action repo](https://github.com/anthropics/claude-code-action).
|
|
93
|
-
|
|
54
|
+
export const PR_BODY = `## 🤖 Installing Context Code GitHub App
|
|
55
|
+
|
|
56
|
+
This PR adds a GitHub Actions workflow that enables Context Code integration in our repository.
|
|
57
|
+
|
|
58
|
+
### What is Context Code?
|
|
59
|
+
|
|
60
|
+
[Context Code](https://claude.com/claude-code) is an AI coding agent that can help with:
|
|
61
|
+
- Bug fixes and improvements
|
|
62
|
+
- Documentation updates
|
|
63
|
+
- Implementing new features
|
|
64
|
+
- Code reviews and suggestions
|
|
65
|
+
- Writing tests
|
|
66
|
+
- And more!
|
|
67
|
+
|
|
68
|
+
### How it works
|
|
69
|
+
|
|
70
|
+
Once this PR is merged, we'll be able to interact with Claude by mentioning @claude in a pull request or issue comment.
|
|
71
|
+
Once the workflow is triggered, Claude will analyze the comment and surrounding context, and execute on the request in a GitHub action.
|
|
72
|
+
|
|
73
|
+
### Important Notes
|
|
74
|
+
|
|
75
|
+
- **This workflow won't take effect until this PR is merged**
|
|
76
|
+
- **@claude mentions won't work until after the merge is complete**
|
|
77
|
+
- The workflow runs automatically whenever Claude is mentioned in PR or issue comments
|
|
78
|
+
- Claude gets access to the entire PR or issue context including files, diffs, and previous comments
|
|
79
|
+
|
|
80
|
+
### Security
|
|
81
|
+
|
|
82
|
+
- Our Anthropic API key is securely stored as a GitHub Actions secret
|
|
83
|
+
- Only users with write access to the repository can trigger the workflow
|
|
84
|
+
- All Claude runs are stored in the GitHub Actions run history
|
|
85
|
+
- Claude's default tools are limited to reading/writing files and interacting with our repo by creating comments, branches, and commits.
|
|
86
|
+
- We can add more allowed tools by adding them to the workflow file like:
|
|
87
|
+
|
|
88
|
+
\`\`\`
|
|
89
|
+
allowed_tools: Bash(npm install),Bash(npm run build),Bash(npm run lint),Bash(npm run test)
|
|
90
|
+
\`\`\`
|
|
91
|
+
|
|
92
|
+
There's more information in the [Context Code action repo](https://github.com/anthropics/claude-code-action).
|
|
93
|
+
|
|
94
94
|
After merging this PR, let's try mentioning @claude in a comment on any PR to get started!`;
|
|
95
|
-
export const CODE_REVIEW_PLUGIN_WORKFLOW_CONTENT = `name: Context Code Review
|
|
96
|
-
|
|
97
|
-
on:
|
|
98
|
-
pull_request:
|
|
99
|
-
types: [opened, synchronize, ready_for_review, reopened]
|
|
100
|
-
# Optional: Only run on specific file changes
|
|
101
|
-
# paths:
|
|
102
|
-
# - "src/**/*.ts"
|
|
103
|
-
# - "src/**/*.tsx"
|
|
104
|
-
# - "src/**/*.js"
|
|
105
|
-
# - "src/**/*.jsx"
|
|
106
|
-
|
|
107
|
-
jobs:
|
|
108
|
-
claude-review:
|
|
109
|
-
# Optional: Filter by PR author
|
|
110
|
-
# if: |
|
|
111
|
-
# github.event.pull_request.user.login == 'external-contributor' ||
|
|
112
|
-
# github.event.pull_request.user.login == 'new-developer' ||
|
|
113
|
-
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
|
|
114
|
-
|
|
115
|
-
runs-on: ubuntu-latest
|
|
116
|
-
permissions:
|
|
117
|
-
contents: read
|
|
118
|
-
pull-requests: read
|
|
119
|
-
issues: read
|
|
120
|
-
id-token: write
|
|
121
|
-
|
|
122
|
-
steps:
|
|
123
|
-
- name: Checkout repository
|
|
124
|
-
uses: actions/checkout@v4
|
|
125
|
-
with:
|
|
126
|
-
fetch-depth: 1
|
|
127
|
-
|
|
128
|
-
- name: Run Context Code Review
|
|
129
|
-
id: claude-review
|
|
130
|
-
uses: anthropics/claude-code-action@v1
|
|
131
|
-
with:
|
|
132
|
-
anthropic_api_key: \${{ secrets.ANTHROPIC_API_KEY }}
|
|
133
|
-
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
|
|
134
|
-
plugins: 'code-review@claude-code-plugins'
|
|
135
|
-
prompt: '/code-review:code-review \${{ github.repository }}/pull/\${{ github.event.pull_request.number }}'
|
|
136
|
-
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
|
137
|
-
# or https://code.claude.com/docs/en/cli-reference for available options
|
|
138
|
-
|
|
95
|
+
export const CODE_REVIEW_PLUGIN_WORKFLOW_CONTENT = `name: Context Code Review
|
|
96
|
+
|
|
97
|
+
on:
|
|
98
|
+
pull_request:
|
|
99
|
+
types: [opened, synchronize, ready_for_review, reopened]
|
|
100
|
+
# Optional: Only run on specific file changes
|
|
101
|
+
# paths:
|
|
102
|
+
# - "src/**/*.ts"
|
|
103
|
+
# - "src/**/*.tsx"
|
|
104
|
+
# - "src/**/*.js"
|
|
105
|
+
# - "src/**/*.jsx"
|
|
106
|
+
|
|
107
|
+
jobs:
|
|
108
|
+
claude-review:
|
|
109
|
+
# Optional: Filter by PR author
|
|
110
|
+
# if: |
|
|
111
|
+
# github.event.pull_request.user.login == 'external-contributor' ||
|
|
112
|
+
# github.event.pull_request.user.login == 'new-developer' ||
|
|
113
|
+
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
|
|
114
|
+
|
|
115
|
+
runs-on: ubuntu-latest
|
|
116
|
+
permissions:
|
|
117
|
+
contents: read
|
|
118
|
+
pull-requests: read
|
|
119
|
+
issues: read
|
|
120
|
+
id-token: write
|
|
121
|
+
|
|
122
|
+
steps:
|
|
123
|
+
- name: Checkout repository
|
|
124
|
+
uses: actions/checkout@v4
|
|
125
|
+
with:
|
|
126
|
+
fetch-depth: 1
|
|
127
|
+
|
|
128
|
+
- name: Run Context Code Review
|
|
129
|
+
id: claude-review
|
|
130
|
+
uses: anthropics/claude-code-action@v1
|
|
131
|
+
with:
|
|
132
|
+
anthropic_api_key: \${{ secrets.ANTHROPIC_API_KEY }}
|
|
133
|
+
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
|
|
134
|
+
plugins: 'code-review@claude-code-plugins'
|
|
135
|
+
prompt: '/code-review:code-review \${{ github.repository }}/pull/\${{ github.event.pull_request.number }}'
|
|
136
|
+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
|
137
|
+
# or https://code.claude.com/docs/en/cli-reference for available options
|
|
138
|
+
|
|
139
139
|
`;
|