@lucasschirm/devin-session-sync 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.
package/hooks.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "description": "Sync Devin CLI session data to the SAL sync engine. Wires 4 of the 8 documented ACP hook events (SessionStart/Stop/PostCompaction/SessionEnd) — PreToolUse/PostToolUse/PermissionRequest/UserPromptSubmit are ACP-tool-related and out of scope for this plugin. CRITICAL CAVEAT (verified, master plan Part A3): Devin Cloud sessions run command hooks for every event EXCEPT SessionStart and SessionEnd — so a SessionEnd-triggered sync only ever fires for local CLI sessions. Mitigation, all three shipped: the Stop hook below (fires every turn, works in both Cloud and local), the bulk `devin-sync sync` CLI command for manual/scheduled catch-up, and the mandatory bin/watcher daemon polling sessions.db watermarks (started independently of any hook, since the hook that would spawn a per-session watcher — SessionStart — is exactly the one Cloud sessions never fire).",
3
+ "hooks": {
4
+ "SessionStart": [
5
+ {
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "node",
10
+ "args": ["${DEVIN_PLUGIN_ROOT}/bin/session-start"],
11
+ "async": true
12
+ }
13
+ ]
14
+ }
15
+ ],
16
+ "Stop": [
17
+ {
18
+ "hooks": [
19
+ {
20
+ "type": "command",
21
+ "command": "node",
22
+ "args": ["${DEVIN_PLUGIN_ROOT}/bin/hook"],
23
+ "async": true
24
+ }
25
+ ]
26
+ }
27
+ ],
28
+ "PostCompaction": [
29
+ {
30
+ "matcher": "",
31
+ "hooks": [
32
+ {
33
+ "type": "command",
34
+ "command": "node",
35
+ "args": ["${DEVIN_PLUGIN_ROOT}/bin/hook"],
36
+ "async": true
37
+ }
38
+ ]
39
+ }
40
+ ],
41
+ "SessionEnd": [
42
+ {
43
+ "matcher": "",
44
+ "hooks": [
45
+ {
46
+ "type": "command",
47
+ "command": "node",
48
+ "args": ["${DEVIN_PLUGIN_ROOT}/bin/session-end"],
49
+ "timeout": 60
50
+ }
51
+ ]
52
+ }
53
+ ]
54
+ }
55
+ }
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@lucasschirm/devin-session-sync",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "license": "ISC",
6
+ "description": "Devin CLI plugin adapter for the @lucasschirm/sal-sync session data sync engine (SQLite->JSONL extractor, devin-sync CLI, and sessions.db-watermark watcher).",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/lucasschirm/session-analyzer.git",
10
+ "directory": "packages/plugins/devin-session-sync"
11
+ },
12
+ "engines": {
13
+ "node": ">=22.13.0"
14
+ },
15
+ "bin": {
16
+ "devin-sync": "bin/devin-sync",
17
+ "devin-session-sync": "bin/devin-sync"
18
+ },
19
+ "files": [
20
+ ".devin-plugin",
21
+ ".claude-plugin",
22
+ "bin",
23
+ "hooks.json",
24
+ "package.json"
25
+ ],
26
+ "devDependencies": {
27
+ "@types/node": "^26.2.0",
28
+ "@vitest/coverage-v8": "^4.1.10",
29
+ "esbuild": "^0.25.12",
30
+ "typescript": "^7.0.2",
31
+ "vitest": "^4.1.10",
32
+ "@lucasschirm/sal-sync": "0.1.0"
33
+ },
34
+ "scripts": {
35
+ "build": "node build.mjs",
36
+ "test": "vitest run",
37
+ "test:watch": "vitest",
38
+ "test:coverage": "vitest run --coverage --coverage.include='src/**/*.ts' --coverage.include='build.mjs' --coverage.exclude='src/hook.ts' --coverage.exclude='src/session-start.ts' --coverage.exclude='src/session-end.ts' --coverage.exclude='src/watcher.ts' --coverage.thresholds.statements=80 --coverage.thresholds.branches=80 --coverage.thresholds.functions=80 --coverage.thresholds.lines=80",
39
+ "typecheck": "tsc --noEmit -p tsconfig.json",
40
+ "lint": "biome check src tests build.mjs scripts",
41
+ "verify": "pnpm run typecheck && pnpm run lint && pnpm run test:coverage",
42
+ "sync": "node ./bin/devin-sync",
43
+ "preversion": "pnpm run build",
44
+ "version": "node scripts/bump-plugin-version.js",
45
+ "version:patch": "npm version patch --no-git-tag-version",
46
+ "version:publish": "pnpm publish --access public --provenance --no-git-checks"
47
+ }
48
+ }