supernaturalist 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/README.md +85 -0
- package/dist/cli.js +1097 -0
- package/dist/cli.js.map +7 -0
- package/dist/lib/adapters/amp.d.ts +3 -0
- package/dist/lib/adapters/amp.d.ts.map +1 -0
- package/dist/lib/adapters/amp.js +79 -0
- package/dist/lib/adapters/amp.js.map +1 -0
- package/dist/lib/adapters/claude.d.ts +3 -0
- package/dist/lib/adapters/claude.d.ts.map +1 -0
- package/dist/lib/adapters/claude.js +147 -0
- package/dist/lib/adapters/claude.js.map +1 -0
- package/dist/lib/adapters/cline.d.ts +3 -0
- package/dist/lib/adapters/cline.d.ts.map +1 -0
- package/dist/lib/adapters/cline.js +125 -0
- package/dist/lib/adapters/cline.js.map +1 -0
- package/dist/lib/adapters/codex.d.ts +3 -0
- package/dist/lib/adapters/codex.d.ts.map +1 -0
- package/dist/lib/adapters/codex.js +96 -0
- package/dist/lib/adapters/codex.js.map +1 -0
- package/dist/lib/adapters/index.d.ts +17 -0
- package/dist/lib/adapters/index.d.ts.map +1 -0
- package/dist/lib/adapters/index.js +27 -0
- package/dist/lib/adapters/index.js.map +1 -0
- package/dist/lib/adapters/opencode.d.ts +3 -0
- package/dist/lib/adapters/opencode.d.ts.map +1 -0
- package/dist/lib/adapters/opencode.js +86 -0
- package/dist/lib/adapters/opencode.js.map +1 -0
- package/dist/lib/adapters/pi.d.ts +3 -0
- package/dist/lib/adapters/pi.d.ts.map +1 -0
- package/dist/lib/adapters/pi.js +118 -0
- package/dist/lib/adapters/pi.js.map +1 -0
- package/dist/lib/adapters/zed.d.ts +3 -0
- package/dist/lib/adapters/zed.d.ts.map +1 -0
- package/dist/lib/adapters/zed.js +156 -0
- package/dist/lib/adapters/zed.js.map +1 -0
- package/dist/lib/detector/index.d.ts +32 -0
- package/dist/lib/detector/index.d.ts.map +1 -0
- package/dist/lib/detector/index.js +234 -0
- package/dist/lib/detector/index.js.map +1 -0
- package/dist/lib/index.d.ts +3 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +3 -0
- package/dist/lib/index.js.map +1 -0
- package/package.json +39 -0
package/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# supernaturalist
|
|
2
|
+
|
|
3
|
+
Analyze supernatural language in your coding agent responses. `supernaturalist` scans local agent histories and reports occurrences of spectral terms like `ghost`, `ghoul`, `haunted`, `cursed`, and more in the assistant side of the transcript.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g supernaturalist
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## CLI
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
supernaturalist scan
|
|
15
|
+
supernaturalist scan --agent claude
|
|
16
|
+
supernaturalist scan --since 2025-01-01
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Options
|
|
20
|
+
|
|
21
|
+
- `--agent`, `-a` Scan only a specific agent (claude, codex, opencode, amp, cline, pi, zed)
|
|
22
|
+
- `--since`, `-s` Only scan messages after this date (ISO 8601)
|
|
23
|
+
- `--help`, `-h` Show help
|
|
24
|
+
|
|
25
|
+
## Library
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { detect, createDetector } from "supernaturalist";
|
|
29
|
+
|
|
30
|
+
const result = detect("The haunted house hid a ghoul.");
|
|
31
|
+
console.log(result.count);
|
|
32
|
+
|
|
33
|
+
const custom = createDetector([
|
|
34
|
+
{ word: "cryptid", intensity: "vivid", group: "cryptid" },
|
|
35
|
+
]);
|
|
36
|
+
console.log(custom("A cryptid sighting."));
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### API
|
|
40
|
+
|
|
41
|
+
- `detect(text: string): DetectionResult`
|
|
42
|
+
- `createDetector(extraWords?: WordEntry[]): (text: string) => DetectionResult`
|
|
43
|
+
|
|
44
|
+
Types:
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
export interface DetectionResult {
|
|
48
|
+
count: number;
|
|
49
|
+
matches: Match[];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface Match {
|
|
53
|
+
word: string;
|
|
54
|
+
index: number;
|
|
55
|
+
intensity: "subtle" | "vivid" | "ominous";
|
|
56
|
+
group: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface WordEntry {
|
|
60
|
+
word: string;
|
|
61
|
+
intensity: "subtle" | "vivid" | "ominous";
|
|
62
|
+
group: string;
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Adapters
|
|
67
|
+
|
|
68
|
+
Adapters pull assistant/agent messages from local agent history stores. They are best-effort and will skip if a source is missing. See `src/adapters` for implementation details.
|
|
69
|
+
|
|
70
|
+
## Attribution
|
|
71
|
+
|
|
72
|
+
This project is adapted from https://github.com/gricha/devrage.
|
|
73
|
+
|
|
74
|
+
## Publishing
|
|
75
|
+
|
|
76
|
+
The GitHub Actions publish workflow uses npm Trusted Publishing with GitHub OIDC,
|
|
77
|
+
not a classic npm token. Configure the package on npmjs.com with this trusted
|
|
78
|
+
publisher:
|
|
79
|
+
|
|
80
|
+
- Repository: `unfrgivn/supernaturalist`
|
|
81
|
+
- Workflow: `.github/workflows/publish.yml`
|
|
82
|
+
- Environment: leave blank unless the workflow is updated to use one
|
|
83
|
+
|
|
84
|
+
The workflow publishes on GitHub release publication or manual dispatch and runs
|
|
85
|
+
`npm publish --access public --provenance` after typecheck, lint, build, and test.
|