Skip to content

Commit 5a8fad1

Browse files
committed
add badges to README.md
1 parent 4ad6980 commit 5a8fad1

File tree

2 files changed

+96
-1
lines changed

2 files changed

+96
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# MyCoder
22

3+
[![NPM Package][npm]]
4+
[![NPM Downloads][npm-downloads]]
5+
36
## Overview
47

58
MyCoder is a simple to install, powerful command-line based AI agent system that can perform arbitrary tasks with a particular focus on coding tasks. It uses a modular tool-based architecture that allows it to interact with files, execute commands, make network requests, and spawn sub-agents for parallel task execution.
@@ -137,12 +140,15 @@ The project uses GitHub Actions for continuous integration:
137140
- A single CI pipeline automatically builds and tests the code on all branches and pull requests to main
138141

139142
The release process is managed manually using [changesets](https://github.com/changesets/changesets) which:
143+
140144
1. Determines version bumps based on commit messages
141145
2. Generates changelogs
142146

143147
Releases to GitHub and publishing to npm are performed manually after review.
144148

145-
146149
## License
147150

148151
MIT License
152+
153+
[npm]: https://img.shields.io/npm/v/mycoder
154+
[npm-downloads]: https://img.shields.io/npm/dw/mycoder

src/types/browserTools.ts

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
import { z } from 'zod';
2+
3+
// Browser Types
4+
export const BrowserTypeEnum = z.enum(['chromium', 'firefox', 'webkit']);
5+
export type BrowserType = z.infer<typeof BrowserTypeEnum>;
6+
7+
export const BrowserActionEnum = z.enum(['navigate', 'click', 'type', 'end']);
8+
export type BrowserAction = z.infer<typeof BrowserActionEnum>;
9+
10+
// browseStart interfaces and schemas
11+
export interface BrowseStartOptions {
12+
headless?: boolean;
13+
slowMo?: number;
14+
timeout?: number;
15+
viewport?: {
16+
width: number;
17+
height: number;
18+
};
19+
}
20+
21+
export const BrowseStartOptionsSchema = z.object({
22+
headless: z.boolean().optional(),
23+
slowMo: z.number().optional(),
24+
timeout: z.number().optional(),
25+
viewport: z.object({
26+
width: z.number(),
27+
height: z.number()
28+
}).optional()
29+
});
30+
31+
export interface BrowseStartParams {
32+
browserType: BrowserType;
33+
options?: BrowseStartOptions;
34+
description: string;
35+
}
36+
37+
export const BrowseStartParamsSchema = z.object({
38+
browserType: BrowserTypeEnum,
39+
options: BrowseStartOptionsSchema.optional(),
40+
description: z.string().max(80)
41+
});
42+
43+
export interface BrowseStartResult {
44+
sessionId: string;
45+
success: boolean;
46+
error?: string;
47+
}
48+
49+
// browseMessage interfaces and schemas
50+
export interface BrowseMessageActionParams {
51+
navigate?: { url: string };
52+
click?: { selector: string };
53+
type?: {
54+
selector: string;
55+
text: string;
56+
};
57+
end?: boolean;
58+
}
59+
60+
export const BrowseMessageActionParamsSchema = z.object({
61+
navigate: z.object({ url: z.string().url() }).optional(),
62+
click: z.object({ selector: z.string() }).optional(),
63+
type: z.object({
64+
selector: z.string(),
65+
text: z.string()
66+
}).optional(),
67+
end: z.boolean().optional()
68+
});
69+
70+
export interface BrowseMessageParams {
71+
sessionId: string;
72+
action: BrowserAction;
73+
actionParams: BrowseMessageActionParams;
74+
description: string;
75+
}
76+
77+
export const BrowseMessageParamsSchema = z.object({
78+
sessionId: z.string(),
79+
action: BrowserActionEnum,
80+
actionParams: BrowseMessageActionParamsSchema,
81+
description: z.string().max(80)
82+
});
83+
84+
export interface BrowseMessageResult {
85+
success: boolean;
86+
content?: string;
87+
consoleLogs?: string[];
88+
error?: string;
89+
}

0 commit comments

Comments
 (0)