@framers/agentos-ext-github 0.1.0 → 0.1.1

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.
Files changed (140) hide show
  1. package/LICENSE +96 -21
  2. package/dist/GitHubRepoIndexer.d.ts +88 -0
  3. package/dist/GitHubRepoIndexer.d.ts.map +1 -0
  4. package/dist/GitHubRepoIndexer.js +252 -0
  5. package/dist/GitHubRepoIndexer.js.map +1 -0
  6. package/dist/GitHubService.d.ts +58 -1
  7. package/dist/GitHubService.d.ts.map +1 -1
  8. package/dist/GitHubService.js +83 -1
  9. package/dist/GitHubService.js.map +1 -1
  10. package/dist/__tests__/fileAndBranchTools.test.d.ts +6 -0
  11. package/dist/__tests__/fileAndBranchTools.test.d.ts.map +1 -0
  12. package/dist/__tests__/fileAndBranchTools.test.js +310 -0
  13. package/dist/__tests__/fileAndBranchTools.test.js.map +1 -0
  14. package/dist/__tests__/indexer.test.d.ts +6 -0
  15. package/dist/__tests__/indexer.test.d.ts.map +1 -0
  16. package/dist/__tests__/indexer.test.js +239 -0
  17. package/dist/__tests__/indexer.test.js.map +1 -0
  18. package/dist/__tests__/issueTools.test.d.ts +5 -0
  19. package/dist/__tests__/issueTools.test.d.ts.map +1 -0
  20. package/dist/__tests__/issueTools.test.js +183 -0
  21. package/dist/__tests__/issueTools.test.js.map +1 -0
  22. package/dist/__tests__/prTools.test.d.ts +5 -0
  23. package/dist/__tests__/prTools.test.d.ts.map +1 -0
  24. package/dist/__tests__/prTools.test.js +318 -0
  25. package/dist/__tests__/prTools.test.js.map +1 -0
  26. package/dist/__tests__/releaseAndActionsTools.test.d.ts +6 -0
  27. package/dist/__tests__/releaseAndActionsTools.test.d.ts.map +1 -0
  28. package/dist/__tests__/releaseAndActionsTools.test.js +315 -0
  29. package/dist/__tests__/releaseAndActionsTools.test.js.map +1 -0
  30. package/dist/__tests__/repoTools.test.d.ts +6 -0
  31. package/dist/__tests__/repoTools.test.d.ts.map +1 -0
  32. package/dist/__tests__/repoTools.test.js +308 -0
  33. package/dist/__tests__/repoTools.test.js.map +1 -0
  34. package/dist/__tests__/service.test.d.ts +6 -0
  35. package/dist/__tests__/service.test.d.ts.map +1 -0
  36. package/dist/__tests__/service.test.js +173 -0
  37. package/dist/__tests__/service.test.js.map +1 -0
  38. package/dist/index.d.ts +41 -2
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +60 -1
  41. package/dist/index.js.map +1 -1
  42. package/dist/tools/actionsList.d.ts +48 -0
  43. package/dist/tools/actionsList.d.ts.map +1 -0
  44. package/dist/tools/actionsList.js +71 -0
  45. package/dist/tools/actionsList.js.map +1 -0
  46. package/dist/tools/actionsTrigger.d.ts +56 -0
  47. package/dist/tools/actionsTrigger.d.ts.map +1 -0
  48. package/dist/tools/actionsTrigger.js +62 -0
  49. package/dist/tools/actionsTrigger.js.map +1 -0
  50. package/dist/tools/branchCreate.d.ts +47 -0
  51. package/dist/tools/branchCreate.d.ts.map +1 -0
  52. package/dist/tools/branchCreate.js +68 -0
  53. package/dist/tools/branchCreate.js.map +1 -0
  54. package/dist/tools/branchList.d.ts +45 -0
  55. package/dist/tools/branchList.d.ts.map +1 -0
  56. package/dist/tools/branchList.js +47 -0
  57. package/dist/tools/branchList.js.map +1 -0
  58. package/dist/tools/commentList.d.ts +48 -0
  59. package/dist/tools/commentList.d.ts.map +1 -0
  60. package/dist/tools/commentList.js +52 -0
  61. package/dist/tools/commentList.js.map +1 -0
  62. package/dist/tools/commitList.d.ts +65 -0
  63. package/dist/tools/commitList.d.ts.map +1 -0
  64. package/dist/tools/commitList.js +58 -0
  65. package/dist/tools/commitList.js.map +1 -0
  66. package/dist/tools/fileRead.d.ts.map +1 -1
  67. package/dist/tools/fileRead.js +1 -0
  68. package/dist/tools/fileRead.js.map +1 -1
  69. package/dist/tools/fileWrite.d.ts +61 -0
  70. package/dist/tools/fileWrite.d.ts.map +1 -0
  71. package/dist/tools/fileWrite.js +56 -0
  72. package/dist/tools/fileWrite.js.map +1 -0
  73. package/dist/tools/gistCreate.d.ts.map +1 -1
  74. package/dist/tools/gistCreate.js +1 -0
  75. package/dist/tools/gistCreate.js.map +1 -1
  76. package/dist/tools/issueCreate.d.ts.map +1 -1
  77. package/dist/tools/issueCreate.js +1 -0
  78. package/dist/tools/issueCreate.js.map +1 -1
  79. package/dist/tools/issueList.d.ts.map +1 -1
  80. package/dist/tools/issueList.js +1 -0
  81. package/dist/tools/issueList.js.map +1 -1
  82. package/dist/tools/issueUpdate.d.ts +75 -0
  83. package/dist/tools/issueUpdate.d.ts.map +1 -0
  84. package/dist/tools/issueUpdate.js +80 -0
  85. package/dist/tools/issueUpdate.js.map +1 -0
  86. package/dist/tools/prCommentCreate.d.ts +48 -0
  87. package/dist/tools/prCommentCreate.d.ts.map +1 -0
  88. package/dist/tools/prCommentCreate.js +50 -0
  89. package/dist/tools/prCommentCreate.js.map +1 -0
  90. package/dist/tools/prCommentList.d.ts +48 -0
  91. package/dist/tools/prCommentList.d.ts.map +1 -0
  92. package/dist/tools/prCommentList.js +53 -0
  93. package/dist/tools/prCommentList.js.map +1 -0
  94. package/dist/tools/prCreate.d.ts.map +1 -1
  95. package/dist/tools/prCreate.js +1 -0
  96. package/dist/tools/prCreate.js.map +1 -1
  97. package/dist/tools/prDiff.d.ts +48 -0
  98. package/dist/tools/prDiff.d.ts.map +1 -0
  99. package/dist/tools/prDiff.js +75 -0
  100. package/dist/tools/prDiff.js.map +1 -0
  101. package/dist/tools/prList.d.ts.map +1 -1
  102. package/dist/tools/prList.js +1 -0
  103. package/dist/tools/prList.js.map +1 -1
  104. package/dist/tools/prMerge.d.ts +59 -0
  105. package/dist/tools/prMerge.d.ts.map +1 -0
  106. package/dist/tools/prMerge.js +58 -0
  107. package/dist/tools/prMerge.js.map +1 -0
  108. package/dist/tools/prReview.d.ts +81 -0
  109. package/dist/tools/prReview.d.ts.map +1 -0
  110. package/dist/tools/prReview.js +70 -0
  111. package/dist/tools/prReview.js.map +1 -0
  112. package/dist/tools/releaseCreate.d.ts +73 -0
  113. package/dist/tools/releaseCreate.d.ts.map +1 -0
  114. package/dist/tools/releaseCreate.js +69 -0
  115. package/dist/tools/releaseCreate.js.map +1 -0
  116. package/dist/tools/releaseList.d.ts +42 -0
  117. package/dist/tools/releaseList.d.ts.map +1 -0
  118. package/dist/tools/releaseList.js +50 -0
  119. package/dist/tools/releaseList.js.map +1 -0
  120. package/dist/tools/repoCreate.d.ts +55 -0
  121. package/dist/tools/repoCreate.d.ts.map +1 -0
  122. package/dist/tools/repoCreate.js +54 -0
  123. package/dist/tools/repoCreate.js.map +1 -0
  124. package/dist/tools/repoIndex.d.ts +47 -0
  125. package/dist/tools/repoIndex.d.ts.map +1 -0
  126. package/dist/tools/repoIndex.js +127 -0
  127. package/dist/tools/repoIndex.js.map +1 -0
  128. package/dist/tools/repoInfo.d.ts +35 -0
  129. package/dist/tools/repoInfo.d.ts.map +1 -0
  130. package/dist/tools/repoInfo.js +60 -0
  131. package/dist/tools/repoInfo.js.map +1 -0
  132. package/dist/tools/repoList.d.ts +47 -0
  133. package/dist/tools/repoList.d.ts.map +1 -0
  134. package/dist/tools/repoList.js +74 -0
  135. package/dist/tools/repoList.js.map +1 -0
  136. package/dist/tools/search.d.ts.map +1 -1
  137. package/dist/tools/search.js +1 -0
  138. package/dist/tools/search.js.map +1 -1
  139. package/manifest.json +30 -6
  140. package/package.json +10 -6
@@ -0,0 +1,62 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * @fileoverview GitHub Actions Trigger tool — trigger a workflow dispatch event.
4
+ *
5
+ * Dispatches a workflow_dispatch event to a specific workflow, targeting a branch
6
+ * or tag ref. Supports passing custom input key-value pairs.
7
+ */
8
+ export class GitHubActionsTriggerTool {
9
+ service;
10
+ name = 'github_actions_trigger';
11
+ description = 'Trigger a GitHub Actions workflow via workflow_dispatch. Supports custom inputs and target ref.';
12
+ category = 'developer';
13
+ hasSideEffects = true;
14
+ inputSchema = {
15
+ type: 'object',
16
+ required: ['owner', 'repo', 'workflow_id'],
17
+ properties: {
18
+ owner: { type: 'string', description: 'Repository owner (user or org)' },
19
+ repo: { type: 'string', description: 'Repository name' },
20
+ workflow_id: {
21
+ type: 'string',
22
+ description: 'Workflow ID or filename (e.g. "deploy.yml")',
23
+ },
24
+ ref: {
25
+ type: 'string',
26
+ description: 'Git ref to run the workflow on (default: "master")',
27
+ },
28
+ inputs: {
29
+ type: 'object',
30
+ description: 'Key-value input parameters for the workflow',
31
+ additionalProperties: { type: 'string' },
32
+ },
33
+ },
34
+ };
35
+ constructor(service) {
36
+ this.service = service;
37
+ }
38
+ async execute(args) {
39
+ try {
40
+ const octokit = this.service.getOctokit();
41
+ await octokit.rest.actions.createWorkflowDispatch({
42
+ owner: args.owner,
43
+ repo: args.repo,
44
+ workflow_id: args.workflow_id,
45
+ ref: args.ref ?? 'master',
46
+ inputs: args.inputs,
47
+ });
48
+ return {
49
+ success: true,
50
+ data: {
51
+ workflow_id: args.workflow_id,
52
+ ref: args.ref ?? 'master',
53
+ message: 'Workflow dispatch event triggered successfully',
54
+ },
55
+ };
56
+ }
57
+ catch (err) {
58
+ return { success: false, error: err instanceof Error ? err.message : String(err) };
59
+ }
60
+ }
61
+ }
62
+ //# sourceMappingURL=actionsTrigger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actionsTrigger.js","sourceRoot":"","sources":["../../src/tools/actionsTrigger.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;;;;GAKG;AAIH,MAAM,OAAO,wBAAwB;IA4BN;IA3BpB,IAAI,GAAG,wBAAwB,CAAC;IAChC,WAAW,GAAG,iGAAiG,CAAC;IAChH,QAAQ,GAAG,WAAW,CAAC;IACvB,cAAc,GAAG,IAAI,CAAC;IAEtB,WAAW,GAAG;QACrB,IAAI,EAAE,QAAiB;QACvB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAU;QACnD,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,Q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AC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;QACrF,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @fileoverview GitHub Branch Create tool — create a new branch from an existing
3
+ * branch or SHA. Resolves the source branch name to a commit SHA before creating
4
+ * the Git ref.
5
+ */
6
+ import type { GitHubService } from '../GitHubService.js';
7
+ export declare class GitHubBranchCreateTool {
8
+ private readonly service;
9
+ readonly name = "github_branch_create";
10
+ readonly description = "Create a new branch in a GitHub repository. Resolves the source branch to its HEAD SHA automatically.";
11
+ readonly category = "developer";
12
+ readonly hasSideEffects = true;
13
+ readonly inputSchema: {
14
+ type: "object";
15
+ required: readonly ["owner", "repo", "branch"];
16
+ properties: {
17
+ owner: {
18
+ type: "string";
19
+ description: string;
20
+ };
21
+ repo: {
22
+ type: "string";
23
+ description: string;
24
+ };
25
+ branch: {
26
+ type: "string";
27
+ description: string;
28
+ };
29
+ from: {
30
+ type: "string";
31
+ description: string;
32
+ };
33
+ };
34
+ };
35
+ constructor(service: GitHubService);
36
+ execute(args: {
37
+ owner: string;
38
+ repo: string;
39
+ branch: string;
40
+ from?: string;
41
+ }): Promise<{
42
+ success: boolean;
43
+ data?: unknown;
44
+ error?: string;
45
+ }>;
46
+ }
47
+ //# sourceMappingURL=branchCreate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branchCreate.d.ts","sourceRoot":"","sources":["../../src/tools/branchCreate.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,qBAAa,sBAAsB;IAiBrB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAhBpC,QAAQ,CAAC,IAAI,0BAA0B;IACvC,QAAQ,CAAC,WAAW,2GAA2G;IAC/H,QAAQ,CAAC,QAAQ,eAAe;IAChC,QAAQ,CAAC,cAAc,QAAQ;IAE/B,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;MASlB;gBAE2B,OAAO,EAAE,aAAa;IAE7C,OAAO,CAAC,IAAI,EAAE;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CA4ClE"}
@@ -0,0 +1,68 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * @fileoverview GitHub Branch Create tool — create a new branch from an existing
4
+ * branch or SHA. Resolves the source branch name to a commit SHA before creating
5
+ * the Git ref.
6
+ */
7
+ export class GitHubBranchCreateTool {
8
+ service;
9
+ name = 'github_branch_create';
10
+ description = 'Create a new branch in a GitHub repository. Resolves the source branch to its HEAD SHA automatically.';
11
+ category = 'developer';
12
+ hasSideEffects = true;
13
+ inputSchema = {
14
+ type: 'object',
15
+ required: ['owner', 'repo', 'branch'],
16
+ properties: {
17
+ owner: { type: 'string', description: 'Repository owner (user or org)' },
18
+ repo: { type: 'string', description: 'Repository name' },
19
+ branch: { type: 'string', description: 'New branch name to create' },
20
+ from: { type: 'string', description: 'Source branch name or commit SHA to branch from (default: repo default branch)' },
21
+ },
22
+ };
23
+ constructor(service) {
24
+ this.service = service;
25
+ }
26
+ async execute(args) {
27
+ try {
28
+ const octokit = this.service.getOctokit();
29
+ // Resolve source to a SHA — if "from" looks like a 40-char hex string, use it
30
+ // directly; otherwise treat it as a branch name and look up the HEAD commit.
31
+ let sha;
32
+ const source = args.from;
33
+ if (source && /^[0-9a-f]{40}$/i.test(source)) {
34
+ sha = source;
35
+ }
36
+ else {
37
+ // If no source specified, use the default branch
38
+ const branchName = source
39
+ ?? (await octokit.rest.repos.get({ owner: args.owner, repo: args.repo }))
40
+ .data.default_branch;
41
+ const { data: refData } = await octokit.rest.git.getRef({
42
+ owner: args.owner,
43
+ repo: args.repo,
44
+ ref: `heads/${branchName}`,
45
+ });
46
+ sha = refData.object.sha;
47
+ }
48
+ const { data } = await octokit.rest.git.createRef({
49
+ owner: args.owner,
50
+ repo: args.repo,
51
+ ref: `refs/heads/${args.branch}`,
52
+ sha,
53
+ });
54
+ return {
55
+ success: true,
56
+ data: {
57
+ ref: data.ref,
58
+ sha: data.object.sha,
59
+ url: data.url,
60
+ },
61
+ };
62
+ }
63
+ catch (err) {
64
+ return { success: false, error: err instanceof Error ? err.message : String(err) };
65
+ }
66
+ }
67
+ }
68
+ //# sourceMappingURL=branchCreate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branchCreate.js","sourceRoot":"","sources":["../../src/tools/branchCreate.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;;;GAIG;AAIH,MAAM,OAAO,sBAAsB;IAiBJ;IAhBpB,IAAI,GAAG,sBAAsB,CAAC;IAC9B,WAAW,GAAG,uGAAuG,CAAC;IACtH,QAAQ,GAAG,WAAW,CAAC;IACvB,cAAc,GAAG,IAAI,CAAC;IAEtB,WAAW,GAAG;QACrB,IAAI,EAAE,QAAiB;QACvB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAU;QAC9C,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,gCAAgC,EAAE;YACjF,IAAI,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,iBAAiB,EAAE;YACjE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,2BAA2B,EAAE;YAC7E,IAAI,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,gFAAgF,EAAE;SACjI;KACF,CAAC;IAEF,YAA6B,OAAsB;QAAtB,YAAO,GAAP,OAAO,CAAe;IAAG,CAAC;IAEvD,KAAK,CAAC,OAAO,CAAC,IAKb;QAC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AAG;oBACpB,GAAG,EAAE,IAAI,CAAC,GAAG;iBACd;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;QACrF,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @fileoverview GitHub Branch List tool — list branches for a repository.
3
+ */
4
+ import type { GitHubService } from '../GitHubService.js';
5
+ export declare class GitHubBranchListTool {
6
+ private readonly service;
7
+ readonly name = "github_branch_list";
8
+ readonly description = "List branches for a GitHub repository. Returns branch name, commit SHA, and protection status.";
9
+ readonly category = "developer";
10
+ readonly hasSideEffects = false;
11
+ readonly inputSchema: {
12
+ type: "object";
13
+ required: readonly ["owner", "repo"];
14
+ properties: {
15
+ owner: {
16
+ type: "string";
17
+ description: string;
18
+ };
19
+ repo: {
20
+ type: "string";
21
+ description: string;
22
+ };
23
+ protected: {
24
+ type: "boolean";
25
+ description: string;
26
+ };
27
+ per_page: {
28
+ type: "number";
29
+ description: string;
30
+ };
31
+ };
32
+ };
33
+ constructor(service: GitHubService);
34
+ execute(args: {
35
+ owner: string;
36
+ repo: string;
37
+ protected?: boolean;
38
+ per_page?: number;
39
+ }): Promise<{
40
+ success: boolean;
41
+ data?: unknown;
42
+ error?: string;
43
+ }>;
44
+ }
45
+ //# sourceMappingURL=branchList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branchList.d.ts","sourceRoot":"","sources":["../../src/tools/branchList.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,qBAAa,oBAAoB;IAiBnB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAhBpC,QAAQ,CAAC,IAAI,wBAAwB;IACrC,QAAQ,CAAC,WAAW,oGAAoG;IACxH,QAAQ,CAAC,QAAQ,eAAe;IAChC,QAAQ,CAAC,cAAc,SAAS;IAEhC,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;MASlB;gBAE2B,OAAO,EAAE,aAAa;IAE7C,OAAO,CAAC,IAAI,EAAE;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAsBlE"}
@@ -0,0 +1,47 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * @fileoverview GitHub Branch List tool — list branches for a repository.
4
+ */
5
+ export class GitHubBranchListTool {
6
+ service;
7
+ name = 'github_branch_list';
8
+ description = 'List branches for a GitHub repository. Returns branch name, commit SHA, and protection status.';
9
+ category = 'developer';
10
+ hasSideEffects = false;
11
+ inputSchema = {
12
+ type: 'object',
13
+ required: ['owner', 'repo'],
14
+ properties: {
15
+ owner: { type: 'string', description: 'Repository owner (user or org)' },
16
+ repo: { type: 'string', description: 'Repository name' },
17
+ protected: { type: 'boolean', description: 'Filter to only protected branches' },
18
+ per_page: { type: 'number', description: 'Results per page (max 100, default 30)' },
19
+ },
20
+ };
21
+ constructor(service) {
22
+ this.service = service;
23
+ }
24
+ async execute(args) {
25
+ try {
26
+ const octokit = this.service.getOctokit();
27
+ const { data } = await octokit.rest.repos.listBranches({
28
+ owner: args.owner,
29
+ repo: args.repo,
30
+ protected: args.protected,
31
+ per_page: Math.min(args.per_page ?? 30, 100),
32
+ });
33
+ return {
34
+ success: true,
35
+ data: data.map((b) => ({
36
+ name: b.name,
37
+ sha: b.commit.sha,
38
+ protected: b.protected,
39
+ })),
40
+ };
41
+ }
42
+ catch (err) {
43
+ return { success: false, error: err instanceof Error ? err.message : String(err) };
44
+ }
45
+ }
46
+ }
47
+ //# sourceMappingURL=branchList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branchList.js","sourceRoot":"","sources":["../../src/tools/branchList.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;GAEG;AAIH,MAAM,OAAO,oBAAoB;IAiBF;IAhBpB,IAAI,GAAG,oBAAoB,CAAC;IAC5B,WAAW,GAAG,gGAAgG,CAAC;IAC/G,QAAQ,GAAG,WAAW,CAAC;IACvB,cAAc,GAAG,KAAK,CAAC;IAEvB,WAAW,GAAG;QACrB,IAAI,EAAE,QAAiB;QACvB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAU;QACpC,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,gCAAgC,EAAE;YACjF,IAAI,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,iBAAiB,EAAE;YACjE,SAAS,EAAE,EAAE,IAAI,EAAE,SAAkB,EAAE,WAAW,EAAE,mCAAmC,EAAE;YACzF,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,wCAAwC,EAAE;SAC7F;KACF,CAAC;IAEF,YAA6B,OAAsB;QAAtB,YAAO,GAAP,OAAO,CAAe;IAAG,CAAC;IAEvD,KAAK,CAAC,OAAO,CAAC,IAKb;QACC,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;YAC1C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC;gBACrD,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,EAAE,GAAG,CAAC;aAC7C,CAAC,CAAC;YAEH,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC;oBAC1B,IAAI,EAAE,CAAC,CAAC,IAAI;oBACZ,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG;oBACjB,SAAS,EAAE,CAAC,CAAC,SAAS;iBACvB,CAAC,CAAC;aACJ,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;QACrF,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * @fileoverview GitHub Comment List tool — list comments on an issue or pull request.
3
+ *
4
+ * Uses octokit.rest.issues.listComments, which works for both issues and PRs
5
+ * since PRs are a superset of issues in the GitHub API.
6
+ */
7
+ import type { GitHubService } from '../GitHubService.js';
8
+ export declare class GitHubCommentListTool {
9
+ private readonly service;
10
+ readonly name = "github_comment_list";
11
+ readonly description = "List comments on a GitHub issue or pull request. Returns comment id, author, body, timestamp, and URL.";
12
+ readonly category = "developer";
13
+ readonly hasSideEffects = false;
14
+ readonly inputSchema: {
15
+ type: "object";
16
+ required: readonly ["owner", "repo", "issue_number"];
17
+ properties: {
18
+ owner: {
19
+ type: "string";
20
+ description: string;
21
+ };
22
+ repo: {
23
+ type: "string";
24
+ description: string;
25
+ };
26
+ issue_number: {
27
+ type: "number";
28
+ description: string;
29
+ };
30
+ per_page: {
31
+ type: "number";
32
+ description: string;
33
+ };
34
+ };
35
+ };
36
+ constructor(service: GitHubService);
37
+ execute(args: {
38
+ owner: string;
39
+ repo: string;
40
+ issue_number: number;
41
+ per_page?: number;
42
+ }): Promise<{
43
+ success: boolean;
44
+ data?: unknown;
45
+ error?: string;
46
+ }>;
47
+ }
48
+ //# sourceMappingURL=commentList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commentList.d.ts","sourceRoot":"","sources":["../../src/tools/commentList.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,qBAAa,qBAAqB;IAiBpB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAhBpC,QAAQ,CAAC,IAAI,yBAAyB;IACtC,QAAQ,CAAC,WAAW,4GAA4G;IAChI,QAAQ,CAAC,QAAQ,eAAe;IAChC,QAAQ,CAAC,cAAc,SAAS;IAEhC,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;MASlB;gBAE2B,OAAO,EAAE,aAAa;IAE7C,OAAO,CAAC,IAAI,EAAE;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,YAAY,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAwBlE"}
@@ -0,0 +1,52 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * @fileoverview GitHub Comment List tool — list comments on an issue or pull request.
4
+ *
5
+ * Uses octokit.rest.issues.listComments, which works for both issues and PRs
6
+ * since PRs are a superset of issues in the GitHub API.
7
+ */
8
+ export class GitHubCommentListTool {
9
+ service;
10
+ name = 'github_comment_list';
11
+ description = 'List comments on a GitHub issue or pull request. Returns comment id, author, body, timestamp, and URL.';
12
+ category = 'developer';
13
+ hasSideEffects = false;
14
+ inputSchema = {
15
+ type: 'object',
16
+ required: ['owner', 'repo', 'issue_number'],
17
+ properties: {
18
+ owner: { type: 'string', description: 'Repository owner (user or org)' },
19
+ repo: { type: 'string', description: 'Repository name' },
20
+ issue_number: { type: 'number', description: 'Issue or PR number' },
21
+ per_page: { type: 'number', description: 'Results per page (max 30, default 10)' },
22
+ },
23
+ };
24
+ constructor(service) {
25
+ this.service = service;
26
+ }
27
+ async execute(args) {
28
+ try {
29
+ const octokit = this.service.getOctokit();
30
+ const { data } = await octokit.rest.issues.listComments({
31
+ owner: args.owner,
32
+ repo: args.repo,
33
+ issue_number: args.issue_number,
34
+ per_page: Math.min(args.per_page ?? 10, 30),
35
+ });
36
+ return {
37
+ success: true,
38
+ data: data.map((c) => ({
39
+ id: c.id,
40
+ author: c.user?.login,
41
+ body: c.body,
42
+ createdAt: c.created_at,
43
+ url: c.html_url,
44
+ })),
45
+ };
46
+ }
47
+ catch (err) {
48
+ return { success: false, error: err instanceof Error ? err.message : String(err) };
49
+ }
50
+ }
51
+ }
52
+ //# sourceMappingURL=commentList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commentList.js","sourceRoot":"","sources":["../../src/tools/commentList.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;;;;GAKG;AAIH,MAAM,OAAO,qBAAqB;IAiBH;IAhBpB,IAAI,GAAG,qBAAqB,CAAC;IAC7B,WAAW,GAAG,wGAAwG,CAAC;IACvH,QAAQ,GAAG,WAAW,CAAC;IACvB,cAAc,GAAG,KAAK,CAAC;IAEvB,WAAW,GAAG;QACrB,IAAI,EAAE,QAAiB;QACvB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,CAAU;QACpD,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,gCAAgC,EAAE;YACjF,IAAI,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,iBAAiB,EAAE;YACjE,YAAY,EAAE,EAAE,IAAI,EAA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@@
1
+ /**
2
+ * @fileoverview GitHub Commit List tool — list commits for a repository.
3
+ */
4
+ import type { GitHubService } from '../GitHubService.js';
5
+ export declare class GitHubCommitListTool {
6
+ private readonly service;
7
+ readonly name = "github_commit_list";
8
+ readonly description = "List commits for a GitHub repository. Supports filtering by branch, path, author, and date range.";
9
+ readonly category = "developer";
10
+ readonly hasSideEffects = false;
11
+ readonly inputSchema: {
12
+ type: "object";
13
+ required: readonly ["owner", "repo"];
14
+ properties: {
15
+ owner: {
16
+ type: "string";
17
+ description: string;
18
+ };
19
+ repo: {
20
+ type: "string";
21
+ description: string;
22
+ };
23
+ sha: {
24
+ type: "string";
25
+ description: string;
26
+ };
27
+ path: {
28
+ type: "string";
29
+ description: string;
30
+ };
31
+ author: {
32
+ type: "string";
33
+ description: string;
34
+ };
35
+ since: {
36
+ type: "string";
37
+ description: string;
38
+ };
39
+ until: {
40
+ type: "string";
41
+ description: string;
42
+ };
43
+ per_page: {
44
+ type: "number";
45
+ description: string;
46
+ };
47
+ };
48
+ };
49
+ constructor(service: GitHubService);
50
+ execute(args: {
51
+ owner: string;
52
+ repo: string;
53
+ sha?: string;
54
+ path?: string;
55
+ author?: string;
56
+ since?: string;
57
+ until?: string;
58
+ per_page?: number;
59
+ }): Promise<{
60
+ success: boolean;
61
+ data?: unknown;
62
+ error?: string;
63
+ }>;
64
+ }
65
+ //# sourceMappingURL=commitList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commitList.d.ts","sourceRoot":"","sources":["../../src/tools/commitList.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,qBAAa,oBAAoB;IAqBnB,OAAO,CAAC,QAAQ,CAAC,OAAO;IApBpC,QAAQ,CAAC,IAAI,wBAAwB;IACrC,QAAQ,CAAC,WAAW,uGAAuG;IAC3H,QAAQ,CAAC,QAAQ,eAAe;IAChC,QAAQ,CAAC,cAAc,SAAS;IAEhC,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAalB;gBAE2B,OAAO,EAAE,aAAa;IAE7C,OAAO,CAAC,IAAI,EAAE;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CA6BlE"}
@@ -0,0 +1,58 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * @fileoverview GitHub Commit List tool — list commits for a repository.
4
+ */
5
+ export class GitHubCommitListTool {
6
+ service;
7
+ name = 'github_commit_list';
8
+ description = 'List commits for a GitHub repository. Supports filtering by branch, path, author, and date range.';
9
+ category = 'developer';
10
+ hasSideEffects = false;
11
+ inputSchema = {
12
+ type: 'object',
13
+ required: ['owner', 'repo'],
14
+ properties: {
15
+ owner: { type: 'string', description: 'Repository owner (user or org)' },
16
+ repo: { type: 'string', description: 'Repository name' },
17
+ sha: { type: 'string', description: 'Branch name or commit SHA to list from (default: default branch)' },
18
+ path: { type: 'string', description: 'Only include commits touching this file path' },
19
+ author: { type: 'string', description: 'GitHub login or email to filter by author' },
20
+ since: { type: 'string', description: 'ISO 8601 date — only commits after this date' },
21
+ until: { type: 'string', description: 'ISO 8601 date — only commits before this date' },
22
+ per_page: { type: 'number', description: 'Results per page (max 100, default 30)' },
23
+ },
24
+ };
25
+ constructor(service) {
26
+ this.service = service;
27
+ }
28
+ async execute(args) {
29
+ try {
30
+ const octokit = this.service.getOctokit();
31
+ const { data } = await octokit.rest.repos.listCommits({
32
+ owner: args.owner,
33
+ repo: args.repo,
34
+ sha: args.sha,
35
+ path: args.path,
36
+ author: args.author,
37
+ since: args.since,
38
+ until: args.until,
39
+ per_page: Math.min(args.per_page ?? 30, 100),
40
+ });
41
+ return {
42
+ success: true,
43
+ data: data.map((c) => ({
44
+ sha: c.sha,
45
+ message: c.commit.message,
46
+ author: c.commit.author?.name,
47
+ author_login: c.author?.login,
48
+ date: c.commit.author?.date,
49
+ url: c.html_url,
50
+ })),
51
+ };
52
+ }
53
+ catch (err) {
54
+ return { success: false, error: err instanceof Error ? err.message : String(err) };
55
+ }
56
+ }
57
+ }
58
+ //# sourceMappingURL=commitList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commitList.js","sourceRoot":"","sources":["../../src/tools/commitList.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;GAEG;AAIH,MAAM,OAAO,oBAAoB;IAqBF;IApBpB,IAAI,GAAG,oBAAoB,CAAC;IAC5B,WAAW,GAAG,mGAAmG,CAAC;IAClH,QAAQ,GAAG,WAAW,CAAC;IACvB,cAAc,GAAG,KAAK,CAAC;IAEvB,WAAW,GAAG;QACrB,IAAI,EAAE,QAAiB;QACvB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAU;QACpC,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,gCAAgC,EAAE;YACjF,IAAI,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,iBAAiB,EAAE;YACjE,GAAG,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,kEAAkE,EAAE;YACjH,IAAI,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,8CAA8C,EAAE;YAC9F,MAAM,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,2CAA2C,EAAE;YAC7F,KAAK,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AAC,MAAM,EAAE,IAAI;oBAC3B,GAAG,EAAE,CAAC,CAAC,QAAQ;iBAChB,CAAC,CAAC;aACJ,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;QACrF,CAAC;IACH,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"fileRead.d.ts","sourceRoot":"","sources":["../../src/tools/fileRead.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,qBAAa,kBAAkB;IAiBjB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAhBpC,QAAQ,CAAC,IAAI,sBAAsB;IACnC,QAAQ,CAAC,WAAW,uFAAuF;IAC3G,QAAQ,CAAC,QAAQ,eAAe;IAChC,QAAQ,CAAC,cAAc,SAAS;IAEhC,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;MASlB;gBAE2B,OAAO,EAAE,aAAa;IAE7C,OAAO,CAAC,IAAI,EAAE;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAqDlE"}
1
+ {"version":3,"file":"fileRead.d.ts","sourceRoot":"","sources":["../../src/tools/fileRead.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,qBAAa,kBAAkB;IAiBjB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAhBpC,QAAQ,CAAC,IAAI,sBAAsB;IACnC,QAAQ,CAAC,WAAW,uFAAuF;IAC3G,QAAQ,CAAC,QAAQ,eAAe;IAChC,QAAQ,CAAC,cAAc,SAAS;IAEhC,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;MASlB;gBAE2B,OAAO,EAAE,aAAa;IAE7C,OAAO,CAAC,IAAI,EAAE;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAqDlE"}
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  /**
2
3
  * @fileoverview GitHub File Read tool — read file contents from a repository.
3
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"fileRead.js","sourceRoot":"","sources":["../../src/tools/fileRead.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,OAAO,kBAAkB;IAiBA;IAhBpB,IAAI,GAAG,kBAAkB,CAAC;IAC1B,WAAW,GAAG,mFAAmF,CAAC;IAClG,QAAQ,GAAG,WAAW,CAAC;IACvB,cAAc,GAAG,KAAK,CAAC;IAEvB,WAAW,GAAG;QACrB,IAAI,EAAE,QAAiB;QACvB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAU;QAC5C,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,gCAAgC,EAAE;YACjF,IAAI,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,iBAAiB,EAAE;YACjE,IAAI,EAAE,EAAE,IAAI,EAAE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oBACb,IAAI,EAAE;wBACJ,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,IAAI,CAAC,IAAI;wBACf,IAAI,EAAE,IAAI,CAAC,IAAI;wBACf,QAAQ,EAAE,OAAO;wBACjB,OAAO;wBACP,GAAG,EAAE,IAAI,CAAC,GAAG;qBACd;iBACF,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE;oBACJ,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,IAAI,EAAG,IAAY,CAAC,IAAI;oBACxB,IAAI,EAAG,IAAY,CAAC,IAAI;iBACzB;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;QACrF,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @fileoverview GitHub File Write tool — create or update a file in a repository.
3
+ * Content is automatically base64-encoded before sending to the API.
4
+ */
5
+ import type { GitHubService } from '../GitHubService.js';
6
+ export declare class GitHubFileWriteTool {
7
+ private readonly service;
8
+ readonly name = "github_file_write";
9
+ readonly description = "Create or update a file in a GitHub repository. Provide the SHA of the existing file to update it; omit SHA to create a new file.";
10
+ readonly category = "developer";
11
+ readonly hasSideEffects = true;
12
+ readonly inputSchema: {
13
+ type: "object";
14
+ required: readonly ["owner", "repo", "path", "content", "message"];
15
+ properties: {
16
+ owner: {
17
+ type: "string";
18
+ description: string;
19
+ };
20
+ repo: {
21
+ type: "string";
22
+ description: string;
23
+ };
24
+ path: {
25
+ type: "string";
26
+ description: string;
27
+ };
28
+ content: {
29
+ type: "string";
30
+ description: string;
31
+ };
32
+ message: {
33
+ type: "string";
34
+ description: string;
35
+ };
36
+ branch: {
37
+ type: "string";
38
+ description: string;
39
+ };
40
+ sha: {
41
+ type: "string";
42
+ description: string;
43
+ };
44
+ };
45
+ };
46
+ constructor(service: GitHubService);
47
+ execute(args: {
48
+ owner: string;
49
+ repo: string;
50
+ path: string;
51
+ content: string;
52
+ message: string;
53
+ branch?: string;
54
+ sha?: string;
55
+ }): Promise<{
56
+ success: boolean;
57
+ data?: unknown;
58
+ error?: string;
59
+ }>;
60
+ }
61
+ //# sourceMappingURL=fileWrite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileWrite.d.ts","sourceRoot":"","sources":["../../src/tools/fileWrite.ts"],"names":[],"mappings":"AACA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,qBAAa,mBAAmB;IAoBlB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAnBpC,QAAQ,CAAC,IAAI,uBAAuB;IACpC,QAAQ,CAAC,WAAW,uIAAuI;IAC3J,QAAQ,CAAC,QAAQ,eAAe;IAChC,QAAQ,CAAC,cAAc,QAAQ;IAE/B,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAYlB;gBAE2B,OAAO,EAAE,aAAa;IAE7C,OAAO,CAAC,IAAI,EAAE;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CA4BlE"}