pulse-protocol 0.9.3

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/CHANGELOG.md ADDED
@@ -0,0 +1,39 @@
1
+ # Changelog
2
+
3
+ All notable changes to `pulse-protocol` are documented here.
4
+
5
+ ## [0.9.3] - 2026-04-08
6
+
7
+ ### Fixed
8
+ - Correlation detector now handles empty tx/post arrays without dividing by zero
9
+ - CLI `--no-post` flag is respected by the daemon too
10
+ - Typo in the voice detector's emoji regex
11
+
12
+ ## [0.9.2] - 2026-04-07
13
+
14
+ ### Added
15
+ - `pulse verify` command for checking signed public verdicts
16
+ - `PulseDaemon` class as a typed alternative to `runDaemon()`
17
+
18
+ ### Changed
19
+ - Default watchlist interval bumped from 4h to 6h
20
+
21
+ ## [0.9.1] - 2026-04-06
22
+
23
+ ### Added
24
+ - Initial CLI with `scan`, `watch`, and `init` commands
25
+ - Deterministic verdict IDs via `crypto.getRandomValues`
26
+ - Pretty terminal output with colorized verdict summaries
27
+
28
+ ### Fixed
29
+ - `onchain` detector no longer panics when Helius returns an empty `instructions` array
30
+
31
+ ## [0.9.0] - 2026-04-05
32
+
33
+ ### Added
34
+ - First public release
35
+ - Five detectors: cadence, onchain, voice, timing, correlation
36
+ - Weighted aggregator with disagreement penalty
37
+ - Helius and twitterapi.io source adapters
38
+ - Ed25519 verdict signing
39
+ - MIT license
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pulse Protocol contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,294 @@
1
+ <div align="center">
2
+
3
+ <img src="./assets/banner.jpg" alt="Pulse Protocol" width="100%" />
4
+
5
+ # Pulse Protocol
6
+
7
+ **Autonomous AI agent scanner for Solana.**
8
+
9
+ Every agent has a pulse.
10
+ Fake ones don't.
11
+
12
+ [![WEBSITE](https://img.shields.io/badge/β–²%20WEBSITE-PULSEPROTOCOL.TECH-0a0a0f?style=for-the-badge&labelColor=0a0a0f)](https://pulseprotocol.tech)
13
+ [![NPM](https://img.shields.io/badge/πŸ“¦%20NPM-PULSE--PROTOCOL-0a0a0f?style=for-the-badge&labelColor=0a0a0f)](https://www.npmjs.com/package/pulse-protocol)
14
+ [![GITHUB](https://img.shields.io/badge/⌨%20GITHUB-PULSE--PROTOCOL-0a0a0f?style=for-the-badge&labelColor=0a0a0f)](https://github.com/pulseprotocol/pulse-protocol)
15
+ [![TWITTER](https://img.shields.io/badge/𝕏%20TWITTER-@PULSEPROTOCOL__-0a0a0f?style=for-the-badge&labelColor=0a0a0f)](https://x.com/pulseprotocol_)
16
+
17
+ </div>
18
+
19
+ ---
20
+
21
+ ## What is Pulse Protocol?
22
+
23
+ **Pulse Protocol** is an open-source autonomous agent scanner for Solana. Give it any wallet and X handle, and it returns one of three verdicts:
24
+
25
+ - **AUTONOMOUS** - agent appears to run without human intervention
26
+ - **HYBRID** - agent is assisted or gated by a human operator
27
+ - **HUMAN** - no agent behavior detected, this is a person
28
+
29
+ The scanner runs entirely locally. No inference servers, no LLM calls, no third parties. It's a deterministic behavioral heuristics engine in pure TypeScript. Read the code, run it, reproduce the verdict.
30
+
31
+ ```bash
32
+ npm install -g pulse-protocol
33
+ pulse scan --handle someagent --wallet 6ySH9oiCNXKMnEudjghkaewryK8SqA2i7m1wGpchpump
34
+ ```
35
+
36
+ ```
37
+ verdict: HYBRID (72% confidence, aggregate 64.3/100)
38
+ ```
39
+
40
+ ---
41
+
42
+ ## Features
43
+
44
+ - **Five detectors.** Posting cadence, on-chain cadence, voice consistency, timing anomalies, cross-source correlation.
45
+ - **Deterministic.** No LLMs, no randomness, no black boxes. Same input gives the same verdict every time.
46
+ - **Pure TypeScript.** Every detector is a regular function you can import and unit test.
47
+ - **CLI and SDK.** Use from the terminal or import it into your own tooling.
48
+ - **Watchlist daemon.** Re-scan a list of targets on an interval and webhook on verdict changes.
49
+ - **Signed verdicts.** Sign scan results with ed25519 and publish them verifiably.
50
+ - **MIT licensed.** Fork it, extend it, do whatever.
51
+
52
+ ---
53
+
54
+ ## Installation
55
+
56
+ ### Global CLI
57
+
58
+ ```bash
59
+ npm install -g pulse-protocol
60
+ ```
61
+
62
+ ### As a library
63
+
64
+ ```bash
65
+ npm install pulse-protocol
66
+ ```
67
+
68
+ ### Configuration
69
+
70
+ Create `~/.config/pulse/.env` (or run `pulse init`):
71
+
72
+ ```
73
+ HELIUS_API_KEY=your_helius_key
74
+ X_API_KEY=your_twitter_api_key
75
+ ```
76
+
77
+ Both providers have free tiers that are more than enough for normal use. Helius is at [helius.xyz](https://helius.xyz). Any compatible X API provider works for `X_API_KEY`.
78
+
79
+ ---
80
+
81
+ ## Quick Start
82
+
83
+ ### CLI
84
+
85
+ ```bash
86
+ pulse scan \
87
+ --handle someagent \
88
+ --wallet 6ySH9oiCNXKMnEudjghkaewryK8SqA2i7m1wGpchpump
89
+ ```
90
+
91
+ ### SDK
92
+
93
+ ```ts
94
+ import { PulseProtocol } from "pulse-protocol";
95
+
96
+ const pulse = new PulseProtocol({
97
+ heliusApiKey: process.env.HELIUS_API_KEY!,
98
+ xApiKey: process.env.X_API_KEY!,
99
+ });
100
+
101
+ const verdict = await pulse.scan({
102
+ handle: "someagent",
103
+ wallet: "6ySH9oiCNXKMnEudjghkaewryK8SqA2i7m1wGpchpump",
104
+ });
105
+
106
+ console.log(verdict.verdict); // "AUTONOMOUS" | "HYBRID" | "HUMAN"
107
+ console.log(verdict.confidence); // 0.0 - 1.0
108
+ console.log(verdict.aggregate_score); // 0 - 100
109
+ console.log(verdict.signals); // per-detector breakdown
110
+ ```
111
+
112
+ ### Watchlist daemon
113
+
114
+ ```ts
115
+ import { PulseDaemon } from "pulse-protocol/daemon";
116
+
117
+ const daemon = new PulseDaemon({
118
+ config: {
119
+ heliusApiKey: process.env.HELIUS_API_KEY!,
120
+ xApiKey: process.env.X_API_KEY!,
121
+ },
122
+ watchlistPath: "./watchlist.yaml",
123
+ interval: "6h",
124
+ });
125
+
126
+ await daemon.start();
127
+ ```
128
+
129
+ ---
130
+
131
+ ## How it works
132
+
133
+ Pulse Protocol fetches X posts and Solana transaction history for the target, then runs five independent detectors.
134
+
135
+ ```
136
+ X posts + Solana txs
137
+ β”‚
138
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”
139
+ β”‚ β”‚
140
+ β–Ό β–Ό
141
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”
142
+ β”‚cadence β”‚ β”‚onchain β”‚
143
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€
144
+ β”‚ voice β”‚ β”‚timing β”‚
145
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜
146
+ β–² β–²
147
+ β”‚ β”‚
148
+ β”Œβ”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”
149
+ β”‚ correlation β”‚
150
+ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
151
+ β”‚
152
+ β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
153
+ β”‚ aggregator β”‚
154
+ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
155
+ β”‚
156
+ β–Ό
157
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
158
+ β”‚ verdict β”‚
159
+ β”‚ auto/hyb/hu β”‚
160
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
161
+ ```
162
+
163
+ Each detector returns a 0-100 score. The aggregator computes a weighted sum and applies a disagreement penalty: if two detectors diverge by more than 40 points, the verdict is downgraded to HYBRID.
164
+
165
+ | Detector | Weight | What it looks at |
166
+ |---|---|---|
167
+ | `cadence` | 0.25 | X posting rhythm, hour-of-day entropy, sleep windows |
168
+ | `onchain` | 0.25 | Transaction rhythm, burst patterns, program diversity |
169
+ | `voice` | 0.20 | Lexical diversity, typo rate, phrase repetition |
170
+ | `timing` | 0.15 | Discrete anomalies (sub-second replies, cron regularity) |
171
+ | `correlation` | 0.15 | Pearson correlation between X and on-chain timelines |
172
+
173
+ Full methodology: [docs/detection-methodology.md](./docs/detection-methodology.md)
174
+
175
+ ---
176
+
177
+ ## Verdict thresholds
178
+
179
+ | Aggregate score | Verdict |
180
+ |---|---|
181
+ | β‰₯ 80 | **AUTONOMOUS** |
182
+ | 40 - 79 | **HYBRID** |
183
+ | < 40 | **HUMAN** |
184
+
185
+ Disagreement between detectors (> 40 point spread) automatically downgrades to HYBRID.
186
+
187
+ ---
188
+
189
+ ## CLI
190
+
191
+ ```
192
+ pulse <command> [options]
193
+
194
+ Commands:
195
+ scan Scan a target and return a verdict
196
+ watch Start the watchlist daemon
197
+ init Create ~/.config/pulse/.env
198
+ feed Stream the public verdict feed
199
+ verify Verify a signed public verdict
200
+
201
+ Scan options:
202
+ --handle <handle> X / Twitter handle (no @)
203
+ --wallet <wallet> Solana wallet address
204
+ --out <format> pretty | json | verdict-only
205
+ --no-post Do not publish verdict
206
+ ```
207
+
208
+ Full reference: [docs/cli.md](./docs/cli.md)
209
+
210
+ ---
211
+
212
+ ## SDK Reference
213
+
214
+ ```ts
215
+ import {
216
+ PulseProtocol, // main client
217
+ aggregate, // raw aggregator (take detector results, get verdict)
218
+ signVerdict, // sign a verdict with ed25519
219
+ verifyVerdict, // verify a signed public verdict
220
+ VERSION,
221
+ } from "pulse-protocol";
222
+
223
+ // Use detectors directly (without the full client):
224
+ import {
225
+ cadenceDetector,
226
+ onchainDetector,
227
+ voiceDetector,
228
+ timingDetector,
229
+ correlationDetector,
230
+ } from "pulse-protocol/detectors";
231
+ ```
232
+
233
+ Each detector is a pure function. No setup, no I/O, just math on input data. You can plug in your own X or on-chain source if you don't want to use Helius.
234
+
235
+ ---
236
+
237
+ ## Compatibility
238
+
239
+ | Runtime | Supported |
240
+ |---|---|
241
+ | Node.js 18+ | βœ… |
242
+ | Bun 1.0+ | βœ… |
243
+ | Deno 1.40+ | βœ… |
244
+ | Cloudflare Workers | βœ… |
245
+
246
+ ---
247
+
248
+ ## Project status
249
+
250
+ **Early stage, built in public.** The scoring rules work on the targets I've tested against. The rules are public, the code is public, and the weights are in `src/core/aggregator.ts`. If you find a target where Pulse Protocol gives a wrong verdict, open an issue with the target and the expected label and I'll look at it.
251
+
252
+ This is a solo project. There is no team, no company, no funding round, no Discord, no token sale. If any of those appear claiming to be Pulse Protocol, they are not.
253
+
254
+ ---
255
+
256
+ ## Roadmap
257
+
258
+ - [x] Core five-detector engine
259
+ - [x] CLI and SDK
260
+ - [x] Watchlist daemon
261
+ - [x] Signed verdict format
262
+ - [ ] BSC / Base / Ethereum support
263
+ - [ ] Browser extension (inline verdicts on x.com profiles)
264
+ - [ ] Desktop app (real-time dashboard)
265
+
266
+ ---
267
+
268
+ ## Contributing
269
+
270
+ PRs welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md) for the dev setup.
271
+
272
+ The highest-value contribution is **labeled targets**: if you know of an agent that is definitely autonomous or definitely human, open an issue with the handle, the wallet, and a short reason. Labeled data helps recalibrate the detector weights.
273
+
274
+ ---
275
+
276
+ ## Security
277
+
278
+ Found a scoring bug or an adversarial pattern that lets a fake agent pass as AUTONOMOUS? Open a [GitHub Security Advisory](https://github.com/pulseprotocol/pulse-protocol/security/advisories/new).
279
+
280
+ ---
281
+
282
+ ## License
283
+
284
+ MIT. See [LICENSE](./LICENSE).
285
+
286
+ ---
287
+
288
+ <div align="center">
289
+
290
+ ### fake agents have no pulse.
291
+
292
+ **[Website](https://pulseprotocol.tech)** Β· **[X](https://x.com/pulseprotocol_)** Β· **[GitHub](https://github.com/pulseprotocol/pulse-protocol)** Β· **[Docs](./docs)**
293
+
294
+ </div>