@github-tools/sdk 1.5.0 → 1.6.0
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 +26 -1
- package/dist/index-ikP-LT-3.d.mts +1634 -0
- package/dist/index-ikP-LT-3.d.mts.map +1 -0
- package/dist/index.d.mts +2 -777
- package/dist/index.mjs +1 -219
- package/dist/{agents-D9aKsd_7.mjs → src--pAdGYqY.mjs} +335 -23
- package/dist/src--pAdGYqY.mjs.map +1 -0
- package/dist/workflow.d.mts +63 -46
- package/dist/workflow.d.mts.map +1 -1
- package/dist/workflow.mjs +7 -6
- package/dist/workflow.mjs.map +1 -1
- package/package.json +8 -8
- package/dist/agents-C6nqZiYp.d.mts +0 -781
- package/dist/agents-C6nqZiYp.d.mts.map +0 -1
- package/dist/agents-D9aKsd_7.mjs.map +0 -1
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -141,6 +141,31 @@ Supported override properties:
|
|
|
141
141
|
|
|
142
142
|
Core properties (`execute`, `inputSchema`, `outputSchema`) cannot be overridden.
|
|
143
143
|
|
|
144
|
+
## Commit Attribution
|
|
145
|
+
|
|
146
|
+
Control how commits are attributed when using `createOrUpdateFile` or `mergePullRequest`:
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
import { createGithubTools } from '@github-tools/sdk'
|
|
150
|
+
|
|
151
|
+
const tools = createGithubTools({
|
|
152
|
+
token,
|
|
153
|
+
coAuthors: [
|
|
154
|
+
{ name: 'my-bot[bot]', email: '12345+my-bot[bot]@users.noreply.github.com' }
|
|
155
|
+
]
|
|
156
|
+
})
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
This appends `Co-authored-by` trailers to commit messages, crediting additional contributors.
|
|
160
|
+
|
|
161
|
+
| Option | Type | Description |
|
|
162
|
+
|--------|------|-------------|
|
|
163
|
+
| `author` | `{ name: string, email: string }` | The person who wrote the code. Falls back to the authenticated user. |
|
|
164
|
+
| `committer` | `{ name: string, email: string }` | The person who applied the commit. Falls back to the authenticated user. |
|
|
165
|
+
| `coAuthors` | `{ name: string, email: string }[]` | Additional contributors added as `Co-authored-by` trailers. |
|
|
166
|
+
|
|
167
|
+
Commits made via the GitHub API are **automatically signed** by GitHub's web-flow key, passing branch protection rules that require signed commits.
|
|
168
|
+
|
|
144
169
|
## Tool Selection with toolpick
|
|
145
170
|
|
|
146
171
|
With dozens of tools, context window usage adds up. [toolpick](https://github.com/pontusab/toolpick) selects only the most relevant tools per step so the model sees what it needs:
|
|
@@ -411,7 +436,7 @@ async function agentTurn(prompt: string) {
|
|
|
411
436
|
}
|
|
412
437
|
```
|
|
413
438
|
|
|
414
|
-
> See [`examples/pr-review-
|
|
439
|
+
> See [`examples/pr-review-agent`](../../examples/pr-review-agent) for a complete PR review agent built with Chat SDK and Vercel Workflow.
|
|
415
440
|
|
|
416
441
|
All presets (`code-review`, `issue-triage`, `ci-ops`, `repo-explorer`, `maintainer`) work with `createDurableGithubAgent`. Options mirror `createGithubAgent` with additional pass-through for `DurableAgentOptions` fields like `experimental_telemetry`, `onStepFinish`, `onFinish`, and `prepareStep`.
|
|
417
442
|
|