@stacknext/core 0.9.0 → 0.10.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/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { StackNextConfig } from './config.js';
2
2
  import type { DiagnosticOverview, DiagnosticReference, DiagnosticReport } from './diagnostics.js';
3
3
  export declare const STACKNEXT_SCHEMA_VERSION = 1;
4
- export declare const STACKNEXT_SDK_VERSION = "0.9.0";
4
+ export declare const STACKNEXT_SDK_VERSION = "0.10.0";
5
5
  export declare const SPAN_KINDS: readonly ["internal", "server", "client", "producer", "consumer"];
6
6
  export type StackNextSpanKind = (typeof SPAN_KINDS)[number];
7
7
  export declare const SPAN_STATUSES: readonly ["unset", "ok", "error"];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,kBAAkB,CAAA;AAEzB,eAAO,MAAM,wBAAwB,IAAI,CAAA;AACzC,eAAO,MAAM,qBAAqB,UAAU,CAAA;AAE5C,eAAO,MAAM,UAAU,mEAAoE,CAAA;AAC3F,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AAE3D,eAAO,MAAM,aAAa,mCAAoC,CAAA;AAC9D,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;AAEhE,eAAO,MAAM,gBAAgB,0CAA2C,CAAA;AACxE,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEvE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,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HEMA_VERSION = 1;
2
- export const STACKNEXT_SDK_VERSION = '0.9.0';
2
+ export const STACKNEXT_SDK_VERSION = '0.10.0';
3
3
  export const SPAN_KINDS = ['internal', 'server', 'client', 'producer', 'consumer'];
4
4
  export const SPAN_STATUSES = ['unset', 'ok', 'error'];
5
5
  export const DATABASE_SOURCES = ['drizzle', 'prisma', 'manual'];
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAA;AACzC,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAA;AAE5C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAU,CAAA;AAG3F,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAU,CAAA;AAG9D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAA;AAsLxE,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,cAAc;IACd,aAAa;IACb,SAAS;CACD,CAAA;AAGV,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,WAAW;IACX,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,SAAS;CACD,CAAA;AAwPV,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAA"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAA;AACzC,MAAM,CAAC,MAAM,qBAAqB,GAAG,QAAQ,CAAA;AAE7C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAU,CAAA;AAG3F,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAU,CAAA;AAG9D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAA;AAsLxE,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,cAAc;IACd,aAAa;IACb,SAAS;CACD,CAAA;AAGV,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,WAAW;IACX,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,SAAS;CACD,CAAA;AAwPV,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAA"}
@@ -0,0 +1,129 @@
1
+ ---
2
+ title: Configuration
3
+ description: The stacknext.config.json schema, defaults, validation and loading helpers.
4
+ ---
5
+
6
+ # Configuration
7
+
8
+ `stacknext.config.json` lives at the root of the Next.js application.
9
+ `@stacknext/core/config-file` loads and validates it; `@stacknext/core` exports
10
+ the Zod schema and inferred types.
11
+
12
+ ## Loading
13
+
14
+ ```ts
15
+ import {
16
+ CONFIG_FILE_NAME,
17
+ configPath,
18
+ loadConfig,
19
+ readConfigFile,
20
+ } from '@stacknext/core/config-file'
21
+
22
+ const path = configPath(process.cwd()) // <project>/stacknext.config.json
23
+ const config = await loadConfig(process.cwd())
24
+ ```
25
+
26
+ - A missing file loads the defaults.
27
+ - Invalid JSON or an invalid field throws `StackNextConfigError` with `issues`.
28
+ - The schema is strict at every level: unknown keys are rejected.
29
+
30
+ `CONFIG_FILE_NAME` is `stacknext.config.json`.
31
+
32
+ ## Defaults
33
+
34
+ `parseStackNextConfig({})` produces:
35
+
36
+ ```json
37
+ {
38
+ "dashboard": { "port": 4400 },
39
+ "collector": { "maxSpans": 5000, "retentionMs": 600000 },
40
+ "instrumentation": {
41
+ "verbose": false,
42
+ "captureFetch": true,
43
+ "captureErrors": true
44
+ },
45
+ "privacy": {
46
+ "captureHeaders": false,
47
+ "captureRequestBodies": false,
48
+ "captureSqlParameters": false,
49
+ "redactSensitiveData": true
50
+ },
51
+ "database": { "drizzle": false, "prisma": false },
52
+ "diagnostics": {
53
+ "enabled": true,
54
+ "repeatedQueryMin": 5,
55
+ "slowSpans": {
56
+ "databaseMs": 250,
57
+ "httpMs": 500,
58
+ "customMs": 300,
59
+ "frameworkMs": 500,
60
+ "otherMs": 500
61
+ },
62
+ "repeatedHttpMin": 3,
63
+ "errorGrouping": true,
64
+ "errorGroupMin": 2,
65
+ "maxFindings": 100
66
+ },
67
+ "slowRequestMs": 500,
68
+ "snapshots": {
69
+ "autoOnExit": true,
70
+ "autoOnError": true,
71
+ "autoKeep": 10,
72
+ "maxBytes": 67108864
73
+ }
74
+ }
75
+ ```
76
+
77
+ ## Fields
78
+
79
+ | Field | Type / range | Meaning |
80
+ | --- | --- | --- |
81
+ | `projectName` | string, 1–200, optional | Name shown in the dashboard and records. |
82
+ | `dashboard.port` | integer, 1024–65535, default 4400 | Preferred loopback port. StackNext tries the next 25 ports if busy. |
83
+ | `collector.maxSpans` | integer, 100–100000, default 5000 | In-memory span capacity. Error and query buffers derive from it. |
84
+ | `collector.retentionMs` | integer, 30000–86400000, default 600000 | How long received telemetry stays in memory. |
85
+ | `instrumentation.verbose` | boolean, default false | Requests the documented `NEXT_OTEL_VERBOSE=1` span set. |
86
+ | `instrumentation.captureFetch` | boolean, default true | Captures Next.js `AppRender.fetch` spans. |
87
+ | `instrumentation.captureErrors` | boolean, default true | Enables the Next.js error hook. |
88
+ | `privacy.captureHeaders` | must be `false` | Header capture is not implemented. |
89
+ | `privacy.captureRequestBodies` | must be `false` | Body capture is not implemented. |
90
+ | `privacy.captureSqlParameters` | must be `false` | SQL bind capture is not implemented. |
91
+ | `privacy.redactSensitiveData` | must be `true` | Redaction cannot be disabled. |
92
+ | `database.drizzle` / `database.prisma` | boolean, default false | Setup intent for `init`/`doctor`; adapters still require registration. |
93
+ | `diagnostics.enabled` | boolean, default true | Enables the deterministic report. |
94
+ | `diagnostics.repeatedQueryMin` | integer, 2–100, default 5 | Repeated SQL shapes per trace for `n-plus-one-queries`. |
95
+ | `diagnostics.slowSpans.*` | integer, 1–600000 ms | Per-category slow-span thresholds. |
96
+ | `diagnostics.repeatedHttpMin` | integer, 2–100, default 3 | Repeated normalized endpoints per trace for `repeated-external-http`. |
97
+ | `diagnostics.errorGrouping` | boolean, default true | Enables fingerprint grouping. |
98
+ | `diagnostics.errorGroupMin` | integer, 2–100, default 2 | Occurrences before an error group is labeled repeated. |
99
+ | `diagnostics.maxFindings` | integer, 10–1000, default 100 | Hard cap per report. |
100
+ | `slowRequestMs` | integer, 1–600000, default 500 | Slow-request threshold used by CLI, dashboard and MCP. |
101
+ | `snapshots.autoOnExit` | boolean, default true | Save a snapshot on graceful `stacknext dev` exit. |
102
+ | `snapshots.autoOnError` | boolean, default true | Save a snapshot on the first error, with a 60-second cooldown. |
103
+ | `snapshots.autoKeep` | integer, 1–100, default 10 | Automatic exit/error snapshots to keep. Manual/imported are never rotated. |
104
+ | `snapshots.maxBytes` | integer, 1 MiB–256 MiB, default 64 MiB | Per-snapshot cap. Oversized saves fail instead of truncating. |
105
+
106
+ ## Validation behavior
107
+
108
+ - Invalid privacy values throw, even if they are merely set to `true` and never
109
+ used.
110
+ - `stacknext init` writes a smaller file; missing fields are filled with
111
+ defaults when loaded.
112
+ - `stacknext doctor` reports invalid configuration with the Zod issue paths.
113
+ - The collector exports its resolved configuration through `/api/health` and
114
+ snapshots record it with the sample.
115
+
116
+ ## Related
117
+
118
+ <!-- coderabbit-ai-generated:v1 -->
119
+
120
+ <!-- coderabbit-ai-generated-section:v1:348259e466fbc63f4d33e03c868398187bcd79370317321a30a260c922c3d47a -->
121
+
122
+ - [Snapshots](snapshots.md)
123
+ - [Transport](transport.md)
124
+ - CLI configuration: locate the installed `@stacknext/cli` package and read
125
+ its `docs/configuration.md`, or see the
126
+ [repository guide](https://github.com/marrrkkk/stacknext/blob/main/packages/cli/docs/configuration.md)
127
+ (which may describe a newer version).
128
+
129
+ <!-- /coderabbit-ai-generated:v1 -->
package/docs/index.md ADDED
@@ -0,0 +1,85 @@
1
+ ---
2
+ title: "@stacknext/core"
3
+ description: Shared wire types, configuration, redaction, bounded storage and snapshot primitives used by every StackNext package.
4
+ ---
5
+
6
+ # @stacknext/core
7
+
8
+ `@stacknext/core` is the base package of StackNext. It defines the telemetry
9
+ wire format, validates collector payloads, redacts sensitive values, owns the
10
+ in-memory telemetry store and provides the snapshot storage used by the CLI.
11
+
12
+ ## Who should read this
13
+
14
+ - **Contributors and maintainers** changing a shared type, schema, limit or
15
+ redaction rule.
16
+ - **Advanced users** building a custom adapter or reading the collector API
17
+ types.
18
+ - **AI coding agents** that need the exact field names or limits before
19
+ changing StackNext code.
20
+
21
+ Most applications should install `@stacknext/cli` and `@stacknext/next`
22
+ instead of installing this package directly. `@stacknext/core` is installed
23
+ automatically as a dependency of the CLI, instrumentation and adapter packages.
24
+
25
+ ## Package boundary
26
+
27
+ `core` is the base of the dependency graph. It must not import CLI, Next.js,
28
+ React, Playwright or adapter code. Packages that may depend on it:
29
+
30
+ - `@stacknext/diagnostics`
31
+ - `@stacknext/regression`
32
+ - `@stacknext/next`
33
+ - `@stacknext/drizzle`
34
+ - `@stacknext/prisma`
35
+ - `@stacknext/mcp`
36
+ - `@stacknext/cli`
37
+
38
+ ## Installation
39
+
40
+ Normally no direct install is needed. For adapter or tooling work:
41
+
42
+ ```bash
43
+ pnpm add @stacknext/core
44
+ ```
45
+
46
+ The package is ESM-only and requires Node.js `>=20.9.0`.
47
+
48
+ ## Entry points
49
+
50
+ | Import | Contents |
51
+ | --- | --- |
52
+ | `@stacknext/core` | Wire types, Zod schemas, redaction, normalization, bounded store, framework span allowlist, coverage, diagnostics wire types, config, verbose status. |
53
+ | `@stacknext/core/transport` | The process-wide bounded transport, environment resolution and loopback validation. |
54
+ | `@stacknext/core/config-file` | `stacknext.config.json` path, reading and loading with Zod validation. |
55
+ | `@stacknext/core/snapshots` | Snapshot payloads, atomic local storage, listing, import/export and detached read views. |
56
+
57
+ The `./package.json` export lets tools read the installed version.
58
+
59
+ ## Version and compatibility
60
+
61
+ Read the installed version from the package metadata, not from this page:
62
+
63
+ ```bash
64
+ node -p "require('./node_modules/@stacknext/core/package.json').version"
65
+ ```
66
+
67
+ This documentation ships in the same package archive as the code, so it matches
68
+ that installed version. It is not a substitute for the TypeScript declarations
69
+ in `dist`.
70
+
71
+ ## Documentation map
72
+
73
+ - [Wire schemas](schemas.md) — envelope, spans, errors, queries, responses.
74
+ - [Transport](transport.md) — environment variables, queue limits and the
75
+ ingest request.
76
+ - [Redaction](redaction.md) — both redaction layers and what is never captured.
77
+ - [Configuration](configuration.md) — `StackNextConfig` fields and defaults.
78
+ - [Snapshots](snapshots.md) — payloads, storage and detached views.
79
+
80
+ ## Related packages
81
+
82
+ - `@stacknext/next` converts OpenTelemetry spans into these wire types.
83
+ - `@stacknext/diagnostics` reads the diagnostic types and computes findings.
84
+ - `@stacknext/regression` uses the diagnostic and trace shapes for comparisons.
85
+ - `@stacknext/cli` hosts the collector and imports `core` directly.
@@ -0,0 +1,104 @@
1
+ ---
2
+ title: Redaction
3
+ description: The redaction and sanitization functions that run in the app process and again in the collector.
4
+ ---
5
+
6
+ # Redaction
7
+
8
+ Redaction is a core invariant, not an optional feature. StackNext applies it
9
+ twice:
10
+
11
+ 1. **In the application process**, before an event is enqueued.
12
+ 2. **In the collector**, before an event enters the in-memory store.
13
+
14
+ A bug in one layer does not automatically expose raw data through the other.
15
+
16
+ ## Exported helpers
17
+
18
+ The exact exports are listed in `packages/core/src/index.ts`; the functions most
19
+ commonly used by adapters and instrumentation are:
20
+
21
+ <!-- coderabbit-ai-generated:v1 -->
22
+
23
+ <!-- coderabbit-ai-generated-section:v1:db60a7dcdc0f7b028f4b8bb8b881845bc8d1616febbc9a3cce86a9dc48b6bfed -->
24
+
25
+ | Function | Purpose |
26
+ | --- | --- |
27
+ | `redactText(value, maxLength?)` | Replaces recognized secret patterns and bounds the length. |
28
+ | `redactErrorText(value)` | Text redaction for messages and stacks. |
29
+ | `redactSql(sql)` | Removes credential-shaped values from SQL text. |
30
+ | `sanitizeAttributes(attributes)` | Redacts sensitive keys, header-shaped maps and query values in recognized URL attributes. |
31
+ | `sanitizeResource(attributes)` | Keeps only the resource allowlist. |
32
+ | `stripUrlQuery(value)` | Removes query strings and fragments from a URL or path. |
33
+ | `stripUrlQueryInText(value)` | Removes embedded URLs' query strings from free text. |
34
+ | `normalizeSpan(...)` / normalization helpers | Convert and bound stored telemetry. |
35
+
36
+ <!-- /coderabbit-ai-generated:v1 -->
37
+
38
+ Check the current TypeScript declarations in the installed package before
39
+ calling a helper that is not listed here; this page deliberately does not invent
40
+ exports.
41
+
42
+ ## What is redacted
43
+
44
+ <!-- coderabbit-ai-generated:v1 -->
45
+
46
+ <!-- coderabbit-ai-generated-section:v1:c0de03cf3ce70089f21a3f2d704c9698d940710f517613abe5dcaae2e71cb0ce -->
47
+
48
+ - **Recognized URL attributes and fields** lose query values and fragments.
49
+ For example, `http.url: "http://host/path?item=123"` becomes
50
+ `http.url: "http://host/path"`. Custom attributes with unrecognized keys
51
+ can retain URL query values, subject to text-pattern redaction.
52
+ - **Sensitive keys** containing authorization, cookie, password, secret, API
53
+ key, access/refresh/private token, client secret, credential, connection
54
+ string, database URL, DSN and similar terms become `[redacted]`.
55
+ - **Header-shaped attribute maps** are replaced wholesale.
56
+ - **Secret patterns** such as bearer tokens, JWTs, GitHub/Slack/Stripe-like
57
+ keys, AWS access key ids, credential-bearing connection strings and
58
+ `key=value` password/token patterns are replaced.
59
+ - **SQL text** is redacted, and bind parameters are never read.
60
+ - **Error messages and stacks** pass through the same text redaction. Stack URLs
61
+ lose query strings.
62
+ - **Resource attributes** are reduced to an allowlist: service name, version,
63
+ namespace, SDK metadata, runtime, Next.js version and environment.
64
+
65
+ <!-- /coderabbit-ai-generated:v1 -->
66
+
67
+ ## What is never captured
68
+
69
+ <!-- coderabbit-ai-generated:v1 -->
70
+
71
+ <!-- coderabbit-ai-generated-section:v1:f481c88cbb487056b04357bf8bb24ce14da784fa467267760b99bfac22773387 -->
72
+
73
+ StackNext has no dedicated field for request or response bodies, headers,
74
+ cookies, URL query values, SQL bind parameters, Playwright artifacts, machine
75
+ identifiers or the collector token in telemetry records. Custom attributes
76
+ with unrecognized keys can still retain URL query values.
77
+
78
+ <!-- /coderabbit-ai-generated:v1 -->
79
+
80
+ The configuration schema rejects attempts to enable header, body or SQL
81
+ parameter capture. See [configuration](configuration.md).
82
+
83
+ ## Limits
84
+
85
+ Redaction is pattern-based and intentionally conservative, not a formal secret
86
+ scanner. An unrecognized literal in a SQL string, URL path segment, span
87
+ attribute or error message may still be stored. Keep credentials out of those
88
+ places, and review exports, snapshots and regression records before sharing
89
+ them.
90
+
91
+ Custom span and action attributes pass through `sanitizeAttributes` before they
92
+ are enqueued and through the collector pass before storage. The helper-added
93
+ markers `stacknext.manual` and `stacknext.span.kind` are not sensitive and are
94
+ set after caller attributes.
95
+
96
+ ## Adding a field
97
+
98
+ A new captured field is not complete until:
99
+
100
+ 1. the app-side producer redacts it;
101
+ 2. the collector validates and redacts it again;
102
+ 3. `docs/privacy.md` and the package docs describe it;
103
+ 4. a test asserts that known secrets do not appear in API, export, regression
104
+ or snapshot output.
@@ -0,0 +1,154 @@
1
+ ---
2
+ title: Wire schemas
3
+ description: The StackNext ingest envelope, stored telemetry shapes and Zod validation boundary.
4
+ ---
5
+
6
+ # Wire schemas
7
+
8
+ StackNext normalizes telemetry into plain JSON before it crosses the loopback
9
+ boundary. `@stacknext/core` exports the TypeScript types and Zod schemas used by
10
+ the app-side exporter, the collector and regression capture.
11
+
12
+ ## Version constants
13
+
14
+ ```ts
15
+ import {
16
+ STACKNEXT_SCHEMA_VERSION,
17
+ STACKNEXT_SDK_VERSION,
18
+ } from '@stacknext/core'
19
+
20
+ STACKNEXT_SCHEMA_VERSION // 1
21
+ STACKNEXT_SDK_VERSION // the installed package version
22
+ ```
23
+
24
+ `STACKNEXT_SCHEMA_VERSION` versions the ingest envelope. The SDK version is
25
+ reported with each connected instance and is compared during regression
26
+ environment checks.
27
+
28
+ ## Ingest envelope
29
+
30
+ `StackNextIngestEnvelope` is the only body accepted by
31
+ `POST /__stacknext/v1/ingest`:
32
+
33
+ ```ts
34
+ import type { StackNextIngestEnvelope } from '@stacknext/core'
35
+
36
+ const envelope: StackNextIngestEnvelope = {
37
+ version: 1,
38
+ instance: {
39
+ instanceId: '...',
40
+ serviceName: 'my-app',
41
+ sdkVersion: '<installed-version>',
42
+ runtime: 'nodejs',
43
+ },
44
+ spans: [],
45
+ errors: [],
46
+ databaseQueries: [],
47
+ }
48
+ ```
49
+
50
+ | Field | Required | Notes |
51
+ | --- | --- | --- |
52
+ | `version` | Yes | Must be `1`. |
53
+ | `instance.instanceId` | Yes | Identifies one app process. |
54
+ | `instance.serviceName` | Yes | Used by request and trace summaries. |
55
+ | `instance.sdkVersion` | Yes | StackNext package version. |
56
+ | `instance.runtime` | Yes | Only `nodejs` is supported. |
57
+ | `instance.projectName` | No | From `stacknext.config.json` or the transport. |
58
+ | `instance.nextVersion` | No | Next.js version reported by the app. |
59
+ | `instance.runtimeVersion` | No | Node.js version, used for environment checks. |
60
+ | `spans` | Yes | At most 500 per envelope. |
61
+ | `errors` | Yes | At most 25 per envelope. |
62
+ | `databaseQueries` | Yes | At most 100 per envelope. |
63
+ | `diagnostics` | No | Exporter queue/drop counters. |
64
+
65
+ An envelope over the per-array limit, over 2 MiB, with an unknown `version`, or
66
+ with an invalid field is rejected before it reaches the store.
67
+
68
+ ## Span shape
69
+
70
+ `StackNextSpanInput` is the wire form. The collector adds `receivedAt` when it
71
+ stores the span.
72
+
73
+ ```ts
74
+ interface StackNextSpanInput {
75
+ traceId: string
76
+ spanId: string
77
+ parentSpanId?: string
78
+ name: string
79
+ kind: 'internal' | 'server' | 'client' | 'producer' | 'consumer'
80
+ startTime: number
81
+ endTime: number
82
+ durationMs: number
83
+ status: 'unset' | 'ok' | 'error'
84
+ statusMessage?: string
85
+ serviceName: string
86
+ route?: string
87
+ method?: string
88
+ statusCode?: number
89
+ nextSpanType?: string
90
+ nextSpanName?: string
91
+ nextRoute?: string
92
+ nextPage?: string
93
+ nextSegment?: string
94
+ nextRsc?: boolean
95
+ attributes: Record<string, unknown>
96
+ events: StackNextSpanEvent[]
97
+ resource: Record<string, unknown>
98
+ }
99
+ ```
100
+
101
+ Framework fields come from the documented Next.js span allowlist in
102
+ `packages/core/src/framework.ts`. Unknown span types are retained as verbose
103
+ evidence rather than mapped to a guessed feature.
104
+
105
+ ## Error shape
106
+
107
+ `StackNextErrorInput` carries a redacted message and stack plus optional Next.js
108
+ context. The collector adds `fingerprint` and `receivedAt` when storing it.
109
+
110
+ Fields include `id`, `message`, `name`, `stack`, `digest`, `timestamp`,
111
+ `route`, `method`, `requestPath`, `routerKind`, `routeType`, `renderSource`,
112
+ `renderType`, `traceId`, `spanId` and `attributes`.
113
+
114
+ Not every runtime provides a span context. When one is missing, the collector
115
+ uses route/method plus a 30-second window for correlation and reports the link
116
+ as fallback-based.
117
+
118
+ ## Database query shape
119
+
120
+ `StackNextDatabaseQueryInput` includes:
121
+
122
+ - `id`, `traceId?`, `spanId?`, `timestamp`;
123
+ - `durationMs: number | null` — `null` means unmeasured, never zero;
124
+ - `sql` — redacted SQL text;
125
+ - `databaseSystem`, `operation?`;
126
+ - `success`, `errorMessage?`;
127
+ - `source: 'drizzle' | 'prisma' | 'manual'`;
128
+ - `attributes`.
129
+
130
+ Bind parameters are never part of the type and cannot be captured through it.
131
+
132
+ ## Response types
133
+
134
+ `@stacknext/core` also exports the collector/CLI/MCP response contracts:
135
+ `RequestSummary`, `TraceSummary`, `TraceDetail`, `ErrorListItem`,
136
+ `DatabaseQueryListItem`, `PageResult`, `HealthResponse`, `OverviewResponse`,
137
+ `CoverageReport`, `DiagnosticReport`, `SnapshotSummary`, `SnapshotPayload` and
138
+ `ExportResponse`.
139
+
140
+ These are additive over time. Consumers should tolerate new optional fields and
141
+ read `meta.completeness` or response `limitations` before drawing conclusions.
142
+
143
+ ## Validation rules
144
+
145
+ - External payloads are Zod-validated at the collector boundary.
146
+ - Counts are bounded before storage.
147
+ - Duration values must be finite and non-negative; unknown durations stay
148
+ `null`.
149
+ - Trace and span ids must be valid hexadecimal W3C ids when they are used for
150
+ correlation.
151
+ - Redaction runs before enqueueing and again before storage.
152
+
153
+ See [redaction](redaction.md) and the collector's
154
+ the repository `docs/privacy.md` for the data boundary.
@@ -0,0 +1,96 @@
1
+ ---
2
+ title: Snapshots
3
+ description: Frozen, redacted telemetry snapshots, local storage and detached read views.
4
+ ---
5
+
6
+ # Snapshots
7
+
8
+ `@stacknext/core/snapshots` implements the snapshot format used by the CLI,
9
+ collector and dashboard. A snapshot is a versioned copy of one in-memory sample
10
+ written under `.stacknext/snapshots`. It is never replayed into the live store.
11
+
12
+ ## Payload
13
+
14
+ ```ts
15
+ import {
16
+ createSnapshotPayload,
17
+ saveSnapshot,
18
+ loadSnapshotPayload,
19
+ listSnapshots,
20
+ removeSnapshot,
21
+ snapshotExport,
22
+ importSnapshot,
23
+ createSnapshotView,
24
+ } from '@stacknext/core/snapshots'
25
+ ```
26
+
27
+ `SnapshotPayload` contains:
28
+
29
+ - `format: 'stacknext-snapshot'` and `version: 1`;
30
+ - `id`, `createdAt`, `source`, `projectName`, `collectorVersion`, `label?`;
31
+ - the resolved `config`;
32
+ - `sample` (`firstEventTime`, `lastEventTime`, `retentionMs`);
33
+ - redacted `spans`, `errors`, `databaseQueries`;
34
+ - `stats` and `limitations`.
35
+
36
+ `source` is `manual`, `exit`, `error` or `import`.
37
+
38
+ ## Creating and saving
39
+
40
+ ```ts
41
+ const payload = createSnapshotPayload({
42
+ store,
43
+ source: 'manual',
44
+ projectName: 'my-app',
45
+ collectorVersion: '<installed-version>',
46
+ config,
47
+ label: 'before refactor',
48
+ })
49
+
50
+ const summary = await saveSnapshot(projectDir, payload)
51
+ ```
52
+
53
+ `saveSnapshot()` validates the payload, creates private directories and writes
54
+ atomically. Files use mode `0600`; `.stacknext` uses `0700`. The default cap is
55
+ 64 MiB (`SNAPSHOT_MAX_BYTES`) and oversized saves fail instead of truncating.
56
+
57
+ ## Reading and listing
58
+
59
+ - `loadSnapshotPayload(projectDir, id)` validates the id and the stored schema.
60
+ - `loadSnapshotSummary(projectDir, id)` reads the small summary record.
61
+ - `listSnapshots(projectDir, { limit, offset })` returns a page plus an
62
+ `invalid` count. Invalid records stay visible as a count, not repaired.
63
+ - `listAllSnapshots(projectDir)` returns every valid summary.
64
+
65
+ Snapshot ids match `snap-<16 hex>`.
66
+
67
+ ## Import and export
68
+
69
+ `snapshotExport(payload)` converts a snapshot to the `ExportResponse` shape used
70
+ by `stacknext export`. `importSnapshot(projectDir, contents, { maxBytes, label })`
71
+ accepts a snapshot payload or export file, re-normalizes and re-redacts it, and
72
+ writes a new `import` snapshot. Unknown formats, malformed JSON and oversized
73
+ files are rejected.
74
+
75
+ ## Automatic snapshots
76
+
77
+ `rotateAutomaticSnapshots(projectDir, keep)` only considers `exit` and `error`
78
+ sources. Manual and imported snapshots are never rotated. The collector calls it
79
+ with `snapshots.autoKeep`, which defaults to 10.
80
+
81
+ ## Detached views
82
+
83
+ `createSnapshotView(payload)` returns a `TelemetryStore` pinned to the save
84
+ time, with a widened retention window so old records remain readable. It carries
85
+ no live diagnostics or coverage and never mutates the live store.
86
+
87
+ The collector caches at most three detached views and invalidates them by file
88
+ `mtimeMs`. Editing or replacing snapshot files outside StackNext is unsupported.
89
+
90
+ ## Limits
91
+
92
+ - A snapshot has no diagnostics, coverage or live updates.
93
+ - Automatic exit snapshots require a graceful shutdown and a non-empty sample.
94
+ - Error snapshots fire on the first error and then respect a 60-second cooldown.
95
+ - A crash, `SIGKILL` or full disk can skip an automatic save.
96
+ - Snapshots are local files. Review them before sharing, as with any export.
@@ -0,0 +1,118 @@
1
+ ---
2
+ title: Transport
3
+ description: The bounded, asynchronous loopback transport shared by instrumentation and database adapters.
4
+ ---
5
+
6
+ # Transport
7
+
8
+ `@stacknext/core/transport` implements the process-wide queue that carries
9
+ telemetry from the application to the local collector. Instrumentation never
10
+ blocks a request on network I/O: spans, errors and queries are enqueued and
11
+ flushed on timers.
12
+
13
+ ## Configuration from the environment
14
+
15
+ <!-- coderabbit-ai-generated:v1 -->
16
+
17
+ <!-- coderabbit-ai-generated-section:v1:ae5631127163a0e4e5963cd1aafd24ac92839a0b64f169636b78433e01038da9 -->
18
+
19
+ ```ts
20
+ import {
21
+ getStackNextTransport,
22
+ isLoopbackUrl,
23
+ transportOptionsFromEnv,
24
+ } from '@stacknext/core/transport'
25
+
26
+ const resolved = transportOptionsFromEnv()
27
+ if ('error' in resolved) {
28
+ throw new Error(resolved.error)
29
+ }
30
+ const transport = getStackNextTransport(resolved.options)
31
+ ```
32
+
33
+ <!-- /coderabbit-ai-generated:v1 -->
34
+
35
+ `transportOptionsFromEnv()` reads:
36
+
37
+ | Variable | Required | Meaning |
38
+ | --- | --- | --- |
39
+ | `STACKNEXT_COLLECTOR_URL` | Yes | Loopback collector origin, for example `http://127.0.0.1:4400`. |
40
+ | `STACKNEXT_TOKEN` | Yes | Bearer token, at least 16 characters. |
41
+ | `STACKNEXT_PROJECT_NAME` | No | Project name reported to the collector. |
42
+ | `STACKNEXT_SERVICE_NAME` | No | Service name used in span summaries. |
43
+ | `STACKNEXT_NEXT_VERSION` | No | Next.js version used for environment snapshots. |
44
+ | `STACKNEXT_DEBUG` | No | Set to `1` for transport debug logs. |
45
+
46
+ <!-- coderabbit-ai-generated:v1 -->
47
+
48
+ <!-- coderabbit-ai-generated-section:v1:47067ada81a00e3b67dc70a931d2be33cd6d33b65434b42fc33d1b76a434d04d -->
49
+
50
+ If both required variables are absent, the transport is disabled and
51
+ instrumentation is inert. That is intentional: the same production build can
52
+ run without a local collector. Partial configuration, a short token or a
53
+ non-loopback URL yields an `{ error }` result from `transportOptionsFromEnv()`.
54
+ The no-argument `getStackNextTransport()` discards that error and returns
55
+ `null`. Inspect the result explicitly, as above, to receive the configuration
56
+ error.
57
+
58
+ <!-- /coderabbit-ai-generated:v1 -->
59
+
60
+ `isLoopbackUrl()` accepts `http` or `https` URLs whose hostname is `127.0.0.1`,
61
+ `localhost`, `[::1]` or `::1`, and rejects embedded credentials.
62
+
63
+ ## Options
64
+
65
+ ```ts
66
+ interface StackNextTransportOptions {
67
+ collectorUrl: string
68
+ token: string
69
+ serviceName?: string
70
+ projectName?: string
71
+ nextVersion?: string
72
+ instanceId?: string
73
+ maxQueueSize?: number
74
+ batchSize?: number
75
+ flushIntervalMs?: number
76
+ requestTimeoutMs?: number
77
+ heartbeatIntervalMs?: number
78
+ debug?: boolean
79
+ }
80
+ ```
81
+
82
+ The queue is bounded. Its default capacity is 5,000 events, the batch size is
83
+ 250, the heartbeat interval is 10 seconds and one ingest request is capped at
84
+ 1.5 MB. When the queue is full the oldest queued events are dropped; the
85
+ exporter reports drop counters through `diagnostics`.
86
+
87
+ ## Shared instance
88
+
89
+ `getStackNextTransport(options?)` returns one transport per process and caches
90
+ it globally. The Next.js exporter and the Drizzle/Prisma adapters therefore
91
+ share one queue instead of creating competing buffers. Calling it without
92
+ options resolves the environment configuration.
93
+
94
+ A different collector URL, token or service name creates a new transport and
95
+ shuts down the previous one. Adapters should call
96
+ `getStackNextTransport()` without options so they attach to the active instance.
97
+
98
+ `resetGlobalTransportForTests()` detaches the global transport. It is a test
99
+ helper and does not export queued data.
100
+
101
+ ## Ingest request
102
+
103
+ The transport sends `POST /__stacknext/v1/ingest` with:
104
+
105
+ ```http
106
+ Authorization: Bearer <STACKNEXT_TOKEN>
107
+ Content-Type: application/json
108
+ ```
109
+
110
+ The collector validates the envelope, redacts again and stores the data. Network
111
+ failures are retried on the next flush; a failed send never throws into the
112
+ application.
113
+
114
+ ## Related
115
+
116
+ - [Schemas](schemas.md)
117
+ - [Redaction](redaction.md)
118
+ - [@stacknext/next instrumentation](../../next/docs/instrumentation.md)
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@stacknext/core",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Core telemetry schema, redaction, configuration and bounded storage for StackNext",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "files": [
8
- "dist"
8
+ "dist",
9
+ "docs"
9
10
  ],
10
11
  "main": "./dist/index.js",
11
12
  "types": "./dist/index.d.ts",