handoff-relay 0.1.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.
@@ -0,0 +1,73 @@
1
+ {
2
+ "packet_id": "pkt_example_ask",
3
+ "packet_type": "ask",
4
+ "workspace_id": "wrk_example",
5
+ "sender_member_id": "mem_sam",
6
+ "recipient_member_ids": ["mem_alice"],
7
+ "created_at": "2026-06-15T12:00:00.000Z",
8
+ "updated_at": "2026-06-15T12:00:00.000Z",
9
+ "expires_at": "2026-06-16T12:00:00.000Z",
10
+ "status": "pending_sender_approval",
11
+ "project": {
12
+ "repo_name": "project-api",
13
+ "git_remote_fingerprint": "sha256:example",
14
+ "branch": "main",
15
+ "commit_hash": "abc123"
16
+ },
17
+ "source_client": "codex",
18
+ "title": "Auth refresh test keeps failing",
19
+ "summary": "The auth refresh integration test returns 401 after token rotation.",
20
+ "question": "Can you check why the auth refresh test keeps failing?",
21
+ "claims": [
22
+ {
23
+ "claim_id": "clm_1",
24
+ "text": "The failure happens after refresh token rotation.",
25
+ "confidence": "medium",
26
+ "status": "observed",
27
+ "evidence_ids": ["ev_1"],
28
+ "needs_recheck": true
29
+ }
30
+ ],
31
+ "evidence": [
32
+ {
33
+ "evidence_id": "ev_1",
34
+ "kind": "test_failure",
35
+ "label": "vitest failure",
36
+ "source": "pnpm test auth-refresh",
37
+ "excerpt": "expected 200, received 401",
38
+ "hash": "sha256:testfailure",
39
+ "captured_at": "2026-06-15T11:58:00.000Z",
40
+ "sensitivity": "normal"
41
+ }
42
+ ],
43
+ "files_or_symbols": ["src/auth/refresh.ts", "refreshSession"],
44
+ "commands_or_tests_run": ["pnpm test auth-refresh"],
45
+ "what_was_tried": ["Re-ran the failing integration test"],
46
+ "known_failures": ["Refresh token test returns 401"],
47
+ "current_hypothesis": "The rotated token is not persisted before the second request.",
48
+ "confidence": "medium",
49
+ "suggested_next_steps": ["Compare with Alice's auth branch"],
50
+ "redaction_report": {
51
+ "blocked": false,
52
+ "findings": [],
53
+ "warnings": []
54
+ },
55
+ "hydration_policy": {
56
+ "requires_recipient_approval": true,
57
+ "requires_sender_approval_for_replies": true,
58
+ "allow_raw_transcript": false,
59
+ "max_characters": 8000
60
+ },
61
+ "audit_receipt": {
62
+ "receipt_id": "rcp_example_draft",
63
+ "action": "draft",
64
+ "actor_member_id": "mem_sam",
65
+ "packet_id": "pkt_example_ask",
66
+ "workspace_id": "wrk_example",
67
+ "created_at": "2026-06-15T12:00:00.000Z",
68
+ "metadata": {
69
+ "source_client": "codex"
70
+ },
71
+ "receipt_hash": "sha256:example"
72
+ }
73
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "packet_id": "pkt_example_reply",
3
+ "packet_type": "reply",
4
+ "workspace_id": "wrk_example",
5
+ "sender_member_id": "mem_alice",
6
+ "recipient_member_ids": ["mem_sam"],
7
+ "parent_packet_id": "pkt_example_ask",
8
+ "created_at": "2026-06-15T12:20:00.000Z",
9
+ "updated_at": "2026-06-15T12:20:00.000Z",
10
+ "expires_at": "2026-06-16T12:20:00.000Z",
11
+ "status": "pending_recipient_approval",
12
+ "project": {
13
+ "repo_name": "project-api",
14
+ "git_remote_fingerprint": "sha256:example",
15
+ "branch": "main"
16
+ },
17
+ "source_client": "claude-code",
18
+ "title": "Reply: Auth refresh test keeps failing",
19
+ "summary": "Likely refresh persistence ordering issue.",
20
+ "answer": "Persist the rotated refresh token before retrying the request.",
21
+ "claims": [
22
+ {
23
+ "claim_id": "clm_reply_1",
24
+ "text": "The retry path reads the old refresh token.",
25
+ "confidence": "high",
26
+ "status": "inferred",
27
+ "evidence_ids": [],
28
+ "needs_recheck": true
29
+ }
30
+ ],
31
+ "evidence": [],
32
+ "files_or_symbols": ["src/auth/middleware.ts"],
33
+ "commands_or_tests_run": [],
34
+ "what_was_tried": ["Compared local retry path with Sam's packet"],
35
+ "known_failures": [],
36
+ "current_hypothesis": "Persist refresh before retrying.",
37
+ "confidence": "high",
38
+ "suggested_next_steps": ["Move persistence before retry and rerun auth-refresh tests"],
39
+ "redaction_report": {
40
+ "blocked": false,
41
+ "findings": [],
42
+ "warnings": []
43
+ },
44
+ "hydration_policy": {
45
+ "requires_recipient_approval": true,
46
+ "requires_sender_approval_for_replies": true,
47
+ "allow_raw_transcript": false,
48
+ "max_characters": 8000
49
+ },
50
+ "audit_receipt": {
51
+ "receipt_id": "rcp_example_reply",
52
+ "action": "draft",
53
+ "actor_member_id": "mem_alice",
54
+ "packet_id": "pkt_example_reply",
55
+ "workspace_id": "wrk_example",
56
+ "created_at": "2026-06-15T12:20:00.000Z",
57
+ "metadata": {
58
+ "source_client": "claude-code"
59
+ },
60
+ "receipt_hash": "sha256:example"
61
+ }
62
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "packet_id": "pkt_example_share",
3
+ "packet_type": "share",
4
+ "workspace_id": "wrk_example",
5
+ "sender_member_id": "mem_sam",
6
+ "recipient_member_ids": ["mem_alice"],
7
+ "created_at": "2026-06-15T12:10:00.000Z",
8
+ "updated_at": "2026-06-15T12:10:00.000Z",
9
+ "recheck_by": "2026-06-17T12:10:00.000Z",
10
+ "status": "pending_sender_approval",
11
+ "project": {
12
+ "repo_name": "project-api",
13
+ "git_remote_fingerprint": "sha256:example",
14
+ "branch": "main"
15
+ },
16
+ "source_client": "codex",
17
+ "title": "Auth middleware finding",
18
+ "summary": "The middleware skips refresh persistence on retried requests.",
19
+ "finding": "Refresh persistence is skipped when middleware retries after a 401.",
20
+ "claims": [],
21
+ "evidence": [],
22
+ "files_or_symbols": ["src/auth/middleware.ts"],
23
+ "commands_or_tests_run": ["pnpm test auth-middleware"],
24
+ "what_was_tried": ["Traced retry path"],
25
+ "known_failures": [],
26
+ "current_hypothesis": "Persist refresh before retrying.",
27
+ "confidence": "high",
28
+ "suggested_next_steps": ["Patch middleware retry path"],
29
+ "redaction_report": {
30
+ "blocked": false,
31
+ "findings": [],
32
+ "warnings": []
33
+ },
34
+ "hydration_policy": {
35
+ "requires_recipient_approval": true,
36
+ "requires_sender_approval_for_replies": true,
37
+ "allow_raw_transcript": false,
38
+ "max_characters": 8000
39
+ },
40
+ "audit_receipt": {
41
+ "receipt_id": "rcp_example_share",
42
+ "action": "draft",
43
+ "actor_member_id": "mem_sam",
44
+ "packet_id": "pkt_example_share",
45
+ "workspace_id": "wrk_example",
46
+ "created_at": "2026-06-15T12:10:00.000Z",
47
+ "metadata": {
48
+ "source_client": "codex"
49
+ },
50
+ "receipt_hash": "sha256:example"
51
+ }
52
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "original_packet_id": "pkt_ask_normal",
3
+ "question": "Can you include the failing assertion and the token payload shape?",
4
+ "requested_evidence": ["test failure excerpt", "token payload fields"],
5
+ "recipient_member_id": "mem_alice",
6
+ "created_at": "2026-06-15T12:20:00.000Z"
7
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "packet_id": "pkt_declined",
3
+ "status": "declined",
4
+ "decline_reason": "Not my project area today.",
5
+ "actor_member_id": "mem_alice"
6
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "packet_id": "pkt_ask_normal",
3
+ "packet_type": "ask",
4
+ "workspace_id": "wrk_demo",
5
+ "sender_member_id": "mem_sam",
6
+ "recipient_member_ids": ["mem_alice"],
7
+ "created_at": "2026-06-15T12:00:00.000Z",
8
+ "updated_at": "2026-06-15T12:00:00.000Z",
9
+ "expires_at": "2026-06-16T12:00:00.000Z",
10
+ "status": "pending_sender_approval",
11
+ "project": {
12
+ "repo_name": "project-api",
13
+ "git_remote_fingerprint": "sha256:demo",
14
+ "branch": "main",
15
+ "commit_hash": "abc123"
16
+ },
17
+ "source_client": "codex",
18
+ "title": "Auth refresh test keeps failing",
19
+ "summary": "The auth refresh integration test fails after token rotation.",
20
+ "question": "Can you check why the auth refresh test keeps failing?",
21
+ "claims": [
22
+ {
23
+ "claim_id": "clm_1",
24
+ "text": "The failure happens after refresh token rotation.",
25
+ "confidence": "medium",
26
+ "status": "observed",
27
+ "evidence_ids": ["ev_1"],
28
+ "needs_recheck": true
29
+ }
30
+ ],
31
+ "evidence": [
32
+ {
33
+ "evidence_id": "ev_1",
34
+ "kind": "test_failure",
35
+ "label": "vitest failure",
36
+ "source": "pnpm test auth-refresh",
37
+ "excerpt": "expected 200, received 401 in auth refresh integration test",
38
+ "hash": "sha256:testfailure",
39
+ "captured_at": "2026-06-15T11:58:00.000Z",
40
+ "sensitivity": "normal"
41
+ }
42
+ ],
43
+ "files_or_symbols": ["src/auth/refresh.ts", "refreshSession"],
44
+ "commands_or_tests_run": ["pnpm test auth-refresh"],
45
+ "what_was_tried": ["Re-ran the failing integration test", "Checked token expiry math"],
46
+ "known_failures": ["Refresh token test returns 401"],
47
+ "current_hypothesis": "The rotated token is not persisted before the second request.",
48
+ "confidence": "medium",
49
+ "suggested_next_steps": ["Compare with Alice's local auth branch"],
50
+ "redaction_report": {
51
+ "blocked": false,
52
+ "findings": [],
53
+ "warnings": []
54
+ },
55
+ "hydration_policy": {
56
+ "requires_recipient_approval": true,
57
+ "requires_sender_approval_for_replies": true,
58
+ "allow_raw_transcript": false,
59
+ "max_characters": 8000
60
+ },
61
+ "audit_receipt": {
62
+ "receipt_id": "rcp_fixture",
63
+ "action": "draft",
64
+ "actor_member_id": "mem_sam",
65
+ "packet_id": "pkt_ask_normal",
66
+ "workspace_id": "wrk_demo",
67
+ "created_at": "2026-06-15T12:00:00.000Z",
68
+ "metadata": {
69
+ "source_client": "codex"
70
+ }
71
+ }
72
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "packet_id": "pkt_share_normal",
3
+ "packet_type": "share",
4
+ "workspace_id": "wrk_demo",
5
+ "sender_member_id": "mem_sam",
6
+ "recipient_member_ids": ["mem_alice"],
7
+ "created_at": "2026-06-15T12:05:00.000Z",
8
+ "updated_at": "2026-06-15T12:05:00.000Z",
9
+ "recheck_by": "2026-06-17T12:05:00.000Z",
10
+ "status": "pending_sender_approval",
11
+ "project": {
12
+ "repo_name": "project-api",
13
+ "git_remote_fingerprint": "sha256:demo",
14
+ "branch": "main"
15
+ },
16
+ "source_client": "claude-code",
17
+ "title": "Auth middleware finding",
18
+ "summary": "The middleware skips refresh persistence on retried requests.",
19
+ "finding": "Refresh persistence is skipped when middleware retries after a 401.",
20
+ "claims": [],
21
+ "evidence": [],
22
+ "files_or_symbols": ["src/auth/middleware.ts"],
23
+ "commands_or_tests_run": ["pnpm test auth-middleware"],
24
+ "what_was_tried": ["Traced retry path"],
25
+ "known_failures": [],
26
+ "current_hypothesis": "Persist refresh before retrying.",
27
+ "confidence": "high",
28
+ "suggested_next_steps": ["Patch middleware retry path"],
29
+ "redaction_report": {
30
+ "blocked": false,
31
+ "findings": [],
32
+ "warnings": []
33
+ },
34
+ "hydration_policy": {
35
+ "requires_recipient_approval": true,
36
+ "requires_sender_approval_for_replies": true,
37
+ "allow_raw_transcript": false,
38
+ "max_characters": 8000
39
+ },
40
+ "audit_receipt": {
41
+ "receipt_id": "rcp_share_fixture",
42
+ "action": "draft",
43
+ "actor_member_id": "mem_sam",
44
+ "packet_id": "pkt_share_normal",
45
+ "workspace_id": "wrk_demo",
46
+ "created_at": "2026-06-15T12:05:00.000Z",
47
+ "metadata": {
48
+ "source_client": "claude-code"
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "workspace_id": "wrk_demo",
3
+ "member_id": "mem_bob",
4
+ "handle": "bob",
5
+ "status": "revoked",
6
+ "revoked_at": "2026-06-15T12:30:00.000Z"
7
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "evidence_id": "ev_secret",
3
+ "kind": "log_excerpt",
4
+ "label": "local env",
5
+ "source": ".env",
6
+ "excerpt": "OPENAI_API_KEY=sk-proj-secretsecretsecretsecret\nDATABASE_URL=postgres://user:pass@example.com/db",
7
+ "hash": "sha256:secret",
8
+ "captured_at": "2026-06-15T12:10:00.000Z",
9
+ "sensitivity": "normal"
10
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "title": "Stale incident handoff",
3
+ "summary": "The production symptom was observed before the rollback.",
4
+ "recheck_by": "2026-06-14T12:00:00.000Z",
5
+ "current_hypothesis": "Cache keys may have changed, but this must be rechecked.",
6
+ "claims": [
7
+ {
8
+ "claim_id": "clm_stale",
9
+ "text": "The error rate increased after deploy 2026.06.14.",
10
+ "confidence": "low",
11
+ "status": "observed",
12
+ "evidence_ids": [],
13
+ "needs_recheck": true
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "packet_id": "pkt_superseded",
3
+ "status": "superseded",
4
+ "superseded_by_packet_id": "pkt_share_normal",
5
+ "reason": "Newer packet includes corrected middleware trace."
6
+ }
package/package.json ADDED
@@ -0,0 +1,103 @@
1
+ {
2
+ "name": "handoff-relay",
3
+ "version": "0.1.0",
4
+ "description": "Human-approved context handoffs between coding agents.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "packageManager": "pnpm@10.17.1",
8
+ "main": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js"
14
+ },
15
+ "./api": {
16
+ "types": "./dist/api/server.d.ts",
17
+ "import": "./dist/api/server.js"
18
+ },
19
+ "./mcp": {
20
+ "types": "./dist/mcp/server.d.ts",
21
+ "import": "./dist/mcp/server.js"
22
+ }
23
+ },
24
+ "keywords": [
25
+ "agent",
26
+ "mcp",
27
+ "coding-agents",
28
+ "handoff",
29
+ "sqlite"
30
+ ],
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/0dust/handoff.git"
34
+ },
35
+ "bugs": {
36
+ "url": "https://github.com/0dust/handoff/issues"
37
+ },
38
+ "homepage": "https://github.com/0dust/handoff#readme",
39
+ "engines": {
40
+ "node": ">=20"
41
+ },
42
+ "bin": {
43
+ "handoff": "dist/cli.js"
44
+ },
45
+ "files": [
46
+ "dist",
47
+ "docs/advanced-manual-setup.md",
48
+ "docs/claude-code-setup.md",
49
+ "docs/codex-setup.md",
50
+ "docs/demo-video-script.md",
51
+ "docs/generic-mcp-setup.md",
52
+ "docs/launch-copy.md",
53
+ "docs/local-self-hosting.md",
54
+ "docs/packet-schema.md",
55
+ "docs/security-privacy.md",
56
+ "docs/troubleshooting.md",
57
+ "examples",
58
+ "fixtures",
59
+ "README.md"
60
+ ],
61
+ "scripts": {
62
+ "build": "tsup src/cli.ts src/index.ts src/api/server.ts src/mcp/server.ts --format esm --dts --clean --splitting false",
63
+ "check": "pnpm lint && pnpm typecheck && pnpm test",
64
+ "cli": "tsx src/cli.ts",
65
+ "demo": "tsx src/cli.ts demo two-user",
66
+ "demo:recording-script": "node -e \"console.log('docs/demo-video-script.md')\"",
67
+ "dev:server": "tsx src/cli.ts server start",
68
+ "format": "prettier --write .",
69
+ "format:check": "prettier --check .",
70
+ "lint": "eslint .",
71
+ "mcp": "tsx src/cli.ts server mcp",
72
+ "prepack": "pnpm build",
73
+ "prepublishOnly": "pnpm check && pnpm build",
74
+ "test": "vitest run",
75
+ "test:watch": "vitest",
76
+ "typecheck": "tsc --noEmit"
77
+ },
78
+ "dependencies": {
79
+ "@modelcontextprotocol/sdk": "^1.17.4",
80
+ "better-sqlite3": "^12.2.0",
81
+ "commander": "^14.0.2",
82
+ "fastify": "^5.6.2",
83
+ "zod": "^4.1.13"
84
+ },
85
+ "devDependencies": {
86
+ "@eslint/js": "^9.39.1",
87
+ "@types/better-sqlite3": "^7.6.13",
88
+ "@types/node": "^24.10.1",
89
+ "eslint": "^9.39.1",
90
+ "prettier": "^3.6.2",
91
+ "tsup": "^8.5.0",
92
+ "tsx": "^4.20.6",
93
+ "typescript": "^5.9.3",
94
+ "typescript-eslint": "^8.46.4",
95
+ "vitest": "^4.0.14"
96
+ },
97
+ "pnpm": {
98
+ "onlyBuiltDependencies": [
99
+ "better-sqlite3",
100
+ "esbuild"
101
+ ]
102
+ }
103
+ }