@walkeros/server-destination-posthog 4.1.0-next-1778668930820 → 4.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/CHANGELOG.md ADDED
@@ -0,0 +1,140 @@
1
+ # @walkeros/server-destination-posthog
2
+
3
+ ## 4.1.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [e155ff8]
8
+ - Updated dependencies [e800974]
9
+ - Updated dependencies [e155ff8]
10
+ - Updated dependencies [1a8f2d7]
11
+ - Updated dependencies [1a8f2d7]
12
+ - Updated dependencies [b276173]
13
+ - Updated dependencies [dd9f5ad]
14
+ - Updated dependencies [c60ef35]
15
+ - Updated dependencies [adeebea]
16
+ - Updated dependencies [13aaeaa]
17
+ - Updated dependencies [e800974]
18
+ - Updated dependencies [adeebea]
19
+ - Updated dependencies [e800974]
20
+ - Updated dependencies [e800974]
21
+ - Updated dependencies [058f7ed]
22
+ - Updated dependencies [28a8ac2]
23
+ - Updated dependencies [fd6076e]
24
+ - @walkeros/core@4.1.0
25
+ - @walkeros/server-core@4.1.0
26
+
27
+ ## 4.0.2
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies [a6a0ea7]
32
+ - @walkeros/core@4.0.2
33
+ - @walkeros/server-core@4.0.2
34
+
35
+ ## 4.0.1
36
+
37
+ ### Patch Changes
38
+
39
+ - Updated dependencies [381dfe7]
40
+ - Updated dependencies [1524275]
41
+ - Updated dependencies [03d7055]
42
+ - @walkeros/core@4.0.1
43
+ - @walkeros/server-core@4.0.1
44
+
45
+ ## 4.0.0
46
+
47
+ ### Major Changes
48
+
49
+ - 93ea9c4: Event model v4: breaking changes to the `Event`, `Source`, and
50
+ `Entity` shapes.
51
+ - `event.id` is now a W3C span_id (16 lowercase hex chars), generated by the
52
+ collector. Reference: W3C Trace Context (W3C Recommendation, January 2020).
53
+ - `event.version`, `event.group`, `event.count` are removed.
54
+ - `source.type` is now the source kind (e.g. `browser`, `gtag`, `mcp`, `cli`).
55
+ New `source.platform` holds the runtime (`web` | `server` | `app` | ...).
56
+ - `source.id` and `source.previous_id` are removed.
57
+ - Browser source now sets `source.url` and `source.referrer`.
58
+ - MCP source sets `source.tool` per emission. CLI source sets
59
+ `source.command`.
60
+ - `Entity.nested` and `Entity.context` are now optional. Root `event.nested`
61
+ and `event.context` remain required.
62
+ - Each source self-registers via TypeScript module augmentation of `SourceMap`
63
+ in `@walkeros/core`.
64
+ - App-side coordination (`/workspaces/developer/app`) is a follow-up plan, not
65
+ part of this release. Telemetry from v4 CLI/MCP will not validate against
66
+ the existing app schema until that follow-up ships.
67
+ - `Mapping.Rule.skip` is renamed to `Mapping.Rule.silent`. Customer flow.json
68
+ configs using `skip: true` in mapping rules must rename to `silent: true`.
69
+ Hard cut: no legacy alias, the field is gone.
70
+
71
+ ### Patch Changes
72
+
73
+ - Updated dependencies [93ea9c4]
74
+ - Updated dependencies [465775c]
75
+ - Updated dependencies [942a7fe]
76
+ - Updated dependencies [cfc7469]
77
+ - Updated dependencies [8e06b1f]
78
+ - Updated dependencies [3d50dd6]
79
+ - Updated dependencies [1ef33d9]
80
+ - @walkeros/core@4.0.0
81
+ - @walkeros/server-core@4.0.0
82
+
83
+ ## 3.4.2
84
+
85
+ ### Patch Changes
86
+
87
+ - @walkeros/core@3.4.2
88
+ - @walkeros/server-core@3.4.2
89
+
90
+ ## 3.4.1
91
+
92
+ ### Patch Changes
93
+
94
+ - Updated dependencies [12adf24]
95
+ - Updated dependencies [75aa26b]
96
+ - @walkeros/core@3.4.1
97
+ - @walkeros/server-core@3.4.1
98
+
99
+ ## 3.4.0
100
+
101
+ ### Minor Changes
102
+
103
+ - 724f97e: Migrate every step example in every walkerOS package to the
104
+ standardized `[callable, ...args][]` shape introduced in `@walkeros/core`.
105
+ Every step example's `out` is now an array of effect tuples whose first
106
+ element is the callable's public SDK name (`'gtag'`, `'analytics.track'`,
107
+ `'fbq'`, `'dataLayer.push'`, `'sendServer'`, `'fetch'`, `'trackClient.track'`,
108
+ `'amplitude.track'`, `'fs.writeFile'`, `'producer.send'`, `'client.xadd'`,
109
+ `'client.send'`, `'dataset.table.insert'`, etc.). Source examples use `'elb'`
110
+ as the callable; transformer examples use the reserved `'return'` keyword;
111
+ store examples use store-operation callables (`'get'`, `'set'`). Tests capture
112
+ real calls on each component's spy and assert against `example.out` directly —
113
+ the hardcoded `PACKAGE_CALLS` registry in the app is no longer consulted
114
+ (emptied; plan #3 removes it structurally).
115
+
116
+ ### Patch Changes
117
+
118
+ - Updated dependencies [74940cc]
119
+ - Updated dependencies [525f5d9]
120
+ - @walkeros/core@3.4.0
121
+ - @walkeros/server-core@3.4.0
122
+
123
+ ## 3.3.1
124
+
125
+ ### Patch Changes
126
+
127
+ - @walkeros/server-core@3.3.1
128
+ - @walkeros/core@3.3.1
129
+
130
+ ## 3.3.0
131
+
132
+ ### Patch Changes
133
+
134
+ - Updated dependencies [2849acb]
135
+ - Updated dependencies [08c365a]
136
+ - Updated dependencies [08c365a]
137
+ - Updated dependencies [08c365a]
138
+ - Updated dependencies [08c365a]
139
+ - @walkeros/core@3.3.0
140
+ - @walkeros/server-core@3.3.0
package/README.md CHANGED
@@ -4,36 +4,35 @@
4
4
  </a>
5
5
  </p>
6
6
 
7
- # PostHog Server Destination for walkerOS
7
+ # @walkeros/server-destination-posthog
8
8
 
9
- [Source Code](https://github.com/elbwalker/walkerOS/tree/main/packages/server/destinations/posthog)
10
- &bull;
11
- [NPM Package](https://www.npmjs.com/package/@walkeros/server-destination-posthog)
9
+ Server-side event delivery to PostHog for product analytics, identity
10
+ resolution, group analytics, and feature flags via the official posthog-node
11
+ SDK.
12
12
 
13
- walkerOS follows a **source -> collector -> destination** architecture. This
14
- PostHog destination receives processed events from the walkerOS collector and
15
- sends them server-to-server to PostHog using the `posthog-node` SDK, supporting
16
- capture, identify, groupIdentify, groups on capture, consent, and graceful
17
- shutdown.
13
+ [Documentation](https://www.walkeros.io/docs/destinations/server/posthog) &bull;
14
+ [NPM Package](https://www.npmjs.com/package/@walkeros/server-destination-posthog)
15
+ &bull;
16
+ [Source Code](https://github.com/elbwalker/walkerOS/tree/main/packages/server/destinations/posthog)
18
17
 
19
18
  ## Installation
20
19
 
21
- ```sh
20
+ ```bash
22
21
  npm install @walkeros/server-destination-posthog
23
22
  ```
24
23
 
25
- ## Usage
26
-
27
- ### Minimal flow.json
24
+ ## Quick start
28
25
 
29
26
  ```json
30
27
  {
31
- "destinations": {
32
- "posthog": {
33
- "package": "@walkeros/server-destination-posthog",
34
- "config": {
35
- "settings": {
36
- "apiKey": "phc_..."
28
+ "version": 4,
29
+ "flows": {
30
+ "default": {
31
+ "config": { "platform": "server" },
32
+ "destinations": {
33
+ "posthog": {
34
+ "package": "@walkeros/server-destination-posthog",
35
+ "config": {}
37
36
  }
38
37
  }
39
38
  }
@@ -41,99 +40,10 @@ npm install @walkeros/server-destination-posthog
41
40
  }
42
41
  ```
43
42
 
44
- ### Programmatic
45
-
46
- ```typescript
47
- import { startFlow } from '@walkeros/collector';
48
- import { destinationPostHog } from '@walkeros/server-destination-posthog';
49
-
50
- await startFlow({
51
- destinations: {
52
- posthog: {
53
- code: destinationPostHog,
54
- config: {
55
- settings: {
56
- apiKey: 'phc_...',
57
- host: 'https://eu.i.posthog.com',
58
- },
59
- },
60
- },
61
- },
62
- });
63
- ```
64
-
65
- ## Settings
66
-
67
- | Name | Type | Description | Required |
68
- | ----------------------------- | ---------- | -------------------------------------------------- | -------- |
69
- | `apiKey` | `string` | PostHog project API key (`phc_...`) | Yes |
70
- | `host` | `string` | API endpoint (default: `https://us.i.posthog.com`) | No |
71
- | `flushAt` | `number` | Events queued before auto-flush (default: 20) | No |
72
- | `flushInterval` | `number` | ms between periodic flushes (default: 10000) | No |
73
- | `personalApiKey` | `string` | Personal API key for local flag evaluation | No |
74
- | `featureFlagsPollingInterval` | `number` | ms between flag definition polls (default: 30000) | No |
75
- | `disableGeoip` | `boolean` | Disable GeoIP lookups (GDPR) | No |
76
- | `debug` | `boolean` | Enable SDK debug logging | No |
77
- | `identify` | `Mapping` | Destination-level identity mapping | No |
78
- | `group` | `Mapping` | Destination-level group mapping | No |
79
- | `include` | `string[]` | Event sections flattened into properties | No |
80
-
81
- ## Mapping Settings
82
-
83
- Per-event mapping settings override destination-level settings.
84
-
85
- | Name | Type | Description |
86
- | ---------- | --------- | ---------------------------------------------------------------- |
87
- | `identify` | `Mapping` | Resolves to `{ distinctId, $set?, $set_once? }` for `identify()` |
88
- | `group` | `Mapping` | Resolves to `{ type, key, properties? }` for `groupIdentify()` |
89
-
90
- ## Identity
91
-
92
- Every PostHog server call requires a `distinctId`. Resolution order:
93
-
94
- 1. Mapping-level `settings.identify.map.distinctId`
95
- 2. Destination-level `settings.identify.map.distinctId`
96
- 3. Fallback: `event.user.id`, `event.user.hash`, `event.user.session`, or
97
- `'anonymous'`
98
-
99
- When `$set` or `$set_once` are present in the resolved identify object,
100
- `client.identify()` is called with the person properties nested under
101
- `properties: { $set, $set_once }`.
102
-
103
- ## Groups
104
-
105
- Group analytics associates events with companies, teams, or projects.
106
-
107
- - **With properties**:
108
- `client.groupIdentify({ groupType, groupKey, properties })`
109
- - **Without properties**: adds `groups: { [type]: key }` to `capture()` calls
110
-
111
- ## Destroy / Shutdown
112
-
113
- The destination implements `destroy()` calling `client.shutdown()` to flush all
114
- queued events before the server flow exits. This is critical for ensuring no
115
- events are lost on process shutdown.
116
-
117
- ## Self-Hosted PostHog
118
-
119
- Set `host` to your self-hosted PostHog instance URL:
120
-
121
- ```json
122
- "settings": {
123
- "apiKey": "phc_...",
124
- "host": "https://posthog.your-domain.com"
125
- }
126
- ```
127
-
128
- ## Feature Flags
129
-
130
- Pass `personalApiKey` for local feature flag evaluation. Flag evaluation is not
131
- a destination concern; it is exposed via the SDK client instance.
132
-
133
- ## Web Destination
43
+ ## Documentation
134
44
 
135
- For browser-side PostHog integration, see
136
- [@walkeros/web-destination-posthog](https://www.npmjs.com/package/@walkeros/web-destination-posthog).
45
+ Full configuration, mapping, and examples live in the docs:
46
+ **https://www.walkeros.io/docs/destinations/server/posthog**
137
47
 
138
48
  ## Contribute
139
49
 
@@ -144,4 +54,4 @@ Feel free to contribute by submitting an
144
54
 
145
55
  ## License
146
56
 
147
- This project is licensed under the MIT License.
57
+ MIT
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$meta": {
3
3
  "package": "@walkeros/server-destination-posthog",
4
- "version": "4.1.0-next-1778668930820",
4
+ "version": "4.1.0",
5
5
  "type": "destination",
6
6
  "platform": [
7
7
  "server"
@@ -137,7 +137,7 @@
137
137
  "consent": {
138
138
  "functional": true
139
139
  },
140
- "id": "7ab56407202bfd9b",
140
+ "id": "d5d1cf1b97753da6",
141
141
  "trigger": "load",
142
142
  "entity": "page",
143
143
  "action": "view",
@@ -252,7 +252,7 @@
252
252
  "consent": {
253
253
  "functional": true
254
254
  },
255
- "id": "8682cb3978fdffe4",
255
+ "id": "0e17646e2ded0578",
256
256
  "trigger": "load",
257
257
  "entity": "order",
258
258
  "action": "complete",
@@ -346,7 +346,7 @@
346
346
  "consent": {
347
347
  "functional": true
348
348
  },
349
- "id": "b4f80a42245781c4",
349
+ "id": "b3b329597bdb7742",
350
350
  "trigger": "load",
351
351
  "entity": "product",
352
352
  "action": "view",
@@ -406,7 +406,7 @@
406
406
  "consent": {
407
407
  "functional": true
408
408
  },
409
- "id": "c0a2511ccc162aa5",
409
+ "id": "7d83ccc3eadd6cd3",
410
410
  "trigger": "test",
411
411
  "entity": "company",
412
412
  "action": "update",
@@ -488,7 +488,7 @@
488
488
  "consent": {
489
489
  "functional": true
490
490
  },
491
- "id": "ef07e31be60c210a",
491
+ "id": "bc3e3240c11923c8",
492
492
  "trigger": "test",
493
493
  "entity": "user",
494
494
  "action": "login",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@walkeros/server-destination-posthog",
3
3
  "description": "PostHog server destination for walkerOS",
4
- "version": "4.1.0-next-1778668930820",
4
+ "version": "4.1.0",
5
5
  "license": "MIT",
6
6
  "exports": {
7
7
  ".": {
@@ -22,7 +22,8 @@
22
22
  }
23
23
  },
24
24
  "files": [
25
- "dist/**"
25
+ "dist/**",
26
+ "CHANGELOG.md"
26
27
  ],
27
28
  "scripts": {
28
29
  "build": "tsup --silent",
@@ -34,12 +35,12 @@
34
35
  "update": "npx npm-check-updates -u && npm update"
35
36
  },
36
37
  "dependencies": {
37
- "@walkeros/core": "4.1.0-next-1778668930820",
38
- "@walkeros/server-core": "4.1.0-next-1778668930820",
38
+ "@walkeros/core": "4.1.0",
39
+ "@walkeros/server-core": "4.1.0",
39
40
  "posthog-node": "^5.0.0"
40
41
  },
41
42
  "devDependencies": {
42
- "@walkeros/collector": "4.1.0-next-1778668930820"
43
+ "@walkeros/collector": "4.1.0"
43
44
  },
44
45
  "repository": {
45
46
  "url": "git+https://github.com/elbwalker/walkerOS.git",