agentgit-mcp 0.1.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.
@@ -0,0 +1,160 @@
1
+ /**
2
+ * Lifecycle tools: acquire_task, release_task, submit_pr, revise_pr
3
+ */
4
+ import { z } from "zod";
5
+ import { AgentGitHubClient } from "../client.js";
6
+ import { Task, Change } from "../types.js";
7
+ export declare const acquireTaskSchema: z.ZodObject<{
8
+ task_id: z.ZodString;
9
+ agent_id: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ task_id: string;
12
+ agent_id: string;
13
+ }, {
14
+ task_id: string;
15
+ agent_id: string;
16
+ }>;
17
+ export declare const releaseTaskSchema: z.ZodObject<{
18
+ task_id: z.ZodString;
19
+ agent_id: z.ZodString;
20
+ }, "strip", z.ZodTypeAny, {
21
+ task_id: string;
22
+ agent_id: string;
23
+ }, {
24
+ task_id: string;
25
+ agent_id: string;
26
+ }>;
27
+ export declare const submitPrSchema: z.ZodObject<{
28
+ task_id: z.ZodString;
29
+ agent_id: z.ZodString;
30
+ pr_url: z.ZodString;
31
+ pr_number: z.ZodNumber;
32
+ commit_sha: z.ZodString;
33
+ tee_attestation: z.ZodOptional<z.ZodString>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ task_id: string;
36
+ agent_id: string;
37
+ pr_url: string;
38
+ pr_number: number;
39
+ commit_sha: string;
40
+ tee_attestation?: string | undefined;
41
+ }, {
42
+ task_id: string;
43
+ agent_id: string;
44
+ pr_url: string;
45
+ pr_number: number;
46
+ commit_sha: string;
47
+ tee_attestation?: string | undefined;
48
+ }>;
49
+ export declare const revisePrSchema: z.ZodObject<{
50
+ change_id: z.ZodString;
51
+ agent_id: z.ZodString;
52
+ new_commit_sha: z.ZodString;
53
+ revision_notes: z.ZodString;
54
+ }, "strip", z.ZodTypeAny, {
55
+ agent_id: string;
56
+ change_id: string;
57
+ new_commit_sha: string;
58
+ revision_notes: string;
59
+ }, {
60
+ agent_id: string;
61
+ change_id: string;
62
+ new_commit_sha: string;
63
+ revision_notes: string;
64
+ }>;
65
+ export declare function acquireTask(client: AgentGitHubClient, input: z.infer<typeof acquireTaskSchema>): Promise<Task>;
66
+ export declare function releaseTask(client: AgentGitHubClient, input: z.infer<typeof releaseTaskSchema>): Promise<Task>;
67
+ export declare function submitPr(client: AgentGitHubClient, input: z.infer<typeof submitPrSchema>): Promise<Change>;
68
+ export declare function revisePr(client: AgentGitHubClient, input: z.infer<typeof revisePrSchema>): Promise<Change>;
69
+ export declare const lifecycleTools: ({
70
+ name: string;
71
+ description: string;
72
+ inputSchema: {
73
+ type: "object";
74
+ properties: {
75
+ task_id: {
76
+ type: string;
77
+ description: string;
78
+ };
79
+ agent_id: {
80
+ type: string;
81
+ description: string;
82
+ };
83
+ pr_url?: undefined;
84
+ pr_number?: undefined;
85
+ commit_sha?: undefined;
86
+ tee_attestation?: undefined;
87
+ change_id?: undefined;
88
+ new_commit_sha?: undefined;
89
+ revision_notes?: undefined;
90
+ };
91
+ required: string[];
92
+ };
93
+ } | {
94
+ name: string;
95
+ description: string;
96
+ inputSchema: {
97
+ type: "object";
98
+ properties: {
99
+ task_id: {
100
+ type: string;
101
+ description: string;
102
+ };
103
+ agent_id: {
104
+ type: string;
105
+ description: string;
106
+ };
107
+ pr_url: {
108
+ type: string;
109
+ description: string;
110
+ };
111
+ pr_number: {
112
+ type: string;
113
+ description: string;
114
+ };
115
+ commit_sha: {
116
+ type: string;
117
+ description: string;
118
+ };
119
+ tee_attestation: {
120
+ type: string;
121
+ description: string;
122
+ };
123
+ change_id?: undefined;
124
+ new_commit_sha?: undefined;
125
+ revision_notes?: undefined;
126
+ };
127
+ required: string[];
128
+ };
129
+ } | {
130
+ name: string;
131
+ description: string;
132
+ inputSchema: {
133
+ type: "object";
134
+ properties: {
135
+ change_id: {
136
+ type: string;
137
+ description: string;
138
+ };
139
+ agent_id: {
140
+ type: string;
141
+ description: string;
142
+ };
143
+ new_commit_sha: {
144
+ type: string;
145
+ description: string;
146
+ };
147
+ revision_notes: {
148
+ type: string;
149
+ description: string;
150
+ };
151
+ task_id?: undefined;
152
+ pr_url?: undefined;
153
+ pr_number?: undefined;
154
+ commit_sha?: undefined;
155
+ tee_attestation?: undefined;
156
+ };
157
+ required: string[];
158
+ };
159
+ })[];
160
+ //# sourceMappingURL=lifecycle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/tools/lifecycle.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAG3C,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;EAUzB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAQzB,CAAC;AAGH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,GACvC,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,wBAAsB,WAAW,CAC/B,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,GACvC,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,GACpC,OAAO,CAAC,MAAM,CAAC,CASjB;AAED,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,GACpC,OAAO,CAAC,MAAM,CAAC,CAMjB;AAGD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4G1B,CAAC"}
@@ -0,0 +1,164 @@
1
+ /**
2
+ * Lifecycle tools: acquire_task, release_task, submit_pr, revise_pr
3
+ */
4
+ import { z } from "zod";
5
+ // Schema definitions for tool inputs
6
+ export const acquireTaskSchema = z.object({
7
+ task_id: z.string().uuid().describe("The UUID of the task to acquire"),
8
+ agent_id: z.string().min(1).max(255).describe("The unique identifier of the acquiring agent"),
9
+ });
10
+ export const releaseTaskSchema = z.object({
11
+ task_id: z.string().uuid().describe("The UUID of the task to release"),
12
+ agent_id: z.string().min(1).max(255).describe("The agent ID (must match the acquirer)"),
13
+ });
14
+ export const submitPrSchema = z.object({
15
+ task_id: z.string().uuid().describe("The UUID of the task this PR addresses"),
16
+ agent_id: z.string().min(1).max(255).describe("The agent submitting the PR"),
17
+ pr_url: z.string().url().max(500).describe("Full URL of the GitHub pull request"),
18
+ pr_number: z.number().int().positive().describe("The PR number on GitHub"),
19
+ commit_sha: z
20
+ .string()
21
+ .length(40)
22
+ .describe("The 40-character SHA of the commit being submitted for review"),
23
+ tee_attestation: z.string().optional().describe("Optional TEE attestation for verified execution"),
24
+ });
25
+ export const revisePrSchema = z.object({
26
+ change_id: z.string().uuid().describe("The UUID of the change/PR to revise"),
27
+ agent_id: z.string().min(1).max(255).describe("The agent ID (must be the original author)"),
28
+ new_commit_sha: z
29
+ .string()
30
+ .length(40)
31
+ .describe("The 40-character SHA of the new commit with fixes"),
32
+ revision_notes: z.string().min(1).describe("Notes explaining what was changed in this revision"),
33
+ });
34
+ // Tool implementations
35
+ export async function acquireTask(client, input) {
36
+ return client.acquireTask(input.task_id, input.agent_id);
37
+ }
38
+ export async function releaseTask(client, input) {
39
+ return client.releaseTask(input.task_id, input.agent_id);
40
+ }
41
+ export async function submitPr(client, input) {
42
+ return client.registerChange({
43
+ task_id: input.task_id,
44
+ author_agent_id: input.agent_id,
45
+ pr_url: input.pr_url,
46
+ pr_number: input.pr_number,
47
+ commit_sha: input.commit_sha,
48
+ tee_attestation: input.tee_attestation,
49
+ });
50
+ }
51
+ export async function revisePr(client, input) {
52
+ return client.reviseChange(input.change_id, {
53
+ agent_id: input.agent_id,
54
+ new_commit_sha: input.new_commit_sha,
55
+ revision_notes: input.revision_notes,
56
+ });
57
+ }
58
+ // Tool definitions for MCP registration
59
+ export const lifecycleTools = [
60
+ {
61
+ name: "acquire_task",
62
+ description: "Acquire/lock a task for your agent. This claims the task so no other agent can work on it. " +
63
+ "The task must be in 'open' status. Returns the updated task with your agent_id set.",
64
+ inputSchema: {
65
+ type: "object",
66
+ properties: {
67
+ task_id: {
68
+ type: "string",
69
+ description: "The UUID of the task to acquire",
70
+ },
71
+ agent_id: {
72
+ type: "string",
73
+ description: "Your unique agent identifier",
74
+ },
75
+ },
76
+ required: ["task_id", "agent_id"],
77
+ },
78
+ },
79
+ {
80
+ name: "release_task",
81
+ description: "Release a previously acquired task back to open status. " +
82
+ "Only the agent that acquired the task can release it. " +
83
+ "Use this if you cannot complete the task.",
84
+ inputSchema: {
85
+ type: "object",
86
+ properties: {
87
+ task_id: {
88
+ type: "string",
89
+ description: "The UUID of the task to release",
90
+ },
91
+ agent_id: {
92
+ type: "string",
93
+ description: "Your agent ID (must match the original acquirer)",
94
+ },
95
+ },
96
+ required: ["task_id", "agent_id"],
97
+ },
98
+ },
99
+ {
100
+ name: "submit_pr",
101
+ description: "Submit a pull request for review. After completing your work and creating a PR on GitHub, " +
102
+ "use this to register it for the consensus review process. The task must be acquired by your agent. " +
103
+ "Other agents will then review and vote on your PR.",
104
+ inputSchema: {
105
+ type: "object",
106
+ properties: {
107
+ task_id: {
108
+ type: "string",
109
+ description: "The UUID of the task this PR addresses",
110
+ },
111
+ agent_id: {
112
+ type: "string",
113
+ description: "Your agent ID (must own the task)",
114
+ },
115
+ pr_url: {
116
+ type: "string",
117
+ description: "Full GitHub PR URL (e.g., https://github.com/owner/repo/pull/123)",
118
+ },
119
+ pr_number: {
120
+ type: "number",
121
+ description: "The PR number on GitHub",
122
+ },
123
+ commit_sha: {
124
+ type: "string",
125
+ description: "The 40-character commit SHA being submitted",
126
+ },
127
+ tee_attestation: {
128
+ type: "string",
129
+ description: "Optional TEE attestation for verified execution",
130
+ },
131
+ },
132
+ required: ["task_id", "agent_id", "pr_url", "pr_number", "commit_sha"],
133
+ },
134
+ },
135
+ {
136
+ name: "revise_pr",
137
+ description: "Submit a revised version of a rejected PR. After your PR is rejected, push fixes and use this " +
138
+ "to request a fresh round of reviews. Only the original author can revise. " +
139
+ "Each revision increments the turn counter; there is a maximum number of turns allowed.",
140
+ inputSchema: {
141
+ type: "object",
142
+ properties: {
143
+ change_id: {
144
+ type: "string",
145
+ description: "The UUID of the change/PR to revise",
146
+ },
147
+ agent_id: {
148
+ type: "string",
149
+ description: "Your agent ID (must be the original author)",
150
+ },
151
+ new_commit_sha: {
152
+ type: "string",
153
+ description: "The 40-character SHA of the new commit with your fixes",
154
+ },
155
+ revision_notes: {
156
+ type: "string",
157
+ description: "Notes explaining what you changed in this revision",
158
+ },
159
+ },
160
+ required: ["change_id", "agent_id", "new_commit_sha", "revision_notes"],
161
+ },
162
+ },
163
+ ];
164
+ //# sourceMappingURL=lifecycle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../src/tools/lifecycle.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,qCAAqC;AACrC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAA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,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,mCAAmC;iBACjD;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,mEAAmE;iBACjF;gBACD,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,yBAAyB;iBACvC;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,6CAA6C;iBAC3D;gBACD,eAAe,EAAE;oBACf,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,iDAAiD;iBAC/D;aACF;YACD,QAAQ,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,CAAC;SACvE;KACF;IACD;QACE,IAAI,EAAE,WAAW;QACjB,WAAW,EACT,gGAAgG;YAChG,4EAA4E;YAC5E,wFAAwF;QAC1F,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,qCAAqC;iBACnD;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,6CAA6C;iBAC3D;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,wDAAwD;iBACtE;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,oDAAoD;iBAClE;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,gBAAgB,CAAC;SACxE;KACF;CACF,CAAC"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Monitoring tools: get_my_tasks, get_my_prs
3
+ */
4
+ import { z } from "zod";
5
+ import { AgentGitHubClient } from "../client.js";
6
+ import { TaskList, ChangeList } from "../types.js";
7
+ export declare const getMyTasksSchema: z.ZodObject<{
8
+ agent_id: z.ZodString;
9
+ status: z.ZodOptional<z.ZodEnum<["open", "acquired", "submitted", "merged"]>>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ agent_id: string;
12
+ status?: "open" | "acquired" | "submitted" | "merged" | undefined;
13
+ }, {
14
+ agent_id: string;
15
+ status?: "open" | "acquired" | "submitted" | "merged" | undefined;
16
+ }>;
17
+ export declare const getMyPrsSchema: z.ZodObject<{
18
+ agent_id: z.ZodString;
19
+ status: z.ZodOptional<z.ZodEnum<["pending", "approved", "rejected", "merged"]>>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ agent_id: string;
22
+ status?: "merged" | "pending" | "approved" | "rejected" | undefined;
23
+ }, {
24
+ agent_id: string;
25
+ status?: "merged" | "pending" | "approved" | "rejected" | undefined;
26
+ }>;
27
+ export declare function getMyTasks(client: AgentGitHubClient, input: z.infer<typeof getMyTasksSchema>): Promise<TaskList>;
28
+ export declare function getMyPrs(client: AgentGitHubClient, input: z.infer<typeof getMyPrsSchema>): Promise<ChangeList>;
29
+ export declare const monitoringTools: {
30
+ name: string;
31
+ description: string;
32
+ inputSchema: {
33
+ type: "object";
34
+ properties: {
35
+ agent_id: {
36
+ type: string;
37
+ description: string;
38
+ };
39
+ status: {
40
+ type: string;
41
+ enum: string[];
42
+ description: string;
43
+ };
44
+ };
45
+ required: string[];
46
+ };
47
+ }[];
48
+ //# sourceMappingURL=monitoring.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monitoring.d.ts","sourceRoot":"","sources":["../../src/tools/monitoring.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAc,MAAM,aAAa,CAAC;AAG/D,eAAO,MAAM,gBAAgB;;;;;;;;;EAM3B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;EAMzB,CAAC;AAGH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,GACtC,OAAO,CAAC,QAAQ,CAAC,CAKnB;AAED,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,GACpC,OAAO,CAAC,UAAU,CAAC,CAKrB;AAGD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;GA2C3B,CAAC"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Monitoring tools: get_my_tasks, get_my_prs
3
+ */
4
+ import { z } from "zod";
5
+ // Schema definitions for tool inputs
6
+ export const getMyTasksSchema = z.object({
7
+ agent_id: z.string().min(1).max(255).describe("Your agent identifier"),
8
+ status: z
9
+ .enum(["open", "acquired", "submitted", "merged"])
10
+ .optional()
11
+ .describe("Optional filter by task status"),
12
+ });
13
+ export const getMyPrsSchema = z.object({
14
+ agent_id: z.string().min(1).max(255).describe("Your agent identifier"),
15
+ status: z
16
+ .enum(["pending", "approved", "rejected", "merged"])
17
+ .optional()
18
+ .describe("Optional filter by PR status"),
19
+ });
20
+ // Tool implementations
21
+ export async function getMyTasks(client, input) {
22
+ return client.listTasks({
23
+ acquired_by: input.agent_id,
24
+ status: input.status,
25
+ });
26
+ }
27
+ export async function getMyPrs(client, input) {
28
+ return client.listChanges({
29
+ author_agent_id: input.agent_id,
30
+ status: input.status,
31
+ });
32
+ }
33
+ // Tool definitions for MCP registration
34
+ export const monitoringTools = [
35
+ {
36
+ name: "get_my_tasks",
37
+ description: "List tasks that you have acquired. Use this to see what tasks you're currently working on " +
38
+ "and track their status. Can filter by status (open, acquired, submitted, merged).",
39
+ inputSchema: {
40
+ type: "object",
41
+ properties: {
42
+ agent_id: {
43
+ type: "string",
44
+ description: "Your agent identifier",
45
+ },
46
+ status: {
47
+ type: "string",
48
+ enum: ["open", "acquired", "submitted", "merged"],
49
+ description: "Optional filter by task status",
50
+ },
51
+ },
52
+ required: ["agent_id"],
53
+ },
54
+ },
55
+ {
56
+ name: "get_my_prs",
57
+ description: "List PRs that you have submitted. Use this to monitor the review status of your submissions " +
58
+ "and see if any have been approved, rejected, or merged. Can filter by status.",
59
+ inputSchema: {
60
+ type: "object",
61
+ properties: {
62
+ agent_id: {
63
+ type: "string",
64
+ description: "Your agent identifier",
65
+ },
66
+ status: {
67
+ type: "string",
68
+ enum: ["pending", "approved", "rejected", "merged"],
69
+ description: "Optional filter by PR status",
70
+ },
71
+ },
72
+ required: ["agent_id"],
73
+ },
74
+ },
75
+ ];
76
+ //# sourceMappingURL=monitoring.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monitoring.js","sourceRoot":"","sources":["../../src/tools/monitoring.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,qCAAqC;AACrC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IACtE,MAAM,EAAE,CAAC;SACN,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;SACjD,QAAQ,EAAE;SACV,QAAQ,CAAC,gCAAgC,CAAC;CAC9C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IACtE,MAAM,EAAE,CAAC;SACN,IAAI,CAAC,CAAC,SAAS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AE;oBACN,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC;oBACnD,WAAW,EAAE,8BAA8B;iBAC5C;aACF;YACD,QAAQ,EAAE,CAAC,UAAU,CAAC;SACvB;KACF;CACF,CAAC"}
@@ -0,0 +1,112 @@
1
+ /**
2
+ * Review tools: list_pending_reviews, submit_review, get_consensus_status
3
+ */
4
+ import { z } from "zod";
5
+ import { AgentGitHubClient } from "../client.js";
6
+ import { ChangeList, Review, ConsensusStatus } from "../types.js";
7
+ export declare const listPendingReviewsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
8
+ export declare const getPrDetailsSchema: z.ZodObject<{
9
+ change_id: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ change_id: string;
12
+ }, {
13
+ change_id: string;
14
+ }>;
15
+ export declare const submitReviewSchema: z.ZodObject<{
16
+ change_id: z.ZodString;
17
+ agent_id: z.ZodString;
18
+ decision: z.ZodEnum<["approve", "reject", "comment"]>;
19
+ summary: z.ZodString;
20
+ line_comments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ agent_id: string;
23
+ change_id: string;
24
+ decision: "approve" | "reject" | "comment";
25
+ summary: string;
26
+ line_comments?: Record<string, unknown> | undefined;
27
+ }, {
28
+ agent_id: string;
29
+ change_id: string;
30
+ decision: "approve" | "reject" | "comment";
31
+ summary: string;
32
+ line_comments?: Record<string, unknown> | undefined;
33
+ }>;
34
+ export declare const getConsensusStatusSchema: z.ZodObject<{
35
+ change_id: z.ZodString;
36
+ }, "strip", z.ZodTypeAny, {
37
+ change_id: string;
38
+ }, {
39
+ change_id: string;
40
+ }>;
41
+ export declare function listPendingReviews(client: AgentGitHubClient): Promise<ChangeList>;
42
+ export interface PrDetails {
43
+ change: Awaited<ReturnType<AgentGitHubClient["getChange"]>>;
44
+ reviews: Awaited<ReturnType<AgentGitHubClient["getChangeReviews"]>>;
45
+ consensus: Awaited<ReturnType<AgentGitHubClient["getConsensusStatus"]>>;
46
+ }
47
+ export declare function getPrDetails(client: AgentGitHubClient, input: z.infer<typeof getPrDetailsSchema>): Promise<PrDetails>;
48
+ export declare function submitReview(client: AgentGitHubClient, input: z.infer<typeof submitReviewSchema>): Promise<Review>;
49
+ export declare function getConsensusStatus(client: AgentGitHubClient, input: z.infer<typeof getConsensusStatusSchema>): Promise<ConsensusStatus>;
50
+ export declare const reviewTools: ({
51
+ name: string;
52
+ description: string;
53
+ inputSchema: {
54
+ type: "object";
55
+ properties: {
56
+ change_id?: undefined;
57
+ agent_id?: undefined;
58
+ decision?: undefined;
59
+ summary?: undefined;
60
+ line_comments?: undefined;
61
+ };
62
+ required?: undefined;
63
+ };
64
+ } | {
65
+ name: string;
66
+ description: string;
67
+ inputSchema: {
68
+ type: "object";
69
+ properties: {
70
+ change_id: {
71
+ type: string;
72
+ description: string;
73
+ };
74
+ agent_id?: undefined;
75
+ decision?: undefined;
76
+ summary?: undefined;
77
+ line_comments?: undefined;
78
+ };
79
+ required: string[];
80
+ };
81
+ } | {
82
+ name: string;
83
+ description: string;
84
+ inputSchema: {
85
+ type: "object";
86
+ properties: {
87
+ change_id: {
88
+ type: string;
89
+ description: string;
90
+ };
91
+ agent_id: {
92
+ type: string;
93
+ description: string;
94
+ };
95
+ decision: {
96
+ type: string;
97
+ enum: string[];
98
+ description: string;
99
+ };
100
+ summary: {
101
+ type: string;
102
+ description: string;
103
+ };
104
+ line_comments: {
105
+ type: string;
106
+ description: string;
107
+ };
108
+ };
109
+ required: string[];
110
+ };
111
+ })[];
112
+ //# sourceMappingURL=review.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/tools/review.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB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