@loopstack/github-module 0.4.1 → 0.4.3
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 +261 -80
- package/dist/tools/actions/github-get-workflow-run.tool.d.ts +2 -2
- package/dist/tools/actions/github-get-workflow-run.tool.d.ts.map +1 -1
- package/dist/tools/actions/github-get-workflow-run.tool.js.map +1 -1
- package/dist/tools/actions/github-list-workflow-runs.tool.d.ts +2 -2
- package/dist/tools/actions/github-list-workflow-runs.tool.d.ts.map +1 -1
- package/dist/tools/actions/github-list-workflow-runs.tool.js.map +1 -1
- package/dist/tools/actions/github-trigger-workflow.tool.d.ts +2 -2
- package/dist/tools/actions/github-trigger-workflow.tool.d.ts.map +1 -1
- package/dist/tools/actions/github-trigger-workflow.tool.js.map +1 -1
- package/dist/tools/content/github-create-or-update-file.tool.d.ts +2 -2
- package/dist/tools/content/github-create-or-update-file.tool.d.ts.map +1 -1
- package/dist/tools/content/github-create-or-update-file.tool.js.map +1 -1
- package/dist/tools/content/github-get-commit.tool.d.ts +2 -2
- package/dist/tools/content/github-get-commit.tool.d.ts.map +1 -1
- package/dist/tools/content/github-get-commit.tool.js.map +1 -1
- package/dist/tools/content/github-get-file-content.tool.d.ts +2 -2
- package/dist/tools/content/github-get-file-content.tool.d.ts.map +1 -1
- package/dist/tools/content/github-get-file-content.tool.js.map +1 -1
- package/dist/tools/content/github-list-directory.tool.d.ts +2 -2
- package/dist/tools/content/github-list-directory.tool.d.ts.map +1 -1
- package/dist/tools/content/github-list-directory.tool.js.map +1 -1
- package/dist/tools/issues/github-create-issue-comment.tool.d.ts +2 -2
- package/dist/tools/issues/github-create-issue-comment.tool.d.ts.map +1 -1
- package/dist/tools/issues/github-create-issue-comment.tool.js.map +1 -1
- package/dist/tools/issues/github-create-issue.tool.d.ts +2 -2
- package/dist/tools/issues/github-create-issue.tool.d.ts.map +1 -1
- package/dist/tools/issues/github-create-issue.tool.js.map +1 -1
- package/dist/tools/issues/github-get-issue.tool.d.ts +2 -2
- package/dist/tools/issues/github-get-issue.tool.d.ts.map +1 -1
- package/dist/tools/issues/github-get-issue.tool.js.map +1 -1
- package/dist/tools/issues/github-list-issues.tool.d.ts +2 -2
- package/dist/tools/issues/github-list-issues.tool.d.ts.map +1 -1
- package/dist/tools/issues/github-list-issues.tool.js.map +1 -1
- package/dist/tools/pull-requests/github-create-pull-request.tool.d.ts +2 -2
- package/dist/tools/pull-requests/github-create-pull-request.tool.d.ts.map +1 -1
- package/dist/tools/pull-requests/github-create-pull-request.tool.js.map +1 -1
- package/dist/tools/pull-requests/github-get-pull-request.tool.d.ts +2 -2
- package/dist/tools/pull-requests/github-get-pull-request.tool.d.ts.map +1 -1
- package/dist/tools/pull-requests/github-get-pull-request.tool.js.map +1 -1
- package/dist/tools/pull-requests/github-list-pr-reviews.tool.d.ts +2 -2
- package/dist/tools/pull-requests/github-list-pr-reviews.tool.d.ts.map +1 -1
- package/dist/tools/pull-requests/github-list-pr-reviews.tool.js.map +1 -1
- package/dist/tools/pull-requests/github-list-pull-requests.tool.d.ts +2 -2
- package/dist/tools/pull-requests/github-list-pull-requests.tool.d.ts.map +1 -1
- package/dist/tools/pull-requests/github-list-pull-requests.tool.js.map +1 -1
- package/dist/tools/pull-requests/github-merge-pull-request.tool.d.ts +2 -2
- package/dist/tools/pull-requests/github-merge-pull-request.tool.d.ts.map +1 -1
- package/dist/tools/pull-requests/github-merge-pull-request.tool.js.map +1 -1
- package/dist/tools/repos/github-create-repo.tool.d.ts +2 -2
- package/dist/tools/repos/github-create-repo.tool.d.ts.map +1 -1
- package/dist/tools/repos/github-create-repo.tool.js.map +1 -1
- package/dist/tools/repos/github-get-repo.tool.d.ts +2 -2
- package/dist/tools/repos/github-get-repo.tool.d.ts.map +1 -1
- package/dist/tools/repos/github-get-repo.tool.js.map +1 -1
- package/dist/tools/repos/github-list-branches.tool.d.ts +2 -2
- package/dist/tools/repos/github-list-branches.tool.d.ts.map +1 -1
- package/dist/tools/repos/github-list-branches.tool.js.map +1 -1
- package/dist/tools/repos/github-list-repos.tool.d.ts +2 -2
- package/dist/tools/repos/github-list-repos.tool.d.ts.map +1 -1
- package/dist/tools/repos/github-list-repos.tool.js.map +1 -1
- package/dist/tools/search/github-search-code.tool.d.ts +2 -2
- package/dist/tools/search/github-search-code.tool.d.ts.map +1 -1
- package/dist/tools/search/github-search-code.tool.js.map +1 -1
- package/dist/tools/search/github-search-issues.tool.d.ts +2 -2
- package/dist/tools/search/github-search-issues.tool.d.ts.map +1 -1
- package/dist/tools/search/github-search-issues.tool.js.map +1 -1
- package/dist/tools/search/github-search-repos.tool.d.ts +2 -2
- package/dist/tools/search/github-search-repos.tool.d.ts.map +1 -1
- package/dist/tools/search/github-search-repos.tool.js.map +1 -1
- package/dist/tools/users/github-get-authenticated-user.tool.d.ts +2 -2
- package/dist/tools/users/github-get-authenticated-user.tool.d.ts.map +1 -1
- package/dist/tools/users/github-get-authenticated-user.tool.js.map +1 -1
- package/dist/tools/users/github-list-user-orgs.tool.d.ts +2 -2
- package/dist/tools/users/github-list-user-orgs.tool.d.ts.map +1 -1
- package/dist/tools/users/github-list-user-orgs.tool.js.map +1 -1
- package/package.json +5 -6
package/README.md
CHANGED
|
@@ -1,33 +1,162 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
title: GitHub Module
|
|
3
|
+
description: GitHub OAuth provider and 25 API tools for Loopstack workflows — GitHubModule, GitHubOAuthProvider, OAuthProviderInterface, repositories, issues, pull requests, actions, content/git ops, search, users/orgs. Covers installation, tool args, auth pattern, and env vars.
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# @loopstack/github-module
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
> GitHub integration module for the [Loopstack](https://loopstack.ai) automation framework.
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
Provides a GitHub OAuth 2.0 provider and 25 tools for interacting with the GitHub API. The module registers a GitHub OAuth provider with `@loopstack/oauth-module` so workflows can authenticate users and then call GitHub tools for repositories, issues, pull requests, file content, actions, search, and user/org data.
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
## When to Use
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
- You need to **authenticate users via GitHub OAuth** and call GitHub APIs from workflows
|
|
15
|
+
- You want to **manage repositories, issues, and pull requests** programmatically (list, create, merge)
|
|
16
|
+
- You need to **read or write file content**, browse directories, or inspect commits in GitHub repos
|
|
17
|
+
- You want to **trigger and monitor GitHub Actions** workflow runs, or **search** code/repos/issues across GitHub
|
|
12
18
|
|
|
13
|
-
-
|
|
14
|
-
- Manage repositories, branches, issues, and pull requests programmatically
|
|
15
|
-
- Read and write file content, list directories, and inspect commits
|
|
16
|
-
- Trigger and monitor GitHub Actions workflow runs
|
|
17
|
-
- Search code, repositories, and issues across GitHub
|
|
18
|
-
- Access user profiles and organization memberships
|
|
19
|
+
Use `@loopstack/git-module` instead if you need local Git operations (commit, push, branch) on a cloned repository.
|
|
19
20
|
|
|
20
21
|
## Installation
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
```bash
|
|
24
|
+
npm install @loopstack/github-module @loopstack/oauth-module
|
|
25
|
+
```
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
Import `GitHubModule` in your module. It automatically imports `OAuthModule` and registers the GitHub OAuth provider on startup:
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
import { Module } from '@nestjs/common';
|
|
31
|
+
import { GitHubModule } from '@loopstack/github-module';
|
|
32
|
+
|
|
33
|
+
@Module({
|
|
34
|
+
imports: [GitHubModule],
|
|
35
|
+
providers: [MyWorkflow],
|
|
36
|
+
exports: [MyWorkflow],
|
|
37
|
+
})
|
|
38
|
+
export class MyModule {}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Set the required environment variables:
|
|
42
|
+
|
|
43
|
+
```env
|
|
44
|
+
GITHUB_CLIENT_ID=your_client_id
|
|
45
|
+
GITHUB_CLIENT_SECRET=your_client_secret
|
|
46
|
+
GITHUB_OAUTH_REDIRECT_URI=/oauth/callback
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Quick Start
|
|
50
|
+
|
|
51
|
+
### Agent workflow
|
|
52
|
+
|
|
53
|
+
The fastest way to use GitHub tools is through `AgentWorkflow` — pass tool names as strings and let the LLM call them on demand:
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
import { AgentWorkflow } from '@loopstack/agent';
|
|
57
|
+
import { BaseWorkflow, Transition, Workflow } from '@loopstack/common';
|
|
58
|
+
|
|
59
|
+
@Workflow({ title: 'GitHub Assistant' })
|
|
60
|
+
export class GitHubAssistantWorkflow extends BaseWorkflow {
|
|
61
|
+
constructor(private readonly agent: AgentWorkflow) {
|
|
62
|
+
super();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@Transition({ to: 'chatting' })
|
|
66
|
+
async start(state: Record<string, unknown>): Promise<Record<string, unknown>> {
|
|
67
|
+
await this.agent.run(
|
|
68
|
+
{
|
|
69
|
+
system: 'You are a GitHub assistant. Help the user manage repos, issues, PRs, and actions.',
|
|
70
|
+
tools: [
|
|
71
|
+
'github_get_authenticated_user',
|
|
72
|
+
'github_list_repos',
|
|
73
|
+
'github_get_repo',
|
|
74
|
+
'github_list_issues',
|
|
75
|
+
'github_create_issue',
|
|
76
|
+
'github_list_pull_requests',
|
|
77
|
+
'github_get_pull_request',
|
|
78
|
+
'github_list_workflow_runs',
|
|
79
|
+
'github_search_code',
|
|
80
|
+
],
|
|
81
|
+
userMessage: 'List my five most recently updated repositories.',
|
|
82
|
+
},
|
|
83
|
+
{ callback: { transition: 'agentDone' }, show: 'inline', label: 'Working...' },
|
|
84
|
+
);
|
|
85
|
+
return state;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Every GitHub tool returns `{ error: 'unauthorized' }` when no valid token is available, so the agent loop can detect missing auth and trigger the OAuth flow as a sub-workflow when needed.
|
|
91
|
+
|
|
92
|
+
### Structured workflow with explicit OAuth
|
|
93
|
+
|
|
94
|
+
For full control over the auth flow, inject the individual tools and `OAuthWorkflow`. When a tool returns `error: 'unauthorized'`, launch the OAuth sub-workflow so the user can sign in, then retry.
|
|
95
|
+
|
|
96
|
+
```typescript
|
|
97
|
+
import { z } from 'zod';
|
|
98
|
+
import { BaseWorkflow, CallbackSchema, Guard, Transition, Workflow } from '@loopstack/common';
|
|
99
|
+
import type { RunContext } from '@loopstack/common';
|
|
100
|
+
import { GitHubGetAuthenticatedUserTool, GitHubListReposTool } from '@loopstack/github-module';
|
|
101
|
+
import { OAuthWorkflow } from '@loopstack/oauth-module';
|
|
102
|
+
|
|
103
|
+
interface State {
|
|
104
|
+
requiresAuth?: boolean;
|
|
105
|
+
repos?: Array<{ fullName: string; htmlUrl: string }>;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@Workflow({
|
|
109
|
+
name: 'my_github_workflow',
|
|
110
|
+
title: 'My GitHub Workflow',
|
|
111
|
+
schema: z.object({}).strict(),
|
|
112
|
+
})
|
|
113
|
+
export class MyGitHubWorkflow extends BaseWorkflow<Record<string, unknown>, State> {
|
|
114
|
+
constructor(
|
|
115
|
+
private readonly gitHubGetAuthenticatedUser: GitHubGetAuthenticatedUserTool,
|
|
116
|
+
private readonly gitHubListRepos: GitHubListReposTool,
|
|
117
|
+
private readonly oAuthWorkflow: OAuthWorkflow,
|
|
118
|
+
) {
|
|
119
|
+
super();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@Transition({ to: 'user_checked' })
|
|
123
|
+
async checkUser(state: State): Promise<State> {
|
|
124
|
+
const result = await this.gitHubGetAuthenticatedUser.call();
|
|
125
|
+
return { ...state, requiresAuth: result.data!.error === 'unauthorized' };
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@Transition({ from: 'user_checked', to: 'awaiting_auth', priority: 10 })
|
|
129
|
+
@Guard('needsAuth')
|
|
130
|
+
async startAuth(state: State): Promise<State> {
|
|
131
|
+
await this.oAuthWorkflow.run(
|
|
132
|
+
{ provider: 'github', scopes: ['repo', 'read:org', 'workflow'] },
|
|
133
|
+
{ callback: { transition: 'authCompleted' }, show: 'inline', label: 'GitHub authentication required' },
|
|
134
|
+
);
|
|
135
|
+
return state;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
needsAuth(state: State): boolean {
|
|
139
|
+
return !!state.requiresAuth;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@Transition({ from: 'awaiting_auth', to: 'start', wait: true, schema: CallbackSchema })
|
|
143
|
+
async authCompleted(state: State): Promise<State> {
|
|
144
|
+
return state;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@Transition({ from: 'user_checked', to: 'end' })
|
|
148
|
+
async listRepos(state: State): Promise<State> {
|
|
149
|
+
const result = await this.gitHubListRepos.call({ sort: 'updated', perPage: 10 });
|
|
150
|
+
return { ...state, repos: result.data!.repos };
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
25
154
|
|
|
26
155
|
## How It Works
|
|
27
156
|
|
|
28
157
|
### Provider Registration
|
|
29
158
|
|
|
30
|
-
|
|
159
|
+
`GitHubOAuthProvider` implements `OAuthProviderInterface` and `OnModuleInit`. On startup it registers itself with the `OAuthProviderRegistry`:
|
|
31
160
|
|
|
32
161
|
```typescript
|
|
33
162
|
onModuleInit(): void {
|
|
@@ -35,9 +164,7 @@ onModuleInit(): void {
|
|
|
35
164
|
}
|
|
36
165
|
```
|
|
37
166
|
|
|
38
|
-
After registration, the generic `OAuthWorkflow` from `@loopstack/oauth-module`
|
|
39
|
-
|
|
40
|
-
### Provider Details
|
|
167
|
+
After registration, the generic `OAuthWorkflow` from `@loopstack/oauth-module` handles authentication for `provider: 'github'` automatically.
|
|
41
168
|
|
|
42
169
|
| Property | Value |
|
|
43
170
|
| --------------- | --------------------------------------------- |
|
|
@@ -46,103 +173,157 @@ After registration, the generic `OAuthWorkflow` from `@loopstack/oauth-module` c
|
|
|
46
173
|
| Auth endpoint | `https://github.com/login/oauth/authorize` |
|
|
47
174
|
| Token endpoint | `https://github.com/login/oauth/access_token` |
|
|
48
175
|
|
|
49
|
-
>
|
|
176
|
+
> GitHub OAuth tokens do not expire and do not support refresh. The `refreshToken()` method throws an error.
|
|
50
177
|
|
|
51
|
-
###
|
|
178
|
+
### Authentication Pattern
|
|
179
|
+
|
|
180
|
+
There is no dedicated authentication tool — authentication is triggered at the workflow level when any tool returns `{ error: 'unauthorized' }`. All 25 tools follow the same pattern: they read the user's stored OAuth token via `OAuthTokenStore.getValidAccessToken(ctx.userId, 'github')`. If no token exists, they return `{ error: 'unauthorized' }` instead of throwing. Your workflow checks for this error and launches `OAuthWorkflow` with `provider: 'github'` as a sub-workflow:
|
|
52
181
|
|
|
53
|
-
```env
|
|
54
|
-
GITHUB_CLIENT_ID=your_client_id
|
|
55
|
-
GITHUB_CLIENT_SECRET=your_client_secret
|
|
56
|
-
GITHUB_OAUTH_REDIRECT_URI=/oauth/callback
|
|
57
182
|
```
|
|
183
|
+
start --> checkUser --> [needsAuth?] --> startAuth --> awaiting_auth
|
|
184
|
+
\ |
|
|
185
|
+
\ authCompleted
|
|
186
|
+
\ |
|
|
187
|
+
+----> listRepos --> end <----- (retries from start)
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Tool Resolution
|
|
58
191
|
|
|
59
|
-
|
|
192
|
+
Tools are NestJS providers resolved by their `@Tool({ name })` value from the DI container. Inject the tool class into your workflow constructor and call it with `.call(args)` or `.call(args, options)`.
|
|
193
|
+
|
|
194
|
+
## Tools Reference
|
|
195
|
+
|
|
196
|
+
All tools return `{ error: string, message: string }` when authentication fails or the GitHub API returns an error.
|
|
60
197
|
|
|
61
198
|
### Repositories
|
|
62
199
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
200
|
+
| Tool name | Description | Args | Return |
|
|
201
|
+
| ---------------------- | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
202
|
+
| `github_list_repos` | Lists repositories for the authenticated user | `visibility?` (`'all'`\|`'public'`\|`'private'`, default `'all'`), `sort?` (`'created'`\|`'updated'`\|`'pushed'`\|`'full_name'`, default `'updated'`), `perPage?` (default 30), `page?` (default 1) | `{ repos: [{ id, fullName, name, owner, private, htmlUrl, description, language, defaultBranch, updatedAt }] }` |
|
|
203
|
+
| `github_get_repo` | Gets detailed repo information | `owner`, `repo` | `{ repo: { id, fullName, name, owner, ownerAvatar, private, htmlUrl, description, language, defaultBranch, stars, forks, openIssues, createdAt, updatedAt, topics, license } }` |
|
|
204
|
+
| `github_create_repo` | Creates a new repository | `name`, `description?`, `private?` (default false), `autoInit?` (default false) | `{ repo: { id, fullName, name, htmlUrl, private, defaultBranch } }` |
|
|
205
|
+
| `github_list_branches` | Lists branches for a repository | `owner`, `repo`, `perPage?` (default 30) | `{ branches: [{ name, commitSha, protected }] }` |
|
|
67
206
|
|
|
68
207
|
### Issues
|
|
69
208
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
209
|
+
| Tool name | Description | Args | Return |
|
|
210
|
+
| ----------------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
211
|
+
| `github_list_issues` | Lists issues for a repository | `owner`, `repo`, `state?` (`'open'`\|`'closed'`\|`'all'`, default `'open'`), `labels?`, `assignee?`, `perPage?` (default 30), `page?` (default 1) | `{ issues: [{ id, number, title, state, user, labels, assignees, createdAt, updatedAt, htmlUrl, isPullRequest }] }` |
|
|
212
|
+
| `github_get_issue` | Gets detailed issue information | `owner`, `repo`, `issueNumber` | `{ issue: { id, number, title, body, state, user, labels, assignees, milestone, createdAt, updatedAt, closedAt, htmlUrl, comments } }` |
|
|
213
|
+
| `github_create_issue` | Creates a new issue | `owner`, `repo`, `title`, `body?`, `labels?` (string[]), `assignees?` (string[]) | `{ issue: { id, number, title, htmlUrl, state } }` |
|
|
214
|
+
| `github_create_issue_comment` | Comments on an issue or pull request | `owner`, `repo`, `issueNumber`, `body` | `{ comment: { id, htmlUrl, createdAt, user } }` |
|
|
74
215
|
|
|
75
216
|
### Pull Requests
|
|
76
217
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
218
|
+
| Tool name | Description | Args | Return |
|
|
219
|
+
| ---------------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
220
|
+
| `github_list_pull_requests` | Lists pull requests for a repository | `owner`, `repo`, `state?` (`'open'`\|`'closed'`\|`'all'`, default `'open'`), `base?`, `perPage?` (default 30), `page?` (default 1) | `{ pullRequests: [{ id, number, title, state, user, head, headSha, base, createdAt, updatedAt, htmlUrl, draft }] }` |
|
|
221
|
+
| `github_get_pull_request` | Gets detailed pull request information | `owner`, `repo`, `pullNumber` | `{ pullRequest: { id, number, title, body, state, user, head, headSha, base, merged, mergeable, draft, additions, deletions, changedFiles, createdAt, updatedAt, mergedAt, htmlUrl, comments, reviewComments } }` |
|
|
222
|
+
| `github_create_pull_request` | Creates a new pull request | `owner`, `repo`, `title`, `head`, `base`, `body?`, `draft?` (default false) | `{ pullRequest: { id, number, title, htmlUrl, state, draft } }` |
|
|
223
|
+
| `github_merge_pull_request` | Merges a pull request | `owner`, `repo`, `pullNumber`, `mergeMethod?` (`'merge'`\|`'squash'`\|`'rebase'`, default `'merge'`), `commitTitle?`, `commitMessage?` | `{ merge: { sha, merged, message } }` |
|
|
224
|
+
| `github_list_pr_reviews` | Lists reviews on a pull request | `owner`, `repo`, `pullNumber` | `{ reviews: [{ id, user, body, state, submittedAt, htmlUrl }] }` |
|
|
82
225
|
|
|
83
226
|
### Content / Git Ops
|
|
84
227
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
-
|
|
88
|
-
|
|
228
|
+
| Tool name | Description | Args | Return |
|
|
229
|
+
| ------------------------------ | --------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
230
|
+
| `github_get_file_content` | Gets file content (base64-decoded) | `owner`, `repo`, `path`, `ref?` | `{ file: { name, path, sha, size, type, content, htmlUrl } }` |
|
|
231
|
+
| `github_create_or_update_file` | Creates or updates a file (provide `sha` to update) | `owner`, `repo`, `path`, `content` (plain text), `message` (commit message), `sha?`, `branch?` | `{ file: { name, path, sha, htmlUrl }, commit: { sha, message } }` |
|
|
232
|
+
| `github_list_directory` | Lists directory contents | `owner`, `repo`, `path?` (default `''`), `ref?` | `{ entries: [{ name, path, sha, size, type, htmlUrl }] }` |
|
|
233
|
+
| `github_get_commit` | Gets commit details with file stats | `owner`, `repo`, `ref` | `{ commit: { sha, message, author: { name, email, date, login }, committer: { name, date }, htmlUrl, stats: { additions, deletions, total }, files: [{ filename, status, additions, deletions, changes }] } }` |
|
|
89
234
|
|
|
90
235
|
### Actions
|
|
91
236
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
237
|
+
| Tool name | Description | Args | Return |
|
|
238
|
+
| --------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
239
|
+
| `github_list_workflow_runs` | Lists workflow runs | `owner`, `repo`, `branch?`, `status?` (enum), `perPage?` (default 30), `page?` (default 1) | `{ totalCount, runs: [{ id, name, status, conclusion, headBranch, headSha, event, createdAt, updatedAt, htmlUrl }] }` |
|
|
240
|
+
| `github_trigger_workflow` | Triggers a workflow dispatch event | `owner`, `repo`, `workflowId` (string), `ref`, `inputs?` (Record<string, string>) | `{ triggered: true, message }` |
|
|
241
|
+
| `github_get_workflow_run` | Gets workflow run details | `owner`, `repo`, `runId` (number) | `{ run: { id, name, status, conclusion, headBranch, headSha, event, workflowId, runNumber, runAttempt, createdAt, updatedAt, runStartedAt, htmlUrl } }` |
|
|
95
242
|
|
|
96
243
|
### Search
|
|
97
244
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
245
|
+
| Tool name | Description | Args | Return |
|
|
246
|
+
| ---------------------- | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
247
|
+
| `github_search_code` | Searches code across repositories | `query`, `perPage?` (default 30), `page?` (default 1) | `{ totalCount, results: [{ name, path, sha, htmlUrl, repository }] }` |
|
|
248
|
+
| `github_search_repos` | Searches repositories | `query`, `sort?` (`'stars'`\|`'forks'`\|`'help-wanted-issues'`\|`'updated'`), `perPage?` (default 30), `page?` (default 1) | `{ totalCount, results: [{ id, fullName, description, htmlUrl, language, stars, forks, updatedAt }] }` |
|
|
249
|
+
| `github_search_issues` | Searches issues and pull requests | `query`, `sort?` (`'comments'`\|`'reactions'`\|`'created'`\|`'updated'`\|...), `perPage?` (default 30), `page?` (default 1) | `{ totalCount, results: [{ id, number, title, state, user, htmlUrl, createdAt, updatedAt, isPullRequest }] }` |
|
|
101
250
|
|
|
102
251
|
### Users & Orgs
|
|
103
252
|
|
|
104
|
-
|
|
105
|
-
|
|
253
|
+
| Tool name | Description | Args | Return |
|
|
254
|
+
| ------------------------------- | -------------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
255
|
+
| `github_get_authenticated_user` | Gets the authenticated user's profile | _(none)_ | `{ user: { id, login, name, email, avatarUrl, htmlUrl, bio, publicRepos, followers, following, createdAt } }` |
|
|
256
|
+
| `github_list_user_orgs` | Lists the authenticated user's organizations | `perPage?` (default 30) | `{ orgs: [{ id, login, description, avatarUrl }] }` |
|
|
106
257
|
|
|
107
|
-
##
|
|
258
|
+
## Configuration
|
|
108
259
|
|
|
109
|
-
|
|
260
|
+
| Variable | Required | Description |
|
|
261
|
+
| --------------------------- | -------- | -------------------------------------------- |
|
|
262
|
+
| `GITHUB_CLIENT_ID` | Yes | GitHub OAuth App client ID |
|
|
263
|
+
| `GITHUB_CLIENT_SECRET` | Yes | GitHub OAuth App client secret |
|
|
264
|
+
| `GITHUB_OAUTH_REDIRECT_URI` | No | Redirect URI (defaults to `/oauth/callback`) |
|
|
110
265
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
{ id: `link_${result.workflowId}` },
|
|
129
|
-
);
|
|
130
|
-
```
|
|
266
|
+
Create a GitHub OAuth App at [github.com/settings/developers](https://github.com/settings/developers) to obtain client credentials.
|
|
267
|
+
|
|
268
|
+
## Public API
|
|
269
|
+
|
|
270
|
+
**Module**
|
|
271
|
+
|
|
272
|
+
- `GitHubModule` -- NestJS module; imports `OAuthModule`, provides and exports all tools and the provider
|
|
273
|
+
|
|
274
|
+
**Provider**
|
|
275
|
+
|
|
276
|
+
- `GitHubOAuthProvider` -- implements `OAuthProviderInterface`, self-registers with `OAuthProviderRegistry`
|
|
277
|
+
|
|
278
|
+
**Tools -- Repositories**
|
|
279
|
+
|
|
280
|
+
- `GitHubListReposTool`, `GitHubGetRepoTool`, `GitHubCreateRepoTool`, `GitHubListBranchesTool`
|
|
281
|
+
|
|
282
|
+
**Tools -- Issues**
|
|
131
283
|
|
|
132
|
-
|
|
284
|
+
- `GitHubListIssuesTool`, `GitHubGetIssueTool`, `GitHubCreateIssueTool`, `GitHubCreateIssueCommentTool`
|
|
285
|
+
|
|
286
|
+
**Tools -- Pull Requests**
|
|
287
|
+
|
|
288
|
+
- `GitHubListPullRequestsTool`, `GitHubGetPullRequestTool`, `GitHubCreatePullRequestTool`, `GitHubMergePullRequestTool`, `GitHubListPrReviewsTool`
|
|
289
|
+
|
|
290
|
+
**Tools -- Content / Git Ops**
|
|
291
|
+
|
|
292
|
+
- `GitHubGetFileContentTool`, `GitHubCreateOrUpdateFileTool`, `GitHubListDirectoryTool`, `GitHubGetCommitTool`
|
|
293
|
+
|
|
294
|
+
**Tools -- Actions**
|
|
295
|
+
|
|
296
|
+
- `GitHubListWorkflowRunsTool`, `GitHubTriggerWorkflowTool`, `GitHubGetWorkflowRunTool`
|
|
297
|
+
|
|
298
|
+
**Tools -- Search**
|
|
299
|
+
|
|
300
|
+
- `GitHubSearchCodeTool`, `GitHubSearchReposTool`, `GitHubSearchIssuesTool`
|
|
301
|
+
|
|
302
|
+
**Tools -- Users & Orgs**
|
|
303
|
+
|
|
304
|
+
- `GitHubGetAuthenticatedUserTool`, `GitHubListUserOrgsTool`
|
|
305
|
+
|
|
306
|
+
**Types** (exported per tool)
|
|
307
|
+
|
|
308
|
+
- `GitHub*Args`, `GitHub*Result` -- Zod-inferred arg types and result types for each tool
|
|
133
309
|
|
|
134
310
|
## Dependencies
|
|
135
311
|
|
|
136
|
-
|
|
312
|
+
| Package | Role |
|
|
313
|
+
| ------------------------- | ------------------------------------------------------------------------------------- |
|
|
314
|
+
| `@loopstack/common` | Base classes (`BaseTool`, `Tool`, `Workflow`, `Transition`), documents, context types |
|
|
315
|
+
| `@loopstack/oauth-module` | `OAuthProviderRegistry`, `OAuthProviderInterface`, `OAuthTokenStore`, `OAuthWorkflow` |
|
|
316
|
+
| `zod` | Schema definitions for tool args |
|
|
317
|
+
|
|
318
|
+
## Related
|
|
319
|
+
|
|
320
|
+
- [OAuth Authentication](https://loopstack.ai/docs/build/integrations/oauth) -- how to use `OAuthWorkflow` as a sub-workflow, token management, and the guard-based auth pattern
|
|
321
|
+
- [`@loopstack/oauth-module`](https://loopstack.ai/docs/registry/features/oauth-module) -- the provider-agnostic OAuth framework this module plugs into
|
|
322
|
+
- [`@loopstack/github-oauth-example`](https://loopstack.ai/docs/registry/examples/github-oauth-example) -- full example with a repo overview workflow and a GitHub chat agent using all 25 tools
|
|
323
|
+
- [`@loopstack/git-module`](https://loopstack.ai/docs/registry/features/git-module) -- local Git operations (commit, push, branch, diff) for cloned repositories
|
|
137
324
|
|
|
138
325
|
## About
|
|
139
326
|
|
|
140
327
|
Author: [Jakob Klippel](https://www.linkedin.com/in/jakob-klippel/)
|
|
141
328
|
|
|
142
329
|
License: MIT
|
|
143
|
-
|
|
144
|
-
### Additional Resources
|
|
145
|
-
|
|
146
|
-
- [Loopstack Documentation](https://loopstack.ai/docs)
|
|
147
|
-
- [Getting Started with Loopstack](https://loopstack.ai/docs/getting-started)
|
|
148
|
-
- For more examples see the [Loopstack Registry](https://loopstack.ai/registry)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { BaseTool, ToolResult } from '@loopstack/common';
|
|
3
|
-
import type {
|
|
3
|
+
import type { RunContext } from '@loopstack/common';
|
|
4
4
|
declare const inputSchema: z.ZodObject<{
|
|
5
5
|
owner: z.ZodString;
|
|
6
6
|
repo: z.ZodString;
|
|
@@ -31,7 +31,7 @@ export type GitHubGetWorkflowRunResult = {
|
|
|
31
31
|
export declare class GitHubGetWorkflowRunTool extends BaseTool<GitHubGetWorkflowRunArgs, object, GitHubGetWorkflowRunResult> {
|
|
32
32
|
private readonly logger;
|
|
33
33
|
private tokenStore;
|
|
34
|
-
protected handle(args: GitHubGetWorkflowRunArgs, ctx:
|
|
34
|
+
protected handle(args: GitHubGetWorkflowRunArgs, ctx: RunContext): Promise<ToolResult<GitHubGetWorkflowRunResult>>;
|
|
35
35
|
}
|
|
36
36
|
export {};
|
|
37
37
|
//# sourceMappingURL=github-get-workflow-run.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-get-workflow-run.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/actions/github-get-workflow-run.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAQ,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"github-get-workflow-run.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/actions/github-get-workflow-run.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAQ,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,QAAA,MAAM,WAAW;;;;kBAMN,CAAC;AAEZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEnE,MAAM,MAAM,0BAA0B,GAClC;IACE,GAAG,EAAE;QACH,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAC1B,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,YAAY,EAAE,MAAM,CAAC;QACrB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,GACD;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvC,qBAMa,wBAAyB,SAAQ,QAAQ,CAAC,wBAAwB,EAAE,MAAM,EAAE,0BAA0B,CAAC;IAClH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6C;IAGpE,OAAO,CAAC,UAAU,CAAkB;cAEpB,MAAM,CACpB,IAAI,EAAE,wBAAwB,EAC9B,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC;CAgFnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-get-workflow-run.tool.js","sourceRoot":"","sources":["../../../src/tools/actions/github-get-workflow-run.tool.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAc,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,WAAW,GAAG,CAAC;KAClB,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC;KACD,MAAM,EAAE,CAAC;AA+BL,IAAM,wBAAwB,gCAA9B,MAAM,wBAAyB,SAAQ,QAAsE;IACjG,MAAM,GAAG,IAAI,MAAM,CAAC,0BAAwB,CAAC,IAAI,CAAC,CAAC;IAG5D,UAAU,CAAkB;IAE1B,KAAK,CAAC,MAAM,CACpB,IAA8B,EAC9B,
|
|
1
|
+
{"version":3,"file":"github-get-workflow-run.tool.js","sourceRoot":"","sources":["../../../src/tools/actions/github-get-workflow-run.tool.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAc,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,WAAW,GAAG,CA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IAA2I;QAC7I,MAAM,EAAE,WAAW;KACpB,CAAC;GACW,wBAAwB,CAyFpC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { BaseTool, ToolResult } from '@loopstack/common';
|
|
3
|
-
import type {
|
|
3
|
+
import type { RunContext } from '@loopstack/common';
|
|
4
4
|
declare const inputSchema: z.ZodObject<{
|
|
5
5
|
owner: z.ZodString;
|
|
6
6
|
repo: z.ZodString;
|
|
@@ -45,7 +45,7 @@ export type GitHubListWorkflowRunsResult = {
|
|
|
45
45
|
export declare class GitHubListWorkflowRunsTool extends BaseTool<GitHubListWorkflowRunsArgs, object, GitHubListWorkflowRunsResult> {
|
|
46
46
|
private readonly logger;
|
|
47
47
|
private tokenStore;
|
|
48
|
-
protected handle(args: GitHubListWorkflowRunsArgs, ctx:
|
|
48
|
+
protected handle(args: GitHubListWorkflowRunsArgs, ctx: RunContext): Promise<ToolResult<GitHubListWorkflowRunsResult>>;
|
|
49
49
|
}
|
|
50
50
|
export {};
|
|
51
51
|
//# sourceMappingURL=github-list-workflow-runs.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-list-workflow-runs.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/actions/github-list-workflow-runs.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAQ,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"github-list-workflow-runs.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/actions/github-list-workflow-runs.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAQ,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;kBA0BN,CAAC;AAEZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAErE,MAAM,MAAM,4BAA4B,GAAG;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAC1B,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,qBAMa,0BAA2B,SAAQ,QAAQ,CACtD,0BAA0B,EAC1B,MAAM,EACN,4BAA4B,CAC7B;IACC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA+C;IAGtE,OAAO,CAAC,UAAU,CAAkB;cAEpB,MAAM,CACpB,IAAI,EAAE,0BAA0B,EAChC,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,UAAU,CAAC,4BAA4B,CAAC,CAAC;CAmFrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-list-workflow-runs.tool.js","sourceRoot":"","sources":["../../../src/tools/actions/github-list-workflow-runs.tool.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAc,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,WAAW,GAAG,CAAC;KAClB,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,MAAM,EAAE,CAAC;SACN,IAAI,CAAC;QACJ,WAAW;QACX,iBAAiB;QACjB,WAAW;QACX,SAAS;QACT,SAAS;QACT,SAAS;QACT,OAAO;QACP,SAAS;QACT,WAAW;QACX,aAAa;QACb,QAAQ;QACR,WAAW;QACX,SAAS;QACT,SAAS;KACV,CAAC;SACD,QAAQ,EAAE;IACb,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;CAC5B,CAAC;KACD,MAAM,EAAE,CAAC;AA4BL,IAAM,0BAA0B,kCAAhC,MAAM,0BAA2B,SAAQ,QAI/C;IACkB,MAAM,GAAG,IAAI,MAAM,CAAC,4BAA0B,CAAC,IAAI,CAAC,CAAC;IAG9D,UAAU,CAAkB;IAE1B,KAAK,CAAC,MAAM,CACpB,IAAgC,EAChC,
|
|
1
|
+
{"version":3,"file":"github-list-workflow-runs.tool.js","sourceRoot":"","sources":["../../../src/tools/actions/github-list-workflow-runs.tool.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAc,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAA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F,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAclC,CAAC;QAEF,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YAC5C,EAAE,EAAE,GAAG,CAAC,EAAE;YACV,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,UAAU,EAAE,GAAG,CAAC,WAAW;YAC3B,OAAO,EAAE,GAAG,CAAC,QAAQ;YACrB,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,SAAS,EAAE,GAAG,CAAC,UAAU;YACzB,SAAS,EAAE,GAAG,CAAC,UAAU;YACzB,OAAO,EAAE,GAAG,CAAC,QAAQ;SACtB,CAAC,CAAC,CAAC;QAEJ,OAAO;YACL,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE;SAC7C,CAAC;IACJ,CAAC;CACF,CAAA;AAxFS;IADP,MAAM,EAAE;8BACW,eAAe;8DAAC;AARzB,0BAA0B;IANtC,IAAI,CAAC;QACJ,IAAI,EAAE,2BAA2B;QACjC,WAAW,EACT,gHAAgH;QAClH,MAAM,EAAE,WAAW;KACpB,CAAC;GACW,0BAA0B,CAgGtC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { BaseTool, ToolResult } from '@loopstack/common';
|
|
3
|
-
import type {
|
|
3
|
+
import type { RunContext } from '@loopstack/common';
|
|
4
4
|
declare const inputSchema: z.ZodObject<{
|
|
5
5
|
owner: z.ZodString;
|
|
6
6
|
repo: z.ZodString;
|
|
@@ -19,7 +19,7 @@ export type GitHubTriggerWorkflowResult = {
|
|
|
19
19
|
export declare class GitHubTriggerWorkflowTool extends BaseTool<GitHubTriggerWorkflowArgs, object, GitHubTriggerWorkflowResult> {
|
|
20
20
|
private readonly logger;
|
|
21
21
|
private tokenStore;
|
|
22
|
-
protected handle(args: GitHubTriggerWorkflowArgs, ctx:
|
|
22
|
+
protected handle(args: GitHubTriggerWorkflowArgs, ctx: RunContext): Promise<ToolResult<GitHubTriggerWorkflowResult>>;
|
|
23
23
|
}
|
|
24
24
|
export {};
|
|
25
25
|
//# sourceMappingURL=github-trigger-workflow.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-trigger-workflow.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/actions/github-trigger-workflow.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAQ,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"github-trigger-workflow.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/actions/github-trigger-workflow.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAQ,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,QAAA,MAAM,WAAW;;;;;;kBAQN,CAAC;AAEZ,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEpE,MAAM,MAAM,2BAA2B,GACnC;IACE,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB,GACD;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvC,qBAMa,yBAA0B,SAAQ,QAAQ,CACrD,yBAAyB,EACzB,MAAM,EACN,2BAA2B,CAC5B;IACC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8C;IAGrE,OAAO,CAAC,UAAU,CAAkB;cAEpB,MAAM,CACpB,IAAI,EAAE,yBAAyB,EAC/B,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC;CA0DpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-trigger-workflow.tool.js","sourceRoot":"","sources":["../../../src/tools/actions/github-trigger-workflow.tool.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAc,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,WAAW,GAAG,CAAC;KAClB,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACpD,CAAC;KACD,MAAM,EAAE,CAAC;AAiBL,IAAM,yBAAyB,iCAA/B,MAAM,yBAA0B,SAAQ,QAI9C;IACkB,MAAM,GAAG,IAAI,MAAM,CAAC,2BAAyB,CAAC,IAAI,CAAC,CAAC;IAG7D,UAAU,CAAkB;IAE1B,KAAK,CAAC,MAAM,CACpB,IAA+B,EAC/B,
|
|
1
|
+
{"version":3,"file":"github-trigger-workflow.tool.js","sourceRoot":"","sources":["../../../src/tools/actions/github-trigger-workflow.tool.ts"],"names":[],"mappings":";;;;;;;;;;AAA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aAC3D;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AA/DS;IADP,MAAM,EAAE;8BACW,eAAe;6DAAC;AARzB,yBAAyB;IANrC,IAAI,CAAC;QACJ,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EACT,yJAAyJ;QAC3J,MAAM,EAAE,WAAW;KACpB,CAAC;GACW,yBAAyB,CAuErC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { BaseTool, ToolResult } from '@loopstack/common';
|
|
3
|
-
import type {
|
|
3
|
+
import type { RunContext } from '@loopstack/common';
|
|
4
4
|
declare const inputSchema: z.ZodObject<{
|
|
5
5
|
owner: z.ZodString;
|
|
6
6
|
repo: z.ZodString;
|
|
@@ -29,7 +29,7 @@ export type GitHubCreateOrUpdateFileResult = {
|
|
|
29
29
|
export declare class GitHubCreateOrUpdateFileTool extends BaseTool<GitHubCreateOrUpdateFileArgs, object, GitHubCreateOrUpdateFileResult> {
|
|
30
30
|
private readonly logger;
|
|
31
31
|
private tokenStore;
|
|
32
|
-
protected handle(args: GitHubCreateOrUpdateFileArgs, ctx:
|
|
32
|
+
protected handle(args: GitHubCreateOrUpdateFileArgs, ctx: RunContext): Promise<ToolResult<GitHubCreateOrUpdateFileResult>>;
|
|
33
33
|
}
|
|
34
34
|
export {};
|
|
35
35
|
//# sourceMappingURL=github-create-or-update-file.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-create-or-update-file.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/content/github-create-or-update-file.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAQ,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"github-create-or-update-file.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/content/github-create-or-update-file.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAQ,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,QAAA,MAAM,WAAW;;;;;;;;kBAUN,CAAC;AAEZ,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEvE,MAAM,MAAM,8BAA8B,GACtC;IACE,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,MAAM,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,GACD;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvC,qBAMa,4BAA6B,SAAQ,QAAQ,CACxD,4BAA4B,EAC5B,MAAM,EACN,8BAA8B,CAC/B;IACC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiD;IAGxE,OAAO,CAAC,UAAU,CAAkB;cAEpB,MAAM,CACpB,IAAI,EAAE,4BAA4B,EAClC,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC;CAiFvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-create-or-update-file.tool.js","sourceRoot":"","sources":["../../../src/tools/content/github-create-or-update-file.tool.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAc,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,WAAW,GAAG,CAAC;KAClB,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC;KACD,MAAM,EAAE,CAAC;AAyBL,IAAM,4BAA4B,oCAAlC,MAAM,4BAA6B,SAAQ,QAIjD;IACkB,MAAM,GAAG,IAAI,MAAM,CAAC,8BAA4B,CAAC,IAAI,CAAC,CAAC;IAGhE,UAAU,CAAkB;IAE1B,KAAK,CAAC,MAAM,CACpB,IAAkC,EAClC,
|
|
1
|
+
{"version":3,"file":"github-create-or-update-file.tool.js","sourceRoot":"","sources":["../../../src/tools/content/github-create-or-update-file.tool.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAc,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,WAAW,GAAG,CAAC;KAClB,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,CAAC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ACD,MAAM,EAAE;oBACN,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG;oBACpB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO;iBAC7B;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAtFS;IADP,MAAM,EAAE;8BACW,eAAe;gEAAC;AARzB,4BAA4B;IANxC,IAAI,CAAC;QACJ,IAAI,EAAE,8BAA8B;QACpC,WAAW,EACT,qQAAqQ;QACvQ,MAAM,EAAE,WAAW;KACpB,CAAC;GACW,4BAA4B,CA8FxC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { BaseTool, ToolResult } from '@loopstack/common';
|
|
3
|
-
import type {
|
|
3
|
+
import type { RunContext } from '@loopstack/common';
|
|
4
4
|
declare const inputSchema: z.ZodObject<{
|
|
5
5
|
owner: z.ZodString;
|
|
6
6
|
repo: z.ZodString;
|
|
@@ -42,7 +42,7 @@ export type GitHubGetCommitResult = {
|
|
|
42
42
|
export declare class GitHubGetCommitTool extends BaseTool<GitHubGetCommitArgs, object, GitHubGetCommitResult> {
|
|
43
43
|
private readonly logger;
|
|
44
44
|
private tokenStore;
|
|
45
|
-
protected handle(args: GitHubGetCommitArgs, ctx:
|
|
45
|
+
protected handle(args: GitHubGetCommitArgs, ctx: RunContext): Promise<ToolResult<GitHubGetCommitResult>>;
|
|
46
46
|
}
|
|
47
47
|
export {};
|
|
48
48
|
//# sourceMappingURL=github-get-commit.tool.d.ts.map
|