feat: add GitHub step evidence presets

This commit is contained in:
ejclaw
2026-05-28 17:07:30 +09:00
parent 9b9b6c111c
commit e8a9239971
9 changed files with 176 additions and 1 deletions

View File

@@ -12,6 +12,8 @@ export const HOST_EVIDENCE_ACTIONS = [
'github_pr_status',
'github_pr_diff_stat',
'github_run_status',
'github_run_jobs',
'github_workflow_file',
] as const;
export const DB_EVIDENCE_ACTIONS = [
@@ -29,6 +31,8 @@ export const GITHUB_EVIDENCE_ACTIONS = [
'github_pr_status',
'github_pr_diff_stat',
'github_run_status',
'github_run_jobs',
'github_workflow_file',
] as const;
export const ARTIFACT_EVIDENCE_KINDS = [

View File

@@ -114,6 +114,16 @@ export function registerHostEvidenceTools(
.describe('Only for GitHub evidence, in owner/repo form.'),
pr_number: z.number().int().positive().optional(),
run_id: z.number().int().positive().optional(),
workflow_path: z
.string()
.optional()
.describe(
'Only for github_workflow_file, e.g. .github/workflows/ci.yml.',
),
ref: z
.string()
.optional()
.describe('Only for github_workflow_file; branch, tag, or commit SHA.'),
artifact_kind: z.enum(ARTIFACT_EVIDENCE_KINDS).optional(),
},
async (args) =>
@@ -129,6 +139,8 @@ export function registerHostEvidenceTools(
repo: args.repo,
pr_number: args.pr_number,
run_id: args.run_id,
workflow_path: args.workflow_path,
ref: args.ref,
artifact_kind: args.artifact_kind,
}),
);
@@ -176,6 +188,16 @@ export function registerHostEvidenceTools(
repo: z.string().describe('GitHub repository in owner/repo form.'),
pr_number: z.number().int().positive().optional(),
run_id: z.number().int().positive().optional(),
workflow_path: z
.string()
.optional()
.describe(
'Only for github_workflow_file, e.g. .github/workflows/ci.yml.',
),
ref: z
.string()
.optional()
.describe('Only for github_workflow_file; branch, tag, or commit SHA.'),
},
async (args) =>
requestHostEvidence(options, {
@@ -183,6 +205,8 @@ export function registerHostEvidenceTools(
repo: args.repo,
pr_number: args.pr_number,
run_id: args.run_id,
workflow_path: args.workflow_path,
ref: args.ref,
}),
);
}