agents-handoff 0.0.0-stage → 2.0.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +150 -0
  2. package/LICENSE +21 -0
  3. package/README.md +110 -2
  4. package/SKILL.md +147 -0
  5. package/capability-registry.json +27 -0
  6. package/docs/ARCHITECTURE.md +164 -0
  7. package/docs/CHANGELOG.md +151 -0
  8. package/docs/CLI.md +196 -0
  9. package/docs/COMPATIBILITY.md +124 -0
  10. package/docs/CONTRIBUTING.md +134 -0
  11. package/docs/FORMAT.md +157 -0
  12. package/docs/INSTALL.md +179 -0
  13. package/docs/INTEGRATION.md +188 -0
  14. package/docs/LEVEL4.md +202 -0
  15. package/docs/LEVEL5.md +96 -0
  16. package/docs/PERMISSIONS.md +145 -0
  17. package/docs/PROVENANCE.md +83 -0
  18. package/docs/SECURITY.md +93 -0
  19. package/docs/SESSIONS.md +66 -0
  20. package/docs/TROUBLESHOOTING.md +158 -0
  21. package/docs/UNINSTALL.md +122 -0
  22. package/docs/UPGRADE.md +139 -0
  23. package/docs/_config.yml +16 -0
  24. package/docs/_data/nav.yml +36 -0
  25. package/docs/_layouts/default.html +31 -0
  26. package/docs/assets/style.css +88 -0
  27. package/docs/index.md +83 -0
  28. package/handoff.config.example.json +35 -0
  29. package/handoff.config.schema.json +117 -0
  30. package/install/CHANGELOG.md +48 -0
  31. package/install/README.md +76 -0
  32. package/install/install.mjs +856 -0
  33. package/install/package.json +39 -0
  34. package/package.json +66 -4
  35. package/permission-policy.json +33 -0
  36. package/refs/ADAPTERS.md +33 -0
  37. package/refs/bootstrap.md +59 -0
  38. package/refs/brief-checklist.md +79 -0
  39. package/refs/handbook.md +58 -0
  40. package/refs/protocol.md +117 -0
  41. package/refs/roles.md +75 -0
  42. package/refs/validator.md +73 -0
  43. package/schemas/handoff.schema.json +275 -0
  44. package/skill.json +147 -0
  45. package/templates/HANDOFF.llm.schema.json +144 -0
  46. package/templates/HANDOFF.template.md +40 -0
  47. package/tests/acceptance/acceptance.yaml +209 -0
  48. package/tests/fixtures/minimal-transcript.jsonl +2 -0
  49. package/tools/agent-handoff.mjs +410 -0
  50. package/tools/capability-registry.mjs +120 -0
  51. package/tools/handoff.mjs +398 -0
  52. package/tools/handoff.test.mjs +465 -0
  53. package/tools/lib/handoff-root.mjs +161 -0
  54. package/tools/runtime-engine.mjs +330 -0
package/docs/index.md ADDED
@@ -0,0 +1,83 @@
1
+ ---
2
+ title: agent-handoff
3
+ ---
4
+
5
+ # agent-handoff documentation
6
+
7
+ agent-handoff turns an AI working session — chat turns, tool calls, reasoning, however the
8
+ client stored it — into a folder of plain files that a different agent, a different harness,
9
+ or a colleague can read and continue from without the original chat. It builds from a
10
+ transcript or an adapter export, keeps a hash chain so a handoff can be re-verified, and
11
+ merges later turns into the same session instead of duplicating it.
12
+
13
+ ## Quick start
14
+
15
+ ```bash
16
+ # 1. Install the skill
17
+ npx agents-handoff
18
+
19
+ # 2. Build a handoff from a transcript
20
+ node tools/handoff.mjs build --source transcript.jsonl --project my-project
21
+
22
+ # 3. Find it, read it, check it
23
+ node tools/handoff.mjs list
24
+ node tools/handoff.mjs show <id-prefix>
25
+ node tools/handoff.mjs verify <id-prefix>
26
+ ```
27
+
28
+ `build` also accepts `--session`, `--harness`, `--model` and `--objective`. Run
29
+ `node tools/handoff.mjs config` to see which store root the engine resolved and why.
30
+
31
+ ## Where to start
32
+
33
+ | If you want to… | Read |
34
+ |---|---|
35
+ | install it | [INSTALL.md](INSTALL.md) |
36
+ | understand how the pieces fit | [ARCHITECTURE.md](ARCHITECTURE.md) |
37
+ | look up a command, flag or exit code | [CLI.md](CLI.md) |
38
+ | know exactly what a handoff folder holds | [FORMAT.md](FORMAT.md) |
39
+ | see captured sessions, and check them | [SESSIONS.md](SESSIONS.md) |
40
+ | fix something that is not working | [TROUBLESHOOTING.md](TROUBLESHOOTING.md) |
41
+ | feed it a transcript from your own tool | [INTEGRATION.md](INTEGRATION.md) and [../refs/ADAPTERS.md](https://github.com/Alot1z/agent-handoff/blob/main/refs/ADAPTERS.md) |
42
+ | understand what the hashes prove | [PROVENANCE.md](PROVENANCE.md) |
43
+
44
+ ## All pages
45
+
46
+ | Document | Contents |
47
+ |---|---|
48
+ | [INSTALL.md](INSTALL.md) | Installer commands, install locations, requirements |
49
+ | [UPGRADE.md](UPGRADE.md) | Updating an installation, pinning a version, what a version change touches |
50
+ | [UNINSTALL.md](UNINSTALL.md) | Removing an installation, and which files are deliberately kept |
51
+ | [ARCHITECTURE.md](ARCHITECTURE.md) | The layers, the data flow, the store root, the write-safety discipline, the boundaries |
52
+ | [CLI.md](CLI.md) | Every executable, verb, flag, exit code, environment variable and file written |
53
+ | [FORMAT.md](FORMAT.md) | Handoff folder layout, every file in it, the manifest and the schemas |
54
+ | [SESSIONS.md](SESSIONS.md) | Session index: a sample store, its captured sessions, and how to verify and re-render them |
55
+ | [INTEGRATION.md](INTEGRATION.md) | Embedding the engine, configuration and environment, CI and pipeline use |
56
+ | [LEVEL4.md](LEVEL4.md) | Dynamic runtime layer: runtime verbs, gates and promotion |
57
+ | [LEVEL5.md](LEVEL5.md) | Collaborative dispatch: routing a handoff to another agent |
58
+ | [PERMISSIONS.md](PERMISSIONS.md) | Permission levels, risk classes, and the policy file |
59
+ | [SECURITY.md](SECURITY.md) | What is read and written, secrets, malicious input, guarantees not made |
60
+ | [COMPATIBILITY.md](COMPATIBILITY.md) | Platforms, Node versions, input formats, exit codes |
61
+ | [PROVENANCE.md](PROVENANCE.md) | The hash chain, how to verify it, what it cannot prove |
62
+ | [TROUBLESHOOTING.md](TROUBLESHOOTING.md) | Symptom, cause and fix, keyed to the real exit codes |
63
+ | [CONTRIBUTING.md](CONTRIBUTING.md) | Test suite, project layout, how to add an adapter |
64
+ | [Changelog](https://github.com/Alot1z/agent-handoff/blob/main/CHANGELOG.md) | What changed in each release, and how to add an entry |
65
+ | [../refs/ADAPTERS.md](https://github.com/Alot1z/agent-handoff/blob/main/refs/ADAPTERS.md) | Canonical input shape and how each session source maps onto it |
66
+
67
+ ## Engine commands
68
+
69
+ | Command | Effect |
70
+ |---|---|
71
+ | `build --source <file>` | Build or update a handoff from a transcript |
72
+ | `--handoff --source <file>` | Alias of `build` |
73
+ | `list [project-or-prefix]` | List sessions, newest first |
74
+ | `show <id-prefix>` | Print the rendered brief |
75
+ | `verify <id-prefix>` | Re-check the hash chain |
76
+ | `rename <id-prefix> <project>` | Move a session to another project |
77
+ | `retitle <id-prefix> <name>` | Give a session a readable name |
78
+ | `config` | Report the resolved store root, its source and the schema path |
79
+
80
+ Zero dependencies, Node 18 or newer. [CLI.md](CLI.md) has the full command surface, including
81
+ the runtime layer, bounded execution and the capability registry. See
82
+ [../README.md](https://github.com/Alot1z/agent-handoff/blob/main/README.md) for the repository overview and [../SKILL.md](https://github.com/Alot1z/agent-handoff/blob/main/SKILL.md) for
83
+ the skill definition.
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "./handoff.config.schema.json",
3
+ "version": 1,
4
+ "handoff_dir": "handoffs/",
5
+ "project_name": null,
6
+ "auto_capture": false,
7
+ "max_brief_tokens": 30000,
8
+ "exclude_from_handoff": [
9
+ "node_modules/",
10
+ ".git/",
11
+ "dist/",
12
+ "build/",
13
+ "*.token",
14
+ "*.key",
15
+ "*.pem",
16
+ ".env",
17
+ "*.log"
18
+ ],
19
+ "capture": {
20
+ "include_tool_outputs": true,
21
+ "truncate_tool_outputs": false,
22
+ "max_tool_output_length": 100000
23
+ },
24
+ "linking": {
25
+ "enabled": true,
26
+ "min_overlap_score": 0.06
27
+ },
28
+ "integrity": {
29
+ "sha256_manifest": true,
30
+ "verify_on_read": false
31
+ },
32
+ "storage": {
33
+ "type": "filesystem"
34
+ }
35
+ }
@@ -0,0 +1,117 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://github.com/Alot1z/agent-handoff/handoff.config.schema.json",
4
+ "title": "Agent Handoff Configuration",
5
+ "description": "Schema for handoff.config.json — where handoffs are stored, and how a session is captured. Copy handoff.config.example.json to your project root as handoff.config.json to opt in; with no config file the engine keeps its default store. HANDOFFS_ROOT always overrides anything set here.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "$schema": {
10
+ "type": "string",
11
+ "description": "Optional pointer to this schema, for editor completion."
12
+ },
13
+ "version": {
14
+ "type": "integer",
15
+ "enum": [1],
16
+ "default": 1,
17
+ "description": "Config format version."
18
+ },
19
+ "handoff_dir": {
20
+ "type": "string",
21
+ "minLength": 1,
22
+ "default": "handoffs/",
23
+ "description": "Where handoffs are stored. Relative paths resolve against the directory holding this file; absolute paths are used as-is.",
24
+ "examples": ["handoffs/", ".context/handoffs/", "/srv/handoffs/"]
25
+ },
26
+ "project_name": {
27
+ "type": ["string", "null"],
28
+ "default": null,
29
+ "description": "Project used for grouping handoffs. Auto-detected when null."
30
+ },
31
+ "auto_capture": {
32
+ "type": "boolean",
33
+ "default": false,
34
+ "description": "Accepted and validated; reserved — no tool auto-captures sessions yet."
35
+ },
36
+ "max_brief_tokens": {
37
+ "type": "integer",
38
+ "minimum": 1000,
39
+ "maximum": 100000,
40
+ "default": 30000,
41
+ "description": "Accepted and validated; reserved — brief truncation is not implemented."
42
+ },
43
+ "exclude_from_handoff": {
44
+ "type": "array",
45
+ "items": { "type": "string" },
46
+ "default": [
47
+ "node_modules/",
48
+ ".git/",
49
+ "dist/",
50
+ "build/",
51
+ "*.token",
52
+ "*.key",
53
+ "*.pem",
54
+ ".env",
55
+ "*.log"
56
+ ],
57
+ "description": "Accepted and validated; reserved — the engine copies no project trees, so nothing is filtered yet."
58
+ },
59
+ "capture": {
60
+ "type": "object",
61
+ "additionalProperties": false,
62
+ "default": {},
63
+ "properties": {
64
+ "exclude_patterns": { "type": "array", "items": { "type": "string" } },
65
+ "include_tool_outputs": { "type": "boolean", "default": true },
66
+ "truncate_tool_outputs": { "type": "boolean", "default": false },
67
+ "max_tool_output_length": { "type": "integer", "default": 100000, "minimum": 0 }
68
+ }
69
+ },
70
+ "linking": {
71
+ "type": "object",
72
+ "additionalProperties": false,
73
+ "default": {},
74
+ "properties": {
75
+ "enabled": {
76
+ "type": "boolean",
77
+ "default": true,
78
+ "description": "HONOURED: when false, cross-project link notes are not written."
79
+ },
80
+ "min_overlap_score": {
81
+ "type": "number",
82
+ "minimum": 0,
83
+ "maximum": 1,
84
+ "default": 0.06,
85
+ "description": "Accepted and validated; reserved — the engine uses its built-in 0.06 threshold."
86
+ }
87
+ }
88
+ },
89
+ "integrity": {
90
+ "type": "object",
91
+ "additionalProperties": false,
92
+ "default": {},
93
+ "properties": {
94
+ "sha256_manifest": { "type": "boolean", "default": true },
95
+ "verify_on_read": { "type": "boolean", "default": false }
96
+ }
97
+ },
98
+ "storage": {
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "default": {},
102
+ "properties": {
103
+ "type": {
104
+ "type": "string",
105
+ "enum": ["filesystem", "sqlite"],
106
+ "default": "filesystem",
107
+ "description": "Only filesystem is implemented; sqlite validates but is not honoured."
108
+ },
109
+ "path": {
110
+ "type": "string",
111
+ "minLength": 1,
112
+ "description": "HONOURED and beats handoff_dir: an explicit store path."
113
+ }
114
+ }
115
+ }
116
+ }
117
+ }
@@ -0,0 +1,48 @@
1
+ # Changelog — agents-handoff
2
+
3
+ The installer is a separate package from the skill. It follows the same
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format and Semantic Versioning.
5
+
6
+ ## [1.1.0] — 2026-10-09
7
+
8
+ First release published to npm. `npx agents-handoff` now installs the skill on a
9
+ machine that has neither a checkout nor an unpacked archive.
10
+
11
+ ### Added
12
+
13
+ - A download path for the published package. When no skill tree sits beside the installer, the
14
+ archive for the requested version is fetched from
15
+ `https://codeload.github.com/Alot1z/agent-handoff/tar.gz` and unpacked; the same install
16
+ manifest then copies out of it, so an installed copy is identical either way.
17
+ `--version latest` resolves the newest release tag and falls back to the `main` branch,
18
+ saying so, when the repository has no release object.
19
+ - An install that cannot resolve a source file fails with the missing paths and the count,
20
+ instead of warning per file and reporting success.
21
+
22
+ ### Changed
23
+
24
+ - Install sources are written in the shipped tree's terms and resolved against both layouts
25
+ (shipped first, `repo-upstream/` second), so one manifest installs the same files from a
26
+ clone, a release archive, and a fetched archive.
27
+ - The version reported after an install is read back from the installed `SKILL.md`, and the
28
+ fallback version used before a tree exists is parsed from `SKILL.md` too. The shipped suite
29
+ asserts the two agree, so a release cannot install under the previous version number.
30
+
31
+ ### Fixed
32
+
33
+ - `README.md`, `LICENSE` and the twelve guides installed as nothing outside the development
34
+ tree: they were addressed under `repo-upstream/<path>`, which only that tree has.
35
+ - `repository` pointed at a repository that does not serve this package; `homepage` and `bugs`
36
+ were missing.
37
+
38
+ ## [1.0.0] — 2026-10-08
39
+
40
+ ### Added
41
+
42
+ - `install` (default), `update`, `remove`, `verify`, `list` and `where`.
43
+ - Location targets `global`, `local` and `project`, with `--path` for an exact directory.
44
+ - Global root resolution instead of a hard-coded path: an account-skill store that already
45
+ holds `agent-handoff`, else `~/.agents/skills`, else an account-skill store found on the
46
+ machine, else `~/.agents/skills`, created on install. `where` prints the resolved root and
47
+ the rule that chose it. `AGENT_HANDOFF_GLOBAL_DIR` overrides it.
48
+ - `--version` to install a specific version, and `--force` to skip confirmations.
@@ -0,0 +1,76 @@
1
+ # agents-handoff
2
+
3
+ npx installer for the agent-handoff skill.
4
+
5
+ ## Quick start
6
+
7
+ ```bash
8
+ npx agents-handoff
9
+ ```
10
+
11
+ ## Commands
12
+
13
+ | Command | Description |
14
+ |---------|-------------|
15
+ | `install` | Install the skill (default) |
16
+ | `update` | Update to latest or specified version |
17
+ | `remove` | Remove the installation |
18
+ | `verify` | Verify installation integrity |
19
+ | `list` | List all installed locations |
20
+ | `where` | Show the resolved global root and why it was chosen |
21
+
22
+ ## Options
23
+
24
+ | Option | Description |
25
+ |--------|-------------|
26
+ | `--location L` | Install location: `global` (default), `local`, `project` |
27
+ | `--path P` | Custom installation path |
28
+ | `--version V` | Version to install: `latest` (default) or specific version |
29
+ | `--force`, `-f` | Skip confirmations, overwrite existing |
30
+
31
+ ## Examples
32
+
33
+ ```bash
34
+ # Install to global location
35
+ npx agents-handoff
36
+
37
+ # Install to project-local
38
+ npx agents-handoff --location project
39
+
40
+ # Update to latest
41
+ npx agents-handoff --update
42
+
43
+ # Remove without confirmation
44
+ npx agents-handoff --remove --force
45
+
46
+ # Verify installation
47
+ npx agents-handoff --verify
48
+
49
+ # Show all installations
50
+ npx agents-handoff --list
51
+
52
+ # Show which global root was chosen, and why
53
+ npx agents-handoff where
54
+ ```
55
+
56
+ ## Locations
57
+
58
+ - **global**: resolved, not hard-coded — an account-skill root that already holds
59
+ `agent-handoff`, else `~/.agents/skills`, else any account-skill store found on this
60
+ machine (`<store>/<account-id>/<profile-id>/agent-handoff/`), else `~/.agents/skills`,
61
+ created on install. See it resolved:
62
+ `npx agents-handoff where`. Override with `AGENT_HANDOFF_GLOBAL_DIR`, or target an
63
+ exact path with `--path`.
64
+ - **local**: `./local/skills/agent-handoff/`
65
+ - **project**: `./skills/agent-handoff/` (only detected if in a git repo)
66
+
67
+ ## Requirements
68
+
69
+ - Node.js >= 18.0.0
70
+ - curl, wget, or native fetch for downloading
71
+
72
+ ## Development
73
+
74
+ This installer is part of the agent-handoff skill source code.
75
+
76
+ See the [agent-handoff docs](https://github.com/Alot1z/agent-handoff/tree/main/docs) for more.