@codizelabs/agent-rewake 0.1.1 → 0.2.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 +55 -14
- package/dist/agent-rewake.js +9557 -2385
- 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 +727 -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 with Claude, Codex, Gemini CLI and every other external agent in [Zed](https://zed.dev), in the threads you already have.
|
|
9
|
+
Works with Claude, Codex, Gemini CLI and every other external agent in [Zed](https://zed.dev), in the threads you already have, with previews for Claude Code, Codex, GitHub Copilot CLI, Grok Build, Gemini CLI and Antigravity CLI outside Zed.
|
|
10
10
|
|
|
11
11
|
[](https://www.npmjs.com/package/@codizelabs/agent-rewake)
|
|
12
12
|
[](LICENSE)
|
|
@@ -34,33 +34,72 @@ Coding agents stop at their usage limit: Claude's 5-hour session limit, Codex's
|
|
|
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
36
|
- **Resumes after a usage limit.** When the agent stops, the thread asks once whether to resume, with your resume message ready to edit. At the reset (plus a minute), Rewake sends it and the agent carries on. If the agent is still limited, Rewake waits for the new reset time.
|
|
37
|
-
- **Automatic, if you want.** Turn it on for a thread, or for every new thread, and Rewake schedules the resume without asking. It asks first when a limit resets more than a day away, never resumes credit or billing limits, and never approves permission prompts for you.
|
|
37
|
+
- **Automatic, if you want.** Turn it on for a thread, or for every new thread, and Rewake schedules the resume without asking. It asks first when a limit resets more than a day away, never resumes credit or billing limits (and says so in the thread), and never approves permission prompts for you.
|
|
38
|
+
- **Keeps the computer awake, if it can.** On macOS, while a resume or scheduled message is due within six hours, Rewake stops the computer from idling to sleep (while plugged in, by default) and says so. Closing the lid still puts it to sleep. On every system, `agent-rewake doctor` and the thread tell you if your computer's own sleep settings would let it sleep while a resume waits, and [which settings to change](https://codizelabs.github.io/agent-rewake/docs/#keep-your-computer-awake).
|
|
38
39
|
- **Queues the next steps.** Add follow-up messages that go one after another once the work resumes.
|
|
39
40
|
- **Also: send messages later.** Schedule a message into a thread for a time, or on a repeat (every weekday at 9, or any cron schedule, read back in plain words before it's saved). Your agent can propose follow-ups too; nothing is scheduled until you approve it.
|
|
40
41
|
- **One place for everything.** A **Rewake** menu under the message box, and a schedules page for every thread and agent.
|
|
41
42
|
|
|
42
43
|
No new agent to pick: Rewake sits in front of the agents you already use, under their own names, so your existing threads keep working.
|
|
43
44
|
|
|
45
|
+
## Auto-resume for each agent
|
|
46
|
+
|
|
47
|
+
Find your agent below. Outside Zed, each preview is installed on its own and may change; details are in the [docs](https://codizelabs.github.io/agent-rewake/docs/#outside-zed-previews).
|
|
48
|
+
|
|
49
|
+
### Auto-resume any agent in Zed
|
|
50
|
+
|
|
51
|
+
Claude Agent, Codex, Gemini CLI, GitHub Copilot, OpenCode, goose and every other external agent in Zed's Agent Panel. At a usage limit the thread offers to resume, or resumes on its own with automatic resume on, in the same thread. `npx @codizelabs/agent-rewake install`
|
|
52
|
+
|
|
53
|
+
### Auto-resume Claude Code after a usage limit (preview)
|
|
54
|
+
|
|
55
|
+
In the terminal (the Claude desktop app's Code tab isn't supported yet): at a usage limit, Rewake offers to continue the session after the reset; keep Claude Code open. `/rewake` schedules a message into the session (`/rewake in 1h Run the tests`); `/rewake help` lists the rest. `npx @codizelabs/agent-rewake install --only claude-code`
|
|
56
|
+
|
|
57
|
+
### Auto-resume Codex when the usage limit resets (preview)
|
|
58
|
+
|
|
59
|
+
In the Codex terminal app: trust Rewake's hooks once, then at a usage limit type `rewake` in the thread (Codex refuses slash commands it doesn't know, so it's the one place without the slash), and Rewake continues the thread after the reset. `npx @codizelabs/agent-rewake install --only codex`
|
|
60
|
+
|
|
61
|
+
### Auto-resume GitHub Copilot CLI, Grok Build, Gemini CLI and Antigravity CLI (preview)
|
|
62
|
+
|
|
63
|
+
Once the session is closed, run `npx @codizelabs/agent-rewake continue`, any time before the reset, and Rewake continues the same session when the limit resets. Run `continue --always` once, and from then on Rewake continues closed sessions by itself when the reset is within a day. In Gemini CLI you can also type `/rewake` in the conversation at the limit. `npx @codizelabs/agent-rewake install --only copilot-cli` (or `grok`, `gemini-cli`, `antigravity`)
|
|
64
|
+
|
|
65
|
+
## Is it for you?
|
|
66
|
+
|
|
67
|
+
| Where you use your agent | What Rewake does there | Guide |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| Zed's Agent Panel, with any external agent (Claude Agent, Codex, Gemini CLI…) | Resumes the thread at the reset, and sends messages later | [Zed](https://codizelabs.github.io/agent-rewake/docs/#zed) |
|
|
70
|
+
| Claude Code in a terminal (preview) | Asks once at the limit, then continues the same session | [Claude Code](https://codizelabs.github.io/agent-rewake/docs/#claude-code) |
|
|
71
|
+
| Codex in a terminal (preview) | Type `rewake` at the limit; the thread continues after the reset | [Codex](https://codizelabs.github.io/agent-rewake/docs/#codex) |
|
|
72
|
+
| GitHub Copilot CLI, Gemini CLI, Grok Build, Antigravity CLI (previews) | Continues a closed session after the reset | [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) |
|
|
73
|
+
|
|
74
|
+
It can't reach Zed's own agent (the panel's built-in one), claude.ai or the Claude desktop app's chat.
|
|
75
|
+
|
|
44
76
|
## Quick start
|
|
45
77
|
|
|
46
78
|
```sh
|
|
47
79
|
npx @codizelabs/agent-rewake install
|
|
48
80
|
```
|
|
49
81
|
|
|
50
|
-
`install`
|
|
82
|
+
In a terminal, `install` shows what it found on your computer (Zed and each coding agent) 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. Everything except Zed is a preview.
|
|
51
83
|
|
|
52
|
-
Then **quit Zed completely and open it again** (⌘Q on macOS, Ctrl+Q on Linux; on Windows, close every Zed window).
|
|
84
|
+
For 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.
|
|
53
85
|
|
|
54
|
-
|
|
86
|
+
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.
|
|
87
|
+
|
|
88
|
+
Check the setup at any time. `doctor` looks at Zed, its settings and agents, Rewake, 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
89
|
|
|
56
90
|
```sh
|
|
57
91
|
npx @codizelabs/agent-rewake doctor
|
|
58
92
|
```
|
|
59
93
|
|
|
94
|
+
### Updating
|
|
95
|
+
|
|
96
|
+
From any version, the same two steps: run `npx @codizelabs/agent-rewake@latest install`, then quit Zed completely and open it again. Your threads, 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, hover over the **Rewake** menu, or run `agent-rewake --version`. **Settings…**, the menu's **Rewake** entry (About) and the schedules page show it too.
|
|
97
|
+
|
|
60
98
|
### Requirements
|
|
61
99
|
|
|
62
|
-
- [Zed](https://zed.dev) 1.22 or newer, with at least one external agent set up (for example Claude Agent, signed in)
|
|
63
100
|
- [Node.js](https://nodejs.org) 22 or newer
|
|
101
|
+
- 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
|
|
102
|
+
- For a preview: a recent version of that agent ([the versions](https://codizelabs.github.io/agent-rewake/docs/#outside-zed-previews))
|
|
64
103
|
- macOS, Linux (including Flatpak Zed) or Windows
|
|
65
104
|
|
|
66
105
|
## How it works
|
|
@@ -75,18 +114,20 @@ Zed talks to external agents over the [Agent Client Protocol](https://agentclien
|
|
|
75
114
|
|
|
76
115
|
| To… | In the thread | Or type |
|
|
77
116
|
|---|---|---|
|
|
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…** | `/
|
|
117
|
+
| Resume after a limit | **Rewake → Resume after the usage limit…** (offered automatically) | `/rewake` (or `/rewake 3:30pm`) |
|
|
118
|
+
| Resume automatically | **Rewake → Turn on auto-resume after limits…** | `/rewake auto on` |
|
|
119
|
+
| Schedule a message | **Rewake → Schedule a message…** | `/rewake in 3h Run the tests` |
|
|
120
|
+
| Repeat a message | **Custom time…** in the schedule form | `/rewake every weekday 09:00 Check the build` |
|
|
121
|
+
| See or change messages | **Rewake → Schedules**, **Change a scheduled message…** | `/rewake list` |
|
|
83
122
|
| See every thread | The Zed task **Agent Rewake: schedules** | `npx @codizelabs/agent-rewake ui` |
|
|
84
123
|
|
|
124
|
+
**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.
|
|
125
|
+
|
|
85
126
|
Full guide: **[codizelabs.github.io/agent-rewake/docs](https://codizelabs.github.io/agent-rewake/docs/)**.
|
|
86
127
|
|
|
87
128
|
## Supported agents
|
|
88
129
|
|
|
89
|
-
Rewake works the same way in front of every external agent Zed runs: **Claude Agent, Codex, Gemini CLI, GitHub Copilot, OpenCode, goose** and the rest, npm-based or binary, plus custom agents.
|
|
130
|
+
Rewake works the same way in front of every external agent Zed runs: **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
131
|
|
|
91
132
|
## Privacy
|
|
92
133
|
|
|
@@ -127,4 +168,4 @@ Agent Rewake is free and open source. If it saves you time, you can [support it
|
|
|
127
168
|
</a>
|
|
128
169
|
</p>
|
|
129
170
|
|
|
130
|
-
<sub>Agent Rewake is an independent project, not affiliated with, endorsed by, or sponsored by Anthropic, OpenAI, Google or Zed Industries. Claude
|
|
171
|
+
<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>
|