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

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 +39 -24
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,44 +1,59 @@
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
+ Several loops can coexist. Loop is a minor mode and remains active while at least one scheduled prompt belongs to the current session.
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
+ > **Alpha:** launcher and scheduling contracts may change between releases.
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
+ ## Requirements
10
+
11
+ - Node.js 22.19.0 or newer
12
+ - Pi 0.84.2 and Pi TUI 0.84.2
16
13
 
17
14
  ## Install
18
15
 
16
+ DoomPi loads Loop as core. For standalone Pi:
17
+
19
18
  ```bash
20
- npm install @agimon-ai/doompi-loop
19
+ pi install npm:@agimon-ai/doompi-loop
21
20
  ```
22
21
 
23
- ## How it loads
22
+ ## Start and manage loops
23
+
24
+ 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.
25
+
26
+ 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.
27
+
28
+ 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
29
 
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.
30
+ ## Lifecycle and cost
27
31
 
28
- ## Leader
32
+ 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
33
 
30
- - `SPC l s` starts a loop.
31
- - `SPC l l` lists active loops and lets you stop one.
34
+ 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
35
 
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.
36
+ ## Public API
35
37
 
36
- ## Entry points
38
+ ```ts
39
+ import {
40
+ createDefaultLoopLauncher,
41
+ createLoopLauncherClient,
42
+ registerLoopExtension,
43
+ registerLoopLauncher,
44
+ } from '@agimon-ai/doompi-loop';
45
+ ```
46
+
47
+ Other extensions can register a launcher alongside the default prompt launcher without forking the scheduler.
48
+
49
+ ## Development
37
50
 
38
- | Import | Purpose |
39
- | -------------------------------------- | ------------------------ |
40
- | `@agimon-ai/doompi-loop` | Library API |
41
- | `@agimon-ai/doompi-loop/extensions/pi` | Pi extension entry point |
51
+ ```bash
52
+ pnpm build
53
+ pnpm typecheck
54
+ pnpm test
55
+ pnpm lint
56
+ ```
42
57
 
43
58
  ## License
44
59
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/doompi-loop",
3
- "version": "0.0.1-alpha.21",
3
+ "version": "0.0.1-alpha.22",
4
4
  "description": "Generic multi-loop controller for Doompi",
5
5
  "keywords": [
6
6
  "ai",
@@ -37,8 +37,8 @@
37
37
  "access": "public"
38
38
  },
39
39
  "dependencies": {
40
- "@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.21",
41
- "@agimon-ai/doompi-ui": "0.0.1-alpha.21"
40
+ "@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.22",
41
+ "@agimon-ai/doompi-ui": "0.0.1-alpha.22"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@earendil-works/pi-coding-agent": "0.84.2",