@codizelabs/agent-rewake 0.1.1 → 0.3.0
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/README.md +63 -27
- package/dist/agent-rewake.js +11325 -3460
- package/dist/hosts/claude-code/.claude-plugin/marketplace.json +12 -0
- package/dist/hosts/claude-code/.claude-plugin/plugin.json +17 -0
- package/dist/hosts/claude-code/hooks/hooks.json +1 -0
- package/dist/hosts/claude-code/hooks/logic.js +382 -0
- package/dist/hosts/claude-code/hooks/register.js +791 -0
- package/package.json +11 -4
package/README.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
# Agent Rewake
|
|
6
6
|
|
|
7
|
-
**
|
|
7
|
+
**Auto-resume your AI coding agent when its usage limit resets.** Same session, same context, same thread.
|
|
8
8
|
|
|
9
|
-
Works
|
|
9
|
+
Works where you already use your agent: Claude Code in a terminal or in its VS Code and Cursor panel, Codex, GitHub Copilot CLI, Gemini CLI, Grok Build and Antigravity CLI in a terminal, and every external agent in [Zed](https://zed.dev). Everything outside Zed is a preview.
|
|
10
10
|
|
|
11
11
|
[](https://www.npmjs.com/package/@codizelabs/agent-rewake)
|
|
12
12
|
[](LICENSE)
|
|
@@ -33,13 +33,31 @@ Coding agents stop at their usage limit: Claude's 5-hour session limit, Codex's
|
|
|
33
33
|
|
|
34
34
|
<img src="site/public/images/rewake-demo.gif" alt="A Zed agent thread: the agent stops at its usage limit, Rewake asks whether to resume, and at 5:01 PM the thread continues on its own" width="100%">
|
|
35
35
|
|
|
36
|
-
- **Resumes after a usage limit.** When the agent stops,
|
|
37
|
-
- **Automatic, if you want.**
|
|
38
|
-
- **
|
|
39
|
-
- **
|
|
40
|
-
- **
|
|
36
|
+
- **Resumes after a usage limit.** When the agent stops, Rewake asks once whether to continue (or does it on its own, if you turned that on). At the reset, plus a minute, it sends a message that resumes the same session, and the agent carries on. If the agent is still limited, Rewake waits for the new reset time.
|
|
37
|
+
- **Automatic, if you want.** Choose *from now on* when Rewake asks (Claude Code), turn on auto-resume in Zed's **Rewake** menu, or run `agent-rewake continue --always` (Copilot CLI, Gemini CLI, Grok Build, Antigravity CLI), and Rewake resumes without asking. It asks first when a limit resets more than a day away, never resumes credit or billing limits (and says so), and never approves permission prompts for you.
|
|
38
|
+
- **Sends messages later.** `/rewake in 1h Run the tests` schedules a message into the session (Zed and Claude Code; in Zed also on a repeat, such as every weekday at 9).
|
|
39
|
+
- **Keeps the computer awake, if it can.** On macOS, while a resume is due within six hours, Rewake stops the computer from idling to sleep (while plugged in, by default). Closing the lid still puts it to sleep. `agent-rewake doctor` tells you if your computer's own sleep settings would let it sleep, and [which settings to change](https://codizelabs.github.io/agent-rewake/docs/#keep-your-computer-awake).
|
|
40
|
+
- **Same agent, same session.** No new agent to pick: Rewake works inside or in front of the agents you already use, so your sessions and threads keep going where they stopped.
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
## Where you work
|
|
43
|
+
|
|
44
|
+
Install once with `npx @codizelabs/agent-rewake install`: it finds what's on your computer and lets you pick. Everything outside Zed is a preview: new, installed one place at a time, and it may change. Most previews have been tried on a Mac with a simulated usage limit; none has hit a real one yet ([what's been tried](https://codizelabs.github.io/agent-rewake/docs/#outside-zed-previews)).
|
|
45
|
+
|
|
46
|
+
| Where | Agents | What Rewake does there | Status |
|
|
47
|
+
|---|---|---|---|
|
|
48
|
+
| **A terminal** | Claude Code | Asks once at the limit, then continues the same session. `/rewake` sends messages later | Preview, tried on a Mac |
|
|
49
|
+
| | Codex | Type `rewake` at the limit; the thread continues after the reset | Preview, limit not tried by hand yet |
|
|
50
|
+
| | GitHub Copilot CLI, Gemini CLI, Grok Build | Continues a closed session after the reset (`agent-rewake continue`, or on its own) | Preview, tried on a Mac |
|
|
51
|
+
| | Antigravity CLI | The same | Preview, not tried yet |
|
|
52
|
+
| **VS Code, Cursor** | Claude Code's panel | The same as in a terminal: the same plugin loads there | Preview, tried on a Mac |
|
|
53
|
+
| | Codex's extension | Rewake's hooks show up there, waiting to be trusted; the rest isn't tried yet | Not tried yet |
|
|
54
|
+
| | Cursor's own agent | At a usage limit, continues the chat at the time you choose (within 4 hours), while its window stays open | Preview, limit not tried yet |
|
|
55
|
+
| **Zed** | Claude Agent, Codex, Gemini CLI, GitHub Copilot, OpenCode, goose and every other external agent | Resumes the thread at the reset; a **Rewake** menu, scheduled and repeating messages, a schedules page | In daily use |
|
|
56
|
+
| **JetBrains IDEs, Devin Desktop** | Claude Agent, Codex (picked in AI Assistant or the agent selector) | Resumes after a limit while the IDE stays open, through the same add-on as in Zed | Preview, not tried yet |
|
|
57
|
+
|
|
58
|
+
Not supported yet: GitHub Copilot's own chat in VS Code, and the Claude desktop app's Code tab (not tried yet). Out of reach: claude.ai, the Claude desktop app's chat and Zed's own built-in agent, which let no add-on in.
|
|
59
|
+
|
|
60
|
+
Guides for each: [Claude Code](https://codizelabs.github.io/agent-rewake/docs/#claude-code) · [Codex](https://codizelabs.github.io/agent-rewake/docs/#codex) · [Copilot CLI](https://codizelabs.github.io/agent-rewake/docs/#github-copilot-cli) · [Gemini CLI](https://codizelabs.github.io/agent-rewake/docs/#gemini-cli) · [Grok Build](https://codizelabs.github.io/agent-rewake/docs/#grok-build) · [Antigravity CLI](https://codizelabs.github.io/agent-rewake/docs/#antigravity-cli) · [Cursor](https://codizelabs.github.io/agent-rewake/docs/#cursor) · [Zed](https://codizelabs.github.io/agent-rewake/docs/#zed)
|
|
43
61
|
|
|
44
62
|
## Quick start
|
|
45
63
|
|
|
@@ -47,46 +65,64 @@ No new agent to pick: Rewake sits in front of the agents you already use, under
|
|
|
47
65
|
npx @codizelabs/agent-rewake install
|
|
48
66
|
```
|
|
49
67
|
|
|
50
|
-
`install`
|
|
68
|
+
`install` shows what it found on your computer (each coding agent, your editors, Zed) and what Rewake does in each. Tick the places you want, see every change together, and answer once; one line per place then gives its next step, for example:
|
|
69
|
+
|
|
70
|
+
- **Claude Code** (terminal, VS Code, Cursor): start a new session.
|
|
71
|
+
- **Codex**: open it once and trust Rewake's hooks when it says "Hooks need review".
|
|
72
|
+
- **Copilot CLI, Gemini CLI, Grok Build, Antigravity CLI**: start a new session.
|
|
73
|
+
- **Zed, JetBrains, Devin Desktop**: restart the app (below for Zed).
|
|
74
|
+
|
|
75
|
+
**In Zed,** `install` lists the agents it will add Rewake to. Each settings file is backed up first, and your comments and settings are kept. Then **quit Zed completely and open it again** (⌘Q on macOS, Ctrl+Q on Linux; on Windows, close every Zed window), open the **Agent Panel**, and open or start a thread with one of your agents. Zed starts Rewake with that thread, not when Zed itself starts. A **Rewake** menu now sits under the message box, next to the model picker.
|
|
51
76
|
|
|
52
|
-
|
|
77
|
+
If you have no external agents yet, `install` offers to add **Claude Agent**: pick it in the Agent Panel and sign in with your Claude account.
|
|
53
78
|
|
|
54
|
-
Check the setup at any time:
|
|
79
|
+
Check the setup at any time. `doctor` looks at every place you set up (Zed and its agents, each preview), sign-in, your scheduled messages and recent problems, and says in plain words what's left to do. It works offline and prints no folders, accounts or keys:
|
|
55
80
|
|
|
56
81
|
```sh
|
|
57
82
|
npx @codizelabs/agent-rewake doctor
|
|
58
83
|
```
|
|
59
84
|
|
|
85
|
+
### Updating
|
|
86
|
+
|
|
87
|
+
From any version: run `npx @codizelabs/agent-rewake@latest install`. Previews use the new version from their next session; in Zed, quit Zed completely and open it again. Your sessions, scheduled messages and settings stay. Details, and any version-specific steps (none so far), are in the [docs](https://codizelabs.github.io/agent-rewake/docs/#update). To see which version you run: `agent-rewake --version` (in Zed also the **Rewake** menu).
|
|
88
|
+
|
|
60
89
|
### Requirements
|
|
61
90
|
|
|
62
|
-
- [Zed](https://zed.dev) 1.22 or newer, with at least one external agent set up (for example Claude Agent, signed in)
|
|
63
91
|
- [Node.js](https://nodejs.org) 22 or newer
|
|
92
|
+
- For Zed: [Zed](https://zed.dev) 1.22 or newer, with its AI features on, and an external agent in the Agent Panel (for example Claude Agent, signed in). `install` can add Claude Agent for you
|
|
93
|
+
- For a preview: a recent version of that agent ([the versions](https://codizelabs.github.io/agent-rewake/docs/#outside-zed-previews))
|
|
64
94
|
- macOS, Linux (including Flatpak Zed) or Windows
|
|
65
95
|
|
|
66
96
|
## How it works
|
|
67
97
|
|
|
68
|
-
|
|
69
|
-
Zed ⇄ Agent Rewake ⇄ your agent (Claude, Codex, Gemini…)
|
|
70
|
-
```
|
|
98
|
+
Rewake joins each agent the way that agent allows, and always continues the same session:
|
|
71
99
|
|
|
72
|
-
|
|
100
|
+
- **Inside the agent**: a plugin in Claude Code's own session (terminal, VS Code, Cursor). It sees the limit, asks, and sends the resume message itself, while Claude Code stays open.
|
|
101
|
+
- **Through the agent's hooks**: Codex, Copilot CLI, Gemini CLI, Grok Build and Antigravity CLI tell Rewake about the limit (and you say when, with `rewake`, `/rewake` or `agent-rewake continue`, unless Rewake does it on its own); at the reset your system's own timer runs Rewake once, and it continues the closed session with the agent's own resume command (Codex: its own message queue).
|
|
102
|
+
- **In front of the agent**: in Zed, JetBrains and Devin Desktop, the editor talks to agents over the [Agent Client Protocol](https://agentclientprotocol.com). Rewake sits on that connection, passes everything through unchanged, adds its menu and forms (in Zed), and sends messages into the same thread at the right time.
|
|
103
|
+
|
|
104
|
+
Everything runs on your computer; nothing runs in the cloud.
|
|
73
105
|
|
|
74
106
|
## Use it
|
|
75
107
|
|
|
76
|
-
|
|
108
|
+
In Zed, the **Rewake** menu under the message box does everything; elsewhere, type `/rewake` in the session (in Codex, `rewake` without the slash), or run `agent-rewake continue` in a terminal for a closed session.
|
|
109
|
+
|
|
110
|
+
| To… | In Zed | Elsewhere |
|
|
77
111
|
|---|---|---|
|
|
78
|
-
| Resume after a limit | **Rewake → Resume after the usage limit…** (offered automatically) | `/
|
|
79
|
-
| Resume automatically | **Rewake → Turn on auto-resume after limits…** | `/
|
|
80
|
-
| Schedule a message | **Rewake → Schedule a message…** | `/
|
|
81
|
-
| Repeat a message | **Custom time…** in the schedule form
|
|
82
|
-
| See or change messages | **Rewake → Schedules**, **Change a scheduled message…** | `/
|
|
83
|
-
| See
|
|
112
|
+
| Resume after a limit | **Rewake → Resume after the usage limit…** (offered automatically) | Answer Rewake's question, or type `/rewake` (or `/rewake 3:30pm`); for a closed session, `agent-rewake continue` |
|
|
113
|
+
| Resume automatically | **Rewake → Turn on auto-resume after limits…** | Choose "from now on" in Rewake's question, `/rewake auto on` (Claude Code only), or `agent-rewake continue --always` (every agent outside Zed, Claude Code included) |
|
|
114
|
+
| Schedule a message | **Rewake → Schedule a message…** | `/rewake in 3h Run the tests` (Claude Code) |
|
|
115
|
+
| Repeat a message | **Custom time…** in the schedule form, or `/rewake every weekday 09:00 Check the build` | Not yet |
|
|
116
|
+
| See or change messages | **Rewake → Schedules**, **Change a scheduled message…** | `/rewake list`, `/rewake cancel N` (Claude Code, Gemini CLI; in Codex without the slash) |
|
|
117
|
+
| See what's planned | The Zed task **Agent Rewake: schedules** | `/rewake list` in the session; `agent-rewake doctor` shows the next planned resume of a closed session |
|
|
118
|
+
|
|
119
|
+
**One command everywhere:** `/rewake` is the same in Zed, Claude Code and Gemini CLI (in Codex, type `rewake` without the slash). At a usage limit it continues after the reset; `/rewake <time>` continues then, `/rewake cancel` cancels it, and `/rewake help` lists what else works where you are. Rewake answers it itself, without using the model.
|
|
84
120
|
|
|
85
121
|
Full guide: **[codizelabs.github.io/agent-rewake/docs](https://codizelabs.github.io/agent-rewake/docs/)**.
|
|
86
122
|
|
|
87
|
-
##
|
|
123
|
+
## Agents in Zed
|
|
88
124
|
|
|
89
|
-
Rewake works the same way in front of every external agent
|
|
125
|
+
In Zed, Rewake works the same way in front of every external agent: **Claude Agent, Codex, Gemini CLI, GitHub Copilot, OpenCode, goose** and the rest, npm-based or binary, plus custom agents. Rewake knows how each of them reports a limit: an error, its own error codes, or a last line such as Cursor's "Upgrade your plan to continue". When the agent says when the limit resets, in any of the formats agents use, Rewake resumes at that time; otherwise it lets you pick when.
|
|
90
126
|
|
|
91
127
|
## Privacy
|
|
92
128
|
|
|
@@ -104,7 +140,7 @@ This puts every agent back the way it was. `doctor` shows the folder where Rewak
|
|
|
104
140
|
|
|
105
141
|
## Status
|
|
106
142
|
|
|
107
|
-
|
|
143
|
+
Version 0.2. Rewake's automated tests run on macOS, Linux and Windows with Node.js 22 and 24, and the author uses it daily in Zed. The previews outside Zed are new: the docs say [what's been tried for each](https://codizelabs.github.io/agent-rewake/docs/#outside-zed-previews), and what hasn't. Feedback and bug reports are very welcome: [open an issue](https://github.com/codizelabs/agent-rewake/issues/new/choose).
|
|
108
144
|
|
|
109
145
|
## Contributing
|
|
110
146
|
|
|
@@ -127,4 +163,4 @@ Agent Rewake is free and open source. If it saves you time, you can [support it
|
|
|
127
163
|
</a>
|
|
128
164
|
</p>
|
|
129
165
|
|
|
130
|
-
<sub>Agent Rewake is an independent project, not affiliated with, endorsed by, or sponsored by Anthropic, OpenAI, Google or Zed Industries. Claude
|
|
166
|
+
<sub>Agent Rewake is an independent project, not affiliated with, endorsed by, or sponsored by Anthropic, OpenAI, Google, GitHub, xAI or Zed Industries. Claude and Claude Code are trademarks of Anthropic, PBC. Zed is a trademark of Zed Industries, Inc. Other product names are trademarks of their owners.</sub>
|