@leantli/agent-handoff 0.5.0 → 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/README.md +35 -11
- package/dist/cli.js +1 -1
- package/dist/core.js +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# agent-handoff
|
|
2
2
|
|
|
3
|
-
`agent-handoff` gives coding agents a small shared memory layer for new
|
|
4
|
-
fresh clones, git worktrees, and devices.
|
|
3
|
+
`agent-handoff` gives coding agents a small shared memory layer for new
|
|
4
|
+
sessions, fresh clones, git worktrees, and devices.
|
|
5
5
|
|
|
6
6
|
Long agent sessions accumulate useful context: project background, current task
|
|
7
7
|
state, decisions, preferences, and repeated corrections. Without a handoff
|
|
@@ -10,7 +10,7 @@ layer, the next session starts cold.
|
|
|
10
10
|
`agent-handoff` stores that context under `~/.agent-handoff` by default. It does
|
|
11
11
|
not modify `AGENTS.md`, `CLAUDE.md`, or other project instruction files.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Quick Start
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
npm install -g @leantli/agent-handoff
|
|
@@ -24,15 +24,23 @@ npm install -g github:leantli/agent-handoff
|
|
|
24
24
|
agent-handoff enable
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
`enable`
|
|
28
|
-
`~/.agents/skills` for agents that read user-level skills. The skill tells those
|
|
29
|
-
agents when to run `start`, `checkpoint`, and `learn`.
|
|
27
|
+
`enable` does two things:
|
|
30
28
|
|
|
31
|
-
|
|
29
|
+
- creates local memory under `~/.agent-handoff`
|
|
30
|
+
- installs the packaged skill under `~/.agents/skills/agent-handoff`
|
|
31
|
+
|
|
32
|
+
Agents that load user-level skills can then discover when to run
|
|
33
|
+
`agent-handoff start`, `checkpoint`, `learn`, and `sync`. Existing agent
|
|
34
|
+
sessions may need to be restarted before they see the new skill.
|
|
35
|
+
|
|
36
|
+
The tool never edits `AGENTS.md`, `CLAUDE.md`, or project instruction files.
|
|
32
37
|
|
|
33
38
|
## Daily Workflow
|
|
34
39
|
|
|
35
|
-
|
|
40
|
+
Run project-aware commands from inside the real project repository, not from a
|
|
41
|
+
parent workspace that contains many repositories.
|
|
42
|
+
|
|
43
|
+
At the start of a coding session in a repo:
|
|
36
44
|
|
|
37
45
|
```bash
|
|
38
46
|
agent-handoff status
|
|
@@ -57,14 +65,17 @@ agent-handoff learn --kind preference --note "Prefer small focused diffs."
|
|
|
57
65
|
For project-specific decisions or branch-specific context:
|
|
58
66
|
|
|
59
67
|
```bash
|
|
60
|
-
agent-handoff learn --scope project --kind decision --note "Use
|
|
68
|
+
agent-handoff learn --scope project --kind decision --note "Use TypeScript for the CLI."
|
|
61
69
|
agent-handoff learn --scope branch --kind context --note "This branch is testing v0.5."
|
|
62
70
|
```
|
|
63
71
|
|
|
64
72
|
## Cross-Device Sync
|
|
65
73
|
|
|
66
|
-
Local cross-session memory works
|
|
67
|
-
|
|
74
|
+
Local cross-session memory works immediately after `agent-handoff enable`. No
|
|
75
|
+
git repository is needed for the vault.
|
|
76
|
+
|
|
77
|
+
Cross-device sync is optional. To share memory across devices, create a private
|
|
78
|
+
git repository for the vault, then run:
|
|
68
79
|
|
|
69
80
|
```bash
|
|
70
81
|
agent-handoff sync init git@github.com:you/agent-handoff-vault.git
|
|
@@ -91,6 +102,19 @@ github.com__p1cn__loop
|
|
|
91
102
|
If `.agent-handoff.yml` exists, its `project_id` is used as an override. The
|
|
92
103
|
tool does not require this file for normal git repositories.
|
|
93
104
|
|
|
105
|
+
In a workspace like this:
|
|
106
|
+
|
|
107
|
+
```text
|
|
108
|
+
~/workspace/
|
|
109
|
+
app-one/
|
|
110
|
+
app-two/
|
|
111
|
+
app-three/
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
run `agent-handoff start`, `checkpoint`, and project or branch `learn` commands
|
|
115
|
+
from `~/workspace/app-one`, `~/workspace/app-two`, or whichever repository is
|
|
116
|
+
actually being edited. Global preferences can be written from anywhere.
|
|
117
|
+
|
|
94
118
|
## What Gets Stored
|
|
95
119
|
|
|
96
120
|
```text
|
package/dist/cli.js
CHANGED
|
@@ -25,7 +25,7 @@ function buildProgram(stdout, stderr, stdin, cwd) {
|
|
|
25
25
|
program
|
|
26
26
|
.name("agent-handoff")
|
|
27
27
|
.description("Shared vault handoff memory for coding agents.")
|
|
28
|
-
.version("agent-handoff 0.5.
|
|
28
|
+
.version("agent-handoff 0.5.2")
|
|
29
29
|
.exitOverride()
|
|
30
30
|
.configureOutput({
|
|
31
31
|
writeOut: (str) => stdout.write(str),
|
package/dist/core.js
CHANGED
|
@@ -264,10 +264,11 @@ export function syncVault(opts = {}) {
|
|
|
264
264
|
}
|
|
265
265
|
const branch = gitOutput(setup.vault, ["branch", "--show-current"]) ?? "main";
|
|
266
266
|
const pull = gitRun(setup.vault, ["pull", "--rebase", "--autostash", "origin", branch]);
|
|
267
|
-
|
|
267
|
+
const ignoredEmptyRemotePull = pull.status !== 0 && isEmptyRemotePull(pull.output);
|
|
268
|
+
if (pull.status !== 0 && !ignoredEmptyRemotePull) {
|
|
268
269
|
throw new HandoffError(pull.output.trim() || "git pull failed");
|
|
269
270
|
}
|
|
270
|
-
if (pull.output.trim())
|
|
271
|
+
if (!ignoredEmptyRemotePull && pull.output.trim())
|
|
271
272
|
outputs.push(pull.output.trim());
|
|
272
273
|
const push = gitRun(setup.vault, ["push", "-u", "origin", branch]);
|
|
273
274
|
if (push.status !== 0) {
|