@agimon-ai/doompi-loop 0.0.1-alpha.21 → 0.0.1-alpha.23

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 (2) hide show
  1. package/README.md +43 -24
  2. package/package.json +9 -7
package/README.md CHANGED
@@ -1,44 +1,63 @@
1
1
  # @agimon-ai/doompi-loop
2
2
 
3
- **Run it now. Run it again later.**
3
+ A session-scoped scheduler that sends a prompt immediately and repeats it at a bounded interval.
4
4
 
5
- This package runs a prompt immediately, then repeats it on a schedule. Several loops can
6
- live in one Pi session, each with its own prompt and interval. Loop is a minor mode: it
7
- turns on when work is scheduled, stacks with the other modes, and reports itself on the
8
- shared `MODES` line.
5
+ Part of the [DoomPi distribution](https://www.npmjs.com/package/@agimon-ai/doompi).
9
6
 
10
- The built-in Default loop asks for a prompt and interval. Other extensions can register
11
- their own launchers beside it, so a domain can add a recurring job without forking the
12
- scheduler.
7
+ Several loops can coexist. Loop is a minor mode and remains active while at least one scheduled prompt belongs to the current session.
13
8
 
14
- This is part of [Doompi](https://www.npmjs.com/package/@agimon-ai/doompi). Most users get
15
- it with the distribution.
9
+ > **Alpha:** launcher and scheduling contracts may change between releases.
10
+
11
+ ## Requirements
12
+
13
+ - Node.js 22.19.0 or newer
14
+ - Pi 0.84.2 and Pi TUI 0.84.2
16
15
 
17
16
  ## Install
18
17
 
18
+ DoomPi loads Loop as core. For standalone Pi:
19
+
19
20
  ```bash
20
- npm install @agimon-ai/doompi-loop
21
+ pi install npm:@agimon-ai/doompi-loop
21
22
  ```
22
23
 
23
- ## How it loads
24
+ ## Start and manage loops
25
+
26
+ Use `/loop` to start a loop and `/loops` to inspect or stop active loops. In DoomPi, `SPC l s` opens the start flow and `SPC l l` opens the list.
27
+
28
+ The default interval is 300 seconds. Accepted intervals range from 30 to 3600 seconds. A loop runs its prompt once immediately, then schedules later passes.
29
+
30
+ If Pi is busy, a due pass waits for the shared agent to become idle. Multiple due signals can coalesce rather than creating overlapping model turns. Stopping a loop prevents future passes but does not rewind side effects from a pass already sent.
24
31
 
25
- Doompi loads Loop as core. It is not a major-mode layer and does not appear in
26
- `.doom/modes.yaml`. The bare package name follows its Pi manifest and loads the Pi adapter.
32
+ ## Lifecycle and cost
27
33
 
28
- ## Leader
34
+ Loop state is held in session memory; it is not a durable queue. Session replacement or shutdown stops the timers. A resumed transcript does not imply that old loops restart.
29
35
 
30
- - `SPC l s` starts a loop.
31
- - `SPC l l` lists active loops and lets you stop one.
36
+ Every pass can start another model turn and repeat tool or external side effects. Choose conservative intervals, make prompts idempotent where possible, and stop loops when the recurring work is complete.
32
37
 
33
- Use Loop for recurring checks or prompts that belong to the current session. Use several
34
- when the schedules are independent; there is no single-loop lock.
38
+ ## Public API
35
39
 
36
- ## Entry points
40
+ ```ts
41
+ import {
42
+ createDefaultLoopLauncher,
43
+ createLoopLauncherClient,
44
+ registerLoopExtension,
45
+ registerLoopLauncher,
46
+ } from '@agimon-ai/doompi-loop';
47
+ ```
48
+
49
+ Other extensions can register a launcher alongside the default prompt launcher without forking the scheduler.
50
+
51
+ ## Development
52
+
53
+ ```bash
54
+ pnpm build
55
+ pnpm typecheck
56
+ pnpm test
57
+ pnpm lint
58
+ ```
37
59
 
38
- | Import | Purpose |
39
- | -------------------------------------- | ------------------------ |
40
- | `@agimon-ai/doompi-loop` | Library API |
41
- | `@agimon-ai/doompi-loop/extensions/pi` | Pi extension entry point |
60
+ Maintained by [Agimon](https://agimon.ai/about).
42
61
 
43
62
  ## License
44
63
 
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "@agimon-ai/doompi-loop",
3
- "version": "0.0.1-alpha.21",
4
- "description": "Generic multi-loop controller for Doompi",
3
+ "version": "0.0.1-alpha.23",
4
+ "description": "Session-scoped recurring prompt scheduler and loop controls for Pi coding agents.",
5
5
  "keywords": [
6
- "ai",
6
+ "automation",
7
7
  "coding-agent",
8
- "developer-tools",
9
8
  "doompi",
10
- "pi-package"
9
+ "pi-coding-agent",
10
+ "pi-extension",
11
+ "prompt-scheduler",
12
+ "recurring-tasks"
11
13
  ],
12
14
  "homepage": "https://agimon.ai",
13
15
  "license": "MIT",
@@ -37,8 +39,8 @@
37
39
  "access": "public"
38
40
  },
39
41
  "dependencies": {
40
- "@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.21",
41
- "@agimon-ai/doompi-ui": "0.0.1-alpha.21"
42
+ "@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.23",
43
+ "@agimon-ai/doompi-ui": "0.0.1-alpha.23"
42
44
  },
43
45
  "devDependencies": {
44
46
  "@earendil-works/pi-coding-agent": "0.84.2",