@qelos/aidev 0.5.1 → 0.5.2
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 +8 -0
- package/README.md +113 -0
- package/dist/cli.js +13 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/accepted.d.ts +7 -2
- package/dist/commands/accepted.d.ts.map +1 -1
- package/dist/commands/accepted.js +17 -2
- package/dist/commands/accepted.js.map +1 -1
- package/dist/commands/help.d.ts.map +1 -1
- package/dist/commands/help.js +13 -0
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/run.d.ts +9 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +187 -20
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/tasks.d.ts +1 -0
- package/dist/commands/tasks.d.ts.map +1 -1
- package/dist/commands/tasks.js +29 -0
- package/dist/commands/tasks.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +6 -0
- package/dist/config.js.map +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.d.ts.map +1 -1
- package/dist/providers/linear.js +1 -1
- package/dist/providers/linear.js.map +1 -1
- package/dist/sessions.d.ts +20 -0
- package/dist/sessions.d.ts.map +1 -0
- package/dist/sessions.js +171 -0
- package/dist/sessions.js.map +1 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/__tests__/ai-runners.test.d.ts +0 -2
- package/dist/__tests__/ai-runners.test.d.ts.map +0 -1
- package/dist/__tests__/ai-runners.test.js +0 -367
- package/dist/__tests__/ai-runners.test.js.map +0 -1
- package/dist/__tests__/clickup-format.test.d.ts +0 -2
- package/dist/__tests__/clickup-format.test.d.ts.map +0 -1
- package/dist/__tests__/clickup-format.test.js +0 -256
- package/dist/__tests__/clickup-format.test.js.map +0 -1
- package/dist/__tests__/config.test.d.ts +0 -2
- package/dist/__tests__/config.test.d.ts.map +0 -1
- package/dist/__tests__/config.test.js +0 -418
- package/dist/__tests__/config.test.js.map +0 -1
- package/dist/__tests__/git.test.d.ts +0 -2
- package/dist/__tests__/git.test.d.ts.map +0 -1
- package/dist/__tests__/git.test.js +0 -697
- package/dist/__tests__/git.test.js.map +0 -1
- package/dist/__tests__/github.test.d.ts +0 -2
- package/dist/__tests__/github.test.d.ts.map +0 -1
- package/dist/__tests__/github.test.js +0 -273
- package/dist/__tests__/github.test.js.map +0 -1
- package/dist/__tests__/help.test.d.ts +0 -2
- package/dist/__tests__/help.test.d.ts.map +0 -1
- package/dist/__tests__/help.test.js +0 -34
- package/dist/__tests__/help.test.js.map +0 -1
- package/dist/__tests__/hooks.test.d.ts +0 -2
- package/dist/__tests__/hooks.test.d.ts.map +0 -1
- package/dist/__tests__/hooks.test.js +0 -381
- package/dist/__tests__/hooks.test.js.map +0 -1
- package/dist/__tests__/init.test.d.ts +0 -2
- package/dist/__tests__/init.test.d.ts.map +0 -1
- package/dist/__tests__/init.test.js +0 -596
- package/dist/__tests__/init.test.js.map +0 -1
- package/dist/__tests__/local-provider.test.d.ts +0 -2
- package/dist/__tests__/local-provider.test.d.ts.map +0 -1
- package/dist/__tests__/local-provider.test.js +0 -631
- package/dist/__tests__/local-provider.test.js.map +0 -1
- package/dist/__tests__/lockfile.test.d.ts +0 -2
- package/dist/__tests__/lockfile.test.d.ts.map +0 -1
- package/dist/__tests__/lockfile.test.js +0 -144
- package/dist/__tests__/lockfile.test.js.map +0 -1
- package/dist/__tests__/permissions.test.d.ts +0 -2
- package/dist/__tests__/permissions.test.d.ts.map +0 -1
- package/dist/__tests__/permissions.test.js +0 -151
- package/dist/__tests__/permissions.test.js.map +0 -1
- package/dist/__tests__/platform.test.d.ts +0 -2
- package/dist/__tests__/platform.test.d.ts.map +0 -1
- package/dist/__tests__/platform.test.js +0 -329
- package/dist/__tests__/platform.test.js.map +0 -1
- package/dist/__tests__/providers.test.d.ts +0 -2
- package/dist/__tests__/providers.test.d.ts.map +0 -1
- package/dist/__tests__/providers.test.js +0 -925
- package/dist/__tests__/providers.test.js.map +0 -1
- package/dist/__tests__/run.test.d.ts +0 -2
- package/dist/__tests__/run.test.d.ts.map +0 -1
- package/dist/__tests__/run.test.js +0 -767
- package/dist/__tests__/run.test.js.map +0 -1
- package/dist/__tests__/schedule.test.d.ts +0 -2
- package/dist/__tests__/schedule.test.d.ts.map +0 -1
- package/dist/__tests__/schedule.test.js +0 -258
- package/dist/__tests__/schedule.test.js.map +0 -1
package/.env.aidev.example
CHANGED
|
@@ -82,3 +82,11 @@ DEV_NOTES_MODE=smart
|
|
|
82
82
|
# AIDEV_HOOKS_PATH: optional path to .ts or .js hooks module (relative to project cwd or absolute).
|
|
83
83
|
# aidev init creates .aidev/aidev.hooks.ts and sets this by default.
|
|
84
84
|
# AIDEV_HOOKS_PATH=.aidev/aidev.hooks.ts
|
|
85
|
+
|
|
86
|
+
# AIDEV_AUTO_COMPRESS: when the prompt grows past AIDEV_COMPRESS_THRESHOLD chars,
|
|
87
|
+
# summarize older comments and keep only the latest verbatim. Default: true.
|
|
88
|
+
# Set to false / 0 / no to opt out.
|
|
89
|
+
# AIDEV_AUTO_COMPRESS=true
|
|
90
|
+
|
|
91
|
+
# AIDEV_COMPRESS_THRESHOLD: char-length threshold that triggers compression. Default: 12000.
|
|
92
|
+
# AIDEV_COMPRESS_THRESHOLD=12000
|
package/README.md
CHANGED
|
@@ -25,6 +25,7 @@ Task → AI implements → git push → "in review" → AI resolves code
|
|
|
25
25
|
- [Code review resolution](#code-review-resolution)
|
|
26
26
|
- [Auto-merge accepted PRs](#auto-merge-accepted-prs)
|
|
27
27
|
- [Dev notes mode](#dev-notes-mode)
|
|
28
|
+
- [Local tasks file (`aidev.tasks.json`)](#local-tasks-file-aidevtasksjson)
|
|
28
29
|
- [Scheduling](#scheduling)
|
|
29
30
|
- [Hooks](#hooks)
|
|
30
31
|
- [Logging](#logging)
|
|
@@ -81,6 +82,12 @@ aidev run
|
|
|
81
82
|
| `aidev run open` | Only open (non-pending) tasks |
|
|
82
83
|
| `aidev run pending` | Only pending tasks — check for human replies |
|
|
83
84
|
| `aidev run accepted` | Auto-merge PRs for tasks in review with the accepted tag |
|
|
85
|
+
| `aidev run tasks` | Publish all entries in `aidev.tasks.json` and exit (no AI run) |
|
|
86
|
+
| `aidev tasks add` | Add a new entry to `aidev.tasks.json` (interactive) |
|
|
87
|
+
| `aidev tasks ls` | List entries currently queued in `aidev.tasks.json` |
|
|
88
|
+
| `aidev tasks update [id]` | Edit a queued entry (interactive if `id` omitted) |
|
|
89
|
+
| `aidev tasks remove [id]` | Delete a queued entry (interactive if `id` omitted) |
|
|
90
|
+
| `aidev tasks push` | Same as `aidev run tasks` — publish all queued entries and exit |
|
|
84
91
|
| `aidev stop` | Stop any running aidev process in the current directory |
|
|
85
92
|
| `aidev schedule set` | Interactive cron picker for this directory |
|
|
86
93
|
| `aidev schedule set "<expr>"` | Set a specific cron expression |
|
|
@@ -260,6 +267,8 @@ CLICKUP_TAG=my-project
|
|
|
260
267
|
| `ACCEPTED_TAG` | — | Tasks in review with this tag are auto-merged (see [Auto-merge accepted PRs](#auto-merge-accepted-prs)) |
|
|
261
268
|
| `DONE_STATUS` | — | Status to set after auto-merging an accepted PR (e.g. `done`) |
|
|
262
269
|
| `PR_SIGNATURE` | `Automated PR by aidev.` | Custom signature line appended to the PR body |
|
|
270
|
+
| `AIDEV_AUTO_COMPRESS` | `true` | Auto-compress older comments when the prompt grows large. Set to `false` / `0` / `no` to opt out |
|
|
271
|
+
| `AIDEV_COMPRESS_THRESHOLD` | `12000` | Char-length threshold that triggers compression |
|
|
263
272
|
|
|
264
273
|
---
|
|
265
274
|
|
|
@@ -367,6 +376,24 @@ AIDEV_COMMENT_PREFIX=[mybot]
|
|
|
367
376
|
|
|
368
377
|
---
|
|
369
378
|
|
|
379
|
+
## Auto-compress
|
|
380
|
+
|
|
381
|
+
For long-running tasks with many comments, the combined prompt (description + conversation history + review threads) can grow past the AI agent's effective context window. When the assembled context exceeds `AIDEV_COMPRESS_THRESHOLD` characters (default `12000`), aidev summarises the older comments via the configured AI agent and keeps only the **latest comment verbatim** — so the agent always sees the user's most recent intent without ambiguity.
|
|
382
|
+
|
|
383
|
+
Compressed summaries are cached under `.aidev/sessions/<taskId>.json` and reused across runs; new comments invalidate the cache and trigger a re-summarisation of the delta. The directory is added to `.gitignore` automatically.
|
|
384
|
+
|
|
385
|
+
This is **on by default**. To opt out:
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
# In .env.aidev
|
|
389
|
+
AIDEV_AUTO_COMPRESS=false
|
|
390
|
+
|
|
391
|
+
# Or raise the threshold instead of disabling
|
|
392
|
+
AIDEV_COMPRESS_THRESHOLD=24000
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
370
397
|
## Non-code tasks
|
|
371
398
|
|
|
372
399
|
Tasks tagged with `NON_CODE_TAG` are executed **without git branching** — no checkout, commit, push, or PR creation. The AI agent runs the task directly in the current working directory.
|
|
@@ -457,6 +484,92 @@ When a question is posted, the task is moved to the configured pending status (e
|
|
|
457
484
|
|
|
458
485
|
---
|
|
459
486
|
|
|
487
|
+
## Local tasks file (`aidev.tasks.json`)
|
|
488
|
+
|
|
489
|
+
`aidev.tasks.json` is an **outbound queue** — a JSON file that sits at the root of your project and holds task templates that aidev will publish to your configured provider (ClickUp, Jira, Linear, etc.). It is the opposite direction from the [Local provider](#local-provider): the local provider **stores** tasks on disk, while `aidev.tasks.json` **pushes** tasks to a remote provider.
|
|
490
|
+
|
|
491
|
+
Typical uses:
|
|
492
|
+
|
|
493
|
+
- **Recurring tasks** — with a `cron` expression, an entry publishes a fresh task on every matching tick (daily standup reminders, weekly reviews, monthly housekeeping).
|
|
494
|
+
- **Staged work** — queue a batch of tasks in a commit so they appear in the provider together when `aidev` next runs.
|
|
495
|
+
- **AI-authored tasks** — another AI agent or script can append entries to the file; `aidev` will pick them up and create real tickets.
|
|
496
|
+
|
|
497
|
+
The file is added to `.gitignore` by `aidev init` — each developer or automation environment maintains their own queue.
|
|
498
|
+
|
|
499
|
+
### File format
|
|
500
|
+
|
|
501
|
+
`aidev.tasks.json` is a JSON array of task entries. Each entry has the shape:
|
|
502
|
+
|
|
503
|
+
```ts
|
|
504
|
+
interface LocalTask {
|
|
505
|
+
id: string; // UUID — generated automatically by "aidev tasks add"
|
|
506
|
+
title: string; // required — task title on the remote provider
|
|
507
|
+
description: string; // task body / description
|
|
508
|
+
type: 'code' | 'non-code'; // routes to the non-code provider when set to 'non-code'
|
|
509
|
+
priority?: number; // 1=urgent, 2=high, 3=normal, 4=low
|
|
510
|
+
assignee?: string; // currently informational (reserved for future use)
|
|
511
|
+
dueDate?: string; // ISO date, e.g. "2026-05-01"
|
|
512
|
+
tags?: string[]; // extra tags appended to the provider-configured tag
|
|
513
|
+
listId?: string; // override provider list / project ID for this task only
|
|
514
|
+
cron?: string; // 5-field cron — if set, the task is re-published on every tick
|
|
515
|
+
lastPushedAt?: number; // epoch ms of the last successful push (managed by aidev for cron entries)
|
|
516
|
+
}
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
**Example** (`aidev.tasks.json`):
|
|
520
|
+
|
|
521
|
+
```json
|
|
522
|
+
[
|
|
523
|
+
{
|
|
524
|
+
"id": "7f3a9c2d-5b1e-4a6f-9d8c-1e2f3a4b5c6d",
|
|
525
|
+
"title": "Daily standup notes",
|
|
526
|
+
"description": "Post yesterday / today / blockers to the team channel.",
|
|
527
|
+
"type": "non-code",
|
|
528
|
+
"priority": 3,
|
|
529
|
+
"tags": ["standup"],
|
|
530
|
+
"cron": "0 9 * * 1-5"
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"id": "2b8e1f7a-4c9d-4e5a-8b6c-9f1e2d3c4b5a",
|
|
534
|
+
"title": "Upgrade dependencies",
|
|
535
|
+
"description": "Run `npm outdated`, bump minor/patch versions, verify tests pass.",
|
|
536
|
+
"type": "code",
|
|
537
|
+
"priority": 2,
|
|
538
|
+
"tags": ["maintenance"]
|
|
539
|
+
}
|
|
540
|
+
]
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
### Lifecycle
|
|
544
|
+
|
|
545
|
+
1. **Every `aidev run`** (regardless of filter) begins by reading `aidev.tasks.json` and attempting to publish each entry via the configured provider's `createTask` API.
|
|
546
|
+
2. **One-shot entries** (no `cron` field) are **removed from the file** after a successful push — they become a real ticket and won't be duplicated on the next run.
|
|
547
|
+
3. **Cron entries** remain in the file. `lastPushedAt` is updated on each successful push; on the next run, aidev checks whether the cron has fired at least once since `lastPushedAt` before republishing. A fresh entry with a cron fires on the first run that matches.
|
|
548
|
+
4. **Failures** are logged and the entry is kept — the next run retries.
|
|
549
|
+
|
|
550
|
+
### Routing
|
|
551
|
+
|
|
552
|
+
- `type: 'code'` → published with the code tag (`CLICKUP_TAG` / `JIRA_LABEL` / `LINEAR_LABEL`, etc.) to the primary provider.
|
|
553
|
+
- `type: 'non-code'` → published with `NON_CODE_TAG` to the non-code provider (a separate team / project if `NON_CODE_CLICKUP_TEAM_ID`, `NON_CODE_JIRA_PROJECT`, or `NON_CODE_LINEAR_TEAM_ID` is configured, otherwise the primary).
|
|
554
|
+
- Per-task `tags` are appended to the resolved default tag.
|
|
555
|
+
- Per-task `listId` overrides the provider-default list / project for that single task.
|
|
556
|
+
|
|
557
|
+
### Managing entries
|
|
558
|
+
|
|
559
|
+
Use the built-in commands rather than hand-editing JSON (although hand-editing is fine — the file is plain JSON):
|
|
560
|
+
|
|
561
|
+
```bash
|
|
562
|
+
aidev tasks add # interactive prompt: title, description, type, priority, due date, tags, list, cron
|
|
563
|
+
aidev tasks ls # table of queued entries
|
|
564
|
+
aidev tasks update [id] # edit an entry by table ID (interactive picker if no id)
|
|
565
|
+
aidev tasks remove [id] # delete an entry by table ID (interactive picker if no id)
|
|
566
|
+
aidev tasks push # publish everything now (same as "aidev run tasks") — useful for dry-running or in scripts
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
`aidev tasks push` and `aidev run tasks` do the same thing: they only process `aidev.tasks.json` and exit without pulling tasks from the provider or invoking the AI. This is useful when you want to decouple queue publishing from the main AI loop — for example, running `aidev tasks push` from a separate cron entry or CI job.
|
|
570
|
+
|
|
571
|
+
---
|
|
572
|
+
|
|
460
573
|
## Scheduling
|
|
461
574
|
|
|
462
575
|
aidev can run on a cron schedule, one entry per project directory.
|
package/dist/cli.js
CHANGED
|
@@ -153,5 +153,18 @@ tasksCmd
|
|
|
153
153
|
.action(async (id) => {
|
|
154
154
|
await (0, tasks_1.tasksUpdateCommand)(id);
|
|
155
155
|
});
|
|
156
|
+
tasksCmd
|
|
157
|
+
.command('push')
|
|
158
|
+
.description('Publish all tasks from aidev.tasks.json to the configured provider')
|
|
159
|
+
.action(async () => {
|
|
160
|
+
const { env } = program.opts();
|
|
161
|
+
try {
|
|
162
|
+
await (0, tasks_1.tasksPushCommand)(env);
|
|
163
|
+
}
|
|
164
|
+
catch (err) {
|
|
165
|
+
logger_1.logger.error(String(err));
|
|
166
|
+
process.exit(1);
|
|
167
|
+
}
|
|
168
|
+
});
|
|
156
169
|
program.parse(process.argv);
|
|
157
170
|
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,0CAA8C;AAC9C,wCAAuD;AACvD,kDAAwH;AACxH,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,0CAA8C;AAC9C,wCAAuD;AACvD,kDAAwH;AACxH,4CAA6H;AAC7H,0CAA8C;AAC9C,0CAA8C;AAC9C,qCAAsC;AACtC,2CAA2D;AAC3D,6BAAqC;AACrC,mCAA4C;AAC5C,qCAAkC;AAElC,mCAAkD;AAClD,kDAAsD;AACtD,qCAAyC;AAEzC,8DAA8D;AAC9D,M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AM,CAAC,KAAK,EAAE,EAAW,EAAE,EAAE;IAC5B,MAAM,IAAA,0BAAkB,EAAC,EAAE,CAAC,CAAC;AAC/B,CAAC,CAAC,CAAC;AAEL,QAAQ;KACL,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,oEAAoE,CAAC;KACjF,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,EAAoB,CAAC;IACjD,IAAI,CAAC;QACH,MAAM,IAAA,wBAAgB,EAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,eAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { Config } from '../types';
|
|
2
2
|
import { TaskProvider } from '../providers';
|
|
3
|
+
/**
|
|
4
|
+
* Comment posted on the task immediately before merging an accepted PR (so the
|
|
5
|
+
* ticket records that aidev is performing the merge).
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildAcceptedMergeComment(config: Config, branchName: string): string;
|
|
3
8
|
/**
|
|
4
9
|
* Process "accepted" tasks: find tasks in review status with the accepted tag,
|
|
5
|
-
* merge their PRs via gh CLI (squash +
|
|
6
|
-
* then checkout main and pull.
|
|
10
|
+
* post a short merge notice on each ticket, merge their PRs via gh CLI (squash +
|
|
11
|
+
* delete branch), update status to done, then checkout main and pull.
|
|
7
12
|
*/
|
|
8
13
|
export declare function acceptedCommand(config: Config, provider: TaskProvider): Promise<void>;
|
|
9
14
|
//# sourceMappingURL=accepted.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accepted.d.ts","sourceRoot":"","sources":["../../src/commands/accepted.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAM5C;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,YAAY,GACrB,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"accepted.d.ts","sourceRoot":"","sources":["../../src/commands/accepted.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAM5C;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAEpF;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,YAAY,GACrB,OAAO,CAAC,IAAI,CAAC,CA2Ef"}
|
|
@@ -33,15 +33,23 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.buildAcceptedMergeComment = buildAcceptedMergeComment;
|
|
36
37
|
exports.acceptedCommand = acceptedCommand;
|
|
37
38
|
const logger_1 = require("../logger");
|
|
38
39
|
const github_1 = require("../github");
|
|
39
40
|
const git = __importStar(require("../git"));
|
|
40
41
|
const run_1 = require("./run");
|
|
42
|
+
/**
|
|
43
|
+
* Comment posted on the task immediately before merging an accepted PR (so the
|
|
44
|
+
* ticket records that aidev is performing the merge).
|
|
45
|
+
*/
|
|
46
|
+
function buildAcceptedMergeComment(config, branchName) {
|
|
47
|
+
return `${config.commentPrefix} Merging the accepted pull request for branch \`${branchName}\`.`;
|
|
48
|
+
}
|
|
41
49
|
/**
|
|
42
50
|
* Process "accepted" tasks: find tasks in review status with the accepted tag,
|
|
43
|
-
* merge their PRs via gh CLI (squash +
|
|
44
|
-
* then checkout main and pull.
|
|
51
|
+
* post a short merge notice on each ticket, merge their PRs via gh CLI (squash +
|
|
52
|
+
* delete branch), update status to done, then checkout main and pull.
|
|
45
53
|
*/
|
|
46
54
|
async function acceptedCommand(config, provider) {
|
|
47
55
|
if (!config.acceptedTag) {
|
|
@@ -70,6 +78,13 @@ async function acceptedCommand(config, provider) {
|
|
|
70
78
|
for (const task of acceptedTasks) {
|
|
71
79
|
const branchName = `${task.id}/${git.slugify(task.name)}`;
|
|
72
80
|
logger_1.logger.task(`[${task.id}] "${task.name}" — merging branch ${branchName}`);
|
|
81
|
+
try {
|
|
82
|
+
await provider.postComment(task.id, buildAcceptedMergeComment(config, branchName));
|
|
83
|
+
}
|
|
84
|
+
catch (err) {
|
|
85
|
+
logger_1.logger.warn(`[${task.id}] Failed to post merge notice: ${err instanceof Error ? err.message : String(err)}`);
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
73
88
|
const result = (0, github_1.mergePullRequest)(branchName);
|
|
74
89
|
if (!result.success) {
|
|
75
90
|
logger_1.logger.error(`[${task.id}] Failed to merge PR: ${result.error}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accepted.js","sourceRoot":"","sources":["../../src/commands/accepted.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"accepted.js","sourceRoot":"","sources":["../../src/commands/accepted.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,8DAEC;AAOD,0CA8EC;AAhGD,sCAAmC;AACnC,sCAA+E;AAC/E,4CAA8B;AAC9B,+BAA0C;AAE1C;;;GAGG;AACH,SAAgB,yBAAyB,CAAC,MAAc,EAAE,UAAkB;IAC1E,OAAO,GAAG,MAAM,CAAC,aAAa,mDAAmD,UAAU,KAAK,CAAC;AACn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G,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAC3G,CAAC;QACH,CAAC;QAED,MAAM,EAAE,CAAC;IACX,CAAC;IAED,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;QACf,eAAM,CAAC,IAAI,CAAC,gBAAgB,MAAM,CAAC,gBAAgB,wBAAwB,CAAC,CAAC;QAC7E,MAAM,EAAE,GAAG,GAAG,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAC3E,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,eAAM,CAAC,KAAK,CAAC,sBAAsB,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;IAED,eAAM,CAAC,OAAO,CAAC,iBAAiB,MAAM,IAAI,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":"AA2BA;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,CAAC,EAAE;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAUlG;AAED,wBAAgB,WAAW,IAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":"AA2BA;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,CAAC,EAAE;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAUlG;AAED,wBAAgB,WAAW,IAAI,IAAI,CAkFlC"}
|
package/dist/commands/help.js
CHANGED
|
@@ -57,6 +57,12 @@ ${b('COMMANDS')}
|
|
|
57
57
|
${c('run')} Process all open + pending-with-replies tasks
|
|
58
58
|
${c('run open')} Only open (non-pending) tasks
|
|
59
59
|
${c('run pending')} Only pending tasks — check for human replies
|
|
60
|
+
${c('run tasks')} Publish queued ${d('aidev.tasks.json')} entries and exit
|
|
61
|
+
${c('tasks add')} Queue a new task in ${d('aidev.tasks.json')} (interactive)
|
|
62
|
+
${c('tasks ls')} List queued tasks
|
|
63
|
+
${c('tasks update')} ${d('[id]')} Edit a queued task
|
|
64
|
+
${c('tasks remove')} ${d('[id]')} Delete a queued task
|
|
65
|
+
${c('tasks push')} Publish all queued tasks now (same as ${c('run tasks')})
|
|
60
66
|
${c('schedule set')} ${d('<cron>')} Set cron schedule for this directory
|
|
61
67
|
${c('schedule get')} Show current cron schedule
|
|
62
68
|
${c('help')} Show this help message
|
|
@@ -82,6 +88,13 @@ ${b('LOCAL PROVIDER')}
|
|
|
82
88
|
Add ${c('type: non-code')} to frontmatter for tasks that skip git branching.
|
|
83
89
|
Run ${c('aidev init')} with provider ${c('local')} to create the folder structure.
|
|
84
90
|
|
|
91
|
+
${b('LOCAL TASKS FILE')}
|
|
92
|
+
${d('aidev.tasks.json')} queues tasks to publish to your remote provider. Each entry
|
|
93
|
+
has a title, description, type (${c('code')} | ${c('non-code')}), optional priority, tags, and cron.
|
|
94
|
+
Every ${c('aidev run')} publishes pending entries; one-shot entries are removed after
|
|
95
|
+
publishing, cron entries stay and re-publish on schedule. Manage with ${c('aidev tasks')}
|
|
96
|
+
${d('(add / ls / update / remove / push)')} or edit the JSON file directly.
|
|
97
|
+
|
|
85
98
|
${b('NON-CODE TASKS')}
|
|
86
99
|
Tasks tagged with the ${c('NON_CODE_TAG')} are executed without git branching —
|
|
87
100
|
no checkout, commit, push, or PR creation. The AI agent runs the task directly
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":";;;;;AA+BA,wDAUC;AAED,
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AAC;IAC7D,CAAC,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,YAAY,CAAC;EAC9C,YAAY,EAAE,GAAG,sBAAsB,EAAE;QACnC,CAAC,CAAC,YAAY,CAAC;CACtB,CAAC,CAAC;AACH,CAAC"}
|
package/dist/commands/run.d.ts
CHANGED
|
@@ -9,10 +9,12 @@ export declare function getOpenStatus(config: Config): string;
|
|
|
9
9
|
export declare function getInReviewStatus(config: Config): string;
|
|
10
10
|
export type RunFilter = 'all' | 'open' | 'pending';
|
|
11
11
|
export interface SubTask {
|
|
12
|
-
id: number;
|
|
12
|
+
id: number | string;
|
|
13
13
|
title: string;
|
|
14
14
|
description: string;
|
|
15
15
|
status: 'pending' | 'running' | 'done' | 'failed';
|
|
16
|
+
attempts: number;
|
|
17
|
+
lastError?: string;
|
|
16
18
|
}
|
|
17
19
|
export interface ThinkingTaskPlan {
|
|
18
20
|
taskId: string;
|
|
@@ -21,6 +23,11 @@ export interface ThinkingTaskPlan {
|
|
|
21
23
|
}
|
|
22
24
|
export declare function getRunSkipReason(status: string, filter: RunFilter, pendingStatus: string, openStatus?: string): string | null;
|
|
23
25
|
export declare function sortTasksByPriority(tasks: Task[]): Task[];
|
|
26
|
+
export declare function writeTaskPlan(plan: ThinkingTaskPlan): void;
|
|
27
|
+
export declare function readTaskPlan(taskId: string): ThinkingTaskPlan | null;
|
|
28
|
+
export declare function formatSubtaskId(id: number | string): string;
|
|
29
|
+
export declare function subtaskDepth(id: number | string): number;
|
|
30
|
+
export declare function formatSubtaskList(plan: ThinkingTaskPlan): string;
|
|
24
31
|
export declare function runCommand(filter: RunFilter, config: Config, provider: TaskProvider, runners: AIRunner[], nonCodeProvider?: TaskProvider, hooks?: AidevHooks, vm?: HookVM): Promise<void>;
|
|
25
32
|
export declare function hasHumanReply(comments: Comment[], commentPrefix?: string): boolean;
|
|
26
33
|
/**
|
|
@@ -32,6 +39,7 @@ export declare function hasTriggerWord(comments: Comment[], triggerWord: string)
|
|
|
32
39
|
export declare function checkNeedsClarification(task: Task, config: Config, provider: TaskProvider, runners: AIRunner[]): Promise<string | null>;
|
|
33
40
|
export declare function buildConflictResolutionPrompt(task: Task, conflictFiles: string[], context: string): string;
|
|
34
41
|
export declare function buildImplementPrompt(task: Task, context: string): string;
|
|
42
|
+
export declare function splitFailedSubtask(parentTask: Task, plan: ThinkingTaskPlan, failedSubtask: SubTask, runners: AIRunner[]): Promise<SubTask[] | null>;
|
|
35
43
|
/**
|
|
36
44
|
* Attempts to create a PR via `gh` CLI. Falls back to a compare URL if gh is
|
|
37
45
|
* unavailable or PR creation fails.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIjC,OAAO,EAIL,YAAY,EACb,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,UAAU,EAAE,MAAM,EAGnB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIjC,OAAO,EAIL,YAAY,EACb,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,UAAU,EAAE,MAAM,EAGnB,MAAM,UAAU,CAAC;AAMlB,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AAErD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAOvD;AAED,wBAAgB,aA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