@qelos/aidev 0.3.0 → 0.3.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.
- package/.env.aidev.example +62 -62
- package/CONTRIBUTING.md +78 -78
- package/LICENSE +21 -21
- package/README.md +467 -467
- package/dist/__tests__/local-provider.test.js +31 -31
- package/dist/__tests__/platform.test.js +5 -5
- package/dist/__tests__/run.test.js +21 -8
- package/dist/__tests__/run.test.js.map +1 -1
- package/dist/cli.js +0 -0
- package/dist/commands/help.js +61 -61
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +126 -101
- package/dist/commands/run.js.map +1 -1
- package/dist/github.js +23 -23
- package/dist/providers/linear.js +70 -70
- package/dist/providers/monday.js +39 -39
- package/package.json +50 -50
- package/scripts/run-tests.cjs +18 -18
package/.env.aidev.example
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
# AIDEV_ENV_EXTEND: path to a shared/global env file loaded as the base for this file.
|
|
2
|
-
# Values in this file override the global one. Useful for sharing API keys across projects.
|
|
3
|
-
# Can also be set as a shell export (e.g. in ~/.zshrc) instead.
|
|
4
|
-
# AIDEV_ENV_EXTEND=~/.aidev.global
|
|
5
|
-
|
|
6
|
-
# PROVIDER: clickup | jira | linear | local | monday | notion
|
|
7
|
-
PROVIDER=clickup
|
|
8
|
-
|
|
9
|
-
# ── ClickUp (when PROVIDER=clickup) ──────────────────────────
|
|
10
|
-
CLICKUP_API_KEY=
|
|
11
|
-
CLICKUP_TEAM_ID=
|
|
12
|
-
# Set to * to match all tasks (useful when aidev has its own dedicated user)
|
|
13
|
-
CLICKUP_TAG=
|
|
14
|
-
CLICKUP_PENDING_STATUS=pending
|
|
15
|
-
CLICKUP_IN_REVIEW_STATUS=review
|
|
16
|
-
|
|
17
|
-
# ── Jira (when PROVIDER=jira) ─────────────────────────────────
|
|
18
|
-
# JIRA_BASE_URL=https://mycompany.atlassian.net
|
|
19
|
-
# JIRA_EMAIL=you@example.com
|
|
20
|
-
# JIRA_API_TOKEN=
|
|
21
|
-
# JIRA_PROJECT=PROJ
|
|
22
|
-
# JIRA_LABEL= # Set to * to match all issues in the project
|
|
23
|
-
# JIRA_PENDING_STATUS=To Do
|
|
24
|
-
# JIRA_IN_REVIEW_STATUS=In Review
|
|
25
|
-
|
|
26
|
-
# ── Linear (when PROVIDER=linear) ──────────────────────────────
|
|
27
|
-
# LINEAR_API_KEY= # Personal API key from Linear Settings → API
|
|
28
|
-
# LINEAR_TEAM_ID= # Team UUID from workspace
|
|
29
|
-
# LINEAR_LABEL= # Set to * to match all issues in the team
|
|
30
|
-
# LINEAR_PENDING_STATUS=Backlog
|
|
31
|
-
# LINEAR_IN_REVIEW_STATUS=In Review
|
|
32
|
-
|
|
33
|
-
# ── Monday.com (when PROVIDER=monday) ──────────────────────────
|
|
34
|
-
# MONDAY_API_TOKEN=
|
|
35
|
-
# MONDAY_BOARD_ID=
|
|
36
|
-
# MONDAY_STATUS_COLUMN_ID=status
|
|
37
|
-
# MONDAY_GROUP_ID=
|
|
38
|
-
# Use CLICKUP_PENDING_STATUS / CLICKUP_IN_REVIEW_STATUS for status labels (e.g. Working on it, Done)
|
|
39
|
-
|
|
40
|
-
# ── Notion (when PROVIDER=notion) ──────────────────────────────
|
|
41
|
-
# NOTION_API_KEY= # Integration token from Notion → Settings → My integrations
|
|
42
|
-
# NOTION_DATABASE_ID= # Database ID from the database URL (32-char hex with optional dashes)
|
|
43
|
-
# NOTION_STATUS_PROPERTY=Status
|
|
44
|
-
# NOTION_PENDING_STATUS=pending
|
|
45
|
-
# NOTION_IN_REVIEW_STATUS=review
|
|
46
|
-
|
|
47
|
-
ASSIGNEE_TAG=
|
|
48
|
-
|
|
49
|
-
# THINKING_TAG: tasks with this tag are analyzed and broken into sub-tasks before execution (optional)
|
|
50
|
-
THINKING_TAG=
|
|
51
|
-
GIT_REMOTE=origin
|
|
52
|
-
GITHUB_BASE_BRANCH=main
|
|
53
|
-
GITHUB_REPO=
|
|
54
|
-
|
|
55
|
-
# Agents to use, in fallback order (comma-separated: antigravity, claude, codex, cursor, windsurf)
|
|
56
|
-
AGENTS=claude,cursor
|
|
57
|
-
|
|
58
|
-
# DEV_NOTES_MODE: smart (only ask when unclear) | always (ask before every task)
|
|
59
|
-
DEV_NOTES_MODE=smart
|
|
60
|
-
|
|
61
|
-
# AIDEV_COMMENT_PREFIX: custom prefix for aidev comments in task providers (default: [aidev])
|
|
62
|
-
# AIDEV_COMMENT_PREFIX=[mybot]
|
|
1
|
+
# AIDEV_ENV_EXTEND: path to a shared/global env file loaded as the base for this file.
|
|
2
|
+
# Values in this file override the global one. Useful for sharing API keys across projects.
|
|
3
|
+
# Can also be set as a shell export (e.g. in ~/.zshrc) instead.
|
|
4
|
+
# AIDEV_ENV_EXTEND=~/.aidev.global
|
|
5
|
+
|
|
6
|
+
# PROVIDER: clickup | jira | linear | local | monday | notion
|
|
7
|
+
PROVIDER=clickup
|
|
8
|
+
|
|
9
|
+
# ── ClickUp (when PROVIDER=clickup) ──────────────────────────
|
|
10
|
+
CLICKUP_API_KEY=
|
|
11
|
+
CLICKUP_TEAM_ID=
|
|
12
|
+
# Set to * to match all tasks (useful when aidev has its own dedicated user)
|
|
13
|
+
CLICKUP_TAG=
|
|
14
|
+
CLICKUP_PENDING_STATUS=pending
|
|
15
|
+
CLICKUP_IN_REVIEW_STATUS=review
|
|
16
|
+
|
|
17
|
+
# ── Jira (when PROVIDER=jira) ─────────────────────────────────
|
|
18
|
+
# JIRA_BASE_URL=https://mycompany.atlassian.net
|
|
19
|
+
# JIRA_EMAIL=you@example.com
|
|
20
|
+
# JIRA_API_TOKEN=
|
|
21
|
+
# JIRA_PROJECT=PROJ
|
|
22
|
+
# JIRA_LABEL= # Set to * to match all issues in the project
|
|
23
|
+
# JIRA_PENDING_STATUS=To Do
|
|
24
|
+
# JIRA_IN_REVIEW_STATUS=In Review
|
|
25
|
+
|
|
26
|
+
# ── Linear (when PROVIDER=linear) ──────────────────────────────
|
|
27
|
+
# LINEAR_API_KEY= # Personal API key from Linear Settings → API
|
|
28
|
+
# LINEAR_TEAM_ID= # Team UUID from workspace
|
|
29
|
+
# LINEAR_LABEL= # Set to * to match all issues in the team
|
|
30
|
+
# LINEAR_PENDING_STATUS=Backlog
|
|
31
|
+
# LINEAR_IN_REVIEW_STATUS=In Review
|
|
32
|
+
|
|
33
|
+
# ── Monday.com (when PROVIDER=monday) ──────────────────────────
|
|
34
|
+
# MONDAY_API_TOKEN=
|
|
35
|
+
# MONDAY_BOARD_ID=
|
|
36
|
+
# MONDAY_STATUS_COLUMN_ID=status
|
|
37
|
+
# MONDAY_GROUP_ID=
|
|
38
|
+
# Use CLICKUP_PENDING_STATUS / CLICKUP_IN_REVIEW_STATUS for status labels (e.g. Working on it, Done)
|
|
39
|
+
|
|
40
|
+
# ── Notion (when PROVIDER=notion) ──────────────────────────────
|
|
41
|
+
# NOTION_API_KEY= # Integration token from Notion → Settings → My integrations
|
|
42
|
+
# NOTION_DATABASE_ID= # Database ID from the database URL (32-char hex with optional dashes)
|
|
43
|
+
# NOTION_STATUS_PROPERTY=Status
|
|
44
|
+
# NOTION_PENDING_STATUS=pending
|
|
45
|
+
# NOTION_IN_REVIEW_STATUS=review
|
|
46
|
+
|
|
47
|
+
ASSIGNEE_TAG=
|
|
48
|
+
|
|
49
|
+
# THINKING_TAG: tasks with this tag are analyzed and broken into sub-tasks before execution (optional)
|
|
50
|
+
THINKING_TAG=
|
|
51
|
+
GIT_REMOTE=origin
|
|
52
|
+
GITHUB_BASE_BRANCH=main
|
|
53
|
+
GITHUB_REPO=
|
|
54
|
+
|
|
55
|
+
# Agents to use, in fallback order (comma-separated: antigravity, claude, codex, cursor, windsurf)
|
|
56
|
+
AGENTS=claude,cursor
|
|
57
|
+
|
|
58
|
+
# DEV_NOTES_MODE: smart (only ask when unclear) | always (ask before every task)
|
|
59
|
+
DEV_NOTES_MODE=smart
|
|
60
|
+
|
|
61
|
+
# AIDEV_COMMENT_PREFIX: custom prefix for aidev comments in task providers (default: [aidev])
|
|
62
|
+
# AIDEV_COMMENT_PREFIX=[mybot]
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
# Contributing to aidev
|
|
2
|
-
|
|
3
|
-
Thank you for your interest in contributing!
|
|
4
|
-
|
|
5
|
-
## Getting Started
|
|
6
|
-
|
|
7
|
-
1. Fork the repository
|
|
8
|
-
2. Create a feature branch: `git checkout -b feature/my-feature`
|
|
9
|
-
3. Make your changes
|
|
10
|
-
4. Build and test: `npm install && npm run build`
|
|
11
|
-
5. Open a pull request
|
|
12
|
-
|
|
13
|
-
## Development Setup
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
git clone https://github.com/qelos-io/aidev
|
|
17
|
-
cd aidev
|
|
18
|
-
npm install
|
|
19
|
-
npm run dev -- init # uses tsx, no build needed
|
|
20
|
-
npm run dev -- run --help
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Adding a New Provider
|
|
24
|
-
|
|
25
|
-
1. Create `src/providers/<name>.ts` implementing the `TaskProvider` interface:
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
import { TaskProvider } from './base';
|
|
29
|
-
import { Task, Comment, Config } from '../types';
|
|
30
|
-
|
|
31
|
-
export class MyProvider implements TaskProvider {
|
|
32
|
-
constructor(config: Config) { ... }
|
|
33
|
-
async fetchTasks(): Promise<Task[]> { ... }
|
|
34
|
-
async postComment(taskId: string, text: string): Promise<void> { ... }
|
|
35
|
-
async getComments(taskId: string): Promise<Comment[]> { ... }
|
|
36
|
-
async updateStatus(taskId: string, status: string): Promise<void> { ... }
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
2. Register it in `src/providers/index.ts`:
|
|
41
|
-
|
|
42
|
-
```typescript
|
|
43
|
-
case 'myprovider':
|
|
44
|
-
return new MyProvider(config);
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
3. Add any new config keys to `src/types.ts` (`Config` interface) and `src/config.ts`.
|
|
48
|
-
|
|
49
|
-
4. Document the new env vars in `.env.aidev.example` and `README.md`.
|
|
50
|
-
|
|
51
|
-
## Adding a New AI Runner
|
|
52
|
-
|
|
53
|
-
1. Create `src/ai/<name>.ts` implementing the `AIRunner` interface:
|
|
54
|
-
|
|
55
|
-
```typescript
|
|
56
|
-
import { AIRunner, AIRunResult } from './base';
|
|
57
|
-
|
|
58
|
-
export class MyRunner implements AIRunner {
|
|
59
|
-
readonly name = 'myrunner';
|
|
60
|
-
isAvailable(): boolean { ... }
|
|
61
|
-
async run(prompt: string, notes?: string): Promise<AIRunResult> { ... }
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
2. Register it in `src/ai/index.ts` and update the `AI_TOOL` logic.
|
|
66
|
-
|
|
67
|
-
## Code Style
|
|
68
|
-
|
|
69
|
-
- TypeScript strict mode
|
|
70
|
-
- No shell string concatenation for subprocess calls — always use array args with `spawnSync`
|
|
71
|
-
- Native `fetch` only — no HTTP library dependencies
|
|
72
|
-
- Keep dependencies minimal
|
|
73
|
-
|
|
74
|
-
## Pull Request Guidelines
|
|
75
|
-
|
|
76
|
-
- One feature/fix per PR
|
|
77
|
-
- Update README.md if you add new config vars or commands
|
|
78
|
-
- Ensure `npm run build` passes before submitting
|
|
1
|
+
# Contributing to aidev
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing!
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
1. Fork the repository
|
|
8
|
+
2. Create a feature branch: `git checkout -b feature/my-feature`
|
|
9
|
+
3. Make your changes
|
|
10
|
+
4. Build and test: `npm install && npm run build`
|
|
11
|
+
5. Open a pull request
|
|
12
|
+
|
|
13
|
+
## Development Setup
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
git clone https://github.com/qelos-io/aidev
|
|
17
|
+
cd aidev
|
|
18
|
+
npm install
|
|
19
|
+
npm run dev -- init # uses tsx, no build needed
|
|
20
|
+
npm run dev -- run --help
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Adding a New Provider
|
|
24
|
+
|
|
25
|
+
1. Create `src/providers/<name>.ts` implementing the `TaskProvider` interface:
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
import { TaskProvider } from './base';
|
|
29
|
+
import { Task, Comment, Config } from '../types';
|
|
30
|
+
|
|
31
|
+
export class MyProvider implements TaskProvider {
|
|
32
|
+
constructor(config: Config) { ... }
|
|
33
|
+
async fetchTasks(): Promise<Task[]> { ... }
|
|
34
|
+
async postComment(taskId: string, text: string): Promise<void> { ... }
|
|
35
|
+
async getComments(taskId: string): Promise<Comment[]> { ... }
|
|
36
|
+
async updateStatus(taskId: string, status: string): Promise<void> { ... }
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
2. Register it in `src/providers/index.ts`:
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
case 'myprovider':
|
|
44
|
+
return new MyProvider(config);
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
3. Add any new config keys to `src/types.ts` (`Config` interface) and `src/config.ts`.
|
|
48
|
+
|
|
49
|
+
4. Document the new env vars in `.env.aidev.example` and `README.md`.
|
|
50
|
+
|
|
51
|
+
## Adding a New AI Runner
|
|
52
|
+
|
|
53
|
+
1. Create `src/ai/<name>.ts` implementing the `AIRunner` interface:
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
import { AIRunner, AIRunResult } from './base';
|
|
57
|
+
|
|
58
|
+
export class MyRunner implements AIRunner {
|
|
59
|
+
readonly name = 'myrunner';
|
|
60
|
+
isAvailable(): boolean { ... }
|
|
61
|
+
async run(prompt: string, notes?: string): Promise<AIRunResult> { ... }
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
2. Register it in `src/ai/index.ts` and update the `AI_TOOL` logic.
|
|
66
|
+
|
|
67
|
+
## Code Style
|
|
68
|
+
|
|
69
|
+
- TypeScript strict mode
|
|
70
|
+
- No shell string concatenation for subprocess calls — always use array args with `spawnSync`
|
|
71
|
+
- Native `fetch` only — no HTTP library dependencies
|
|
72
|
+
- Keep dependencies minimal
|
|
73
|
+
|
|
74
|
+
## Pull Request Guidelines
|
|
75
|
+
|
|
76
|
+
- One feature/fix per PR
|
|
77
|
+
- Update README.md if you add new config vars or commands
|
|
78
|
+
- Ensure `npm run build` passes before submitting
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 aidev contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 aidev contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|