Dunstan
v0.1.26Checks a coding agent's handback against the pull request's GitHub record.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
dunstan_check_handback Check a handback against the record
Check a completion handback against the repository's own record, before you say done. Give exactly one subject: a GitHub pull request (repository owner/name and pullRequest), or a GitLab merge request (gitlabProject, the project's full path, and mergeRequest, its iid; gitlabHost for a host other than gitlab.com; GitLab profile). Members of both, of neither, or part of one are an input error. Then give exactly one of: block, the dunstan-handback block as a JSON object; or report, the report text that carries exactly one ```dunstan-handback fence. Of the checks claims, checks.allSucceeded is tru…
| Parameter | Type | Description |
|---|---|---|
block | object | The dunstan-handback block as a JSON object. Give this or report, not both. |
gitlabHost | string | A GitLab subject: the GitLab host name, such as gitlab.example.com. Absent: gitlab.com. |
gitlabProject | string | A GitLab subject: the project's full path, group/subgroup/.../project, with mergeRequest. Read with GITLAB_TOKEN. Give this subject or the GitHub one, not both. |
mergeRequest | number | A GitLab subject: the merge request's iid, the number after ! (a positive integer). |
outPath | string | Write the record to this path (must not exist). Without it nothing is written. |
pullRequest | integer | A GitHub subject: the pull request number the handback is about. |
report | string | The report text, carrying exactly one ```dunstan-handback fence. Give this or block, not both. |
repository | string | A GitHub subject: the repository, owner/name, with pullRequest. Read with GITHUB_TOKEN. Give this subject or the GitLab one, not both. |
testPaths | array | Optional, GitHub only (DRAFT): the file patterns the user counts as tests, such as *_test.go or src/**/*.test.ts (a pattern without / matches a file name in any directory). The table then lists each c… |
dunstan_suggest_declarations Suggest declarations from the prose
List the sentences in your report's prose that look like claims your dunstan-handback block does not declare, before you say done. Give report, the report text. For each, declare it in the block, or reword it if it is not a claim about this PR. Offline: needs no pull request, reads nothing and writes nothing. Never a verdict: nothing passes or fails, and nothing is written to a record. The same text as `dunstan suggest`.
| Parameter | Type | Description |
|---|---|---|
report * | string | The report text: the prose and its ```dunstan-handback fence. |
dunstan_template_handback Generate a handback block from git
Generate your dunstan-handback block from the local git checkout of your pull request's branch, after your last push: headCommit is HEAD, filesChanged is HEAD's diff against its merge base with base. Give directory, the checkout's absolute path. To declare tests, give tests.from "ci" with command, workflow and job once CI has finished on your last push: the counts are read from the JUnit record CI published, as the gate reads it, with GITHUB_TOKEN. For a GitLab merge request (GitLab profile), give tests.from "ci" with gitlabProject, mergeRequest, command and job instead (gitlabHost off gitlab.…
| Parameter | Type | Description |
|---|---|---|
directory * | string | The absolute path of the local git checkout of the pull request's branch. Git runs there. |
base | string | The ref the pull request merges into, as dunstan template --base. Absent: the remote's default branch. |
tests | Which tests to declare. Absent: none, and the note says how. |